@next-core/brick-kit 2.104.2 → 2.104.3
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 +47 -43
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +47 -43
- package/dist/index.esm.js.map +1 -1
- package/dist/types/internal/setProperties.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -2435,6 +2435,49 @@ function evaluate(raw) {
|
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
2437
|
|
|
2438
|
+
var customTemplateRegistry = new Map();
|
|
2439
|
+
var appRegistered = new Set();
|
|
2440
|
+
var symbolForComputedPropsFromProxy = Symbol.for("tpl.computedPropsFromProxy");
|
|
2441
|
+
var symbolForRefForProxy = Symbol.for("tpl.refForProxy");
|
|
2442
|
+
var symbolForTplContextId = Symbol.for("tpl.contextId");
|
|
2443
|
+
|
|
2444
|
+
function setupUseBrickInTemplate(props, tplContextId) {
|
|
2445
|
+
function walk(props) {
|
|
2446
|
+
if (!props) {
|
|
2447
|
+
return;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
for (var [key, value] of Object.entries(props)) {
|
|
2451
|
+
if (isObject(value)) {
|
|
2452
|
+
if (key === "useBrick") {
|
|
2453
|
+
if (Array.isArray(value)) {
|
|
2454
|
+
value.forEach(setup);
|
|
2455
|
+
} else {
|
|
2456
|
+
setup(value);
|
|
2457
|
+
}
|
|
2458
|
+
} else {
|
|
2459
|
+
walk(value);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
function setup(item) {
|
|
2466
|
+
item[symbolForTplContextId] = tplContextId;
|
|
2467
|
+
walk(item.properties);
|
|
2468
|
+
|
|
2469
|
+
if (item.slots) {
|
|
2470
|
+
Object.values(item.slots).forEach(slot => {
|
|
2471
|
+
if (Array.isArray(slot.bricks)) {
|
|
2472
|
+
slot.bricks.forEach(setup);
|
|
2473
|
+
}
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
walk(props);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2438
2481
|
var computeRealValue = (value, context, injectDeep, internalOptions) => {
|
|
2439
2482
|
var preEvaluated = isPreEvaluated(value);
|
|
2440
2483
|
|
|
@@ -2488,6 +2531,10 @@ var computeRealValue = (value, context, injectDeep, internalOptions) => {
|
|
|
2488
2531
|
function setProperties(bricks, properties, context, injectDeep) {
|
|
2489
2532
|
var realProps = computeRealProperties(properties, context, injectDeep);
|
|
2490
2533
|
|
|
2534
|
+
if (context.tplContextId) {
|
|
2535
|
+
setupUseBrickInTemplate(realProps, context.tplContextId);
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2491
2538
|
if (!Array.isArray(bricks)) {
|
|
2492
2539
|
bricks = [bricks];
|
|
2493
2540
|
}
|
|
@@ -10002,12 +10049,6 @@ class Router {
|
|
|
10002
10049
|
|
|
10003
10050
|
}
|
|
10004
10051
|
|
|
10005
|
-
var customTemplateRegistry = new Map();
|
|
10006
|
-
var appRegistered = new Set();
|
|
10007
|
-
var symbolForComputedPropsFromProxy = Symbol.for("tpl.computedPropsFromProxy");
|
|
10008
|
-
var symbolForRefForProxy = Symbol.for("tpl.refForProxy");
|
|
10009
|
-
var symbolForTplContextId = Symbol.for("tpl.contextId");
|
|
10010
|
-
|
|
10011
10052
|
function isBasicProperty(propRef) {
|
|
10012
10053
|
return !!propRef.refProperty;
|
|
10013
10054
|
}
|
|
@@ -10182,43 +10223,6 @@ function collectMergeBases(conf, mergeBases, contextInTemplate, refToBrickConf)
|
|
|
10182
10223
|
}
|
|
10183
10224
|
}
|
|
10184
10225
|
|
|
10185
|
-
function setupUseBrickInTemplate(props, tplContextId) {
|
|
10186
|
-
function walk(props) {
|
|
10187
|
-
if (!props) {
|
|
10188
|
-
return;
|
|
10189
|
-
}
|
|
10190
|
-
|
|
10191
|
-
for (var [key, value] of Object.entries(props)) {
|
|
10192
|
-
if (isObject(value)) {
|
|
10193
|
-
if (key === "useBrick") {
|
|
10194
|
-
if (Array.isArray(value)) {
|
|
10195
|
-
value.forEach(setup);
|
|
10196
|
-
} else {
|
|
10197
|
-
setup(value);
|
|
10198
|
-
}
|
|
10199
|
-
} else {
|
|
10200
|
-
walk(value);
|
|
10201
|
-
}
|
|
10202
|
-
}
|
|
10203
|
-
}
|
|
10204
|
-
}
|
|
10205
|
-
|
|
10206
|
-
function setup(item) {
|
|
10207
|
-
item[symbolForTplContextId] = tplContextId;
|
|
10208
|
-
walk(item.properties);
|
|
10209
|
-
|
|
10210
|
-
if (item.slots) {
|
|
10211
|
-
Object.values(item.slots).forEach(slot => {
|
|
10212
|
-
if (Array.isArray(slot.bricks)) {
|
|
10213
|
-
slot.bricks.forEach(setup);
|
|
10214
|
-
}
|
|
10215
|
-
});
|
|
10216
|
-
}
|
|
10217
|
-
}
|
|
10218
|
-
|
|
10219
|
-
walk(props);
|
|
10220
|
-
}
|
|
10221
|
-
|
|
10222
10226
|
var _excluded$1 = ["properties", "slots"],
|
|
10223
10227
|
_excluded2 = ["ref", "slots"];
|
|
10224
10228
|
function expandCustomTemplate(brickConf, proxyBrick, context) {
|