@springmicro/page 0.7.19 → 0.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ArrowDownward-BBFybLel.js → ArrowDownward-6TT2xsTw.js} +25 -25
- package/dist/AutoField-V4WS60XG.js +6 -0
- package/dist/{AutoFields-C68bZIjJ.js → AutoFields-BwrU6rNG.js} +8 -8
- package/dist/{AutoForm-CyisvBU7.js → AutoForm-Bo70QAzJ.js} +109 -92
- package/dist/{CarouselPlugin-swMZbFLU.js → CarouselPlugin-gE9hF4rl.js} +1 -1
- package/dist/{Code-WyZGt6uJ.js → Code-D-xA9OqF.js} +3 -3
- package/dist/{CodeSnippet-FdJk-mBV.js → CodeSnippet-CAv40pcm.js} +481 -490
- package/dist/{ColorPicker-BCt_07hn.js → ColorPicker-xdywpCh4.js} +7 -7
- package/dist/{ColorPickerField-BkW_vVyz.js → ColorPickerField-CEbWtauP.js} +4 -4
- package/dist/{ContactFormExample-Dmm6SO5g.js → ContactFormExample-Bl9pxYN4.js} +1 -1
- package/dist/{Controls-ChaYC_F2.js → Controls-JMxv3XiU.js} +9 -9
- package/dist/{CropLandscape-C2pqoTvV.js → CropLandscape-CQa_f_ki.js} +3 -3
- package/dist/{DailyMotion-ByRMGcPP.js → DailyMotion-B1l3sSQa.js} +2 -2
- package/dist/{Error-Dsr70u_Q.js → Error-DBNtNhnk.js} +3 -3
- package/dist/{Facebook-DY4TPgmC.js → Facebook-D9NnLL4k.js} +26 -26
- package/dist/{FilePlayer-DgWSZMO9.js → FilePlayer-CZkJk0qq.js} +2 -2
- package/dist/{FormatAlignCenter-DwkuzF2q.js → FormatAlignCenter-DMVz-uvg.js} +3 -3
- package/dist/{FormatAlignJustify-bqureh8H.js → FormatAlignJustify-m-bX4Lbv.js} +3 -3
- package/dist/{FormatAlignLeft-DmHjcrBw.js → FormatAlignLeft-BjFbNSop.js} +3 -3
- package/dist/{FormatAlignRight-5IeRHAy_.js → FormatAlignRight-HiSoI6kY.js} +3 -3
- package/dist/{FormatBold-C--DiqO6.js → FormatBold-mfXcRYUM.js} +3 -3
- package/dist/{FormatIndentDecrease-BfoGxe6e.js → FormatIndentDecrease-C-cF-4mE.js} +3 -3
- package/dist/{FormatIndentIncrease-Dg0zEWbS.js → FormatIndentIncrease-DgHJnVHq.js} +3 -3
- package/dist/{FormatItalic-Dr4TA8Gq.js → FormatItalic-rsLDCURV.js} +3 -3
- package/dist/{FormatListBulleted-CVgyjLmg.js → FormatListBulleted-CB1VsbVA.js} +3 -3
- package/dist/{FormatListNumbered-BHgYyWvD.js → FormatListNumbered-DrMdRKvy.js} +3 -3
- package/dist/{FormatQuote-BliiLOab.js → FormatQuote-h_vn_zTH.js} +3 -3
- package/dist/{FormatUnderlined-CFdmrbsn.js → FormatUnderlined-B0WfIIch.js} +3 -3
- package/dist/{HtmlToSlate-CR02E1J1.js → HtmlToSlate-CCXkrJHI.js} +3 -3
- package/dist/{ImageControls-CHw3IdvT.js → ImageControls-CR6yw6Rc.js} +1 -1
- package/dist/{ImageUpload-DPNg4z4S.js → ImageUpload-932Cq2AD.js} +19 -19
- package/dist/{Kaltura-CM3qyOON.js → Kaltura-6WS92p_b.js} +2 -2
- package/dist/{Landscape-guK6QtVP.js → Landscape-hLc9iqqb.js} +3 -3
- package/dist/{Link-BK24pTZa.js → Link-CZWohJgi.js} +3 -3
- package/dist/{LongTextField-BQP1mWax.js → LongTextField-Ccavadl0.js} +10 -10
- package/dist/{Looks3-x-E_Cel-.js → Looks3-B96aAx_J.js} +3 -3
- package/dist/{Looks4-CQBNufZ8.js → Looks4-C8XH0Ja_.js} +3 -3
- package/dist/{Looks5-Cu6OuOc-.js → Looks5-VowvuJ03.js} +3 -3
- package/dist/{Looks6-DhMsWwkZ.js → Looks6-Bk6PX1wT.js} +3 -3
- package/dist/{LooksOne-CHxgmX-s.js → LooksOne-BI3ItGnF.js} +3 -3
- package/dist/{LooksTwo-hKbmwJ7I.js → LooksTwo-Cj60-xO-.js} +3 -3
- package/dist/{Mixcloud-DYKoYs7M.js → Mixcloud-DJjE6RKR.js} +10 -10
- package/dist/{Mux-BcIw0c8s.js → Mux-D3qU-RZs.js} +2 -2
- package/dist/{Panorama-BhWpHcDd.js → Panorama-CrKV81Cx.js} +3 -3
- package/dist/{Preview-CxahswBt.js → Preview-DKqFi1Eo.js} +7 -7
- package/dist/{Remove-Dj6dIvbk.js → Remove-BgdAIGsP.js} +3 -3
- package/dist/{Slider-D8UczuuR.js → Slider-BpPCmYCy.js} +62 -62
- package/dist/{SoundCloud-WWm5U08w.js → SoundCloud-BaQBEmzh.js} +14 -14
- package/dist/SpacerResizable-Cz3lCm5H.js +1537 -0
- package/dist/{Streamable-jvCj723H.js → Streamable-CkDECbsP.js} +2 -2
- package/dist/{Subject-BjQeSBNr.js → Subject-B2qPBH1A.js} +3 -3
- package/dist/{TablePlugin-Cm834mDF.js → TablePlugin-tHanKwqg.js} +1 -1
- package/dist/{Twitch-D1qB6Zei.js → Twitch-BU2MU7dE.js} +6 -6
- package/dist/{Vidyard-D0RfxYqE.js → Vidyard-BSvEh8oS.js} +2 -2
- package/dist/{Vimeo-WmVi19ym.js → Vimeo-B00LRaEz.js} +2 -2
- package/dist/{Wistia-C4jsMxVz.js → Wistia-CanKBZYu.js} +4 -4
- package/dist/{YouTube-C6mW1rrV.js → YouTube-Qog3cOGE.js} +4 -4
- package/dist/forEach-Bj4DYHfI.js +8 -0
- package/dist/{index-CahS4ecH.js → index-C3pH7XGB.js} +38984 -39017
- package/dist/{index-CdfOIHyB.js → index-CQEVhMg-.js} +16 -16
- package/dist/{index-B4fFBBmm.js → index-DcXqpW9_.js} +12 -12
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +408 -399
- package/dist/{listUtils-6dc59Hwz.js → listUtils-nbKHtHaj.js} +10 -10
- package/dist/{react-katex-ChGehxId.js → react-katex-kCSG0dpx.js} +2427 -2501
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/AutoField-CahqCCD2.js +0 -6
- package/dist/SpacerResizable-DByW7hvQ.js +0 -1507
- package/dist/forEach-_623SsSU.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { at as S,
|
|
1
|
+
import { at as S, au as N, av as B, _, b5 as L, b6 as W, q as l, j as n, aw as I, aA as z, aB as y, P as e, b7 as D, b8 as V, b9 as H, az as j, ba as Z, aC as J, bb as K, aR as Q, aU as X, bc as Y, r as U, i as T } from "./index-C3pH7XGB.js";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
function oo(o) {
|
|
4
4
|
return S("MuiFormGroup", o);
|
|
@@ -31,13 +31,13 @@ const eo = ["className", "row"], ro = (o) => {
|
|
|
31
31
|
}, o.row && {
|
|
32
32
|
flexDirection: "row"
|
|
33
33
|
})), q = /* @__PURE__ */ i.forwardRef(function(r, a) {
|
|
34
|
-
const t =
|
|
34
|
+
const t = B({
|
|
35
35
|
props: r,
|
|
36
36
|
name: "MuiFormGroup"
|
|
37
37
|
}), {
|
|
38
38
|
className: s,
|
|
39
39
|
row: u = !1
|
|
40
|
-
} = t, m = _(t, eo), v =
|
|
40
|
+
} = t, m = _(t, eo), v = L(), d = W({
|
|
41
41
|
props: t,
|
|
42
42
|
muiFormControl: v,
|
|
43
43
|
states: ["error"]
|
|
@@ -78,13 +78,13 @@ process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
|
78
78
|
*/
|
|
79
79
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
80
80
|
});
|
|
81
|
-
const to =
|
|
81
|
+
const to = D(/* @__PURE__ */ n.jsx("path", {
|
|
82
82
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
83
|
-
}), "RadioButtonUnchecked"), so =
|
|
83
|
+
}), "RadioButtonUnchecked"), so = D(/* @__PURE__ */ n.jsx("path", {
|
|
84
84
|
d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
|
|
85
85
|
}), "RadioButtonChecked"), no = y("span", {
|
|
86
86
|
name: "MuiRadioButtonIcon",
|
|
87
|
-
shouldForwardProp:
|
|
87
|
+
shouldForwardProp: V
|
|
88
88
|
})({
|
|
89
89
|
position: "relative",
|
|
90
90
|
display: "flex"
|
|
@@ -168,7 +168,7 @@ const P = N("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSe
|
|
|
168
168
|
};
|
|
169
169
|
return l({}, r, z(s, uo, r));
|
|
170
170
|
}, mo = y(Z, {
|
|
171
|
-
shouldForwardProp: (o) =>
|
|
171
|
+
shouldForwardProp: (o) => V(o) || o === "classes",
|
|
172
172
|
name: "MuiRadio",
|
|
173
173
|
slot: "Root",
|
|
174
174
|
overridesResolver: (o, r) => {
|
|
@@ -204,43 +204,43 @@ function vo(o, r) {
|
|
|
204
204
|
}
|
|
205
205
|
const F = /* @__PURE__ */ n.jsx(O, {
|
|
206
206
|
checked: !0
|
|
207
|
-
}),
|
|
207
|
+
}), E = /* @__PURE__ */ n.jsx(O, {}), Ro = /* @__PURE__ */ i.forwardRef(function(r, a) {
|
|
208
208
|
var t, s;
|
|
209
|
-
const u =
|
|
209
|
+
const u = B({
|
|
210
210
|
props: r,
|
|
211
211
|
name: "MuiRadio"
|
|
212
212
|
}), {
|
|
213
213
|
checked: m,
|
|
214
214
|
checkedIcon: v = F,
|
|
215
215
|
color: d = "primary",
|
|
216
|
-
icon: f =
|
|
216
|
+
icon: f = E,
|
|
217
217
|
name: R,
|
|
218
218
|
onChange: h,
|
|
219
219
|
size: C = "medium",
|
|
220
220
|
className: b
|
|
221
|
-
} = u,
|
|
221
|
+
} = u, w = _(u, po), x = l({}, u, {
|
|
222
222
|
color: d,
|
|
223
223
|
size: C
|
|
224
|
-
}), g = fo(
|
|
224
|
+
}), g = fo(x), p = lo();
|
|
225
225
|
let c = m;
|
|
226
|
-
const
|
|
226
|
+
const A = H(h, p && p.onChange);
|
|
227
227
|
let k = R;
|
|
228
228
|
return p && (typeof c > "u" && (c = vo(p.value, u.value)), typeof k > "u" && (k = p.name)), /* @__PURE__ */ n.jsx(mo, l({
|
|
229
229
|
type: "radio",
|
|
230
230
|
icon: /* @__PURE__ */ i.cloneElement(f, {
|
|
231
|
-
fontSize: (t =
|
|
231
|
+
fontSize: (t = E.props.fontSize) != null ? t : C
|
|
232
232
|
}),
|
|
233
233
|
checkedIcon: /* @__PURE__ */ i.cloneElement(v, {
|
|
234
234
|
fontSize: (s = F.props.fontSize) != null ? s : C
|
|
235
235
|
}),
|
|
236
|
-
ownerState:
|
|
236
|
+
ownerState: x,
|
|
237
237
|
classes: g,
|
|
238
238
|
name: k,
|
|
239
239
|
checked: c,
|
|
240
|
-
onChange:
|
|
240
|
+
onChange: A,
|
|
241
241
|
ref: a,
|
|
242
242
|
className: I(g.root, b)
|
|
243
|
-
},
|
|
243
|
+
}, w));
|
|
244
244
|
});
|
|
245
245
|
process.env.NODE_ENV !== "production" && (Ro.propTypes = {
|
|
246
246
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
@@ -353,7 +353,7 @@ const Co = ["actions", "children", "className", "defaultValue", "name", "onChang
|
|
|
353
353
|
name: v,
|
|
354
354
|
onChange: d,
|
|
355
355
|
value: f
|
|
356
|
-
} = r, R = _(r, Co), h = i.useRef(null), C = go(r), [b,
|
|
356
|
+
} = r, R = _(r, Co), h = i.useRef(null), C = go(r), [b, w] = Q({
|
|
357
357
|
controlled: f,
|
|
358
358
|
default: m,
|
|
359
359
|
name: "RadioGroup"
|
|
@@ -364,18 +364,18 @@ const Co = ["actions", "children", "className", "defaultValue", "name", "onChang
|
|
|
364
364
|
c || (c = h.current.querySelector("input:not(:disabled)")), c && c.focus();
|
|
365
365
|
}
|
|
366
366
|
}), []);
|
|
367
|
-
const
|
|
367
|
+
const x = X(a, h), g = Y(v), p = i.useMemo(() => ({
|
|
368
368
|
name: g,
|
|
369
369
|
onChange(c) {
|
|
370
|
-
|
|
370
|
+
w(c.target.value), d && d(c, c.target.value);
|
|
371
371
|
},
|
|
372
372
|
value: b
|
|
373
|
-
}), [g, d,
|
|
373
|
+
}), [g, d, w, b]);
|
|
374
374
|
return /* @__PURE__ */ n.jsx($.Provider, {
|
|
375
375
|
value: p,
|
|
376
376
|
children: /* @__PURE__ */ n.jsx(q, l({
|
|
377
377
|
role: "radiogroup",
|
|
378
|
-
ref:
|
|
378
|
+
ref: x,
|
|
379
379
|
className: I(C.root, u)
|
|
380
380
|
}, R, {
|
|
381
381
|
children: s
|
|
@@ -421,8 +421,8 @@ var G = {}, bo = T;
|
|
|
421
421
|
Object.defineProperty(G, "__esModule", {
|
|
422
422
|
value: !0
|
|
423
423
|
});
|
|
424
|
-
var
|
|
425
|
-
|
|
424
|
+
var wo = G.default = void 0, xo = bo(U()), jo = n;
|
|
425
|
+
wo = G.default = (0, xo.default)(/* @__PURE__ */ (0, jo.jsx)("path", {
|
|
426
426
|
d: "m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"
|
|
427
427
|
}), "ArrowUpward");
|
|
428
428
|
var M = {}, ko = T;
|
|
@@ -438,5 +438,5 @@ export {
|
|
|
438
438
|
yo as R,
|
|
439
439
|
So as a,
|
|
440
440
|
Ro as b,
|
|
441
|
-
|
|
441
|
+
wo as d
|
|
442
442
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { A as l } from "./LongTextField-
|
|
1
|
+
import { A as l } from "./LongTextField-Ccavadl0.js";
|
|
2
2
|
import { createElement as m } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { as as n } from "./index-C3pH7XGB.js";
|
|
4
4
|
function p({
|
|
5
5
|
autoField: o = l,
|
|
6
|
-
element:
|
|
7
|
-
fields:
|
|
8
|
-
omitFields:
|
|
6
|
+
element: s = "div",
|
|
7
|
+
fields: a,
|
|
8
|
+
omitFields: i = [],
|
|
9
9
|
showInlineError: t,
|
|
10
|
-
...
|
|
10
|
+
...r
|
|
11
11
|
}) {
|
|
12
12
|
const { schema: u } = n();
|
|
13
13
|
return m(
|
|
14
|
-
a,
|
|
15
14
|
s,
|
|
16
|
-
|
|
15
|
+
r,
|
|
16
|
+
(a ?? u.getSubfields()).filter((e) => !i.includes(e)).map(
|
|
17
17
|
(e) => m(
|
|
18
18
|
o,
|
|
19
19
|
Object.assign(
|
|
@@ -1,91 +1,108 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as _, a7 as E, a8 as I, a9 as V, aa as v, ab as N, ac as D, N as A, ad as R, ae as L, af as w, K as T, ag as U, ah as G, ai as K, aj as Q, ak as W, al as m, am as f, an as F, ao as q, ap as Y, aq as k, ar as H, j as b } from "./index-C3pH7XGB.js";
|
|
2
2
|
import h, { Component as J, forwardRef as X } from "react";
|
|
3
|
-
import { A as
|
|
4
|
-
var Z =
|
|
3
|
+
import { A as y } from "./LongTextField-Ccavadl0.js";
|
|
4
|
+
var Z = E, z = 4;
|
|
5
5
|
function B(s) {
|
|
6
6
|
return Z(s, z);
|
|
7
7
|
}
|
|
8
8
|
var tt = B;
|
|
9
|
-
const u = /* @__PURE__ */
|
|
10
|
-
var et =
|
|
9
|
+
const u = /* @__PURE__ */ _(tt);
|
|
10
|
+
var et = I, st = V;
|
|
11
11
|
function nt(s, e) {
|
|
12
12
|
return e.length < 2 ? s : et(s, st(e, 0, -1));
|
|
13
13
|
}
|
|
14
|
-
var it = nt, at = v, rt = D, ot = it, lt =
|
|
15
|
-
function
|
|
16
|
-
|
|
14
|
+
var it = nt, at = v, rt = D, ot = it, lt = N, dt = Object.prototype, ut = dt.hasOwnProperty;
|
|
15
|
+
function ht(s, e) {
|
|
16
|
+
e = at(e, s);
|
|
17
|
+
var i = -1, t = e.length;
|
|
18
|
+
if (!t)
|
|
19
|
+
return !0;
|
|
20
|
+
for (var n = s == null || typeof s != "object" && typeof s != "function"; ++i < t; ) {
|
|
21
|
+
var a = e[i];
|
|
22
|
+
if (typeof a == "string") {
|
|
23
|
+
if (a === "__proto__" && !ut.call(s, "__proto__"))
|
|
24
|
+
return !1;
|
|
25
|
+
if (a === "constructor" && i + 1 < t && typeof e[i + 1] == "string" && e[i + 1] === "prototype") {
|
|
26
|
+
if (n && i === 0)
|
|
27
|
+
continue;
|
|
28
|
+
return !1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
var o = ot(s, e);
|
|
33
|
+
return o == null || delete o[lt(rt(e))];
|
|
17
34
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
35
|
+
var ct = ht, mt = A;
|
|
36
|
+
function gt(s) {
|
|
37
|
+
return mt(s) ? void 0 : s;
|
|
21
38
|
}
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
return
|
|
39
|
+
var ft = gt, pt = w, bt = L, _t = R;
|
|
40
|
+
function vt(s) {
|
|
41
|
+
return _t(bt(s, void 0, pt), s + "");
|
|
25
42
|
}
|
|
26
|
-
var Ct =
|
|
43
|
+
var Ct = vt, St = T, Ot = E, xt = ct, Ft = v, yt = U, Mt = ft, Pt = Ct, Et = G, Nt = 1, $t = 2, jt = 4, It = Pt(function(s, e) {
|
|
27
44
|
var i = {};
|
|
28
45
|
if (s == null)
|
|
29
46
|
return i;
|
|
30
47
|
var t = !1;
|
|
31
|
-
e =
|
|
32
|
-
return a =
|
|
33
|
-
}),
|
|
48
|
+
e = St(e, function(a) {
|
|
49
|
+
return a = Ft(a, s), t || (t = a.length > 1), a;
|
|
50
|
+
}), yt(s, Et(s), i), t && (i = Ot(i, Nt | $t | jt, Mt));
|
|
34
51
|
for (var n = e.length; n--; )
|
|
35
|
-
|
|
52
|
+
xt(i, e[n]);
|
|
36
53
|
return i;
|
|
37
|
-
}),
|
|
38
|
-
const
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
if (!
|
|
54
|
+
}), Vt = It;
|
|
55
|
+
const C = /* @__PURE__ */ _(Vt);
|
|
56
|
+
var Dt = W, At = v, Rt = Q, M = K, Lt = N;
|
|
57
|
+
function wt(s, e, i, t) {
|
|
58
|
+
if (!M(s))
|
|
42
59
|
return s;
|
|
43
|
-
e =
|
|
44
|
-
for (var n = -1, a = e.length,
|
|
45
|
-
var
|
|
46
|
-
if (
|
|
60
|
+
e = At(e, s);
|
|
61
|
+
for (var n = -1, a = e.length, o = a - 1, r = s; r != null && ++n < a; ) {
|
|
62
|
+
var l = Lt(e[n]), d = i;
|
|
63
|
+
if (l === "__proto__" || l === "constructor" || l === "prototype")
|
|
47
64
|
return s;
|
|
48
|
-
if (n !=
|
|
49
|
-
var g = r[
|
|
50
|
-
d = t ? t(g,
|
|
65
|
+
if (n != o) {
|
|
66
|
+
var g = r[l];
|
|
67
|
+
d = t ? t(g, l, r) : void 0, d === void 0 && (d = M(g) ? g : Rt(e[n + 1]) ? [] : {});
|
|
51
68
|
}
|
|
52
|
-
|
|
69
|
+
Dt(r, l, d), r = r[l];
|
|
53
70
|
}
|
|
54
71
|
return s;
|
|
55
72
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
return t = typeof t == "function" ? t : void 0, s == null ? s :
|
|
73
|
+
var Tt = wt, Ut = Tt;
|
|
74
|
+
function Gt(s, e, i, t) {
|
|
75
|
+
return t = typeof t == "function" ? t : void 0, s == null ? s : Ut(s, e, i, t);
|
|
59
76
|
}
|
|
60
|
-
var
|
|
61
|
-
const S = /* @__PURE__ */
|
|
62
|
-
function
|
|
77
|
+
var Kt = Gt;
|
|
78
|
+
const S = /* @__PURE__ */ _(Kt);
|
|
79
|
+
function P(s) {
|
|
63
80
|
return !!s && s === Object(s) && !(s instanceof Date);
|
|
64
81
|
}
|
|
65
|
-
function
|
|
66
|
-
if (!
|
|
67
|
-
return
|
|
82
|
+
function Qt(s, e, i) {
|
|
83
|
+
if (!P(e) || i && typeof e != typeof i)
|
|
84
|
+
return m(e, i) ? [] : [s];
|
|
68
85
|
const t = [s];
|
|
69
|
-
if (
|
|
86
|
+
if (P(i)) {
|
|
70
87
|
for (const n in e)
|
|
71
|
-
(!(n in i) || !
|
|
88
|
+
(!(n in i) || !m(e[n], i[n])) && t.push(f(s, n));
|
|
72
89
|
for (const n in i)
|
|
73
|
-
n in e || t.push(
|
|
90
|
+
n in e || t.push(f(s, n));
|
|
74
91
|
t.length === 1 && t.pop();
|
|
75
92
|
} else
|
|
76
93
|
for (const n in e)
|
|
77
|
-
t.push(
|
|
94
|
+
t.push(f(s, n));
|
|
78
95
|
return t;
|
|
79
96
|
}
|
|
80
|
-
function
|
|
97
|
+
function $(s) {
|
|
81
98
|
let e = 0;
|
|
82
99
|
return () => `${s}-${("000" + (e++).toString(36)).slice(-4)}`;
|
|
83
100
|
}
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
return
|
|
101
|
+
const Wt = $("uniforms");
|
|
102
|
+
function qt(s = Wt()) {
|
|
103
|
+
return $(s);
|
|
87
104
|
}
|
|
88
|
-
class
|
|
105
|
+
class c extends J {
|
|
89
106
|
constructor(e) {
|
|
90
107
|
super(e), this.state = {
|
|
91
108
|
changed: !1,
|
|
@@ -93,7 +110,7 @@ class m extends J {
|
|
|
93
110
|
resetCount: 0,
|
|
94
111
|
submitted: !1,
|
|
95
112
|
submitting: !1
|
|
96
|
-
}, this.mounted = !1, this.randomId =
|
|
113
|
+
}, this.mounted = !1, this.randomId = qt(this.props.id), this.onReset = this.reset = this.onReset.bind(this), this.onChange = this.change = this.onChange.bind(this), this.onSubmit = this.submit = this.onSubmit.bind(this);
|
|
97
114
|
const i = this.getModel.bind(this);
|
|
98
115
|
this.getModel = (t, n = i(t)) => t !== void 0 && this.props.modelTransform ? this.props.modelTransform(t, n) : n;
|
|
99
116
|
}
|
|
@@ -156,7 +173,7 @@ class m extends J {
|
|
|
156
173
|
return i;
|
|
157
174
|
}
|
|
158
175
|
getNativeFormProps() {
|
|
159
|
-
const e =
|
|
176
|
+
const e = C(this.props, [
|
|
160
177
|
"autosave",
|
|
161
178
|
"autosaveDelay",
|
|
162
179
|
"disabled",
|
|
@@ -180,12 +197,12 @@ class m extends J {
|
|
|
180
197
|
}
|
|
181
198
|
onChange(e, i) {
|
|
182
199
|
if (this.mounted) {
|
|
183
|
-
const t =
|
|
200
|
+
const t = Qt(e, i, F(this.getModel(), e));
|
|
184
201
|
t.length !== 0 && this.setState((n) => (
|
|
185
202
|
// If all are already marked, we can skip the update completely.
|
|
186
203
|
n.changed && t.every((a) => !!F(n.changedMap, a)) ? null : {
|
|
187
204
|
changed: !0,
|
|
188
|
-
changedMap: t.reduce((a,
|
|
205
|
+
changedMap: t.reduce((a, o) => S(a, o, {}, u), u(n.changedMap))
|
|
189
206
|
}
|
|
190
207
|
));
|
|
191
208
|
}
|
|
@@ -216,14 +233,14 @@ class m extends J {
|
|
|
216
233
|
}
|
|
217
234
|
render() {
|
|
218
235
|
return h.createElement(
|
|
219
|
-
|
|
236
|
+
q.Provider,
|
|
220
237
|
{ value: this.getContext() },
|
|
221
238
|
h.createElement("form", Object.assign({}, this.getNativeFormProps()))
|
|
222
239
|
);
|
|
223
240
|
}
|
|
224
241
|
}
|
|
225
|
-
|
|
226
|
-
|
|
242
|
+
c.displayName = "Form";
|
|
243
|
+
c.defaultProps = {
|
|
227
244
|
autosave: !1,
|
|
228
245
|
autosaveDelay: 0,
|
|
229
246
|
error: null,
|
|
@@ -233,13 +250,13 @@ m.defaultProps = {
|
|
|
233
250
|
onSubmit() {
|
|
234
251
|
}
|
|
235
252
|
};
|
|
236
|
-
function
|
|
253
|
+
function O(s) {
|
|
237
254
|
class e extends s {
|
|
238
255
|
getNativeFormProps() {
|
|
239
|
-
const t = super.getNativeFormProps(), { autoField: n = this.getAutoField(), errorsField: a = this.getErrorsField(), submitField:
|
|
240
|
-
return r.children || (r.children = this.getContextSchema().getSubfields().map((
|
|
256
|
+
const t = super.getNativeFormProps(), { autoField: n = this.getAutoField(), errorsField: a = this.getErrorsField(), submitField: o = this.getSubmitField() } = t, r = Y(t, ["autoField", "errorsField", "submitField"]);
|
|
257
|
+
return r.children || (r.children = this.getContextSchema().getSubfields().map((l) => h.createElement(n, { key: l, name: l })).concat([
|
|
241
258
|
h.createElement(a, { key: "$ErrorsField" }),
|
|
242
|
-
h.createElement(
|
|
259
|
+
h.createElement(o, { key: "$SubmitField" })
|
|
243
260
|
])), r;
|
|
244
261
|
}
|
|
245
262
|
getAutoField() {
|
|
@@ -252,10 +269,10 @@ function x(s) {
|
|
|
252
269
|
return () => null;
|
|
253
270
|
}
|
|
254
271
|
}
|
|
255
|
-
return e.Quick =
|
|
272
|
+
return e.Quick = O, e.displayName = `Quick${s.displayName}`, e;
|
|
256
273
|
}
|
|
257
|
-
|
|
258
|
-
function
|
|
274
|
+
O(c);
|
|
275
|
+
function x(s) {
|
|
259
276
|
class e extends s {
|
|
260
277
|
constructor(t) {
|
|
261
278
|
super(t), this.state = Object.assign(Object.assign({}, this.state), { error: null, validate: !1, validating: !1, validator: this.getContextSchema().getValidator(t.validator) }), this.onValidate = this.validate = this.onValidate.bind(this), this.onValidateModel = this.validateModel = this.onValidateModel.bind(this);
|
|
@@ -269,7 +286,7 @@ function O(s) {
|
|
|
269
286
|
}
|
|
270
287
|
getNativeFormProps() {
|
|
271
288
|
const t = super.getNativeFormProps();
|
|
272
|
-
return
|
|
289
|
+
return C(t, [
|
|
273
290
|
"onValidate",
|
|
274
291
|
"validate",
|
|
275
292
|
"validator"
|
|
@@ -277,65 +294,65 @@ function O(s) {
|
|
|
277
294
|
}
|
|
278
295
|
componentDidUpdate(t, n, a) {
|
|
279
296
|
super.componentDidUpdate(t, n, a);
|
|
280
|
-
const { model:
|
|
297
|
+
const { model: o, schema: r, validate: l, validator: d } = this.props;
|
|
281
298
|
r !== t.schema || d !== t.validator ? this.setState({ validator: r.getValidator(d) }, () => {
|
|
282
|
-
|
|
283
|
-
}) : !
|
|
299
|
+
p(l, this.state.validate) && this.onValidate();
|
|
300
|
+
}) : !m(o, t.model) && p(l, this.state.validate) && this.onValidateModel(o);
|
|
284
301
|
}
|
|
285
302
|
onChange(t, n) {
|
|
286
|
-
|
|
303
|
+
p(this.props.validate, this.state.validate) && this.onValidate(t, n), super.onChange(t, n);
|
|
287
304
|
}
|
|
288
305
|
__reset(t) {
|
|
289
306
|
return Object.assign(Object.assign({}, super.__reset(t)), { error: null, validate: !1, validating: !1 });
|
|
290
307
|
}
|
|
291
308
|
onSubmit(t) {
|
|
292
309
|
t && (t.preventDefault(), t.stopPropagation()), this.setState({ submitted: !0, validate: !0 });
|
|
293
|
-
const n = this.onValidate().then((a) => a !== null ? Promise.reject(a) : super.onSubmit().catch((
|
|
294
|
-
throw this.setState({ error:
|
|
310
|
+
const n = this.onValidate().then((a) => a !== null ? Promise.reject(a) : super.onSubmit().catch((o) => {
|
|
311
|
+
throw this.setState({ error: o }), o;
|
|
295
312
|
}));
|
|
296
|
-
return n.catch(
|
|
313
|
+
return n.catch(k), n;
|
|
297
314
|
}
|
|
298
315
|
onValidate(t, n) {
|
|
299
316
|
let a = this.getContextModel();
|
|
300
317
|
return a && t && (a = S(u(a), t, H(n), u)), this.onValidateModel(a);
|
|
301
318
|
}
|
|
302
319
|
onValidateModel(t) {
|
|
303
|
-
const n = this.getModel("validate", t), a =
|
|
320
|
+
const n = this.getModel("validate", t), a = Yt(() => {
|
|
304
321
|
this.setState({ validating: !0 });
|
|
305
322
|
});
|
|
306
|
-
return a(this.state.validator(n), (
|
|
307
|
-
var
|
|
308
|
-
return r = this.props.error === r ? null : r, this.setState((d) => d.error === r && !d.validating ? null : { error: r, validating: !1 }), Promise.resolve((
|
|
323
|
+
return a(this.state.validator(n), (o = null) => a(this.props.onValidate(n, o), (r = null) => {
|
|
324
|
+
var l;
|
|
325
|
+
return r = this.props.error === r ? null : r, this.setState((d) => d.error === r && !d.validating ? null : { error: r, validating: !1 }), Promise.resolve((l = this.props.error) !== null && l !== void 0 ? l : r);
|
|
309
326
|
}));
|
|
310
327
|
}
|
|
311
328
|
}
|
|
312
|
-
return e.Validated =
|
|
329
|
+
return e.Validated = x, e.displayName = `Validated${s.displayName}`, e.defaultProps = Object.assign(Object.assign({}, s.defaultProps), { onValidate(i, t) {
|
|
313
330
|
return t;
|
|
314
331
|
}, validate: "onChangeAfterSubmit" }), e;
|
|
315
332
|
}
|
|
316
|
-
function
|
|
333
|
+
function Yt(s) {
|
|
317
334
|
function e(i, t) {
|
|
318
335
|
return i instanceof Promise ? (s(), i.then(t)) : t(i);
|
|
319
336
|
}
|
|
320
337
|
return e;
|
|
321
338
|
}
|
|
322
|
-
function
|
|
339
|
+
function p(s, e) {
|
|
323
340
|
return s === "onChange" || s === "onChangeAfterSubmit" && e;
|
|
324
341
|
}
|
|
325
|
-
|
|
326
|
-
const kt = O(
|
|
327
|
-
function
|
|
342
|
+
x(c);
|
|
343
|
+
const kt = x(O(c));
|
|
344
|
+
function j(s) {
|
|
328
345
|
class e extends s {
|
|
329
346
|
constructor(t) {
|
|
330
347
|
super(t), this.state = Object.assign(Object.assign({}, this.state), { model: t.model });
|
|
331
348
|
}
|
|
332
349
|
componentDidUpdate(t, n, a) {
|
|
333
|
-
const { model:
|
|
334
|
-
|
|
350
|
+
const { model: o } = this.props;
|
|
351
|
+
m(o, t.model) || this.setState({ model: o }), super.componentDidUpdate(t, n, a);
|
|
335
352
|
}
|
|
336
353
|
getNativeFormProps() {
|
|
337
354
|
const t = super.getNativeFormProps();
|
|
338
|
-
return
|
|
355
|
+
return C(t, ["onChangeModel"]);
|
|
339
356
|
}
|
|
340
357
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
341
358
|
getModel(t) {
|
|
@@ -350,20 +367,20 @@ function I(s) {
|
|
|
350
367
|
return Object.assign(Object.assign({}, super.__reset(t)), { model: this.props.model });
|
|
351
368
|
}
|
|
352
369
|
}
|
|
353
|
-
return e.Auto =
|
|
370
|
+
return e.Auto = j, e.displayName = `Auto${s.displayName}`, e;
|
|
354
371
|
}
|
|
355
|
-
const
|
|
356
|
-
|
|
372
|
+
const Ht = j(kt), Jt = ({ children: s }) => /* @__PURE__ */ b.jsx(
|
|
373
|
+
y.componentDetectorContext.Provider,
|
|
357
374
|
{
|
|
358
375
|
value: (e, i) => {
|
|
359
376
|
var n;
|
|
360
|
-
return ((n = e.showIf) == null ? void 0 : n.call(e, i.model)) ?? !0 ? e._customComponent ? e._customComponent :
|
|
377
|
+
return ((n = e.showIf) == null ? void 0 : n.call(e, i.model)) ?? !0 ? e._customComponent ? e._customComponent : y.defaultComponentDetector(e, i) : () => null;
|
|
361
378
|
},
|
|
362
379
|
children: s
|
|
363
380
|
}
|
|
364
|
-
),
|
|
365
|
-
(s, e) => /* @__PURE__ */ b.jsx(
|
|
381
|
+
), Bt = X(
|
|
382
|
+
(s, e) => /* @__PURE__ */ b.jsx(Jt, { children: /* @__PURE__ */ b.jsx(Ht, { ...s, ref: e }) })
|
|
366
383
|
);
|
|
367
384
|
export {
|
|
368
|
-
|
|
385
|
+
Bt as default
|
|
369
386
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as A, g as hn, h as Zn, k as Kn, l as wt, m as yt, n as vt, o as Ct, p as Et } from "./index-
|
|
1
|
+
import { j as A, g as hn, h as Zn, k as Kn, l as wt, m as yt, n as vt, o as Ct, p as Et } from "./index-C3pH7XGB.js";
|
|
2
2
|
import * as R from "react";
|
|
3
3
|
import { useRef as Qn, useState as Jn, useCallback as It, useEffect as Nn, forwardRef as nt, createElement as Tn } from "react";
|
|
4
4
|
function Lt(n) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as f, j as l, i as s } from "./index-C3pH7XGB.js";
|
|
2
2
|
function d(o, n) {
|
|
3
3
|
for (var a = 0; a < n.length; a++) {
|
|
4
4
|
const e = n[a];
|
|
@@ -15,11 +15,11 @@ function d(o, n) {
|
|
|
15
15
|
}
|
|
16
16
|
return Object.freeze(Object.defineProperty(o, Symbol.toStringTag, { value: "Module" }));
|
|
17
17
|
}
|
|
18
|
-
var t = {}, c =
|
|
18
|
+
var t = {}, c = s;
|
|
19
19
|
Object.defineProperty(t, "__esModule", {
|
|
20
20
|
value: !0
|
|
21
21
|
});
|
|
22
|
-
var i = t.default = void 0, p = c(
|
|
22
|
+
var i = t.default = void 0, p = c(f()), g = l;
|
|
23
23
|
i = t.default = (0, p.default)(/* @__PURE__ */ (0, g.jsx)("path", {
|
|
24
24
|
d: "M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"
|
|
25
25
|
}), "Code");
|