diff --git a/dist/bundle.js b/dist/bundle.js index 1381cf2..f812081 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,136 +1,6 @@ /*! For license information please see bundle.js.LICENSE.txt */ !(function () { var e = { - 779: function (e) { - var t = (function () { - 'use strict'; - function e(e, t) { - return null != t && e instanceof t; - } - var t, n, r; - try { - t = Map; - } catch (e) { - t = function () {}; - } - try { - n = Set; - } catch (e) { - n = function () {}; - } - try { - r = Promise; - } catch (e) { - r = function () {}; - } - function a(i, o, c, s, u) { - 'object' == typeof o && ((c = o.depth), (s = o.prototype), (u = o.includeNonEnumerable), (o = o.circular)); - var d = [], - p = [], - m = 'undefined' != typeof Buffer; - return ( - void 0 === o && (o = !0), - void 0 === c && (c = 1 / 0), - (function i(c, f) { - if (null === c) return null; - if (0 === f) return c; - var h, g; - if ('object' != typeof c) return c; - if (e(c, t)) h = new t(); - else if (e(c, n)) h = new n(); - else if (e(c, r)) - h = new r(function (e, t) { - c.then( - function (t) { - e(i(t, f - 1)); - }, - function (e) { - t(i(e, f - 1)); - } - ); - }); - else if (a.__isArray(c)) h = []; - else if (a.__isRegExp(c)) (h = new RegExp(c.source, l(c))), c.lastIndex && (h.lastIndex = c.lastIndex); - else if (a.__isDate(c)) h = new Date(c.getTime()); - else { - if (m && Buffer.isBuffer(c)) - return (h = Buffer.allocUnsafe ? Buffer.allocUnsafe(c.length) : new Buffer(c.length)), c.copy(h), h; - e(c, Error) - ? (h = Object.create(c)) - : void 0 === s - ? ((g = Object.getPrototypeOf(c)), (h = Object.create(g))) - : ((h = Object.create(s)), (g = s)); - } - if (o) { - var b = d.indexOf(c); - if (-1 != b) return p[b]; - d.push(c), p.push(h); - } - for (var v in (e(c, t) && - c.forEach(function (e, t) { - var n = i(t, f - 1), - r = i(e, f - 1); - h.set(n, r); - }), - e(c, n) && - c.forEach(function (e) { - var t = i(e, f - 1); - h.add(t); - }), - c)) { - var y; - g && (y = Object.getOwnPropertyDescriptor(g, v)), (y && null == y.set) || (h[v] = i(c[v], f - 1)); - } - if (Object.getOwnPropertySymbols) { - var E = Object.getOwnPropertySymbols(c); - for (v = 0; v < E.length; v++) { - var _ = E[v]; - (!(x = Object.getOwnPropertyDescriptor(c, _)) || x.enumerable || u) && - ((h[_] = i(c[_], f - 1)), x.enumerable || Object.defineProperty(h, _, { enumerable: !1 })); - } - } - if (u) { - var w = Object.getOwnPropertyNames(c); - for (v = 0; v < w.length; v++) { - var x, - k = w[v]; - ((x = Object.getOwnPropertyDescriptor(c, k)) && x.enumerable) || - ((h[k] = i(c[k], f - 1)), Object.defineProperty(h, k, { enumerable: !1 })); - } - } - return h; - })(i, c) - ); - } - function i(e) { - return Object.prototype.toString.call(e); - } - function l(e) { - var t = ''; - return e.global && (t += 'g'), e.ignoreCase && (t += 'i'), e.multiline && (t += 'm'), t; - } - return ( - (a.clonePrototype = function (e) { - if (null === e) return null; - var t = function () {}; - return (t.prototype = e), new t(); - }), - (a.__objToStr = i), - (a.__isDate = function (e) { - return 'object' == typeof e && '[object Date]' === i(e); - }), - (a.__isArray = function (e) { - return 'object' == typeof e && '[object Array]' === i(e); - }), - (a.__isRegExp = function (e) { - return 'object' == typeof e && '[object RegExp]' === i(e); - }), - (a.__getRegExpFlags = l), - a - ); - })(); - e.exports && (e.exports = t); - }, 965: function (e, t, n) { 'use strict'; var r = n(426), @@ -4828,8 +4698,8 @@ q(), I(); }, - TK_WORD: G, - TK_RESERVED: G, + TK_WORD: W, + TK_RESERVED: W, TK_SEMICOLON: function () { U() ? (n.space_before_token = !1) : A(h); for ( @@ -5210,7 +5080,7 @@ var t = m + (e || 0); return t < 0 || t >= T.length ? null : T[t]; } - function G() { + function W() { if ( ('TK_RESERVED' === h.type && ((c(h.text, ['set', 'get']) && y.mode !== p.ObjectLiteral) || @@ -5698,7 +5568,7 @@ return B || (z += g.match(/[\s\S]*/g)[0]), [(z = z.replace(i.allLineBreaks, '\n')), 'TK_STRING']; } } else { - var G = function (t, n, r) { + var W = function (t, n, r) { for (var a; g.hasNext() && ((a = g.peek()), D || (a !== t && (n || !i.newline.test(a)))); ) (D || n) && i.newline.test(a) ? ('\r' === a && '\n' === g.peek(1) && (g.next(), (a = g.peek())), (e += '\n')) @@ -5707,9 +5577,9 @@ g.next(), r && -1 !== e.indexOf(r, e.length - r.length) && - ('`' === t ? G('}', n, '`') : G('`', n, '${'), g.hasNext() && (e += g.next())); + ('`' === t ? W('}', n, '`') : W('`', n, '${'), g.hasNext() && (e += g.next())); }; - '`' === L ? G('`', !0, '${') : G(L); + '`' === L ? W('`', !0, '${') : W(L); } if ( (I && @@ -5746,17 +5616,17 @@ for (e = S; g.hasNext() && '\n' !== S; ) (S = g.next()), (e += S); return [((F = e), F.replace(/^\s+|\s+$/g, '') + '\n'), 'TK_UNKNOWN']; } - var W = '#'; + var G = '#'; if (g.hasNext() && g.testChar(o)) { do { - W += S = g.next(); + G += S = g.next(); } while (g.hasNext() && '#' !== S && '=' !== S); return ( '#' === S || ('[' === g.peek() && ']' === g.peek(1) - ? ((W += '[]'), g.next(), g.next()) - : '{' === g.peek() && '}' === g.peek(1) && ((W += '{}'), g.next(), g.next())), - [W, 'TK_WORD'] + ? ((G += '[]'), g.next(), g.next()) + : '{' === g.peek() && '}' === g.peek(1) && ((G += '{}'), g.next(), g.next())), + [G, 'TK_WORD'] ); } } @@ -6375,14 +6245,14 @@ U = null, V = !1, H = !1, - G = null, - W = 0; + W = null, + G = 0; function $() { if (null === q) throw Error(i(321)); return q; } function Q() { - if (0 < W) throw Error(i(312)); + if (0 < G) throw Error(i(312)); return { memoizedState: null, queue: null, next: null }; } function X() { @@ -6398,8 +6268,8 @@ ); } function Y(e, t, n, r) { - for (; H; ) (H = !1), (W += 1), (U = null), (n = e(t, r)); - return (K = q = null), (W = 0), (U = G = null), n; + for (; H; ) (H = !1), (G += 1), (U = null), (n = e(t, r)); + return (K = q = null), (G = 0), (U = W = null), n; } function Z(e, t) { return 'function' == typeof t ? t(e) : t; @@ -6407,8 +6277,8 @@ function J(e, t, n) { if (((q = $()), (U = X()), V)) { var r = U.queue; - if (((t = r.dispatch), null !== G && void 0 !== (n = G.get(r)))) { - G.delete(r), (r = U.memoizedState); + if (((t = r.dispatch), null !== W && void 0 !== (n = W.get(r)))) { + W.delete(r), (r = U.memoizedState); do { (r = e(r, n.action)), (n = n.next); } while (null !== n); @@ -6424,10 +6294,10 @@ ); } function ee(e, t, n) { - if (!(25 > W)) throw Error(i(301)); + if (!(25 > G)) throw Error(i(301)); if (e === q) - if (((H = !0), (e = { action: n, next: null }), null === G && (G = new Map()), void 0 === (n = G.get(t)))) - G.set(t, e); + if (((H = !0), (e = { action: n, next: null }), null === W && (W = new Map()), void 0 === (n = W.get(t)))) + W.set(t, e); else { for (t = n; null !== t.next; ) t = t.next; t.next = e; @@ -7285,7 +7155,7 @@ U = Object.prototype.hasOwnProperty, V = {}, H = {}; - function G(e, t, n, r, a, i) { + function W(e, t, n, r, a, i) { (this.acceptsBooleans = 2 === t || 3 === t || 4 === t), (this.attributeName = r), (this.attributeNamespace = a), @@ -7294,11 +7164,11 @@ (this.type = t), (this.sanitizeURL = i); } - var W = {}; + var G = {}; 'children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style' .split(' ') .forEach(function (e) { - W[e] = new G(e, 0, !1, e, null, !1); + G[e] = new W(e, 0, !1, e, null, !1); }), [ ['acceptCharset', 'accept-charset'], @@ -7307,30 +7177,30 @@ ['httpEquiv', 'http-equiv'], ].forEach(function (e) { var t = e[0]; - W[t] = new G(t, 1, !1, e[1], null, !1); + G[t] = new W(t, 1, !1, e[1], null, !1); }), ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (e) { - W[e] = new G(e, 2, !1, e.toLowerCase(), null, !1); + G[e] = new W(e, 2, !1, e.toLowerCase(), null, !1); }), ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (e) { - W[e] = new G(e, 2, !1, e, null, !1); + G[e] = new W(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) { - W[e] = new G(e, 3, !1, e.toLowerCase(), null, !1); + G[e] = new W(e, 3, !1, e.toLowerCase(), null, !1); }), ['checked', 'multiple', 'muted', 'selected'].forEach(function (e) { - W[e] = new G(e, 3, !0, e, null, !1); + G[e] = new W(e, 3, !0, e, null, !1); }), ['capture', 'download'].forEach(function (e) { - W[e] = new G(e, 4, !1, e, null, !1); + G[e] = new W(e, 4, !1, e, null, !1); }), ['cols', 'rows', 'size', 'span'].forEach(function (e) { - W[e] = new G(e, 6, !1, e, null, !1); + G[e] = new W(e, 6, !1, e, null, !1); }), ['rowSpan', 'start'].forEach(function (e) { - W[e] = new G(e, 5, !1, e.toLowerCase(), null, !1); + G[e] = new W(e, 5, !1, e.toLowerCase(), null, !1); }); var $ = /[\-:]([a-z])/g; function Q(e) { @@ -7340,26 +7210,26 @@ .split(' ') .forEach(function (e) { var t = e.replace($, Q); - W[t] = new G(t, 1, !1, e, null, !1); + G[t] = new W(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($, Q); - W[t] = new G(t, 1, !1, e, 'http://www.w3.org/1999/xlink', !1); + G[t] = new W(t, 1, !1, e, 'http://www.w3.org/1999/xlink', !1); }), ['xml:base', 'xml:lang', 'xml:space'].forEach(function (e) { var t = e.replace($, Q); - W[t] = new G(t, 1, !1, e, 'http://www.w3.org/XML/1998/namespace', !1); + G[t] = new W(t, 1, !1, e, 'http://www.w3.org/XML/1998/namespace', !1); }), ['tabIndex', 'crossOrigin'].forEach(function (e) { - W[e] = new G(e, 1, !1, e.toLowerCase(), null, !1); + G[e] = new W(e, 1, !1, e.toLowerCase(), null, !1); }), - (W.xlinkHref = new G('xlinkHref', 1, !1, 'xlink:href', 'http://www.w3.org/1999/xlink', !0)), + (G.xlinkHref = new W('xlinkHref', 1, !1, 'xlink:href', 'http://www.w3.org/1999/xlink', !0)), ['src', 'href', 'action', 'formAction'].forEach(function (e) { - W[e] = new G(e, 1, !1, e.toLowerCase(), null, !0); + G[e] = new W(e, 1, !1, e.toLowerCase(), null, !0); }); var X = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function Y(e, t, n, r) { - var a = W.hasOwnProperty(t) ? W[t] : null; + var a = G.hasOwnProperty(t) ? G[t] : null; (null !== a ? 0 === a.type : !r && 2 < t.length && ('o' === t[0] || 'O' === t[0]) && ('n' === t[1] || 'N' === t[1])) || @@ -7756,8 +7626,8 @@ delete qe.animationstart.animation), 'TransitionEvent' in window || delete qe.transitionend.transition); var He = Ve('animationend'), - Ge = Ve('animationiteration'), - We = Ve('animationstart'), + We = Ve('animationiteration'), + Ge = Ve('animationstart'), $e = Ve('transitionend'), Qe = 'abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting'.split( @@ -7961,22 +7831,22 @@ if (!n.has(e)) { switch (e) { case 'scroll': - Wt(t, 'scroll', !0); + Gt(t, 'scroll', !0); break; case 'focus': case 'blur': - Wt(t, 'focus', !0), Wt(t, 'blur', !0), n.set('blur', null), n.set('focus', null); + Gt(t, 'focus', !0), Gt(t, 'blur', !0), n.set('blur', null), n.set('focus', null); break; case 'cancel': case 'close': - ct(e) && Wt(t, e, !0); + ct(e) && Gt(t, e, !0); break; case 'invalid': case 'submit': case 'reset': break; default: - -1 === Qe.indexOf(e) && Gt(e, t); + -1 === Qe.indexOf(e) && Wt(e, t); } n.set(e, null); } @@ -8113,9 +7983,9 @@ 'abort', He, 'animationEnd', - Ge, - 'animationIteration', We, + 'animationIteration', + Ge, 'animationStart', 'canplay', 'canPlay', @@ -8198,10 +8068,10 @@ var Ut = i.unstable_UserBlockingPriority, Vt = i.unstable_runWithPriority, Ht = !0; - function Gt(e, t) { - Wt(t, e, !1); + function Wt(e, t) { + Gt(t, e, !1); } - function Wt(e, t, n) { + function Gt(e, t, n) { var r = Mt.get(t); switch (void 0 === r ? 2 : r) { case 0: @@ -8634,10 +8504,10 @@ for (t = 1; t <= l && n[r - t] === a[i - t]; t++); return (Vn = a.slice(e, 1 < t ? 1 - t : void 0)); } - function Gn() { + function Wn() { return !0; } - function Wn() { + function Gn() { return !1; } function $n(e, t, n, r) { @@ -8649,9 +8519,9 @@ ((t = e[a]) ? (this[a] = t(n)) : 'target' === a ? (this.target = r) : (this[a] = n[a])); return ( (this.isDefaultPrevented = (null != n.defaultPrevented ? n.defaultPrevented : !1 === n.returnValue) - ? Gn - : Wn), - (this.isPropagationStopped = Wn), + ? Wn + : Gn), + (this.isPropagationStopped = Gn), this ); } @@ -8675,24 +8545,24 @@ var e = this.nativeEvent; e && (e.preventDefault ? e.preventDefault() : 'unknown' != typeof e.returnValue && (e.returnValue = !1), - (this.isDefaultPrevented = Gn)); + (this.isDefaultPrevented = Wn)); }, stopPropagation: function () { var e = this.nativeEvent; e && (e.stopPropagation ? e.stopPropagation() : 'unknown' != typeof e.cancelBubble && (e.cancelBubble = !0), - (this.isPropagationStopped = Gn)); + (this.isPropagationStopped = Wn)); }, persist: function () { - this.isPersistent = Gn; + this.isPersistent = Wn; }, - isPersistent: Wn, + isPersistent: Gn, destructor: function () { var e, t = this.constructor.Interface; for (e in t) this[e] = null; (this.nativeEvent = this._targetInst = this.dispatchConfig = null), - (this.isPropagationStopped = this.isDefaultPrevented = Wn), + (this.isPropagationStopped = this.isDefaultPrevented = Gn), (this._dispatchInstances = this._dispatchListeners = null); }, }), @@ -9084,16 +8954,16 @@ dependencies: 'blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange'.split(' '), }, }, - Gr = null, Wr = null, + Gr = null, $r = null, Qr = !1; function Xr(e, t) { var n = t.window === t ? t.document : 9 === t.nodeType ? t : t.ownerDocument; - return Qr || null == Gr || Gr !== sn(n) + return Qr || null == Wr || Wr !== sn(n) ? null : ((n = - 'selectionStart' in (n = Gr) && fn(n) + 'selectionStart' in (n = Wr) && fn(n) ? { start: n.selectionStart, end: n.selectionEnd } : { anchorNode: (n = ((n.ownerDocument && n.ownerDocument.defaultView) || window).getSelection()) @@ -9104,7 +8974,7 @@ }), $r && Ur($r, n) ? null - : (($r = n), ((e = $n.getPooled(Hr.select, Wr, e, t)).type = 'select'), (e.target = Gr), qn(e), e)); + : (($r = n), ((e = $n.getPooled(Hr.select, Gr, e, t)).type = 'select'), (e.target = Wr), qn(e), e)); } var Yr = { eventTypes: Hr, @@ -9124,10 +8994,10 @@ if (i) return null; switch (((a = t ? Pn(t) : window), e)) { case 'focus': - (mr(a) || 'true' === a.contentEditable) && ((Gr = a), (Wr = t), ($r = null)); + (mr(a) || 'true' === a.contentEditable) && ((Wr = a), (Gr = t), ($r = null)); break; case 'blur': - $r = Wr = Gr = null; + $r = Gr = Wr = null; break; case 'mousedown': Qr = !0; @@ -9317,8 +9187,8 @@ e = la; break; case He: - case Ge: case We: + case Ge: e = Zr; break; case $e: @@ -9485,10 +9355,10 @@ throw Error(l(332)); } } - function Ga(e, t) { + function Wa(e, t) { return (e = Ha(e)), Ta(e, t); } - function Wa(e, t, n) { + function Ga(e, t, n) { return (e = Ha(e)), Sa(e, t, n); } function $a(e) { @@ -9507,7 +9377,7 @@ var e = 0; try { var t = za; - Ga(99, function () { + Wa(99, function () { for (; e < t.length; e++) { var n = t[e]; do { @@ -10136,8 +10006,8 @@ Ui = X.ReactCurrentBatchConfig, Vi = 0, Hi = null, - Gi = null, Wi = null, + Gi = null, $i = !1; function Qi() { throw Error(l(321)); @@ -10161,36 +10031,36 @@ i = 0; do { if (((t.expirationTime = 0), !(25 > i))) throw Error(l(301)); - (i += 1), (Wi = Gi = null), (t.updateQueue = null), (Ki.current = wl), (e = n(r, a)); + (i += 1), (Gi = Wi = null), (t.updateQueue = null), (Ki.current = wl), (e = n(r, a)); } while (t.expirationTime === Vi); } - if (((Ki.current = yl), (t = null !== Gi && null !== Gi.next), (Vi = 0), (Wi = Gi = Hi = null), ($i = !1), t)) + if (((Ki.current = yl), (t = null !== Wi && null !== Wi.next), (Vi = 0), (Gi = Wi = Hi = null), ($i = !1), t)) throw Error(l(300)); return e; } function Zi() { var e = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; - return null === Wi ? (Hi.memoizedState = Wi = e) : (Wi = Wi.next = e), Wi; + return null === Gi ? (Hi.memoizedState = Gi = e) : (Gi = Gi.next = e), Gi; } function Ji() { - if (null === Gi) { + if (null === Wi) { var e = Hi.alternate; e = null !== e ? e.memoizedState : null; - } else e = Gi.next; - var t = null === Wi ? Hi.memoizedState : Wi.next; - if (null !== t) (Wi = t), (Gi = e); + } else e = Wi.next; + var t = null === Gi ? Hi.memoizedState : Gi.next; + if (null !== t) (Gi = t), (Wi = e); else { if (null === e) throw Error(l(310)); (e = { - memoizedState: (Gi = e).memoizedState, - baseState: Gi.baseState, - baseQueue: Gi.baseQueue, - queue: Gi.queue, + memoizedState: (Wi = e).memoizedState, + baseState: Wi.baseState, + baseQueue: Wi.baseQueue, + queue: Wi.queue, next: null, }), - null === Wi ? (Hi.memoizedState = Wi = e) : (Wi = Wi.next = e); + null === Gi ? (Hi.memoizedState = Gi = e) : (Gi = Gi.next = e); } - return Wi; + return Gi; } function el(e, t) { return 'function' == typeof t ? t(e) : t; @@ -10200,7 +10070,7 @@ n = t.queue; if (null === n) throw Error(l(311)); n.lastRenderedReducer = e; - var r = Gi, + var r = Wi, a = r.baseQueue, i = n.pending; if (null !== i) { @@ -10305,8 +10175,8 @@ var a = Ji(); r = void 0 === r ? null : r; var i = void 0; - if (null !== Gi) { - var l = Gi.memoizedState; + if (null !== Wi) { + var l = Wi.memoizedState; if (((i = l.destroy), null !== r && Xi(r, l.deps))) return void al(t, n, i, r); } (Hi.effectTag |= e), (a.memoizedState = al(1 | t, n, i, r)); @@ -10356,10 +10226,10 @@ } function bl(e, t, n) { var r = Va(); - Ga(98 > r ? 98 : r, function () { + Wa(98 > r ? 98 : r, function () { e(!0); }), - Ga(97 < r ? 97 : r, function () { + Wa(97 < r ? 97 : r, function () { var r = Ui.suspense; Ui.suspense = void 0 === t ? null : t; try { @@ -10812,8 +10682,8 @@ var Ul, Vl, Hl, - Gl, - Wl = { dehydrated: null, retryTime: 0 }; + Wl, + Gl = { dehydrated: null, retryTime: 0 }; function $l(e, t, n) { var r, a = t.mode, @@ -10835,7 +10705,7 @@ if (((o = i.fallback), ((i = Uc(null, a, 0, null)).return = t), !(2 & t.mode))) for (e = null !== t.memoizedState ? t.child.child : t.child, i.child = e; null !== e; ) (e.return = i), (e = e.sibling); - return ((n = Uc(o, a, n, null)).return = t), (i.sibling = n), (t.memoizedState = Wl), (t.child = i), n; + return ((n = Uc(o, a, n, null)).return = t), (i.sibling = n), (t.memoizedState = Gl), (t.child = i), n; } return (a = i.children), (t.memoizedState = null), (t.child = Oi(t, null, a, n)); } @@ -10851,7 +10721,7 @@ ((a = qc(a, i)).return = t), (n.sibling = a), (n.childExpirationTime = 0), - (t.memoizedState = Wl), + (t.memoizedState = Gl), (t.child = n), a ); @@ -10873,7 +10743,7 @@ (i.sibling = n), (n.effectTag |= 2), (i.childExpirationTime = 0), - (t.memoizedState = Wl), + (t.memoizedState = Gl), (t.child = i), n ); @@ -11025,34 +10895,34 @@ case 'iframe': case 'object': case 'embed': - Gt('load', r); + Wt('load', r); break; case 'video': case 'audio': - for (e = 0; e < Qe.length; e++) Gt(Qe[e], r); + for (e = 0; e < Qe.length; e++) Wt(Qe[e], r); break; case 'source': - Gt('error', r); + Wt('error', r); break; case 'img': case 'image': case 'link': - Gt('error', r), Gt('load', r); + Wt('error', r), Wt('load', r); break; case 'form': - Gt('reset', r), Gt('submit', r); + Wt('reset', r), Wt('submit', r); break; case 'details': - Gt('toggle', r); + Wt('toggle', r); break; case 'input': - xe(r, o), Gt('invalid', r), on(n, 'onChange'); + xe(r, o), Wt('invalid', r), on(n, 'onChange'); break; case 'select': - (r._wrapperState = { wasMultiple: !!o.multiple }), Gt('invalid', r), on(n, 'onChange'); + (r._wrapperState = { wasMultiple: !!o.multiple }), Wt('invalid', r), on(n, 'onChange'); break; case 'textarea': - Ae(r, o), Gt('invalid', r), on(n, 'onChange'); + Ae(r, o), Wt('invalid', r), on(n, 'onChange'); } for (var c in (rn(i, o), (e = null), o)) if (o.hasOwnProperty(c)) { @@ -11100,29 +10970,29 @@ case 'iframe': case 'object': case 'embed': - Gt('load', e), (s = r); + Wt('load', e), (s = r); break; case 'video': case 'audio': - for (s = 0; s < Qe.length; s++) Gt(Qe[s], e); + for (s = 0; s < Qe.length; s++) Wt(Qe[s], e); s = r; break; case 'source': - Gt('error', e), (s = r); + Wt('error', e), (s = r); break; case 'img': case 'image': case 'link': - Gt('error', e), Gt('load', e), (s = r); + Wt('error', e), Wt('load', e), (s = r); break; case 'form': - Gt('reset', e), Gt('submit', e), (s = r); + Wt('reset', e), Wt('submit', e), (s = r); break; case 'details': - Gt('toggle', e), (s = r); + Wt('toggle', e), (s = r); break; case 'input': - xe(e, r), (s = we(e, r)), Gt('invalid', e), on(n, 'onChange'); + xe(e, r), (s = we(e, r)), Wt('invalid', e), on(n, 'onChange'); break; case 'option': s = Ce(e, r); @@ -11130,11 +11000,11 @@ case 'select': (e._wrapperState = { wasMultiple: !!r.multiple }), (s = a({}, r, { value: void 0 })), - Gt('invalid', e), + Wt('invalid', e), on(n, 'onChange'); break; case 'textarea': - Ae(e, r), (s = Re(e, r)), Gt('invalid', e), on(n, 'onChange'); + Ae(e, r), (s = Re(e, r)), Wt('invalid', e), on(n, 'onChange'); break; default: s = r; @@ -11182,7 +11052,7 @@ } return null; case 6: - if (e && null != t.stateNode) Gl(e, t, e.memoizedProps, r); + if (e && null != t.stateNode) Wl(e, t, e.memoizedProps, r); else { if ('string' != typeof r && null === t.stateNode) throw Error(l(166)); (n = Li(Pi.current)), @@ -11215,7 +11085,7 @@ 2 & t.mode && ((null === e && !0 !== t.memoizedProps.unstable_avoidThisFallback) || 1 & zi.current ? qo === Ao && (qo = Lo) - : ((qo !== Ao && qo !== Lo) || (qo = Do), 0 !== Go && null !== Mo && ($c(Mo, Bo), Qc(Mo, Go)))), + : ((qo !== Ao && qo !== Lo) || (qo = Do), 0 !== Wo && null !== Mo && ($c(Mo, Bo), Qc(Mo, Wo)))), (n || r) && (t.effectTag |= 4), null) ); @@ -11405,7 +11275,7 @@ n && (e = e || []).push('style', n), (i = e), (t.updateQueue = i) && (t.effectTag |= 4); } }), - (Gl = function (e, t, n, r) { + (Wl = function (e, t, n, r) { n !== r && (t.effectTag |= 4); }); var ro = 'function' == typeof WeakSet ? WeakSet : Set; @@ -11538,7 +11408,7 @@ case 22: if (null !== (e = t.updateQueue) && null !== (e = e.lastEffect)) { var r = e.next; - Ga(97 < n ? 97 : n, function () { + Wa(97 < n ? 97 : n, function () { var e = r; do { var n = e.destroy; @@ -11872,8 +11742,8 @@ Uo = 1073741823, Vo = 1073741823, Ho = null, - Go = 0, - Wo = !1, + Wo = 0, + Go = !1, $o = 0, Qo = 500, Xo = null, @@ -11959,7 +11829,7 @@ function dc(e) { var t = e.lastExpiredTime; if (0 !== t) return t; - if (!Wc(e, (t = e.firstPendingTime))) return t; + if (!Gc(e, (t = e.firstPendingTime))) return t; var n = e.lastPingedTime; return 2 >= (e = n > (e = e.nextKnownPendingLevel) ? n : e) && t !== e ? 0 : e; } @@ -11997,7 +11867,7 @@ (t = 1073741823 === t ? $a(fc.bind(null, e)) - : Wa(r, mc.bind(null, e), { timeout: 10 * (1073741821 - t) - Ua() })), + : Ga(r, mc.bind(null, e), { timeout: 10 * (1073741821 - t) - Ua() })), (e.callbackNode = t); } } @@ -12034,7 +11904,7 @@ n === (r = e.lastSuspendedTime) && (e.nextKnownPendingLevel = Sc(a)), 1073741823 === Uo && 10 < (a = $o + Qo - Ua())) ) { - if (Wo) { + if (Go) { var i = e.lastPingedTime; if (0 === i || i >= n) { (e.lastPingedTime = n), bc(e, n); @@ -12055,7 +11925,7 @@ if ( ($c(e, n), n === (r = e.lastSuspendedTime) && (e.nextKnownPendingLevel = Sc(a)), - Wo && (0 === (a = e.lastPingedTime) || a >= n)) + Go && (0 === (a = e.lastPingedTime) || a >= n)) ) { (e.lastPingedTime = n), bc(e, n); break; @@ -12191,8 +12061,8 @@ (Ko = null), (Vo = Uo = 1073741823), (Ho = null), - (Go = 0), - (Wo = !1); + (Wo = 0), + (Go = !1); } function vc(e, t) { for (;;) { @@ -12202,7 +12072,7 @@ var r = n.queue; null !== r && (r.pending = null), (n = n.next); } - if (((Vi = 0), (Wi = Gi = Hi = null), ($i = !1), null === zo || null === zo.return)) + if (((Vi = 0), (Gi = Wi = Hi = null), ($i = !1), null === zo || null === zo.return)) return (qo = Fo), (Ko = t), (zo = null); e: { var a = e, @@ -12315,7 +12185,7 @@ e < Uo && 2 < e && (Uo = e), null !== t && e < Vo && 2 < e && ((Vo = e), (Ho = t)); } function _c(e) { - e > Go && (Go = e); + e > Wo && (Wo = e); } function wc() { for (; null !== zo; ) zo = kc(zo); @@ -12363,7 +12233,7 @@ } function Nc(e) { var t = Va(); - return Ga(99, Cc.bind(null, e, t)), null; + return Wa(99, Cc.bind(null, e, t)), null; } function Cc(e, t) { do { @@ -12574,7 +12444,7 @@ !(512 & e) || ec || ((ec = !0), - Wa(97, function () { + Ga(97, function () { return Rc(), null; })), (Xo = Xo.nextEffect); @@ -12583,7 +12453,7 @@ function Rc() { if (90 !== nc) { var e = 97 < nc ? 97 : nc; - return (nc = 90), Ga(e, Ac); + return (nc = 90), Wa(e, Ac); } } function Ac() { @@ -12640,8 +12510,8 @@ Mo === e && Bo === n ? qo === Do || (qo === Lo && 1073741823 === Uo && Ua() - $o < Qo) ? bc(e, Bo) - : (Wo = !0) - : Wc(e, n) && ((0 !== (t = e.lastPingedTime) && t < n) || ((e.lastPingedTime = n), pc(e))); + : (Go = !0) + : Gc(e, n) && ((0 !== (t = e.lastPingedTime) && t < n) || ((e.lastPingedTime = n), pc(e))); } function Dc(e, t) { var n = e.stateNode; @@ -13032,7 +12902,7 @@ t ); } - function Gc(e, t, n) { + function Wc(e, t, n) { (this.tag = t), (this.current = null), (this.containerInfo = e), @@ -13052,7 +12922,7 @@ this.firstPendingTime = 0); } - function Wc(e, t) { + function Gc(e, t) { var n = e.firstSuspendedTime; return (e = e.lastSuspendedTime), 0 !== n && n >= t && e <= t; } @@ -13129,7 +12999,7 @@ Jc(e, t), (e = e.alternate) && Jc(e, t); } function ts(e, t, n) { - var r = new Gc(e, t, (n = null != n && !0 === n.hydrate)), + var r = new Wc(e, t, (n = null != n && !0 === n.hydrate)), a = zc(3, null, null, 2 === t ? 7 : 1 === t ? 3 : 0); (r.current = a), (a.stateNode = r), @@ -13264,7 +13134,7 @@ var i = jo; jo |= 4; try { - return Ga(98, e.bind(null, t, n, r, a)); + return Wa(98, e.bind(null, t, n, r, a)); } finally { (jo = i) === No && Qa(); } @@ -13368,7 +13238,7 @@ var n = jo; jo |= 1; try { - return Ga(99, e.bind(null, t)); + return Wa(99, e.bind(null, t)); } finally { (jo = n), Qa(); } @@ -15166,13 +15036,13 @@ })[1] ); }), - G = !V(function () { + W = !V(function () { var e = function () {}.bind(); return 'function' != typeof e || e.hasOwnProperty('prototype'); }), - W = G, + G = W, $ = Function.prototype.call, - Q = W + Q = G ? $.bind($) : function () { return $.apply($, arguments); @@ -15192,7 +15062,7 @@ ne = function (e, t) { return { enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t }; }, - re = G, + re = W, ae = Function.prototype, ie = ae.call, le = re && ae.bind.bind(ie, ie), @@ -15279,18 +15149,18 @@ (te = +ee[1]); var Ve = te, He = V, - Ge = + We = !!Object.getOwnPropertySymbols && !He(function () { var e = Symbol(); return !String(e) || !(Object(e) instanceof Symbol) || (!Symbol.sham && Ve && Ve < 41); }), - We = Ge && !Symbol.sham && 'symbol' == typeof Symbol.iterator, + Ge = We && !Symbol.sham && 'symbol' == typeof Symbol.iterator, $e = Ie, Qe = Re, Xe = je, Ye = Object, - Ze = We + Ze = Ge ? function (e) { return 'symbol' == typeof e; } @@ -15366,8 +15236,8 @@ Ot = st.exports, Rt = wt, At = Nt, - Ft = Ge, - Pt = We, + Ft = We, + Pt = Ge, Lt = Ot('wks'), Dt = Ct.Symbol, It = Dt && Dt.for, @@ -15405,13 +15275,13 @@ ); }, Ht = Ze, - Gt = function (e) { + Wt = function (e) { var t = Vt(e, 'string'); return Ht(t) ? t : t + ''; }, - Wt = Pe, + Gt = Pe, $t = K.document, - Qt = Wt($t) && Wt($t.createElement), + Qt = Gt($t) && Gt($t.createElement), Xt = function (e) { return Qt ? $t.createElement(e) : {}; }, @@ -15433,7 +15303,7 @@ tn = X, nn = ne, rn = Se, - an = Gt, + an = Wt, ln = wt, on = Zt, cn = Object.getOwnPropertyDescriptor; @@ -15463,7 +15333,7 @@ gn = Zt, bn = un, vn = fn, - yn = Gt, + yn = Wt, En = TypeError, _n = Object.defineProperty, wn = Object.getOwnPropertyDescriptor, @@ -15530,11 +15400,11 @@ Un = Re, Vn = K.WeakMap, Hn = Un(Vn) && /native code/.test(String(Vn)), - Gn = st.exports, - Wn = Nt, - $n = Gn('keys'), + Wn = st.exports, + Gn = Nt, + $n = Wn('keys'), Qn = function (e) { - return $n[e] || ($n[e] = Wn(e)); + return $n[e] || ($n[e] = Gn(e)); }, Xn = {}, Yn = Hn, @@ -15673,14 +15543,14 @@ Ur = Se, Vr = qr.indexOf, Hr = Xn, - Gr = fe([].push), - Wr = function (e, t) { + Wr = fe([].push), + Gr = function (e, t) { var n, r = Ur(e), a = 0, i = []; - for (n in r) !Kr(Hr, n) && Kr(r, n) && Gr(i, n); - for (; t.length > a; ) Kr(r, (n = t[a++])) && (~Vr(i, n) || Gr(i, n)); + for (n in r) !Kr(Hr, n) && Kr(r, n) && Wr(i, n); + for (; t.length > a; ) Kr(r, (n = t[a++])) && (~Vr(i, n) || Wr(i, n)); return i; }, $r = [ @@ -15692,7 +15562,7 @@ 'toString', 'valueOf', ], - Qr = Wr, + Qr = Gr, Xr = $r.concat('length', 'prototype'); Nr.f = Object.getOwnPropertyNames || @@ -15758,7 +15628,7 @@ }, xa = ga, ka = nt, - Ta = G, + Ta = W, Sa = fe(fe.bind), Na = de, Ca = @@ -15810,8 +15680,8 @@ Ua = Ie('Reflect', 'construct'), Va = /^\s*(?:class|function)\b/, Ha = Ia(Va.exec), - Ga = !Va.exec(qa), - Wa = function (e) { + Wa = !Va.exec(qa), + Ga = function (e) { if (!Ma(e)) return !1; try { return Ua(qa, Ka, e), !0; @@ -15828,7 +15698,7 @@ return !1; } try { - return Ga || !!Ha(Va, Ba(e)); + return Wa || !!Ha(Va, Ba(e)); } catch (e) { return !0; } @@ -15839,16 +15709,16 @@ ja(function () { var e; return ( - Wa(Wa.call) || - !Wa(Object) || - !Wa(function () { + Ga(Ga.call) || + !Ga(Object) || + !Ga(function () { e = !0; }) || e ); }) ? $a - : Wa, + : Ga, Xa = Ca, Ya = Qa, Za = Pe, @@ -15936,7 +15806,7 @@ filterReject: li(7), }, ci = {}, - si = Wr, + si = Gr, ui = $r, di = Object.keys || @@ -16063,7 +15933,7 @@ : (n = document.createEvent('Event')).initEvent(e, !1, !0, t), window.dispatchEvent(n); }, - Gi = function (e, t) { + Wi = function (e, t) { var n = this.state.show, r = this.props.id, a = this.isCapture(t.currentTarget), @@ -16072,10 +15942,10 @@ n && 'true' === i ? e || this.hideTooltip(t) : (t.currentTarget.setAttribute('currentItem', 'true'), - Wi(t.currentTarget, this.getTargetArray(r)), + Gi(t.currentTarget, this.getTargetArray(r)), this.showTooltip(t)); }, - Wi = function (e, t) { + Gi = function (e, t) { for (var n = 0; n < t.length; n++) e !== t[n] ? t[n].setAttribute('currentItem', 'false') : t[n].setAttribute('currentItem', 'true'); }, @@ -16444,7 +16314,7 @@ l = e.getAttribute('data-event-off') || a; i.split(' ').forEach(function (n) { e.removeEventListener(n, $i.get(e, n)); - var r = Gi.bind(t, l); + var r = Wi.bind(t, l); $i.set(e, n, r), e.addEventListener(n, r, !1); }), l && @@ -16507,7 +16377,7 @@ this, function (e) { var n = e.currentTarget.getAttribute('data-event-off') || a; - Gi.call(t, n, e); + Wi.call(t, n, e); }, { customEvent: !0 } ); @@ -17688,41 +17558,39 @@ ) ); } - function bl(t) { + const bl = { + title: '', + name: '', + path: '', + normalSize: '', + tiny: '', + tinySize: '', + large: '', + largeSize: '', + square: '', + squareSize: '', + alt: !0, + resize: !0, + useExpand: !0, + useDropArea: !0, + dropAreaWidth: 200, + dropAreaHeight: 200, + useFocusImage: !1, + focusImageWidth: 400, + focusImageHeight: 400, + startHeadingLevel: 2, + endHeadingLevel: 3, + mediaType: 'image', + openConverter: '', + openValidator: '', + converter: '', + tooltip: '', + placeholder: '', + }; + function vl(t) { const { setField: n, onSubmit: r = () => {} } = t, a = (0, e.useCallback)(() => { - !(function (e) { - const { setField: t } = e; - t({ - title: '', - name: '', - path: '', - normalSize: '', - tiny: '', - tinySize: '', - large: '', - largeSize: '', - square: '', - squareSize: '', - alt: !0, - resize: !0, - useExpand: !0, - useDropArea: !0, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: !1, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - openConverter: '', - openValidator: '', - converter: '', - tooltip: '', - placeholder: '', - }); - })(n); + n(bl); }, [n]); return e.createElement( 'p', @@ -17744,7 +17612,7 @@ ) ); } - function vl(t) { + function yl(t) { const { field: { type: n, validator: r, openValidator: a, converter: i, noSearch: l }, setField: o, @@ -18055,7 +17923,7 @@ ) ); } - function yl(t) { + function El(t) { const { field: { option: n }, setField: r, @@ -18159,7 +18027,7 @@ ) ); } - function El(t) { + function _l(t) { const { field: { mediaType: n, @@ -18296,7 +18164,7 @@ ) ); } - function _l(t) { + function wl(t) { const { setField: n } = t; return e.createElement( 'table', @@ -18564,7 +18432,7 @@ ) ); } - function wl(t) { + function xl(t) { const { field: { resize: n, alt: r }, setField: a, @@ -18606,7 +18474,7 @@ ) ); } - function xl(t) { + function kl(t) { const { field: { extension: n, fileName: r, fileNameMethod: a }, setField: i, @@ -18704,7 +18572,7 @@ ) ); } - function kl(t) { + function Tl(t) { const { field: { useExpand: n, startHeadingLevel: r, endHeadingLevel: a }, setField: i, @@ -18755,7 +18623,7 @@ ) ); } - const Tl = { + const Sl = { title: '', name: '', type: 'text', @@ -18793,8 +18661,8 @@ noSearch: !1, extension: '', }; - function Sl() { - const [t, n] = (0, e.useState)(Tl), + function Nl() { + const [t, n] = (0, e.useState)(Sl), { customfield: r, addCustomfield: a } = d(), i = (0, e.useCallback)( (e) => { @@ -18824,39 +18692,39 @@ 'div', null, e.createElement(gl, { field: t, setField: n }), - e.createElement(yl, { field: t, setField: n }) + e.createElement(El, { field: t, setField: n }) ), 'radioButton' === t.type && e.createElement( 'div', null, e.createElement(gl, { field: t, setField: n }), - e.createElement(yl, { field: t, setField: n }) + e.createElement(El, { field: t, setField: n }) ), 'checkbox' === t.type && e.createElement( 'div', null, e.createElement(gl, { field: t, setField: n }), - e.createElement(yl, { field: t, setField: n }) + e.createElement(El, { field: t, setField: n }) ), - 'media' === t.type && e.createElement('div', null, e.createElement(El, { field: t, setField: n })), + 'media' === t.type && e.createElement('div', null, e.createElement(_l, { field: t, setField: n })), 'image' === t.type && e.createElement( 'div', null, - e.createElement(_l, { setField: n }), - e.createElement(wl, { field: t, setField: n }) + e.createElement(wl, { setField: n }), + e.createElement(xl, { field: t, setField: n }) ), - 'file' === t.type && e.createElement('div', null, e.createElement(xl, { field: t, setField: n })), - 'richEditor' === t.type && e.createElement('div', null, e.createElement(kl, { field: t, setField: n })), - e.createElement(vl, { field: t, setField: n }), - e.createElement(bl, { setField: n, onSubmit: i }) + 'file' === t.type && e.createElement('div', null, e.createElement(kl, { field: t, setField: n })), + 'richEditor' === t.type && e.createElement('div', null, e.createElement(Tl, { field: t, setField: n })), + e.createElement(yl, { field: t, setField: n }), + e.createElement(vl, { setField: n, onSubmit: i }) ) ) ); } - function Nl(t) { + function Cl(t) { const { field: { groupAlert: n }, setField: r, @@ -18890,7 +18758,7 @@ : null ); } - function Cl(t) { + function Ol(t) { const { field: { duplicatedField: n }, setField: r, @@ -18922,41 +18790,70 @@ : null ); } - const Ol = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: !1, - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - useDropArea: !0, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: !1, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - useExpand: !0, - option: [{ value: '', label: '' }], - validator: [{ option: '', value: '', message: '' }], - optionFormat: 'pref', - openValidator: !1, - openConverter: !1, - alt: !1, - fileNameMethod: 'random', - groupAlert: !1, - openGroup: !1, - groupTitle: '', - groupName: '', - }; - function Rl() { - const [t, n] = (0, e.useState)(Ol), + const Rl = { + type: 'text', + subType: '', + title: '', + name: '', + tooltip: '', + alert: !1, + duplicatedField: '', + path: 'path', + converter: '', + normal: 'size', + useDropArea: !0, + dropAreaWidth: 200, + dropAreaHeight: 200, + useFocusImage: !1, + focusImageWidth: 400, + focusImageHeight: 400, + startHeadingLevel: 2, + endHeadingLevel: 3, + mediaType: 'image', + useExpand: !0, + option: [{ value: '', label: '' }], + validator: [{ option: '', value: '', message: '' }], + optionFormat: 'pref', + openValidator: !1, + openConverter: !1, + alt: !1, + fileNameMethod: 'random', + groupAlert: !1, + openGroup: !1, + groupTitle: '', + groupName: '', + }, + Al = { + title: '', + name: '', + path: '', + normalSize: '', + tiny: '', + tinySize: '', + large: '', + largeSize: '', + square: '', + squareSize: '', + alt: !0, + resize: !0, + useExpand: !0, + useDropArea: !0, + dropAreaWidth: 200, + dropAreaHeight: 200, + useFocusImage: !1, + focusImageWidth: 400, + focusImageHeight: 400, + startHeadingLevel: 2, + endHeadingLevel: 3, + mediaType: 'image', + openConverter: '', + openValidator: '', + converter: '', + tooltip: '', + placeholder: '', + }; + function Fl() { + const [t, n] = (0, e.useState)(Rl), { setGroupTitleName: r, addGroupItem: a, clearGroupItem: i } = d(), l = (0, e.useCallback)(() => { t.groupName @@ -18971,40 +18868,7 @@ : n((e) => ({ ...e, duplicatedField: !0 })); }, [t, r, a]), c = (0, e.useCallback)(() => { - i(), - (function (e) { - const { setField: t } = e; - t({ - title: '', - name: '', - path: '', - normalSize: '', - tiny: '', - tinySize: '', - large: '', - largeSize: '', - square: '', - squareSize: '', - alt: !0, - resize: !0, - useExpand: !0, - useDropArea: !0, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: !1, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - openConverter: '', - openValidator: '', - converter: '', - tooltip: '', - placeholder: '', - }); - })(n), - n((e) => ({ ...e, openGroup: !1, groupTitle: '', groupName: '' })); + i(), n(Al), n((e) => ({ ...e, openGroup: !1, groupTitle: '', groupName: '' })); }, [i]); return e.createElement( 'div', @@ -19013,8 +18877,8 @@ e.createElement( 'div', { className: 'customFieldFunction' }, - e.createElement(Nl, { field: t, setField: n }), e.createElement(Cl, { field: t, setField: n }), + e.createElement(Ol, { field: t, setField: n }), e.createElement(w, { field: t, setField: n }), t.openGroup ? e.createElement( @@ -19226,545 +19090,39 @@ e.createElement(_, { field: t, setField: n }), e.createElement(fl, { field: t, setField: n }), 'checkbox' === t.type && - e.createElement('div', null, e.createElement(yl, { field: t, setField: n, add: !1 })), + e.createElement('div', null, e.createElement(El, { field: t, setField: n, add: !1 })), 'selectbox' === t.type && e.createElement( 'div', null, e.createElement(gl, { field: t, setField: n }), - e.createElement(yl, { field: t, setField: n }) + e.createElement(El, { field: t, setField: n }) ), 'radioButton' === t.type && e.createElement( 'div', null, e.createElement(gl, { field: t, setField: n }), - e.createElement(yl, { field: t, setField: n }) + e.createElement(El, { field: t, setField: n }) ), 'image' === t.type && e.createElement( 'div', null, - e.createElement(_l, { setField: n }), - e.createElement(wl, { field: t, setField: n }) + e.createElement(wl, { setField: n }), + e.createElement(xl, { field: t, setField: n }) ), - 'file' === t.type && e.createElement('div', null, e.createElement(xl, { field: t, setField: n })), - 'media' === t.type && e.createElement('div', null, e.createElement(El, { field: t, setField: n })), + 'file' === t.type && e.createElement('div', null, e.createElement(kl, { field: t, setField: n })), + 'media' === t.type && e.createElement('div', null, e.createElement(_l, { field: t, setField: n })), 'rich-editor' === t.type && - e.createElement('div', null, e.createElement(kl, { field: t, setField: n })), - e.createElement(vl, { field: t, setField: n }), - e.createElement(bl, { setField: n, onSubmit: o }) + e.createElement('div', null, e.createElement(Tl, { field: t, setField: n })), + e.createElement(yl, { field: t, setField: n }), + e.createElement(vl, { setField: n, onSubmit: o }) ) ) ); } - function Al(e) { - return ( - (Al = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function (e) { - return typeof e; - } - : function (e) { - return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype - ? 'symbol' - : typeof e; - }), - Al(e) - ); - } - function Fl(e, t, n) { - return ( - (t = (function (e) { - var t = (function (e, t) { - if ('object' != Al(e) || !e) return e; - var n = e[Symbol.toPrimitive]; - if (void 0 !== n) { - var r = n.call(e, 'string'); - if ('object' != Al(r)) return r; - throw new TypeError('@@toPrimitive must return a primitive value.'); - } - return String(e); - })(e); - return 'symbol' == Al(t) ? t : t + ''; - })(t)) in e - ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) - : (e[t] = n), - e - ); - } - var Pl = n(779), - Ll = n.n(Pl), - Dl = new (class { - constructor() { - (this.stackPosition = 0), (this.stack = []); - } - pushState(e) { - (this.stack = this.stack.slice(0, this.stackPosition + 1)), this.stack.push(Ll()(e)), this.stackPosition++; - } - redo() { - if (this.canRedo()) return this.stackPosition++, Ll()(this.stack[this.stackPosition]); - } - canRedo() { - return this.stackPosition < this.stack.length - 1; - } - undo() { - if (this.canUndo()) return this.stackPosition--, Ll()(this.stack[this.stackPosition - 1]); - } - canUndo() { - return this.stackPosition > 0; - } - })(); - class Il extends e.Component { - constructor(e) { - super(e); - } - updateState(e, t) { - this.setState({ [e]: t }); - } - removeAlert() { - this.setState({ alert: !1 }); - } - renderTitleName() { - const { title: t, name: n } = this.state; - return e.createElement( - 'div', - null, - e.createElement('p', null, 'タイトル'), - e.createElement( - 'p', - null, - e.createElement('input', { - type: 'text', - value: t, - onInput: (e) => { - this.updateState('title', e.target.value); - }, - }) - ), - e.createElement('p', null, 'name属性'), - e.createElement( - 'p', - null, - e.createElement('input', { - type: 'text', - value: n, - onInput: (e) => { - this.updateState('name', e.target.value); - }, - }) - ) - ); - } - backState() { - const { actions: e } = this.props, - t = Dl.undo(); - t && e.setState(t); - } - } - class jl extends Il { - constructor(e) { - super(e), - (this.state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: '', - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - option: [{ value: '', label: '' }], - validator: [{ option: '', value: '', message: '' }], - optionFormat: 'pref', - openValidator: !1, - openConverter: !1, - alt: !1, - resize: !0, - useExpand: !0, - fileNameMethod: 'random', - useDropArea: !0, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: !1, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - }); - } - submit() { - const { name: e, type: t, title: n } = this.state, - { addCustomunit: r } = this.context; - e && t && n ? r(this.state) : this.setState({ alert: !0 }); - } - typeSelectRender() { - const { type: t } = this.state; - return e.createElement( - 'select', - { - id: 'type', - value: t, - className: 'acms-admin-form-width-full', - onChange: (e) => { - this.updateState('type', e.target.value); - }, - }, - e.createElement('option', { value: 'text' }, 'テキスト'), - e.createElement('option', { value: 'textarea' }, 'テキストエリア'), - e.createElement('option', { value: 'lite-editor' }, 'インラインエディター'), - e.createElement('option', { value: 'rich-editor' }, 'リッチエディター'), - e.createElement('option', { value: 'table' }, 'テーブル'), - e.createElement('option', { value: 'select' }, 'セレクトボックス'), - e.createElement('option', { value: 'radio' }, 'ラジオボタン'), - e.createElement('option', { value: 'checkbox' }, 'チェックボックス'), - e.createElement('option', { value: 'media' }, 'メディア'), - e.createElement('option', { value: 'image' }, '画像'), - e.createElement('option', { value: 'file' }, 'ファイル') - ); - } - render() { - const { type: t } = this.state; - return e.createElement( - 'div', - null, - e.createElement('h2', { className: 'acms-admin-admin-title2' }, 'カスタムユニット'), - e.createElement( - 'div', - { className: 'customFieldFunction' }, - this.renderModal(), - this.renderAlert(), - this.renderBasic(), - e.createElement('div', { className: 'customFieldLine' }), - 'select' === t && e.createElement('div', null, this.renderSnippet(), this.renderOption()), - 'radio' === t && e.createElement('div', null, this.renderSnippet(), this.renderOption()), - 'checkbox' === t && e.createElement('div', null, this.renderSnippet(), this.renderOption()), - 'image' === t && e.createElement('div', null, this.renderImage(), this.renderImageResize()), - 'file' === t && e.createElement('div', null, this.renderFile()), - 'media' === t && e.createElement('div', null, this.renderMediaOption()), - 'rich-editor' === t && e.createElement('div', null, this.renderRichEditorOption()), - this.renderValidator(!1), - this.renderMake() - ) - ); - } - } - Fl(jl, 'contextType', s); - class Ml extends Il { - constructor(e) { - super(e), - (this.state = { - type: 'text', - subType: '', - title: '', - name: '', - tooltip: '', - alert: '', - duplicatedField: '', - path: 'path', - converter: '', - normal: 'size', - option: [{ value: '', label: '' }], - validator: [{ option: '', value: '', message: '' }], - optionFormat: 'pref', - unitGroupTitle: '', - unitGroupName: '', - openValidator: !1, - openConverter: !1, - groupAlert: !1, - openGroup: !1, - alt: !1, - resize: !0, - fileNameMethod: 'random', - useDropArea: !0, - useExpand: !0, - dropAreaWidth: 200, - dropAreaHeight: 200, - useFocusImage: !0, - focusImageWidth: 400, - focusImageHeight: 400, - startHeadingLevel: 2, - endHeadingLevel: 3, - mediaType: 'image', - }); - } - showGroup() { - const { setUnitGroupTitleName: e } = this.context, - { unitGroupName: t, unitGroupTitle: n } = this.state; - t - ? (this.setState({ groupAlert: !1, duplicatedField: !1, openGroup: !0 }), e(n, t)) - : this.setState({ groupAlert: !0 }); - } - addNewGroup() { - const { clearUnitGroupItem: e } = this.context; - e(), this.clearValue(), this.setState({ openGroup: !1, unitGroupTitle: '', unitGroupName: '' }); - } - addGroup() { - const { setUnitGroupTitleName: e, addUnitGroupItem: t } = this.context, - { type: n, title: r, name: a, unitGroupName: i, unitGroupTitle: l } = this.state; - a != i - ? n && r && a - ? (e(i, l), t(this.state)) - : this.setState({ alert: !0 }) - : this.setState({ duplicatedField: !0 }); - } - render() { - const { openGroup: t, unitGroupTitle: n, unitGroupName: r, type: a } = this.state; - return e.createElement( - 'div', - null, - e.createElement('h2', { className: 'acms-admin-admin-title2' }, 'カスタムユニット(フィールドグループ)'), - e.createElement( - 'div', - { className: 'customFieldFunction' }, - this.renderGroupAlert(), - this.renderDuplicateAlert(), - this.renderAlert(), - t - ? e.createElement( - 'div', - { style: { paddingBottom: '15px' } }, - e.createElement( - 'button', - { - className: 'acms-admin-btn acms-admin-btn-primary customFieldGroupBtn', - onClick: this.addNewGroup.bind(this), - }, - '新規グループ作成' - ) - ) - : e.createElement( - 'table', - { - className: - 'adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup', - }, - e.createElement( - 'tbody', - null, - e.createElement( - 'tr', - null, - e.createElement( - 'th', - { className: 'acms-admin-table-left' }, - 'グループのタイトル', - e.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': !0, - 'data-for': 'unit-group-title-tip', - }), - e.createElement( - pl, - { - id: 'unit-group-title-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - e.createElement('span', null, 'フィールドグループのテーブル用のタイトルとなります。') - ), - e.createElement('span', { className: 'acms-admin-label acms-admin-label-danger' }, '必須') - ), - e.createElement( - 'th', - { className: 'acms-admin-table-left', colSpan: '2' }, - 'フィールド名(変数)', - e.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': !0, - 'data-for': 'unit-group-field-tip', - }), - e.createElement( - pl, - { - id: 'unit-group-field-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - e.createElement( - 'span', - null, - 'フィールドグループのフィールド名です。値を必ず入力してください。' - ) - ), - e.createElement('span', { className: 'acms-admin-label acms-admin-label-danger' }, '必須') - ) - ), - e.createElement( - 'tr', - null, - e.createElement( - 'td', - null, - e.createElement('input', { - type: 'text', - defaultValue: n, - onInput: (e) => { - this.updateState('unitGroupTitle', e.target.value); - }, - className: 'acms-admin-form-width-full', - placeholder: '例)スタッフリスト', - }) - ), - e.createElement( - 'td', - null, - e.createElement('input', { - type: 'text', - defaultValue: r, - onInput: (e) => { - this.updateState('unitGroupName', e.target.value); - }, - className: 'acms-admin-form-width-full', - placeholder: '例)group_staff', - }) - ) - ), - e.createElement( - 'tr', - null, - e.createElement( - 'td', - { colSpan: '2' }, - t - ? e.createElement( - 'button', - { - className: - 'acms-admin-btn acms-admin-btn-primary acms-admin-btn-disabled customFieldGroupBtn', - disabled: !0, - }, - 'グループ生成' - ) - : e.createElement( - 'button', - { - className: 'acms-admin-btn acms-admin-btn-primary customFieldGroupBtn', - onClick: this.showGroup.bind(this), - }, - 'グループ生成' - ) - ) - ) - ) - ), - t && - e.createElement( - 'div', - null, - e.createElement('div', { className: 'customFieldLine' }), - e.createElement( - 'table', - { - className: - 'adminTable acms-admin-table-admin-edit customFieldBasicTable customFieldBasicTableGroup', - }, - e.createElement( - 'tbody', - null, - e.createElement( - 'tr', - null, - e.createElement( - 'th', - { className: 'acms-admin-table-left' }, - 'グループのタイトル', - e.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': !0, - 'data-for': 'unit-group-title-tip', - }), - e.createElement( - pl, - { - id: 'unit-group-title-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - e.createElement('span', null, 'フィールドグループのテーブル用のタイトルとなります。') - ) - ), - e.createElement( - 'th', - { className: 'acms-admin-table-left', colSpan: '2' }, - 'フィールド名(変数)', - e.createElement('i', { - className: 'acms-admin-icon-tooltip', - 'data-tip': !0, - 'data-for': 'unit-group-field-tip', - }), - e.createElement( - pl, - { - id: 'unit-group-field-tip', - place: 'top', - type: 'dark', - effect: 'solid', - className: 'acms-admin-tooltip acms-tooltip customFieldTooltip', - }, - e.createElement( - 'span', - null, - 'フィールドグループのフィールド名です。値を必ず入力してください。' - ) - ) - ) - ), - e.createElement('tr', null, e.createElement('td', null, n), e.createElement('td', null, r)) - ) - ), - this.renderModal(), - this.renderBasic(), - e.createElement('div', { className: 'customFieldLine' }), - 'select' === a && e.createElement('div', null, this.renderSnippet(), this.renderOption()), - 'radio' === a && e.createElement('div', null, this.renderSnippet(), this.renderOption()), - 'image' === a && e.createElement('div', null, this.renderImage(), this.renderImageResize()), - 'file' === a && e.createElement('div', null, this.renderFile()), - 'media' === a && e.createElement('div', null, this.renderMediaOption()), - 'rich-editor' === a && e.createElement('div', null, this.renderRichEditorOption()), - this.renderValidator(!1), - e.createElement( - 'p', - null, - e.createElement( - 'button', - { - onClick: this.clearValue.bind(this), - className: 'acms-admin-btn-admin', - style: { marginRight: '5px' }, - }, - 'クリア' - ), - e.createElement( - 'button', - { - onClick: this.addGroup.bind(this), - className: 'acms-admin-btn-admin acms-admin-btn-admin-primary customFieldMakeBtn', - style: { marginRight: '5px' }, - }, - '生成' - ), - e.createElement( - 'button', - { onClick: this.backState.bind(this), className: 'acms-admin-btn-admin' }, - '元に戻す' - ) - ) - ) - ) - ); - } - } - function zl(t) { + function Pl(t) { const { item: n } = t, { preview: { jsValidator: r }, @@ -19786,9 +19144,9 @@ ) ); } - function Bl() { + function Ll() { return ( - (Bl = Object.assign + (Ll = Object.assign ? Object.assign.bind() : function (e) { for (var t = 1; t < arguments.length; t++) { @@ -19797,10 +19155,10 @@ } return e; }), - Bl.apply(null, arguments) + Ll.apply(null, arguments) ); } - function ql(t) { + function Dl(t) { const { item: n } = t, { preview: { acmscss: r, jsValidator: a, editMode: i }, @@ -19821,42 +19179,41 @@ value: t.value, id: ''.concat(l, '-v-').concat(t.option), }), - !a && - e.createElement( - e.Fragment, - null, - t.message && + a + ? e.createElement( + 'div', + { + 'data-validator-label': ''.concat(l, '-v-').concat(t.option), + className: 'validator-result-{'.concat(l, ':v#').concat(t.option, '}'), + }, e.createElement( - e.Fragment, - null, - 'preview' === i - ? null - : '\x3c!-- BEGIN '.concat(l, ':validator#').concat(t.option, ' --\x3e'), - e.createElement('p', { className: b()({ 'acms-admin-text-error': r }) }, t.message), - 'preview' === i ? null : '\x3c!-- END '.concat(l, ':validator#').concat(t.option, ' --\x3e') + 'p', + { className: 'error-text' }, + e.createElement('span', { className: 'acms-admin-icon acms-admin-icon-attention' }), + t.message ) - ), - !a && - e.createElement( - 'div', - { - 'data-validator-label': ''.concat(l, '-v-').concat(t.option), - className: 'validator-result-{'.concat(l, ':v#').concat(t.option, '}'), - }, - e.createElement( - 'p', - { className: 'error-text' }, - e.createElement('span', { className: 'acms-admin-icon acms-admin-icon-attention' }), - t.message ) - ) + : e.createElement( + e.Fragment, + null, + t.message && + e.createElement( + e.Fragment, + null, + 'preview' === i + ? null + : '\x3c!-- BEGIN '.concat(l, ':validator#').concat(t.option, ' --\x3e'), + e.createElement('p', { className: b()({ 'acms-admin-text-error': r }) }, t.message), + 'preview' === i ? null : '\x3c!-- END '.concat(l, ':validator#').concat(t.option, ' --\x3e') + ) + ) ) : null ), n.converter && e.createElement('input', { type: 'hidden', name: ''.concat(l, ':c'), value: n.converter }) ); } - function Kl(t) { + function Il(t) { const { noSearch: n, name: r } = t; return e.createElement( e.Fragment, @@ -19864,7 +19221,7 @@ n ? e.createElement('input', { type: 'hidden', name: ''.concat(r, ':search'), value: '0' }) : null ); } - function Ul(t) { + function jl(t) { const { item: n, id: r = '', isValue: a = !0 } = t, { preview: { mode: i, jsValidator: l, acmscss: o }, @@ -19894,7 +19251,7 @@ null, e.createElement( 'input', - Bl( + Ll( { id: r, type: c, @@ -19909,11 +19266,11 @@ ('normal' === i) | ('unit' === i) ? e.createElement('input', { type: 'hidden', name: s.hiddenName, defaultValue: s.name }) : null, - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - function Vl(t) { + function Ml(t) { const { item: n, id: r = '', isValue: a = !0 } = t, { preview: { mode: i, jsValidator: l, acmscss: o }, @@ -19944,17 +19301,17 @@ null, e.createElement( 'textarea', - Bl({ name: u.name, className: s }, l ? { 'data-validator': u.name } : {}), + Ll({ name: u.name, className: s }, l ? { 'data-validator': u.name } : {}), a ? ''.concat(u.value) : '' ), ('normal' === i) | ('unit' === i) ? e.createElement('input', { type: 'hidden', name: u.hiddenName, defaultValue: u.name }) : null, - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - function Hl(t) { + function zl(t) { const { item: n, id: r = '' } = t, { preview: { mode: a, acmscss: i }, @@ -19998,11 +19355,11 @@ ('normal' === a) | ('unit' === a) ? e.createElement('input', { type: 'hidden', name: 'field[]', value: l.name }) : null, - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - function Gl(t) { + function Bl(t) { const { item: n } = t, { preview: { mode: r, acmscss: a }, @@ -20048,11 +19405,11 @@ ('normal' === r) | ('unit' === r) ? e.createElement('input', { type: 'hidden', name: 'field[]', value: i.name }) : null, - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - function Wl(t) { + function ql(t) { const { item: n } = t, { preview: { mode: r, acmscss: a }, @@ -20103,16 +19460,15 @@ ('normal' === r) | ('unit' === r) ? e.createElement('input', { type: 'hidden', name: 'field[]', value: i.name }) : null, - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - Fl(Ml, 'contextType', s); - const $l = (e) => { + const Kl = (e) => { let { condition: t, wrap: n, children: r } = e; return t ? n(r) : r; }; - function Ql(t) { + function Ul(t) { const { item: n, id: r } = t, { preview: { acmscss: a, editMode: i, mode: l }, @@ -20143,14 +19499,14 @@ null, '\x3c!-- BEGIN_IF [{'.concat(o.name, '@thumbnail}/nem] --\x3e'), e.createElement( - $l, + Kl, { condition: 'file' === n.mediaType, wrap: (t) => e.createElement('a', { href: '%{MEDIA_ARCHIVES_DIR}{'.concat(o.name, '@path}') }, t), }, e.createElement( 'img', - Bl( + Ll( { src: '{'.concat(o.name, '@thumbnail}'), className: b()('js-preview', { 'acms-admin-img-responsive': a }), @@ -20164,7 +19520,7 @@ '\x3c!-- ELSE --\x3e', e.createElement( 'img', - Bl( + Ll( { src: '', alt: '' }, 'file' === n.mediaType ? { style: { width: '64px', height: 'auto', display: 'none' } } @@ -20257,7 +19613,7 @@ e.createElement('input', { type: 'hidden', name: ''.concat(o.name, ':extension'), value: 'media' }) ); } - function Xl(t) { + function Vl(t) { const { item: n, id: r = '' } = t, { preview: { mode: a, editMode: i, acmscss: l }, @@ -20361,11 +19717,11 @@ value: n.squareSize, }), e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename'), value: '' }), - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - function Yl(t) { + function Hl(t) { const { item: n, id: r } = t, { preview: { acmscss: a, editMode: i, mode: l }, @@ -20446,11 +19802,11 @@ }), 'asis' === n.fileNameMethod && e.createElement('input', { type: 'hidden', name: ''.concat(n.name, '@filename'), value: '@rawfilename' }), - e.createElement(ql, { item: n }), - e.createElement(Kl, { name: n.name, noSearch: n.noSearch }) + e.createElement(Dl, { item: n }), + e.createElement(Il, { name: n.name, noSearch: n.noSearch }) ); } - function Zl(t) { + function Wl(t) { const { item: n, id: r = '' } = t, { preview: { mode: a }, @@ -20509,7 +19865,7 @@ ) ); } - function Jl() { + function Gl() { const { customfield: t, preview: { jsValidator: n }, @@ -20528,12 +19884,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Ul, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(jl, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'textarea': @@ -20543,12 +19899,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Vl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Ml, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'selectbox': @@ -20558,12 +19914,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Hl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(zl, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'checkbox': @@ -20573,12 +19929,12 @@ e.createElement( 'span', { className: 'acms-admin-form-item-heading' }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Gl, { item: t }) + e.createElement(Bl, { item: t }) ) ); case 'radioButton': @@ -20588,12 +19944,12 @@ e.createElement( 'span', { className: 'acms-admin-form-item-heading' }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Wl, { item: t }) + e.createElement(ql, { item: t }) ) ); case 'media': @@ -20603,9 +19959,9 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), - e.createElement('span', null, e.createElement(Ql, { item: t, id: ''.concat(t.name).concat(n) })) + e.createElement('span', null, e.createElement(Ul, { item: t, id: ''.concat(t.name).concat(n) })) ); case 'image': return e.createElement( @@ -20614,9 +19970,9 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), - e.createElement('span', null, e.createElement(Xl, { item: t, id: ''.concat(t.name).concat(n) })) + e.createElement('span', null, e.createElement(Vl, { item: t, id: ''.concat(t.name).concat(n) })) ); case 'file': return e.createElement( @@ -20625,9 +19981,9 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), - e.createElement('span', null, e.createElement(Yl, { item: t, id: ''.concat(t.name).concat(n) })) + e.createElement('span', null, e.createElement(Hl, { item: t, id: ''.concat(t.name).concat(n) })) ); case 'richEditor': return e.createElement( @@ -20636,9 +19992,9 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), - e.createElement('span', null, e.createElement(Zl, { item: t, id: ''.concat(t.name).concat(n) })) + e.createElement('span', null, e.createElement(Wl, { item: t, id: ''.concat(t.name).concat(n) })) ); default: return null; @@ -20647,7 +20003,7 @@ n && '\x3c!-- --\x3e' ); } - function eo(t) { + function $l(t) { const { customfield: n } = t, { preview: { jsValidator: r, acmscss: a }, @@ -20665,15 +20021,15 @@ return e.createElement( 'tr', { key: n }, - e.createElement('th', null, e.createElement(zl, { item: t })), - e.createElement('td', null, e.createElement(Ul, { item: t })) + e.createElement('th', null, e.createElement(Pl, { item: t })), + e.createElement('td', null, e.createElement(jl, { item: t })) ); case 'textarea': return e.createElement( 'tr', { key: n }, - e.createElement('th', null, e.createElement(zl, { item: t })), - e.createElement('td', null, e.createElement(Vl, { item: t })) + e.createElement('th', null, e.createElement(Pl, { item: t })), + e.createElement('td', null, e.createElement(Ml, { item: t })) ); default: return null; @@ -20683,18 +20039,18 @@ r && '\x3c!-- --\x3e' ); } - function to() { + function Ql() { const { preview: { tag: t }, } = d(); return e.createElement( e.Fragment, null, - 'section' === t && e.createElement(Jl, null), - 'table' === t && e.createElement(eo, null) + 'section' === t && e.createElement(Gl, null), + 'table' === t && e.createElement($l, null) ); } - function no() { + function Xl() { const { fieldgroup: t, preview: { acmscss: n, editMode: r }, @@ -20731,12 +20087,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Ul, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(jl, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'textarea': @@ -20746,15 +20102,29 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Pl, { item: t, id: ''.concat(t.name).concat(n) }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Vl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Ml, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'checkbox': + return e.createElement( + 'p', + { key: n, className: 'acms-admin-form-item' }, + e.createElement( + 'label', + { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, + e.createElement(Pl, { item: t, id: ''.concat(t.name).concat(n) }) + ), + e.createElement( + 'span', + { className: 'acms-admin-form-item-input' }, + e.createElement(Bl, { item: t, id: ''.concat(t.name).concat(n) }) + ) + ); case 'selectbox': return e.createElement( 'p', @@ -20762,12 +20132,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Pl, { item: t, id: ''.concat(t.name).concat(n) }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Gl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(zl, { item: t, id: ''.concat(t.name).concat(n) }) ) ); case 'media': @@ -20777,12 +20147,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', id: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Vl, { item: t, id: ''.concat(t.name).concat(n) }) + e.createElement(Ml, { item: t, id: ''.concat(t.name).concat(n) }) ) ); default: @@ -20826,12 +20196,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', id: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Ul, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + e.createElement(jl, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) ) ); case 'textarea': @@ -20841,12 +20211,12 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Vl, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + e.createElement(Ml, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) ) ); case 'checkbox': @@ -20856,12 +20226,27 @@ e.createElement( 'label', { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) + ), + e.createElement( + 'span', + { className: 'acms-admin-form-item-input' }, + e.createElement(Bl, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + ) + ); + case 'selectbox': + return e.createElement( + 'p', + { key: n, className: 'acms-admin-form-item' }, + e.createElement( + 'label', + { className: 'acms-admin-form-item-heading', htmlFor: ''.concat(t.name).concat(n) }, + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Gl, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + e.createElement(zl, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) ) ); case 'media': @@ -20871,12 +20256,12 @@ e.createElement( 'span', { className: 'acms-admin-form-item-heading', id: ''.concat(t.name).concat(n) }, - e.createElement(zl, { item: t }) + e.createElement(Pl, { item: t }) ), e.createElement( 'span', { className: 'acms-admin-form-item-input' }, - e.createElement(Vl, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) + e.createElement(Ml, { item: t, id: ''.concat(t.name).concat(n), isValue: !1 }) ) ); default: @@ -21090,27 +20475,27 @@ ) ); } - function ro() { + function Yl() { const { preview: { tag: t }, } = d(); - return e.createElement(e.Fragment, null, 'section' === t ? e.createElement(no, null) : null); + return e.createElement(e.Fragment, null, 'section' === t ? e.createElement(Xl, null) : null); } - var ao = n(848), - io = n(376), - lo = n(418), - oo = n(48), - co = n.n(oo), - so = (n(334), n(962), n(285)), - uo = n.n(so); - co().registerLanguage('xml', uo()); - const po = new io.vr(); - function mo(t) { + var Zl = n(848), + Jl = n(376), + eo = n(418), + to = n(48), + no = n.n(to), + ro = (n(334), n(962), n(285)), + ao = n.n(ro); + no().registerLanguage('xml', ao()); + const io = new Jl.vr(); + function lo(t) { let { children: n, onHighlight: r = () => {} } = t; const a = (0, e.useRef)(), i = (0, e.useCallback)( (e) => { - let t = (0, ao.renderToStaticMarkup)(e); + let t = (0, Zl.renderToStaticMarkup)(e); (t = t.replace(/"/g, '"')), (t = t.replace(/data-tmp="(.*?)"/g, '$1')), (t = t.replace(/</g, '<')), @@ -21118,8 +20503,8 @@ (t = ((e) => (e = e.replace(//g, '')).replace(/ data-reactroot=""/g, ''))( t )); - const n = po.encode( - (0, lo.html)(t, { + const n = io.encode( + (0, eo.html)(t, { unformatted: ['code', 'pre'], indent_inner_html: !0, indent_char: ' ', @@ -21127,7 +20512,7 @@ sep: '\n', }) ); - (a.current.innerHTML = n), co().highlightBlock(a.current), r && r(n); + (a.current.innerHTML = n), no().highlightBlock(a.current), r && r(n); }, [r] ); @@ -21146,8 +20531,8 @@ ) ); } - const fo = new io.vr(); - var ho = function () { + const oo = new Jl.vr(); + var co = function () { const { setSource: t, customfield: n, @@ -21161,10 +20546,8 @@ 'div', { className: 'acms-admin-form' }, e.createElement(p, null), - 'normal' === l.mode && e.createElement(Sl, null), - 'group' === l.mode && e.createElement(Rl, null), - 'unit' === l.mode && e.createElement(jl, null), - 'unit-group' === l.mode && e.createElement(Ml, null), + 'normal' === l.mode && e.createElement(Nl, null), + 'group' === l.mode && e.createElement(Fl, null), e.createElement( 'div', { className: 'acms-admin-tabs' }, @@ -21181,26 +20564,26 @@ e.createElement(y, null), 'source' === l.editMode && e.createElement( - mo, + lo, { onHighlight: (e) => { - const n = fo.decode(e); + const n = oo.decode(e); o !== n && t(n); }, }, e.createElement( u, { customfield: n, customunit: a, fieldgroup: r, unitgroup: i, preview: l }, - 'normal' === l.mode && e.createElement(to, null), - 'group' === l.mode && e.createElement(ro, null) + 'normal' === l.mode && e.createElement(Ql, null), + 'group' === l.mode && e.createElement(Yl, null) ) ), 'preview' === l.editMode && e.createElement( e.Fragment, null, - 'normal' === l.mode && e.createElement(to, null), - 'group' === l.mode && e.createElement(ro, null) + 'normal' === l.mode && e.createElement(Ql, null), + 'group' === l.mode && e.createElement(Yl, null) ) ) ) @@ -21208,9 +20591,9 @@ ) ); }, - go = function () { - return e.createElement(u, null, e.createElement(ho, null)); + so = function () { + return e.createElement(u, null, e.createElement(co, null)); }; - n(179), t.render(e.createElement(e.StrictMode, null, e.createElement(go, null)), document.getElementById('app')); + n(179), t.render(e.createElement(e.StrictMode, null, e.createElement(so, null)), document.getElementById('app')); })(); })(); diff --git a/lib/components/genelator/FieldGroup.js b/lib/components/genelator/FieldGroup.js index 8a490de..6df25bb 100644 --- a/lib/components/genelator/FieldGroup.js +++ b/lib/components/genelator/FieldGroup.js @@ -8,7 +8,6 @@ exports.FieldGroup = FieldGroup; var _react = _interopRequireWildcard(require('react')); var _reactTooltip = _interopRequireDefault(require('react-tooltip')); var _MakerContext = require('../../store/MakerContext'); -var _FieldClear = require('./base/FieldClear'); var _Alert = require('./base/Alert'); var _GroupAlert = require('./base/GroupAlert'); var _DuplicateAlert = require('./base/DuplicateAlert'); @@ -89,6 +88,35 @@ const defaultProps = { groupTitle: '', groupName: '', }; +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: '', +}; function FieldGroup() { const [field, setField] = (0, _react.useState)(defaultProps); const { setGroupTitleName, addGroupItem, clearGroupItem } = (0, _MakerContext.useMakerContext)(); @@ -128,7 +156,7 @@ function FieldGroup() { }, [field, setGroupTitleName, addGroupItem]); const addNewGroup = (0, _react.useCallback)(() => { clearGroupItem(); - (0, _FieldClear.FieldClear)(setField); + setField(crearField); setField((prevState) => ({ ...prevState, openGroup: false, diff --git a/lib/components/genelator/base/Maker.js b/lib/components/genelator/base/Maker.js index 5d74f82..a81424b 100644 --- a/lib/components/genelator/base/Maker.js +++ b/lib/components/genelator/base/Maker.js @@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { }); exports.Maker = Maker; var _react = _interopRequireWildcard(require('react')); -var _fieldClear = require('./fieldClear'); function _getRequireWildcardCache(e) { if ('function' != typeof WeakMap) return null; var r = new WeakMap(), @@ -30,10 +29,39 @@ function _interopRequireWildcard(e, r) { } // import stateManger from '../../lib/history'; +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: '', +}; function Maker(props) { const { setField, onSubmit = () => {} } = props; const onClear = (0, _react.useCallback)(() => { - (0, _fieldClear.FieldClear)(setField); + setField(crearField); }, [setField]); // const onBackState = () => { diff --git a/lib/components/html/OptionValidator.js b/lib/components/html/OptionValidator.js index 53b7e43..dc19425 100644 --- a/lib/components/html/OptionValidator.js +++ b/lib/components/html/OptionValidator.js @@ -59,47 +59,48 @@ function OptionValidator(props) { 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, - editMode === 'preview' - ? null - : ''), - /*#__PURE__*/ _react.default.createElement( - 'p', - { - className: (0, _classnames.default)({ - 'acms-admin-text-error': acmscss, - }), - }, - validator.message - ), - editMode === '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', + jsValidator + ? /*#__PURE__*/ _react.default.createElement( + 'div', { - className: 'error-text', + 'data-validator-label': ''.concat(name, '-v-').concat(validator.option), + className: 'validator-result-{'.concat(name, ':v#').concat(validator.option, '}'), }, - /*#__PURE__*/ _react.default.createElement('span', { - className: 'acms-admin-icon acms-admin-icon-attention', - }), - validator.message + /*#__PURE__*/ _react.default.createElement( + 'p', + { + className: 'error-text', + }, + /*#__PURE__*/ _react.default.createElement('span', { + className: 'acms-admin-icon acms-admin-icon-attention', + }), + validator.message + ) + ) + : /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + validator.message && + /*#__PURE__*/ _react.default.createElement( + _react.default.Fragment, + null, + editMode === 'preview' + ? null + : ''), + /*#__PURE__*/ _react.default.createElement( + 'p', + { + className: (0, _classnames.default)({ + 'acms-admin-text-error': acmscss, + }), + }, + validator.message + ), + editMode === 'preview' + ? null + : '') + ) ) - ) ); }), item.converter && diff --git a/lib/components/layouts/GroupSection.js b/lib/components/layouts/GroupSection.js index 7b124a8..f9cd82d 100644 --- a/lib/components/layouts/GroupSection.js +++ b/lib/components/layouts/GroupSection.js @@ -11,6 +11,7 @@ var _Heading = require('../html/Heading'); var _TextInput = require('../html/TextInput'); var _Textarea = require('../html/Textarea'); var _Checkbox = require('../html/Checkbox'); +var _Selectbox = require('../html/Selectbox'); var _MakerContext = require('../../store/MakerContext'); function GroupSection() { const { @@ -172,7 +173,7 @@ function GroupSection() { { className: 'acms-admin-form-item-input', }, - /*#__PURE__*/ _react.default.createElement(_Checkbox.Checkbox, { + /*#__PURE__*/ _react.default.createElement(_Selectbox.Selectbox, { item: item, id: ''.concat(item.name).concat(index), }) @@ -341,6 +342,36 @@ function GroupSection() { ) ); } + case 'selectbox': { + return /*#__PURE__*/ _react.default.createElement( + 'p', + { + key: index, + className: 'acms-admin-form-item', + }, + /*#__PURE__*/ _react.default.createElement( + 'label', + { + className: 'acms-admin-form-item-heading', + htmlFor: ''.concat(item.name).concat(index), + }, + /*#__PURE__*/ _react.default.createElement(_Heading.Heading, { + item: item, + }) + ), + /*#__PURE__*/ _react.default.createElement( + 'span', + { + className: 'acms-admin-form-item-input', + }, + /*#__PURE__*/ _react.default.createElement(_Selectbox.Selectbox, { + item: item, + id: ''.concat(item.name).concat(index), + isValue: false, + }) + ) + ); + } case 'media': { return /*#__PURE__*/ _react.default.createElement( 'p', diff --git a/lib/containers/index.js b/lib/containers/index.js index 2976b67..e130adf 100644 --- a/lib/containers/index.js +++ b/lib/containers/index.js @@ -12,12 +12,13 @@ var _PreviewModeNavigator = require('../components/navigator/PreviewModeNavigato var _PreviewNavigator = require('../components/navigator/PreviewNavigator'); var _Field = require('../components/genelator/Field'); var _FieldGroup = require('../components/genelator/FieldGroup'); -var _Unit = _interopRequireDefault(require('../components/genelator/Unit')); -var _UnitGroup = _interopRequireDefault(require('../components/genelator/UnitGroup')); var _FieldSource = require('../components/FieldSource'); var _FieldGroupSource = require('../components/FieldGroupSource'); var _Highlighter = require('../components/Highlighter'); var _htmlEntities = require('html-entities'); +// import Unit from '../components/genelator/Unit'; +// import UnitGroup from '../components/genelator/UnitGroup'; + const entities = new _htmlEntities.XmlEntities(); function CustomFieldMaker() { const { @@ -43,8 +44,6 @@ function CustomFieldMaker() { /*#__PURE__*/ _react.default.createElement(_EditorModeNavigator.EditorModeNavigator, null), preview.mode === 'normal' && /*#__PURE__*/ _react.default.createElement(_Field.Field, null), preview.mode === 'group' && /*#__PURE__*/ _react.default.createElement(_FieldGroup.FieldGroup, null), - preview.mode === 'unit' && /*#__PURE__*/ _react.default.createElement(_Unit.default, null), - preview.mode === 'unit-group' && /*#__PURE__*/ _react.default.createElement(_UnitGroup.default, null), /*#__PURE__*/ _react.default.createElement( 'div', { diff --git a/src/components/genelator/FieldGroup.jsx b/src/components/genelator/FieldGroup.jsx index cd9ea74..5f921da 100644 --- a/src/components/genelator/FieldGroup.jsx +++ b/src/components/genelator/FieldGroup.jsx @@ -1,7 +1,6 @@ import React, { useCallback, useState } from 'react'; import ReactTooltip from 'react-tooltip'; import { useMakerContext } from '../../store/MakerContext'; -import { FieldClear } from './base/FieldClear'; import { Alert } from './base/Alert'; import { GroupAlert } from './base/GroupAlert'; import { DuplicateAlert } from './base/DuplicateAlert'; @@ -62,6 +61,36 @@ const defaultProps = { groupName: '', }; +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: '', +}; + export function FieldGroup() { const [field, setField] = useState(defaultProps); const { setGroupTitleName, addGroupItem, clearGroupItem } = useMakerContext(); @@ -95,7 +124,7 @@ export function FieldGroup() { const addNewGroup = useCallback(() => { clearGroupItem(); - FieldClear(setField); + setField(crearField); setField((prevState) => ({ ...prevState, openGroup: false, diff --git a/src/components/genelator/_FieldGroup.js b/src/components/genelator/_FieldGroup.js deleted file mode 100644 index 3562915..0000000 --- a/src/components/genelator/_FieldGroup.js +++ /dev/null @@ -1,287 +0,0 @@ -import React from 'react'; -import ReactTooltip from 'react-tooltip'; -import Base from './base'; -import { MakerContext } from '../../store/MakerContext'; - -export default class FieldGroup extends Base { - static contextType = MakerContext; - - // 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 ( -
-

カスタムフィールドグループ

-
- {this.renderGroupAlert()} - {this.renderDuplicateAlert()} - {this.renderAlert()} - {openGroup ? ( -
- -
- ) : ( - - - - - - - - - - - - - - -
- グループのタイトル - - - カスタムフィールドグループのテーブル用のタイトルとなります。 - - 必須 - - フィールド名(変数) - - - カスタムフィールドグループのフィールド名です。値を必ず入力してください。 - - 必須 -
- { - this.updateState('groupTitle', e.target.value); - }} - className="acms-admin-form-width-full" - placeholder="例)スタッフリスト" - /> - - { - this.updateState('groupName', e.target.value); - }} - className="acms-admin-form-width-full" - placeholder="例)group_staff" - /> -
- {openGroup ? ( - - ) : ( - - )} -
- )} - {openGroup && ( -
-
- - - - - - - - - - - -
- グループのタイトル - - - カスタムフィールドグループのテーブル用のタイトルとなります。 - - - フィールド名(変数) - - - カスタムフィールドグループのフィールド名です。値を必ず入力してください。 - -
{groupTitle}{groupName}
- {this.renderModal()} - {this.renderBasic()} -
- {type === 'select' && ( -
- {this.renderSnippet()} - {this.renderOption()} -
- )} - {type === 'radio' && ( -
- {this.renderSnippet()} - {this.renderOption()} -
- )} - {type === 'image' && ( -
- {this.renderImage()} - {this.renderImageResize()} -
- )} - {type === 'file' &&
{this.renderFile()}
} - {type === 'media' &&
{this.renderMediaOption()}
} - {type === 'rich-editor' &&
{this.renderRichEditorOption()}
} - {this.renderValidator()} -

- - - -

-
- )} -
-
- ); - } -} diff --git a/src/components/genelator/base.js b/src/components/genelator/base.js deleted file mode 100644 index df37884..0000000 --- a/src/components/genelator/base.js +++ /dev/null @@ -1,1373 +0,0 @@ -import React, { Component } from 'react'; -// import ReactTooltip from 'react-tooltip'; - -// import { ModalDialog } from '../ModalDialog'; -import stateManger from '../../lib/history'; -// 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, -// }; - -export default class Base extends 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 ( -
-

タイトル

-

- { - this.updateState('title', e.target.value); - }} - /> -

-

name属性

-

- { - 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 = stateManger.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" - // /> - //
- //
- // ); - // } -} diff --git a/src/components/genelator/base/FieldClear.js b/src/components/genelator/base/FieldClear.js deleted file mode 100644 index 3cce10c..0000000 --- a/src/components/genelator/base/FieldClear.js +++ /dev/null @@ -1,34 +0,0 @@ -export 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/src/components/genelator/base/Maker.jsx b/src/components/genelator/base/Maker.jsx index 0638b7b..5a7ffeb 100644 --- a/src/components/genelator/base/Maker.jsx +++ b/src/components/genelator/base/Maker.jsx @@ -1,12 +1,41 @@ import React, { useCallback } from 'react'; -import { FieldClear } from './fieldClear'; // import stateManger from '../../lib/history'; +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: '', +}; + export function Maker(props) { const { setField, onSubmit = () => {} } = props; const onClear = useCallback(() => { - FieldClear(setField); + setField(crearField); }, [setField]); // const onBackState = () => { diff --git a/src/components/html/OptionValidator.jsx b/src/components/html/OptionValidator.jsx index 86db776..b8ea575 100644 --- a/src/components/html/OptionValidator.jsx +++ b/src/components/html/OptionValidator.jsx @@ -29,18 +29,7 @@ export function OptionValidator(props) { value={validator.value} id={`${name}-v-${validator.option}`} /> - {!jsValidator && ( - <> - {validator.message && ( - <> - {editMode === 'preview' ? null : ``} -

{validator.message}

- {editMode === 'preview' ? null : ``} - - )} - - )} - {!jsValidator && ( + {jsValidator ? (
+ ) : ( + <> + {validator.message && ( + <> + {editMode === 'preview' ? null : ``} +

{validator.message}

+ {editMode === 'preview' ? null : ``} + + )} + )} ); diff --git a/src/components/layouts/GroupSection.jsx b/src/components/layouts/GroupSection.jsx index 9503e97..4666103 100644 --- a/src/components/layouts/GroupSection.jsx +++ b/src/components/layouts/GroupSection.jsx @@ -4,6 +4,7 @@ import { Heading } from '../html/Heading'; import { TextInput } from '../html/TextInput'; import { Textarea } from '../html/Textarea'; import { Checkbox } from '../html/Checkbox'; +import { Selectbox } from '../html/Selectbox'; import { useMakerContext } from '../../store/MakerContext'; export function GroupSection() { @@ -74,7 +75,7 @@ export function GroupSection() { - +

); @@ -157,6 +158,18 @@ export function GroupSection() {

); } + case 'selectbox': { + return ( +

+ + + + +

+ ); + } case 'media': { return (

diff --git a/src/containers/index.jsx b/src/containers/index.jsx index 49c7846..21cef5a 100644 --- a/src/containers/index.jsx +++ b/src/containers/index.jsx @@ -5,8 +5,8 @@ import { PreviewModeNavigator } from '../components/navigator/PreviewModeNavigat import { PreviewNavigator } from '../components/navigator/PreviewNavigator'; import { Field } from '../components/genelator/Field'; import { FieldGroup } from '../components/genelator/FieldGroup'; -import Unit from '../components/genelator/Unit'; -import UnitGroup from '../components/genelator/UnitGroup'; +// import Unit from '../components/genelator/Unit'; +// import UnitGroup from '../components/genelator/UnitGroup'; import { FieldSource } from '../components/FieldSource'; import { FieldGroupSource } from '../components/FieldGroupSource'; import { Highlighter } from '../components/Highlighter'; @@ -37,8 +37,8 @@ function CustomFieldMaker() { {preview.mode === 'normal' && } {preview.mode === 'group' && } - {preview.mode === 'unit' && } - {preview.mode === 'unit-group' && } + {/* {preview.mode === 'unit' && } + {preview.mode === 'unit-group' && } */}