@ibiz-template/model-helper 0.7.41-alpha.30 → 0.7.41-alpha.31
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.esm.js
CHANGED
|
@@ -18384,6 +18384,18 @@ function mergeDEDrControl(dstDRCtrl, srcDRCtrl) {
|
|
|
18384
18384
|
}
|
|
18385
18385
|
|
|
18386
18386
|
// src/utils/merge-model/merge-app-uiaction-group.ts
|
|
18387
|
+
function parseDynamicOverlay(tag) {
|
|
18388
|
+
if (!tag) {
|
|
18389
|
+
return null;
|
|
18390
|
+
}
|
|
18391
|
+
const match = tag.match(
|
|
18392
|
+
/^dynamic_overlay:(before|after|replace|delete):(.+)$/
|
|
18393
|
+
);
|
|
18394
|
+
if (match) {
|
|
18395
|
+
return { position: match[1], targetId: match[2] };
|
|
18396
|
+
}
|
|
18397
|
+
return null;
|
|
18398
|
+
}
|
|
18387
18399
|
function mergeAppDEUIActionGroup(dst, src) {
|
|
18388
18400
|
if (!dst || !src) {
|
|
18389
18401
|
return;
|
|
@@ -18393,7 +18405,43 @@ function mergeAppDEUIActionGroup(dst, src) {
|
|
|
18393
18405
|
dst.uiactionGroupDetails = [];
|
|
18394
18406
|
}
|
|
18395
18407
|
src.uiactionGroupDetails.forEach((item) => {
|
|
18396
|
-
|
|
18408
|
+
const overlayInfo = parseDynamicOverlay(item.userTag);
|
|
18409
|
+
if (overlayInfo && overlayInfo.position && overlayInfo.targetId) {
|
|
18410
|
+
const targetIndex = dst.uiactionGroupDetails.findIndex(
|
|
18411
|
+
(x) => x.id === overlayInfo.targetId
|
|
18412
|
+
);
|
|
18413
|
+
if (targetIndex !== -1) {
|
|
18414
|
+
switch (overlayInfo.position) {
|
|
18415
|
+
case "before":
|
|
18416
|
+
dst.uiactionGroupDetails.splice(
|
|
18417
|
+
targetIndex,
|
|
18418
|
+
0,
|
|
18419
|
+
item
|
|
18420
|
+
);
|
|
18421
|
+
break;
|
|
18422
|
+
case "after":
|
|
18423
|
+
dst.uiactionGroupDetails.splice(
|
|
18424
|
+
targetIndex + 1,
|
|
18425
|
+
0,
|
|
18426
|
+
item
|
|
18427
|
+
);
|
|
18428
|
+
break;
|
|
18429
|
+
case "replace":
|
|
18430
|
+
dst.uiactionGroupDetails[targetIndex] = item;
|
|
18431
|
+
break;
|
|
18432
|
+
case "delete":
|
|
18433
|
+
dst.uiactionGroupDetails.splice(targetIndex, 1);
|
|
18434
|
+
break;
|
|
18435
|
+
default:
|
|
18436
|
+
dst.uiactionGroupDetails.push(item);
|
|
18437
|
+
break;
|
|
18438
|
+
}
|
|
18439
|
+
} else {
|
|
18440
|
+
dst.uiactionGroupDetails.push(item);
|
|
18441
|
+
}
|
|
18442
|
+
} else {
|
|
18443
|
+
dst.uiactionGroupDetails.push(item);
|
|
18444
|
+
}
|
|
18397
18445
|
});
|
|
18398
18446
|
}
|
|
18399
18447
|
}
|