@next-core/brick-kit 2.145.3 → 2.146.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.
- package/CHANGELOG.md +11 -0
- package/dist/index.bundle.js +21 -20
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +21 -20
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2181,26 +2181,6 @@ function _resolveNormalStoryboardContext() {
|
|
|
2181
2181
|
// Or if the resolve is ignored or lazy, use its `value` as a fallback.
|
|
2182
2182
|
value = computeRealValue(contextConf.value, mergedContext, true);
|
|
2183
2183
|
}
|
|
2184
|
-
|
|
2185
|
-
if (contextConf.track) {
|
|
2186
|
-
// Track its dependencies and auto update when each of them changed.
|
|
2187
|
-
var deps = (isTemplateState ? trackUsedState : trackUsedContext)(load ? contextConf.resolve : contextConf.value);
|
|
2188
|
-
|
|
2189
|
-
for (var dep of deps) {
|
|
2190
|
-
var _eventTarget;
|
|
2191
|
-
|
|
2192
|
-
var ctx = storyboardContextWrapper.get().get(dep);
|
|
2193
|
-
ctx === null || ctx === void 0 ? void 0 : (_eventTarget = ctx.eventTarget) === null || _eventTarget === void 0 ? void 0 : _eventTarget.addEventListener(isTemplateState ? "state.change" : "context.change", () => {
|
|
2194
|
-
if (load) {
|
|
2195
|
-
storyboardContextWrapper.updateValue(contextConf.name, {
|
|
2196
|
-
cache: "default"
|
|
2197
|
-
}, "refresh");
|
|
2198
|
-
} else {
|
|
2199
|
-
storyboardContextWrapper.updateValue(contextConf.name, computeRealValue(contextConf.value, mergedContext, true), "replace");
|
|
2200
|
-
}
|
|
2201
|
-
});
|
|
2202
|
-
}
|
|
2203
|
-
}
|
|
2204
2184
|
}
|
|
2205
2185
|
|
|
2206
2186
|
resolveFreeVariableValue(value, contextConf, mergedContext, storyboardContextWrapper, brick, load, !isLazyResolve);
|
|
@@ -2250,6 +2230,27 @@ function resolveFreeVariableValue(value, contextConf, mergedContext, storyboardC
|
|
|
2250
2230
|
}
|
|
2251
2231
|
}
|
|
2252
2232
|
|
|
2233
|
+
if (contextConf.track) {
|
|
2234
|
+
var isTemplateState = !!storyboardContextWrapper.tplContextId; // Track its dependencies and auto update when each of them changed.
|
|
2235
|
+
|
|
2236
|
+
var deps = (isTemplateState ? trackUsedState : trackUsedContext)(load ? contextConf.resolve : contextConf.value);
|
|
2237
|
+
|
|
2238
|
+
for (var dep of deps) {
|
|
2239
|
+
var _eventTarget;
|
|
2240
|
+
|
|
2241
|
+
var ctx = storyboardContextWrapper.get().get(dep);
|
|
2242
|
+
ctx === null || ctx === void 0 ? void 0 : (_eventTarget = ctx.eventTarget) === null || _eventTarget === void 0 ? void 0 : _eventTarget.addEventListener(isTemplateState ? "state.change" : "context.change", () => {
|
|
2243
|
+
if (load) {
|
|
2244
|
+
storyboardContextWrapper.updateValue(contextConf.name, {
|
|
2245
|
+
cache: "default"
|
|
2246
|
+
}, "refresh");
|
|
2247
|
+
} else {
|
|
2248
|
+
storyboardContextWrapper.updateValue(contextConf.name, computeRealValue(contextConf.value, mergedContext, true), "replace");
|
|
2249
|
+
}
|
|
2250
|
+
});
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2253
2254
|
storyboardContextWrapper.set(contextConf.name, newContext);
|
|
2254
2255
|
}
|
|
2255
2256
|
|