cx 24.3.9 → 24.3.10
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/manifest.js +744 -744
- package/dist/ui.js +29 -17
- package/package.json +1 -1
- package/src/ui/CultureScope.js +2 -0
- package/src/ui/Cx.js +311 -313
- package/src/ui/Restate.js +163 -160
package/dist/ui.js
CHANGED
|
@@ -2304,6 +2304,7 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
2304
2304
|
buster: ++this.renderCount,
|
|
2305
2305
|
contentFactory: this.props.contentFactory,
|
|
2306
2306
|
forceUpdate: this.forceUpdateCallback,
|
|
2307
|
+
cultureInfo: this.props.cultureInfo,
|
|
2307
2308
|
});
|
|
2308
2309
|
};
|
|
2309
2310
|
_proto.componentDidMount = function componentDidMount() {
|
|
@@ -2375,7 +2376,8 @@ var Cx = /*#__PURE__*/ (function (_VDOM$Component) {
|
|
|
2375
2376
|
props.instance !== this.props.instance ||
|
|
2376
2377
|
props.widget !== this.props.widget ||
|
|
2377
2378
|
props.store !== this.props.store ||
|
|
2378
|
-
props.parentInstance !== this.props.parentInstance
|
|
2379
|
+
props.parentInstance !== this.props.parentInstance ||
|
|
2380
|
+
props.cultureInfo !== this.props.cultureInfo
|
|
2379
2381
|
);
|
|
2380
2382
|
};
|
|
2381
2383
|
_proto.componentDidCatchHandler = function componentDidCatchHandler(error, info) {
|
|
@@ -2410,23 +2412,28 @@ var CxContext = /*#__PURE__*/ (function (_VDOM$Component2) {
|
|
|
2410
2412
|
throw new Error("The instance passed to a Cx component should be detached from its parent.");
|
|
2411
2413
|
if (this.props.instance !== instance && this.props.instance.destroyTracked) this.props.instance.destroy();
|
|
2412
2414
|
this.props.flags.preparing = true;
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2415
|
+
if (this.props.cultureInfo) pushCulture(this.props.cultureInfo);
|
|
2416
|
+
try {
|
|
2417
|
+
do {
|
|
2418
|
+
context = new RenderingContext(options);
|
|
2419
|
+
context.forceUpdate = this.props.forceUpdate;
|
|
2420
|
+
this.props.flags.dirty = false;
|
|
2421
|
+
instance.assignedRenderList = context.getRootRenderList();
|
|
2422
|
+
visible = instance.scheduleExploreIfVisible(context);
|
|
2423
|
+
if (visible) {
|
|
2424
|
+
while (!context.exploreStack.empty()) {
|
|
2425
|
+
var inst = context.exploreStack.pop();
|
|
2426
|
+
//console.log("EXPLORE", inst.widget.constructor.name, inst.widget.tag, inst.widget.widgetId);
|
|
2427
|
+
inst.explore(context);
|
|
2428
|
+
}
|
|
2429
|
+
} else if (instance.destroyTracked) {
|
|
2430
|
+
instance.destroy();
|
|
2431
|
+
break;
|
|
2424
2432
|
}
|
|
2425
|
-
}
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
} while (this.props.flags.dirty && ++count <= 3 && Widget.optimizePrepare && now() - this.timings.start < 8);
|
|
2433
|
+
} while (this.props.flags.dirty && ++count <= 3 && Widget.optimizePrepare && now() - this.timings.start < 8);
|
|
2434
|
+
} finally {
|
|
2435
|
+
if (this.props.cultureInfo) popCulture();
|
|
2436
|
+
}
|
|
2430
2437
|
if (visible) {
|
|
2431
2438
|
this.timings.afterExplore = now();
|
|
2432
2439
|
for (var i = 0; i < context.prepareList.length; i++) context.prepareList[i].prepare(context);
|
|
@@ -2817,6 +2824,8 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
2817
2824
|
_proto.explore = function explore(context, instance) {
|
|
2818
2825
|
if (!instance.subStore) this.initSubStore(context, instance);
|
|
2819
2826
|
if (instance.subStore.parentDataCheck()) instance.markShouldUpdate();
|
|
2827
|
+
instance.cultureInfo = context.cultureInfo;
|
|
2828
|
+
if (instance.cache("cultureInfo", instance.culture)) instance.markShouldUpdate();
|
|
2820
2829
|
_PureContainer.prototype.explore.call(this, context, instance);
|
|
2821
2830
|
};
|
|
2822
2831
|
_proto.exploreItems = function exploreItems(context, instance, items) {
|
|
@@ -2840,6 +2849,7 @@ var Restate = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
2840
2849
|
deferredUntilIdle: instance.data.deferredUntilIdle,
|
|
2841
2850
|
idleTimeout: instance.data.idleTimeout,
|
|
2842
2851
|
immediate: this.immediate,
|
|
2852
|
+
cultureInfo: instance.cultureInfo,
|
|
2843
2853
|
},
|
|
2844
2854
|
key,
|
|
2845
2855
|
);
|
|
@@ -3199,9 +3209,11 @@ var CultureScope = /*#__PURE__*/ (function (_PureContainer) {
|
|
|
3199
3209
|
var culture = instance.culture;
|
|
3200
3210
|
pushCulture(culture);
|
|
3201
3211
|
if (this.items.length == 0 && this.initialItems) this.add(this.initialItems);
|
|
3212
|
+
context.push("cultureInfo", culture);
|
|
3202
3213
|
_PureContainer.prototype.explore.call(this, context, instance);
|
|
3203
3214
|
};
|
|
3204
3215
|
_proto.exploreCleanup = function exploreCleanup(context, instance) {
|
|
3216
|
+
context.pop("cultureInfo");
|
|
3205
3217
|
popCulture();
|
|
3206
3218
|
};
|
|
3207
3219
|
return CultureScope;
|
package/package.json
CHANGED
package/src/ui/CultureScope.js
CHANGED
|
@@ -38,10 +38,12 @@ export class CultureScope extends PureContainer {
|
|
|
38
38
|
let { culture } = instance;
|
|
39
39
|
pushCulture(culture);
|
|
40
40
|
if (this.items.length == 0 && this.initialItems) this.add(this.initialItems);
|
|
41
|
+
context.push("cultureInfo", culture);
|
|
41
42
|
super.explore(context, instance);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
exploreCleanup(context, instance) {
|
|
46
|
+
context.pop("cultureInfo");
|
|
45
47
|
popCulture();
|
|
46
48
|
}
|
|
47
49
|
}
|