@entropic-bond/crud-panel 4.1.2 → 4.2.0
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,12 +547,12 @@ 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 {
|
|
554
554
|
constructor() {
|
|
555
|
-
this._stages = {}, this._onProgress = new Le();
|
|
555
|
+
this._debug = !1, this._stages = {}, this._onProgress = new Le();
|
|
556
556
|
}
|
|
557
557
|
notifyBusy(t, s) {
|
|
558
558
|
this.pushStage({
|
|
@@ -563,16 +563,22 @@ 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,
|
|
570
570
|
stages: this._stages
|
|
571
|
-
}), s >= 1 && (this._stages = {});
|
|
571
|
+
}), s >= 1 && (this._stages = {}), this.debug && console.log(`ProgressController ${t.name}: Progress: ${t.progress} Stages: ${t.total}`);
|
|
572
572
|
}
|
|
573
573
|
onProgress(t) {
|
|
574
574
|
return this._onProgress.subscribe(t);
|
|
575
575
|
}
|
|
576
|
+
set debug(t) {
|
|
577
|
+
this._debug = t;
|
|
578
|
+
}
|
|
579
|
+
get debug() {
|
|
580
|
+
return this._debug;
|
|
581
|
+
}
|
|
576
582
|
}
|
|
577
583
|
const re = class re {
|
|
578
584
|
constructor(t) {
|
|
@@ -587,12 +593,13 @@ const re = class re {
|
|
|
587
593
|
get requiredProperties() {
|
|
588
594
|
if (!this.document)
|
|
589
595
|
throw new Error(re.errorMessages.missedDocument);
|
|
590
|
-
|
|
596
|
+
const t = this.document.getPersistentProperties().filter((c) => this.document.isRequired(c.name)).map((c) => c.name);
|
|
597
|
+
return [...new Set(t.concat(Object.keys(this.validator)))];
|
|
591
598
|
}
|
|
592
|
-
addValidator(t, s,
|
|
599
|
+
addValidator(t, s, c) {
|
|
593
600
|
this.validator[t] = {
|
|
594
601
|
func: s,
|
|
595
|
-
errorMessage:
|
|
602
|
+
errorMessage: c
|
|
596
603
|
};
|
|
597
604
|
}
|
|
598
605
|
removeValidator(t) {
|
|
@@ -712,23 +719,23 @@ const re = class re {
|
|
|
712
719
|
}
|
|
713
720
|
async documentCollection(t) {
|
|
714
721
|
const s = "Retrieving document collection";
|
|
715
|
-
let
|
|
722
|
+
let c = [];
|
|
716
723
|
try {
|
|
717
724
|
this.progressController.notifyBusy(!0, s);
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
} catch (
|
|
721
|
-
if (this.onChangeHdl.notify({ error: this.errorToError(
|
|
722
|
-
throw
|
|
725
|
+
const l = this.findDocs(t);
|
|
726
|
+
l ? c = await l : c = await this.queryDocs(t).get();
|
|
727
|
+
} catch (l) {
|
|
728
|
+
if (this.onChangeHdl.notify({ error: this.errorToError(l) }), this.onErrorHdl.notify(this.errorToError(l)), this.throwOnError)
|
|
729
|
+
throw l;
|
|
723
730
|
} finally {
|
|
724
731
|
this.progressController.notifyBusy(!1, s);
|
|
725
732
|
}
|
|
726
|
-
return
|
|
733
|
+
return c;
|
|
727
734
|
}
|
|
728
735
|
filter(t) {
|
|
729
736
|
return t.filter((s) => {
|
|
730
|
-
var
|
|
731
|
-
return ((
|
|
737
|
+
var c;
|
|
738
|
+
return ((c = this._filter) == null ? void 0 : c.call(this, s)) ?? !0;
|
|
732
739
|
});
|
|
733
740
|
}
|
|
734
741
|
onProgress(t) {
|
|
@@ -781,23 +788,23 @@ var et = { exports: {} }, g = {};
|
|
|
781
788
|
* This source code is licensed under the MIT license found in the
|
|
782
789
|
* LICENSE file in the root directory of this source tree.
|
|
783
790
|
*/
|
|
784
|
-
var
|
|
791
|
+
var Vt;
|
|
785
792
|
function vn() {
|
|
786
|
-
if (
|
|
793
|
+
if (Vt)
|
|
787
794
|
return g;
|
|
788
|
-
|
|
789
|
-
var n = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"),
|
|
795
|
+
Vt = 1;
|
|
796
|
+
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
797
|
function Z(o) {
|
|
791
798
|
return o === null || typeof o != "object" ? null : (o = H && o[H] || o["@@iterator"], typeof o == "function" ? o : null);
|
|
792
799
|
}
|
|
793
|
-
var
|
|
800
|
+
var U = { isMounted: function() {
|
|
794
801
|
return !1;
|
|
795
802
|
}, enqueueForceUpdate: function() {
|
|
796
803
|
}, enqueueReplaceState: function() {
|
|
797
804
|
}, enqueueSetState: function() {
|
|
798
805
|
} }, q = Object.assign, Ee = {};
|
|
799
806
|
function K(o, f, v) {
|
|
800
|
-
this.props = o, this.context = f, this.refs = Ee, this.updater = v ||
|
|
807
|
+
this.props = o, this.context = f, this.refs = Ee, this.updater = v || U;
|
|
801
808
|
}
|
|
802
809
|
K.prototype.isReactComponent = {}, K.prototype.setState = function(o, f) {
|
|
803
810
|
if (typeof o != "object" && typeof o != "function" && o != null)
|
|
@@ -810,7 +817,7 @@ function vn() {
|
|
|
810
817
|
}
|
|
811
818
|
we.prototype = K.prototype;
|
|
812
819
|
function oe(o, f, v) {
|
|
813
|
-
this.props = o, this.context = f, this.refs = Ee, this.updater = v ||
|
|
820
|
+
this.props = o, this.context = f, this.refs = Ee, this.updater = v || U;
|
|
814
821
|
}
|
|
815
822
|
var ie = oe.prototype = new we();
|
|
816
823
|
ie.constructor = oe, q(ie, K.prototype), ie.isPureReactComponent = !0;
|
|
@@ -839,7 +846,7 @@ function vn() {
|
|
|
839
846
|
function he(o) {
|
|
840
847
|
return typeof o == "object" && o !== null && o.$$typeof === n;
|
|
841
848
|
}
|
|
842
|
-
function
|
|
849
|
+
function Ve(o) {
|
|
843
850
|
var f = { "=": "=0", ":": "=2" };
|
|
844
851
|
return "$" + o.replace(/[=:]/g, function(v) {
|
|
845
852
|
return f[v];
|
|
@@ -847,7 +854,7 @@ function vn() {
|
|
|
847
854
|
}
|
|
848
855
|
var Re = /\/+/g;
|
|
849
856
|
function me(o, f) {
|
|
850
|
-
return typeof o == "object" && o !== null && o.key != null ?
|
|
857
|
+
return typeof o == "object" && o !== null && o.key != null ? Ve("" + o.key) : f.toString(36);
|
|
851
858
|
}
|
|
852
859
|
function se(o, f, v, E, _) {
|
|
853
860
|
var C = typeof o;
|
|
@@ -924,7 +931,7 @@ function vn() {
|
|
|
924
931
|
if (!he(o))
|
|
925
932
|
throw Error("React.Children.only expected to receive a single React element child.");
|
|
926
933
|
return o;
|
|
927
|
-
} }, g.Component = K, g.Fragment = s, g.Profiler =
|
|
934
|
+
} }, 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 = Pe, g.cloneElement = function(o, f, v) {
|
|
928
935
|
if (o == null)
|
|
929
936
|
throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + o + ".");
|
|
930
937
|
var E = q({}, o.props), _ = o.key, C = o.ref, k = o._owner;
|
|
@@ -1009,12 +1016,12 @@ var _e = { exports: {} };
|
|
|
1009
1016
|
* LICENSE file in the root directory of this source tree.
|
|
1010
1017
|
*/
|
|
1011
1018
|
_e.exports;
|
|
1012
|
-
var
|
|
1019
|
+
var Ut;
|
|
1013
1020
|
function gn() {
|
|
1014
|
-
return
|
|
1021
|
+
return Ut || (Ut = 1, function(n, t) {
|
|
1015
1022
|
process.env.NODE_ENV !== "production" && function() {
|
|
1016
1023
|
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",
|
|
1024
|
+
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
1025
|
function oe(e) {
|
|
1019
1026
|
if (e === null || typeof e != "object")
|
|
1020
1027
|
return null;
|
|
@@ -1052,7 +1059,7 @@ function gn() {
|
|
|
1052
1059
|
var r = J.getCurrentStack;
|
|
1053
1060
|
return r && (e += r() || ""), e;
|
|
1054
1061
|
};
|
|
1055
|
-
var he = !1,
|
|
1062
|
+
var he = !1, Ve = !1, Re = !1, me = !1, se = !1, Y = {
|
|
1056
1063
|
ReactCurrentDispatcher: ie,
|
|
1057
1064
|
ReactCurrentBatchConfig: G,
|
|
1058
1065
|
ReactCurrentOwner: L
|
|
@@ -1183,8 +1190,8 @@ function gn() {
|
|
|
1183
1190
|
function $(e, r, i) {
|
|
1184
1191
|
this.props = e, this.context = r, this.refs = E, this.updater = i || f;
|
|
1185
1192
|
}
|
|
1186
|
-
var
|
|
1187
|
-
|
|
1193
|
+
var Ue = $.prototype = new P();
|
|
1194
|
+
Ue.constructor = $, v(Ue, _.prototype), Ue.isPureReactComponent = !0;
|
|
1188
1195
|
function Ht() {
|
|
1189
1196
|
var e = {
|
|
1190
1197
|
current: null
|
|
@@ -1235,7 +1242,7 @@ function gn() {
|
|
|
1235
1242
|
switch (e) {
|
|
1236
1243
|
case y:
|
|
1237
1244
|
return "Fragment";
|
|
1238
|
-
case
|
|
1245
|
+
case l:
|
|
1239
1246
|
return "Portal";
|
|
1240
1247
|
case F:
|
|
1241
1248
|
return "Profiler";
|
|
@@ -1251,12 +1258,12 @@ function gn() {
|
|
|
1251
1258
|
case B:
|
|
1252
1259
|
var r = e;
|
|
1253
1260
|
return rt(r) + ".Consumer";
|
|
1254
|
-
case
|
|
1261
|
+
case V:
|
|
1255
1262
|
var i = e;
|
|
1256
1263
|
return rt(i._context) + ".Provider";
|
|
1257
1264
|
case z:
|
|
1258
1265
|
return Kt(e, e.render, "ForwardRef");
|
|
1259
|
-
case
|
|
1266
|
+
case U:
|
|
1260
1267
|
var a = e.displayName || null;
|
|
1261
1268
|
return a !== null ? a : X(e.type) || "Memo";
|
|
1262
1269
|
case q: {
|
|
@@ -1320,7 +1327,7 @@ function gn() {
|
|
|
1320
1327
|
var We = function(e, r, i, a, u, p, d) {
|
|
1321
1328
|
var m = {
|
|
1322
1329
|
// This tag allows us to uniquely identify this as a React Element
|
|
1323
|
-
$$typeof:
|
|
1330
|
+
$$typeof: c,
|
|
1324
1331
|
// Built-in properties that belong on the element
|
|
1325
1332
|
type: e,
|
|
1326
1333
|
key: r,
|
|
@@ -1398,7 +1405,7 @@ function gn() {
|
|
|
1398
1405
|
return We(e.type, p, d, m, b, w, u);
|
|
1399
1406
|
}
|
|
1400
1407
|
function ae(e) {
|
|
1401
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
1408
|
+
return typeof e == "object" && e !== null && e.$$typeof === c;
|
|
1402
1409
|
}
|
|
1403
1410
|
var ut = ".", tr = ":";
|
|
1404
1411
|
function rr(e) {
|
|
@@ -1431,8 +1438,8 @@ function gn() {
|
|
|
1431
1438
|
break;
|
|
1432
1439
|
case "object":
|
|
1433
1440
|
switch (e.$$typeof) {
|
|
1434
|
-
case l:
|
|
1435
1441
|
case c:
|
|
1442
|
+
case l:
|
|
1436
1443
|
d = !0;
|
|
1437
1444
|
}
|
|
1438
1445
|
}
|
|
@@ -1525,7 +1532,7 @@ function gn() {
|
|
|
1525
1532
|
_globalName: null
|
|
1526
1533
|
};
|
|
1527
1534
|
r.Provider = {
|
|
1528
|
-
$$typeof:
|
|
1535
|
+
$$typeof: V,
|
|
1529
1536
|
_context: r
|
|
1530
1537
|
};
|
|
1531
1538
|
var i = !1, a = !1, u = !1;
|
|
@@ -1657,7 +1664,7 @@ Your code should look like:
|
|
|
1657
1664
|
return i;
|
|
1658
1665
|
}
|
|
1659
1666
|
function dr(e) {
|
|
1660
|
-
e != null && e.$$typeof ===
|
|
1667
|
+
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
1668
|
var r = {
|
|
1662
1669
|
$$typeof: z,
|
|
1663
1670
|
render: e
|
|
@@ -1680,7 +1687,7 @@ Your code should look like:
|
|
|
1680
1687
|
var dt;
|
|
1681
1688
|
dt = Symbol.for("react.module.reference");
|
|
1682
1689
|
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 ||
|
|
1690
|
+
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
1691
|
// types supported by any Flight configuration anywhere since
|
|
1685
1692
|
// we don't know which Flight build this will end up being used
|
|
1686
1693
|
// with.
|
|
@@ -1689,7 +1696,7 @@ Your code should look like:
|
|
|
1689
1696
|
function pr(e, r) {
|
|
1690
1697
|
pt(e) || h("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
|
|
1691
1698
|
var i = {
|
|
1692
|
-
$$typeof:
|
|
1699
|
+
$$typeof: U,
|
|
1693
1700
|
type: e,
|
|
1694
1701
|
compare: r === void 0 ? null : r
|
|
1695
1702
|
};
|
|
@@ -1958,7 +1965,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1958
1965
|
switch (e.$$typeof) {
|
|
1959
1966
|
case z:
|
|
1960
1967
|
return Ar(e.render);
|
|
1961
|
-
case
|
|
1968
|
+
case U:
|
|
1962
1969
|
return Ae(e.type, r, i);
|
|
1963
1970
|
case q: {
|
|
1964
1971
|
var a = e, u = a._payload, p = a._init;
|
|
@@ -2077,7 +2084,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2077
2084
|
i = r.propTypes;
|
|
2078
2085
|
else if (typeof r == "object" && (r.$$typeof === z || // Note: Memo only checks outer props here.
|
|
2079
2086
|
// Inner props are checked in the reconciler.
|
|
2080
|
-
r.$$typeof ===
|
|
2087
|
+
r.$$typeof === U))
|
|
2081
2088
|
i = r.propTypes;
|
|
2082
2089
|
else
|
|
2083
2090
|
return;
|
|
@@ -2112,7 +2119,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2112
2119
|
var p = $r(r);
|
|
2113
2120
|
p ? u += p : u += Pt();
|
|
2114
2121
|
var d;
|
|
2115
|
-
e === null ? d = "null" : Se(e) ? d = "array" : e !== void 0 && e.$$typeof ===
|
|
2122
|
+
e === null ? d = "null" : Se(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
2123
|
}
|
|
2117
2124
|
var m = Xt.apply(this, arguments);
|
|
2118
2125
|
if (m == null)
|
|
@@ -2123,7 +2130,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2123
2130
|
return e === y ? Lr(m) : Tt(m), m;
|
|
2124
2131
|
}
|
|
2125
2132
|
var jt = !1;
|
|
2126
|
-
function
|
|
2133
|
+
function Vr(e) {
|
|
2127
2134
|
var r = kt.bind(null, e);
|
|
2128
2135
|
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
2136
|
enumerable: !1,
|
|
@@ -2134,7 +2141,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2134
2141
|
}
|
|
2135
2142
|
}), r;
|
|
2136
2143
|
}
|
|
2137
|
-
function
|
|
2144
|
+
function Ur(e, r, i) {
|
|
2138
2145
|
for (var a = er.apply(this, arguments), u = 2; u < arguments.length; u++)
|
|
2139
2146
|
Dt(arguments[u], a.type);
|
|
2140
2147
|
return Tt(a), a;
|
|
@@ -2258,7 +2265,7 @@ Check the top-level render call using <` + i + ">.");
|
|
|
2258
2265
|
}
|
|
2259
2266
|
}
|
|
2260
2267
|
}
|
|
2261
|
-
var Hr = kt, Br =
|
|
2268
|
+
var Hr = kt, Br = Ur, zr = Vr, qr = {
|
|
2262
2269
|
map: Te,
|
|
2263
2270
|
forEach: ir,
|
|
2264
2271
|
count: or,
|
|
@@ -2309,49 +2316,49 @@ class _n extends fe.Component {
|
|
|
2309
2316
|
});
|
|
2310
2317
|
}
|
|
2311
2318
|
async storeDocument(t) {
|
|
2312
|
-
const { controller: s, layout:
|
|
2313
|
-
s.setDocument(t), await s.storeDocument(),
|
|
2319
|
+
const { controller: s, layout: c } = this.props;
|
|
2320
|
+
s.setDocument(t), await s.storeDocument(), c === "formAndItems" ? this.newDocument() : this.setState({
|
|
2314
2321
|
mode: 0
|
|
2315
2322
|
/* normal */
|
|
2316
2323
|
});
|
|
2317
2324
|
}
|
|
2318
2325
|
invokeContentViewChild(t) {
|
|
2319
|
-
const { children: s, layout:
|
|
2320
|
-
if (!
|
|
2326
|
+
const { children: s, layout: c, controller: l } = this.props, { mode: y } = this.state, D = c !== "formAndItems";
|
|
2327
|
+
if (!l.document)
|
|
2321
2328
|
return;
|
|
2322
2329
|
const F = {
|
|
2323
|
-
controller:
|
|
2330
|
+
controller: l,
|
|
2324
2331
|
submitButtonCaption: y == 2 ? t == null ? void 0 : t.updateButtonLabel : t == null ? void 0 : t.addButtonLabel,
|
|
2325
|
-
onSubmit: (
|
|
2332
|
+
onSubmit: (V) => this.storeDocument(V),
|
|
2326
2333
|
onCancel: D ? () => this.setState({
|
|
2327
2334
|
mode: 0
|
|
2328
2335
|
/* normal */
|
|
2329
2336
|
}) : () => this.newDocument()
|
|
2330
2337
|
};
|
|
2331
|
-
return typeof s[0] == "function" ? fe.cloneElement(s[0](F), { key:
|
|
2338
|
+
return typeof s[0] == "function" ? fe.cloneElement(s[0](F), { key: l.document.id }) : fe.cloneElement(s[0], { key: l.document.id, ...F });
|
|
2332
2339
|
}
|
|
2333
2340
|
invokeDetailViewChild(t) {
|
|
2334
|
-
const { children: s, controller:
|
|
2341
|
+
const { children: s, controller: c } = this.props, l = {
|
|
2335
2342
|
document: t,
|
|
2336
2343
|
onSelect: (y) => this.editDocument(y),
|
|
2337
|
-
onDelete: (y) =>
|
|
2344
|
+
onDelete: (y) => c.setDocument(y).deleteDocument()
|
|
2338
2345
|
};
|
|
2339
|
-
return typeof s[1] == "function" ? fe.cloneElement(s[1](
|
|
2346
|
+
return typeof s[1] == "function" ? fe.cloneElement(s[1](l), { key: t.id }) : fe.cloneElement(s[1], { key: t.id, ...l });
|
|
2340
2347
|
}
|
|
2341
2348
|
render() {
|
|
2342
|
-
var
|
|
2343
|
-
const { mode: t, documents: s } = this.state, { className:
|
|
2349
|
+
var U;
|
|
2350
|
+
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
2351
|
let F = this.props.labels || {};
|
|
2345
|
-
const
|
|
2352
|
+
const V = this.props.layout || "itemsAlways";
|
|
2346
2353
|
typeof F == "function" && (F = F(y));
|
|
2347
2354
|
const { addNewDocumentLabel: B, singularDocumentInCollectionCaption: z, documentsInCollectionCaption: H, noDocumentsFoundLabel: Z } = F;
|
|
2348
|
-
return /* @__PURE__ */ W.createElement("div", { className: `crud-panel ${D} ${
|
|
2355
|
+
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
2356
|
"div",
|
|
2350
2357
|
{
|
|
2351
2358
|
className: "crud-card card-add-button clickable",
|
|
2352
2359
|
onClick: () => this.newDocument()
|
|
2353
2360
|
},
|
|
2354
|
-
/* @__PURE__ */ W.createElement("div", { className: "button-element" },
|
|
2361
|
+
/* @__PURE__ */ W.createElement("div", { className: "button-element" }, l),
|
|
2355
2362
|
/* @__PURE__ */ W.createElement("div", { className: "add-label" }, B)
|
|
2356
2363
|
), 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
2364
|
}
|