@omicronenergy/oscd-scl-dialogs 0.0.13 → 0.0.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.14](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/compare/oscd-scl-dialogs-v0.0.13...oscd-scl-dialogs-v0.0.14) (2026-04-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * connectedap adding illegal attribute to Address ([92ad0d7](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/commit/92ad0d7319012ded4603cdaacbafa886ff90d4fb))
9
+
3
10
  ## [0.0.13](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/compare/oscd-scl-dialogs-v0.0.12...oscd-scl-dialogs-v0.0.13) (2026-03-30)
4
11
 
5
12
 
@@ -1,4 +1,5 @@
1
1
  import { html } from 'lit';
2
+ import { SclCheckbox } from '@openenergytools/scl-checkbox';
2
3
  import { appIdGenerator, getReference, identity, macAddressGenerator, } from '@openscd/scl-lib';
3
4
  import { compareNames, createElement, getTypes, getValue, } from '../foundation.js';
4
5
  import { contentAddress, updateAddress } from './address.js';
@@ -284,9 +285,11 @@ function updateAction(element) {
284
285
  const instType = wizard.querySelector('#instType').value === 'true';
285
286
  const addressContent = {};
286
287
  inputs.forEach(input => {
287
- const key = input.label;
288
- const value = getValue(input);
289
- addressContent[key] = value;
288
+ if (!(input instanceof SclCheckbox)) {
289
+ const key = input.label;
290
+ const value = getValue(input);
291
+ addressContent[key] = value;
292
+ }
290
293
  });
291
294
  return updateAddress(element, addressContent, instType);
292
295
  };
@@ -1 +1 @@
1
- {"version":3,"file":"connectedap.js","sourceRoot":"","sources":["../../wizards/connectedap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAU3B,OAAO,EACL,cAAc,EACd,YAAY,EACZ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ACX,MAAM,CAAC,aAAa,CAAC,WAAW,CAAiB,CAAC,KAAK,KAAK,MAAM,CAAC;QAEtE,MAAM,cAAc,GAAkC,EAAE,CAAC;QACzD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACrB,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC;YACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC9B,cAAc,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC9B,CAAC,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;QACL,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;SAC9B;QACD,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC","sourcesContent":["import { html } from 'lit';\n\nimport { EditV2 } from '@openscd/oscd-api';\n\nimport {\n SelectionList,\n SelectItem,\n} from '@openenergytools/filterable-lists/dist/SelectionList.js';\nimport { SclCheckbox } from '@openenergytools/scl-checkbox';\n\nimport {\n appIdGenerator,\n getReference,\n identity,\n macAddressGenerator,\n} from '@openscd/scl-lib';\n\nimport {\n compareNames,\n createElement,\n getTypes,\n getValue,\n Wizard,\n WizardActor,\n WizardInputElement,\n} from '../foundation.js';\n\nimport { contentAddress, updateAddress } from './address.js';\n\ninterface AccessPointDescription {\n element: Element;\n connected?: boolean;\n}\n\nfunction initSMVElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorSmv: () => string | null;\n appidGeneratorSmv: () => string | null;\n unconnectedSampledValueControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('SampledValueControl') ?? [])\n .filter(sampledValueControl => {\n const id = identity(sampledValueControl) as string;\n\n if (options.unconnectedSampledValueControl.has(id)) {\n options.unconnectedSampledValueControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(sampledValueControl => {\n const cbName = sampledValueControl.getAttribute('name');\n const ldInst =\n sampledValueControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const sMV = createElement(connectedAp.ownerDocument, 'SMV', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: sMV,\n reference: getReference(connectedAp, 'SMV'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: sMV,\n node: address,\n reference: getReference(sMV, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorSmv();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorSmv();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n });\n\n return actions;\n}\n\nfunction initGSeElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorGse: () => string | null;\n appidGeneratorGse: () => string | null;\n unconnectedGseControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('GSEControl') ?? [])\n .filter(gseControl => {\n const id = identity(gseControl) as string;\n\n if (options.unconnectedGseControl.has(id)) {\n options.unconnectedGseControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(gseControl => {\n const cbName = gseControl.getAttribute('name');\n const ldInst =\n gseControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const gSE = createElement(connectedAp.ownerDocument, 'GSE', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: gSE,\n reference: getReference(connectedAp, 'GSE'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: gSE,\n node: address,\n reference: getReference(gSE, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorGse();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorGse();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n\n const minTime = createElement(connectedAp.ownerDocument, 'MinTime', {\n unit: 's',\n multiplier: 'm',\n });\n minTime.textContent = '10';\n actions.push({\n parent: gSE,\n node: minTime,\n reference: getReference(gSE, 'MinTime'),\n });\n\n const maxTime = createElement(connectedAp.ownerDocument, 'MaxTime', {\n unit: 's',\n multiplier: 'm',\n });\n maxTime.textContent = '10000';\n actions.push({\n parent: gSE,\n node: maxTime,\n reference: getReference(gSE, 'MaxTime'),\n });\n });\n\n return actions;\n}\n\nfunction unconnectedGseControls(doc: XMLDocument): Set<string> {\n const allGseControl = Array.from(doc.querySelectorAll('GSEControl'));\n\n const unconnectedGseControl = allGseControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> GSE[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedGseControl);\n return mySet;\n}\n\nfunction unconnectedSampledValueControls(doc: XMLDocument): Set<string> {\n const allSmvControl = Array.from(doc.querySelectorAll('SampledValueControl'));\n\n const unconnectedSmvControl = allSmvControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> SMV[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedSmvControl);\n return mySet;\n}\n\nfunction createConnectedApAction(parent: Element): WizardActor {\n return (_: WizardInputElement[], wizard: Element): EditV2[] => {\n const doc = parent.ownerDocument;\n\n // generators ensure unique MAC-Address and APPID across the project\n const macGeneratorSmv = macAddressGenerator(doc, 'SMV');\n const appidGeneratorSmv = appIdGenerator(doc, 'SMV');\n const macGeneratorGse = macAddressGenerator(doc, 'GSE');\n const appidGeneratorGse = appIdGenerator(doc, 'GSE');\n\n // track GSE and SMV for multiselect access points connection\n const unconnectedGseControl = unconnectedGseControls(doc);\n const unconnectedSampledValueControl = unconnectedSampledValueControls(doc);\n\n const list = wizard.querySelector('#apList') as SelectionList;\n if (!list) {\n return [];\n }\n\n const actions = list.selectedElements.map(accP => {\n const id = `${identity(accP)}`;\n const [iedName, apName] = id.split('>');\n const connAPactions: EditV2[] = [];\n\n const connectedAp = createElement(parent.ownerDocument, 'ConnectedAP', {\n iedName,\n apName,\n });\n connAPactions.push({\n parent,\n node: connectedAp,\n reference: getReference(parent, 'ConnectedAP'),\n });\n connAPactions.push(\n ...initSMVElements(doc, connectedAp, {\n macGeneratorSmv,\n appidGeneratorSmv,\n unconnectedSampledValueControl,\n }),\n );\n connAPactions.push(\n ...initGSeElements(doc, connectedAp, {\n macGeneratorGse,\n appidGeneratorGse,\n unconnectedGseControl,\n }),\n );\n\n return connAPactions;\n });\n\n return actions;\n };\n}\n\n/** Sorts connected `AccessPoint`s to the bottom. */\nfunction compareAccessPointConnection(\n a: AccessPointDescription,\n b: AccessPointDescription,\n): number {\n if (a.connected !== b.connected) {\n return b.connected ? -1 : 1;\n }\n return 0;\n}\n\nfunction existConnectedAp(accessPoint: Element): boolean {\n const iedName = accessPoint.closest('IED')?.getAttribute('name');\n const apName = accessPoint.getAttribute('name');\n\n const connAp = accessPoint.ownerDocument.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"][apName=\"${apName}\"]`,\n );\n\n return !!connAp;\n}\n\n/** @returns single page [[`Wizard`]] for creating SCL element ConnectedAP. */\nexport function createConnectedApWizard(element: Element): Wizard {\n const doc = element.ownerDocument;\n\n const accessPoints = Array.from(doc.querySelectorAll(':root > IED'))\n .sort(compareNames)\n .flatMap(ied =>\n Array.from(ied.querySelectorAll(':root > IED > AccessPoint')),\n )\n .map(accesspoint => ({\n element: accesspoint,\n connected: existConnectedAp(accesspoint),\n }))\n .sort(compareAccessPointConnection);\n\n const items: SelectItem[] = accessPoints.map(appP => ({\n headline: `${identity(appP.element)}`,\n supportingText: appP.connected ? 'AccessPoint already connected!' : '',\n selected: !appP.connected,\n disabled: appP.connected,\n attachedElement: appP.element,\n }));\n\n return {\n title: 'Add ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: createConnectedApAction(element),\n },\n content: [\n html`<selection-list\n id=\"apList\"\n multi\n .items=${items}\n filterable\n ></selection-list>`,\n ],\n };\n}\n\nfunction updateAction(element: Element): WizardActor {\n return (inputs: WizardInputElement[], wizard: Element): EditV2[] => {\n const instType: boolean =\n (wizard.querySelector('#instType') as SclCheckbox).value === 'true';\n\n const addressContent: Record<string, string | null> = {};\n inputs.forEach(input => {\n const key = input.label;\n const value = getValue(input);\n addressContent[key] = value;\n });\n\n return updateAddress(element, addressContent, instType);\n };\n}\n\n/** @returns single page [[`Wizard`]] to edit SCL element ConnectedAP. */\nexport function editConnectedApWizard(element: Element): Wizard {\n return {\n title: 'Edit ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: updateAction(element),\n },\n content: [...contentAddress({ element, types: getTypes(element) })],\n };\n}\n"]}
1
+ {"version":3,"file":"connectedap.js","sourceRoot":"","sources":["../../wizards/connectedap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAQ3B,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,GAIT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAO7D,SAAS,eAAe,CACtB,GAAgB,EAChB,WAAoB,EACpB,OAIC;IAED,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,MAAM,GAAG,GAAG,GAAG,CAAC,aAAa,CAC3B,aAAa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GAAG,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;QACL,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;SAC9B;QACD,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC","sourcesContent":["import { html } from 'lit';\n\nimport { EditV2 } from '@openscd/oscd-api';\n\nimport {\n SelectionList,\n SelectItem,\n} from '@openenergytools/filterable-lists/dist/SelectionList.js';\nimport { SclCheckbox } from '@openenergytools/scl-checkbox';\n\nimport {\n appIdGenerator,\n getReference,\n identity,\n macAddressGenerator,\n} from '@openscd/scl-lib';\n\nimport {\n compareNames,\n createElement,\n getTypes,\n getValue,\n Wizard,\n WizardActor,\n WizardInputElement,\n} from '../foundation.js';\n\nimport { contentAddress, updateAddress } from './address.js';\n\ninterface AccessPointDescription {\n element: Element;\n connected?: boolean;\n}\n\nfunction initSMVElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorSmv: () => string | null;\n appidGeneratorSmv: () => string | null;\n unconnectedSampledValueControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('SampledValueControl') ?? [])\n .filter(sampledValueControl => {\n const id = identity(sampledValueControl) as string;\n\n if (options.unconnectedSampledValueControl.has(id)) {\n options.unconnectedSampledValueControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(sampledValueControl => {\n const cbName = sampledValueControl.getAttribute('name');\n const ldInst =\n sampledValueControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const sMV = createElement(connectedAp.ownerDocument, 'SMV', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: sMV,\n reference: getReference(connectedAp, 'SMV'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: sMV,\n node: address,\n reference: getReference(sMV, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorSmv();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorSmv();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n });\n\n return actions;\n}\n\nfunction initGSeElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorGse: () => string | null;\n appidGeneratorGse: () => string | null;\n unconnectedGseControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('GSEControl') ?? [])\n .filter(gseControl => {\n const id = identity(gseControl) as string;\n\n if (options.unconnectedGseControl.has(id)) {\n options.unconnectedGseControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(gseControl => {\n const cbName = gseControl.getAttribute('name');\n const ldInst =\n gseControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const gSE = createElement(connectedAp.ownerDocument, 'GSE', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: gSE,\n reference: getReference(connectedAp, 'GSE'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: gSE,\n node: address,\n reference: getReference(gSE, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorGse();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorGse();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n\n const minTime = createElement(connectedAp.ownerDocument, 'MinTime', {\n unit: 's',\n multiplier: 'm',\n });\n minTime.textContent = '10';\n actions.push({\n parent: gSE,\n node: minTime,\n reference: getReference(gSE, 'MinTime'),\n });\n\n const maxTime = createElement(connectedAp.ownerDocument, 'MaxTime', {\n unit: 's',\n multiplier: 'm',\n });\n maxTime.textContent = '10000';\n actions.push({\n parent: gSE,\n node: maxTime,\n reference: getReference(gSE, 'MaxTime'),\n });\n });\n\n return actions;\n}\n\nfunction unconnectedGseControls(doc: XMLDocument): Set<string> {\n const allGseControl = Array.from(doc.querySelectorAll('GSEControl'));\n\n const unconnectedGseControl = allGseControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> GSE[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedGseControl);\n return mySet;\n}\n\nfunction unconnectedSampledValueControls(doc: XMLDocument): Set<string> {\n const allSmvControl = Array.from(doc.querySelectorAll('SampledValueControl'));\n\n const unconnectedSmvControl = allSmvControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> SMV[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedSmvControl);\n return mySet;\n}\n\nfunction createConnectedApAction(parent: Element): WizardActor {\n return (_: WizardInputElement[], wizard: Element): EditV2[] => {\n const doc = parent.ownerDocument;\n\n // generators ensure unique MAC-Address and APPID across the project\n const macGeneratorSmv = macAddressGenerator(doc, 'SMV');\n const appidGeneratorSmv = appIdGenerator(doc, 'SMV');\n const macGeneratorGse = macAddressGenerator(doc, 'GSE');\n const appidGeneratorGse = appIdGenerator(doc, 'GSE');\n\n // track GSE and SMV for multiselect access points connection\n const unconnectedGseControl = unconnectedGseControls(doc);\n const unconnectedSampledValueControl = unconnectedSampledValueControls(doc);\n\n const list = wizard.querySelector('#apList') as SelectionList;\n if (!list) {\n return [];\n }\n\n const actions = list.selectedElements.map(accP => {\n const id = `${identity(accP)}`;\n const [iedName, apName] = id.split('>');\n const connAPactions: EditV2[] = [];\n\n const connectedAp = createElement(parent.ownerDocument, 'ConnectedAP', {\n iedName,\n apName,\n });\n connAPactions.push({\n parent,\n node: connectedAp,\n reference: getReference(parent, 'ConnectedAP'),\n });\n connAPactions.push(\n ...initSMVElements(doc, connectedAp, {\n macGeneratorSmv,\n appidGeneratorSmv,\n unconnectedSampledValueControl,\n }),\n );\n connAPactions.push(\n ...initGSeElements(doc, connectedAp, {\n macGeneratorGse,\n appidGeneratorGse,\n unconnectedGseControl,\n }),\n );\n\n return connAPactions;\n });\n\n return actions;\n };\n}\n\n/** Sorts connected `AccessPoint`s to the bottom. */\nfunction compareAccessPointConnection(\n a: AccessPointDescription,\n b: AccessPointDescription,\n): number {\n if (a.connected !== b.connected) {\n return b.connected ? -1 : 1;\n }\n return 0;\n}\n\nfunction existConnectedAp(accessPoint: Element): boolean {\n const iedName = accessPoint.closest('IED')?.getAttribute('name');\n const apName = accessPoint.getAttribute('name');\n\n const connAp = accessPoint.ownerDocument.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"][apName=\"${apName}\"]`,\n );\n\n return !!connAp;\n}\n\n/** @returns single page [[`Wizard`]] for creating SCL element ConnectedAP. */\nexport function createConnectedApWizard(element: Element): Wizard {\n const doc = element.ownerDocument;\n\n const accessPoints = Array.from(doc.querySelectorAll(':root > IED'))\n .sort(compareNames)\n .flatMap(ied =>\n Array.from(ied.querySelectorAll(':root > IED > AccessPoint')),\n )\n .map(accesspoint => ({\n element: accesspoint,\n connected: existConnectedAp(accesspoint),\n }))\n .sort(compareAccessPointConnection);\n\n const items: SelectItem[] = accessPoints.map(appP => ({\n headline: `${identity(appP.element)}`,\n supportingText: appP.connected ? 'AccessPoint already connected!' : '',\n selected: !appP.connected,\n disabled: appP.connected,\n attachedElement: appP.element,\n }));\n\n return {\n title: 'Add ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: createConnectedApAction(element),\n },\n content: [\n html`<selection-list\n id=\"apList\"\n multi\n .items=${items}\n filterable\n ></selection-list>`,\n ],\n };\n}\n\nfunction updateAction(element: Element): WizardActor {\n return (inputs: WizardInputElement[], wizard: Element): EditV2[] => {\n const instType: boolean =\n (wizard.querySelector('#instType') as SclCheckbox).value === 'true';\n\n const addressContent: Record<string, string | null> = {};\n inputs.forEach(input => {\n if (!(input instanceof SclCheckbox)) {\n const key = input.label;\n const value = getValue(input);\n addressContent[key] = value;\n }\n });\n\n return updateAddress(element, addressContent, instType);\n };\n}\n\n/** @returns single page [[`Wizard`]] to edit SCL element ConnectedAP. */\nexport function editConnectedApWizard(element: Element): Wizard {\n return {\n title: 'Edit ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: updateAction(element),\n },\n content: [...contentAddress({ element, types: getTypes(element) })],\n };\n}\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@omicronenergy/oscd-scl-dialogs",
3
3
  "description": "Provides a resuable dialog for adding and editing SCL elements in OpenSCD.",
4
4
  "displayName": "OpenSCD Edit Dialog",
5
- "version": "0.0.13",
5
+ "version": "0.0.14",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs.git"
@@ -117,7 +117,7 @@
117
117
  "typescript": "^5.9.3"
118
118
  },
119
119
  "overrides": {
120
- "playwright": "1.54.1"
120
+ "playwright": "1.59.1"
121
121
  },
122
122
  "customElements": "custom-elements.json",
123
123
  "prettier": {