@entropic-bond/crud-panel 4.1.2 → 4.1.3
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.
|
@@ -63,19 +63,19 @@ function tn(n, t, s) {
|
|
|
63
63
|
if (Mt.randomUUID && !t && !n)
|
|
64
64
|
return Mt.randomUUID();
|
|
65
65
|
n = n || {};
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
66
|
+
const c = n.random || (n.rng || Xr)();
|
|
67
|
+
if (c[6] = c[6] & 15 | 64, c[8] = c[8] & 63 | 128, t) {
|
|
68
68
|
s = s || 0;
|
|
69
|
-
for (let
|
|
70
|
-
t[s +
|
|
69
|
+
for (let l = 0; l < 16; ++l)
|
|
70
|
+
t[s + l] = c[l];
|
|
71
71
|
return t;
|
|
72
72
|
}
|
|
73
|
-
return Zr(
|
|
73
|
+
return Zr(c);
|
|
74
74
|
}
|
|
75
|
-
var rn = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, on = (n, t, s,
|
|
76
|
-
for (var
|
|
77
|
-
(D = n[y]) && (
|
|
78
|
-
return
|
|
75
|
+
var rn = Object.defineProperty, nn = Object.getOwnPropertyDescriptor, on = (n, t, s, c) => {
|
|
76
|
+
for (var l = c > 1 ? void 0 : c ? nn(t, s) : t, y = n.length - 1, D; y >= 0; y--)
|
|
77
|
+
(D = n[y]) && (l = (c ? D(t, s, l) : D(l)) || l);
|
|
78
|
+
return c && l && rn(t, s, l), l;
|
|
79
79
|
}, x;
|
|
80
80
|
const xt = (x = class {
|
|
81
81
|
/**
|
|
@@ -244,8 +244,8 @@ const xt = (x = class {
|
|
|
244
244
|
}
|
|
245
245
|
fromObj(n) {
|
|
246
246
|
return this._persistentProperties ? (this._persistentProperties.forEach((t) => {
|
|
247
|
-
const s = this.removeUnderscore(t),
|
|
248
|
-
|
|
247
|
+
const s = this.removeUnderscore(t), c = n[s];
|
|
248
|
+
c != null && (this[t.name] = this.fromDeepObject(c));
|
|
249
249
|
}), this) : this;
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
@@ -270,8 +270,8 @@ const xt = (x = class {
|
|
|
270
270
|
if (!this.className)
|
|
271
271
|
throw new Error("You should register this class prior to streaming it.");
|
|
272
272
|
return this._persistentProperties.forEach((s) => {
|
|
273
|
-
const
|
|
274
|
-
|
|
273
|
+
const c = this[s.name], l = this.removeUnderscore(s);
|
|
274
|
+
c != null && (s.isReference ? t[l] = this.toReferenceObj(s, n) : t[l] = this.toDeepObj(c, n), s.searchableArray && (t[x.searchableArrayNameFor(l)] = c.map((y) => y.id)));
|
|
275
275
|
}), t.__className = this.className, t;
|
|
276
276
|
}
|
|
277
277
|
static searchableArrayNameFor(n) {
|
|
@@ -291,7 +291,7 @@ const xt = (x = class {
|
|
|
291
291
|
if (typeof n == "object") {
|
|
292
292
|
const t = {};
|
|
293
293
|
return Object.entries(n).forEach(
|
|
294
|
-
([s,
|
|
294
|
+
([s, c]) => t[s] = this.fromDeepObject(c)
|
|
295
295
|
), t;
|
|
296
296
|
}
|
|
297
297
|
return n;
|
|
@@ -307,36 +307,36 @@ const xt = (x = class {
|
|
|
307
307
|
if (typeof n == "object") {
|
|
308
308
|
const s = {};
|
|
309
309
|
return Object.entries(n).forEach(
|
|
310
|
-
([
|
|
310
|
+
([c, l]) => s[c] = this.toDeepObj(l, t)
|
|
311
311
|
), s;
|
|
312
312
|
}
|
|
313
313
|
return n;
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
toReferenceObj(n, t) {
|
|
317
|
-
const s = this[n.name],
|
|
317
|
+
const s = this[n.name], c = (l) => {
|
|
318
318
|
let y;
|
|
319
|
-
return typeof n.storeInCollection == "function" ? y = n.storeInCollection(
|
|
319
|
+
return typeof n.storeInCollection == "function" ? y = n.storeInCollection(l, n) : y = n.storeInCollection || l.className, y;
|
|
320
320
|
};
|
|
321
|
-
return Array.isArray(s) ? s.map((
|
|
321
|
+
return Array.isArray(s) ? s.map((l) => (n.isPureReference || this.pushDocument(t, c(l), l), this.buildRefObject(l, c(l), n.forcedPersistentProps))) : (n.isPureReference || this.pushDocument(t, c(s), s), this.buildRefObject(s, c(s), n.forcedPersistentProps));
|
|
322
322
|
}
|
|
323
323
|
buildRefObject(n, t, s) {
|
|
324
|
-
const
|
|
324
|
+
const c = s == null ? void 0 : s.reduce((l, y) => (n[y] !== void 0 && (l[y] = n[y]), l), {});
|
|
325
325
|
return {
|
|
326
326
|
id: n.id,
|
|
327
327
|
__className: n.className || n.__className,
|
|
328
328
|
__documentReference: {
|
|
329
329
|
storedInCollection: t
|
|
330
330
|
},
|
|
331
|
-
...
|
|
331
|
+
...c
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
pushDocument(n, t, s) {
|
|
335
335
|
if ("__documentReference" in s && s.__documentReference)
|
|
336
336
|
return;
|
|
337
337
|
n[t] || (n[t] = []);
|
|
338
|
-
const
|
|
339
|
-
n[t].push(
|
|
338
|
+
const c = this.toDeepObj(s, n);
|
|
339
|
+
n[t].push(c);
|
|
340
340
|
}
|
|
341
341
|
removeUnderscore(n) {
|
|
342
342
|
return n.name.slice(1);
|
|
@@ -351,7 +351,7 @@ const xt = (x = class {
|
|
|
351
351
|
try {
|
|
352
352
|
return new (x.classFactory(n.__className))().fromObject(n);
|
|
353
353
|
} catch (t) {
|
|
354
|
-
const s = Object.entries(n).filter(([
|
|
354
|
+
const s = Object.entries(n).filter(([c, l]) => l != null && typeof l != "function").map(([c, l]) => `${c}: ${l}`).join(`,
|
|
355
355
|
`);
|
|
356
356
|
throw new Error(`${t}
|
|
357
357
|
-----> Class name not found in object:
|
|
@@ -375,8 +375,8 @@ function de(n, t) {
|
|
|
375
375
|
function sn(n) {
|
|
376
376
|
return function(t, s) {
|
|
377
377
|
Object.getOwnPropertyDescriptor(t, "_persistentProperties") || (t._persistentProperties ? t._persistentProperties = [...t._persistentProperties] : t._persistentProperties = []);
|
|
378
|
-
const
|
|
379
|
-
|
|
378
|
+
const c = t._persistentProperties.find((l) => l.name === s);
|
|
379
|
+
c ? Object.assign(c, n) : t._persistentProperties.push({
|
|
380
380
|
name: s,
|
|
381
381
|
...n
|
|
382
382
|
});
|
|
@@ -416,10 +416,10 @@ function un(n, t) {
|
|
|
416
416
|
s.prototype.__className = n;
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
var cn = Object.defineProperty, ln = Object.getOwnPropertyDescriptor, fn = (n, t, s,
|
|
420
|
-
for (var
|
|
421
|
-
(D = n[y]) && (
|
|
422
|
-
return
|
|
419
|
+
var cn = Object.defineProperty, ln = Object.getOwnPropertyDescriptor, fn = (n, t, s, c) => {
|
|
420
|
+
for (var l = c > 1 ? void 0 : c ? ln(t, s) : t, y = n.length - 1, D; y >= 0; y--)
|
|
421
|
+
(D = n[y]) && (l = (c ? D(t, s, l) : D(l)) || l);
|
|
422
|
+
return c && l && cn(t, s, l), l;
|
|
423
423
|
};
|
|
424
424
|
let Ze = class extends be {
|
|
425
425
|
constructor(n = "") {
|
|
@@ -449,8 +449,8 @@ let Ze = class extends be {
|
|
|
449
449
|
save(n, t) {
|
|
450
450
|
const s = n;
|
|
451
451
|
this._onProgress && this._onProgress(0, 100), this.mockFileSystem[n] = JSON.stringify(t), this._onProgress && this._onProgress(100, 100);
|
|
452
|
-
const
|
|
453
|
-
return this.resolveWithDelay(
|
|
452
|
+
const c = t instanceof File ? t.name : s;
|
|
453
|
+
return this.resolveWithDelay(c);
|
|
454
454
|
}
|
|
455
455
|
uploadControl() {
|
|
456
456
|
return {
|
|
@@ -473,18 +473,18 @@ let Ze = class extends be {
|
|
|
473
473
|
Ze = fn([
|
|
474
474
|
un("MockCloudStorage", () => new Ze())
|
|
475
475
|
], Ze);
|
|
476
|
-
var dn = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, pe = (n, t, s,
|
|
477
|
-
for (var
|
|
478
|
-
(D = n[y]) && (
|
|
479
|
-
return
|
|
476
|
+
var dn = Object.defineProperty, pn = Object.getOwnPropertyDescriptor, pe = (n, t, s, c) => {
|
|
477
|
+
for (var l = c > 1 ? void 0 : c ? pn(t, s) : t, y = n.length - 1, D; y >= 0; y--)
|
|
478
|
+
(D = n[y]) && (l = (c ? D(t, s, l) : D(l)) || l);
|
|
479
|
+
return c && l && dn(t, s, l), l;
|
|
480
480
|
};
|
|
481
481
|
let ne = class extends Wt {
|
|
482
482
|
constructor() {
|
|
483
483
|
super(...arguments), this._onChange = new Le();
|
|
484
484
|
}
|
|
485
|
-
async save({ data: n, fileName: t, progress: s, cloudStorageProvider:
|
|
486
|
-
const
|
|
487
|
-
|
|
485
|
+
async save({ data: n, fileName: t, progress: s, cloudStorageProvider: c } = {}) {
|
|
486
|
+
const l = n || this._pendingData;
|
|
487
|
+
l && (this._reference && await this.delete(), this.provider = c || be.defaultCloudStorage, this._originalFileName = t || (l instanceof File ? l.name : void 0), this._reference = await this.provider.save(this.id, l, s), this._url = await this.provider.getUrl(this._reference), this._pendingData = void 0, this._onChange.notify({ event: 0, storedFile: this }));
|
|
488
488
|
}
|
|
489
489
|
uploadControl() {
|
|
490
490
|
return this.provider.uploadControl();
|
|
@@ -547,7 +547,7 @@ ne = pe([
|
|
|
547
547
|
function hn(n, t = "-") {
|
|
548
548
|
if (!n)
|
|
549
549
|
return "";
|
|
550
|
-
const s = n.slice(1).replace(/( |[A-Z])/g, (
|
|
550
|
+
const s = n.slice(1).replace(/( |[A-Z])/g, (c) => c === " " ? "-" : t + c[0].toLowerCase());
|
|
551
551
|
return n[0].toLocaleLowerCase() + s.replace(/--/g, "-");
|
|
552
552
|
}
|
|
553
553
|
class mn {
|
|
@@ -563,7 +563,7 @@ class mn {
|
|
|
563
563
|
}
|
|
564
564
|
pushStage(t) {
|
|
565
565
|
this._stages[t.name] = t;
|
|
566
|
-
const s = Object.values(this._stages).reduce((
|
|
566
|
+
const s = Object.values(this._stages).reduce((c, l, y, D) => c + l.progress / l.total / D.length, 0);
|
|
567
567
|
this._onProgress.notify({
|
|
568
568
|
busy: s < 1,
|
|
569
569
|
overallProgress: s,
|
|
@@ -587,12 +587,13 @@ const re = class re {
|
|
|
587
587
|
get requiredProperties() {
|
|
588
588
|
if (!this.document)
|
|
589
589
|
throw new Error(re.errorMessages.missedDocument);
|
|
590
|
-
|
|
590
|
+
const t = this.document.getPersistentProperties().filter((c) => this.document.isRequired(c.name)).map((c) => c.name);
|
|
591
|
+
return [...new Set(t.concat(Object.keys(this.validator)))];
|
|
591
592
|
}
|
|
592
|
-
addValidator(t, s,
|
|
593
|
+
addValidator(t, s, c) {
|
|
593
594
|
this.validator[t] = {
|
|
594
595
|
func: s,
|
|
595
|
-
errorMessage:
|
|
596
|
+
errorMessage: c
|
|
596
597
|
};
|
|
597
598
|
}
|
|
598
599
|
removeValidator(t) {
|
|
@@ -712,23 +713,23 @@ const re = class re {
|
|
|
712
713
|
}
|
|
713
714
|
async documentCollection(t) {
|
|
714
715
|
const s = "Retrieving document collection";
|
|
715
|
-
let
|
|
716
|
+
let c = [];
|
|
716
717
|
try {
|
|
717
718
|
this.progressController.notifyBusy(!0, s);
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
} catch (
|
|
721
|
-
if (this.onChangeHdl.notify({ error: this.errorToError(
|
|
722
|
-
throw
|
|
719
|
+
const l = this.findDocs(t);
|
|
720
|
+
l ? c = await l : c = await this.queryDocs(t).get();
|
|
721
|
+
} catch (l) {
|
|
722
|
+
if (this.onChangeHdl.notify({ error: this.errorToError(l) }), this.onErrorHdl.notify(this.errorToError(l)), this.throwOnError)
|
|
723
|
+
throw l;
|
|
723
724
|
} finally {
|
|
724
725
|
this.progressController.notifyBusy(!1, s);
|
|
725
726
|
}
|
|
726
|
-
return
|
|
727
|
+
return c;
|
|
727
728
|
}
|
|
728
729
|
filter(t) {
|
|
729
730
|
return t.filter((s) => {
|
|
730
|
-
var
|
|
731
|
-
return ((
|
|
731
|
+
var c;
|
|
732
|
+
return ((c = this._filter) == null ? void 0 : c.call(this, s)) ?? !0;
|
|
732
733
|
});
|
|
733
734
|
}
|
|
734
735
|
onProgress(t) {
|
|
@@ -781,23 +782,23 @@ var et = { exports: {} }, g = {};
|
|
|
781
782
|
* This source code is licensed under the MIT license found in the
|
|
782
783
|
* LICENSE file in the root directory of this source tree.
|
|
783
784
|
*/
|
|
784
|
-
var
|
|
785
|
+
var Vt;
|
|
785
786
|
function vn() {
|
|
786
|
-
if (
|
|
787
|
+
if (Vt)
|
|
787
788
|
return g;
|
|
788
|
-
|
|
789
|
-
var n = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"),
|
|
789
|
+
Vt = 1;
|
|
790
|
+
var n = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), D = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), B = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), H = Symbol.iterator;
|
|
790
791
|
function Z(o) {
|
|
791
792
|
return o === null || typeof o != "object" ? null : (o = H && o[H] || o["@@iterator"], typeof o == "function" ? o : null);
|
|
792
793
|
}
|
|
793
|
-
var
|
|
794
|
+
var U = { isMounted: function() {
|
|
794
795
|
return !1;
|
|
795
796
|
}, enqueueForceUpdate: function() {
|
|
796
797
|
}, enqueueReplaceState: function() {
|
|
797
798
|
}, enqueueSetState: function() {
|
|
798
799
|
} }, q = Object.assign, Ee = {};
|
|
799
800
|
function K(o, f, v) {
|
|
800
|
-
this.props = o, this.context = f, this.refs = Ee, this.updater = v ||
|
|
801
|
+
this.props = o, this.context = f, this.refs = Ee, this.updater = v || U;
|
|
801
802
|
}
|
|
802
803
|
K.prototype.isReactComponent = {}, K.prototype.setState = function(o, f) {
|
|
803
804
|
if (typeof o != "object" && typeof o != "function" && o != null)
|
|
@@ -810,7 +811,7 @@ function vn() {
|
|
|
810
811
|
}
|
|
811
812
|
we.prototype = K.prototype;
|
|
812
813
|
function oe(o, f, v) {
|
|
813
|
-
this.props = o, this.context = f, this.refs = Ee, this.updater = v ||
|
|
814
|
+
this.props = o, this.context = f, this.refs = Ee, this.updater = v || U;
|
|
814
815
|
}
|
|
815
816
|
var ie = oe.prototype = new we();
|
|
816
817
|
ie.constructor = oe, q(ie, K.prototype), ie.isPureReactComponent = !0;
|
|
@@ -824,9 +825,9 @@ function vn() {
|
|
|
824
825
|
if (R === 1)
|
|
825
826
|
_.children = v;
|
|
826
827
|
else if (1 < R) {
|
|
827
|
-
for (var
|
|
828
|
-
|
|
829
|
-
_.children =
|
|
828
|
+
for (var S = Array(R), $ = 0; $ < R; $++)
|
|
829
|
+
S[$] = arguments[$ + 2];
|
|
830
|
+
_.children = S;
|
|
830
831
|
}
|
|
831
832
|
if (o && o.defaultProps)
|
|
832
833
|
for (E in R = o.defaultProps, R)
|
|
@@ -839,7 +840,7 @@ function vn() {
|
|
|
839
840
|
function he(o) {
|
|
840
841
|
return typeof o == "object" && o !== null && o.$$typeof === n;
|
|
841
842
|
}
|
|
842
|
-
function
|
|
843
|
+
function Ve(o) {
|
|
843
844
|
var f = { "=": "=0", ":": "=2" };
|
|
844
845
|
return "$" + o.replace(/[=:]/g, function(v) {
|
|
845
846
|
return f[v];
|
|
@@ -847,7 +848,7 @@ function vn() {
|
|
|
847
848
|
}
|
|
848
849
|
var Re = /\/+/g;
|
|
849
850
|
function me(o, f) {
|
|
850
|
-
return typeof o == "object" && o !== null && o.key != null ?
|
|
851
|
+
return typeof o == "object" && o !== null && o.key != null ? Ve("" + o.key) : f.toString(36);
|
|
851
852
|
}
|
|
852
853
|
function se(o, f, v, E, _) {
|
|
853
854
|
var C = typeof o;
|
|
@@ -875,12 +876,12 @@ function vn() {
|
|
|
875
876
|
if (k = 0, E = E === "" ? "." : E + ":", G(o))
|
|
876
877
|
for (var R = 0; R < o.length; R++) {
|
|
877
878
|
C = o[R];
|
|
878
|
-
var
|
|
879
|
-
k += se(C, f, v,
|
|
879
|
+
var S = E + me(C, R);
|
|
880
|
+
k += se(C, f, v, S, _);
|
|
880
881
|
}
|
|
881
|
-
else if (
|
|
882
|
-
for (o =
|
|
883
|
-
C = C.value,
|
|
882
|
+
else if (S = Z(o), typeof S == "function")
|
|
883
|
+
for (o = S.call(o), R = 0; !(C = o.next()).done; )
|
|
884
|
+
C = C.value, S = E + me(C, R++), k += se(C, f, v, S, _);
|
|
884
885
|
else if (C === "object")
|
|
885
886
|
throw f = String(o), Error("Objects are not valid as a React child (found: " + (f === "[object Object]" ? "object with keys {" + Object.keys(o).join(", ") + "}" : f) + "). If you meant to render a collection of children, use an array instead.");
|
|
886
887
|
return k;
|
|
@@ -906,7 +907,7 @@ function vn() {
|
|
|
906
907
|
return o._result.default;
|
|
907
908
|
throw o._result;
|
|
908
909
|
}
|
|
909
|
-
var h = { current: null }, te = { transition: null },
|
|
910
|
+
var h = { current: null }, te = { transition: null }, Se = { ReactCurrentDispatcher: h, ReactCurrentBatchConfig: te, ReactCurrentOwner: L };
|
|
910
911
|
return g.Children = { map: Y, forEach: function(o, f, v) {
|
|
911
912
|
Y(o, function() {
|
|
912
913
|
f.apply(this, arguments);
|
|
@@ -924,22 +925,22 @@ function vn() {
|
|
|
924
925
|
if (!he(o))
|
|
925
926
|
throw Error("React.Children.only expected to receive a single React element child.");
|
|
926
927
|
return o;
|
|
927
|
-
} }, g.Component = K, g.Fragment = s, g.Profiler =
|
|
928
|
+
} }, g.Component = K, g.Fragment = s, g.Profiler = l, g.PureComponent = oe, g.StrictMode = c, g.Suspense = V, g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Se, g.cloneElement = function(o, f, v) {
|
|
928
929
|
if (o == null)
|
|
929
930
|
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + o + ".");
|
|
930
931
|
var E = q({}, o.props), _ = o.key, C = o.ref, k = o._owner;
|
|
931
932
|
if (f != null) {
|
|
932
933
|
if (f.ref !== void 0 && (C = f.ref, k = L.current), f.key !== void 0 && (_ = "" + f.key), o.type && o.type.defaultProps)
|
|
933
934
|
var R = o.type.defaultProps;
|
|
934
|
-
for (
|
|
935
|
-
A.call(f,
|
|
935
|
+
for (S in f)
|
|
936
|
+
A.call(f, S) && !J.hasOwnProperty(S) && (E[S] = f[S] === void 0 && R !== void 0 ? R[S] : f[S]);
|
|
936
937
|
}
|
|
937
|
-
var
|
|
938
|
-
if (
|
|
938
|
+
var S = arguments.length - 2;
|
|
939
|
+
if (S === 1)
|
|
939
940
|
E.children = v;
|
|
940
|
-
else if (1 <
|
|
941
|
-
R = Array(
|
|
942
|
-
for (var $ = 0; $ <
|
|
941
|
+
else if (1 < S) {
|
|
942
|
+
R = Array(S);
|
|
943
|
+
for (var $ = 0; $ < S; $++)
|
|
943
944
|
R[$] = arguments[$ + 2];
|
|
944
945
|
E.children = R;
|
|
945
946
|
}
|
|
@@ -1009,12 +1010,12 @@ var _e = { exports: {} };
|
|
|
1009
1010
|
* LICENSE file in the root directory of this source tree.
|
|
1010
1011
|
*/
|
|
1011
1012
|
_e.exports;
|
|
1012
|
-
var
|
|
1013
|
+
var Ut;
|
|
1013
1014
|
function gn() {
|
|
1014
|
-
return
|
|
1015
|
+
return Ut || (Ut = 1, function(n, t) {
|
|
1015
1016
|
process.env.NODE_ENV !== "production" && function() {
|
|
1016
1017
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
1017
|
-
var s = "18.2.0",
|
|
1018
|
+
var s = "18.2.0", c = Symbol.for("react.element"), l = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), D = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), V = Symbol.for("react.provider"), B = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), H = Symbol.for("react.suspense"), Z = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), Ee = Symbol.for("react.offscreen"), K = Symbol.iterator, we = "@@iterator";
|
|
1018
1019
|
function oe(e) {
|
|
1019
1020
|
if (e === null || typeof e != "object")
|
|
1020
1021
|
return null;
|
|
@@ -1052,7 +1053,7 @@ function gn() {
|
|
|
1052
1053
|
var r = J.getCurrentStack;
|
|
1053
1054
|
return r && (e += r() || ""), e;
|
|
1054
1055
|
};
|
|
1055
|
-
var he = !1,
|
|
1056
|
+
var he = !1, Ve = !1, Re = !1, me = !1, se = !1, Y = {
|
|
1056
1057
|
ReactCurrentDispatcher: ie,
|
|
1057
1058
|
ReactCurrentBatchConfig: G,
|
|
1058
1059
|
ReactCurrentOwner: L
|
|
@@ -1082,13 +1083,13 @@ function gn() {
|
|
|
1082
1083
|
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
1083
1084
|
}
|
|
1084
1085
|
}
|
|
1085
|
-
var
|
|
1086
|
+
var Se = {};
|
|
1086
1087
|
function o(e, r) {
|
|
1087
1088
|
{
|
|
1088
1089
|
var i = e.constructor, a = i && (i.displayName || i.name) || "ReactClass", u = a + "." + r;
|
|
1089
|
-
if (
|
|
1090
|
+
if (Se[u])
|
|
1090
1091
|
return;
|
|
1091
|
-
h("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", r, a),
|
|
1092
|
+
h("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", r, a), Se[u] = !0;
|
|
1092
1093
|
}
|
|
1093
1094
|
}
|
|
1094
1095
|
var f = {
|
|
@@ -1177,14 +1178,14 @@ function gn() {
|
|
|
1177
1178
|
for (var R in C)
|
|
1178
1179
|
C.hasOwnProperty(R) && k(R, C[R]);
|
|
1179
1180
|
}
|
|
1180
|
-
function
|
|
1181
|
+
function S() {
|
|
1181
1182
|
}
|
|
1182
|
-
|
|
1183
|
+
S.prototype = _.prototype;
|
|
1183
1184
|
function $(e, r, i) {
|
|
1184
1185
|
this.props = e, this.context = r, this.refs = E, this.updater = i || f;
|
|
1185
1186
|
}
|
|
1186
|
-
var
|
|
1187
|
-
|
|
1187
|
+
var Ue = $.prototype = new S();
|
|
1188
|
+
Ue.constructor = $, v(Ue, _.prototype), Ue.isPureReactComponent = !0;
|
|
1188
1189
|
function Ht() {
|
|
1189
1190
|
var e = {
|
|
1190
1191
|
current: null
|
|
@@ -1192,7 +1193,7 @@ function gn() {
|
|
|
1192
1193
|
return Object.seal(e), e;
|
|
1193
1194
|
}
|
|
1194
1195
|
var Bt = Array.isArray;
|
|
1195
|
-
function
|
|
1196
|
+
function Pe(e) {
|
|
1196
1197
|
return Bt(e);
|
|
1197
1198
|
}
|
|
1198
1199
|
function zt(e) {
|
|
@@ -1235,7 +1236,7 @@ function gn() {
|
|
|
1235
1236
|
switch (e) {
|
|
1236
1237
|
case y:
|
|
1237
1238
|
return "Fragment";
|
|
1238
|
-
case
|
|
1239
|
+
case l:
|
|
1239
1240
|
return "Portal";
|
|
1240
1241
|
case F:
|
|
1241
1242
|
return "Profiler";
|
|
@@ -1251,12 +1252,12 @@ function gn() {
|
|
|
1251
1252
|
case B:
|
|
1252
1253
|
var r = e;
|
|
1253
1254
|
return rt(r) + ".Consumer";
|
|
1254
|
-
case
|
|
1255
|
+
case V:
|
|
1255
1256
|
var i = e;
|
|
1256
1257
|
return rt(i._context) + ".Provider";
|
|
1257
1258
|
case z:
|
|
1258
1259
|
return Kt(e, e.render, "ForwardRef");
|
|
1259
|
-
case
|
|
1260
|
+
case U:
|
|
1260
1261
|
var a = e.displayName || null;
|
|
1261
1262
|
return a !== null ? a : X(e.type) || "Memo";
|
|
1262
1263
|
case q: {
|
|
@@ -1320,7 +1321,7 @@ function gn() {
|
|
|
1320
1321
|
var We = function(e, r, i, a, u, p, d) {
|
|
1321
1322
|
var m = {
|
|
1322
1323
|
// This tag allows us to uniquely identify this as a React Element
|
|
1323
|
-
$$typeof:
|
|
1324
|
+
$$typeof: c,
|
|
1324
1325
|
// Built-in properties that belong on the element
|
|
1325
1326
|
type: e,
|
|
1326
1327
|
key: r,
|
|
@@ -1357,9 +1358,9 @@ function gn() {
|
|
|
1357
1358
|
if (w === 1)
|
|
1358
1359
|
u.children = i;
|
|
1359
1360
|
else if (w > 1) {
|
|
1360
|
-
for (var
|
|
1361
|
-
|
|
1362
|
-
Object.freeze && Object.freeze(
|
|
1361
|
+
for (var P = Array(w), O = 0; O < w; O++)
|
|
1362
|
+
P[O] = arguments[O + 2];
|
|
1363
|
+
Object.freeze && Object.freeze(P), u.children = P;
|
|
1363
1364
|
}
|
|
1364
1365
|
if (e && e.defaultProps) {
|
|
1365
1366
|
var T = e.defaultProps;
|
|
@@ -1382,10 +1383,10 @@ function gn() {
|
|
|
1382
1383
|
var a, u = v({}, e.props), p = e.key, d = e.ref, m = e._self, b = e._source, w = e._owner;
|
|
1383
1384
|
if (r != null) {
|
|
1384
1385
|
st(r) && (d = r.ref, w = L.current), at(r) && (Oe(r.key), p = "" + r.key);
|
|
1385
|
-
var
|
|
1386
|
-
e.type && e.type.defaultProps && (
|
|
1386
|
+
var P;
|
|
1387
|
+
e.type && e.type.defaultProps && (P = e.type.defaultProps);
|
|
1387
1388
|
for (a in r)
|
|
1388
|
-
ye.call(r, a) && !nt.hasOwnProperty(a) && (r[a] === void 0 &&
|
|
1389
|
+
ye.call(r, a) && !nt.hasOwnProperty(a) && (r[a] === void 0 && P !== void 0 ? u[a] = P[a] : u[a] = r[a]);
|
|
1389
1390
|
}
|
|
1390
1391
|
var O = arguments.length - 2;
|
|
1391
1392
|
if (O === 1)
|
|
@@ -1398,7 +1399,7 @@ function gn() {
|
|
|
1398
1399
|
return We(e.type, p, d, m, b, w, u);
|
|
1399
1400
|
}
|
|
1400
1401
|
function ae(e) {
|
|
1401
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
1402
|
+
return typeof e == "object" && e !== null && e.$$typeof === c;
|
|
1402
1403
|
}
|
|
1403
1404
|
var ut = ".", tr = ":";
|
|
1404
1405
|
function rr(e) {
|
|
@@ -1431,16 +1432,16 @@ function gn() {
|
|
|
1431
1432
|
break;
|
|
1432
1433
|
case "object":
|
|
1433
1434
|
switch (e.$$typeof) {
|
|
1434
|
-
case l:
|
|
1435
1435
|
case c:
|
|
1436
|
+
case l:
|
|
1436
1437
|
d = !0;
|
|
1437
1438
|
}
|
|
1438
1439
|
}
|
|
1439
1440
|
if (d) {
|
|
1440
1441
|
var m = e, b = u(m), w = a === "" ? ut + Ye(m, 0) : a;
|
|
1441
|
-
if (
|
|
1442
|
-
var
|
|
1443
|
-
w != null && (
|
|
1442
|
+
if (Pe(b)) {
|
|
1443
|
+
var P = "";
|
|
1444
|
+
w != null && (P = lt(w) + "/"), De(b, r, P, "", function(Jr) {
|
|
1444
1445
|
return Jr;
|
|
1445
1446
|
});
|
|
1446
1447
|
} else
|
|
@@ -1458,7 +1459,7 @@ function gn() {
|
|
|
1458
1459
|
return 1;
|
|
1459
1460
|
}
|
|
1460
1461
|
var O, T, j = 0, I = a === "" ? ut : a + tr;
|
|
1461
|
-
if (
|
|
1462
|
+
if (Pe(e))
|
|
1462
1463
|
for (var $e = 0; $e < e.length; $e++)
|
|
1463
1464
|
O = e[$e], T = I + Ye(O, $e), j += De(O, r, i, T, u);
|
|
1464
1465
|
else {
|
|
@@ -1525,7 +1526,7 @@ function gn() {
|
|
|
1525
1526
|
_globalName: null
|
|
1526
1527
|
};
|
|
1527
1528
|
r.Provider = {
|
|
1528
|
-
$$typeof:
|
|
1529
|
+
$$typeof: V,
|
|
1529
1530
|
_context: r
|
|
1530
1531
|
};
|
|
1531
1532
|
var i = !1, a = !1, u = !1;
|
|
@@ -1657,7 +1658,7 @@ Your code should look like:
|
|
|
1657
1658
|
return i;
|
|
1658
1659
|
}
|
|
1659
1660
|
function dr(e) {
|
|
1660
|
-
e != null && e.$$typeof ===
|
|
1661
|
+
e != null && e.$$typeof === U ? h("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? h("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && h("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && h("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
1661
1662
|
var r = {
|
|
1662
1663
|
$$typeof: z,
|
|
1663
1664
|
render: e
|
|
@@ -1680,7 +1681,7 @@ Your code should look like:
|
|
|
1680
1681
|
var dt;
|
|
1681
1682
|
dt = Symbol.for("react.module.reference");
|
|
1682
1683
|
function pt(e) {
|
|
1683
|
-
return !!(typeof e == "string" || typeof e == "function" || e === y || e === F || se || e === D || e === H || e === Z || me || e === Ee || he ||
|
|
1684
|
+
return !!(typeof e == "string" || typeof e == "function" || e === y || e === F || se || e === D || e === H || e === Z || me || e === Ee || he || Ve || Re || typeof e == "object" && e !== null && (e.$$typeof === q || e.$$typeof === U || e.$$typeof === V || e.$$typeof === B || e.$$typeof === z || // This needs to include all possible module reference object
|
|
1684
1685
|
// types supported by any Flight configuration anywhere since
|
|
1685
1686
|
// we don't know which Flight build this will end up being used
|
|
1686
1687
|
// with.
|
|
@@ -1689,7 +1690,7 @@ Your code should look like:
|
|
|
1689
1690
|
function pr(e, r) {
|
|
1690
1691
|
pt(e) || h("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
|
|
1691
1692
|
var i = {
|
|
1692
|
-
$$typeof:
|
|
1693
|
+
$$typeof: U,
|
|
1693
1694
|
type: e,
|
|
1694
1695
|
compare: r === void 0 ? null : r
|
|
1695
1696
|
};
|
|
@@ -1766,11 +1767,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1766
1767
|
return i.useDebugValue(e, r);
|
|
1767
1768
|
}
|
|
1768
1769
|
}
|
|
1769
|
-
function
|
|
1770
|
+
function Sr() {
|
|
1770
1771
|
var e = M();
|
|
1771
1772
|
return e.useTransition();
|
|
1772
1773
|
}
|
|
1773
|
-
function
|
|
1774
|
+
function Pr(e) {
|
|
1774
1775
|
var r = M();
|
|
1775
1776
|
return r.useDeferredValue(e);
|
|
1776
1777
|
}
|
|
@@ -1913,18 +1914,18 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1913
1914
|
if (I && a && typeof I.stack == "string") {
|
|
1914
1915
|
for (var m = I.stack.split(`
|
|
1915
1916
|
`), b = a.stack.split(`
|
|
1916
|
-
`), w = m.length - 1,
|
|
1917
|
-
|
|
1918
|
-
for (; w >= 1 &&
|
|
1919
|
-
if (m[w] !== b[
|
|
1920
|
-
if (w !== 1 ||
|
|
1917
|
+
`), w = m.length - 1, P = b.length - 1; w >= 1 && P >= 0 && m[w] !== b[P]; )
|
|
1918
|
+
P--;
|
|
1919
|
+
for (; w >= 1 && P >= 0; w--, P--)
|
|
1920
|
+
if (m[w] !== b[P]) {
|
|
1921
|
+
if (w !== 1 || P !== 1)
|
|
1921
1922
|
do
|
|
1922
|
-
if (w--,
|
|
1923
|
+
if (w--, P--, P < 0 || m[w] !== b[P]) {
|
|
1923
1924
|
var O = `
|
|
1924
1925
|
` + m[w].replace(" at new ", " at ");
|
|
1925
1926
|
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && je.set(e, O), O;
|
|
1926
1927
|
}
|
|
1927
|
-
while (w >= 1 &&
|
|
1928
|
+
while (w >= 1 && P >= 0);
|
|
1928
1929
|
break;
|
|
1929
1930
|
}
|
|
1930
1931
|
}
|
|
@@ -1958,7 +1959,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1958
1959
|
switch (e.$$typeof) {
|
|
1959
1960
|
case z:
|
|
1960
1961
|
return Ar(e.render);
|
|
1961
|
-
case
|
|
1962
|
+
case U:
|
|
1962
1963
|
return Ae(e.type, r, i);
|
|
1963
1964
|
case q: {
|
|
1964
1965
|
var a = e, u = a._payload, p = a._init;
|
|
@@ -2006,7 +2007,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
2006
2007
|
}
|
|
2007
2008
|
var Ke;
|
|
2008
2009
|
Ke = !1;
|
|
2009
|
-
function
|
|
2010
|
+
function St() {
|
|
2010
2011
|
if (L.current) {
|
|
2011
2012
|
var e = X(L.current.type);
|
|
2012
2013
|
if (e)
|
|
@@ -2028,9 +2029,9 @@ Check your code at ` + r + ":" + i + ".";
|
|
|
2028
2029
|
function $r(e) {
|
|
2029
2030
|
return e != null ? Fr(e.__source) : "";
|
|
2030
2031
|
}
|
|
2031
|
-
var
|
|
2032
|
+
var Pt = {};
|
|
2032
2033
|
function Mr(e) {
|
|
2033
|
-
var r =
|
|
2034
|
+
var r = St();
|
|
2034
2035
|
if (!r) {
|
|
2035
2036
|
var i = typeof e == "string" ? e : e.displayName || e.name;
|
|
2036
2037
|
i && (r = `
|
|
@@ -2043,8 +2044,8 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2043
2044
|
if (!(!e._store || e._store.validated || e.key != null)) {
|
|
2044
2045
|
e._store.validated = !0;
|
|
2045
2046
|
var i = Mr(r);
|
|
2046
|
-
if (!
|
|
2047
|
-
|
|
2047
|
+
if (!Pt[i]) {
|
|
2048
|
+
Pt[i] = !0;
|
|
2048
2049
|
var a = "";
|
|
2049
2050
|
e && e._owner && e._owner !== L.current && (a = " It was passed a child from " + X(e._owner.type) + "."), ue(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, a), ue(null);
|
|
2050
2051
|
}
|
|
@@ -2052,7 +2053,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2052
2053
|
}
|
|
2053
2054
|
function Dt(e, r) {
|
|
2054
2055
|
if (typeof e == "object") {
|
|
2055
|
-
if (
|
|
2056
|
+
if (Pe(e))
|
|
2056
2057
|
for (var i = 0; i < e.length; i++) {
|
|
2057
2058
|
var a = e[i];
|
|
2058
2059
|
ae(a) && Ot(a, r);
|
|
@@ -2077,7 +2078,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2077
2078
|
i = r.propTypes;
|
|
2078
2079
|
else if (typeof r == "object" && (r.$$typeof === z || // Note: Memo only checks outer props here.
|
|
2079
2080
|
// Inner props are checked in the reconciler.
|
|
2080
|
-
r.$$typeof ===
|
|
2081
|
+
r.$$typeof === U))
|
|
2081
2082
|
i = r.propTypes;
|
|
2082
2083
|
else
|
|
2083
2084
|
return;
|
|
@@ -2110,9 +2111,9 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2110
2111
|
var u = "";
|
|
2111
2112
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
2112
2113
|
var p = $r(r);
|
|
2113
|
-
p ? u += p : u +=
|
|
2114
|
+
p ? u += p : u += St();
|
|
2114
2115
|
var d;
|
|
2115
|
-
e === null ? d = "null" :
|
|
2116
|
+
e === null ? d = "null" : Pe(e) ? d = "array" : e !== void 0 && e.$$typeof === c ? (d = "<" + (X(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, h("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, u);
|
|
2116
2117
|
}
|
|
2117
2118
|
var m = Xt.apply(this, arguments);
|
|
2118
2119
|
if (m == null)
|
|
@@ -2123,7 +2124,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2123
2124
|
return e === y ? Lr(m) : Tt(m), m;
|
|
2124
2125
|
}
|
|
2125
2126
|
var jt = !1;
|
|
2126
|
-
function
|
|
2127
|
+
function Vr(e) {
|
|
2127
2128
|
var r = kt.bind(null, e);
|
|
2128
2129
|
return r.type = e, jt || (jt = !0, Q("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(r, "type", {
|
|
2129
2130
|
enumerable: !1,
|
|
@@ -2134,7 +2135,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2134
2135
|
}
|
|
2135
2136
|
}), r;
|
|
2136
2137
|
}
|
|
2137
|
-
function
|
|
2138
|
+
function Ur(e, r, i) {
|
|
2138
2139
|
for (var a = er.apply(this, arguments), u = 2; u < arguments.length; u++)
|
|
2139
2140
|
Dt(arguments[u], a.type);
|
|
2140
2141
|
return Tt(a), a;
|
|
@@ -2203,12 +2204,12 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2203
2204
|
if (Fe(r), ce === 0) {
|
|
2204
2205
|
var w = A.current;
|
|
2205
2206
|
w !== null && (Qe(w), A.current = null);
|
|
2206
|
-
var
|
|
2207
|
+
var P = {
|
|
2207
2208
|
then: function(T, j) {
|
|
2208
2209
|
A.current === null ? (A.current = [], Ge(b, T, j)) : T(b);
|
|
2209
2210
|
}
|
|
2210
2211
|
};
|
|
2211
|
-
return
|
|
2212
|
+
return P;
|
|
2212
2213
|
} else {
|
|
2213
2214
|
var O = {
|
|
2214
2215
|
then: function(T, j) {
|
|
@@ -2258,14 +2259,14 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2258
2259
|
}
|
|
2259
2260
|
}
|
|
2260
2261
|
}
|
|
2261
|
-
var Hr = kt, Br =
|
|
2262
|
+
var Hr = kt, Br = Ur, zr = Vr, qr = {
|
|
2262
2263
|
map: Te,
|
|
2263
2264
|
forEach: ir,
|
|
2264
2265
|
count: or,
|
|
2265
2266
|
toArray: sr,
|
|
2266
2267
|
only: ar
|
|
2267
2268
|
};
|
|
2268
|
-
t.Children = qr, t.Component = _, t.Fragment = y, t.Profiler = F, t.PureComponent = $, t.StrictMode = D, t.Suspense = H, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Y, t.cloneElement = Br, t.createContext = ur, t.createElement = Hr, t.createFactory = zr, t.createRef = Ht, t.forwardRef = dr, t.isValidElement = ae, t.lazy = fr, t.memo = pr, t.startTransition = xr, t.unstable_act = Yr, t.useCallback = Er, t.useContext = hr, t.useDebugValue = Rr, t.useDeferredValue =
|
|
2269
|
+
t.Children = qr, t.Component = _, t.Fragment = y, t.Profiler = F, t.PureComponent = $, t.StrictMode = D, t.Suspense = H, t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Y, t.cloneElement = Br, t.createContext = ur, t.createElement = Hr, t.createFactory = zr, t.createRef = Ht, t.forwardRef = dr, t.isValidElement = ae, t.lazy = fr, t.memo = pr, t.startTransition = xr, t.unstable_act = Yr, t.useCallback = Er, t.useContext = hr, t.useDebugValue = Rr, t.useDeferredValue = Pr, t.useEffect = gr, t.useId = Or, t.useImperativeHandle = Cr, t.useInsertionEffect = _r, t.useLayoutEffect = br, t.useMemo = wr, t.useReducer = yr, t.useRef = vr, t.useState = mr, t.useSyncExternalStore = Dr, t.useTransition = Sr, t.version = s, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
2269
2270
|
}();
|
|
2270
2271
|
}(_e, _e.exports)), _e.exports;
|
|
2271
2272
|
}
|
|
@@ -2309,49 +2310,49 @@ class _n extends fe.Component {
|
|
|
2309
2310
|
});
|
|
2310
2311
|
}
|
|
2311
2312
|
async storeDocument(t) {
|
|
2312
|
-
const { controller: s, layout:
|
|
2313
|
-
s.setDocument(t), await s.storeDocument(),
|
|
2313
|
+
const { controller: s, layout: c } = this.props;
|
|
2314
|
+
s.setDocument(t), await s.storeDocument(), c === "formAndItems" ? this.newDocument() : this.setState({
|
|
2314
2315
|
mode: 0
|
|
2315
2316
|
/* normal */
|
|
2316
2317
|
});
|
|
2317
2318
|
}
|
|
2318
2319
|
invokeContentViewChild(t) {
|
|
2319
|
-
const { children: s, layout:
|
|
2320
|
-
if (!
|
|
2320
|
+
const { children: s, layout: c, controller: l } = this.props, { mode: y } = this.state, D = c !== "formAndItems";
|
|
2321
|
+
if (!l.document)
|
|
2321
2322
|
return;
|
|
2322
2323
|
const F = {
|
|
2323
|
-
controller:
|
|
2324
|
+
controller: l,
|
|
2324
2325
|
submitButtonCaption: y == 2 ? t == null ? void 0 : t.updateButtonLabel : t == null ? void 0 : t.addButtonLabel,
|
|
2325
|
-
onSubmit: (
|
|
2326
|
+
onSubmit: (V) => this.storeDocument(V),
|
|
2326
2327
|
onCancel: D ? () => this.setState({
|
|
2327
2328
|
mode: 0
|
|
2328
2329
|
/* normal */
|
|
2329
2330
|
}) : () => this.newDocument()
|
|
2330
2331
|
};
|
|
2331
|
-
return typeof s[0] == "function" ? fe.cloneElement(s[0](F), { key:
|
|
2332
|
+
return typeof s[0] == "function" ? fe.cloneElement(s[0](F), { key: l.document.id }) : fe.cloneElement(s[0], { key: l.document.id, ...F });
|
|
2332
2333
|
}
|
|
2333
2334
|
invokeDetailViewChild(t) {
|
|
2334
|
-
const { children: s, controller:
|
|
2335
|
+
const { children: s, controller: c } = this.props, l = {
|
|
2335
2336
|
document: t,
|
|
2336
2337
|
onSelect: (y) => this.editDocument(y),
|
|
2337
|
-
onDelete: (y) =>
|
|
2338
|
+
onDelete: (y) => c.setDocument(y).deleteDocument()
|
|
2338
2339
|
};
|
|
2339
|
-
return typeof s[1] == "function" ? fe.cloneElement(s[1](
|
|
2340
|
+
return typeof s[1] == "function" ? fe.cloneElement(s[1](l), { key: t.id }) : fe.cloneElement(s[1], { key: t.id, ...l });
|
|
2340
2341
|
}
|
|
2341
2342
|
render() {
|
|
2342
|
-
var
|
|
2343
|
-
const { mode: t, documents: s } = this.state, { className:
|
|
2343
|
+
var U;
|
|
2344
|
+
const { mode: t, documents: s } = this.state, { className: c, cardAddButton: l, controller: y } = this.props, D = hn((U = y.document) == null ? void 0 : U.className);
|
|
2344
2345
|
let F = this.props.labels || {};
|
|
2345
|
-
const
|
|
2346
|
+
const V = this.props.layout || "itemsAlways";
|
|
2346
2347
|
typeof F == "function" && (F = F(y));
|
|
2347
2348
|
const { addNewDocumentLabel: B, singularDocumentInCollectionCaption: z, documentsInCollectionCaption: H, noDocumentsFoundLabel: Z } = F;
|
|
2348
|
-
return /* @__PURE__ */ W.createElement("div", { className: `crud-panel ${D} ${
|
|
2349
|
+
return /* @__PURE__ */ W.createElement("div", { className: `crud-panel ${D} ${c || ""}` }, t === 0 && V !== "formAndItems" && !l && /* @__PURE__ */ W.createElement("div", { className: "header" }, this.props.header ? typeof this.props.header == "function" ? this.props.header(y, () => this.newDocument(), F) : this.props.header : /* @__PURE__ */ W.createElement("button", { onClick: () => this.newDocument() }, B)), (V === "formAndItems" || t === 1 || t === 2) && /* @__PURE__ */ W.createElement("div", { className: "content-panel" }, this.invokeContentViewChild(F)), (V === "itemsAlways" || V === "formAndItems" || t === 0) && /* @__PURE__ */ W.createElement("div", { className: "collection-panel" }, (s == null ? void 0 : s.length) > 0 && /* @__PURE__ */ W.createElement("h3", null, s.length > 1 ? H : z || H), /* @__PURE__ */ W.createElement("div", { className: "documents" }, l && /* @__PURE__ */ W.createElement(
|
|
2349
2350
|
"div",
|
|
2350
2351
|
{
|
|
2351
2352
|
className: "crud-card card-add-button clickable",
|
|
2352
2353
|
onClick: () => this.newDocument()
|
|
2353
2354
|
},
|
|
2354
|
-
/* @__PURE__ */ W.createElement("div", { className: "button-element" },
|
|
2355
|
+
/* @__PURE__ */ W.createElement("div", { className: "button-element" }, l),
|
|
2355
2356
|
/* @__PURE__ */ W.createElement("div", { className: "add-label" }, B)
|
|
2356
2357
|
), s != null && s.length ? s.map((q) => this.invokeDetailViewChild(q)) : /* @__PURE__ */ W.createElement("p", null, Z))), /* @__PURE__ */ W.createElement("div", { className: "footer" }, this.props.footer && typeof this.props.footer == "function" ? this.props.footer(y, () => this.newDocument(), F) : this.props.footer));
|
|
2357
2358
|
}
|