@dialecte/scl 0.3.0 → 0.3.2
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-CtOTydon.js → hooks-BaLMAs9W.js} +106 -99
- package/dist/v2019C1/extensions/presentation/constants/title.d.ts +6 -0
- package/dist/v2019C1/extensions/presentation/constants/title.d.ts.map +1 -1
- package/dist/v2019C1/index.js +1 -1
- package/dist/v2019C1/test.js +1 -1
- package/package.json +5 -4
|
@@ -26595,9 +26595,10 @@ var Ut = { transaction: /* @__PURE__ */ s({
|
|
|
26595
26595
|
FunctionCategoryRef: { compact: ["functionCategory"] },
|
|
26596
26596
|
LNodeInputRef: { compact: ["sourceRef"] },
|
|
26597
26597
|
LNodeOutputRef: { compact: ["controlRef"] },
|
|
26598
|
-
|
|
26598
|
+
ApplicationSclRef: {
|
|
26599
26599
|
compact: "{fileType} v{version}.{revision}",
|
|
26600
|
-
full: "{fileUuid}/{fileType} v{version}.{revision}"
|
|
26600
|
+
full: "{fileUuid}/{fileType} v{version}.{revision}",
|
|
26601
|
+
attributesFrom: "SclFileReference"
|
|
26601
26602
|
},
|
|
26602
26603
|
LNodeSpecNaming: { compact: "{sIedName}/{sLdInst}/{sPrefix}{sLnClass}{sLnInst}" },
|
|
26603
26604
|
SubscriberLNode: {
|
|
@@ -26627,32 +26628,38 @@ async function Gt(e, t, n = {}) {
|
|
|
26627
26628
|
title: "",
|
|
26628
26629
|
labels: {}
|
|
26629
26630
|
} : "";
|
|
26630
|
-
let i = r.tagName, a = Kt({
|
|
26631
|
+
let i = r.tagName, a = n.mode ?? "compact", o = await e.any.getAttributes(r), s = Wt[i], c = Kt({
|
|
26631
26632
|
tag: i,
|
|
26632
|
-
|
|
26633
|
-
|
|
26633
|
+
spec: s,
|
|
26634
|
+
mode: a,
|
|
26635
|
+
attributes: o,
|
|
26636
|
+
specAttributes: s?.attributesFrom ? await qt(e, r, s.attributesFrom) : o,
|
|
26634
26637
|
value: r.value
|
|
26635
26638
|
});
|
|
26636
26639
|
return n.withLabels ? {
|
|
26637
|
-
title:
|
|
26638
|
-
labels: await
|
|
26639
|
-
} :
|
|
26640
|
+
title: c,
|
|
26641
|
+
labels: await Jt(e, r)
|
|
26642
|
+
} : c;
|
|
26640
26643
|
}
|
|
26641
26644
|
function Kt(e) {
|
|
26642
|
-
let { tag: t,
|
|
26643
|
-
if (
|
|
26644
|
-
let e =
|
|
26645
|
+
let { tag: t, spec: n, mode: r, attributes: i, specAttributes: a, value: o } = e;
|
|
26646
|
+
if (n) {
|
|
26647
|
+
let e = Zt(n, a, r);
|
|
26645
26648
|
if (e) return e;
|
|
26646
26649
|
}
|
|
26647
|
-
let
|
|
26648
|
-
if (
|
|
26649
|
-
let
|
|
26650
|
-
return
|
|
26650
|
+
let s = (o ?? "").trim();
|
|
26651
|
+
if (s) return s;
|
|
26652
|
+
let c = h[t]?.attributes?.identityFields, l = c?.find((e) => e === "name" || e === "id") ?? c?.[0];
|
|
26653
|
+
return l && i[l] ? i[l] : i.name || t;
|
|
26651
26654
|
}
|
|
26652
|
-
async function qt(e, t) {
|
|
26653
|
-
|
|
26655
|
+
async function qt(e, t, n) {
|
|
26656
|
+
let [r] = await e.any.getChildren(t, n);
|
|
26657
|
+
return r ? e.any.getAttributes(r) : {};
|
|
26654
26658
|
}
|
|
26655
26659
|
async function Jt(e, t) {
|
|
26660
|
+
return Xt(await Yt(e, t));
|
|
26661
|
+
}
|
|
26662
|
+
async function Yt(e, t) {
|
|
26656
26663
|
let n = [], r = await e.any.getChildren(t, "Labels");
|
|
26657
26664
|
for (let t of r) {
|
|
26658
26665
|
let r = await e.any.getChildren(t, "Label");
|
|
@@ -26667,23 +26674,23 @@ async function Jt(e, t) {
|
|
|
26667
26674
|
}
|
|
26668
26675
|
return n;
|
|
26669
26676
|
}
|
|
26670
|
-
function
|
|
26677
|
+
function Xt(e) {
|
|
26671
26678
|
let t = {};
|
|
26672
26679
|
for (let { lang: n, id: r, text: i } of e) (t[n] ??= {})[r] = i;
|
|
26673
26680
|
return t;
|
|
26674
26681
|
}
|
|
26675
|
-
function
|
|
26682
|
+
function Zt(e, t, n) {
|
|
26676
26683
|
let r = n === "full" && e.full !== void 0, i = r ? e.full : e.compact, a = r ? e.fullSeparator ?? e.separator ?? "" : e.separator ?? "";
|
|
26677
|
-
if (typeof i == "string") return
|
|
26684
|
+
if (typeof i == "string") return Qt(i, t);
|
|
26678
26685
|
let o = i.map((e) => t[e]).filter(Boolean);
|
|
26679
26686
|
return o.length > 0 ? o.join(a) : "";
|
|
26680
26687
|
}
|
|
26681
|
-
function
|
|
26688
|
+
function Qt(e, t) {
|
|
26682
26689
|
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("/");
|
|
26683
26690
|
}
|
|
26684
26691
|
//#endregion
|
|
26685
26692
|
//#region src/v2019C1/extensions/index.ts
|
|
26686
|
-
var
|
|
26693
|
+
var $t = {
|
|
26687
26694
|
cleanUp: R,
|
|
26688
26695
|
dataModel: xt,
|
|
26689
26696
|
extraction: Ut,
|
|
@@ -26694,7 +26701,7 @@ var Qt = {
|
|
|
26694
26701
|
};
|
|
26695
26702
|
//#endregion
|
|
26696
26703
|
//#region src/v2019C1/hooks/after-created/private-wrapper.ts
|
|
26697
|
-
async function
|
|
26704
|
+
async function en(e) {
|
|
26698
26705
|
let { childRecord: t, parentRecord: n, query: r } = e;
|
|
26699
26706
|
if (t.namespace.prefix === y.namespaces.default.prefix) return [];
|
|
26700
26707
|
let i = n.tagName === "Private", a = n.namespace.prefix === y.namespaces.default.prefix;
|
|
@@ -26703,26 +26710,26 @@ async function $t(e) {
|
|
|
26703
26710
|
...n,
|
|
26704
26711
|
children: n.children.filter((e) => e.id !== t.id)
|
|
26705
26712
|
};
|
|
26706
|
-
return i ?
|
|
26713
|
+
return i ? tn({
|
|
26707
26714
|
parentRecord: n,
|
|
26708
26715
|
childRecord: t,
|
|
26709
26716
|
query: r
|
|
26710
|
-
}) : o ?
|
|
26717
|
+
}) : o ? nn({
|
|
26711
26718
|
existingPrivateRef: o,
|
|
26712
26719
|
parentRecord: n,
|
|
26713
26720
|
updatedParentRecord: s,
|
|
26714
26721
|
childRecord: t,
|
|
26715
26722
|
query: r
|
|
26716
|
-
}) : (await r.findAncestors(n)).some((e) => e.tagName === "Private" && e.attributes.some((e) => e.name === "type" && e.value === t.namespace.prefix)) ? [] :
|
|
26723
|
+
}) : (await r.findAncestors(n)).some((e) => e.tagName === "Private" && e.attributes.some((e) => e.name === "type" && e.value === t.namespace.prefix)) ? [] : rn({
|
|
26717
26724
|
parentRecord: n,
|
|
26718
26725
|
updatedParentRecord: s,
|
|
26719
26726
|
childRecord: t
|
|
26720
26727
|
});
|
|
26721
26728
|
}
|
|
26722
|
-
async function
|
|
26729
|
+
async function tn(e) {
|
|
26723
26730
|
let { parentRecord: t, childRecord: n, query: r } = e, o = t;
|
|
26724
26731
|
if (n.parent?.id === o.id && n.parent?.tagName === "Private") return [];
|
|
26725
|
-
let s = await
|
|
26732
|
+
let s = await an({
|
|
26726
26733
|
privateId: o.id,
|
|
26727
26734
|
query: r
|
|
26728
26735
|
});
|
|
@@ -26730,7 +26737,7 @@ async function en(e) {
|
|
|
26730
26737
|
detail: "Latest private record not found",
|
|
26731
26738
|
key: "ELEMENT_NOT_FOUND"
|
|
26732
26739
|
});
|
|
26733
|
-
let { childRecord: c, privateRecord: l } =
|
|
26740
|
+
let { childRecord: c, privateRecord: l } = on({
|
|
26734
26741
|
privateRecord: s,
|
|
26735
26742
|
childRecord: n
|
|
26736
26743
|
});
|
|
@@ -26744,8 +26751,8 @@ async function en(e) {
|
|
|
26744
26751
|
newRecord: i(l)
|
|
26745
26752
|
}];
|
|
26746
26753
|
}
|
|
26747
|
-
async function
|
|
26748
|
-
let { existingPrivateRef: t, parentRecord: n, updatedParentRecord: r, childRecord: o, query: s } = e, c = await
|
|
26754
|
+
async function nn(e) {
|
|
26755
|
+
let { existingPrivateRef: t, parentRecord: n, updatedParentRecord: r, childRecord: o, query: s } = e, c = await an({
|
|
26749
26756
|
privateId: t.id,
|
|
26750
26757
|
query: s
|
|
26751
26758
|
});
|
|
@@ -26753,7 +26760,7 @@ async function tn(e) {
|
|
|
26753
26760
|
detail: "Latest private record not found",
|
|
26754
26761
|
key: "ELEMENT_NOT_FOUND"
|
|
26755
26762
|
}), !c.attributes.some((e) => e.name === "type" && e.value === o.namespace.prefix)) return [];
|
|
26756
|
-
let { childRecord: l, privateRecord: u } =
|
|
26763
|
+
let { childRecord: l, privateRecord: u } = on({
|
|
26757
26764
|
privateRecord: c,
|
|
26758
26765
|
childRecord: o
|
|
26759
26766
|
});
|
|
@@ -26775,7 +26782,7 @@ async function tn(e) {
|
|
|
26775
26782
|
}
|
|
26776
26783
|
];
|
|
26777
26784
|
}
|
|
26778
|
-
function
|
|
26785
|
+
function rn(e) {
|
|
26779
26786
|
let { parentRecord: t, updatedParentRecord: n, childRecord: r } = e, a = {
|
|
26780
26787
|
id: crypto.randomUUID(),
|
|
26781
26788
|
tagName: "Private",
|
|
@@ -26824,14 +26831,14 @@ function nn(e) {
|
|
|
26824
26831
|
}
|
|
26825
26832
|
];
|
|
26826
26833
|
}
|
|
26827
|
-
async function
|
|
26834
|
+
async function an(e) {
|
|
26828
26835
|
let { privateId: t, query: n } = e;
|
|
26829
26836
|
return await n.getRecord({
|
|
26830
26837
|
id: t,
|
|
26831
26838
|
tagName: "Private"
|
|
26832
26839
|
});
|
|
26833
26840
|
}
|
|
26834
|
-
function
|
|
26841
|
+
function on(e) {
|
|
26835
26842
|
let { privateRecord: t, childRecord: n } = e;
|
|
26836
26843
|
return {
|
|
26837
26844
|
childRecord: {
|
|
@@ -26891,22 +26898,22 @@ function $(e) {
|
|
|
26891
26898
|
}
|
|
26892
26899
|
//#endregion
|
|
26893
26900
|
//#region src/v2019C1/hooks/after-created/ref-paths.ts
|
|
26894
|
-
async function
|
|
26895
|
-
let { childRecord: t, query: n } = e, r = await
|
|
26901
|
+
async function sn(e) {
|
|
26902
|
+
let { childRecord: t, query: n } = e, r = await cn({
|
|
26896
26903
|
childRecord: t,
|
|
26897
26904
|
query: n
|
|
26898
|
-
}), i = await
|
|
26905
|
+
}), i = await dn({
|
|
26899
26906
|
childRecord: t,
|
|
26900
26907
|
query: n
|
|
26901
26908
|
});
|
|
26902
26909
|
return [...r, ...i];
|
|
26903
26910
|
}
|
|
26904
|
-
async function
|
|
26911
|
+
async function cn(e) {
|
|
26905
26912
|
let { childRecord: t, query: n } = e, r = Fe.get(t.tagName);
|
|
26906
26913
|
if (!r?.length) return [];
|
|
26907
26914
|
let i = [];
|
|
26908
26915
|
for (let e of r) {
|
|
26909
|
-
let r = await
|
|
26916
|
+
let r = await ln({
|
|
26910
26917
|
childRecord: t,
|
|
26911
26918
|
pair: e,
|
|
26912
26919
|
query: n
|
|
@@ -26915,10 +26922,10 @@ async function sn(e) {
|
|
|
26915
26922
|
}
|
|
26916
26923
|
return i;
|
|
26917
26924
|
}
|
|
26918
|
-
async function
|
|
26925
|
+
async function ln(e) {
|
|
26919
26926
|
let { childRecord: t, pair: n, query: r } = e, i = t.attributes.find((e) => e.name === n.uuidAttr)?.value;
|
|
26920
26927
|
if (!i) return null;
|
|
26921
|
-
let a = await
|
|
26928
|
+
let a = await un({
|
|
26922
26929
|
uuidValue: i,
|
|
26923
26930
|
targetTagNames: n.targetTagNames,
|
|
26924
26931
|
query: r
|
|
@@ -26948,7 +26955,7 @@ async function cn(e) {
|
|
|
26948
26955
|
}
|
|
26949
26956
|
};
|
|
26950
26957
|
}
|
|
26951
|
-
async function
|
|
26958
|
+
async function un(e) {
|
|
26952
26959
|
let { uuidValue: t, targetTagNames: r, query: i } = e;
|
|
26953
26960
|
for (let e of r) {
|
|
26954
26961
|
if (!n(e, y)) continue;
|
|
@@ -26960,7 +26967,7 @@ async function ln(e) {
|
|
|
26960
26967
|
}
|
|
26961
26968
|
return null;
|
|
26962
26969
|
}
|
|
26963
|
-
async function
|
|
26970
|
+
async function dn(e) {
|
|
26964
26971
|
let { childRecord: t, query: n } = e, r = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
26965
26972
|
if (!r) return [];
|
|
26966
26973
|
let i = $(t.tagName);
|
|
@@ -26982,12 +26989,12 @@ async function un(e) {
|
|
|
26982
26989
|
}
|
|
26983
26990
|
//#endregion
|
|
26984
26991
|
//#region src/v2019C1/hooks/after-created/after-created.ts
|
|
26985
|
-
async function
|
|
26986
|
-
let { childRecord: t, parentRecord: n, query: r } = e, i = await
|
|
26992
|
+
async function fn(e) {
|
|
26993
|
+
let { childRecord: t, parentRecord: n, query: r } = e, i = await en({
|
|
26987
26994
|
childRecord: t,
|
|
26988
26995
|
parentRecord: n,
|
|
26989
26996
|
query: r
|
|
26990
|
-
}), a = await
|
|
26997
|
+
}), a = await sn({
|
|
26991
26998
|
childRecord: t,
|
|
26992
26999
|
query: r
|
|
26993
27000
|
});
|
|
@@ -26995,12 +27002,12 @@ async function dn(e) {
|
|
|
26995
27002
|
}
|
|
26996
27003
|
//#endregion
|
|
26997
27004
|
//#region src/v2019C1/hooks/after-deep-clone/ref-paths.ts
|
|
26998
|
-
async function
|
|
26999
|
-
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await
|
|
27005
|
+
async function pn(e) {
|
|
27006
|
+
let { cumulativeCloneMappings: t, query: n } = e, { uuidMap: r, uuidToRef: i } = await mn(t, n);
|
|
27000
27007
|
if (r.size === 0) return [];
|
|
27001
27008
|
let a = [];
|
|
27002
27009
|
for (let { target: e } of t) {
|
|
27003
|
-
let t = await
|
|
27010
|
+
let t = await gn({
|
|
27004
27011
|
target: e,
|
|
27005
27012
|
uuidMap: r,
|
|
27006
27013
|
uuidToRef: i,
|
|
@@ -27010,9 +27017,9 @@ async function fn(e) {
|
|
|
27010
27017
|
}
|
|
27011
27018
|
return a;
|
|
27012
27019
|
}
|
|
27013
|
-
async function
|
|
27020
|
+
async function mn(e, t) {
|
|
27014
27021
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
27015
|
-
for (let { source: i, target: a } of e) await
|
|
27022
|
+
for (let { source: i, target: a } of e) await hn({
|
|
27016
27023
|
source: i,
|
|
27017
27024
|
target: a,
|
|
27018
27025
|
query: t,
|
|
@@ -27024,7 +27031,7 @@ async function pn(e, t) {
|
|
|
27024
27031
|
uuidToRef: r
|
|
27025
27032
|
};
|
|
27026
27033
|
}
|
|
27027
|
-
async function
|
|
27034
|
+
async function hn(e) {
|
|
27028
27035
|
let { source: t, target: n, query: r, uuidMap: i, uuidToRef: a } = e, o = await r.getRecord(n);
|
|
27029
27036
|
if (!o) return;
|
|
27030
27037
|
let s = t.attributes.find((e) => e.name === "uuid")?.value, c = o.attributes.find((e) => e.name === "uuid")?.value;
|
|
@@ -27033,14 +27040,14 @@ async function mn(e) {
|
|
|
27033
27040
|
id: o.id
|
|
27034
27041
|
}));
|
|
27035
27042
|
}
|
|
27036
|
-
async function
|
|
27043
|
+
async function gn(e) {
|
|
27037
27044
|
let { target: t, uuidMap: n, uuidToRef: r, query: a } = e, o = t.tagName;
|
|
27038
27045
|
if (!(o in A)) return null;
|
|
27039
27046
|
let s = await a.getRecord(t);
|
|
27040
27047
|
if (!s) return null;
|
|
27041
27048
|
let c = A[o], l = [...s.attributes], u = !1;
|
|
27042
27049
|
for (let e of c) {
|
|
27043
|
-
let t = await
|
|
27050
|
+
let t = await _n({
|
|
27044
27051
|
pair: e,
|
|
27045
27052
|
tagName: o,
|
|
27046
27053
|
refId: s.id,
|
|
@@ -27060,14 +27067,14 @@ async function hn(e) {
|
|
|
27060
27067
|
})
|
|
27061
27068
|
} : null;
|
|
27062
27069
|
}
|
|
27063
|
-
async function
|
|
27070
|
+
async function _n(e) {
|
|
27064
27071
|
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;
|
|
27065
27072
|
if (!c) return null;
|
|
27066
27073
|
let l = i.get(c);
|
|
27067
27074
|
if (!l) return null;
|
|
27068
|
-
let u = !1, d =
|
|
27075
|
+
let u = !1, d = vn(s, t.attribute.uuid, c, l);
|
|
27069
27076
|
d && (s = d, u = !0);
|
|
27070
|
-
let f = await
|
|
27077
|
+
let f = await yn({
|
|
27071
27078
|
attributes: s,
|
|
27072
27079
|
pathAttrName: t.attribute.path,
|
|
27073
27080
|
newUuid: l,
|
|
@@ -27078,13 +27085,13 @@ async function gn(e) {
|
|
|
27078
27085
|
});
|
|
27079
27086
|
return f && (s = f, u = !0), u ? s : null;
|
|
27080
27087
|
}
|
|
27081
|
-
function
|
|
27088
|
+
function vn(e, t, n, r) {
|
|
27082
27089
|
return r === n ? null : e.map((e) => e.name === t ? {
|
|
27083
27090
|
...e,
|
|
27084
27091
|
value: r
|
|
27085
27092
|
} : e);
|
|
27086
27093
|
}
|
|
27087
|
-
async function
|
|
27094
|
+
async function yn(e) {
|
|
27088
27095
|
let { attributes: t, pathAttrName: n, newUuid: r, uuidToRef: i, tagName: a, refId: o, query: s } = e, c = i.get(r);
|
|
27089
27096
|
if (!c) return null;
|
|
27090
27097
|
let l = await L.query.buildReferencePath(s, {
|
|
@@ -27104,12 +27111,12 @@ async function vn(e) {
|
|
|
27104
27111
|
}
|
|
27105
27112
|
//#endregion
|
|
27106
27113
|
//#region src/v2019C1/hooks/after-deep-clone/after-deep-clone.ts
|
|
27107
|
-
async function
|
|
27108
|
-
return
|
|
27114
|
+
async function bn(e) {
|
|
27115
|
+
return pn(e);
|
|
27109
27116
|
}
|
|
27110
27117
|
//#endregion
|
|
27111
27118
|
//#region src/v2019C1/hooks/after-standardized-record/uuid-attribute.ts
|
|
27112
|
-
function
|
|
27119
|
+
function xn(e) {
|
|
27113
27120
|
let { record: t } = e, { tagName: n, attributes: r } = t, i = y.definition[n];
|
|
27114
27121
|
if (!("uuid" in i.attributes.details) || r.find((e) => e.name === "uuid")?.value) return t;
|
|
27115
27122
|
let a = i.attributes.details.uuid?.namespace, o = r.filter((e) => e.name !== "uuid");
|
|
@@ -27124,12 +27131,12 @@ function bn(e) {
|
|
|
27124
27131
|
}
|
|
27125
27132
|
//#endregion
|
|
27126
27133
|
//#region src/v2019C1/hooks/after-standardized-record/after-standardized-record.ts
|
|
27127
|
-
function
|
|
27128
|
-
return
|
|
27134
|
+
function Sn(e) {
|
|
27135
|
+
return xn(e);
|
|
27129
27136
|
}
|
|
27130
27137
|
//#endregion
|
|
27131
27138
|
//#region src/v2019C1/hooks/after-updated/ref-paths.ts
|
|
27132
|
-
async function
|
|
27139
|
+
async function Cn(e) {
|
|
27133
27140
|
let { oldRecord: t, newRecord: n, query: r } = e, i = [], a = n.attributes.find((e) => e.name === "uuid")?.value;
|
|
27134
27141
|
if (a) {
|
|
27135
27142
|
let e = $(n.tagName), t = {
|
|
@@ -27146,8 +27153,8 @@ async function Sn(e) {
|
|
|
27146
27153
|
i.push(...e);
|
|
27147
27154
|
}
|
|
27148
27155
|
}
|
|
27149
|
-
if (
|
|
27150
|
-
let e = await
|
|
27156
|
+
if (wn(t, n)) {
|
|
27157
|
+
let e = await Tn({
|
|
27151
27158
|
newRecord: n,
|
|
27152
27159
|
query: r
|
|
27153
27160
|
});
|
|
@@ -27155,11 +27162,11 @@ async function Sn(e) {
|
|
|
27155
27162
|
}
|
|
27156
27163
|
return i;
|
|
27157
27164
|
}
|
|
27158
|
-
function
|
|
27165
|
+
function wn(e, t) {
|
|
27159
27166
|
for (let n of C) if (e.attributes.find((e) => e.name === n)?.value !== t.attributes.find((e) => e.name === n)?.value) return !0;
|
|
27160
27167
|
return !1;
|
|
27161
27168
|
}
|
|
27162
|
-
async function
|
|
27169
|
+
async function Tn(e) {
|
|
27163
27170
|
let { newRecord: t, query: n } = e, r = {
|
|
27164
27171
|
tagName: t.tagName,
|
|
27165
27172
|
id: t.id
|
|
@@ -27188,12 +27195,12 @@ async function wn(e) {
|
|
|
27188
27195
|
}
|
|
27189
27196
|
//#endregion
|
|
27190
27197
|
//#region src/v2019C1/hooks/after-updated/after-updated.ts
|
|
27191
|
-
async function
|
|
27192
|
-
return
|
|
27198
|
+
async function En(e) {
|
|
27199
|
+
return Cn(e);
|
|
27193
27200
|
}
|
|
27194
27201
|
//#endregion
|
|
27195
27202
|
//#region src/v2019C1/hooks/before-clone/before-clone.ts
|
|
27196
|
-
function
|
|
27203
|
+
function Dn(e) {
|
|
27197
27204
|
let { record: t } = e, n = !0;
|
|
27198
27205
|
t.tagName === "Private" && !t.tree.length && (n = !1);
|
|
27199
27206
|
let r = t.attributes.filter((e) => e.name !== "uuid");
|
|
@@ -27207,9 +27214,9 @@ function En(e) {
|
|
|
27207
27214
|
}
|
|
27208
27215
|
//#endregion
|
|
27209
27216
|
//#region src/v2019C1/hooks/before-delete/orphaned-refs.ts
|
|
27210
|
-
async function
|
|
27217
|
+
async function On(e) {
|
|
27211
27218
|
let { record: t, query: n } = e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
27212
|
-
if (await
|
|
27219
|
+
if (await Pn({
|
|
27213
27220
|
record: t,
|
|
27214
27221
|
query: n,
|
|
27215
27222
|
ids: r,
|
|
@@ -27217,7 +27224,7 @@ async function Dn(e) {
|
|
|
27217
27224
|
}), i.size === 0) return [];
|
|
27218
27225
|
let a = [], o = Object.keys(A);
|
|
27219
27226
|
for (let e of o) {
|
|
27220
|
-
let t = await
|
|
27227
|
+
let t = await kn({
|
|
27221
27228
|
refTagName: e,
|
|
27222
27229
|
subtreeIds: r,
|
|
27223
27230
|
subtreeUuids: i,
|
|
@@ -27227,11 +27234,11 @@ async function Dn(e) {
|
|
|
27227
27234
|
}
|
|
27228
27235
|
return a;
|
|
27229
27236
|
}
|
|
27230
|
-
async function
|
|
27237
|
+
async function kn(e) {
|
|
27231
27238
|
let { refTagName: t, subtreeIds: n, subtreeUuids: r, query: i } = e, a = A[t], o = await i.getRecordsByTagName(t), s = [];
|
|
27232
27239
|
for (let e of o) {
|
|
27233
27240
|
if (n.has(e.id)) continue;
|
|
27234
|
-
let o = await
|
|
27241
|
+
let o = await An({
|
|
27235
27242
|
refTagName: t,
|
|
27236
27243
|
refRecord: e,
|
|
27237
27244
|
refPairs: a,
|
|
@@ -27242,15 +27249,15 @@ async function On(e) {
|
|
|
27242
27249
|
}
|
|
27243
27250
|
return s;
|
|
27244
27251
|
}
|
|
27245
|
-
async function
|
|
27246
|
-
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o =
|
|
27252
|
+
async function An(e) {
|
|
27253
|
+
let { refTagName: t, refRecord: n, refPairs: r, subtreeUuids: i, query: a } = e, o = jn({
|
|
27247
27254
|
refPairs: r,
|
|
27248
27255
|
refRecord: n,
|
|
27249
27256
|
subtreeUuids: i
|
|
27250
27257
|
});
|
|
27251
|
-
return o.size === 0 ? [] : F.has(t) ? [
|
|
27258
|
+
return o.size === 0 ? [] : F.has(t) ? [Mn(n, o)] : Nn(n, a);
|
|
27252
27259
|
}
|
|
27253
|
-
function
|
|
27260
|
+
function jn(e) {
|
|
27254
27261
|
let { refPairs: t, refRecord: n, subtreeUuids: r } = e, i = /* @__PURE__ */ new Set();
|
|
27255
27262
|
for (let e of t) {
|
|
27256
27263
|
let t = n.attributes.find((t) => t.name === e.attribute.uuid)?.value;
|
|
@@ -27261,7 +27268,7 @@ function An(e) {
|
|
|
27261
27268
|
}
|
|
27262
27269
|
return i;
|
|
27263
27270
|
}
|
|
27264
|
-
function
|
|
27271
|
+
function Mn(e, t) {
|
|
27265
27272
|
let n = e.attributes.filter((e) => !t.has(e.name));
|
|
27266
27273
|
return {
|
|
27267
27274
|
status: "updated",
|
|
@@ -27272,7 +27279,7 @@ function jn(e, t) {
|
|
|
27272
27279
|
})
|
|
27273
27280
|
};
|
|
27274
27281
|
}
|
|
27275
|
-
async function
|
|
27282
|
+
async function Nn(e, t) {
|
|
27276
27283
|
let n = [{
|
|
27277
27284
|
status: "deleted",
|
|
27278
27285
|
oldRecord: i(e),
|
|
@@ -27294,14 +27301,14 @@ async function Mn(e, t) {
|
|
|
27294
27301
|
}
|
|
27295
27302
|
return n;
|
|
27296
27303
|
}
|
|
27297
|
-
async function
|
|
27304
|
+
async function Pn(e) {
|
|
27298
27305
|
let { record: t, query: n, ids: r, uuids: i } = e;
|
|
27299
27306
|
r.add(t.id);
|
|
27300
27307
|
let a = t.attributes.find((e) => e.name === "uuid")?.value;
|
|
27301
27308
|
a && i.add(a);
|
|
27302
27309
|
for (let e of t.children) {
|
|
27303
27310
|
let t = await n.getRecord(e);
|
|
27304
|
-
t && await
|
|
27311
|
+
t && await Pn({
|
|
27305
27312
|
record: t,
|
|
27306
27313
|
query: n,
|
|
27307
27314
|
ids: r,
|
|
@@ -27311,24 +27318,24 @@ async function Nn(e) {
|
|
|
27311
27318
|
}
|
|
27312
27319
|
//#endregion
|
|
27313
27320
|
//#region src/v2019C1/hooks/before-delete/before-delete.ts
|
|
27314
|
-
async function
|
|
27315
|
-
return
|
|
27321
|
+
async function Fn(e) {
|
|
27322
|
+
return On(e);
|
|
27316
27323
|
}
|
|
27317
27324
|
//#endregion
|
|
27318
27325
|
//#region src/v2019C1/hooks/io/io-hooks.ts
|
|
27319
|
-
function
|
|
27326
|
+
function In() {
|
|
27320
27327
|
let e = /* @__PURE__ */ new Map(), t = [], n = [];
|
|
27321
27328
|
return {
|
|
27322
27329
|
beforeImportRecord: (r) => {
|
|
27323
27330
|
let { record: i, ancestry: a } = r, { tagName: o } = i, s = i.attributes.find((e) => e.name === "uuid")?.value;
|
|
27324
|
-
if (s &&
|
|
27331
|
+
if (s && Rn.has(o)) {
|
|
27325
27332
|
let t = re({
|
|
27326
27333
|
record: i,
|
|
27327
27334
|
ancestry: a
|
|
27328
27335
|
});
|
|
27329
27336
|
t && e.set(t.path, s);
|
|
27330
27337
|
}
|
|
27331
|
-
if (!
|
|
27338
|
+
if (!Ln.has(o)) return;
|
|
27332
27339
|
let c = A[o];
|
|
27333
27340
|
for (let e of c) {
|
|
27334
27341
|
let r = i.attributes.find((t) => t.name === e.attribute.path)?.value;
|
|
@@ -27389,13 +27396,13 @@ function Fn() {
|
|
|
27389
27396
|
}
|
|
27390
27397
|
};
|
|
27391
27398
|
}
|
|
27392
|
-
var
|
|
27393
|
-
beforeClone:
|
|
27394
|
-
afterStandardizedRecord:
|
|
27395
|
-
afterCreated:
|
|
27396
|
-
afterDeepClone:
|
|
27397
|
-
afterUpdated:
|
|
27398
|
-
beforeDelete:
|
|
27399
|
+
var Ln = new Set(Object.keys(A)), Rn = new Set(Object.values(A).flatMap((e) => e.flatMap((e) => e.target))), zn = {
|
|
27400
|
+
beforeClone: Dn,
|
|
27401
|
+
afterStandardizedRecord: Sn,
|
|
27402
|
+
afterCreated: fn,
|
|
27403
|
+
afterDeepClone: bn,
|
|
27404
|
+
afterUpdated: En,
|
|
27405
|
+
beforeDelete: Fn
|
|
27399
27406
|
};
|
|
27400
27407
|
//#endregion
|
|
27401
|
-
export { v as C, g as S, k as _, Be as a, _ as b, Ie as c, N as d, P as f, A as g, j as h, $e as i, Fe as l, Re as m,
|
|
27408
|
+
export { v as C, g as S, k as _, Be as a, _ as b, Ie as c, N as d, P as f, A as g, j as h, $e as i, Fe as l, Re as m, In as n, F as o, Le as p, $t as r, ze as s, zn as t, M as u, C as v, y as x, S as y };
|
|
@@ -3,6 +3,12 @@ export type TitleSpec = {
|
|
|
3
3
|
full?: string | string[];
|
|
4
4
|
separator?: string;
|
|
5
5
|
fullSeparator?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Source the template/list attributes from a named child element instead
|
|
8
|
+
* of the element itself. Used by composite refs whose data lives in a
|
|
9
|
+
* child (e.g. `ApplicationSclRef > SclFileReference`).
|
|
10
|
+
*/
|
|
11
|
+
attributesFrom?: string;
|
|
6
12
|
};
|
|
7
13
|
export declare const TITLE_FIELDS_OVERRIDE: Partial<Record<string, TitleSpec>>;
|
|
8
14
|
//# sourceMappingURL=title.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/presentation/constants/title.ts"],"names":[],"mappings":"AA4BA,MAAM,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../../src/v2019C1/extensions/presentation/constants/title.ts"],"names":[],"mappings":"AA4BA,MAAM,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAwFpE,CAAA"}
|
package/dist/v2019C1/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "../hooks-
|
|
1
|
+
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "../hooks-BaLMAs9W.js";
|
|
2
2
|
import { Project as C } from "@dialecte/core";
|
|
3
3
|
//#region src/v2019C1/dialecte.ts
|
|
4
4
|
function w(e) {
|
package/dist/v2019C1/test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, r as t, t as n, x as r } from "../hooks-
|
|
1
|
+
import { n as e, r as t, t as n, x as r } from "../hooks-BaLMAs9W.js";
|
|
2
2
|
import { CUSTOM_RECORD_ID_ATTRIBUTE as i, CUSTOM_RECORD_ID_ATTRIBUTE_NAME as a, XMLNS_XSI_NAMESPACE as o } from "@dialecte/core/helpers";
|
|
3
3
|
import { XMLNS_DEV_NAMESPACE as s, createTestProject as c, createTestRecordFactory as l, createTestRunner as u, createXmlAssertions as d } from "@dialecte/core/test";
|
|
4
4
|
//#region src/v2019C1/test/hydrated-test.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialecte/scl",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Dialecte - SCL (Substation Configuration Language) sdk",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -53,12 +53,13 @@
|
|
|
53
53
|
"prepare": "husky"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@dialecte/core": "0.
|
|
56
|
+
"@dialecte/core": "0.4.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@dialecte/cli": "0.0.
|
|
59
|
+
"@dialecte/cli": "0.0.2",
|
|
60
60
|
"@tsconfig/node24": "^24.0.4",
|
|
61
61
|
"@types/node": "^24.12.4",
|
|
62
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
62
63
|
"@vitest/browser-playwright": "4.1.8",
|
|
63
64
|
"husky": "^9.1.7",
|
|
64
65
|
"jiti": "^2.4.2",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"oxlint-tsgolint": "^0.23.0",
|
|
69
70
|
"playwright": "^1.60.0",
|
|
70
71
|
"tsx": "^4.22.4",
|
|
71
|
-
"typescript": "
|
|
72
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
72
73
|
"vite": "8.0.16",
|
|
73
74
|
"vite-plugin-dts": "^5.0.2",
|
|
74
75
|
"vitepress": "^2.0.0-alpha.17",
|