@compas-oscd/open-scd 0.34.3 → 0.34.5

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.
Files changed (145) hide show
  1. package/dist/src/addons/History.d.ts +8 -1
  2. package/dist/src/addons/History.js +1 -0
  3. package/dist/src/addons/History.js.map +1 -1
  4. package/package.json +1 -1
  5. package/dist/WizardDivider.d.ts +0 -8
  6. package/dist/WizardDivider.js +0 -37
  7. package/dist/WizardDivider.js.map +0 -1
  8. package/dist/Wizarding.d.ts +0 -10
  9. package/dist/Wizarding.js +0 -38
  10. package/dist/Wizarding.js.map +0 -1
  11. package/dist/action-icon.d.ts +0 -25
  12. package/dist/action-icon.js +0 -220
  13. package/dist/action-icon.js.map +0 -1
  14. package/dist/action-pane.d.ts +0 -25
  15. package/dist/action-pane.js +0 -176
  16. package/dist/action-pane.js.map +0 -1
  17. package/dist/addons/Editor.d.ts +0 -25
  18. package/dist/addons/Editor.js +0 -106
  19. package/dist/addons/Editor.js.map +0 -1
  20. package/dist/addons/History.d.ts +0 -86
  21. package/dist/addons/History.js +0 -490
  22. package/dist/addons/History.js.map +0 -1
  23. package/dist/addons/Layout.d.ts +0 -96
  24. package/dist/addons/Layout.js +0 -619
  25. package/dist/addons/Layout.js.map +0 -1
  26. package/dist/addons/Settings.d.ts +0 -68
  27. package/dist/addons/Settings.js +0 -465
  28. package/dist/addons/Settings.js.map +0 -1
  29. package/dist/addons/Waiter.d.ts +0 -14
  30. package/dist/addons/Waiter.js +0 -45
  31. package/dist/addons/Waiter.js.map +0 -1
  32. package/dist/addons/Wizards.d.ts +0 -15
  33. package/dist/addons/Wizards.js +0 -48
  34. package/dist/addons/Wizards.js.map +0 -1
  35. package/dist/addons/editor/edit-action-to-v1-converter.d.ts +0 -3
  36. package/dist/addons/editor/edit-action-to-v1-converter.js +0 -96
  37. package/dist/addons/editor/edit-action-to-v1-converter.js.map +0 -1
  38. package/dist/addons/editor/edit-v1-to-v2-converter.d.ts +0 -2
  39. package/dist/addons/editor/edit-v1-to-v2-converter.js +0 -37
  40. package/dist/addons/editor/edit-v1-to-v2-converter.js.map +0 -1
  41. package/dist/addons/history/get-log-text.d.ts +0 -5
  42. package/dist/addons/history/get-log-text.js +0 -26
  43. package/dist/addons/history/get-log-text.js.map +0 -1
  44. package/dist/addons/menu-tabs/menu-tabs.d.ts +0 -22
  45. package/dist/addons/menu-tabs/menu-tabs.js +0 -74
  46. package/dist/addons/menu-tabs/menu-tabs.js.map +0 -1
  47. package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts +0 -28
  48. package/dist/addons/plugin-manager/custom-plugin-dialog.js +0 -177
  49. package/dist/addons/plugin-manager/custom-plugin-dialog.js.map +0 -1
  50. package/dist/addons/plugin-manager/plugin-manager.d.ts +0 -20
  51. package/dist/addons/plugin-manager/plugin-manager.js +0 -165
  52. package/dist/addons/plugin-manager/plugin-manager.js.map +0 -1
  53. package/dist/filtered-list.d.ts +0 -27
  54. package/dist/filtered-list.js +0 -168
  55. package/dist/filtered-list.js.map +0 -1
  56. package/dist/finder-list.d.ts +0 -37
  57. package/dist/finder-list.js +0 -207
  58. package/dist/finder-list.js.map +0 -1
  59. package/dist/foundation/compare.d.ts +0 -79
  60. package/dist/foundation/compare.js +0 -273
  61. package/dist/foundation/compare.js.map +0 -1
  62. package/dist/foundation/dai.d.ts +0 -30
  63. package/dist/foundation/dai.js +0 -127
  64. package/dist/foundation/dai.js.map +0 -1
  65. package/dist/foundation/generators.d.ts +0 -13
  66. package/dist/foundation/generators.js +0 -67
  67. package/dist/foundation/generators.js.map +0 -1
  68. package/dist/foundation/ied.d.ts +0 -22
  69. package/dist/foundation/ied.js +0 -84
  70. package/dist/foundation/ied.js.map +0 -1
  71. package/dist/foundation/nsd.d.ts +0 -4
  72. package/dist/foundation/nsd.js +0 -13
  73. package/dist/foundation/nsd.js.map +0 -1
  74. package/dist/foundation/nsdoc.d.ts +0 -14
  75. package/dist/foundation/nsdoc.js +0 -180
  76. package/dist/foundation/nsdoc.js.map +0 -1
  77. package/dist/foundation/scl.d.ts +0 -1
  78. package/dist/foundation/scl.js +0 -64
  79. package/dist/foundation/scl.js.map +0 -1
  80. package/dist/foundation.d.ts +0 -230
  81. package/dist/foundation.js +0 -1922
  82. package/dist/foundation.js.map +0 -1
  83. package/dist/icons/compare.d.ts +0 -3
  84. package/dist/icons/compare.js +0 -11
  85. package/dist/icons/compare.js.map +0 -1
  86. package/dist/icons/icons.d.ts +0 -41
  87. package/dist/icons/icons.js +0 -611
  88. package/dist/icons/icons.js.map +0 -1
  89. package/dist/icons/ied-icons.d.ts +0 -3
  90. package/dist/icons/ied-icons.js +0 -11
  91. package/dist/icons/ied-icons.js.map +0 -1
  92. package/dist/icons/lnode.d.ts +0 -16
  93. package/dist/icons/lnode.js +0 -50
  94. package/dist/icons/lnode.js.map +0 -1
  95. package/dist/open-scd.d.ts +0 -131
  96. package/dist/open-scd.js +0 -483
  97. package/dist/open-scd.js.map +0 -1
  98. package/dist/oscd-filter-button.d.ts +0 -27
  99. package/dist/oscd-filter-button.js +0 -89
  100. package/dist/oscd-filter-button.js.map +0 -1
  101. package/dist/plain-compare-list.d.ts +0 -36
  102. package/dist/plain-compare-list.js +0 -132
  103. package/dist/plain-compare-list.js.map +0 -1
  104. package/dist/plugin-tag.d.ts +0 -6
  105. package/dist/plugin-tag.js +0 -23
  106. package/dist/plugin-tag.js.map +0 -1
  107. package/dist/plugin.d.ts +0 -23
  108. package/dist/plugin.events.d.ts +0 -15
  109. package/dist/plugin.events.js +0 -12
  110. package/dist/plugin.events.js.map +0 -1
  111. package/dist/plugin.js +0 -2
  112. package/dist/plugin.js.map +0 -1
  113. package/dist/plugins.d.ts +0 -3
  114. package/dist/plugins.js +0 -256
  115. package/dist/plugins.js.map +0 -1
  116. package/dist/schemas.d.ts +0 -58
  117. package/dist/schemas.js +0 -9325
  118. package/dist/schemas.js.map +0 -1
  119. package/dist/themes.d.ts +0 -3
  120. package/dist/themes.js +0 -122
  121. package/dist/themes.js.map +0 -1
  122. package/dist/translations/de.d.ts +0 -2
  123. package/dist/translations/de.js +0 -954
  124. package/dist/translations/de.js.map +0 -1
  125. package/dist/translations/en.d.ts +0 -963
  126. package/dist/translations/en.js +0 -950
  127. package/dist/translations/en.js.map +0 -1
  128. package/dist/translations/loader.d.ts +0 -12
  129. package/dist/translations/loader.js +0 -10
  130. package/dist/translations/loader.js.map +0 -1
  131. package/dist/wizard-checkbox.d.ts +0 -37
  132. package/dist/wizard-checkbox.js +0 -152
  133. package/dist/wizard-checkbox.js.map +0 -1
  134. package/dist/wizard-dialog.d.ts +0 -45
  135. package/dist/wizard-dialog.js +0 -374
  136. package/dist/wizard-dialog.js.map +0 -1
  137. package/dist/wizard-select.d.ts +0 -31
  138. package/dist/wizard-select.js +0 -115
  139. package/dist/wizard-select.js.map +0 -1
  140. package/dist/wizard-textfield.d.ts +0 -50
  141. package/dist/wizard-textfield.js +0 -191
  142. package/dist/wizard-textfield.js.map +0 -1
  143. package/dist/wizards.d.ts +0 -23
  144. package/dist/wizards.js +0 -196
  145. package/dist/wizards.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"nsdoc.js","sourceRoot":"","sources":["../../src/foundation/nsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAU1E,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAEzG,IAAI,OAAO,GAAyB,SAAS,CAAC;AAC9C,IAAI,OAAO,GAAyB,SAAS,CAAC;AAC9C,IAAI,OAAO,GAAyB,SAAS,CAAC;AAC9C,IAAI,OAAO,GAAyB,SAAS,CAAC;AAE9C;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC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AI,CAAC,EAAE,WAAW,CAAC;AAC5E,CAAC","sourcesContent":["import { iec6185072, iec6185073, iec6185074, iec6185081 } from \"./nsd.js\";\n\nexport interface Nsdoc {\n nsdoc72?: XMLDocument;\n nsdoc73?: XMLDocument;\n nsdoc74?: XMLDocument;\n nsdoc81?: XMLDocument;\n getDataDescription: (element: Element, ancestors?: Element[]) => { label: string; }\n}\n\nconst [nsd72, nsd73, nsd74, nsd81] = await Promise.all([iec6185072, iec6185073, iec6185074, iec6185081]);\n\nlet nsdoc72: Document | undefined = undefined;\nlet nsdoc73: Document | undefined = undefined;\nlet nsdoc74: Document | undefined = undefined;\nlet nsdoc81: Document | undefined = undefined;\n\n/**\n * Initialize the full Nsdoc object.\n * @returns A fully initialized Nsdoc object for wizards/editors to use.\n */\nexport function initializeNsdoc(): Nsdoc {\n [nsdoc72, nsdoc73, nsdoc74, nsdoc81] = [\n localStorage.getItem('IEC 61850-7-2') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-7-2')!, 'application/xml') : undefined,\n localStorage.getItem('IEC 61850-7-3') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-7-3')!, 'application/xml') : undefined,\n localStorage.getItem('IEC 61850-7-4') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-7-4')!, 'application/xml') : undefined,\n localStorage.getItem('IEC 61850-8-1') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-8-1')!, 'application/xml') : undefined\n ]\n\n const iedElementTagNames = ['LN', 'LN0', 'DO', 'SDO', 'DOI', 'DA', 'BDA', 'DAI'] as const;\n type IEDElementTagNames = typeof iedElementTagNames[number];\n type GetDataDescription = (element: Element, ancestors?: Element[]) => { label: string; };\n\n const getDataDescriptions: Record<\n IEDElementTagNames,\n {\n getDataDescription: GetDataDescription;\n }\n > = {\n LN: {\n getDataDescription: getLNDataDescription\n },\n LN0: {\n getDataDescription: getLNDataDescription\n },\n DO: {\n getDataDescription: getDODataDescription\n },\n SDO: {\n getDataDescription: getSDODataDescription\n },\n DOI: {\n getDataDescription: getDODataDescription\n },\n DA: {\n getDataDescription: getDADataDescription\n },\n BDA: {\n getDataDescription: getBDADataDescription\n },\n DAI: {\n getDataDescription: getDADataDescription\n }\n };\n\n /**\n * Getting data descriptions for LN(0) elements out of the IEC 61850-7-4 .nsdoc file.\n * @param element - The element to use for searching the LN description.\n * @returns Documentation from the .nsdoc file for this LN(0) file, or the lnClass attribute in case no description can be found.\n */\n function getLNDataDescription(element: Element): { label: string; } {\n const lnClassAttribute = element.getAttribute('lnClass')!;\n const lnClass = nsd74.querySelector(`NS > LNClasses > LNClass[name=\"${lnClassAttribute}\"]`);\n const lnClassDescription = getNsdocDocumentation(nsdoc74!, lnClass?.getAttribute('titleID'));\n\n return {\n label: lnClassDescription ? lnClassDescription + ' (' + lnClassAttribute + ')' : lnClassAttribute\n };\n }\n\n /**\n * Getting data descriptions for DO(I) elements out of the IEC 61850-7-4 .nsdoc file.\n * @param element - The element to use for searching the DO description.\n * @returns Documentation from the .nsdoc file for this DO(I) file, or the name attribute in case no description can be found.\n */\n function getDODataDescription(element: Element): { label: string; } {\n const doName = element.getAttribute('name')!;\n const lnClass = nsd74.querySelector(`NS > LNClasses > LNClass[name=\"${element.parentElement?.getAttribute('lnClass')}\"]`);\n const base = lnClass?.getAttribute('base');\n const dObject = lnClass?.querySelector(`DataObject[name=\"${doName}\"]`) ?? getInheritedDataObject(base!, doName);\n\n return {\n label: getNsdocDocumentation(nsdoc74!, dObject?.getAttribute('descID')) ?? doName\n };\n }\n\n /**\n * Getting data descriptions for SDO elements out of the IEC 61850-7-3 .nsdoc file.\n * @param element - The element to use for searching the SDO description.\n * @returns Documentation from the .nsdoc file for this SDO element, or the name attribute in case no description can be found.\n */\n function getSDODataDescription(element: Element): { label: string; } {\n const sdoName = element.getAttribute('name')!;\n const subDataObject = nsd73.querySelector(`CDCs > CDC[name=\"${element.parentElement?.getAttribute('cdc')}\"] > SubDataObject[name=\"${sdoName}\"]`);\n\n return {\n label: getNsdocDocumentation(nsdoc73!, subDataObject?.getAttribute('descID')) ?? sdoName\n };\n }\n\n /**\n * Getting data descriptions for DA(I) elements out of the IEC 61850-7-3 and IEC 61850-8-1 .nsdoc file.\n * @param element - The element to use for searching the DA description.\n * @returns Documentation from the .nsdoc file for this DA(I) element, or the name attribute in case no description can be found.\n */\n function getDADataDescription(element: Element): { label: string; } {\n const daElementName = element.getAttribute('name')!;\n const cdcName = element.closest('DOType')!.getAttribute('cdc');\n const serviceDataAttr = nsd81.querySelector(`ServiceCDCs > ServiceCDC[cdc=\"${cdcName}\"] > ServiceDataAttribute[name=\"${daElementName}\"]`);\n\n if (serviceDataAttr) {\n const id = serviceDataAttr?.getAttribute('descID') ??\n nsd81.querySelector(`ServiceConstructedAttributes > ServiceConstructedAttribute[name=\"${daElementName}\"]`)?.getAttribute('titleID') ?? '';\n return {\n label: getNsdocDocumentation(nsdoc81!, id) ?? daElementName\n };\n } else {\n const dataAttr = nsd73.querySelector(`NS > CDCs > CDC[name=\"${cdcName}\"] > DataAttribute[name=\"${daElementName}\"]`);\n return {\n label: getNsdocDocumentation(nsdoc73!, dataAttr?.getAttribute('descID')) ?? daElementName\n };\n }\n }\n\n /**\n * Getting data descriptions for BDA elements out of the IEC 61850-7-3 and IEC 61850-8-1 .nsdoc file.\n * @param element - The element to use for searching the BDA description.\n * @param ancestors - In this function, we need an ancestor to get a 'CDC' attribute.\n * @returns Documentation from the .nsdoc file for this BDA element, or the name attribute in case no description can be found.\n */\n function getBDADataDescription(element: Element, ancestors?: Element[]): { label: string; } {\n const bdaElementName = element.getAttribute('name')!;\n const daParent = ancestors?.filter(x => x.tagName === 'DA')[0];\n const serviceDataAttr = nsd81.querySelector(`ServiceConstructedAttributes > ServiceConstructedAttribute[name=\"${daParent!.getAttribute('name')}\"]`);\n\n if (serviceDataAttr) {\n if (serviceDataAttr.querySelector(`SubDataAttribute[name=\"${ancestors![0].getAttribute('name')}\"]`)?.getAttribute('type') == 'Originator') {\n const subDataAttr = nsd72.querySelector(`ConstructedAttributes > ConstructedAttribute[name=\"Originator\"] > SubDataAttribute[name=\"${bdaElementName}\"]`);\n return {\n label: getNsdocDocumentation(nsdoc72!, subDataAttr?.getAttribute('descID')) ?? bdaElementName\n };\n }\n return {\n label: getNsdocDocumentation(nsdoc81!,\n serviceDataAttr.querySelector(`SubDataAttribute[name=\"${bdaElementName}\"]`)?.getAttribute('descID')) ?? bdaElementName\n };\n } else {\n const dataAttrParent = nsd73.querySelector(`NS > CDCs > CDC[name=\"${daParent!.closest('DOType')?.getAttribute('cdc')}\"] >\n DataAttribute[name=\"${daParent!.getAttribute('name')}\"]`);\n return {\n label: getNsdocDocumentation(nsdoc73!, getSubDataAttribute(dataAttrParent!, bdaElementName)?.getAttribute('descID')) ?? bdaElementName\n };\n }\n }\n\n /**\n * Get the SubDataAttribute from the IEC-61850-7-3.\n * @param parent - The parent element in which to search for a SubDataAttribute.\n * @param bdaElementName - The name of the element to search.\n * @returns A SubDataAttribute, or null.\n */\n function getSubDataAttribute(parent: Element | undefined, bdaElementName: string): Element | null {\n if (!parent) return null;\n const subDataAttr = nsd73.querySelector(`ConstructedAttributes > ConstructedAttribute[name=\"${parent?.getAttribute('type')}\"] > SubDataAttribute[name=\"${bdaElementName}\"]`);\n return subDataAttr ?? getSubDataAttribute(nsd73.querySelector(`ConstructedAttributes > ConstructedAttribute[name=\"${parent?.getAttribute('type')}\"] > SubDataAttribute`)!, bdaElementName);\n }\n\n /**\n * Get the potential inherited data object based on a LNClass base.\n * @param lnClassBase - The base of a LNClass element.\n * @param doName - The name of the DO(I) to search for.\n * @returns the DataObject in case found, otherwise null.\n */\n function getInheritedDataObject(lnClassBase: string, doName: string): Element | null {\n if (!lnClassBase) return null;\n const lnClass = nsd74.querySelector(`NS > LNClasses > AbstractLNClass[name=\"${lnClassBase}\"]`);\n const base = lnClass?.getAttribute('base');\n\n return lnClass?.querySelector(`DataObject[name=\"${doName}\"]`) ?? getInheritedDataObject(base!, doName);\n }\n\n return {\n nsdoc72: nsdoc72,\n nsdoc73: nsdoc73,\n nsdoc74: nsdoc74,\n nsdoc81: nsdoc81,\n getDataDescription: function getDataDescription(element: Element, ancestors?: Element[]): { label: string; } {\n return getDataDescriptions[element.tagName as keyof Record<IEDElementTagNames,\n {\n getDataDescription: GetDataDescription;\n }\n >].getDataDescription(element, ancestors);\n }\n\n }\n}\n\n/**\n * Get the documentation from a given nsdoc file.\n * @param nsdoc - The .nsdoc file to use for searching\n * @param id - The id of the doc to search for.\n * @returns - The documentation belonging to the id.\n */\nfunction getNsdocDocumentation(nsdoc: XMLDocument, id: string | null | undefined): string | null | undefined {\n return nsdoc?.querySelector(`NSDoc > Doc[id=\"${id ?? ''}\"]`)?.textContent;\n}\n"]}
@@ -1 +0,0 @@
1
- export declare function existFcdaReference(fcda: Element, ied: Element): boolean;
@@ -1,64 +0,0 @@
1
- import { crossProduct } from '../foundation.js';
2
- function getDataModelChildren(parent) {
3
- if (['LDevice', 'Server'].includes(parent.tagName))
4
- return Array.from(parent.children).filter(child => child.tagName === 'LDevice' ||
5
- child.tagName === 'LN0' ||
6
- child.tagName === 'LN');
7
- const id = parent.tagName === 'LN' || parent.tagName === 'LN0'
8
- ? parent.getAttribute('lnType')
9
- : parent.getAttribute('type');
10
- return Array.from(parent.ownerDocument.querySelectorAll(`LNodeType[id="${id}"] > DO, DOType[id="${id}"] > SDO, DOType[id="${id}"] > DA, DAType[id="${id}"] > BDA`));
11
- }
12
- export function existFcdaReference(fcda, ied) {
13
- const [ldInst, prefix, lnClass, lnInst, doName, daName, fc] = [
14
- 'ldInst',
15
- 'prefix',
16
- 'lnClass',
17
- 'lnInst',
18
- 'doName',
19
- 'daName',
20
- 'fc',
21
- ].map(attr => fcda.getAttribute(attr));
22
- const sinkLdInst = ied.querySelector(`LDevice[inst="${ldInst}"]`);
23
- if (!sinkLdInst)
24
- return false;
25
- const prefixSelctors = prefix
26
- ? [`[prefix="${prefix}"]`]
27
- : ['[prefix=""]', ':not([prefix])'];
28
- const lnInstSelectors = lnInst
29
- ? [`[inst="${lnInst}"]`]
30
- : ['[inst=""]', ':not([inst])'];
31
- const anyLnSelector = crossProduct(['LN0', 'LN'], prefixSelctors, [`[lnClass="${lnClass}"]`], lnInstSelectors)
32
- .map(strings => strings.join(''))
33
- .join(',');
34
- const sinkAnyLn = ied.querySelector(anyLnSelector);
35
- if (!sinkAnyLn)
36
- return false;
37
- const doNames = doName?.split('.');
38
- if (!doNames)
39
- return false;
40
- let parent = sinkAnyLn;
41
- for (const doNameAttr of doNames) {
42
- parent = getDataModelChildren(parent).find(child => child.getAttribute('name') === doNameAttr);
43
- if (!parent)
44
- return false;
45
- }
46
- const daNames = daName?.split('.');
47
- const someFcInSink = getDataModelChildren(parent).some(da => da.getAttribute('fc') === fc);
48
- if (!daNames && someFcInSink)
49
- return true;
50
- if (!daNames)
51
- return false;
52
- let sinkFc = '';
53
- for (const daNameAttr of daNames) {
54
- parent = getDataModelChildren(parent).find(child => child.getAttribute('name') === daNameAttr);
55
- if (parent?.getAttribute('fc'))
56
- sinkFc = parent.getAttribute('fc');
57
- if (!parent)
58
- return false;
59
- }
60
- if (sinkFc !== fc)
61
- return false;
62
- return true;
63
- }
64
- //# sourceMappingURL=scl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scl.js","sourceRoot":"","sources":["../../src/foundation/scl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,SAAS,oBAAoB,CAAC,MAAe;IAC3C,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;QAChD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CACvC,KAAK,CAAC,EAAE,CACN,KAAK,CAAC,OAAO,KAAK,SAAS;YAC3B,KAAK,CAAC,OAAO,KAAK,KAAK;YACvB,KAAK,CAAC,OAAO,KAAK,IAAI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E,YAAY,CAAC,IAAI,CAAC;YAAE,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAE,CAAC;QAEpE,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;KAC3B;IAED,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,KAAK,CAAC;IAEhC,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { crossProduct } from '../foundation.js';\n\nfunction getDataModelChildren(parent: Element): Element[] {\n if (['LDevice', 'Server'].includes(parent.tagName))\n return Array.from(parent.children).filter(\n child =>\n child.tagName === 'LDevice' ||\n child.tagName === 'LN0' ||\n child.tagName === 'LN'\n );\n\n const id =\n parent.tagName === 'LN' || parent.tagName === 'LN0'\n ? parent.getAttribute('lnType')\n : parent.getAttribute('type');\n\n return Array.from(\n parent.ownerDocument.querySelectorAll(\n `LNodeType[id=\"${id}\"] > DO, DOType[id=\"${id}\"] > SDO, DOType[id=\"${id}\"] > DA, DAType[id=\"${id}\"] > BDA`\n )\n );\n}\n\nexport function existFcdaReference(fcda: Element, ied: Element): boolean {\n const [ldInst, prefix, lnClass, lnInst, doName, daName, fc] = [\n 'ldInst',\n 'prefix',\n 'lnClass',\n 'lnInst',\n 'doName',\n 'daName',\n 'fc',\n ].map(attr => fcda.getAttribute(attr));\n\n const sinkLdInst = ied.querySelector(`LDevice[inst=\"${ldInst}\"]`);\n if (!sinkLdInst) return false;\n\n const prefixSelctors = prefix\n ? [`[prefix=\"${prefix}\"]`]\n : ['[prefix=\"\"]', ':not([prefix])'];\n const lnInstSelectors = lnInst\n ? [`[inst=\"${lnInst}\"]`]\n : ['[inst=\"\"]', ':not([inst])'];\n\n const anyLnSelector = crossProduct(\n ['LN0', 'LN'],\n prefixSelctors,\n [`[lnClass=\"${lnClass}\"]`],\n lnInstSelectors\n )\n .map(strings => strings.join(''))\n .join(',');\n\n const sinkAnyLn = ied.querySelector(anyLnSelector);\n if (!sinkAnyLn) return false;\n\n const doNames = doName?.split('.');\n if (!doNames) return false;\n\n let parent: Element | undefined = sinkAnyLn;\n for (const doNameAttr of doNames) {\n parent = getDataModelChildren(parent).find(\n child => child.getAttribute('name') === doNameAttr\n );\n if (!parent) return false;\n }\n\n const daNames = daName?.split('.');\n const someFcInSink = getDataModelChildren(parent).some(\n da => da.getAttribute('fc') === fc\n );\n if (!daNames && someFcInSink) return true;\n if (!daNames) return false;\n\n let sinkFc = '';\n for (const daNameAttr of daNames) {\n parent = getDataModelChildren(parent).find(\n child => child.getAttribute('name') === daNameAttr\n );\n\n if (parent?.getAttribute('fc')) sinkFc = parent.getAttribute('fc')!;\n\n if (!parent) return false;\n }\n\n if (sinkFc !== fc) return false;\n\n return true;\n}\n"]}
@@ -1,230 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit-element';
2
- import { Part } from 'lit-html';
3
- import { List } from '@material/mwc-list';
4
- import { Select } from '@material/mwc-select';
5
- import { TextField } from '@material/mwc-textfield';
6
- import AceEditor from 'ace-custom-element';
7
- import { WizardTextField } from './wizard-textfield.js';
8
- import { WizardSelect } from './wizard-select.js';
9
- import { EditorAction } from '@openscd/core/foundation/deprecated/editor.js';
10
- export declare const wizardInputSelector = "wizard-textfield, mwc-textfield, ace-editor, mwc-select, wizard-select, wizard-checkbox";
11
- export type WizardInputElement = WizardTextField | TextField | (AceEditor & {
12
- checkValidity: () => boolean;
13
- validityTransform: (newValue: string, nativeValidity: ValidityState) => ValidityState;
14
- validationMessage: string;
15
- validity: ValidityState;
16
- label: string;
17
- requestUpdate(name?: PropertyKey, oldValue?: unknown): Promise<unknown>;
18
- }) | Select | WizardSelect;
19
- export type WizardAction = EditorAction | WizardFactory;
20
- /** @returns [[`EditorAction`]]s to dispatch on [[`WizardDialog`]] commit. */
21
- export type WizardActor = (inputs: WizardInputElement[], wizard: Element, list?: List | null) => WizardAction[];
22
- export declare function isWizardFactory(maybeFactory: WizardAction | Wizard | null): maybeFactory is WizardFactory;
23
- /** @returns the validity of `input` depending on type. */
24
- export declare function checkValidity(input: WizardInputElement): boolean;
25
- /** reports the validity of `input` depending on type. */
26
- export declare function reportValidity(input: WizardInputElement): boolean;
27
- /** @returns the `value` or `maybeValue` of `input` depending on type. */
28
- export declare function getValue(input: WizardInputElement): string | null;
29
- /** @returns the `multiplier` of `input` if available. */
30
- export declare function getMultiplier(input: WizardInputElement): string | null;
31
- /** Inputs as `TextField`, `Select` or `Checkbox `used in`wizard-dialog` */
32
- export type WizardInput = WizardInputTextField | WizardInputSelect | WizardInputCheckbox;
33
- interface WizardInputBase {
34
- /** maps attribute key */
35
- label: string;
36
- /** maps attribute value */
37
- maybeValue: string | null;
38
- /** whether attribute is optional */
39
- nullable?: boolean;
40
- /** whether the input shall be disabled */
41
- disabled?: boolean;
42
- /** helper text */
43
- helper?: string;
44
- /** initial focused element in `wizard-dialog` (once per dialog) */
45
- dialogInitialFocus?: boolean;
46
- }
47
- interface WizardInputTextField extends WizardInputBase {
48
- kind: 'TextField';
49
- /** wether the input might be empty string */
50
- required?: boolean;
51
- /** pattern definition from schema */
52
- pattern?: string;
53
- /** minimal characters allowed */
54
- minLength?: number;
55
- /** maximal characters allowed */
56
- maxLength?: number;
57
- /** message text explaining invalid inputs */
58
- validationMessage?: string;
59
- /** suffix definition - overwrites unit multiplier definition */
60
- suffix?: string;
61
- /** SI unit for specific suffix definition */
62
- unit?: string;
63
- /** in comibination with unit defines specific suffix */
64
- multiplier?: string | null;
65
- /** array of multipliers allowed for the input */
66
- multipliers?: (string | null)[];
67
- /** used for specific input type e.g. number */
68
- type?: string;
69
- /** minimal valid number in combination with type number */
70
- min?: number;
71
- /** maximal valid number in combination with type number */
72
- max?: number;
73
- /** value displaxed when input is nulled */
74
- default?: string;
75
- }
76
- interface WizardInputSelect extends WizardInputBase {
77
- kind: 'Select';
78
- /** selectabled values */
79
- values: string[];
80
- /** value displayed with input is nulled */
81
- default?: string;
82
- /** message explaining invalid inputs */
83
- valadationMessage?: string;
84
- }
85
- interface WizardInputCheckbox extends WizardInputBase {
86
- kind: 'Checkbox';
87
- /** wether checkbox is checked with nulled input */
88
- default?: boolean;
89
- }
90
- /** @returns [[`WizardAction`]]s to dispatch on [[`WizardDialog`]] menu action. */
91
- export type WizardMenuActor = (wizard: Element) => void;
92
- /** User interactions rendered in the wizard-dialog menu */
93
- export interface MenuAction {
94
- label: string;
95
- icon?: string;
96
- action: WizardMenuActor;
97
- }
98
- /** Represents a page of a wizard dialog */
99
- export interface WizardPage {
100
- title: string;
101
- content?: (TemplateResult | WizardInput)[];
102
- primary?: {
103
- icon: string;
104
- label: string;
105
- action: WizardActor;
106
- auto?: boolean;
107
- };
108
- secondary?: {
109
- icon: string;
110
- label: string;
111
- action: WizardActor;
112
- };
113
- initial?: boolean;
114
- element?: Element;
115
- menuActions?: MenuAction[];
116
- }
117
- export type Wizard = WizardPage[];
118
- export type WizardFactory = () => Wizard;
119
- /** If `wizard === null`, close the current wizard, else queue `wizard`. */
120
- export interface WizardDetail {
121
- wizard: WizardFactory | null;
122
- subwizard?: boolean;
123
- }
124
- export type WizardEvent = CustomEvent<WizardDetail>;
125
- export declare function newWizardEvent(wizardOrFactory?: Wizard | WizardFactory, eventInitDict?: CustomEventInit<Partial<WizardDetail>>): WizardEvent;
126
- export declare function newSubWizardEvent(wizardOrFactory?: Wizard | WizardFactory): WizardEvent;
127
- /** @returns a reference to `element` with segments delimited by '/'. */
128
- export declare function referencePath(element: Element): string;
129
- export type SclEdition = '2003' | '2007B' | '2007B4';
130
- export declare function getSclSchemaVersion(doc: Document): SclEdition;
131
- /**
132
- * Extract the 'name' attribute from the given XML element.
133
- * @param element - The element to extract name from.
134
- * @returns the name, or undefined if there is no name.
135
- */
136
- export declare function getNameAttribute(element: Element): string | undefined;
137
- /**
138
- * Extract the 'ldName' attribute from the given XML element.
139
- * @param element - The element to extract ldName from.
140
- * @returns the ldName, or undefined if there is no ldName.
141
- */
142
- export declare function getLdNameAttribute(element: Element): string | undefined;
143
- /**
144
- * Extract the 'desc' attribute from the given XML element.
145
- * @param element - The element to extract description from.
146
- * @returns the name, or undefined if there is no description.
147
- */
148
- export declare function getDescriptionAttribute(element: Element): string | undefined;
149
- /**
150
- * Extract the 'pathName' attribute from the given XML element.
151
- * @param element - The element to extract path name from.
152
- * @returns the name, or undefined if there is no path name.
153
- */
154
- export declare function getPathNameAttribute(element: Element): string | undefined;
155
- /**
156
- * Extract the 'inst' attribute from the given XML element.
157
- * @param element - The element to extract instance from.
158
- * @returns the instance, or undefined if there is no instance.
159
- */
160
- export declare function getInstanceAttribute(element: Element): string | undefined;
161
- export declare function pathParts(identity: string): [string, string];
162
- type IdentityFunction = (e: Element) => string | number;
163
- type SelectorFunction = (tagName: SCLTag, identity: string) => string;
164
- declare const sCLTags: readonly ["SCL", "SubNetwork", "GOOSESecurity", "SMVSecurity", "ConnectivityNode", "SubFunction", "Function", "TapChanger", "SubEquipment", "GeneralEquipment", "PowerTransformer", "TransformerWinding", "ConductingEquipment", "Substation", "VoltageLevel", "Bay", "Process", "Line", "EqSubFunction", "EqFunction", "ConnectedAP", "PhysConn", "SDO", "DO", "DAI", "SDI", "DOI", "Inputs", "RptEnabled", "Server", "ServerAt", "SettingControl", "Communication", "Log", "LDevice", "DataSet", "AccessPoint", "IED", "NeutralPoint", "SampledValueControl", "GSEControl", "LogControl", "ReportControl", "GSE", "SMV", "BDA", "DA", "LNodeType", "DOType", "DAType", "EnumType", "Text", "Private", "Hitem", "AccessControl", "Header", "LNode", "Val", "Voltage", "Services", "Subject", "IssuerName", "MinTime", "MaxTime", "Association", "FCDA", "ClientLN", "IEDName", "ExtRef", "Protocol", "LN0", "LN", "FileHandling", "TimeSyncProt", "CommProt", "SGEdit", "ConfSG", "GetDirectory", "GetDataObjectDefinition", "DataObjectDirectory", "GetDataSetValue", "SetDataSetValue", "DataSetDirectory", "ReadWrite", "TimerActivatedControl", "GetCBValues", "GSEDir", "ConfLdName", "DynAssociation", "SettingGroups", "GSSE", "GOOSE", "ConfReportControl", "SMVsc", "DynDataSet", "ConfDataSet", "ConfLogControl", "ConfSigRef", "ReportSettings", "LogSettings", "GSESettings", "SMVSettings", "ConfLNs", "ClientServices", "SupSubscription", "ValueHandling", "RedProt", "McSecurity", "KDC", "Address", "P", "ProtNs", "EnumVal", "Terminal", "BitRate", "Authentication", "DataTypeTemplates", "History", "OptFields", "SmvOpts", "TrgOps", "SamplesPerSec", "SmpRate", "SecPerSamples"];
165
- export type SCLTag = (typeof sCLTags)[number];
166
- export declare const tags: Record<SCLTag, {
167
- identity: IdentityFunction;
168
- selector: SelectorFunction;
169
- parents: SCLTag[];
170
- children: SCLTag[];
171
- }>;
172
- export declare function getReference(parent: Element, tag: SCLTag): Element | null;
173
- export declare function find(root: XMLDocument | Element | DocumentFragment, tagName: string, identity: string | number): Element | null;
174
- /** @returns a string uniquely identifying `e` in its document, or NaN if `e`
175
- * is unidentifiable. */
176
- export declare function identity(e: Element | null): string | number;
177
- /** @returns whether `a` and `b` are considered identical by IEC-61850 */
178
- export declare function isSame(a: Element, b: Element): boolean;
179
- export declare function isEqual(a: Element, b: Element): boolean;
180
- /** A directive rendering its argument `rendered` only if `rendered !== {}`. */
181
- export declare const ifImplemented: (rendered: any) => (part: Part) => void;
182
- /** Constructor type for defining `LitElement` mixins. */
183
- export type LitElementConstructor = new (...args: any[]) => LitElement;
184
- /** The type returned by `MyMixin(...)` is `Mixin<typeof MyMixin>`. */
185
- export type Mixin<T extends (...args: any[]) => any> = InstanceType<ReturnType<T>>;
186
- export declare const patterns: {
187
- string: string;
188
- normalizedString: string;
189
- name: string;
190
- nmToken: string;
191
- names: string;
192
- nmTokens: string;
193
- decimal: string;
194
- unsigned: string;
195
- integer: string;
196
- alphanumericFirstUpperCase: string;
197
- alphanumericFirstLowerCase: string;
198
- lnClass: string;
199
- };
200
- /** Sorts selected `ListItem`s to the top and disabled ones to the bottom. */
201
- export declare function compareNames(a: Element | string, b: Element | string): number;
202
- /** @returns the cartesian product of `arrays` */
203
- export declare function crossProduct<T>(...arrays: T[][]): T[][];
204
- /** @returns the depth of `t` if it is an object or array, zero otherwise. */
205
- export declare function depth(t: Record<string, unknown>, mem?: WeakSet<object>): number;
206
- export declare function findFCDAs(extRef: Element): Element[];
207
- export declare function findControlBlocks(extRef: Element): Set<Element>;
208
- export declare function isPublic(element: Element): boolean;
209
- /** @returns the version of the SCL project */
210
- export declare function getVersion(element: Element): string;
211
- /**
212
- * @param parent - The LNodes' parent element to be scanned once for `lnInst`
213
- * values already in use. Be sure to create a new generator every time the
214
- * children of this element change.
215
- * @returns a function generating increasing unused `lnInst` values for
216
- * `lnClass` LNodes within `parent` on subsequent invocations
217
- */
218
- export declare function newLnInstGenerator(parent: Element): (lnClass: string) => string | undefined;
219
- /**
220
- * @param lnElements - The LN elements to be scanned for `inst`
221
- * values already in use.
222
- * @returns first available inst value for LN or undefined if no inst is available
223
- */
224
- export declare function minAvailableLogicalNodeInstance(lnElements: Element[]): string | undefined;
225
- declare global {
226
- interface ElementEventMap {
227
- ['wizard']: WizardEvent;
228
- }
229
- }
230
- export {};