ddd-react 1.10.7 → 1.10.9
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/index.mjs +17 -21
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as c, e as m, a as R, A as E, b as x, h as
|
|
1
|
+
import { D as c, e as m, a as R, A as E, b as x, h as B, c as U } from "./h-BbaMkkC7.mjs";
|
|
2
2
|
import { d as Pt, f as Ot } from "./h-BbaMkkC7.mjs";
|
|
3
3
|
function b(e, t) {
|
|
4
4
|
if (e === null || t === null || e === void 0 || t === void 0)
|
|
@@ -215,11 +215,7 @@ function V(e, t, r) {
|
|
|
215
215
|
}
|
|
216
216
|
function tt(e, t, r, n) {
|
|
217
217
|
const o = e.tag, { props: i } = C(e), s = new o(i, n);
|
|
218
|
-
|
|
219
|
-
s.mount(t, r), e.component = s, e.el = s.firstElement || null;
|
|
220
|
-
} catch {
|
|
221
|
-
s.vdom && (e.component = s);
|
|
222
|
-
}
|
|
218
|
+
s.mount(t, r), e.component = s, e.el = s.firstElement || null;
|
|
223
219
|
}
|
|
224
220
|
function L(e, t, r) {
|
|
225
221
|
if (r == null) {
|
|
@@ -489,7 +485,7 @@ class T {
|
|
|
489
485
|
throw new Error("Component is already mounted");
|
|
490
486
|
ht(this) && !this.subscribedProvider && this.subscribeToProvider(), this.updateContext();
|
|
491
487
|
try {
|
|
492
|
-
this.vdom = this.render(), this.hostEl = t, d(this.vdom, t, r, this)
|
|
488
|
+
this.vdom = this.render(), this.hostEl = t, this.isMounted = !0, d(this.vdom, t, r, this);
|
|
493
489
|
} catch (n) {
|
|
494
490
|
this.handleError(n, "mount");
|
|
495
491
|
}
|
|
@@ -554,20 +550,20 @@ class T {
|
|
|
554
550
|
console.log("Rendering fallback UI");
|
|
555
551
|
try {
|
|
556
552
|
const s = n.render();
|
|
557
|
-
if (s
|
|
558
|
-
if (
|
|
553
|
+
if (s) {
|
|
554
|
+
if (!n.vdom) {
|
|
559
555
|
for (console.log("Mounting ErrorBoundary fallback (first time)"); n.hostEl.firstChild; )
|
|
560
556
|
n.hostEl.removeChild(n.hostEl.firstChild);
|
|
561
|
-
d(s, n.hostEl, null, n.parent), n.vdom = s
|
|
557
|
+
d(s, n.hostEl, null, n.parent), n.vdom = s, n.isMounted = !0, h(() => {
|
|
558
|
+
n.didCatch(t, {
|
|
559
|
+
phase: r,
|
|
560
|
+
failedComponent: this.constructor.name,
|
|
561
|
+
componentStack: this.getComponentStack()
|
|
562
|
+
}), n.didMount();
|
|
563
|
+
});
|
|
562
564
|
}
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
phase: r,
|
|
566
|
-
failedComponent: this.constructor.name,
|
|
567
|
-
componentStack: this.getComponentStack()
|
|
568
|
-
}), n.didMount();
|
|
569
|
-
});
|
|
570
|
-
}
|
|
565
|
+
} else
|
|
566
|
+
console.error("ErrorBoundary.render() returned null or undefined!");
|
|
571
567
|
} catch (s) {
|
|
572
568
|
console.error("Error during ErrorBoundary recovery:", s), n.parent && n.parent.handleError(s, r);
|
|
573
569
|
}
|
|
@@ -618,7 +614,7 @@ function yt(e) {
|
|
|
618
614
|
isProvider = !0;
|
|
619
615
|
render() {
|
|
620
616
|
let o = [];
|
|
621
|
-
return Array.isArray(this.props.children) ? o = this.props.children : this.props.children ? o = [this.props.children] : o = [],
|
|
617
|
+
return Array.isArray(this.props.children) ? o = this.props.children : this.props.children ? o = [this.props.children] : o = [], B(o);
|
|
622
618
|
}
|
|
623
619
|
}
|
|
624
620
|
class r extends T {
|
|
@@ -659,7 +655,7 @@ function gt(e = null) {
|
|
|
659
655
|
}
|
|
660
656
|
function vt(e, t) {
|
|
661
657
|
const r = Array.isArray(e) ? e : [e];
|
|
662
|
-
return
|
|
658
|
+
return U(r, t);
|
|
663
659
|
}
|
|
664
660
|
export {
|
|
665
661
|
T as Component,
|
|
@@ -667,7 +663,7 @@ export {
|
|
|
667
663
|
vt as createPortal,
|
|
668
664
|
gt as createRef,
|
|
669
665
|
Pt as h,
|
|
670
|
-
|
|
666
|
+
B as hFragment,
|
|
671
667
|
Ot as hString,
|
|
672
668
|
Et as render
|
|
673
669
|
};
|