ddd-react 1.6.1 → 1.6.2
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 +33 -33
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -205,8 +205,8 @@ function Q(e, t, r, n) {
|
|
|
205
205
|
}
|
|
206
206
|
function Z(e, t, r, n) {
|
|
207
207
|
const { tag: s, children: i } = e, f = s === "svg" || t instanceof SVGElement ? document.createElementNS("http://www.w3.org/2000/svg", s) : document.createElement(s);
|
|
208
|
-
V(f, e, n), e.el = f, i?.forEach((
|
|
209
|
-
h(
|
|
208
|
+
V(f, e, n), e.el = f, i?.forEach((l) => {
|
|
209
|
+
h(l, f, null, n);
|
|
210
210
|
}), j(f, t, r);
|
|
211
211
|
}
|
|
212
212
|
function V(e, t, r) {
|
|
@@ -285,11 +285,11 @@ function m(e, t, r, n = null) {
|
|
|
285
285
|
break;
|
|
286
286
|
}
|
|
287
287
|
case c.COMPONENT: {
|
|
288
|
-
|
|
288
|
+
lt(e, t);
|
|
289
289
|
break;
|
|
290
290
|
}
|
|
291
291
|
case c.PORTAL: {
|
|
292
|
-
|
|
292
|
+
at(e, t, n);
|
|
293
293
|
break;
|
|
294
294
|
}
|
|
295
295
|
}
|
|
@@ -311,12 +311,12 @@ function it(e, t, r) {
|
|
|
311
311
|
on: o,
|
|
312
312
|
...f
|
|
313
313
|
} = e.props ?? {}, {
|
|
314
|
-
class:
|
|
314
|
+
class: l,
|
|
315
315
|
style: u,
|
|
316
|
-
on:
|
|
316
|
+
on: a,
|
|
317
317
|
...d
|
|
318
318
|
} = t.props ?? {}, { listeners: E } = e;
|
|
319
|
-
ot(n, f, d), ct(n, s,
|
|
319
|
+
ot(n, f, d), ct(n, s, l), ut(
|
|
320
320
|
n,
|
|
321
321
|
i,
|
|
322
322
|
u
|
|
@@ -324,7 +324,7 @@ function it(e, t, r) {
|
|
|
324
324
|
n,
|
|
325
325
|
E,
|
|
326
326
|
o ?? {},
|
|
327
|
-
|
|
327
|
+
a ?? {},
|
|
328
328
|
r
|
|
329
329
|
);
|
|
330
330
|
}
|
|
@@ -333,11 +333,11 @@ function ot(e, t = {}, r = {}) {
|
|
|
333
333
|
n !== s && (n && typeof n == "object" && "current" in n && (n.current = null), s && typeof s == "object" && "current" in s && (s.current = e));
|
|
334
334
|
const i = { ...t }, o = { ...r };
|
|
335
335
|
delete i.ref, delete o.ref;
|
|
336
|
-
const { added: f, removed:
|
|
337
|
-
for (const
|
|
338
|
-
w(e,
|
|
339
|
-
for (const
|
|
340
|
-
L(e,
|
|
336
|
+
const { added: f, removed: l, updated: u } = T(i, o);
|
|
337
|
+
for (const a of l)
|
|
338
|
+
w(e, a);
|
|
339
|
+
for (const a of f.concat(u))
|
|
340
|
+
L(e, a, o[a]);
|
|
341
341
|
}
|
|
342
342
|
function ct(e, t, r) {
|
|
343
343
|
const n = M(t), s = M(r), { added: i, removed: o } = F(n, s);
|
|
@@ -356,50 +356,50 @@ function ut(e, t = {}, r = {}) {
|
|
|
356
356
|
function ft(e, t = {}, r = {}, n = {}, s = null) {
|
|
357
357
|
const { removed: i, added: o, updated: f } = T(r, n);
|
|
358
358
|
for (const u of i.concat(f)) {
|
|
359
|
-
const
|
|
360
|
-
|
|
359
|
+
const a = t?.[u];
|
|
360
|
+
a && e.removeEventListener(u, a);
|
|
361
361
|
}
|
|
362
|
-
const
|
|
362
|
+
const l = {};
|
|
363
363
|
for (const u of o.concat(f))
|
|
364
|
-
|
|
364
|
+
l[u] = S(
|
|
365
365
|
u,
|
|
366
366
|
n[u],
|
|
367
367
|
e,
|
|
368
368
|
s
|
|
369
369
|
);
|
|
370
|
-
return
|
|
370
|
+
return l;
|
|
371
371
|
}
|
|
372
372
|
function R(e, t, r) {
|
|
373
373
|
const n = v(e), s = v(t), i = e.el, o = x(n, s, D), f = r?.offset ?? 0;
|
|
374
|
-
for (const
|
|
375
|
-
if (
|
|
376
|
-
const { originalIndex: u, index:
|
|
377
|
-
m(n[u], s[
|
|
374
|
+
for (const l of o)
|
|
375
|
+
if (l.op === y.NOOP) {
|
|
376
|
+
const { originalIndex: u, index: a } = l;
|
|
377
|
+
m(n[u], s[a], i, r);
|
|
378
378
|
}
|
|
379
|
-
for (const
|
|
380
|
-
switch (
|
|
379
|
+
for (const l of o)
|
|
380
|
+
switch (l.op) {
|
|
381
381
|
case y.MOVE: {
|
|
382
|
-
const { from: u, index:
|
|
383
|
-
d && (i.insertBefore(d, E), m(n[u], s[
|
|
382
|
+
const { from: u, index: a } = l, d = n[u].el, E = i.childNodes[a + f];
|
|
383
|
+
d && (i.insertBefore(d, E), m(n[u], s[a], i, r));
|
|
384
384
|
break;
|
|
385
385
|
}
|
|
386
386
|
case y.REMOVE: {
|
|
387
|
-
const { item: u } =
|
|
387
|
+
const { item: u } = l;
|
|
388
388
|
p(u);
|
|
389
389
|
break;
|
|
390
390
|
}
|
|
391
391
|
case y.ADD: {
|
|
392
|
-
const { index: u, item:
|
|
393
|
-
h(
|
|
392
|
+
const { index: u, item: a } = l;
|
|
393
|
+
h(a, i, u + f, r);
|
|
394
394
|
break;
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function lt(e, t) {
|
|
399
399
|
const { component: r } = e, { props: n } = A(t);
|
|
400
400
|
r.updateProps(n), t.component = r, t.el = r.firstElement;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function at(e, t, r) {
|
|
403
403
|
if (e.container !== t.container) {
|
|
404
404
|
p(e), h(t, document.body, null, r);
|
|
405
405
|
return;
|
|
@@ -475,9 +475,9 @@ class k {
|
|
|
475
475
|
}
|
|
476
476
|
updateContext() {
|
|
477
477
|
const t = Object.getPrototypeOf(this).constructor.contextType;
|
|
478
|
-
if (t
|
|
478
|
+
if (t != null) {
|
|
479
479
|
if (this.subscribedProvider)
|
|
480
|
-
return this.context = this.subscribedProvider.props.value, !0;
|
|
480
|
+
return console.log("this.subscribedProvider", this.subscribedProvider), this.context = this.subscribedProvider.props.value, !0;
|
|
481
481
|
this.context = t.defaultValue;
|
|
482
482
|
}
|
|
483
483
|
return !1;
|