@dialecte/plc 0.0.10 → 0.0.12
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.
|
@@ -6545,70 +6545,89 @@ var n = /* @__PURE__ */ "AccessVariable.AccessVars.Action.ActionBlock.ActionQual
|
|
|
6545
6545
|
prefix: ""
|
|
6546
6546
|
},
|
|
6547
6547
|
xsi: t
|
|
6548
|
-
}, f = "http://www.plcopen.org/xml/tc6_0201", p = d.default.uri, m = d.xsi.uri
|
|
6549
|
-
|
|
6548
|
+
}, f = "http://www.plcopen.org/xml/tc6_0201", p = d.default.uri, m = d.xsi.uri, h = "1.0", g = [
|
|
6549
|
+
"companyName",
|
|
6550
|
+
"companyURL",
|
|
6551
|
+
"productName",
|
|
6552
|
+
"productVersion",
|
|
6553
|
+
"productRelease"
|
|
6554
|
+
], _ = [
|
|
6555
|
+
"name",
|
|
6556
|
+
"version",
|
|
6557
|
+
"creationDateTime",
|
|
6558
|
+
"modificationDateTime",
|
|
6559
|
+
"organization",
|
|
6560
|
+
"author",
|
|
6561
|
+
"language"
|
|
6562
|
+
], v = "1970-01-01T00:00:00";
|
|
6563
|
+
function y(e, t, n) {
|
|
6564
|
+
if (e) for (let r of e.attributes) n.includes(r.name) && t.setAttribute(r.name, r.value);
|
|
6565
|
+
}
|
|
6566
|
+
function b(e, t, n) {
|
|
6567
|
+
e.getAttribute(t) || e.setAttribute(t, n);
|
|
6568
|
+
}
|
|
6569
|
+
function x(t) {
|
|
6550
6570
|
return e(t, { elements: ["project"] }).project?.namespace === f;
|
|
6551
6571
|
}
|
|
6552
|
-
function
|
|
6553
|
-
if (!
|
|
6572
|
+
function S(e) {
|
|
6573
|
+
if (!x(e)) return e;
|
|
6554
6574
|
let t = new DOMParser().parseFromString(e, "application/xml"), n = t.querySelector("parsererror");
|
|
6555
6575
|
if (n) throw Error(`TC6 v201 parse error: ${n.textContent}`);
|
|
6556
|
-
let r = document.implementation.createDocument(p, "", null), i = t.documentElement, a = r.createElementNS(p, "Project")
|
|
6557
|
-
|
|
6558
|
-
let
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
let c = i.querySelector("contentHeader");
|
|
6565
|
-
if (c) {
|
|
6566
|
-
let e = r.createElementNS(p, "ContentHeader");
|
|
6567
|
-
for (let t of c.attributes) e.setAttribute(t.name, t.value);
|
|
6568
|
-
a.appendChild(e);
|
|
6569
|
-
}
|
|
6570
|
-
let l = i.querySelector("types");
|
|
6571
|
-
if (l) {
|
|
6576
|
+
let r = document.implementation.createDocument(p, "", null), i = t.documentElement, a = r.createElementNS(p, "Project");
|
|
6577
|
+
a.setAttribute("schemaVersion", h), r.appendChild(a);
|
|
6578
|
+
let o = i.querySelector("fileHeader"), s = i.querySelector("contentHeader"), c = r.createElementNS(p, "FileHeader");
|
|
6579
|
+
y(o, c, g), b(c, "companyName", "Unknown"), b(c, "productName", "Unnamed"), b(c, "productVersion", "1"), a.appendChild(c);
|
|
6580
|
+
let l = r.createElementNS(p, "ContentHeader");
|
|
6581
|
+
y(s, l, _), b(l, "name", "Unnamed"), b(l, "creationDateTime", o?.getAttribute("creationDateTime") || s?.getAttribute("modificationDateTime") || v), a.appendChild(l);
|
|
6582
|
+
let u = i.querySelector("types");
|
|
6583
|
+
if (u) {
|
|
6572
6584
|
let e = r.createElementNS(p, "Types"), t = r.createElementNS(p, "GlobalNamespace");
|
|
6573
6585
|
e.appendChild(t);
|
|
6574
|
-
for (let e of
|
|
6586
|
+
for (let e of u.querySelectorAll("pou")) t.appendChild(C(r, e));
|
|
6575
6587
|
a.appendChild(e);
|
|
6576
6588
|
}
|
|
6577
|
-
let
|
|
6578
|
-
return a.appendChild(
|
|
6589
|
+
let d = r.createElementNS(p, "Instances");
|
|
6590
|
+
return a.appendChild(d), new XMLSerializer().serializeToString(r);
|
|
6579
6591
|
}
|
|
6580
|
-
function
|
|
6592
|
+
function C(e, t) {
|
|
6581
6593
|
let n = t.getAttribute("name") ?? "", r = (t.getAttribute("pouType") ?? "functionBlock") === "program" ? "Program" : "FunctionBlock", i = e.createElementNS(p, r);
|
|
6582
6594
|
i.setAttribute("name", n);
|
|
6583
6595
|
let a = t.querySelector("interface");
|
|
6584
|
-
a &&
|
|
6596
|
+
a && w(e, i, a);
|
|
6585
6597
|
let o = t.querySelector("body");
|
|
6586
|
-
return o &&
|
|
6598
|
+
return o && A(e, i, o), i;
|
|
6587
6599
|
}
|
|
6588
|
-
function
|
|
6589
|
-
let r =
|
|
6600
|
+
function w(e, t, n) {
|
|
6601
|
+
let r = D(e, n, "inputVars"), i = D(e, n, "outputVars"), a = D(e, n, "inOutVars");
|
|
6590
6602
|
if (r.length || i.length || a.length) {
|
|
6591
|
-
let n = e.createElementNS(p, "Parameters");
|
|
6592
|
-
|
|
6603
|
+
let n = e.createElementNS(p, "Parameters"), o = 0;
|
|
6604
|
+
o = T(e, n, "InoutVars", a, o), o = T(e, n, "InputVars", r, o), T(e, n, "OutputVars", i, o), t.appendChild(n);
|
|
6593
6605
|
}
|
|
6594
|
-
|
|
6606
|
+
E(e, t, "ExternalVars", D(e, n, "externalVars")), E(e, t, "Vars", D(e, n, "localVars")), E(e, t, "TempVars", D(e, n, "tempVars"));
|
|
6607
|
+
}
|
|
6608
|
+
function T(e, t, n, r, i) {
|
|
6609
|
+
if (!r.length) return i;
|
|
6610
|
+
let a = e.createElementNS(p, n), o = i;
|
|
6611
|
+
for (let e of r) e.setAttribute("orderWithinParamSet", String(o++)), a.appendChild(e);
|
|
6612
|
+
return t.appendChild(a), o;
|
|
6595
6613
|
}
|
|
6596
|
-
function
|
|
6614
|
+
function E(e, t, n, r) {
|
|
6597
6615
|
if (!r.length) return;
|
|
6598
6616
|
let i = e.createElementNS(p, n);
|
|
6617
|
+
n === "Vars" && i.setAttribute("accessSpecifier", "protected");
|
|
6599
6618
|
for (let e of r) i.appendChild(e);
|
|
6600
6619
|
t.appendChild(i);
|
|
6601
6620
|
}
|
|
6602
|
-
function
|
|
6621
|
+
function D(e, t, n) {
|
|
6603
6622
|
let r = [];
|
|
6604
|
-
for (let i of t.querySelectorAll(`:scope > ${n}`)) for (let t of i.querySelectorAll(":scope > variable")) r.push(
|
|
6623
|
+
for (let i of t.querySelectorAll(`:scope > ${n}`)) for (let t of i.querySelectorAll(":scope > variable")) r.push(O(e, t));
|
|
6605
6624
|
return r;
|
|
6606
6625
|
}
|
|
6607
|
-
function
|
|
6626
|
+
function O(e, t) {
|
|
6608
6627
|
let n = e.createElementNS(p, "Variable");
|
|
6609
6628
|
n.setAttribute("name", t.getAttribute("name") ?? "");
|
|
6610
6629
|
let r = e.createElementNS(p, "Type"), i = e.createElementNS(p, "TypeName");
|
|
6611
|
-
i.textContent =
|
|
6630
|
+
i.textContent = k(t.querySelector("type")), r.appendChild(i), n.appendChild(r);
|
|
6612
6631
|
let a = t.querySelector("initialValue > simpleValue");
|
|
6613
6632
|
if (a) {
|
|
6614
6633
|
let t = e.createElementNS(p, "InitialValue"), r = e.createElementNS(p, "SimpleValue");
|
|
@@ -6616,50 +6635,50 @@ function x(e, t) {
|
|
|
6616
6635
|
}
|
|
6617
6636
|
return n;
|
|
6618
6637
|
}
|
|
6619
|
-
function
|
|
6638
|
+
function k(e) {
|
|
6620
6639
|
if (!e) return "";
|
|
6621
6640
|
let t = e.querySelector("derived");
|
|
6622
6641
|
if (t) return t.getAttribute("name") ?? "";
|
|
6623
6642
|
let n = e.firstElementChild;
|
|
6624
6643
|
return n ? n.localName : "";
|
|
6625
6644
|
}
|
|
6626
|
-
function
|
|
6645
|
+
function A(e, t, n) {
|
|
6627
6646
|
let r = n.querySelector("FBD");
|
|
6628
6647
|
if (r) {
|
|
6629
|
-
t.appendChild(
|
|
6648
|
+
t.appendChild(M(e, r));
|
|
6630
6649
|
return;
|
|
6631
6650
|
}
|
|
6632
6651
|
let i = n.querySelector("LD");
|
|
6633
6652
|
if (i) {
|
|
6634
|
-
t.appendChild(
|
|
6653
|
+
t.appendChild(G(e, i));
|
|
6635
6654
|
return;
|
|
6636
6655
|
}
|
|
6637
6656
|
let a = n.querySelector("ST");
|
|
6638
6657
|
if (a) {
|
|
6639
|
-
t.appendChild(
|
|
6658
|
+
t.appendChild(j(e, "ST", a));
|
|
6640
6659
|
return;
|
|
6641
6660
|
}
|
|
6642
6661
|
let o = n.querySelector("IL");
|
|
6643
|
-
o && t.appendChild(
|
|
6662
|
+
o && t.appendChild(j(e, "IL", o));
|
|
6644
6663
|
}
|
|
6645
|
-
function
|
|
6664
|
+
function j(e, t, n) {
|
|
6646
6665
|
let r = e.createElementNS(p, "MainBody"), i = e.createElementNS(p, "BodyContent");
|
|
6647
6666
|
i.setAttributeNS(m, "xsi:type", t);
|
|
6648
6667
|
let a = e.createElementNS(p, t);
|
|
6649
|
-
return a.textContent =
|
|
6668
|
+
return a.textContent = Z(n), i.appendChild(a), r.appendChild(i), r;
|
|
6650
6669
|
}
|
|
6651
|
-
function
|
|
6652
|
-
let n =
|
|
6670
|
+
function M(e, t) {
|
|
6671
|
+
let n = N(t), r = e.createElementNS(p, "MainBody"), i = e.createElementNS(p, "BodyContent");
|
|
6653
6672
|
i.setAttributeNS(m, "xsi:type", "FBD");
|
|
6654
6673
|
let a = e.createElementNS(p, "Network");
|
|
6655
6674
|
a.setAttribute("evaluationOrder", "0");
|
|
6656
6675
|
for (let r of t.children) {
|
|
6657
|
-
let t =
|
|
6676
|
+
let t = F(e, r, n);
|
|
6658
6677
|
t && a.appendChild(t);
|
|
6659
6678
|
}
|
|
6660
6679
|
return i.appendChild(a), r.appendChild(i), r;
|
|
6661
6680
|
}
|
|
6662
|
-
function
|
|
6681
|
+
function N(e) {
|
|
6663
6682
|
let t = /* @__PURE__ */ new Map(), n = 0, r = (e, r) => {
|
|
6664
6683
|
let i = String(++n);
|
|
6665
6684
|
t.set(`${e}|${r}`, i), t.has(`${e}|`) || t.set(`${e}|`, i);
|
|
@@ -6678,30 +6697,30 @@ function E(e) {
|
|
|
6678
6697
|
}
|
|
6679
6698
|
return t;
|
|
6680
6699
|
}
|
|
6681
|
-
function
|
|
6700
|
+
function P(e, t) {
|
|
6682
6701
|
let n = e.getAttribute("refLocalId") ?? "", r = e.getAttribute("formalParameter") ?? "";
|
|
6683
6702
|
return t.get(`${n}|${r}`) ?? t.get(`${n}|`);
|
|
6684
6703
|
}
|
|
6685
|
-
function
|
|
6704
|
+
function F(e, t, n) {
|
|
6686
6705
|
switch (t.localName) {
|
|
6687
|
-
case "block": return
|
|
6688
|
-
case "inVariable": return
|
|
6689
|
-
case "outVariable": return
|
|
6690
|
-
case "comment": return
|
|
6691
|
-
case "connector": return
|
|
6692
|
-
case "continuation": return
|
|
6706
|
+
case "block": return I(e, t, n);
|
|
6707
|
+
case "inVariable": return z(e, t, n);
|
|
6708
|
+
case "outVariable": return B(e, t, n);
|
|
6709
|
+
case "comment": return V(e, t);
|
|
6710
|
+
case "connector": return H(e, t, n);
|
|
6711
|
+
case "continuation": return U(e, t, n);
|
|
6693
6712
|
default: return null;
|
|
6694
6713
|
}
|
|
6695
6714
|
}
|
|
6696
|
-
function
|
|
6715
|
+
function I(e, t, n) {
|
|
6697
6716
|
let r = e.createElementNS(p, "FbdObject");
|
|
6698
6717
|
r.setAttributeNS(m, "xsi:type", "Block"), r.setAttribute("typeName", t.getAttribute("typeName") ?? "");
|
|
6699
6718
|
let i = t.getAttribute("instanceName");
|
|
6700
|
-
i && r.setAttribute("instanceName", i),
|
|
6719
|
+
i && r.setAttribute("instanceName", i), Y(e, r, t);
|
|
6701
6720
|
let a = t.querySelectorAll("inputVariables > variable");
|
|
6702
6721
|
if (a.length) {
|
|
6703
6722
|
let t = e.createElementNS(p, "InputVariables");
|
|
6704
|
-
for (let r of a) t.appendChild(
|
|
6723
|
+
for (let r of a) t.appendChild(L(e, r, n));
|
|
6705
6724
|
r.appendChild(t);
|
|
6706
6725
|
}
|
|
6707
6726
|
let o = t.getAttribute("localId") ?? "", s = t.querySelectorAll("outputVariables > variable");
|
|
@@ -6709,72 +6728,68 @@ function k(e, t, n) {
|
|
|
6709
6728
|
let t = e.createElementNS(p, "OutputVariables");
|
|
6710
6729
|
for (let r of s) {
|
|
6711
6730
|
let i = r.getAttribute("formalParameter") ?? "";
|
|
6712
|
-
t.appendChild(
|
|
6731
|
+
t.appendChild(R(e, i, n.get(`${o}|${i}`)));
|
|
6713
6732
|
}
|
|
6714
6733
|
r.appendChild(t);
|
|
6715
6734
|
}
|
|
6716
6735
|
return r;
|
|
6717
6736
|
}
|
|
6718
|
-
function
|
|
6737
|
+
function L(e, t, n) {
|
|
6719
6738
|
let r = e.createElementNS(p, "InputVariable");
|
|
6720
6739
|
r.setAttribute("parameterName", t.getAttribute("formalParameter") ?? ""), t.getAttribute("negated") === "true" && r.setAttribute("negated", "true");
|
|
6721
6740
|
let i = t.getAttribute("edge");
|
|
6722
|
-
return i && i !== "none" && r.setAttribute("edge", i), r.appendChild(
|
|
6741
|
+
return i && i !== "none" && r.setAttribute("edge", i), r.appendChild(J(e, t.querySelector("connectionPointIn"), n)), r;
|
|
6723
6742
|
}
|
|
6724
|
-
function
|
|
6743
|
+
function R(e, t, n) {
|
|
6725
6744
|
let r = e.createElementNS(p, "OutputVariable");
|
|
6726
6745
|
r.setAttribute("parameterName", t);
|
|
6727
6746
|
let i = e.createElementNS(p, "ConnectionPointOut");
|
|
6728
6747
|
return n && i.setAttribute("connectionPointOutId", n), r.appendChild(i), r;
|
|
6729
6748
|
}
|
|
6730
|
-
function
|
|
6749
|
+
function z(e, t, n) {
|
|
6731
6750
|
let r = e.createElementNS(p, "FbdObject");
|
|
6732
|
-
r.setAttributeNS(m, "xsi:type", "DataSource"), r.setAttribute("identifier",
|
|
6733
|
-
let i = t.getAttribute("localId") ?? "", a = e.createElementNS(p, "
|
|
6734
|
-
return a.
|
|
6751
|
+
r.setAttributeNS(m, "xsi:type", "DataSource"), r.setAttribute("identifier", X(t)), Y(e, r, t);
|
|
6752
|
+
let i = t.getAttribute("localId") ?? "", a = e.createElementNS(p, "ConnectionPointOut"), o = n.get(`${i}|`);
|
|
6753
|
+
return o && a.setAttribute("connectionPointOutId", o), r.appendChild(a), r;
|
|
6735
6754
|
}
|
|
6736
|
-
function
|
|
6755
|
+
function B(e, t, n) {
|
|
6737
6756
|
let r = e.createElementNS(p, "FbdObject");
|
|
6738
|
-
r.setAttributeNS(m, "xsi:type", "DataSink"), r.setAttribute("identifier",
|
|
6739
|
-
let i = e.createElementNS(p, "InputVariable");
|
|
6740
|
-
i.setAttribute("parameterName", "value"), i.appendChild(V(e, t.querySelector("connectionPointIn"), n));
|
|
6741
|
-
let a = e.createElementNS(p, "InputVariables");
|
|
6742
|
-
return a.appendChild(i), r.appendChild(a), r;
|
|
6757
|
+
return r.setAttributeNS(m, "xsi:type", "DataSink"), r.setAttribute("identifier", X(t)), Y(e, r, t), r.appendChild(J(e, t.querySelector("connectionPointIn"), n)), r;
|
|
6743
6758
|
}
|
|
6744
|
-
function
|
|
6759
|
+
function V(e, t) {
|
|
6745
6760
|
let n = e.createElementNS(p, "CommonObject");
|
|
6746
|
-
n.setAttributeNS(m, "xsi:type", "Comment"),
|
|
6761
|
+
n.setAttributeNS(m, "xsi:type", "Comment"), Y(e, n, t);
|
|
6747
6762
|
let r = t.querySelector("content"), i = e.createElementNS(p, "Content");
|
|
6748
|
-
return i.setAttributeNS(m, "xsi:type", "SimpleText"), i.
|
|
6763
|
+
return i.setAttributeNS(m, "xsi:type", "SimpleText"), i.textContent = r ? Z(r) : "", n.appendChild(i), n;
|
|
6749
6764
|
}
|
|
6750
|
-
function
|
|
6765
|
+
function H(e, t, n) {
|
|
6751
6766
|
let r = e.createElementNS(p, "CommonObject");
|
|
6752
|
-
return r.setAttributeNS(m, "xsi:type", "Connector"), r.setAttribute("label", t.getAttribute("name") ?? ""),
|
|
6767
|
+
return r.setAttributeNS(m, "xsi:type", "Connector"), r.setAttribute("label", t.getAttribute("name") ?? ""), Y(e, r, t), r.appendChild(J(e, t.querySelector("connectionPointIn"), n)), r;
|
|
6753
6768
|
}
|
|
6754
|
-
function
|
|
6769
|
+
function U(e, t, n) {
|
|
6755
6770
|
let r = e.createElementNS(p, "CommonObject");
|
|
6756
|
-
r.setAttributeNS(m, "xsi:type", "Continuation"), r.setAttribute("label", t.getAttribute("name") ?? ""),
|
|
6771
|
+
r.setAttributeNS(m, "xsi:type", "Continuation"), r.setAttribute("label", t.getAttribute("name") ?? ""), Y(e, r, t);
|
|
6757
6772
|
let i = t.getAttribute("localId") ?? "", a = e.createElementNS(p, "ConnectionPointOut"), o = n.get(`${i}|`);
|
|
6758
6773
|
return o && a.setAttribute("connectionPointOutId", o), r.appendChild(a), r;
|
|
6759
6774
|
}
|
|
6760
|
-
var
|
|
6775
|
+
var W = {
|
|
6761
6776
|
leftPowerRail: "LeftPowerRail",
|
|
6762
6777
|
rightPowerRail: "RightPowerRail",
|
|
6763
6778
|
coil: "Coil",
|
|
6764
6779
|
contact: "Contact"
|
|
6765
6780
|
};
|
|
6766
|
-
function
|
|
6767
|
-
let n =
|
|
6781
|
+
function G(e, t) {
|
|
6782
|
+
let n = K(t), r = e.createElementNS(p, "MainBody"), i = e.createElementNS(p, "BodyContent");
|
|
6768
6783
|
i.setAttributeNS(m, "xsi:type", "LD");
|
|
6769
6784
|
let a = e.createElementNS(p, "Rung");
|
|
6770
6785
|
a.setAttribute("evaluationOrder", "0");
|
|
6771
6786
|
for (let r of t.children) {
|
|
6772
|
-
let t =
|
|
6787
|
+
let t = q(e, r, n);
|
|
6773
6788
|
t && a.appendChild(t);
|
|
6774
6789
|
}
|
|
6775
6790
|
return i.appendChild(a), r.appendChild(i), r;
|
|
6776
6791
|
}
|
|
6777
|
-
function
|
|
6792
|
+
function K(e) {
|
|
6778
6793
|
let t = /* @__PURE__ */ new Map(), n = 0;
|
|
6779
6794
|
for (let r of e.children) if (r.querySelector(":scope > connectionPointOut")) {
|
|
6780
6795
|
let e = r.getAttribute("localId") ?? "";
|
|
@@ -6782,50 +6797,50 @@ function z(e) {
|
|
|
6782
6797
|
}
|
|
6783
6798
|
return t;
|
|
6784
6799
|
}
|
|
6785
|
-
function
|
|
6786
|
-
let r =
|
|
6800
|
+
function q(e, t, n) {
|
|
6801
|
+
let r = W[t.localName];
|
|
6787
6802
|
if (!r) return null;
|
|
6788
6803
|
let i = e.createElementNS(p, "LdObject");
|
|
6789
6804
|
i.setAttributeNS(m, "xsi:type", r), t.getAttribute("negated") === "true" && i.setAttribute("negated", "true");
|
|
6790
6805
|
let a = t.querySelector("variable");
|
|
6791
|
-
a && i.setAttribute("operand",
|
|
6806
|
+
a && i.setAttribute("operand", Z(a)), Y(e, i, t);
|
|
6792
6807
|
let o = t.querySelector(":scope > connectionPointIn");
|
|
6793
|
-
if (o && i.appendChild(
|
|
6808
|
+
if (o && i.appendChild(J(e, o, n)), t.querySelector(":scope > connectionPointOut")) {
|
|
6794
6809
|
let r = t.getAttribute("localId") ?? "", a = e.createElementNS(p, "ConnectionPointOut"), o = n.get(`${r}|`);
|
|
6795
6810
|
o && a.setAttribute("connectionPointOutId", o), i.appendChild(a);
|
|
6796
6811
|
}
|
|
6797
6812
|
return i;
|
|
6798
6813
|
}
|
|
6799
|
-
function
|
|
6814
|
+
function J(e, t, n) {
|
|
6800
6815
|
let r = e.createElementNS(p, "ConnectionPointIn");
|
|
6801
6816
|
if (!t) return r;
|
|
6802
6817
|
for (let i of t.querySelectorAll("connection")) {
|
|
6803
|
-
let t =
|
|
6818
|
+
let t = P(i, n);
|
|
6804
6819
|
if (!t) continue;
|
|
6805
6820
|
let a = e.createElementNS(p, "Connection");
|
|
6806
6821
|
a.setAttribute("refConnectionPointOutId", t), r.appendChild(a);
|
|
6807
6822
|
}
|
|
6808
6823
|
return r;
|
|
6809
6824
|
}
|
|
6810
|
-
function
|
|
6825
|
+
function Y(e, t, n) {
|
|
6811
6826
|
let r = n.querySelector(":scope > position");
|
|
6812
6827
|
if (!r) return;
|
|
6813
6828
|
let i = e.createElementNS(p, "RelPosition");
|
|
6814
6829
|
i.setAttribute("x", r.getAttribute("x") ?? "0"), i.setAttribute("y", r.getAttribute("y") ?? "0"), t.appendChild(i);
|
|
6815
6830
|
}
|
|
6816
|
-
function
|
|
6831
|
+
function X(e) {
|
|
6817
6832
|
let t = e.querySelector("expression");
|
|
6818
|
-
return t ?
|
|
6833
|
+
return t ? Z(t) : "";
|
|
6819
6834
|
}
|
|
6820
|
-
function
|
|
6835
|
+
function Z(e) {
|
|
6821
6836
|
return e.textContent?.trim() ?? "";
|
|
6822
6837
|
}
|
|
6823
6838
|
//#endregion
|
|
6824
6839
|
//#region src/v1/config/dialecte.config.ts
|
|
6825
|
-
var
|
|
6840
|
+
var Q = {
|
|
6826
6841
|
supportedFileExtensions: [".xml"],
|
|
6827
|
-
hooks: { beforeImport:
|
|
6828
|
-
},
|
|
6842
|
+
hooks: { beforeImport: S }
|
|
6843
|
+
}, $ = { recordSchema: {
|
|
6829
6844
|
primaryKey: "id",
|
|
6830
6845
|
indexes: [
|
|
6831
6846
|
"tagName",
|
|
@@ -6834,7 +6849,7 @@ var G = {
|
|
|
6834
6849
|
],
|
|
6835
6850
|
compoundIndexes: [["id", "tagName"]],
|
|
6836
6851
|
arrayIndexes: ["children.id", "children.tagName"]
|
|
6837
|
-
} },
|
|
6852
|
+
} }, ee = {
|
|
6838
6853
|
singletonElements: c,
|
|
6839
6854
|
elements: n,
|
|
6840
6855
|
namespaces: d,
|
|
@@ -6843,10 +6858,10 @@ var G = {
|
|
|
6843
6858
|
parents: i,
|
|
6844
6859
|
descendants: a,
|
|
6845
6860
|
ancestors: o,
|
|
6846
|
-
database:
|
|
6847
|
-
io:
|
|
6861
|
+
database: $,
|
|
6862
|
+
io: Q,
|
|
6848
6863
|
definition: u,
|
|
6849
6864
|
rootElementName: s
|
|
6850
|
-
},
|
|
6865
|
+
}, te = {};
|
|
6851
6866
|
//#endregion
|
|
6852
|
-
export { d as a,
|
|
6867
|
+
export { d as a, Q as i, $ as n, ee as r, te as t };
|
|
@@ -18,8 +18,8 @@ import { IOHooks } from '@dialecte/core';
|
|
|
18
18
|
* - `block` → `FbdObject xsi:type="Block"` with `InputVariables >
|
|
19
19
|
* InputVariable[parameterName] > ConnectionPointIn > Connection` and
|
|
20
20
|
* `OutputVariables > OutputVariable[parameterName] > ConnectionPointOut`.
|
|
21
|
-
* - `inVariable` → `FbdObject xsi:type="DataSource"` (`
|
|
22
|
-
* - `outVariable` → `FbdObject xsi:type="DataSink"` (`
|
|
21
|
+
* - `inVariable` → `FbdObject xsi:type="DataSource"` (direct `ConnectionPointOut`).
|
|
22
|
+
* - `outVariable` → `FbdObject xsi:type="DataSink"` (direct `ConnectionPointIn`).
|
|
23
23
|
* - `comment` → `CommonObject xsi:type="Comment"`.
|
|
24
24
|
* - `connector`/`continuation` → `CommonObject xsi:type="Connector"|"Continuation"`.
|
|
25
25
|
* 5. Wiring uses `connectionPointOutId`/`refConnectionPointOutId`: every output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io-hooks.d.ts","sourceRoot":"","sources":["../../../../src/v1/hooks/io/io-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;
|
|
1
|
+
{"version":3,"file":"io-hooks.d.ts","sourceRoot":"","sources":["../../../../src/v1/hooks/io/io-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AA8CH;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgEpD;AAmfD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE7C,eAAO,MAAM,QAAQ,EAAE,OAEtB,CAAA"}
|
package/dist/v1/index.js
CHANGED
package/dist/v1/test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e, t } from "../config-
|
|
1
|
+
import { r as e, t } from "../config-Bwx-2aK9.js";
|
|
2
2
|
import { CUSTOM_RECORD_ID_ATTRIBUTE as n, CUSTOM_RECORD_ID_ATTRIBUTE_NAME as r, XMLNS_XSI_NAMESPACE as i } from "@dialecte/core/helpers";
|
|
3
3
|
import { XMLNS_DEV_NAMESPACE as a, createTestProject as o, createTestRecordFactory as s, createTestRunner as c, createXmlAssertions as l } from "@dialecte/core/test";
|
|
4
4
|
//#region src/v1/test/hydrated-test.ts
|