@dialecte/scl 0.3.6 → 0.3.8
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/{hooks-BLN_sx9P.js → hooks-DJJN-WU2.js} +510 -467
- package/dist/v2019C1/extensions/data-model/public.d.ts +1 -1
- package/dist/v2019C1/extensions/data-model/public.d.ts.map +1 -1
- package/dist/v2019C1/extensions/data-model/transaction/import-types.d.ts +2 -2
- package/dist/v2019C1/extensions/data-model/transaction/import-types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/data-model/transaction/import-types.types.d.ts +14 -0
- package/dist/v2019C1/extensions/data-model/transaction/import-types.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/data-model/transaction/index.d.ts +1 -0
- package/dist/v2019C1/extensions/data-model/transaction/index.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/contract.types.d.ts +6 -0
- package/dist/v2019C1/extensions/lifecycle/contract.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/engine/reconcile.d.ts +3 -0
- package/dist/v2019C1/extensions/lifecycle/engine/reconcile.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.types.d.ts +3 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/asd.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.types.d.ts +3 -0
- package/dist/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/layers/application/clone-application.d.ts +2 -0
- package/dist/v2019C1/extensions/lifecycle/layers/application/clone-application.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/layers/function/clone-function.d.ts +2 -0
- package/dist/v2019C1/extensions/lifecycle/layers/function/clone-function.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/report/query/report-function.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/deep.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/deep.types.d.ts +12 -2
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/deep.types.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/transplant/transaction/primitives/clone-tree.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/asd.d.ts +3 -0
- package/dist/v2019C1/extensions/lifecycle/update/transaction/asd.d.ts.map +1 -1
- package/dist/v2019C1/extensions/lifecycle/update/transaction/fsd.d.ts +3 -0
- package/dist/v2019C1/extensions/lifecycle/update/transaction/fsd.d.ts.map +1 -1
- package/dist/v2019C1/hooks/before-clone/before-clone.d.ts.map +1 -1
- package/dist/v2019C1/index.js +1 -1
- package/dist/v2019C1/test.js +1 -1
- package/package.json +2 -2
|
@@ -25714,7 +25714,7 @@ var ot = /* @__PURE__ */ c({
|
|
|
25714
25714
|
});
|
|
25715
25715
|
//#endregion
|
|
25716
25716
|
//#region src/v2019C1/extensions/reference/transaction/apply-type-id-remap.ts
|
|
25717
|
-
async function
|
|
25717
|
+
async function k(e, t) {
|
|
25718
25718
|
let { records: n, idRemap: r } = t;
|
|
25719
25719
|
if (r.size !== 0) for (let t of n) {
|
|
25720
25720
|
let n = Ge.get(t.tagName);
|
|
@@ -25733,12 +25733,12 @@ async function st(e, t) {
|
|
|
25733
25733
|
}
|
|
25734
25734
|
//#endregion
|
|
25735
25735
|
//#region src/v2019C1/extensions/reference/transaction/write-provenance.ts
|
|
25736
|
-
var
|
|
25736
|
+
var st = {
|
|
25737
25737
|
FSD: "FunctionSclRef",
|
|
25738
25738
|
ASD: "ApplicationSclRef"
|
|
25739
25739
|
};
|
|
25740
|
-
async function
|
|
25741
|
-
let { sourceQuery: n, targetRoot: r, fileType: i } = t, [a] = await n.getRecordsByTagName("Header"), o = a ? await n.getAttributes(a) : void 0, s = await e.addChild(r, { tagName:
|
|
25740
|
+
async function ct(e, t) {
|
|
25741
|
+
let { sourceQuery: n, targetRoot: r, fileType: i } = t, [a] = await n.getRecordsByTagName("Header"), o = a ? await n.getAttributes(a) : void 0, s = await e.addChild(r, { tagName: st[i] }), { name: c } = await n.getDocumentInfo();
|
|
25742
25742
|
await e.addChild(s, {
|
|
25743
25743
|
tagName: "SclFileReference",
|
|
25744
25744
|
attributes: {
|
|
@@ -25752,16 +25752,16 @@ async function lt(e, t) {
|
|
|
25752
25752
|
}
|
|
25753
25753
|
//#endregion
|
|
25754
25754
|
//#region src/v2019C1/extensions/reference/index.ts
|
|
25755
|
-
var
|
|
25755
|
+
var A = {
|
|
25756
25756
|
query: ot,
|
|
25757
25757
|
transaction: /* @__PURE__ */ c({
|
|
25758
|
-
applyTypeIdRemap: () =>
|
|
25759
|
-
writeProvenance: () =>
|
|
25758
|
+
applyTypeIdRemap: () => k,
|
|
25759
|
+
writeProvenance: () => ct
|
|
25760
25760
|
})
|
|
25761
25761
|
};
|
|
25762
25762
|
//#endregion
|
|
25763
25763
|
//#region src/v2019C1/extensions/clean-up/transaction/prune-empty-containers.ts
|
|
25764
|
-
async function
|
|
25764
|
+
async function lt(e) {
|
|
25765
25765
|
let t = [...Object.values(Ye).flat(), "Private"];
|
|
25766
25766
|
for (let n of t) {
|
|
25767
25767
|
let t = await e.getRecordsByTagName(n);
|
|
@@ -25770,7 +25770,7 @@ async function ut(e) {
|
|
|
25770
25770
|
}
|
|
25771
25771
|
//#endregion
|
|
25772
25772
|
//#region src/v2019C1/extensions/clean-up/transaction/orphan-uuid-refs.ts
|
|
25773
|
-
async function
|
|
25773
|
+
async function ut(e) {
|
|
25774
25774
|
let t = Object.keys(T);
|
|
25775
25775
|
for (let n of t) {
|
|
25776
25776
|
let t = T[n], r = await e.getRecordsByTagName(n);
|
|
@@ -25778,7 +25778,7 @@ async function dt(e) {
|
|
|
25778
25778
|
let r = !1, a = !1, o = {};
|
|
25779
25779
|
for (let n of t) {
|
|
25780
25780
|
let t = await e.getAttribute(i, { name: n.attribute.uuid });
|
|
25781
|
-
if (t) if (r = !0, await
|
|
25781
|
+
if (t) if (r = !0, await dt(e, t, n.target)) a = !0;
|
|
25782
25782
|
else {
|
|
25783
25783
|
o[n.attribute.uuid] = void 0, o[n.attribute.path] = void 0;
|
|
25784
25784
|
for (let e of n.companions) o[e.name] = void 0;
|
|
@@ -25790,7 +25790,7 @@ async function dt(e) {
|
|
|
25790
25790
|
}
|
|
25791
25791
|
}
|
|
25792
25792
|
}
|
|
25793
|
-
async function
|
|
25793
|
+
async function dt(e, t, n) {
|
|
25794
25794
|
for (let r of n) {
|
|
25795
25795
|
let [n] = await e.findByAttributes({
|
|
25796
25796
|
tagName: r,
|
|
@@ -25802,14 +25802,14 @@ async function ft(e, t, n) {
|
|
|
25802
25802
|
}
|
|
25803
25803
|
//#endregion
|
|
25804
25804
|
//#region src/v2019C1/extensions/clean-up/index.ts
|
|
25805
|
-
var
|
|
25806
|
-
orphanUuidRefs: () =>
|
|
25807
|
-
pruneEmptyContainers: () =>
|
|
25805
|
+
var j = { transaction: /* @__PURE__ */ c({
|
|
25806
|
+
orphanUuidRefs: () => ut,
|
|
25807
|
+
pruneEmptyContainers: () => lt,
|
|
25808
25808
|
resetLNode: () => ee
|
|
25809
25809
|
}) };
|
|
25810
25810
|
//#endregion
|
|
25811
25811
|
//#region src/v2019C1/extensions/data-model/query/resolve.ts
|
|
25812
|
-
async function
|
|
25812
|
+
async function ft(e, n) {
|
|
25813
25813
|
let { records: r } = n, i = {
|
|
25814
25814
|
lnodeTypes: /* @__PURE__ */ new Map(),
|
|
25815
25815
|
doTypes: /* @__PURE__ */ new Map(),
|
|
@@ -25826,7 +25826,7 @@ async function pt(e, n) {
|
|
|
25826
25826
|
if (o(a, {
|
|
25827
25827
|
key: "ELEMENT_NOT_FOUND",
|
|
25828
25828
|
detail: `LNodeType not found for lnType="${r}"`
|
|
25829
|
-
}), !
|
|
25829
|
+
}), !M(i.lnodeTypes, r, a)) continue;
|
|
25830
25830
|
let s = a.children.filter((e) => t(e, "DO")), c = await e.getRecords(s);
|
|
25831
25831
|
for (let t of c) {
|
|
25832
25832
|
if (!t) continue;
|
|
@@ -25836,7 +25836,7 @@ async function pt(e, n) {
|
|
|
25836
25836
|
tagName: "DOType",
|
|
25837
25837
|
attributes: { id: n }
|
|
25838
25838
|
});
|
|
25839
|
-
r &&
|
|
25839
|
+
r && M(i.doTypes, n, r) && await pt({
|
|
25840
25840
|
query: e,
|
|
25841
25841
|
parent: r,
|
|
25842
25842
|
dataModelMap: i
|
|
@@ -25850,10 +25850,10 @@ async function pt(e, n) {
|
|
|
25850
25850
|
enumTypes: Array.from(i.enumTypes.values())
|
|
25851
25851
|
};
|
|
25852
25852
|
}
|
|
25853
|
-
function
|
|
25853
|
+
function M(e, t, n) {
|
|
25854
25854
|
return e.has(t) ? !1 : (e.set(t, n), !0);
|
|
25855
25855
|
}
|
|
25856
|
-
async function
|
|
25856
|
+
async function pt(e) {
|
|
25857
25857
|
let { query: n, parent: r, dataModelMap: i } = e, a = r.tagName === "DOType" ? await n.getRecords(r.children.filter((e) => t(e, "DA"))) : await n.getRecords(r.children.filter((e) => t(e, "BDA")));
|
|
25858
25858
|
for (let e of a) {
|
|
25859
25859
|
if (!e) continue;
|
|
@@ -25864,13 +25864,13 @@ async function mt(e) {
|
|
|
25864
25864
|
tagName: "EnumType",
|
|
25865
25865
|
attributes: { id: r }
|
|
25866
25866
|
});
|
|
25867
|
-
e &&
|
|
25867
|
+
e && M(i.enumTypes, r, e);
|
|
25868
25868
|
} else if (t === "Struct") {
|
|
25869
25869
|
let [e] = await n.findByAttributes({
|
|
25870
25870
|
tagName: "DAType",
|
|
25871
25871
|
attributes: { id: r }
|
|
25872
25872
|
});
|
|
25873
|
-
e &&
|
|
25873
|
+
e && M(i.daTypes, r, e) && await pt({
|
|
25874
25874
|
query: n,
|
|
25875
25875
|
parent: e,
|
|
25876
25876
|
dataModelMap: i
|
|
@@ -25887,7 +25887,7 @@ async function mt(e) {
|
|
|
25887
25887
|
tagName: "DOType",
|
|
25888
25888
|
attributes: { id: t }
|
|
25889
25889
|
});
|
|
25890
|
-
r &&
|
|
25890
|
+
r && M(i.doTypes, t, r) && await pt({
|
|
25891
25891
|
query: n,
|
|
25892
25892
|
parent: r,
|
|
25893
25893
|
dataModelMap: i
|
|
@@ -25897,76 +25897,76 @@ async function mt(e) {
|
|
|
25897
25897
|
}
|
|
25898
25898
|
//#endregion
|
|
25899
25899
|
//#region src/v2019C1/extensions/data-model/query/index.ts
|
|
25900
|
-
var
|
|
25900
|
+
var mt = /* @__PURE__ */ c({ resolve: () => ft }), ht = ["id", "uuid"];
|
|
25901
25901
|
//#endregion
|
|
25902
25902
|
//#region src/v2019C1/extensions/signature/query/element-signature.ts
|
|
25903
|
-
async function
|
|
25903
|
+
async function gt(e, t) {
|
|
25904
25904
|
let n = {
|
|
25905
25905
|
query: e,
|
|
25906
25906
|
resolveReferences: t.resolveReferences ?? !1,
|
|
25907
|
-
ignore: new Set(t.ignoreAttributes ??
|
|
25907
|
+
ignore: new Set(t.ignoreAttributes ?? ht),
|
|
25908
25908
|
memo: /* @__PURE__ */ new Map(),
|
|
25909
25909
|
seen: /* @__PURE__ */ new Set()
|
|
25910
25910
|
};
|
|
25911
|
-
return
|
|
25911
|
+
return yt(t.ref, n);
|
|
25912
25912
|
}
|
|
25913
|
-
var
|
|
25914
|
-
function
|
|
25913
|
+
var _t = /* @__PURE__ */ new Set();
|
|
25914
|
+
function vt(e, t) {
|
|
25915
25915
|
return g[e]?.attributes?.details?.[t]?.default;
|
|
25916
25916
|
}
|
|
25917
|
-
async function
|
|
25917
|
+
async function yt(e, t) {
|
|
25918
25918
|
let n = `${e.tagName}:${e.id}`, r = t.memo.get(n);
|
|
25919
25919
|
if (r !== void 0) return r;
|
|
25920
25920
|
if (t.seen.has(n)) return `@cycle:${e.tagName}`;
|
|
25921
25921
|
t.seen.add(n);
|
|
25922
|
-
let i = await t.query.getTree(e), a = i ? await
|
|
25922
|
+
let i = await t.query.getTree(e), a = i ? await bt(i, t) : "";
|
|
25923
25923
|
return t.seen.delete(n), t.memo.set(n, a), a;
|
|
25924
25924
|
}
|
|
25925
|
-
async function
|
|
25926
|
-
let n = t.resolveReferences ?
|
|
25925
|
+
async function bt(e, t) {
|
|
25926
|
+
let n = t.resolveReferences ? Tt(e.tagName) : _t, r = [];
|
|
25927
25927
|
for (let i of e.attributes) {
|
|
25928
|
-
if (t.ignore.has(i.name) || n.has(i.name) || i.value ===
|
|
25928
|
+
if (t.ignore.has(i.name) || n.has(i.name) || i.value === vt(e.tagName, i.name)) continue;
|
|
25929
25929
|
let a = i.value;
|
|
25930
25930
|
if (t.resolveReferences) {
|
|
25931
|
-
let n = await
|
|
25931
|
+
let n = await xt(e, i.name, i.value, t);
|
|
25932
25932
|
n !== null && (a = `@sig:${n}`);
|
|
25933
25933
|
}
|
|
25934
25934
|
r.push(`${JSON.stringify(i.name)}:${JSON.stringify(a)}`);
|
|
25935
25935
|
}
|
|
25936
25936
|
r.sort();
|
|
25937
25937
|
let i = [];
|
|
25938
|
-
for (let n of e.tree ?? []) i.push(await
|
|
25938
|
+
for (let n of e.tree ?? []) i.push(await bt(n, t));
|
|
25939
25939
|
i.sort();
|
|
25940
25940
|
let a = e.value?.trim(), o = a ? `,value:${JSON.stringify(a)}` : "";
|
|
25941
25941
|
return `{tag:${JSON.stringify(e.tagName)},attrs:[${r.join(",")}]${o},children:[${i.join(",")}]}`;
|
|
25942
25942
|
}
|
|
25943
|
-
async function
|
|
25944
|
-
let i =
|
|
25943
|
+
async function xt(e, t, n, r) {
|
|
25944
|
+
let i = St(e, t);
|
|
25945
25945
|
if (i) {
|
|
25946
|
-
let e = await
|
|
25947
|
-
return e ?
|
|
25946
|
+
let e = await Et(r.query, i.target, n);
|
|
25947
|
+
return e ? yt(e, r) : `@missing:${n}`;
|
|
25948
25948
|
}
|
|
25949
|
-
let a =
|
|
25949
|
+
let a = wt(e.tagName, t);
|
|
25950
25950
|
if (a) {
|
|
25951
|
-
let e = await
|
|
25952
|
-
return e ?
|
|
25951
|
+
let e = await Dt(r.query, a.target, n);
|
|
25952
|
+
return e ? yt(e, r) : `@missing:${n}`;
|
|
25953
25953
|
}
|
|
25954
25954
|
return null;
|
|
25955
25955
|
}
|
|
25956
|
-
function
|
|
25957
|
-
return D[e.tagName]?.find((n) => n.attribute === t &&
|
|
25956
|
+
function St(e, t) {
|
|
25957
|
+
return D[e.tagName]?.find((n) => n.attribute === t && Ct(e, n));
|
|
25958
25958
|
}
|
|
25959
|
-
function
|
|
25959
|
+
function Ct(e, t) {
|
|
25960
25960
|
return t.when ? e.attributes.find((e) => e.name === t.when.attribute)?.value === t.when.equals : !0;
|
|
25961
25961
|
}
|
|
25962
|
-
function
|
|
25962
|
+
function wt(e, t) {
|
|
25963
25963
|
return T[e]?.find((e) => e.attribute.uuid === t);
|
|
25964
25964
|
}
|
|
25965
|
-
function
|
|
25965
|
+
function Tt(e) {
|
|
25966
25966
|
let t = T[e];
|
|
25967
|
-
return t ? new Set(t.map((e) => e.attribute.path)) :
|
|
25967
|
+
return t ? new Set(t.map((e) => e.attribute.path)) : _t;
|
|
25968
25968
|
}
|
|
25969
|
-
async function
|
|
25969
|
+
async function Et(e, t, n) {
|
|
25970
25970
|
let [r] = await e.findByAttributes({
|
|
25971
25971
|
tagName: t,
|
|
25972
25972
|
attributes: { id: n }
|
|
@@ -25976,7 +25976,7 @@ async function Dt(e, t, n) {
|
|
|
25976
25976
|
id: r.id
|
|
25977
25977
|
} : null;
|
|
25978
25978
|
}
|
|
25979
|
-
async function
|
|
25979
|
+
async function Dt(e, t, n) {
|
|
25980
25980
|
for (let r of t) {
|
|
25981
25981
|
let [t] = await e.findByAttributes({
|
|
25982
25982
|
tagName: r,
|
|
@@ -25991,67 +25991,72 @@ async function Ot(e, t, n) {
|
|
|
25991
25991
|
}
|
|
25992
25992
|
//#endregion
|
|
25993
25993
|
//#region src/v2019C1/extensions/signature/query/index.ts
|
|
25994
|
-
var
|
|
25994
|
+
var Ot = /* @__PURE__ */ c({ elementSignature: () => gt });
|
|
25995
25995
|
//#endregion
|
|
25996
25996
|
//#region src/v2019C1/extensions/data-model/transaction/import-types.ts
|
|
25997
|
-
async function
|
|
25998
|
-
let { sourceQuery: n, records: r, cloneMappings: i = [], forkPrefix: a = "" } = t,
|
|
25997
|
+
async function kt(e, t) {
|
|
25998
|
+
let { sourceQuery: n, records: r, cloneMappings: i = [], forkPrefix: a = "", keepNameTypesFrom: o = "target" } = t, s = At(await ft(n, { records: r })), c = await e.ensureChild(await e.getRoot(), {
|
|
25999
25999
|
tagName: "DataTypeTemplates",
|
|
26000
26000
|
attributes: {}
|
|
26001
|
-
}),
|
|
26001
|
+
}), l = await Mt(e), u = /* @__PURE__ */ new Map(), d = [], f = [], p = {
|
|
26002
26002
|
reused: 0,
|
|
26003
26003
|
preserved: 0,
|
|
26004
26004
|
forked: 0,
|
|
26005
26005
|
reclaimed: 0
|
|
26006
26006
|
};
|
|
26007
|
-
for (let t of
|
|
26007
|
+
for (let t of s) {
|
|
26008
26008
|
let r = await n.getAttribute(t, { name: "id" });
|
|
26009
26009
|
if (!r) continue;
|
|
26010
|
-
let i = await
|
|
26010
|
+
let i = await gt(n, {
|
|
26011
26011
|
ref: {
|
|
26012
26012
|
tagName: t.tagName,
|
|
26013
26013
|
id: t.id
|
|
26014
26014
|
},
|
|
26015
26015
|
resolveReferences: !0
|
|
26016
|
-
}),
|
|
26017
|
-
if (
|
|
26018
|
-
|
|
26016
|
+
}), s = l.get(i);
|
|
26017
|
+
if (s !== void 0) {
|
|
26018
|
+
let n = o === "source" ? await Nt(e, {
|
|
26019
|
+
tagName: t.tagName,
|
|
26020
|
+
currentId: s,
|
|
26021
|
+
desiredId: r
|
|
26022
|
+
}) : s;
|
|
26023
|
+
u.set(r, n), n !== s && l.set(i, n), p.reused++;
|
|
26019
26024
|
continue;
|
|
26020
26025
|
}
|
|
26021
|
-
let
|
|
26022
|
-
if (!
|
|
26023
|
-
let [
|
|
26026
|
+
let m = await n.getTree(t);
|
|
26027
|
+
if (!m) continue;
|
|
26028
|
+
let [h] = await e.findByAttributes({
|
|
26024
26029
|
tagName: t.tagName,
|
|
26025
26030
|
attributes: { id: r }
|
|
26026
|
-
}),
|
|
26027
|
-
|
|
26028
|
-
let
|
|
26029
|
-
|
|
26031
|
+
}), g = r, _ = m;
|
|
26032
|
+
h ? (g = await Bt(e, t.tagName, `${a}${r}_${Vt(i)}`), _ = Pt(m, g), p.forked++) : p.preserved++;
|
|
26033
|
+
let v = await e.deepClone(c, _);
|
|
26034
|
+
u.set(r, g), v?.record && (d.push(N(v.record.tagName, v.record.id)), h && f.push({
|
|
26030
26035
|
oldId: r,
|
|
26031
|
-
oldRef:
|
|
26032
|
-
forkRef:
|
|
26033
|
-
forkedId:
|
|
26036
|
+
oldRef: N(h.tagName, h.id),
|
|
26037
|
+
forkRef: N(v.record.tagName, v.record.id),
|
|
26038
|
+
forkedId: g
|
|
26034
26039
|
}));
|
|
26035
26040
|
}
|
|
26036
|
-
let
|
|
26037
|
-
for (let t of
|
|
26041
|
+
let m = i.map((e) => e.target);
|
|
26042
|
+
for (let t of d) {
|
|
26038
26043
|
let n = await e.getTree(t);
|
|
26039
|
-
n && Ft(n,
|
|
26044
|
+
n && Ft(n, m);
|
|
26040
26045
|
}
|
|
26041
|
-
return await
|
|
26042
|
-
records:
|
|
26043
|
-
idRemap:
|
|
26044
|
-
}),
|
|
26045
|
-
collisions:
|
|
26046
|
-
idRemap:
|
|
26047
|
-
referrerRecords:
|
|
26048
|
-
stats:
|
|
26046
|
+
return await k(e, {
|
|
26047
|
+
records: m,
|
|
26048
|
+
idRemap: u
|
|
26049
|
+
}), f.length > 0 && await It(e, {
|
|
26050
|
+
collisions: f,
|
|
26051
|
+
idRemap: u,
|
|
26052
|
+
referrerRecords: m,
|
|
26053
|
+
stats: p
|
|
26049
26054
|
}), {
|
|
26050
|
-
idRemap:
|
|
26051
|
-
stats:
|
|
26055
|
+
idRemap: u,
|
|
26056
|
+
stats: p
|
|
26052
26057
|
};
|
|
26053
26058
|
}
|
|
26054
|
-
function
|
|
26059
|
+
function At(e) {
|
|
26055
26060
|
return [
|
|
26056
26061
|
...e.enumTypes,
|
|
26057
26062
|
...e.daTypes,
|
|
@@ -26059,20 +26064,20 @@ function jt(e) {
|
|
|
26059
26064
|
...e.lnodeTypes
|
|
26060
26065
|
];
|
|
26061
26066
|
}
|
|
26062
|
-
var
|
|
26067
|
+
var jt = [
|
|
26063
26068
|
"EnumType",
|
|
26064
26069
|
"DAType",
|
|
26065
26070
|
"DOType",
|
|
26066
26071
|
"LNodeType"
|
|
26067
26072
|
];
|
|
26068
|
-
async function
|
|
26073
|
+
async function Mt(e) {
|
|
26069
26074
|
let t = /* @__PURE__ */ new Map();
|
|
26070
|
-
for (let n of
|
|
26075
|
+
for (let n of jt) {
|
|
26071
26076
|
let r = await e.getRecordsByTagName(n);
|
|
26072
26077
|
for (let i of r) {
|
|
26073
26078
|
let r = i.attributes.find((e) => e.name === "id")?.value;
|
|
26074
26079
|
if (!r) continue;
|
|
26075
|
-
let a = await
|
|
26080
|
+
let a = await gt(e, {
|
|
26076
26081
|
ref: {
|
|
26077
26082
|
tagName: n,
|
|
26078
26083
|
id: i.id
|
|
@@ -26084,6 +26089,25 @@ async function Nt(e) {
|
|
|
26084
26089
|
}
|
|
26085
26090
|
return t;
|
|
26086
26091
|
}
|
|
26092
|
+
async function Nt(e, t) {
|
|
26093
|
+
let { tagName: n, currentId: r, desiredId: i } = t;
|
|
26094
|
+
if (r === i) return r;
|
|
26095
|
+
let [a] = await e.findByAttributes({
|
|
26096
|
+
tagName: n,
|
|
26097
|
+
attributes: { id: r }
|
|
26098
|
+
});
|
|
26099
|
+
if (!a) return r;
|
|
26100
|
+
let [o] = await e.findByAttributes({
|
|
26101
|
+
tagName: n,
|
|
26102
|
+
attributes: { id: i }
|
|
26103
|
+
});
|
|
26104
|
+
if (o && o.id !== a.id) return r;
|
|
26105
|
+
let s = N(a.tagName, a.id), c = await O(e, { target: s });
|
|
26106
|
+
return await e.update(s, { attributes: { id: i } }), await k(e, {
|
|
26107
|
+
records: c.map((e) => N(e.ref.tagName, e.ref.id)),
|
|
26108
|
+
idRemap: new Map([[r, i]])
|
|
26109
|
+
}), i;
|
|
26110
|
+
}
|
|
26087
26111
|
function Pt(e, t) {
|
|
26088
26112
|
let n = structuredClone(e), r = n.attributes, i = r.find((e) => e.name === "id");
|
|
26089
26113
|
return i ? i.value = t : r.push({
|
|
@@ -26091,17 +26115,17 @@ function Pt(e, t) {
|
|
|
26091
26115
|
value: t
|
|
26092
26116
|
}), n;
|
|
26093
26117
|
}
|
|
26094
|
-
function
|
|
26118
|
+
function N(e, t) {
|
|
26095
26119
|
return {
|
|
26096
26120
|
tagName: e,
|
|
26097
26121
|
id: t
|
|
26098
26122
|
};
|
|
26099
26123
|
}
|
|
26100
26124
|
function Ft(e, t) {
|
|
26101
|
-
t.push(
|
|
26125
|
+
t.push(N(e.tagName, e.id));
|
|
26102
26126
|
for (let n of e.tree ?? []) Ft(n, t);
|
|
26103
26127
|
}
|
|
26104
|
-
var
|
|
26128
|
+
var P = (e) => `${e.tagName}#${e.id}`;
|
|
26105
26129
|
async function It(e, t) {
|
|
26106
26130
|
let { collisions: n, idRemap: r, referrerRecords: i, stats: a } = t, o = await Lt(e, n), s = /* @__PURE__ */ new Map(), c = [];
|
|
26107
26131
|
for (let t of n) if (o.has(t.oldId)) {
|
|
@@ -26114,24 +26138,24 @@ async function It(e, t) {
|
|
|
26114
26138
|
let n = await e.getTree(t);
|
|
26115
26139
|
n && Ft(n, l);
|
|
26116
26140
|
}
|
|
26117
|
-
await
|
|
26141
|
+
await k(e, {
|
|
26118
26142
|
records: l,
|
|
26119
26143
|
idRemap: s
|
|
26120
26144
|
});
|
|
26121
26145
|
}
|
|
26122
26146
|
async function Lt(e, t) {
|
|
26123
|
-
let n = /* @__PURE__ */ new Set(), r = new Map(t.map((e) => [
|
|
26147
|
+
let n = /* @__PURE__ */ new Set(), r = new Map(t.map((e) => [P(e.oldRef), e.oldId])), i = t.map((e) => e.oldRef), a = new Set(i.map(P)), o = /* @__PURE__ */ new Set(), s = !0;
|
|
26124
26148
|
for (; s;) {
|
|
26125
26149
|
s = !1;
|
|
26126
26150
|
for (let t of i) {
|
|
26127
|
-
let c =
|
|
26151
|
+
let c = P(t);
|
|
26128
26152
|
if (o.has(c) || (await O(e, { target: t })).length > 0) continue;
|
|
26129
26153
|
let l = await e.getTree(t), u = l ? await Rt(e, l) : [];
|
|
26130
26154
|
await e.delete(t), o.add(c), s = !0;
|
|
26131
26155
|
let d = r.get(c);
|
|
26132
26156
|
d !== void 0 && n.add(d);
|
|
26133
26157
|
for (let e of u) {
|
|
26134
|
-
let t =
|
|
26158
|
+
let t = P(e);
|
|
26135
26159
|
a.has(t) || (i.push(e), a.add(t));
|
|
26136
26160
|
}
|
|
26137
26161
|
}
|
|
@@ -26151,7 +26175,7 @@ async function Rt(e, t) {
|
|
|
26151
26175
|
attributes: { id: a }
|
|
26152
26176
|
});
|
|
26153
26177
|
if (!o) continue;
|
|
26154
|
-
let s =
|
|
26178
|
+
let s = N(i.target, o.id), c = P(s);
|
|
26155
26179
|
r.has(c) || (r.add(c), n.push(s));
|
|
26156
26180
|
}
|
|
26157
26181
|
for (let e of t.tree ?? []) await i(e);
|
|
@@ -26177,8 +26201,8 @@ function Vt(e) {
|
|
|
26177
26201
|
//#endregion
|
|
26178
26202
|
//#region src/v2019C1/extensions/data-model/index.ts
|
|
26179
26203
|
var Ht = {
|
|
26180
|
-
query:
|
|
26181
|
-
transaction: /* @__PURE__ */ c({ importTypes: () =>
|
|
26204
|
+
query: mt,
|
|
26205
|
+
transaction: /* @__PURE__ */ c({ importTypes: () => kt })
|
|
26182
26206
|
};
|
|
26183
26207
|
//#endregion
|
|
26184
26208
|
//#region src/v2019C1/extensions/history/query/get-sorted-hitem.ts
|
|
@@ -26251,7 +26275,7 @@ var qt = {
|
|
|
26251
26275
|
};
|
|
26252
26276
|
//#endregion
|
|
26253
26277
|
//#region src/v2019C1/extensions/identity/transaction/write-identity.ts
|
|
26254
|
-
async function
|
|
26278
|
+
async function F(e, t) {
|
|
26255
26279
|
let { mappings: n, mode: r } = t;
|
|
26256
26280
|
if (r !== "keep") for (let t of n) {
|
|
26257
26281
|
let n = r === "strip" ? Jt() : Yt(t);
|
|
@@ -26281,7 +26305,7 @@ function Zt(e, t) {
|
|
|
26281
26305
|
}
|
|
26282
26306
|
//#endregion
|
|
26283
26307
|
//#region src/v2019C1/extensions/identity/index.ts
|
|
26284
|
-
var Qt = { transaction: /* @__PURE__ */ c({ writeIdentity: () =>
|
|
26308
|
+
var Qt = { transaction: /* @__PURE__ */ c({ writeIdentity: () => F }) };
|
|
26285
26309
|
//#endregion
|
|
26286
26310
|
//#region src/v2019C1/extensions/lifecycle/engine/group.ts
|
|
26287
26311
|
function $t(e, t) {
|
|
@@ -26335,7 +26359,7 @@ var rn = new Set([
|
|
|
26335
26359
|
"templateUuid",
|
|
26336
26360
|
"originUuid"
|
|
26337
26361
|
]), an = new Set(Object.values(T).flatMap((e) => e.flatMap((e) => [e.attribute.path, e.attribute.uuid])));
|
|
26338
|
-
function
|
|
26362
|
+
function I(e) {
|
|
26339
26363
|
let t = {};
|
|
26340
26364
|
for (let [n, r] of Object.entries(e)) rn.has(n) || n === "name" || an.has(n) || (t[n] = r);
|
|
26341
26365
|
return t;
|
|
@@ -26431,7 +26455,7 @@ function un(e) {
|
|
|
26431
26455
|
};
|
|
26432
26456
|
}
|
|
26433
26457
|
async function dn(e, t) {
|
|
26434
|
-
let { targetQuery: n, sourceNode: r, instanceNode: i } = t, a =
|
|
26458
|
+
let { targetQuery: n, sourceNode: r, instanceNode: i } = t, a = I(await e.any.getAttributes(r)), o = I(await n.any.getAttributes(i)), s = [];
|
|
26435
26459
|
for (let e of new Set([...Object.keys(a), ...Object.keys(o)])) {
|
|
26436
26460
|
let t = o[e], n = a[e];
|
|
26437
26461
|
t !== n && s.push({
|
|
@@ -26502,7 +26526,7 @@ function yn(e) {
|
|
|
26502
26526
|
}
|
|
26503
26527
|
//#endregion
|
|
26504
26528
|
//#region src/v2019C1/extensions/lifecycle/constraints/classify-attribute.ts
|
|
26505
|
-
function
|
|
26529
|
+
function L(e, t) {
|
|
26506
26530
|
return gn.has(t) ? "identity" : Sn(e).has(t) ? "reference" : t === "name" ? "rename" : ne.has(t) || yn(e).has(t) ? "identity" : "free";
|
|
26507
26531
|
}
|
|
26508
26532
|
function bn(e) {
|
|
@@ -26511,7 +26535,7 @@ function bn(e) {
|
|
|
26511
26535
|
function xn(e) {
|
|
26512
26536
|
let t = Object.keys(h[e] ?? {}), n = [];
|
|
26513
26537
|
for (let r of t) {
|
|
26514
|
-
let t =
|
|
26538
|
+
let t = L(e, r);
|
|
26515
26539
|
bn(t) && n.push({
|
|
26516
26540
|
attr: r,
|
|
26517
26541
|
mode: t
|
|
@@ -26529,7 +26553,7 @@ function Sn(e) {
|
|
|
26529
26553
|
var Cn = /* @__PURE__ */ new Set();
|
|
26530
26554
|
//#endregion
|
|
26531
26555
|
//#region src/v2019C1/extensions/lifecycle/constraints/find-constraint-violation.ts
|
|
26532
|
-
async function
|
|
26556
|
+
async function R(e, t) {
|
|
26533
26557
|
let { parentRef: n, childTag: r, candidate: i, excludeId: a } = t, o = Tn(n.tagName).filter((e) => (e.kind === "unique" || e.kind === "key") && En(e, r));
|
|
26534
26558
|
if (o.length === 0) return null;
|
|
26535
26559
|
let s = (await e.any.getTree(n))?.tree ?? [];
|
|
@@ -26566,7 +26590,7 @@ function Dn(e) {
|
|
|
26566
26590
|
var On = 1e3;
|
|
26567
26591
|
async function kn(e, t) {
|
|
26568
26592
|
let { parentRef: n, childTag: r, candidate: i, attr: a, decorate: o, excludeId: s } = t, c = i[a] ?? "";
|
|
26569
|
-
if (!await
|
|
26593
|
+
if (!await R(e, {
|
|
26570
26594
|
parentRef: n,
|
|
26571
26595
|
childTag: r,
|
|
26572
26596
|
candidate: i,
|
|
@@ -26579,7 +26603,7 @@ async function kn(e, t) {
|
|
|
26579
26603
|
attr: a,
|
|
26580
26604
|
childTag: r
|
|
26581
26605
|
}) : `${c}_${t}`;
|
|
26582
|
-
if (!await
|
|
26606
|
+
if (!await R(e, {
|
|
26583
26607
|
parentRef: n,
|
|
26584
26608
|
childTag: r,
|
|
26585
26609
|
candidate: {
|
|
@@ -26593,18 +26617,18 @@ async function kn(e, t) {
|
|
|
26593
26617
|
}
|
|
26594
26618
|
//#endregion
|
|
26595
26619
|
//#region src/v2019C1/extensions/lifecycle/constraints/resolve-placement-collision.ts
|
|
26596
|
-
async function
|
|
26620
|
+
async function z(e, t) {
|
|
26597
26621
|
let { ref: n, decorate: r, overrides: i } = t, a = t.parentRef ?? (await e.getRecord(n))?.parent;
|
|
26598
26622
|
if (!a) return { status: "ok" };
|
|
26599
26623
|
let o = await e.getAttributes(n);
|
|
26600
26624
|
if (i) for (let [t, r] of Object.entries(i)) {
|
|
26601
|
-
let i =
|
|
26625
|
+
let i = L(n.tagName, t);
|
|
26602
26626
|
(i === "rename" || i === "free") && o[t] !== r && (await e.update(n, { attributes: { [t]: r } }), o = {
|
|
26603
26627
|
...o,
|
|
26604
26628
|
[t]: r
|
|
26605
26629
|
});
|
|
26606
26630
|
}
|
|
26607
|
-
let s = await
|
|
26631
|
+
let s = await R(e, {
|
|
26608
26632
|
parentRef: a,
|
|
26609
26633
|
childTag: n.tagName,
|
|
26610
26634
|
candidate: o,
|
|
@@ -26612,7 +26636,7 @@ async function R(e, t) {
|
|
|
26612
26636
|
});
|
|
26613
26637
|
if (!s) return { status: "ok" };
|
|
26614
26638
|
let c = s.fields.find((e) => {
|
|
26615
|
-
let t =
|
|
26639
|
+
let t = L(n.tagName, e);
|
|
26616
26640
|
return t === "rename" || t === "free";
|
|
26617
26641
|
});
|
|
26618
26642
|
if (!c) return {
|
|
@@ -26640,8 +26664,11 @@ var An = {
|
|
|
26640
26664
|
scope: "tree",
|
|
26641
26665
|
attributes: ["templateUuid", "originUuid"]
|
|
26642
26666
|
};
|
|
26643
|
-
async function
|
|
26644
|
-
let { sourceQuery: n, ref: i, targetParent: a, omit: o, retagRoot: s, strip: c = An } = t, l = await n.getTree(i, {
|
|
26667
|
+
async function B(e, t) {
|
|
26668
|
+
let { sourceQuery: n, ref: i, targetParent: a, omit: o, retagRoot: s, strip: c = An } = t, l = await n.getTree(i, {
|
|
26669
|
+
omit: o,
|
|
26670
|
+
unwrap: []
|
|
26671
|
+
});
|
|
26645
26672
|
if (!l) return;
|
|
26646
26673
|
let u = s && l.tagName === s.from ? {
|
|
26647
26674
|
...l,
|
|
@@ -26654,12 +26681,12 @@ async function z(e, t) {
|
|
|
26654
26681
|
}
|
|
26655
26682
|
//#endregion
|
|
26656
26683
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/primitives/add-children-to.ts
|
|
26657
|
-
async function
|
|
26684
|
+
async function V(e, t) {
|
|
26658
26685
|
let { sourceQuery: n, source: r, target: i, omit: a, strip: o } = t, s = await n.any.getRecord(r);
|
|
26659
26686
|
if (!s) return [];
|
|
26660
26687
|
let c = [];
|
|
26661
26688
|
for (let t of s.children) {
|
|
26662
|
-
let r = await
|
|
26689
|
+
let r = await B(e, {
|
|
26663
26690
|
sourceQuery: n,
|
|
26664
26691
|
ref: {
|
|
26665
26692
|
tagName: t.tagName,
|
|
@@ -26675,14 +26702,14 @@ async function B(e, t) {
|
|
|
26675
26702
|
}
|
|
26676
26703
|
//#endregion
|
|
26677
26704
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/deep.ts
|
|
26678
|
-
async function
|
|
26705
|
+
async function H(e, t) {
|
|
26679
26706
|
let { sourceQuery: n, ref: r, targetParent: i, withTypes: a = !0, omit: o, strip: s = !1, retagRoot: c } = t, l = await jn(e, {
|
|
26680
26707
|
sourceQuery: n,
|
|
26681
26708
|
ref: r,
|
|
26682
26709
|
targetParent: i
|
|
26683
26710
|
}), u, d;
|
|
26684
26711
|
if (l) {
|
|
26685
|
-
d = await
|
|
26712
|
+
d = await V(e, {
|
|
26686
26713
|
sourceQuery: n,
|
|
26687
26714
|
source: r,
|
|
26688
26715
|
target: l,
|
|
@@ -26693,7 +26720,7 @@ async function V(e, t) {
|
|
|
26693
26720
|
if (!t) throw Error(`transplant.deep: merge target vanished: ${l.id}`);
|
|
26694
26721
|
u = t;
|
|
26695
26722
|
} else {
|
|
26696
|
-
let t = await
|
|
26723
|
+
let t = await B(e, {
|
|
26697
26724
|
sourceQuery: n,
|
|
26698
26725
|
ref: r,
|
|
26699
26726
|
targetParent: i,
|
|
@@ -26707,11 +26734,15 @@ async function V(e, t) {
|
|
|
26707
26734
|
let f = /* @__PURE__ */ new Map();
|
|
26708
26735
|
if (a) {
|
|
26709
26736
|
let t = await Mn(n, r);
|
|
26710
|
-
t.length > 0
|
|
26711
|
-
|
|
26712
|
-
|
|
26713
|
-
|
|
26714
|
-
|
|
26737
|
+
if (t.length > 0) {
|
|
26738
|
+
let r = typeof a == "object" ? a.keepNameFrom : void 0;
|
|
26739
|
+
f = (await kt(e, {
|
|
26740
|
+
sourceQuery: n,
|
|
26741
|
+
records: t,
|
|
26742
|
+
cloneMappings: d,
|
|
26743
|
+
keepNameTypesFrom: r
|
|
26744
|
+
})).idRemap;
|
|
26745
|
+
}
|
|
26715
26746
|
}
|
|
26716
26747
|
return {
|
|
26717
26748
|
record: u,
|
|
@@ -26777,7 +26808,7 @@ async function Pn(e, t) {
|
|
|
26777
26808
|
alreadyCloned: s
|
|
26778
26809
|
}), u = [];
|
|
26779
26810
|
for (let t of l) {
|
|
26780
|
-
let r = await
|
|
26811
|
+
let r = await B(e, {
|
|
26781
26812
|
sourceQuery: n,
|
|
26782
26813
|
ref: t,
|
|
26783
26814
|
targetParent: await o(t),
|
|
@@ -26805,7 +26836,7 @@ async function Fn(e, t) {
|
|
|
26805
26836
|
}
|
|
26806
26837
|
//#endregion
|
|
26807
26838
|
//#region src/v2019C1/extensions/lifecycle/transplant/transaction/resolve-structure-ref.ts
|
|
26808
|
-
async function
|
|
26839
|
+
async function U(e, t, n) {
|
|
26809
26840
|
let r = (await e.findAncestors(t, { stopAtTagName: "Substation" })).find((e) => e.tagName in n);
|
|
26810
26841
|
o(r, {
|
|
26811
26842
|
key: "ELEMENT_NOT_FOUND",
|
|
@@ -26844,77 +26875,80 @@ function In(e) {
|
|
|
26844
26875
|
//#endregion
|
|
26845
26876
|
//#region src/v2019C1/extensions/lifecycle/engine/reconcile.ts
|
|
26846
26877
|
var Ln = new Set(Object.keys(T));
|
|
26847
|
-
async function
|
|
26848
|
-
let { sourceQuery: n, sourceRootRef: r, instanceRootRef: i, accepted: a, overrides: o } = t,
|
|
26849
|
-
if (!
|
|
26850
|
-
let
|
|
26878
|
+
async function W(e, t) {
|
|
26879
|
+
let { sourceQuery: n, sourceRootRef: r, instanceRootRef: i, accepted: a, overrides: o, keepNameTypesFrom: s } = t, c = await n.any.getTree(r), l = await e.any.getTree(i);
|
|
26880
|
+
if (!c || !l) return;
|
|
26881
|
+
let u = /* @__PURE__ */ new Map();
|
|
26851
26882
|
await Hn(e, {
|
|
26852
|
-
node:
|
|
26853
|
-
index:
|
|
26883
|
+
node: l,
|
|
26884
|
+
index: u
|
|
26854
26885
|
});
|
|
26855
|
-
let
|
|
26886
|
+
let d = /* @__PURE__ */ new Set();
|
|
26856
26887
|
await Un(n, {
|
|
26857
|
-
node:
|
|
26858
|
-
out:
|
|
26888
|
+
node: c,
|
|
26889
|
+
out: d
|
|
26859
26890
|
}), await Vn(e, {
|
|
26860
26891
|
sourceQuery: n,
|
|
26861
|
-
instanceRecord:
|
|
26862
|
-
sourceNode:
|
|
26892
|
+
instanceRecord: l,
|
|
26893
|
+
sourceNode: c,
|
|
26863
26894
|
accepted: a,
|
|
26864
26895
|
overrides: o
|
|
26865
26896
|
}), await Rn(e, {
|
|
26866
26897
|
sourceQuery: n,
|
|
26867
|
-
sourceNode:
|
|
26868
|
-
instanceParent:
|
|
26869
|
-
index:
|
|
26898
|
+
sourceNode: c,
|
|
26899
|
+
instanceParent: l,
|
|
26900
|
+
index: u,
|
|
26870
26901
|
accepted: a,
|
|
26871
|
-
overrides: o
|
|
26902
|
+
overrides: o,
|
|
26903
|
+
keepNameTypesFrom: s
|
|
26872
26904
|
}), await zn(e, {
|
|
26873
|
-
instanceNode:
|
|
26874
|
-
sourceUuids:
|
|
26905
|
+
instanceNode: l,
|
|
26906
|
+
sourceUuids: d,
|
|
26875
26907
|
accepted: a
|
|
26876
26908
|
});
|
|
26877
26909
|
}
|
|
26878
26910
|
async function Rn(e, t) {
|
|
26879
|
-
let { sourceQuery: n, sourceNode: r, instanceParent: i, index: o, accepted: s, overrides: c } = t,
|
|
26911
|
+
let { sourceQuery: n, sourceNode: r, instanceParent: i, index: o, accepted: s, overrides: c, keepNameTypesFrom: l } = t, u = /* @__PURE__ */ new Set();
|
|
26880
26912
|
for (let t of r.tree) {
|
|
26881
|
-
let r = await n.any.getAttribute(t, { name: "uuid" }),
|
|
26882
|
-
if (
|
|
26883
|
-
|
|
26913
|
+
let r = await n.any.getAttribute(t, { name: "uuid" }), d = (r ? o.get(r) : void 0) ?? (r ? void 0 : i.tree.find((e) => e.tagName === t.tagName && !u.has(e.id)));
|
|
26914
|
+
if (d) {
|
|
26915
|
+
u.add(d.id), await Vn(e, {
|
|
26884
26916
|
sourceQuery: n,
|
|
26885
|
-
instanceRecord:
|
|
26917
|
+
instanceRecord: d,
|
|
26886
26918
|
sourceNode: t,
|
|
26887
26919
|
accepted: s,
|
|
26888
26920
|
overrides: c
|
|
26889
26921
|
}), await Rn(e, {
|
|
26890
26922
|
sourceQuery: n,
|
|
26891
26923
|
sourceNode: t,
|
|
26892
|
-
instanceParent:
|
|
26924
|
+
instanceParent: d,
|
|
26893
26925
|
index: o,
|
|
26894
26926
|
accepted: s,
|
|
26895
|
-
overrides: c
|
|
26927
|
+
overrides: c,
|
|
26928
|
+
keepNameTypesFrom: l
|
|
26896
26929
|
});
|
|
26897
26930
|
continue;
|
|
26898
26931
|
}
|
|
26899
26932
|
if (s && !s.sourceIds.has(t.id)) continue;
|
|
26900
|
-
let { recordMappings:
|
|
26933
|
+
let { recordMappings: f } = await H(e, {
|
|
26901
26934
|
sourceQuery: n,
|
|
26902
26935
|
ref: a(t),
|
|
26903
26936
|
targetParent: a(i),
|
|
26904
|
-
strip: !1
|
|
26937
|
+
strip: !1,
|
|
26938
|
+
withTypes: { keepNameFrom: l }
|
|
26905
26939
|
});
|
|
26906
|
-
await
|
|
26907
|
-
mappings:
|
|
26940
|
+
await F(e, {
|
|
26941
|
+
mappings: f,
|
|
26908
26942
|
mode: "stamp-template"
|
|
26909
26943
|
});
|
|
26910
|
-
let
|
|
26911
|
-
|
|
26912
|
-
ref:
|
|
26944
|
+
let p = f.find((e) => e.source.id === t.id);
|
|
26945
|
+
p && await z(e, {
|
|
26946
|
+
ref: p.target,
|
|
26913
26947
|
parentRef: a(i),
|
|
26914
26948
|
overrides: c?.get(t.id)
|
|
26915
26949
|
});
|
|
26916
26950
|
}
|
|
26917
|
-
for (let t of i.tree)
|
|
26951
|
+
for (let t of i.tree) u.has(t.id) || Ln.has(t.tagName) && (await e.any.getAttribute(t, { name: "templateUuid" }) || s && !s.instanceIds.has(t.id) || await e.any.getRecord(t) && await e.any.delete(t));
|
|
26918
26952
|
}
|
|
26919
26953
|
async function zn(e, t) {
|
|
26920
26954
|
let { instanceNode: n, sourceUuids: r, accepted: i } = t, a = [];
|
|
@@ -26943,9 +26977,9 @@ async function Vn(e, t) {
|
|
|
26943
26977
|
let { sourceQuery: n, instanceRecord: r, sourceNode: i, accepted: a, overrides: o } = t;
|
|
26944
26978
|
if (a && !a.sourceIds.has(i.id)) return;
|
|
26945
26979
|
let s = {
|
|
26946
|
-
...
|
|
26980
|
+
...I(await n.any.getAttributes(i)),
|
|
26947
26981
|
...o?.get(i.id)
|
|
26948
|
-
}, c =
|
|
26982
|
+
}, c = I(await e.any.getAttributes(r)), l = {};
|
|
26949
26983
|
for (let [e, t] of Object.entries(s)) c[e] !== t && (l[e] = t);
|
|
26950
26984
|
Object.keys(l).length > 0 && await e.any.update(r, { attributes: l });
|
|
26951
26985
|
}
|
|
@@ -26976,7 +27010,7 @@ function Gn(e) {
|
|
|
26976
27010
|
function Kn(e) {
|
|
26977
27011
|
return Wn(e.decisions.get(e.groupId)) !== "skip";
|
|
26978
27012
|
}
|
|
26979
|
-
function
|
|
27013
|
+
function G(e) {
|
|
26980
27014
|
let { groups: t, decisions: n } = e, r = /* @__PURE__ */ new Map();
|
|
26981
27015
|
for (let e of t) {
|
|
26982
27016
|
let t = n.get(e.id);
|
|
@@ -26996,7 +27030,7 @@ function qn(e) {
|
|
|
26996
27030
|
decisions: n
|
|
26997
27031
|
}), { detail: `decision accepts group "${e.id}" but its dependency "${t}" is skipped` });
|
|
26998
27032
|
}
|
|
26999
|
-
function
|
|
27033
|
+
function K(e) {
|
|
27000
27034
|
let { groups: t, decisions: n } = e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
27001
27035
|
for (let e of t) if (Kn({
|
|
27002
27036
|
groupId: e.id,
|
|
@@ -27057,10 +27091,10 @@ async function Qn(e, t) {
|
|
|
27057
27091
|
});
|
|
27058
27092
|
}
|
|
27059
27093
|
async function $n(e, t) {
|
|
27060
|
-
let [n] = await
|
|
27094
|
+
let [n] = await q(e, t);
|
|
27061
27095
|
return n;
|
|
27062
27096
|
}
|
|
27063
|
-
async function
|
|
27097
|
+
async function q(e, t) {
|
|
27064
27098
|
let { tagName: n, sourceUuid: r } = t;
|
|
27065
27099
|
if (!r) return [];
|
|
27066
27100
|
let i = await e.any.getRecordsByTagName(n), a = [];
|
|
@@ -27077,7 +27111,7 @@ async function er(e, t) {
|
|
|
27077
27111
|
sourceUuid: r
|
|
27078
27112
|
});
|
|
27079
27113
|
if (i) {
|
|
27080
|
-
await
|
|
27114
|
+
await W(e, {
|
|
27081
27115
|
sourceQuery: n,
|
|
27082
27116
|
sourceRootRef: t,
|
|
27083
27117
|
instanceRootRef: i,
|
|
@@ -27086,13 +27120,13 @@ async function er(e, t) {
|
|
|
27086
27120
|
continue;
|
|
27087
27121
|
}
|
|
27088
27122
|
if (o && t.id && !o.sourceIds.has(t.id)) continue;
|
|
27089
|
-
let s = await
|
|
27123
|
+
let s = await B(e, {
|
|
27090
27124
|
sourceQuery: n,
|
|
27091
27125
|
ref: t,
|
|
27092
|
-
targetParent: await
|
|
27126
|
+
targetParent: await U(n, t, a),
|
|
27093
27127
|
strip: !1
|
|
27094
27128
|
});
|
|
27095
|
-
s && await
|
|
27129
|
+
s && await F(e, {
|
|
27096
27130
|
mappings: s.mappings,
|
|
27097
27131
|
mode: "stamp-template"
|
|
27098
27132
|
});
|
|
@@ -27112,7 +27146,7 @@ async function er(e, t) {
|
|
|
27112
27146
|
var tr = ["Variable", "BehaviorDescription"];
|
|
27113
27147
|
//#endregion
|
|
27114
27148
|
//#region src/v2019C1/extensions/lifecycle/cross-cutting/applied-satellites.ts
|
|
27115
|
-
async function
|
|
27149
|
+
async function J(e, t) {
|
|
27116
27150
|
let { primaryRef: n } = t, r = await e.any.getTree(n);
|
|
27117
27151
|
if (!r) return [];
|
|
27118
27152
|
let i = /* @__PURE__ */ new Set(), o = [];
|
|
@@ -27123,7 +27157,7 @@ async function q(e, t) {
|
|
|
27123
27157
|
});
|
|
27124
27158
|
let s = /* @__PURE__ */ new Set(), c = [];
|
|
27125
27159
|
for (let t of o) for (let n of tr) {
|
|
27126
|
-
let r = await
|
|
27160
|
+
let r = await A.query.findRefsPointingTo(e, {
|
|
27127
27161
|
target: a(t),
|
|
27128
27162
|
containerTagName: n
|
|
27129
27163
|
});
|
|
@@ -27146,15 +27180,15 @@ async function rr(e, t) {
|
|
|
27146
27180
|
let { sourceQuery: n, primaryRef: r, instancePrimaryRef: i, structure: a, accepted: o } = t;
|
|
27147
27181
|
await er(e, {
|
|
27148
27182
|
sourceQuery: n,
|
|
27149
|
-
satelliteRefs: await
|
|
27150
|
-
instanceSatelliteRefs: i ? await
|
|
27183
|
+
satelliteRefs: await J(n, { primaryRef: r }),
|
|
27184
|
+
instanceSatelliteRefs: i ? await J(e, { primaryRef: i }) : [],
|
|
27151
27185
|
structure: a,
|
|
27152
27186
|
accepted: o
|
|
27153
27187
|
});
|
|
27154
27188
|
}
|
|
27155
27189
|
//#endregion
|
|
27156
27190
|
//#region src/v2019C1/extensions/lifecycle/instantiate/transaction/resolve-target-structure.ts
|
|
27157
|
-
async function
|
|
27191
|
+
async function Y(e, t) {
|
|
27158
27192
|
let n = await e.getRecord(t);
|
|
27159
27193
|
o(n, {
|
|
27160
27194
|
key: "ELEMENT_NOT_FOUND",
|
|
@@ -27166,11 +27200,11 @@ async function J(e, t) {
|
|
|
27166
27200
|
//#endregion
|
|
27167
27201
|
//#region src/v2019C1/extensions/lifecycle/cross-cutting/clone-applied-satellites.ts
|
|
27168
27202
|
async function ir(e, t) {
|
|
27169
|
-
let { sourceQuery: n, primaryRef: r, structure: i, strip: a = !0 } = t, o = await
|
|
27203
|
+
let { sourceQuery: n, primaryRef: r, structure: i, strip: a = !0 } = t, o = await J(n, { primaryRef: r }), s = [];
|
|
27170
27204
|
for (let t of o) {
|
|
27171
27205
|
let r = await ar(e, n, t);
|
|
27172
27206
|
if (r) {
|
|
27173
|
-
let i = await
|
|
27207
|
+
let i = await V(e, {
|
|
27174
27208
|
sourceQuery: n,
|
|
27175
27209
|
source: t,
|
|
27176
27210
|
target: r,
|
|
@@ -27179,10 +27213,10 @@ async function ir(e, t) {
|
|
|
27179
27213
|
s.push(...i);
|
|
27180
27214
|
continue;
|
|
27181
27215
|
}
|
|
27182
|
-
let o = await
|
|
27216
|
+
let o = await B(e, {
|
|
27183
27217
|
sourceQuery: n,
|
|
27184
27218
|
ref: t,
|
|
27185
|
-
targetParent: await
|
|
27219
|
+
targetParent: await U(n, t, i),
|
|
27186
27220
|
...a ? {} : { strip: !1 }
|
|
27187
27221
|
});
|
|
27188
27222
|
o && s.push(...o.mappings);
|
|
@@ -27206,7 +27240,7 @@ async function ar(e, t, n) {
|
|
|
27206
27240
|
//#endregion
|
|
27207
27241
|
//#region src/v2019C1/extensions/lifecycle/layers/function/clone-function.ts
|
|
27208
27242
|
async function or(e, t) {
|
|
27209
|
-
let { sourceQuery: n, functionRef: r, targetParentRef: i, omit: a, stripRootAttributes: o } = t, { recordMappings:
|
|
27243
|
+
let { sourceQuery: n, functionRef: r, targetParentRef: i, omit: a, stripRootAttributes: o, keepNameTypesFrom: s } = t, { recordMappings: c } = await H(e, {
|
|
27210
27244
|
sourceQuery: n,
|
|
27211
27245
|
ref: r,
|
|
27212
27246
|
targetParent: i,
|
|
@@ -27219,11 +27253,11 @@ async function or(e, t) {
|
|
|
27219
27253
|
from: "SubFunction",
|
|
27220
27254
|
to: "Function"
|
|
27221
27255
|
},
|
|
27222
|
-
withTypes:
|
|
27256
|
+
withTypes: { keepNameFrom: s }
|
|
27223
27257
|
});
|
|
27224
|
-
return
|
|
27258
|
+
return c;
|
|
27225
27259
|
}
|
|
27226
|
-
async function
|
|
27260
|
+
async function X(e, t) {
|
|
27227
27261
|
let { sourceQuery: n, functionRef: r, structure: i, stripCategoriesUuid: a = !0 } = t, o = await sr(n, r), s = [];
|
|
27228
27262
|
for (let t of o) {
|
|
27229
27263
|
let r = {
|
|
@@ -27231,7 +27265,7 @@ async function Y(e, t) {
|
|
|
27231
27265
|
id: t
|
|
27232
27266
|
}, o = await lr(e, n, t);
|
|
27233
27267
|
if (o) {
|
|
27234
|
-
let t = await
|
|
27268
|
+
let t = await V(e, {
|
|
27235
27269
|
sourceQuery: n,
|
|
27236
27270
|
source: r,
|
|
27237
27271
|
target: o,
|
|
@@ -27240,10 +27274,10 @@ async function Y(e, t) {
|
|
|
27240
27274
|
s.push(...t);
|
|
27241
27275
|
continue;
|
|
27242
27276
|
}
|
|
27243
|
-
let c = await
|
|
27277
|
+
let c = await B(e, {
|
|
27244
27278
|
sourceQuery: n,
|
|
27245
27279
|
ref: r,
|
|
27246
|
-
targetParent: await
|
|
27280
|
+
targetParent: await U(n, r, i),
|
|
27247
27281
|
...a ? {} : { strip: !1 }
|
|
27248
27282
|
});
|
|
27249
27283
|
c && s.push(...c.mappings);
|
|
@@ -27256,12 +27290,12 @@ async function sr(e, t) {
|
|
|
27256
27290
|
return r;
|
|
27257
27291
|
}
|
|
27258
27292
|
async function cr(e, t) {
|
|
27259
|
-
let n = await
|
|
27293
|
+
let n = await A.query.findRefsPointingTo(e, {
|
|
27260
27294
|
target: t,
|
|
27261
27295
|
containerTagName: "FunctionCategory"
|
|
27262
27296
|
}), { SubFunction: r = [] } = await e.findDescendants(t, { collect: "SubFunction" });
|
|
27263
27297
|
for (let t of r) {
|
|
27264
|
-
let r = await
|
|
27298
|
+
let r = await A.query.findRefsPointingTo(e, {
|
|
27265
27299
|
target: {
|
|
27266
27300
|
tagName: "SubFunction",
|
|
27267
27301
|
id: t.id
|
|
@@ -27294,7 +27328,7 @@ async function lr(e, t, n) {
|
|
|
27294
27328
|
var ur = ["FunctionCategory"];
|
|
27295
27329
|
//#endregion
|
|
27296
27330
|
//#region src/v2019C1/extensions/lifecycle/layers/function/satellites.ts
|
|
27297
|
-
async function
|
|
27331
|
+
async function Z(e, t) {
|
|
27298
27332
|
let { primaryRef: n } = t, r = [n], { SubFunction: i = [] } = await e.findDescendants(n, { collect: "SubFunction" });
|
|
27299
27333
|
for (let e of i) r.push({
|
|
27300
27334
|
tagName: "SubFunction",
|
|
@@ -27302,7 +27336,7 @@ async function X(e, t) {
|
|
|
27302
27336
|
});
|
|
27303
27337
|
let o = /* @__PURE__ */ new Set(), s = [];
|
|
27304
27338
|
for (let t of r) for (let n of ur) {
|
|
27305
|
-
let r = await
|
|
27339
|
+
let r = await A.query.findRefsPointingTo(e, {
|
|
27306
27340
|
target: t,
|
|
27307
27341
|
containerTagName: n
|
|
27308
27342
|
});
|
|
@@ -27313,7 +27347,7 @@ async function X(e, t) {
|
|
|
27313
27347
|
//#endregion
|
|
27314
27348
|
//#region src/v2019C1/extensions/lifecycle/instantiate/transaction/fsd.ts
|
|
27315
27349
|
async function dr(e, t) {
|
|
27316
|
-
let { sourceQuery: n, functionRef: r, targetParent: i, overrides: a } = t, { recordMappings:
|
|
27350
|
+
let { sourceQuery: n, functionRef: r, targetParent: i, overrides: a, keepNameTypesFrom: o } = t, { recordMappings: s } = await H(e, {
|
|
27317
27351
|
sourceQuery: n,
|
|
27318
27352
|
ref: r,
|
|
27319
27353
|
targetParent: i,
|
|
@@ -27321,97 +27355,99 @@ async function dr(e, t) {
|
|
|
27321
27355
|
retagRoot: i.tagName === "Function" || i.tagName === "SubFunction" ? {
|
|
27322
27356
|
from: "Function",
|
|
27323
27357
|
to: "SubFunction"
|
|
27324
|
-
} : void 0
|
|
27325
|
-
|
|
27358
|
+
} : void 0,
|
|
27359
|
+
withTypes: { keepNameFrom: o }
|
|
27360
|
+
}), c = await Y(e, i), l = await X(e, {
|
|
27326
27361
|
sourceQuery: n,
|
|
27327
27362
|
functionRef: r,
|
|
27328
|
-
structure:
|
|
27363
|
+
structure: c,
|
|
27329
27364
|
stripCategoriesUuid: !1
|
|
27330
|
-
}),
|
|
27365
|
+
}), u = await ir(e, {
|
|
27331
27366
|
sourceQuery: n,
|
|
27332
27367
|
primaryRef: r,
|
|
27333
|
-
structure:
|
|
27368
|
+
structure: c,
|
|
27334
27369
|
strip: !1
|
|
27335
27370
|
});
|
|
27336
|
-
await
|
|
27371
|
+
await F(e, {
|
|
27337
27372
|
mappings: [
|
|
27338
|
-
...
|
|
27339
|
-
...
|
|
27340
|
-
...
|
|
27373
|
+
...s,
|
|
27374
|
+
...l,
|
|
27375
|
+
...u
|
|
27341
27376
|
],
|
|
27342
27377
|
mode: "stamp-template"
|
|
27343
27378
|
});
|
|
27344
|
-
let
|
|
27345
|
-
if (!
|
|
27346
|
-
let
|
|
27347
|
-
return await
|
|
27348
|
-
ref:
|
|
27379
|
+
let d = s.find((e) => e.source.id === r.id);
|
|
27380
|
+
if (!d) throw Error(`instantiate.fsd: cloned root not found for ${r.tagName}#${r.id}`);
|
|
27381
|
+
let f = d.target;
|
|
27382
|
+
return await z(e, {
|
|
27383
|
+
ref: f,
|
|
27349
27384
|
parentRef: i,
|
|
27350
27385
|
overrides: a?.get(r.id)
|
|
27351
|
-
}), await
|
|
27386
|
+
}), await ct(e, {
|
|
27352
27387
|
sourceQuery: n,
|
|
27353
|
-
targetRoot:
|
|
27388
|
+
targetRoot: f,
|
|
27354
27389
|
fileType: "FSD"
|
|
27355
27390
|
}), {
|
|
27356
|
-
functionRef:
|
|
27357
|
-
recordMappings:
|
|
27391
|
+
functionRef: f,
|
|
27392
|
+
recordMappings: s
|
|
27358
27393
|
};
|
|
27359
27394
|
}
|
|
27360
27395
|
//#endregion
|
|
27361
27396
|
//#region src/v2019C1/extensions/lifecycle/layers/application/clone-application.ts
|
|
27362
27397
|
async function fr(e, t) {
|
|
27363
|
-
let { sourceQuery: n, applicationRef: r, structure: i, omit: a } = t,
|
|
27398
|
+
let { sourceQuery: n, applicationRef: r, structure: i, omit: a, keepNameTypesFrom: o } = t, s = /* @__PURE__ */ new Map(), c = [], l = await Nn(e, {
|
|
27364
27399
|
sourceQuery: n,
|
|
27365
27400
|
scopeRef: r,
|
|
27366
27401
|
refTagName: "FunctionRef",
|
|
27367
27402
|
targetTagName: "Function"
|
|
27368
27403
|
});
|
|
27369
|
-
for (let t of
|
|
27404
|
+
for (let t of l) {
|
|
27370
27405
|
let r = await or(e, {
|
|
27371
27406
|
sourceQuery: n,
|
|
27372
27407
|
functionRef: t,
|
|
27373
|
-
targetParentRef: await
|
|
27374
|
-
omit: a
|
|
27408
|
+
targetParentRef: await U(n, t, i),
|
|
27409
|
+
omit: a,
|
|
27410
|
+
keepNameTypesFrom: o
|
|
27375
27411
|
});
|
|
27376
|
-
|
|
27377
|
-
for (let e of r) e.source.id &&
|
|
27412
|
+
c.push(...r);
|
|
27413
|
+
for (let e of r) e.source.id && s.set(e.source.id, e.target);
|
|
27378
27414
|
}
|
|
27379
|
-
for (let t of
|
|
27380
|
-
let r = await
|
|
27415
|
+
for (let t of l) {
|
|
27416
|
+
let r = await X(e, {
|
|
27381
27417
|
sourceQuery: n,
|
|
27382
27418
|
functionRef: t,
|
|
27383
27419
|
structure: i,
|
|
27384
27420
|
stripCategoriesUuid: !1
|
|
27385
27421
|
});
|
|
27386
|
-
|
|
27422
|
+
c.push(...r);
|
|
27387
27423
|
}
|
|
27388
|
-
let
|
|
27424
|
+
let u = await pr(e, {
|
|
27389
27425
|
sourceQuery: n,
|
|
27390
27426
|
applicationRef: r
|
|
27391
27427
|
});
|
|
27392
|
-
for (let e of
|
|
27393
|
-
let
|
|
27428
|
+
for (let e of u) s.set(e.sourceId, e.existingRef);
|
|
27429
|
+
let d = new Set(["FunctionRef", "FunctionCategoryRef"]), f = await Fn(e, {
|
|
27394
27430
|
sourceQuery: n,
|
|
27395
27431
|
scopeTagName: "Application",
|
|
27396
27432
|
scopeRef: r,
|
|
27397
27433
|
resolveTargetParent: In({
|
|
27398
27434
|
sourceQuery: n,
|
|
27399
27435
|
structure: i,
|
|
27400
|
-
cloneIndex:
|
|
27436
|
+
cloneIndex: s
|
|
27401
27437
|
}),
|
|
27402
|
-
alreadyCloned: new Set(
|
|
27403
|
-
skip:
|
|
27438
|
+
alreadyCloned: new Set(s.keys()),
|
|
27439
|
+
skip: d,
|
|
27404
27440
|
omit: a
|
|
27405
27441
|
});
|
|
27406
|
-
|
|
27407
|
-
let
|
|
27442
|
+
c.push(...f);
|
|
27443
|
+
let p = await B(e, {
|
|
27408
27444
|
sourceQuery: n,
|
|
27409
27445
|
ref: r,
|
|
27410
|
-
targetParent: await
|
|
27446
|
+
targetParent: await U(n, r, i),
|
|
27411
27447
|
omit: a
|
|
27412
27448
|
});
|
|
27413
|
-
|
|
27414
|
-
for (let t of
|
|
27449
|
+
p && c.push(...p.mappings);
|
|
27450
|
+
for (let t of u) {
|
|
27415
27451
|
let n = await e.findByAttributes({
|
|
27416
27452
|
tagName: "AllocationRoleRef",
|
|
27417
27453
|
attributes: { allocationRoleUuid: t.sourceUuid }
|
|
@@ -27421,7 +27457,7 @@ async function fr(e, t) {
|
|
|
27421
27457
|
id: r.id
|
|
27422
27458
|
}, { attributes: { allocationRoleUuid: t.existingUuid } });
|
|
27423
27459
|
}
|
|
27424
|
-
return
|
|
27460
|
+
return c;
|
|
27425
27461
|
}
|
|
27426
27462
|
async function pr(e, t) {
|
|
27427
27463
|
let { sourceQuery: n, applicationRef: r } = t, { AllocationRoleRef: i = [] } = await n.findDescendants(r, { collect: "AllocationRoleRef" }), a = [], o = /* @__PURE__ */ new Set();
|
|
@@ -27447,7 +27483,7 @@ async function pr(e, t) {
|
|
|
27447
27483
|
tagName: "AllocationRole",
|
|
27448
27484
|
id: c.id
|
|
27449
27485
|
};
|
|
27450
|
-
await
|
|
27486
|
+
await V(e, {
|
|
27451
27487
|
sourceQuery: n,
|
|
27452
27488
|
source: {
|
|
27453
27489
|
tagName: "AllocationRole",
|
|
@@ -27473,7 +27509,7 @@ var mr = [{
|
|
|
27473
27509
|
}];
|
|
27474
27510
|
//#endregion
|
|
27475
27511
|
//#region src/v2019C1/extensions/lifecycle/layers/application/satellites.ts
|
|
27476
|
-
async function
|
|
27512
|
+
async function Q(e, t) {
|
|
27477
27513
|
let { applicationRef: n } = t, r = await e.any.getTree(n);
|
|
27478
27514
|
if (!r) return [];
|
|
27479
27515
|
let i = /* @__PURE__ */ new Set(), o = [];
|
|
@@ -27511,58 +27547,59 @@ async function hr(e, t) {
|
|
|
27511
27547
|
//#endregion
|
|
27512
27548
|
//#region src/v2019C1/extensions/lifecycle/instantiate/transaction/asd.ts
|
|
27513
27549
|
async function gr(e, t) {
|
|
27514
|
-
let { sourceQuery: n, applicationRef: r, targetParent: i, overrides: a } = t,
|
|
27550
|
+
let { sourceQuery: n, applicationRef: r, targetParent: i, overrides: a, keepNameTypesFrom: o } = t, s = await Y(e, i), c = await Nn(e, {
|
|
27515
27551
|
sourceQuery: n,
|
|
27516
27552
|
scopeRef: r,
|
|
27517
27553
|
refTagName: "FunctionRef",
|
|
27518
27554
|
targetTagName: "Function"
|
|
27519
|
-
}),
|
|
27555
|
+
}), l = await fr(e, {
|
|
27520
27556
|
sourceQuery: n,
|
|
27521
27557
|
applicationRef: r,
|
|
27522
|
-
structure:
|
|
27523
|
-
|
|
27558
|
+
structure: s,
|
|
27559
|
+
keepNameTypesFrom: o
|
|
27560
|
+
}), u = await ir(e, {
|
|
27524
27561
|
sourceQuery: n,
|
|
27525
27562
|
primaryRef: r,
|
|
27526
|
-
structure:
|
|
27563
|
+
structure: s,
|
|
27527
27564
|
strip: !1
|
|
27528
27565
|
});
|
|
27529
|
-
await
|
|
27530
|
-
mappings: [...
|
|
27566
|
+
await F(e, {
|
|
27567
|
+
mappings: [...l, ...u],
|
|
27531
27568
|
mode: "stamp-template"
|
|
27532
27569
|
});
|
|
27533
|
-
for (let t of
|
|
27534
|
-
let r =
|
|
27570
|
+
for (let t of c) {
|
|
27571
|
+
let r = l.find((e) => e.source.id === t.id);
|
|
27535
27572
|
if (!r) continue;
|
|
27536
|
-
let i = await
|
|
27537
|
-
await
|
|
27573
|
+
let i = await U(n, t, s);
|
|
27574
|
+
await z(e, {
|
|
27538
27575
|
ref: r.target,
|
|
27539
27576
|
parentRef: i,
|
|
27540
27577
|
overrides: a?.get(t.id)
|
|
27541
27578
|
});
|
|
27542
27579
|
}
|
|
27543
|
-
let
|
|
27544
|
-
if (!
|
|
27545
|
-
let
|
|
27546
|
-
await
|
|
27547
|
-
ref:
|
|
27548
|
-
parentRef:
|
|
27580
|
+
let d = l.find((e) => e.source.id === r.id);
|
|
27581
|
+
if (!d) throw Error(`instantiate.asd: cloned Application not found for ${r.id}`);
|
|
27582
|
+
let f = await U(n, r, s);
|
|
27583
|
+
await z(e, {
|
|
27584
|
+
ref: d.target,
|
|
27585
|
+
parentRef: f,
|
|
27549
27586
|
overrides: a?.get(r.id)
|
|
27550
|
-
}), await
|
|
27587
|
+
}), await ct(e, {
|
|
27551
27588
|
sourceQuery: n,
|
|
27552
|
-
targetRoot:
|
|
27589
|
+
targetRoot: d.target,
|
|
27553
27590
|
fileType: "ASD"
|
|
27554
27591
|
});
|
|
27555
|
-
let
|
|
27592
|
+
let p = c.map((e) => l.find((t) => t.source.id === e.id)?.target).filter((e) => !!e);
|
|
27556
27593
|
return {
|
|
27557
|
-
applicationRef:
|
|
27558
|
-
composedFunctionRefs:
|
|
27559
|
-
recordMappings:
|
|
27594
|
+
applicationRef: d.target,
|
|
27595
|
+
composedFunctionRefs: p,
|
|
27596
|
+
recordMappings: l
|
|
27560
27597
|
};
|
|
27561
27598
|
}
|
|
27562
27599
|
//#endregion
|
|
27563
27600
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/function-satellites.ts
|
|
27564
27601
|
async function _r(e, t) {
|
|
27565
|
-
let { sourceQuery: n, functionRef: r, instanceRef: i, targetParent: a, accepted: o } = t, s = await
|
|
27602
|
+
let { sourceQuery: n, functionRef: r, instanceRef: i, targetParent: a, accepted: o } = t, s = await Z(n, { primaryRef: r }), c = !1;
|
|
27566
27603
|
for (let t of s) {
|
|
27567
27604
|
let { uuid: r } = await n.any.getAttributes(t), i = await $n(e, {
|
|
27568
27605
|
tagName: t.tagName,
|
|
@@ -27572,23 +27609,23 @@ async function _r(e, t) {
|
|
|
27572
27609
|
c = !0;
|
|
27573
27610
|
continue;
|
|
27574
27611
|
}
|
|
27575
|
-
await
|
|
27612
|
+
await W(e, {
|
|
27576
27613
|
sourceQuery: n,
|
|
27577
27614
|
sourceRootRef: t,
|
|
27578
27615
|
instanceRootRef: i,
|
|
27579
27616
|
accepted: o
|
|
27580
27617
|
});
|
|
27581
27618
|
}
|
|
27582
|
-
c && (!o || o.sourceIds.has(r.id)) && await
|
|
27583
|
-
mappings: await
|
|
27619
|
+
c && (!o || o.sourceIds.has(r.id)) && await F(e, {
|
|
27620
|
+
mappings: await X(e, {
|
|
27584
27621
|
sourceQuery: n,
|
|
27585
27622
|
functionRef: r,
|
|
27586
|
-
structure: await
|
|
27623
|
+
structure: await Y(e, a),
|
|
27587
27624
|
stripCategoriesUuid: !1
|
|
27588
27625
|
}),
|
|
27589
27626
|
mode: "stamp-template"
|
|
27590
27627
|
});
|
|
27591
|
-
let l = await
|
|
27628
|
+
let l = await Z(e, { primaryRef: {
|
|
27592
27629
|
tagName: "Function",
|
|
27593
27630
|
id: i.id
|
|
27594
27631
|
} });
|
|
@@ -27605,17 +27642,17 @@ async function _r(e, t) {
|
|
|
27605
27642
|
//#endregion
|
|
27606
27643
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/fsd.ts
|
|
27607
27644
|
async function vr(e, t) {
|
|
27608
|
-
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a, report: o, decisions: s } = t, { uuid:
|
|
27645
|
+
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, { uuid: l } = await n.getAttributes(r), u = a === "instantiate" ? [] : await Zn(e, {
|
|
27609
27646
|
targetParent: i,
|
|
27610
27647
|
tagName: "Function",
|
|
27611
|
-
sourceUuid:
|
|
27612
|
-
}),
|
|
27613
|
-
if (
|
|
27614
|
-
let t = s ?
|
|
27615
|
-
groups:
|
|
27648
|
+
sourceUuid: l
|
|
27649
|
+
}), d = o?.groups ?? [];
|
|
27650
|
+
if (u.length === 0) {
|
|
27651
|
+
let t = s ? K({
|
|
27652
|
+
groups: d,
|
|
27616
27653
|
decisions: s
|
|
27617
|
-
}) : void 0, a = s ?
|
|
27618
|
-
groups:
|
|
27654
|
+
}) : void 0, a = s ? G({
|
|
27655
|
+
groups: d,
|
|
27619
27656
|
decisions: s
|
|
27620
27657
|
}) : void 0;
|
|
27621
27658
|
if (t && !t.sourceIds.has(r.id)) return [];
|
|
@@ -27623,23 +27660,25 @@ async function vr(e, t) {
|
|
|
27623
27660
|
sourceQuery: n,
|
|
27624
27661
|
functionRef: r,
|
|
27625
27662
|
targetParent: i,
|
|
27626
|
-
overrides: a
|
|
27663
|
+
overrides: a,
|
|
27664
|
+
keepNameTypesFrom: c
|
|
27627
27665
|
});
|
|
27628
27666
|
return [o];
|
|
27629
27667
|
}
|
|
27630
|
-
let
|
|
27631
|
-
for (let t of
|
|
27668
|
+
let f = await Y(e, i);
|
|
27669
|
+
for (let t of u) {
|
|
27632
27670
|
let { instanceAccepted: a, instanceOverrides: o } = yr({
|
|
27633
27671
|
instanceId: t.id,
|
|
27634
|
-
groups:
|
|
27672
|
+
groups: d,
|
|
27635
27673
|
decisions: s
|
|
27636
27674
|
});
|
|
27637
|
-
await
|
|
27675
|
+
await W(e, {
|
|
27638
27676
|
sourceQuery: n,
|
|
27639
27677
|
sourceRootRef: r,
|
|
27640
27678
|
instanceRootRef: t,
|
|
27641
27679
|
accepted: a,
|
|
27642
|
-
overrides: o
|
|
27680
|
+
overrides: o,
|
|
27681
|
+
keepNameTypesFrom: c
|
|
27643
27682
|
}), await _r(e, {
|
|
27644
27683
|
sourceQuery: n,
|
|
27645
27684
|
functionRef: r,
|
|
@@ -27653,11 +27692,11 @@ async function vr(e, t) {
|
|
|
27653
27692
|
tagName: "Function",
|
|
27654
27693
|
id: t.id
|
|
27655
27694
|
},
|
|
27656
|
-
structure:
|
|
27695
|
+
structure: f,
|
|
27657
27696
|
accepted: a
|
|
27658
27697
|
});
|
|
27659
27698
|
}
|
|
27660
|
-
return
|
|
27699
|
+
return u.map((e) => ({
|
|
27661
27700
|
tagName: "Function",
|
|
27662
27701
|
id: e.id
|
|
27663
27702
|
}));
|
|
@@ -27670,11 +27709,11 @@ function yr(e) {
|
|
|
27670
27709
|
};
|
|
27671
27710
|
let i = n.filter((e) => e.instanceScopeId === t);
|
|
27672
27711
|
return {
|
|
27673
|
-
instanceAccepted:
|
|
27712
|
+
instanceAccepted: K({
|
|
27674
27713
|
groups: i,
|
|
27675
27714
|
decisions: r
|
|
27676
27715
|
}),
|
|
27677
|
-
instanceOverrides:
|
|
27716
|
+
instanceOverrides: G({
|
|
27678
27717
|
groups: i,
|
|
27679
27718
|
decisions: r
|
|
27680
27719
|
})
|
|
@@ -27683,56 +27722,58 @@ function yr(e) {
|
|
|
27683
27722
|
//#endregion
|
|
27684
27723
|
//#region src/v2019C1/extensions/lifecycle/update/transaction/asd.ts
|
|
27685
27724
|
async function br(e, t) {
|
|
27686
|
-
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s } = t, { uuid:
|
|
27725
|
+
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, { uuid: l } = await n.getAttributes(r), u = a === "instantiate" ? [] : await q(e, {
|
|
27687
27726
|
tagName: "Application",
|
|
27688
|
-
sourceUuid:
|
|
27689
|
-
}),
|
|
27690
|
-
if (
|
|
27691
|
-
let t = s ?
|
|
27692
|
-
groups:
|
|
27727
|
+
sourceUuid: l
|
|
27728
|
+
}), d = o?.groups ?? [];
|
|
27729
|
+
if (u.length === 0) {
|
|
27730
|
+
let t = s ? K({
|
|
27731
|
+
groups: d,
|
|
27693
27732
|
decisions: s
|
|
27694
|
-
}) : void 0, a = s ?
|
|
27695
|
-
groups:
|
|
27733
|
+
}) : void 0, a = s ? G({
|
|
27734
|
+
groups: d,
|
|
27696
27735
|
decisions: s
|
|
27697
27736
|
}) : void 0;
|
|
27698
27737
|
if (t && !t.sourceIds.has(r.id)) return {
|
|
27699
27738
|
applications: [],
|
|
27700
27739
|
functions: []
|
|
27701
27740
|
};
|
|
27702
|
-
let { applicationRef: o, composedFunctionRefs:
|
|
27741
|
+
let { applicationRef: o, composedFunctionRefs: l } = await gr(e, {
|
|
27703
27742
|
sourceQuery: n,
|
|
27704
27743
|
applicationRef: r,
|
|
27705
27744
|
targetParent: i,
|
|
27706
|
-
overrides: a
|
|
27745
|
+
overrides: a,
|
|
27746
|
+
keepNameTypesFrom: c
|
|
27707
27747
|
});
|
|
27708
27748
|
return {
|
|
27709
27749
|
applications: [o],
|
|
27710
|
-
functions:
|
|
27750
|
+
functions: l
|
|
27711
27751
|
};
|
|
27712
27752
|
}
|
|
27713
|
-
let
|
|
27714
|
-
for (let t of
|
|
27715
|
-
let i =
|
|
27753
|
+
let f = await Y(e, i), p = await Q(n, { applicationRef: r });
|
|
27754
|
+
for (let t of u) {
|
|
27755
|
+
let i = d.filter((e) => e.instanceScopeId === t.id), a = s ? K({
|
|
27716
27756
|
groups: i,
|
|
27717
27757
|
decisions: s
|
|
27718
|
-
}) : void 0, o = s ?
|
|
27758
|
+
}) : void 0, o = s ? G({
|
|
27719
27759
|
groups: i,
|
|
27720
27760
|
decisions: s
|
|
27721
|
-
}) : void 0,
|
|
27761
|
+
}) : void 0, l = await Q(e, { applicationRef: {
|
|
27722
27762
|
tagName: "Application",
|
|
27723
27763
|
id: t.id
|
|
27724
27764
|
} });
|
|
27725
|
-
await
|
|
27765
|
+
await W(e, {
|
|
27726
27766
|
sourceQuery: n,
|
|
27727
27767
|
sourceRootRef: r,
|
|
27728
27768
|
instanceRootRef: t,
|
|
27729
27769
|
accepted: a,
|
|
27730
|
-
overrides: o
|
|
27770
|
+
overrides: o,
|
|
27771
|
+
keepNameTypesFrom: c
|
|
27731
27772
|
}), await er(e, {
|
|
27732
27773
|
sourceQuery: n,
|
|
27733
|
-
satelliteRefs:
|
|
27734
|
-
instanceSatelliteRefs:
|
|
27735
|
-
structure:
|
|
27774
|
+
satelliteRefs: p,
|
|
27775
|
+
instanceSatelliteRefs: l,
|
|
27776
|
+
structure: f,
|
|
27736
27777
|
accepted: a
|
|
27737
27778
|
}), await rr(e, {
|
|
27738
27779
|
sourceQuery: n,
|
|
@@ -27741,31 +27782,32 @@ async function br(e, t) {
|
|
|
27741
27782
|
tagName: "Application",
|
|
27742
27783
|
id: t.id
|
|
27743
27784
|
},
|
|
27744
|
-
structure:
|
|
27785
|
+
structure: f,
|
|
27745
27786
|
accepted: a
|
|
27746
27787
|
});
|
|
27747
27788
|
}
|
|
27748
|
-
let
|
|
27789
|
+
let m = await xr(e, {
|
|
27749
27790
|
sourceQuery: n,
|
|
27750
27791
|
applicationRef: r,
|
|
27751
27792
|
targetParent: i,
|
|
27752
27793
|
scenario: a,
|
|
27753
27794
|
report: o,
|
|
27754
|
-
decisions: s
|
|
27795
|
+
decisions: s,
|
|
27796
|
+
keepNameTypesFrom: c
|
|
27755
27797
|
});
|
|
27756
27798
|
return {
|
|
27757
|
-
applications:
|
|
27799
|
+
applications: u.map((e) => ({
|
|
27758
27800
|
tagName: "Application",
|
|
27759
27801
|
id: e.id
|
|
27760
27802
|
})),
|
|
27761
|
-
functions:
|
|
27803
|
+
functions: m
|
|
27762
27804
|
};
|
|
27763
27805
|
}
|
|
27764
27806
|
async function xr(e, t) {
|
|
27765
|
-
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s } = t,
|
|
27766
|
-
if (
|
|
27767
|
-
let
|
|
27768
|
-
for (let t of
|
|
27807
|
+
let { sourceQuery: n, applicationRef: r, targetParent: i, scenario: a, report: o, decisions: s, keepNameTypesFrom: c } = t, l = await Yn(n, r);
|
|
27808
|
+
if (l.size === 0) return [];
|
|
27809
|
+
let u = await Y(e, i), d = [];
|
|
27810
|
+
for (let t of l) {
|
|
27769
27811
|
let [r] = await n.any.findByAttributes({
|
|
27770
27812
|
tagName: "Function",
|
|
27771
27813
|
attributes: { uuid: t }
|
|
@@ -27774,17 +27816,18 @@ async function xr(e, t) {
|
|
|
27774
27816
|
let i = {
|
|
27775
27817
|
tagName: "Function",
|
|
27776
27818
|
id: r.id
|
|
27777
|
-
},
|
|
27819
|
+
}, l = await vr(e, {
|
|
27778
27820
|
sourceQuery: n,
|
|
27779
27821
|
functionRef: i,
|
|
27780
|
-
targetParent: await
|
|
27822
|
+
targetParent: await U(n, i, u),
|
|
27781
27823
|
scenario: a,
|
|
27782
27824
|
report: o,
|
|
27783
|
-
decisions: s
|
|
27825
|
+
decisions: s,
|
|
27826
|
+
keepNameTypesFrom: c
|
|
27784
27827
|
});
|
|
27785
|
-
|
|
27828
|
+
d.push(...l);
|
|
27786
27829
|
}
|
|
27787
|
-
return
|
|
27830
|
+
return d;
|
|
27788
27831
|
}
|
|
27789
27832
|
//#endregion
|
|
27790
27833
|
//#region src/v2019C1/extensions/lifecycle/update/index.ts
|
|
@@ -27829,7 +27872,8 @@ async function Tr(e, t, n, r) {
|
|
|
27829
27872
|
targetParent: t.anchor,
|
|
27830
27873
|
scenario: t.scenario,
|
|
27831
27874
|
report: n,
|
|
27832
|
-
decisions: r
|
|
27875
|
+
decisions: r,
|
|
27876
|
+
keepNameTypesFrom: t.keepNameTypesFrom
|
|
27833
27877
|
})
|
|
27834
27878
|
};
|
|
27835
27879
|
let { applications: i, functions: a } = await br(e, {
|
|
@@ -27838,7 +27882,8 @@ async function Tr(e, t, n, r) {
|
|
|
27838
27882
|
targetParent: t.anchor,
|
|
27839
27883
|
scenario: t.scenario,
|
|
27840
27884
|
report: n,
|
|
27841
|
-
decisions: r
|
|
27885
|
+
decisions: r,
|
|
27886
|
+
keepNameTypesFrom: t.keepNameTypesFrom
|
|
27842
27887
|
});
|
|
27843
27888
|
return {
|
|
27844
27889
|
verb: "asd",
|
|
@@ -27868,7 +27913,7 @@ async function Er(e) {
|
|
|
27868
27913
|
//#endregion
|
|
27869
27914
|
//#region src/v2019C1/extensions/lifecycle/extract/transaction/post-extraction-cleanup.ts
|
|
27870
27915
|
async function Dr(e) {
|
|
27871
|
-
await
|
|
27916
|
+
await j.transaction.orphanUuidRefs(e), await j.transaction.resetLNode(e), await j.transaction.pruneEmptyContainers(e);
|
|
27872
27917
|
}
|
|
27873
27918
|
//#endregion
|
|
27874
27919
|
//#region src/v2019C1/extensions/lifecycle/layers/omit-filters.ts
|
|
@@ -27941,7 +27986,7 @@ async function jr(e, t) {
|
|
|
27941
27986
|
targetParentRef: c,
|
|
27942
27987
|
omit: Ar,
|
|
27943
27988
|
stripRootAttributes: ["templateUuid"]
|
|
27944
|
-
}), await
|
|
27989
|
+
}), await X(e, {
|
|
27945
27990
|
sourceQuery: n,
|
|
27946
27991
|
functionRef: r,
|
|
27947
27992
|
structure: s
|
|
@@ -27956,7 +28001,7 @@ var Mr = /* @__PURE__ */ c({
|
|
|
27956
28001
|
}), Nr = /* @__PURE__ */ c({
|
|
27957
28002
|
asd: () => gr,
|
|
27958
28003
|
fsd: () => dr,
|
|
27959
|
-
resolveTargetStructure: () =>
|
|
28004
|
+
resolveTargetStructure: () => Y
|
|
27960
28005
|
});
|
|
27961
28006
|
//#endregion
|
|
27962
28007
|
//#region src/v2019C1/extensions/lifecycle/report/mark-placement-conflicts.ts
|
|
@@ -27967,7 +28012,7 @@ async function Pr(e, t, n) {
|
|
|
27967
28012
|
if (!i) continue;
|
|
27968
28013
|
let a = await t.sourceQuery.getAttributes(i), o = a.uuid;
|
|
27969
28014
|
if (!o) continue;
|
|
27970
|
-
let s = r.primary.tagName, [c] = await
|
|
28015
|
+
let s = r.primary.tagName, [c] = await q(e, {
|
|
27971
28016
|
tagName: s,
|
|
27972
28017
|
sourceUuid: o
|
|
27973
28018
|
});
|
|
@@ -27980,7 +28025,7 @@ async function Pr(e, t, n) {
|
|
|
27980
28025
|
let n = {
|
|
27981
28026
|
tagName: t.tagName,
|
|
27982
28027
|
id: t.id
|
|
27983
|
-
}, r = await
|
|
28028
|
+
}, r = await R(e, {
|
|
27984
28029
|
parentRef: n,
|
|
27985
28030
|
childTag: s,
|
|
27986
28031
|
candidate: a
|
|
@@ -27991,7 +28036,7 @@ async function Pr(e, t, n) {
|
|
|
27991
28036
|
}
|
|
27992
28037
|
}
|
|
27993
28038
|
if (!d || !u) continue;
|
|
27994
|
-
let f = d.fields.find((e) => bn(
|
|
28039
|
+
let f = d.fields.find((e) => bn(L(s, e)));
|
|
27995
28040
|
if (f) {
|
|
27996
28041
|
let t = await kn(e, {
|
|
27997
28042
|
parentRef: u,
|
|
@@ -28046,8 +28091,8 @@ async function Ir(e, t) {
|
|
|
28046
28091
|
return Fr(e, {
|
|
28047
28092
|
sourceQuery: n,
|
|
28048
28093
|
primaryRef: r,
|
|
28049
|
-
satelliteRefs: await
|
|
28050
|
-
instanceSatelliteRefs: i ? await
|
|
28094
|
+
satelliteRefs: await J(n, { primaryRef: r }),
|
|
28095
|
+
instanceSatelliteRefs: i ? await J(e, { primaryRef: i }) : [],
|
|
28051
28096
|
report: a
|
|
28052
28097
|
});
|
|
28053
28098
|
}
|
|
@@ -28058,8 +28103,8 @@ async function Lr(e, t) {
|
|
|
28058
28103
|
return Fr(e, {
|
|
28059
28104
|
sourceQuery: n,
|
|
28060
28105
|
primaryRef: r,
|
|
28061
|
-
satelliteRefs: await
|
|
28062
|
-
instanceSatelliteRefs: i ? await
|
|
28106
|
+
satelliteRefs: await Z(n, { primaryRef: r }),
|
|
28107
|
+
instanceSatelliteRefs: i ? await Z(e, { primaryRef: {
|
|
28063
28108
|
tagName: "Function",
|
|
28064
28109
|
id: i.id
|
|
28065
28110
|
} }) : [],
|
|
@@ -28068,33 +28113,31 @@ async function Lr(e, t) {
|
|
|
28068
28113
|
}
|
|
28069
28114
|
//#endregion
|
|
28070
28115
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-function.ts
|
|
28071
|
-
async function
|
|
28072
|
-
let { sourceQuery: n, functionRef: r, instance: i } = t, a = await
|
|
28073
|
-
sourceQuery: n,
|
|
28074
|
-
targetQuery: e,
|
|
28075
|
-
sourceRootRef: r,
|
|
28076
|
-
instanceRootRef: i
|
|
28077
|
-
});
|
|
28078
|
-
if (!i) return a;
|
|
28079
|
-
let o = await Lr(e, {
|
|
28116
|
+
async function Rr(e, t) {
|
|
28117
|
+
let { sourceQuery: n, functionRef: r, instance: i } = t, a = await Lr(e, {
|
|
28080
28118
|
sourceQuery: n,
|
|
28081
28119
|
functionRef: r,
|
|
28082
28120
|
instance: i,
|
|
28083
|
-
report:
|
|
28121
|
+
report: await sn({
|
|
28122
|
+
sourceQuery: n,
|
|
28123
|
+
targetQuery: e,
|
|
28124
|
+
sourceRootRef: r,
|
|
28125
|
+
instanceRootRef: i
|
|
28126
|
+
})
|
|
28084
28127
|
});
|
|
28085
28128
|
return Ir(e, {
|
|
28086
28129
|
sourceQuery: n,
|
|
28087
28130
|
primaryRef: r,
|
|
28088
|
-
instancePrimaryRef: {
|
|
28131
|
+
instancePrimaryRef: i ? {
|
|
28089
28132
|
tagName: "Function",
|
|
28090
28133
|
id: i.id
|
|
28091
|
-
},
|
|
28092
|
-
report:
|
|
28134
|
+
} : void 0,
|
|
28135
|
+
report: a
|
|
28093
28136
|
});
|
|
28094
28137
|
}
|
|
28095
28138
|
//#endregion
|
|
28096
28139
|
//#region src/v2019C1/extensions/presentation/constants/title.ts
|
|
28097
|
-
var
|
|
28140
|
+
var zr = {
|
|
28098
28141
|
LNode: {
|
|
28099
28142
|
compact: [
|
|
28100
28143
|
"prefix",
|
|
@@ -28188,23 +28231,23 @@ async function $(e, t, n = {}) {
|
|
|
28188
28231
|
title: "",
|
|
28189
28232
|
labels: {}
|
|
28190
28233
|
} : "";
|
|
28191
|
-
let i = r.tagName, a = n.mode ?? "compact", o = await e.any.getAttributes(r), s =
|
|
28234
|
+
let i = r.tagName, a = n.mode ?? "compact", o = await e.any.getAttributes(r), s = zr[i], c = Br({
|
|
28192
28235
|
tag: i,
|
|
28193
28236
|
spec: s,
|
|
28194
28237
|
mode: a,
|
|
28195
28238
|
attributes: o,
|
|
28196
|
-
specAttributes: s?.attributesFrom ? await
|
|
28239
|
+
specAttributes: s?.attributesFrom ? await Vr(e, r, s.attributesFrom) : o,
|
|
28197
28240
|
value: r.value
|
|
28198
28241
|
});
|
|
28199
28242
|
return n.withLabels ? {
|
|
28200
28243
|
title: c,
|
|
28201
|
-
labels: await
|
|
28244
|
+
labels: await Hr(e, r)
|
|
28202
28245
|
} : c;
|
|
28203
28246
|
}
|
|
28204
|
-
function
|
|
28247
|
+
function Br(e) {
|
|
28205
28248
|
let { tag: t, spec: n, mode: r, attributes: i, specAttributes: a, value: o } = e;
|
|
28206
28249
|
if (n) {
|
|
28207
|
-
let e =
|
|
28250
|
+
let e = Gr(n, a, r);
|
|
28208
28251
|
if (e) return e;
|
|
28209
28252
|
}
|
|
28210
28253
|
let s = (o ?? "").trim();
|
|
@@ -28212,14 +28255,14 @@ function zr(e) {
|
|
|
28212
28255
|
let c = g[t]?.attributes?.identityFields, l = c?.find((e) => e === "name" || e === "id") ?? c?.[0];
|
|
28213
28256
|
return l && i[l] ? i[l] : i.name || t;
|
|
28214
28257
|
}
|
|
28215
|
-
async function
|
|
28258
|
+
async function Vr(e, t, n) {
|
|
28216
28259
|
let [r] = await e.any.getChildren(t, n);
|
|
28217
28260
|
return r ? e.any.getAttributes(r) : {};
|
|
28218
28261
|
}
|
|
28219
|
-
async function Vr(e, t) {
|
|
28220
|
-
return Ur(await Hr(e, t));
|
|
28221
|
-
}
|
|
28222
28262
|
async function Hr(e, t) {
|
|
28263
|
+
return Wr(await Ur(e, t));
|
|
28264
|
+
}
|
|
28265
|
+
async function Ur(e, t) {
|
|
28223
28266
|
let n = [], r = await e.any.getChildren(t, "Labels");
|
|
28224
28267
|
for (let t of r) {
|
|
28225
28268
|
let r = await e.any.getChildren(t, "Label");
|
|
@@ -28234,48 +28277,48 @@ async function Hr(e, t) {
|
|
|
28234
28277
|
}
|
|
28235
28278
|
return n;
|
|
28236
28279
|
}
|
|
28237
|
-
function
|
|
28280
|
+
function Wr(e) {
|
|
28238
28281
|
let t = {};
|
|
28239
28282
|
for (let { lang: n, id: r, text: i } of e) (t[n] ??= {})[r] = i;
|
|
28240
28283
|
return t;
|
|
28241
28284
|
}
|
|
28242
|
-
function
|
|
28285
|
+
function Gr(e, t, n) {
|
|
28243
28286
|
let r = n === "full" && e.full !== void 0, i = r ? e.full : e.compact, a = r ? e.fullSeparator ?? e.separator ?? "" : e.separator ?? "";
|
|
28244
|
-
if (typeof i == "string") return
|
|
28287
|
+
if (typeof i == "string") return Kr(i, t);
|
|
28245
28288
|
let o = i.map((e) => t[e]).filter(Boolean);
|
|
28246
28289
|
return o.length > 0 ? o.join(a) : "";
|
|
28247
28290
|
}
|
|
28248
|
-
function
|
|
28291
|
+
function Kr(e, t) {
|
|
28249
28292
|
return e.replace(/\{([a-zA-Z_][a-zA-Z0-9_]*)\}/g, (e, n) => t[n] ?? "").replace(/\[\]/g, "").replace(/\(\)/g, "").split("/").map((e) => e.split(".").filter((e) => e !== "").join(".")).filter((e) => e !== "").join("/");
|
|
28250
28293
|
}
|
|
28251
28294
|
//#endregion
|
|
28252
28295
|
//#region src/v2019C1/extensions/presentation/query/index.ts
|
|
28253
|
-
var
|
|
28296
|
+
var qr = /* @__PURE__ */ c({ extractElementTitle: () => $ });
|
|
28254
28297
|
//#endregion
|
|
28255
28298
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-asd.ts
|
|
28256
|
-
async function
|
|
28257
|
-
let { sourceQuery: n, applicationRef: r, scenario: i } = t, { uuid: a } = await n.getAttributes(r), o = i === "instantiate" ? [] : await
|
|
28299
|
+
async function Jr(e, t) {
|
|
28300
|
+
let { sourceQuery: n, applicationRef: r, scenario: i } = t, { uuid: a } = await n.getAttributes(r), o = i === "instantiate" ? [] : await q(e, {
|
|
28258
28301
|
tagName: "Application",
|
|
28259
28302
|
sourceUuid: a
|
|
28260
28303
|
}), s = [];
|
|
28261
|
-
if (o.length === 0) s.push(await
|
|
28304
|
+
if (o.length === 0) s.push(await Yr(e, {
|
|
28262
28305
|
sourceQuery: n,
|
|
28263
28306
|
applicationRef: r,
|
|
28264
28307
|
instance: void 0
|
|
28265
28308
|
}));
|
|
28266
|
-
else for (let t of o) s.push(await
|
|
28309
|
+
else for (let t of o) s.push(await Yr(e, {
|
|
28267
28310
|
sourceQuery: n,
|
|
28268
28311
|
applicationRef: r,
|
|
28269
28312
|
instance: t
|
|
28270
28313
|
}));
|
|
28271
|
-
let c = await
|
|
28314
|
+
let c = await Xr(e, {
|
|
28272
28315
|
sourceQuery: n,
|
|
28273
28316
|
applicationRef: r,
|
|
28274
28317
|
scenario: i
|
|
28275
28318
|
});
|
|
28276
28319
|
return mn([...s, ...c]);
|
|
28277
28320
|
}
|
|
28278
|
-
async function
|
|
28321
|
+
async function Yr(e, t) {
|
|
28279
28322
|
let { sourceQuery: n, applicationRef: r, instance: i } = t, a = await sn({
|
|
28280
28323
|
sourceQuery: n,
|
|
28281
28324
|
targetQuery: e,
|
|
@@ -28285,8 +28328,8 @@ async function Jr(e, t) {
|
|
|
28285
28328
|
if (await Fr(e, {
|
|
28286
28329
|
sourceQuery: n,
|
|
28287
28330
|
primaryRef: r,
|
|
28288
|
-
satelliteRefs: await
|
|
28289
|
-
instanceSatelliteRefs: i ? await
|
|
28331
|
+
satelliteRefs: await Q(n, { applicationRef: r }),
|
|
28332
|
+
instanceSatelliteRefs: i ? await Q(e, { applicationRef: {
|
|
28290
28333
|
tagName: "Application",
|
|
28291
28334
|
id: i.id
|
|
28292
28335
|
} }) : [],
|
|
@@ -28305,7 +28348,7 @@ async function Jr(e, t) {
|
|
|
28305
28348
|
}
|
|
28306
28349
|
return a;
|
|
28307
28350
|
}
|
|
28308
|
-
async function
|
|
28351
|
+
async function Xr(e, t) {
|
|
28309
28352
|
let { sourceQuery: n, applicationRef: r, scenario: i } = t, a = await Yn(n, r), o = [];
|
|
28310
28353
|
for (let t of a) {
|
|
28311
28354
|
let [r] = await n.any.findByAttributes({
|
|
@@ -28316,12 +28359,12 @@ async function Yr(e, t) {
|
|
|
28316
28359
|
let a = {
|
|
28317
28360
|
tagName: "Function",
|
|
28318
28361
|
id: r.id
|
|
28319
|
-
}, s = i === "instantiate" ? [] : await
|
|
28362
|
+
}, s = i === "instantiate" ? [] : await q(e, {
|
|
28320
28363
|
tagName: "Function",
|
|
28321
28364
|
sourceUuid: t
|
|
28322
28365
|
});
|
|
28323
28366
|
if (s.length === 0) {
|
|
28324
|
-
o.push(await
|
|
28367
|
+
o.push(await Rr(e, {
|
|
28325
28368
|
sourceQuery: n,
|
|
28326
28369
|
functionRef: a,
|
|
28327
28370
|
instance: void 0
|
|
@@ -28329,7 +28372,7 @@ async function Yr(e, t) {
|
|
|
28329
28372
|
continue;
|
|
28330
28373
|
}
|
|
28331
28374
|
for (let t of s) {
|
|
28332
|
-
let r = await
|
|
28375
|
+
let r = await Rr(e, {
|
|
28333
28376
|
sourceQuery: n,
|
|
28334
28377
|
functionRef: a,
|
|
28335
28378
|
instance: t
|
|
@@ -28342,20 +28385,20 @@ async function Yr(e, t) {
|
|
|
28342
28385
|
}
|
|
28343
28386
|
//#endregion
|
|
28344
28387
|
//#region src/v2019C1/extensions/lifecycle/report/query/report-fsd.ts
|
|
28345
|
-
async function
|
|
28388
|
+
async function Zr(e, t) {
|
|
28346
28389
|
let { sourceQuery: n, functionRef: r, targetParent: i, scenario: a } = t, { uuid: o } = await n.getAttributes(r), s = a === "instantiate" ? [] : await Zn(e, {
|
|
28347
28390
|
targetParent: i,
|
|
28348
28391
|
tagName: "Function",
|
|
28349
28392
|
sourceUuid: o
|
|
28350
28393
|
});
|
|
28351
|
-
if (s.length === 0) return
|
|
28394
|
+
if (s.length === 0) return Rr(e, {
|
|
28352
28395
|
sourceQuery: n,
|
|
28353
28396
|
functionRef: r,
|
|
28354
28397
|
instance: void 0
|
|
28355
28398
|
});
|
|
28356
28399
|
let c = [];
|
|
28357
28400
|
for (let t of s) {
|
|
28358
|
-
let i = await
|
|
28401
|
+
let i = await Rr(e, {
|
|
28359
28402
|
sourceQuery: n,
|
|
28360
28403
|
functionRef: r,
|
|
28361
28404
|
instance: t
|
|
@@ -28367,13 +28410,13 @@ async function Xr(e, t) {
|
|
|
28367
28410
|
}
|
|
28368
28411
|
//#endregion
|
|
28369
28412
|
//#region src/v2019C1/extensions/lifecycle/report/report.ts
|
|
28370
|
-
async function
|
|
28371
|
-
let n = t.verb === "fsd" ? await
|
|
28413
|
+
async function Qr(e, t) {
|
|
28414
|
+
let n = t.verb === "fsd" ? await Zr(e, {
|
|
28372
28415
|
sourceQuery: t.sourceQuery,
|
|
28373
28416
|
functionRef: t.ref,
|
|
28374
28417
|
targetParent: t.anchor,
|
|
28375
28418
|
scenario: t.scenario
|
|
28376
|
-
}) : await
|
|
28419
|
+
}) : await Jr(e, {
|
|
28377
28420
|
sourceQuery: t.sourceQuery,
|
|
28378
28421
|
applicationRef: t.ref,
|
|
28379
28422
|
scenario: t.scenario
|
|
@@ -28383,7 +28426,7 @@ async function Zr(e, t) {
|
|
|
28383
28426
|
}
|
|
28384
28427
|
//#endregion
|
|
28385
28428
|
//#region src/v2019C1/extensions/lifecycle/report/presentation-scope.ts
|
|
28386
|
-
function
|
|
28429
|
+
function $r(e) {
|
|
28387
28430
|
switch (e.verb) {
|
|
28388
28431
|
case "fsd":
|
|
28389
28432
|
case "asd": return {
|
|
@@ -28395,28 +28438,28 @@ function Qr(e) {
|
|
|
28395
28438
|
}
|
|
28396
28439
|
//#endregion
|
|
28397
28440
|
//#region src/v2019C1/extensions/index.ts
|
|
28398
|
-
var
|
|
28399
|
-
cleanUp:
|
|
28441
|
+
var ei = {
|
|
28442
|
+
cleanUp: j,
|
|
28400
28443
|
dataModel: Ht,
|
|
28401
28444
|
history: qt,
|
|
28402
28445
|
identity: Qt,
|
|
28403
28446
|
lifecycle: {
|
|
28404
|
-
query: { report:
|
|
28447
|
+
query: { report: Qr },
|
|
28405
28448
|
transaction: {
|
|
28406
28449
|
extract: Mr,
|
|
28407
28450
|
instantiate: Nr,
|
|
28408
|
-
transplant: { deep:
|
|
28451
|
+
transplant: { deep: H },
|
|
28409
28452
|
update: Sr,
|
|
28410
28453
|
apply: Cr
|
|
28411
28454
|
}
|
|
28412
28455
|
},
|
|
28413
|
-
reference:
|
|
28414
|
-
signature: { query:
|
|
28415
|
-
presentation: { query:
|
|
28456
|
+
reference: A,
|
|
28457
|
+
signature: { query: Ot },
|
|
28458
|
+
presentation: { query: qr }
|
|
28416
28459
|
};
|
|
28417
28460
|
//#endregion
|
|
28418
28461
|
//#region src/v2019C1/hooks/after-created/private-wrapper.ts
|
|
28419
|
-
async function
|
|
28462
|
+
async function ti(e) {
|
|
28420
28463
|
let { childRecord: t, parentRecord: n, query: r } = e;
|
|
28421
28464
|
if (t.namespace.prefix === b.namespaces.default.prefix) return [];
|
|
28422
28465
|
let i = n.tagName === "Private", a = n.namespace.prefix === b.namespaces.default.prefix;
|
|
@@ -28425,26 +28468,26 @@ async function ei(e) {
|
|
|
28425
28468
|
...n,
|
|
28426
28469
|
children: n.children.filter((e) => e.id !== t.id)
|
|
28427
28470
|
};
|
|
28428
|
-
return i ?
|
|
28471
|
+
return i ? ni({
|
|
28429
28472
|
parentRecord: n,
|
|
28430
28473
|
childRecord: t,
|
|
28431
28474
|
query: r
|
|
28432
|
-
}) : o ?
|
|
28475
|
+
}) : o ? ri({
|
|
28433
28476
|
existingPrivateRef: o,
|
|
28434
28477
|
parentRecord: n,
|
|
28435
28478
|
updatedParentRecord: s,
|
|
28436
28479
|
childRecord: t,
|
|
28437
28480
|
query: r
|
|
28438
|
-
}) : (await r.findAncestors(n)).some((e) => e.tagName === "Private" && e.attributes.some((e) => e.name === "type" && e.value === t.namespace.prefix)) ? [] :
|
|
28481
|
+
}) : (await r.findAncestors(n)).some((e) => e.tagName === "Private" && e.attributes.some((e) => e.name === "type" && e.value === t.namespace.prefix)) ? [] : ii({
|
|
28439
28482
|
parentRecord: n,
|
|
28440
28483
|
updatedParentRecord: s,
|
|
28441
28484
|
childRecord: t
|
|
28442
28485
|
});
|
|
28443
28486
|
}
|
|
28444
|
-
async function
|
|
28487
|
+
async function ni(e) {
|
|
28445
28488
|
let { parentRecord: t, childRecord: n, query: r } = e, a = t;
|
|
28446
28489
|
if (n.parent?.id === a.id && n.parent?.tagName === "Private") return [];
|
|
28447
|
-
let s = await
|
|
28490
|
+
let s = await ai({
|
|
28448
28491
|
privateId: a.id,
|
|
28449
28492
|
query: r
|
|
28450
28493
|
});
|
|
@@ -28452,7 +28495,7 @@ async function ti(e) {
|
|
|
28452
28495
|
detail: "Latest private record not found",
|
|
28453
28496
|
key: "ELEMENT_NOT_FOUND"
|
|
28454
28497
|
});
|
|
28455
|
-
let { childRecord: c, privateRecord: l } =
|
|
28498
|
+
let { childRecord: c, privateRecord: l } = oi({
|
|
28456
28499
|
privateRecord: s,
|
|
28457
28500
|
childRecord: n
|
|
28458
28501
|
});
|
|
@@ -28466,8 +28509,8 @@ async function ti(e) {
|
|
|
28466
28509
|
newRecord: i(l)
|
|
28467
28510
|
}];
|
|
28468
28511
|
}
|
|
28469
|
-
async function
|
|
28470
|
-
let { existingPrivateRef: t, parentRecord: n, updatedParentRecord: r, childRecord: a, query: s } = e, c = await
|
|
28512
|
+
async function ri(e) {
|
|
28513
|
+
let { existingPrivateRef: t, parentRecord: n, updatedParentRecord: r, childRecord: a, query: s } = e, c = await ai({
|
|
28471
28514
|
privateId: t.id,
|
|
28472
28515
|
query: s
|
|
28473
28516
|
});
|
|
@@ -28475,7 +28518,7 @@ async function ni(e) {
|
|
|
28475
28518
|
detail: "Latest private record not found",
|
|
28476
28519
|
key: "ELEMENT_NOT_FOUND"
|
|
28477
28520
|
}), !c.attributes.some((e) => e.name === "type" && e.value === a.namespace.prefix)) return [];
|
|
28478
|
-
let { childRecord: l, privateRecord: u } =
|
|
28521
|
+
let { childRecord: l, privateRecord: u } = oi({
|
|
28479
28522
|
privateRecord: c,
|
|
28480
28523
|
childRecord: a
|
|
28481
28524
|
});
|
|
@@ -28497,7 +28540,7 @@ async function ni(e) {
|
|
|
28497
28540
|
}
|
|
28498
28541
|
];
|
|
28499
28542
|
}
|
|
28500
|
-
function
|
|
28543
|
+
function ii(e) {
|
|
28501
28544
|
let { parentRecord: t, updatedParentRecord: n, childRecord: r } = e, a = {
|
|
28502
28545
|
id: crypto.randomUUID(),
|
|
28503
28546
|
tagName: "Private",
|
|
@@ -28546,14 +28589,14 @@ function ri(e) {
|
|
|
28546
28589
|
}
|
|
28547
28590
|
];
|
|
28548
28591
|
}
|
|
28549
|
-
async function
|
|
28592
|
+
async function ai(e) {
|
|
28550
28593
|
let { privateId: t, query: n } = e;
|
|
28551
28594
|
return await n.getRecord({
|
|
28552
28595
|
id: t,
|
|
28553
28596
|
tagName: "Private"
|
|
28554
28597
|
});
|
|
28555
28598
|
}
|
|
28556
|
-
function
|
|
28599
|
+
function oi(e) {
|
|
28557
28600
|
let { privateRecord: t, childRecord: n } = e;
|
|
28558
28601
|
return {
|
|
28559
28602
|
childRecord: {
|
|
@@ -28574,7 +28617,7 @@ function ai(e) {
|
|
|
28574
28617
|
}
|
|
28575
28618
|
//#endregion
|
|
28576
28619
|
//#region src/v2019C1/hooks/shared/ref-entry-ops.ts
|
|
28577
|
-
async function
|
|
28620
|
+
async function si(e) {
|
|
28578
28621
|
let { uuid: t, entry: r, target: a, query: o } = e;
|
|
28579
28622
|
if (!n(r.refTagName, b)) return [];
|
|
28580
28623
|
let s = await o.getRecordsByTagName(r.refTagName), c = [];
|
|
@@ -28583,7 +28626,7 @@ async function oi(e) {
|
|
|
28583
28626
|
let n = {
|
|
28584
28627
|
tagName: e.tagName,
|
|
28585
28628
|
id: e.id
|
|
28586
|
-
}, s = await
|
|
28629
|
+
}, s = await A.query.buildReferencePath(o, {
|
|
28587
28630
|
reference: n,
|
|
28588
28631
|
target: a
|
|
28589
28632
|
});
|
|
@@ -28603,7 +28646,7 @@ async function oi(e) {
|
|
|
28603
28646
|
}
|
|
28604
28647
|
return c;
|
|
28605
28648
|
}
|
|
28606
|
-
function
|
|
28649
|
+
function ci(e) {
|
|
28607
28650
|
let t = [];
|
|
28608
28651
|
for (let n of He) {
|
|
28609
28652
|
let r = Be[n]?.get(e);
|
|
@@ -28613,22 +28656,22 @@ function si(e) {
|
|
|
28613
28656
|
}
|
|
28614
28657
|
//#endregion
|
|
28615
28658
|
//#region src/v2019C1/hooks/after-created/ref-paths.ts
|
|
28616
|
-
async function
|
|
28617
|
-
let { childRecord: t, query: n } = e, r = await
|
|
28659
|
+
async function li(e) {
|
|
28660
|
+
let { childRecord: t, query: n } = e, r = await ui({
|
|
28618
28661
|
childRecord: t,
|
|
28619
28662
|
query: n
|
|
28620
|
-
}), i = await
|
|
28663
|
+
}), i = await pi({
|
|
28621
28664
|
childRecord: t,
|
|
28622
28665
|
query: n
|
|
28623
28666
|
});
|
|
28624
28667
|
return [...r, ...i];
|
|
28625
28668
|
}
|
|
28626
|
-
async function
|
|
28669
|
+
async function ui(e) {
|
|
28627
28670
|
let { childRecord: t, query: n } = e, r = Ue.get(t.tagName);
|
|
28628
28671
|
if (!r?.length) return [];
|
|
28629
28672
|
let i = [];
|
|
28630
28673
|
for (let e of r) {
|
|
28631
|
-
let r = await
|
|
28674
|
+
let r = await di({
|
|
28632
28675
|
childRecord: t,
|
|
28633
28676
|
pair: e,
|
|
28634
28677
|
query: n
|
|
@@ -28637,10 +28680,10 @@ async function li(e) {
|
|
|
28637
28680
|
}
|
|
28638
28681
|
return i;
|
|
28639
28682
|
}
|
|
28640
|
-
async function
|
|
28683
|
+
async function di(e) {
|
|
28641
28684
|
let { childRecord: t, pair: n, query: r } = e, i = t.attributes.find((e) => e.name === n.uuidAttr)?.value;
|
|
28642
28685
|
if (!i) return null;
|
|
28643
|
-
let a = await
|
|
28686
|
+
let a = await fi({
|
|
28644
28687
|
uuidValue: i,
|
|
28645
28688
|
targetTagNames: n.targetTagNames,
|
|
28646
28689
|
query: r
|
|
@@ -28670,7 +28713,7 @@ async function ui(e) {
|
|
|
28670
28713
|
}
|
|
28671
28714
|
};
|
|
28672
28715
|
}
|
|
28673
|
-
async function
|
|
28716
|
+
async function fi(e) {
|
|
28674
28717
|
let { uuidValue: t, targetTagNames: r, query: i } = e;
|
|
28675
28718
|
for (let e of r) {
|
|
28676
28719
|
if (!n(e, b)) continue;
|
|
@@ -28682,17 +28725,17 @@ async function di(e) {
|
|
|
28682
28725
|
}
|
|
28683
28726
|
return null;
|
|
28684
28727
|
}
|
|
28685
|
-
async function
|
|
28728
|
+
async function pi(e) {
|
|
28686
28729
|
let { childRecord: t, query: n } = e, r = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
28687
28730
|
if (!r) return [];
|
|
28688
|
-
let i =
|
|
28731
|
+
let i = ci(t.tagName);
|
|
28689
28732
|
if (i.length === 0) return [];
|
|
28690
28733
|
let a = {
|
|
28691
28734
|
tagName: t.tagName,
|
|
28692
28735
|
id: t.id
|
|
28693
28736
|
}, o = [];
|
|
28694
28737
|
for (let e of i) {
|
|
28695
|
-
let t = await
|
|
28738
|
+
let t = await si({
|
|
28696
28739
|
uuid: r,
|
|
28697
28740
|
entry: e,
|
|
28698
28741
|
target: a,
|
|
@@ -28704,12 +28747,12 @@ async function fi(e) {
|
|
|
28704
28747
|
}
|
|
28705
28748
|
//#endregion
|
|
28706
28749
|
//#region src/v2019C1/hooks/after-created/after-created.ts
|
|
28707
|
-
async function
|
|
28708
|
-
let { childRecord: t, parentRecord: n, query: r } = e, i = await
|
|
28750
|
+
async function mi(e) {
|
|
28751
|
+
let { childRecord: t, parentRecord: n, query: r } = e, i = await ti({
|
|
28709
28752
|
childRecord: t,
|
|
28710
28753
|
parentRecord: n,
|
|
28711
28754
|
query: r
|
|
28712
|
-
}), a = await
|
|
28755
|
+
}), a = await li({
|
|
28713
28756
|
childRecord: t,
|
|
28714
28757
|
query: r
|
|
28715
28758
|
});
|
|
@@ -28717,12 +28760,12 @@ async function pi(e) {
|
|
|
28717
28760
|
}
|
|
28718
28761
|
//#endregion
|
|
28719
28762
|
//#region src/v2019C1/hooks/after-deep-clone/ref-paths.ts
|
|
28720
|
-
async function
|
|
28721
|
-
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await
|
|
28763
|
+
async function hi(e) {
|
|
28764
|
+
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await gi(t, n);
|
|
28722
28765
|
if (r.size === 0) return [];
|
|
28723
28766
|
let a = [];
|
|
28724
28767
|
for (let { target: e } of t) {
|
|
28725
|
-
let t = await
|
|
28768
|
+
let t = await vi({
|
|
28726
28769
|
target: e,
|
|
28727
28770
|
uuidMap: r,
|
|
28728
28771
|
uuidToRef: i,
|
|
@@ -28732,9 +28775,9 @@ async function mi(e) {
|
|
|
28732
28775
|
}
|
|
28733
28776
|
return a;
|
|
28734
28777
|
}
|
|
28735
|
-
async function
|
|
28778
|
+
async function gi(e, t) {
|
|
28736
28779
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
28737
|
-
for (let { source: i, target: a } of e) await
|
|
28780
|
+
for (let { source: i, target: a } of e) await _i({
|
|
28738
28781
|
source: i,
|
|
28739
28782
|
target: a,
|
|
28740
28783
|
query: t,
|
|
@@ -28746,7 +28789,7 @@ async function hi(e, t) {
|
|
|
28746
28789
|
uuidToRef: r
|
|
28747
28790
|
};
|
|
28748
28791
|
}
|
|
28749
|
-
async function
|
|
28792
|
+
async function _i(e) {
|
|
28750
28793
|
let { source: t, target: n, query: r, uuidMap: i, uuidToRef: a } = e, o = await r.getRecord(n);
|
|
28751
28794
|
if (!o) return;
|
|
28752
28795
|
let s = t.attributes.find((e) => e.name === "uuid")?.value, c = o.attributes.find((e) => e.name === "uuid")?.value;
|
|
@@ -28755,14 +28798,14 @@ async function gi(e) {
|
|
|
28755
28798
|
id: o.id
|
|
28756
28799
|
}));
|
|
28757
28800
|
}
|
|
28758
|
-
async function
|
|
28801
|
+
async function vi(e) {
|
|
28759
28802
|
let { target: t, uuidMap: n, uuidToRef: r, query: a } = e, o = t.tagName;
|
|
28760
28803
|
if (!(o in T)) return null;
|
|
28761
28804
|
let s = await a.getRecord(t);
|
|
28762
28805
|
if (!s) return null;
|
|
28763
28806
|
let c = T[o], l = [...s.attributes], u = !1;
|
|
28764
28807
|
for (let e of c) {
|
|
28765
|
-
let t = await
|
|
28808
|
+
let t = await yi({
|
|
28766
28809
|
pair: e,
|
|
28767
28810
|
tagName: o,
|
|
28768
28811
|
refId: s.id,
|
|
@@ -28782,14 +28825,14 @@ async function _i(e) {
|
|
|
28782
28825
|
})
|
|
28783
28826
|
} : null;
|
|
28784
28827
|
}
|
|
28785
|
-
async function
|
|
28828
|
+
async function yi(e) {
|
|
28786
28829
|
let { pair: t, tagName: n, refId: r, uuidMap: i, uuidToRef: a, query: o } = e, s = [...e.updatedAttributes], c = s.find((e) => e.name === t.attribute.uuid)?.value;
|
|
28787
28830
|
if (!c) return null;
|
|
28788
28831
|
let l = i.get(c);
|
|
28789
28832
|
if (!l) return null;
|
|
28790
|
-
let u = !1, d =
|
|
28833
|
+
let u = !1, d = bi(s, t.attribute.uuid, c, l);
|
|
28791
28834
|
d && (s = d, u = !0);
|
|
28792
|
-
let f = await
|
|
28835
|
+
let f = await xi({
|
|
28793
28836
|
attributes: s,
|
|
28794
28837
|
pathAttrName: t.attribute.path,
|
|
28795
28838
|
newUuid: l,
|
|
@@ -28800,16 +28843,16 @@ async function vi(e) {
|
|
|
28800
28843
|
});
|
|
28801
28844
|
return f && (s = f, u = !0), u ? s : null;
|
|
28802
28845
|
}
|
|
28803
|
-
function
|
|
28846
|
+
function bi(e, t, n, r) {
|
|
28804
28847
|
return r === n ? null : e.map((e) => e.name === t ? {
|
|
28805
28848
|
...e,
|
|
28806
28849
|
value: r
|
|
28807
28850
|
} : e);
|
|
28808
28851
|
}
|
|
28809
|
-
async function
|
|
28852
|
+
async function xi(e) {
|
|
28810
28853
|
let { attributes: t, pathAttrName: n, newUuid: r, uuidToRef: i, tagName: a, refId: o, query: s } = e, c = i.get(r);
|
|
28811
28854
|
if (!c) return null;
|
|
28812
|
-
let l = await
|
|
28855
|
+
let l = await A.query.buildReferencePath(s, {
|
|
28813
28856
|
reference: {
|
|
28814
28857
|
tagName: a,
|
|
28815
28858
|
id: o
|
|
@@ -28826,12 +28869,12 @@ async function bi(e) {
|
|
|
28826
28869
|
}
|
|
28827
28870
|
//#endregion
|
|
28828
28871
|
//#region src/v2019C1/hooks/after-deep-clone/after-deep-clone.ts
|
|
28829
|
-
async function
|
|
28830
|
-
return
|
|
28872
|
+
async function Si(e) {
|
|
28873
|
+
return hi(e);
|
|
28831
28874
|
}
|
|
28832
28875
|
//#endregion
|
|
28833
28876
|
//#region src/v2019C1/hooks/after-standardized-record/uuid-attribute.ts
|
|
28834
|
-
function
|
|
28877
|
+
function Ci(e) {
|
|
28835
28878
|
let { record: t } = e, { tagName: n, attributes: r } = t, i = b.definition[n];
|
|
28836
28879
|
if (!("uuid" in i.attributes.details) || r.find((e) => e.name === "uuid")?.value) return t;
|
|
28837
28880
|
let a = i.attributes.details.uuid?.namespace, o = r.filter((e) => e.name !== "uuid");
|
|
@@ -28846,20 +28889,20 @@ function Si(e) {
|
|
|
28846
28889
|
}
|
|
28847
28890
|
//#endregion
|
|
28848
28891
|
//#region src/v2019C1/hooks/after-standardized-record/after-standardized-record.ts
|
|
28849
|
-
function
|
|
28850
|
-
return
|
|
28892
|
+
function wi(e) {
|
|
28893
|
+
return Ci(e);
|
|
28851
28894
|
}
|
|
28852
28895
|
//#endregion
|
|
28853
28896
|
//#region src/v2019C1/hooks/after-updated/ref-paths.ts
|
|
28854
|
-
async function
|
|
28897
|
+
async function Ti(e) {
|
|
28855
28898
|
let { oldRecord: t, newRecord: n, query: r } = e, i = [], a = n.attributes.find((e) => e.name === "uuid")?.value;
|
|
28856
28899
|
if (a) {
|
|
28857
|
-
let e =
|
|
28900
|
+
let e = ci(n.tagName), t = {
|
|
28858
28901
|
tagName: n.tagName,
|
|
28859
28902
|
id: n.id
|
|
28860
28903
|
};
|
|
28861
28904
|
for (let n of e) {
|
|
28862
|
-
let e = await
|
|
28905
|
+
let e = await si({
|
|
28863
28906
|
uuid: a,
|
|
28864
28907
|
entry: n,
|
|
28865
28908
|
target: t,
|
|
@@ -28868,8 +28911,8 @@ async function wi(e) {
|
|
|
28868
28911
|
i.push(...e);
|
|
28869
28912
|
}
|
|
28870
28913
|
}
|
|
28871
|
-
if (
|
|
28872
|
-
let e = await
|
|
28914
|
+
if (Ei(t, n)) {
|
|
28915
|
+
let e = await Di({
|
|
28873
28916
|
newRecord: n,
|
|
28874
28917
|
query: r
|
|
28875
28918
|
});
|
|
@@ -28877,11 +28920,11 @@ async function wi(e) {
|
|
|
28877
28920
|
}
|
|
28878
28921
|
return i;
|
|
28879
28922
|
}
|
|
28880
|
-
function
|
|
28923
|
+
function Ei(e, t) {
|
|
28881
28924
|
for (let n of ne) if (e.attributes.find((e) => e.name === n)?.value !== t.attributes.find((e) => e.name === n)?.value) return !0;
|
|
28882
28925
|
return !1;
|
|
28883
28926
|
}
|
|
28884
|
-
async function
|
|
28927
|
+
async function Di(e) {
|
|
28885
28928
|
let { newRecord: t, query: n } = e, r = {
|
|
28886
28929
|
tagName: t.tagName,
|
|
28887
28930
|
id: t.id
|
|
@@ -28890,14 +28933,14 @@ async function Ei(e) {
|
|
|
28890
28933
|
if (r.id === t.id) continue;
|
|
28891
28934
|
let e = await n.any.getAttribute(r, { name: "uuid" });
|
|
28892
28935
|
if (!e) continue;
|
|
28893
|
-
let i =
|
|
28936
|
+
let i = ci(r.tagName);
|
|
28894
28937
|
if (i.length === 0) continue;
|
|
28895
28938
|
let o = {
|
|
28896
28939
|
tagName: r.tagName,
|
|
28897
28940
|
id: r.id
|
|
28898
28941
|
};
|
|
28899
28942
|
for (let t of i) {
|
|
28900
|
-
let r = await
|
|
28943
|
+
let r = await si({
|
|
28901
28944
|
uuid: e,
|
|
28902
28945
|
entry: t,
|
|
28903
28946
|
target: o,
|
|
@@ -28910,28 +28953,28 @@ async function Ei(e) {
|
|
|
28910
28953
|
}
|
|
28911
28954
|
//#endregion
|
|
28912
28955
|
//#region src/v2019C1/hooks/after-updated/after-updated.ts
|
|
28913
|
-
async function
|
|
28914
|
-
return
|
|
28956
|
+
async function Oi(e) {
|
|
28957
|
+
return Ti(e);
|
|
28915
28958
|
}
|
|
28916
28959
|
//#endregion
|
|
28917
28960
|
//#region src/v2019C1/hooks/before-clone/before-clone.ts
|
|
28918
|
-
function
|
|
28919
|
-
let { record: t } = e, n = !0;
|
|
28920
|
-
t.tagName === "Private" && !t.tree.length && (n = !1);
|
|
28921
|
-
let
|
|
28961
|
+
function ki(e) {
|
|
28962
|
+
let { record: t } = e, n = !0, r = !!t.value?.trim(), i = t.attributes.some((e) => e.name === "type");
|
|
28963
|
+
t.tagName === "Private" && !t.tree.length && !r && !i && (n = !1);
|
|
28964
|
+
let a = t.attributes.filter((e) => e.name !== "uuid");
|
|
28922
28965
|
return {
|
|
28923
28966
|
shouldBeCloned: n,
|
|
28924
28967
|
transformedRecord: {
|
|
28925
28968
|
...t,
|
|
28926
|
-
attributes:
|
|
28969
|
+
attributes: a
|
|
28927
28970
|
}
|
|
28928
28971
|
};
|
|
28929
28972
|
}
|
|
28930
28973
|
//#endregion
|
|
28931
28974
|
//#region src/v2019C1/hooks/before-delete/orphaned-refs.ts
|
|
28932
|
-
async function
|
|
28975
|
+
async function Ai(e) {
|
|
28933
28976
|
let { record: t, query: n } = e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
28934
|
-
if (await
|
|
28977
|
+
if (await Ii({
|
|
28935
28978
|
record: t,
|
|
28936
28979
|
query: n,
|
|
28937
28980
|
ids: r,
|
|
@@ -28939,7 +28982,7 @@ async function ki(e) {
|
|
|
28939
28982
|
}), i.size === 0) return [];
|
|
28940
28983
|
let a = [], o = Object.keys(T);
|
|
28941
28984
|
for (let e of o) {
|
|
28942
|
-
let t = await
|
|
28985
|
+
let t = await ji({
|
|
28943
28986
|
refTagName: e,
|
|
28944
28987
|
subtreeIds: r,
|
|
28945
28988
|
subtreeUuids: i,
|
|
@@ -28949,11 +28992,11 @@ async function ki(e) {
|
|
|
28949
28992
|
}
|
|
28950
28993
|
return a;
|
|
28951
28994
|
}
|
|
28952
|
-
async function
|
|
28995
|
+
async function ji(e) {
|
|
28953
28996
|
let { refTagName: t, subtreeIds: n, subtreeUuids: r, query: i } = e, a = T[t], o = await i.getRecordsByTagName(t), s = [];
|
|
28954
28997
|
for (let e of o) {
|
|
28955
28998
|
if (n.has(e.id)) continue;
|
|
28956
|
-
let o = await
|
|
28999
|
+
let o = await Mi({
|
|
28957
29000
|
refTagName: t,
|
|
28958
29001
|
refRecord: e,
|
|
28959
29002
|
refPairs: a,
|
|
@@ -28964,15 +29007,15 @@ async function Ai(e) {
|
|
|
28964
29007
|
}
|
|
28965
29008
|
return s;
|
|
28966
29009
|
}
|
|
28967
|
-
async function
|
|
28968
|
-
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o =
|
|
29010
|
+
async function Mi(e) {
|
|
29011
|
+
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o = Ni({
|
|
28969
29012
|
refPairs: r,
|
|
28970
29013
|
refRecord: n,
|
|
28971
29014
|
subtreeUuids: i
|
|
28972
29015
|
});
|
|
28973
|
-
return o.size === 0 ? [] : Je.has(t) ? [
|
|
29016
|
+
return o.size === 0 ? [] : Je.has(t) ? [Pi(n, o)] : Fi(n, a);
|
|
28974
29017
|
}
|
|
28975
|
-
function
|
|
29018
|
+
function Ni(e) {
|
|
28976
29019
|
let { refPairs: t, refRecord: n, subtreeUuids: r } = e, i = /* @__PURE__ */ new Set();
|
|
28977
29020
|
for (let e of t) {
|
|
28978
29021
|
let t = n.attributes.find((t) => t.name === e.attribute.uuid)?.value;
|
|
@@ -28983,7 +29026,7 @@ function Mi(e) {
|
|
|
28983
29026
|
}
|
|
28984
29027
|
return i;
|
|
28985
29028
|
}
|
|
28986
|
-
function
|
|
29029
|
+
function Pi(e, t) {
|
|
28987
29030
|
let n = e.attributes.filter((e) => !t.has(e.name));
|
|
28988
29031
|
return {
|
|
28989
29032
|
status: "updated",
|
|
@@ -28994,7 +29037,7 @@ function Ni(e, t) {
|
|
|
28994
29037
|
})
|
|
28995
29038
|
};
|
|
28996
29039
|
}
|
|
28997
|
-
async function
|
|
29040
|
+
async function Fi(e, t) {
|
|
28998
29041
|
let n = [{
|
|
28999
29042
|
status: "deleted",
|
|
29000
29043
|
oldRecord: i(e),
|
|
@@ -29016,14 +29059,14 @@ async function Pi(e, t) {
|
|
|
29016
29059
|
}
|
|
29017
29060
|
return n;
|
|
29018
29061
|
}
|
|
29019
|
-
async function
|
|
29062
|
+
async function Ii(e) {
|
|
29020
29063
|
let { record: t, query: n, ids: r, uuids: i } = e;
|
|
29021
29064
|
r.add(t.id);
|
|
29022
29065
|
let a = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
29023
29066
|
a && i.add(a);
|
|
29024
29067
|
for (let e of t.children) {
|
|
29025
29068
|
let t = await n.getRecord(e);
|
|
29026
|
-
t && await
|
|
29069
|
+
t && await Ii({
|
|
29027
29070
|
record: t,
|
|
29028
29071
|
query: n,
|
|
29029
29072
|
ids: r,
|
|
@@ -29033,24 +29076,24 @@ async function Fi(e) {
|
|
|
29033
29076
|
}
|
|
29034
29077
|
//#endregion
|
|
29035
29078
|
//#region src/v2019C1/hooks/before-delete/before-delete.ts
|
|
29036
|
-
async function
|
|
29037
|
-
return
|
|
29079
|
+
async function Li(e) {
|
|
29080
|
+
return Ai(e);
|
|
29038
29081
|
}
|
|
29039
29082
|
//#endregion
|
|
29040
29083
|
//#region src/v2019C1/hooks/io/io-hooks.ts
|
|
29041
|
-
function
|
|
29084
|
+
function Ri() {
|
|
29042
29085
|
let e = /* @__PURE__ */ new Map(), t = [], n = [];
|
|
29043
29086
|
return {
|
|
29044
29087
|
beforeImportRecord: (r) => {
|
|
29045
29088
|
let { record: i, ancestry: a } = r, { tagName: o } = i, s = i.attributes.find((e) => e.name === "uuid")?.value;
|
|
29046
|
-
if (s &&
|
|
29089
|
+
if (s && Bi.has(o)) {
|
|
29047
29090
|
let t = ae({
|
|
29048
29091
|
record: i,
|
|
29049
29092
|
ancestry: a
|
|
29050
29093
|
});
|
|
29051
29094
|
t && e.set(t.path, s);
|
|
29052
29095
|
}
|
|
29053
|
-
if (!
|
|
29096
|
+
if (!zi.has(o)) return;
|
|
29054
29097
|
let c = T[o];
|
|
29055
29098
|
for (let e of c) {
|
|
29056
29099
|
let r = i.attributes.find((t) => t.name === e.attribute.path)?.value;
|
|
@@ -29111,13 +29154,13 @@ function Li() {
|
|
|
29111
29154
|
}
|
|
29112
29155
|
};
|
|
29113
29156
|
}
|
|
29114
|
-
var
|
|
29115
|
-
beforeClone:
|
|
29116
|
-
afterStandardizedRecord:
|
|
29117
|
-
afterCreated:
|
|
29118
|
-
afterDeepClone:
|
|
29119
|
-
afterUpdated:
|
|
29120
|
-
beforeDelete:
|
|
29157
|
+
var zi = new Set(Object.keys(T)), Bi = new Set(Object.values(T).flatMap((e) => e.flatMap((e) => e.target))), Vi = {
|
|
29158
|
+
beforeClone: ki,
|
|
29159
|
+
afterStandardizedRecord: wi,
|
|
29160
|
+
afterCreated: mi,
|
|
29161
|
+
afterDeepClone: Si,
|
|
29162
|
+
afterUpdated: Oi,
|
|
29163
|
+
beforeDelete: Li
|
|
29121
29164
|
};
|
|
29122
29165
|
//#endregion
|
|
29123
|
-
export { b as C, v as S, y as T, D as _,
|
|
29166
|
+
export { b as C, v as S, y as T, D as _, ht as a, ne as b, Ye as c, Ue as d, Be as f, qe as g, Ge as h, $r as i, We as l, Ke as m, Ri as n, Xe as o, Ve as p, ei as r, Je as s, Vi as t, He as u, E as v, _ as w, S as x, T as y };
|