From ceac85276419bc25f076b3ada6b42d7db78f6178 Mon Sep 17 00:00:00 2001 From: nagatomi Date: Fri, 30 Aug 2024 18:36:38 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=82=B0?= =?UTF-8?q?=E3=83=AB=E3=83=BC=E3=83=97=E3=80=81=E3=82=AB=E3=82=B9=E3=82=BF?= =?UTF-8?q?=E3=83=A0=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=81=AEfile?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/bundle.js | 5672 ++++++++++------- lib/actions/index.js | 118 - lib/assets/images/add_column.svg | 1 - lib/assets/images/add_row.svg | 1 - lib/components/FieldConfirmSource.js | 13 +- lib/components/FieldGroup.js | 265 - lib/components/FieldGroupConfirmSource.js | 12 + lib/components/UnitConfirmSource.js | 12 + lib/components/UnitGroup.js | 243 - lib/components/UnitGroupConfirmSource.js | 12 + lib/components/UnitSource.js | 22 + lib/components/base.js | 1249 ---- .../cofirmLayouts/GroupTableLayoutConfirm.js | 340 + .../cofirmLayouts/TableLayoutConfirm.js | 260 + .../UnitGroupTableLayoutConfirm.js | 318 + .../cofirmLayouts/UnitTableLayoutConfirm.js | 260 + lib/components/field-confirm-source.js | 284 - lib/components/field-group-source.js | 867 --- lib/components/field-group.js | 264 - lib/components/field-source.js | 121 - lib/components/field.js | 101 - lib/components/genelator/_FieldGroup.js | 424 -- lib/components/genelator/base.js | 1406 ---- lib/components/genelator/base/FieldClear.js | 39 - lib/components/genelator/base/OptionItem.js | 137 +- lib/components/html/AcmsInput.js | 66 - lib/components/html/Checkbox.js | 265 +- lib/components/html/FileInput.js | 397 +- lib/components/html/ImageInput.js | 290 +- lib/components/html/Label.js | 21 - lib/components/html/MediaInput.js | 131 - lib/components/html/RadioButton.js | 6 +- lib/components/html/RichEditor.js | 102 +- lib/components/html/Selectbox.js | 6 +- lib/components/html/Table.js | 6 +- lib/components/html/TextInput.js | 6 +- lib/components/html/Textarea.js | 6 +- lib/components/html/TextareaInput.js | 34 - lib/components/html/WrapTable.js | 38 + lib/components/input.js | 535 -- lib/components/input/section.js | 129 - lib/components/input/table.js | 87 - lib/components/layouts/GroupTable.js | 536 -- lib/components/layouts/GroupTableLayout.js | 627 +- lib/components/layouts/Table.js | 84 - .../layouts/UnitGroupTableLayout.js | 76 +- lib/components/layouts/UnitTableLayout.js | 6 +- lib/components/modal-dialog.js | 92 - lib/components/navigator/PreviewNavigator.js | 158 +- lib/components/section.disable.js | 927 --- lib/components/section.js | 509 -- lib/components/section_stable.js | 510 -- lib/components/table.disable.js | 926 --- lib/components/table.js | 511 -- lib/components/unit-group-source.js | 842 --- lib/components/unit-group.js | 244 - lib/components/unit-source.js | 528 -- lib/components/unit.js | 122 - lib/constants/action-types.js | 24 - lib/constants/index.js | 7 - lib/containers/_index.js | 445 -- lib/containers/index.js | 42 +- lib/hooks/useHtml.js | 7 - lib/lib/history.js | 9 - lib/lib/state-manager.js | 46 - lib/reducers/index.js | 118 - lib/store/EditorContext.js | 67 - package.json | 1 - src/components/FieldConfirmSource.jsx | 14 +- src/components/FieldGroupConfirmSource.jsx | 6 + src/components/UnitConfirmSource.jsx | 6 + src/components/UnitGroupConfirmSource.jsx | 6 + .../{UnitSource.tsx => UnitSource.jsx} | 0 .../cofirmLayouts/GroupTableLayoutConfirm.jsx | 199 + ...youtConfirm.tsx => TableLayoutConfirm.jsx} | 0 .../UnitGroupTableLayoutConfirm.jsx | 199 + .../cofirmLayouts/UnitTableLayoutConfirm.jsx | 181 + src/components/field-group-confirm-source.js | 177 - src/components/genelator/base/OptionItem.jsx | 97 +- src/components/html/Checkbox.jsx | 167 +- src/components/html/FileInput.jsx | 219 +- src/components/html/ImageInput.jsx | 158 +- src/components/html/RadioButton.jsx | 4 +- src/components/html/RichEditor.jsx | 68 +- src/components/html/Selectbox.jsx | 4 +- src/components/html/Table.jsx | 4 +- src/components/html/TextInput.jsx | 4 +- src/components/html/Textarea.jsx | 4 +- .../html/{WrapTable.tsx => WrapTable.jsx} | 10 +- src/components/layouts/GroupTableLayout.jsx | 315 +- .../layouts/UnitGroupTableLayout.jsx | 74 +- src/components/layouts/UnitTableLayout.jsx | 6 +- src/components/navigator/PreviewNavigator.jsx | 80 +- src/components/unit-confirm-source.js | 175 - src/components/unit-group-confirm-source.js | 183 - src/containers/index.jsx | 16 +- webpack.dev.js | 2 +- 97 files changed, 7175 insertions(+), 17233 deletions(-) delete mode 100644 lib/actions/index.js delete mode 100755 lib/assets/images/add_column.svg delete mode 100755 lib/assets/images/add_row.svg delete mode 100644 lib/components/FieldGroup.js create mode 100644 lib/components/FieldGroupConfirmSource.js create mode 100644 lib/components/UnitConfirmSource.js delete mode 100644 lib/components/UnitGroup.js create mode 100644 lib/components/UnitGroupConfirmSource.js create mode 100644 lib/components/UnitSource.js delete mode 100644 lib/components/base.js create mode 100644 lib/components/cofirmLayouts/GroupTableLayoutConfirm.js create mode 100644 lib/components/cofirmLayouts/TableLayoutConfirm.js create mode 100644 lib/components/cofirmLayouts/UnitGroupTableLayoutConfirm.js create mode 100644 lib/components/cofirmLayouts/UnitTableLayoutConfirm.js delete mode 100644 lib/components/field-confirm-source.js delete mode 100644 lib/components/field-group-source.js delete mode 100644 lib/components/field-group.js delete mode 100644 lib/components/field-source.js delete mode 100644 lib/components/field.js delete mode 100644 lib/components/genelator/_FieldGroup.js delete mode 100644 lib/components/genelator/base.js delete mode 100644 lib/components/genelator/base/FieldClear.js delete mode 100644 lib/components/html/AcmsInput.js delete mode 100644 lib/components/html/Label.js delete mode 100644 lib/components/html/MediaInput.js delete mode 100644 lib/components/html/TextareaInput.js create mode 100644 lib/components/html/WrapTable.js delete mode 100644 lib/components/input.js delete mode 100644 lib/components/input/section.js delete mode 100644 lib/components/input/table.js delete mode 100644 lib/components/layouts/GroupTable.js delete mode 100644 lib/components/layouts/Table.js delete mode 100644 lib/components/modal-dialog.js delete mode 100644 lib/components/section.disable.js delete mode 100644 lib/components/section.js delete mode 100644 lib/components/section_stable.js delete mode 100644 lib/components/table.disable.js delete mode 100644 lib/components/table.js delete mode 100644 lib/components/unit-group-source.js delete mode 100644 lib/components/unit-group.js delete mode 100644 lib/components/unit-source.js delete mode 100644 lib/components/unit.js delete mode 100644 lib/constants/action-types.js delete mode 100644 lib/constants/index.js delete mode 100644 lib/containers/_index.js delete mode 100644 lib/hooks/useHtml.js delete mode 100644 lib/lib/history.js delete mode 100644 lib/lib/state-manager.js delete mode 100644 lib/reducers/index.js delete mode 100644 lib/store/EditorContext.js create mode 100644 src/components/FieldGroupConfirmSource.jsx create mode 100644 src/components/UnitConfirmSource.jsx create mode 100644 src/components/UnitGroupConfirmSource.jsx rename src/components/{UnitSource.tsx => UnitSource.jsx} (100%) create mode 100644 src/components/cofirmLayouts/GroupTableLayoutConfirm.jsx rename src/components/cofirmLayouts/{TableLayoutConfirm.tsx => TableLayoutConfirm.jsx} (100%) create mode 100644 src/components/cofirmLayouts/UnitGroupTableLayoutConfirm.jsx create mode 100644 src/components/cofirmLayouts/UnitTableLayoutConfirm.jsx delete mode 100644 src/components/field-group-confirm-source.js rename src/components/html/{WrapTable.tsx => WrapTable.jsx} (80%) delete mode 100644 src/components/unit-confirm-source.js delete mode 100644 src/components/unit-group-confirm-source.js diff --git a/dist/bundle.js b/dist/bundle.js index 0c5590a..4011b68 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -246,7 +246,7 @@ } })(e); } - function b(e, t, n, r) { + function E(e, t, n, r) { function l(e) { return new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm'); } @@ -267,36 +267,36 @@ } function p() { (k += - null != _.subLanguage + null != x.subLanguage ? (function () { - var e = 'string' == typeof _.subLanguage; - if (e && !a[_.subLanguage]) return u(T); + var e = 'string' == typeof x.subLanguage; + if (e && !a[x.subLanguage]) return u(N); var t = e - ? b(_.subLanguage, T, !0, w[_.subLanguage]) - : E(T, _.subLanguage.length ? _.subLanguage : void 0); + ? E(x.subLanguage, N, !0, w[x.subLanguage]) + : b(N, x.subLanguage.length ? x.subLanguage : void 0); return ( - _.relevance > 0 && (N += t.relevance), - e && (w[_.subLanguage] = t.top), + x.relevance > 0 && (T += t.relevance), + e && (w[x.subLanguage] = t.top), m(t.language, t.value, !1, !0) ); })() : (function () { var e, t, n, a; - if (!_.keywords) return u(T); - for (a = '', t = 0, _.lexemesRe.lastIndex = 0, n = _.lexemesRe.exec(T); n; ) - (a += u(T.substring(t, n.index))), - (e = o(_, n)) ? ((N += e[1]), (a += m(e[0], u(n[0])))) : (a += u(n[0])), - (t = _.lexemesRe.lastIndex), - (n = _.lexemesRe.exec(T)); - return a + u(T.substr(t)); + if (!x.keywords) return u(N); + for (a = '', t = 0, x.lexemesRe.lastIndex = 0, n = x.lexemesRe.exec(N); n; ) + (a += u(N.substring(t, n.index))), + (e = o(x, n)) ? ((T += e[1]), (a += m(e[0], u(n[0])))) : (a += u(n[0])), + (t = x.lexemesRe.lastIndex), + (n = x.lexemesRe.exec(N)); + return a + u(N.substr(t)); })()), - (T = ''); + (N = ''); } function f(e) { - (k += e.className ? m(e.className, '', !0) : ''), (_ = Object.create(e, { parent: { value: _ } })); + (k += e.className ? m(e.className, '', !0) : ''), (x = Object.create(e, { parent: { value: x } })); } function h(e, t) { - if (((T += e), null == t)) return p(), 0; + if (((N += e), null == t)) return p(), 0; var a = (function (e, t) { var n, a; for (n = 0, a = t.contains.length; n < a; n++) @@ -305,20 +305,20 @@ t.contains[n].endSameAsBegin && (t.contains[n].endRe = l(t.contains[n].beginRe.exec(e)[0])), t.contains[n] ); - })(t, _); + })(t, x); if (a) return ( - a.skip ? (T += t) : (a.excludeBegin && (T += t), p(), a.returnBegin || a.excludeBegin || (T = t)), + a.skip ? (N += t) : (a.excludeBegin && (N += t), p(), a.returnBegin || a.excludeBegin || (N = t)), f(a), a.returnBegin ? 0 : t.length ); - var r = i(_, t); + var r = i(x, t); if (r) { - var o = _; - o.skip ? (T += t) : (o.returnEnd || o.excludeEnd || (T += t), p(), o.excludeEnd && (T = t)); + var o = x; + o.skip ? (N += t) : (o.returnEnd || o.excludeEnd || (N += t), p(), o.excludeEnd && (N = t)); do { - _.className && (k += c), _.skip || _.subLanguage || (N += _.relevance), (_ = _.parent); - } while (_ !== r.parent); + x.className && (k += c), x.skip || x.subLanguage || (T += x.relevance), (x = x.parent); + } while (x !== r.parent); return ( r.starts && (r.endSameAsBegin && (r.starts.endRe = r.endRe), f(r.starts)), o.returnEnd ? 0 : t.length @@ -327,41 +327,41 @@ if ( (function (e, t) { return !n && d(t.illegalRe, e); - })(t, _) + })(t, x) ) - throw new Error('Illegal lexeme "' + t + '" for mode "' + (_.className || '') + '"'); - return (T += t), t.length || 1; + throw new Error('Illegal lexeme "' + t + '" for mode "' + (x.className || '') + '"'); + return (N += t), t.length || 1; } - var v = x(e); + var v = _(e); if (!v) throw new Error('Unknown language: "' + e + '"'); g(v); var y, - _ = r || v, + x = r || v, w = {}, k = ''; - for (y = _; y !== v; y = y.parent) y.className && (k = m(y.className, '', !0) + k); - var T = '', - N = 0; + for (y = x; y !== v; y = y.parent) y.className && (k = m(y.className, '', !0) + k); + var N = '', + T = 0; try { - for (var S, C, F = 0; (_.terminators.lastIndex = F), (S = _.terminators.exec(t)); ) + for (var S, C, F = 0; (x.terminators.lastIndex = F), (S = x.terminators.exec(t)); ) (C = h(t.substring(F, S.index), S[0])), (F = S.index + C); - for (h(t.substr(F)), y = _; y.parent; y = y.parent) y.className && (k += c); - return { relevance: N, value: k, language: e, top: _ }; + for (h(t.substr(F)), y = x; y.parent; y = y.parent) y.className && (k += c); + return { relevance: T, value: k, language: e, top: x }; } catch (e) { if (e.message && -1 !== e.message.indexOf('Illegal')) return { relevance: 0, value: u(t) }; throw e; } } - function E(e, t) { + function b(e, t) { t = t || s.languages || n(a); var r = { relevance: 0, value: u(e) }, l = r; return ( t - .filter(x) + .filter(_) .filter(w) .forEach(function (t) { - var n = b(t, e, !1); + var n = E(t, e, !1); (n.language = t), n.relevance > l.relevance && (l = n), n.relevance > r.relevance && ((l = r), (r = n)); @@ -390,8 +390,8 @@ r, l = e.className + ' '; if (((l += e.parentNode ? e.parentNode.className : ''), (n = i.exec(l)))) - return x(n[1]) ? n[1] : 'no-highlight'; - for (t = 0, a = (l = l.split(/\s+/)).length; t < a; t++) if (p((r = l[t])) || x(r)) return r; + return _(n[1]) ? n[1] : 'no-highlight'; + for (t = 0, a = (l = l.split(/\s+/)).length; t < a; t++) if (p((r = l[t])) || _(r)) return r; })(e); p(d) || (s.useBR @@ -400,7 +400,7 @@ .replace(//g, '\n')) : (n = e), (c = n.textContent), - (l = d ? b(d, c, !0) : E(c)), + (l = d ? E(d, c, !0) : b(c)), (a = h(n)).length && (((o = document.createElementNS('http://www.w3.org/1999/xhtml', 'div')).innerHTML = l.value), (l.value = (function (e, n, a) { @@ -459,30 +459,30 @@ (e.result = { language: l.language, re: l.relevance }), l.second_best && (e.second_best = { language: l.second_best.language, re: l.second_best.relevance })); } - function _() { - if (!_.called) { - _.called = !0; + function x() { + if (!x.called) { + x.called = !0; var e = document.querySelectorAll('pre code'); t.forEach.call(e, y); } } - function x(e) { + function _(e) { return (e = (e || '').toLowerCase()), a[e] || a[r[e]]; } function w(e) { - var t = x(e); + var t = _(e); return t && !t.disableAutodetect; } - (e.highlight = b), - (e.highlightAuto = E), + (e.highlight = E), + (e.highlightAuto = b), (e.fixMarkup = v), (e.highlightBlock = y), (e.configure = function (e) { s = f(s, e); }), - (e.initHighlighting = _), + (e.initHighlighting = x), (e.initHighlightingOnLoad = function () { - addEventListener('DOMContentLoaded', _, !1), addEventListener('load', _, !1); + addEventListener('DOMContentLoaded', x, !1), addEventListener('load', x, !1); }), (e.registerLanguage = function (t, n) { var l = (a[t] = n(e)); @@ -494,7 +494,7 @@ (e.listLanguages = function () { return n(a); }), - (e.getLanguage = x), + (e.getLanguage = _), (e.autoDetection = w), (e.inherit = f), (e.IDENT_RE = '[a-zA-Z]\\w*'), @@ -3416,27 +3416,27 @@ (e = e.replace(o, '\n')); var h, g = /^\s+$/, - b = -1, - E = 0; + E = -1, + b = 0; function v() { - return (h = e.charAt(++b)) || ''; + return (h = e.charAt(++E)) || ''; } function y(t) { var n, - a = b; - return t && x(), (n = e.charAt(b + 1) || ''), (b = a - 1), v(), n; + a = E; + return t && _(), (n = e.charAt(E + 1) || ''), (E = a - 1), v(), n; } - function _(t) { - for (var n = b; v(); ) + function x(t) { + for (var n = E; v(); ) if ('\\' === h) v(); else { if (-1 !== t.indexOf(h)) break; if ('\n' === h) break; } - return e.substring(n, b + 1); + return e.substring(n, E + 1); } - function x(e) { - for (var t = 0; g.test(y()); ) v(), '\n' === h && e && s && (O.add_new_line(!0), t++); + function _(e) { + for (var t = 0; g.test(y()); ) v(), '\n' === h && e && s && (R.add_new_line(!0), t++); return (n = t), t; } function w() { @@ -3445,22 +3445,22 @@ return e; } function k() { - var t = b, + var t = E, n = '/' === y(); for (v(); v(); ) { if (!n && '*' === h && '/' === y()) { v(); break; } - if (n && '\n' === h) return e.substring(t, b); + if (n && '\n' === h) return e.substring(t, E); } - return e.substring(t, b) + h; + return e.substring(t, E) + h; } - function T(t) { - return e.substring(b - t.length, b).toLowerCase() === t; + function N(t) { + return e.substring(E - t.length, E).toLowerCase() === t; } - function N() { - for (var t = 0, n = b + 1; n < e.length; n++) { + function T() { + for (var t = 0, n = E + 1; n < e.length; n++) { var a = e.charAt(n); if ('{' === a) return !0; if ('(' === a) t += 1; @@ -3478,17 +3478,17 @@ (S = e.substring(0, C)), (e = e.substring(C)); } var F, + I, R, - O, A = new Array(r + 1).join(c); - function I(e) { - O.just_added_newline() && O.set_indent(F), O.add_token(e); + function O(e) { + R.just_added_newline() && R.set_indent(F), R.add_token(e); } function D(e) { - e && (O.space_before_token = !0); + e && (R.space_before_token = !0); } (this.beautify = function () { - (O = new l(A, S)), (F = 0), (R = 0), (b = -1), (h = null), (E = 0); + (R = new l(A, S)), (F = 0), (I = 0), (E = -1), (h = null), (b = 0); for (var e, t, a = !1, r = !1, i = !1, o = '', c = ''; ; ) { var s = w(), C = '' !== s, @@ -3496,76 +3496,76 @@ if (((c = o), (o = h), !h)) break; if ('/' === h && '*' === y()) { var L = 0 === F; - (j || L) && O.add_new_line(), I(k()), O.add_new_line(), L && O.add_new_line(!0); + (j || L) && R.add_new_line(), O(k()), R.add_new_line(), L && R.add_new_line(!0); } else if ('/' === h && '/' === y()) - j || '{' === c || O.trim(!0), (O.space_before_token = !0), I(k()), O.add_new_line(); + j || '{' === c || R.trim(!0), (R.space_before_token = !0), O(k()), R.add_new_line(); else if ('@' === h) - if ((D(C), '{' === y())) I(_('}')); + if ((D(C), '{' === y())) O(x('}')); else { - I(h); - var P = (void 0, void 0, (e = b), (t = _(': ,;{}()[]/=\'"')), (b = e - 1), v(), t); - P.match(/[ :]$/) && (v(), I((P = _(': ').replace(/\s$/, ''))), (O.space_before_token = !0)), + O(h); + var P = (void 0, void 0, (e = E), (t = x(': ,;{}()[]/=\'"')), (E = e - 1), v(), t); + P.match(/[ :]$/) && (v(), O((P = x(': ').replace(/\s$/, ''))), (R.space_before_token = !0)), (P = P.replace(/\s$/, '')) in this.NESTED_AT_RULE && - ((R += 1), P in this.CONDITIONAL_GROUP_RULE && (i = !0)); + ((I += 1), P in this.CONDITIONAL_GROUP_RULE && (i = !0)); } else '#' === h && '{' === y() - ? (D(C), I(_('}'))) + ? (D(C), O(x('}'))) : '{' === h ? '}' === y(!0) - ? (x(), + ? (_(), v(), - (O.space_before_token = !0), - I('{}'), - x(!0) || O.add_new_line(), - n < 2 && d && 0 === F && O.add_new_line(!0)) + (R.space_before_token = !0), + O('{}'), + _(!0) || R.add_new_line(), + n < 2 && d && 0 === F && R.add_new_line(!0)) : (F++, - (O.space_before_token = !0), - I(h), - x(!0) || O.add_new_line(), - i ? ((i = !1), (a = F > R)) : (a = F >= R)) + (R.space_before_token = !0), + O(h), + _(!0) || R.add_new_line(), + i ? ((i = !1), (a = F > I)) : (a = F >= I)) : '}' === h ? (F > 0 && F--, - O.add_new_line(), - I(h), + R.add_new_line(), + O(h), (a = !1), (r = !1), - R && R--, - x(!0) || O.add_new_line(), - n < 2 && d && 0 === F && O.add_new_line(!0)) + I && I--, + _(!0) || R.add_new_line(), + n < 2 && d && 0 === F && R.add_new_line(!0)) : ':' === h - ? (x(), - (!a && !i) || T('&') || N() || T('(') - ? (T(' ') && (O.space_before_token = !0), ':' === y() ? (v(), I('::')) : I(':')) - : (I(':'), r || ((r = !0), (O.space_before_token = !0)))) + ? (_(), + (!a && !i) || N('&') || T() || N('(') + ? (N(' ') && (R.space_before_token = !0), ':' === y() ? (v(), O('::')) : O(':')) + : (O(':'), r || ((r = !0), (R.space_before_token = !0)))) : '"' === h || "'" === h - ? (D(C), I(_(h))) + ? (D(C), O(x(h))) : ';' === h - ? ((r = !1), I(h), x(!0) || O.add_new_line()) + ? ((r = !1), O(h), _(!0) || R.add_new_line()) : '(' === h - ? T('url') - ? (I(h), x(), v() && (')' !== h && '"' !== h && "'" !== h ? I(_(')')) : b--)) - : (E++, D(C), I(h), x()) + ? N('url') + ? (O(h), _(), v() && (')' !== h && '"' !== h && "'" !== h ? O(x(')')) : E--)) + : (b++, D(C), O(h), _()) : ')' === h - ? (I(h), E--) + ? (O(h), b--) : ',' === h - ? (I(h), - !x(!0) && u && !r && E < 1 ? O.add_new_line() : (O.space_before_token = !0)) - : ('>' === h || '+' === h || '~' === h) && !r && E < 1 + ? (O(h), + !_(!0) && u && !r && b < 1 ? R.add_new_line() : (R.space_before_token = !0)) + : ('>' === h || '+' === h || '~' === h) && !r && b < 1 ? p - ? ((O.space_before_token = !0), I(h), (O.space_before_token = !0)) - : (I(h), x(), h && g.test(h) && (h = '')) + ? ((R.space_before_token = !0), O(h), (R.space_before_token = !0)) + : (O(h), _(), h && g.test(h) && (h = '')) : ']' === h - ? I(h) + ? O(h) : '[' === h - ? (D(C), I(h)) + ? (D(C), O(h)) : '=' === h - ? (x(), I('='), g.test(h) && (h = '')) + ? (_(), O('='), g.test(h) && (h = '')) : '!' === h - ? (I(' '), I(h)) - : (D(C), I(h)); + ? (O(' '), O(h)) + : (D(C), O(h)); } - return O.get_code(m, f); + return R.get_code(m, f); }), (this.NESTED_AT_RULE = { '@page': !0, @@ -3780,7 +3780,7 @@ return e.replace(/\s+$/g, ''); } e.exports.Beautifier = function (e, t, n, r) { - var c, s, u, m, d, p, f, h, g, b, E, v, y, _, x, w, k, T, N, S, C; + var c, s, u, m, d, p, f, h, g, E, b, v, y, x, _, w, k, N, T, S, C; function F() { return ( (this.pos = 0), @@ -3833,7 +3833,7 @@ var e = ''; if (((e = this.input.charAt(this.pos)), this.Utils.in_array(e, this.Utils.whitespace))) { for (this.newlines = 0; this.Utils.in_array(e, this.Utils.whitespace); ) - E && '\n' === e && this.newlines <= v && (this.newlines += 1), + b && '\n' === e && this.newlines <= v && (this.newlines += 1), this.pos++, (e = this.input.charAt(this.pos)); return !0; @@ -3941,9 +3941,9 @@ } if (p) { s = !0; - var h = x; - T && (h = l.indexOf(' ') + 1); - for (var E = 0; E < h; E++) l.push(' '); + var h = _; + N && (h = l.indexOf(' ') + 1); + for (var b = 0; b < h; b++) l.push(' '); } if (c) for (var v = 0; v < l.length; v++) @@ -3980,10 +3980,10 @@ if (y && '{' === n && l.length > 2 && '}' === l[l.length - 2] && '}' === l[l.length - 1]) break; } } while ('>' !== r); - var _, - N, + var x, + T, S = l.join(''); - (_ = + (x = -1 !== S.indexOf(' ') ? S.indexOf(' ') : -1 !== S.indexOf('\n') @@ -3991,8 +3991,8 @@ : '{' === S.charAt(0) ? S.indexOf('}') : S.indexOf('>')), - (N = '<' !== S.charAt(0) && y ? ('#' === S.charAt(2) ? 3 : 2) : 1); - var C = S.substring(N, _).toLowerCase(); + (T = '<' !== S.charAt(0) && y ? ('#' === S.charAt(2) ? 3 : 2) : 1); + var C = S.substring(T, x).toLowerCase(); return ( '/' === S.charAt(S.length - 2) || this.Utils.in_array(C, this.Utils.single_token) ? e || (this.tag_type = 'SINGLE') @@ -4002,7 +4002,7 @@ (this.tag_type = 'HANDLEBARS_ELSE'), (this.indent_content = !0), this.traverse_whitespace()) - : this.is_unformatted(C, g) || this.is_unformatted(C, b) + : this.is_unformatted(C, g) || this.is_unformatted(C, E) ? ((i = this.get_unformatted('', S)), l.push(i), this.pos, @@ -4262,22 +4262,22 @@ 'strike', 'tt', ]), - (b = t.content_unformatted || ['pre']), - (E = void 0 === t.preserve_newlines || t.preserve_newlines), - (v = E + (E = t.content_unformatted || ['pre']), + (b = void 0 === t.preserve_newlines || t.preserve_newlines), + (v = b ? isNaN(parseInt(t.max_preserve_newlines, 10)) ? 32786 : parseInt(t.max_preserve_newlines, 10) : 0), (y = void 0 !== t.indent_handlebars && t.indent_handlebars), - (_ = void 0 === t.wrap_attributes ? 'auto' : t.wrap_attributes), - (x = isNaN(parseInt(t.wrap_attributes_indent_size, 10)) + (x = void 0 === t.wrap_attributes ? 'auto' : t.wrap_attributes), + (_ = isNaN(parseInt(t.wrap_attributes_indent_size, 10)) ? d : parseInt(t.wrap_attributes_indent_size, 10)), - (w = 'force' === _.substr(0, 5)), - (k = 'force-expand-multiline' === _), - (T = 'force-aligned' === _), - (N = void 0 !== t.end_with_newline && t.end_with_newline), + (w = 'force' === x.substr(0, 5)), + (k = 'force-expand-multiline' === x), + (N = 'force-aligned' === x), + (T = void 0 !== t.end_with_newline && t.end_with_newline), (S = 'object' == typeof t.extra_liners && t.extra_liners ? t.extra_liners.concat() @@ -4343,35 +4343,33 @@ if ('' !== c.token_text) { c.print_newline(!1, c.output); var m, - b = c.token_text, - E = 1; + E = c.token_text, + b = 1; 'TK_SCRIPT' === c.token_type ? (m = 'function' == typeof n && n) : 'TK_STYLE' === c.token_type && (m = 'function' == typeof r && r), 'keep' === t.indent_scripts - ? (E = 0) - : 'separate' === t.indent_scripts && (E = -c.indent_level); - var v = c.get_full_indent(E); + ? (b = 0) + : 'separate' === t.indent_scripts && (b = -c.indent_level); + var v = c.get_full_indent(b); if (m) { var y = function () { this.eol = '\n'; }; y.prototype = t; - var _ = new y(); - b = m(b.replace(/^\s*/, v), _); + var x = new y(); + E = m(E.replace(/^\s*/, v), x); } else { - var x = - b - .match(/^\s*/)[0] + var _ = + E.match(/^\s*/)[0] .match(/[^\n\r]*$/)[0] .split(c.indent_string).length - 1, - w = c.get_full_indent(E - x); - b = b - .replace(/^\s*/, v) + w = c.get_full_indent(b - _); + E = E.replace(/^\s*/, v) .replace(/\r\n|\r|\n/g, '\n' + w) .replace(/\s+$/, ''); } - b && (c.print_token_raw(b), c.print_newline(!0, c.output)); + E && (c.print_token_raw(E), c.print_newline(!0, c.output)); } c.current_mode = 'TAG'; break; @@ -4381,7 +4379,7 @@ (c.last_token = c.token_type), (c.last_text = c.token_text); } var k = c.output.join('').replace(/[\r\n\t ]+$/, ''); - return N && (k += '\n'), '\n' !== C && (k = k.replace(/[\n]/g, C)), k; + return T && (k += '\n'), '\n' !== C && (k = k.replace(/[\n]/g, C)), k; }); }; }, @@ -4537,16 +4535,16 @@ f, h, g, - b, E, + b, v, y, - _, x, + _, w, k, - T = [], - N = ''; + N = [], + T = ''; function S(e, t) { var a = 0; return ( @@ -4579,7 +4577,7 @@ } (w = { TK_START_EXPR: function () { - V() || O(h); + U() || R(h); var e = d.Expression; if ('[' === h.text) { if ('TK_WORD' === g || ')' === v.last_text) @@ -4592,7 +4590,7 @@ ); (e = d.ArrayLiteral), z(v.mode) && - (('[' !== v.last_text && (',' !== v.last_text || (']' !== b && '}' !== b))) || + (('[' !== v.last_text && (',' !== v.last_text || (']' !== E && '}' !== E))) || k.keep_array_indentation || D()); } else @@ -4602,11 +4600,11 @@ ';' === v.last_text || 'TK_START_BLOCK' === g ? D() : 'TK_END_EXPR' === g || 'TK_START_EXPR' === g || 'TK_END_BLOCK' === g || '.' === v.last_text - ? I(h.wanted_newline) + ? O(h.wanted_newline) : ('TK_RESERVED' === g && '(' === h.text) || 'TK_WORD' === g || 'TK_OPERATOR' === g ? ('TK_RESERVED' === g && ('function' === v.last_word || 'typeof' === v.last_word)) || ('*' === v.last_text && - (c(b, ['function', 'yield']) || (v.mode === d.ObjectLiteral && c(b, ['{', ','])))) + (c(E, ['function', 'yield']) || (v.mode === d.ObjectLiteral && c(E, ['{', ','])))) ? k.space_after_anon_function && (n.space_before_token = !0) : 'TK_RESERVED' !== g || (!c(v.last_text, f.line_starters) && 'catch' !== v.last_text) || @@ -4616,8 +4614,8 @@ 'TK_RESERVED' === g && c(v.last_word, ['await', 'async']) && (n.space_before_token = !0), - '(' === h.text && (('TK_EQUALS' !== g && 'TK_OPERATOR' !== g) || U() || I()), - '(' === h.text && 'TK_WORD' !== g && 'TK_RESERVED' !== g && I(), + '(' === h.text && (('TK_EQUALS' !== g && 'TK_OPERATOR' !== g) || V() || O()), + '(' === h.text && 'TK_WORD' !== g && 'TK_RESERVED' !== g && O(), M(e), L(), k.space_in_paren && (n.space_before_token = !0), @@ -4625,8 +4623,8 @@ }, TK_END_EXPR: function () { for (; v.mode === d.Statement; ) q(); - O(h), - v.multiline_frame && I(']' === h.text && z(v.mode) && !k.keep_array_indentation), + R(h), + v.multiline_frame && O(']' === h.text && z(v.mode) && !k.keep_array_indentation), k.space_in_paren && ('TK_START_EXPR' !== g || k.space_in_empty_paren ? (n.space_before_token = !0) @@ -4638,13 +4636,13 @@ ((y.mode = d.Expression), (v.do_block = !1), (v.do_while = !1)); }, TK_START_BLOCK: function () { - O(h); + R(h); var e = H(1), t = H(2); t && ((c(t.text, [':', ',']) && c(e.type, ['TK_STRING', 'TK_WORD', 'TK_RESERVED'])) || (c(e.text, ['get', 'set', '...']) && c(t.type, ['TK_WORD', 'TK_RESERVED']))) - ? c(b, ['class', 'interface']) + ? c(E, ['class', 'interface']) ? M(d.BlockStatement) : M(d.ObjectLiteral) : 'TK_OPERATOR' === g && '=>' === v.last_text @@ -4675,7 +4673,7 @@ ('TK_START_EXPR' !== g && 'TK_COMMA' !== g) || (('TK_COMMA' === g || k.space_in_paren) && (n.space_before_token = !0), ('TK_COMMA' === g || ('TK_START_EXPR' === g && v.inline_frame)) && - (I(), + (O(), (y.multiline_frame = y.multiline_frame || v.multiline_frame), (v.multiline_frame = !1))), 'TK_OPERATOR' !== g && @@ -4685,7 +4683,7 @@ P(); }, TK_END_BLOCK: function () { - for (O(h); v.mode === d.Statement; ) q(); + for (R(h); v.mode === d.Statement; ) q(); var e = 'TK_START_BLOCK' === g; v.inline_frame && !e ? (n.space_before_token = !0) @@ -4701,7 +4699,7 @@ TK_WORD: G, TK_RESERVED: G, TK_SEMICOLON: function () { - V() ? (n.space_before_token = !1) : O(h); + U() ? (n.space_before_token = !1) : R(h); for ( var e = H(1); !( @@ -4715,18 +4713,18 @@ v.import_block && (v.import_block = !1), L(); }, TK_STRING: function () { - V() + U() ? (n.space_before_token = !0) - : (O(h), + : (R(h), 'TK_RESERVED' === g || 'TK_WORD' === g || v.inline_frame ? (n.space_before_token = !0) : 'TK_COMMA' === g || 'TK_START_EXPR' === g || 'TK_EQUALS' === g || 'TK_OPERATOR' === g - ? U() || I() + ? V() || O() : D()), L(); }, TK_EQUALS: function () { - V() || O(h), + U() || R(h), v.declaration_statement && (v.declaration_assignment = !0), (n.space_before_token = !0), L(), @@ -4742,11 +4740,11 @@ (c(g, ['TK_START_BLOCK', 'TK_START_EXPR', 'TK_EQUALS', 'TK_OPERATOR']) || c(v.last_text, f.line_starters) || ',' === v.last_text); - if ((V() || O(h, !e), 'TK_RESERVED' === g && K(v.last_text))) + if ((U() || R(h, !e), 'TK_RESERVED' === g && K(v.last_text))) return (n.space_before_token = !0), void L(); if ('*' !== h.text || 'TK_DOT' !== g) if ('::' !== h.text) { - if (('TK_OPERATOR' === g && c(k.operator_position, m) && I(), ':' === h.text && v.in_case)) + if (('TK_OPERATOR' === g && c(k.operator_position, m) && O(), ':' === h.text && v.in_case)) return (v.case_body = !0), P(), L(), D(), void (v.in_case = !1); var a = !0, r = !0, @@ -4764,17 +4762,17 @@ s = i && !l; switch (k.operator_position) { case u.before_newline: - return (n.space_before_token = !s), L(), (i && !o) || I(), void (n.space_before_token = !0); + return (n.space_before_token = !s), L(), (i && !o) || O(), void (n.space_before_token = !0); case u.after_newline: return ( (n.space_before_token = !0), - !i || o ? (H(1).wanted_newline ? D(!1, !0) : I()) : (n.space_before_token = !1), + !i || o ? (H(1).wanted_newline ? D(!1, !0) : O()) : (n.space_before_token = !1), L(), void (n.space_before_token = !0) ); case u.preserve_newline: return ( - s || I(), + s || O(), (a = !(n.just_added_newline() || s)), (n.space_before_token = a), L(), @@ -4783,12 +4781,12 @@ } } if (e) { - I(), (a = !1); + O(), (a = !1); var p = H(1); r = p && c(p.type, ['TK_WORD', 'TK_RESERVED']); } else '...' === h.text - ? (I(), (a = 'TK_START_BLOCK' === g), (r = !1)) + ? (O(), (a = 'TK_START_BLOCK' === g), (r = !1)) : (c(h.text, ['--', '++', '!', '~']) || t) && ((a = !1), (r = !1), @@ -4809,15 +4807,15 @@ else L(); }, TK_COMMA: function () { - O(h, !0), + R(h, !0), L(), (n.space_before_token = !0), v.declaration_statement ? (B(v.parent.mode) && (v.declaration_assignment = !1), - v.declaration_assignment ? ((v.declaration_assignment = !1), D(!1, !0)) : k.comma_first && I()) + v.declaration_assignment ? ((v.declaration_assignment = !1), D(!1, !0)) : k.comma_first && O()) : v.mode === d.ObjectLiteral || (v.mode === d.Statement && v.parent.mode === d.ObjectLiteral) ? (v.mode === d.Statement && q(), v.inline_frame || D()) - : k.comma_first && I(); + : k.comma_first && O(); }, TK_BLOCK_COMMENT: function (e) { if (n.raw) @@ -4869,10 +4867,10 @@ h.wanted_newline ? D(!1, e) : n.trim(!0), (n.space_before_token = !0), L(), D(!1, e); }, TK_DOT: function () { - V() || O(h, !0), + U() || R(h, !0), 'TK_RESERVED' === g && K(v.last_text) ? (n.space_before_token = !0) - : I(')' === v.last_text && k.break_chained_methods), + : O(')' === v.last_text && k.break_chained_methods), L(); }, TK_UNKNOWN: function (e) { @@ -4880,7 +4878,7 @@ }, TK_EOF: function () { for (; v.mode === d.Statement; ) q(); - O(h); + R(h); }, }), (t = a((t = t || {}), 'js')), @@ -4933,23 +4931,23 @@ 'auto' === k.eol && ((k.eol = '\n'), e && r.lineBreak.test(e || '') && (k.eol = e.match(r.lineBreak)[0])), k.eol = k.eol.replace(/\\r/, '\r').replace(/\\n/, '\n'), - E = ''; + b = ''; k.indent_size > 0; ) - (E += k.indent_char), (k.indent_size -= 1); - var R = 0; + (b += k.indent_char), (k.indent_size -= 1); + var I = 0; if (e && e.length) { - for (; ' ' === e.charAt(R) || '\t' === e.charAt(R); ) R += 1; - (N = e.substring(0, R)), (e = e.substring(R)); + for (; ' ' === e.charAt(I) || '\t' === e.charAt(I); ) I += 1; + (T = e.substring(0, I)), (e = e.substring(I)); } - function O(e, t) { + function R(e, t) { for ( var n = e.newlines, a = k.keep_array_indentation && z(v.mode), r = h, l = 0; l < e.comments_before.length; l++ ) - O((h = e.comments_before[l]), t), w[h.type](t); + R((h = e.comments_before[l]), t), w[h.type](t); if (((h = r), a)) for (var i = 0; i < n; i += 1) D(i > 0, t); else if ( (k.max_preserve_newlines && n > k.max_preserve_newlines && (n = k.max_preserve_newlines), @@ -4960,17 +4958,17 @@ } } (g = 'TK_START_BLOCK'), - (b = ''), - ((n = new l(E, N)).raw = k.test_output_raw), - (_ = []), + (E = ''), + ((n = new l(b, T)).raw = k.test_output_raw), + (x = []), M(d.BlockStatement), (this.beautify = function () { - for (f = new i(e, k, E), T = f.tokenize(), p = 0, h = H(); h; ) - w[h.type](), (b = v.last_text), (g = h.type), (v.last_text = h.text), (p += 1), (h = H()); + for (f = new i(e, k, b), N = f.tokenize(), p = 0, h = H(); h; ) + w[h.type](), (E = v.last_text), (g = h.type), (v.last_text = h.text), (p += 1), (h = H()); return n.get_code(k.end_with_newline, k.eol); }); var A = ['break', 'continue', 'return', 'throw', 'yield']; - function I(e) { + function O(e) { if (((e = void 0 !== e && e), !n.just_added_newline())) { var t = (k.preserve_newlines && h.wanted_newline) || e; if (c(v.last_text, f.positionable_operators) || c(h.text, f.positionable_operators)) { @@ -5024,7 +5022,7 @@ v.indentation_level += 1; } function M(e) { - v ? (_.push(v), (y = v)) : (y = S(null, e)), (v = S(y, e)); + v ? (x.push(v), (y = v)) : (y = S(null, e)), (v = S(y, e)); } function z(e) { return e === d.ArrayLiteral; @@ -5033,10 +5031,10 @@ return c(e, [d.Expression, d.ForInitializer, d.Conditional]); } function q() { - _.length > 0 && - ((y = v), (v = _.pop()), y.mode !== d.Statement || k.unindent_chained_methods || o(n, y)); + x.length > 0 && + ((y = v), (v = x.pop()), y.mode !== d.Statement || k.unindent_chained_methods || o(n, y)); } - function U() { + function V() { return ( v.parent.mode === d.ObjectLiteral && v.mode === d.Statement && @@ -5044,7 +5042,7 @@ ('TK_RESERVED' === g && c(v.last_text, ['get', 'set']))) ); } - function V() { + function U() { return ( !!( ('TK_RESERVED' === g && c(v.last_text, ['var', 'let', 'const']) && 'TK_WORD' === h.type) || @@ -5059,7 +5057,7 @@ !v.in_case && '--' !== h.text && '++' !== h.text && - 'function' !== b && + 'function' !== E && 'TK_WORD' !== h.type && 'TK_RESERVED' !== h.type) || (v.mode === d.ObjectLiteral && @@ -5068,8 +5066,8 @@ ) && (M(d.Statement), k.unindent_chained_methods || P(), - O(h, !0), - U() || I('TK_RESERVED' === h.type && c(h.text, ['do', 'for', 'if', 'while'])), + R(h, !0), + V() || O('TK_RESERVED' === h.type && c(h.text, ['do', 'for', 'if', 'while'])), !0) ); } @@ -5078,7 +5076,7 @@ } function H(e) { var t = p + (e || 0); - return t < 0 || t >= T.length ? null : T[t]; + return t < 0 || t >= N.length ? null : N[t]; } function G() { if ( @@ -5087,7 +5085,7 @@ (c(h.text, ['as', 'from']) && !v.import_block) || (v.mode === d.ObjectLiteral && ':' === H(1).text)) && (h.type = 'TK_WORD'), - V() + U() ? 'TK_RESERVED' === g && c(v.last_text, ['var', 'let', 'const']) && 'TK_WORD' === h.type && @@ -5099,8 +5097,8 @@ (!k.preserve_newlines && 'TK_RESERVED' === g && c(v.last_text, ['var', 'let', 'const', 'set', 'get'])) - ? O(h) - : (O(h), D()), + ? R(h) + : (R(h), D()), v.do_block && !v.do_while) ) { if ('TK_RESERVED' === h.type && 'while' === h.text) @@ -5123,8 +5121,8 @@ (v.in_case = !0), void (v.in_case_statement = !0)) : (('TK_COMMA' !== g && 'TK_START_EXPR' !== g && 'TK_EQUALS' !== g && 'TK_OPERATOR' !== g) || - U() || - I(), + V() || + O(), 'TK_RESERVED' === h.type && 'function' === h.text ? ((c(v.last_text, ['}', ';']) || (n.just_added_newline() && @@ -5134,7 +5132,7 @@ 'TK_RESERVED' === g || 'TK_WORD' === g ? ('TK_RESERVED' === g && (c(v.last_text, ['get', 'set', 'new', 'export', 'async']) || c(v.last_text, A))) || - ('TK_RESERVED' === g && 'default' === v.last_text && 'export' === b) + ('TK_RESERVED' === g && 'default' === v.last_text && 'export' === E) ? (n.space_before_token = !0) : D() : 'TK_OPERATOR' === g || '=' === v.last_text @@ -5142,35 +5140,35 @@ : (v.multiline_frame || (!B(v.mode) && !z(v.mode))) && D(), L(), void (v.last_word = h.text)) - : ((x = 'NONE'), + : ((_ = 'NONE'), 'TK_END_BLOCK' === g ? y.inline_frame - ? (x = 'SPACE') + ? (_ = 'SPACE') : 'TK_RESERVED' === h.type && c(h.text, ['else', 'catch', 'finally', 'from']) ? 'expand' === k.brace_style || 'end-expand' === k.brace_style || ('none' === k.brace_style && h.wanted_newline) - ? (x = 'NEWLINE') - : ((x = 'SPACE'), (n.space_before_token = !0)) - : (x = 'NEWLINE') + ? (_ = 'NEWLINE') + : ((_ = 'SPACE'), (n.space_before_token = !0)) + : (_ = 'NEWLINE') : 'TK_SEMICOLON' === g && v.mode === d.BlockStatement - ? (x = 'NEWLINE') + ? (_ = 'NEWLINE') : 'TK_SEMICOLON' === g && B(v.mode) - ? (x = 'SPACE') + ? (_ = 'SPACE') : 'TK_STRING' === g - ? (x = 'NEWLINE') + ? (_ = 'NEWLINE') : 'TK_RESERVED' === g || 'TK_WORD' === g || ('*' === v.last_text && - (c(b, ['function', 'yield']) || (v.mode === d.ObjectLiteral && c(b, ['{', ','])))) - ? (x = 'SPACE') + (c(E, ['function', 'yield']) || (v.mode === d.ObjectLiteral && c(E, ['{', ','])))) + ? (_ = 'SPACE') : 'TK_START_BLOCK' === g - ? (x = v.inline_frame ? 'SPACE' : 'NEWLINE') - : 'TK_END_EXPR' === g && ((n.space_before_token = !0), (x = 'NEWLINE')), + ? (_ = v.inline_frame ? 'SPACE' : 'NEWLINE') + : 'TK_END_EXPR' === g && ((n.space_before_token = !0), (_ = 'NEWLINE')), 'TK_RESERVED' === h.type && c(h.text, f.line_starters) && ')' !== v.last_text && - (x = + (_ = v.inline_frame || 'else' === v.last_text || 'export' === v.last_text ? 'SPACE' : 'NEWLINE'), 'TK_RESERVED' === h.type && c(h.text, ['else', 'catch', 'finally']) ? ('TK_END_BLOCK' !== g || @@ -5181,7 +5179,7 @@ !v.inline_frame ? D() : (n.trim(!0), '}' !== n.current_line.last() && D(), (n.space_before_token = !0)) - : 'NEWLINE' === x + : 'NEWLINE' === _ ? 'TK_RESERVED' === g && K(v.last_text) ? (n.space_before_token = !0) : 'TK_END_EXPR' !== g @@ -5193,9 +5191,9 @@ ? (n.space_before_token = !0) : D()) : 'TK_RESERVED' === h.type && c(h.text, f.line_starters) && ')' !== v.last_text && D() - : v.multiline_frame && z(v.mode) && ',' === v.last_text && '}' === b + : v.multiline_frame && z(v.mode) && ',' === v.last_text && '}' === E ? D() - : 'SPACE' === x && (n.space_before_token = !0), + : 'SPACE' === _ && (n.space_before_token = !0), L(), (v.last_word = h.text), void ( @@ -5417,7 +5415,7 @@ f, h, g, - b = this.line_starters.concat([ + E = this.line_starters.concat([ 'do', 'in', 'of', @@ -5434,92 +5432,92 @@ 'from', 'as', ]), - E = /([\s\S]*?)((?:\*\/)|$)/g, + b = /([\s\S]*?)((?:\*\/)|$)/g, v = /([^\n\r\u2028\u2029]*)/g, y = /\/\* beautify( \w+[:]\w+)+ \*\//g, - _ = / (\w+)[:](\w+)/g, - x = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g, + x = / (\w+)[:](\w+)/g, + _ = /([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g, w = /((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g; function k() { var e, k = []; (d = 0), (p = ''); - var T, - N = g.next(); - if (null === N) return ['', 'TK_EOF']; - for (T = h.length ? h[h.length - 1] : new r('TK_START_BLOCK', '{'); i(N, n); ) + var N, + T = g.next(); + if (null === T) return ['', 'TK_EOF']; + for (N = h.length ? h[h.length - 1] : new r('TK_START_BLOCK', '{'); i(T, n); ) if ( - (l.newline.test(N) ? ('\n' === N && '\r' === g.peek(-2)) || ((d += 1), (k = [])) : k.push(N), - null === (N = g.next())) + (l.newline.test(T) ? ('\n' === T && '\r' === g.peek(-2)) || ((d += 1), (k = [])) : k.push(T), + null === (T = g.next())) ) return ['', 'TK_EOF']; - if ((k.length && (p = k.join('')), o.test(N) || ('.' === N && g.testChar(o)))) { + if ((k.length && (p = k.join('')), o.test(T) || ('.' === T && g.testChar(o)))) { var S = !0, C = !0, F = o; for ( - '0' === N && g.testChar(/[XxOoBb]/) - ? ((S = !1), (C = !1), (F = g.testChar(/[Bb]/) ? c : g.testChar(/[Oo]/) ? s : u), (N += g.next())) - : '.' === N + '0' === T && g.testChar(/[XxOoBb]/) + ? ((S = !1), (C = !1), (F = g.testChar(/[Bb]/) ? c : g.testChar(/[Oo]/) ? s : u), (T += g.next())) + : '.' === T ? (S = !1) - : ((N = ''), g.back()); + : ((T = ''), g.back()); g.testChar(F); ) - (N += g.next()), - S && '.' === g.peek() && ((N += g.next()), (S = !1)), + (T += g.next()), + S && '.' === g.peek() && ((T += g.next()), (S = !1)), C && g.testChar(/[Ee]/) && - ((N += g.next()), g.testChar(/[+-]/) && (N += g.next()), (C = !1), (S = !1)); - return [N, 'TK_WORD']; + ((T += g.next()), g.testChar(/[+-]/) && (T += g.next()), (C = !1), (S = !1)); + return [T, 'TK_WORD']; } if (l.isIdentifierStart(g.peekCharCode(-1))) { - if (g.hasNext()) for (; l.isIdentifierChar(g.peekCharCode()) && ((N += g.next()), g.hasNext()); ); - return 'TK_DOT' === T.type || ('TK_RESERVED' === T.type && i(T.text, ['set', 'get'])) || !i(N, b) - ? [N, 'TK_WORD'] - : 'in' === N || 'of' === N - ? [N, 'TK_OPERATOR'] - : [N, 'TK_RESERVED']; + if (g.hasNext()) for (; l.isIdentifierChar(g.peekCharCode()) && ((T += g.next()), g.hasNext()); ); + return 'TK_DOT' === N.type || ('TK_RESERVED' === N.type && i(N.text, ['set', 'get'])) || !i(T, E) + ? [T, 'TK_WORD'] + : 'in' === T || 'of' === T + ? [T, 'TK_OPERATOR'] + : [T, 'TK_RESERVED']; } - if ('(' === N || '[' === N) return [N, 'TK_START_EXPR']; - if (')' === N || ']' === N) return [N, 'TK_END_EXPR']; - if ('{' === N) return [N, 'TK_START_BLOCK']; - if ('}' === N) return [N, 'TK_END_BLOCK']; - if (';' === N) return [N, 'TK_SEMICOLON']; - if ('/' === N) { - var R = ''; + if ('(' === T || '[' === T) return [T, 'TK_START_EXPR']; + if (')' === T || ']' === T) return [T, 'TK_END_EXPR']; + if ('{' === T) return [T, 'TK_START_BLOCK']; + if ('}' === T) return [T, 'TK_END_BLOCK']; + if (';' === T) return [T, 'TK_SEMICOLON']; + if ('/' === T) { + var I = ''; if ('*' === g.peek()) { g.next(); - var O = (function (e) { + var R = (function (e) { if (!e.match(y)) return null; var t = {}; - _.lastIndex = 0; - for (var n = _.exec(e); n; ) (t[n[1]] = n[2]), (n = _.exec(e)); + x.lastIndex = 0; + for (var n = x.exec(e); n; ) (t[n[1]] = n[2]), (n = x.exec(e)); return t; - })((R = '/*' + g.match(E)[0])); + })((I = '/*' + g.match(b)[0])); return ( - O && 'start' === O.ignore && (R += g.match(x)[0]), - [(R = R.replace(l.allLineBreaks, '\n')), 'TK_BLOCK_COMMENT', O] + R && 'start' === R.ignore && (I += g.match(_)[0]), + [(I = I.replace(l.allLineBreaks, '\n')), 'TK_BLOCK_COMMENT', R] ); } - if ('/' === g.peek()) return g.next(), [(R = '//' + g.match(v)[0]), 'TK_COMMENT']; + if ('/' === g.peek()) return g.next(), [(I = '//' + g.match(v)[0]), 'TK_COMMENT']; } var A, - I = + O = /<()([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g; if ( - '`' === N || - "'" === N || - '"' === N || - (('/' === N || (t.e4x && '<' === N && g.test(I, -1))) && - (('TK_RESERVED' === T.type && - i(T.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) || - ('TK_END_EXPR' === T.type && - ')' === T.text && - T.parent && - 'TK_RESERVED' === T.parent.type && - i(T.parent.text, ['if', 'while', 'for'])) || - i(T.type, [ + '`' === T || + "'" === T || + '"' === T || + (('/' === T || (t.e4x && '<' === T && g.test(O, -1))) && + (('TK_RESERVED' === N.type && + i(N.text, ['return', 'case', 'throw', 'else', 'do', 'typeof', 'yield'])) || + ('TK_END_EXPR' === N.type && + ')' === N.text && + N.parent && + 'TK_RESERVED' === N.parent.type && + i(N.parent.text, ['if', 'while', 'for'])) || + i(N.type, [ 'TK_COMMENT', 'TK_START_EXPR', 'TK_START_BLOCK', @@ -5531,10 +5529,10 @@ 'TK_COMMA', ]))) ) { - var D = N, + var D = T, j = !1, L = !1; - if (((e = N), '/' === D)) + if (((e = T), '/' === D)) for (var P = !1; g.hasNext() && (j || P || g.peek() !== D) && !g.testChar(l.newline); ) (e += g.peek()), j @@ -5546,10 +5544,10 @@ /[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\])(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/g; g.back(); var z = '', - B = g.match(I); + B = g.match(O); if (B) { for ( - var q = B[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}'), U = 0 === q.indexOf('{'), V = 0; + var q = B[2].replace(/^{\s+/, '{').replace(/\s+}$/, '}'), V = 0 === q.indexOf('{'), U = 0; B; ) { @@ -5557,10 +5555,10 @@ H = B[2]; if ( (!(B[B.length - 1] || '![CDATA[' === H.slice(0, 8)) && - (H === q || (U && H.replace(/^{\s+/, '{').replace(/\s+}$/, '}'))) && - (K ? --V : ++V), + (H === q || (V && H.replace(/^{\s+/, '{').replace(/\s+}$/, '}'))) && + (K ? --U : ++U), (z += B[0]), - V <= 0) + U <= 0) ) break; B = g.match(M); @@ -5611,18 +5609,18 @@ for (; g.hasNext() && l.isIdentifierStart(g.peekCharCode()); ) e += g.next(); return [e, 'TK_STRING']; } - if ('#' === N) { + if ('#' === T) { if (0 === h.length && '!' === g.peek()) { - for (e = N; g.hasNext() && '\n' !== N; ) (N = g.next()), (e += N); + for (e = T; g.hasNext() && '\n' !== T; ) (T = g.next()), (e += T); return [((A = e), A.replace(/^\s+|\s+$/g, '') + '\n'), 'TK_UNKNOWN']; } var W = '#'; if (g.hasNext() && g.testChar(o)) { do { - W += N = g.next(); - } while (g.hasNext() && '#' !== N && '=' !== N); + W += T = g.next(); + } while (g.hasNext() && '#' !== T && '=' !== T); return ( - '#' === N || + '#' === T || ('[' === g.peek() && ']' === g.peek(1) ? ((W += '[]'), g.next(), g.next()) : '{' === g.peek() && '}' === g.peek(1) && ((W += '{}'), g.next(), g.next())), @@ -5630,25 +5628,25 @@ ); } } - if ('<' === N && ('?' === g.peek() || '%' === g.peek())) { + if ('<' === T && ('?' === g.peek() || '%' === g.peek())) { g.back(); var X = g.match(w); - if (X) return [(N = (N = X[0]).replace(l.allLineBreaks, '\n')), 'TK_STRING']; + if (X) return [(T = (T = X[0]).replace(l.allLineBreaks, '\n')), 'TK_STRING']; } - if ('<' === N && g.match(/\!--/g)) { - for (N = '\x3c!--'; g.hasNext() && !g.testChar(l.newline); ) N += g.next(); - return (f = !0), [N, 'TK_COMMENT']; + if ('<' === T && g.match(/\!--/g)) { + for (T = '\x3c!--'; g.hasNext() && !g.testChar(l.newline); ) T += g.next(); + return (f = !0), [T, 'TK_COMMENT']; } - if ('-' === N && f && g.match(/->/g)) return (f = !1), ['--\x3e', 'TK_COMMENT']; - if ('.' === N) + if ('-' === T && f && g.match(/->/g)) return (f = !1), ['--\x3e', 'TK_COMMENT']; + if ('.' === T) return '.' === g.peek() && '.' === g.peek(1) - ? [(N += g.next() + g.next()), 'TK_OPERATOR'] - : [N, 'TK_DOT']; - if (i(N, m)) { - for (; g.hasNext() && i(N + g.peek(), m) && ((N += g.next()), g.hasNext()); ); - return ',' === N ? [N, 'TK_COMMA'] : '=' === N ? [N, 'TK_EQUALS'] : [N, 'TK_OPERATOR']; + ? [(T += g.next() + g.next()), 'TK_OPERATOR'] + : [T, 'TK_DOT']; + if (i(T, m)) { + for (; g.hasNext() && i(T + g.peek(), m) && ((T += g.next()), g.hasNext()); ); + return ',' === T ? [T, 'TK_COMMA'] : '=' === T ? [T, 'TK_EQUALS'] : [T, 'TK_OPERATOR']; } - return [N, 'TK_UNKNOWN']; + return [T, 'TK_UNKNOWN']; } this.tokenize = function () { var t, n, l; @@ -5686,7 +5684,7 @@ return { js_beautify: r }; }.apply(t, [])) || (e.exports = n); }, - 847: function (e) { + 228: function (e) { 'use strict'; var t = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, @@ -5989,7 +5987,7 @@ }, 911: function (e, t, n) { 'use strict'; - var a = n(847), + var a = n(228), r = n(540); function l(e) { for (var t = 'https://reactjs.org/docs/error-decoder.html?invariant=' + e, n = 1; n < arguments.length; n++) @@ -6013,12 +6011,12 @@ f = i ? Symbol.for('react.forward_ref') : 60112, h = i ? Symbol.for('react.suspense') : 60113, g = i ? Symbol.for('react.suspense_list') : 60120, - b = i ? Symbol.for('react.memo') : 60115, - E = i ? Symbol.for('react.lazy') : 60116, + E = i ? Symbol.for('react.memo') : 60115, + b = i ? Symbol.for('react.lazy') : 60116, v = i ? Symbol.for('react.block') : 60121, y = i ? Symbol.for('react.fundamental') : 60117, - _ = i ? Symbol.for('react.scope') : 60119; - function x(e) { + x = i ? Symbol.for('react.scope') : 60119; + function _(e) { if (null == e) return null; if ('function' == typeof e) return e.displayName || e.name || null; if ('string' == typeof e) return e; @@ -6048,12 +6046,12 @@ (t = t.displayName || t.name || ''), e.displayName || ('' !== t ? 'ForwardRef(' + t + ')' : 'ForwardRef') ); - case b: - return x(e.type); - case v: - return x(e.render); case E: - if ((e = 1 === e._status ? e._result : null)) return x(e); + return _(e.type); + case v: + return _(e.render); + case b: + if ((e = 1 === e._status ? e._result : null)) return _(e); } return null; } @@ -6061,20 +6059,20 @@ w.hasOwnProperty('ReactCurrentDispatcher') || (w.ReactCurrentDispatcher = { current: null }), w.hasOwnProperty('ReactCurrentBatchConfig') || (w.ReactCurrentBatchConfig = { suspense: null }); var k = {}; - function T(e, t) { + function N(e, t) { for (var n = 0 | e._threadCount; n <= t; n++) (e[n] = e._currentValue2), (e._threadCount = n + 1); } - for (var N = new Uint16Array(16), S = 0; 15 > S; S++) N[S] = S + 1; - N[15] = 0; + for (var T = new Uint16Array(16), S = 0; 15 > S; S++) T[S] = S + 1; + T[15] = 0; var C = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, F = Object.prototype.hasOwnProperty, - R = {}, - O = {}; + I = {}, + R = {}; function A(e) { - return !!F.call(O, e) || (!F.call(R, e) && (C.test(e) ? (O[e] = !0) : ((R[e] = !0), !1))); + return !!F.call(R, e) || (!F.call(I, e) && (C.test(e) ? (R[e] = !0) : ((I[e] = !0), !1))); } - function I(e, t, n, a, r, l) { + function O(e, t, n, a, r, l) { (this.acceptsBooleans = 2 === t || 3 === t || 4 === t), (this.attributeName = a), (this.attributeNamespace = r), @@ -6087,7 +6085,7 @@ 'children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style' .split(' ') .forEach(function (e) { - D[e] = new I(e, 0, !1, e, null, !1); + D[e] = new O(e, 0, !1, e, null, !1); }), [ ['acceptCharset', 'accept-charset'], @@ -6096,30 +6094,30 @@ ['httpEquiv', 'http-equiv'], ].forEach(function (e) { var t = e[0]; - D[t] = new I(t, 1, !1, e[1], null, !1); + D[t] = new O(t, 1, !1, e[1], null, !1); }), ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (e) { - D[e] = new I(e, 2, !1, e.toLowerCase(), null, !1); + D[e] = new O(e, 2, !1, e.toLowerCase(), null, !1); }), ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (e) { - D[e] = new I(e, 2, !1, e, null, !1); + D[e] = new O(e, 2, !1, e, null, !1); }), 'allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope' .split(' ') .forEach(function (e) { - D[e] = new I(e, 3, !1, e.toLowerCase(), null, !1); + D[e] = new O(e, 3, !1, e.toLowerCase(), null, !1); }), ['checked', 'multiple', 'muted', 'selected'].forEach(function (e) { - D[e] = new I(e, 3, !0, e, null, !1); + D[e] = new O(e, 3, !0, e, null, !1); }), ['capture', 'download'].forEach(function (e) { - D[e] = new I(e, 4, !1, e, null, !1); + D[e] = new O(e, 4, !1, e, null, !1); }), ['cols', 'rows', 'size', 'span'].forEach(function (e) { - D[e] = new I(e, 6, !1, e, null, !1); + D[e] = new O(e, 6, !1, e, null, !1); }), ['rowSpan', 'start'].forEach(function (e) { - D[e] = new I(e, 5, !1, e.toLowerCase(), null, !1); + D[e] = new O(e, 5, !1, e.toLowerCase(), null, !1); }); var j = /[\-:]([a-z])/g; function L(e) { @@ -6129,22 +6127,22 @@ .split(' ') .forEach(function (e) { var t = e.replace(j, L); - D[t] = new I(t, 1, !1, e, null, !1); + D[t] = new O(t, 1, !1, e, null, !1); }), 'xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type'.split(' ').forEach(function (e) { var t = e.replace(j, L); - D[t] = new I(t, 1, !1, e, 'http://www.w3.org/1999/xlink', !1); + D[t] = new O(t, 1, !1, e, 'http://www.w3.org/1999/xlink', !1); }), ['xml:base', 'xml:lang', 'xml:space'].forEach(function (e) { var t = e.replace(j, L); - D[t] = new I(t, 1, !1, e, 'http://www.w3.org/XML/1998/namespace', !1); + D[t] = new O(t, 1, !1, e, 'http://www.w3.org/XML/1998/namespace', !1); }), ['tabIndex', 'crossOrigin'].forEach(function (e) { - D[e] = new I(e, 1, !1, e.toLowerCase(), null, !1); + D[e] = new O(e, 1, !1, e.toLowerCase(), null, !1); }), - (D.xlinkHref = new I('xlinkHref', 1, !1, 'xlink:href', 'http://www.w3.org/1999/xlink', !0)), + (D.xlinkHref = new O('xlinkHref', 1, !1, 'xlink:href', 'http://www.w3.org/1999/xlink', !0)), ['src', 'href', 'action', 'formAction'].forEach(function (e) { - D[e] = new I(e, 1, !1, e.toLowerCase(), null, !0); + D[e] = new O(e, 1, !1, e.toLowerCase(), null, !0); }); var P = /["'&<>]/; function M(e) { @@ -6241,8 +6239,8 @@ return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t); }, q = null, - U = null, V = null, + U = null, K = !1, H = !1, G = null, @@ -6251,46 +6249,46 @@ if (null === q) throw Error(l(321)); return q; } - function $() { + function Y() { if (0 < W) throw Error(l(312)); return { memoizedState: null, queue: null, next: null }; } - function Y() { + function $() { return ( - null === V - ? null === U - ? ((K = !1), (U = V = $())) - : ((K = !0), (V = U)) - : null === V.next - ? ((K = !1), (V = V.next = $())) - : ((K = !0), (V = V.next)), - V + null === U + ? null === V + ? ((K = !1), (V = U = Y())) + : ((K = !0), (U = V)) + : null === U.next + ? ((K = !1), (U = U.next = Y())) + : ((K = !0), (U = U.next)), + U ); } function Q(e, t, n, a) { - for (; H; ) (H = !1), (W += 1), (V = null), (n = e(t, a)); - return (U = q = null), (W = 0), (V = G = null), n; + for (; H; ) (H = !1), (W += 1), (U = null), (n = e(t, a)); + return (V = q = null), (W = 0), (U = G = null), n; } function Z(e, t) { return 'function' == typeof t ? t(e) : t; } function J(e, t, n) { - if (((q = X()), (V = Y()), K)) { - var a = V.queue; + if (((q = X()), (U = $()), K)) { + var a = U.queue; if (((t = a.dispatch), null !== G && void 0 !== (n = G.get(a)))) { - G.delete(a), (a = V.memoizedState); + G.delete(a), (a = U.memoizedState); do { (a = e(a, n.action)), (n = n.next); } while (null !== n); - return (V.memoizedState = a), [a, t]; + return (U.memoizedState = a), [a, t]; } - return [V.memoizedState, t]; + return [U.memoizedState, t]; } return ( (e = e === Z ? ('function' == typeof t ? t() : t) : void 0 !== n ? n(t) : t), - (V.memoizedState = e), - (e = (e = V.queue = { last: null, dispatch: null }).dispatch = ee.bind(null, q, e)), - [V.memoizedState, e] + (U.memoizedState = e), + (e = (e = U.queue = { last: null, dispatch: null }).dispatch = ee.bind(null, q, e)), + [U.memoizedState, e] ); } function ee(e, t, n) { @@ -6308,16 +6306,16 @@ ae = { readContext: function (e) { var t = ne; - return T(e, t), e[t]; + return N(e, t), e[t]; }, useContext: function (e) { X(); var t = ne; - return T(e, t), e[t]; + return N(e, t), e[t]; }, useMemo: function (e, t) { - if (((q = X()), (t = void 0 === t ? null : t), null !== (V = Y()))) { - var n = V.memoizedState; + if (((q = X()), (t = void 0 === t ? null : t), null !== (U = $()))) { + var n = U.memoizedState; if (null !== n && null !== t) { e: { var a = n[1]; @@ -6334,13 +6332,13 @@ if (a) return n[0]; } } - return (e = e()), (V.memoizedState = [e, t]), e; + return (e = e()), (U.memoizedState = [e, t]), e; }, useReducer: J, useRef: function (e) { q = X(); - var t = (V = Y()).memoizedState; - return null === t ? ((e = { current: e }), (V.memoizedState = e)) : t; + var t = (U = $()).memoizedState; + return null === t ? ((e = { current: e }), (U.memoizedState = e)) : t; }, useState: function (e) { return J(Z, e); @@ -6456,8 +6454,8 @@ fe = { listing: !0, pre: !0, textarea: !0 }, he = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/, ge = {}, - be = {}, - Ee = Object.prototype.hasOwnProperty, + Ee = {}, + be = Object.prototype.hasOwnProperty, ve = { children: null, dangerouslySetInnerHTML: null, @@ -6465,9 +6463,9 @@ suppressHydrationWarning: null, }; function ye(e, t) { - if (void 0 === e) throw Error(l(152, x(t) || 'Component')); + if (void 0 === e) throw Error(l(152, _(t) || 'Component')); } - var _e = (function () { + var xe = (function () { function e(e, t) { r.isValidElement(e) ? e.type !== c @@ -6475,15 +6473,15 @@ : ((e = e.props.children), (e = r.isValidElement(e) ? [e] : de(e))) : (e = de(e)), (e = { type: null, domNamespace: re, children: e, childIndex: 0, context: k, footer: '' }); - var n = N[0]; + var n = T[0]; if (0 === n) { - var a = N, + var a = T, i = 2 * (n = a.length); if (!(65536 >= i)) throw Error(l(304)); var o = new Uint16Array(i); - for (o.set(a), (N = o)[0] = n + 1, a = n; a < i - 1; a++) N[a] = a + 1; - N[i - 1] = 0; - } else N[0] = N[n]; + for (o.set(a), (T = o)[0] = n + 1, a = n; a < i - 1; a++) T[a] = a + 1; + T[i - 1] = 0; + } else T[0] = T[n]; (this.threadID = n), (this.stack = [e]), (this.exhausted = !1), @@ -6501,14 +6499,14 @@ if (!this.exhausted) { (this.exhausted = !0), this.clearProviders(); var e = this.threadID; - (N[e] = N[0]), (N[0] = e); + (T[e] = T[0]), (T[0] = e); } }), (t.pushProvider = function (e) { var t = ++this.contextIndex, n = e.type._context, a = this.threadID; - T(n, a); + N(n, a); var r = n[a]; (this.contextStack[t] = n), (this.contextValueStack[t] = r), (n[a] = e.props.value); }), @@ -6536,7 +6534,7 @@ if (0 === this.stack.length) { this.exhausted = !0; var i = this.threadID; - (N[i] = N[0]), (N[0] = i); + (T[i] = T[0]), (T[0] = i); break; } var o = this.stack[this.stack.length - 1]; @@ -6590,7 +6588,7 @@ function i(r, i) { var o = i.prototype && i.prototype.isReactComponent, c = (function (e, t, n, a) { - if (a && 'object' == typeof (a = e.contextType) && null !== a) return T(a, n), a[n]; + if (a && 'object' == typeof (a = e.contextType) && null !== a) return N(a, n), a[n]; if ((e = e.contextTypes)) { for (var r in ((n = {}), e)) n[r] = t[r]; t = n; @@ -6658,7 +6656,7 @@ 'function' == typeof o.getChildContext && 'object' == typeof (r = i.childContextTypes)) ) { var g = o.getChildContext(); - for (var b in g) if (!(b in r)) throw Error(l(108, x(i) || 'Unknown', b)); + for (var E in g) if (!(E in r)) throw Error(l(108, _(i) || 'Unknown', E)); } g && (t = a({}, t, g)); } @@ -6733,7 +6731,7 @@ }), '' ); - case b: + case E: return ( (e = [r.createElement(i.type, a({ ref: e.ref }, e.props))]), this.stack.push({ @@ -6764,7 +6762,7 @@ (i = e.type), (v = e.props); var w = this.threadID; return ( - T(i, w), + N(i, w), (i = de(v.children(i[w]))), this.stack.push({ type: e, @@ -6778,7 +6776,7 @@ ); case y: throw Error(l(338)); - case E: + case b: switch ( ((function (e) { if (-1 === e._status) { @@ -6816,7 +6814,7 @@ default: throw Error(l(295)); } - case _: + case x: throw Error(l(343)); } throw Error(l(130, null == i ? i : typeof i, '')); @@ -6888,7 +6886,7 @@ if (null != c.style && 'object' != typeof c.style) throw Error(l(62, '')); } for (y in ((c = o), (s = this.makeStaticMarkup), (u = 1 === this.stack.length), (m = '<' + e.type), c)) - if (Ee.call(c, y)) { + if (be.call(c, y)) { var p = c[y]; if (null != p) { if ('style' === y) { @@ -6898,29 +6896,29 @@ for (d in p) if (p.hasOwnProperty(d)) { var g = 0 === d.indexOf('--'), - b = p[d]; - if (null != b) { - if (g) var E = d; - else if (((E = d), be.hasOwnProperty(E))) E = be[E]; + E = p[d]; + if (null != E) { + if (g) var b = d; + else if (((b = d), Ee.hasOwnProperty(b))) b = Ee[b]; else { - var v = E.replace(ue, '-$1').toLowerCase().replace(me, '-ms-'); - E = be[E] = v; + var v = b.replace(ue, '-$1').toLowerCase().replace(me, '-ms-'); + b = Ee[b] = v; } - (f += h + E + ':'), + (f += h + b + ':'), (h = d), (f += g = - null == b || 'boolean' == typeof b || '' === b + null == E || 'boolean' == typeof E || '' === E ? '' - : g || 'number' != typeof b || 0 === b || (ce.hasOwnProperty(h) && ce[h]) - ? ('' + b).trim() - : b + 'px'), + : g || 'number' != typeof E || 0 === E || (ce.hasOwnProperty(h) && ce[h]) + ? ('' + E).trim() + : E + 'px'), (h = ';'); } } p = f || null; } d = null; - e: if (((g = i), (b = c), -1 === g.indexOf('-'))) g = 'string' == typeof b.is; + e: if (((g = i), (E = c), -1 === g.indexOf('-'))) g = 'string' == typeof E.is; else switch (g) { case 'annotation-xml': @@ -6976,9 +6974,9 @@ e ); })(), - xe = { + _e = { renderToString: function (e) { - e = new _e(e, !1); + e = new xe(e, !1); try { return e.read(1 / 0); } finally { @@ -6986,7 +6984,7 @@ } }, renderToStaticMarkup: function (e) { - e = new _e(e, !0); + e = new xe(e, !0); try { return e.read(1 / 0); } finally { @@ -7001,12 +6999,12 @@ }, version: '16.14.0', }; - e.exports = xe.default || xe; + e.exports = _e.default || _e; }, 551: function (e, t, n) { 'use strict'; var a = n(540), - r = n(847), + r = n(228), l = n(982); function i(e) { for (var t = 'https://reactjs.org/docs/error-decoder.html?invariant=' + e, n = 1; n < arguments.length; n++) @@ -7043,7 +7041,7 @@ var f = null, h = null, g = null; - function b(e, t, n) { + function E(e, t, n) { var a = e.type || 'unknown-event'; (e.currentTarget = g(n)), (function (e, t, n, a, r, l, o, d, f) { @@ -7055,17 +7053,17 @@ })(a, t, void 0, e), (e.currentTarget = null); } - var E = null, + var b = null, v = {}; function y() { - if (E) + if (b) for (var e in v) { var t = v[e], - n = E.indexOf(e); + n = b.indexOf(e); if (!(-1 < n)) throw Error(i(96, e)); - if (!x[n]) { + if (!_[n]) { if (!t.extractEvents) throw Error(i(97, e)); - for (var a in ((x[n] = t), (n = t.eventTypes))) { + for (var a in ((_[n] = t), (n = t.eventTypes))) { var r = void 0, l = n[a], o = t, @@ -7074,23 +7072,23 @@ w[c] = l; var s = l.phasedRegistrationNames; if (s) { - for (r in s) s.hasOwnProperty(r) && _(s[r], o, c); + for (r in s) s.hasOwnProperty(r) && x(s[r], o, c); r = !0; - } else l.registrationName ? (_(l.registrationName, o, c), (r = !0)) : (r = !1); + } else l.registrationName ? (x(l.registrationName, o, c), (r = !0)) : (r = !1); if (!r) throw Error(i(98, a, e)); } } } } - function _(e, t, n) { + function x(e, t, n) { if (k[e]) throw Error(i(100, e)); - (k[e] = t), (T[e] = t.eventTypes[n].dependencies); + (k[e] = t), (N[e] = t.eventTypes[n].dependencies); } - var x = [], + var _ = [], w = {}, k = {}, - T = {}; - function N(e) { + N = {}; + function T(e) { var t, n = !1; for (t in e) @@ -7110,8 +7108,8 @@ ), C = null, F = null, - R = null; - function O(e) { + I = null; + function R(e) { if ((e = h(e))) { if ('function' != typeof C) throw Error(i(280)); var t = e.stateNode; @@ -7119,13 +7117,13 @@ } } function A(e) { - F ? (R ? R.push(e) : (R = [e])) : (F = e); + F ? (I ? I.push(e) : (I = [e])) : (F = e); } - function I() { + function O() { if (F) { var e = F, - t = R; - if (((R = F = null), O(e), t)) for (e = 0; e < t.length; e++) O(t[e]); + t = I; + if (((I = F = null), R(e), t)) for (e = 0; e < t.length; e++) R(t[e]); } } function D(e, t) { @@ -7139,7 +7137,7 @@ M = !1, z = !1; function B() { - (null === F && null === R) || (L(), I()); + (null === F && null === I) || (L(), O()); } function q(e, t, n) { if (z) return e(t, n); @@ -7150,9 +7148,9 @@ (z = !1), B(); } } - var U = + var V = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, - V = Object.prototype.hasOwnProperty, + U = Object.prototype.hasOwnProperty, K = {}, H = {}; function G(e, t, n, a, r, l) { @@ -7203,21 +7201,21 @@ W[e] = new G(e, 5, !1, e.toLowerCase(), null, !1); }); var X = /[\-:]([a-z])/g; - function $(e) { + function Y(e) { return e[1].toUpperCase(); } 'accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height' .split(' ') .forEach(function (e) { - var t = e.replace(X, $); + var t = e.replace(X, Y); W[t] = new G(t, 1, !1, e, null, !1); }), 'xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type'.split(' ').forEach(function (e) { - var t = e.replace(X, $); + var t = e.replace(X, Y); W[t] = new G(t, 1, !1, e, 'http://www.w3.org/1999/xlink', !1); }), ['xml:base', 'xml:lang', 'xml:space'].forEach(function (e) { - var t = e.replace(X, $); + var t = e.replace(X, Y); W[t] = new G(t, 1, !1, e, 'http://www.w3.org/XML/1998/namespace', !1); }), ['tabIndex', 'crossOrigin'].forEach(function (e) { @@ -7227,7 +7225,7 @@ ['src', 'href', 'action', 'formAction'].forEach(function (e) { W[e] = new G(e, 1, !1, e.toLowerCase(), null, !0); }); - var Y = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + var $ = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function Q(e, t, n, a) { var r = W.hasOwnProperty(t) ? W[t] : null; (null !== r @@ -7271,7 +7269,7 @@ })(t, n, r, a) && (n = null), a || null === r ? (function (e) { - return !!V.call(H, e) || (!V.call(K, e) && (U.test(e) ? (H[e] = !0) : ((K[e] = !0), !1))); + return !!U.call(H, e) || (!U.call(K, e) && (V.test(e) ? (H[e] = !0) : ((K[e] = !0), !1))); })(t) && (null === n ? e.removeAttribute(t) : e.setAttribute(t, '' + n)) : r.mustUseProperty ? (e[r.propertyName] = null === n ? 3 !== r.type && '' : n) @@ -7282,8 +7280,8 @@ : ((n = 3 === (r = r.type) || (4 === r && !0 === n) ? '' : '' + n), a ? e.setAttributeNS(a, t, n) : e.setAttribute(t, n)))); } - Y.hasOwnProperty('ReactCurrentDispatcher') || (Y.ReactCurrentDispatcher = { current: null }), - Y.hasOwnProperty('ReactCurrentBatchConfig') || (Y.ReactCurrentBatchConfig = { suspense: null }); + $.hasOwnProperty('ReactCurrentDispatcher') || ($.ReactCurrentDispatcher = { current: null }), + $.hasOwnProperty('ReactCurrentBatchConfig') || ($.ReactCurrentBatchConfig = { suspense: null }); var Z = /^(.*)[\\\/]/, J = 'function' == typeof Symbol && Symbol.for, ee = J ? Symbol.for('react.element') : 60103, @@ -7347,7 +7345,7 @@ } return null; } - function be(e) { + function Ee(e) { var t = ''; do { e: switch (e.tag) { @@ -7376,7 +7374,7 @@ } while (e); return t; } - function Ee(e) { + function be(e) { switch (typeof e) { case 'boolean': case 'number': @@ -7427,7 +7425,7 @@ } })(e)); } - function _e(e) { + function xe(e) { if (!e) return !1; var t = e._valueTracker; if (!t) return !0; @@ -7435,7 +7433,7 @@ a = ''; return e && (a = ve(e) ? (e.checked ? 'true' : 'false') : e.value), (e = a) !== n && (t.setValue(e), !0); } - function xe(e, t) { + function _e(e, t) { var n = t.checked; return r({}, t, { defaultChecked: void 0, @@ -7447,7 +7445,7 @@ function we(e, t) { var n = null == t.defaultValue ? '' : t.defaultValue, a = null != t.checked ? t.checked : t.defaultChecked; - (n = Ee(null != t.value ? t.value : n)), + (n = be(null != t.value ? t.value : n)), (e._wrapperState = { initialChecked: a, initialValue: n, @@ -7457,9 +7455,9 @@ function ke(e, t) { null != (t = t.checked) && Q(e, 'checked', t, !1); } - function Te(e, t) { + function Ne(e, t) { ke(e, t); - var n = Ee(t.value), + var n = be(t.value), a = t.type; if (null != n) 'number' === a @@ -7468,10 +7466,10 @@ else if ('submit' === a || 'reset' === a) return void e.removeAttribute('value'); t.hasOwnProperty('value') ? Se(e, t.type, n) - : t.hasOwnProperty('defaultValue') && Se(e, t.type, Ee(t.defaultValue)), + : t.hasOwnProperty('defaultValue') && Se(e, t.type, be(t.defaultValue)), null == t.checked && null != t.defaultChecked && (e.defaultChecked = !!t.defaultChecked); } - function Ne(e, t, n) { + function Te(e, t, n) { if (t.hasOwnProperty('value') || t.hasOwnProperty('defaultValue')) { var a = t.type; if (!(('submit' !== a && 'reset' !== a) || (void 0 !== t.value && null !== t.value))) return; @@ -7511,18 +7509,18 @@ e[n].selected !== r && (e[n].selected = r), r && a && (e[n].defaultSelected = !0); } else { - for (n = '' + Ee(n), t = null, r = 0; r < e.length; r++) { + for (n = '' + be(n), t = null, r = 0; r < e.length; r++) { if (e[r].value === n) return (e[r].selected = !0), void (a && (e[r].defaultSelected = !0)); null !== t || e[r].disabled || (t = e[r]); } null !== t && (t.selected = !0); } } - function Re(e, t) { + function Ie(e, t) { if (null != t.dangerouslySetInnerHTML) throw Error(i(91)); return r({}, t, { value: void 0, defaultValue: void 0, children: '' + e._wrapperState.initialValue }); } - function Oe(e, t) { + function Re(e, t) { var n = t.value; if (null == n) { if (((n = t.children), (t = t.defaultValue), null != n)) { @@ -7535,17 +7533,17 @@ } null == t && (t = ''), (n = t); } - e._wrapperState = { initialValue: Ee(n) }; + e._wrapperState = { initialValue: be(n) }; } function Ae(e, t) { - var n = Ee(t.value), - a = Ee(t.defaultValue); + var n = be(t.value), + a = be(t.defaultValue); null != n && ((n = '' + n) !== e.value && (e.value = n), null == t.defaultValue && e.defaultValue !== n && (e.defaultValue = n)), null != a && (e.defaultValue = '' + a); } - function Ie(e) { + function Oe(e) { var t = e.textContent; t === e._wrapperState.initialValue && '' !== t && null !== t && (e.value = t); } @@ -7608,18 +7606,18 @@ animationstart: Be('Animation', 'AnimationStart'), transitionend: Be('Transition', 'TransitionEnd'), }, - Ue = {}, - Ve = {}; + Ve = {}, + Ue = {}; function Ke(e) { - if (Ue[e]) return Ue[e]; + if (Ve[e]) return Ve[e]; if (!qe[e]) return e; var t, n = qe[e]; - for (t in n) if (n.hasOwnProperty(t) && t in Ve) return (Ue[e] = n[t]); + for (t in n) if (n.hasOwnProperty(t) && t in Ue) return (Ve[e] = n[t]); return e; } S && - ((Ve = document.createElement('div').style), + ((Ue = document.createElement('div').style), 'AnimationEvent' in window || (delete qe.animationend.animation, delete qe.animationiteration.animation, @@ -7629,14 +7627,14 @@ Ge = Ke('animationiteration'), We = Ke('animationstart'), Xe = Ke('transitionend'), - $e = + Ye = 'abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting'.split( ' ' ), - Ye = new ('function' == typeof WeakMap ? WeakMap : Map)(); + $e = new ('function' == typeof WeakMap ? WeakMap : Map)(); function Qe(e) { - var t = Ye.get(e); - return void 0 === t && ((t = new Map()), Ye.set(e, t)), t; + var t = $e.get(e); + return void 0 === t && ((t = new Map()), $e.set(e, t)), t; } function Ze(e) { var t = e, @@ -7757,8 +7755,8 @@ if (e) { var t = e._dispatchListeners, n = e._dispatchInstances; - if (Array.isArray(t)) for (var a = 0; a < t.length && !e.isPropagationStopped(); a++) b(e, t[a], n[a]); - else t && b(e, t, n); + if (Array.isArray(t)) for (var a = 0; a < t.length && !e.isPropagationStopped(); a++) E(e, t[a], n[a]); + else t && E(e, t, n); (e._dispatchListeners = null), (e._dispatchInstances = null), e.isPersistent() || e.constructor.release(e); } } @@ -7811,7 +7809,7 @@ a = 3 !== a.tag ? null : a.stateNode.containerInfo; } if (!a) break; - (5 !== (t = n.tag) && 6 !== t) || e.ancestors.push(n), (n = On(a)); + (5 !== (t = n.tag) && 6 !== t) || e.ancestors.push(n), (n = Rn(a)); } while (n); for (n = 0; n < e.ancestors.length; n++) { t = e.ancestors[n]; @@ -7820,8 +7818,8 @@ var l = e.nativeEvent, i = e.eventSystemFlags; 0 === n && (i |= 64); - for (var o = null, c = 0; c < x.length; c++) { - var s = x[c]; + for (var o = null, c = 0; c < _.length; c++) { + var s = _[c]; s && (s = s.extractEvents(a, t, l, r, i)) && (o = nt(o, s)); } it(o); @@ -7846,7 +7844,7 @@ case 'reset': break; default: - -1 === $e.indexOf(e) && Gt(e, t); + -1 === Ye.indexOf(e) && Gt(e, t); } n.set(e, null); } @@ -7854,19 +7852,19 @@ var ft, ht, gt, - bt = !1, - Et = [], + Et = !1, + bt = [], vt = null, yt = null, - _t = null, - xt = new Map(), + xt = null, + _t = new Map(), wt = new Map(), kt = [], - Tt = + Nt = 'mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit'.split( ' ' ), - Nt = + Tt = 'focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture'.split( ' ' ); @@ -7885,11 +7883,11 @@ break; case 'mouseover': case 'mouseout': - _t = null; + xt = null; break; case 'pointerover': case 'pointerout': - xt.delete(t.pointerId); + _t.delete(t.pointerId); break; case 'gotpointercapture': case 'lostpointercapture': @@ -7901,8 +7899,8 @@ ? ((e = St(t, n, a, r, l)), null !== t && null !== (t = An(t)) && ht(t), e) : ((e.eventSystemFlags |= a), e); } - function Rt(e) { - var t = On(e.target); + function It(e) { + var t = Rn(e.target); if (null !== t) { var n = Ze(t); if (null !== n) @@ -7919,7 +7917,7 @@ } e.blockedOn = null; } - function Ot(e) { + function Rt(e) { if (null !== e.blockedOn) return !1; var t = Qt(e.topLevelType, e.eventSystemFlags, e.container, e.nativeEvent); if (null !== t) { @@ -7929,51 +7927,51 @@ return !0; } function At(e, t, n) { - Ot(e) && n.delete(t); + Rt(e) && n.delete(t); } - function It() { - for (bt = !1; 0 < Et.length; ) { - var e = Et[0]; + function Ot() { + for (Et = !1; 0 < bt.length; ) { + var e = bt[0]; if (null !== e.blockedOn) { null !== (e = An(e.blockedOn)) && ft(e); break; } var t = Qt(e.topLevelType, e.eventSystemFlags, e.container, e.nativeEvent); - null !== t ? (e.blockedOn = t) : Et.shift(); + null !== t ? (e.blockedOn = t) : bt.shift(); } - null !== vt && Ot(vt) && (vt = null), - null !== yt && Ot(yt) && (yt = null), - null !== _t && Ot(_t) && (_t = null), - xt.forEach(At), + null !== vt && Rt(vt) && (vt = null), + null !== yt && Rt(yt) && (yt = null), + null !== xt && Rt(xt) && (xt = null), + _t.forEach(At), wt.forEach(At); } function Dt(e, t) { e.blockedOn === t && - ((e.blockedOn = null), bt || ((bt = !0), l.unstable_scheduleCallback(l.unstable_NormalPriority, It))); + ((e.blockedOn = null), Et || ((Et = !0), l.unstable_scheduleCallback(l.unstable_NormalPriority, Ot))); } function jt(e) { function t(t) { return Dt(t, e); } - if (0 < Et.length) { - Dt(Et[0], e); - for (var n = 1; n < Et.length; n++) { - var a = Et[n]; + if (0 < bt.length) { + Dt(bt[0], e); + for (var n = 1; n < bt.length; n++) { + var a = bt[n]; a.blockedOn === e && (a.blockedOn = null); } } for ( null !== vt && Dt(vt, e), null !== yt && Dt(yt, e), - null !== _t && Dt(_t, e), - xt.forEach(t), + null !== xt && Dt(xt, e), + _t.forEach(t), wt.forEach(t), n = 0; n < kt.length; n++ ) (a = kt[n]).blockedOn === e && (a.blockedOn = null); - for (; 0 < kt.length && null === (n = kt[0]).blockedOn; ) Rt(n), null === n.blockedOn && kt.shift(); + for (; 0 < kt.length && null === (n = kt[0]).blockedOn; ) It(n), null === n.blockedOn && kt.shift(); } var Lt = {}, Pt = new Map(), @@ -8060,12 +8058,12 @@ Bt(zt, 2); for ( var qt = 'change selectionchange textInput compositionstart compositionend compositionupdate'.split(' '), - Ut = 0; - Ut < qt.length; - Ut++ + Vt = 0; + Vt < qt.length; + Vt++ ) - Mt.set(qt[Ut], 0); - var Vt = l.unstable_UserBlockingPriority, + Mt.set(qt[Vt], 0); + var Ut = l.unstable_UserBlockingPriority, Kt = l.unstable_runWithPriority, Ht = !0; function Gt(e, t) { @@ -8078,16 +8076,16 @@ a = Xt.bind(null, t, 1, e); break; case 1: - a = $t.bind(null, t, 1, e); + a = Yt.bind(null, t, 1, e); break; default: - a = Yt.bind(null, t, 1, e); + a = $t.bind(null, t, 1, e); } n ? e.addEventListener(t, a, !0) : e.addEventListener(t, a, !1); } function Xt(e, t, n, a) { M || L(); - var r = Yt, + var r = $t, l = M; M = !0; try { @@ -8096,16 +8094,16 @@ (M = l) || B(); } } - function $t(e, t, n, a) { - Kt(Vt, Yt.bind(null, e, t, n, a)); - } function Yt(e, t, n, a) { + Kt(Ut, $t.bind(null, e, t, n, a)); + } + function $t(e, t, n, a) { if (Ht) - if (0 < Et.length && -1 < Tt.indexOf(e)) (e = St(null, e, t, n, a)), Et.push(e); + if (0 < bt.length && -1 < Nt.indexOf(e)) (e = St(null, e, t, n, a)), bt.push(e); else { var r = Qt(e, t, n, a); if (null === r) Ct(e, a); - else if (-1 < Tt.indexOf(e)) (e = St(r, e, t, n, a)), Et.push(e); + else if (-1 < Nt.indexOf(e)) (e = St(r, e, t, n, a)), bt.push(e); else if ( !(function (e, t, n, a, r) { switch (t) { @@ -8114,10 +8112,10 @@ case 'dragenter': return (yt = Ft(yt, e, t, n, a, r)), !0; case 'mouseover': - return (_t = Ft(_t, e, t, n, a, r)), !0; + return (xt = Ft(xt, e, t, n, a, r)), !0; case 'pointerover': var l = r.pointerId; - return xt.set(l, Ft(xt.get(l) || null, e, t, n, a, r)), !0; + return _t.set(l, Ft(_t.get(l) || null, e, t, n, a, r)), !0; case 'gotpointercapture': return (l = r.pointerId), wt.set(l, Ft(wt.get(l) || null, e, t, n, a, r)), !0; } @@ -8134,7 +8132,7 @@ } } function Qt(e, t, n, a) { - if (null !== (n = On((n = ot(a))))) { + if (null !== (n = Rn((n = ot(a))))) { var r = Ze(n); if (null === r) n = null; else { @@ -8271,7 +8269,7 @@ var ln = 'http://www.w3.org/1999/xhtml'; function on(e, t) { var n = Qe((e = 9 === e.nodeType || 11 === e.nodeType ? e : e.ownerDocument)); - t = T[t]; + t = N[t]; for (var a = 0; a < t.length; a++) pt(t[a], e, n); } function cn() {} @@ -8348,11 +8346,11 @@ } var hn = '$', gn = '/$', - bn = '$?', - En = '$!', + En = '$?', + bn = '$!', vn = null, yn = null; - function _n(e, t) { + function xn(e, t) { switch (e) { case 'button': case 'input': @@ -8362,7 +8360,7 @@ } return !1; } - function xn(e, t) { + function _n(e, t) { return ( 'textarea' === e || 'option' === e || @@ -8376,19 +8374,19 @@ } var wn = 'function' == typeof setTimeout ? setTimeout : void 0, kn = 'function' == typeof clearTimeout ? clearTimeout : void 0; - function Tn(e) { + function Nn(e) { for (; null != e; e = e.nextSibling) { var t = e.nodeType; if (1 === t || 3 === t) break; } return e; } - function Nn(e) { + function Tn(e) { e = e.previousSibling; for (var t = 0; e; ) { if (8 === e.nodeType) { var n = e.data; - if (n === hn || n === En || n === bn) { + if (n === hn || n === bn || n === En) { if (0 === t) return e; t--; } else n === gn && t++; @@ -8400,16 +8398,16 @@ var Sn = Math.random().toString(36).slice(2), Cn = '__reactInternalInstance$' + Sn, Fn = '__reactEventHandlers$' + Sn, - Rn = '__reactContainere$' + Sn; - function On(e) { + In = '__reactContainere$' + Sn; + function Rn(e) { var t = e[Cn]; if (t) return t; for (var n = e.parentNode; n; ) { - if ((t = n[Rn] || n[Cn])) { + if ((t = n[In] || n[Cn])) { if (((n = t.alternate), null !== t.child || (null !== n && null !== n.child))) - for (e = Nn(e); null !== e; ) { + for (e = Tn(e); null !== e; ) { if ((n = e[Cn])) return n; - e = Nn(e); + e = Tn(e); } return t; } @@ -8418,9 +8416,9 @@ return null; } function An(e) { - return !(e = e[Cn] || e[Rn]) || (5 !== e.tag && 6 !== e.tag && 13 !== e.tag && 3 !== e.tag) ? null : e; + return !(e = e[Cn] || e[In]) || (5 !== e.tag && 6 !== e.tag && 13 !== e.tag && 3 !== e.tag) ? null : e; } - function In(e) { + function On(e) { if (5 === e.tag || 6 === e.tag) return e.stateNode; throw Error(i(33)); } @@ -8488,16 +8486,16 @@ function qn(e) { at(e, Mn); } - var Un = null, - Vn = null, + var Vn = null, + Un = null, Kn = null; function Hn() { if (Kn) return Kn; var e, t, - n = Vn, + n = Un, a = n.length, - r = 'value' in Un ? Un.value : Un.textContent, + r = 'value' in Vn ? Vn.value : Vn.textContent, l = r.length; for (e = 0; e < a && n[e] === r[e]; e++); var i = a - e; @@ -8525,19 +8523,19 @@ this ); } - function $n(e, t, n, a) { + function Yn(e, t, n, a) { if (this.eventPool.length) { var r = this.eventPool.pop(); return this.call(r, e, t, n, a), r; } return new this(e, t, n, a); } - function Yn(e) { + function $n(e) { if (!(e instanceof this)) throw Error(i(279)); e.destructor(), 10 > this.eventPool.length && this.eventPool.push(e); } function Qn(e) { - (e.eventPool = []), (e.getPooled = $n), (e.release = Yn); + (e.eventPool = []), (e.getPooled = Yn), (e.release = $n); } r(Xn.prototype, { preventDefault: function () { @@ -8675,7 +8673,7 @@ 'ko' !== n.locale && (ua || l !== ia.compositionStart ? l === ia.compositionEnd && ua && (r = Hn()) - : ((Vn = 'value' in (Un = a) ? Un.value : Un.textContent), (ua = !0))), + : ((Un = 'value' in (Vn = a) ? Vn.value : Vn.textContent), (ua = !0))), (l = Zn.getPooled(l, t, n, a)), (r || null !== (r = sa(n))) && (l.data = r), qn(l), @@ -8697,7 +8695,7 @@ : (function (e, t) { if (ua) return 'compositionend' === e || (!ta && ca(e, t)) - ? ((e = Hn()), (Kn = Vn = Un = null), (ua = !1), e) + ? ((e = Hn()), (Kn = Un = Vn = null), (ua = !1), e) : null; switch (e) { case 'paste': @@ -8750,63 +8748,63 @@ return ((e = Xn.getPooled(fa.change, e, t, n)).type = 'change'), A(n), qn(e), e; } var ga = null, - ba = null; - function Ea(e) { + Ea = null; + function ba(e) { it(e); } function va(e) { - if (_e(In(e))) return e; + if (xe(On(e))) return e; } function ya(e, t) { if ('change' === e) return t; } - var _a = !1; - function xa() { - ga && (ga.detachEvent('onpropertychange', wa), (ba = ga = null)); + var xa = !1; + function _a() { + ga && (ga.detachEvent('onpropertychange', wa), (Ea = ga = null)); } function wa(e) { - if ('value' === e.propertyName && va(ba)) - if (((e = ha(ba, e, ot(e))), M)) it(e); + if ('value' === e.propertyName && va(Ea)) + if (((e = ha(Ea, e, ot(e))), M)) it(e); else { M = !0; try { - D(Ea, e); + D(ba, e); } finally { (M = !1), B(); } } } function ka(e, t, n) { - 'focus' === e ? (xa(), (ba = n), (ga = t).attachEvent('onpropertychange', wa)) : 'blur' === e && xa(); + 'focus' === e ? (_a(), (Ea = n), (ga = t).attachEvent('onpropertychange', wa)) : 'blur' === e && _a(); } - function Ta(e) { - if ('selectionchange' === e || 'keyup' === e || 'keydown' === e) return va(ba); + function Na(e) { + if ('selectionchange' === e || 'keyup' === e || 'keydown' === e) return va(Ea); } - function Na(e, t) { + function Ta(e, t) { if ('click' === e) return va(t); } function Sa(e, t) { if ('input' === e || 'change' === e) return va(t); } - S && (_a = ct('input') && (!document.documentMode || 9 < document.documentMode)); + S && (xa = ct('input') && (!document.documentMode || 9 < document.documentMode)); var Ca = { eventTypes: fa, - _isInputEventSupported: _a, + _isInputEventSupported: xa, extractEvents: function (e, t, n, a) { - var r = t ? In(t) : window, + var r = t ? On(t) : window, l = r.nodeName && r.nodeName.toLowerCase(); if ('select' === l || ('input' === l && 'file' === r.type)) var i = ya; else if (pa(r)) - if (_a) i = Sa; + if (xa) i = Sa; else { - i = Ta; + i = Na; var o = ka; } else (l = r.nodeName) && 'input' === l.toLowerCase() && ('checkbox' === r.type || 'radio' === r.type) && - (i = Na); + (i = Ta); if (i && (i = i(e, t))) return ha(i, n, a); o && o(e, r, t), 'blur' === e && @@ -8817,15 +8815,15 @@ }, }, Fa = Xn.extend({ view: null, detail: null }), - Ra = { Alt: 'altKey', Control: 'ctrlKey', Meta: 'metaKey', Shift: 'shiftKey' }; - function Oa(e) { + Ia = { Alt: 'altKey', Control: 'ctrlKey', Meta: 'metaKey', Shift: 'shiftKey' }; + function Ra(e) { var t = this.nativeEvent; - return t.getModifierState ? t.getModifierState(e) : !!(e = Ra[e]) && !!t[e]; + return t.getModifierState ? t.getModifierState(e) : !!(e = Ia[e]) && !!t[e]; } function Aa() { - return Oa; + return Ra; } - var Ia = 0, + var Oa = 0, Da = 0, ja = !1, La = !1, @@ -8848,8 +8846,8 @@ }, movementX: function (e) { if ('movementX' in e) return e.movementX; - var t = Ia; - return (Ia = e.screenX), ja ? ('mousemove' === e.type ? e.screenX - t : 0) : ((ja = !0), 0); + var t = Oa; + return (Oa = e.screenX), ja ? ('mousemove' === e.type ? e.screenX - t : 0) : ((ja = !0), 0); }, movementY: function (e) { if ('movementY' in e) return e.movementY; @@ -8885,7 +8883,7 @@ ((l = a.window === a ? a : (l = a.ownerDocument) ? l.defaultView || l.parentWindow : window), i ? ((i = t), - null !== (t = (t = n.relatedTarget || n.toElement) ? On(t) : null) && + null !== (t = (t = n.relatedTarget || n.toElement) ? Rn(t) : null) && (t !== Ze(t) || (5 !== t.tag && 6 !== t.tag)) && (t = null)) : (i = null), @@ -8901,8 +8899,8 @@ ('pointerout' !== e && 'pointerover' !== e) || ((o = Ma), (c = za.pointerLeave), (s = za.pointerEnter), (u = 'pointer')); if ( - ((e = null == i ? l : In(i)), - (l = null == t ? l : In(t)), + ((e = null == i ? l : On(i)), + (l = null == t ? l : On(t)), ((c = o.getPooled(c, i, n, a)).type = u + 'leave'), (c.target = e), (c.relatedTarget = l), @@ -8937,14 +8935,14 @@ : function (e, t) { return (e === t && (0 !== e || 1 / e == 1 / t)) || (e != e && t != t); }, - Ua = Object.prototype.hasOwnProperty; - function Va(e, t) { + Va = Object.prototype.hasOwnProperty; + function Ua(e, t) { if (qa(e, t)) return !0; if ('object' != typeof e || null === e || 'object' != typeof t || null === t) return !1; var n = Object.keys(e), a = Object.keys(t); if (n.length !== a.length) return !1; - for (a = 0; a < n.length; a++) if (!Ua.call(t, n[a]) || !qa(e[n[a]], t[n[a]])) return !1; + for (a = 0; a < n.length; a++) if (!Va.call(t, n[a]) || !qa(e[n[a]], t[n[a]])) return !1; return !0; } var Ka = S && 'documentMode' in document && 11 >= document.documentMode, @@ -8957,10 +8955,10 @@ Ga = null, Wa = null, Xa = null, - $a = !1; - function Ya(e, t) { + Ya = !1; + function $a(e, t) { var n = t.window === t ? t.document : 9 === t.nodeType ? t : t.ownerDocument; - return $a || null == Ga || Ga !== sn(n) + return Ya || null == Ga || Ga !== sn(n) ? null : ((n = 'selectionStart' in (n = Ga) && fn(n) @@ -8972,7 +8970,7 @@ focusNode: n.focusNode, focusOffset: n.focusOffset, }), - Xa && Va(Xa, n) + Xa && Ua(Xa, n) ? null : ((Xa = n), ((e = Xn.getPooled(Ha.select, Wa, e, t)).type = 'select'), (e.target = Ga), qn(e), e)); } @@ -8981,7 +8979,7 @@ extractEvents: function (e, t, n, a, r, l) { if (!(l = !(r = l || (a.window === a ? a.document : 9 === a.nodeType ? a : a.ownerDocument)))) { e: { - (r = Qe(r)), (l = T.onSelect); + (r = Qe(r)), (l = N.onSelect); for (var i = 0; i < l.length; i++) if (!r.has(l[i])) { r = !1; @@ -8992,7 +8990,7 @@ l = !r; } if (l) return null; - switch (((r = t ? In(t) : window), e)) { + switch (((r = t ? On(t) : window), e)) { case 'focus': (pa(r) || 'true' === r.contentEditable) && ((Ga = r), (Wa = t), (Xa = null)); break; @@ -9000,17 +8998,17 @@ Xa = Wa = Ga = null; break; case 'mousedown': - $a = !0; + Ya = !0; break; case 'contextmenu': case 'mouseup': case 'dragend': - return ($a = !1), Ya(n, a); + return (Ya = !1), $a(n, a); case 'selectionchange': if (Ka) break; case 'keydown': case 'keyup': - return Ya(n, a); + return $a(n, a); } return null; }, @@ -9221,8 +9219,8 @@ return qn((t = e.getPooled(r, t, n, a))), t; }, }; - if (E) throw Error(i(101)); - (E = Array.prototype.slice.call( + if (b) throw Error(i(101)); + (b = Array.prototype.slice.call( 'ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin'.split( ' ' ) @@ -9230,8 +9228,8 @@ y(), (f = Dn), (h = An), - (g = In), - N({ + (g = On), + T({ SimpleEventPlugin: sr, EnterLeaveEventPlugin: Ba, ChangeEventPlugin: Ca, @@ -9249,8 +9247,8 @@ var fr = {}, hr = { current: fr }, gr = { current: !1 }, - br = fr; - function Er(e, t) { + Er = fr; + function br(e, t) { var n = e.type.contextTypes; if (!n) return fr; var a = e.stateNode; @@ -9272,11 +9270,11 @@ function yr() { dr(gr), dr(hr); } - function _r(e, t, n) { + function xr(e, t, n) { if (hr.current !== fr) throw Error(i(168)); pr(hr, t), pr(gr, n); } - function xr(e, t, n) { + function _r(e, t, n) { var a = e.stateNode; if (((e = t.childContextTypes), 'function' != typeof a.getChildContext)) return n; for (var l in (a = a.getChildContext())) if (!(l in e)) throw Error(i(108, ge(t) || 'Unknown', l)); @@ -9285,7 +9283,7 @@ function wr(e) { return ( (e = ((e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext) || fr), - (br = hr.current), + (Er = hr.current), pr(hr, e), pr(gr, gr.current), !0 @@ -9295,19 +9293,19 @@ var a = e.stateNode; if (!a) throw Error(i(169)); n - ? ((e = xr(e, t, br)), (a.__reactInternalMemoizedMergedChildContext = e), dr(gr), dr(hr), pr(hr, e)) + ? ((e = _r(e, t, Er)), (a.__reactInternalMemoizedMergedChildContext = e), dr(gr), dr(hr), pr(hr, e)) : dr(gr), pr(gr, n); } - var Tr = l.unstable_runWithPriority, - Nr = l.unstable_scheduleCallback, + var Nr = l.unstable_runWithPriority, + Tr = l.unstable_scheduleCallback, Sr = l.unstable_cancelCallback, Cr = l.unstable_requestPaint, Fr = l.unstable_now, - Rr = l.unstable_getCurrentPriorityLevel, - Or = l.unstable_ImmediatePriority, + Ir = l.unstable_getCurrentPriorityLevel, + Rr = l.unstable_ImmediatePriority, Ar = l.unstable_UserBlockingPriority, - Ir = l.unstable_NormalPriority, + Or = l.unstable_NormalPriority, Dr = l.unstable_LowPriority, jr = l.unstable_IdlePriority, Lr = {}, @@ -9316,20 +9314,20 @@ zr = null, Br = null, qr = !1, - Ur = Fr(), - Vr = - 1e4 > Ur + Vr = Fr(), + Ur = + 1e4 > Vr ? Fr : function () { - return Fr() - Ur; + return Fr() - Vr; }; function Kr() { - switch (Rr()) { - case Or: + switch (Ir()) { + case Rr: return 99; case Ar: return 98; - case Ir: + case Or: return 97; case Dr: return 96; @@ -9342,11 +9340,11 @@ function Hr(e) { switch (e) { case 99: - return Or; + return Rr; case 98: return Ar; case 97: - return Ir; + return Or; case 96: return Dr; case 95: @@ -9356,22 +9354,22 @@ } } function Gr(e, t) { - return (e = Hr(e)), Tr(e, t); + return (e = Hr(e)), Nr(e, t); } function Wr(e, t, n) { - return (e = Hr(e)), Nr(e, t, n); + return (e = Hr(e)), Tr(e, t, n); } function Xr(e) { - return null === zr ? ((zr = [e]), (Br = Nr(Or, Yr))) : zr.push(e), Lr; + return null === zr ? ((zr = [e]), (Br = Tr(Rr, $r))) : zr.push(e), Lr; } - function $r() { + function Yr() { if (null !== Br) { var e = Br; (Br = null), Sr(e); } - Yr(); + $r(); } - function Yr() { + function $r() { if (!qr && null !== zr) { qr = !0; var e = 0; @@ -9387,7 +9385,7 @@ }), (zr = null); } catch (t) { - throw (null !== zr && (zr = zr.slice(e + 1)), Nr(Or, $r), t); + throw (null !== zr && (zr = zr.slice(e + 1)), Tr(Rr, Yr), t); } finally { qr = !1; } @@ -9429,7 +9427,7 @@ (nl = tl = null), null !== (e = e.dependencies) && null !== e.firstContext && - (e.expirationTime >= t && (Ii = !0), (e.firstContext = null)); + (e.expirationTime >= t && (Oi = !0), (e.firstContext = null)); } function ol(e, t) { if (nl !== e && !1 !== t && 0 !== t) @@ -9527,10 +9525,10 @@ yc(o, f.suspenseConfig); e: { var g = e, - b = f; - switch (((o = t), (h = n), b.tag)) { + E = f; + switch (((o = t), (h = n), E.tag)) { case 1: - if ('function' == typeof (g = b.payload)) { + if ('function' == typeof (g = E.payload)) { s = g.call(h, s, o); break e; } @@ -9539,7 +9537,7 @@ case 3: g.effectTag = (-4097 & g.effectTag) | 64; case 0: - if (null == (o = 'function' == typeof (g = b.payload) ? g.call(h, s, o) : g)) break e; + if (null == (o = 'function' == typeof (g = E.payload) ? g.call(h, s, o) : g)) break e; s = r({}, s, o); break e; case 2: @@ -9557,7 +9555,7 @@ null === p ? (m = s) : (p.next = d), (l.baseState = m), (l.baseQueue = p), - _c(u), + xc(u), (e.expirationTime = u), (e.memoizedState = s); } @@ -9573,9 +9571,9 @@ } } } - var gl = Y.ReactCurrentBatchConfig, - bl = new a.Component().refs; - function El(e, t, n, a) { + var gl = $.ReactCurrentBatchConfig, + El = new a.Component().refs; + function bl(e, t, n, a) { (n = null == (n = n(a, (t = e.memoizedState))) ? t : r({}, t, n)), (e.memoizedState = n), 0 === e.expirationTime && (e.updateQueue.baseState = n); @@ -9610,16 +9608,16 @@ function yl(e, t, n, a, r, l, i) { return 'function' == typeof (e = e.stateNode).shouldComponentUpdate ? e.shouldComponentUpdate(a, l, i) - : !(t.prototype && t.prototype.isPureReactComponent && Va(n, a) && Va(r, l)); + : !(t.prototype && t.prototype.isPureReactComponent && Ua(n, a) && Ua(r, l)); } - function _l(e, t, n) { + function xl(e, t, n) { var a = !1, r = fr, l = t.contextType; return ( 'object' == typeof l && null !== l ? (l = ol(l)) - : ((r = vr(t) ? br : hr.current), (l = (a = null != (a = t.contextTypes)) ? Er(e, r) : fr)), + : ((r = vr(t) ? Er : hr.current), (l = (a = null != (a = t.contextTypes)) ? br(e, r) : fr)), (t = new t(n, l)), (e.memoizedState = null !== t.state && void 0 !== t.state ? t.state : null), (t.updater = vl), @@ -9631,7 +9629,7 @@ t ); } - function xl(e, t, n, a) { + function _l(e, t, n, a) { (e = t.state), 'function' == typeof t.componentWillReceiveProps && t.componentWillReceiveProps(n, a), 'function' == typeof t.UNSAFE_componentWillReceiveProps && t.UNSAFE_componentWillReceiveProps(n, a), @@ -9639,14 +9637,14 @@ } function wl(e, t, n, a) { var r = e.stateNode; - (r.props = n), (r.state = e.memoizedState), (r.refs = bl), sl(e); + (r.props = n), (r.state = e.memoizedState), (r.refs = El), sl(e); var l = t.contextType; 'object' == typeof l && null !== l ? (r.context = ol(l)) - : ((l = vr(t) ? br : hr.current), (r.context = Er(e, l))), + : ((l = vr(t) ? Er : hr.current), (r.context = br(e, l))), fl(e, n, r, a), (r.state = e.memoizedState), - 'function' == typeof (l = t.getDerivedStateFromProps) && (El(e, t, l, n), (r.state = e.memoizedState)), + 'function' == typeof (l = t.getDerivedStateFromProps) && (bl(e, t, l, n), (r.state = e.memoizedState)), 'function' == typeof t.getDerivedStateFromProps || 'function' == typeof r.getSnapshotBeforeUpdate || ('function' != typeof r.UNSAFE_componentWillMount && 'function' != typeof r.componentWillMount) || @@ -9659,7 +9657,7 @@ 'function' == typeof r.componentDidMount && (e.effectTag |= 4); } var kl = Array.isArray; - function Tl(e, t, n) { + function Nl(e, t, n) { if (null !== (e = n.ref) && 'function' != typeof e && 'object' != typeof e) { if (n._owner) { if ((n = n._owner)) { @@ -9672,7 +9670,7 @@ ? t.ref : ((t = function (e) { var t = a.refs; - t === bl && (t = a.refs = {}), null === e ? delete t[r] : (t[r] = e); + t === El && (t = a.refs = {}), null === e ? delete t[r] : (t[r] = e); }), (t._stringRef = r), t); @@ -9682,7 +9680,7 @@ } return e; } - function Nl(e, t) { + function Tl(e, t) { if ('textarea' !== e.type) throw Error( i( @@ -9737,8 +9735,8 @@ } function s(e, t, n, a) { return null !== t && t.elementType === n.type - ? (((a = r(t, n.props)).ref = Tl(e, t, n)), (a.return = e), a) - : (((a = Uc(n.type, n.key, n.props, null, e.mode, a)).ref = Tl(e, t, n)), (a.return = e), a); + ? (((a = r(t, n.props)).ref = Nl(e, t, n)), (a.return = e), a) + : (((a = Vc(n.type, n.key, n.props, null, e.mode, a)).ref = Nl(e, t, n)), (a.return = e), a); } function u(e, t, n, a) { return null === t || @@ -9750,7 +9748,7 @@ } function m(e, t, n, a, l) { return null === t || 7 !== t.tag - ? (((t = Vc(n, e.mode, a, l)).return = e), t) + ? (((t = Uc(n, e.mode, a, l)).return = e), t) : (((t = r(t, n)).return = e), t); } function d(e, t, n) { @@ -9758,12 +9756,12 @@ if ('object' == typeof t && null !== t) { switch (t.$$typeof) { case ee: - return ((n = Uc(t.type, t.key, t.props, null, e.mode, n)).ref = Tl(e, null, t)), (n.return = e), n; + return ((n = Vc(t.type, t.key, t.props, null, e.mode, n)).ref = Nl(e, null, t)), (n.return = e), n; case te: return ((t = Hc(t, e.mode, n)).return = e), t; } - if (kl(t) || he(t)) return ((t = Vc(t, e.mode, n, null)).return = e), t; - Nl(e, t); + if (kl(t) || he(t)) return ((t = Uc(t, e.mode, n, null)).return = e), t; + Tl(e, t); } return null; } @@ -9778,7 +9776,7 @@ return n.key === r ? u(e, t, n, a) : null; } if (kl(n) || he(n)) return null !== r ? null : m(e, t, n, a, null); - Nl(e, n); + Tl(e, n); } return null; } @@ -9795,22 +9793,22 @@ return u(t, (e = e.get(null === a.key ? n : a.key) || null), a, r); } if (kl(a) || he(a)) return m(t, (e = e.get(n) || null), a, r, null); - Nl(t, a); + Tl(t, a); } return null; } function h(r, i, o, c) { for (var s = null, u = null, m = i, h = (i = 0), g = null; null !== m && h < o.length; h++) { m.index > h ? ((g = m), (m = null)) : (g = m.sibling); - var b = p(r, m, o[h], c); - if (null === b) { + var E = p(r, m, o[h], c); + if (null === E) { null === m && (m = g); break; } - e && m && null === b.alternate && t(r, m), - (i = l(b, i, h)), - null === u ? (s = b) : (u.sibling = b), - (u = b), + e && m && null === E.alternate && t(r, m), + (i = l(E, i, h)), + null === u ? (s = E) : (u.sibling = E), + (u = E), (m = g); } if (h === o.length) return n(r, m), s; @@ -9838,34 +9836,34 @@ if ('function' != typeof u) throw Error(i(150)); if (null == (c = u.call(c))) throw Error(i(151)); for ( - var m = (u = null), h = o, g = (o = 0), b = null, E = c.next(); - null !== h && !E.done; - g++, E = c.next() + var m = (u = null), h = o, g = (o = 0), E = null, b = c.next(); + null !== h && !b.done; + g++, b = c.next() ) { - h.index > g ? ((b = h), (h = null)) : (b = h.sibling); - var v = p(r, h, E.value, s); + h.index > g ? ((E = h), (h = null)) : (E = h.sibling); + var v = p(r, h, b.value, s); if (null === v) { - null === h && (h = b); + null === h && (h = E); break; } e && h && null === v.alternate && t(r, h), (o = l(v, o, g)), null === m ? (u = v) : (m.sibling = v), (m = v), - (h = b); + (h = E); } - if (E.done) return n(r, h), u; + if (b.done) return n(r, h), u; if (null === h) { - for (; !E.done; g++, E = c.next()) - null !== (E = d(r, E.value, s)) && ((o = l(E, o, g)), null === m ? (u = E) : (m.sibling = E), (m = E)); + for (; !b.done; g++, b = c.next()) + null !== (b = d(r, b.value, s)) && ((o = l(b, o, g)), null === m ? (u = b) : (m.sibling = b), (m = b)); return u; } - for (h = a(r, h); !E.done; g++, E = c.next()) - null !== (E = f(h, r, g, E.value, s)) && - (e && null !== E.alternate && h.delete(null === E.key ? g : E.key), - (o = l(E, o, g)), - null === m ? (u = E) : (m.sibling = E), - (m = E)); + for (h = a(r, h); !b.done; g++, b = c.next()) + null !== (b = f(h, r, g, b.value, s)) && + (e && null !== b.alternate && h.delete(null === b.key ? g : b.key), + (o = l(b, o, g)), + null === m ? (u = b) : (m.sibling = b), + (m = b)); return ( e && h.forEach(function (e) { @@ -9890,7 +9888,7 @@ break e; } } else if (s.elementType === l.type) { - n(e, s.sibling), ((a = r(s, l.props)).ref = Tl(e, s, l)), (a.return = e), (e = a); + n(e, s.sibling), ((a = r(s, l.props)).ref = Nl(e, s, l)), (a.return = e), (e = a); break e; } n(e, s); @@ -9899,8 +9897,8 @@ t(e, s), (s = s.sibling); } l.type === ne - ? (((a = Vc(l.props.children, e.mode, c, l.key)).return = e), (e = a)) - : (((c = Uc(l.type, l.key, l.props, null, e.mode, c)).ref = Tl(e, a, l)), + ? (((a = Uc(l.props.children, e.mode, c, l.key)).return = e), (e = a)) + : (((c = Vc(l.type, l.key, l.props, null, e.mode, c)).ref = Nl(e, a, l)), (c.return = e), (e = c)); } @@ -9936,7 +9934,7 @@ ); if (kl(l)) return h(e, a, l, c); if (he(l)) return g(e, a, l, c); - if ((u && Nl(e, l), void 0 === l && !s)) + if ((u && Tl(e, l), void 0 === l && !s)) switch (e.tag) { case 1: case 0: @@ -9947,16 +9945,16 @@ } var Cl = Sl(!0), Fl = Sl(!1), - Rl = {}, - Ol = { current: Rl }, - Al = { current: Rl }, - Il = { current: Rl }; + Il = {}, + Rl = { current: Il }, + Al = { current: Il }, + Ol = { current: Il }; function Dl(e) { - if (e === Rl) throw Error(i(174)); + if (e === Il) throw Error(i(174)); return e; } function jl(e, t) { - switch ((pr(Il, t), pr(Al, e), pr(Ol, Rl), (e = t.nodeType))) { + switch ((pr(Ol, t), pr(Al, e), pr(Rl, Il), (e = t.nodeType))) { case 9: case 11: t = (t = t.documentElement) ? t.namespaceURI : je(null, ''); @@ -9964,26 +9962,26 @@ default: t = je((t = (e = 8 === e ? t.parentNode : t).namespaceURI || null), (e = e.tagName)); } - dr(Ol), pr(Ol, t); + dr(Rl), pr(Rl, t); } function Ll() { - dr(Ol), dr(Al), dr(Il); + dr(Rl), dr(Al), dr(Ol); } function Pl(e) { - Dl(Il.current); - var t = Dl(Ol.current), + Dl(Ol.current); + var t = Dl(Rl.current), n = je(t, e.type); - t !== n && (pr(Al, e), pr(Ol, n)); + t !== n && (pr(Al, e), pr(Rl, n)); } function Ml(e) { - Al.current === e && (dr(Ol), dr(Al)); + Al.current === e && (dr(Rl), dr(Al)); } var zl = { current: 0 }; function Bl(e) { for (var t = e; null !== t; ) { if (13 === t.tag) { var n = t.memoizedState; - if (null !== n && (null === (n = n.dehydrated) || n.data === bn || n.data === En)) return t; + if (null !== n && (null === (n = n.dehydrated) || n.data === En || n.data === bn)) return t; } else if (19 === t.tag && void 0 !== t.memoizedProps.revealOrder) { if (64 & t.effectTag) return t; } else if (null !== t.child) { @@ -10002,17 +10000,17 @@ function ql(e, t) { return { responder: e, props: t }; } - var Ul = Y.ReactCurrentDispatcher, - Vl = Y.ReactCurrentBatchConfig, + var Vl = $.ReactCurrentDispatcher, + Ul = $.ReactCurrentBatchConfig, Kl = 0, Hl = null, Gl = null, Wl = null, Xl = !1; - function $l() { + function Yl() { throw Error(i(321)); } - function Yl(e, t) { + function $l(e, t) { if (null === t) return !1; for (var n = 0; n < t.length && n < e.length; n++) if (!qa(e[n], t[n])) return !1; return !0; @@ -10024,17 +10022,17 @@ (t.memoizedState = null), (t.updateQueue = null), (t.expirationTime = 0), - (Ul.current = null === e || null === e.memoizedState ? yi : _i), + (Vl.current = null === e || null === e.memoizedState ? yi : xi), (e = n(a, r)), t.expirationTime === Kl) ) { l = 0; do { if (((t.expirationTime = 0), !(25 > l))) throw Error(i(301)); - (l += 1), (Wl = Gl = null), (t.updateQueue = null), (Ul.current = xi), (e = n(a, r)); + (l += 1), (Wl = Gl = null), (t.updateQueue = null), (Vl.current = _i), (e = n(a, r)); } while (t.expirationTime === Kl); } - if (((Ul.current = vi), (t = null !== Gl && null !== Gl.next), (Kl = 0), (Wl = Gl = Hl = null), (Xl = !1), t)) + if (((Vl.current = vi), (t = null !== Gl && null !== Gl.next), (Kl = 0), (Wl = Gl = Hl = null), (Xl = !1), t)) throw Error(i(300)); return e; } @@ -10096,7 +10094,7 @@ next: null, }; null === c ? ((o = c = m), (l = a)) : (c = c.next = m), - u > Hl.expirationTime && ((Hl.expirationTime = u), _c(u)); + u > Hl.expirationTime && ((Hl.expirationTime = u), xc(u)); } else null !== c && (c = c.next = @@ -10113,7 +10111,7 @@ s = s.next; } while (null !== s && s !== r); null === c ? (l = a) : (c.next = o), - qa(a, t.memoizedState) || (Ii = !0), + qa(a, t.memoizedState) || (Oi = !0), (t.memoizedState = a), (t.baseState = l), (t.baseQueue = c), @@ -10135,7 +10133,7 @@ do { (l = e(l, o.action)), (o = o.next); } while (o !== r); - qa(l, t.memoizedState) || (Ii = !0), + qa(l, t.memoizedState) || (Oi = !0), (t.memoizedState = l), null === t.baseQueue && (t.baseState = l), (n.lastRenderedState = l); @@ -10149,7 +10147,7 @@ (t.memoizedState = t.baseState = e), (e = (e = t.queue = { pending: null, dispatch: null, lastRenderedReducer: ei, lastRenderedState: e }).dispatch = - Ei.bind(null, Hl, e)), + bi.bind(null, Hl, e)), [t.memoizedState, e] ); } @@ -10177,7 +10175,7 @@ var l = void 0; if (null !== Gl) { var i = Gl.memoizedState; - if (((l = i.destroy), null !== a && Yl(a, i.deps))) return void ri(t, n, l, a); + if (((l = i.destroy), null !== a && $l(a, i.deps))) return void ri(t, n, l, a); } (Hl.effectTag |= e), (r.memoizedState = ri(1 | t, n, l, a)); } @@ -10216,30 +10214,30 @@ var n = Jl(); t = void 0 === t ? null : t; var a = n.memoizedState; - return null !== a && null !== t && Yl(t, a[1]) ? a[0] : ((n.memoizedState = [e, t]), e); + return null !== a && null !== t && $l(t, a[1]) ? a[0] : ((n.memoizedState = [e, t]), e); } function gi(e, t) { var n = Jl(); t = void 0 === t ? null : t; var a = n.memoizedState; - return null !== a && null !== t && Yl(t, a[1]) ? a[0] : ((e = e()), (n.memoizedState = [e, t]), e); + return null !== a && null !== t && $l(t, a[1]) ? a[0] : ((e = e()), (n.memoizedState = [e, t]), e); } - function bi(e, t, n) { + function Ei(e, t, n) { var a = Kr(); Gr(98 > a ? 98 : a, function () { e(!0); }), Gr(97 < a ? 97 : a, function () { - var a = Vl.suspense; - Vl.suspense = void 0 === t ? null : t; + var a = Ul.suspense; + Ul.suspense = void 0 === t ? null : t; try { e(!1), n(); } finally { - Vl.suspense = a; + Ul.suspense = a; } }); } - function Ei(e, t, n) { + function bi(e, t, n) { var a = oc(), r = gl.suspense; r = { @@ -10274,19 +10272,19 @@ } var vi = { readContext: ol, - useCallback: $l, - useContext: $l, - useEffect: $l, - useImperativeHandle: $l, - useLayoutEffect: $l, - useMemo: $l, - useReducer: $l, - useRef: $l, - useState: $l, - useDebugValue: $l, - useResponder: $l, - useDeferredValue: $l, - useTransition: $l, + useCallback: Yl, + useContext: Yl, + useEffect: Yl, + useImperativeHandle: Yl, + useLayoutEffect: Yl, + useMemo: Yl, + useReducer: Yl, + useRef: Yl, + useState: Yl, + useDebugValue: Yl, + useResponder: Yl, + useDeferredValue: Yl, + useTransition: Yl, }, yi = { readContext: ol, @@ -10310,7 +10308,7 @@ (a.memoizedState = a.baseState = t), (e = (e = a.queue = { pending: null, dispatch: null, lastRenderedReducer: e, lastRenderedState: t }).dispatch = - Ei.bind(null, Hl, e)), + bi.bind(null, Hl, e)), [a.memoizedState, e] ); }, @@ -10327,12 +10325,12 @@ return ( ci( function () { - var n = Vl.suspense; - Vl.suspense = void 0 === t ? null : t; + var n = Ul.suspense; + Ul.suspense = void 0 === t ? null : t; try { r(e); } finally { - Vl.suspense = n; + Ul.suspense = n; } }, [e, t] @@ -10343,10 +10341,10 @@ useTransition: function (e) { var t = ai(!1), n = t[0]; - return (t = t[1]), [fi(bi.bind(null, t, e), [t, e]), n]; + return (t = t[1]), [fi(Ei.bind(null, t, e), [t, e]), n]; }, }, - _i = { + xi = { readContext: ol, useCallback: hi, useContext: ol, @@ -10368,12 +10366,12 @@ return ( si( function () { - var n = Vl.suspense; - Vl.suspense = void 0 === t ? null : t; + var n = Ul.suspense; + Ul.suspense = void 0 === t ? null : t; try { r(e); } finally { - Vl.suspense = n; + Ul.suspense = n; } }, [e, t] @@ -10384,10 +10382,10 @@ useTransition: function (e) { var t = ti(ei), n = t[0]; - return (t = t[1]), [hi(bi.bind(null, t, e), [t, e]), n]; + return (t = t[1]), [hi(Ei.bind(null, t, e), [t, e]), n]; }, }, - xi = { + _i = { readContext: ol, useCallback: hi, useContext: ol, @@ -10409,12 +10407,12 @@ return ( si( function () { - var n = Vl.suspense; - Vl.suspense = void 0 === t ? null : t; + var n = Ul.suspense; + Ul.suspense = void 0 === t ? null : t; try { r(e); } finally { - Vl.suspense = n; + Ul.suspense = n; } }, [e, t] @@ -10425,13 +10423,13 @@ useTransition: function (e) { var t = ni(ei), n = t[0]; - return (t = t[1]), [hi(bi.bind(null, t, e), [t, e]), n]; + return (t = t[1]), [hi(Ei.bind(null, t, e), [t, e]), n]; }, }, wi = null, ki = null, - Ti = !1; - function Ni(e, t) { + Ni = !1; + function Ti(e, t) { var n = zc(5, null, null, 0); (n.elementType = 'DELETED'), (n.type = 'DELETED'), @@ -10457,29 +10455,29 @@ } } function Ci(e) { - if (Ti) { + if (Ni) { var t = ki; if (t) { var n = t; if (!Si(e, t)) { - if (!(t = Tn(n.nextSibling)) || !Si(e, t)) - return (e.effectTag = (-1025 & e.effectTag) | 2), (Ti = !1), void (wi = e); - Ni(wi, n); + if (!(t = Nn(n.nextSibling)) || !Si(e, t)) + return (e.effectTag = (-1025 & e.effectTag) | 2), (Ni = !1), void (wi = e); + Ti(wi, n); } - (wi = e), (ki = Tn(t.firstChild)); - } else (e.effectTag = (-1025 & e.effectTag) | 2), (Ti = !1), (wi = e); + (wi = e), (ki = Nn(t.firstChild)); + } else (e.effectTag = (-1025 & e.effectTag) | 2), (Ni = !1), (wi = e); } } function Fi(e) { for (e = e.return; null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag; ) e = e.return; wi = e; } - function Ri(e) { + function Ii(e) { if (e !== wi) return !1; - if (!Ti) return Fi(e), (Ti = !0), !1; + if (!Ni) return Fi(e), (Ni = !0), !1; var t = e.type; - if (5 !== e.tag || ('head' !== t && 'body' !== t && !xn(t, e.memoizedProps))) - for (t = ki; t; ) Ni(e, t), (t = Tn(t.nextSibling)); + if (5 !== e.tag || ('head' !== t && 'body' !== t && !_n(t, e.memoizedProps))) + for (t = ki; t; ) Ti(e, t), (t = Nn(t.nextSibling)); if ((Fi(e), 13 === e.tag)) { if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null)) throw Error(i(317)); e: { @@ -10488,24 +10486,24 @@ var n = e.data; if (n === gn) { if (0 === t) { - ki = Tn(e.nextSibling); + ki = Nn(e.nextSibling); break e; } t--; - } else (n !== hn && n !== En && n !== bn) || t++; + } else (n !== hn && n !== bn && n !== En) || t++; } e = e.nextSibling; } ki = null; } - } else ki = wi ? Tn(e.stateNode.nextSibling) : null; + } else ki = wi ? Nn(e.stateNode.nextSibling) : null; return !0; } - function Oi() { - (ki = wi = null), (Ti = !1); + function Ri() { + (ki = wi = null), (Ni = !1); } - var Ai = Y.ReactCurrentOwner, - Ii = !1; + var Ai = $.ReactCurrentOwner, + Oi = !1; function Di(e, t, n, a) { t.child = null === e ? Fl(t, null, n, a) : Cl(t, e.child, n, a); } @@ -10515,7 +10513,7 @@ return ( il(t, r), (a = Ql(e, t, n, a, l, r)), - null === e || Ii + null === e || Oi ? ((t.effectTag |= 1), Di(e, t, a, r), t.child) : ((t.updateQueue = e.updateQueue), (t.effectTag &= -517), @@ -10531,18 +10529,18 @@ void 0 !== i.defaultProps || null !== n.compare || void 0 !== n.defaultProps - ? (((e = Uc(n.type, null, a, null, t.mode, l)).ref = t.ref), (e.return = t), (t.child = e)) + ? (((e = Vc(n.type, null, a, null, t.mode, l)).ref = t.ref), (e.return = t), (t.child = e)) : ((t.tag = 15), (t.type = i), Pi(e, t, i, a, r, l)); } return ( (i = e.child), - r < l && ((r = i.memoizedProps), (n = null !== (n = n.compare) ? n : Va)(r, a) && e.ref === t.ref) + r < l && ((r = i.memoizedProps), (n = null !== (n = n.compare) ? n : Ua)(r, a) && e.ref === t.ref) ? Zi(e, t, l) : ((t.effectTag |= 1), ((e = qc(i, a)).ref = t.ref), (e.return = t), (t.child = e)) ); } function Pi(e, t, n, a, r, l) { - return null !== e && Va(e.memoizedProps, a) && e.ref === t.ref && ((Ii = !1), r < l) + return null !== e && Ua(e.memoizedProps, a) && e.ref === t.ref && ((Oi = !1), r < l) ? ((t.expirationTime = e.expirationTime), Zi(e, t, l)) : zi(e, t, n, a, l); } @@ -10551,12 +10549,12 @@ ((null === e && null !== n) || (null !== e && e.ref !== n)) && (t.effectTag |= 128); } function zi(e, t, n, a, r) { - var l = vr(n) ? br : hr.current; + var l = vr(n) ? Er : hr.current; return ( - (l = Er(t, l)), + (l = br(t, l)), il(t, r), (n = Ql(e, t, n, a, l, r)), - null === e || Ii + null === e || Oi ? ((t.effectTag |= 1), Di(e, t, n, r), t.child) : ((t.updateQueue = e.updateQueue), (t.effectTag &= -517), @@ -10571,7 +10569,7 @@ } else l = !1; if ((il(t, r), null === t.stateNode)) null !== e && ((e.alternate = null), (t.alternate = null), (t.effectTag |= 2)), - _l(t, n, a), + xl(t, n, a), wl(t, n, a, r), (a = !0); else if (null === e) { @@ -10580,20 +10578,20 @@ i.props = o; var c = i.context, s = n.contextType; - s = 'object' == typeof s && null !== s ? ol(s) : Er(t, (s = vr(n) ? br : hr.current)); + s = 'object' == typeof s && null !== s ? ol(s) : br(t, (s = vr(n) ? Er : hr.current)); var u = n.getDerivedStateFromProps, m = 'function' == typeof u || 'function' == typeof i.getSnapshotBeforeUpdate; m || ('function' != typeof i.UNSAFE_componentWillReceiveProps && 'function' != typeof i.componentWillReceiveProps) || - ((o !== a || c !== s) && xl(t, i, a, s)), + ((o !== a || c !== s) && _l(t, i, a, s)), (cl = !1); var d = t.memoizedState; (i.state = d), fl(t, a, i, r), (c = t.memoizedState), o !== a || d !== c || gr.current || cl - ? ('function' == typeof u && (El(t, n, u, a), (c = t.memoizedState)), + ? ('function' == typeof u && (bl(t, n, u, a), (c = t.memoizedState)), (o = cl || yl(t, n, o, a, d, c, s)) ? (m || ('function' != typeof i.UNSAFE_componentWillMount && @@ -10615,20 +10613,20 @@ (o = t.memoizedProps), (i.props = t.type === t.elementType ? o : Zr(t.type, o)), (c = i.context), - (s = 'object' == typeof (s = n.contextType) && null !== s ? ol(s) : Er(t, (s = vr(n) ? br : hr.current))), + (s = 'object' == typeof (s = n.contextType) && null !== s ? ol(s) : br(t, (s = vr(n) ? Er : hr.current))), (m = 'function' == typeof (u = n.getDerivedStateFromProps) || 'function' == typeof i.getSnapshotBeforeUpdate) || ('function' != typeof i.UNSAFE_componentWillReceiveProps && 'function' != typeof i.componentWillReceiveProps) || - ((o !== a || c !== s) && xl(t, i, a, s)), + ((o !== a || c !== s) && _l(t, i, a, s)), (cl = !1), (c = t.memoizedState), (i.state = c), fl(t, a, i, r), (d = t.memoizedState), o !== a || c !== d || gr.current || cl - ? ('function' == typeof u && (El(t, n, u, a), (d = t.memoizedState)), + ? ('function' == typeof u && (bl(t, n, u, a), (d = t.memoizedState)), (u = cl || yl(t, n, o, a, c, d, s)) ? (m || ('function' != typeof i.UNSAFE_componentWillUpdate && @@ -10672,14 +10670,14 @@ t.child ); } - function Ui(e) { + function Vi(e) { var t = e.stateNode; t.pendingContext - ? _r(0, t.pendingContext, t.pendingContext !== t.context) - : t.context && _r(0, t.context, !1), + ? xr(0, t.pendingContext, t.pendingContext !== t.context) + : t.context && xr(0, t.context, !1), jl(e, t.containerInfo); } - var Vi, + var Ui, Ki, Hi, Gi, @@ -10702,10 +10700,10 @@ null === e) ) { if ((void 0 !== l.fallback && Ci(t), o)) { - if (((o = l.fallback), ((l = Vc(null, r, 0, null)).return = t), !(2 & t.mode))) + if (((o = l.fallback), ((l = Uc(null, r, 0, null)).return = t), !(2 & t.mode))) for (e = null !== t.memoizedState ? t.child.child : t.child, l.child = e; null !== e; ) (e.return = l), (e = e.sibling); - return ((n = Vc(o, r, n, null)).return = t), (l.sibling = n), (t.memoizedState = Wi), (t.child = l), n; + return ((n = Uc(o, r, n, null)).return = t), (l.sibling = n), (t.memoizedState = Wi), (t.child = l), n; } return (r = l.children), (t.memoizedState = null), (t.child = Fl(t, null, r, n)); } @@ -10731,7 +10729,7 @@ if (((e = e.child), o)) { if ( ((o = l.fallback), - ((l = Vc(null, r, 0, null)).return = t), + ((l = Uc(null, r, 0, null)).return = t), (l.child = e), null !== e && (e.return = l), !(2 & t.mode)) @@ -10739,7 +10737,7 @@ for (e = null !== t.memoizedState ? t.child.child : t.child, l.child = e; null !== e; ) (e.return = l), (e = e.sibling); return ( - ((n = Vc(o, r, n, null)).return = t), + ((n = Uc(o, r, n, null)).return = t), (l.sibling = n), (n.effectTag |= 2), (l.childExpirationTime = 0), @@ -10750,12 +10748,12 @@ } return (t.memoizedState = null), (t.child = Cl(t, e, l.children, n)); } - function $i(e, t) { + function Yi(e, t) { e.expirationTime < t && (e.expirationTime = t); var n = e.alternate; null !== n && n.expirationTime < t && (n.expirationTime = t), ll(e.return, t); } - function Yi(e, t, n, a, r, l) { + function $i(e, t, n, a, r, l) { var i = e.memoizedState; null === i ? (e.memoizedState = { @@ -10785,8 +10783,8 @@ else { if (null !== e && 64 & e.effectTag) e: for (e = t.child; null !== e; ) { - if (13 === e.tag) null !== e.memoizedState && $i(e, n); - else if (19 === e.tag) $i(e, n); + if (13 === e.tag) null !== e.memoizedState && Yi(e, n); + else if (19 === e.tag) Yi(e, n); else if (null !== e.child) { (e.child.return = e), (e = e.child); continue; @@ -10806,7 +10804,7 @@ for (n = t.child, r = null; null !== n; ) null !== (e = n.alternate) && null === Bl(e) && (r = n), (n = n.sibling); null === (n = r) ? ((r = t.child), (t.child = null)) : ((r = n.sibling), (n.sibling = null)), - Yi(t, !1, r, n, l, t.lastEffect); + $i(t, !1, r, n, l, t.lastEffect); break; case 'backwards': for (n = null, r = t.child, t.child = null; null !== r; ) { @@ -10816,10 +10814,10 @@ } (e = r.sibling), (r.sibling = n), (n = r), (r = e); } - Yi(t, !0, n, null, l, t.lastEffect); + $i(t, !0, n, null, l, t.lastEffect); break; case 'together': - Yi(t, !1, null, null, void 0, t.lastEffect); + $i(t, !1, null, null, void 0, t.lastEffect); break; default: t.memoizedState = null; @@ -10830,7 +10828,7 @@ function Zi(e, t, n) { null !== e && (t.dependencies = e.dependencies); var a = t.expirationTime; - if ((0 !== a && _c(a), t.childExpirationTime < n)) return null; + if ((0 !== a && xc(a), t.childExpirationTime < n)) return null; if (null !== e && t.child !== e.child) throw Error(i(153)); if (null !== t.child) { for (n = qc((e = t.child), e.pendingProps), t.child = n, n.return = t; null !== e.sibling; ) @@ -10875,12 +10873,12 @@ dr(gr), dr(hr), (n = t.stateNode).pendingContext && ((n.context = n.pendingContext), (n.pendingContext = null)), - (null !== e && null !== e.child) || !Ri(t) || (t.effectTag |= 4), + (null !== e && null !== e.child) || !Ii(t) || (t.effectTag |= 4), Ki(t), null ); case 5: - Ml(t), (n = Dl(Il.current)); + Ml(t), (n = Dl(Ol.current)); var l = t.type; if (null !== e && null != t.stateNode) Hi(e, t, l, a, n), e.ref !== t.ref && (t.effectTag |= 128); else { @@ -10888,7 +10886,7 @@ if (null === t.stateNode) throw Error(i(166)); return null; } - if (((e = Dl(Ol.current)), Ri(t))) { + if (((e = Dl(Rl.current)), Ii(t))) { (a = t.stateNode), (l = t.type); var o = t.memoizedProps; switch (((a[Cn] = t), (a[Fn] = o), l)) { @@ -10899,7 +10897,7 @@ break; case 'video': case 'audio': - for (e = 0; e < $e.length; e++) Gt($e[e], a); + for (e = 0; e < Ye.length; e++) Gt(Ye[e], a); break; case 'source': Gt('error', a); @@ -10922,7 +10920,7 @@ (a._wrapperState = { wasMultiple: !!o.multiple }), Gt('invalid', a), on(n, 'onChange'); break; case 'textarea': - Oe(a, o), Gt('invalid', a), on(n, 'onChange'); + Re(a, o), Gt('invalid', a), on(n, 'onChange'); } for (var c in (an(l, o), (e = null), o)) if (o.hasOwnProperty(c)) { @@ -10935,10 +10933,10 @@ } switch (l) { case 'input': - ye(a), Ne(a, o, !0); + ye(a), Te(a, o, !0); break; case 'textarea': - ye(a), Ie(a); + ye(a), Oe(a); break; case 'select': case 'option': @@ -10962,7 +10960,7 @@ : (e = c.createElementNS(e, l)), (e[Cn] = t), (e[Fn] = a), - Vi(e, t, !1, !1), + Ui(e, t, !1, !1), (t.stateNode = e), (c = rn(l, a)), l) @@ -10974,7 +10972,7 @@ break; case 'video': case 'audio': - for (s = 0; s < $e.length; s++) Gt($e[s], e); + for (s = 0; s < Ye.length; s++) Gt(Ye[s], e); s = a; break; case 'source': @@ -10992,7 +10990,7 @@ Gt('toggle', e), (s = a); break; case 'input': - we(e, a), (s = xe(e, a)), Gt('invalid', e), on(n, 'onChange'); + we(e, a), (s = _e(e, a)), Gt('invalid', e), on(n, 'onChange'); break; case 'option': s = Ce(e, a); @@ -11004,7 +11002,7 @@ on(n, 'onChange'); break; case 'textarea': - Oe(e, a), (s = Re(e, a)), Gt('invalid', e), on(n, 'onChange'); + Re(e, a), (s = Ie(e, a)), Gt('invalid', e), on(n, 'onChange'); break; default: s = a; @@ -11029,13 +11027,13 @@ } switch (l) { case 'input': - ye(e), Ne(e, a, !1); + ye(e), Te(e, a, !1); break; case 'textarea': - ye(e), Ie(e); + ye(e), Oe(e); break; case 'option': - null != a.value && e.setAttribute('value', '' + Ee(a.value)); + null != a.value && e.setAttribute('value', '' + be(a.value)); break; case 'select': (e.multiple = !!a.multiple), @@ -11046,7 +11044,7 @@ default: 'function' == typeof s.onClick && (e.onclick = cn); } - _n(l, a) && (t.effectTag |= 4); + xn(l, a) && (t.effectTag |= 4); } null !== t.ref && (t.effectTag |= 128); } @@ -11055,9 +11053,9 @@ if (e && null != t.stateNode) Gi(e, t, e.memoizedProps, a); else { if ('string' != typeof a && null === t.stateNode) throw Error(i(166)); - (n = Dl(Il.current)), - Dl(Ol.current), - Ri(t) + (n = Dl(Ol.current)), + Dl(Rl.current), + Ii(t) ? ((n = t.stateNode), (a = t.memoizedProps), (n[Cn] = t), n.nodeValue !== a && (t.effectTag |= 4)) : (((n = (9 === n.nodeType ? n : n.ownerDocument).createTextNode(a))[Cn] = t), (t.stateNode = n)); } @@ -11071,7 +11069,7 @@ : ((n = null !== a), (a = !1), null === e - ? void 0 !== t.memoizedProps.fallback && Ri(t) + ? void 0 !== t.memoizedProps.fallback && Ii(t) : ((a = null !== (l = e.memoizedState)), n || null === l || @@ -11084,8 +11082,8 @@ !a && 2 & t.mode && ((null === e && !0 !== t.memoizedProps.unstable_avoidThisFallback) || 1 & zl.current - ? qo === Oo && (qo = Do) - : ((qo !== Oo && qo !== Do) || (qo = jo), 0 !== Go && null !== Mo && (Xc(Mo, Bo), $c(Mo, Go)))), + ? qo === Ro && (qo = Do) + : ((qo !== Ro && qo !== Do) || (qo = jo), 0 !== Go && null !== Mo && (Xc(Mo, Bo), Yc(Mo, Go)))), (n || a) && (t.effectTag |= 4), null) ); @@ -11097,7 +11095,7 @@ if ((dr(zl), null === (a = t.memoizedState))) return null; if (((l = !!(64 & t.effectTag)), null === (o = a.rendering))) { if (l) Ji(a, !1); - else if (qo !== Oo || (null !== e && 64 & e.effectTag)) + else if (qo !== Ro || (null !== e && 64 & e.effectTag)) for (o = t.child; null !== o; ) { if (null !== (e = Bl(o))) { for ( @@ -11155,7 +11153,7 @@ ) return null !== (t = t.lastEffect = a.lastEffect) && (t.nextEffect = null), null; } else - 2 * Vr() - a.renderingStartTime > a.tailExpiration && + 2 * Ur() - a.renderingStartTime > a.tailExpiration && 1 < n && ((t.effectTag |= 64), (l = !0), Ji(a, !1), (t.expirationTime = t.childExpirationTime = n - 1)); a.isBackwards @@ -11163,12 +11161,12 @@ : (null !== (n = a.last) ? (n.sibling = o) : (t.child = o), (a.last = o)); } return null !== a.tail - ? (0 === a.tailExpiration && (a.tailExpiration = Vr() + 500), + ? (0 === a.tailExpiration && (a.tailExpiration = Ur() + 500), (n = a.tail), (a.rendering = n), (a.tail = n.sibling), (a.lastEffect = t.lastEffect), - (a.renderingStartTime = Vr()), + (a.renderingStartTime = Ur()), (n.sibling = null), (t = zl.current), pr(zl, l ? (1 & t) | 2 : 1 & t), @@ -11201,9 +11199,9 @@ } } function no(e, t) { - return { value: e, source: t, stack: be(t) }; + return { value: e, source: t, stack: Ee(t) }; } - (Vi = function (e, t) { + (Ui = function (e, t) { for (var n = t.child; null !== n; ) { if (5 === n.tag || 6 === n.tag) e.appendChild(n.stateNode); else if (4 !== n.tag && null !== n.child) { @@ -11225,9 +11223,9 @@ var o, c, s = t.stateNode; - switch ((Dl(Ol.current), (e = null), n)) { + switch ((Dl(Rl.current), (e = null), n)) { case 'input': - (i = xe(s, i)), (a = xe(s, a)), (e = []); + (i = _e(s, i)), (a = _e(s, a)), (e = []); break; case 'option': (i = Ce(s, i)), (a = Ce(s, a)), (e = []); @@ -11236,7 +11234,7 @@ (i = r({}, i, { value: void 0 })), (a = r({}, a, { value: void 0 })), (e = []); break; case 'textarea': - (i = Re(s, i)), (a = Re(s, a)), (e = []); + (i = Ie(s, i)), (a = Ie(s, a)), (e = []); break; default: 'function' != typeof i.onClick && 'function' == typeof a.onClick && (s.onclick = cn); @@ -11282,7 +11280,7 @@ function ro(e, t) { var n = t.source, a = t.stack; - null === a && null !== n && (a = be(n)), + null === a && null !== n && (a = Ee(n)), null !== n && ge(n.type), (t = t.value), null !== e && 1 === e.tag && ge(e.type); @@ -11301,7 +11299,7 @@ try { t(null); } catch (t) { - Ic(e, t); + Oc(e, t); } else t.current = null; } @@ -11380,7 +11378,7 @@ return; case 5: return ( - (e = n.stateNode), void (null === t && 4 & n.effectTag && _n(n.type, n.memoizedProps) && e.focus()) + (e = n.stateNode), void (null === t && 4 & n.effectTag && xn(n.type, n.memoizedProps) && e.focus()) ); case 6: case 4: @@ -11417,7 +11415,7 @@ try { n(); } catch (e) { - Ic(r, e); + Oc(r, e); } } e = e.next; @@ -11432,7 +11430,7 @@ try { (t.props = e.memoizedProps), (t.state = e.memoizedState), t.componentWillUnmount(); } catch (t) { - Ic(e, t); + Oc(e, t); } })(t, n); break; @@ -11440,7 +11438,7 @@ lo(t); break; case 4: - bo(e, t, n); + Eo(e, t, n); } } function mo(e) { @@ -11525,7 +11523,7 @@ else if (4 !== a && null !== (e = e.child)) for (go(e, t, n), e = e.sibling; null !== e; ) go(e, t, n), (e = e.sibling); } - function bo(e, t, n) { + function Eo(e, t, n) { for (var a, r, l = t, o = !1; ; ) { if (!o) { o = l.return; @@ -11575,7 +11573,7 @@ (l.sibling.return = l.return), (l = l.sibling); } } - function Eo(e, t) { + function bo(e, t) { switch (t.tag) { case 0: case 11: @@ -11616,7 +11614,7 @@ } switch (e) { case 'input': - Te(n, a); + Ne(n, a); break; case 'textarea': Ae(n, a); @@ -11640,7 +11638,7 @@ case 3: return void ((t = t.stateNode).hydrate && ((t.hydrate = !1), jt(t.containerInfo))); case 13: - if (((n = t), null === t.memoizedState ? (a = !1) : ((a = !0), (n = t.child), (Xo = Vr())), null !== n)) + if (((n = t), null === t.memoizedState ? (a = !1) : ((a = !0), (n = t.child), (Xo = Ur())), null !== n)) e: for (e = n; ; ) { if (5 === e.tag) (l = e.stateNode), @@ -11688,7 +11686,7 @@ } } var yo = 'function' == typeof WeakMap ? WeakMap : Map; - function _o(e, t, n) { + function xo(e, t, n) { ((n = ml(n, null)).tag = 3), (n.payload = { element: null }); var a = t.value; return ( @@ -11698,7 +11696,7 @@ n ); } - function xo(e, t, n) { + function _o(e, t, n) { (n = ml(n, null)).tag = 3; var a = e.type.getDerivedStateFromError; if ('function' == typeof a) { @@ -11721,15 +11719,15 @@ } var wo, ko = Math.ceil, - To = Y.ReactCurrentDispatcher, - No = Y.ReactCurrentOwner, + No = $.ReactCurrentDispatcher, + To = $.ReactCurrentOwner, So = 0, Co = 8, Fo = 16, - Ro = 32, - Oo = 0, + Io = 32, + Ro = 0, Ao = 1, - Io = 2, + Oo = 2, Do = 3, jo = 4, Lo = 5, @@ -11737,16 +11735,16 @@ Mo = null, zo = null, Bo = 0, - qo = Oo, - Uo = null, - Vo = 1073741823, + qo = Ro, + Vo = null, + Uo = 1073741823, Ko = 1073741823, Ho = null, Go = 0, Wo = !1, Xo = 0, - $o = 500, - Yo = null, + Yo = 500, + $o = null, Qo = !1, Zo = null, Jo = null, @@ -11758,11 +11756,11 @@ lc = null, ic = 0; function oc() { - return (Po & (Fo | Ro)) !== So - ? 1073741821 - ((Vr() / 10) | 0) + return (Po & (Fo | Io)) !== So + ? 1073741821 - ((Ur() / 10) | 0) : 0 !== ic ? ic - : (ic = 1073741821 - ((Vr() / 10) | 0)); + : (ic = 1073741821 - ((Ur() / 10) | 0)); } function cc(e, t, n) { if (!(2 & (t = t.mode))) return 1073741823; @@ -11795,9 +11793,9 @@ if (null !== (e = uc(e, t))) { var n = Kr(); 1073741823 === t - ? (Po & Co) !== So && (Po & (Fo | Ro)) === So + ? (Po & Co) !== So && (Po & (Fo | Io)) === So ? fc(e) - : (dc(e), Po === So && $r()) + : (dc(e), Po === So && Yr()) : dc(e), (4 & Po) === So || (98 !== n && 99 !== n) || @@ -11824,7 +11822,7 @@ } a = a.return; } - return null !== r && (Mo === r && (_c(t), qo === jo && Xc(r, Bo)), $c(r, t)), r; + return null !== r && (Mo === r && (xc(t), qo === jo && Xc(r, Bo)), Yc(r, t)), r; } function mc(e) { var t = e.lastExpiredTime; @@ -11867,17 +11865,17 @@ (t = 1073741823 === t ? Xr(fc.bind(null, e)) - : Wr(a, pc.bind(null, e), { timeout: 10 * (1073741821 - t) - Vr() })), + : Wr(a, pc.bind(null, e), { timeout: 10 * (1073741821 - t) - Ur() })), (e.callbackNode = t); } } } function pc(e, t) { - if (((ic = 0), t)) return Yc(e, (t = oc())), dc(e), null; + if (((ic = 0), t)) return $c(e, (t = oc())), dc(e), null; var n = mc(e); if (0 !== n) { - if (((t = e.callbackNode), (Po & (Fo | Ro)) !== So)) throw Error(i(327)); - if ((Rc(), (e === Mo && n === Bo) || bc(e, n), null !== zo)) { + if (((t = e.callbackNode), (Po & (Fo | Io)) !== So)) throw Error(i(327)); + if ((Ic(), (e === Mo && n === Bo) || Ec(e, n), null !== zo)) { var a = Po; Po |= Fo; for (var r = vc(); ; ) @@ -11885,29 +11883,29 @@ wc(); break; } catch (t) { - Ec(e, t); + bc(e, t); } - if ((al(), (Po = a), (To.current = r), qo === Ao)) throw ((t = Uo), bc(e, n), Xc(e, n), dc(e), t); + if ((al(), (Po = a), (No.current = r), qo === Ao)) throw ((t = Vo), Ec(e, n), Xc(e, n), dc(e), t); if (null === zo) switch ( ((r = e.finishedWork = e.current.alternate), (e.finishedExpirationTime = n), (a = qo), (Mo = null), a) ) { - case Oo: + case Ro: case Ao: throw Error(i(345)); - case Io: - Yc(e, 2 < n ? 2 : n); + case Oo: + $c(e, 2 < n ? 2 : n); break; case Do: if ( (Xc(e, n), - n === (a = e.lastSuspendedTime) && (e.nextKnownPendingLevel = Nc(r)), - 1073741823 === Vo && 10 < (r = Xo + $o - Vr())) + n === (a = e.lastSuspendedTime) && (e.nextKnownPendingLevel = Tc(r)), + 1073741823 === Uo && 10 < (r = Xo + Yo - Ur())) ) { if (Wo) { var l = e.lastPingedTime; if (0 === l || l >= n) { - (e.lastPingedTime = n), bc(e, n); + (e.lastPingedTime = n), Ec(e, n); break; } } @@ -11924,10 +11922,10 @@ case jo: if ( (Xc(e, n), - n === (a = e.lastSuspendedTime) && (e.nextKnownPendingLevel = Nc(r)), + n === (a = e.lastSuspendedTime) && (e.nextKnownPendingLevel = Tc(r)), Wo && (0 === (r = e.lastPingedTime) || r >= n)) ) { - (e.lastPingedTime = n), bc(e, n); + (e.lastPingedTime = n), Ec(e, n); break; } if (0 !== (r = mc(e)) && r !== n) break; @@ -11937,11 +11935,11 @@ } if ( (1073741823 !== Ko - ? (a = 10 * (1073741821 - Ko) - Vr()) - : 1073741823 === Vo + ? (a = 10 * (1073741821 - Ko) - Ur()) + : 1073741823 === Uo ? (a = 0) - : ((a = 10 * (1073741821 - Vo) - 5e3), - 0 > (a = (r = Vr()) - a) && (a = 0), + : ((a = 10 * (1073741821 - Uo) - 5e3), + 0 > (a = (r = Ur()) - a) && (a = 0), (n = 10 * (1073741821 - n) - r) < (a = (120 > a @@ -11965,14 +11963,14 @@ Sc(e); break; case Lo: - if (1073741823 !== Vo && null !== Ho) { - l = Vo; + if (1073741823 !== Uo && null !== Ho) { + l = Uo; var o = Ho; if ( (0 >= (a = 0 | o.busyMinDurationMs) ? (a = 0) : ((r = 0 | o.busyDelayMs), - (a = (l = Vr() - (10 * (1073741821 - l) - (0 | o.timeoutMs || 5e3))) <= r ? 0 : r + a - l)), + (a = (l = Ur() - (10 * (1073741821 - l) - (0 | o.timeoutMs || 5e3))) <= r ? 0 : r + a - l)), 10 < a) ) { Xc(e, n), (e.timeoutHandle = wn(Sc.bind(null, e), a)); @@ -11991,18 +11989,18 @@ } function fc(e) { var t = e.lastExpiredTime; - if (((t = 0 !== t ? t : 1073741823), (Po & (Fo | Ro)) !== So)) throw Error(i(327)); - if ((Rc(), (e === Mo && t === Bo) || bc(e, t), null !== zo)) { + if (((t = 0 !== t ? t : 1073741823), (Po & (Fo | Io)) !== So)) throw Error(i(327)); + if ((Ic(), (e === Mo && t === Bo) || Ec(e, t), null !== zo)) { var n = Po; Po |= Fo; for (var a = vc(); ; ) try { - xc(); + _c(); break; } catch (t) { - Ec(e, t); + bc(e, t); } - if ((al(), (Po = n), (To.current = a), qo === Ao)) throw ((n = Uo), bc(e, t), Xc(e, t), dc(e), n); + if ((al(), (Po = n), (No.current = a), qo === Ao)) throw ((n = Vo), Ec(e, t), Xc(e, t), dc(e), n); if (null !== zo) throw Error(i(261)); (e.finishedWork = e.current.alternate), (e.finishedExpirationTime = t), (Mo = null), Sc(e), dc(e); } @@ -12014,7 +12012,7 @@ try { return e(t); } finally { - (Po = n) === So && $r(); + (Po = n) === So && Yr(); } } function gc(e, t) { @@ -12023,10 +12021,10 @@ try { return e(t); } finally { - (Po = n) === So && $r(); + (Po = n) === So && Yr(); } } - function bc(e, t) { + function Ec(e, t) { (e.finishedWork = null), (e.finishedExpirationTime = 0); var n = e.timeoutHandle; if ((-1 !== n && ((e.timeoutHandle = -1), kn(n)), null !== zo)) @@ -12057,23 +12055,23 @@ (Mo = e), (zo = qc(e.current, null)), (Bo = t), - (qo = Oo), - (Uo = null), - (Ko = Vo = 1073741823), + (qo = Ro), + (Vo = null), + (Ko = Uo = 1073741823), (Ho = null), (Go = 0), (Wo = !1); } - function Ec(e, t) { + function bc(e, t) { for (;;) { try { - if ((al(), (Ul.current = vi), Xl)) + if ((al(), (Vl.current = vi), Xl)) for (var n = Hl.memoizedState; null !== n; ) { var a = n.queue; null !== a && (a.pending = null), (n = n.next); } if (((Kl = 0), (Wl = Gl = Hl = null), (Xl = !1), null === zo || null === zo.return)) - return (qo = Ao), (Uo = t), (zo = null); + return (qo = Ao), (Vo = t), (zo = null); e: { var r = e, l = zo.return, @@ -12116,18 +12114,18 @@ if (((m.effectTag |= 64), (i.effectTag &= -2981), 1 === i.tag)) if (null === i.alternate) i.tag = 17; else { - var b = ml(1073741823, null); - (b.tag = 2), dl(i, b); + var E = ml(1073741823, null); + (E.tag = 2), dl(i, E); } i.expirationTime = 1073741823; break e; } (o = void 0), (i = t); - var E = r.pingCache; + var b = r.pingCache; if ( - (null === E - ? ((E = r.pingCache = new yo()), (o = new Set()), E.set(c, o)) - : void 0 === (o = E.get(c)) && ((o = new Set()), E.set(c, o)), + (null === b + ? ((b = r.pingCache = new yo()), (o = new Set()), b.set(c, o)) + : void 0 === (o = b.get(c)) && ((o = new Set()), b.set(c, o)), !o.has(i)) ) { o.add(i); @@ -12142,34 +12140,34 @@ o = Error( (ge(i.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display.' + - be(i) + Ee(i) ); } - qo !== Lo && (qo = Io), (o = no(o, i)), (m = l); + qo !== Lo && (qo = Oo), (o = no(o, i)), (m = l); do { switch (m.tag) { case 3: - (c = o), (m.effectTag |= 4096), (m.expirationTime = t), pl(m, _o(m, c, t)); + (c = o), (m.effectTag |= 4096), (m.expirationTime = t), pl(m, xo(m, c, t)); break e; case 1: c = o; var y = m.type, - _ = m.stateNode; + x = m.stateNode; if ( !( 64 & m.effectTag || ('function' != typeof y.getDerivedStateFromError && - (null === _ || 'function' != typeof _.componentDidCatch || (null !== Jo && Jo.has(_)))) + (null === x || 'function' != typeof x.componentDidCatch || (null !== Jo && Jo.has(x)))) ) ) { - (m.effectTag |= 4096), (m.expirationTime = t), pl(m, xo(m, c, t)); + (m.effectTag |= 4096), (m.expirationTime = t), pl(m, _o(m, c, t)); break e; } } m = m.return; } while (null !== m); } - zo = Tc(zo); + zo = Nc(zo); } catch (e) { t = e; continue; @@ -12178,16 +12176,16 @@ } } function vc() { - var e = To.current; - return (To.current = vi), null === e ? vi : e; + var e = No.current; + return (No.current = vi), null === e ? vi : e; } function yc(e, t) { - e < Vo && 2 < e && (Vo = e), null !== t && e < Ko && 2 < e && ((Ko = e), (Ho = t)); + e < Uo && 2 < e && (Uo = e), null !== t && e < Ko && 2 < e && ((Ko = e), (Ho = t)); } - function _c(e) { + function xc(e) { e > Go && (Go = e); } - function xc() { + function _c() { for (; null !== zo; ) zo = kc(zo); } function wc() { @@ -12195,9 +12193,9 @@ } function kc(e) { var t = wo(e.alternate, e, Bo); - return (e.memoizedProps = e.pendingProps), null === t && (t = Tc(e)), (No.current = null), t; + return (e.memoizedProps = e.pendingProps), null === t && (t = Nc(e)), (To.current = null), t; } - function Tc(e) { + function Nc(e) { zo = e; do { var t = zo.alternate; @@ -12225,9 +12223,9 @@ if (null !== (t = zo.sibling)) return t; zo = e; } while (null !== zo); - return qo === Oo && (qo = Lo), null; + return qo === Ro && (qo = Lo), null; } - function Nc(e) { + function Tc(e) { var t = e.expirationTime; return t > (e = e.childExpirationTime) ? t : e; } @@ -12237,9 +12235,9 @@ } function Cc(e, t) { do { - Rc(); + Ic(); } while (null !== tc); - if ((Po & (Fo | Ro)) !== So) throw Error(i(327)); + if ((Po & (Fo | Io)) !== So) throw Error(i(327)); var n = e.finishedWork, a = e.finishedExpirationTime; if (null === n) return null; @@ -12248,7 +12246,7 @@ (e.callbackExpirationTime = 0), (e.callbackPriority = 90), (e.nextKnownPendingLevel = 0); - var r = Nc(n); + var r = Tc(n); if ( ((e.firstPendingTime = r), a <= e.lastSuspendedTime @@ -12265,7 +12263,7 @@ null !== r) ) { var l = Po; - (Po |= Ro), (No.current = null), (vn = Ht); + (Po |= Io), (To.current = null), (vn = Ht); var o = pn(); if (fn(o)) { if ('selectionStart' in o) var c = { start: o.selectionStart, end: o.selectionEnd }; @@ -12288,145 +12286,145 @@ f = -1, h = 0, g = 0, - b = o, - E = null; + E = o, + b = null; t: for (;;) { for ( var v; - b !== c || (0 !== u && 3 !== b.nodeType) || (p = d + u), - b !== m || (0 !== s && 3 !== b.nodeType) || (f = d + s), - 3 === b.nodeType && (d += b.nodeValue.length), - null !== (v = b.firstChild); + E !== c || (0 !== u && 3 !== E.nodeType) || (p = d + u), + E !== m || (0 !== s && 3 !== E.nodeType) || (f = d + s), + 3 === E.nodeType && (d += E.nodeValue.length), + null !== (v = E.firstChild); ) - (E = b), (b = v); + (b = E), (E = v); for (;;) { - if (b === o) break t; + if (E === o) break t; if ( - (E === c && ++h === u && (p = d), - E === m && ++g === s && (f = d), - null !== (v = b.nextSibling)) + (b === c && ++h === u && (p = d), + b === m && ++g === s && (f = d), + null !== (v = E.nextSibling)) ) break; - E = (b = E).parentNode; + b = (E = b).parentNode; } - b = v; + E = v; } c = -1 === p || -1 === f ? null : { start: p, end: f }; } else c = null; } c = c || { start: 0, end: 0 }; } else c = null; - (yn = { activeElementDetached: null, focusedElem: o, selectionRange: c }), (Ht = !1), (Yo = r); + (yn = { activeElementDetached: null, focusedElem: o, selectionRange: c }), (Ht = !1), ($o = r); do { try { Fc(); } catch (e) { - if (null === Yo) throw Error(i(330)); - Ic(Yo, e), (Yo = Yo.nextEffect); + if (null === $o) throw Error(i(330)); + Oc($o, e), ($o = $o.nextEffect); } - } while (null !== Yo); - Yo = r; + } while (null !== $o); + $o = r; do { try { - for (o = e, c = t; null !== Yo; ) { - var y = Yo.effectTag; - if ((16 & y && ze(Yo.stateNode, ''), 128 & y)) { - var _ = Yo.alternate; - if (null !== _) { - var x = _.ref; - null !== x && ('function' == typeof x ? x(null) : (x.current = null)); + for (o = e, c = t; null !== $o; ) { + var y = $o.effectTag; + if ((16 & y && ze($o.stateNode, ''), 128 & y)) { + var x = $o.alternate; + if (null !== x) { + var _ = x.ref; + null !== _ && ('function' == typeof _ ? _(null) : (_.current = null)); } } switch (1038 & y) { case 2: - fo(Yo), (Yo.effectTag &= -3); + fo($o), ($o.effectTag &= -3); break; case 6: - fo(Yo), (Yo.effectTag &= -3), Eo(Yo.alternate, Yo); + fo($o), ($o.effectTag &= -3), bo($o.alternate, $o); break; case 1024: - Yo.effectTag &= -1025; + $o.effectTag &= -1025; break; case 1028: - (Yo.effectTag &= -1025), Eo(Yo.alternate, Yo); + ($o.effectTag &= -1025), bo($o.alternate, $o); break; case 4: - Eo(Yo.alternate, Yo); + bo($o.alternate, $o); break; case 8: - bo(o, (u = Yo), c), mo(u); + Eo(o, (u = $o), c), mo(u); } - Yo = Yo.nextEffect; + $o = $o.nextEffect; } } catch (e) { - if (null === Yo) throw Error(i(330)); - Ic(Yo, e), (Yo = Yo.nextEffect); + if (null === $o) throw Error(i(330)); + Oc($o, e), ($o = $o.nextEffect); } - } while (null !== Yo); + } while (null !== $o); if ( - ((x = yn), - (_ = pn()), - (y = x.focusedElem), - (c = x.selectionRange), - _ !== y && y && y.ownerDocument && dn(y.ownerDocument.documentElement, y)) + ((_ = yn), + (x = pn()), + (y = _.focusedElem), + (c = _.selectionRange), + x !== y && y && y.ownerDocument && dn(y.ownerDocument.documentElement, y)) ) { null !== c && fn(y) && - ((_ = c.start), - void 0 === (x = c.end) && (x = _), + ((x = c.start), + void 0 === (_ = c.end) && (_ = x), 'selectionStart' in y - ? ((y.selectionStart = _), (y.selectionEnd = Math.min(x, y.value.length))) - : (x = ((_ = y.ownerDocument || document) && _.defaultView) || window).getSelection && - ((x = x.getSelection()), + ? ((y.selectionStart = x), (y.selectionEnd = Math.min(_, y.value.length))) + : (_ = ((x = y.ownerDocument || document) && x.defaultView) || window).getSelection && + ((_ = _.getSelection()), (u = y.textContent.length), (o = Math.min(c.start, u)), (c = void 0 === c.end ? o : Math.min(c.end, u)), - !x.extend && o > c && ((u = c), (c = o), (o = u)), + !_.extend && o > c && ((u = c), (c = o), (o = u)), (u = mn(y, o)), (m = mn(y, c)), u && m && - (1 !== x.rangeCount || - x.anchorNode !== u.node || - x.anchorOffset !== u.offset || - x.focusNode !== m.node || - x.focusOffset !== m.offset) && - ((_ = _.createRange()).setStart(u.node, u.offset), - x.removeAllRanges(), + (1 !== _.rangeCount || + _.anchorNode !== u.node || + _.anchorOffset !== u.offset || + _.focusNode !== m.node || + _.focusOffset !== m.offset) && + ((x = x.createRange()).setStart(u.node, u.offset), + _.removeAllRanges(), o > c - ? (x.addRange(_), x.extend(m.node, m.offset)) - : (_.setEnd(m.node, m.offset), x.addRange(_))))), - (_ = []); - for (x = y; (x = x.parentNode); ) - 1 === x.nodeType && _.push({ element: x, left: x.scrollLeft, top: x.scrollTop }); - for ('function' == typeof y.focus && y.focus(), y = 0; y < _.length; y++) - ((x = _[y]).element.scrollLeft = x.left), (x.element.scrollTop = x.top); + ? (_.addRange(x), _.extend(m.node, m.offset)) + : (x.setEnd(m.node, m.offset), _.addRange(x))))), + (x = []); + for (_ = y; (_ = _.parentNode); ) + 1 === _.nodeType && x.push({ element: _, left: _.scrollLeft, top: _.scrollTop }); + for ('function' == typeof y.focus && y.focus(), y = 0; y < x.length; y++) + ((_ = x[y]).element.scrollLeft = _.left), (_.element.scrollTop = _.top); } - (Ht = !!vn), (yn = vn = null), (e.current = n), (Yo = r); + (Ht = !!vn), (yn = vn = null), (e.current = n), ($o = r); do { try { - for (y = e; null !== Yo; ) { - var w = Yo.effectTag; - if ((36 & w && so(y, Yo.alternate, Yo), 128 & w)) { - _ = void 0; - var k = Yo.ref; + for (y = e; null !== $o; ) { + var w = $o.effectTag; + if ((36 & w && so(y, $o.alternate, $o), 128 & w)) { + x = void 0; + var k = $o.ref; if (null !== k) { - var T = Yo.stateNode; - Yo.tag, (_ = T), 'function' == typeof k ? k(_) : (k.current = _); + var N = $o.stateNode; + $o.tag, (x = N), 'function' == typeof k ? k(x) : (k.current = x); } } - Yo = Yo.nextEffect; + $o = $o.nextEffect; } } catch (e) { - if (null === Yo) throw Error(i(330)); - Ic(Yo, e), (Yo = Yo.nextEffect); + if (null === $o) throw Error(i(330)); + Oc($o, e), ($o = $o.nextEffect); } - } while (null !== Yo); - (Yo = null), Mr(), (Po = l); + } while (null !== $o); + ($o = null), Mr(), (Po = l); } else e.current = n; if (ec) (ec = !1), (tc = e), (nc = t); - else for (Yo = r; null !== Yo; ) (t = Yo.nextEffect), (Yo.nextEffect = null), (Yo = t); + else for ($o = r; null !== $o; ) (t = $o.nextEffect), ($o.nextEffect = null), ($o = t); if ( (0 === (t = e.firstPendingTime) && (Jo = null), 1073741823 === t ? (e === lc ? rc++ : ((rc = 0), (lc = e))) : (rc = 0), @@ -12435,33 +12433,33 @@ Qo) ) throw ((Qo = !1), (e = Zo), (Zo = null), e); - return (Po & Co) !== So || $r(), null; + return (Po & Co) !== So || Yr(), null; } function Fc() { - for (; null !== Yo; ) { - var e = Yo.effectTag; - 256 & e && io(Yo.alternate, Yo), + for (; null !== $o; ) { + var e = $o.effectTag; + 256 & e && io($o.alternate, $o), !(512 & e) || ec || ((ec = !0), Wr(97, function () { - return Rc(), null; + return Ic(), null; })), - (Yo = Yo.nextEffect); + ($o = $o.nextEffect); } } - function Rc() { + function Ic() { if (90 !== nc) { var e = 97 < nc ? 97 : nc; - return (nc = 90), Gr(e, Oc); + return (nc = 90), Gr(e, Rc); } } - function Oc() { + function Rc() { if (null === tc) return !1; var e = tc; - if (((tc = null), (Po & (Fo | Ro)) !== So)) throw Error(i(331)); + if (((tc = null), (Po & (Fo | Io)) !== So)) throw Error(i(331)); var t = Po; - for (Po |= Ro, e = e.current.firstEffect; null !== e; ) { + for (Po |= Io, e = e.current.firstEffect; null !== e; ) { try { var n = e; if (512 & n.effectTag) @@ -12474,16 +12472,16 @@ } } catch (t) { if (null === e) throw Error(i(330)); - Ic(e, t); + Oc(e, t); } (n = e.nextEffect), (e.nextEffect = null), (e = n); } - return (Po = t), $r(), !0; + return (Po = t), Yr(), !0; } function Ac(e, t, n) { - dl(e, (t = _o(e, (t = no(n, t)), 1073741823))), null !== (e = uc(e, 1073741823)) && dc(e); + dl(e, (t = xo(e, (t = no(n, t)), 1073741823))), null !== (e = uc(e, 1073741823)) && dc(e); } - function Ic(e, t) { + function Oc(e, t) { if (3 === e.tag) Ac(e, e, t); else for (var n = e.return; null !== n; ) { @@ -12497,7 +12495,7 @@ 'function' == typeof n.type.getDerivedStateFromError || ('function' == typeof a.componentDidCatch && (null === Jo || !Jo.has(a))) ) { - dl(n, (e = xo(n, (e = no(t, e)), 1073741823))), null !== (n = uc(n, 1073741823)) && dc(n); + dl(n, (e = _o(n, (e = no(t, e)), 1073741823))), null !== (n = uc(n, 1073741823)) && dc(n); break; } } @@ -12508,8 +12506,8 @@ var a = e.pingCache; null !== a && a.delete(t), Mo === e && Bo === n - ? qo === jo || (qo === Do && 1073741823 === Vo && Vr() - Xo < $o) - ? bc(e, Bo) + ? qo === jo || (qo === Do && 1073741823 === Uo && Ur() - Xo < Yo) + ? Ec(e, Bo) : (Wo = !0) : Wc(e, n) && ((0 !== (t = e.lastPingedTime) && t < n) || ((e.lastPingedTime = n), dc(e))); } @@ -12521,12 +12519,12 @@ var a = t.expirationTime; if (null !== e) { var r = t.pendingProps; - if (e.memoizedProps !== r || gr.current) Ii = !0; + if (e.memoizedProps !== r || gr.current) Oi = !0; else { if (a < n) { - switch (((Ii = !1), t.tag)) { + switch (((Oi = !1), t.tag)) { case 3: - Ui(t), Oi(); + Vi(t), Ri(); break; case 5: if ((Pl(t), 4 & t.mode && 1 !== n && r.hidden)) @@ -12562,16 +12560,16 @@ } return Zi(e, t, n); } - Ii = !1; + Oi = !1; } - } else Ii = !1; + } else Oi = !1; switch (((t.expirationTime = 0), t.tag)) { case 2: if ( ((a = t.type), null !== e && ((e.alternate = null), (t.alternate = null), (t.effectTag |= 2)), (e = t.pendingProps), - (r = Er(t, hr.current)), + (r = br(t, hr.current)), il(t, n), (r = Ql(null, t, a, e, r, n)), (t.effectTag |= 1), @@ -12583,7 +12581,7 @@ } else l = !1; (t.memoizedState = null !== r.state && void 0 !== r.state ? r.state : null), sl(t); var o = a.getDerivedStateFromProps; - 'function' == typeof o && El(t, a, o, e), + 'function' == typeof o && bl(t, a, o, e), (r.updater = vl), (t.stateNode = r), (r._reactInternalFiber = t), @@ -12652,7 +12650,7 @@ case 1: return (a = t.type), (r = t.pendingProps), Bi(e, t, a, (r = t.elementType === a ? r : Zr(a, r)), n); case 3: - if ((Ui(t), (a = t.updateQueue), null === e || null === a)) throw Error(i(282)); + if ((Vi(t), (a = t.updateQueue), null === e || null === a)) throw Error(i(282)); if ( ((a = t.pendingProps), (r = null !== (r = t.memoizedState) ? r.element : null), @@ -12660,16 +12658,16 @@ fl(t, a, null, n), (a = t.memoizedState.element) === r) ) - Oi(), (t = Zi(e, t, n)); + Ri(), (t = Zi(e, t, n)); else { if ( ((r = t.stateNode.hydrate) && - ((ki = Tn(t.stateNode.containerInfo.firstChild)), (wi = t), (r = Ti = !0)), + ((ki = Nn(t.stateNode.containerInfo.firstChild)), (wi = t), (r = Ni = !0)), r) ) for (n = Fl(t, null, a, n), t.child = n; n; ) (n.effectTag = (-3 & n.effectTag) | 1024), (n = n.sibling); - else Di(e, t, a, n), Oi(); + else Di(e, t, a, n), Ri(); t = t.child; } return t; @@ -12681,7 +12679,7 @@ (r = t.pendingProps), (l = null !== e ? e.memoizedProps : null), (o = r.children), - xn(a, r) ? (o = null) : null !== l && xn(a, l) && (t.effectTag |= 16), + _n(a, r) ? (o = null) : null !== l && _n(a, l) && (t.effectTag |= 16), Mi(e, t), 4 & t.mode && 1 !== n && r.hidden ? ((t.expirationTime = t.childExpirationTime = 1), (t = null)) @@ -12781,7 +12779,7 @@ (t.tag = 1), vr(a) ? ((e = !0), wr(t)) : (e = !1), il(t, n), - _l(t, a, r), + xl(t, a, r), wl(t, a, r, n), qi(null, t, a, !0, e, n) ); @@ -12843,14 +12841,14 @@ n ); } - function Uc(e, t, n, a, r, l) { + function Vc(e, t, n, a, r, l) { var o = 2; if (((a = e), 'function' == typeof e)) Bc(e) && (o = 1); else if ('string' == typeof e) o = 5; else e: switch (e) { case ne: - return Vc(n.children, r, l, t); + return Uc(n.children, r, l, t); case oe: (o = 8), (r |= 7); break; @@ -12889,7 +12887,7 @@ } return ((t = zc(o, n, t, r)).elementType = e), (t.type = a), (t.expirationTime = l), t; } - function Vc(e, t, n, a) { + function Uc(e, t, n, a) { return ((e = zc(7, e, a, t)).expirationTime = n), e; } function Kc(e, t, n) { @@ -12934,7 +12932,7 @@ t <= e.lastPingedTime && (e.lastPingedTime = 0), t <= e.lastExpiredTime && (e.lastExpiredTime = 0); } - function $c(e, t) { + function Yc(e, t) { t > e.firstPendingTime && (e.firstPendingTime = t); var n = e.firstSuspendedTime; 0 !== n && @@ -12943,7 +12941,7 @@ : t >= e.lastSuspendedTime && (e.lastSuspendedTime = t + 1), t > e.nextKnownPendingLevel && (e.nextKnownPendingLevel = t)); } - function Yc(e, t) { + function $c(e, t) { var n = e.lastExpiredTime; (0 === n || n > t) && (e.lastExpiredTime = t); } @@ -12974,7 +12972,7 @@ if (1 === n.tag) { var s = n.type; if (vr(s)) { - n = xr(n, s, c); + n = _r(n, s, c); break e; } } @@ -13004,15 +13002,15 @@ (a.current = r), (r.stateNode = a), sl(r), - (e[Rn] = a.current), + (e[In] = a.current), n && 0 !== t && (function (e, t) { var n = Qe(t); - Tt.forEach(function (e) { + Nt.forEach(function (e) { pt(e, t, n); }), - Nt.forEach(function (e) { + Tt.forEach(function (e) { pt(e, t, n); }); })(0, 9 === e.nodeType ? e : e.ownerDocument), @@ -13085,7 +13083,7 @@ var e = this._internalRoot, t = e.containerInfo; Qc(null, e, null, function () { - t[Rn] = null; + t[In] = null; }); }), (ft = function (e) { @@ -13106,7 +13104,7 @@ (C = function (e, t, n) { switch (t) { case 'input': - if ((Te(e, n), (t = n.name), 'radio' === n.type && null != t)) { + if ((Ne(e, n), (t = n.name), 'radio' === n.type && null != t)) { for (n = e; n.parentNode; ) n = n.parentNode; for ( n = n.querySelectorAll('input[name=' + JSON.stringify('' + t) + '][type="radio"]'), t = 0; @@ -13117,7 +13115,7 @@ if (a !== e && a.form === e.form) { var r = Dn(a); if (!r) throw Error(i(90)); - _e(a), Te(a, r); + xe(a), Ne(a, r); } } } @@ -13136,22 +13134,22 @@ try { return Gr(98, e.bind(null, t, n, a, r)); } finally { - (Po = l) === So && $r(); + (Po = l) === So && Yr(); } }), (L = function () { - (Po & (1 | Fo | Ro)) === So && + (Po & (1 | Fo | Io)) === So && ((function () { if (null !== ac) { var e = ac; (ac = null), e.forEach(function (e, t) { - Yc(t, e), dc(t); + $c(t, e), dc(t); }), - $r(); + Yr(); } })(), - Rc()); + Ic()); }), (P = function (e, t) { var n = Po; @@ -13159,25 +13157,25 @@ try { return e(t); } finally { - (Po = n) === So && $r(); + (Po = n) === So && Yr(); } }); var ls = { Events: [ An, - In, + On, Dn, - N, + T, w, qn, function (e) { at(e, Bn); }, A, - I, - Yt, + O, + $t, it, - Rc, + Ic, { current: !1 }, ], }; @@ -13206,7 +13204,7 @@ overrideProps: null, setSuspenseHandler: null, scheduleUpdate: null, - currentDispatcherRef: Y.ReactCurrentDispatcher, + currentDispatcherRef: $.ReactCurrentDispatcher, findHostInstanceByFiber: function (e) { return null === (e = tt(e)) ? null : e.stateNode; }, @@ -13220,7 +13218,7 @@ getCurrentFiber: null, }) ); - })({ findFiberByHostInstance: On, bundleType: 0, version: '16.14.0', rendererPackageName: 'react-dom' }), + })({ findFiberByHostInstance: Rn, bundleType: 0, version: '16.14.0', rendererPackageName: 'react-dom' }), (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ls), (t.createPortal = rs), (t.findDOMNode = function (e) { @@ -13234,13 +13232,13 @@ return null === (e = tt(t)) ? null : e.stateNode; }), (t.flushSync = function (e, t) { - if ((Po & (Fo | Ro)) !== So) throw Error(i(187)); + if ((Po & (Fo | Io)) !== So) throw Error(i(187)); var n = Po; Po |= 1; try { return Gr(99, e.bind(null, t)); } finally { - (Po = n), $r(); + (Po = n), Yr(); } }), (t.hydrate = function (e, t, n) { @@ -13257,7 +13255,7 @@ !!e._reactRootContainer && (gc(function () { as(null, null, e, !1, function () { - (e._reactRootContainer = null), (e[Rn] = null); + (e._reactRootContainer = null), (e[In] = null); }); }), !0) @@ -13295,7 +13293,7 @@ }, 287: function (e, t, n) { 'use strict'; - var a = n(847), + var a = n(228), r = 'function' == typeof Symbol && Symbol.for, l = r ? Symbol.for('react.element') : 60103, i = r ? Symbol.for('react.portal') : 60106, @@ -13309,7 +13307,7 @@ f = r ? Symbol.for('react.memo') : 60115, h = r ? Symbol.for('react.lazy') : 60116, g = 'function' == typeof Symbol && Symbol.iterator; - function b(e) { + function E(e) { for (var t = 'https://reactjs.org/docs/error-decoder.html?invariant=' + e, n = 1; n < arguments.length; n++) t += '&args[]=' + encodeURIComponent(arguments[n]); return ( @@ -13320,7 +13318,7 @@ ' for the full message or use the non-minified dev environment for full errors and additional helpful warnings.' ); } - var E = { + var b = { isMounted: function () { return !1; }, @@ -13330,26 +13328,26 @@ }, v = {}; function y(e, t, n) { - (this.props = e), (this.context = t), (this.refs = v), (this.updater = n || E); + (this.props = e), (this.context = t), (this.refs = v), (this.updater = n || b); } - function _() {} - function x(e, t, n) { - (this.props = e), (this.context = t), (this.refs = v), (this.updater = n || E); + function x() {} + function _(e, t, n) { + (this.props = e), (this.context = t), (this.refs = v), (this.updater = n || b); } (y.prototype.isReactComponent = {}), (y.prototype.setState = function (e, t) { - if ('object' != typeof e && 'function' != typeof e && null != e) throw Error(b(85)); + if ('object' != typeof e && 'function' != typeof e && null != e) throw Error(E(85)); this.updater.enqueueSetState(this, e, t, 'setState'); }), (y.prototype.forceUpdate = function (e) { this.updater.enqueueForceUpdate(this, e, 'forceUpdate'); }), - (_.prototype = y.prototype); - var w = (x.prototype = new _()); - (w.constructor = x), a(w, y.prototype), (w.isPureReactComponent = !0); + (x.prototype = y.prototype); + var w = (_.prototype = new x()); + (w.constructor = _), a(w, y.prototype), (w.isPureReactComponent = !0); var k = { current: null }, - T = Object.prototype.hasOwnProperty, - N = { key: !0, ref: !0, __self: !0, __source: !0 }; + N = Object.prototype.hasOwnProperty, + T = { key: !0, ref: !0, __self: !0, __source: !0 }; function S(e, t, n) { var a, r = {}, @@ -13357,7 +13355,7 @@ o = null; if (null != t) for (a in (void 0 !== t.ref && (o = t.ref), void 0 !== t.key && (i = '' + t.key), t)) - T.call(t, a) && !N.hasOwnProperty(a) && (r[a] = t[a]); + N.call(t, a) && !T.hasOwnProperty(a) && (r[a] = t[a]); var c = arguments.length - 2; if (1 === c) r.children = n; else if (1 < c) { @@ -13371,10 +13369,10 @@ return 'object' == typeof e && null !== e && e.$$typeof === l; } var F = /\/+/g, - R = []; - function O(e, t, n, a) { - if (R.length) { - var r = R.pop(); + I = []; + function R(e, t, n, a) { + if (I.length) { + var r = I.pop(); return (r.result = e), (r.keyPrefix = t), (r.func = n), (r.context = a), (r.count = 0), r; } return { result: e, keyPrefix: t, func: n, context: a, count: 0 }; @@ -13385,9 +13383,9 @@ (e.func = null), (e.context = null), (e.count = 0), - 10 > R.length && R.push(e); + 10 > I.length && I.push(e); } - function I(e, t, n, a) { + function O(e, t, n, a) { var r = typeof e; ('undefined' !== r && 'boolean' !== r) || (e = null); var o = !1; @@ -13409,7 +13407,7 @@ if (((o = 0), (t = '' === t ? '.' : t + ':'), Array.isArray(e))) for (var c = 0; c < e.length; c++) { var s = t + j((r = e[c]), c); - o += I(r, s, n, a); + o += O(r, s, n, a); } else if ( 'function' == @@ -13420,16 +13418,16 @@ ? s : null) ) - for (e = s.call(e), c = 0; !(r = e.next()).done; ) o += I((r = r.value), (s = t + j(r, c++)), n, a); + for (e = s.call(e), c = 0; !(r = e.next()).done; ) o += O((r = r.value), (s = t + j(r, c++)), n, a); else if ('object' === r) throw ( ((n = '' + e), - Error(b(31, '[object Object]' === n ? 'object with keys {' + Object.keys(e).join(', ') + '}' : n, ''))) + Error(E(31, '[object Object]' === n ? 'object with keys {' + Object.keys(e).join(', ') + '}' : n, ''))) ); return o; } function D(e, t, n) { - return null == e ? 0 : I(e, '', t, n); + return null == e ? 0 : O(e, '', t, n); } function j(e, t) { return 'object' == typeof e && null !== e && null != e.key @@ -13464,12 +13462,12 @@ } function M(e, t, n, a, r) { var l = ''; - null != n && (l = ('' + n).replace(F, '$&/') + '/'), D(e, P, (t = O(t, l, a, r))), A(t); + null != n && (l = ('' + n).replace(F, '$&/') + '/'), D(e, P, (t = R(t, l, a, r))), A(t); } var z = { current: null }; function B() { var e = z.current; - if (null === e) throw Error(b(321)); + if (null === e) throw Error(E(321)); return e; } var q = { @@ -13487,7 +13485,7 @@ }, forEach: function (e, t, n) { if (null == e) return e; - D(e, L, (t = O(null, null, t, n))), A(t); + D(e, L, (t = R(null, null, t, n))), A(t); }, count: function (e) { return D( @@ -13508,19 +13506,19 @@ ); }, only: function (e) { - if (!C(e)) throw Error(b(143)); + if (!C(e)) throw Error(E(143)); return e; }, }), (t.Component = y), (t.Fragment = o), (t.Profiler = s), - (t.PureComponent = x), + (t.PureComponent = _), (t.StrictMode = c), (t.Suspense = p), (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = q), (t.cloneElement = function (e, t, n) { - if (null == e) throw Error(b(267, e)); + if (null == e) throw Error(E(267, e)); var r = a({}, e.props), i = e.key, o = e.ref, @@ -13533,7 +13531,7 @@ ) var s = e.type.defaultProps; for (u in t) - T.call(t, u) && !N.hasOwnProperty(u) && (r[u] = void 0 === t[u] && void 0 !== s ? s[u] : t[u]); + N.call(t, u) && !T.hasOwnProperty(u) && (r[u] = void 0 === t[u] && void 0 !== s ? s[u] : t[u]); } var u = arguments.length - 2; if (1 === u) r.children = n; @@ -13669,13 +13667,13 @@ return d.now() - g; }; } - var b = !1, - E = null, + var E = !1, + b = null, v = -1, y = 5, - _ = 0; + x = 0; (l = function () { - return t.unstable_now() >= _; + return t.unstable_now() >= x; }), (i = function () {}), (t.unstable_forceFrameRate = function (e) { @@ -13685,21 +13683,21 @@ ) : (y = 0 < e ? Math.floor(1e3 / e) : 5); }); - var x = new MessageChannel(), - w = x.port2; - (x.port1.onmessage = function () { - if (null !== E) { + var _ = new MessageChannel(), + w = _.port2; + (_.port1.onmessage = function () { + if (null !== b) { var e = t.unstable_now(); - _ = e + y; + x = e + y; try { - E(!0, e) ? w.postMessage(null) : ((b = !1), (E = null)); + b(!0, e) ? w.postMessage(null) : ((E = !1), (b = null)); } catch (e) { throw (w.postMessage(null), e); } - } else b = !1; + } else E = !1; }), (n = function (e) { - (E = e), b || ((b = !0), w.postMessage(null)); + (b = e), E || ((E = !0), w.postMessage(null)); }), (a = function (e, n) { v = p(function () { @@ -13720,10 +13718,10 @@ (e[a] = t), (e[n] = r), (n = a); } } - function T(e) { + function N(e) { return void 0 === (e = e[0]) ? null : e; } - function N(e) { + function T(e) { var t = e[0]; if (void 0 !== t) { var n = e.pop(); @@ -13752,51 +13750,51 @@ } var C = [], F = [], - R = 1, - O = null, + I = 1, + R = null, A = 3, - I = !1, + O = !1, D = !1, j = !1; function L(e) { - for (var t = T(F); null !== t; ) { - if (null === t.callback) N(F); + for (var t = N(F); null !== t; ) { + if (null === t.callback) T(F); else { if (!(t.startTime <= e)) break; - N(F), (t.sortIndex = t.expirationTime), k(C, t); + T(F), (t.sortIndex = t.expirationTime), k(C, t); } - t = T(F); + t = N(F); } } function P(e) { if (((j = !1), L(e), !D)) - if (null !== T(C)) (D = !0), n(M); + if (null !== N(C)) (D = !0), n(M); else { - var t = T(F); + var t = N(F); null !== t && a(P, t.startTime - e); } } function M(e, n) { - (D = !1), j && ((j = !1), r()), (I = !0); + (D = !1), j && ((j = !1), r()), (O = !0); var i = A; try { - for (L(n), O = T(C); null !== O && (!(O.expirationTime > n) || (e && !l())); ) { - var o = O.callback; + for (L(n), R = N(C); null !== R && (!(R.expirationTime > n) || (e && !l())); ) { + var o = R.callback; if (null !== o) { - (O.callback = null), (A = O.priorityLevel); - var c = o(O.expirationTime <= n); - (n = t.unstable_now()), 'function' == typeof c ? (O.callback = c) : O === T(C) && N(C), L(n); - } else N(C); - O = T(C); + (R.callback = null), (A = R.priorityLevel); + var c = o(R.expirationTime <= n); + (n = t.unstable_now()), 'function' == typeof c ? (R.callback = c) : R === N(C) && T(C), L(n); + } else T(C); + R = N(C); } - if (null !== O) var s = !0; + if (null !== R) var s = !0; else { - var u = T(F); + var u = N(F); null !== u && a(P, u.startTime - n), (s = !1); } return s; } finally { - (O = null), (A = i), (I = !1); + (R = null), (A = i), (O = !1); } } function z(e) { @@ -13824,13 +13822,13 @@ e.callback = null; }), (t.unstable_continueExecution = function () { - D || I || ((D = !0), n(M)); + D || O || ((D = !0), n(M)); }), (t.unstable_getCurrentPriorityLevel = function () { return A; }), (t.unstable_getFirstCallbackNode = function () { - return T(C); + return N(C); }), (t.unstable_next = function (e) { switch (A) { @@ -13879,7 +13877,7 @@ } else (i = z(e)), (c = o); return ( (e = { - id: R++, + id: I++, callback: l, priorityLevel: e, startTime: c, @@ -13887,22 +13885,22 @@ sortIndex: -1, }), c > o - ? ((e.sortIndex = c), k(F, e), null === T(C) && e === T(F) && (j ? r() : (j = !0), a(P, c - o))) - : ((e.sortIndex = i), k(C, e), D || I || ((D = !0), n(M))), + ? ((e.sortIndex = c), k(F, e), null === N(C) && e === N(F) && (j ? r() : (j = !0), a(P, c - o))) + : ((e.sortIndex = i), k(C, e), D || O || ((D = !0), n(M))), e ); }), (t.unstable_shouldYield = function () { var e = t.unstable_now(); L(e); - var n = T(C); + var n = N(C); return ( - (n !== O && - null !== O && + (n !== R && + null !== R && null !== n && null !== n.callback && n.startTime <= e && - n.expirationTime < O.expirationTime) || + n.expirationTime < R.expirationTime) || l() ); }), @@ -14001,12 +13999,12 @@ var t = document.createElement('link'); return (t.rel = 'stylesheet'), u(e, t), t; })(t)), - (a = E.bind(null, n)), + (a = b.bind(null, n)), (r = function () { m(n), n.href && URL.revokeObjectURL(n.href); })) : ((n = d(t)), - (a = b.bind(null, n)), + (a = E.bind(null, n)), (r = function () { m(n); })); @@ -14057,7 +14055,7 @@ i[t] && e.removeChild(i[t]), i.length ? e.insertBefore(l, i[t]) : e.appendChild(l); } } - function b(e, t) { + function E(e, t) { var n = t.css, a = t.media; if ((a && e.setAttribute('media', a), e.styleSheet)) e.styleSheet.cssText = n; @@ -14066,7 +14064,7 @@ e.appendChild(document.createTextNode(n)); } } - function E(e, t) { + function b(e, t) { var n = t.css, a = t.sourceMap; a && @@ -14297,8 +14295,8 @@ const [m, d] = (0, e.useReducer)(r, a), [p, f] = (0, e.useState)(s), [h, g] = (0, e.useState)(u), - b = (0, e.useCallback)((e) => d({ type: 'UPDATE_STATE', payload: { customfield: (t) => [...t, e] } }), [d]), - E = (0, e.useCallback)( + E = (0, e.useCallback)((e) => d({ type: 'UPDATE_STATE', payload: { customfield: (t) => [...t, e] } }), [d]), + b = (0, e.useCallback)( (e) => d({ type: 'UPDATE_STATE', payload: { customunit: [...m.customunit, e] } }), [d, m.customunit] ), @@ -14310,11 +14308,11 @@ (e) => d({ type: 'UPDATE_STATE', payload: { fieldgroup: (t) => ({ ...t, items: [...t.items, e] }) } }), [d] ), - _ = (0, e.useCallback)( + x = (0, e.useCallback)( (e, t) => d({ type: 'UPDATE_STATE', payload: { unitgroup: { ...m.unitgroup, title: e, name: t } } }), [d, m.unitgroup] ), - x = (0, e.useCallback)( + _ = (0, e.useCallback)( (e) => d({ type: 'UPDATE_STATE', payload: { unitgroup: { ...m.unitgroup, items: [...m.unitgroup.items, e] } } }), [d, m.unitgroup] @@ -14324,10 +14322,10 @@ () => d({ type: 'UPDATE_STATE', payload: { fieldgroup: { ...m.fieldgroup, items: [] } } }), [d, m.fieldgroup] ), - T = (0, e.useCallback)(() => { + N = (0, e.useCallback)(() => { d({ type: 'UPDATE_STATE', payload: { customunit: [] } }); }, [d]), - N = (0, e.useCallback)( + T = (0, e.useCallback)( () => d({ type: 'UPDATE_STATE', payload: { unitgroup: { ...m.unitgroup, items: [] } } }), [d, m.unitgroup] ), @@ -14344,10 +14342,10 @@ [d] ), F = (0, e.useCallback)((e) => f((t) => ({ ...t, tag: e })), [f]), - R = (0, e.useCallback)((e) => f((t) => ({ ...t, acmscss: e })), [f]), - O = (0, e.useCallback)((e) => f((t) => ({ ...t, jsValidator: e })), [f]), + I = (0, e.useCallback)((e) => f((t) => ({ ...t, acmscss: e })), [f]), + R = (0, e.useCallback)((e) => f((t) => ({ ...t, jsValidator: e })), [f]), A = (0, e.useCallback)((e) => f((t) => ({ ...t, mode: e })), [f]), - I = (0, e.useCallback)((e) => f((t) => ({ ...t, editMode: e })), [f]), + O = (0, e.useCallback)((e) => f((t) => ({ ...t, editMode: e })), [f]), D = (0, e.useCallback)((e) => f((t) => ({ ...t, direction: e })), [f]), j = (0, e.useCallback)((e) => g((t) => ({ ...t, source: e })), [g]), L = (0, e.useCallback)((e) => g((t) => ({ ...t, copied: e })), [g]), @@ -14356,28 +14354,28 @@ state: m, preview: p, clipboard: h, - addCustomfield: b, - addCustomunit: E, + addCustomfield: E, + addCustomunit: b, setGroupTitleName: v, addGroupItem: y, - setUnitGroupTitleName: _, - addUnitGroupItem: x, + setUnitGroupTitleName: x, + addUnitGroupItem: _, clearCustomfield: w, clearGroupItem: k, - clearCustomunit: T, - clearUnitGroupItem: N, + clearCustomunit: N, + clearUnitGroupItem: T, setTag: F, - setAcmscss: R, - setJsValidator: O, + setAcmscss: I, + setJsValidator: R, setMode: A, - setEditMode: I, + setEditMode: O, setDirection: D, setSource: j, setCopied: L, undo: S, redo: C, }), - [m, p, h, b, E, v, y, _, x, w, k, T, N, F, R, O, A, I, D, j, L, S, C] + [m, p, h, E, b, v, y, x, _, w, k, N, T, F, I, R, A, O, D, j, L, S, C] ); return e.createElement(c.Provider, { value: P }, n); } @@ -14516,21 +14514,21 @@ } var h = n(556), g = n.n(h), - b = + E = ('undefined' != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) || ('undefined' != typeof msCrypto && 'function' == typeof msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto)), - E = new Uint8Array(16); + b = new Uint8Array(16); function v() { - if (!b) + if (!E) throw new Error( 'crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported' ); - return b(E); + return E(b); } - for (var y = [], _ = 0; _ < 256; ++_) y[_] = (_ + 256).toString(16).substr(1); - var x = function (e, t, n) { + for (var y = [], x = 0; x < 256; ++x) y[x] = (x + 256).toString(16).substr(1); + var _ = function (e, t, n) { var a = (t && n) || 0; 'string' == typeof e && ((t = 'binary' === e ? new Array(16) : null), (e = null)); var r = (e = e || {}).random || (e.rng || v)(); @@ -14582,7 +14580,7 @@ var n = null != arguments[t] ? arguments[t] : {}; t % 2 ? w(Object(n), !0).forEach(function (t) { - N(e, t, n[t]); + T(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) @@ -14592,7 +14590,7 @@ } return e; } - function T(e, t) { + function N(e, t) { for (var n = 0; n < t.length; n++) { var a = t[n]; (a.enumerable = a.enumerable || !1), @@ -14601,7 +14599,7 @@ Object.defineProperty(e, a.key, a); } } - function N(e, t, n) { + function T(e, t, n) { return ( t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) @@ -14643,7 +14641,7 @@ F(e, t) ); } - function R(e) { + function I(e) { var t = (function () { if ('undefined' == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; @@ -14671,7 +14669,7 @@ })(this, n); }; } - function O(e, t) { + function R(e, t) { (null == t || t > e.length) && (t = e.length); for (var n = 0, a = new Array(t); n < t; n++) a[n] = e[n]; return a; @@ -14686,14 +14684,14 @@ : 'undefined' != typeof self ? self : {}, - I = function (e) { + O = function (e) { return e && e.Math == Math && e; }, D = - I('object' == typeof globalThis && globalThis) || - I('object' == typeof window && window) || - I('object' == typeof self && self) || - I('object' == typeof A && A) || + O('object' == typeof globalThis && globalThis) || + O('object' == typeof window && window) || + O('object' == typeof self && self) || + O('object' == typeof A && A) || (function () { return this; })() || @@ -14727,27 +14725,27 @@ : function () { return B.apply(B, arguments); }, - U = {}, - V = {}.propertyIsEnumerable, + V = {}, + U = {}.propertyIsEnumerable, K = Object.getOwnPropertyDescriptor, - H = K && !V.call({ 1: 2 }, 1); - U.f = H + H = K && !U.call({ 1: 2 }, 1); + V.f = H ? function (e) { var t = K(this, e); return !!t && t.enumerable; } - : V; + : U; var G, W, X = function (e, t) { return { enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t }; }, - $ = M, - Y = Function.prototype, - Q = Y.call, - Z = $ && Y.bind.bind(Q, Q), + Y = M, + $ = Function.prototype, + Q = $.call, + Z = Y && $.bind.bind(Q, Q), J = function (e) { - return $ + return Y ? Z(e) : function () { return Q.apply(e, arguments); @@ -14785,44 +14783,44 @@ return e; }, ge = me, - be = he, - Ee = function (e) { - return ge(be(e)); + Ee = he, + be = function (e) { + return ge(Ee(e)); }, ve = 'object' == typeof document && document.all, ye = { all: ve, IS_HTMLDDA: void 0 === ve && void 0 !== ve }, - _e = ye.all, - xe = ye.IS_HTMLDDA + xe = ye.all, + _e = ye.IS_HTMLDDA ? function (e) { - return 'function' == typeof e || e === _e; + return 'function' == typeof e || e === xe; } : function (e) { return 'function' == typeof e; }, - we = xe, + we = _e, ke = ye.all, - Te = ye.IS_HTMLDDA + Ne = ye.IS_HTMLDDA ? function (e) { return 'object' == typeof e ? null !== e : we(e) || e === ke; } : function (e) { return 'object' == typeof e ? null !== e : we(e); }, - Ne = D, - Se = xe, + Te = D, + Se = _e, Ce = function (e, t) { - return arguments.length < 2 ? ((n = Ne[e]), Se(n) ? n : void 0) : Ne[e] && Ne[e][t]; + return arguments.length < 2 ? ((n = Te[e]), Se(n) ? n : void 0) : Te[e] && Te[e][t]; var n; }, Fe = ie({}.isPrototypeOf), - Re = D, - Oe = Ce('navigator', 'userAgent') || '', - Ae = Re.process, - Ie = Re.Deno, - De = (Ae && Ae.versions) || (Ie && Ie.version), + Ie = D, + Re = Ce('navigator', 'userAgent') || '', + Ae = Ie.process, + Oe = Ie.Deno, + De = (Ae && Ae.versions) || (Oe && Oe.version), je = De && De.v8; je && (W = (G = je.split('.'))[0] > 0 && G[0] < 4 ? 1 : +(G[0] + G[1])), - !W && Oe && (!(G = Oe.match(/Edge\/(\d+)/)) || G[1] >= 74) && (G = Oe.match(/Chrome\/(\d+)/)) && (W = +G[1]); + !W && Re && (!(G = Re.match(/Edge\/(\d+)/)) || G[1] >= 74) && (G = Re.match(/Chrome\/(\d+)/)) && (W = +G[1]); var Le = W, Pe = L, Me = @@ -14833,19 +14831,19 @@ }), ze = Me && !Symbol.sham && 'symbol' == typeof Symbol.iterator, Be = Ce, - qe = xe, - Ue = Fe, - Ve = Object, + qe = _e, + Ve = Fe, + Ue = Object, Ke = ze ? function (e) { return 'symbol' == typeof e; } : function (e) { var t = Be('Symbol'); - return qe(t) && Ue(t.prototype, Ve(e)); + return qe(t) && Ve(t.prototype, Ue(e)); }, He = String, - Ge = xe, + Ge = _e, We = TypeError, Xe = function (e) { if (Ge(e)) return e; @@ -14859,11 +14857,11 @@ })(e) + ' is not a function' ); }, - $e = Xe, - Ye = de, + Ye = Xe, + $e = de, Qe = q, - Ze = xe, - Je = Te, + Ze = _e, + Je = Ne, et = TypeError, tt = { exports: {} }, nt = D, @@ -14903,40 +14901,40 @@ }, ht = ie, gt = 0, - bt = Math.random(), - Et = ht((1).toString), + Et = Math.random(), + bt = ht((1).toString), vt = function (e) { - return 'Symbol(' + (void 0 === e ? '' : e) + ')_' + Et(++gt + bt, 36); + return 'Symbol(' + (void 0 === e ? '' : e) + ')_' + bt(++gt + Et, 36); }, yt = D, - _t = tt.exports, - xt = ft, + xt = tt.exports, + _t = ft, wt = vt, kt = Me, - Tt = ze, - Nt = _t('wks'), + Nt = ze, + Tt = xt('wks'), St = yt.Symbol, Ct = St && St.for, - Ft = Tt ? St : (St && St.withoutSetter) || wt, - Rt = function (e) { - if (!xt(Nt, e) || (!kt && 'string' != typeof Nt[e])) { + Ft = Nt ? St : (St && St.withoutSetter) || wt, + It = function (e) { + if (!_t(Tt, e) || (!kt && 'string' != typeof Tt[e])) { var t = 'Symbol.' + e; - kt && xt(St, e) ? (Nt[e] = St[e]) : (Nt[e] = Tt && Ct ? Ct(t) : Ft(t)); + kt && _t(St, e) ? (Tt[e] = St[e]) : (Tt[e] = Nt && Ct ? Ct(t) : Ft(t)); } - return Nt[e]; + return Tt[e]; }, - Ot = q, - At = Te, - It = Ke, + Rt = q, + At = Ne, + Ot = Ke, Dt = TypeError, - jt = Rt('toPrimitive'), + jt = It('toPrimitive'), Lt = function (e, t) { - if (!At(e) || It(e)) return e; + if (!At(e) || Ot(e)) return e; var n, a, - r = ((a = e[jt]), Ye(a) ? void 0 : $e(a)); + r = ((a = e[jt]), $e(a) ? void 0 : Ye(a)); if (r) { - if ((void 0 === t && (t = 'default'), (n = Ot(r, e, t)), !At(n) || It(n))) return n; + if ((void 0 === t && (t = 'default'), (n = Rt(r, e, t)), !At(n) || Ot(n))) return n; throw Dt("Can't convert object to primitive value"); } return ( @@ -14955,19 +14953,19 @@ var t = Lt(e, 'string'); return Pt(t) ? t : t + ''; }, - zt = Te, + zt = Ne, Bt = D.document, qt = zt(Bt) && zt(Bt.createElement), - Ut = function (e) { + Vt = function (e) { return qt ? Bt.createElement(e) : {}; }, - Vt = Ut, + Ut = Vt, Kt = !P && !L(function () { return ( 7 != - Object.defineProperty(Vt('div'), 'a', { + Object.defineProperty(Ut('div'), 'a', { get: function () { return 7; }, @@ -14976,17 +14974,17 @@ }), Ht = P, Gt = q, - Wt = U, + Wt = V, Xt = X, - $t = Ee, - Yt = Mt, + Yt = be, + $t = Mt, Qt = ft, Zt = Kt, Jt = Object.getOwnPropertyDescriptor; j.f = Ht ? Jt : function (e, t) { - if (((e = $t(e)), (t = Yt(t)), Zt)) + if (((e = Yt(e)), (t = $t(t)), Zt)) try { return Jt(e, t); } catch (e) {} @@ -14998,7 +14996,7 @@ L(function () { return 42 != Object.defineProperty(function () {}, 'prototype', { value: 42, writable: !1 }).prototype; }), - nn = Te, + nn = Ne, an = String, rn = TypeError, ln = function (e) { @@ -15015,7 +15013,7 @@ fn = Object.getOwnPropertyDescriptor, hn = 'enumerable', gn = 'configurable', - bn = 'writable'; + En = 'writable'; en.f = on ? sn ? function (e, t, n) { @@ -15023,11 +15021,11 @@ (un(e), (t = mn(t)), un(n), - 'function' == typeof e && 'prototype' === t && 'value' in n && bn in n && !n[bn]) + 'function' == typeof e && 'prototype' === t && 'value' in n && En in n && !n[En]) ) { var a = fn(e, t); a && - a[bn] && + a[En] && ((e[t] = n.value), (n = { configurable: gn in n ? n[gn] : a[gn], enumerable: hn in n ? n[hn] : a[hn], writable: !1 })); } @@ -15042,38 +15040,38 @@ if ('get' in n || 'set' in n) throw dn('Accessors not supported'); return 'value' in n && (e[t] = n.value), e; }; - var En = en, + var bn = en, vn = X, yn = P ? function (e, t, n) { - return En.f(e, t, vn(1, n)); + return bn.f(e, t, vn(1, n)); } : function (e, t, n) { return (e[t] = n), e; }, - _n = { exports: {} }, - xn = P, + xn = { exports: {} }, + _n = P, wn = ft, kn = Function.prototype, - Tn = xn && Object.getOwnPropertyDescriptor, - Nn = wn(kn, 'name'), + Nn = _n && Object.getOwnPropertyDescriptor, + Tn = wn(kn, 'name'), Sn = { - EXISTS: Nn, - PROPER: Nn && 'something' === function () {}.name, - CONFIGURABLE: Nn && (!xn || (xn && Tn(kn, 'name').configurable)), + EXISTS: Tn, + PROPER: Tn && 'something' === function () {}.name, + CONFIGURABLE: Tn && (!_n || (_n && Nn(kn, 'name').configurable)), }, - Cn = xe, + Cn = _e, Fn = ot, - Rn = ie(Function.toString); + In = ie(Function.toString); Cn(Fn.inspectSource) || (Fn.inspectSource = function (e) { - return Rn(e); + return In(e); }); - var On, + var Rn, An, - In, + On, Dn = Fn.inspectSource, - jn = xe, + jn = _e, Ln = D.WeakMap, Pn = jn(Ln) && /native code/.test(String(Ln)), Mn = tt.exports, @@ -15082,53 +15080,53 @@ qn = function (e) { return Bn[e] || (Bn[e] = zn(e)); }, - Un = {}, - Vn = Pn, + Vn = {}, + Un = Pn, Kn = D, - Hn = Te, + Hn = Ne, Gn = yn, Wn = ft, Xn = ot, - $n = qn, - Yn = Un, + Yn = qn, + $n = Vn, Qn = 'Object already initialized', Zn = Kn.TypeError, Jn = Kn.WeakMap; - if (Vn || Xn.state) { + if (Un || Xn.state) { var ea = Xn.state || (Xn.state = new Jn()); (ea.get = ea.get), (ea.has = ea.has), (ea.set = ea.set), - (On = function (e, t) { + (Rn = function (e, t) { if (ea.has(e)) throw Zn(Qn); return (t.facade = e), ea.set(e, t), t; }), (An = function (e) { return ea.get(e) || {}; }), - (In = function (e) { + (On = function (e) { return ea.has(e); }); } else { - var ta = $n('state'); - (Yn[ta] = !0), - (On = function (e, t) { + var ta = Yn('state'); + ($n[ta] = !0), + (Rn = function (e, t) { if (Wn(e, ta)) throw Zn(Qn); return (t.facade = e), Gn(e, ta, t), t; }), (An = function (e) { return Wn(e, ta) ? e[ta] : {}; }), - (In = function (e) { + (On = function (e) { return Wn(e, ta); }); } var na = { - set: On, + set: Rn, get: An, - has: In, + has: On, enforce: function (e) { - return In(e) ? An(e) : On(e, {}); + return On(e) ? An(e) : Rn(e, {}); }, getterFor: function (e) { return function (t) { @@ -15139,7 +15137,7 @@ }, }, aa = L, - ra = xe, + ra = _e, la = ft, ia = P, oa = Sn.CONFIGURABLE, @@ -15153,7 +15151,7 @@ return 8 !== ma(function () {}, 'length', { value: 8 }).length; }), pa = String(String).split('String'), - fa = (_n.exports = function (e, t, n) { + fa = (xn.exports = function (e, t, n) { 'Symbol(' === String(t).slice(0, 7) && (t = '[' + String(t).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'), n && n.getter && (t = 'get ' + t), n && n.setter && (t = 'set ' + t), @@ -15171,42 +15169,42 @@ Function.prototype.toString = fa(function () { return (ra(this) && ua(this).source) || ca(this); }, 'toString'); - var ha = xe, + var ha = _e, ga = en, - ba = _n.exports, - Ea = rt, + Ea = xn.exports, + ba = rt, va = {}, ya = Math.ceil, - _a = Math.floor, - xa = + xa = Math.floor, + _a = Math.trunc || function (e) { var t = +e; - return (t > 0 ? _a : ya)(t); + return (t > 0 ? xa : ya)(t); }, wa = function (e) { var t = +e; - return t != t || 0 === t ? 0 : xa(t); + return t != t || 0 === t ? 0 : _a(t); }, ka = wa, - Ta = Math.max, - Na = Math.min, + Na = Math.max, + Ta = Math.min, Sa = wa, Ca = Math.min, Fa = function (e) { return (t = e.length) > 0 ? Ca(Sa(t), 9007199254740991) : 0; var t; }, - Ra = Ee, - Oa = Fa, + Ia = be, + Ra = Fa, Aa = function (e) { return function (t, n, a) { var r, - l = Ra(t), - i = Oa(l), + l = Ia(t), + i = Ra(l), o = (function (e, t) { var n = ka(e); - return n < 0 ? Ta(n + t, 0) : Na(n, t); + return n < 0 ? Na(n + t, 0) : Ta(n, t); })(a, i); if (e && n != n) { for (; i > o; ) if ((r = l[o++]) != r) return !0; @@ -15214,11 +15212,11 @@ return !e && -1; }; }, - Ia = { includes: Aa(!0), indexOf: Aa(!1) }, + Oa = { includes: Aa(!0), indexOf: Aa(!1) }, Da = ft, - ja = Ee, - La = Ia.indexOf, - Pa = Un, + ja = be, + La = Oa.indexOf, + Pa = Vn, Ma = ie([].push), za = function (e, t) { var n, @@ -15239,32 +15237,32 @@ 'valueOf', ], qa = za, - Ua = Ba.concat('length', 'prototype'); + Va = Ba.concat('length', 'prototype'); va.f = Object.getOwnPropertyNames || function (e) { - return qa(e, Ua); + return qa(e, Va); }; - var Va = {}; - Va.f = Object.getOwnPropertySymbols; + var Ua = {}; + Ua.f = Object.getOwnPropertySymbols; var Ka = Ce, Ha = va, - Ga = Va, + Ga = Ua, Wa = ln, Xa = ie([].concat), - $a = + Ya = Ka('Reflect', 'ownKeys') || function (e) { var t = Ha.f(Wa(e)), n = Ga.f; return n ? Xa(t, n(e)) : t; }, - Ya = ft, - Qa = $a, + $a = ft, + Qa = Ya, Za = j, Ja = en, er = L, - tr = xe, + tr = _e, nr = /#|\.prototype\./, ar = function (e, t) { var n = lr[rr(e)]; @@ -15284,7 +15282,7 @@ a || (a = {}); var r = a.enumerable, l = void 0 !== a.name ? a.name : t; - if ((ha(n) && ba(n, l, a), a.global)) r ? (e[t] = n) : Ea(t, n); + if ((ha(n) && Ea(n, l, a), a.global)) r ? (e[t] = n) : ba(t, n); else { try { a.unsafe ? e[t] && (r = !0) : delete e[t]; @@ -15299,26 +15297,26 @@ fr = function (e, t, n) { for (var a = Qa(t), r = Ja.f, l = Za.f, i = 0; i < a.length; i++) { var o = a[i]; - Ya(e, o) || (n && Ya(n, o)) || r(e, o, l(t, o)); + $a(e, o) || (n && $a(n, o)) || r(e, o, l(t, o)); } }, hr = cr, gr = Xe, - br = M, - Er = ie(ie.bind), + Er = M, + br = ie(ie.bind), vr = ae, yr = Array.isArray || function (e) { return 'Array' == vr(e); }, - _r = {}; - _r[Rt('toStringTag')] = 'z'; - var xr = '[object z]' === String(_r), - wr = xe, + xr = {}; + xr[It('toStringTag')] = 'z'; + var _r = '[object z]' === String(xr), + wr = _e, kr = ae, - Tr = Rt('toStringTag'), - Nr = Object, + Nr = It('toStringTag'), + Tr = Object, Sr = 'Arguments' == kr( @@ -15328,8 +15326,8 @@ ), Cr = ie, Fr = L, - Rr = xe, - Or = xr + Ir = _e, + Rr = _r ? kr : function (e) { var t, n, a; @@ -15342,7 +15340,7 @@ try { return e[t]; } catch (e) {} - })((t = Nr(e)), Tr)) + })((t = Tr(e)), Nr)) ? n : Sr ? kr(t) @@ -15351,23 +15349,23 @@ : a; }, Ar = Dn, - Ir = function () {}, + Or = function () {}, Dr = [], jr = Ce('Reflect', 'construct'), Lr = /^\s*(?:class|function)\b/, Pr = Cr(Lr.exec), - Mr = !Lr.exec(Ir), + Mr = !Lr.exec(Or), zr = function (e) { - if (!Rr(e)) return !1; + if (!Ir(e)) return !1; try { - return jr(Ir, Dr, e), !0; + return jr(Or, Dr, e), !0; } catch (e) { return !1; } }, Br = function (e) { - if (!Rr(e)) return !1; - switch (Or(e)) { + if (!Ir(e)) return !1; + switch (Rr(e)) { case 'AsyncFunction': case 'GeneratorFunction': case 'AsyncGeneratorFunction': @@ -15395,21 +15393,21 @@ }) ? Br : zr, - Ur = yr, - Vr = qr, - Kr = Te, - Hr = Rt('species'), + Vr = yr, + Ur = qr, + Kr = Ne, + Hr = It('species'), Gr = Array, Wr = me, Xr = mt, - $r = Fa, - Yr = function (e, t) { + Yr = Fa, + $r = function (e, t) { return new ((function (e) { var t; return ( - Ur(e) && + Vr(e) && ((t = e.constructor), - ((Vr(t) && (t === Gr || Ur(t.prototype))) || (Kr(t) && null === (t = t[Hr]))) && (t = void 0)), + ((Ur(t) && (t === Gr || Vr(t.prototype))) || (Kr(t) && null === (t = t[Hr]))) && (t = void 0)), void 0 === t ? Gr : t ); })(e))(0 === t ? 0 : t); @@ -15434,22 +15432,22 @@ gr(e), void 0 === t ? e - : br - ? Er(e, t) + : Er + ? br(e, t) : function () { return e.apply(t, arguments); } ); })(s, u), - b = $r(h), - E = 0, - v = m || Yr, - y = t ? v(c, b) : n || i ? v(c, 0) : void 0; - b > E; - E++ + E = Yr(h), + b = 0, + v = m || $r, + y = t ? v(c, E) : n || i ? v(c, 0) : void 0; + E > b; + b++ ) - if ((o || E in h) && ((p = g((d = h[E]), E, f)), e)) - if (t) y[E] = p; + if ((o || b in h) && ((p = g((d = h[b]), b, f)), e)) + if (t) y[b] = p; else if (p) switch (e) { case 3: @@ -15457,7 +15455,7 @@ case 5: return d; case 6: - return E; + return b; case 2: Qr(y, d); } @@ -15493,7 +15491,7 @@ ll = tn, il = en, ol = ln, - cl = Ee, + cl = be, sl = al; el.f = rl && !ll @@ -15508,18 +15506,18 @@ dl = ln, pl = el, fl = Ba, - hl = Un, + hl = Vn, gl = ml, - bl = Ut, - El = 'prototype', + El = Vt, + bl = 'prototype', vl = 'script', yl = qn('IE_PROTO'), - _l = function () {}, - xl = function (e) { + xl = function () {}, + _l = function (e) { return '<' + vl + '>' + e + ''; }, wl = function (e) { - e.write(xl('')), e.close(); + e.write(_l('')), e.close(); var t = e.parentWindow.Object; return (e = null), t; }, @@ -15532,41 +15530,41 @@ 'undefined' != typeof document ? document.domain && ul ? wl(ul) - : ((t = bl('iframe')), + : ((t = El('iframe')), (n = 'java' + vl + ':'), (t.style.display = 'none'), gl.appendChild(t), (t.src = String(n)), (e = t.contentWindow.document).open(), - e.write(xl('document.F=Object')), + e.write(_l('document.F=Object')), e.close(), e.F) : wl(ul); - for (var a = fl.length; a--; ) delete kl[El][fl[a]]; + for (var a = fl.length; a--; ) delete kl[bl][fl[a]]; return kl(); }; hl[yl] = !0; - var Tl = Rt, - Nl = + var Nl = It, + Tl = Object.create || function (e, t) { var n; return ( - null !== e ? ((_l[El] = dl(e)), (n = new _l()), (_l[El] = null), (n[yl] = e)) : (n = kl()), + null !== e ? ((xl[bl] = dl(e)), (n = new xl()), (xl[bl] = null), (n[yl] = e)) : (n = kl()), void 0 === t ? n : pl.f(n, t) ); }, Sl = en.f, - Cl = Tl('unscopables'), + Cl = Nl('unscopables'), Fl = Array.prototype; - null == Fl[Cl] && Sl(Fl, Cl, { configurable: !0, value: Nl(null) }); - var Rl, - Ol = Jr.find, + null == Fl[Cl] && Sl(Fl, Cl, { configurable: !0, value: Tl(null) }); + var Il, + Rl = Jr.find, Al = 'find', - Il = !0; + Ol = !0; Al in [] && Array(1)[Al](function () { - Il = !1; + Ol = !1; }), (function (e, t) { var n, @@ -15590,15 +15588,15 @@ (e.sham || (r && r.sham)) && mr(l, 'sham', !0), dr(n, a, l, e); } })( - { target: 'Array', proto: !0, forced: Il }, + { target: 'Array', proto: !0, forced: Ol }, { find: function (e) { - return Ol(this, e, arguments.length > 1 ? arguments[1] : void 0); + return Rl(this, e, arguments.length > 1 ? arguments[1] : void 0); }, } ), - (Rl = Al), - (Fl[Cl][Rl] = !0); + (Il = Al), + (Fl[Cl][Il] = !0); var Dl = '__react_tooltip_hide_event', jl = '__react_tooltip_rebuild_event', Ll = '__react_tooltip_show_event', @@ -15630,7 +15628,7 @@ set: function (e, t, n) { this.id in e ? (e[this.id][t] = n) - : Object.defineProperty(e, this.id, { configurable: !0, value: N({}, t, n) }); + : Object.defineProperty(e, this.id, { configurable: !0, value: T({}, t, n) }); }, get: function (e, t) { var n = e[this.id]; @@ -15667,7 +15665,7 @@ } } }, - Ul = function (e, t) { + Vl = function (e, t) { var n = {}; return ( e.forEach(function (e) { @@ -15680,7 +15678,7 @@ n ); }, - Vl = function () { + Ul = function () { return document.getElementsByTagName('body')[0]; }; function Kl(e, t, n, a, r, l, i) { @@ -15694,34 +15692,34 @@ f = Gl(e, t, l), h = f.mouseX, g = f.mouseY, - b = Wl(l, d, p, s, u), - E = Xl(i), - v = E.extraOffsetX, - y = E.extraOffsetY, - _ = window.innerWidth, - x = window.innerHeight, - w = $l(n), + E = Wl(l, d, p, s, u), + b = Xl(i), + v = b.extraOffsetX, + y = b.extraOffsetY, + x = window.innerWidth, + _ = window.innerHeight, + w = Yl(n), k = w.parentTop, - T = w.parentLeft, - N = function (e) { - var t = b[e].l; + N = w.parentLeft, + T = function (e) { + var t = E[e].l; return h + t + v; }, S = function (e) { - var t = b[e].t; + var t = E[e].t; return g + t + y; }, C = function (e) { return ( (function (e) { - return N(e) < 0; + return T(e) < 0; })(e) || (function (e) { return ( (function (e) { - var t = b[e].r; + var t = E[e].r; return h + t + v; - })(e) > _ + })(e) > x ); })(e) || (function (e) { @@ -15730,9 +15728,9 @@ (function (e) { return ( (function (e) { - var t = b[e].b; + var t = E[e].b; return g + t + y; - })(e) > x + })(e) > _ ); })(e) ); @@ -15740,7 +15738,7 @@ F = function (e) { return !C(e); }, - R = { top: F('top'), bottom: F('bottom'), left: F('left'), right: F('right') }, + I = { top: F('top'), bottom: F('bottom'), left: F('left'), right: F('right') }, A = (function () { var e, t = (function (e, t) { @@ -15750,14 +15748,14 @@ Array.isArray(e) || (n = (function (e, t) { if (e) { - if ('string' == typeof e) return O(e, t); + if ('string' == typeof e) return R(e, t); var n = Object.prototype.toString.call(e).slice(8, -1); return ( 'Object' === n && e.constructor && (n = e.constructor.name), 'Map' === n || 'Set' === n ? Array.from(e) : 'Arguments' === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ? O(e, t) + ? R(e, t) : void 0 ); } @@ -15808,7 +15806,7 @@ try { for (t.s(); !(e = t.n()).done; ) { var n = e.value; - if (R[n]) return n; + if (I[n]) return n; } } catch (e) { t.e(e); @@ -15817,12 +15815,12 @@ } return a; })(), - I = !1; + O = !1; return ( - A && A !== a && ((I = !0), (o = A)), - I + A && A !== a && ((O = !0), (o = A)), + O ? { isNewState: !0, newState: { place: o } } - : { isNewState: !1, position: { left: parseInt(N(a) - T, 10), top: parseInt(S(a) - k, 10) } } + : { isNewState: !1, position: { left: parseInt(T(a) - N, 10), top: parseInt(S(a) - k, 10) } } ); } var Hl = function (e) { @@ -15871,7 +15869,7 @@ : 'right' === a && (t += parseInt(e[a], 10)); return { extraOffsetX: t, extraOffsetY: n }; }, - $l = function (e) { + Yl = function (e) { for (var t = e; t; ) { var n = window.getComputedStyle(t); if ('none' !== n.getPropertyValue('transform') || 'transform' === n.getPropertyValue('will-change')) break; @@ -15882,7 +15880,7 @@ parentLeft: (t && t.getBoundingClientRect().left) || 0, }; }; - function Yl(t, n, a, r) { + function $l(t, n, a, r) { if (n) return n; if (null != a) return a; if (null === a) return null; @@ -16031,9 +16029,9 @@ r = n.eventOff, l = n.possibleCustomEvents, i = n.possibleCustomEventsOff, - o = Vl(), - c = Ul(e, 'data-event'), - s = Ul(e, 'data-event-off'); + o = Ul(), + c = Vl(e, 'data-event'), + s = Vl(e, 'data-event-off'); null != a && (c[a] = !0), null != r && (s[r] = !0), l.split(' ').forEach(function (e) { @@ -16061,7 +16059,7 @@ for (var p in u) o.addEventListener(p, u[p]); }), (e.prototype.unbindBodyListener = function (e) { - e = e || Vl(); + e = e || Ul(); var t = this.bodyModeListeners; for (var n in t) e.removeEventListener(n, t[n]); }); @@ -16079,7 +16077,7 @@ var n, a, r, - l = R(i); + l = I(i); function i(e) { var t; return ( @@ -16087,7 +16085,7 @@ if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function'); })(this, i), ((t = l.call(this, e)).state = { - uuid: e.uuid || 't' + x(), + uuid: e.uuid || 't' + _(), place: e.place || 'top', desiredPlace: e.place || 'top', type: e.type || 'dark', @@ -16302,7 +16300,7 @@ (e = Array.isArray(n) ? n[0] && n[0](this.state.originTooltip) : n(this.state.originTooltip)), - Yl(this.state.originTooltip, a, e, this.state.isMultiline) + $l(this.state.originTooltip, a, e, this.state.isMultiline) ); }, }, @@ -16365,7 +16363,7 @@ ? f.getAttribute('data-delay-update') || this.props.delayUpdate : 0, g = this, - b = function () { + E = function () { g.setState( { originTooltip: l, @@ -16439,7 +16437,7 @@ (g.intervalUpdateContent = setInterval(function () { if (g.mount) { var e = g.props.getContent, - t = Yl(l, '', e[0](), i), + t = $l(l, '', e[0](), i), n = g.isEmptyTip(t); g.setState({ isEmptyTip: n }), g.updatePosition(); } @@ -16447,7 +16445,7 @@ } ); }; - h ? (this.delayReshow = setTimeout(b, h)) : b(); + h ? (this.delayReshow = setTimeout(E, h)) : E(); } }, }, @@ -16873,15 +16871,15 @@ }, }, ]), - a && T(n.prototype, a), - r && T(n, r), + a && N(n.prototype, a), + r && N(n, r), Object.defineProperty(n, 'prototype', { writable: !1 }), i ); })(e.Component)), - N(ei, 'defaultProps', { insecure: !0, resizeHide: !0, wrapper: 'div', clickable: !1 }), - N(ei, 'supportedWrappers', ['div', 'span']), - N(ei, 'displayName', 'ReactTooltip'), + T(ei, 'defaultProps', { insecure: !0, resizeHide: !0, wrapper: 'div', clickable: !1 }), + T(ei, 'supportedWrappers', ['div', 'span']), + T(ei, 'displayName', 'ReactTooltip'), ((ai = Jl = ei).prototype.bindRemovalTracker = function () { var e = this, t = @@ -16948,8 +16946,8 @@ setJsValidator: o, setDirection: c, setCopied: s, - preview: { jsValidator: m, acmscss: d, mode: f, editMode: h, tag: g, direction: b }, - clipboard: { source: E }, + preview: { jsValidator: m, acmscss: d, mode: f, editMode: h, tag: g, direction: E }, + clipboard: { source: b }, } = u(); return e.createElement( e.Fragment, @@ -16991,19 +16989,20 @@ 'JavaScriptによるバリデートを使用する' ) ), - e.createElement( - 'select', - { - id: 'tag', - onChange: (e) => - ((e) => { - l(e); - })(e.target.value), - className: 'acms-admin-form-width-quarter', - }, - e.createElement('option', { value: 'section' }, '--'), - e.createElement('option', { value: 'table' }, 'table') - ), + 'confirm' !== h && + e.createElement( + 'select', + { + id: 'tag', + onChange: (e) => + ((e) => { + l(e); + })(e.target.value), + className: 'acms-admin-form-width-quarter', + }, + e.createElement('option', { value: 'section' }, '--'), + e.createElement('option', { value: 'table' }, 'table') + ), 'table' === g && ('fieldgroup' === f || 'unitgroup' === f) && e.createElement( @@ -17017,7 +17016,7 @@ 'label', { htmlFor: 'direction-horizontal', - className: p()('customFieldDirectionBtn', { active: 'horizontal' === b }), + className: p()('customFieldDirectionBtn', { active: 'horizontal' === E }), 'data-tip': !0, 'data-for': 'group-field-direction-horizontal', }, @@ -17025,7 +17024,7 @@ type: 'radio', id: 'direction-horizontal', onChange: () => c('horizontal'), - checked: 'horizontal' === b, + checked: 'horizontal' === E, }), e.createElement('img', { src: si(), alt: '' }) ), @@ -17033,7 +17032,7 @@ 'label', { htmlFor: 'direction-vertical', - className: p()('customFieldDirectionBtn', { active: 'vertical' === b }), + className: p()('customFieldDirectionBtn', { active: 'vertical' === E }), 'data-tip': !0, 'data-for': 'group-field-direction-vertical', }, @@ -17041,7 +17040,7 @@ type: 'radio', id: 'direction-vertical', onChange: () => c('vertical'), - checked: 'vertical' === b, + checked: 'vertical' === E, }), e.createElement('img', { src: mi(), alt: '' }) ) @@ -17069,53 +17068,45 @@ e.createElement('span', null, '横向きレイアウト用にソースコードを生成します。') ) ), - 'customfield' === f && - e.createElement( - 'button', - { - onClick: () => t(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '履歴クリア' - ), - 'fieldgroup' === f && - e.createElement( - 'button', - { - onClick: () => a(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '履歴クリア' - ), - 'customunit' === f && - e.createElement( - 'button', - { - onClick: () => n(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '履歴クリア' - ), - 'unitgroup' === f && - e.createElement( - 'button', - { - onClick: () => r(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '履歴クリア' - ), - 'preview' !== h && - e.createElement( - 'div', - { style: { display: 'inline-block', position: 'relative', float: 'right', marginRight: '10px' } }, + e.createElement( + 'div', + null, + 'preview' !== h && + e.createElement( + 'div', + { style: { display: 'inline-block', position: 'relative', marginRight: '10px' } }, + e.createElement( + ii(), + { text: b, onCopy: () => s(!0) }, + e.createElement('button', { className: 'acms-admin-btn-admin' }, 'コードをコピー') + ), + e.createElement(oi, { message: 'クリップボードにコピーしました', onFinish: () => s(!1) }) + ), + 'customfield' === f && + e.createElement( + 'button', + { onClick: () => t(), className: 'acms-admin-btn-admin acms-admin-btn-admin-danger' }, + '履歴クリア' + ), + 'fieldgroup' === f && e.createElement( - ii(), - { text: E, onCopy: () => s(!0) }, - e.createElement('button', { className: 'acms-admin-btn-admin' }, 'コードをコピー') + 'button', + { onClick: () => a(), className: 'acms-admin-btn-admin acms-admin-btn-admin-danger' }, + '履歴クリア' ), - e.createElement(oi, { message: 'クリップボードにコピーしました', onFinish: () => s(!1) }) - ) + 'customunit' === f && + e.createElement( + 'button', + { onClick: () => n(), className: 'acms-admin-btn-admin acms-admin-btn-admin-danger' }, + '履歴クリア' + ), + 'unitgroup' === f && + e.createElement( + 'button', + { onClick: () => r(), className: 'acms-admin-btn-admin acms-admin-btn-admin-danger' }, + '履歴クリア' + ) + ) ); } function pi(t) { @@ -17419,7 +17410,7 @@ var gi = JSON.parse( '{"text":{"label":"テキスト","subTypes":[{"value":"","label":"--"},{"value":"tel","label":"電話"},{"value":"number","label":"数値"},{"value":"email","label":"メール"},{"value":"password","label":"パスワード"}]},"textarea":{"label":"テキストエリア","subTypes":[{"value":"","label":"--"},{"value":"lite-editor","label":"ライトエディター"}]},"checkbox":{"label":"チェックボックス","subTypes":[]},"selectbox":{"label":"セレクトボックス","subTypes":[]},"radioButton":{"label":"ラジオボタン","subTypes":[]},"media":{"label":"メディア","subTypes":[]},"image":{"label":"画像","subTypes":[]},"file":{"label":"ファイル","subTypes":[]},"richEditor":{"label":"リッチエディター","subTypes":[]},"table":{"label":"テーブル","subTypes":[]}}' ); - function bi(t) { + function Ei(t) { const { field: n, setField: a } = t, [r, l] = (0, e.useState)([]), [i, o] = (0, e.useState)(!0); @@ -17651,7 +17642,7 @@ ) ); } - const Ei = { + const bi = { pref: JSON.parse( '[{"label":"北海道","value":"北海道"},{"label":"青森県","value":"青森県"},{"label":"岩手県","value":"岩手県"},{"label":"宮城県","value":"宮城県"},{"label":"秋田県","value":"秋田県"},{"label":"山形県","value":"山形県"},{"label":"福島県","value":"福島県"},{"label":"茨城県","value":"茨城県"},{"label":"栃木県","value":"栃木県"},{"label":"群馬県","value":"群馬県"},{"label":"埼玉県","value":"埼玉県"},{"label":"千葉県","value":"千葉県"},{"label":"東京都","value":"東京都"},{"label":"神奈川県","value":"神奈川県"},{"label":"新潟県","value":"新潟県"},{"label":"富山県","value":"富山県"},{"label":"石川県","value":"石川県"},{"label":"福井県","value":"福井県"},{"label":"山梨県","value":"山梨県"},{"label":"長野県","value":"長野県"},{"label":"岐阜県","value":"岐阜県"},{"label":"静岡県","value":"静岡県"},{"label":"愛知県","value":"愛知県"},{"label":"三重県","value":"三重県"},{"label":"滋賀県","value":"滋賀県"},{"label":"京都府","value":"京都府"},{"label":"大阪府","value":"大阪府"},{"label":"兵庫県","value":"兵庫県"},{"label":"奈良県","value":"奈良県"},{"label":"和歌山県","value":"和歌山県"},{"label":"鳥取県","value":"鳥取県"},{"label":"島根県","value":"島根県"},{"label":"岡山県","value":"岡山県"},{"label":"広島県","value":"広島県"},{"label":"山口県","value":"山口県"},{"label":"徳島県","value":"徳島県"},{"label":"香川県","value":"香川県"},{"label":"愛媛県","value":"愛媛県"},{"label":"高知県","value":"高知県"},{"label":"福岡県","value":"福岡県"},{"label":"佐賀県","value":"佐賀県"},{"label":"長崎県","value":"長崎県"},{"label":"熊本県","value":"熊本県"},{"label":"大分県","value":"大分県"},{"label":"宮崎県","value":"宮崎県"},{"label":"鹿児島県","value":"鹿児島県"},{"label":"沖縄県","value":"沖縄県"}]' ), @@ -17730,7 +17721,7 @@ { className: 'acms-admin-btn', onClick: () => { - const e = Ei[a]; + const e = bi[a]; r((t) => ({ ...t, option: [...n, ...e] })); }, style: { verticalAlign: 'middle' }, @@ -17770,7 +17761,7 @@ tooltip: '', placeholder: '', }; - function _i(t) { + function xi(t) { const { setField: n, onSubmit: a = () => {} } = t, { preview: { mode: r }, @@ -17807,7 +17798,7 @@ ) ); } - function xi(t) { + function _i(t) { const { field: { type: n, validator: a, openValidator: r, converter: l, noSearch: i }, setField: o, @@ -18134,76 +18125,77 @@ e.createElement( 'tbody', null, - n.map((t, l) => - e.createElement( - 'tr', - { key: l }, - e.createElement( - 'td', - null, - e.createElement( - 'div', - { className: 'customFieldOptionTableInput' }, - e.createElement('span', { className: 'customFieldOptionTableAppend' }, '項目名(label)'), - e.createElement('input', { - type: 'text', - defaultValue: t.label, - onInput: (e) => { - const t = e.target.value; - t && - ((e, t) => { - const r = n[e]; - a((a) => ({ ...a, option: [...n.slice(0, e), { ...r, label: t }, ...n.slice(e + 1)] })); - })(l, t); - }, - className: 'acms-admin-form-width-full', - placeholder: '例)東京都', - }) - ) - ), + n && + n.map((t, l) => e.createElement( - 'td', - null, + 'tr', + { key: l }, e.createElement( - 'div', - { className: 'customFieldOptionTableInput' }, - e.createElement('span', { className: 'customFieldOptionTableAppend' }, '値(value)'), - e.createElement('input', { - type: 'text', - defaultValue: t.value, - onInput: (e) => { - const t = e.target.value; - t && - ((e, t) => { - const r = n[e]; - a((a) => ({ ...a, option: [...n.slice(0, e), { ...r, value: t }, ...n.slice(e + 1)] })); - })(l, t); - }, - className: 'acms-admin-form-width-full', - style: { minWidth: '200px' }, - placeholder: '例)tokyo', - }) - ) - ), - r && + 'td', + null, + e.createElement( + 'div', + { className: 'customFieldOptionTableInput' }, + e.createElement('span', { className: 'customFieldOptionTableAppend' }, '項目名(label)'), + e.createElement('input', { + type: 'text', + defaultValue: t.label, + onInput: (e) => { + const t = e.target.value; + t && + ((e, t) => { + const r = n[e]; + a((a) => ({ ...a, option: [...n.slice(0, e), { ...r, label: t }, ...n.slice(e + 1)] })); + })(l, t); + }, + className: 'acms-admin-form-width-full', + placeholder: '例)東京都', + }) + ) + ), e.createElement( 'td', null, e.createElement( - 'button', - { - type: 'button', - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - onClick: () => - ((e) => { - a((t) => ({ ...t, option: [...n.slice(0, e), ...n.slice(e + 1)] })); - })(l), - }, - '削除' + 'div', + { className: 'customFieldOptionTableInput' }, + e.createElement('span', { className: 'customFieldOptionTableAppend' }, '値(value)'), + e.createElement('input', { + type: 'text', + defaultValue: t.value, + onInput: (e) => { + const t = e.target.value; + t && + ((e, t) => { + const r = n[e]; + a((a) => ({ ...a, option: [...n.slice(0, e), { ...r, value: t }, ...n.slice(e + 1)] })); + })(l, t); + }, + className: 'acms-admin-form-width-full', + style: { minWidth: '200px' }, + placeholder: '例)tokyo', + }) ) - ) + ), + r && + e.createElement( + 'td', + null, + e.createElement( + 'button', + { + type: 'button', + className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', + onClick: () => + ((e) => { + a((t) => ({ ...t, option: [...n.slice(0, e), ...n.slice(e + 1)] })); + })(l), + }, + '削除' + ) + ) + ) ) - ) ) ), r && @@ -18374,7 +18366,7 @@ ) ); } - function Ti(t) { + function Ni(t) { const { setField: n } = t; return e.createElement( 'table', @@ -18644,7 +18636,7 @@ ) ); } - function Ni(t) { + function Ti(t) { const { field: { resize: n, alt: a }, setField: r, @@ -18873,7 +18865,7 @@ noSearch: !1, extension: '', }; - function Ri() { + function Ii() { const [t, n] = (0, e.useState)(Fi), { addCustomfield: a } = u(), r = (0, e.useCallback)( @@ -18891,7 +18883,7 @@ { className: 'customFieldFunction' }, e.createElement(fi, { field: t, setField: n }), e.createElement(hi, { field: t, setField: n }), - e.createElement(bi, { field: t, setField: n }), + e.createElement(Ei, { field: t, setField: n }), 'selectbox' === t.type && e.createElement( 'div', @@ -18918,16 +18910,16 @@ e.createElement( 'div', null, - e.createElement(Ti, { setField: n }), - e.createElement(Ni, { field: t, setField: n }) + e.createElement(Ni, { setField: n }), + e.createElement(Ti, { field: t, setField: n }) ), 'file' === t.type && e.createElement('div', null, e.createElement(Si, { field: t, setField: n })), 'richEditor' === t.type && e.createElement('div', null, e.createElement(Ci, { field: t, setField: n })), 'media' !== t.type && 'richEditor' !== t.type && 'table' !== t.type && - e.createElement(xi, { field: t, setField: n }), - e.createElement(_i, { + e.createElement(_i, { field: t, setField: n }), + e.createElement(xi, { setField: n, onSubmit: (e) => { e.preventDefault(), @@ -18939,7 +18931,7 @@ ) ); } - function Oi(t) { + function Ri(t) { const { field: { groupAlert: n }, setField: a, @@ -19005,7 +18997,7 @@ : null ); } - const Ii = { + const Oi = { type: 'text', subType: '', title: '', @@ -19069,7 +19061,7 @@ placeholder: '', }; function ji() { - const [t, n] = (0, e.useState)(Ii), + const [t, n] = (0, e.useState)(Oi), { setGroupTitleName: a, addGroupItem: r, clearGroupItem: l } = u(), i = (0, e.useCallback)(() => { t.groupName @@ -19093,7 +19085,7 @@ e.createElement( 'div', { className: 'customFieldFunction' }, - e.createElement(Oi, { field: t, setField: n }), + e.createElement(Ri, { field: t, setField: n }), e.createElement(Ai, { field: t, setField: n }), e.createElement(hi, { field: t, setField: n }), t.openGroup @@ -19304,7 +19296,7 @@ ) ), e.createElement(fi, { field: t, setField: n }), - e.createElement(bi, { field: t, setField: n }), + e.createElement(Ei, { field: t, setField: n }), 'checkbox' === t.type && e.createElement('div', null, e.createElement(wi, { field: t, setField: n, add: !1 })), 'selectbox' === t.type && @@ -19325,15 +19317,15 @@ e.createElement( 'div', null, - e.createElement(Ti, { setField: n }), - e.createElement(Ni, { field: t, setField: n }) + e.createElement(Ni, { setField: n }), + e.createElement(Ti, { field: t, setField: n }) ), 'file' === t.type && e.createElement('div', null, e.createElement(Si, { field: t, setField: n })), 'media' === t.type && e.createElement('div', null, e.createElement(ki, { field: t, setField: n })), 'rich-editor' === t.type && e.createElement('div', null, e.createElement(Ci, { field: t, setField: n })), - e.createElement(xi, { field: t, setField: n }), - e.createElement(_i, { setField: n, onSubmit: o }) + e.createElement(_i, { field: t, setField: n }), + e.createElement(xi, { setField: n, onSubmit: o }) ) ) ); @@ -19394,7 +19386,7 @@ { className: 'customFieldFunction' }, e.createElement(fi, { field: t, setField: n }), e.createElement(hi, { field: t, setField: n }), - e.createElement(bi, { field: t, setField: n }), + e.createElement(Ei, { field: t, setField: n }), 'selectbox' === t.type && e.createElement( 'div', @@ -19421,16 +19413,16 @@ e.createElement( 'div', null, - e.createElement(Ti, { setField: n }), - e.createElement(Ni, { field: t, setField: n }) + e.createElement(Ni, { setField: n }), + e.createElement(Ti, { field: t, setField: n }) ), 'file' === t.type && e.createElement('div', null, e.createElement(Si, { field: t, setField: n })), 'richEditor' === t.type && e.createElement('div', null, e.createElement(Ci, { field: t, setField: n })), 'media' !== t.type && 'richEditor' !== t.type && 'table' !== t.type && - e.createElement(xi, { field: t, setField: n }), - e.createElement(_i, { + e.createElement(_i, { field: t, setField: n }), + e.createElement(xi, { setField: n, onSubmit: (e) => { e.preventDefault(), @@ -19530,7 +19522,7 @@ e.createElement( 'div', { className: 'customFieldFunction' }, - e.createElement(Oi, { field: t, setField: n }), + e.createElement(Ri, { field: t, setField: n }), e.createElement(Ai, { field: t, setField: n }), e.createElement(hi, { field: t, setField: n }), t.openGroup @@ -19734,7 +19726,7 @@ ) ), e.createElement(fi, { field: t, setField: n }), - e.createElement(bi, { field: t, setField: n }), + e.createElement(Ei, { field: t, setField: n }), 'checkbox' === t.type && e.createElement('div', null, e.createElement(wi, { field: t, setField: n, add: !1 })), 'selectbox' === t.type && @@ -19755,15 +19747,15 @@ e.createElement( 'div', null, - e.createElement(Ti, { setField: n }), - e.createElement(Ni, { field: t, setField: n }) + e.createElement(Ni, { setField: n }), + e.createElement(Ti, { field: t, setField: n }) ), 'file' === t.type && e.createElement('div', null, e.createElement(Si, { field: t, setField: n })), 'media' === t.type && e.createElement('div', null, e.createElement(ki, { field: t, setField: n })), 'rich-editor' === t.type && e.createElement('div', null, e.createElement(Ci, { field: t, setField: n })), - e.createElement(xi, { field: t, setField: n }), - e.createElement(_i, { setField: n, onSubmit: o }) + e.createElement(_i, { field: t, setField: n }), + e.createElement(xi, { setField: n, onSubmit: o }) ) ) ); @@ -19790,9 +19782,9 @@ ) ); } - function Ui() { + function Vi() { return ( - (Ui = Object.assign + (Vi = Object.assign ? Object.assign.bind() : function (e) { for (var t = 1; t < arguments.length; t++) { @@ -19801,10 +19793,10 @@ } return e; }), - Ui.apply(null, arguments) + Vi.apply(null, arguments) ); } - function Vi(t) { + function Ui(t) { const { item: n } = t, { preview: { acmscss: a, jsValidator: r, editMode: l }, @@ -19878,7 +19870,10 @@ }; return e.createElement( l, - { condition: 'vertical' === r, wrap: (t) => e.createElement('tr', null, e.createElement('th', null, a), t) }, + { + condition: 'vertical' === r, + wrap: (t) => e.createElement('table', null, e.createElement('tr', null, e.createElement('th', null, a), t)), + }, n ); } @@ -19897,7 +19892,7 @@ null, e.createElement( 'input', - Ui( + Vi( { id: a, type: c, @@ -19910,23 +19905,23 @@ ) ), e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }), - e.createElement(Vi, { item: n }), + e.createElement(Ui, { item: n }), e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) ), 'fieldgroup' === l && e.createElement( - Hi, - { title: n.title }, + e.Fragment, + null, e.createElement( 'input', - Ui( + Vi( { type: c, name: ''.concat(n.name, '[]') }, r && { value: '{'.concat(n.name, '}') }, { className: p()({ 'acms-admin-form-width-full': o }) }, n.placeholder ? { placeholder: n.placeholder } : {} ) ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'customunit' === l && e.createElement( @@ -19934,7 +19929,7 @@ null, e.createElement( 'input', - Ui( + Vi( { type: c, name: ''.concat(n.name, '{id}'), @@ -19952,7 +19947,7 @@ { title: n.title }, e.createElement( 'input', - Ui({ type: c, name: ''.concat(n.name, '{id}[]') }, r && { value: '{'.concat(n.name, '}') }, { + Vi({ type: c, name: ''.concat(n.name, '{id}[]') }, r && { value: '{'.concat(n.name, '}') }, { className: p()({ 'acms-admin-form-width-full': o }), }) ) @@ -19975,21 +19970,21 @@ null, e.createElement( 'textarea', - Ui({ id: a, name: n.name, className: s }, i ? { 'data-validator': n.name } : {}), + Vi({ id: a, name: n.name, className: s }, i ? { 'data-validator': n.name } : {}), '{'.concat(n.name, '}') ), e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }) ), 'fieldgroup' === l && e.createElement( - Hi, - { title: n.title }, + e.Fragment, + null, e.createElement( 'textarea', { id: a, name: ''.concat(n.name, '[]'), className: s }, r && '{'.concat(n.name, '}') ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'customunit' === l && e.createElement( @@ -20001,7 +19996,7 @@ '{'.concat(n.name, '}') ), e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'unitgroup' === l && e.createElement( @@ -20012,7 +20007,7 @@ { id: a, name: ''.concat(n.name, '{id}[]'), className: s }, r && '{'.concat(n.name, '}') ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ) ); } @@ -20043,13 +20038,13 @@ ) ), e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }), - e.createElement(Vi, { item: n }), + e.createElement(Ui, { item: n }), e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) ), 'fieldgroup' === l && e.createElement( - Hi, - { title: n.title }, + e.Fragment, + null, e.createElement( 'select', { id: a, name: ''.concat(n.name, '[]'), className: p()({ 'acms-admin-form-width-full': i }) }, @@ -20068,7 +20063,7 @@ : null ) ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'customunit' === l && e.createElement( @@ -20089,7 +20084,7 @@ ) ), e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'unitgroup' === l && e.createElement( @@ -20103,7 +20098,7 @@ t.label ? e.createElement( 'option', - Ui( + Vi( { key: a, value: t.value }, r && { 'data-tmp': '{'.concat(n.name, ':selected#').concat(t.value, '}') } ), @@ -20115,57 +20110,130 @@ ) ); } - function $i(t) { - const { item: n, id: a = '', isChecked: r = !0 } = t, + function Yi(t) { + const { item: n, isChecked: a = !0 } = t, { - preview: { mode: l, acmscss: i }, + preview: { mode: r, acmscss: l }, } = u(); - let o = { id: a, name: '', hiddenName: '' }; - switch (l) { - case 'customfield': - o = { name: n.name, hiddenName: 'field[]' }; - break; - case 'fieldgroup': - o = { name: ''.concat(n.name, '[]') }; - break; - case 'customunit': - o = { name: ''.concat(n.name, '{id}'), hiddenName: 'unit[]' }; - break; - case 'unitgroup': - o = { name: ''.concat(n.name, '{id}[]') }; - } return e.createElement( e.Fragment, null, - n.option.map((t, l) => - t.label - ? e.createElement( - 'span', - { key: ''.concat(n.name).concat(l), className: p()({ 'acms-admin-form-checkbox': i }) }, - e.createElement('input', { - type: 'checkbox', - name: o.name, - value: t.value, - 'data-tmp': r && '{'.concat(n.name, ':checked#').concat(t.value, '}'), - id: 'input-checkbox-'.concat(n.name, '-').concat(a), - }), - e.createElement( - 'label', - { htmlFor: 'input-checkbox-'.concat(n.name, '-').concat(a) }, - e.createElement('i', { className: 'acms-admin-ico-checkbox' }), - t.label - ) - ) - : null - ), - 'customfield' === l || 'customunit' === l - ? e.createElement('input', { type: 'hidden', name: o.hiddenName, value: o.name }) - : null, - e.createElement(Vi, { item: n }), - e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) + 'customfield' === r && + e.createElement( + e.Fragment, + null, + n.option.map((t, a) => + t.label + ? e.createElement( + 'div', + { key: a, className: p()({ 'acms-admin-form-checkbox': l }) }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '[]'), + value: t.value, + 'data-tmp': '{'.concat(n.name, ':checked#').concat(t.value, '}'), + id: 'input-checkbox-'.concat(n.name, '-').concat(t.value), + }), + e.createElement( + 'label', + { htmlFor: 'input-checkbox-'.concat(n.name, '-').concat(t.value) }, + e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + t.label + ) + ) + : null + ), + e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }), + e.createElement(Ui, { item: n }), + e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) + ), + 'fieldgroup' === r && + e.createElement( + e.Fragment, + null, + n.option.map((t, r) => + t.label + ? e.createElement( + 'div', + { key: r, className: p()({ 'acms-admin-form-checkbox': l }) }, + e.createElement( + 'input', + Vi( + { type: 'checkbox', name: ''.concat(n.name, '[]'), value: t.value }, + a && { 'data-tmp': '{'.concat(n.name, ':checked#').concat(t.value, '}') }, + { id: 'input-checkbox-'.concat(n.name, '-').concat(t.value) } + ) + ), + e.createElement( + 'label', + { htmlFor: 'input-checkbox-'.concat(n.name, '-').concat(t.value) }, + e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + t.label + ) + ) + : null + ), + e.createElement(Ui, { item: n }) + ), + 'customunit' === r && + e.createElement( + e.Fragment, + null, + n.option.map((t, a) => + t.label + ? e.createElement( + 'div', + { key: a, className: p()({ 'acms-admin-form-checkbox': l }) }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '{id}[]'), + value: t.value, + 'data-tmp': '{'.concat(n.name, ':checked#').concat(t.value, '}'), + id: 'input-checkbox-'.concat(n.name, '-').concat(t.value, '-{id}'), + }), + e.createElement( + 'label', + { htmlFor: 'input-checkbox-'.concat(n.name, '-').concat(t.value, '-{id}') }, + e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + t.label + ) + ) + : null + ), + e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), + e.createElement(Ui, { item: n }) + ), + 'unitgroup' === r && + e.createElement( + Hi, + { title: n.title }, + n.option.map((t, r) => + t.label + ? e.createElement( + 'div', + { key: r, className: p()({ 'acms-admin-form-radio': l }) }, + e.createElement( + 'input', + Vi( + { type: 'checkbox', name: ''.concat(n.name, '{id}[]'), value: t.value }, + a && { 'data-tmp': '{'.concat(n.name, ':checked#').concat(t.value, '}') }, + { id: 'input-radio-'.concat(n.name, '-{id}-').concat(t.value) } + ) + ), + e.createElement( + 'label', + { htmlFor: 'input-radio-'.concat(n.name, '-{id}-').concat(t.value) }, + l && e.createElement('i', { className: 'acms-admin-ico-radio' }), + t.label + ) + ) + : null + ), + e.createElement(Ui, { item: n }) + ) ); } - function Yi(t) { + function $i(t) { const { item: n, isChecked: a = !0 } = t, { preview: { mode: r, acmscss: l }, @@ -20199,13 +20267,13 @@ : null ), e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }), - e.createElement(Vi, { item: n }), + e.createElement(Ui, { item: n }), e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) ), 'fieldgroup' === r && e.createElement( - Hi, - { title: n.title }, + e.Fragment, + null, n.option.map((t, r) => t.label ? e.createElement( @@ -20213,7 +20281,7 @@ { key: r, className: p()({ 'acms-admin-form-radio': l }) }, e.createElement( 'input', - Ui( + Vi( { type: 'radio', name: ''.concat(n.name, '[]'), value: t.value }, a && { 'data-tmp': '{'.concat(n.name, ':checked#').concat(t.value, '}') }, { id: 'input-radio-'.concat(n.name, '-').concat(t.value) } @@ -20228,7 +20296,7 @@ ) : null ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'customunit' === r && e.createElement( @@ -20256,7 +20324,7 @@ : null ), e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'unitgroup' === r && e.createElement( @@ -20269,7 +20337,7 @@ { key: r, className: p()({ 'acms-admin-form-radio': l }) }, e.createElement( 'input', - Ui( + Vi( { type: 'radio', name: ''.concat(n.name, '{id}[]'), value: t.value }, a && { 'data-tmp': '{'.concat(n.name, ':checked#').concat(t.value, '}') }, { id: 'input-radio-'.concat(n.name, '-{id}-').concat(t.value) } @@ -20284,7 +20352,7 @@ ) : null ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ) ); } @@ -20321,7 +20389,7 @@ }, e.createElement( 'img', - Ui( + Vi( { src: '{'.concat(n.name, '@thumbnail}'), className: p()('js-preview', { 'acms-admin-img-responsive': l }), @@ -20335,7 +20403,7 @@ '\x3c!-- ELSE --\x3e', e.createElement( 'img', - Ui( + Vi( { src: '' }, 'file' === n.mediaType ? { style: { width: '64px', height: 'auto', display: 'none' } } @@ -20454,7 +20522,7 @@ }, e.createElement( 'img', - Ui( + Vi( { src: '{'.concat(n.name, '@thumbnail}'), className: p()('js-preview', { 'acms-admin-img-responsive': l }), @@ -20468,7 +20536,7 @@ ), e.createElement( 'img', - Ui( + Vi( { alt: '', src: '' }, 'file' === n.mediaType ? { style: { width: '64px', height: 'auto', display: 'none' } } @@ -20523,7 +20591,7 @@ null, e.createElement( 'div', - Ui( + Vi( { className: 'js-droparea', 'data-width': ''.concat(n.dropAreaWidth, 'px'), @@ -20555,13 +20623,13 @@ ), e.createElement( 'input', - Ui( + Vi( { type: 'hidden', name: ''.concat(n.name, '[]') }, r && { value: 'preview' === i ? '' : '{'.concat(n.name, '}') }, { className: 'js-value' } ) ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'customunit' === o && e.createElement( @@ -20584,7 +20652,7 @@ }, e.createElement( 'img', - Ui( + Vi( { src: '{'.concat(n.name, '@thumbnail}'), className: p()('js-preview', { 'acms-admin-img-responsive': l }), @@ -20597,7 +20665,7 @@ '\x3c!-- ELSE --\x3e', e.createElement( 'img', - Ui( + Vi( { alt: '', src: '' }, 'file' === n.mediaType ? { style: { width: '64px', height: 'auto', display: 'none' } } @@ -20685,7 +20753,7 @@ }), e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}:extension'), value: 'media' }), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ), 'unitgroup' === o && e.createElement( @@ -20715,7 +20783,7 @@ }, e.createElement( 'img', - Ui( + Vi( { src: '{'.concat(n.name, '@thumbnail}'), className: p()('js-preview', { 'acms-admin-img-responsive': l }), @@ -20729,7 +20797,7 @@ ), e.createElement( 'img', - Ui( + Vi( { alt: '', src: '' }, 'file' === n.mediaType ? { style: { width: '64px', height: 'auto', display: 'none' } } @@ -20784,7 +20852,7 @@ null, e.createElement( 'div', - Ui( + Vi( { className: 'js-droparea' }, r && { 'data-thumbnail': '{'.concat(n.name, '@thumbnail}') }, r && { 'data-thumbnail-type': '{'.concat(n.name, '@type}') }, @@ -20816,13 +20884,13 @@ ), e.createElement( 'input', - Ui( + Vi( { type: 'hidden', name: ''.concat(n.name, '{id}[]') }, r && { value: 'preview' === i ? '' : '{'.concat(n.name, '}') }, { className: 'js-value' } ) ), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ) ) ); @@ -20830,374 +20898,676 @@ function Zi(t) { const { item: n, id: a, isAttribute: r = !0 } = t, { - preview: { acmscss: l, editMode: i, mode: o, direction: c }, + preview: { acmscss: l, editMode: i, mode: o }, } = u(); - let s = {}; - const m = (e) => { - let { condition: t, wrap: n, children: a } = e; - return t ? n(a) : a; - }; - return e.createElement( - e.Fragment, - null, - 'customfield' === o && - e.createElement( - 'div', - { className: p()({ 'js-img_resize_cf': n.resize }) }, - 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), - e.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), - className: p()({ 'acms-admin-img-responsive': l, 'js-img_resize_preview': n.resize }), - style: n.normalSize ? { width: ''.concat(n.normalSize, 'px') } : null, - alt: '{'.concat(n.name, '@alt}'), - }), - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@old'), - value: '{'.concat(n.name, '@path}'), - }), + let c = {}, + s = {}; + return ( + 'unitgroup' === o && + (n.normalSize && (c.maxWidth = ''.concat(n.normalSize, 'px')), + (s = Object.assign({}, c, { display: 'none' }))), + e.createElement( + e.Fragment, + null, + 'customfield' === o && e.createElement( 'div', - { className: p()({ 'acms-admin-form-checkbox': l }) }, + { className: p()({ 'js-img_resize_cf': n.resize }) }, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + className: p()({ 'acms-admin-img-responsive': l, 'js-img_resize_preview': n.resize }), + style: n.normalSize ? { width: ''.concat(n.normalSize, 'px') } : null, + alt: '{'.concat(n.name, '@alt}'), + }), e.createElement('input', { - type: 'checkbox', - name: ''.concat(n.name, '@edit'), - value: 'delete', - id: 'input-checkbox-'.concat(n.name, '@edit'), + type: 'hidden', + name: ''.concat(n.name, '@old'), + value: '{'.concat(n.name, '@path}'), }), e.createElement( - 'label', - { htmlFor: 'input-checkbox-'.concat(n.name, '@edit') }, - l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), - '削除' - ) - ), - 'preview' === i ? null : '\x3c!-- ELSE --\x3e', - e.createElement('img', { - alt: '', - src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), - className: p()({ 'acms-admin-img-responsive': l, 'js-img_resize_preview': n.resize }), - style: n.normalSize ? { width: ''.concat(n.normalSize, 'px'), display: 'none' } : { display: 'none' }, - }), - 'preview' === i ? null : '\x3c!-- END_IF --\x3e', - e.createElement('input', { - type: 'file', - id: a, - name: n.name, - size: '20', - className: p()({ 'js-img_resize_input': n.resize }), - }), - e.createElement('br', null), - n.alt && - e.createElement( - e.Fragment, - null, - '代替テキスト:', + 'div', + { className: p()({ 'acms-admin-form-checkbox': l }) }, e.createElement('input', { - type: 'text', - name: ''.concat(n.name, '@alt'), - value: '{'.concat(n.name, '@alt}'), - size: '40', - }) + type: 'checkbox', + name: ''.concat(n.name, '@edit'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '@edit'), + }), + e.createElement( + 'label', + { htmlFor: 'input-checkbox-'.concat(n.name, '@edit') }, + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + '削除' + ) ), - e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }), - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, ':extension'), value: 'image' }), - n.normalSize && - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@').concat(n.normal), - value: n.normalSize, + 'preview' === i ? null : '\x3c!-- ELSE --\x3e', + e.createElement('img', { + alt: '', + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + className: p()({ 'acms-admin-img-responsive': l, 'js-img_resize_preview': n.resize }), + style: n.normalSize ? { width: ''.concat(n.normalSize, 'px'), display: 'none' } : { display: 'none' }, }), - n.tiny && + 'preview' === i ? null : '\x3c!-- END_IF --\x3e', e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@').concat(n.tiny), - value: n.tinySize, + type: 'file', + id: a, + name: n.name, + size: '20', + className: p()({ 'js-img_resize_input': n.resize }), }), - n.large && - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@').concat(n.large), - value: n.largeSize, + e.createElement('br', null), + n.alt && + e.createElement( + e.Fragment, + null, + '代替テキスト:', + e.createElement('input', { + type: 'text', + name: ''.concat(n.name, '@alt'), + value: '{'.concat(n.name, '@alt}'), + size: '40', + }) + ), + e.createElement('input', { type: 'hidden', name: 'field[]', value: n.name }), + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, ':extension'), value: 'image' }), + n.normalSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.normal), + value: n.normalSize, + }), + n.tiny && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.tiny), + value: n.tinySize, + }), + n.large && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.large), + value: n.largeSize, + }), + n.square && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.square), + value: n.squareSize, + }), + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename'), value: '' }), + e.createElement(Ui, { item: n }), + e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) + ), + 'fieldgroup' === o && + e.createElement( + e.Fragment, + null, + e.createElement( + 'div', + { className: p()({ 'js-img_resize_cf': n.resize }) }, + r && + e.createElement( + e.Fragment, + null, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + className: p()({ 'js-img_resize_preview': n.resize }), + style: c, + alt: '{'.concat(n.name, '@alt}'), + }), + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@old[]'), + value: '{'.concat(n.name, '@path}'), + }), + e.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(n.name, '@edit[]'), + className: p()({ 'acms-admin-form-checkbox': l }), + }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '@edit[]'), + }), + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + '削除' + ), + 'preview' === i ? null : '\x3c!-- ELSE --\x3e', + e.createElement('img', { + alt: '', + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + className: p()({ 'js-img_resize_preview': n.resize }), + style: s, + }), + 'preview' === i ? null : '\x3c!-- END_IF --\x3e' + ), + !r && e.createElement('img', { src: '', alt: '', style: s, className: 'js-img_resize_preview' }), + e.createElement('input', { + type: 'file', + name: ''.concat(n.name, '[]'), + className: p()({ 'js-img_resize_input': n.resize }), + }), + e.createElement('br', null), + n.alt && + e.createElement( + e.Fragment, + null, + '代替テキスト:', + e.createElement('input', { + type: 'text', + name: ''.concat(n.name, '@alt[]'), + value: '{'.concat(n.name, '@alt}'), + size: '40', + }) + ), + n.normalSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.normal, '[]'), + value: n.normalSize, + }), + n.tinySize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.tiny, '[]'), + value: n.tinySize, + }), + n.largeSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.large, '[]'), + value: n.largeSize, + }), + n.square && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@').concat(n.square, '[]'), + value: n.squareSize, + }), + e.createElement(Ui, { item: n }) + ) + ), + 'customunit' === o && + e.createElement( + 'span', + { className: p()({ 'js-img_resize_cf': n.resize }) }, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + className: p()({ 'acms-admin-img-responsive': l, 'js-img_resize_preview': n.resize }), + style: n.normalSize ? { width: ''.concat(n.normalSize, 'px') } : null, + alt: '{'.concat(n.name, '@alt}'), }), - n.square && e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@').concat(n.square), - value: n.squareSize, + name: ''.concat(n.name, '{id}@old'), + value: '{'.concat(n.name, '@path}'), }), - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename'), value: '' }), - e.createElement(Vi, { item: n }), - e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) - ), - 'fieldgroup' === o && - ((d = e.createElement( - 'div', - { className: p()({ 'js-img_resize_cf': n.resize }) }, - r && e.createElement( - e.Fragment, - null, - 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), - e.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), - className: p()({ 'js-img_resize_preview': n.resize }), - style: {}, - alt: '{'.concat(n.name, '@alt}'), - }), + 'div', + { className: p()({ 'acms-admin-form-checkbox': l }) }, e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@old[]'), - value: '{'.concat(n.name, '@path}'), + type: 'checkbox', + name: ''.concat(n.name, '{id}@edit'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '{id}@edit'), }), e.createElement( 'label', - { - htmlFor: 'input-checkbox-'.concat(n.name, '@edit[]'), - className: p()({ 'acms-admin-form-checkbox': l }), - }, - e.createElement('input', { - type: 'checkbox', - name: ''.concat(n.name, '@edit[]'), - value: 'delete', - id: 'input-checkbox-'.concat(n.name, '@edit[]'), - }), + { htmlFor: 'input-checkbox-'.concat(n.name, '{id}@edit') }, l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), '削除' + ) + ), + 'preview' === i ? null : '\x3c!-- ELSE --\x3e', + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + alt: '', + className: p()({ 'acms-admin-img-responsive': l, 'js-img_resize_preview': n.resize }), + style: n.normalSize ? { width: ''.concat(n.normalSize, 'px'), display: 'none' } : { display: 'none' }, + }), + 'preview' === i ? null : '\x3c!-- END_IF --\x3e', + e.createElement('input', { + type: 'file', + name: ''.concat(n.name, '{id}'), + size: '20', + className: p()({ 'js-img_resize_input': n.resize }), + }), + e.createElement('br', null), + n.alt && + e.createElement( + e.Fragment, + null, + '代替テキスト:', + e.createElement('input', { + type: 'text', + name: ''.concat(n.name, '{id}@alt'), + value: '{'.concat(n.name, '@alt}'), + size: '40', + }) ), - 'preview' === i ? null : '\x3c!-- ELSE --\x3e', + e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}:extension'), value: 'image' }), + n.normalSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.normal), + value: n.normalSize, + }), + n.tiny && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.tiny), + value: n.tinySize, + }), + n.large && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.large), + value: n.largeSize, + }), + n.square && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.square), + value: n.squareSize, + }), + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}@filename'), value: '' }), + e.createElement(Ui, { item: n }) + ), + 'unitgroup' === o && + e.createElement( + Hi, + { title: n.title }, + e.createElement( + 'div', + { className: p()({ 'js-img_resize_cf': n.resize }) }, + r && + e.createElement( + e.Fragment, + null, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + e.createElement( + 'div', + null, + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), + className: p()({ 'js-img_resize_preview': n.resize }), + style: c, + alt: '{'.concat(n.name, '@alt}'), + }) + ), + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@old[]'), + value: '{'.concat(n.name, '@path}'), + }), + e.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(n.name, '{id}@edit[]'), + className: p()({ 'acms-admin-form-checkbox': l }), + }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '{id}@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '{id}@edit[]'), + }), + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + '削除' + ), + 'preview' === i ? null : '\x3c!-- ELSE --\x3e' + ), e.createElement('img', { alt: '', src: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}'), className: p()({ 'js-img_resize_preview': n.resize }), style: s, }), - 'preview' === i ? null : '\x3c!-- END_IF --\x3e' - ), - !r && e.createElement('img', { src: '', alt: '', style: s, className: 'js-img_resize_preview' }), - e.createElement('input', { - type: 'file', - name: ''.concat(n.name, '[]'), - className: p()({ 'js-img_resize_input': n.resize }), - }), - e.createElement('br', null), - n.alt && - e.createElement( - e.Fragment, - null, - '代替テキスト:', + r && 'preview' === i ? null : '\x3c!-- END_IF --\x3e', e.createElement('input', { - type: 'text', - name: ''.concat(n.name, '@alt[]'), - value: '{'.concat(n.name, '@alt}'), - size: '40', - }) - ), - n.normalSize && + type: 'file', + name: ''.concat(n.name, '{id}[]'), + className: p()({ 'js-img_resize_input': n.resize }), + }), + e.createElement('br', null), + n.alt && + e.createElement( + 'div', + null, + '代替テキスト:', + e.createElement('input', { + type: 'text', + name: ''.concat(n.name, '{id}@alt[]'), + value: '{'.concat(n.name, '@alt}'), + size: '40', + }) + ), + n.normal && + n.normalSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.normal, '[]'), + value: n.normalSize, + }), + n.tiny && + n.tinySize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.tiny, '[]'), + value: n.tinySize, + }), + n.large && + n.largeSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.large, '[]'), + value: n.largeSize, + }), + n.square && + n.squareSize && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@').concat(n.square, '[]'), + value: n.squareSize, + }), + r && e.createElement(Ui, { item: n }) + ) + ) + ) + ); + } + function Ji(t) { + const { item: n, id: a, isValue: r = !0 } = t, + { + preview: { acmscss: l, editMode: i, mode: o }, + } = u(); + let c = '/images/fileicon/', + s = 'file'; + return ( + n.extension ? ((c += ''.concat(n.extension, '.svg')), (s += n.extension)) : (c += 'file.svg'), + e.createElement( + e.Fragment, + null, + 'customfield' === o && + e.createElement( + e.Fragment, + null, + 'preview' === i ? null : '\x3c!-- BEGIN '.concat(n.name, '@path:veil --\x3e'), e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@').concat(n.normal, '[]'), - value: n.normalSize, + name: ''.concat(n.name, '@old'), + value: '{'.concat(n.name, '@path}'), }), - n.tinySize && e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@').concat(n.tiny, '[]'), - value: n.tinySize, + name: ''.concat(n.name, '@secret'), + value: '{'.concat(n.name, '@secret}'), }), - n.largeSize && e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@').concat(n.large, '[]'), - value: n.largeSize, + name: ''.concat(n.name, '@fileSize'), + value: '{'.concat(n.name, '@fileSize}'), }), - n.square && + e.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(n.name, '@edit'), + className: p()({ 'acms-admin-form-checkbox': l }), + }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '@edit'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '@edit'), + }), + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + '削除' + ), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}') }, + e.createElement('img', { src: c, width: '64', height: '64', alt: s }) + ), + 'preview' === i ? null : '\x3c!-- END '.concat(n.name, '@path:veil --\x3e'), + e.createElement('input', { type: 'file', name: n.name, id: a }), + e.createElement('input', { type: 'hidden', name: n.hiddenName, value: n.value }), e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@').concat(n.square, '[]'), - value: n.squareSize, - }), - e.createElement(Vi, { item: n }) - )), - (f = n.title), - e.createElement( - m, - { - condition: 'vertical' === c, - wrap: (t) => e.createElement('tr', null, e.createElement('th', null, f), t), - }, - d - )) - ); - var d, f; - } - function Ji(t) { - const { item: n, id: a, isValue: r = !0 } = t, - { - preview: { acmscss: l, editMode: i, mode: o, direction: c }, - } = u(); - let s = '/images/fileicon/', - m = 'file'; - n.extension ? ((s += ''.concat(n.extension, '.svg')), (m += n.extension)) : (s += 'file.svg'); - let d = { value: '', name: '', hiddenName: '' }; - switch (o) { - case 'customfield': - d = { id: a, value: ''.concat(n.name), name: n.name, hiddenName: 'field[]' }; - break; - case 'fieldgroup': - d = { id: a, value: '{'.concat(n.name, '}'), name: ''.concat(n.name, '[]') }; - break; - case 'customunit': - d = { id: a, value: '{'.concat(n.name, '}'), name: ''.concat(n.name, '{id}'), hiddenName: 'unit[]' }; - break; - case 'unitgroup': - d = { id: a, value: n.name, name: ''.concat(n.name, '{id}[]') }; - } - const f = (e) => { - let { condition: t, wrap: n, children: a } = e; - return t ? n(a) : a; - }; - return e.createElement( - e.Fragment, - null, - 'customfield' === o && - e.createElement( - e.Fragment, - null, - 'preview' === i ? null : '\x3c!-- BEGIN '.concat(n.name, '@path:veil --\x3e'), - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@old'), - value: '{'.concat(n.name, '@path}'), - }), - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@secret'), - value: '{'.concat(n.name, '@secret}'), - }), - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@fileSize'), - value: '{'.concat(n.name, '@fileSize}'), - }), - e.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(n.name, '@edit'), - className: p()({ 'acms-admin-form-checkbox': l }), - }, - e.createElement('input', { - type: 'checkbox', - name: ''.concat(n.name, '@edit'), - value: 'delete', - id: 'input-checkbox-'.concat(n.name, '@edit'), + name: ''.concat(n.name, '@baseName'), + value: '{'.concat(n.name, '@baseName}'), }), - l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), - '削除' + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, ':extension'), value: 'file' }), + n.extension && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@extension'), + value: n.extension, + }), + 'random' === n.fileNameMethod && + n.fileName && + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename'), value: '' }), + 'fix' === n.fileNameMethod && + n.fileName && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@filename'), + value: ''.concat(n.fileName), + }), + 'asis' === n.fileNameMethod && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@filename'), + value: '@rawfilename', + }), + e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) ), + 'fieldgroup' === o && e.createElement( - 'a', - { href: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}') }, - e.createElement('img', { src: s, width: '64', height: '64', alt: m }) + e.Fragment, + null, + r && + e.createElement( + e.Fragment, + null, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + e.createElement( + 'div', + { className: p()({ 'acms-admin-form-checkbox': l }) }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '{i}@edit[]'), + }), + e.createElement( + 'label', + { htmlFor: 'input-checkbox-'.concat(n.name, '{i}@edit[]') }, + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + ' 削除' + ) + ), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}') }, + e.createElement('img', { src: c, width: '64', height: '64', alt: s }) + ), + 'preview' === i ? null : '\x3c!-- END_IF --\x3e', + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@old[]'), + value: '{'.concat(n.name, '@path}'), + }) + ), + n.extension && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@extension[]'), + value: n.extension, + }), + 'random' === n.fileNameMethod && + n.fileName && + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename[]'), value: '' }), + 'fix' === n.fileNameMethod && + n.fileName && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@filename[]'), + value: n.fileName, + }), + 'asis' === n.fileNameMethod && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '@filename[]'), + value: '@rawfilename', + }), + e.createElement('input', { type: 'file', name: ''.concat(n.name, '[]') }), + e.createElement(Ui, { item: n }) ), - 'preview' === i ? null : '\x3c!-- END '.concat(n.name, '@path:veil --\x3e'), - e.createElement('input', { type: 'file', name: n.name }), - e.createElement('input', { type: 'hidden', name: d.hiddenName, value: d.value }), - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@baseName'), - value: '{'.concat(n.name, '@baseName}'), - }), - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, ':extension'), value: 'file' }), - n.extension && - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@extension'), value: n.extension }), - 'random' === n.fileNameMethod && - n.fileName && - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename'), value: '' }), - 'fix' === n.fileNameMethod && - n.fileName && + 'customunit' === o && + e.createElement( + e.Fragment, + null, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@filename'), - value: ''.concat(n.fileName), + name: ''.concat(n.name, '{id}@old'), + value: '{'.concat(n.name, '@path}'), }), - 'asis' === n.fileNameMethod && e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@filename'), - value: '@rawfilename', + name: ''.concat(n.name, '{id}@secret'), + value: '{'.concat(n.name, '@secret}'), + }), + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@fileSize'), + value: '{'.concat(n.name, '@fileSize}'), }), - e.createElement(Ki, { name: n.name, noSearch: n.noSearch }) - ), - 'fieldgroup' === o && - ((h = e.createElement( - e.Fragment, - null, - r && e.createElement( - e.Fragment, - null, - 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + 'label', + { + htmlFor: 'input-checkbox-'.concat(n.name, '{id}@edit'), + className: p()({ 'acms-admin-form-checkbox': l }), + }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '{id}@edit'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '{id}@edit'), + }), + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + '削除' + ), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}') }, + e.createElement('img', { src: c, width: '64', height: '64', alt: s }) + ), + 'preview' === i ? null : '\x3c!-- END_IF --\x3e', + e.createElement('input', { type: 'file', name: ''.concat(n.name, '{id}') }), + e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@baseName'), + value: '{'.concat(n.name, '@baseName}'), + }), + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}:extension'), value: 'file' }), + n.extension && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@extension'), + value: n.extension, + }), + 'random' === n.fileNameMethod && + n.fileName && + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}@filename'), value: '' }), + 'fix' === n.fileNameMethod && + n.fileName && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@filename'), + value: n.fileName, + }), + 'asis' === n.fileNameMethod && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@filename'), + value: '@rawfilename', + }), + e.createElement(Ui, { item: n }) + ), + 'unitgroup' === o && + e.createElement( + e.Fragment, + null, + r && e.createElement( - 'div', - { className: p()({ 'acms-admin-form-checkbox': l }) }, + e.Fragment, + null, + 'preview' === i ? null : '\x3c!-- BEGIN_IF [{'.concat(n.name, '@path}/nem] --\x3e'), + e.createElement( + 'div', + { className: p()({ 'acms-admin-form-checkbox': l }) }, + e.createElement('input', { + type: 'checkbox', + name: ''.concat(n.name, '{id}@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(n.name, '{id}@edit[]'), + }), + e.createElement( + 'label', + { htmlFor: 'input-checkbox-'.concat(n.name, '{id}@edit[]') }, + l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), + ' 削除' + ) + ), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}') }, + e.createElement('img', { src: c, width: '64', height: '64', alt: s }) + ), + 'preview' === i ? null : '\x3c!-- END_IF --\x3e', e.createElement('input', { - type: 'checkbox', - name: ''.concat(n.name, '@edit[]'), - value: 'delete', - id: 'input-checkbox-'.concat(n.name, '{i}@edit[]'), + type: 'hidden', + name: ''.concat(n.name, '{id}@old[]'), + value: '{'.concat(n.name, '@path}'), }), - e.createElement( - 'label', - { htmlFor: 'input-checkbox-'.concat(n.name, '{i}@edit[]') }, - l && e.createElement('i', { className: 'acms-admin-ico-checkbox' }), - ' 削除' - ) - ), - e.createElement( - 'a', - { href: '%{ARCHIVES_DIR}{'.concat(n.name, '@path}') }, - e.createElement('img', { src: s, width: '64', height: '64', alt: m }) + e.createElement(Ui, { item: n }) ), - 'preview' === i ? null : '\x3c!-- END_IF --\x3e', + e.createElement('input', { type: 'file', name: ''.concat(n.name, '{id}[]') }), + !r && + n.extension && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@extension[]'), + value: '{extension}', + }), + 'random' === n.fileNameMethod && + n.fileName && + e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}@filename[]'), value: '' }), + 'fix' === n.fileNameMethod && + n.fileName && + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, '{id}@filename[]'), + value: n.fileName, + }), + 'asis' === n.fileNameMethod && e.createElement('input', { type: 'hidden', - name: ''.concat(n.name, '@old[]'), - value: '{'.concat(n.name, '@path}'), + name: ''.concat(n.name, '{id}@filename[]'), + value: '@rawfilename', }) - ), - n.extension && - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@extension[]'), - value: n.extension, - }), - 'random' === n.fileNameMethod && - n.fileName && - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename[]'), value: '' }), - 'fix' === n.fileNameMethod && - n.fileName && - e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename[]'), value: n.fileName }), - 'asis' === n.fileNameMethod && - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, '@filename[]'), - value: '@rawfilename', - }), - e.createElement('input', { type: 'file', name: ''.concat(n.name, '[]') }), - e.createElement(Vi, { item: n }) - )), - (g = n.title), - e.createElement( - f, - { - condition: 'vertical' === c, - wrap: (t) => e.createElement('tr', null, e.createElement('th', null, g), t), - }, - h - )) + ) + ) ); - var h, g; } function eo(t) { const { item: n, id: a = '', isValue: r = !0 } = t, @@ -21258,63 +21628,59 @@ ), 'fieldgroup' === l && e.createElement( - Hi, - { title: n.title }, - e.createElement( - i, - { - condition: n.useExpand, - wrap: (t) => + i, + { + condition: n.useExpand, + wrap: (t) => + e.createElement( + 'div', + { className: 'js-expand js-acms-expand' }, e.createElement( 'div', - { className: 'js-expand js-acms-expand' }, + { className: 'js-acms-expand-inner' }, e.createElement( - 'div', - { className: 'js-acms-expand-inner' }, - e.createElement( - 'button', - { className: 'js-expand-btn js-acms-expand-btn', type: 'button' }, - e.createElement('i', { - className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', - }) - ), - t - ) - ), - }, - e.createElement( - 'div', - { - className: 'js-smartblock', - 'data-heading-start': n.startHeadingLevel, - 'data-heading-end': n.endHeadingLevel, - }, - e.createElement('div', { className: 'js-smartblock-edit' }), - r - ? e.createElement( - e.Fragment, - null, - e.createElement('input', { - id: a, - className: 'js-smartblock-body', - type: 'hidden', - name: ''.concat(n.name, '[]'), - value: '{'.concat(n.name, '@html}'), - }), - e.createElement('input', { - type: 'hidden', - name: ''.concat(n.name, ':extension'), - value: 'rich-editor', + 'button', + { className: 'js-expand-btn js-acms-expand-btn', type: 'button' }, + e.createElement('i', { + className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', }) - ) - : e.createElement('input', { + ), + t + ) + ), + }, + e.createElement( + 'div', + { + className: 'js-smartblock', + 'data-heading-start': n.startHeadingLevel, + 'data-heading-end': n.endHeadingLevel, + }, + e.createElement('div', { className: 'js-smartblock-edit' }), + r + ? e.createElement( + e.Fragment, + null, + e.createElement('input', { id: a, className: 'js-smartblock-body', type: 'hidden', name: ''.concat(n.name, '[]'), - value: '', + value: '{'.concat(n.name, '@html}'), + }), + e.createElement('input', { + type: 'hidden', + name: ''.concat(n.name, ':extension'), + value: 'rich-editor', }) - ) + ) + : e.createElement('input', { + id: a, + className: 'js-smartblock-body', + type: 'hidden', + name: ''.concat(n.name, '[]'), + value: '', + }) ) ), 'customunit' === l && @@ -21469,8 +21835,8 @@ ), 'fieldgroup' === l && e.createElement( - Hi, - { title: n.title }, + e.Fragment, + null, e.createElement( 'div', { className: 'js-editable-table-field' }, @@ -21499,7 +21865,7 @@ 'preview' === i ? null : '\x3c!-- END_IF --\x3e', e.createElement( 'input', - Ui( + Vi( { id: a, type: 'hidden', className: 'js-editable-table-dest' }, r && { value: '{'.concat(n.name, '}') }, { name: ''.concat(n.name, '[]') } @@ -21577,7 +21943,7 @@ 'preview' === i ? null : '\x3c!-- END_IF --\x3e', e.createElement( 'input', - Ui( + Vi( { id: a, type: 'hidden', className: 'js-editable-table-dest' }, r && { value: '{'.concat(n.name, '}') }, { name: ''.concat(n.name, '{id}[]') } @@ -21657,7 +22023,7 @@ e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement($i, { item: t }) + e.createElement(Yi, { item: t }) ) ); case 'radioButton': @@ -21672,7 +22038,7 @@ e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Yi, { item: t }) + e.createElement($i, { item: t }) ) ); case 'media': @@ -21778,14 +22144,14 @@ 'tr', { key: n }, e.createElement('th', null, e.createElement(qi, { item: t })), - e.createElement('td', null, e.createElement($i, { item: t })) + e.createElement('td', null, e.createElement(Yi, { item: t })) ); case 'radioButton': return e.createElement( 'tr', { key: n }, e.createElement('th', null, e.createElement(qi, { item: t })), - e.createElement('td', null, e.createElement(Yi, { item: t })) + e.createElement('td', null, e.createElement($i, { item: t })) ); case 'media': return e.createElement( @@ -21939,7 +22305,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'selectbox': @@ -21969,7 +22335,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'media': @@ -22126,7 +22492,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement($i, { item: t, id: 'template-'.concat(t.name).concat(n), isChecked: !1 }) + e.createElement(Yi, { item: t, id: 'template-'.concat(t.name).concat(n), isChecked: !1 }) ) ); case 'selectbox': @@ -22156,7 +22522,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) ) ); case 'media': @@ -22447,25 +22813,16 @@ ); } function io() { - const { - state: { fieldgroup: t }, - preview: { acmscss: n, direction: a, editMode: r }, - } = u(), - l = (0, e.useRef)(), - i = (e) => { - let { condition: t, wrap: n, children: a } = e; - return t ? n(a) : a; - }, - o = t.items.length, - c = (t, n) => - e.createElement( - i, - { - condition: 'vertical' === a, - wrap: (t) => e.createElement('tr', null, e.createElement('th', null, n), t), - }, - t - ); + const { + state: { fieldgroup: t }, + preview: { acmscss: n, direction: a, editMode: r }, + } = u(), + l = (0, e.useRef)(), + i = (e) => { + let { condition: t, wrap: n, children: a } = e; + return t ? n(a) : a; + }, + o = t.items.length; return e.createElement( e.Fragment, null, @@ -22523,267 +22880,238 @@ { className: 'sortable-item' }, e.createElement( 'td', - { className: 'item-handle acms-admin-table-nowrap' }, - n && e.createElement('i', { className: 'acms-admin-icon-sort' }) - ), - e.createElement( - i, - { - condition: 'vertical' === a, - wrap: (t) => e.createElement('td', null, e.createElement('table', null, t)), - }, - e.createElement( - e.Fragment, - null, - t.items.map((t, n) => { - switch (t.type) { - case 'text': - return c( - e.createElement( - 'td', - null, - e.createElement(Gi, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'textarea': - return c( - e.createElement( - 'td', - null, - e.createElement(Wi, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'checkbox': - return c( - e.createElement( - 'td', - null, - e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'selectbox': - return c( - e.createElement( - 'td', - null, - e.createElement(Xi, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'radioButton': - return c( - e.createElement( - 'td', - null, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'media': - return c( - e.createElement( - 'td', - null, - e.createElement(Qi, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'image': - return c( - e.createElement( - 'td', - null, - e.createElement(Zi, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - case 'richEditor': - return c( - e.createElement( - 'td', - null, - e.createElement( - i, - { - condition: t.useExpand, - wrap: (t) => - e.createElement( - 'div', - { className: 'js-expand js-acms-expand' }, - e.createElement( - 'div', - { className: 'js-acms-expand-inner' }, - e.createElement( - 'button', - { className: 'js-expand-btn js-acms-expand-btn', type: 'button' }, - e.createElement('i', { - className: - 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', - }) - ), - t - ) - ), - }, - e.createElement(eo, { item: t, id: ''.concat(t.name).concat(n) }) - ) - ), - t.title - ); - case 'table': - return c( - e.createElement( - 'td', - null, - e.createElement(to, { item: t, id: ''.concat(t.name).concat(n) }) - ), - t.title - ); - default: - return null; - } - }) - ) - ), - e.createElement( - 'td', - { className: 'acms-admin-table-nowrap' }, - e.createElement( - 'button', - { - type: 'button', - className: p()('item-delete', { 'acms-admin-btn-admin acms-admin-btn-admin-danger': n }), - }, - '削除' - ) - ) - ), - 'preview' === r ? null : '\x3c!-- END '.concat(t.name, ':loop --\x3e'), - 'preview' === r - ? null - : e.createElement( - e.Fragment, - null, - e.createElement( - 'tr', - { className: 'sortable-item item-template' }, - e.createElement( - 'td', - { className: 'item-handle acms-admin-table-nowrap' }, - n && e.createElement('i', { className: 'acms-admin-icon-sort' }) - ), - e.createElement( - i, - { - condition: 'vertical' === a, - wrap: (t) => e.createElement('td', null, e.createElement('table', null, t)), - }, - e.createElement( - e.Fragment, - null, - t.items.map((t, n) => { - switch (t.type) { - case 'text': - return c( - e.createElement( - 'td', - null, - e.createElement(Gi, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) - ), - t.title - ); - case 'textarea': - return c( - e.createElement( - 'td', - null, - e.createElement(Wi, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) - ), - t.title - ); - case 'checkbox': - return c( - e.createElement( - 'td', - null, - e.createElement($i, { - item: t, - id: 'template-'.concat(t.name).concat(n), - isChecked: !1, - }) - ), - t.title - ); - case 'selectbox': - return c( - e.createElement( - 'td', - null, - e.createElement(Xi, { - item: t, - id: ''.concat(t.name).concat(n), - isSelected: !1, - }) - ), - t.title - ); - case 'radioButton': - return c( - e.createElement( - 'td', - null, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) - ), - t.title - ); - case 'media': - return c( - e.createElement( - 'td', - null, - e.createElement(Qi, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) - ), - t.title - ); - case 'image': - return c( - e.createElement( - 'td', - null, - e.createElement(Zi, { - item: t, - id: ''.concat(t.name).concat(n), - isAttribute: !1, - }) - ), - t.title - ); - case 'richEditor': - return c( - e.createElement( - 'td', - null, - e.createElement(eo, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) - ), - t.title - ); - case 'table': - return c( + { className: 'item-handle acms-admin-table-nowrap' }, + n && e.createElement('i', { className: 'acms-admin-icon-sort' }) + ), + e.createElement( + e.Fragment, + null, + t.items.map((t, n) => { + switch (t.type) { + case 'text': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Gi, { item: t, id: ''.concat(t.name).concat(n) }) + ) + ); + case 'textarea': + return e.createElement( + Hi, + { title: t.title }, + e.createElement(Wi, { item: t, id: ''.concat(t.name).concat(n) }) + ); + case 'checkbox': + return e.createElement( + Hi, + { title: t.title }, + e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) + ); + case 'selectbox': + return e.createElement( + Hi, + { title: t.title }, + e.createElement(Xi, { item: t, id: ''.concat(t.name).concat(n) }) + ); + case 'radioButton': + return e.createElement( + Hi, + { title: t.title }, + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) + ); + case 'media': + return e.createElement( + Hi, + { title: t.title }, + e.createElement(Qi, { item: t, id: ''.concat(t.name).concat(n) }) + ); + case 'image': + return e.createElement( + Hi, + { title: t.title }, + e.createElement(Zi, { item: t, id: ''.concat(t.name).concat(n) }) + ); + case 'richEditor': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement( + i, + { + condition: t.useExpand, + wrap: (t) => e.createElement( - 'td', - null, - e.createElement(to, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + 'div', + { className: 'js-expand js-acms-expand' }, + e.createElement( + 'div', + { className: 'js-acms-expand-inner' }, + e.createElement( + 'button', + { className: 'js-expand-btn js-acms-expand-btn', type: 'button' }, + e.createElement('i', { + className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', + }) + ), + t + ) ), - t.title - ); - default: - return null; - } - }) - ) + }, + e.createElement(eo, { item: t, id: ''.concat(t.name).concat(n) }) + ) + ) + ); + case 'table': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(to, { item: t, id: ''.concat(t.name).concat(n) }) + ) + ); + default: + return null; + } + }) + ), + e.createElement( + 'td', + { className: 'acms-admin-table-nowrap' }, + e.createElement( + 'button', + { + type: 'button', + className: p()('item-delete', { 'acms-admin-btn-admin acms-admin-btn-admin-danger': n }), + }, + '削除' + ) + ) + ), + 'preview' === r ? null : '\x3c!-- END '.concat(t.name, ':loop --\x3e'), + 'preview' === r + ? null + : e.createElement( + e.Fragment, + null, + e.createElement( + 'tr', + { className: 'sortable-item item-template' }, + e.createElement( + 'td', + { className: 'item-handle acms-admin-table-nowrap' }, + n && e.createElement('i', { className: 'acms-admin-icon-sort' }) + ), + e.createElement( + e.Fragment, + null, + t.items.map((t, n) => { + switch (t.type) { + case 'text': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Gi, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + ) + ); + case 'textarea': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Wi, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + ) + ); + case 'checkbox': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Yi, { + item: t, + id: 'template-'.concat(t.name).concat(n), + isChecked: !1, + }) + ) + ); + case 'selectbox': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Xi, { item: t, id: ''.concat(t.name).concat(n), isSelected: !1 }) + ) + ); + case 'radioButton': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) + ) + ); + case 'media': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Qi, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + ) + ); + case 'image': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(Zi, { item: t, id: ''.concat(t.name).concat(n), isAttribute: !1 }) + ) + ); + case 'richEditor': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(eo, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + ) + ); + case 'table': + return e.createElement( + Hi, + { title: t.title }, + e.createElement( + 'td', + null, + e.createElement(to, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + ) + ); + default: + return null; + } + }) ), e.createElement( 'td', @@ -23086,7 +23414,7 @@ e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement($i, { item: t }) + e.createElement(Yi, { item: t }) ) ); case 'radioButton': @@ -23101,7 +23429,7 @@ e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Yi, { item: t }) + e.createElement($i, { item: t }) ) ); case 'media': @@ -23168,7 +23496,7 @@ } function so() { const { - state: { customfield: t }, + state: { customunit: t }, preview: { jsValidator: n, acmscss: a }, } = u(); return e.createElement( @@ -23207,14 +23535,14 @@ 'tr', { key: n }, e.createElement('th', null, e.createElement(qi, { item: t })), - e.createElement('td', null, e.createElement($i, { item: t })) + e.createElement('td', null, e.createElement(Yi, { item: t })) ); case 'radioButton': return e.createElement( 'tr', { key: n }, e.createElement('th', null, e.createElement(qi, { item: t })), - e.createElement('td', null, e.createElement(Yi, { item: t })) + e.createElement('td', null, e.createElement($i, { item: t })) ); case 'media': return e.createElement( @@ -23368,7 +23696,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'selectbox': @@ -23398,7 +23726,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'media': @@ -23555,7 +23883,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement($i, { item: t, id: 'template-'.concat(t.name).concat(n), isChecked: !1 }) + e.createElement(Yi, { item: t, id: 'template-'.concat(t.name).concat(n), isChecked: !1 }) ) ); case 'selectbox': @@ -23585,7 +23913,7 @@ e.createElement( 'div', { className: 'acms-admin-form-item-input' }, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) ) ); case 'media': @@ -23865,7 +24193,7 @@ e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: ''.concat(n.name, '{id}') }), n.noSearch && e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '{id}:search'), value: '0' }), - e.createElement(Vi, { item: n }) + e.createElement(Ui, { item: n }) ) ), e.createElement('input', { type: 'hidden', name: 'unit{id}[]', value: '@'.concat(t.name, '{id}') }) @@ -23874,7 +24202,7 @@ } function po() { const { - state: { fieldgroup: t }, + state: { unitgroup: t }, preview: { acmscss: n, direction: a, editMode: r }, } = u(), l = (0, e.useRef)(), @@ -23902,7 +24230,7 @@ null, e.createElement( 'table', - { className: p()('js-fieldgroup-sortable', { 'adminTable acms-admin-table-admin-edit': n }), ref: l }, + { className: p()('js-unitgroup-sortable', { 'adminTable acms-admin-table-admin-edit': n }), ref: l }, e.createElement( 'thead', { className: p()({ 'acms-admin-hide-sp': n }) }, @@ -23986,7 +24314,7 @@ e.createElement( 'td', null, - e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) ), t.title ); @@ -24004,7 +24332,7 @@ e.createElement( 'td', null, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n) }) ), t.title ); @@ -24135,7 +24463,7 @@ e.createElement( 'td', null, - e.createElement($i, { + e.createElement(Yi, { item: t, id: 'template-'.concat(t.name).concat(n), isChecked: !1, @@ -24161,7 +24489,7 @@ e.createElement( 'td', null, - e.createElement(Yi, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) + e.createElement($i, { item: t, id: ''.concat(t.name).concat(n), isChecked: !1 }) ), t.title ); @@ -24432,20 +24760,444 @@ ) ); } - function fo() { + function fo() { + const { + preview: { tag: t }, + } = u(); + return e.createElement( + e.Fragment, + null, + 'section' === t ? e.createElement(mo, null) : null, + 'table' === t ? e.createElement(po, null) : null + ); + } + function ho() { + const { + state: { customfield: t }, + preview: { acmscss: n }, + } = u(); + return e.createElement( + 'table', + { className: p()({ 'acms-admin-table-admin-edit': n }) }, + t.map((t, n) => { + if (!t.name) return null; + if ('text' === t.type) + return e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement('td', null, '{'.concat(t.name, '}')) + ); + if ('textarea' === t.type) + return e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement('td', null, '{'.concat(t.name, '}[escape|nl2br]')) + ); + if ('select' === t.type) + return e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement( + 'td', + null, + t.option.map((n) => + e.createElement( + 'div', + { key: n.value }, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '}/eq/').concat(n.value, '] --\x3e'), + n.value, + '\x3c!-- END_IF --\x3e' + ) + ) + ) + ); + if ('radio' === t.type) + return e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement( + 'td', + null, + t.option.map((e) => + '\x3c!-- BEGIN_IF [{' + .concat(t.name, '}/eq/') + .concat(e.value, '] --\x3e\n ') + .concat(e.label, '\n \x3c!-- END_IF --\x3e') + ) + ) + ); + if ('checkbox' === t.type) + return e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement( + 'td', + null, + '\x3c!-- BEGIN '.concat(t.name, ':loop --\x3e'), + '\x3c!-- BEGIN '.concat(t.name, ':glue --\x3e,\x3c!-- END ').concat(t.name, ':glue --\x3e'), + t.option.map((e) => + '\x3c!-- BEGIN_IF [{' + .concat(t.name, '}/eq/') + .concat(e.value, '] --\x3e\n ') + .concat(e.label, '\n \x3c!-- END_IF --\x3e') + ), + '\x3c!-- END '.concat(t.name, ':loop --\x3e') + ) + ); + if ('file' === t.type) { + let a = '/images/fileicon/', + r = 'file'; + return ( + t.extension ? ((a += ''.concat(t.extension, '.svg')), (r += t.extension)) : (a += 'file.svg'), + e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement( + 'td', + null, + '\x3c!-- BEGIN '.concat(t.name, '@path:veil --\x3e'), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(t.name, '@path}') }, + e.createElement('img', { src: a, width: '64', height: '64', alt: r }) + ), + '\x3c!-- END '.concat(t.name, '@path:veil --\x3e') + ) + ) + ); + } + return 'image' === t.type + ? e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement( + 'td', + null, + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(t.name, '@path}'), + width: '64', + height: '64', + alt: '{'.concat(t.name, '@alt}'), + }) + ) + ) + : 'media' === t.type + ? e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement( + 'td', + null, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@type}/eq/file] --\x3e'), + e.createElement( + 'a', + { href: '{'.concat(t.name, '@path}') }, + e.createElement('img', { + alt: '{'.concat(t.name, '@alt}'), + src: '{'.concat(t.name, '@thumbnail}'), + style: { width: '64px', height: 'auto' }, + }) + ), + '\x3c!-- END_IF --\x3e', + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@type}/eq/image] --\x3e'), + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@link}/nem] --\x3e'), + e.createElement( + 'a', + { href: '{'.concat(t.name, '@link}') }, + '\x3c!-- END_IF --\x3e', + t.useFocusImage && + e.createElement( + 'div', + { + style: { + width: ''.concat(t.focusImageWidth, 'px'), + height: ''.concat(t.focusImageHeight, 'px'), + }, + }, + e.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(t.name, '@focalX}'), + 'data-focus-y': '{'.concat(t.name, '@focalY}'), + alt: '{'.concat(t.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(t.name, '@path}[resizeImg(') + .concat(t.focusImageWidth, ')]'), + width: t.focusImageWidth, + height: '{'.concat(t.name, '@ratio}[getHeightFromRatio(').concat(t.focusImageWidth, ')]'), + }) + ), + !t.useFocusImage && + e.createElement('img', { + alt: '{'.concat(t.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(t.name, '@path}'), + width: '300', + height: '{'.concat(t.name, '@ratio}[getHeightFromRatio(300)]'), + }), + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@link}/nem] --\x3e') + ), + '\x3c!-- END_IF --\x3e', + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@text}/nem] --\x3e'), + e.createElement('p', null, '{'.concat(t.name, '@text}')), + '\x3c!-- END_IF --\x3e', + '\x3c!-- END_IF --\x3e' + ) + ) + : 'rich-editor' === t.type + ? e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement('td', null, '{'.concat(t.name, '@html}[raw]')) + ) + : 'lite-editor' === t.type || 'table' === t.type + ? e.createElement( + 'tr', + { key: n }, + e.createElement('th', null, t.title), + e.createElement('td', null, '{'.concat(t.name, '}[raw]')) + ) + : void 0; + }) + ); + } + function go() { + return e.createElement(ho, null); + } + function Eo() { const { - preview: { tag: t }, - } = u(); + state: { fieldgroup: t }, + preview: { acmscss: n, direction: a }, + } = u(), + r = (e) => { + let { condition: t, wrap: n, children: a } = e; + return t ? n(a) : a; + }; return e.createElement( e.Fragment, null, - 'section' === t ? e.createElement(mo, null) : null, - 'table' === t ? e.createElement(po, null) : null + t.title && e.createElement('h2', { className: p()({ 'acms-admin-admin-title2': n }) }, t.title), + e.createElement( + 'table', + { className: p()({ 'adminTable acms-admin-table-admin-edit': n }) }, + 'horizontal' === a && + e.createElement( + e.Fragment, + null, + t && + e.createElement( + 'thead', + { className: p()({ 'acms-admin-hide-sp': n }) }, + e.createElement( + 'tr', + null, + t.items.map((t, a) => + e.createElement('th', { key: a, className: p()({ 'acms-admin-table-left': n }) }, t.title) + ) + ) + ) + ), + e.createElement( + 'tbody', + null, + '\x3c!-- BEGIN '.concat(t.name, ':loop --\x3e'), + e.createElement( + 'tr', + null, + e.createElement( + r, + { + condition: 'vertical' === a, + wrap: (t) => e.createElement('td', null, e.createElement('table', null, t)), + }, + t.items.map((t, a) => { + if ('text' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}')) + ); + if ('textarea' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}[escape|nl2br]')) + ); + if ('select' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + t.option.map((n, a) => + n.label + ? e.createElement( + 'div', + { key: a }, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '}/eq/').concat(n.value, '] --\x3e'), + n.label, + '\x3c!-- END_IF --\x3e' + ) + : null + ) + ) + ); + if ('radio' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + t.option.map((n, a) => + n.label + ? e.createElement( + 'div', + { key: a }, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '}/eq/').concat(n.value, '] --\x3e'), + n.label, + '\x3c!-- END_IF --\x3e' + ) + : null + ) + ) + ); + if ('file' === t.type) { + let n = '/images/fileicon/', + r = 'file'; + return ( + t.extension ? ((n += ''.concat(t.extension, '.svg')), (r += t.extension)) : (n += 'file.svg'), + e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + '\x3c!-- BEGIN '.concat(t.name, '@path:veil --\x3e'), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(t.name, '@path}') }, + e.createElement('img', { src: n, width: '64', height: '64', alt: r }) + ), + '\x3c!-- END '.concat(t.name, '@path:veil --\x3e') + ) + ) + ); + } + return 'image' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + '\x3c!-- BEGIN '.concat(t.name, '@path:veil --\x3e'), + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(t.name, '@path}'), + className: p()({ 'acms-admin-img-responsive': n }), + alt: '{'.concat(t.name, '@alt}'), + }), + '\x3c!-- END '.concat(t.name, '@path:veil --\x3e') + ) + ) + : 'media' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@type}/eq/file] --\x3e'), + e.createElement( + 'a', + { href: '{'.concat(t.name, '@path}') }, + e.createElement('img', { + alt: '{'.concat(t.name, '@alt}'), + src: '{'.concat(t.name, '@thumbnail}'), + style: { width: '64px', height: 'auto' }, + }) + ), + '\x3c!-- END_IF --\x3e', + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@type}/eq/image] --\x3e'), + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@link}/nem] --\x3e'), + e.createElement( + 'a', + { href: '{'.concat(t.name, '@link}') }, + '\x3c!-- END_IF --\x3e', + t.useFocusImage && + e.createElement( + 'div', + { + style: { + width: ''.concat(t.focusImageWidth, 'px'), + height: ''.concat(t.focusImageHeight, 'px'), + }, + }, + e.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(t.name, '@focalX}'), + 'data-focus-y': '{'.concat(t.name, '@focalY}'), + alt: '{'.concat(t.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(t.name, '@path}[resizeImg(') + .concat(t.focusImageWidth, ')]'), + }) + ), + !t.useFocusImage && + e.createElement('img', { + alt: '{'.concat(t.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(t.name, '@path}'), + }), + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@link}/nem] --\x3e') + ), + '\x3c!-- END_IF --\x3e', + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@text}/nem] --\x3e'), + e.createElement('p', null, '{'.concat(t.name, '@text}')), + '\x3c!-- END_IF --\x3e', + '\x3c!-- END_IF --\x3e' + ) + ) + : 'lite-editor' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}[raw]')) + ) + : 'rich-editor' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '@html}[raw]')) + ) + : 'table' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}[raw]')) + ) + : null; + }) + ) + ), + '\x3c!-- END '.concat(t.name, ':loop --\x3e') + ) + ) ); } - function ho() { + function bo() { + return e.createElement(Eo, null); + } + function vo() { const { - state: { customfield: t }, + state: { customunit: t }, preview: { acmscss: n }, } = u(); return e.createElement( @@ -24640,34 +25392,248 @@ }) ); } - function go() { + function yo() { + return e.createElement(vo, null); + } + function xo() { const { - state: { - preview: { tag: t }, - }, - } = u(); + state: { unitgroup: t }, + preview: { acmscss: n, direction: a }, + } = u(), + r = (e) => { + let { condition: t, wrap: n, children: a } = e; + return t ? n(a) : a; + }; return e.createElement( e.Fragment, null, - 'section' === t ? e.createElement(ho, null) : null, - 'table' === t ? e.createElement(ho, null) : null + t.title && e.createElement('h2', { className: p()({ 'acms-admin-admin-title2': n }) }, t.title), + e.createElement( + 'table', + { className: p()({ 'adminTable acms-admin-table-admin-edit': n }) }, + 'horizontal' === a && + e.createElement( + e.Fragment, + null, + t && + e.createElement( + 'thead', + { className: p()({ 'acms-admin-hide-sp': n }) }, + e.createElement( + 'tr', + null, + t.items.map((t, a) => + e.createElement('th', { key: a, className: p()({ 'acms-admin-table-left': n }) }, t.title) + ) + ) + ) + ), + e.createElement( + 'tbody', + null, + '\x3c!-- BEGIN '.concat(t.name, ':loop --\x3e'), + e.createElement( + 'tr', + null, + e.createElement( + r, + { + condition: 'vertical' === a, + wrap: (t) => e.createElement('td', null, e.createElement('table', null, t)), + }, + t.items.map((t, a) => { + if ('text' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}')) + ); + if ('textarea' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}[escape|nl2br]')) + ); + if ('select' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + t.option.map((n, a) => + n.label + ? e.createElement( + 'div', + { key: a }, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '}/eq/').concat(n.value, '] --\x3e'), + n.label, + '\x3c!-- END_IF --\x3e' + ) + : null + ) + ) + ); + if ('radio' === t.type) + return e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + t.option.map((n, a) => + n.label + ? e.createElement( + 'div', + { key: a }, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '}/eq/').concat(n.value, '] --\x3e'), + n.label, + '\x3c!-- END_IF --\x3e' + ) + : null + ) + ) + ); + if ('file' === t.type) { + let n = '/images/fileicon/', + r = 'file'; + return ( + t.extension ? ((n += ''.concat(t.extension, '.svg')), (r += t.extension)) : (n += 'file.svg'), + e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + '\x3c!-- BEGIN '.concat(t.name, '@path:veil --\x3e'), + e.createElement( + 'a', + { href: '%{ARCHIVES_DIR}{'.concat(t.name, '@path}') }, + e.createElement('img', { src: n, width: '64', height: '64', alt: r }) + ), + '\x3c!-- END '.concat(t.name, '@path:veil --\x3e') + ) + ) + ); + } + return 'image' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + '\x3c!-- BEGIN '.concat(t.name, '@path:veil --\x3e'), + e.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(t.name, '@path}'), + className: p()({ 'acms-admin-img-responsive': n }), + alt: '{'.concat(t.name, '@alt}'), + }), + '\x3c!-- END '.concat(t.name, '@path:veil --\x3e') + ) + ) + : 'media' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement( + 'td', + null, + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@type}/eq/file] --\x3e'), + e.createElement( + 'a', + { href: '{'.concat(t.name, '@path}') }, + e.createElement('img', { + alt: '{'.concat(t.name, '@alt}'), + src: '{'.concat(t.name, '@thumbnail}'), + style: { width: '64px', height: 'auto' }, + }) + ), + '\x3c!-- END_IF --\x3e', + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@type}/eq/image] --\x3e'), + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@link}/nem] --\x3e'), + e.createElement( + 'a', + { href: '{'.concat(t.name, '@link}') }, + '\x3c!-- END_IF --\x3e', + t.useFocusImage && + e.createElement( + 'div', + { + style: { + width: ''.concat(t.focusImageWidth, 'px'), + height: ''.concat(t.focusImageHeight, 'px'), + }, + }, + e.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(t.name, '@focalX}'), + 'data-focus-y': '{'.concat(t.name, '@focalY}'), + alt: '{'.concat(t.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(t.name, '@path}[resizeImg(') + .concat(t.focusImageWidth, ')]'), + }) + ), + !t.useFocusImage && + e.createElement('img', { + alt: '{'.concat(t.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(t.name, '@path}'), + }), + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@link}/nem] --\x3e') + ), + '\x3c!-- END_IF --\x3e', + '\x3c!-- BEGIN_IF [{'.concat(t.name, '@text}/nem] --\x3e'), + e.createElement('p', null, '{'.concat(t.name, '@text}')), + '\x3c!-- END_IF --\x3e', + '\x3c!-- END_IF --\x3e' + ) + ) + : 'lite-editor' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}[raw]')) + ) + : 'rich-editor' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '@html}[raw]')) + ) + : 'table' === t.type + ? e.createElement( + Hi, + { key: a, title: t.title }, + e.createElement('td', null, '{'.concat(t.name, '}[raw]')) + ) + : null; + }) + ) + ), + '\x3c!-- END '.concat(t.name, ':loop --\x3e') + ) + ) ); } - var bo = n(848), - Eo = n(376), - vo = n(418), - yo = n(48), - _o = n.n(yo), - xo = (n(334), n(962), n(285)), - wo = n.n(xo); - _o().registerLanguage('xml', wo()); - const ko = new Eo.vr(); - function To(t) { + function _o() { + return e.createElement(xo, null); + } + var wo = n(848), + ko = n(376), + No = n(418), + To = n(48), + So = n.n(To), + Co = (n(334), n(962), n(285)), + Fo = n.n(Co); + So().registerLanguage('xml', Fo()); + const Io = new ko.vr(); + function Ro(t) { let { children: n, onHighlight: a = () => {} } = t; const r = (0, e.useRef)(), l = (0, e.useCallback)( (e) => { - let t = (0, bo.renderToStaticMarkup)(e); + let t = (0, wo.renderToStaticMarkup)(e); (t = t.replace(/"/g, '"')), (t = t.replace(/data-tmp="(.*?)"/g, '$1')), (t = t.replace(/</g, '<')), @@ -24675,8 +25641,8 @@ (t = ((e) => (e = e.replace(//g, '')).replace(/ data-reactroot=""/g, ''))( t )); - const n = ko.encode( - (0, vo.html)(t, { + const n = Io.encode( + (0, No.html)(t, { unformatted: ['code', 'pre'], indent_inner_html: !0, indent_char: ' ', @@ -24684,7 +25650,7 @@ sep: '\n', }) ); - (r.current.innerHTML = n), _o().highlightBlock(r.current), a && a(n); + (r.current.innerHTML = n), So().highlightBlock(r.current), a && a(n); }, [a] ); @@ -24703,81 +25669,79 @@ ) ); } - const No = new Eo.vr(); - var So = function () { + const Ao = new ko.vr(); + var Oo = function () { const { setSource: t, state: n, preview: a, clipboard: r } = u(), l = (e) => { - const n = No.decode(e); + const n = Ao.decode(e); r.source !== n && t(n); }; - return ( - (0, e.useEffect)(() => { - console.log(n.customunit), console.log(a.mode); - }, [n.customunit, a.mode]), + return e.createElement( + 'div', + { className: 'acms-admin-form' }, + e.createElement(m, null), + 'customfield' === a.mode && e.createElement(Ii, null), + 'fieldgroup' === a.mode && e.createElement(ji, null), + 'customunit' === a.mode && e.createElement(Pi, null), + 'unitgroup' === a.mode && e.createElement(Bi, null), e.createElement( 'div', - { className: 'acms-admin-form' }, - e.createElement(m, null), - 'customfield' === a.mode && e.createElement(Ri, null), - 'fieldgroup' === a.mode && e.createElement(ji, null), - 'customunit' === a.mode && e.createElement(Pi, null), - 'unitgroup' === a.mode && e.createElement(Bi, null), + { className: 'acms-admin-tabs' }, + e.createElement(f, null), e.createElement( 'div', - { className: 'acms-admin-tabs' }, - e.createElement(f, null), + { className: 'acms-admin-tabs-panel' }, e.createElement( 'div', - { className: 'acms-admin-tabs-panel' }, + { style: { backgroundColor: '#F1F1F1', padding: '20px 15px' } }, e.createElement( 'div', - { style: { backgroundColor: '#F1F1F1', padding: '20px 15px' } }, - e.createElement( - 'div', - { className: 'clearfix' }, - e.createElement(di, null), - 'source' === a.editMode && - e.createElement( - To, - { onHighlight: l }, - e.createElement( - s, - { state: n, preview: a, clipboard: r }, - 'customfield' === a.mode && e.createElement(ro, null), - 'fieldgroup' === a.mode && e.createElement(oo, null), - 'customunit' === a.mode && e.createElement(uo, null), - 'unitgroup' === a.mode && e.createElement(fo, null) - ) - ), - 'preview' === a.editMode && + { className: 'clearfix' }, + e.createElement(di, null), + 'source' === a.editMode && + e.createElement( + Ro, + { onHighlight: l }, e.createElement( - e.Fragment, - null, + s, + { state: n, preview: a, clipboard: r }, 'customfield' === a.mode && e.createElement(ro, null), 'fieldgroup' === a.mode && e.createElement(oo, null), 'customunit' === a.mode && e.createElement(uo, null), 'unitgroup' === a.mode && e.createElement(fo, null) - ), - 'confirm' === a.editMode && + ) + ), + 'preview' === a.editMode && + e.createElement( + e.Fragment, + null, + 'customfield' === a.mode && e.createElement(ro, null), + 'fieldgroup' === a.mode && e.createElement(oo, null), + 'customunit' === a.mode && e.createElement(uo, null), + 'unitgroup' === a.mode && e.createElement(fo, null) + ), + 'confirm' === a.editMode && + e.createElement( + Ro, + { onHighlight: l }, e.createElement( - To, - { onHighlight: l }, - e.createElement( - s, - { state: n, preview: a, clipboard: r }, - ('customfield' === a.mode || 'customunit' === a.mode) && e.createElement(go, null) - ) + s, + { state: n, preview: a, clipboard: r }, + 'customfield' === a.mode && e.createElement(go, null), + 'fieldgroup' === a.mode && e.createElement(bo, null), + 'customunit' === a.mode && e.createElement(yo, null), + 'unitgroup' === a.mode && e.createElement(_o, null) ) - ) + ) ) ) ) ) ); }, - Co = function () { - return e.createElement(s, null, e.createElement(So, null)); + Do = function () { + return e.createElement(s, null, e.createElement(Oo, null)); }; - n(179), t.render(e.createElement(e.StrictMode, null, e.createElement(Co, null)), document.getElementById('app')); + n(179), t.render(e.createElement(e.StrictMode, null, e.createElement(Do, null)), document.getElementById('app')); })(); })(); diff --git a/lib/actions/index.js b/lib/actions/index.js deleted file mode 100644 index fa30c88..0000000 --- a/lib/actions/index.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; - -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.toggleJsValidator = exports.toggleAcmsCss = exports.setUnitGroupTitleName = exports.setTag = exports.setState = exports.setGroupTitleName = exports.restore = exports.clearUnitGroupTitleName = exports.clearUnitGroupItem = exports.clearGroupItem = exports.clearCustomfield = exports.clearCustomUnit = exports.changeDirection = exports.addUnitGroupItem = exports.addSnippet = exports.addGroupItem = exports.addCustomfield = exports.addCustomUnit = void 0; -var types = _interopRequireWildcard(require("../constants/action-types")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -var setState = exports.setState = function setState(state) { - return { - type: types.SETSTATE, - state: state - }; -}; -var addCustomfield = exports.addCustomfield = function addCustomfield(item) { - return { - type: types.ADDCUSTOMFIELD, - item: item - }; -}; -var addGroupItem = exports.addGroupItem = function addGroupItem(item) { - return { - type: types.ADDGROUPITEM, - item: item - }; -}; -var setGroupTitleName = exports.setGroupTitleName = function setGroupTitleName(_ref) { - var groupTitle = _ref.groupTitle, - groupName = _ref.groupName; - return { - type: types.SETGROUPTITLENAME, - groupTitle: groupTitle, - groupName: groupName - }; -}; -var addCustomUnit = exports.addCustomUnit = function addCustomUnit(item) { - return { - type: types.ADDCUSTOMUNIT, - item: item - }; -}; -var addUnitGroupItem = exports.addUnitGroupItem = function addUnitGroupItem(item) { - return { - type: types.ADDUNITGROUPITEM, - item: item - }; -}; -var setUnitGroupTitleName = exports.setUnitGroupTitleName = function setUnitGroupTitleName(_ref2) { - var unitGroupTitle = _ref2.unitGroupTitle, - unitGroupName = _ref2.unitGroupName; - return { - type: types.SETUNITGROUPTITLENAME, - unitGroupTitle: unitGroupTitle, - unitGroupName: unitGroupName - }; -}; -var clearCustomfield = exports.clearCustomfield = function clearCustomfield() { - return { - type: types.CLEARCUSTOMFIELD - }; -}; -var clearGroupItem = exports.clearGroupItem = function clearGroupItem() { - return { - type: types.CLEARGROUPITEM - }; -}; -var clearCustomUnit = exports.clearCustomUnit = function clearCustomUnit() { - return { - type: types.CLEARCUSTOMUNIT - }; -}; -var clearUnitGroupItem = exports.clearUnitGroupItem = function clearUnitGroupItem() { - return { - type: types.CLEARUNITGROUPITEM - }; -}; -var clearUnitGroupTitleName = exports.clearUnitGroupTitleName = function clearUnitGroupTitleName() { - return { - type: types.CLEARUNITGROUPTITLENAME - }; -}; -var setTag = exports.setTag = function setTag(value) { - return { - type: types.SETTAG, - value: value - }; -}; -var toggleAcmsCss = exports.toggleAcmsCss = function toggleAcmsCss() { - return { - type: types.TOGGLEACMSCSS - }; -}; -var toggleJsValidator = exports.toggleJsValidator = function toggleJsValidator() { - return { - type: types.TOGGLEJSVALIDATOR - }; -}; -var restore = exports.restore = function restore(storage) { - return { - type: types.RESTORE, - storage: storage - }; -}; -var addSnippet = exports.addSnippet = function addSnippet(name, value) { - return { - type: types.ADDSNIPPET, - name: name, - value: value - }; -}; -var changeDirection = exports.changeDirection = function changeDirection(direction) { - return { - type: types.CHANGEDIRECTION, - direction: direction - }; -}; \ No newline at end of file diff --git a/lib/assets/images/add_column.svg b/lib/assets/images/add_column.svg deleted file mode 100755 index 7de5779..0000000 --- a/lib/assets/images/add_column.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/assets/images/add_row.svg b/lib/assets/images/add_row.svg deleted file mode 100755 index 3ddbcd2..0000000 --- a/lib/assets/images/add_row.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/components/FieldConfirmSource.js b/lib/components/FieldConfirmSource.js index d6faa84..2d1304a 100644 --- a/lib/components/FieldConfirmSource.js +++ b/lib/components/FieldConfirmSource.js @@ -7,17 +7,6 @@ Object.defineProperty(exports, '__esModule', { exports.FieldConfirmSource = FieldConfirmSource; var _react = _interopRequireDefault(require('react')); var _TableLayoutConfirm = require('./cofirmLayouts/TableLayoutConfirm'); -var _MakerContext = require('../store/MakerContext'); function FieldConfirmSource() { - const { - state: { - preview: { tag }, - }, - } = (0, _MakerContext.useMakerContext)(); - return /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - tag === 'section' ? /*#__PURE__*/ _react.default.createElement(_TableLayoutConfirm.TableLayoutConfirm, null) : null, - tag === 'table' ? /*#__PURE__*/ _react.default.createElement(_TableLayoutConfirm.TableLayoutConfirm, null) : null - ); + return /*#__PURE__*/ _react.default.createElement(_TableLayoutConfirm.TableLayoutConfirm, null); } diff --git a/lib/components/FieldGroup.js b/lib/components/FieldGroup.js deleted file mode 100644 index 7e9320c..0000000 --- a/lib/components/FieldGroup.js +++ /dev/null @@ -1,265 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _react = _interopRequireDefault(require("react")); -var _reactTooltip = _interopRequireDefault(require("react-tooltip")); -var _base = _interopRequireDefault(require("./base")); -var _MakerContext = require("../store/MakerContext"); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var FieldGroup = exports.default = /*#__PURE__*/function (_Base) { - function FieldGroup(props) { - var _this; - (0, _classCallCheck2.default)(this, FieldGroup); - _this = _callSuper(this, FieldGroup, [props]); - _this.state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: false, - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - resize: 'true', - useDropArea: true, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: false, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - useExpand: true, - option: [{ - value: '', - label: '' - }], - validator: [{ - option: '', - value: '', - message: '' - }], - optionFormat: 'pref', - openValidator: false, - openConverter: false, - alt: false, - fileNameMethod: 'random', - groupAlert: false, - openGroup: false, - groupTitle: '', - groupName: '' - }; - return _this; - } - (0, _inherits2.default)(FieldGroup, _Base); - return (0, _createClass2.default)(FieldGroup, [{ - key: "showGroup", - value: function showGroup() { - var setGroupTitleName = this.context.setGroupTitleName; - var _this$state = this.state, - groupName = _this$state.groupName, - groupTitle = _this$state.groupTitle; - if (!groupName) { - this.setState({ - groupAlert: true - }); - } else { - this.setState({ - groupAlert: false, - duplicatedField: false, - openGroup: true - }); - setGroupTitleName(groupTitle, groupName); - } - } - }, { - key: "addGroup", - value: function addGroup() { - var _this$context = this.context, - setGroupTitleName = _this$context.setGroupTitleName, - addGroupItem = _this$context.addGroupItem; - var _this$state2 = this.state, - type = _this$state2.type, - title = _this$state2.title, - name = _this$state2.name, - groupTitle = _this$state2.groupTitle, - groupName = _this$state2.groupName; - if (name === groupName) { - this.setState({ - duplicatedField: true - }); - return; - } - if (type && title && name) { - setGroupTitleName(groupTitle, groupName); - console.log(this.state); - addGroupItem(this.state); - } else { - this.setState({ - alert: true - }); - } - } - }, { - key: "addNewGroup", - value: function addNewGroup() { - var clearGroupItem = this.context.clearGroupItem; - clearGroupItem(); - this.clearValue(); - this.setState({ - openGroup: false, - groupTitle: '', - groupName: '' - }); - } - }, { - key: "render", - value: function render() { - var _this2 = this; - var clearGroupItem = this.context.clearGroupItem; - var _this$state3 = this.state, - groupAlert = _this$state3.groupAlert, - duplicatedField = _this$state3.duplicatedField, - openGroup = _this$state3.openGroup, - groupTitle = _this$state3.groupTitle, - groupName = _this$state3.groupName, - type = _this$state3.type, - subType = _this$state3.subType, - title = _this$state3.title, - name = _this$state3.name, - tooltip = _this$state3.tooltip; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", { - className: "acms-admin-admin-title2" - }, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFunction" - }, this.renderGroupAlert(), this.renderDuplicateAlert(), this.renderAlert(), openGroup ? /*#__PURE__*/_react.default.createElement("div", { - style: { - paddingBottom: '15px' - } - }, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - onClick: this.addNewGroup.bind(this) - }, "\u65B0\u898F\u30B0\u30EB\u30FC\u30D7\u4F5C\u6210")) : /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - id: "groupTitle", - value: groupTitle, - onInput: function onInput(e) { - _this2.updateState('groupTitle', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u30B9\u30BF\u30C3\u30D5\u30EA\u30B9\u30C8" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - id: "groupName", - value: groupName, - onInput: function onInput(e) { - _this2.updateState('groupName', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09group_staff" - }))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", { - colSpan: "2" - }, openGroup ? /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary acms-admin-btn-disabled customFieldGroupBtn", - id: "makeGroup", - disabled: true - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210") : /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - id: "makeGroup", - onClick: this.showGroup.bind(this) - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210")))), openGroup && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, groupTitle), /*#__PURE__*/_react.default.createElement("td", null, groupName))), this.renderModal(), this.renderBasic(), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), type === 'select' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'radio' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'image' && /*#__PURE__*/_react.default.createElement("div", null, this.renderImage(), this.renderImageResize()), type === 'file' && /*#__PURE__*/_react.default.createElement("div", null, this.renderFile()), type === 'media' && /*#__PURE__*/_react.default.createElement("div", null, this.renderMediaOption()), type === 'rich-editor' && /*#__PURE__*/_react.default.createElement("div", null, this.renderRichEditorOption()), this.renderValidator(), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: clearGroupItem, - className: "acms-admin-btn-admin", - style: { - marginRight: '5px' - } - }, "\u30AF\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.addGroup.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn", - style: { - marginRight: '5px' - } - }, "\u751F\u6210"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.backState.bind(this), - className: "acms-admin-btn-admin" - }, "\u5143\u306B\u623B\u3059"))))); - } - }]); -}(_base.default); -(0, _defineProperty2.default)(FieldGroup, "contextType", _MakerContext.MakerContext); \ No newline at end of file diff --git a/lib/components/FieldGroupConfirmSource.js b/lib/components/FieldGroupConfirmSource.js new file mode 100644 index 0000000..d4eeb2c --- /dev/null +++ b/lib/components/FieldGroupConfirmSource.js @@ -0,0 +1,12 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.FieldGroupConfirmSource = FieldGroupConfirmSource; +var _react = _interopRequireDefault(require('react')); +var _GroupTableLayoutConfirm = require('./cofirmLayouts/GroupTableLayoutConfirm'); +function FieldGroupConfirmSource() { + return /*#__PURE__*/ _react.default.createElement(_GroupTableLayoutConfirm.GroupTableLayoutConfirm, null); +} diff --git a/lib/components/UnitConfirmSource.js b/lib/components/UnitConfirmSource.js new file mode 100644 index 0000000..cff70b1 --- /dev/null +++ b/lib/components/UnitConfirmSource.js @@ -0,0 +1,12 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.UnitConfirmSource = UnitConfirmSource; +var _react = _interopRequireDefault(require('react')); +var _UnitTableLayoutConfirm = require('./cofirmLayouts/UnitTableLayoutConfirm'); +function UnitConfirmSource() { + return /*#__PURE__*/ _react.default.createElement(_UnitTableLayoutConfirm.UnitTableLayoutConfirm, null); +} diff --git a/lib/components/UnitGroup.js b/lib/components/UnitGroup.js deleted file mode 100644 index 554ed13..0000000 --- a/lib/components/UnitGroup.js +++ /dev/null @@ -1,243 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _react = _interopRequireDefault(require("react")); -var _reactTooltip = _interopRequireDefault(require("react-tooltip")); -var _base = _interopRequireDefault(require("./base")); -var _MakerContext = require("../store/MakerContext"); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var UnitGroup = exports.default = /*#__PURE__*/function (_Base) { - function UnitGroup(props) { - var _this$state; - var _this; - (0, _classCallCheck2.default)(this, UnitGroup); - _this = _callSuper(this, UnitGroup, [props]); - _this.state = (_this$state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: '', - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - resize: 'true', - option: [{ - value: '', - label: '' - }], - validator: [{ - option: '', - value: '', - message: '' - }], - optionFormat: 'pref', - unitGroupTitle: '', - unitGroupName: '', - openValidator: false, - openConverter: false, - groupAlert: false, - openGroup: false, - alt: false - }, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_this$state, "resize", true), "fileNameMethod", 'random'), "useDropArea", true), "useExpand", true), "dropAreaWidth", 200), "dropAreaHeight", 200), "useFocusImage", true), "focusImageWidth", 400), "focusImageHeight", 400), "startHeadingLevel", 2), (0, _defineProperty2.default)((0, _defineProperty2.default)(_this$state, "endHeadingLevel", 3), "mediaType", 'image')); - return _this; - } - (0, _inherits2.default)(UnitGroup, _Base); - return (0, _createClass2.default)(UnitGroup, [{ - key: "showGroup", - value: function showGroup() { - var setUnitGroupTitleName = this.context.setUnitGroupTitleName; - var _this$state2 = this.state, - unitGroupName = _this$state2.unitGroupName, - unitGroupTitle = _this$state2.unitGroupTitle; - if (!unitGroupName) { - this.setState({ - groupAlert: true - }); - } else { - this.setState({ - groupAlert: false, - duplicatedField: false, - openGroup: true - }); - setUnitGroupTitleName(unitGroupTitle, unitGroupName); - } - } - }, { - key: "addNewGroup", - value: function addNewGroup() { - var clearUnitGroupItem = this.context.clearUnitGroupItem; - clearUnitGroupItem(); - this.clearValue(); - this.setState({ - openGroup: false, - unitGroupTitle: '', - unitGroupName: '' - }); - } - }, { - key: "addGroup", - value: function addGroup() { - var _this$context = this.context, - setUnitGroupTitleName = _this$context.setUnitGroupTitleName, - addUnitGroupItem = _this$context.addUnitGroupItem; - var _this$state3 = this.state, - type = _this$state3.type, - title = _this$state3.title, - name = _this$state3.name, - unitGroupName = _this$state3.unitGroupName, - unitGroupTitle = _this$state3.unitGroupTitle; - if (name == unitGroupName) { - this.setState({ - duplicatedField: true - }); - return; - } - if (type && title && name) { - setUnitGroupTitleName(unitGroupName, unitGroupTitle); - addUnitGroupItem(this.state); - } else { - this.setState({ - alert: true - }); - } - } - }, { - key: "render", - value: function render() { - var _this2 = this; - var _this$state4 = this.state, - openGroup = _this$state4.openGroup, - unitGroupTitle = _this$state4.unitGroupTitle, - unitGroupName = _this$state4.unitGroupName, - type = _this$state4.type; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", { - className: "acms-admin-admin-title2" - }, "\u30AB\u30B9\u30BF\u30E0\u30E6\u30CB\u30C3\u30C8\uFF08\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\uFF09"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFunction" - }, this.renderGroupAlert(), this.renderDuplicateAlert(), this.renderAlert(), openGroup ? /*#__PURE__*/_react.default.createElement("div", { - style: { - paddingBottom: '15px' - } - }, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - onClick: this.addNewGroup.bind(this) - }, "\u65B0\u898F\u30B0\u30EB\u30FC\u30D7\u4F5C\u6210")) : /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: unitGroupTitle, - onInput: function onInput(e) { - _this2.updateState('unitGroupTitle', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u30B9\u30BF\u30C3\u30D5\u30EA\u30B9\u30C8" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: unitGroupName, - onInput: function onInput(e) { - _this2.updateState('unitGroupName', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09group_staff" - }))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", { - colSpan: "2" - }, openGroup ? /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary acms-admin-btn-disabled customFieldGroupBtn", - disabled: true - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210") : /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - onClick: this.showGroup.bind(this) - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210")))), openGroup && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, unitGroupTitle), /*#__PURE__*/_react.default.createElement("td", null, unitGroupName))), this.renderModal(), this.renderBasic(), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), type === 'select' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'radio' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'image' && /*#__PURE__*/_react.default.createElement("div", null, this.renderImage(), this.renderImageResize()), type === 'file' && /*#__PURE__*/_react.default.createElement("div", null, this.renderFile()), type === 'media' && /*#__PURE__*/_react.default.createElement("div", null, this.renderMediaOption()), type === 'rich-editor' && /*#__PURE__*/_react.default.createElement("div", null, this.renderRichEditorOption()), this.renderValidator(false), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearValue.bind(this), - className: "acms-admin-btn-admin", - style: { - marginRight: '5px' - } - }, "\u30AF\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.addGroup.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn", - style: { - marginRight: '5px' - } - }, "\u751F\u6210"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.backState.bind(this), - className: "acms-admin-btn-admin" - }, "\u5143\u306B\u623B\u3059"))))); - } - }]); -}(_base.default); -(0, _defineProperty2.default)(UnitGroup, "contextType", _MakerContext.MakerContext); \ No newline at end of file diff --git a/lib/components/UnitGroupConfirmSource.js b/lib/components/UnitGroupConfirmSource.js new file mode 100644 index 0000000..f018fd4 --- /dev/null +++ b/lib/components/UnitGroupConfirmSource.js @@ -0,0 +1,12 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.UnitGroupConfirmSource = UnitGroupConfirmSource; +var _react = _interopRequireDefault(require('react')); +var _UnitGroupTableLayoutConfirm = require('./cofirmLayouts/UnitGroupTableLayoutConfirm'); +function UnitGroupConfirmSource() { + return /*#__PURE__*/ _react.default.createElement(_UnitGroupTableLayoutConfirm.UnitGroupTableLayoutConfirm, null); +} diff --git a/lib/components/UnitSource.js b/lib/components/UnitSource.js new file mode 100644 index 0000000..64d3dbf --- /dev/null +++ b/lib/components/UnitSource.js @@ -0,0 +1,22 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.UnitSource = UnitSource; +var _react = _interopRequireDefault(require('react')); +var _UnitSection = require('./layouts/UnitSection'); +var _UnitTableLayout = require('./layouts/UnitTableLayout'); +var _MakerContext = require('../store/MakerContext'); +function UnitSource() { + const { + preview: { tag }, + } = (0, _MakerContext.useMakerContext)(); + return /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + tag === 'section' ? /*#__PURE__*/ _react.default.createElement(_UnitSection.UnitSection, null) : null, + tag === 'table' ? /*#__PURE__*/ _react.default.createElement(_UnitTableLayout.UnitTableLayout, null) : null + ); +} diff --git a/lib/components/base.js b/lib/components/base.js deleted file mode 100644 index efb3fbf..0000000 --- a/lib/components/base.js +++ /dev/null @@ -1,1249 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _reactTooltip = _interopRequireDefault(require("react-tooltip")); -var _modalDialog = _interopRequireDefault(require("./modal-dialog")); -var _history = _interopRequireDefault(require("../lib/history")); -var _pref = _interopRequireDefault(require("../../json/pref.json")); -var _prefEn = _interopRequireDefault(require("../../json/pref-en.json")); -var _prefNumber = _interopRequireDefault(require("../../json/pref-number.json")); -var _inputTypes = _interopRequireDefault(require("../../json/input-types.json")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var snippetJSON = { - pref: _pref.default, - 'pref-en': _prefEn.default, - 'pref-number': _prefNumber.default -}; -var Base = exports.default = /*#__PURE__*/function (_Component) { - function Base(props) { - (0, _classCallCheck2.default)(this, Base); - return _callSuper(this, Base, [props]); - } - (0, _inherits2.default)(Base, _Component); - return (0, _createClass2.default)(Base, [{ - key: "updateState", - value: function updateState(prop, value) { - this.setState((0, _defineProperty2.default)({}, prop, value)); - } - }, { - key: "removeAlert", - value: function removeAlert() { - this.setState({ - alert: false - }); - } - }, { - key: "removeGroupAlert", - value: function removeGroupAlert() { - this.setState({ - groupAlert: false - }); - } - }, { - key: "removeDuplicateAlert", - value: function removeDuplicateAlert() { - this.setState({ - duplicatedField: false - }); - } - }, { - key: "clearValue", - value: function clearValue() { - this.setState({ - title: '', - name: '', - path: '', - normalSize: '', - tiny: '', - tinySize: '', - large: '', - largeSize: '', - square: '', - squareSize: '', - alt: true, - resize: true, - useExpand: true, - useDropArea: true, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: false, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - openConverter: '', - openValidator: '', - converter: '', - tooltip: '' - }); - } - }, { - key: "addOption", - value: function addOption() { - var option = this.state.option; - this.setState({ - option: [].concat((0, _toConsumableArray2.default)(option), [{ - value: '', - label: '' - }]) - }); - } - }, { - key: "removeOption", - value: function removeOption(idx) { - var option = this.state.option; - this.setState({ - option: [].concat((0, _toConsumableArray2.default)(option.slice(0, idx)), (0, _toConsumableArray2.default)(option.slice(idx + 1))) - }); - } - }, { - key: "updateOptionLabel", - value: function updateOptionLabel(idx, label) { - var option = this.state.option; - var item = option[idx]; - this.setState({ - option: [].concat((0, _toConsumableArray2.default)(option.slice(0, idx)), [Object.assign({}, item, { - label: label - })], (0, _toConsumableArray2.default)(option.slice(idx + 1))) - }); - } - }, { - key: "updateOptionValue", - value: function updateOptionValue(idx, value) { - var option = this.state.option; - var item = option[idx]; - this.setState({ - option: [].concat((0, _toConsumableArray2.default)(option.slice(0, idx)), [Object.assign({}, item, { - value: value - })], (0, _toConsumableArray2.default)(option.slice(idx + 1))) - }); - } - }, { - key: "addValidator", - value: function addValidator() { - var validator = this.state.validator; - this.setState({ - validator: [].concat((0, _toConsumableArray2.default)(validator), [{ - option: '', - value: '', - message: '' - }]) - }); - } - }, { - key: "removeValidator", - value: function removeValidator(idx) { - var validator = this.state.validator; - this.setState({ - validator: [].concat((0, _toConsumableArray2.default)(validator.slice(0, idx)), (0, _toConsumableArray2.default)(validator.slice(idx + 1))) - }); - } - }, { - key: "updateValidatorOption", - value: function updateValidatorOption(idx, option) { - var validator = this.state.validator; - var item = validator[idx]; - this.setState({ - validator: [].concat((0, _toConsumableArray2.default)(validator.slice(0, idx)), [Object.assign({}, item, { - option: option - })], (0, _toConsumableArray2.default)(validator.slice(idx + 1))) - }); - } - }, { - key: "updateValidatorValue", - value: function updateValidatorValue(idx, value) { - var validator = this.state.validator; - var item = validator[idx]; - this.setState({ - validator: [].concat((0, _toConsumableArray2.default)(validator.slice(0, idx)), [Object.assign({}, item, { - value: value - })], (0, _toConsumableArray2.default)(validator.slice(idx + 1))) - }); - } - }, { - key: "updateValidatorMessage", - value: function updateValidatorMessage(idx, message) { - var validator = this.state.validator; - var item = validator[idx]; - this.setState({ - validator: [].concat((0, _toConsumableArray2.default)(validator.slice(0, idx)), [Object.assign({}, item, { - message: message - })], (0, _toConsumableArray2.default)(validator.slice(idx + 1))) - }); - } - }, { - key: "addConverter", - value: function addConverter(item) { - var converter = this.state.converter; - var reg = new RegExp(item, 'i'); - if (converter.search(reg) === -1) { - converter += item; - } else { - converter = converter.replace(item.toUpperCase(), item); - converter = converter.replace(item.toLowerCase(), item); - } - this.setState({ - converter: converter - }); - } - }, { - key: "renderOption", - value: function renderOption() { - var _this = this; - var option = this.state.option; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("table", { - className: "acms-admin-table customFieldOptionTable" - }, /*#__PURE__*/_react.default.createElement("tbody", null, option.map(function (item, idx) { - return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldOptionTableInput" - }, /*#__PURE__*/_react.default.createElement("span", { - className: "customFieldOptionTableAppend" - }, "\u9805\u76EE\u540D\uFF08label\uFF09"), /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: item.label, - onInput: function onInput(e) { - _this.updateOptionLabel(idx, e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u6771\u4EAC\u90FD" - }))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldOptionTableInput" - }, /*#__PURE__*/_react.default.createElement("span", { - className: "customFieldOptionTableAppend" - }, "\u5024\uFF08value\uFF09"), /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: item.value, - onInput: function onInput(e) { - _this.updateOptionValue(idx, e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09tokyo" - }))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: "acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right", - onClick: _this.removeOption.bind(_this, idx), - value: "\u524A\u9664" - }))); - }))), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addOption.bind(this) - }, "\u8FFD\u52A0"))); - } - }, { - key: "renderTitleName", - value: function renderTitleName() { - var _this2 = this; - var _this$state = this.state, - title = _this$state.title, - name = _this$state.name; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, "\u30BF\u30A4\u30C8\u30EB"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: title, - onInput: function onInput(e) { - _this2.updateState('title', e.target.value); - } - })), /*#__PURE__*/_react.default.createElement("p", null, "name\u5C5E\u6027"), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: name, - onInput: function onInput(e) { - _this2.updateState('name', e.target.value); - } - }))); - } - }, { - key: "applySnippet", - value: function applySnippet() { - var _this$state2 = this.state, - optionFormat = _this$state2.optionFormat, - option = _this$state2.option; - var res = snippetJSON[optionFormat]; - this.setState({ - option: [].concat((0, _toConsumableArray2.default)(option), (0, _toConsumableArray2.default)(res)) - }); - } - }, { - key: "renderSnippet", - value: function renderSnippet() { - var _this3 = this; - var _this$state3 = this.state, - useSnippet = _this$state3.useSnippet, - optionFormat = _this$state3.optionFormat; - return /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("span", { - className: "customFieldBold" - }, "\u9078\u629E\u9805\u76EE\uFF08option\u8981\u7D20\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "option-value-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "option-value-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "option\u8981\u7D20\u306E\u9078\u629E\u9805\u76EE\u306B\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("span", { - className: "customFieldUseSnippet" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "customFieldUseSnippetLabel", - style: { - marginRight: '5px' - } - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - style: { - display: 'none' - }, - value: "true", - onChange: function onChange() { - _this3.updateState('useSnippet', !useSnippet); - } - }), useSnippet ? 'スニペットを使用しない' : 'スニペットを使用する'), useSnippet && /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("select", { - style: { - verticalAlign: 'middle', - marginRight: '5px' - }, - value: optionFormat, - onChange: function onChange(e) { - _this3.updateState('optionFormat', e.target.value); - } - }, /*#__PURE__*/_react.default.createElement("option", { - value: "pref" - }, "\u90FD\u9053\u5E9C\u770C"), /*#__PURE__*/_react.default.createElement("option", { - value: "pref-en" - }, "\u90FD\u9053\u5E9C\u770C\uFF08\u82F1\u8A9E\uFF09"), /*#__PURE__*/_react.default.createElement("option", { - value: "pref-number" - }, "\u90FD\u9053\u5E9C\u770C\uFF08\u9023\u756A\uFF09")), /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.applySnippet.bind(this), - style: { - verticalAlign: 'middle' - } - }, "\u8FFD\u52A0")))); - } - }, { - key: "renderModal", - value: function renderModal() { - var openConverter = this.state.openConverter; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_modalDialog.default, { - open: openConverter, - title: "\u30B3\u30F3\u30D0\u30FC\u30BF\u30FC\u53C2\u7167", - onClose: this.updateState.bind(this, 'openConverter', false) - }, /*#__PURE__*/_react.default.createElement("table", { - className: "acms-admin-table acms-admin-table-heading acms-admin-table-hover" - }, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30AA\u30D7\u30B7\u30E7\u30F3"), /*#__PURE__*/_react.default.createElement("th", null, "\u610F\u5473"), /*#__PURE__*/_react.default.createElement("th", null, "\u8FFD\u52A0")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "r"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u300D\u82F1\u5B57\u3092\u300C\u534A\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'r') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "R"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u534A\u89D2\u300D\u82F1\u5B57\u3092\u300C\u5168\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'R') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "n"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u300D\u6570\u5B57\u3092\u300C\u534A\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'n') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "N"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u534A\u89D2\u300D\u6570\u5B57\u3092\u300C\u5168\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'N') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "a"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u300D\u82F1\u6570\u5B57\u3092\u300C\u534A\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'a') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "A"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u534A\u89D2\u300D\u82F1\u6570\u5B57\u3092\u300C\u5168\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'A') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "s"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u300D\u30B9\u30DA\u30FC\u30B9\u3092\u300C\u534A\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\uFF08U+3000 -> U+0020\uFF09\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 's') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "S"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u534A\u89D2\u300D\u30B9\u30DA\u30FC\u30B9\u3092\u300C\u5168\u89D2\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\uFF08U+0020 -> U+3000\uFF09\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'S') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "k"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u3092\u300C\u534A\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'k') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "K"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u534A\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u3092\u300C\u5168\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'K') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "h"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u3072\u3089\u304C\u306A\u300D\u3092\u300C\u534A\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'h') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "H"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u534A\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u3092\u300C\u5168\u89D2\u3072\u3089\u304C\u306A\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'H') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "c"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u3092\u300C\u5168\u89D2\u3072\u3089\u304C\u306A\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'c') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "C"), /*#__PURE__*/_react.default.createElement("td", null, "\u300C\u5168\u89D2\u3072\u3089\u304C\u306A\u300D\u3092\u300C\u5168\u89D2\u30AB\u30BF\u30AB\u30CA\u300D\u306B\u5909\u63DB\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'C') - }, "\u8FFD\u52A0"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "V"), /*#__PURE__*/_react.default.createElement("td", null, "\u6FC1\u70B9\u4ED8\u304D\u306E\u6587\u5B57\u3092\u4E00\u6587\u5B57\u306B\u5909\u63DB\u3057\u307E\u3059\u3002\"K\", \"H\" \u3068\u5171\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002"), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.addConverter.bind(this, 'V') - }, "\u8FFD\u52A0"))))))); - } - }, { - key: "renderBasic", - value: function renderBasic() { - var _this4 = this; - var _this$state4 = this.state, - title = _this$state4.title, - name = _this$state4.name, - tooltip = _this$state4.tooltip; - return /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableFirst" - }, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u5165\u529B\u6B04\u306E\u7A2E\u985E", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": "React-tooltip", - "data-for": "type-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "type-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30BF\u30A4\u30D7\u3068\u306A\u308A\u307E\u3059\u3002", /*#__PURE__*/_react.default.createElement("br", null), "\u9078\u629E\u3057\u306A\u3044\u3068\u751F\u6210\u30DC\u30BF\u30F3\u3092\u62BC\u3057\u3066\u3082\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u304C\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": "React-tooltip", - "data-for": "title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u898B\u51FA\u3057\u306B\u306A\u308A\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": "React-tooltip", - "data-for": "field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002name\u5C5E\u6027\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30C4\u30FC\u30EB\u30C1\u30C3\u30D7", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": "React-tooltip", - "data-for": "tooltip-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "tooltip-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u8AAC\u660E\u7528\u306E\u30C4\u30FC\u30EB\u30C1\u30C3\u30D7\u3092\u4ED8\u4E0E\u3057\u307E\u3059\u3002")))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, this.typeSelectRender(), this.subTypeSelectRender()), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: title, - onInput: function onInput(e) { - _this4.updateState('title', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u6C0F\u540D" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: name, - onInput: function onInput(e) { - _this4.updateState('name', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09name" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: tooltip, - onInput: function onInput(e) { - _this4.updateState('tooltip', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u3053\u3053\u306B\u304A\u540D\u524D\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044" - }))))); - } - }, { - key: "typeSelectRender", - value: function typeSelectRender() { - var _this5 = this; - var type = this.state.type; - var onChange = function onChange(e) { - _this5.updateState('subType', ''); - _this5.updateState('type', e.target.value); - }; - return /*#__PURE__*/_react.default.createElement("select", { - id: "type", - value: type, - className: "acms-admin-form-width-full", - onChange: onChange - }, Object.keys(_inputTypes.default).map(function (input) { - return /*#__PURE__*/_react.default.createElement("option", { - value: input - }, _inputTypes.default[input].label); - })); - } - }, { - key: "subTypeSelectRender", - value: function subTypeSelectRender() { - var _inputTypesJson$type, - _this6 = this; - var _this$state5 = this.state, - type = _this$state5.type, - subType = _this$state5.subType; - var subTypes = Array.isArray((_inputTypesJson$type = _inputTypes.default[type]) === null || _inputTypesJson$type === void 0 ? void 0 : _inputTypesJson$type.subTypes) ? _inputTypes.default[type].subTypes : []; - var onChange = function onChange(e) { - _this6.updateState('subType', e.target.value); - }; - if (subTypes.length > 0) { - return /*#__PURE__*/_react.default.createElement("select", { - id: "subType", - value: subType, - className: "acms-admin-form-width-full", - onChange: onChange - }, subTypes.map(function (subType) { - return /*#__PURE__*/_react.default.createElement("option", { - key: subType.value, - value: subType.value - }, subType.label); - })); - } - } - }, { - key: "noSearchCheckRender", - value: function noSearchCheckRender() { - var noSearch = this.state.noSearch; - return /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-checkbox" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - value: noSearch, - id: "noSearch-checkbox", - onChange: this.updateState.bind(this, 'noSearch', !noSearch) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "noSearch-checkbox" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u691C\u7D22\u306E\u5BFE\u8C61\u5916\u306B\u3059\u308B")); - } - }, { - key: "backState", - value: function backState() { - var actions = this.props.actions; - var state = _history.default.undo(); - if (state) { - actions.setState(state); - } - } - }, { - key: "renderValidator", - value: function renderValidator() { - var _this7 = this; - var showValidator = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - var _this$state6 = this.state, - openValidator = _this$state6.openValidator, - validator = _this$state6.validator, - converter = _this$state6.converter, - type = _this$state6.type; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("label", { - style: { - color: '#006DEC', - cursor: 'pointer' - } - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - value: openValidator, - onChange: this.updateState.bind(this, 'openValidator', !openValidator), - style: { - display: 'none' - } - }), "\u30AA\u30D7\u30B7\u30E7\u30F3"), /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-for": "option-tip", - "data-tip": "React-tooltip", - style: { - marginLeft: '5px' - } - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "option-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u5909\u63DB\u30FB\u5165\u529B\u30C1\u30A7\u30C3\u30AF\u7528\u306E\u9805\u76EE\u3092\u8868\u793A\u3057\u307E\u3059\u3002"))), openValidator && /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldValidatorArea" - }, /text|textarea|radio|select/.exec(type) && this.noSearchCheckRender(), /*#__PURE__*/_react.default.createElement("p", { - className: "customFieldBold" - }, "\u30C6\u30AD\u30B9\u30C8\u306E\u5909\u63DB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "convert-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "convert-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30C6\u30AD\u30B9\u30C8\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5165\u529B\u3055\u308C\u305F\u5024\u3092\u5225\u306E\u5024\u306B\u5909\u63DB\u3057\u307E\u3059\u3002\u8A73\u3057\u304F\u306F\u53C2\u7167\u30DC\u30BF\u30F3\u3092\u62BC\u3059\u3068\u8868\u793A\u3055\u308C\u308B\u30E2\u30FC\u30C0\u30EB\u30A6\u30A3\u30F3\u30C9\u30A6\u306B\u60C5\u5831\u304C\u8A18\u8F09\u3055\u308C\u3066\u3044\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: converter, - onInput: function onInput(e) { - _this7.updateState('converter', e.target.value); - }, - className: "acms-admin-form-width-quarter acms-admin-margin-right-small", - placeholder: "\u4F8B\uFF09rs" - }), /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn", - onClick: this.updateState.bind(this, 'openConverter', true) - }, "\u30B3\u30F3\u30D0\u30FC\u30BF\u30FC\u53C2\u7167")), showValidator && /*#__PURE__*/_react.default.createElement("table", { - className: "acms-admin-table customFieldOptionTable" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u5165\u529B\u30C1\u30A7\u30C3\u30AF", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "validate-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "validate-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5165\u529B\u3055\u308C\u305F\u5024\u304C\u6761\u4EF6\u306B\u5408\u3063\u3066\u3044\u308B\u304B\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", null, "\u5024", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "validate-value-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "validate-value-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u6700\u5C0F\u6587\u5B57\u6570\u3084\u3001\u6B63\u898F\u8868\u73FE\u30C1\u30A7\u30C3\u30AF\u3092\u30D0\u30EA\u30C7\u30FC\u30BF\u306B\u8A2D\u5B9A\u3057\u305F\u969B\u306B\u8A2D\u5B9A\u3059\u308B\u5024\u3068\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", null, "\u30E1\u30C3\u30BB\u30FC\u30B8", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "validate-message-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "validate-message-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u5165\u529B\u3055\u308C\u3066\u3044\u308B\u5024\u304C\u6761\u4EF6\u306B\u5408\u308F\u306A\u304B\u3063\u305F\u5834\u5408\u306B\u8868\u793A\u3055\u308C\u308B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", null)), validator.map(function (item, idx) { - return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - className: "acms-admin-form-width-full", - onChange: function onChange(e) { - _this7.updateValidatorOption(idx, e.target.value); - } - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }, "\u25BC \u30D0\u30EA\u30C7\u30FC\u30BF\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("optgroup", { - label: "\u5165\u529B\u5024\u306E\u5236\u9650" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "required" - }, "\u5FC5\u9808 ( required )"), /*#__PURE__*/_react.default.createElement("option", { - value: "minlength" - }, "\u6700\u5C0F\u6587\u5B57\u6570 ( minlength )"), /*#__PURE__*/_react.default.createElement("option", { - value: "maxlength" - }, "\u6700\u5927\u6587\u5B57\u6570 ( maxlength )"), /*#__PURE__*/_react.default.createElement("option", { - value: "min" - }, "\u4E0B\u9650\u5024 ( min )"), /*#__PURE__*/_react.default.createElement("option", { - value: "max" - }, "\u4E0A\u9650\u5024 ( max )")), /*#__PURE__*/_react.default.createElement("optgroup", { - label: "\u5F62\u5F0F\u30C1\u30A7\u30C3\u30AF" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "digits" - }, "\u6570\u5B57\u30C1\u30A7\u30C3\u30AF ( digits )"), /*#__PURE__*/_react.default.createElement("option", { - value: "email" - }, "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u30C1\u30A7\u30C3\u30AF ( email )"), /*#__PURE__*/_react.default.createElement("option", { - value: "hiragana" - }, "\u3072\u3089\u304C\u306A\u30C1\u30A7\u30C3\u30AF ( hiragana )"), /*#__PURE__*/_react.default.createElement("option", { - value: "katakana" - }, "\u30AB\u30BF\u30AB\u30CA\u30C1\u30A7\u30C3\u30AF ( katakana )"), /*#__PURE__*/_react.default.createElement("option", { - value: "url" - }, "URL\u30C1\u30A7\u30C3\u30AF ( url )"), /*#__PURE__*/_react.default.createElement("option", { - value: "dates" - }, "\u65E5\u4ED8\u30C1\u30A7\u30C3\u30AF ( dates )"), /*#__PURE__*/_react.default.createElement("option", { - value: "times" - }, "\u6642\u9593\u30C1\u30A7\u30C3\u30AF ( times )"), /*#__PURE__*/_react.default.createElement("option", { - value: "regex" - }, "\u6B63\u898F\u8868\u73FE\u30DE\u30C3\u30C1 ( regex )")))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: item.value, - onInput: function onInput(e) { - _this7.updateValidatorValue(idx, e.target.value); - }, - className: "acms-admin-form-width-full" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: item.message, - onInput: function onInput(e) { - _this7.updateValidatorMessage(idx, e.target.value); - }, - className: "acms-admin-form-width-full" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: _this7.removeValidator.bind(_this7, idx), - className: "acms-admin-btn-admin acms-admin-btn-admin-danger" - }, "\u524A\u9664"))); - })), showValidator && /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: this.addValidator.bind(this), - className: "acms-admin-btn" - }, "\u8FFD\u52A0")))); - } - }, { - key: "renderMake", - value: function renderMake() { - return /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearValue.bind(this), - className: "acms-admin-btn-admin", - style: { - marginRight: '5px' - } - }, "\u30AF\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.submit.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn", - style: { - marginRight: '5px' - } - }, "\u751F\u6210"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.backState.bind(this), - className: "acms-admin-btn-admin" - }, "\u5143\u306B\u623B\u3059")); - } - }, { - key: "renderImage", - value: function renderImage() { - var _this8 = this; - return /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableImg" - }, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u753B\u50CF\u30B5\u30A4\u30BA", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "image-size-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "image-size-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u901A\u5E38\u753B\u50CF\u306E\u753B\u50CF\u30B5\u30A4\u30BA\u3092\u6307\u5B9A\u3057\u307E\u3059"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "large\u753B\u50CF\u751F\u6210", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "image-large-size-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "image-size-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u901A\u5E38\u753B\u50CF\u3088\u308A\u3082\u5927\u304D\u3044\u753B\u50CF\u3092\u751F\u6210\u3067\u304D\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "tiny\u753B\u50CF\u751F\u6210", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "image-tiny-size-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "image-tiny-size-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u901A\u5E38\u753B\u50CF\u3088\u308A\u3082\u5C0F\u3055\u3044\u753B\u50CF\u3092\u751F\u6210\u3067\u304D\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "square\u753B\u50CF\u751F\u6210", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "image-square-size-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "image-tiny-size-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u901A\u5E38\u753B\u50CF\u3092\u6307\u5B9A\u3057\u305F\u30B5\u30A4\u30BA\u3067\u4E2D\u592E\u304B\u3089\u6B63\u65B9\u5F62\u306B\u30C8\u30EA\u30DF\u30F3\u30B0\u3057\u3066\u751F\u6210\u3057\u307E\u3059\u3002")))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-form-group" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "controls" - }, /*#__PURE__*/_react.default.createElement("select", { - name: "normal", - onChange: function onChange(e) { - _this8.updateState('normal', e.target.value); - }, - className: "acms-admin-margin-right-small" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "size" - }, "\u9577\u8FBA"), /*#__PURE__*/_react.default.createElement("option", { - value: "width" - }, "\u5E45"), /*#__PURE__*/_react.default.createElement("option", { - value: "height" - }, "\u9AD8\u3055")), /*#__PURE__*/_react.default.createElement("span", { - className: "input-append" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - autoComplete: "off", - name: "normalSize", - onInput: function onInput(e) { - _this8.updateState('normalSize', e.target.value); - }, - className: "customFieldSizeInput", - placeholder: "\u4F8B\uFF09200px" - }), /*#__PURE__*/_react.default.createElement("span", { - className: "add-on" - }, " px"))))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-form-group" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "controls" - }, /*#__PURE__*/_react.default.createElement("select", { - name: "large", - onChange: function onChange(e) { - _this8.updateState('large', e.target.value); - }, - className: "acms-admin-margin-right-small" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }, "\u4F5C\u3089\u306A\u3044"), /*#__PURE__*/_react.default.createElement("option", { - value: "largeWidth" - }, "width"), /*#__PURE__*/_react.default.createElement("option", { - value: "largeHeight" - }, "height")), /*#__PURE__*/_react.default.createElement("span", { - className: "input-append" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - autoComplete: "off", - name: "largeSize", - onInput: function onInput(e) { - _this8.updateState('largeSize', e.target.value); - }, - className: "customFieldSizeInput", - placeholder: "\u4F8B\uFF09400px" - }), /*#__PURE__*/_react.default.createElement("span", { - className: "add-on" - }, " px"))))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-form-group" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "controls" - }, /*#__PURE__*/_react.default.createElement("select", { - name: "tiny", - onChange: function onChange(e) { - _this8.updateState('tiny', e.target.value); - }, - className: "acms-admin-margin-right-small" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }, "\u4F5C\u3089\u306A\u3044"), /*#__PURE__*/_react.default.createElement("option", { - value: "tinyWidth" - }, "width"), /*#__PURE__*/_react.default.createElement("option", { - value: "tinyHeight" - }, "height")), /*#__PURE__*/_react.default.createElement("span", { - className: "input-append" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - autoComplete: "off", - name: "tinySize", - onInput: function onInput(e) { - _this8.updateState('tinySize', e.target.value); - }, - className: "customFieldSizeInput", - placeholder: "\u4F8B\uFF09100px" - }), /*#__PURE__*/_react.default.createElement("span", { - className: "add-on" - }, " px"))))), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-form-group" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "controls" - }, /*#__PURE__*/_react.default.createElement("select", { - name: "square", - onChange: function onChange(e) { - _this8.updateState('square', e.target.value); - }, - className: "acms-admin-margin-right-small" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }, "\u4F5C\u3089\u306A\u3044"), /*#__PURE__*/_react.default.createElement("option", { - value: "squareWidth" - }, "width")), /*#__PURE__*/_react.default.createElement("span", { - className: "input-append" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - autoComplete: "off", - name: "squareSize", - onInput: function onInput(e) { - _this8.updateState('squareSize', e.target.value); - }, - className: "customFieldSizeInput", - placeholder: "\u4F8B\uFF09250px" - }), /*#__PURE__*/_react.default.createElement("span", { - className: "add-on" - }, " px")))))))); - } - }, { - key: "renderImageResize", - value: function renderImageResize() { - var _this$state7 = this.state, - resize = _this$state7.resize, - alt = _this$state7.alt; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-checkbox" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: this.updateState.bind(this, 'resize', !resize), - checked: resize, - id: "resize-checkbox" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "resize-checkbox" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u30D6\u30E9\u30A6\u30B6\u5074\u306E\u30EA\u30B5\u30A4\u30BA\u6A5F\u80FD\u3092\u4F7F\u7528\u3059\u308B")), /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-checkbox" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: this.updateState.bind(this, 'alt', !alt), - checked: alt, - id: "alt-checkbox" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "alt-checkbox" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), " alt\u8868\u793A\u7528\u5165\u529B\u6B04\u3092\u4F7F\u7528\u3059\u308B"))); - } - }, { - key: "renderRichEditorOption", - value: function renderRichEditorOption() { - var _this9 = this; - var _this$state8 = this.state, - useExpand = _this$state8.useExpand, - startHeadingLevel = _this$state8.startHeadingLevel, - endHeadingLevel = _this$state8.endHeadingLevel; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-checkbox" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: this.updateState.bind(this, 'useExpand', !useExpand), - checked: useExpand, - id: "expand-checkbox" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "expand-checkbox" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), " \u30EA\u30C3\u30C1\u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u62E1\u5927\u8868\u793A\u3059\u308B")), /*#__PURE__*/_react.default.createElement("div", null, "\u958B\u59CB\u898B\u51FA\u3057\u30EC\u30D9\u30EB", /*#__PURE__*/_react.default.createElement("span", { - style: { - display: 'inline-block', - width: '5px', - height: '1px' - } - }), /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: startHeadingLevel, - onInput: function onInput(e) { - _this9.setState({ - startHeadingLevel: e.target.value - }); - } - }), /*#__PURE__*/_react.default.createElement("span", { - style: { - display: 'inline-block', - width: '15px', - height: '1px' - } - }), "\u7D42\u4E86\u898B\u51FA\u3057\u30EC\u30D9\u30EB", /*#__PURE__*/_react.default.createElement("span", { - style: { - display: 'inline-block', - width: '5px', - height: '1px' - } - }), /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: endHeadingLevel, - onInput: function onInput(e) { - _this9.setState({ - endHeadingLevel: e.target.value - }); - } - }))); - } - }, { - key: "renderMediaOption", - value: function renderMediaOption() { - var _this10 = this; - var _this$state9 = this.state, - mediaType = _this$state9.mediaType, - useDropArea = _this$state9.useDropArea, - useFocusImage = _this$state9.useFocusImage, - dropAreaWidth = _this$state9.dropAreaWidth, - dropAreaHeight = _this$state9.dropAreaHeight, - focusImageWidth = _this$state9.focusImageWidth, - focusImageHeight = _this$state9.focusImageHeight; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", { - style: { - marginBottom: '5px' - } - }, "\u9078\u3079\u308B\u30E1\u30C7\u30A3\u30A2\u306E\u30BF\u30A4\u30D7\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: this.updateState.bind(this, 'mediaType', 'all'), - checked: mediaType === 'all', - id: "media-type-all-radio" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "media-type-all-radio" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u5168\u3066\u306E\u30BF\u30A4\u30D7")), /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: this.updateState.bind(this, 'mediaType', 'image'), - checked: mediaType === 'image', - id: "media-type-image-radio" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "media-type-image-radio" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u753B\u50CF\u306E\u307F")), /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: this.updateState.bind(this, 'mediaType', 'file'), - checked: mediaType === 'file', - id: "media-type-file-radio" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "media-type-file-radio" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30D5\u30A1\u30A4\u30EB\u306E\u307F")), /*#__PURE__*/_react.default.createElement("p", { - style: { - marginBottom: '5px' - } - }, "\u30C9\u30ED\u30C3\u30D7\u30A8\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("div", { - style: { - display: 'flex' - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-checkbox", - style: { - paddingTop: '5px' - } - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: function onChange() { - if (useDropArea) { - _this10.updateState('useDropArea', false); - } else { - _this10.updateState('useDropArea', true); - } - }, - checked: useDropArea, - id: "media-use-droparea" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "media-use-droparea" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u30C9\u30ED\u30C3\u30D7\u30A8\u30EA\u30A2\u3092\u5229\u7528\u3059\u308B")), useDropArea && /*#__PURE__*/_react.default.createElement("div", null, "\u5E45 ", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - defaultValue: dropAreaWidth - }), " px", /*#__PURE__*/_react.default.createElement("span", { - style: { - display: 'inline-block', - width: '15px', - height: '1px' - } - }), "\u9AD8\u3055 ", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - defaultValue: dropAreaHeight - }), " px")), /*#__PURE__*/_react.default.createElement("p", { - style: { - marginBottom: '5px' - } - }, "\u30C8\u30EA\u30DF\u30F3\u30B0"), /*#__PURE__*/_react.default.createElement("div", { - style: { - display: 'flex' - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-checkbox", - style: { - paddingTop: '5px' - } - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: function onChange() { - if (useFocusImage) { - _this10.updateState('useFocusImage', false); - } else { - _this10.updateState('useFocusImage', true); - } - }, - checked: useFocusImage, - id: "media-use-focusImage" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "media-use-focusImage" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u4E2D\u5FC3\u70B9\u3092\u57FA\u6E96\u306B\u753B\u50CF\u3092\u30C8\u30EA\u30DF\u30F3\u30B0\u3057\u3066\u8868\u793A\u3059\u308B")), useFocusImage && /*#__PURE__*/_react.default.createElement("div", null, "\u5E45 ", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - defaultValue: focusImageWidth - }), " px", /*#__PURE__*/_react.default.createElement("span", { - style: { - display: 'inline-block', - width: '15px', - height: '1px' - } - }), "\u9AD8\u3055 ", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - defaultValue: focusImageHeight - }), " px"))); - } - }, { - key: "renderAlert", - value: function renderAlert() { - var alert = this.state.alert; - if (alert) { - return /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-alert acms-admin-alert-icon acms-admin-alert-danger", - style: { - fontSize: '12px' - } - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-alert-icon-before acms-admin-icon-attention", - "aria-hidden": "true" - }), "type\u3068\u30BF\u30A4\u30C8\u30EB\u3068\u30D5\u30A3\u30FC\u30EB\u30C9\u3001\u5168\u3066\u3092\u5165\u529B\u3057\u306A\u3044\u3068\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002", /*#__PURE__*/_react.default.createElement("button", { - className: "js-acms-alert-close acms-admin-alert-icon-after", - onClick: this.removeAlert.bind(this) - }, "\xD7")); - } - return null; - } - }, { - key: "renderGroupAlert", - value: function renderGroupAlert() { - var groupAlert = this.state.groupAlert; - if (groupAlert) { - return /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-alert acms-admin-alert-icon acms-admin-alert-danger", - style: { - fontSize: '12px' - } - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-alert-icon-before acms-admin-icon-attention", - "aria-hidden": "true" - }), "group\u540D\u3092\u5165\u529B\u3057\u306A\u3044\u3068group\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002", /*#__PURE__*/_react.default.createElement("button", { - className: "js-acms-alert-close acms-admin-alert-icon-after", - onClick: this.removeGroupAlert.bind(this) - }, "\xD7")); - } - return null; - } - }, { - key: "renderDuplicateAlert", - value: function renderDuplicateAlert() { - var duplicatedField = this.state.duplicatedField; - if (duplicatedField) { - return /*#__PURE__*/_react.default.createElement("p", { - className: "acms-admin-alert acms-admin-alert-icon acms-admin-alert-danger", - style: { - fontSize: '12px' - } - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-alert-icon-before acms-admin-icon-attention", - "aria-hidden": "true" - }), "group\u540D\u3068\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3092\u540C\u3058\u5024\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002", /*#__PURE__*/_react.default.createElement("button", { - className: "js-acms-alert-close acms-admin-alert-icon-after", - onClick: this.removeDuplicateAlert.bind(this) - }, "\xD7")); - } - return null; - } - }, { - key: "renderFile", - value: function renderFile() { - var _this11 = this; - var _this$state10 = this.state, - extension = _this$state10.extension, - fileName = _this$state10.fileName, - fileNameMethod = _this$state10.fileNameMethod; - return /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFileContainer" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFileNameOptContainer" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - checked: fileNameMethod === 'random', - id: "file-name-method-random", - onChange: this.updateState.bind(this, 'fileNameMethod', 'random') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "file-name-method-random" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u30E9\u30F3\u30C0\u30E0\uFF09")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - checked: fileNameMethod === 'fix', - id: "file-name-method-fix", - onChange: this.updateState.bind(this, 'fileNameMethod', 'fix') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "file-name-method-fix" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u56FA\u5B9A\uFF09")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - checked: fileNameMethod === 'asis', - id: "file-name-method-asis", - onChange: this.updateState.bind(this, 'fileNameMethod', 'asis') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "file-name-method-asis" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u305D\u306E\u307E\u307E\uFF09"))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldInputGroup customFieldInputFileGroup" - }, fileNameMethod === 'random' && /*#__PURE__*/_react.default.createElement("input", { - type: "text", - placeholder: "\u30E9\u30F3\u30C0\u30E0\u306E\u6587\u5B57\u5217\u304C\u5165\u308A\u307E\u3059", - disabled: true - }), fileNameMethod === 'fix' && /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: fileName, - onInput: function onInput(e) { - _this11.updateState('fileName', e.target.value); - }, - placeholder: "\u4F8B\uFF09example.pdf" - }), fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "text", - placeholder: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u540D", - disabled: true - }))), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, "\u62E1\u5F35\u5B50\u5236\u9650\uFF08pdf\u306A\u3069\uFF09"), /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: extension, - onInput: function onInput(e) { - _this11.updateState('extension', e.target.value); - }, - placeholder: "\u4F8B\uFF09pdf" - }))); - } - }]); -}(_react.Component); \ No newline at end of file diff --git a/lib/components/cofirmLayouts/GroupTableLayoutConfirm.js b/lib/components/cofirmLayouts/GroupTableLayoutConfirm.js new file mode 100644 index 0000000..ec26bd7 --- /dev/null +++ b/lib/components/cofirmLayouts/GroupTableLayoutConfirm.js @@ -0,0 +1,340 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.GroupTableLayoutConfirm = GroupTableLayoutConfirm; +var _react = _interopRequireWildcard(require('react')); +var _classnames = _interopRequireDefault(require('classnames')); +var _MakerContext = require('../../store/MakerContext'); +var _WrapTable = require('../html/WrapTable'); +function _getRequireWildcardCache(e) { + if ('function' != typeof WeakMap) return null; + var r = new WeakMap(), + t = new WeakMap(); + return (_getRequireWildcardCache = function (e) { + return e ? t : r; + })(e); +} +function _interopRequireWildcard(e, r) { + if (!r && e && e.__esModule) return e; + if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; + var t = _getRequireWildcardCache(r); + if (t && t.has(e)) return t.get(e); + var n = { __proto__: null }, + a = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var u in e) + if ('default' !== u && {}.hasOwnProperty.call(e, u)) { + var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); + } + return (n.default = e), t && t.set(e, n), n; +} +function GroupTableLayoutConfirm() { + const { + state: { fieldgroup }, + preview: { acmscss, direction }, + } = (0, _MakerContext.useMakerContext)(); + const ConditionalWrap = (_ref) => { + let { condition, wrap, children } = _ref; + return condition ? wrap(children) : children; + }; + return /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + fieldgroup.title && + /*#__PURE__*/ _react.default.createElement( + 'h2', + { + className: (0, _classnames.default)({ + 'acms-admin-admin-title2': acmscss, + }), + }, + fieldgroup.title + ), + /*#__PURE__*/ _react.default.createElement( + 'table', + { + className: (0, _classnames.default)({ + 'adminTable acms-admin-table-admin-edit': acmscss, + }), + }, + direction === 'horizontal' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + fieldgroup && + /*#__PURE__*/ _react.default.createElement( + 'thead', + { + className: (0, _classnames.default)({ + 'acms-admin-hide-sp': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement( + 'tr', + null, + fieldgroup.items.map((item, index) => + /*#__PURE__*/ _react.default.createElement( + 'th', + { + key: index, + className: (0, _classnames.default)({ + 'acms-admin-table-left': acmscss, + }), + }, + item.title + ) + ) + ) + ) + ), + /*#__PURE__*/ _react.default.createElement( + 'tbody', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'tr', + null, + /*#__PURE__*/ _react.default.createElement( + ConditionalWrap, + { + condition: direction === 'vertical', + wrap: (children) => + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement('table', null, children) + ), + }, + fieldgroup.items.map((item, index) => { + if (item.type === 'text') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}')) + ); + } else if (item.type === 'textarea') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[escape|nl2br]')) + ); + } else if (item.type === 'select') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: optionIndex, + }, + ''), + option.label, + '' + ); + }) + ) + ); + } else if (item.type === 'radio') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: optionIndex, + }, + ''), + option.label, + '' + ); + }) + ) + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += ''.concat(item.extension, '.svg'); + alt += item.extension; + } else { + src += 'file.svg'; + } + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, + }) + ), + '') + ) + ); + } else if (item.type === 'image') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + className: (0, _classnames.default)({ + 'acms-admin-img-responsive': acmscss, + }), + alt: '{'.concat(item.name, '@alt}'), + }), + '') + ) + ); + } else if (item.type === 'media') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '{'.concat(item.name, '@thumbnail}'), + style: { + width: '64px', + height: 'auto', + }, + }) + ), + '', + ''), + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@link}'), + }, + '', + item.useFocusImage && + /*#__PURE__*/ _react.default.createElement( + 'div', + { + style: { + width: ''.concat(item.focusImageWidth, 'px'), + height: ''.concat(item.focusImageHeight, 'px'), + }, + }, + /*#__PURE__*/ _react.default.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(item.name, '@focalX}'), + 'data-focus-y': '{'.concat(item.name, '@focalY}'), + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(item.name, '@path}[resizeImg(') + .concat(item.focusImageWidth, ')]'), + }) + ), + !item.useFocusImage && + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }), + '') + ), + '', + ''), + /*#__PURE__*/ _react.default.createElement('p', null, '{'.concat(item.name, '@text}')), + '', + '' + ) + ); + } else if (item.type === 'lite-editor') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } else if (item.type === 'rich-editor') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '@html}[raw]')) + ); + } else if (item.type === 'table') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } + return null; + }) + ) + ), + '') + ) + ) + ); +} diff --git a/lib/components/cofirmLayouts/TableLayoutConfirm.js b/lib/components/cofirmLayouts/TableLayoutConfirm.js new file mode 100644 index 0000000..acfcd54 --- /dev/null +++ b/lib/components/cofirmLayouts/TableLayoutConfirm.js @@ -0,0 +1,260 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.TableLayoutConfirm = TableLayoutConfirm; +var _react = _interopRequireDefault(require('react')); +var _classnames = _interopRequireDefault(require('classnames')); +var _MakerContext = require('../../store/MakerContext'); +function TableLayoutConfirm() { + const { + state: { customfield }, + preview: { acmscss }, + } = (0, _MakerContext.useMakerContext)(); + return /*#__PURE__*/ _react.default.createElement( + 'table', + { + className: (0, _classnames.default)({ + 'acms-admin-table-admin-edit': acmscss, + }), + }, + customfield.map((item, index) => { + if (!item.name) { + return null; + } + if (item.type === 'text') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}')) + ); + } else if (item.type === 'textarea') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[escape|nl2br]')) + ); + } else if (item.type === 'select') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option) => + /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: option.value, + }, + ''), + option.value, + '' + ) + ) + ) + ); + } else if (item.type === 'radio') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option) => + '\n ') + .concat(option.label, '\n ') + ) + ) + ); + } else if (item.type === 'checkbox') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + ','), + item.option.map((option) => + '\n ') + .concat(option.label, '\n ') + ), + '') + ) + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += ''.concat(item.extension, '.svg'); + alt += item.extension; + } else { + src += 'file.svg'; + } + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, + }) + ), + '') + ) + ); + } else if (item.type === 'image') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + width: '64', + height: '64', + alt: '{'.concat(item.name, '@alt}'), + }) + ) + ); + } else if (item.type === 'media') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '{'.concat(item.name, '@thumbnail}'), + style: { + width: '64px', + height: 'auto', + }, + }) + ), + '', + ''), + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@link}'), + }, + '', + item.useFocusImage && + /*#__PURE__*/ _react.default.createElement( + 'div', + { + style: { + width: ''.concat(item.focusImageWidth, 'px'), + height: ''.concat(item.focusImageHeight, 'px'), + }, + }, + /*#__PURE__*/ _react.default.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(item.name, '@focalX}'), + 'data-focus-y': '{'.concat(item.name, '@focalY}'), + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(item.name, '@path}[resizeImg(') + .concat(item.focusImageWidth, ')]'), + width: item.focusImageWidth, + height: '{'.concat(item.name, '@ratio}[getHeightFromRatio(').concat(item.focusImageWidth, ')]'), + }) + ), + !item.useFocusImage && + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), + width: '300', + height: '{'.concat(item.name, '@ratio}[getHeightFromRatio(300)]'), + }), + '') + ), + '', + ''), + /*#__PURE__*/ _react.default.createElement('p', null, '{'.concat(item.name, '@text}')), + '', + '' + ) + ); + } else if (item.type === 'rich-editor') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '@html}[raw]')) + ); + } else if (item.type === 'lite-editor') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } else if (item.type === 'table') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } + }) + ); +} diff --git a/lib/components/cofirmLayouts/UnitGroupTableLayoutConfirm.js b/lib/components/cofirmLayouts/UnitGroupTableLayoutConfirm.js new file mode 100644 index 0000000..a7b2c4e --- /dev/null +++ b/lib/components/cofirmLayouts/UnitGroupTableLayoutConfirm.js @@ -0,0 +1,318 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.UnitGroupTableLayoutConfirm = UnitGroupTableLayoutConfirm; +var _react = _interopRequireDefault(require('react')); +var _classnames = _interopRequireDefault(require('classnames')); +var _MakerContext = require('../../store/MakerContext'); +var _WrapTable = require('../html/WrapTable'); +function UnitGroupTableLayoutConfirm() { + const { + state: { unitgroup }, + preview: { acmscss, direction }, + } = (0, _MakerContext.useMakerContext)(); + const ConditionalWrap = (_ref) => { + let { condition, wrap, children } = _ref; + return condition ? wrap(children) : children; + }; + return /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + unitgroup.title && + /*#__PURE__*/ _react.default.createElement( + 'h2', + { + className: (0, _classnames.default)({ + 'acms-admin-admin-title2': acmscss, + }), + }, + unitgroup.title + ), + /*#__PURE__*/ _react.default.createElement( + 'table', + { + className: (0, _classnames.default)({ + 'adminTable acms-admin-table-admin-edit': acmscss, + }), + }, + direction === 'horizontal' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + unitgroup && + /*#__PURE__*/ _react.default.createElement( + 'thead', + { + className: (0, _classnames.default)({ + 'acms-admin-hide-sp': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement( + 'tr', + null, + unitgroup.items.map((item, index) => + /*#__PURE__*/ _react.default.createElement( + 'th', + { + key: index, + className: (0, _classnames.default)({ + 'acms-admin-table-left': acmscss, + }), + }, + item.title + ) + ) + ) + ) + ), + /*#__PURE__*/ _react.default.createElement( + 'tbody', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'tr', + null, + /*#__PURE__*/ _react.default.createElement( + ConditionalWrap, + { + condition: direction === 'vertical', + wrap: (children) => + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement('table', null, children) + ), + }, + unitgroup.items.map((item, index) => { + if (item.type === 'text') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}')) + ); + } else if (item.type === 'textarea') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[escape|nl2br]')) + ); + } else if (item.type === 'select') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: optionIndex, + }, + ''), + option.label, + '' + ); + }) + ) + ); + } else if (item.type === 'radio') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: optionIndex, + }, + ''), + option.label, + '' + ); + }) + ) + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += ''.concat(item.extension, '.svg'); + alt += item.extension; + } else { + src += 'file.svg'; + } + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, + }) + ), + '') + ) + ); + } else if (item.type === 'image') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + className: (0, _classnames.default)({ + 'acms-admin-img-responsive': acmscss, + }), + alt: '{'.concat(item.name, '@alt}'), + }), + '') + ) + ); + } else if (item.type === 'media') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '{'.concat(item.name, '@thumbnail}'), + style: { + width: '64px', + height: 'auto', + }, + }) + ), + '', + ''), + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@link}'), + }, + '', + item.useFocusImage && + /*#__PURE__*/ _react.default.createElement( + 'div', + { + style: { + width: ''.concat(item.focusImageWidth, 'px'), + height: ''.concat(item.focusImageHeight, 'px'), + }, + }, + /*#__PURE__*/ _react.default.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(item.name, '@focalX}'), + 'data-focus-y': '{'.concat(item.name, '@focalY}'), + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(item.name, '@path}[resizeImg(') + .concat(item.focusImageWidth, ')]'), + }) + ), + !item.useFocusImage && + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }), + '') + ), + '', + ''), + /*#__PURE__*/ _react.default.createElement('p', null, '{'.concat(item.name, '@text}')), + '', + '' + ) + ); + } else if (item.type === 'lite-editor') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } else if (item.type === 'rich-editor') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '@html}[raw]')) + ); + } else if (item.type === 'table') { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + key: index, + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } + return null; + }) + ) + ), + '') + ) + ) + ); +} diff --git a/lib/components/cofirmLayouts/UnitTableLayoutConfirm.js b/lib/components/cofirmLayouts/UnitTableLayoutConfirm.js new file mode 100644 index 0000000..20ad345 --- /dev/null +++ b/lib/components/cofirmLayouts/UnitTableLayoutConfirm.js @@ -0,0 +1,260 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.UnitTableLayoutConfirm = UnitTableLayoutConfirm; +var _react = _interopRequireDefault(require('react')); +var _classnames = _interopRequireDefault(require('classnames')); +var _MakerContext = require('../../store/MakerContext'); +function UnitTableLayoutConfirm() { + const { + state: { customunit }, + preview: { acmscss }, + } = (0, _MakerContext.useMakerContext)(); + return /*#__PURE__*/ _react.default.createElement( + 'table', + { + className: (0, _classnames.default)({ + 'acms-admin-table-admin-edit': acmscss, + }), + }, + customunit.map((item, index) => { + if (!item.name) { + return null; + } + if (item.type === 'text') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}')) + ); + } else if (item.type === 'textarea') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[escape|nl2br]')) + ); + } else if (item.type === 'select') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option) => + /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: option.value, + }, + ''), + option.value, + '' + ) + ) + ) + ); + } else if (item.type === 'radio') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + item.option.map((option) => + '\n ') + .concat(option.label, '\n ') + ) + ) + ); + } else if (item.type === 'checkbox') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + ','), + item.option.map((option) => + '\n ') + .concat(option.label, '\n ') + ), + '') + ) + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += ''.concat(item.extension, '.svg'); + alt += item.extension; + } else { + src += 'file.svg'; + } + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, + }) + ), + '') + ) + ); + } else if (item.type === 'image') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + width: '64', + height: '64', + alt: '{'.concat(item.name, '@alt}'), + }) + ) + ); + } else if (item.type === 'media') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '{'.concat(item.name, '@thumbnail}'), + style: { + width: '64px', + height: 'auto', + }, + }) + ), + '', + ''), + ''), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '{'.concat(item.name, '@link}'), + }, + '', + item.useFocusImage && + /*#__PURE__*/ _react.default.createElement( + 'div', + { + style: { + width: ''.concat(item.focusImageWidth, 'px'), + height: ''.concat(item.focusImageHeight, 'px'), + }, + }, + /*#__PURE__*/ _react.default.createElement('img', { + className: 'js-focused-image', + 'data-focus-x': '{'.concat(item.name, '@focalX}'), + 'data-focus-y': '{'.concat(item.name, '@focalY}'), + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{' + .concat(item.name, '@path}[resizeImg(') + .concat(item.focusImageWidth, ')]'), + width: item.focusImageWidth, + height: '{'.concat(item.name, '@ratio}[getHeightFromRatio(').concat(item.focusImageWidth, ')]'), + }) + ), + !item.useFocusImage && + /*#__PURE__*/ _react.default.createElement('img', { + alt: '{'.concat(item.name, '@alt}'), + src: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), + width: '300', + height: '{'.concat(item.name, '@ratio}[getHeightFromRatio(300)]'), + }), + '') + ), + '', + ''), + /*#__PURE__*/ _react.default.createElement('p', null, '{'.concat(item.name, '@text}')), + '', + '' + ) + ); + } else if (item.type === 'rich-editor') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '@html}[raw]')) + ); + } else if (item.type === 'lite-editor') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } else if (item.type === 'table') { + return /*#__PURE__*/ _react.default.createElement( + 'tr', + { + key: index, + }, + /*#__PURE__*/ _react.default.createElement('th', null, item.title), + /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) + ); + } + }) + ); +} diff --git a/lib/components/field-confirm-source.js b/lib/components/field-confirm-source.js deleted file mode 100644 index 0c4c570..0000000 --- a/lib/components/field-confirm-source.js +++ /dev/null @@ -1,284 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.default = void 0; -var _react = _interopRequireWildcard(require('react')); -var _classnames = _interopRequireDefault(require('classnames')); -function _getRequireWildcardCache(e) { - if ('function' != typeof WeakMap) return null; - var r = new WeakMap(), - t = new WeakMap(); - return (_getRequireWildcardCache = function (e) { - return e ? t : r; - })(e); -} -function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) return e; - if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, - a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ('default' !== u && {}.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); - } - return (n.default = e), t && t.set(e, n), n; -} -class FieldConfirmSource extends _react.Component { - constructor(props) { - super(props); - } - render() { - const { customfield, acmscss } = this.props; - return /*#__PURE__*/ _react.default.createElement( - 'table', - { - className: (0, _classnames.default)({ - 'acms-admin-table-admin-edit': acmscss, - }), - }, - customfield.map((item, index) => { - if (!item.name) { - return null; - } - if (item.type === 'text') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}')) - ); - } else if (item.type === 'textarea') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[escape|nl2br]')) - ); - } else if (item.type === 'select') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - item.option.map((option) => - /*#__PURE__*/ _react.default.createElement( - 'div', - { - key: option.value, - }, - ''), - option.value, - '' - ) - ) - ) - ); - } else if (item.type === 'radio') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - item.option.map((option) => - '\n ') - .concat(option.label, '\n ') - ) - ) - ); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - ''), - ','), - item.option.map((option) => - '\n ') - .concat(option.label, '\n ') - ), - '') - ) - ); - } else if (item.type === 'file') { - let src = '/images/fileicon/'; - let alt = 'file'; - if (item.extension) { - src += ''.concat(item.extension, '.svg'); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - ''), - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - }, - /*#__PURE__*/ _react.default.createElement('img', { - src: src, - width: '64', - height: '64', - alt: alt, - }) - ), - '') - ) - ); - } else if (item.type === 'image') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - width: '64', - height: '64', - alt: '{'.concat(item.name, '@alt}'), - }) - ) - ); - } else if (item.type === 'media') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - ''), - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '{'.concat(item.name, '@path}'), - }, - /*#__PURE__*/ _react.default.createElement('img', { - alt: '{'.concat(item.name, '@alt}'), - src: '{'.concat(item.name, '@thumbnail}'), - style: { - width: '64px', - height: 'auto', - }, - }) - ), - '', - ''), - ''), - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '{'.concat(item.name, '@link}'), - }, - '', - item.useFocusImage && - /*#__PURE__*/ _react.default.createElement( - 'div', - { - style: { - width: ''.concat(item.focusImageWidth, 'px'), - height: ''.concat(item.focusImageHeight, 'px'), - }, - }, - /*#__PURE__*/ _react.default.createElement('img', { - className: 'js-focused-image', - 'data-focus-x': '{'.concat(item.name, '@focalX}'), - 'data-focus-y': '{'.concat(item.name, '@focalY}'), - alt: '{'.concat(item.name, '@alt}'), - src: '%{MEDIA_ARCHIVES_DIR}{' - .concat(item.name, '@path}[resizeImg(') - .concat(item.focusImageWidth, ')]'), - width: item.focusImageWidth, - height: '{'.concat(item.name, '@ratio}[getHeightFromRatio(').concat(item.focusImageWidth, ')]'), - }) - ), - !item.useFocusImage && - /*#__PURE__*/ _react.default.createElement('img', { - alt: '{'.concat(item.name, '@alt}'), - src: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), - width: '300', - height: '{'.concat(item.name, '@ratio}[getHeightFromRatio(300)]'), - }), - '') - ), - '', - ''), - /*#__PURE__*/ _react.default.createElement('p', null, '{'.concat(item.name, '@text}')), - '', - '' - ) - ); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '@html}[raw]')) - ); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) - ); - } else if (item.type === 'table') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement('th', null, item.title), - /*#__PURE__*/ _react.default.createElement('td', null, '{'.concat(item.name, '}[raw]')) - ); - } - }) - ); - } -} -exports.default = FieldConfirmSource; diff --git a/lib/components/field-group-source.js b/lib/components/field-group-source.js deleted file mode 100644 index c7ae96b..0000000 --- a/lib/components/field-group-source.js +++ /dev/null @@ -1,867 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var ConditionalWrap = function ConditionalWrap(_ref) { - var condition = _ref.condition, - wrap = _ref.wrap, - children = _ref.children; - return condition ? wrap(children) : children; -}; -var FieldGroupSource = exports.default = /*#__PURE__*/function (_Component) { - function FieldGroupSource(props) { - (0, _classCallCheck2.default)(this, FieldGroupSource); - return _callSuper(this, FieldGroupSource, [props]); - } - (0, _inherits2.default)(FieldGroupSource, _Component); - return (0, _createClass2.default)(FieldGroupSource, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (window.ACMS && ACMS.dispatchEvent) { - ACMS.dispatchEvent('acmsCustomFieldMakerPreview', this.table, { - item: this.table - }); - } - } - }, { - key: "renderValidator", - value: function renderValidator(item, acmscss) { - var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - var _this$props = this.props, - preview = _this$props.preview, - jsValidator = _this$props.jsValidator; - if (!item.openValidator) { - return null; - } - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.validator.map(function (validator) { - var name = item.type === 'file' || item.type === 'image' ? "".concat(item.name, "@path") : item.name; - var classSuffix = bottom ? '1' : "{".concat(name, ":v#").concat(validator.option, "}"); - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, !jsValidator && !bottom && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, validator.message && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("p", { - className: (0, _classnames.default)({ - 'acms-admin-text-error': acmscss - }) - }, validator.message), preview ? null : ""))), jsValidator && /*#__PURE__*/_react.default.createElement("div", { - "data-validator-label": "".concat(name, "-v-").concat(validator.option), - className: "validator-result-".concat(classSuffix) - }, /*#__PURE__*/_react.default.createElement("p", { - className: "error-text" - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-attention" - }), validator.message))); - })); - } - }, { - key: "wrapTable", - value: function wrapTable(children, title) { - var direction = this.props.direction; - return /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: direction === 'vertical', - wrap: function wrap(child) { - return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, title), child); - } - }, children); - } - }, { - key: "render", - value: function render() { - var _this = this; - var _this$props2 = this.props, - groupName = _this$props2.groupName, - groupTitle = _this$props2.groupTitle, - acmscss = _this$props2.acmscss, - groupitems = _this$props2.groupitems, - preview = _this$props2.preview, - direction = _this$props2.direction; - var groupLength = groupitems.length; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, groupTitle && /*#__PURE__*/_react.default.createElement("h2", { - className: (0, _classnames.default)({ - 'acms-admin-admin-title2': acmscss - }) - }, groupTitle), groupName && /*#__PURE__*/_react.default.createElement("table", { - className: (0, _classnames.default)('js-fieldgroup-sortable', { - 'adminTable acms-admin-table-admin-edit': acmscss - }), - ref: function ref(table) { - return _this.table = table; - } - }, /*#__PURE__*/_react.default.createElement("thead", { - className: (0, _classnames.default)({ - 'acms-admin-hide-sp': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: (0, _classnames.default)({ - 'acms-admin-table-left acms-admin-admin-config-table-item-handle': acmscss - }) - }, "\xA0"), direction === 'horizontal' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, groupitems.map(function (item) { - return /*#__PURE__*/_react.default.createElement("th", { - className: (0, _classnames.default)({ - 'acms-admin-table-left': acmscss - }) - }, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - })); - })), direction === 'vertical' && /*#__PURE__*/_react.default.createElement("th", null), /*#__PURE__*/_react.default.createElement("th", { - className: (0, _classnames.default)({ - 'acms-admin-table-left acms-admin-admin-config-table-action': acmscss - }) - }, "\u524A\u9664"))), /*#__PURE__*/_react.default.createElement("tbody", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("tr", { - className: "sortable-item" - }, /*#__PURE__*/_react.default.createElement("td", { - className: "item-handle acms-admin-table-nowrap" - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-sort" - })), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: direction === 'vertical', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("table", null, children)); - } - }, groupitems.map(function (item) { - if (item.type === 'text') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "[]"), - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'textarea') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, "{".concat(item.name, "}")), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'select') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - })), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'radio') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: "".concat(item.name, "[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'file') { - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - alt += item.extension; - } else { - src += 'file.svg'; - } - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit[]"), - value: "delete", - id: "input-checkbox-".concat(item.name, "{i}@edit[]") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "{i}@edit[]") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), " \u524A\u9664")), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old[]"), - value: "{".concat(item.name, "@path}") - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@extension[]"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename[]"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename[]"), - value: item.fileName - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename[]"), - value: "@rawfilename" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "[]") - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'image') { - var style = {}; - if (item.normalSize) { - style.maxWidth = "".concat(item.normalSize, "px"); - } - var hiddenStyle = Object.assign({}, style, { - display: 'none' - }); - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'js-img_resize_preview': item.resize - }), - style: style, - alt: "{".concat(item.name, "@alt}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old[]"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit[]"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit[]") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), preview ? null : '', /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'js-img_resize_preview': item.resize - }), - style: hiddenStyle - }), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "@alt[]"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.normal, "[]"), - value: item.normalSize - }), item.tinySize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.tiny, "[]"), - value: item.tinySize - }), item.largeSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.large, "[]"), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.square, "[]"), - value: item.squareSize - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'media') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "" - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }) - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-margin-top-mini': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "[]"), - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'lite-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }, "{".concat(item.name, "}")), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'rich-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: "".concat(item.name, "[]"), - value: "{".concat(item.name, "@html}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "rich-editor" - })))), item.title); - } else if (item.type === 'table') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: "".concat(item.name, "[]") - })))), item.title); - } - })), /*#__PURE__*/_react.default.createElement("td", { - className: "acms-admin-table-nowrap" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: (0, _classnames.default)('item-delete', { - 'acms-admin-btn-admin acms-admin-btn-admin-danger': acmscss - }), - value: "\u524A\u9664" - }))), preview ? null : ""), preview ? null : /*#__PURE__*/_react.default.createElement("tr", { - className: "sortable-item item-template" - }, /*#__PURE__*/_react.default.createElement("td", { - className: "item-handle acms-admin-table-nowrap" - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-sort" - })), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: direction === 'vertical', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("table", null, children)); - } - }, groupitems.map(function (item) { - if (item.type === 'text') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "[]"), - value: "", - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'textarea') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'select') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - return /*#__PURE__*/_react.default.createElement("option", { - value: option.value - }, option.label); - })), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'radio') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: "".concat(item.name, "[]"), - value: option.value, - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'file') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "[]") - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@extension[]"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename[]"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename[]"), - value: item.fileName - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename[]"), - value: "@rawfilename" - }), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'image') { - var style = {}; - if (item.normalSize) { - style.maxWidth = "".concat(item.normalSize, "px"); - } - var hiddenStyle = Object.assign({}, style, { - display: 'none' - }); - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, /*#__PURE__*/_react.default.createElement("img", { - src: "", - style: hiddenStyle, - className: "js-img_resize_preview" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "[]"), - style: style - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "@alt[]"), - value: "", - size: "40" - })), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.normal, "[]"), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.tiny, "[]"), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.large, "[]"), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.square, "[]"), - value: item.squareSize - }), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'media') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }) - })), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "[]"), - value: "", - className: "js-value" - }), _this.renderValidator(item, acmscss, true)), item.title); - } else if (item.type === 'lite-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "[]"), - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'rich-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: "".concat(item.name, "[]"), - value: "" - })))), item.title); - } else if (item.type === 'table') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, "\n"), "{".concat(item.name, "}[raw]"), '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "", - name: "".concat(item.name, "[]") - })))), item.title); - } - })), /*#__PURE__*/_react.default.createElement("td", { - className: "acms-admin-table-nowrap" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: (0, _classnames.default)('item-delete', { - 'acms-admin-btn-admin acms-admin-btn-admin-danger': acmscss - }), - value: "\u524A\u9664" - })))), /*#__PURE__*/_react.default.createElement("tfoot", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", { - colSpan: direction === 'horizontal' ? groupLength + 2 : 3 - }, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: (0, _classnames.default)('item-insert', { - 'acms-admin-btn-admin': acmscss - }), - value: "\u8FFD\u52A0" - }))))), groupName && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, groupitems.map(function (item) { - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.type === 'image' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.square && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@squarePath") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@squareAlt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@squareX") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@squareY") - })), item.large && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@largePath") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@largeAlt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@largeX") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@largeY") - })), item.tiny && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@tinyPath") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@tinyAlt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@tinyX") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@tinyY") - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@path") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@alt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@x") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@y") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@edit") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@old") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "image" - })), item.type === 'file' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@path") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@alt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@edit") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: "".concat(item.name, "@old") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "file" - })), item.type === 'media' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "media" - })), item.type === 'rich-editor' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "rich-editor" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(groupName, "[]"), - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), item.noSearch && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":search"), - value: "0" - }), item.validator.map(function (validator) { - if (!validator.option) { - return null; - } - var name = item.type === 'file' || item.type === 'image' ? "".concat(item.name, "@path") : item.name; - return /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":v#").concat(validator.option), - value: validator.value, - id: "".concat(name, "-v-").concat(validator.option) - }); - }), function () { - var name = item.type === 'file' || item.type === 'image' ? "".concat(item.name, "@path") : item.name; - return item.converter && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":c"), - value: item.converter - }); - }()); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: "@".concat(groupName) - }))); - } - }]); -}(_react.Component); -FieldGroupSource.defaultProps = { - preview: false -}; \ No newline at end of file diff --git a/lib/components/field-group.js b/lib/components/field-group.js deleted file mode 100644 index 2792277..0000000 --- a/lib/components/field-group.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireDefault(require("react")); -var _reactTooltip = _interopRequireDefault(require("react-tooltip")); -var _base = _interopRequireDefault(require("./base")); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var FieldGroup = exports.default = /*#__PURE__*/function (_Base) { - function FieldGroup(props) { - var _this; - (0, _classCallCheck2.default)(this, FieldGroup); - _this = _callSuper(this, FieldGroup, [props]); - _this.state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: false, - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - resize: 'true', - useDropArea: true, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: false, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - option: [{ - value: '', - label: '' - }], - validator: [{ - option: '', - value: '', - message: '' - }], - optionFormat: 'pref', - groupTitle: '', - groupName: '', - useExpand: true, - openValidator: false, - openConverter: false, - groupAlert: false, - openGroup: false, - alt: false, - fileNameMethod: 'random' - }; - return _this; - } - (0, _inherits2.default)(FieldGroup, _Base); - return (0, _createClass2.default)(FieldGroup, [{ - key: "showGroup", - value: function showGroup() { - var actions = this.props.actions; - var _this$state = this.state, - groupName = _this$state.groupName, - groupTitle = _this$state.groupTitle; - if (!groupName) { - this.setState({ - groupAlert: true - }); - } else { - this.setState({ - groupAlert: false, - duplicatedField: false, - openGroup: true - }); - actions.setGroupTitleName({ - groupTitle: groupTitle, - groupName: groupName - }); - } - } - }, { - key: "addGroup", - value: function addGroup() { - var actions = this.props.actions; - var _this$state2 = this.state, - type = _this$state2.type, - title = _this$state2.title, - name = _this$state2.name, - groupTitle = _this$state2.groupTitle, - groupName = _this$state2.groupName; - if (name === groupName) { - this.setState({ - duplicatedField: true - }); - return; - } - if (type && title && name) { - actions.setGroupTitleName({ - groupTitle: groupTitle, - groupName: groupName - }); - actions.addGroupItem(this.state); - } else { - this.setState({ - alert: true - }); - } - } - }, { - key: "addNewGroup", - value: function addNewGroup() { - var actions = this.props.actions; - actions.clearGroupItem(); - this.clearValue(); - this.setState({ - openGroup: false, - groupTitle: '', - groupName: '' - }); - } - }, { - key: "render", - value: function render() { - var _this2 = this; - var _this$state3 = this.state, - groupAlert = _this$state3.groupAlert, - duplicatedField = _this$state3.duplicatedField, - openGroup = _this$state3.openGroup, - groupTitle = _this$state3.groupTitle, - groupName = _this$state3.groupName, - type = _this$state3.type, - subType = _this$state3.subType, - title = _this$state3.title, - name = _this$state3.name, - tooltip = _this$state3.tooltip; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", { - className: "acms-admin-admin-title2" - }, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFunction" - }, this.renderGroupAlert(), this.renderDuplicateAlert(), this.renderAlert(), openGroup ? /*#__PURE__*/_react.default.createElement("div", { - style: { - paddingBottom: '15px' - } - }, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - onClick: this.addNewGroup.bind(this) - }, "\u65B0\u898F\u30B0\u30EB\u30FC\u30D7\u4F5C\u6210")) : /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - id: "groupTitle", - value: groupTitle, - onInput: function onInput(e) { - _this2.updateState('groupTitle', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u30B9\u30BF\u30C3\u30D5\u30EA\u30B9\u30C8" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - id: "groupName", - value: groupName, - onInput: function onInput(e) { - _this2.updateState('groupName', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09group_staff" - }))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", { - colSpan: "2" - }, openGroup ? /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary acms-admin-btn-disabled customFieldGroupBtn", - id: "makeGroup", - disabled: true - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210") : /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - id: "makeGroup", - onClick: this.showGroup.bind(this) - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210")))), openGroup && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, groupTitle), /*#__PURE__*/_react.default.createElement("td", null, groupName))), this.renderModal(), this.renderBasic(), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), type === 'select' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'radio' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'image' && /*#__PURE__*/_react.default.createElement("div", null, this.renderImage(), this.renderImageResize()), type === 'file' && /*#__PURE__*/_react.default.createElement("div", null, this.renderFile()), type === 'media' && /*#__PURE__*/_react.default.createElement("div", null, this.renderMediaOption()), type === 'rich-editor' && /*#__PURE__*/_react.default.createElement("div", null, this.renderRichEditorOption()), this.renderValidator(), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearValue.bind(this), - className: "acms-admin-btn-admin", - style: { - marginRight: '5px' - } - }, "\u30AF\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.addGroup.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn", - style: { - marginRight: '5px' - } - }, "\u751F\u6210"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.backState.bind(this), - className: "acms-admin-btn-admin" - }, "\u5143\u306B\u623B\u3059"))))); - } - }]); -}(_base.default); \ No newline at end of file diff --git a/lib/components/field-source.js b/lib/components/field-source.js deleted file mode 100644 index c2323fa..0000000 --- a/lib/components/field-source.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -var _Section = require("./layouts/Section"); -var _table = _interopRequireDefault(require("./input/table")); -var _excluded = ["children", "tag"]; -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // import Section from './input/section'; -var FieldSource = exports.default = /*#__PURE__*/function (_Component) { - // static Section = ({ tag, ...rest }) => tag === "table" &&
; - // static Table = ({ tag, ...rest }) => tag === "table" && ; - - function FieldSource(props) { - var _this; - (0, _classCallCheck2.default)(this, FieldSource); - _this = _callSuper(this, FieldSource, [props]); - (0, _defineProperty2.default)(_this, "renderValidator", function (item, acmscss) { - var _this$props = _this.props, - preview = _this$props.preview, - jsValidator = _this$props.jsValidator; - if (!item.openValidator) { - return null; - } - var name = item.type === 'file' || item.type === 'image' ? "".concat(item.name, "@path") : item.name; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, { - key: item.name - }, item.validator.map(function (validator) { - if (!validator.option) { - return null; - } - return /*#__PURE__*/_react.default.createElement(_react.Fragment, { - key: validator.option - }, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":v#").concat(validator.option), - value: validator.value, - id: "".concat(name, "-v-").concat(validator.option) - }), !jsValidator && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, validator.message && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("p", { - className: (0, _classnames.default)({ - 'acms-admin-text-error': acmscss - }) - }, validator.message), preview ? null : ""))), jsValidator && /*#__PURE__*/_react.default.createElement("div", { - "data-validator-label": "".concat(name, "-v-").concat(validator.option), - className: "validator-result-{".concat(name, ":v#").concat(validator.option, "}") - }, /*#__PURE__*/_react.default.createElement("p", { - className: "error-text" - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-attention" - }), validator.message))); - }), item.converter && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":c"), - value: item.converter - })); - }); - (0, _defineProperty2.default)(_this, "renderNoSearch", function (item) { - if (!item.noSearch) { - return null; - } - return /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":search"), - value: "0" - }); - }); - return _this; - } - (0, _inherits2.default)(FieldSource, _Component); - return (0, _createClass2.default)(FieldSource, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (window.ACMS && ACMS.dispatchEvent) { - ACMS.dispatchEvent('acmsCustomFieldMakerPreview', this.table, { - item: this.table - }); - } - } - }, { - key: "render", - value: function render() { - var _this$props2 = this.props, - children = _this$props2.children, - tag = _this$props2.tag, - rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded); - var renderValidator = this.renderValidator, - renderNoSearch = this.renderNoSearch; - return _react.default.Children.map(children, function (child) { - return /*#__PURE__*/_react.default.cloneElement(child, _objectSpread({ - tag: tag, - renderValidator: renderValidator, - renderNoSearch: renderNoSearch - }, rest)); - }); - } - }]); -}(_react.Component); -(0, _defineProperty2.default)(FieldSource, "Section", function (_ref) { - var tag = _ref.tag; - return tag === "section" && /*#__PURE__*/_react.default.createElement(_Section.Section, null); -}); -FieldSource.defaultProps = { - preview: false -}; \ No newline at end of file diff --git a/lib/components/field.js b/lib/components/field.js deleted file mode 100644 index 1e8a027..0000000 --- a/lib/components/field.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _react = _interopRequireDefault(require("react")); -var _base = _interopRequireDefault(require("./base")); -var _MakerContext = require("../store/MakerContext"); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Field = exports.default = /*#__PURE__*/function (_Base) { - function Field(props) { - var _this; - (0, _classCallCheck2.default)(this, Field); - _this = _callSuper(this, Field, [props]); - _this.state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: false, - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - resize: true, - useDropArea: true, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: false, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - useExpand: true, - option: [{ - value: '', - label: '' - }], - validator: [{ - option: '', - value: '', - message: '' - }], - optionFormat: 'pref', - openValidator: false, - openConverter: false, - alt: false, - fileNameMethod: 'random', - noSearch: false, - extension: '' - }; - return _this; - } - (0, _inherits2.default)(Field, _Base); - return (0, _createClass2.default)(Field, [{ - key: "submit", - value: function submit() { - var _this$state = this.state, - name = _this$state.name, - type = _this$state.type, - title = _this$state.title; - var _this$context = this.context, - maker = _this$context.maker, - addCustomfield = _this$context.addCustomfield; - if (name && type && title) { - if (maker.alert) this.setState({ - alert: false - }); - addCustomfield(this.state); - } else { - this.setState({ - alert: true - }); - } - } - }, { - key: "render", - value: function render() { - var type = this.state.type; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", { - className: "acms-admin-admin-title2" - }, "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFunction" - }, this.renderModal(), this.renderAlert(), this.renderBasic(), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), type === 'select' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'radio' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'checkbox' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'image' && /*#__PURE__*/_react.default.createElement("div", null, this.renderImage(), this.renderImageResize()), type === 'file' && /*#__PURE__*/_react.default.createElement("div", null, this.renderFile()), type === 'media' && /*#__PURE__*/_react.default.createElement("div", null, this.renderMediaOption()), type === 'rich-editor' && /*#__PURE__*/_react.default.createElement("div", null, this.renderRichEditorOption()), this.renderValidator(), this.renderMake())); - } - }]); -}(_base.default); -(0, _defineProperty2.default)(Field, "contextType", _MakerContext.MakerContext); \ No newline at end of file diff --git a/lib/components/genelator/_FieldGroup.js b/lib/components/genelator/_FieldGroup.js deleted file mode 100644 index ef90170..0000000 --- a/lib/components/genelator/_FieldGroup.js +++ /dev/null @@ -1,424 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.default = void 0; -var _defineProperty2 = _interopRequireDefault(require('@babel/runtime/helpers/defineProperty')); -var _react = _interopRequireDefault(require('react')); -var _reactTooltip = _interopRequireDefault(require('react-tooltip')); -var _base = _interopRequireDefault(require('./base')); -var _MakerContext = require('../../store/MakerContext'); -class FieldGroup extends _base.default { - // constructor(props) { - // super(props); - // this.state = { - // type: 'text', - // subType: '', - // title: '', - // name: '', - // tooltip: '', - // alert: false, - // duplicatedField: '', - // path: 'path', - // converter: '', - // normal: 'size', - // useDropArea: true, - // dropAreaWidth: 200, - // dropAreaHeight: 200, - // useFocusImage: false, - // focusImageWidth: 400, - // focusImageHeight: 400, - // startHeadingLevel: 2, - // endHeadingLevel: 3, - // mediaType: 'image', - // useExpand: true, - // option: [{ - // value: '', - // label: '' - // }], - // validator: [{ - // option: '', - // value: '', - // message: '' - // }], - // optionFormat: 'pref', - // openValidator: false, - // openConverter: false, - // alt: false, - // fileNameMethod: 'random', - // groupAlert: false, - // openGroup: false, - // groupTitle: '', - // groupName: '' - // }; - // } - - // showGroup() { - // const { setGroupTitleName } = this.context - // const { groupName, groupTitle } = this.state; - // if (!groupName) { - // this.setState({ - // groupAlert: true - // }); - // } else { - // this.setState({ - // groupAlert: false, - // duplicatedField: false, - // openGroup: true - // }); - // setGroupTitleName(groupTitle, groupName); - // } - // } - - addGroup() { - const { setGroupTitleName, addGroupItem } = this.context; - const { type, title, name, groupTitle, groupName } = this.state; - if (name === groupName) { - this.setState({ - duplicatedField: true, - }); - return; - } - if (type && title && name) { - setGroupTitleName(groupTitle, groupName); - addGroupItem(this.state); - } else { - this.setState({ - alert: true, - }); - } - } - addNewGroup() { - const { clearGroupItem } = this.context; - clearGroupItem(); - this.clearValue(); - this.setState({ - openGroup: false, - groupTitle: '', - groupName: '', - }); - } - render() { - const { clearGroupItem } = this.context; - const { openGroup, groupTitle, groupName, type } = this.state; - return /*#__PURE__*/ _react.default.createElement( - 'div', - null, - /*#__PURE__*/ _react.default.createElement( - 'h2', - { - className: 'acms-admin-admin-title2', - }, - '\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7' - ), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'customFieldFunction', - }, - this.renderGroupAlert(), - this.renderDuplicateAlert(), - this.renderAlert(), - openGroup - ? /*#__PURE__*/ _react.default.createElement( - 'div', - { - style: { - paddingBottom: '15px', - }, - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: 'acms-admin-btn acms-admin-btn-primary customFieldGroupBtn', - onClick: this.addNewGroup.bind(this), - }, - '\u65B0\u898F\u30B0\u30EB\u30FC\u30D7\u4F5C\u6210' - ) - ) - : /*#__PURE__*/ _react.default.createElement( - 'table', - { - className: 'adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup', - }, - /*#__PURE__*/ _react.default.createElement( - 'tbody', - null, - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-table-left', - }, - '\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB', - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': true, - 'data-for': 'group-title-tip', - }), - /*#__PURE__*/ _react.default.createElement( - _reactTooltip.default, - { - id: 'group-title-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - '\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002' - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'span', - { - className: 'acms-admin-label acms-admin-label-danger', - }, - '\u5FC5\u9808' - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-table-left', - colSpan: '2', - }, - '\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09', - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': true, - 'data-for': 'group-field-tip', - }), - /*#__PURE__*/ _react.default.createElement( - _reactTooltip.default, - { - id: 'group-field-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - '\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002' - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'span', - { - className: 'acms-admin-label acms-admin-label-danger', - }, - '\u5FC5\u9808' - ) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - id: 'groupTitle', - defaultValue: groupTitle, - onInput: (e) => { - this.updateState('groupTitle', e.target.value); - }, - className: 'acms-admin-form-width-full', - placeholder: '\u4F8B\uFF09\u30B9\u30BF\u30C3\u30D5\u30EA\u30B9\u30C8', - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - id: 'groupName', - defaultValue: groupName, - onInput: (e) => { - this.updateState('groupName', e.target.value); - }, - className: 'acms-admin-form-width-full', - placeholder: '\u4F8B\uFF09group_staff', - }) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement( - 'td', - { - colSpan: '2', - }, - openGroup - ? /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: - 'acms-admin-btn acms-admin-btn-primary acms-admin-btn-disabled customFieldGroupBtn', - id: 'makeGroup', - disabled: true, - }, - '\u30B0\u30EB\u30FC\u30D7\u751F\u6210' - ) - : /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: 'acms-admin-btn acms-admin-btn-primary customFieldGroupBtn', - id: 'makeGroup', - onClick: this.showGroup.bind(this), - }, - '\u30B0\u30EB\u30FC\u30D7\u751F\u6210' - ) - ) - ) - ) - ), - openGroup && - /*#__PURE__*/ _react.default.createElement( - 'div', - null, - /*#__PURE__*/ _react.default.createElement('div', { - className: 'customFieldLine', - }), - /*#__PURE__*/ _react.default.createElement( - 'table', - { - className: 'adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup', - }, - /*#__PURE__*/ _react.default.createElement( - 'tbody', - null, - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-table-left', - }, - '\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB', - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': true, - 'data-for': 'group-title-tip', - }), - /*#__PURE__*/ _react.default.createElement( - _reactTooltip.default, - { - id: 'group-title-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - '\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002' - ) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-table-left', - colSpan: '2', - }, - '\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09', - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': true, - 'data-for': 'group-field-tip', - }), - /*#__PURE__*/ _react.default.createElement( - _reactTooltip.default, - { - id: 'group-field-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - '\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002' - ) - ) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('td', null, groupTitle), - /*#__PURE__*/ _react.default.createElement('td', null, groupName) - ) - ) - ), - this.renderModal(), - this.renderBasic(), - /*#__PURE__*/ _react.default.createElement('div', { - className: 'customFieldLine', - }), - type === 'select' && - /*#__PURE__*/ _react.default.createElement('div', null, this.renderSnippet(), this.renderOption()), - type === 'radio' && - /*#__PURE__*/ _react.default.createElement('div', null, this.renderSnippet(), this.renderOption()), - type === 'image' && - /*#__PURE__*/ _react.default.createElement('div', null, this.renderImage(), this.renderImageResize()), - type === 'file' && /*#__PURE__*/ _react.default.createElement('div', null, this.renderFile()), - type === 'media' && /*#__PURE__*/ _react.default.createElement('div', null, this.renderMediaOption()), - type === 'rich-editor' && - /*#__PURE__*/ _react.default.createElement('div', null, this.renderRichEditorOption()), - this.renderValidator(), - /*#__PURE__*/ _react.default.createElement( - 'p', - null, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: clearGroupItem, - className: 'acms-admin-btn-admin', - style: { - marginRight: '5px', - }, - }, - '\u30AF\u30EA\u30A2' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: this.addGroup.bind(this), - className: 'acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn', - style: { - marginRight: '5px', - }, - }, - '\u751F\u6210' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: this.backState.bind(this), - className: 'acms-admin-btn-admin', - }, - '\u5143\u306B\u623B\u3059' - ) - ) - ) - ) - ); - } -} -exports.default = FieldGroup; -(0, _defineProperty2.default)(FieldGroup, 'contextType', _MakerContext.MakerContext); diff --git a/lib/components/genelator/base.js b/lib/components/genelator/base.js deleted file mode 100644 index 8fa9506..0000000 --- a/lib/components/genelator/base.js +++ /dev/null @@ -1,1406 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.default = void 0; -var _react = _interopRequireWildcard(require('react')); -var _history = _interopRequireDefault(require('../../lib/history')); -function _getRequireWildcardCache(e) { - if ('function' != typeof WeakMap) return null; - var r = new WeakMap(), - t = new WeakMap(); - return (_getRequireWildcardCache = function (e) { - return e ? t : r; - })(e); -} -function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) return e; - if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, - a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ('default' !== u && {}.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); - } - return (n.default = e), t && t.set(e, n), n; -} -// import ReactTooltip from 'react-tooltip'; - -// import { ModalDialog } from '../ModalDialog'; - -// import prefJson from '../../../json/pref.json'; -// import prefEnJson from '../../../json/pref-en.json'; -// import prefNumberJson from '../../../json/pref-number.json'; -// import inputTypesJson from '../../../json/input-types.json'; - -// const snippetJSON = { -// pref: prefJson, -// 'pref-en': prefEnJson, -// 'pref-number': prefNumberJson, -// }; - -class Base extends _react.Component { - constructor(props) { - super(props); - } - updateState(prop, value) { - this.setState({ - [prop]: value, - }); - } - removeAlert() { - this.setState({ - alert: false, - }); - } - - // removeGroupAlert() { - // this.setState({ - // groupAlert: false, - // }); - // } - - // removeDuplicateAlert() { - // this.setState({ - // duplicatedField: false, - // }); - // } - - // clearValue() { - // this.setState({ - // title: '', - // name: '', - // path: '', - // normalSize: '', - // tiny: '', - // tinySize: '', - // large: '', - // largeSize: '', - // square: '', - // squareSize: '', - // alt: true, - // resize: true, - // useExpand: true, - // useDropArea: true, - // dropAreaWidth: 200, - // dropAreaHeight: 200, - // useFocusImage: false, - // focusImageWidth: 400, - // focusImageHeight: 400, - // startHeadingLevel: 2, - // endHeadingLevel: 3, - // mediaType: 'image', - // openConverter: '', - // openValidator: '', - // converter: '', - // tooltip: '', - // placeholder: '' - // }); - // } - - // addOption() { - // const { option } = this.state; - // this.setState({ - // option: [ - // ...option, - // { - // value: '', - // label: '', - // }, - // ], - // }); - // } - - // removeOption(idx) { - // const { option } = this.state; - // this.setState({ - // option: [...option.slice(0, idx), ...option.slice(idx + 1)], - // }); - // } - - // updateOptionLabel(idx, label) { - // const { option } = this.state; - // const item = option[idx]; - // this.setState({ - // option: [...option.slice(0, idx), { ...item, label }, ...option.slice(idx + 1)], - // }); - // } - - // updateOptionValue(idx, value) { - // const { option } = this.state; - // const item = option[idx]; - // this.setState({ - // option: [...option.slice(0, idx), { ...item, value }, ...option.slice(idx + 1)], - // }); - // } - - // addValidator() { - // const { validator } = this.state; - // this.setState({ - // validator: [ - // ...validator, - // { - // option: '', - // value: '', - // message: '', - // }, - // ], - // }); - // } - - // removeValidator(idx) { - // const { validator } = this.state; - // this.setState({ - // validator: [...validator.slice(0, idx), ...validator.slice(idx + 1)], - // }); - // } - - // updateValidatorOption(idx, option) { - // const { validator } = this.state; - // const item = validator[idx]; - // this.setState({ - // validator: [...validator.slice(0, idx), { ...item, option }, ...validator.slice(idx + 1)], - // }); - // } - - // updateValidatorValue(idx, value) { - // const { validator } = this.state; - // const item = validator[idx]; - // this.setState({ - // validator: [...validator.slice(0, idx), { ...item, value }, ...validator.slice(idx + 1)], - // }); - // } - - // updateValidatorMessage(idx, message) { - // const { validator } = this.state; - // const item = validator[idx]; - // this.setState({ - // validator: [...validator.slice(0, idx), { ...item, message }, ...validator.slice(idx + 1)], - // }); - // } - - // addConverter(item) { - // let { converter } = this.state; - // const reg = new RegExp(item, 'i'); - // if (converter.search(reg) === -1) { - // converter += item; - // } else { - // converter = converter.replace(item.toUpperCase(), item); - // converter = converter.replace(item.toLowerCase(), item); - // } - // this.setState({ - // converter, - // }); - // } - - // renderOption() { - // const { option } = this.state; - // return ( - //
- //
- // - // {option.map((item, idx) => ( - // - // - // - // - // - // ))} - // - //
- //
- // 項目名(label) - // { - // this.updateOptionLabel(idx, e.target.value); - // }} - // className="acms-admin-form-width-full" - // placeholder="例)東京都" - // /> - //
- //
- //
- // 値(value) - // { - // this.updateOptionValue(idx, e.target.value); - // }} - // className="acms-admin-form-width-full" - // placeholder="例)tokyo" - // /> - //
- //
- // - //
- //

- // - //

- // - // ); - // } - - renderTitleName() { - const { title, name } = this.state; - return /*#__PURE__*/ _react.default.createElement( - 'div', - null, - /*#__PURE__*/ _react.default.createElement('p', null, '\u30BF\u30A4\u30C8\u30EB'), - /*#__PURE__*/ _react.default.createElement( - 'p', - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - value: title, - onInput: (e) => { - this.updateState('title', e.target.value); - }, - }) - ), - /*#__PURE__*/ _react.default.createElement('p', null, 'name\u5C5E\u6027'), - /*#__PURE__*/ _react.default.createElement( - 'p', - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - value: name, - onInput: (e) => { - this.updateState('name', e.target.value); - }, - }) - ) - ); - } - - // applySnippet() { - // const { optionFormat, option } = this.state; - // const res = snippetJSON[optionFormat]; - // this.setState({ - // option: [...option, ...res], - // }); - // } - - // renderSnippet() { - // const { useSnippet, optionFormat } = this.state; - // return ( - //
- // - // 選択項目(option要素) - // - // - // option要素の選択項目になります。 - // - // - // - // - // {useSnippet && ( - // - // - // - // - // )} - // - //
- // ); - // } - - // renderModal() { - // const { openConverter } = this.state; - // return ( - //
- // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - //
オプション意味追加
r「全角」英字を「半角」に変換します - // - //
R「半角」英字を「全角」に変換します - // - //
n「全角」数字を「半角」に変換します - // - //
N「半角」数字を「全角」に変換します。 - // - //
a「全角」英数字を「半角」に変換します。 - // - //
A「半角」英数字を「全角」に変換します。 - // - //
s「全角」スペースを「半角」に変換します(U+3000 -> U+0020)。 - // - //
S「半角」スペースを「全角」に変換します(U+0020 -> U+3000)。 - // - //
k「全角カタカナ」を「半角カタカナ」に変換します。 - // - //
K「半角カタカナ」を「全角カタカナ」に変換します。 - // - //
h「全角ひらがな」を「半角カタカナ」に変換します。 - // - //
H「半角カタカナ」を「全角ひらがな」に変換します。 - // - //
c「全角カタカナ」を「全角ひらがな」に変換します。 - // - //
C「全角ひらがな」を「全角カタカナ」に変換します。 - // - //
V濁点付きの文字を一文字に変換します。"K", "H" と共に使用します。 - // - //
- //
- //
- // ); - // } - - // renderBasic() { - // const { title, name, tooltip, placeholder } = this.state; - // return ( - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - //
- // 入力欄の種類 - // - // - // - // フィールドのタイプとなります。 - //
- // 選択しないと生成ボタンを押してもソースコードが生成されません。 - //
- //
- // 必須 - //
- // タイトル - // - // - // 見出しになります。 - // - // 必須 - // - // フィールド - // - // - // フィールド名です。name属性として使用されます。 - // - // 必須 - // - // ツールチップ - // - // - // カスタムフィールドの説明用のツールチップを付与します。 - // - // - // プレースホルダー - // - // - // placeholder属性を設定します。 - // - //
- // {this.typeSelectRender()} - // {this.subTypeSelectRender()} - // - // { - // this.updateState('title', e.target.value); - // }} - // className="acms-admin-form-width-full" - // placeholder="例)氏名" - // /> - // - // { - // this.updateState('name', e.target.value); - // }} - // className="acms-admin-form-width-full" - // placeholder="例)name" - // /> - // - // { - // this.updateState('tooltip', e.target.value); - // }} - // className="acms-admin-form-width-full" - // placeholder="例)ここにお名前を入力してください" - // /> - // - // { - // this.updateState('placeholder', e.target.value); - // }} - // className="acms-admin-form-width-full" - // placeholder="例)ここにプレースホルダーを入力してください" - // /> - //
- // ); - // } - - // typeSelectRender() { - // const { type } = this.state; - - // const onChange = e => { - // this.updateState('subType', ''); - // this.updateState('type', e.target.value); - // }; - - // return ( - // - // ); - // } - - // subTypeSelectRender() { - // const { type, subType } = this.state; - // const subTypes = Array.isArray(inputTypesJson[type]?.subTypes) ? inputTypesJson[type].subTypes : []; - - // const onChange = e => { - // this.updateState('subType', e.target.value); - // }; - - // if (subTypes.length > 0) { - // return ( - // - // ); - // } - // } - - // noSearchCheckRender() { - // const { noSearch } = this.state; - // return ( - //

- // - // - //

- // ); - // } - - backState() { - const { actions } = this.props; - const state = _history.default.undo(); - if (state) { - actions.setState(state); - } - } - - // renderValidator(showValidator = true) { - // const { openValidator, validator, converter, type } = this.state; - // return ( - //
- //
- // - // - // - // 変換・入力チェック用の項目を表示します。 - // - //
- // {openValidator && ( - //
- // {/text|textarea|radio|select/.exec(type) && this.noSearchCheckRender()} - //
- // テキストの変換 - // - // - // - // テキストフィールドに入力された値を別の値に変換します。詳しくは参照ボタンを押すと表示されるモーダルウィンドウに情報が記載されています。 - // - // - //
- //

- // { - // this.updateState('converter', e.target.value); - // }} - // className="acms-admin-form-width-quarter acms-admin-margin-right-small" - // placeholder="例)rs" - // /> - // - //

- // {showValidator && ( - // - // - // - // - // - // - // - // {validator.map((item, idx) => ( - // - // - // - // - // - // - // ))} - // - //
- // 入力チェック - // - // - // フィールドに入力された値が条件に合っているかをチェックします。 - // - // - // 値 - // - // - // 最小文字数や、正規表現チェックをバリデータに設定した際に設定する値となります。 - // - // - // メッセージ - // - // - // - // フィールドに入力されている値が条件に合わなかった場合に表示されるメッセージになります。 - // - // - // - //
- // - // - // { - // this.updateValidatorValue(idx, e.target.value); - // }} - // className="acms-admin-form-width-full" - // /> - // - // { - // this.updateValidatorMessage(idx, e.target.value); - // }} - // className="acms-admin-form-width-full" - // /> - // - // - //
- // )} - // {showValidator && ( - //

- // - //

- // )} - //
- // )} - //
- // ); - // } - - // renderMake() { - // return ( - //

- // - // - // - //

- // ); - // } - - // renderImage() { - // return ( - // - // - // - // - // - // - // - // - // - // - // - // - // - // - // - //
- // 画像サイズ - // - // - // 通常画像の画像サイズを指定します - // - // - // large画像生成 - // - // - // 通常画像よりも大きい画像を生成できます。 - // - // - // tiny画像生成 - // - // - // 通常画像よりも小さい画像を生成できます。 - // - // - // square画像生成 - // - // - // 通常画像を指定したサイズで中央から正方形にトリミングして生成します。 - // - //
- //
- //
- // - // - // { - // this.updateState('normalSize', e.target.value); - // }} - // className="customFieldSizeInput" - // placeholder="例)200px" - // /> - // px - // - //
- //
- //
- //
- //
- // - // - // { - // this.updateState('largeSize', e.target.value); - // }} - // className="customFieldSizeInput" - // placeholder="例)400px" - // /> - // px - // - //
- //
- //
- //
- //
- // - // - // { - // this.updateState('tinySize', e.target.value); - // }} - // className="customFieldSizeInput" - // placeholder="例)100px" - // /> - // px - // - //
- //
- //
- //
- //
- // - // - // { - // this.updateState('squareSize', e.target.value); - // }} - // className="customFieldSizeInput" - // placeholder="例)250px" - // /> - // px - // - //
- //
- //
- // ); - // } - - // renderImageResize() { - // const { resize, alt } = this.state; - // return ( - //
- //

- // - // - //

- //

- // - // - //

- //
- // ); - // } - - // renderRichEditorOption() { - // const { useExpand, startHeadingLevel, endHeadingLevel } = this.state; - // return ( - //
- //

- // - // - //

- //
- // 開始見出しレベル - // - // { - // this.setState({ - // startHeadingLevel: e.target.value, - // }); - // }} - // /> - // - // 終了見出しレベル - // - // { - // this.setState({ - // endHeadingLevel: e.target.value, - // }); - // }} - // /> - //
- //
- // ); - // } - - // renderMediaOption() { - // const { - // mediaType, - // useDropArea, - // useFocusImage, - // dropAreaWidth, - // dropAreaHeight, - // focusImageWidth, - // focusImageHeight, - // } = this.state; - // return ( - //
- //

選べるメディアのタイプを選択

- //

- // - // - //

- //

- // - // - //

- //

- // - // - //

- //

ドロップエリア

- //
- //
- // { - // if (useDropArea) { - // this.updateState('useDropArea', false); - // } else { - // this.updateState('useDropArea', true); - // } - // }} - // checked={useDropArea} - // id="media-use-droparea" - // /> - // - //
- // {useDropArea && ( - //
- // 幅 px - // - // 高さ px - //
- // )} - //
- //

トリミング

- //
- //
- // { - // if (useFocusImage) { - // this.updateState('useFocusImage', false); - // } else { - // this.updateState('useFocusImage', true); - // } - // }} - // checked={useFocusImage} - // id="media-use-focusImage" - // /> - // - //
- // {useFocusImage && ( - //
- // 幅 px - // - // 高さ px - //
- // )} - //
- //
- // ); - // } - - // renderAlert() { - // const { alert } = this.state; - // if (alert) { - // return ( - //

- //

- // ); - // } - // return null; - // } - - // renderGroupAlert() { - // const { groupAlert } = this.state; - // if (groupAlert) { - // return ( - //

- //

- // ); - // } - // return null; - // } - - // renderDuplicateAlert() { - // const { duplicatedField } = this.state; - // if (duplicatedField) { - // return ( - //

- //

- // ); - // } - // return null; - // } - - // renderFile() { - // const { extension, fileName, fileNameMethod } = this.state; - // return ( - //
- //
- //
- // - // - //
- //
- // - // - //
- //
- // - // - //
- //
- //
- //
- // {fileNameMethod === 'random' && } - // {fileNameMethod === 'fix' && ( - // { - // this.updateState('fileName', e.target.value); - // }} - // placeholder="例)example.pdf" - // /> - // )} - // {fileNameMethod === 'asis' && } - //
- //
- //
- //

拡張子制限(pdfなど)

- // { - // this.updateState('extension', e.target.value); - // }} - // placeholder="例)pdf" - // /> - //
- //
- // ); - // } -} -exports.default = Base; diff --git a/lib/components/genelator/base/FieldClear.js b/lib/components/genelator/base/FieldClear.js deleted file mode 100644 index 7ddcd53..0000000 --- a/lib/components/genelator/base/FieldClear.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.FieldClear = FieldClear; -function FieldClear(props) { - const { setField } = props; - const crearField = { - title: '', - name: '', - path: '', - normalSize: '', - tiny: '', - tinySize: '', - large: '', - largeSize: '', - square: '', - squareSize: '', - alt: true, - resize: true, - useExpand: true, - useDropArea: true, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: false, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - openConverter: '', - openValidator: '', - converter: '', - tooltip: '', - placeholder: '', - }; - setField(crearField); -} diff --git a/lib/components/genelator/base/OptionItem.js b/lib/components/genelator/base/OptionItem.js index 599552b..4e4c4ae 100644 --- a/lib/components/genelator/base/OptionItem.js +++ b/lib/components/genelator/base/OptionItem.js @@ -69,87 +69,88 @@ function OptionItem(props) { /*#__PURE__*/ _react.default.createElement( 'tbody', null, - option.map((item, idx) => - /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: idx, - }, + option && + option.map((item, idx) => /*#__PURE__*/ _react.default.createElement( - 'td', - null, + 'tr', + { + key: idx, + }, /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'customFieldOptionTableInput', - }, - /*#__PURE__*/ _react.default.createElement( - 'span', - { - className: 'customFieldOptionTableAppend', - }, - '\u9805\u76EE\u540D\uFF08label\uFF09' - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - defaultValue: item.label, - onInput: (e) => { - const value = e.target.value; - if (!value) return; - updateOptionLabel(idx, value); - }, - className: 'acms-admin-form-width-full', - placeholder: '\u4F8B\uFF09\u6771\u4EAC\u90FD', - }) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'customFieldOptionTableInput', - }, + 'td', + null, /*#__PURE__*/ _react.default.createElement( - 'span', + 'div', { - className: 'customFieldOptionTableAppend', - }, - '\u5024\uFF08value\uFF09' - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - defaultValue: item.value, - onInput: (e) => { - const value = e.target.value; - if (!value) return; - updateOptionValue(idx, value); + className: 'customFieldOptionTableInput', }, - className: 'acms-admin-form-width-full', - style: { - minWidth: '200px', - }, - placeholder: '\u4F8B\uFF09tokyo', - }) - ) - ), - add && + /*#__PURE__*/ _react.default.createElement( + 'span', + { + className: 'customFieldOptionTableAppend', + }, + '\u9805\u76EE\u540D\uFF08label\uFF09' + ), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'text', + defaultValue: item.label, + onInput: (e) => { + const value = e.target.value; + if (!value) return; + updateOptionLabel(idx, value); + }, + className: 'acms-admin-form-width-full', + placeholder: '\u4F8B\uFF09\u6771\u4EAC\u90FD', + }) + ) + ), /*#__PURE__*/ _react.default.createElement( 'td', null, /*#__PURE__*/ _react.default.createElement( - 'button', + 'div', { - type: 'button', - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - onClick: () => removeOption(idx), + className: 'customFieldOptionTableInput', }, - '\u524A\u9664' + /*#__PURE__*/ _react.default.createElement( + 'span', + { + className: 'customFieldOptionTableAppend', + }, + '\u5024\uFF08value\uFF09' + ), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'text', + defaultValue: item.value, + onInput: (e) => { + const value = e.target.value; + if (!value) return; + updateOptionValue(idx, value); + }, + className: 'acms-admin-form-width-full', + style: { + minWidth: '200px', + }, + placeholder: '\u4F8B\uFF09tokyo', + }) ) - ) + ), + add && + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement( + 'button', + { + type: 'button', + className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', + onClick: () => removeOption(idx), + }, + '\u524A\u9664' + ) + ) + ) ) - ) ) ), add && diff --git a/lib/components/html/AcmsInput.js b/lib/components/html/AcmsInput.js deleted file mode 100644 index fd6f153..0000000 --- a/lib/components/html/AcmsInput.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.renderValidator = exports.renderNoSearch = void 0; -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -var _MakerContext = require("../../store/MakerContext"); -var _EditorContext = require("../../store/EditorContext"); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -var renderValidator = exports.renderValidator = function renderValidator(props) { - var _useMakerContext = (0, _MakerContext.useMakerContext)(), - maker = _useMakerContext.maker; - var _useEditorContext = (0, _EditorContext.useEditorContext)(), - editor = _useEditorContext.editor; - if (!props.openValidator) { - return null; - } - var name = props.type === 'file' || props.type === 'image' ? "".concat(props.name, "@path") : props.name; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, { - key: props.name - }, props.validator.map(function (validator) { - if (!validator.option) { - return null; - } - return /*#__PURE__*/_react.default.createElement(_react.Fragment, { - key: validator.option - }, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":v#").concat(validator.option), - value: validator.value, - id: "".concat(name, "-v-").concat(validator.option) - }), !maker.jsValidator && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, validator.message && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, editor.editMode === 'preview' ? null : ""), /*#__PURE__*/_react.default.createElement("p", { - className: (0, _classnames.default)({ - 'acms-admin-text-error': acmscss - }) - }, validator.message), editor.editMode === 'preview' ? null : ""))), !maker.jsValidator && /*#__PURE__*/_react.default.createElement("div", { - "data-validator-label": "".concat(name, "-v-").concat(validator.option), - className: "validator-result-{".concat(name, ":v#").concat(validator.option, "}") - }, /*#__PURE__*/_react.default.createElement("p", { - className: "error-text" - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-attention" - }), validator.message))); - }), props.converter && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":c"), - value: props.converter - })); -}; -var renderNoSearch = exports.renderNoSearch = function renderNoSearch(props) { - var noSearch = props.noSearch, - name = props.name; - if (!noSearch) { - return null; - } - return /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":search"), - value: "0" - }); -}; \ No newline at end of file diff --git a/lib/components/html/Checkbox.js b/lib/components/html/Checkbox.js index 4588c22..3d46237 100644 --- a/lib/components/html/Checkbox.js +++ b/lib/components/html/Checkbox.js @@ -5,96 +5,211 @@ Object.defineProperty(exports, '__esModule', { value: true, }); exports.Checkbox = Checkbox; +var _extends2 = _interopRequireDefault(require('@babel/runtime/helpers/extends')); var _react = _interopRequireDefault(require('react')); var _classnames = _interopRequireDefault(require('classnames')); var _MakerContext = require('../../store/MakerContext'); var _OptionValidator = require('./OptionValidator'); var _OptionNoSearch = require('./OptionNoSearch'); +var _WrapTable = require('./WrapTable'); function Checkbox(props) { - const { item, id = '', isChecked = true } = props; + const { item, isChecked = true } = props; const { preview: { mode, acmscss }, } = (0, _MakerContext.useMakerContext)(); - let attribute = { - id, - name: '', - hiddenName: '', - }; - switch (mode) { - case 'customfield': { - attribute = { - name: item.name, - hiddenName: 'field[]', - }; - break; - } - case 'fieldgroup': { - attribute = { - name: ''.concat(item.name, '[]'), - }; - break; - } - case 'customunit': { - attribute = { - name: ''.concat(item.name, '{id}'), - hiddenName: 'unit[]', - }; - break; - } - case 'unitgroup': { - attribute = { - name: ''.concat(item.name, '{id}[]'), - }; - break; - } - } return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, - item.option.map((option, index) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'span', - { - key: ''.concat(item.name).concat(index), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, + mode === 'customfield' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + item.option.map((option, index) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: index, + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '[]'), + value: option.value, + 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), + id: 'input-checkbox-'.concat(item.name, '-').concat(option.value), + }), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '-').concat(option.value), + }, + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + option.label + ) + ); + }), /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: attribute.name, - value: option.value, - 'data-tmp': isChecked && '{'.concat(item.name, ':checked#').concat(option.value, '}'), - id: 'input-checkbox-'.concat(item.name, '-').concat(id), + type: 'hidden', + name: 'field[]', + value: item.name, }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '-').concat(id), - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - option.label - ) - ); - }), - mode === 'customfield' || mode === 'customunit' - ? /*#__PURE__*/ _react.default.createElement('input', { + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }), + /*#__PURE__*/ _react.default.createElement(_OptionNoSearch.OptionNoSearch, { + name: item.name, + noSearch: item.noSearch, + }) + ), + mode === 'fieldgroup' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + item.option.map((option, index) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: index, + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement( + 'input', + (0, _extends2.default)( + { + type: 'checkbox', + name: ''.concat(item.name, '[]'), + value: option.value, + }, + isChecked && { + 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), + }, + { + id: 'input-checkbox-'.concat(item.name, '-').concat(option.value), + } + ) + ), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '-').concat(option.value), + }, + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + option.label + ) + ); + }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ), + mode === 'customunit' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + item.option.map((option, index) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: index, + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '{id}[]'), + value: option.value, + 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), + id: 'input-checkbox-'.concat(item.name, '-').concat(option.value, '-{id}'), + }), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '-').concat(option.value, '-{id}'), + }, + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + option.label + ) + ); + }), + /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: attribute.hiddenName, - value: attribute.name, + name: 'unit{id}[]', + value: ''.concat(item.name, '{id}'), + }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ), + mode === 'unitgroup' && + /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + item.option.map((option, index) => { + if (!option.label) { + return null; + } + return /*#__PURE__*/ _react.default.createElement( + 'div', + { + key: index, + className: (0, _classnames.default)({ + 'acms-admin-form-radio': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement( + 'input', + (0, _extends2.default)( + { + type: 'checkbox', + name: ''.concat(item.name, '{id}[]'), + value: option.value, + }, + isChecked && { + 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), + }, + { + id: 'input-radio-'.concat(item.name, '-{id}-').concat(option.value), + } + ) + ), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-radio-'.concat(item.name, '-{id}-').concat(option.value), + }, + acmscss && + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-radio', + }), + option.label + ) + ); + }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, }) - : null, - /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { - item: item, - }), - /*#__PURE__*/ _react.default.createElement(_OptionNoSearch.OptionNoSearch, { - name: item.name, - noSearch: item.noSearch, - }) + ) ); } diff --git a/lib/components/html/FileInput.js b/lib/components/html/FileInput.js index 5f5767a..58e7ac6 100644 --- a/lib/components/html/FileInput.js +++ b/lib/components/html/FileInput.js @@ -13,7 +13,7 @@ var _OptionNoSearch = require('./OptionNoSearch'); function FileInput(props) { const { item, id, isValue = true } = props; const { - preview: { acmscss, editMode, mode, direction }, + preview: { acmscss, editMode, mode }, } = (0, _MakerContext.useMakerContext)(); let src = '/images/fileicon/'; let alt = 'file'; @@ -23,67 +23,6 @@ function FileInput(props) { } else { src += 'file.svg'; } - let attribute = { - value: '', - name: '', - hiddenName: '', - }; - switch (mode) { - case 'customfield': { - attribute = { - id, - value: ''.concat(item.name), - name: item.name, - hiddenName: 'field[]', - }; - break; - } - case 'fieldgroup': { - attribute = { - id, - value: '{'.concat(item.name, '}'), - name: ''.concat(item.name, '[]'), - }; - break; - } - case 'customunit': { - attribute = { - id, - value: '{'.concat(item.name, '}'), - name: ''.concat(item.name, '{id}'), - hiddenName: 'unit[]', - }; - break; - } - case 'unitgroup': { - attribute = { - id, - value: item.name, - name: ''.concat(item.name, '{id}[]'), - }; - break; - } - } - const wrapTable = (children, title) => { - return /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: direction === 'vertical', - wrap: (child) => - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('th', null, title), - child - ), - }, - children - ); - }; - const ConditionalWrap = (_ref) => { - let { condition, wrap, children } = _ref; - return condition ? wrap(children) : children; - }; return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, @@ -143,11 +82,12 @@ function FileInput(props) { /*#__PURE__*/ _react.default.createElement('input', { type: 'file', name: item.name, + id: id, }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: attribute.hiddenName, - value: attribute.value, + name: item.hiddenName, + value: item.value, }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', @@ -191,94 +131,281 @@ function FileInput(props) { }) ), mode === 'fieldgroup' && - wrapTable( - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - isValue && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + isValue && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + editMode === 'preview' ? null : ''), /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - editMode === 'preview' ? null : ''), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '@edit[]'), - value: 'delete', - id: 'input-checkbox-'.concat(item.name, '{i}@edit[]'), + 'div', + { + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '{i}@edit[]'), - }, - acmscss && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - ' \u524A\u9664' - ) - ), + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(item.name, '{i}@edit[]'), + }), /*#__PURE__*/ _react.default.createElement( - 'a', + 'label', { - href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + htmlFor: 'input-checkbox-'.concat(item.name, '{i}@edit[]'), }, - /*#__PURE__*/ _react.default.createElement('img', { - src: src, - width: '64', - height: '64', - alt: alt, - }) - ), - editMode === 'preview' ? null : '', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@old[]'), - value: '{'.concat(item.name, '@path}'), + acmscss && + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + ' \u524A\u9664' + ) + ), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, }) ), - item.extension && + editMode === 'preview' ? null : '', /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: ''.concat(item.name, '@extension[]'), - value: item.extension, - }), - item.fileNameMethod === 'random' && - item.fileName && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename[]'), - value: '', + name: ''.concat(item.name, '@old[]'), + value: '{'.concat(item.name, '@path}'), + }) + ), + item.extension && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '@extension[]'), + value: item.extension, + }), + item.fileNameMethod === 'random' && + item.fileName && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '@filename[]'), + value: '', + }), + item.fileNameMethod === 'fix' && + item.fileName && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '@filename[]'), + value: item.fileName, + }), + item.fileNameMethod === 'asis' && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '@filename[]'), + value: '@rawfilename', + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'file', + name: ''.concat(item.name, '[]'), + }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ), + mode === 'customunit' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + editMode === 'preview' ? null : ''), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@old'), + value: '{'.concat(item.name, '@path}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@secret'), + value: '{'.concat(item.name, '@secret}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@fileSize'), + value: '{'.concat(item.name, '@fileSize}'), + }), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '{id}@edit'), + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, }), - item.fileNameMethod === 'fix' && - item.fileName && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename[]'), - value: item.fileName, + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '{id}@edit'), + value: 'delete', + id: 'input-checkbox-'.concat(item.name, '{id}@edit'), + }), + acmscss && + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', }), - item.fileNameMethod === 'asis' && + '\u524A\u9664' + ), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, + }) + ), + editMode === 'preview' ? null : '', + /*#__PURE__*/ _react.default.createElement('input', { + type: 'file', + name: ''.concat(item.name, '{id}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: 'unit{id}[]', + value: ''.concat(item.name, '{id}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@baseName'), + value: '{'.concat(item.name, '@baseName}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}:extension'), + value: 'file', + }), + item.extension && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@extension'), + value: item.extension, + }), + item.fileNameMethod === 'random' && + item.fileName && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename'), + value: '', + }), + item.fileNameMethod === 'fix' && + item.fileName && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename'), + value: item.fileName, + }), + item.fileNameMethod === 'asis' && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename'), + value: '@rawfilename', + }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ), + mode === 'unitgroup' && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + isValue && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + editMode === 'preview' ? null : ''), + /*#__PURE__*/ _react.default.createElement( + 'div', + { + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '{id}@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(item.name, '{id}@edit[]'), + }), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '{id}@edit[]'), + }, + acmscss && + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + ' \u524A\u9664' + ) + ), + /*#__PURE__*/ _react.default.createElement( + 'a', + { + href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + }, + /*#__PURE__*/ _react.default.createElement('img', { + src: src, + width: '64', + height: '64', + alt: alt, + }) + ), + editMode === 'preview' ? null : '', /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: ''.concat(item.name, '@filename[]'), - value: '@rawfilename', + name: ''.concat(item.name, '{id}@old[]'), + value: '{'.concat(item.name, '@path}'), }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'file', + name: ''.concat(item.name, '{id}[]'), + }), + !isValue && + item.extension && /*#__PURE__*/ _react.default.createElement('input', { - type: 'file', - name: ''.concat(item.name, '[]'), + type: 'hidden', + name: ''.concat(item.name, '{id}@extension[]'), + value: '{extension}', + }), + item.fileNameMethod === 'random' && + item.fileName && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename[]'), + value: '', }), - /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { - item: item, + item.fileNameMethod === 'fix' && + item.fileName && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename[]'), + value: item.fileName, + }), + item.fileNameMethod === 'asis' && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename[]'), + value: '@rawfilename', }) - ), - item.title ) ); } diff --git a/lib/components/html/ImageInput.js b/lib/components/html/ImageInput.js index ecef62e..701693c 100644 --- a/lib/components/html/ImageInput.js +++ b/lib/components/html/ImageInput.js @@ -10,33 +10,22 @@ var _classnames = _interopRequireDefault(require('classnames')); var _MakerContext = require('../../store/MakerContext'); var _OptionValidator = require('./OptionValidator'); var _OptionNoSearch = require('./OptionNoSearch'); +var _WrapTable = require('./WrapTable'); function ImageInput(props) { const { item, id, isAttribute = true } = props; const { - preview: { acmscss, editMode, mode, direction }, + preview: { acmscss, editMode, mode }, } = (0, _MakerContext.useMakerContext)(); let style = {}; let hiddenStyle = {}; - const wrapTable = (children, title) => { - return /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: direction === 'vertical', - wrap: (child) => - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('th', null, title), - child - ), - }, - children - ); - }; - const ConditionalWrap = (_ref) => { - let { condition, wrap, children } = _ref; - return condition ? wrap(children) : children; - }; + if (mode === 'unitgroup') { + if (item.normalSize) { + style.maxWidth = ''.concat(item.normalSize, 'px'); + } + hiddenStyle = Object.assign({}, style, { + display: 'none', + }); + } return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, @@ -180,7 +169,9 @@ function ImageInput(props) { }) ), mode === 'fieldgroup' && - wrapTable( + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, /*#__PURE__*/ _react.default.createElement( 'div', { @@ -291,8 +282,261 @@ function ImageInput(props) { /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { item: item, }) + ) + ), + mode === 'customunit' && + /*#__PURE__*/ _react.default.createElement( + 'span', + { + className: (0, _classnames.default)({ + 'js-img_resize_cf': item.resize, + }), + }, + editMode === 'preview' ? null : ''), + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + className: (0, _classnames.default)({ + 'acms-admin-img-responsive': acmscss, + 'js-img_resize_preview': item.resize, + }), + style: item.normalSize + ? { + width: ''.concat(item.normalSize, 'px'), + } + : null, + alt: '{'.concat(item.name, '@alt}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@old'), + value: '{'.concat(item.name, '@path}'), + }), + /*#__PURE__*/ _react.default.createElement( + 'div', + { + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '{id}@edit'), + value: 'delete', + id: 'input-checkbox-'.concat(item.name, '{id}@edit'), + }), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '{id}@edit'), + }, + acmscss && + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + '\u524A\u9664' + ) ), - item.title + editMode === 'preview' ? null : '', + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + alt: '', + className: (0, _classnames.default)({ + 'acms-admin-img-responsive': acmscss, + 'js-img_resize_preview': item.resize, + }), + style: item.normalSize + ? { + width: ''.concat(item.normalSize, 'px'), + display: 'none', + } + : { + display: 'none', + }, + }), + editMode === 'preview' ? null : '', + /*#__PURE__*/ _react.default.createElement('input', { + type: 'file', + name: ''.concat(item.name, '{id}'), + size: '20', + className: (0, _classnames.default)({ + 'js-img_resize_input': item.resize, + }), + }), + /*#__PURE__*/ _react.default.createElement('br', null), + item.alt && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + '\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:', + /*#__PURE__*/ _react.default.createElement('input', { + type: 'text', + name: ''.concat(item.name, '{id}@alt'), + value: '{'.concat(item.name, '@alt}'), + size: '40', + }) + ), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: 'unit{id}[]', + value: ''.concat(item.name, '{id}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}:extension'), + value: 'image', + }), + item.normalSize && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.normal), + value: item.normalSize, + }), + item.tiny && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.tiny), + value: item.tinySize, + }), + item.large && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.large), + value: item.largeSize, + }), + item.square && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.square), + value: item.squareSize, + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@filename'), + value: '', + }), + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ), + mode === 'unitgroup' && + /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'div', + { + className: (0, _classnames.default)({ + 'js-img_resize_cf': item.resize, + }), + }, + isAttribute && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + editMode === 'preview' ? null : ''), + /*#__PURE__*/ _react.default.createElement( + 'div', + null, + /*#__PURE__*/ _react.default.createElement('img', { + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + className: (0, _classnames.default)({ + 'js-img_resize_preview': item.resize, + }), + style: style, + alt: '{'.concat(item.name, '@alt}'), + }) + ), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@old[]'), + value: '{'.concat(item.name, '@path}'), + }), + /*#__PURE__*/ _react.default.createElement( + 'label', + { + htmlFor: 'input-checkbox-'.concat(item.name, '{id}@edit[]'), + className: (0, _classnames.default)({ + 'acms-admin-form-checkbox': acmscss, + }), + }, + /*#__PURE__*/ _react.default.createElement('input', { + type: 'checkbox', + name: ''.concat(item.name, '{id}@edit[]'), + value: 'delete', + id: 'input-checkbox-'.concat(item.name, '{id}@edit[]'), + }), + acmscss && + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-ico-checkbox', + }), + '\u524A\u9664' + ), + editMode === 'preview' ? null : '' + ), + /*#__PURE__*/ _react.default.createElement('img', { + alt: '', + src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), + className: (0, _classnames.default)({ + 'js-img_resize_preview': item.resize, + }), + style: hiddenStyle, + }), + isAttribute && editMode === 'preview' ? null : '', + /*#__PURE__*/ _react.default.createElement('input', { + type: 'file', + name: ''.concat(item.name, '{id}[]'), + className: (0, _classnames.default)({ + 'js-img_resize_input': item.resize, + }), + }), + /*#__PURE__*/ _react.default.createElement('br', null), + item.alt && + /*#__PURE__*/ _react.default.createElement( + 'div', + null, + '\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:', + /*#__PURE__*/ _react.default.createElement('input', { + type: 'text', + name: ''.concat(item.name, '{id}@alt[]'), + value: '{'.concat(item.name, '@alt}'), + size: '40', + }) + ), + item.normal && + item.normalSize && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.normal, '[]'), + value: item.normalSize, + }), + item.tiny && + item.tinySize && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.tiny, '[]'), + value: item.tinySize, + }), + item.large && + item.largeSize && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.large, '[]'), + value: item.largeSize, + }), + item.square && + item.squareSize && + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, '{id}@').concat(item.square, '[]'), + value: item.squareSize, + }), + isAttribute && + /*#__PURE__*/ _react.default.createElement(_OptionValidator.OptionValidator, { + item: item, + }) + ) ) ); } diff --git a/lib/components/html/Label.js b/lib/components/html/Label.js deleted file mode 100644 index a619eea..0000000 --- a/lib/components/html/Label.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Label = void 0; -var _react = _interopRequireDefault(require("react")); -var Label = exports.Label = function Label(props) { - var item = props.item, - preview = props.preview; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - }), preview && preview.jsValidator && /*#__PURE__*/_react.default.createElement("label", { - className: "valid-mark", - "data-validator": item.name - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-checklist" - }))); -}; \ No newline at end of file diff --git a/lib/components/html/MediaInput.js b/lib/components/html/MediaInput.js deleted file mode 100644 index 6007aa9..0000000 --- a/lib/components/html/MediaInput.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.MediaInput = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _react = _interopRequireDefault(require("react")); -var _MakerContext = require("../../store/MakerContext"); -var _EditorContext = require("../../store/EditorContext"); -var _classnames = _interopRequireDefault(require("classnames")); -var ConditionalWrap = function ConditionalWrap(_ref) { - var condition = _ref.condition, - wrap = _ref.wrap, - children = _ref.children; - return condition ? wrap(children) : children; -}; -var MediaInput = exports.MediaInput = function MediaInput(props) { - var name = props.name, - mediaType = props.mediaType, - useDropArea = props.useDropArea, - dropAreaWidth = props.dropAreaWidth, - dropAreaHeight = props.dropAreaHeight; - var _useMakerContext = (0, _MakerContext.useMakerContext)(), - maker = _useMakerContext.maker; - var _useEditorContext = (0, _EditorContext.useEditorContext)(), - editor = _useEditorContext.editor; - return /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !useDropArea && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': maker.acmscss - }), - alt: "", - id: "".concat(name, "-preview") - }, mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': maker.acmscss - }), - id: "".concat(name, "-preview") - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': maker.acmscss - }), - "data-type": mediaType ? mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': maker.acmscss - }), - "data-type": mediaType ? mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': maker.acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': maker.acmscss - }) - }, "\u524A\u9664"))), useDropArea && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(name, "@thumbnail}"), - "data-type": mediaType ? mediaType : 'all', - "data-thumbnail-type": "{".concat(name, "@type}"), - "data-width": "".concat(dropAreaWidth, "px"), - "data-height": "".concat(dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': maker.acmscss - }), - "data-type": mediaType ? mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: name, - value: editor.editMode === 'preview' ? '' : "{".concat(name, "}"), - className: "js-value" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":extension"), - value: "media" - })); -}; \ No newline at end of file diff --git a/lib/components/html/RadioButton.js b/lib/components/html/RadioButton.js index 17a490d..c8765c3 100644 --- a/lib/components/html/RadioButton.js +++ b/lib/components/html/RadioButton.js @@ -70,10 +70,8 @@ function RadioButton(props) { ), mode === 'fieldgroup' && /*#__PURE__*/ _react.default.createElement( - _WrapTable.WrapTable, - { - title: item.title, - }, + _react.default.Fragment, + null, item.option.map((option, index) => { if (!option.label) { return null; diff --git a/lib/components/html/RichEditor.js b/lib/components/html/RichEditor.js index a17ac35..b0dcdb0 100644 --- a/lib/components/html/RichEditor.js +++ b/lib/components/html/RichEditor.js @@ -81,74 +81,68 @@ function RichEditor(props) { ), mode === 'fieldgroup' && /*#__PURE__*/ _react.default.createElement( - _WrapTable.WrapTable, + ConditionalWrap, { - title: item.title, - }, - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: item.useExpand, - wrap: (children) => + condition: item.useExpand, + wrap: (children) => + /*#__PURE__*/ _react.default.createElement( + 'div', + { + className: 'js-expand js-acms-expand', + }, /*#__PURE__*/ _react.default.createElement( 'div', { - className: 'js-expand js-acms-expand', + className: 'js-acms-expand-inner', }, /*#__PURE__*/ _react.default.createElement( - 'div', + 'button', { - className: 'js-acms-expand-inner', + className: 'js-expand-btn js-acms-expand-btn', + type: 'button', }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: 'js-expand-btn js-acms-expand-btn', - type: 'button', - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', - }) - ), - children - ) - ), - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-smartblock', - 'data-heading-start': item.startHeadingLevel, - 'data-heading-end': item.endHeadingLevel, - }, - /*#__PURE__*/ _react.default.createElement('div', { - className: 'js-smartblock-edit', - }), - isValue - ? /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('input', { - id: id, - className: 'js-smartblock-body', - type: 'hidden', - name: ''.concat(item.name, '[]'), - value: '{'.concat(item.name, '@html}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'rich-editor', + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', }) - ) - : /*#__PURE__*/ _react.default.createElement('input', { + ), + children + ) + ), + }, + /*#__PURE__*/ _react.default.createElement( + 'div', + { + className: 'js-smartblock', + 'data-heading-start': item.startHeadingLevel, + 'data-heading-end': item.endHeadingLevel, + }, + /*#__PURE__*/ _react.default.createElement('div', { + className: 'js-smartblock-edit', + }), + isValue + ? /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + /*#__PURE__*/ _react.default.createElement('input', { id: id, className: 'js-smartblock-body', type: 'hidden', name: ''.concat(item.name, '[]'), - value: '', + value: '{'.concat(item.name, '@html}'), + }), + /*#__PURE__*/ _react.default.createElement('input', { + type: 'hidden', + name: ''.concat(item.name, ':extension'), + value: 'rich-editor', }) - ) + ) + : /*#__PURE__*/ _react.default.createElement('input', { + id: id, + className: 'js-smartblock-body', + type: 'hidden', + name: ''.concat(item.name, '[]'), + value: '', + }) ) ), mode === 'customunit' && diff --git a/lib/components/html/Selectbox.js b/lib/components/html/Selectbox.js index ea8a129..175d430 100644 --- a/lib/components/html/Selectbox.js +++ b/lib/components/html/Selectbox.js @@ -66,10 +66,8 @@ function Selectbox(props) { ), mode === 'fieldgroup' && /*#__PURE__*/ _react.default.createElement( - _WrapTable.WrapTable, - { - title: item.title, - }, + _react.default.Fragment, + null, /*#__PURE__*/ _react.default.createElement( 'select', { diff --git a/lib/components/html/Table.js b/lib/components/html/Table.js index b4c1b48..7da5e75 100644 --- a/lib/components/html/Table.js +++ b/lib/components/html/Table.js @@ -64,10 +64,8 @@ function Table(props) { ), mode === 'fieldgroup' && /*#__PURE__*/ _react.default.createElement( - _WrapTable.WrapTable, - { - title: item.title, - }, + _react.default.Fragment, + null, /*#__PURE__*/ _react.default.createElement( 'div', { diff --git a/lib/components/html/TextInput.js b/lib/components/html/TextInput.js index c58a380..f9d50eb 100644 --- a/lib/components/html/TextInput.js +++ b/lib/components/html/TextInput.js @@ -64,10 +64,8 @@ function TextInput(props) { ), mode === 'fieldgroup' && /*#__PURE__*/ _react.default.createElement( - _WrapTable.WrapTable, - { - title: item.title, - }, + _react.default.Fragment, + null, /*#__PURE__*/ _react.default.createElement( 'input', (0, _extends2.default)( diff --git a/lib/components/html/Textarea.js b/lib/components/html/Textarea.js index a030f3d..8ac8eea 100644 --- a/lib/components/html/Textarea.js +++ b/lib/components/html/Textarea.js @@ -52,10 +52,8 @@ function Textarea(props) { ), mode === 'fieldgroup' && /*#__PURE__*/ _react.default.createElement( - _WrapTable.WrapTable, - { - title: item.title, - }, + _react.default.Fragment, + null, /*#__PURE__*/ _react.default.createElement( 'textarea', { diff --git a/lib/components/html/TextareaInput.js b/lib/components/html/TextareaInput.js deleted file mode 100644 index 30e1e73..0000000 --- a/lib/components/html/TextareaInput.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TextareaInput = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _react = _interopRequireDefault(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -var _MakerContext = require("../../store/MakerContext"); -var _AcmsInput = require("./AcmsInput"); -var TextareaInput = exports.TextareaInput = function TextareaInput(props) { - var name = props.name, - type = props.type, - subType = props.subType; - var _useMakerContext = (0, _MakerContext.useMakerContext)(), - preview = _useMakerContext.preview; - var selectedType = subType ? subType : type; - var classname = (0, _classnames.default)({ - 'acms-admin-form-width-full': preview && preview.acmscss, - 'js-lite-editor-field': selectedType === 'lite-editor' - }); - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: name, - className: classname - }, preview && preview.jsValidator ? { - 'data-validator': name - } : {}), "{".concat(name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: name - }), (0, _AcmsInput.renderValidator)(props), (0, _AcmsInput.renderNoSearch)(props)); -}; \ No newline at end of file diff --git a/lib/components/html/WrapTable.js b/lib/components/html/WrapTable.js new file mode 100644 index 0000000..2e1dc8f --- /dev/null +++ b/lib/components/html/WrapTable.js @@ -0,0 +1,38 @@ +'use strict'; + +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); +Object.defineProperty(exports, '__esModule', { + value: true, +}); +exports.WrapTable = WrapTable; +var _react = _interopRequireDefault(require('react')); +var _MakerContext = require('../../store/MakerContext'); +function WrapTable(props) { + const { children, title } = props; + const { + preview: { direction }, + } = (0, _MakerContext.useMakerContext)(); + const ConditionalWrap = (_ref) => { + let { condition, wrap, children } = _ref; + return condition ? wrap(children) : children; + }; + return /*#__PURE__*/ _react.default.createElement( + ConditionalWrap, + { + condition: direction === 'vertical', + wrap: (children) => { + return /*#__PURE__*/ _react.default.createElement( + 'table', + null, + /*#__PURE__*/ _react.default.createElement( + 'tr', + null, + /*#__PURE__*/ _react.default.createElement('th', null, title), + children + ) + ); + }, + }, + children + ); +} diff --git a/lib/components/input.js b/lib/components/input.js deleted file mode 100644 index a3f393a..0000000 --- a/lib/components/input.js +++ /dev/null @@ -1,535 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var ConditionalWrap = function ConditionalWrap(_ref) { - var condition = _ref.condition, - wrap = _ref.wrap, - children = _ref.children; - return condition ? wrap(children) : children; -}; -var Input = exports.default = /*#__PURE__*/function (_Component) { - function Input(props) { - (0, _classCallCheck2.default)(this, Input); - return _callSuper(this, Input, [props]); - } - (0, _inherits2.default)(Input, _Component); - return (0, _createClass2.default)(Input, [{ - key: "renderLabel", - value: function renderLabel(item) { - var jsValidator = this.props.jsValidator; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - }), jsValidator && /*#__PURE__*/_react.default.createElement("label", { - className: "valid-mark", - "data-validator": item.name - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-checklist" - }))); - } - }, { - key: "renderText", - value: function renderText(item) { - var _this$props = this.props, - acmscss = _this$props.acmscss, - jsValidator = _this$props.jsValidator, - renderValidator = _this$props.renderValidator, - renderNoSearch = _this$props.renderNoSearch; - var type = item.subType ? item.subType : item.type; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({ - type: type, - name: item.name, - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {})), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item)); - } - }, { - key: "renderTextarea", - value: function renderTextarea(item) { - var _this$props2 = this.props, - acmscss = _this$props2.acmscss, - jsValidator = _this$props2.jsValidator, - renderValidator = _this$props2.renderValidator, - renderNoSearch = _this$props2.renderNoSearch; - var type = item.subType ? item.subType : item.type; - var classname = ''; - if (type === 'lite-editor') { - classname = (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }); - } else { - classname = (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }); - } - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: classname - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss)); - } - }, { - key: "renderRichEditor", - value: function renderRichEditor(item) { - return /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: item.name, - value: "{".concat(item.name, "@html}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "rich-editor" - }))); - } - }, { - key: "renderTable", - value: function renderTable(item) { - var preview = this.props.preview; - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }))); - } - }, { - key: "renderSelect", - value: function renderSelect(item) { - var _this$props3 = this.props, - acmscss = _this$props3.acmscss, - renderValidator = _this$props3.renderValidator, - renderNoSearch = _this$props3.renderNoSearch; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("select", { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - key: option.value, - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item)); - } - }, { - key: "renderRadio", - value: function renderRadio(item) { - var _this$props4 = this.props, - acmscss = _this$props4.acmscss, - renderValidator = _this$props4.renderValidator, - renderNoSearch = _this$props4.renderNoSearch; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("span", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: item.name, - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item)); - } - }, { - key: "renderCheckbox", - value: function renderCheckbox(item) { - var _this$props5 = this.props, - acmscss = _this$props5.acmscss, - renderNoSearch = _this$props5.renderNoSearch; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-checkbox-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item)); - } - }, { - key: "renderImage", - value: function renderImage(item) { - var _this$props6 = this.props, - preview = _this$props6.preview, - acmscss = _this$props6.acmscss, - renderValidator = _this$props6.renderValidator, - renderNoSearch = _this$props6.renderNoSearch; - return /*#__PURE__*/_react.default.createElement("span", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px") - } : null, - alt: "{".concat(item.name, "@alt}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664")), preview ? null : '', /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px"), - display: 'none' - } : { - display: 'none' - } - }), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name, - size: "20", - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "@alt"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "image" - }), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.normal), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.tiny), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.large), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.square), - value: item.squareSize - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), renderValidator(item, acmscss), renderNoSearch(item)); - } - }, { - key: "renderMedia", - value: function renderMedia(item) { - var _this$props7 = this.props, - preview = _this$props7.preview, - acmscss = _this$props7.acmscss; - return /*#__PURE__*/_react.default.createElement("span", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "", - id: "".concat(item.name, "-preview") - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - id: "".concat(item.name, "-preview") - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: item.name, - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "media" - })); - } - }, { - key: "renderFile", - value: function renderFile(item) { - var _this$props8 = this.props, - preview = _this$props8.preview, - acmscss = _this$props8.acmscss, - renderValidator = _this$props8.renderValidator, - renderNoSearch = _this$props8.renderNoSearch; - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@secret"), - value: "{".concat(item.name, "@secret}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@fileSize"), - value: "{".concat(item.name, "@fileSize}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@baseName"), - value: "{".concat(item.name, "@baseName}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "file" - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@extension"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "".concat(item.fileName) - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "@rawfilename" - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss)); - } - }]); -}(_react.Component); \ No newline at end of file diff --git a/lib/components/input/section.js b/lib/components/input/section.js deleted file mode 100644 index 6a83b1d..0000000 --- a/lib/components/input/section.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireDefault(require("react")); -var _input = _interopRequireDefault(require("../input")); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Section = exports.default = /*#__PURE__*/function (_Input) { - function Section(props) { - (0, _classCallCheck2.default)(this, Section); - return _callSuper(this, Section, [props]); - } - (0, _inherits2.default)(Section, _Input); - return (0, _createClass2.default)(Section, [{ - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - acmscss = _this$props.acmscss, - customfield = _this$props.customfield, - jsValidator = _this$props.jsValidator; - return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, jsValidator && '', customfield && customfield.map(function (item, index) { - if (item.type === 'text') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderText(item))); - } else if (item.type === 'textarea') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderTextarea(item))); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderRichEditor(item))); - } else if (item.type === 'table') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderTable(item))); - } else if (item.type === 'select') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item, acmscss)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderSelect(item))); - } else if (item.type === 'radio') { - return /*#__PURE__*/_react.default.createElement("fieldset", { - key: index - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("legend", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderRadio(item)))); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/_react.default.createElement("fieldset", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("legend", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderCheckbox(item)))); - } else if (item.type === 'image') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderImage(item))); - } else if (item.type === 'media') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderMedia(item))); - } else if (item.type === 'file') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index, - className: "acms-admin-form-item" - }, /*#__PURE__*/_react.default.createElement("label", { - className: "acms-admin-form-item-heading" - }, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-form-item-input" - }, _this.renderFile(item))); - } - }), jsValidator && ''); - } - }]); -}(_input.default); \ No newline at end of file diff --git a/lib/components/input/table.js b/lib/components/input/table.js deleted file mode 100644 index 11a854a..0000000 --- a/lib/components/input/table.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -var _input = _interopRequireDefault(require("../input")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Table = exports.default = /*#__PURE__*/function (_Input) { - function Table(props) { - (0, _classCallCheck2.default)(this, Table); - return _callSuper(this, Table, [props]); - } - (0, _inherits2.default)(Table, _Input); - return (0, _createClass2.default)(Table, [{ - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - acmscss = _this$props.acmscss, - customfield = _this$props.customfield, - jsValidator = _this$props.jsValidator; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, jsValidator && '', /*#__PURE__*/_react.default.createElement("table", { - className: (0, _classnames.default)({ - 'acms-admin-table-admin-edit': acmscss - }), - ref: function ref(table) { - return _this.table = table; - } - }, customfield && customfield.map(function (item, index) { - if (item.type === 'text') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderText(item))); - } else if (item.type === 'textarea') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderTextarea(item))); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderRichEditor(item))); - } else if (item.type === 'table') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderTable(item))); - } else if (item.type === 'select') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderSelect(item))); - } else if (item.type === 'radio') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderRadio(item))); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderCheckbox(item))); - } else if (item.type === 'image') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderImage(item))); - } else if (item.type === 'media') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderMedia(item))); - } else if (item.type === 'file') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, /*#__PURE__*/_react.default.createElement("th", null, _this.renderLabel(item)), /*#__PURE__*/_react.default.createElement("td", null, _this.renderFile(item))); - } - })), jsValidator && ''); - } - }]); -}(_input.default); \ No newline at end of file diff --git a/lib/components/layouts/GroupTable.js b/lib/components/layouts/GroupTable.js deleted file mode 100644 index 0c17808..0000000 --- a/lib/components/layouts/GroupTable.js +++ /dev/null @@ -1,536 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.GroupTable = GroupTable; -var _react = _interopRequireWildcard(require('react')); -var _classnames = _interopRequireDefault(require('classnames')); -var _Label = require('../html/Label'); -var _TextInput = require('../html/TextInput'); -var _Textarea = require('../html/Textarea'); -var _MakerContext = require('../../store/MakerContext'); -function _getRequireWildcardCache(e) { - if ('function' != typeof WeakMap) return null; - var r = new WeakMap(), - t = new WeakMap(); - return (_getRequireWildcardCache = function (e) { - return e ? t : r; - })(e); -} -function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) return e; - if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, - a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ('default' !== u && {}.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); - } - return (n.default = e), t && t.set(e, n), n; -} -function GroupTable(props) { - const { fieldgroup } = props; - const { - preview: { acmscss, direction, editMode }, - } = (0, _MakerContext.useMakerContext)(); - const tableRef = (0, _react.useRef)(); - const ConditionalWrap = (_ref) => { - let { condition, wrap, children } = _ref; - return condition ? wrap(children) : children; - }; - const groupLength = fieldgroup.items.length; - return /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - fieldgroup.title && - /*#__PURE__*/ _react.default.createElement( - 'h2', - { - className: (0, _classnames.default)({ - 'acms-admin-admin-title2': acmscss, - }), - }, - fieldgroup.title - ), - fieldgroup.name && - /*#__PURE__*/ _react.default.createElement( - 'table', - { - className: (0, _classnames.default)('js-fieldgroup-sortable', { - 'adminTable acms-admin-table-admin-edit': acmscss, - }), - ref: tableRef, - }, - /*#__PURE__*/ _react.default.createElement( - 'thead', - { - className: (0, _classnames.default)({ - 'acms-admin-hide-sp': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: (0, _classnames.default)({ - 'acms-admin-table-left acms-admin-admin-config-table-item-handle': acmscss, - }), - }, - '\xA0' - ), - direction === 'horizontal' && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - fieldgroup && - fieldgroup.items.map((item, index) => - /*#__PURE__*/ _react.default.createElement( - 'th', - { - key: index, - className: (0, _classnames.default)({ - 'acms-admin-table-left': acmscss, - }), - }, - item.title, - item.tooltip && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip js-acms-tooltip', - 'data-acms-tooltip': item.tooltip, - }) - ) - ) - ), - direction === 'vertical' && /*#__PURE__*/ _react.default.createElement('th', null), - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: (0, _classnames.default)({ - 'acms-admin-table-left acms-admin-admin-config-table-action': acmscss, - }), - }, - '\u524A\u9664' - ) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'tbody', - null, - editMode === 'preview' ? null : ''), - /*#__PURE__*/ _react.default.createElement( - 'tr', - { - className: 'sortable-item', - }, - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'item-handle acms-admin-table-nowrap', - }, - acmscss && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-sort', - }) - ), - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: direction === 'vertical', - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement('table', null, children) - ), - }, - fieldgroup.items.map((item, index) => { - switch (item.type) { - case 'text': { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - className: 'acms-admin-form-item', - }, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-form-item-heading', - }, - /*#__PURE__*/ _react.default.createElement(_Label.Label, { - item: item, - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'acms-admin-form-item-input', - }, - /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { - item: item, - }) - ) - ); - } - case 'textarea': { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - className: 'acms-admin-form-item', - }, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-form-item-heading', - }, - /*#__PURE__*/ _react.default.createElement(_Label.Label, { - item: item, - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'acms-admin-form-item-input', - }, - /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { - item: item, - }) - ) - ); - } - default: { - return null; - } - } - }), - editMode === 'preview' ? null : ''), - editMode === 'preview' - ? null - : /*#__PURE__*/ _react.default.createElement( - 'tr', - { - className: 'sortable-item item-template', - }, - fieldgroup.items.map((item, index) => { - switch (item.type) { - case 'text': { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - className: 'acms-admin-form-item', - }, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-form-item-heading', - }, - /*#__PURE__*/ _react.default.createElement(_Label.Label, { - item: item, - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'acms-admin-form-item-input', - }, - /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { - item: item, - }) - ) - ); - } - case 'textarea': { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - className: 'acms-admin-form-item', - }, - /*#__PURE__*/ _react.default.createElement( - 'th', - { - className: 'acms-admin-form-item-heading', - }, - /*#__PURE__*/ _react.default.createElement(_Label.Label, { - item: item, - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'acms-admin-form-item-input', - }, - /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { - item: item, - }) - ) - ); - } - default: { - return null; - } - } - }) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'acms-admin-table-nowrap', - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'button', - className: (0, _classnames.default)('item-delete', { - 'acms-admin-btn-admin acms-admin-btn-admin-danger': acmscss, - }), - value: '\u524A\u9664', - }) - ) - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'tfoot', - null, - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement( - 'td', - { - colSpan: direction === 'horizontal' ? groupLength + 2 : 3, - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'button', - className: (0, _classnames.default)('item-insert', { - 'acms-admin-btn-admin': acmscss, - }), - value: '\u8FFD\u52A0', - }) - ) - ) - ) - ), - fieldgroup.name && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - fieldgroup.items.map((item) => - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - item.type === 'image' && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - item.square && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@squarePath'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@squareAlt'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@squareX'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@squareY'), - }) - ), - item.large && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@largePath'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@largeAlt'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@largeX'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@largeY'), - }) - ), - item.tiny && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@tinyPath'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@tinyAlt'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@tinyX'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@tinyY'), - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@path'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@alt'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@x'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@y'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@edit'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@old'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'image', - }) - ), - item.type === 'file' && - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@path'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@alt'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@edit'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: ''.concat(item.name, '@old'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'file', - }) - ), - item.type === 'media' && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'media', - }), - item.type === 'rich-editor' && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'rich-editor', - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - item.noSearch && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':search'), - value: '0', - }), - item.validator.map((validator, index) => { - if (!validator.option) { - return null; - } - const name = item.type === 'file' || item.type === 'image' ? ''.concat(item.name, '@path') : item.name; - return /*#__PURE__*/ _react.default.createElement('input', { - key: index, - type: 'hidden', - name: ''.concat(name, ':v#').concat(validator.option), - value: validator.value, - id: ''.concat(name, '-v-').concat(validator.option), - }); - }), - (() => { - const name = item.type === 'file' || item.type === 'image' ? ''.concat(item.name, '@path') : item.name; - return ( - item.converter && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(name, ':c'), - value: item.converter, - }) - ); - })() - ) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: '@'.concat(fieldgroup.name), - }) - ) - ); -} diff --git a/lib/components/layouts/GroupTableLayout.js b/lib/components/layouts/GroupTableLayout.js index 5feab1c..73bad7d 100644 --- a/lib/components/layouts/GroupTableLayout.js +++ b/lib/components/layouts/GroupTableLayout.js @@ -17,6 +17,7 @@ var _ImageInput = require('../html/ImageInput'); var _RichEditor = require('../html/RichEditor'); var _Table = require('../html/Table'); var _MakerContext = require('../../store/MakerContext'); +var _WrapTable = require('../html/WrapTable'); function _getRequireWildcardCache(e) { if ('function' != typeof WeakMap) return null; var r = new WeakMap(), @@ -50,22 +51,6 @@ function GroupTableLayout() { return condition ? wrap(children) : children; }; const groupLength = fieldgroup.items.length; - const wrapTable = (children, title) => { - return /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: direction === 'vertical', - wrap: (child) => - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('th', null, title), - child - ), - }, - children - ); - }; return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, @@ -165,174 +150,165 @@ function GroupTableLayout() { }) ), /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: direction === 'vertical', - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement('table', null, children) - ), - }, - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - fieldgroup.items.map((item, index) => { - switch (item.type) { - case 'text': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'textarea': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'checkbox': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Checkbox.Checkbox, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'selectbox': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Selectbox.Selectbox, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'radioButton': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_RadioButton.RadioButton, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'media': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Media.Media, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'image': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_ImageInput.ImageInput, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ), - item.title - ); - } - case 'richEditor': { - return wrapTable( + _react.default.Fragment, + null, + fieldgroup.items.map((item, index) => { + switch (item.type) { + case 'text': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ) + ); + } + case 'textarea': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ); + } + case 'checkbox': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement(_Checkbox.Checkbox, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ); + } + case 'selectbox': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement(_Selectbox.Selectbox, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ); + } + case 'radioButton': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement(_RadioButton.RadioButton, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ); + } + case 'media': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement(_Media.Media, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ); + } + case 'image': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement(_ImageInput.ImageInput, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ); + } + case 'richEditor': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: item.useExpand, - wrap: (children) => + ConditionalWrap, + { + condition: item.useExpand, + wrap: (children) => + /*#__PURE__*/ _react.default.createElement( + 'div', + { + className: 'js-expand js-acms-expand', + }, /*#__PURE__*/ _react.default.createElement( 'div', { - className: 'js-expand js-acms-expand', + className: 'js-acms-expand-inner', }, /*#__PURE__*/ _react.default.createElement( - 'div', + 'button', { - className: 'js-acms-expand-inner', + className: 'js-expand-btn js-acms-expand-btn', + type: 'button', }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: 'js-expand-btn js-acms-expand-btn', - type: 'button', - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', - }) - ), - children - ) - ), - }, - /*#__PURE__*/ _react.default.createElement(_RichEditor.RichEditor, { - item: item, - id: ''.concat(item.name).concat(index), - }) - ) - ), - item.title - ); - } - case 'table': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Table.Table, { + /*#__PURE__*/ _react.default.createElement('i', { + className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', + }) + ), + children + ) + ), + }, + /*#__PURE__*/ _react.default.createElement(_RichEditor.RichEditor, { item: item, id: ''.concat(item.name).concat(index), }) - ), - item.title - ); - } - default: { - return null; - } + ) + ) + ); } - }) - ) + case 'table': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_Table.Table, { + item: item, + id: ''.concat(item.name).concat(index), + }) + ) + ); + } + default: { + return null; + } + } + }) ), /*#__PURE__*/ _react.default.createElement( 'td', @@ -373,153 +349,168 @@ function GroupTableLayout() { }) ), /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: direction === 'vertical', - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement('table', null, children) - ), - }, - /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - fieldgroup.items.map((item, index) => { - switch (item.type) { - case 'text': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { - item: item, - id: ''.concat(item.name).concat(index), - isValue: false, - }) - ), - item.title - ); - } - case 'textarea': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { - item: item, - id: ''.concat(item.name).concat(index), - isValue: false, - }) - ), - item.title - ); - } - case 'checkbox': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Checkbox.Checkbox, { - item: item, - id: 'template-'.concat(item.name).concat(index), - isChecked: false, - }) - ), - item.title - ); - } - case 'selectbox': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Selectbox.Selectbox, { - item: item, - id: ''.concat(item.name).concat(index), - isSelected: false, - }) - ), - item.title - ); - } - case 'radioButton': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_RadioButton.RadioButton, { - item: item, - id: ''.concat(item.name).concat(index), - isChecked: false, - }) - ), - item.title - ); - } - case 'media': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Media.Media, { - item: item, - id: ''.concat(item.name).concat(index), - isValue: false, - }) - ), - item.title - ); - } - case 'image': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_ImageInput.ImageInput, { - item: item, - id: ''.concat(item.name).concat(index), - isAttribute: false, - }) - ), - item.title - ); - } - case 'richEditor': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_RichEditor.RichEditor, { - item: item, - id: ''.concat(item.name).concat(index), - isValue: false, - }) - ), - item.title - ); - } - case 'table': { - return wrapTable( - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Table.Table, { - item: item, - id: ''.concat(item.name).concat(index), - isValue: false, - }) - ), - item.title - ); - } - default: { - return null; - } + _react.default.Fragment, + null, + fieldgroup.items.map((item, index) => { + switch (item.type) { + case 'text': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { + item: item, + id: ''.concat(item.name).concat(index), + isValue: false, + }) + ) + ); } - }) - ) + case 'textarea': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { + item: item, + id: ''.concat(item.name).concat(index), + isValue: false, + }) + ) + ); + } + case 'checkbox': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_Checkbox.Checkbox, { + item: item, + id: 'template-'.concat(item.name).concat(index), + isChecked: false, + }) + ) + ); + } + case 'selectbox': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_Selectbox.Selectbox, { + item: item, + id: ''.concat(item.name).concat(index), + isSelected: false, + }) + ) + ); + } + case 'radioButton': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_RadioButton.RadioButton, { + item: item, + id: ''.concat(item.name).concat(index), + isChecked: false, + }) + ) + ); + } + case 'media': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_Media.Media, { + item: item, + id: ''.concat(item.name).concat(index), + isValue: false, + }) + ) + ); + } + case 'image': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_ImageInput.ImageInput, { + item: item, + id: ''.concat(item.name).concat(index), + isAttribute: false, + }) + ) + ); + } + case 'richEditor': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_RichEditor.RichEditor, { + item: item, + id: ''.concat(item.name).concat(index), + isValue: false, + }) + ) + ); + } + case 'table': { + return /*#__PURE__*/ _react.default.createElement( + _WrapTable.WrapTable, + { + title: item.title, + }, + /*#__PURE__*/ _react.default.createElement( + 'td', + null, + /*#__PURE__*/ _react.default.createElement(_Table.Table, { + item: item, + id: ''.concat(item.name).concat(index), + isValue: false, + }) + ) + ); + } + default: { + return null; + } + } + }) ), /*#__PURE__*/ _react.default.createElement( 'td', diff --git a/lib/components/layouts/Table.js b/lib/components/layouts/Table.js deleted file mode 100644 index 2afc958..0000000 --- a/lib/components/layouts/Table.js +++ /dev/null @@ -1,84 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.Table = Table; -var _react = _interopRequireDefault(require('react')); -var _classnames = _interopRequireDefault(require('classnames')); -var _Heading = require('../html/Heading'); -var _TextInput = require('../html/TextInput'); -var _Textarea = require('../html/Textarea'); -var _MakerContext = require('../../store/MakerContext'); -function Table(props) { - const { customfield } = props; - const { - preview: { jsValidator, acmscss }, - } = (0, _MakerContext.useMakerContext)(); - return /*#__PURE__*/ _react.default.createElement( - _react.default.Fragment, - null, - jsValidator && '', - /*#__PURE__*/ _react.default.createElement( - 'table', - { - className: (0, _classnames.default)({ - 'acms-admin-table-admin-edit': acmscss, - }), - }, - customfield.map((item, index) => { - switch (item.type) { - case 'text': { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement( - 'th', - null, - /*#__PURE__*/ _react.default.createElement(_Heading.Heading, { - item: item, - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_TextInput.TextInput, { - item: item, - }) - ) - ); - } - case 'textarea': { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - /*#__PURE__*/ _react.default.createElement( - 'th', - null, - /*#__PURE__*/ _react.default.createElement(_Heading.Heading, { - item: item, - }) - ), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement(_Textarea.Textarea, { - item: item, - }) - ) - ); - } - default: { - return null; - } - } - }) - ), - jsValidator && '' - ); -} diff --git a/lib/components/layouts/UnitGroupTableLayout.js b/lib/components/layouts/UnitGroupTableLayout.js index d73779d..3e1791e 100644 --- a/lib/components/layouts/UnitGroupTableLayout.js +++ b/lib/components/layouts/UnitGroupTableLayout.js @@ -41,7 +41,7 @@ function _interopRequireWildcard(e, r) { } function UnitGroupTableLayout() { const { - state: { fieldgroup }, + state: { unitgroup }, preview: { acmscss, direction, editMode }, } = (0, _MakerContext.useMakerContext)(); const tableRef = (0, _react.useRef)(); @@ -49,7 +49,7 @@ function UnitGroupTableLayout() { let { condition, wrap, children } = _ref; return condition ? wrap(children) : children; }; - const groupLength = fieldgroup.items.length; + const groupLength = unitgroup.items.length; const wrapTable = (children, title) => { return /*#__PURE__*/ _react.default.createElement( ConditionalWrap, @@ -69,7 +69,7 @@ function UnitGroupTableLayout() { return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, - fieldgroup.title && + unitgroup.title && /*#__PURE__*/ _react.default.createElement( 'h2', { @@ -77,16 +77,16 @@ function UnitGroupTableLayout() { 'acms-admin-admin-title2': acmscss, }), }, - fieldgroup.title + unitgroup.title ), - fieldgroup.name && + unitgroup.name && /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement( 'table', { - className: (0, _classnames.default)('js-fieldgroup-sortable', { + className: (0, _classnames.default)('js-unitgroup-sortable', { 'adminTable acms-admin-table-admin-edit': acmscss, }), ref: tableRef, @@ -114,8 +114,8 @@ function UnitGroupTableLayout() { /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, - fieldgroup && - fieldgroup.items.map((item, index) => + unitgroup && + unitgroup.items.map((item, index) => /*#__PURE__*/ _react.default.createElement( 'th', { @@ -148,7 +148,7 @@ function UnitGroupTableLayout() { /*#__PURE__*/ _react.default.createElement( 'tbody', null, - editMode === 'preview' ? null : ''), + editMode === 'preview' ? null : ''), /*#__PURE__*/ _react.default.createElement( 'tr', { @@ -178,7 +178,7 @@ function UnitGroupTableLayout() { /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, - fieldgroup.items.map((item, index) => { + unitgroup.items.map((item, index) => { switch (item.type) { case 'text': { return wrapTable( @@ -351,7 +351,7 @@ function UnitGroupTableLayout() { ) ) ), - editMode === 'preview' ? null : ''), + editMode === 'preview' ? null : ''), editMode === 'preview' ? null : /*#__PURE__*/ _react.default.createElement( @@ -386,7 +386,7 @@ function UnitGroupTableLayout() { /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, - fieldgroup.items.map((item, index) => { + unitgroup.items.map((item, index) => { switch (item.type) { case 'text': { return wrapTable( @@ -563,11 +563,11 @@ function UnitGroupTableLayout() { ) ) ), - fieldgroup.name && + unitgroup.name && /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, - fieldgroup.items.map((item) => + unitgroup.items.map((item) => /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, @@ -581,22 +581,22 @@ function UnitGroupTableLayout() { null, /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@squarePath'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@squareAlt'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@squareX'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@squareY'), }) ), @@ -606,22 +606,22 @@ function UnitGroupTableLayout() { null, /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@largePath'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@largeAlt'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@largeX'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@largeY'), }) ), @@ -631,53 +631,53 @@ function UnitGroupTableLayout() { null, /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@tinyPath'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@tinyAlt'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@tinyX'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@tinyY'), }) ), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@path'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@alt'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@x'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@y'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@edit'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@old'), }), /*#__PURE__*/ _react.default.createElement('input', { @@ -692,22 +692,22 @@ function UnitGroupTableLayout() { null, /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@path'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@alt'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@edit'), }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: ''.concat(item.name, '@old'), }), /*#__PURE__*/ _react.default.createElement('input', { @@ -730,7 +730,7 @@ function UnitGroupTableLayout() { }), /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', - name: '@'.concat(fieldgroup.name, '[]'), + name: '@'.concat(unitgroup.name, '[]'), value: item.name, }), /*#__PURE__*/ _react.default.createElement('input', { @@ -773,7 +773,7 @@ function UnitGroupTableLayout() { /*#__PURE__*/ _react.default.createElement('input', { type: 'hidden', name: 'field[]', - value: '@'.concat(fieldgroup.name), + value: '@'.concat(unitgroup.name), }) ) ); diff --git a/lib/components/layouts/UnitTableLayout.js b/lib/components/layouts/UnitTableLayout.js index 5e96a59..7135564 100644 --- a/lib/components/layouts/UnitTableLayout.js +++ b/lib/components/layouts/UnitTableLayout.js @@ -21,7 +21,7 @@ var _Table = require('../html/Table'); var _MakerContext = require('../../store/MakerContext'); function UnitTableLayout() { const { - state: { customfield }, + state: { customunit }, preview: { jsValidator, acmscss }, } = (0, _MakerContext.useMakerContext)(); return /*#__PURE__*/ _react.default.createElement( @@ -35,8 +35,8 @@ function UnitTableLayout() { 'acms-admin-table-admin-edit': acmscss, }), }, - customfield.length > 0 && - customfield.map((item, index) => { + customunit.length > 0 && + customunit.map((item, index) => { switch (item.type) { case 'text': { return /*#__PURE__*/ _react.default.createElement( diff --git a/lib/components/modal-dialog.js b/lib/components/modal-dialog.js deleted file mode 100644 index de9b9ab..0000000 --- a/lib/components/modal-dialog.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var ModalDialog = exports.default = /*#__PURE__*/function (_Component) { - function ModalDialog(props) { - var _this; - (0, _classCallCheck2.default)(this, ModalDialog); - _this = _callSuper(this, ModalDialog, [props]); - _this.state = { - show: false - }; - return _this; - } - (0, _inherits2.default)(ModalDialog, _Component); - return (0, _createClass2.default)(ModalDialog, [{ - key: "componentWillReceiveProps", - value: function componentWillReceiveProps(props) { - var _this2 = this; - if (props.open) { - setTimeout(function () { - _this2.setState({ - show: true - }); - }, 1); - } - } - }, { - key: "hideDialog", - value: function hideDialog() { - var onClose = this.props.onClose; - this.setState({ - show: false - }); - if (onClose) { - setTimeout(function () { - onClose(); - }, 300); - } - } - }, { - key: "render", - value: function render() { - var _this$props = this.props, - children = _this$props.children, - title = _this$props.title, - open = _this$props.open; - var show = this.state.show; - var style = {}; - if (open) { - style.display = 'block'; - } else { - style.display = 'none'; - } - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)("acms-admin-modal", { - "in": show - }), - id: "converter", - style: style - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-modal-dialog" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-modal-content" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-modal-header" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-modal-hide acms-admin-icon-delete", - onClick: this.hideDialog.bind(this) - }), /*#__PURE__*/_react.default.createElement("h3", null, title)), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-modal-body" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-padding-small clearfix" - }, children))))); - } - }]); -}(_react.Component); \ No newline at end of file diff --git a/lib/components/navigator/PreviewNavigator.js b/lib/components/navigator/PreviewNavigator.js index 31f1ac6..273806b 100644 --- a/lib/components/navigator/PreviewNavigator.js +++ b/lib/components/navigator/PreviewNavigator.js @@ -90,28 +90,29 @@ function PreviewNavigator() { 'JavaScript\u306B\u3088\u308B\u30D0\u30EA\u30C7\u30FC\u30C8\u3092\u4F7F\u7528\u3059\u308B' ) ), - /*#__PURE__*/ _react.default.createElement( - 'select', - { - id: 'tag', - onChange: (e) => updateTag(e.target.value), - className: 'acms-admin-form-width-quarter', - }, + editMode !== 'confirm' && /*#__PURE__*/ _react.default.createElement( - 'option', + 'select', { - value: 'section', + id: 'tag', + onChange: (e) => updateTag(e.target.value), + className: 'acms-admin-form-width-quarter', }, - '--' + /*#__PURE__*/ _react.default.createElement( + 'option', + { + value: 'section', + }, + '--' + ), + /*#__PURE__*/ _react.default.createElement( + 'option', + { + value: 'table', + }, + 'table' + ) ), - /*#__PURE__*/ _react.default.createElement( - 'option', - { - value: 'table', - }, - 'table' - ) - ), tag === 'table' && (mode === 'fieldgroup' || mode === 'unitgroup') && /*#__PURE__*/ _react.default.createElement( @@ -207,71 +208,74 @@ function PreviewNavigator() { ) ) ), - mode === 'customfield' && - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: () => clearCustomfield(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '\u5C65\u6B74\u30AF\u30EA\u30A2' - ), - mode === 'fieldgroup' && - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: () => clearGroupItem(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '\u5C65\u6B74\u30AF\u30EA\u30A2' - ), - mode === 'customunit' && - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: () => clearCustomunit(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '\u5C65\u6B74\u30AF\u30EA\u30A2' - ), - mode === 'unitgroup' && - /*#__PURE__*/ _react.default.createElement( - 'button', - { - onClick: () => clearUnitGroupItem(), - className: 'acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right', - }, - '\u5C65\u6B74\u30AF\u30EA\u30A2' - ), - editMode !== 'preview' && - /*#__PURE__*/ _react.default.createElement( - 'div', - { - style: { - display: 'inline-block', - position: 'relative', - float: 'right', - marginRight: '10px', - }, - }, + /*#__PURE__*/ _react.default.createElement( + 'div', + null, + editMode !== 'preview' && /*#__PURE__*/ _react.default.createElement( - _reactCopyToClipboard.default, + 'div', { - text: source, - onCopy: () => setCopied(true), + style: { + display: 'inline-block', + position: 'relative', + marginRight: '10px', + }, }, /*#__PURE__*/ _react.default.createElement( - 'button', + _reactCopyToClipboard.default, { - className: 'acms-admin-btn-admin', + text: source, + onCopy: () => setCopied(true), }, - '\u30B3\u30FC\u30C9\u3092\u30B3\u30D4\u30FC' - ) + /*#__PURE__*/ _react.default.createElement( + 'button', + { + className: 'acms-admin-btn-admin', + }, + '\u30B3\u30FC\u30C9\u3092\u30B3\u30D4\u30FC' + ) + ), + /*#__PURE__*/ _react.default.createElement(_Notify.Notify, { + message: '\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F', + onFinish: () => setCopied(false), + }) ), - /*#__PURE__*/ _react.default.createElement(_Notify.Notify, { - message: '\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F', - onFinish: () => setCopied(false), - }) - ) + mode === 'customfield' && + /*#__PURE__*/ _react.default.createElement( + 'button', + { + onClick: () => clearCustomfield(), + className: 'acms-admin-btn-admin acms-admin-btn-admin-danger', + }, + '\u5C65\u6B74\u30AF\u30EA\u30A2' + ), + mode === 'fieldgroup' && + /*#__PURE__*/ _react.default.createElement( + 'button', + { + onClick: () => clearGroupItem(), + className: 'acms-admin-btn-admin acms-admin-btn-admin-danger', + }, + '\u5C65\u6B74\u30AF\u30EA\u30A2' + ), + mode === 'customunit' && + /*#__PURE__*/ _react.default.createElement( + 'button', + { + onClick: () => clearCustomunit(), + className: 'acms-admin-btn-admin acms-admin-btn-admin-danger', + }, + '\u5C65\u6B74\u30AF\u30EA\u30A2' + ), + mode === 'unitgroup' && + /*#__PURE__*/ _react.default.createElement( + 'button', + { + onClick: () => clearUnitGroupItem(), + className: 'acms-admin-btn-admin acms-admin-btn-admin-danger', + }, + '\u5C65\u6B74\u30AF\u30EA\u30A2' + ) + ) ); } diff --git a/lib/components/section.disable.js b/lib/components/section.disable.js deleted file mode 100644 index 0cd8163..0000000 --- a/lib/components/section.disable.js +++ /dev/null @@ -1,927 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require('@babel/runtime/helpers/extends')); -var _react = _interopRequireWildcard(require('react')); -var _classnames = _interopRequireDefault(require('classnames')); -function _getRequireWildcardCache(e) { - if ('function' != typeof WeakMap) return null; - var r = new WeakMap(), - t = new WeakMap(); - return (_getRequireWildcardCache = function (e) { - return e ? t : r; - })(e); -} -function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) return e; - if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, - a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ('default' !== u && {}.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); - } - return (n.default = e), t && t.set(e, n), n; -} -class Section extends _react.Component { - constructor(props) { - super(props); - } - getLabel(item) { - const { jsValidator } = this.props; - return /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - item.title, - item.tooltip && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip js-acms-tooltip', - 'data-acms-tooltip': item.tooltip, - }), - jsValidator && - /*#__PURE__*/ _react.default.createElement( - 'label', - { - className: 'valid-mark', - 'data-validator': item.name, - }, - /*#__PURE__*/ _react.default.createElement('span', { - className: 'acms-admin-icon acms-admin-icon-checklist', - }) - ) - ); - } - renderLabel(item) { - return /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - item.type === 'checkbox' || item.type === 'radio' - ? /*#__PURE__*/ _react.default.createElement('legend', null, this.getLabel(item)) - : /*#__PURE__*/ _react.default.createElement('label', null, this.getLabel(item)) - ); - } - render() { - const { acmscss, customfield, preview, jsValidator, renderValidator, renderNoSearch } = this.props; - return /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - jsValidator && '', - customfield && - customfield.map((item, index) => { - if (item.type === 'text') { - const type = item.subType ? item.subType : item.type; - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss, jsValidator), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - /*#__PURE__*/ _react.default.createElement( - 'input', - (0, _extends2.default)( - { - type: type, - name: item.name, - value: '{'.concat(item.name, '}'), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss, - }), - }, - jsValidator - ? { - 'data-validator': item.name, - } - : {} - ) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'textarea') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - /*#__PURE__*/ _react.default.createElement( - 'textarea', - (0, _extends2.default)( - { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss, - }), - }, - jsValidator - ? { - 'data-validator': item.name, - } - : {} - ), - '{'.concat(item.name, '}') - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item, acmscss) - ) - ); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - /*#__PURE__*/ _react.default.createElement( - 'textarea', - (0, _extends2.default)( - { - name: item.name, - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss, - }), - }, - jsValidator - ? { - 'data-validator': item.name, - } - : {} - ), - '{'.concat(item.name, '}') - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item, acmscss) - ) - ); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: item.useExpand, - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-expand js-acms-expand', - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-acms-expand-inner', - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: 'js-expand-btn js-acms-expand-btn', - type: 'button', - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', - }) - ), - children - ) - ), - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-smartblock', - 'data-heading-start': item.startHeadingLevel, - 'data-heading-end': item.endHeadingLevel, - }, - /*#__PURE__*/ _react.default.createElement('div', { - className: 'js-smartblock-edit', - }), - /*#__PURE__*/ _react.default.createElement('input', { - className: 'js-smartblock-body', - type: 'hidden', - name: item.name, - value: '{'.concat(item.name, '@html}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'rich-editor', - }) - ) - ) - ) - ); - } else if (item.type === 'table') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-editable-table-field', - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-editable-table', - }, - preview ? null : '\n'), - preview ? null : '{'.concat(item.name, '}[raw]'), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement( - 'table', - null, - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('th', null, '\u30B5\u30F3\u30D7\u30EB'), - /*#__PURE__*/ _react.default.createElement('th', null, '\u30B5\u30F3\u30D7\u30EB') - ), - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('td', null, '\u30B5\u30F3\u30D7\u30EB'), - /*#__PURE__*/ _react.default.createElement('td', null, '\u30B5\u30F3\u30D7\u30EB') - ) - ), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - className: 'js-editable-table-dest', - value: '{'.concat(item.name, '}'), - name: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }) - ) - ) - ) - ); - } else if (item.type === 'select') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - /*#__PURE__*/ _react.default.createElement( - 'select', - { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('option', { - value: '', - }), - item.option.map((option) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'option', - { - key: option.value, - value: option.value, - 'data-tmp': '{'.concat(item.name, ':selected#').concat(option.value, '}'), - }, - option.label - ); - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'radio') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - item.option.map((option) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'div', - { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'radio', - name: item.name, - value: option.value, - 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), - id: 'input-radio-'.concat(item.name, '-').concat(option.value), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-radio-'.concat(item.name, '-').concat(option.value), - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-radio', - }), - option.label - ) - ); - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - item.option.map((option) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'div', - { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '[]'), - value: option.value, - 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), - id: 'input-checkbox-'.concat(item.name, '-').concat(option.value), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '-').concat(option.value), - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - option.label - ) - ); - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'image') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item), - /*#__PURE__*/ _react.default.createElement( - 'span', - { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize, - }), - }, - preview ? null : ''), - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize, - }), - style: item.normalSize - ? { - width: ''.concat(item.normalSize, 'px'), - } - : null, - alt: '{'.concat(item.name, '@alt}'), - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@old'), - value: '{'.concat(item.name, '@path}'), - }), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '@edit'), - value: 'delete', - id: 'input-checkbox-'.concat(item.name, '@edit'), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '@edit'), - }, - acmscss && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - '\u524A\u9664' - ) - ), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize, - }), - style: item.normalSize - ? { - width: ''.concat(item.normalSize, 'px'), - display: 'none', - } - : { - display: 'none', - }, - }) - ), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'file', - name: item.name, - size: '20', - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize, - }), - }), - /*#__PURE__*/ _react.default.createElement('br', null), - item.alt && - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - '\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - name: ''.concat(item.name, '@alt'), - value: '{'.concat(item.name, '@alt}'), - size: '40', - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'image', - }), - item.normalSize && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.normal), - value: item.normalSize, - }), - item.tiny && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.tiny), - value: item.tinySize, - }), - item.large && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.large), - value: item.largeSize, - }), - item.square && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.square), - value: item.squareSize, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: '', - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'media') { - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item), - /*#__PURE__*/ _react.default.createElement( - 'span', - { - className: 'js-media-field', - }, - !item.useDropArea && - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement( - 'div', - null, - ''), - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: item.mediaType === 'file', - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), - }, - children - ), - }, - /*#__PURE__*/ _react.default.createElement( - 'img', - (0, _extends2.default)( - { - src: '{'.concat(item.name, '@thumbnail}'), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss, - }), - alt: '', - id: ''.concat(item.name, '-preview'), - }, - item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto', - }, - } - ) - ) - ), - '', - /*#__PURE__*/ _react.default.createElement( - 'img', - (0, _extends2.default)( - { - src: '', - }, - item.mediaType === 'file' - ? { - style: { - width: '64px', - height: 'auto', - display: 'none', - }, - } - : { - style: { - display: 'none', - }, - }, - { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss, - }), - id: ''.concat(item.name, '-preview'), - } - ) - ), - '', - /*#__PURE__*/ _react.default.createElement( - 'p', - { - className: 'js-text acms-admin-text-danger', - style: { - display: 'none', - }, - }, - '\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002' - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'acms-admin-margin-top-mini', - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss, - }), - 'data-type': item.mediaType ? item.mediaType : 'all', - }, - '\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss, - }), - 'data-type': item.mediaType ? item.mediaType : 'all', - 'data-mode': 'upload', - }, - '\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss, - }), - }, - '\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss, - }), - }, - '\u524A\u9664' - ) - ) - ), - item.useDropArea && - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('div', { - className: 'js-droparea', - 'data-thumbnail': '{'.concat(item.name, '@thumbnail}'), - 'data-type': item.mediaType ? item.mediaType : 'all', - 'data-thumbnail-type': '{'.concat(item.name, '@type}'), - 'data-width': ''.concat(item.dropAreaWidth, 'px'), - 'data-height': ''.concat(item.dropAreaHeight, 'px'), - }), - /*#__PURE__*/ _react.default.createElement( - 'p', - { - className: 'js-text acms-admin-text-danger', - style: { - display: 'none', - }, - }, - '\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002' - ), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'acms-admin-margin-top-mini', - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss, - }), - 'data-type': item.mediaType ? item.mediaType : 'all', - }, - '\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E' - ) - ) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: item.name, - value: preview ? '' : '{'.concat(item.name, '}'), - className: 'js-value', - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'media', - }) - ) - ); - } else if (item.type === 'file') { - let src = '/images/fileicon/'; - let alt = 'file'; - if (item.extension) { - src += ''.concat(item.extension, '.svg'); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/ _react.default.createElement( - 'p', - { - key: index, - }, - this.renderLabel(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'span', - null, - preview ? null : ''), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@old'), - value: '{'.concat(item.name, '@path}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@secret'), - value: '{'.concat(item.name, '@secret}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@fileSize'), - value: '{'.concat(item.name, '@fileSize}'), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '@edit'), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '@edit'), - value: 'delete', - id: 'input-checkbox-'.concat(item.name, '@edit'), - }), - acmscss && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - '\u524A\u9664' - ), - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - }, - /*#__PURE__*/ _react.default.createElement('img', { - src: src, - width: '64', - height: '64', - alt: alt, - }) - ), - preview ? null : ''), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'file', - name: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@baseName'), - value: '{'.concat(item.name, '@baseName}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'file', - }), - item.extension && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@extension'), - value: item.extension, - }), - item.fileNameMethod === 'random' && - item.fileName && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: '', - }), - item.fileNameMethod === 'fix' && - item.fileName && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: ''.concat(item.fileName), - }), - item.fileNameMethod === 'asis' && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: '@rawfilename', - }), - renderValidator(item, acmscss), - renderNoSearch(item, acmscss) - ) - ); - } - }), - jsValidator && '' - ); - } -} -exports.default = Section; diff --git a/lib/components/section.js b/lib/components/section.js deleted file mode 100644 index 32ee9f8..0000000 --- a/lib/components/section.js +++ /dev/null @@ -1,509 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Section = exports.default = /*#__PURE__*/function (_Component) { - function Section(props) { - (0, _classCallCheck2.default)(this, Section); - return _callSuper(this, Section, [props]); - } - (0, _inherits2.default)(Section, _Component); - return (0, _createClass2.default)(Section, [{ - key: "getLabel", - value: function getLabel(item) { - var jsValidator = this.props.jsValidator; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - }), jsValidator && /*#__PURE__*/_react.default.createElement("label", { - className: "valid-mark", - "data-validator": item.name - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-checklist" - }))); - } - }, { - key: "renderLabel", - value: function renderLabel(item) { - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.type === 'checkbox' || item.type === 'radio' ? /*#__PURE__*/_react.default.createElement("legend", null, this.getLabel(item)) : /*#__PURE__*/_react.default.createElement("label", null, this.getLabel(item))); - } - }, { - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - acmscss = _this$props.acmscss, - customfield = _this$props.customfield, - preview = _this$props.preview, - jsValidator = _this$props.jsValidator, - renderValidator = _this$props.renderValidator, - renderNoSearch = _this$props.renderNoSearch; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, jsValidator && '', customfield && customfield.map(function (item, index) { - if (item.type === 'text') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss, jsValidator), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({ - type: "text", - name: item.name, - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {})), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'textarea') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: item.name, - value: "{".concat(item.name, "@html}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "rich-editor" - }))))); - } else if (item.type === 'table') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }))))); - } else if (item.type === 'select') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("select", { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - key: option.value, - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'radio') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: item.name, - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-checkbox-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'image') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px") - } : null, - alt: "{".concat(item.name, "@alt}") - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664")), preview ? null : '', /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px"), - display: 'none' - } : { - display: 'none' - } - })), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name, - size: "20", - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "@alt"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "image" - }), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.normal), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.tiny), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.large), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.square), - value: item.squareSize - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'media') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "", - id: "".concat(item.name, "-preview") - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - id: "".concat(item.name, "-preview") - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: item.name, - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "media" - }))); - } else if (item.type === 'file') { - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@secret"), - value: "{".concat(item.name, "@secret}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@fileSize"), - value: "{".concat(item.name, "@fileSize}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@baseName"), - value: "{".concat(item.name, "@baseName}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "file" - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@extension"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "".concat(item.fileName) - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "@rawfilename" - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } - }), jsValidator && ''); - } - }]); -}(_react.Component); \ No newline at end of file diff --git a/lib/components/section_stable.js b/lib/components/section_stable.js deleted file mode 100644 index 3609e10..0000000 --- a/lib/components/section_stable.js +++ /dev/null @@ -1,510 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Section = exports.default = /*#__PURE__*/function (_Component) { - function Section(props) { - (0, _classCallCheck2.default)(this, Section); - return _callSuper(this, Section, [props]); - } - (0, _inherits2.default)(Section, _Component); - return (0, _createClass2.default)(Section, [{ - key: "getLabel", - value: function getLabel(item) { - var jsValidator = this.props.jsValidator; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - }), jsValidator && /*#__PURE__*/_react.default.createElement("label", { - className: "valid-mark", - "data-validator": item.name - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-checklist" - }))); - } - }, { - key: "renderLabel", - value: function renderLabel(item) { - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.type === 'checkbox' || item.type === 'radio' ? /*#__PURE__*/_react.default.createElement("legend", null, this.getLabel(item)) : /*#__PURE__*/_react.default.createElement("label", null, this.getLabel(item))); - } - }, { - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - acmscss = _this$props.acmscss, - customfield = _this$props.customfield, - preview = _this$props.preview, - jsValidator = _this$props.jsValidator, - renderValidator = _this$props.renderValidator, - renderNoSearch = _this$props.renderNoSearch; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, jsValidator && '', customfield && customfield.map(function (item, index) { - if (item.type === 'text') { - var type = item.subType ? item.subType : item.type; - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss, jsValidator), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({ - type: type, - name: item.name, - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {})), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'textarea') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: item.name, - value: "{".concat(item.name, "@html}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "rich-editor" - }))))); - } else if (item.type === 'table') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }))))); - } else if (item.type === 'select') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement("select", { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - key: option.value, - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'radio') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: item.name, - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-checkbox-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'image') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px") - } : null, - alt: "{".concat(item.name, "@alt}") - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664")), preview ? null : '', /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px"), - display: 'none' - } : { - display: 'none' - } - })), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name, - size: "20", - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "@alt"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "image" - }), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.normal), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.tiny), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.large), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.square), - value: item.squareSize - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'media') { - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item), /*#__PURE__*/_react.default.createElement("span", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "", - id: "".concat(item.name, "-preview") - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - id: "".concat(item.name, "-preview") - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: item.name, - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "media" - }))); - } else if (item.type === 'file') { - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/_react.default.createElement("p", { - key: index - }, _this.renderLabel(item, acmscss), /*#__PURE__*/_react.default.createElement("span", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@secret"), - value: "{".concat(item.name, "@secret}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@fileSize"), - value: "{".concat(item.name, "@fileSize}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@baseName"), - value: "{".concat(item.name, "@baseName}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "file" - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@extension"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "".concat(item.fileName) - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "@rawfilename" - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } - }), jsValidator && ''); - } - }]); -}(_react.Component); \ No newline at end of file diff --git a/lib/components/table.disable.js b/lib/components/table.disable.js deleted file mode 100644 index e78d997..0000000 --- a/lib/components/table.disable.js +++ /dev/null @@ -1,926 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require('@babel/runtime/helpers/extends')); -var _react = _interopRequireWildcard(require('react')); -var _classnames = _interopRequireDefault(require('classnames')); -function _getRequireWildcardCache(e) { - if ('function' != typeof WeakMap) return null; - var r = new WeakMap(), - t = new WeakMap(); - return (_getRequireWildcardCache = function (e) { - return e ? t : r; - })(e); -} -function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) return e; - if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, - a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ('default' !== u && {}.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); - } - return (n.default = e), t && t.set(e, n), n; -} -class Table extends _react.Component { - constructor(props) { - super(props); - } - renderTh(item) { - const { jsValidator } = this.props; - return /*#__PURE__*/ _react.default.createElement( - 'th', - null, - item.title, - item.tooltip && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon-tooltip js-acms-tooltip', - 'data-acms-tooltip': item.tooltip, - }), - jsValidator && - /*#__PURE__*/ _react.default.createElement( - 'label', - { - className: 'valid-mark', - 'data-validator': item.name, - }, - /*#__PURE__*/ _react.default.createElement('span', { - className: 'acms-admin-icon acms-admin-icon-checklist', - }) - ) - ); - } - render() { - const { acmscss, customfield, preview, jsValidator, renderValidator, renderNoSearch } = this.props; - return /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - jsValidator && '', - /*#__PURE__*/ _react.default.createElement( - 'table', - { - className: (0, _classnames.default)({ - 'acms-admin-table-admin-edit': acmscss, - }), - ref: (table) => (this.table = table), - }, - customfield && - customfield.map((item, index) => { - if (item.type === 'text') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss, jsValidator), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - 'input', - (0, _extends2.default)( - { - type: 'text', - name: item.name, - value: '{'.concat(item.name, '}'), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss, - }), - }, - jsValidator - ? { - 'data-validator': item.name, - } - : {} - ) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'textarea') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - 'textarea', - (0, _extends2.default)( - { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss, - }), - }, - jsValidator - ? { - 'data-validator': item.name, - } - : {} - ), - '{'.concat(item.name, '}') - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item, acmscss) - ) - ); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - 'textarea', - (0, _extends2.default)( - { - name: item.name, - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss, - }), - }, - jsValidator - ? { - 'data-validator': item.name, - } - : {} - ), - '{'.concat(item.name, '}') - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item, acmscss) - ) - ); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: item.useExpand, - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-expand js-acms-expand', - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-acms-expand-inner', - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - className: 'js-expand-btn js-acms-expand-btn', - type: 'button', - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon', - }) - ), - children - ) - ), - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-smartblock', - 'data-heading-start': item.startHeadingLevel, - 'data-heading-end': item.endHeadingLevel, - }, - /*#__PURE__*/ _react.default.createElement('div', { - className: 'js-smartblock-edit', - }), - /*#__PURE__*/ _react.default.createElement('input', { - className: 'js-smartblock-body', - type: 'hidden', - name: item.name, - value: '{'.concat(item.name, '@html}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'rich-editor', - }) - ) - ) - ) - ); - } else if (item.type === 'table') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-editable-table-field', - }, - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'js-editable-table', - }, - preview ? null : '\n'), - preview ? null : '{'.concat(item.name, '}[raw]'), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement( - 'table', - null, - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('th', null, '\u30B5\u30F3\u30D7\u30EB'), - /*#__PURE__*/ _react.default.createElement('th', null, '\u30B5\u30F3\u30D7\u30EB') - ), - /*#__PURE__*/ _react.default.createElement( - 'tr', - null, - /*#__PURE__*/ _react.default.createElement('td', null, '\u30B5\u30F3\u30D7\u30EB'), - /*#__PURE__*/ _react.default.createElement('td', null, '\u30B5\u30F3\u30D7\u30EB') - ) - ), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - className: 'js-editable-table-dest', - value: '{'.concat(item.name, '}'), - name: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }) - ) - ) - ) - ); - } else if (item.type === 'select') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - /*#__PURE__*/ _react.default.createElement( - 'select', - { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('option', { - value: '', - }), - item.option.map((option) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'option', - { - key: option.value, - value: option.value, - 'data-tmp': '{'.concat(item.name, ':selected#').concat(option.value, '}'), - }, - option.label - ); - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'radio') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - item.option.map((option) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'div', - { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'radio', - name: item.name, - value: option.value, - 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), - id: 'input-radio-'.concat(item.name, '-').concat(option.value), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-radio-'.concat(item.name, '-').concat(option.value), - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-radio', - }), - option.label - ) - ); - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - item.option.map((option) => { - if (!option.label) { - return null; - } - return /*#__PURE__*/ _react.default.createElement( - 'div', - { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '[]'), - value: option.value, - 'data-tmp': '{'.concat(item.name, ':checked#').concat(option.value, '}'), - id: 'input-checkbox-'.concat(item.name, '-').concat(option.value), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '-').concat(option.value), - }, - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - option.label - ) - ); - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'image') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize, - }), - }, - preview ? null : ''), - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize, - }), - style: item.normalSize - ? { - width: ''.concat(item.normalSize, 'px'), - } - : null, - alt: '{'.concat(item.name, '@alt}'), - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@old'), - value: '{'.concat(item.name, '@path}'), - }), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '@edit'), - value: 'delete', - id: 'input-checkbox-'.concat(item.name, '@edit'), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '@edit'), - }, - acmscss && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - '\u524A\u9664' - ) - ), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('img', { - src: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize, - }), - style: item.normalSize - ? { - width: ''.concat(item.normalSize, 'px'), - display: 'none', - } - : { - display: 'none', - }, - }) - ), - preview ? null : '', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'file', - name: item.name, - size: '20', - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize, - }), - }), - /*#__PURE__*/ _react.default.createElement('br', null), - item.alt && - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - '\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:', - /*#__PURE__*/ _react.default.createElement('input', { - type: 'text', - name: ''.concat(item.name, '@alt'), - value: '{'.concat(item.name, '@alt}'), - size: '40', - }) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'image', - }), - item.normalSize && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.normal), - value: item.normalSize, - }), - item.tiny && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.tiny), - value: item.tinySize, - }), - item.large && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.large), - value: item.largeSize, - }), - item.square && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@').concat(item.square), - value: item.squareSize, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: '', - }), - renderValidator(item, acmscss), - renderNoSearch(item) - ) - ); - } else if (item.type === 'media') { - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item), - /*#__PURE__*/ _react.default.createElement( - 'td', - { - className: 'js-media-field', - }, - !item.useDropArea && - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement( - 'div', - null, - ''), - /*#__PURE__*/ _react.default.createElement( - ConditionalWrap, - { - condition: item.mediaType === 'file', - wrap: (children) => - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '%{MEDIA_ARCHIVES_DIR}{'.concat(item.name, '@path}'), - }, - children - ), - }, - /*#__PURE__*/ _react.default.createElement( - 'img', - (0, _extends2.default)( - { - src: '{'.concat(item.name, '@thumbnail}'), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss, - }), - alt: '', - id: ''.concat(item.name, '-preview'), - }, - item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto', - }, - } - ) - ) - ), - '', - /*#__PURE__*/ _react.default.createElement( - 'img', - (0, _extends2.default)( - { - src: '', - }, - item.mediaType === 'file' - ? { - style: { - width: '64px', - height: 'auto', - display: 'none', - }, - } - : { - style: { - display: 'none', - }, - }, - { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss, - }), - id: ''.concat(item.name, '-preview'), - } - ) - ), - '', - /*#__PURE__*/ _react.default.createElement( - 'p', - { - className: 'js-text acms-admin-text-danger', - style: { - display: 'none', - }, - }, - '\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002' - ) - ), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'acms-admin-margin-top-mini', - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss, - }), - 'data-type': item.mediaType ? item.mediaType : 'all', - }, - '\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss, - }), - 'data-type': item.mediaType ? item.mediaType : 'all', - 'data-mode': 'upload', - }, - '\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss, - }), - }, - '\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6' - ), - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss, - }), - }, - '\u524A\u9664' - ) - ) - ), - item.useDropArea && - /*#__PURE__*/ _react.default.createElement( - _react.Fragment, - null, - /*#__PURE__*/ _react.default.createElement('div', { - className: 'js-droparea', - 'data-thumbnail': '{'.concat(item.name, '@thumbnail}'), - 'data-type': item.mediaType ? item.mediaType : 'all', - 'data-thumbnail-type': '{'.concat(item.name, '@type}'), - 'data-width': ''.concat(item.dropAreaWidth, 'px'), - 'data-height': ''.concat(item.dropAreaHeight, 'px'), - }), - /*#__PURE__*/ _react.default.createElement( - 'p', - { - className: 'js-text acms-admin-text-danger', - style: { - display: 'none', - }, - }, - '\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002' - ), - /*#__PURE__*/ _react.default.createElement( - 'div', - { - className: 'acms-admin-margin-top-mini', - }, - /*#__PURE__*/ _react.default.createElement( - 'button', - { - type: 'button', - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss, - }), - 'data-type': item.mediaType ? item.mediaType : 'all', - }, - '\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E' - ) - ) - ), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: item.name, - value: preview ? '' : '{'.concat(item.name, '}'), - className: 'js-value', - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'media', - }) - ) - ); - } else if (item.type === 'file') { - let src = '/images/fileicon/'; - let alt = 'file'; - if (item.extension) { - src += ''.concat(item.extension, '.svg'); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/ _react.default.createElement( - 'tr', - { - key: index, - }, - this.renderTh(item, acmscss), - /*#__PURE__*/ _react.default.createElement( - 'td', - null, - preview ? null : ''), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@old'), - value: '{'.concat(item.name, '@path}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@secret'), - value: '{'.concat(item.name, '@secret}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@fileSize'), - value: '{'.concat(item.name, '@fileSize}'), - }), - /*#__PURE__*/ _react.default.createElement( - 'label', - { - htmlFor: 'input-checkbox-'.concat(item.name, '@edit'), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss, - }), - }, - /*#__PURE__*/ _react.default.createElement('input', { - type: 'checkbox', - name: ''.concat(item.name, '@edit'), - value: 'delete', - id: 'input-checkbox-'.concat(item.name, '@edit'), - }), - acmscss && - /*#__PURE__*/ _react.default.createElement('i', { - className: 'acms-admin-ico-checkbox', - }), - '\u524A\u9664' - ), - /*#__PURE__*/ _react.default.createElement( - 'a', - { - href: '%{ARCHIVES_DIR}{'.concat(item.name, '@path}'), - }, - /*#__PURE__*/ _react.default.createElement('img', { - src: src, - width: '64', - height: '64', - alt: alt, - }) - ), - preview ? null : ''), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'file', - name: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: 'field[]', - value: item.name, - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@baseName'), - value: '{'.concat(item.name, '@baseName}'), - }), - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, ':extension'), - value: 'file', - }), - item.extension && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@extension'), - value: item.extension, - }), - item.fileNameMethod === 'random' && - item.fileName && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: '', - }), - item.fileNameMethod === 'fix' && - item.fileName && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: ''.concat(item.fileName), - }), - item.fileNameMethod === 'asis' && - /*#__PURE__*/ _react.default.createElement('input', { - type: 'hidden', - name: ''.concat(item.name, '@filename'), - value: '@rawfilename', - }), - renderValidator(item, acmscss), - renderNoSearch(item, acmscss) - ) - ); - } - }) - ), - jsValidator && '' - ); - } -} -exports.default = Table; diff --git a/lib/components/table.js b/lib/components/table.js deleted file mode 100644 index 4a3e2ca..0000000 --- a/lib/components/table.js +++ /dev/null @@ -1,511 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Table = exports.default = /*#__PURE__*/function (_Component) { - function Table(props) { - (0, _classCallCheck2.default)(this, Table); - return _callSuper(this, Table, [props]); - } - (0, _inherits2.default)(Table, _Component); - return (0, _createClass2.default)(Table, [{ - key: "renderTh", - value: function renderTh(item) { - var jsValidator = this.props.jsValidator; - return /*#__PURE__*/_react.default.createElement("th", null, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - }), jsValidator && /*#__PURE__*/_react.default.createElement("label", { - className: "valid-mark", - "data-validator": item.name - }, /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-icon acms-admin-icon-checklist" - }))); - } - }, { - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - acmscss = _this$props.acmscss, - customfield = _this$props.customfield, - preview = _this$props.preview, - jsValidator = _this$props.jsValidator, - renderValidator = _this$props.renderValidator, - renderNoSearch = _this$props.renderNoSearch; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, jsValidator && '', /*#__PURE__*/_react.default.createElement("table", { - className: (0, _classnames.default)({ - 'acms-admin-table-admin-edit': acmscss - }), - ref: function ref(table) { - return _this.table = table; - } - }, customfield && customfield.map(function (item, index) { - if (item.type === 'text') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss, jsValidator), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({ - type: "text", - name: item.name, - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {})), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'textarea') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", (0, _extends2.default)({ - name: item.name, - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }, jsValidator ? { - 'data-validator': item.name - } : {}), "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: item.name, - value: "{".concat(item.name, "@html}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "rich-editor" - }))))); - } else if (item.type === 'table') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }))))); - } else if (item.type === 'select') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - name: item.name, - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - key: option.value, - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'radio') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: item.name, - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - key: option.value, - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-checkbox-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "-").concat(option.value) - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'image') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px") - } : null, - alt: "{".concat(item.name, "@alt}") - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664")), preview ? null : '', /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px"), - display: 'none' - } : { - display: 'none' - } - })), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name, - size: "20", - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "@alt"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "image" - }), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.normal), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.tiny), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.large), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@").concat(item.square), - value: item.squareSize - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), renderValidator(item, acmscss), renderNoSearch(item))); - } else if (item.type === 'media') { - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "", - id: "".concat(item.name, "-preview") - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - id: "".concat(item.name, "-preview") - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: item.name, - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "media" - }))); - } else if (item.type === 'file') { - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/_react.default.createElement("tr", { - key: index - }, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@secret"), - value: "{".concat(item.name, "@secret}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@fileSize"), - value: "{".concat(item.name, "@fileSize}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "@edit"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "@edit") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "field[]", - value: item.name - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@baseName"), - value: "{".concat(item.name, "@baseName}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":extension"), - value: "file" - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@extension"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "".concat(item.fileName) - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "@filename"), - value: "@rawfilename" - }), renderValidator(item, acmscss), renderNoSearch(item, acmscss))); - } - })), jsValidator && ''); - } - }]); -}(_react.Component); \ No newline at end of file diff --git a/lib/components/unit-group-source.js b/lib/components/unit-group-source.js deleted file mode 100644 index 9016c49..0000000 --- a/lib/components/unit-group-source.js +++ /dev/null @@ -1,842 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var ConditionalWrap = function ConditionalWrap(_ref) { - var condition = _ref.condition, - wrap = _ref.wrap, - children = _ref.children; - return condition ? wrap(children) : children; -}; -var UnitGroupSource = exports.default = /*#__PURE__*/function (_Component) { - function UnitGroupSource(props) { - (0, _classCallCheck2.default)(this, UnitGroupSource); - return _callSuper(this, UnitGroupSource, [props]); - } - (0, _inherits2.default)(UnitGroupSource, _Component); - return (0, _createClass2.default)(UnitGroupSource, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (window.ACMS && ACMS.dispatchEvent) { - ACMS.dispatchEvent('acmsCustomFieldMakerPreview', this.table, { - item: this.table - }); - } - } - }, { - key: "wrapTable", - value: function wrapTable(children, title) { - var direction = this.props.direction; - return /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: direction === 'vertical', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, title), children); - } - }, children); - } - }, { - key: "renderValidator", - value: function renderValidator(item, acmscss) { - if (!item.openValidator) { - return null; - } - var name = item.type === 'file' || item.type === 'image' ? "".concat(item.name, "@path") : item.name; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.validator.map(function (validator) { - if (!validator.option) { - return null; - } - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":v#").concat(validator.option), - value: validator.value - }), validator.message && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, ""), /*#__PURE__*/_react.default.createElement("p", { - className: (0, _classnames.default)({ - 'acms-admin-text-error': acmscss - }) - }, validator.message), ""))); - }), item.converter && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, "{id}:c"), - value: item.converter - })); - } - }, { - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - unitGroupName = _this$props.unitGroupName, - unitGroupTitle = _this$props.unitGroupTitle, - acmscss = _this$props.acmscss, - unitgroupitems = _this$props.unitgroupitems, - preview = _this$props.preview, - direction = _this$props.direction; - var groupLength = unitgroupitems.length; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, unitGroupTitle && /*#__PURE__*/_react.default.createElement("h2", { - className: (0, _classnames.default)({ - 'acms-admin-admin-title2': acmscss - }) - }, unitGroupTitle), unitGroupName && /*#__PURE__*/_react.default.createElement("table", { - ref: function ref(table) { - return _this.table = table; - }, - className: (0, _classnames.default)('js-fieldgroup-sortable', { - 'adminTable acms-admin-table-admin-edit': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("thead", { - className: (0, _classnames.default)({ - 'acms-admin-hide-sp': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: (0, _classnames.default)({ - 'acms-admin-table-left acms-admin-admin-config-table-item-handle': acmscss - }) - }, "\xA0"), direction === 'horizontal' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, unitgroupitems.map(function (item) { - return /*#__PURE__*/_react.default.createElement("th", { - className: (0, _classnames.default)({ - 'acms-admin-table-left': acmscss - }) - }, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - })); - })), direction === 'vertical' && /*#__PURE__*/_react.default.createElement("th", null), /*#__PURE__*/_react.default.createElement("th", { - className: (0, _classnames.default)({ - 'acms-admin-table-left acms-admin-admin-config-table-action': acmscss - }) - }, "\u524A\u9664"))), /*#__PURE__*/_react.default.createElement("tbody", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("tr", { - className: "sortable-item" - }, /*#__PURE__*/_react.default.createElement("td", { - className: "item-handle acms-admin-table-nowrap" - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-sort" - })), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: direction === 'vertical', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("table", null, children)); - } - }, unitgroupitems.map(function (item) { - if (item.type === 'text') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "{id}[]"), - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - })), item.title); - } else if (item.type === 'textarea') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, "{".concat(item.name, "}")), _this.renderValidator(item, acmscss)), item.title); - } else if (item.type === 'select') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - }))), item.title); - } else if (item.type === 'radio') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: "".concat(item.name, "{id}[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-{id}-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-{id}-").concat(option.value) - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), _this.renderValidator(item, acmscss)), item.title); - } else if (item.type === 'file') { - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - alt += item.extension; - } else { - src += 'file.svg'; - } - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "{id}@edit[]"), - value: "delete", - id: "input-checkbox-".concat(item.name, "{id}@edit[]") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "{id}@edit[]") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), " \u524A\u9664")), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@old[]"), - value: "{".concat(item.name, "@path}") - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename[]"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename[]"), - value: item.fileName - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename[]"), - value: "@rawfilename" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "{id}[]") - }), _this.renderValidator(item, acmscss)), item.title); - } else if (item.type === 'image') { - var style = {}; - if (item.normalSize) { - style.maxWidth = "".concat(item.normalSize, "px"); - } - var hiddenStyle = Object.assign({}, style, { - display: 'none' - }); - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'js-img_resize_preview': item.resize - }), - style: style, - alt: "{".concat(item.name, "@alt}") - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@old[]"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "{id}@edit[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "{id}@edit[]"), - value: "delete", - id: "input-checkbox-".concat(item.name, "{id}@edit[]") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), preview ? null : '', /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'js-img_resize_preview': item.resize - }), - style: hiddenStyle - }), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement("div", null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "{id}@alt[]"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), item.normal && item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.normal, "[]"), - value: item.normalSize - }), item.tiny && item.tinySize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.tiny, "[]"), - value: item.tinySize - }), item.large && item.largeSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.large, "[]"), - value: item.largeSize - }), item.square && item.squareSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.square, "[]"), - value: item.squareSize - }), _this.renderValidator(item, acmscss)), item.title); - } else if (item.type === 'media') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "{".concat(item.name, "@alt}") - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }) - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-margin-top-mini': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}[]"), - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), _this.renderValidator(item, acmscss)), item.title); - } else if (item.type === 'lite-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }, "{".concat(item.name, "}")), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'rich-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: "".concat(item.name, "{id}[]"), - value: "{".concat(item.name, "@html}") - })))), item.title); - } else if (item.type === 'table') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: "".concat(item.name, "{id}[]") - })))), item.title); - } - })), /*#__PURE__*/_react.default.createElement("td", { - className: "acms-admin-table-nowrap" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: (0, _classnames.default)('item-delete', { - 'acms-admin-btn-admin acms-admin-btn-admin-danger': acmscss - }), - value: "\u524A\u9664" - }))), preview ? null : ""), preview ? null : /*#__PURE__*/_react.default.createElement("tr", { - className: "sortable-item item-template" - }, /*#__PURE__*/_react.default.createElement("td", { - className: "item-handle acms-admin-table-nowrap" - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-sort" - })), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: direction === 'vertical', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("table", null, children)); - } - }, unitgroupitems.map(function (item) { - if (item.type === 'text') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "{id}[]"), - value: "", - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - })), item.title); - } else if (item.type === 'textarea') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - })), item.title); - } else if (item.type === 'select') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - return /*#__PURE__*/_react.default.createElement("option", { - value: option.value - }, option.label); - }))), item.title); - } else if (item.type === 'radio') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: "".concat(item.name, "{id}[]"), - value: option.value, - id: "input-radio-".concat(item.name, "-").concat(option.value) - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value) - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - })), item.title); - } else if (item.type === 'file') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "{id}[]") - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@extension[]"), - value: "{extension}" - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename[]"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename[]"), - value: item.fileName - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename[]"), - value: "@rawfilename" - })), item.title); - } else if (item.type === 'image') { - var style = {}; - if (item.normalSize) { - style.maxWidth = "".concat(item.normalSize, "px"); - } - var hiddenStyle = Object.assign({}, style, { - display: 'none' - }); - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, /*#__PURE__*/_react.default.createElement("img", { - src: "", - style: hiddenStyle, - className: "js-img_resize_preview" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "{id}[]"), - style: style - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement("div", null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "{id}@alt[]"), - value: "", - size: "40" - })), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.normal, "[]"), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.tiny, "[]"), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.large, "[]"), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.square, "[]"), - value: item.squareSize - })), item.title); - } else if (item.type === 'media') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: "acms-admin-img-responsive js-preview" - }))), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-type": item.mediaType ? item.mediaType : 'all', - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}[]"), - value: "", - className: "js-value" - })), item.title); - } else if (item.type === 'lite-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "{id}[]"), - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }), _this.renderValidator(item, acmscss, false)), item.title); - } else if (item.type === 'rich-editor') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: "".concat(item.name, "{id}[]"), - value: "" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "rich-editor" - })))), item.title); - } else if (item.type === 'table') { - return _this.wrapTable( /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, "\n"), "{".concat(item.name, "}[raw]"), '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "", - name: "".concat(item.name, "{id}[]") - })))), item.title); - } - })), /*#__PURE__*/_react.default.createElement("td", { - className: "acms-admin-table-nowrap" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: (0, _classnames.default)('item-delete', { - 'acms-admin-btn-admin acms-admin-btn-admin-danger': acmscss - }), - value: "\u524A\u9664" - })))), /*#__PURE__*/_react.default.createElement("tfoot", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", { - colSpan: groupLength + 2 - }, /*#__PURE__*/_react.default.createElement("input", { - type: "button", - className: (0, _classnames.default)('item-insert', { - 'acms-admin-btn-admin': acmscss - }), - value: "\u8FFD\u52A0" - }))))), unitGroupName && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, unitgroupitems.map(function (item) { - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.type === 'image' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.square && item.squareSize && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@squarePath") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@squareAlt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@squareX") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@squareY") - })), item.large && item.largeSize && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@largePath") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@largeAlt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@largeX") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@largeY") - })), item.tiny && item.tinySize && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@tinyPath") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "@tinyAlt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "@tinyX") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "@tinyY") - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@path") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@alt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@x") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@y") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@edit") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@old") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "image" - })), item.type === 'file' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@path") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@alt") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@edit") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}@old") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "file" - })), item.type === 'media' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "media" - })), item.type === 'rich-editor' && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "rich-editor" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "@".concat(unitGroupName, "{id}[]"), - value: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), item.noSearch && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:search"), - value: "0" - }), _this.renderValidator(item, acmscss)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "@".concat(unitGroupName, "{id}") - }))); - } - }]); -}(_react.Component); -UnitGroupSource.defaultProps = { - preview: false -}; \ No newline at end of file diff --git a/lib/components/unit-group.js b/lib/components/unit-group.js deleted file mode 100644 index 5b3cf01..0000000 --- a/lib/components/unit-group.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireDefault(require("react")); -var _reactTooltip = _interopRequireDefault(require("react-tooltip")); -var _base = _interopRequireDefault(require("./base")); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var UnitGroup = exports.default = /*#__PURE__*/function (_Base) { - function UnitGroup(props) { - var _this$state; - var _this; - (0, _classCallCheck2.default)(this, UnitGroup); - _this = _callSuper(this, UnitGroup, [props]); - _this.state = (_this$state = { - type: 'text', - title: '', - name: '', - tooltip: '', - alert: '', - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - resize: 'true', - option: [{ - value: '', - label: '' - }], - validator: [{ - option: '', - value: '', - message: '' - }], - optionFormat: 'pref', - unitGroupTitle: '', - unitGroupName: '', - openValidator: false, - openConverter: false, - groupAlert: false, - openGroup: false, - alt: false - }, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_this$state, "resize", true), "fileNameMethod", 'random'), "useDropArea", true), "useExpand", true), "dropAreaWidth", 200), "dropAreaHeight", 200), "useFocusImage", true), "focusImageWidth", 400), "focusImageHeight", 400), "startHeadingLevel", 2), (0, _defineProperty2.default)((0, _defineProperty2.default)(_this$state, "endHeadingLevel", 3), "mediaType", 'image')); - return _this; - } - (0, _inherits2.default)(UnitGroup, _Base); - return (0, _createClass2.default)(UnitGroup, [{ - key: "showGroup", - value: function showGroup() { - var actions = this.props.actions; - var _this$state2 = this.state, - unitGroupName = _this$state2.unitGroupName, - unitGroupTitle = _this$state2.unitGroupTitle; - if (!unitGroupName) { - this.setState({ - groupAlert: true - }); - } else { - this.setState({ - groupAlert: false, - duplicatedField: false, - openGroup: true - }); - actions.setUnitGroupTitleName({ - unitGroupTitle: unitGroupTitle, - unitGroupName: unitGroupName - }); - } - } - }, { - key: "addNewGroup", - value: function addNewGroup() { - var actions = this.props.actions; - actions.clearUnitGroupItem(); - this.clearValue(); - this.setState({ - openGroup: false, - unitGroupTitle: '', - unitGroupName: '' - }); - } - }, { - key: "addGroup", - value: function addGroup() { - var actions = this.props.actions; - var _this$state3 = this.state, - type = _this$state3.type, - title = _this$state3.title, - name = _this$state3.name, - unitGroupName = _this$state3.unitGroupName, - unitGroupTitle = _this$state3.unitGroupTitle; - if (name == unitGroupName) { - this.setState({ - duplicatedField: true - }); - return; - } - if (type && title && name) { - actions.setUnitGroupTitleName({ - unitGroupName: unitGroupName, - unitGroupTitle: unitGroupTitle - }); - actions.addUnitGroupItem(this.state); - } else { - this.setState({ - alert: true - }); - } - } - }, { - key: "render", - value: function render() { - var _this2 = this; - var _this$state4 = this.state, - openGroup = _this$state4.openGroup, - unitGroupTitle = _this$state4.unitGroupTitle, - unitGroupName = _this$state4.unitGroupName, - type = _this$state4.type; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", { - className: "acms-admin-admin-title2" - }, "\u30AB\u30B9\u30BF\u30E0\u30E6\u30CB\u30C3\u30C8\uFF08\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\uFF09"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFunction" - }, this.renderGroupAlert(), this.renderDuplicateAlert(), this.renderAlert(), openGroup ? /*#__PURE__*/_react.default.createElement("div", { - style: { - paddingBottom: '15px' - } - }, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - onClick: this.addNewGroup.bind(this) - }, "\u65B0\u898F\u30B0\u30EB\u30FC\u30D7\u4F5C\u6210")) : /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808")), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")), /*#__PURE__*/_react.default.createElement("span", { - className: "acms-admin-label acms-admin-label-danger" - }, "\u5FC5\u9808"))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: unitGroupTitle, - onInput: function onInput(e) { - _this2.updateState('unitGroupTitle', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09\u30B9\u30BF\u30C3\u30D5\u30EA\u30B9\u30C8" - })), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - value: unitGroupName, - onInput: function onInput(e) { - _this2.updateState('unitGroupName', e.target.value); - }, - className: "acms-admin-form-width-full", - placeholder: "\u4F8B\uFF09group_staff" - }))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", { - colSpan: "2" - }, openGroup ? /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary acms-admin-btn-disabled customFieldGroupBtn", - disabled: true - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210") : /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn acms-admin-btn-primary customFieldGroupBtn", - onClick: this.showGroup.bind(this) - }, "\u30B0\u30EB\u30FC\u30D7\u751F\u6210")))), openGroup && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), /*#__PURE__*/_react.default.createElement("table", { - className: "adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup" - }, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left" - }, "\u30B0\u30EB\u30FC\u30D7\u306E\u30BF\u30A4\u30C8\u30EB", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-title-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-title-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30C6\u30FC\u30D6\u30EB\u7528\u306E\u30BF\u30A4\u30C8\u30EB\u3068\u306A\u308A\u307E\u3059\u3002"))), /*#__PURE__*/_react.default.createElement("th", { - className: "acms-admin-table-left", - colSpan: "2" - }, "\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\uFF08\u5909\u6570\uFF09", /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip", - "data-tip": true, - "data-for": "unit-group-field-tip" - }), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "unit-group-field-tip", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u3067\u3059\u3002\u5024\u3092\u5FC5\u305A\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002")))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, unitGroupTitle), /*#__PURE__*/_react.default.createElement("td", null, unitGroupName))), this.renderModal(), this.renderBasic(), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), type === 'select' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'radio' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'image' && /*#__PURE__*/_react.default.createElement("div", null, this.renderImage(), this.renderImageResize()), type === 'file' && /*#__PURE__*/_react.default.createElement("div", null, this.renderFile()), type === 'media' && /*#__PURE__*/_react.default.createElement("div", null, this.renderMediaOption()), type === 'rich-editor' && /*#__PURE__*/_react.default.createElement("div", null, this.renderRichEditorOption()), this.renderValidator(false), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearValue.bind(this), - className: "acms-admin-btn-admin", - style: { - marginRight: '5px' - } - }, "\u30AF\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.addGroup.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn", - style: { - marginRight: '5px' - } - }, "\u751F\u6210"), /*#__PURE__*/_react.default.createElement("button", { - onClick: this.backState.bind(this), - className: "acms-admin-btn-admin" - }, "\u5143\u306B\u623B\u3059"))))); - } - }]); -}(_base.default); \ No newline at end of file diff --git a/lib/components/unit-source.js b/lib/components/unit-source.js deleted file mode 100644 index 683c82e..0000000 --- a/lib/components/unit-source.js +++ /dev/null @@ -1,528 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var ConditionalWrap = function ConditionalWrap(_ref) { - var condition = _ref.condition, - wrap = _ref.wrap, - children = _ref.children; - return condition ? wrap(children) : children; -}; -var UnitSource = exports.default = /*#__PURE__*/function (_Component) { - function UnitSource(props) { - (0, _classCallCheck2.default)(this, UnitSource); - return _callSuper(this, UnitSource, [props]); - } - (0, _inherits2.default)(UnitSource, _Component); - return (0, _createClass2.default)(UnitSource, [{ - key: "componentDidMount", - value: function componentDidMount() { - if (window.ACMS && ACMS.dispatchEvent) { - ACMS.dispatchEvent('acmsCustomFieldMakerPreview', this.table, { - item: this.table - }); - } - } - }, { - key: "renderValidator", - value: function renderValidator(item, acmscss) { - if (!item.openValidator) { - return null; - } - var name = item.type === 'file' || item.type === 'image' ? "".concat(item.name, "@path") : item.name; - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, item.validator.map(function (validator) { - if (!validator.option) { - return null; - } - return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, ":v#").concat(validator.option), - value: validator.value - }), validator.message && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, ""), /*#__PURE__*/_react.default.createElement("p", { - className: (0, _classnames.default)({ - 'acms-admin-text-error': acmscss - }) - }, validator.message), ""))); - }), item.converter && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(name, "{id}:c"), - value: item.converter - })); - } - }, { - key: "renderNoSearch", - value: function renderNoSearch(item) { - if (!item.noSearch) { - return null; - } - return /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, ":search"), - value: "0" - }); - } - }, { - key: "renderTh", - value: function renderTh(item) { - return /*#__PURE__*/_react.default.createElement("th", null, item.title, item.tooltip && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon-tooltip js-acms-tooltip", - "data-acms-tooltip": item.tooltip - })); - } - }, { - key: "render", - value: function render() { - var _this = this; - var _this$props = this.props, - acmscss = _this$props.acmscss, - customunit = _this$props.customunit, - preview = _this$props.preview; - return /*#__PURE__*/_react.default.createElement("table", { - className: (0, _classnames.default)({ - 'acms-admin-table-admin-edit': acmscss - }), - ref: function ref(table) { - return _this.table = table; - } - }, customunit.map(function (item) { - if (item.type === 'text') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "{id}"), - value: "{".concat(item.name, "}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), _this.renderValidator(item, acmscss), _this.renderNoSearch(item))); - } else if (item.type === 'textarea') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "{id}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), _this.renderValidator(item, acmscss))); - } else if (item.type === 'select') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("select", { - name: "".concat(item.name, "{id}"), - className: (0, _classnames.default)({ - 'acms-admin-form-width-full': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("option", { - value: "" - }), item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("option", { - value: option.value, - "data-tmp": "{".concat(item.name, ":selected#").concat(option.value, "}") - }, option.label); - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), _this.renderValidator(item, acmscss))); - } else if (item.type === 'radio') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-radio': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - name: "".concat(item.name, "{id}"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-radio-".concat(item.name, "-").concat(option.value, "-{id}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-".concat(item.name, "-").concat(option.value, "-{id}") - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), _this.renderValidator(item, acmscss))); - } else if (item.type === 'checkbox') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", null, item.option.map(function (option) { - if (!option.label) { - return null; - } - return /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "{id}[]"), - value: option.value, - "data-tmp": "{".concat(item.name, ":checked#").concat(option.value, "}"), - id: "input-checkbox-".concat(item.name, "-").concat(option.value, "-{id}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "-").concat(option.value, "-{id}") - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), option.label)); - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), _this.renderValidator(item, acmscss))); - } else if (item.type === 'image') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", { - className: (0, _classnames.default)({ - 'js-img_resize_cf': item.resize - }) - }, preview ? null : ""), /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px") - } : null, - alt: "{".concat(item.name, "@alt}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("div", { - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "{id}@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "{id}@edit") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "{id}@edit") - }, acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664")), preview ? null : '', /*#__PURE__*/_react.default.createElement("img", { - src: "%{ARCHIVES_DIR}{".concat(item.name, "@path}"), - className: (0, _classnames.default)({ - 'acms-admin-img-responsive': acmscss, - 'js-img_resize_preview': item.resize - }), - style: item.normalSize ? { - width: "".concat(item.normalSize, "px"), - display: 'none' - } : { - display: 'none' - } - }), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "{id}"), - size: "20", - className: (0, _classnames.default)({ - 'js-img_resize_input': item.resize - }) - }), /*#__PURE__*/_react.default.createElement("br", null), item.alt && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8:", /*#__PURE__*/_react.default.createElement("input", { - type: "text", - name: "".concat(item.name, "{id}@alt"), - value: "{".concat(item.name, "@alt}"), - size: "40" - })), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "image" - }), item.normalSize && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.normal), - value: item.normalSize - }), item.tiny && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.tiny), - value: item.tinySize - }), item.large && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.large), - value: item.largeSize - }), item.square && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@").concat(item.square), - value: item.squareSize - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename"), - value: "" - }), _this.renderValidator(item, acmscss))); - } else if (item.type === 'file') { - var src = '/images/fileicon/'; - var alt = 'file'; - if (item.extension) { - src += "".concat(item.extension, ".svg"); - if (item.extension === 'svg') { - src = "%{ARCHIVES_DIR}{".concat(item.name, "@path}"); - } - alt += item.extension; - } else { - src += 'file.svg'; - } - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, preview ? null : ""), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@old"), - value: "{".concat(item.name, "@path}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@secret"), - value: "{".concat(item.name, "@secret}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@fileSize"), - value: "{".concat(item.name, "@fileSize}") - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-checkbox-".concat(item.name, "{id}@edit"), - className: (0, _classnames.default)({ - 'acms-admin-form-checkbox': acmscss - }) - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - name: "".concat(item.name, "{id}@edit"), - value: "delete", - id: "input-checkbox-".concat(item.name, "{id}@edit") - }), acmscss && /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "\u524A\u9664"), /*#__PURE__*/_react.default.createElement("a", { - href: "%{ARCHIVES_DIR}{".concat(item.name, "@path}") - }, /*#__PURE__*/_react.default.createElement("img", { - src: src, - width: "64", - height: "64", - alt: alt - })), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "file", - name: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@baseName"), - value: "{".concat(item.name, "@baseName}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "file" - }), item.extension && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@extension"), - value: item.extension - }), item.fileNameMethod === 'random' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename"), - value: "" - }), item.fileNameMethod === 'fix' && item.fileName && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename"), - value: item.fileName - }), item.fileNameMethod === 'asis' && /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}@filename"), - value: "@rawfilename" - }), _this.renderValidator(item, acmscss))); - } else if (item.type === 'lite-editor') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("textarea", { - name: "".concat(item.name, "{id}"), - className: (0, _classnames.default)('js-lite-editor-field', { - 'acms-admin-form-width-full': acmscss - }) - }, "{".concat(item.name, "}")), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), _this.renderValidator(item, acmscss), _this.renderNoSearch(item, acmscss))); - } else if (item.type === 'rich-editor') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.useExpand, - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("div", { - className: "js-expand js-acms-expand" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-acms-expand-inner" - }, /*#__PURE__*/_react.default.createElement("button", { - className: "js-expand-btn js-acms-expand-btn", - type: "button" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-icon acms-admin-icon-expand-arrow js-expand-icon" - })), children)); - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock", - "data-heading-start": item.startHeadingLevel, - "data-heading-end": item.endHeadingLevel - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-smartblock-edit" - }), /*#__PURE__*/_react.default.createElement("input", { - className: "js-smartblock-body", - type: "hidden", - name: "".concat(item.name, "{id}"), - value: "{".concat(item.name, "@html}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "rich-editor" - }))))); - } else if (item.type === 'table') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item, acmscss), /*#__PURE__*/_react.default.createElement("td", null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table-field" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "js-editable-table" - }, preview ? null : "\n"), preview ? null : "{".concat(item.name, "}[raw]"), preview ? null : '', /*#__PURE__*/_react.default.createElement("table", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("th", null, "\u30B5\u30F3\u30D7\u30EB")), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"), /*#__PURE__*/_react.default.createElement("td", null, "\u30B5\u30F3\u30D7\u30EB"))), preview ? null : '', /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - className: "js-editable-table-dest", - value: "{".concat(item.name, "}"), - name: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }))))); - } else if (item.type === 'media') { - return /*#__PURE__*/_react.default.createElement("tr", null, _this.renderTh(item), /*#__PURE__*/_react.default.createElement("td", { - className: "js-media-field" - }, !item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, ""), /*#__PURE__*/_react.default.createElement(ConditionalWrap, { - condition: item.mediaType === 'file', - wrap: function wrap(children) { - return /*#__PURE__*/_react.default.createElement("a", { - href: "%{MEDIA_ARCHIVES_DIR}{".concat(item.name, "@path}") - }, children); - } - }, /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "{".concat(item.name, "@thumbnail}"), - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }), - alt: "{".concat(item.name, "@alt}") - }, item.mediaType === 'file' && { - style: { - width: '64px', - height: 'auto' - } - }))), '', /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({ - src: "" - }, item.mediaType === 'file' ? { - style: { - width: '64px', - height: 'auto', - display: 'none' - } - } : { - style: { - display: 'none' - } - }, { - className: (0, _classnames.default)('js-preview', { - 'acms-admin-img-responsive': acmscss - }) - })), '', /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-mode": "upload" - }, "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-edit', { - 'acms-admin-btn': acmscss - }) - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u7DE8\u96C6"), /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-remove', { - 'acms-admin-btn acms-admin-btn-danger': acmscss - }) - }, "\u524A\u9664"))), item.useDropArea && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", { - className: "js-droparea", - "data-thumbnail": "{".concat(item.name, "@thumbnail}"), - "data-type": item.mediaType ? item.mediaType : 'all', - "data-thumbnail-type": "{".concat(item.name, "@type}"), - "data-width": "".concat(item.dropAreaWidth, "px"), - "data-height": "".concat(item.dropAreaHeight, "px") - }), /*#__PURE__*/_react.default.createElement("p", { - className: "js-text acms-admin-text-danger", - style: { - display: 'none' - } - }, "\u8A31\u53EF\u3055\u308C\u3066\u3044\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u306E\u305F\u3081\u633F\u5165\u3067\u304D\u307E\u305B\u3093\u3002"), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-margin-top-mini" - }, /*#__PURE__*/_react.default.createElement("button", { - type: "button", - className: (0, _classnames.default)('js-insert', { - 'acms-admin-btn': acmscss - }), - "data-type": item.mediaType ? item.mediaType : 'all' - }, "\u30E1\u30C7\u30A3\u30A2\u3092\u9078\u629E"))), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}"), - value: preview ? '' : "{".concat(item.name, "}"), - className: "js-value" - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "unit{id}[]", - value: "".concat(item.name, "{id}") - }), /*#__PURE__*/_react.default.createElement("input", { - type: "hidden", - name: "".concat(item.name, "{id}:extension"), - value: "media" - }), _this.renderValidator(item, acmscss))); - } - })); - } - }]); -}(_react.Component); -UnitSource.defaultProps = { - preview: false -}; \ No newline at end of file diff --git a/lib/components/unit.js b/lib/components/unit.js deleted file mode 100644 index 73512fa..0000000 --- a/lib/components/unit.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _react = _interopRequireDefault(require("react")); -var _base = _interopRequireDefault(require("./base")); -var _MakerContext = require("../store/MakerContext"); -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var Unit = exports.default = /*#__PURE__*/function (_Base) { - function Unit(props) { - var _this$state; - var _this; - (0, _classCallCheck2.default)(this, Unit); - _this = _callSuper(this, Unit, [props]); - _this.state = (_this$state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: '', - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - resize: 'true', - option: [{ - value: '', - label: '' - }], - validator: [{ - option: '', - value: '', - message: '' - }], - optionFormat: 'pref', - openValidator: false, - openConverter: false, - alt: false - }, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_this$state, "resize", true), "useExpand", true), "fileNameMethod", 'random'), "useDropArea", true), "dropAreaWidth", 200), "dropAreaHeight", 200), "useFocusImage", false), "focusImageWidth", 400), "focusImageHeight", 400), "startHeadingLevel", 2), (0, _defineProperty2.default)((0, _defineProperty2.default)(_this$state, "endHeadingLevel", 3), "mediaType", 'image')); - return _this; - } - (0, _inherits2.default)(Unit, _Base); - return (0, _createClass2.default)(Unit, [{ - key: "submit", - value: function submit() { - var _this$state2 = this.state, - name = _this$state2.name, - type = _this$state2.type, - title = _this$state2.title; - var _this$context = this.context, - maker = _this$context.maker, - addCustomunit = _this$context.addCustomunit; - if (name && type && title) { - addCustomunit(this.state); - } else { - this.setState({ - alert: true - }); - } - } - }, { - key: "typeSelectRender", - value: function typeSelectRender() { - var _this2 = this; - var type = this.state.type; - return /*#__PURE__*/_react.default.createElement("select", { - id: "type", - value: type, - className: "acms-admin-form-width-full", - onChange: function onChange(e) { - _this2.updateState('type', e.target.value); - } - }, /*#__PURE__*/_react.default.createElement("option", { - value: "text" - }, "\u30C6\u30AD\u30B9\u30C8"), /*#__PURE__*/_react.default.createElement("option", { - value: "textarea" - }, "\u30C6\u30AD\u30B9\u30C8\u30A8\u30EA\u30A2"), /*#__PURE__*/_react.default.createElement("option", { - value: "lite-editor" - }, "\u30A4\u30F3\u30E9\u30A4\u30F3\u30A8\u30C7\u30A3\u30BF\u30FC"), /*#__PURE__*/_react.default.createElement("option", { - value: "rich-editor" - }, "\u30EA\u30C3\u30C1\u30A8\u30C7\u30A3\u30BF\u30FC"), /*#__PURE__*/_react.default.createElement("option", { - value: "table" - }, "\u30C6\u30FC\u30D6\u30EB"), /*#__PURE__*/_react.default.createElement("option", { - value: "select" - }, "\u30BB\u30EC\u30AF\u30C8\u30DC\u30C3\u30AF\u30B9"), /*#__PURE__*/_react.default.createElement("option", { - value: "radio" - }, "\u30E9\u30B8\u30AA\u30DC\u30BF\u30F3"), /*#__PURE__*/_react.default.createElement("option", { - value: "checkbox" - }, "\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9"), /*#__PURE__*/_react.default.createElement("option", { - value: "media" - }, "\u30E1\u30C7\u30A3\u30A2"), /*#__PURE__*/_react.default.createElement("option", { - value: "image" - }, "\u753B\u50CF"), /*#__PURE__*/_react.default.createElement("option", { - value: "file" - }, "\u30D5\u30A1\u30A4\u30EB")); - } - }, { - key: "render", - value: function render() { - var type = this.state.type; - return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h2", { - className: "acms-admin-admin-title2" - }, "\u30AB\u30B9\u30BF\u30E0\u30E6\u30CB\u30C3\u30C8"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldFunction" - }, this.renderModal(), this.renderAlert(), this.renderBasic(), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldLine" - }), type === 'select' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'radio' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'checkbox' && /*#__PURE__*/_react.default.createElement("div", null, this.renderSnippet(), this.renderOption()), type === 'image' && /*#__PURE__*/_react.default.createElement("div", null, this.renderImage(), this.renderImageResize()), type === 'file' && /*#__PURE__*/_react.default.createElement("div", null, this.renderFile()), type === 'media' && /*#__PURE__*/_react.default.createElement("div", null, this.renderMediaOption()), type === 'rich-editor' && /*#__PURE__*/_react.default.createElement("div", null, this.renderRichEditorOption()), this.renderValidator(false), this.renderMake())); - } - }]); -}(_base.default); -(0, _defineProperty2.default)(Unit, "contextType", _MakerContext.MakerContext); \ No newline at end of file diff --git a/lib/constants/action-types.js b/lib/constants/action-types.js deleted file mode 100644 index 5f420bd..0000000 --- a/lib/constants/action-types.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TOGGLEJSVALIDATOR = exports.TOGGLEACMSCSS = exports.SETUNITGROUPTITLENAME = exports.SETTAG = exports.SETSTATE = exports.SETGROUPTITLENAME = exports.RESTORE = exports.CLEARUNITGROUPTITLENAME = exports.CLEARUNITGROUPITEM = exports.CLEARGROUPITEM = exports.CLEARCUSTOMUNIT = exports.CLEARCUSTOMFIELD = exports.CHANGEDIRECTION = exports.ADDUNITGROUPITEM = exports.ADDSNIPPET = exports.ADDGROUPITEM = exports.ADDCUSTOMUNIT = exports.ADDCUSTOMFIELD = void 0; -var ADDCUSTOMFIELD = exports.ADDCUSTOMFIELD = 'ADDCUSTOMFIELD'; -var ADDGROUPITEM = exports.ADDGROUPITEM = 'ADDGROUPITEM'; -var SETGROUPTITLENAME = exports.SETGROUPTITLENAME = 'SETGROUPTITLENAME'; -var SETUNITGROUPTITLENAME = exports.SETUNITGROUPTITLENAME = 'SETUNITGROUPTITLENAME'; -var ADDCUSTOMUNIT = exports.ADDCUSTOMUNIT = 'ADDCUSTOMUNIT'; -var ADDUNITGROUPITEM = exports.ADDUNITGROUPITEM = 'ADDUNITGROUPITEM'; -var CLEARCUSTOMFIELD = exports.CLEARCUSTOMFIELD = 'CLEARCUSTOMFIELD'; -var CLEARGROUPITEM = exports.CLEARGROUPITEM = 'CLEARGROUPITEM'; -var CLEARCUSTOMUNIT = exports.CLEARCUSTOMUNIT = 'CLEARCUSTOMUNIT'; -var CLEARUNITGROUPITEM = exports.CLEARUNITGROUPITEM = 'CLEARUNITGROUPITEM'; -var CLEARUNITGROUPTITLENAME = exports.CLEARUNITGROUPTITLENAME = 'CLEARUNITGROUPTITLENAME'; -var SETTAG = exports.SETTAG = 'SETTAG'; -var TOGGLEACMSCSS = exports.TOGGLEACMSCSS = 'TOGGLEACMSCSS'; -var TOGGLEJSVALIDATOR = exports.TOGGLEJSVALIDATOR = 'TOGGLEJSVALIDATOR'; -var RESTORE = exports.RESTORE = 'RESTORE'; -var ADDSNIPPET = exports.ADDSNIPPET = 'ADDSNIPPET'; -var SETSTATE = exports.SETSTATE = 'SETSTATE'; -var CHANGEDIRECTION = exports.CHANGEDIRECTION = 'CHANGEDIRECTION'; \ No newline at end of file diff --git a/lib/constants/index.js b/lib/constants/index.js deleted file mode 100644 index e5367a2..0000000 --- a/lib/constants/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.STORAGENAME = void 0; -var STORAGENAME = exports.STORAGENAME = 'custom_field_maker'; \ No newline at end of file diff --git a/lib/containers/_index.js b/lib/containers/_index.js deleted file mode 100644 index e2851b4..0000000 --- a/lib/containers/_index.js +++ /dev/null @@ -1,445 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); -var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); -var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); -var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); -var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); -var _react = _interopRequireWildcard(require("react")); -var _classnames = _interopRequireDefault(require("classnames")); -var _reactRedux = require("react-redux"); -var _redux = require("redux"); -var _reactCopyToClipboard = _interopRequireDefault(require("react-copy-to-clipboard")); -var _reactTooltip = _interopRequireDefault(require("react-tooltip")); -var _highlighter = _interopRequireDefault(require("../components/highlighter")); -var _field = _interopRequireDefault(require("../components/field")); -var _fieldGroup = _interopRequireDefault(require("../components/field-group")); -var _fieldSource = _interopRequireDefault(require("../components/field-source")); -var _fieldConfirmSource = _interopRequireDefault(require("../components/field-confirm-source")); -var _fieldGroupSource = _interopRequireDefault(require("../components/field-group-source")); -var _fieldGroupConfirmSource = _interopRequireDefault(require("../components/field-group-confirm-source")); -var _unit = _interopRequireDefault(require("../components/unit")); -var _unitSource = _interopRequireDefault(require("../components/unit-source")); -var _unitConfirmSource = _interopRequireDefault(require("../components/unit-confirm-source")); -var _unitGroup = _interopRequireDefault(require("../components/unit-group")); -var _unitGroupSource = _interopRequireDefault(require("../components/unit-group-source")); -var _unitGroupConfirmSource = _interopRequireDefault(require("../components/unit-group-confirm-source")); -var _notify = _interopRequireDefault(require("../components/notify")); -var _constants = require("../constants"); -var actions = _interopRequireWildcard(require("../actions")); -var _add_column = _interopRequireDefault(require("../assets/images/add_column.svg")); -var _add_row = _interopRequireDefault(require("../assets/images/add_row.svg")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } -var CustomfieldMaker = /*#__PURE__*/function (_Component) { - function CustomfieldMaker(props) { - var _this; - (0, _classCallCheck2.default)(this, CustomfieldMaker); - _this = _callSuper(this, CustomfieldMaker, [props]); - _this.state = { - mode: 'normal', - editMode: 'source', - tag: 'section', - acmscss: false, - source: '', - copied: false - }; - return _this; - } - (0, _inherits2.default)(CustomfieldMaker, _Component); - return (0, _createClass2.default)(CustomfieldMaker, [{ - key: "componentDidMount", - value: function componentDidMount() { - var actions = this.props.actions; - var storage = JSON.parse(localStorage.getItem(_constants.STORAGENAME)); - if (storage) { - actions.restore(storage); - } - } - - // renderSelectGroup() { - // return ( - // - // ); - // } - }, { - key: "updateState", - value: function updateState(prop, value) { - this.setState((0, _defineProperty2.default)({}, prop, value)); - } - }, { - key: "setSource", - value: function setSource(source) { - this.setState({ - source: source - }); - } - }, { - key: "clearCustomfield", - value: function clearCustomfield() { - var actions = this.props.actions; - if (confirm('履歴を削除してもよろしいですか?')) { - actions.clearCustomfield(); - } - } - }, { - key: "clearGroupItem", - value: function clearGroupItem() { - var actions = this.props.actions; - if (confirm('履歴を削除してもよろしいですか?')) { - actions.clearGroupItem(); - } - } - }, { - key: "clearCustomUnit", - value: function clearCustomUnit() { - var actions = this.props.actions; - if (confirm('履歴を削除してもよろしいですか?')) { - actions.clearCustomUnit(); - } - } - }, { - key: "clearUnitGroupItem", - value: function clearUnitGroupItem() { - var actions = this.props.actions; - if (confirm('履歴を削除してもよろしいですか?')) { - actions.clearUnitGroupItem(); - } - } - }, { - key: "render", - value: function render() { - var _this2 = this; - var _this$state = this.state, - mode = _this$state.mode, - editMode = _this$state.editMode, - source = _this$state.source, - copied = _this$state.copied, - tag = _this$state.tag; - var _this$props = this.props, - actions = _this$props.actions, - customfield = _this$props.customfield, - groupitems = _this$props.groupitems, - customunit = _this$props.customunit, - unitgroupitems = _this$props.unitgroupitems, - groupTitle = _this$props.groupTitle, - unitGroupTitle = _this$props.unitGroupTitle, - unitGroupName = _this$props.unitGroupName, - groupName = _this$props.groupName, - acmscss = _this$props.acmscss, - jsValidator = _this$props.jsValidator, - direction = _this$props.direction; - return /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - value: "normal", - id: "input-radio-mode-normal", - checked: mode === 'normal', - onChange: this.updateState.bind(this, 'mode', 'normal') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-mode-normal" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - value: "group", - id: "input-radio-mode-group", - checked: mode === 'group', - onChange: this.updateState.bind(this, 'mode', 'group') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-mode-group" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30AB\u30B9\u30BF\u30E0\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - value: "unit", - id: "input-radio-mode-unit", - checked: mode === 'unit', - onChange: this.updateState.bind(this, 'mode', 'unit') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-mode-unit" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30AB\u30B9\u30BF\u30E0\u30E6\u30CB\u30C3\u30C8")), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-radio" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - value: "unit-group", - id: "input-radio-mode-unit-group", - checked: mode === 'unit-group', - onChange: this.updateState.bind(this, 'mode', 'unit-group') - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "input-radio-mode-unit-group" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-radio" - }), "\u30AB\u30B9\u30BF\u30E0\u30E6\u30CB\u30C3\u30C8\uFF08\u30D5\u30A3\u30FC\u30EB\u30C9\u30B0\u30EB\u30FC\u30D7\uFF09")), mode === 'normal' && /*#__PURE__*/_react.default.createElement(_field.default, { - actions: actions - }), mode === 'group' && /*#__PURE__*/_react.default.createElement(_fieldGroup.default, { - actions: actions - }), mode === 'unit' && /*#__PURE__*/_react.default.createElement(_unit.default, { - actions: actions - }), mode === 'unit-group' && /*#__PURE__*/_react.default.createElement(_unitGroup.default, { - actions: actions - }), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-tabs" - }, /*#__PURE__*/_react.default.createElement("ul", { - className: "customFieldTabs" - }, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", { - href: "#source", - className: (0, _classnames.default)({ - customFieldTabActive: editMode === 'source' - }), - onClick: this.updateState.bind(this, 'editMode', 'source') - }, "\u5165\u529B\u7528\u30BD\u30FC\u30B9")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", { - href: "#preview", - className: (0, _classnames.default)({ - customFieldTabActive: editMode === 'preview' - }), - onClick: this.updateState.bind(this, 'editMode', 'preview') - }, "\u30D7\u30EC\u30D3\u30E5\u30FC")), /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement("a", { - href: "#confirm", - className: (0, _classnames.default)({ - customFieldTabActive: editMode === 'confirm' - }), - onClick: this.updateState.bind(this, 'editMode', 'confirm') - }, "\u51FA\u529B\u7528\u30BD\u30FC\u30B9"))), /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-tabs-panel" - }, /*#__PURE__*/_react.default.createElement("div", { - style: { - backgroundColor: '#F1F1F1', - padding: '20px 15px' - } - }, /*#__PURE__*/_react.default.createElement("div", { - className: "clearfix" - }, /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-checkbox", - style: { - marginTop: '5px' - } - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: actions.toggleAcmsCss, - checked: acmscss, - id: "acmscss-checkbox" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "acmscss-checkbox" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "acms-admin.css\u3092\u4F7F\u7528\u3059\u308B")), (mode === 'normal' || mode === 'group') && /*#__PURE__*/_react.default.createElement("div", { - className: "acms-admin-form-checkbox", - style: { - marginTop: '5px' - } - }, /*#__PURE__*/_react.default.createElement("input", { - type: "checkbox", - onChange: actions.toggleJsValidator, - checked: jsValidator, - id: "jsvalidator-checkbox" - }), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "jsvalidator-checkbox" - }, /*#__PURE__*/_react.default.createElement("i", { - className: "acms-admin-ico-checkbox" - }), "JavaScript\u306B\u3088\u308B\u30D0\u30EA\u30C7\u30FC\u30C8\u3092\u4F7F\u7528\u3059\u308B")), mode === 'normal' && /*#__PURE__*/_react.default.createElement("select", { - id: "tag", - onChange: function onChange(e) { - return _this2.updateState('tag', e.target.value); - }, - className: "acms-admin-form-width-quarter" - }, /*#__PURE__*/_react.default.createElement("option", { - value: "section" - }, "--"), /*#__PURE__*/_react.default.createElement("option", { - value: "table" - }, "table")), mode === 'normal' && /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearCustomfield.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right" - }, "\u5C65\u6B74\u30AF\u30EA\u30A2"), mode === 'group' && /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearGroupItem.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right" - }, "\u5C65\u6B74\u30AF\u30EA\u30A2"), mode === 'unit' && /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearCustomUnit.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right" - }, "\u5C65\u6B74\u30AF\u30EA\u30A2"), mode === 'unit-group' && /*#__PURE__*/_react.default.createElement("button", { - onClick: this.clearUnitGroupItem.bind(this), - className: "acms-admin-btn-admin acms-admin-btn-admin-danger acms-admin-float-right" - }, "\u5C65\u6B74\u30AF\u30EA\u30A2"), editMode !== 'preview' && /*#__PURE__*/_react.default.createElement("div", { - style: { - display: 'inline-block', - position: 'relative', - float: 'right', - marginRight: '10px' - } - }, /*#__PURE__*/_react.default.createElement(_reactCopyToClipboard.default, { - text: source, - onCopy: function onCopy() { - return _this2.setState({ - copied: true - }); - } - }, /*#__PURE__*/_react.default.createElement("button", { - className: "acms-admin-btn-admin" - }, "\u30B3\u30FC\u30C9\u3092\u30B3\u30D4\u30FC")), /*#__PURE__*/_react.default.createElement(_notify.default, { - message: "\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F", - show: copied, - onFinish: function onFinish() { - _this2.setState({ - copied: false - }); - } - })), (mode === 'group' || mode === 'unit-group') && /*#__PURE__*/_react.default.createElement("div", { - style: { - marginTop: '5px' - } - }, /*#__PURE__*/_react.default.createElement("span", { - className: "customFieldDirectionBtnGroupSide" - }, "\u30BD\u30FC\u30B9\u306E\u8FFD\u52A0\u65B9\u6CD5"), /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldDirectionBtnGroup" - }, /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "direction-horizontal", - className: (0, _classnames.default)('customFieldDirectionBtn', { - active: direction === 'horizontal' - }), - "data-tip": true, - "data-for": "group-field-direction-horizontal" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - id: "direction-horizontal", - onChange: function onChange() { - actions.changeDirection('horizontal'); - }, - checked: direction === 'horizontal' - }), /*#__PURE__*/_react.default.createElement("img", { - src: _add_column.default - })), /*#__PURE__*/_react.default.createElement("label", { - htmlFor: "direction-vertical", - className: (0, _classnames.default)('customFieldDirectionBtn', { - active: direction === 'vertical' - }), - "data-tip": true, - "data-for": "group-field-direction-vertical" - }, /*#__PURE__*/_react.default.createElement("input", { - type: "radio", - id: "direction-vertical", - onChange: function onChange() { - actions.changeDirection('vertical'); - }, - checked: direction === 'vertical' - }), /*#__PURE__*/_react.default.createElement("img", { - src: _add_row.default - }))), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-field-direction-vertical", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u7E26\u5411\u304D\u30EC\u30A4\u30A2\u30A6\u30C8\u7528\u306B\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u751F\u6210\u3057\u307E\u3059\u3002")), /*#__PURE__*/_react.default.createElement(_reactTooltip.default, { - id: "group-field-direction-horizontal", - place: "top", - type: "dark", - effect: "solid", - className: "acms-admin-tooltip acms-tooltip customFieldTooltip" - }, /*#__PURE__*/_react.default.createElement("span", null, "\u6A2A\u5411\u304D\u30EC\u30A4\u30A2\u30A6\u30C8\u7528\u306B\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u751F\u6210\u3057\u307E\u3059\u3002")))), editMode === 'source' && /*#__PURE__*/_react.default.createElement(_highlighter.default, { - onSourceGenerated: this.setSource.bind(this) - }, mode === 'normal' && /*#__PURE__*/_react.default.createElement(_fieldSource.default, { - customfield: customfield, - acmscss: acmscss, - jsValidator: jsValidator, - tag: tag - }, /*#__PURE__*/_react.default.createElement(_fieldSource.default.Section, null)), mode === 'group' && /*#__PURE__*/_react.default.createElement(_fieldGroupSource.default, { - groupitems: groupitems, - acmscss: acmscss, - jsValidator: jsValidator, - groupTitle: groupTitle, - groupName: groupName, - direction: direction - }), mode === 'unit' && /*#__PURE__*/_react.default.createElement(_unitSource.default, { - customunit: customunit, - acmscss: acmscss - }), mode === 'unit-group' && /*#__PURE__*/_react.default.createElement(_unitGroupSource.default, { - unitgroupitems: unitgroupitems, - acmscss: acmscss, - jsValidator: jsValidator, - unitGroupTitle: unitGroupTitle, - unitGroupName: unitGroupName, - direction: direction - })), editMode === 'preview' && /*#__PURE__*/_react.default.createElement("div", { - className: "customFieldPreview" - }, mode === 'normal' && /*#__PURE__*/_react.default.createElement(_fieldSource.default, { - customfield: customfield, - acmscss: acmscss, - tag: tag, - preview: true - }, /*#__PURE__*/_react.default.createElement(_fieldSource.default.Section, null), /*#__PURE__*/_react.default.createElement(_fieldSource.default.Table, null)), mode === 'group' && /*#__PURE__*/_react.default.createElement(_fieldGroupSource.default, { - groupitems: groupitems, - acmscss: acmscss, - groupTitle: groupTitle, - groupName: groupName, - preview: true, - direction: direction - }), mode === 'unit' && /*#__PURE__*/_react.default.createElement(_unitSource.default, { - customunit: customunit, - acmscss: acmscss, - preview: true - }), mode === 'unit-group' && /*#__PURE__*/_react.default.createElement(_unitGroupSource.default, { - unitgroupitems: unitgroupitems, - acmscss: acmscss, - unitGroupTitle: unitGroupTitle, - unitGroupName: unitGroupName, - preview: true, - direction: direction - })), editMode === 'confirm' && /*#__PURE__*/_react.default.createElement(_highlighter.default, { - onSourceGenerated: this.setSource.bind(this) - }, mode === 'normal' && /*#__PURE__*/_react.default.createElement(_fieldConfirmSource.default, { - customfield: customfield, - acmscss: acmscss - }), mode === 'group' && /*#__PURE__*/_react.default.createElement(_fieldGroupConfirmSource.default, { - groupitems: groupitems, - acmscss: acmscss, - groupTitle: groupTitle, - groupName: groupName, - direction: direction - }), mode === 'unit' && /*#__PURE__*/_react.default.createElement(_unitConfirmSource.default, { - customunit: customunit, - acmscss: acmscss - }), mode === 'unit-group' && /*#__PURE__*/_react.default.createElement(_unitGroupConfirmSource.default, { - unitgroupitems: unitgroupitems, - acmscss: acmscss, - unitGroupTitle: unitGroupTitle, - unitGroupName: unitGroupName, - direction: direction - })))))); - } - }]); -}(_react.Component); -function mapStateToProps(state) { - return state; -} -function mapDispatchToProps(dispatch) { - return { - actions: (0, _redux.bindActionCreators)(actions, dispatch) - }; -} -var _default = exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(CustomfieldMaker); \ No newline at end of file diff --git a/lib/containers/index.js b/lib/containers/index.js index 4dc25ec..c6a6a86 100644 --- a/lib/containers/index.js +++ b/lib/containers/index.js @@ -1,10 +1,11 @@ 'use strict'; +var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); Object.defineProperty(exports, '__esModule', { value: true, }); exports.default = void 0; -var _react = _interopRequireWildcard(require('react')); +var _react = _interopRequireDefault(require('react')); var _MakerContext = require('../store/MakerContext'); var _EditorModeNavigator = require('../components/navigator/EditorModeNavigator'); var _PreviewModeNavigator = require('../components/navigator/PreviewModeNavigator'); @@ -18,30 +19,11 @@ var _FieldGroupSource = require('../components/FieldGroupSource'); var _UnitSource = require('../components/UnitSource'); var _UnitGroupSource = require('../components/UnitGroupSource'); var _FieldConfirmSource = require('../components/FieldConfirmSource'); +var _FieldGroupConfirmSource = require('../components/FieldGroupConfirmSource'); +var _UnitConfirmSource = require('../components/UnitConfirmSource'); +var _UnitGroupConfirmSource = require('../components/UnitGroupConfirmSource'); var _Highlighter = require('../components/Highlighter'); var _htmlEntities = require('html-entities'); -function _getRequireWildcardCache(e) { - if ('function' != typeof WeakMap) return null; - var r = new WeakMap(), - t = new WeakMap(); - return (_getRequireWildcardCache = function (e) { - return e ? t : r; - })(e); -} -function _interopRequireWildcard(e, r) { - if (!r && e && e.__esModule) return e; - if (null === e || ('object' != typeof e && 'function' != typeof e)) return { default: e }; - var t = _getRequireWildcardCache(r); - if (t && t.has(e)) return t.get(e); - var n = { __proto__: null }, - a = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var u in e) - if ('default' !== u && {}.hasOwnProperty.call(e, u)) { - var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; - i && (i.get || i.set) ? Object.defineProperty(n, u, i) : (n[u] = e[u]); - } - return (n.default = e), t && t.set(e, n), n; -} const entities = new _htmlEntities.XmlEntities(); function CustomFieldMaker() { const { setSource, state, preview, clipboard } = (0, _MakerContext.useMakerContext)(); @@ -51,10 +33,6 @@ function CustomFieldMaker() { setSource(decodedHtml); } }; - (0, _react.useEffect)(() => { - console.log(state.customunit); - console.log(preview.mode); - }, [state.customunit, preview.mode]); return /*#__PURE__*/ _react.default.createElement( 'div', { @@ -139,8 +117,14 @@ function CustomFieldMaker() { preview: preview, clipboard: clipboard, }, - (preview.mode === 'customfield' || preview.mode === 'customunit') && - /*#__PURE__*/ _react.default.createElement(_FieldConfirmSource.FieldConfirmSource, null) + preview.mode === 'customfield' && + /*#__PURE__*/ _react.default.createElement(_FieldConfirmSource.FieldConfirmSource, null), + preview.mode === 'fieldgroup' && + /*#__PURE__*/ _react.default.createElement(_FieldGroupConfirmSource.FieldGroupConfirmSource, null), + preview.mode === 'customunit' && + /*#__PURE__*/ _react.default.createElement(_UnitConfirmSource.UnitConfirmSource, null), + preview.mode === 'unitgroup' && + /*#__PURE__*/ _react.default.createElement(_UnitGroupConfirmSource.UnitGroupConfirmSource, null) ) ) ) diff --git a/lib/hooks/useHtml.js b/lib/hooks/useHtml.js deleted file mode 100644 index 68f079d..0000000 --- a/lib/hooks/useHtml.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.useHtml = useHtml; -function useHtml() {} \ No newline at end of file diff --git a/lib/lib/history.js b/lib/lib/history.js deleted file mode 100644 index 1960d7e..0000000 --- a/lib/lib/history.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _stateManager = _interopRequireDefault(require("./state-manager")); -var _default = exports.default = new _stateManager.default(); \ No newline at end of file diff --git a/lib/lib/state-manager.js b/lib/lib/state-manager.js deleted file mode 100644 index 06c3335..0000000 --- a/lib/lib/state-manager.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault'); -Object.defineProperty(exports, '__esModule', { - value: true, -}); -exports.default = void 0; -var _clone = _interopRequireDefault(require('clone')); -class StateManager { - constructor() { - this.stackPosition = 0; - this.stack = []; - } - pushState(state) { - this.stack = this.stack.slice(0, this.stackPosition + 1); - this.stack.push((0, _clone.default)(state)); - this.stackPosition++; - } - redo() { - if (!this.canRedo()) { - return; - } - this.stackPosition++; - return (0, _clone.default)(this.stack[this.stackPosition]); - } - canRedo() { - if (this.stackPosition < this.stack.length - 1) { - return true; - } - return false; - } - undo() { - if (!this.canUndo()) { - return; - } - this.stackPosition--; - return (0, _clone.default)(this.stack[this.stackPosition - 1]); - } - canUndo() { - if (this.stackPosition > 0) { - return true; - } - return false; - } -} -exports.default = StateManager; diff --git a/lib/reducers/index.js b/lib/reducers/index.js deleted file mode 100644 index e364dfb..0000000 --- a/lib/reducers/index.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; -var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); -var types = _interopRequireWildcard(require("../constants/action-types")); -var _history = _interopRequireDefault(require("../lib/history")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -var initialState = { - customfield: [], - groupitems: [], - customunit: [], - unitgroupitems: [], - snippets: [], - groupTitle: null, - groupName: null, - unitGroupTitle: null, - unitGroupName: null, - tag: 'section', - acmscss: true, - jsValidator: false, - direction: 'horizontal' -}; -var preserveState = function preserveState(state) { - _history.default.pushState(state); - return state; -}; -var _default = exports.default = function _default() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState; - var action = arguments.length > 1 ? arguments[1] : undefined; - switch (action.type) { - case types.SETSTATE: - return action.state; - case types.ADDCUSTOMFIELD: - return preserveState(Object.assign({}, state, { - customfield: [].concat((0, _toConsumableArray2.default)(state.customfield), [action.item]) - })); - case types.ADDGROUPITEM: - return preserveState(Object.assign({}, state, { - groupitems: [].concat((0, _toConsumableArray2.default)(state.groupitems), [action.item]) - })); - case types.SETGROUPTITLENAME: - return preserveState(Object.assign({}, state, { - groupTitle: action.groupTitle, - groupName: action.groupName - })); - case types.SETUNITGROUPTITLENAME: - return preserveState(Object.assign({}, state, { - unitGroupTitle: action.unitGroupTitle, - unitGroupName: action.unitGroupName - })); - case types.ADDCUSTOMUNIT: - return preserveState(Object.assign({}, state, { - customunit: [].concat((0, _toConsumableArray2.default)(state.customunit), [action.item]) - })); - case types.ADDUNITGROUPITEM: - return preserveState(Object.assign({}, state, { - unitgroupitems: [].concat((0, _toConsumableArray2.default)(state.unitgroupitems), [action.item]) - })); - case types.CLEARCUSTOMFIELD: - return preserveState(Object.assign({}, state, { - customfield: [] - })); - case types.CLEARGROUPITEM: - return preserveState(Object.assign({}, state, { - groupitems: [], - groupTitle: null, - groupName: null - })); - case types.CLEARCUSTOMUNIT: - return preserveState(Object.assign({}, state, { - customunit: [] - })); - case types.CLEARUNITGROUPITEM: - return preserveState(Object.assign({}, state, { - unitgroupitems: [], - unitGroupTitle: null, - unitGroupName: null - })); - case types.CLEARUNITGROUPTITLENAME: - return preserveState(Object.assign({}, state, { - unitGroupTitle: null, - unitGroupName: null - })); - case types.RESTORE: - return preserveState(Object.assign({}, state, action.storage)); - case types.SETTAG: - return preserveState(Object.assign({}, state, { - tag: state.tag - })); - case types.TOGGLEACMSCSS: - return preserveState(Object.assign({}, state, { - acmscss: !state.acmscss - })); - case types.TOGGLEJSVALIDATOR: - return preserveState(Object.assign({}, state, { - jsValidator: !state.jsValidator - })); - case types.ADDSNIPPET: - return preserveState(Object.assign({}, state, { - snippets: [].concat((0, _toConsumableArray2.default)(state.snippets), [{ - name: action.name, - value: action.value - }]) - })); - case types.CHANGEDIRECTION: - return preserveState(Object.assign({}, state, { - direction: action.direction - })); - default: - return state; - } -}; \ No newline at end of file diff --git a/lib/store/EditorContext.js b/lib/store/EditorContext.js deleted file mode 100644 index e5a8069..0000000 --- a/lib/store/EditorContext.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); -var _typeof = require("@babel/runtime/helpers/typeof"); -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.EditorContext = void 0; -exports.EditorContextProvider = EditorContextProvider; -exports.useEditorContext = void 0; -var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); -var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); -var _react = _interopRequireWildcard(require("react")); -function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } -function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -var initialState = { - mode: 'normal', - editMode: 'source', - source: '', - copied: false -}; -var EditorContext = exports.EditorContext = /*#__PURE__*/(0, _react.createContext)({}); -function EditorContextProvider(_ref) { - var children = _ref.children; - var _useState = (0, _react.useState)(initialState), - _useState2 = (0, _slicedToArray2.default)(_useState, 2), - editor = _useState2[0], - setEditor = _useState2[1]; - var setEditorState = function setEditorState(newEditorState) { - return setEditor(_objectSpread({}, newEditorState)); - }; - var setSource = function setSource(source) { - return setEditor(function (prevState) { - return _objectSpread(_objectSpread({}, prevState), {}, { - source: source - }); - }); - }; - var setMode = function setMode(mode) { - return setEditor(function (prevState) { - return _objectSpread(_objectSpread({}, prevState), {}, { - mode: mode - }); - }); - }; - var setEditMode = function setEditMode(editMode) { - return setEditor(function (prevState) { - return _objectSpread(_objectSpread({}, prevState), {}, { - editMode: editMode - }); - }); - }; - return /*#__PURE__*/_react.default.createElement(EditorContext.Provider, { - value: { - editor: editor, - setEditorState: setEditorState, - setSource: setSource, - setMode: setMode, - setEditMode: setEditMode - } - }, children); -} -var useEditorContext = exports.useEditorContext = function useEditorContext() { - return (0, _react.useContext)(EditorContext); -}; \ No newline at end of file diff --git a/package.json b/package.json index 1536b70..04d14e4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "@reduxjs/toolkit": "^2.2.5", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "axios": "^0.18.1", "classnames": "^2.2.5", "clone": "^2.1.1", "highlight.js": "~9.13.1", diff --git a/src/components/FieldConfirmSource.jsx b/src/components/FieldConfirmSource.jsx index 260f5a6..9354147 100644 --- a/src/components/FieldConfirmSource.jsx +++ b/src/components/FieldConfirmSource.jsx @@ -1,18 +1,6 @@ import React from 'react'; import { TableLayoutConfirm } from './cofirmLayouts/TableLayoutConfirm'; -import { useMakerContext } from '../store/MakerContext'; export function FieldConfirmSource() { - const { - state: { - preview: { tag }, - }, - } = useMakerContext(); - - return ( - <> - {tag === 'section' ? : null} - {tag === 'table' ? : null} - - ); + return ; } diff --git a/src/components/FieldGroupConfirmSource.jsx b/src/components/FieldGroupConfirmSource.jsx new file mode 100644 index 0000000..949e4f0 --- /dev/null +++ b/src/components/FieldGroupConfirmSource.jsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { GroupTableLayoutConfirm } from './cofirmLayouts/GroupTableLayoutConfirm'; + +export function FieldGroupConfirmSource() { + return ; +} diff --git a/src/components/UnitConfirmSource.jsx b/src/components/UnitConfirmSource.jsx new file mode 100644 index 0000000..548d293 --- /dev/null +++ b/src/components/UnitConfirmSource.jsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { UnitTableLayoutConfirm } from './cofirmLayouts/UnitTableLayoutConfirm'; + +export function UnitConfirmSource() { + return ; +} diff --git a/src/components/UnitGroupConfirmSource.jsx b/src/components/UnitGroupConfirmSource.jsx new file mode 100644 index 0000000..c35d86b --- /dev/null +++ b/src/components/UnitGroupConfirmSource.jsx @@ -0,0 +1,6 @@ +import React from 'react'; +import { UnitGroupTableLayoutConfirm } from './cofirmLayouts/UnitGroupTableLayoutConfirm'; + +export function UnitGroupConfirmSource() { + return ; +} diff --git a/src/components/UnitSource.tsx b/src/components/UnitSource.jsx similarity index 100% rename from src/components/UnitSource.tsx rename to src/components/UnitSource.jsx diff --git a/src/components/cofirmLayouts/GroupTableLayoutConfirm.jsx b/src/components/cofirmLayouts/GroupTableLayoutConfirm.jsx new file mode 100644 index 0000000..71f05d3 --- /dev/null +++ b/src/components/cofirmLayouts/GroupTableLayoutConfirm.jsx @@ -0,0 +1,199 @@ +import React, { Fragment } from 'react'; +import classnames from 'classnames'; +import { useMakerContext } from '../../store/MakerContext'; +import { WrapTable } from '../html/WrapTable'; + +export function GroupTableLayoutConfirm() { + const { + state: { fieldgroup }, + preview: { acmscss, direction }, + } = useMakerContext(); + + const ConditionalWrap = ({ condition, wrap, children }) => (condition ? wrap(children) : children); + + return ( + <> + {fieldgroup.title &&

{fieldgroup.title}

} + + {direction === 'horizontal' && ( + <> + {fieldgroup && ( + + + {fieldgroup.items.map((item, index) => ( + + ))} + + + )} + + )} + + {``} + + ( + + )} + > + {fieldgroup.items.map((item, index) => { + if (item.type === 'text') { + return ( + + + + ); + } else if (item.type === 'textarea') { + return ( + + + + ); + } else if (item.type === 'select') { + return ( + + + + ); + } else if (item.type === 'radio') { + return ( + + + + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += `${item.extension}.svg`; + alt += item.extension; + } else { + src += 'file.svg'; + } + return ( + + + + ); + } else if (item.type === 'image') { + return ( + + + + ); + } else if (item.type === 'media') { + return ( + + + + ); + } else if (item.type === 'lite-editor') { + return ( + + + + ); + } else if (item.type === 'rich-editor') { + return ( + + + + ); + } else if (item.type === 'table') { + return ( + + + + ); + } + return null; + })} + + + {``} + +
+ {item.title} +
+ {children}
+
{`{${item.name}}`}{`{${item.name}}[escape|nl2br]`} + {item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return ( +
+ {``} + {option.label} + {''} +
+ ); + })} +
+ {item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return ( +
+ {``} + {option.label} + {''} +
+ ); + })} +
+ {``} + + {alt} + + {``} + + {``} + {`{${item.name}@alt}`} + {``} + + {``} + + {`{${item.name}@alt}`} + + {``} + {``} + {``} + + {``} + {item.useFocusImage && ( +
+ {`{${item.name}@alt}`} +
+ )} + {!item.useFocusImage && ( + {`{${item.name}@alt}`} + )} + {``} +
+ {``} + + {``} +

{`{${item.name}@text}`}

+ {''} + {''} +
{`{${item.name}}[raw]`}{`{${item.name}@html}[raw]`}{`{${item.name}}[raw]`}
+ + ); +} diff --git a/src/components/cofirmLayouts/TableLayoutConfirm.tsx b/src/components/cofirmLayouts/TableLayoutConfirm.jsx similarity index 100% rename from src/components/cofirmLayouts/TableLayoutConfirm.tsx rename to src/components/cofirmLayouts/TableLayoutConfirm.jsx diff --git a/src/components/cofirmLayouts/UnitGroupTableLayoutConfirm.jsx b/src/components/cofirmLayouts/UnitGroupTableLayoutConfirm.jsx new file mode 100644 index 0000000..9317388 --- /dev/null +++ b/src/components/cofirmLayouts/UnitGroupTableLayoutConfirm.jsx @@ -0,0 +1,199 @@ +import React from 'react'; +import classnames from 'classnames'; +import { useMakerContext } from '../../store/MakerContext'; +import { WrapTable } from '../html/WrapTable'; + +export function UnitGroupTableLayoutConfirm() { + const { + state: { unitgroup }, + preview: { acmscss, direction }, + } = useMakerContext(); + + const ConditionalWrap = ({ condition, wrap, children }) => (condition ? wrap(children) : children); + + return ( + <> + {unitgroup.title &&

{unitgroup.title}

} + + {direction === 'horizontal' && ( + <> + {unitgroup && ( + + + {unitgroup.items.map((item, index) => ( + + ))} + + + )} + + )} + + {``} + + ( + + )} + > + {unitgroup.items.map((item, index) => { + if (item.type === 'text') { + return ( + + + + ); + } else if (item.type === 'textarea') { + return ( + + + + ); + } else if (item.type === 'select') { + return ( + + + + ); + } else if (item.type === 'radio') { + return ( + + + + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += `${item.extension}.svg`; + alt += item.extension; + } else { + src += 'file.svg'; + } + return ( + + + + ); + } else if (item.type === 'image') { + return ( + + + + ); + } else if (item.type === 'media') { + return ( + + + + ); + } else if (item.type === 'lite-editor') { + return ( + + + + ); + } else if (item.type === 'rich-editor') { + return ( + + + + ); + } else if (item.type === 'table') { + return ( + + + + ); + } + return null; + })} + + + {``} + +
+ {item.title} +
+ {children}
+
{`{${item.name}}`}{`{${item.name}}[escape|nl2br]`} + {item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return ( +
+ {``} + {option.label} + {''} +
+ ); + })} +
+ {item.option.map((option, optionIndex) => { + if (!option.label) { + return null; + } + return ( +
+ {``} + {option.label} + {''} +
+ ); + })} +
+ {``} + + {alt} + + {``} + + {``} + {`{${item.name}@alt}`} + {``} + + {``} + + {`{${item.name}@alt}`} + + {``} + {``} + {``} + + {``} + {item.useFocusImage && ( +
+ {`{${item.name}@alt}`} +
+ )} + {!item.useFocusImage && ( + {`{${item.name}@alt}`} + )} + {``} +
+ {``} + + {``} +

{`{${item.name}@text}`}

+ {''} + {''} +
{`{${item.name}}[raw]`}{`{${item.name}@html}[raw]`}{`{${item.name}}[raw]`}
+ + ); +} diff --git a/src/components/cofirmLayouts/UnitTableLayoutConfirm.jsx b/src/components/cofirmLayouts/UnitTableLayoutConfirm.jsx new file mode 100644 index 0000000..e4dcc0f --- /dev/null +++ b/src/components/cofirmLayouts/UnitTableLayoutConfirm.jsx @@ -0,0 +1,181 @@ +import React from 'react'; +import classnames from 'classnames'; +import { useMakerContext } from '../../store/MakerContext'; + +export function UnitTableLayoutConfirm() { + const { + state: { customunit }, + preview: { acmscss }, + } = useMakerContext(); + + return ( + + {customunit.map((item, index) => { + if (!item.name) { + return null; + } + if (item.type === 'text') { + return ( + + + + + ); + } else if (item.type === 'textarea') { + return ( + + + + + ); + } else if (item.type === 'select') { + return ( + + + + + ); + } else if (item.type === 'radio') { + return ( + + + + + ); + } else if (item.type === 'checkbox') { + return ( + + + + + ); + } else if (item.type === 'file') { + let src = '/images/fileicon/'; + let alt = 'file'; + if (item.extension) { + src += `${item.extension}.svg`; + alt += item.extension; + } else { + src += 'file.svg'; + } + + return ( + + + + + ); + } else if (item.type === 'image') { + return ( + + + + + ); + } else if (item.type === 'media') { + return ( + + + + + ); + } else if (item.type === 'rich-editor') { + return ( + + + + + ); + } else if (item.type === 'lite-editor') { + return ( + + + + + ); + } else if (item.type === 'table') { + return ( + + + + + ); + } + })} +
{item.title}{`{${item.name}}`}
{item.title}{`{${item.name}}[escape|nl2br]`}
{item.title} + {item.option.map((option) => ( +
+ {``} + {option.value} + {''} +
+ ))} +
{item.title} + {item.option.map( + (option) => ` + ${option.label} + ` + )} +
{item.title} + {``} + {`,`} + {item.option.map( + (option) => ` + ${option.label} + ` + )} + {``} +
{item.title} + {``} + + {alt} + + {``} +
{item.title} + {`{${item.name}@alt}`} +
{item.title} + {``} + + {`{${item.name}@alt}`} + + {``} + {``} + {``} + + {``} + {item.useFocusImage && ( +
+ {`{${item.name}@alt}`} +
+ )} + {!item.useFocusImage && ( + {`{${item.name}@alt}`} + )} + {``} +
+ {``} + + {``} +

{`{${item.name}@text}`}

+ {''} + {''} +
{item.title}{`{${item.name}@html}[raw]`}
{item.title}{`{${item.name}}[raw]`}
{item.title}{`{${item.name}}[raw]`}
+ ); +} diff --git a/src/components/field-group-confirm-source.js b/src/components/field-group-confirm-source.js deleted file mode 100644 index 795b536..0000000 --- a/src/components/field-group-confirm-source.js +++ /dev/null @@ -1,177 +0,0 @@ -import React, { Component, Fragment } from 'react'; -import classnames from 'classnames'; - -const ConditionalWrap = ({ condition, wrap, children }) => (condition ? wrap(children) : children); - -export default class FieldGroupConfirmSource extends Component { - wrapTable(children, title) { - const { direction } = this.props; - return ( - ( - - {title} - {children} - - )} - > - {children} - - ); - } - - render() { - const { groupTitle, groupName, groupitems, acmscss, direction } = this.props; - return ( - - {groupTitle &&

{groupTitle}

} - - {direction === 'horizontal' && ( - - - {groupitems.map((item) => ( - - ))} - - - )} - - {``} - - ( - - )} - > - {groupitems.map((item) => { - if (item.type === 'text') { - return this.wrapTable(, item.title); - } else if (item.type === 'textarea') { - return this.wrapTable(, item.title); - } else if (item.type === 'select') { - return this.wrapTable( - , - item.title - ); - } else if (item.type === 'radio') { - return this.wrapTable( - , - item.title - ); - } else if (item.type === 'file') { - let src = '/images/fileicon/'; - let alt = 'file'; - if (item.extension) { - src += `${item.extension}.svg`; - alt += item.extension; - } else { - src += 'file.svg'; - } - - return this.wrapTable( - , - item.title - ); - } else if (item.type === 'image') { - return this.wrapTable( - , - item.title - ); - } else if (item.type === 'media') { - return this.wrapTable( - , - item.title - ); - } else if (item.type === 'lite-editor') { - return this.wrapTable(, item.name); - } else if (item.type === 'rich-editor') { - return this.wrapTable(, item.name); - } else if (item.type === 'table') { - return this.wrapTable(, item.name); - } - })} - - - {``} - -
{item.title}
- {children}
-
{`{${item.name}}`}{`{${item.name}}[escape|nl2br]`} - {item.option.map((option) => { - if (!option.label) { - return null; - } - return ( -
- {``} - {option.label} - {''} -
- ); - })} -
- {item.option.map((option) => { - if (!option.label) { - return null; - } - return ` - ${option.label} - `; - })} - - {``} - - {alt} - - {``} - - {``} - {`{${item.name}@alt}`} - {``} - - {``} - - {`{${item.name}@alt}`} - - {``} - {``} - {``} - - {``} - {item.useFocusImage && ( -
- {`{${item.name}@alt}`} -
- )} - {!item.useFocusImage && ( - {`{${item.name}@alt}`} - )} - {``} -
- {``} - - {``} -

{`{${item.name}@text}`}

- {''} - {''} -
{`{${item.name}}[raw]`}{`{${item.name}@html}[raw]`}{`{${item.name}}[raw]`}
-
- ); - } -} diff --git a/src/components/genelator/base/OptionItem.jsx b/src/components/genelator/base/OptionItem.jsx index 4ba36ca..8ae3d83 100644 --- a/src/components/genelator/base/OptionItem.jsx +++ b/src/components/genelator/base/OptionItem.jsx @@ -47,56 +47,57 @@ export function OptionItem(props) {
- {option.map((item, idx) => ( - - - - {add && ( + {option && + option.map((item, idx) => ( + - )} - - ))} + + {add && ( + + )} + + ))}
-
- 項目名(label) - { - const value = e.target.value; - if (!value) return; - updateOptionLabel(idx, value); - }} - className="acms-admin-form-width-full" - placeholder="例)東京都" - /> -
-
-
- 値(value) - { - const value = e.target.value; - if (!value) return; - updateOptionValue(idx, value); - }} - className="acms-admin-form-width-full" - style={{ - minWidth: '200px', - }} - placeholder="例)tokyo" - /> -
-
- +
+ 項目名(label) + { + const value = e.target.value; + if (!value) return; + updateOptionLabel(idx, value); + }} + className="acms-admin-form-width-full" + placeholder="例)東京都" + /> +
+
+ 値(value) + { + const value = e.target.value; + if (!value) return; + updateOptionValue(idx, value); + }} + className="acms-admin-form-width-full" + style={{ + minWidth: '200px', + }} + placeholder="例)tokyo" + /> +
+
+ +
{add && ( diff --git a/src/components/html/Checkbox.jsx b/src/components/html/Checkbox.jsx index c0d5220..837721a 100644 --- a/src/components/html/Checkbox.jsx +++ b/src/components/html/Checkbox.jsx @@ -3,71 +3,126 @@ import classnames from 'classnames'; import { useMakerContext } from '../../store/MakerContext'; import { OptionValidator } from './OptionValidator'; import { OptionNoSearch } from './OptionNoSearch'; +import { WrapTable } from './WrapTable'; export function Checkbox(props) { - const { item, id = '', isChecked = true } = props; + const { item, isChecked = true } = props; const { preview: { mode, acmscss }, } = useMakerContext(); - let attribute = { id, name: '', hiddenName: '' }; - switch (mode) { - case 'customfield': { - attribute = { - name: item.name, - hiddenName: 'field[]', - }; - break; - } - case 'fieldgroup': { - attribute = { - name: `${item.name}[]`, - }; - break; - } - case 'customunit': { - attribute = { - name: `${item.name}{id}`, - hiddenName: 'unit[]', - }; - break; - } - case 'unitgroup': { - attribute = { - name: `${item.name}{id}[]`, - }; - break; - } - } - return ( <> - {item.option.map((option, index) => { - if (!option.label) { - return null; - } - return ( - - - - - ); - })} - {mode === 'customfield' || mode === 'customunit' ? ( - - ) : null} + {mode === 'customfield' && ( + <> + {item.option.map((option, index) => { + if (!option.label) { + return null; + } + return ( +
+ + +
+ ); + })} + + + + + )} + + {mode === 'fieldgroup' && ( + <> + {item.option.map((option, index) => { + if (!option.label) { + return null; + } + return ( +
+ + +
+ ); + })} + + + )} + + {mode === 'customunit' && ( + <> + {item.option.map((option, index) => { + if (!option.label) { + return null; + } + return ( +
+ + +
+ ); + })} + + + + )} - - + {mode === 'unitgroup' && ( + + {item.option.map((option, index) => { + if (!option.label) { + return null; + } + return ( +
+ + +
+ ); + })} + +
+ )} ); } diff --git a/src/components/html/FileInput.jsx b/src/components/html/FileInput.jsx index 25afe92..457d1dc 100644 --- a/src/components/html/FileInput.jsx +++ b/src/components/html/FileInput.jsx @@ -7,7 +7,7 @@ import { OptionNoSearch } from './OptionNoSearch'; export function FileInput(props) { const { item, id, isValue = true } = props; const { - preview: { acmscss, editMode, mode, direction }, + preview: { acmscss, editMode, mode }, } = useMakerContext(); let src = '/images/fileicon/'; @@ -19,62 +19,6 @@ export function FileInput(props) { src += 'file.svg'; } - let attribute = { value: '', name: '', hiddenName: '' }; - switch (mode) { - case 'customfield': { - attribute = { - id, - value: `${item.name}`, - name: item.name, - hiddenName: 'field[]', - }; - break; - } - case 'fieldgroup': { - attribute = { - id, - value: `{${item.name}}`, - name: `${item.name}[]`, - }; - break; - } - case 'customunit': { - attribute = { - id, - value: `{${item.name}}`, - name: `${item.name}{id}`, - hiddenName: 'unit[]', - }; - break; - } - case 'unitgroup': { - attribute = { - id, - value: item.name, - name: `${item.name}{id}[]`, - }; - break; - } - } - - const wrapTable = (children, title) => { - return ( - ( - - {title} - {child} - - )} - > - {children} - - ); - }; - - const ConditionalWrap = ({ condition, wrap, children }) => (condition ? wrap(children) : children); - return ( <> {mode === 'customfield' && ( @@ -95,8 +39,8 @@ export function FileInput(props) { {alt} {editMode === 'preview' ? null : ``} - - + + {item.extension && } @@ -114,46 +58,125 @@ export function FileInput(props) { )} - {mode === 'fieldgroup' && - wrapTable( - <> - {isValue && ( - <> - {editMode === 'preview' ? null : ``} -
- - -
- - {alt} - - {editMode === 'preview' ? null : ''} - - - )} + {mode === 'fieldgroup' && ( + <> + {isValue && ( + <> + {editMode === 'preview' ? null : ``} +
+ + +
+ + {alt} + + {editMode === 'preview' ? null : ''} + + + )} - {item.extension && } - {item.fileNameMethod === 'random' && item.fileName && ( - - )} - {item.fileNameMethod === 'fix' && item.fileName && ( - - )} - {item.fileNameMethod === 'asis' && ( - - )} - - - , - item.title - )} + {item.extension && } + {item.fileNameMethod === 'random' && item.fileName && ( + + )} + {item.fileNameMethod === 'fix' && item.fileName && ( + + )} + {item.fileNameMethod === 'asis' && ( + + )} + + + + )} + + {mode === 'customunit' && ( + <> + {editMode === 'preview' ? null : ``} + + + + + + {alt} + + {editMode === 'preview' ? null : ''} + + + + + {item.extension && } + {item.fileNameMethod === 'random' && item.fileName && ( + + )} + {item.fileNameMethod === 'fix' && item.fileName && ( + + )} + {item.fileNameMethod === 'asis' && ( + + )} + + + )} + + {mode === 'unitgroup' && ( + <> + {isValue && ( + <> + {editMode === 'preview' ? null : ``} +
+ + +
+ + {alt} + + {editMode === 'preview' ? null : ''} + + + + )} + + {!isValue && item.extension && ( + + )} + {item.fileNameMethod === 'random' && item.fileName && ( + + )} + {item.fileNameMethod === 'fix' && item.fileName && ( + + )} + {item.fileNameMethod === 'asis' && ( + + )} + + )} ); } diff --git a/src/components/html/ImageInput.jsx b/src/components/html/ImageInput.jsx index 675aeae..18b9f86 100644 --- a/src/components/html/ImageInput.jsx +++ b/src/components/html/ImageInput.jsx @@ -3,33 +3,23 @@ import classnames from 'classnames'; import { useMakerContext } from '../../store/MakerContext'; import { OptionValidator } from './OptionValidator'; import { OptionNoSearch } from './OptionNoSearch'; +import { WrapTable } from './WrapTable'; export function ImageInput(props) { const { item, id, isAttribute = true } = props; const { - preview: { acmscss, editMode, mode, direction }, + preview: { acmscss, editMode, mode }, } = useMakerContext(); let style = {}; let hiddenStyle = {}; - const wrapTable = (children, title) => { - return ( - ( - - {title} - {child} - - )} - > - {children} - - ); - }; - - const ConditionalWrap = ({ condition, wrap, children }) => (condition ? wrap(children) : children); + if (mode === 'unitgroup') { + if (item.normalSize) { + style.maxWidth = `${item.normalSize}px`; + } + hiddenStyle = Object.assign({}, style, { display: 'none' }); + } return ( <> @@ -89,8 +79,8 @@ export function ImageInput(props) {
)} - {mode === 'fieldgroup' && - wrapTable( + {mode === 'fieldgroup' && ( + <>
{isAttribute && ( <> @@ -142,9 +132,131 @@ export function ImageInput(props) { {item.largeSize && } {item.square && } -
, - item.title - )} + + + )} + + {mode === 'customunit' && ( + + {editMode === 'preview' ? null : ``} + {`{${item.name}@alt}`} + +
+ + +
+ {editMode === 'preview' ? null : ''} + + {editMode === 'preview' ? null : ''} + +
+ {item.alt && ( + <> + 代替テキスト: + + + )} + + + {item.normalSize && } + {item.tiny && } + {item.large && } + {item.square && } + + +
+ )} + + {mode === 'unitgroup' && ( + +
+ {isAttribute && ( + <> + {editMode === 'preview' ? null : ``} +
+ {`{${item.name}@alt}`} +
+ + + + {editMode === 'preview' ? null : ''} + + )} + + {isAttribute && editMode === 'preview' ? null : ''} + +
+ {item.alt && ( +
+ 代替テキスト: + +
+ )} + {item.normal && item.normalSize && ( + + )} + {item.tiny && item.tinySize && ( + + )} + {item.large && item.largeSize && ( + + )} + {item.square && item.squareSize && ( + + )} + {isAttribute && } +
+
+ )} ); } diff --git a/src/components/html/RadioButton.jsx b/src/components/html/RadioButton.jsx index 93c6536..1a74858 100644 --- a/src/components/html/RadioButton.jsx +++ b/src/components/html/RadioButton.jsx @@ -42,7 +42,7 @@ export function RadioButton(props) { )} {mode === 'fieldgroup' && ( - + <> {item.option.map((option, index) => { if (!option.label) { return null; @@ -66,7 +66,7 @@ export function RadioButton(props) { ); })} - + )} {mode === 'customunit' && ( diff --git a/src/components/html/RichEditor.jsx b/src/components/html/RichEditor.jsx index 34076be..a2e5fcf 100644 --- a/src/components/html/RichEditor.jsx +++ b/src/components/html/RichEditor.jsx @@ -42,43 +42,41 @@ export function RichEditor(props) { )} {mode === 'fieldgroup' && ( - - ( -
-
- - {children} -
+ ( +
+
+ + {children}
- )} - > -
-
- {isValue ? ( - <> - - - - ) : ( - - )}
- - + )} + > +
+
+ {isValue ? ( + <> + + + + ) : ( + + )} +
+ )} {mode === 'customunit' && ( diff --git a/src/components/html/Selectbox.jsx b/src/components/html/Selectbox.jsx index 533b26f..b5ffe99 100644 --- a/src/components/html/Selectbox.jsx +++ b/src/components/html/Selectbox.jsx @@ -36,7 +36,7 @@ export function Selectbox(props) { )} {mode === 'fieldgroup' && ( - + <> - + )} {mode === 'customunit' && ( diff --git a/src/components/html/Table.jsx b/src/components/html/Table.jsx index 5e2724c..cc17436 100644 --- a/src/components/html/Table.jsx +++ b/src/components/html/Table.jsx @@ -34,7 +34,7 @@ export function Table(props) { )} {mode === 'fieldgroup' && ( - + <>
{editMode === 'preview' ? null : `\n`} @@ -62,7 +62,7 @@ export function Table(props) { />
-
+ )} {mode === 'customunit' && ( diff --git a/src/components/html/TextInput.jsx b/src/components/html/TextInput.jsx index 2dfb649..e42f795 100644 --- a/src/components/html/TextInput.jsx +++ b/src/components/html/TextInput.jsx @@ -32,7 +32,7 @@ export function TextInput(props) { )} {mode === 'fieldgroup' && ( - + <> - + )} {mode === 'customunit' && ( diff --git a/src/components/html/Textarea.jsx b/src/components/html/Textarea.jsx index badd310..9714419 100644 --- a/src/components/html/Textarea.jsx +++ b/src/components/html/Textarea.jsx @@ -31,12 +31,12 @@ export function Textarea(props) { )} {mode === 'fieldgroup' && ( - + <> - + )} {mode === 'customunit' && ( diff --git a/src/components/html/WrapTable.tsx b/src/components/html/WrapTable.jsx similarity index 80% rename from src/components/html/WrapTable.tsx rename to src/components/html/WrapTable.jsx index 3d62798..1aba8e3 100644 --- a/src/components/html/WrapTable.tsx +++ b/src/components/html/WrapTable.jsx @@ -16,10 +16,12 @@ export function WrapTable(props) { condition={direction === 'vertical'} wrap={(children) => { return ( - - {title} - {children} - + + + + {children} + +
{title}
); }} > diff --git a/src/components/layouts/GroupTableLayout.jsx b/src/components/layouts/GroupTableLayout.jsx index f588f74..eda5c84 100644 --- a/src/components/layouts/GroupTableLayout.jsx +++ b/src/components/layouts/GroupTableLayout.jsx @@ -10,6 +10,7 @@ import { ImageInput } from '../html/ImageInput'; import { RichEditor } from '../html/RichEditor'; import { Table } from '../html/Table'; import { useMakerContext } from '../../store/MakerContext'; +import { WrapTable } from '../html/WrapTable'; export function GroupTableLayout() { const { @@ -21,22 +22,6 @@ export function GroupTableLayout() { const ConditionalWrap = ({ condition, wrap, children }) => (condition ? wrap(children) : children); const groupLength = fieldgroup.items.length; - const wrapTable = (children, title) => { - return ( - ( - - {title} - {child} - - )} - > - {children} - - ); - }; - return ( <> {fieldgroup.title &&

{fieldgroup.title}

} @@ -80,76 +65,63 @@ export function GroupTableLayout() { {acmscss && } - - ( - - {children}
- - )} - > - <> - {fieldgroup.items.map((item, index) => { - switch (item.type) { - case 'text': { - return wrapTable( + <> + {fieldgroup.items.map((item, index) => { + switch (item.type) { + case 'text': { + return ( + - , - item.title - ); - } - case 'textarea': { - return wrapTable( - -