├── .editorconfig ├── .env.example ├── .eslintrc.cjs ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── build-and-deploy.yml │ ├── pr-preview.yml │ ├── release-please.yml │ ├── test-and-build.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .husky └── commit-msg ├── .prettierignore ├── .release-please-manifest.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── GLOSSARY.MD ├── LICENSE.md ├── README.md ├── ROADMAP.md ├── commitlint.config.js ├── docs ├── 0001-ADR-Theming.md ├── 0002-ADR-Atomic-Design.md ├── core-api │ ├── edit-api-flow.png │ └── edit-api.md ├── decisions │ ├── 0001-record-architecture-decisions.md │ ├── 0002-use-monorepo.md │ ├── 0003-extract-plugins.md │ ├── 0004-openscd-release-and-deployment-strategy.md │ └── README.md ├── how-to │ ├── commiting.md │ └── release.md ├── plug-ins.md └── theming-proposal.png ├── lerna.json ├── nx.json ├── package-lock.json ├── package.json ├── packages ├── addons │ ├── package.json │ └── project.json ├── core │ ├── .gitignore │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── demo │ │ ├── AddPlugins.js │ │ ├── embedded.html │ │ └── index.html │ ├── foundation.ts │ ├── foundation │ │ ├── cyrb64.ts │ │ ├── deprecated │ │ │ ├── edit-event.ts │ │ │ ├── editor.ts │ │ │ ├── history.ts │ │ │ ├── open-event.ts │ │ │ ├── settings.ts │ │ │ ├── validation.ts │ │ │ └── waiter.ts │ │ ├── edit-completed-event.ts │ │ ├── edit-event.ts │ │ ├── edit.ts │ │ ├── handle-edit.ts │ │ ├── open-event.ts │ │ ├── plugin.ts │ │ └── scl.ts │ ├── lit-localize.json │ ├── locales.ts │ ├── locales │ │ └── de.ts │ ├── localization │ │ └── de.xlf │ ├── package.json │ ├── project.json │ ├── rollup.config.js │ ├── screenshots │ │ ├── Chromium │ │ │ └── baseline │ │ │ │ ├── app-bar-de.png │ │ │ │ ├── app-bar-en.png │ │ │ │ ├── document-name-de.png │ │ │ │ ├── document-name-en.png │ │ │ │ ├── editor-plugins-de.png │ │ │ │ ├── editor-plugins-en.png │ │ │ │ ├── editor-plugins-selected-de.png │ │ │ │ ├── editor-plugins-selected-en.png │ │ │ │ ├── editor-plugins-with-doc-de.png │ │ │ │ ├── editor-plugins-with-doc-en.png │ │ │ │ ├── log-entries-de.png │ │ │ │ ├── log-entries-en.png │ │ │ │ ├── log-entries-redone-de.png │ │ │ │ ├── log-entries-redone-en.png │ │ │ │ ├── log-entries-undone-de.png │ │ │ │ ├── log-entries-undone-en.png │ │ │ │ ├── log-screen-de.png │ │ │ │ ├── log-screen-en.png │ │ │ │ ├── menu-drawer-de.png │ │ │ │ ├── menu-drawer-en.png │ │ │ │ ├── menu-plugins-de.png │ │ │ │ ├── menu-plugins-en.png │ │ │ │ ├── menu-plugins-triggered-de.png │ │ │ │ └── menu-plugins-triggered-en.png │ │ ├── Firefox │ │ │ └── baseline │ │ │ │ ├── app-bar-de.png │ │ │ │ ├── app-bar-en.png │ │ │ │ ├── document-name-de.png │ │ │ │ ├── document-name-en.png │ │ │ │ ├── editor-plugins-de.png │ │ │ │ ├── editor-plugins-en.png │ │ │ │ ├── editor-plugins-selected-de.png │ │ │ │ ├── editor-plugins-selected-en.png │ │ │ │ ├── editor-plugins-with-doc-de.png │ │ │ │ ├── editor-plugins-with-doc-en.png │ │ │ │ ├── log-entries-de.png │ │ │ │ ├── log-entries-en.png │ │ │ │ ├── log-entries-redone-de.png │ │ │ │ ├── log-entries-redone-en.png │ │ │ │ ├── log-entries-undone-de.png │ │ │ │ ├── log-entries-undone-en.png │ │ │ │ ├── log-screen-de.png │ │ │ │ ├── log-screen-en.png │ │ │ │ ├── menu-drawer-de.png │ │ │ │ ├── menu-drawer-en.png │ │ │ │ ├── menu-plugins-de.png │ │ │ │ ├── menu-plugins-en.png │ │ │ │ ├── menu-plugins-triggered-de.png │ │ │ │ └── menu-plugins-triggered-en.png │ │ └── Webkit │ │ │ └── baseline │ │ │ ├── app-bar-de.png │ │ │ ├── app-bar-en.png │ │ │ ├── document-name-de.png │ │ │ ├── document-name-en.png │ │ │ ├── editor-plugins-de.png │ │ │ ├── editor-plugins-en.png │ │ │ ├── editor-plugins-selected-de.png │ │ │ ├── editor-plugins-selected-en.png │ │ │ ├── editor-plugins-with-doc-de.png │ │ │ ├── editor-plugins-with-doc-en.png │ │ │ ├── log-entries-de.png │ │ │ ├── log-entries-en.png │ │ │ ├── log-entries-redone-de.png │ │ │ ├── log-entries-redone-en.png │ │ │ ├── log-entries-undone-de.png │ │ │ ├── log-entries-undone-en.png │ │ │ ├── log-screen-de.png │ │ │ ├── log-screen-en.png │ │ │ ├── menu-drawer-de.png │ │ │ ├── menu-drawer-en.png │ │ │ ├── menu-plugins-de.png │ │ │ ├── menu-plugins-en.png │ │ │ ├── menu-plugins-triggered-de.png │ │ │ └── menu-plugins-triggered-en.png │ ├── tsconfig.json │ ├── web-dev-server.config.js │ └── web-test-runner.config.js ├── distribution │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .nojekyll │ ├── CHANGELOG.md │ ├── README.md │ ├── browserconfig.xml │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── manifest.json │ ├── package.json │ ├── project.json │ ├── public │ │ ├── ace │ │ │ ├── ext-searchbox.js │ │ │ ├── mode-xml.js │ │ │ ├── theme-solarized_dark.js │ │ │ ├── theme-solarized_light.js │ │ │ └── worker-xml.js │ │ ├── apple-touch-icon.png │ │ ├── css │ │ │ └── normalize.css │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── google │ │ │ ├── fonts │ │ │ │ ├── roboto-mono-v13-latin-300.ttf │ │ │ │ ├── roboto-mono-v13-latin-300.woff │ │ │ │ ├── roboto-mono-v13-latin-300.woff2 │ │ │ │ ├── roboto-mono-v13.css │ │ │ │ ├── roboto-v27-latin-300.ttf │ │ │ │ ├── roboto-v27-latin-300.woff │ │ │ │ ├── roboto-v27-latin-300.woff2 │ │ │ │ ├── roboto-v27-latin-500.ttf │ │ │ │ ├── roboto-v27-latin-500.woff │ │ │ │ ├── roboto-v27-latin-500.woff2 │ │ │ │ ├── roboto-v27-latin-regular.ttf │ │ │ │ ├── roboto-v27-latin-regular.woff │ │ │ │ ├── roboto-v27-latin-regular.woff2 │ │ │ │ └── roboto-v27.css │ │ │ └── icons │ │ │ │ ├── material-icons-outlined.css │ │ │ │ ├── material-icons-outlined.woff2 │ │ │ │ ├── material-symbols-outlined.css │ │ │ │ └── material-symbols-outlined.woff2 │ │ ├── icon-192x192.png │ │ ├── icon-512x512.png │ │ ├── icon.svg │ │ ├── js │ │ │ ├── worker.js │ │ │ ├── xmlvalidate.js │ │ │ └── xmlvalidate.wasm │ │ ├── maskable_icon.png │ │ ├── monochrome_icon.png │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ ├── mstile-70x70.png │ │ └── xml │ │ │ ├── CC-EULA.pdf │ │ │ ├── Disclaimer.md │ │ │ ├── IEC_61850-7-2_2007B3.nsd │ │ │ ├── IEC_61850-7-3_2007B3.nsd │ │ │ ├── IEC_61850-7-420_2019A4.nsd │ │ │ ├── IEC_61850-7-4_2007B3.nsd │ │ │ ├── IEC_61850-8-1_2003A2.nsd │ │ │ └── templates.scd │ ├── snowpack.config.mjs │ ├── src │ │ └── polyfill │ │ │ └── scoped-custom-elements-polyfill.js │ ├── sw.js │ ├── tsconfig.json │ ├── web-test-runner.config.mjs │ └── workbox-config.cjs ├── openscd │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .nojekyll │ ├── CHANGELOG.md │ ├── README.md │ ├── favicon.ico │ ├── package.json │ ├── project.json │ ├── public │ │ ├── md │ │ │ ├── Add-DAType-from-templates.md │ │ │ ├── Add-DOType-from-templates.md │ │ │ ├── Add-EnumType-from-templates.md │ │ │ ├── Add-LNodeType-from-templates.md │ │ │ ├── All-template-editor-wizards.md │ │ │ ├── Bay.md │ │ │ ├── ClientLN.md │ │ │ ├── Communication-Basics.md │ │ │ ├── Conducting-Equipment.md │ │ │ ├── ConnectedAP.md │ │ │ ├── Create-GOOSE-Control-Blocks.md │ │ │ ├── Create-Report-Control-Blocks.md │ │ │ ├── Create-Sampled-Values-Control-Blocks.md │ │ │ ├── Create-Specification-IED-from-functions.md │ │ │ ├── Data-attribute-type-DAType.md │ │ │ ├── Data-attribute-type-child-BDA.md │ │ │ ├── Data-object-type-DOType.md │ │ │ ├── Data-object-type-child-DA.md │ │ │ ├── Data-object-type-child-SDO.md │ │ │ ├── DataTypeTemplates.md │ │ │ ├── Edit-GOOSE-Control-Blocks.md │ │ │ ├── Edit-Report-Control-Blocks.md │ │ │ ├── Edit-Sampled-Value-Control-Blocks.md │ │ │ ├── Enumeration-EnumType.md │ │ │ ├── Enumeration-EnumVal.md │ │ │ ├── Extensions.md │ │ │ ├── Function.md │ │ │ ├── Functional-Naming-Basics.md │ │ │ ├── Generic-Substation-Event-Basics.md │ │ │ ├── Global-SCL-manipulation.md │ │ │ ├── Guess-substation-structure.md │ │ │ ├── Home.md │ │ │ ├── IED.md │ │ │ ├── Import-IEDs.md │ │ │ ├── Install-OpenSCD.md │ │ │ ├── Interface.md │ │ │ ├── Logical-Node-Reference.md │ │ │ ├── Logical-node-type-LNodeType.md │ │ │ ├── Logical-node-type-child-DO.md │ │ │ ├── Merge-functionality.md │ │ │ ├── Power-Transformer.md │ │ │ ├── Project-workflow.md │ │ │ ├── Report-Basics.md │ │ │ ├── Sampled-Values-Basics.md │ │ │ ├── Save-project.md │ │ │ ├── Start-from-scratch.md │ │ │ ├── Start-from-template.md │ │ │ ├── Subnetwork.md │ │ │ ├── Subscribe-complete-GOOSE.md │ │ │ ├── Subscribe-complete-SMV.md │ │ │ ├── Subscriber-basics.md │ │ │ ├── Substation-Section-Basics.md │ │ │ ├── Substation.md │ │ │ ├── Update-subscriber-info.md │ │ │ ├── Validate-schema.md │ │ │ ├── Validate-template.md │ │ │ ├── Validators.md │ │ │ ├── Voltage-Level.md │ │ │ ├── XML-code-editor.md │ │ │ └── _Sidebar.md │ │ └── xml │ │ │ ├── CC-EULA.pdf │ │ │ ├── Disclaimer.md │ │ │ ├── IEC_61850-7-2_2007B3.nsd │ │ │ ├── IEC_61850-7-3_2007B3.nsd │ │ │ ├── IEC_61850-7-420_2019A4.nsd │ │ │ ├── IEC_61850-7-4_2007B3.nsd │ │ │ ├── IEC_61850-8-1_2003A2.nsd │ │ │ └── templates.scd │ ├── src │ │ ├── WizardDivider.ts │ │ ├── Wizarding.ts │ │ ├── action-icon.ts │ │ ├── action-pane.ts │ │ ├── addons │ │ │ ├── Editor.ts │ │ │ ├── History.ts │ │ │ ├── Layout.ts │ │ │ ├── Settings.ts │ │ │ ├── Waiter.ts │ │ │ ├── Wizards.ts │ │ │ ├── editor │ │ │ │ ├── edit-action-to-v1-converter.ts │ │ │ │ └── edit-v1-to-v2-converter.ts │ │ │ ├── menu-tabs │ │ │ │ └── menu-tabs.ts │ │ │ └── plugin-manager │ │ │ │ ├── custom-plugin-dialog.ts │ │ │ │ └── plugin-manager.ts │ │ ├── filtered-list.ts │ │ ├── finder-list.ts │ │ ├── foundation.ts │ │ ├── foundation │ │ │ ├── compare.ts │ │ │ ├── dai.ts │ │ │ ├── generators.ts │ │ │ ├── ied.ts │ │ │ ├── nsd.ts │ │ │ ├── nsdoc.ts │ │ │ └── scl.ts │ │ ├── icons │ │ │ ├── compare.ts │ │ │ ├── icons.ts │ │ │ ├── ied-icons.ts │ │ │ └── lnode.ts │ │ ├── open-scd.ts │ │ ├── oscd-filter-button.ts │ │ ├── plain-compare-list.ts │ │ ├── plugin-tag.ts │ │ ├── plugin.events.ts │ │ ├── plugin.ts │ │ ├── plugins.ts │ │ ├── schemas.ts │ │ ├── themes.ts │ │ ├── translations │ │ │ ├── de.ts │ │ │ ├── en.ts │ │ │ └── loader.ts │ │ ├── wizard-checkbox.ts │ │ ├── wizard-dialog.ts │ │ ├── wizard-select.ts │ │ ├── wizard-textfield.ts │ │ └── wizards.ts │ ├── test │ │ ├── foundation.ts │ │ ├── integration │ │ │ ├── Editing.test.ts │ │ │ ├── Setting.test.ts │ │ │ ├── __snapshots__ │ │ │ │ ├── Setting.test.snap.js │ │ │ │ └── open-scd.test.snap.js │ │ │ └── open-scd.test.ts │ │ ├── mock-editor-logger.ts │ │ ├── mock-edits.ts │ │ ├── mock-open-scd.ts │ │ ├── mock-plugins.ts │ │ ├── mock-wizard-editor.ts │ │ ├── testfiles │ │ │ ├── Editing.scd │ │ │ ├── comm-map.scd │ │ │ ├── editors │ │ │ │ ├── LaterBindingGOOSE-LGOS.scd │ │ │ │ └── LaterBindingSMV-LSVS.scd │ │ │ ├── foundation │ │ │ │ ├── compare-changed.cid │ │ │ │ ├── compare-original.cid │ │ │ │ ├── sclbasics.scd │ │ │ │ ├── testFile73.nsdoc │ │ │ │ ├── testFile74.nsdoc │ │ │ │ └── testFile81.nsdoc │ │ │ ├── lnodewizard.scd │ │ │ ├── menu │ │ │ │ ├── compare-ied-changed.scd │ │ │ │ └── compare-ied-original.scd │ │ │ ├── nsdoc │ │ │ │ ├── IEC_61850-7-2.nsdoc │ │ │ │ ├── invalid.nsdoc │ │ │ │ └── wrong-version.nsdoc │ │ │ ├── valid2003.scd │ │ │ ├── valid2007B.scd │ │ │ ├── valid2007B4.scd │ │ │ └── valid2007B4withIEDModifications.scd │ │ └── unit │ │ │ ├── Editor.test.ts │ │ │ ├── Historing.test.ts │ │ │ ├── Plugging.test.ts │ │ │ ├── Setting.test.ts │ │ │ ├── Waiting.test.ts │ │ │ ├── Wizards.test.ts │ │ │ ├── __snapshots__ │ │ │ ├── Setting.test.snap.js │ │ │ ├── action-icon.test.snap.js │ │ │ ├── action-pane.test.snap.js │ │ │ ├── filtered-list.test.snap.js │ │ │ ├── finder-list.test.snap.js │ │ │ ├── oscd-filter-button.test.snap.js │ │ │ ├── plain-compare-list.test.snap.js │ │ │ └── wizard-dialog.test.snap.js │ │ │ ├── action-icon.test.ts │ │ │ ├── action-pane.test.ts │ │ │ ├── edit-action-to-v1-converter.test.ts │ │ │ ├── edit-v1-to-v2-converter.test.ts │ │ │ ├── filtered-list.test.ts │ │ │ ├── finder-list.test.ts │ │ │ ├── foundation.test.ts │ │ │ ├── foundation │ │ │ ├── __snapshots__ │ │ │ │ └── compare.test.snap.js │ │ │ ├── compare.test.ts │ │ │ ├── dai.test.ts │ │ │ ├── generators.test.ts │ │ │ ├── nsdoc.test.ts │ │ │ └── scl.test.ts │ │ │ ├── mock-actions.ts │ │ │ ├── mock-document.ts │ │ │ ├── mock-editor.ts │ │ │ ├── oscd-filter-button.test.ts │ │ │ ├── plain-compare-list.test.ts │ │ │ ├── schema.test.ts │ │ │ ├── wizard-checkbox.test.ts │ │ │ ├── wizard-dialog.test.ts │ │ │ ├── wizard-select.test.ts │ │ │ └── wizard-textfield.test.ts │ ├── tsconfig.json │ └── web-test-runner.config.mjs ├── plugins │ ├── .eslintrc.cjs │ ├── .gitignore │ ├── .nojekyll │ ├── README.md │ ├── package.json │ ├── project.json │ ├── public │ │ ├── js │ │ │ ├── worker.js │ │ │ ├── xmlvalidate.js │ │ │ └── xmlvalidate.wasm │ │ └── xml │ │ │ ├── CC-EULA.pdf │ │ │ ├── IEC_61850-7-2_2007B3.nsd │ │ │ ├── IEC_61850-7-3_2007B3.nsd │ │ │ ├── IEC_61850-7-420_2019A4.nsd │ │ │ ├── IEC_61850-7-4_2007B3.nsd │ │ │ ├── IEC_61850-8-1_2003A2.nsd │ │ │ └── templates.scd │ ├── snowpack.config.mjs │ ├── src │ │ ├── editors │ │ │ ├── Cleanup.ts │ │ │ ├── Communication.ts │ │ │ ├── GooseSubscriberDataBinding.ts │ │ │ ├── GooseSubscriberMessageBinding.ts │ │ │ ├── IED.ts │ │ │ ├── Protocol104.ts │ │ │ ├── SMVSubscriberDataBinding.ts │ │ │ ├── SMVSubscriberMessageBinding.ts │ │ │ ├── SingleLineDiagram.ts │ │ │ ├── Substation.ts │ │ │ ├── Templates.ts │ │ │ ├── cleanup │ │ │ │ ├── control-blocks-container.ts │ │ │ │ ├── datasets-container.ts │ │ │ │ ├── datatypes-container.ts │ │ │ │ └── foundation.ts │ │ │ ├── communication │ │ │ │ ├── connectedap-editor.ts │ │ │ │ ├── foundation.ts │ │ │ │ ├── gse-editor.ts │ │ │ │ ├── smv-editor.ts │ │ │ │ └── subnetwork-editor.ts │ │ │ ├── ied │ │ │ │ ├── access-point-container.ts │ │ │ │ ├── da-container.ts │ │ │ │ ├── da-wizard.ts │ │ │ │ ├── do-container.ts │ │ │ │ ├── do-wizard.ts │ │ │ │ ├── element-path.ts │ │ │ │ ├── foundation.ts │ │ │ │ ├── ied-container.ts │ │ │ │ ├── ldevice-container.ts │ │ │ │ ├── ln-container.ts │ │ │ │ └── server-container.ts │ │ │ ├── protocol104 │ │ │ │ ├── base-container.ts │ │ │ │ ├── connectedap-editor.ts │ │ │ │ ├── doi-container.ts │ │ │ │ ├── foundation │ │ │ │ │ ├── actions.ts │ │ │ │ │ ├── cdc.ts │ │ │ │ │ ├── foundation.ts │ │ │ │ │ ├── p-types.ts │ │ │ │ │ ├── private.ts │ │ │ │ │ └── signalNames.ts │ │ │ │ ├── ied-container.ts │ │ │ │ ├── network-container.ts │ │ │ │ ├── subnetwork-container.ts │ │ │ │ ├── values-container.ts │ │ │ │ └── wizards │ │ │ │ │ ├── address.ts │ │ │ │ │ ├── connectedap.ts │ │ │ │ │ ├── createAddresses.ts │ │ │ │ │ ├── doi.ts │ │ │ │ │ ├── logiclink.ts │ │ │ │ │ ├── redundancygroup.ts │ │ │ │ │ ├── selectDo.ts │ │ │ │ │ └── subnetwork.ts │ │ │ ├── singlelinediagram │ │ │ │ ├── foundation.ts │ │ │ │ ├── ortho-connector.ts │ │ │ │ ├── sld-drawing.ts │ │ │ │ └── wizards │ │ │ │ │ ├── bay.ts │ │ │ │ │ ├── conductingequipment.ts │ │ │ │ │ ├── foundation.ts │ │ │ │ │ ├── powertransformer.ts │ │ │ │ │ └── wizard-library.ts │ │ │ ├── subscription │ │ │ │ ├── fcda-binding-list.ts │ │ │ │ ├── foundation.ts │ │ │ │ ├── goose │ │ │ │ │ ├── foundation.ts │ │ │ │ │ ├── goose-list.ts │ │ │ │ │ └── subscriber-list.ts │ │ │ │ ├── ied-list.ts │ │ │ │ ├── later-binding │ │ │ │ │ ├── ext-ref-later-binding-list.ts │ │ │ │ │ ├── ext-ref-ln-binding-list.ts │ │ │ │ │ └── foundation.ts │ │ │ │ └── sampledvalues │ │ │ │ │ ├── foundation.ts │ │ │ │ │ ├── smv-list.ts │ │ │ │ │ └── subscriber-list.ts │ │ │ ├── substation │ │ │ │ ├── bay-editor.ts │ │ │ │ ├── conducting-equipment-editor.ts │ │ │ │ ├── eq-function-editor.ts │ │ │ │ ├── eq-sub-function-editor.ts │ │ │ │ ├── foundation.ts │ │ │ │ ├── function-editor.ts │ │ │ │ ├── general-equipment-editor.ts │ │ │ │ ├── guess-wizard.ts │ │ │ │ ├── ied-editor.ts │ │ │ │ ├── l-node-editor.ts │ │ │ │ ├── line-editor.ts │ │ │ │ ├── powertransformer-editor.ts │ │ │ │ ├── process-editor.ts │ │ │ │ ├── sub-equipment-editor.ts │ │ │ │ ├── sub-function-editor.ts │ │ │ │ ├── substation-editor.ts │ │ │ │ ├── tapchanger-editor.ts │ │ │ │ ├── transformer-winding-editor.ts │ │ │ │ ├── voltage-level-editor.ts │ │ │ │ └── zeroline-pane.ts │ │ │ └── templates │ │ │ │ ├── datype-wizards.ts │ │ │ │ ├── dotype-wizards.ts │ │ │ │ ├── enumtype-wizard.ts │ │ │ │ ├── foundation.ts │ │ │ │ └── lnodetype-wizard.ts │ │ ├── menu │ │ │ ├── CompareIED.ts │ │ │ ├── ExportCommunication.ts │ │ │ ├── Help.ts │ │ │ ├── ImportIEDs.ts │ │ │ ├── Merge.ts │ │ │ ├── NewProject.ts │ │ │ ├── OpenProject.ts │ │ │ ├── SaveProject.ts │ │ │ ├── SclHistory.ts │ │ │ ├── SubscriberInfo.ts │ │ │ ├── UpdateDescriptionABB.ts │ │ │ ├── UpdateDescriptionSEL.ts │ │ │ ├── UpdateSubstation.ts │ │ │ ├── VirtualTemplateIED.ts │ │ │ └── virtualtemplateied │ │ │ │ └── foundation.ts │ │ ├── validators │ │ │ ├── ValidateSchema.ts │ │ │ ├── ValidateTemplates.ts │ │ │ └── templates │ │ │ │ ├── dabda.ts │ │ │ │ ├── datype.ts │ │ │ │ ├── dosdo.ts │ │ │ │ ├── dotype.ts │ │ │ │ ├── foundation.ts │ │ │ │ └── lnodetype.ts │ │ └── wizards │ │ │ ├── abstractda.ts │ │ │ ├── address.ts │ │ │ ├── bay.ts │ │ │ ├── bda.ts │ │ │ ├── clientln.ts │ │ │ ├── commmap-wizards.ts │ │ │ ├── conductingequipment.ts │ │ │ ├── connectedap.ts │ │ │ ├── connectivitynode.ts │ │ │ ├── controlwithiedname.ts │ │ │ ├── da.ts │ │ │ ├── dai.ts │ │ │ ├── dataset.ts │ │ │ ├── eqfunction.ts │ │ │ ├── eqsubfunction.ts │ │ │ ├── fcda.ts │ │ │ ├── foundation │ │ │ ├── actions.ts │ │ │ ├── dai-field-type.ts │ │ │ ├── enums.ts │ │ │ ├── finder.ts │ │ │ ├── limits.ts │ │ │ ├── p-types.ts │ │ │ ├── references.ts │ │ │ └── scl.ts │ │ │ ├── function.ts │ │ │ ├── generalEquipment.ts │ │ │ ├── gse.ts │ │ │ ├── gsecontrol.ts │ │ │ ├── ied.ts │ │ │ ├── ldevice.ts │ │ │ ├── line.ts │ │ │ ├── ln.ts │ │ │ ├── ln0.ts │ │ │ ├── lnode.ts │ │ │ ├── optfields.ts │ │ │ ├── powertransformer.ts │ │ │ ├── process.ts │ │ │ ├── reportcontrol.ts │ │ │ ├── sampledvaluecontrol.ts │ │ │ ├── service-GSEControl.ts │ │ │ ├── service-clientServer-configurations.ts │ │ │ ├── service-log-settingsgroup.ts │ │ │ ├── service-networking.ts │ │ │ ├── service-report-configurations.ts │ │ │ ├── service-sampled-values.ts │ │ │ ├── services.ts │ │ │ ├── smv.ts │ │ │ ├── smvopts.ts │ │ │ ├── subequipment.ts │ │ │ ├── subfunction.ts │ │ │ ├── subnetwork.ts │ │ │ ├── substation.ts │ │ │ ├── tapchanger.ts │ │ │ ├── terminal.ts │ │ │ ├── transformerWinding.ts │ │ │ ├── trgops.ts │ │ │ ├── voltagelevel.ts │ │ │ └── wizard-library.ts │ ├── test │ │ ├── foundation.ts │ │ ├── integration │ │ │ ├── editors │ │ │ │ ├── GooseSubscriberDataBinding.test.ts │ │ │ │ ├── GooseSubscriberMessageBinding.test.ts │ │ │ │ ├── IED.test.ts │ │ │ │ ├── Protocol104.test.ts │ │ │ │ ├── SMVSubscriberDataBinding.test.ts │ │ │ │ ├── SMVSubscriberMessageBinding.test.ts │ │ │ │ ├── Substation.test.ts │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── GooseSubscriberLaterBinding.test.snap.js │ │ │ │ │ ├── GooseSubscriberMessageBinding.test.snap.js │ │ │ │ │ ├── IED.test.snap.js │ │ │ │ │ ├── Protocol104.test.snap.js │ │ │ │ │ ├── SMVSubscriberLaterBinding.test.snap.js │ │ │ │ │ ├── SMVSubscriberMessageBinding.test.snap.js │ │ │ │ │ └── Substation.test.snap.js │ │ │ │ ├── cleanup │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── control-blocks-container.test.snap.js │ │ │ │ │ │ ├── datasets-container.test.snap.js │ │ │ │ │ │ └── datatypes-container.test.snap.js │ │ │ │ │ ├── control-blocks-container.test.ts │ │ │ │ │ ├── datasets-container.test.ts │ │ │ │ │ └── datatypes-container.test.ts │ │ │ │ ├── communication │ │ │ │ │ ├── Communication.test.ts │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── Communication.test.snap.js │ │ │ │ │ ├── connectedap-editor-wizarding-editing.test.ts │ │ │ │ │ ├── gse-editor-wizarding-editing.test.ts │ │ │ │ │ ├── smv-editor-wizarding-editing.test.ts │ │ │ │ │ ├── subnetwork-editor-wizarding-editing.test.ts │ │ │ │ │ └── subnetwork-editor-wizarding.test.ts │ │ │ │ ├── substation │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── bay-editor-wizarding.test.snap.js │ │ │ │ │ │ ├── conducting-equipment-editor-wizarding.test.snap.js │ │ │ │ │ │ ├── substation-editor-wizarding.test.snap.js │ │ │ │ │ │ └── voltage-level-editor-wizarding.test.snap.js │ │ │ │ │ ├── bay-editor-wizarding-editing.test.ts │ │ │ │ │ ├── bay-editor-wizarding.test.ts │ │ │ │ │ ├── conducting-equipment-editor-wizarding-editing.test.ts │ │ │ │ │ ├── conducting-equipment-editor-wizarding.test.ts │ │ │ │ │ ├── eq-function-wizarding-editing.test.ts │ │ │ │ │ ├── eq-sub-function-editor-wizarding-editing.test.ts │ │ │ │ │ ├── function-editor.test.ts │ │ │ │ │ ├── general-equipment-editor-wizard-editing.test.ts │ │ │ │ │ ├── guess-wizarding-editing.test.ts │ │ │ │ │ ├── ied-editor-wizarding-integration.test.ts │ │ │ │ │ ├── l-node-editor-wizarding-editing.test.ts │ │ │ │ │ ├── line-editor-wizard-editing.test.ts │ │ │ │ │ ├── lnodewizard.test.ts │ │ │ │ │ ├── powertransformer-editor-wizarding-editing.test.ts │ │ │ │ │ ├── process-editor-wizard-editing.test.ts │ │ │ │ │ ├── sub-equipment-wizarding-editing.test.ts │ │ │ │ │ ├── sub-function-editor.test.ts │ │ │ │ │ ├── substation-editor-wizarding-editing.test.ts │ │ │ │ │ ├── substation-editor-wizarding.test.ts │ │ │ │ │ ├── tapchanger-editor-wizard-editing.test.ts │ │ │ │ │ ├── transformer-winding-editor-wizard-editing.test.ts │ │ │ │ │ ├── voltage-level-editor-wizarding-editing.test.ts │ │ │ │ │ ├── voltage-level-editor-wizarding.test.ts │ │ │ │ │ └── zeroline-pane.test.ts │ │ │ │ ├── templates │ │ │ │ │ ├── Templates.test.ts │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── Templates.test.snap.js │ │ │ │ │ │ ├── datype-wizarding.test.snap.js │ │ │ │ │ │ ├── dotype-wizarding.test.snap.js │ │ │ │ │ │ ├── enumtype-wizarding.test.snap.js │ │ │ │ │ │ └── lnodetype-wizard.test.snap.js │ │ │ │ │ ├── datype-wizarding.test.ts │ │ │ │ │ ├── dotype-wizarding.test.ts │ │ │ │ │ ├── enumtype-wizarding.test.ts │ │ │ │ │ └── lnodetype-wizard.test.ts │ │ │ │ ├── test-support.ts │ │ │ │ └── triggered │ │ │ │ │ ├── CommunicationMappingPlugin.test.ts │ │ │ │ │ └── ImportIedsPlugin.test.ts │ │ │ ├── menu │ │ │ │ ├── ExportCommunication.test.ts │ │ │ │ ├── NewProject.test.ts │ │ │ │ └── UpdateDescritionABB.test.ts │ │ │ ├── validators │ │ │ │ ├── ValidateSchema.test.ts │ │ │ │ ├── ValidateTemplates.test.ts │ │ │ │ └── __snapshots__ │ │ │ │ │ ├── ValidateSchema.test.snap.js │ │ │ │ │ └── ValidateTemplates.test.snap.js │ │ │ └── wizards │ │ │ │ ├── __snapshots__ │ │ │ │ ├── bda-wizarding-editing.test.snap.js │ │ │ │ ├── da-wizarding-editing.test.snap.js │ │ │ │ └── services-wizard.test.snap.js │ │ │ │ ├── address-wizarding-editing.test.ts │ │ │ │ ├── bda-wizarding-editing.test.ts │ │ │ │ ├── connectedap-wizarding-editing-integration.test.ts │ │ │ │ ├── da-wizarding-editing.test.ts │ │ │ │ ├── dataset-wizarding-editing-integration.test.ts │ │ │ │ ├── fcda-wizarding-editing-integration.test.ts │ │ │ │ ├── gse-wizarding-editing-integration.test.ts │ │ │ │ ├── gsecontrolwizarding-editing.test.ts │ │ │ │ ├── reportcontrol-wizarding-editing.test.ts │ │ │ │ ├── sampledvaluecontrol-wizarding-editing.test.ts │ │ │ │ └── services-wizard.test.ts │ │ ├── testfiles │ │ │ ├── 104 │ │ │ │ ├── valid-addresses.scd │ │ │ │ ├── valid-empty-addresses.scd │ │ │ │ ├── valid-no-doi.scd │ │ │ │ ├── valid-no-ied.scd │ │ │ │ └── valid-subnetwork.scd │ │ │ ├── Editing.scd │ │ │ ├── Services.scd │ │ │ ├── SubEquipment.scd │ │ │ ├── cleanup.scd │ │ │ ├── comm-map.scd │ │ │ ├── communication.scd │ │ │ ├── communication │ │ │ │ └── communication.scd │ │ │ ├── conductingequipmentwizard.scd │ │ │ ├── editors │ │ │ │ ├── DataBindingGOOSE2007B4.scd │ │ │ │ ├── DataBindingSMV2007B4.scd │ │ │ │ ├── ExtRefWithoutSrcLNClass.scd │ │ │ │ ├── LaterBindingGOOSE-LGOS.scd │ │ │ │ ├── LaterBindingGOOSE2007B4.scd │ │ │ │ ├── LaterBindingSMV-LSVS.scd │ │ │ │ ├── LaterBindingSMV2003.scd │ │ │ │ ├── LaterBindingSMV2007B4.scd │ │ │ │ ├── MessageBindingGOOSE2007B4.scd │ │ │ │ ├── MessageBindingSMV2007B4.scd │ │ │ │ ├── iedEditorWithIEDs.scd │ │ │ │ ├── iedEditorWithoutIEDs.scd │ │ │ │ └── substation │ │ │ │ │ ├── Line.scd │ │ │ │ │ ├── Process.scd │ │ │ │ │ ├── TapChanger.scd │ │ │ │ │ ├── TransformerWinding.scd │ │ │ │ │ └── generalequipment.scd │ │ │ ├── foundation │ │ │ │ ├── compare-changed.cid │ │ │ │ ├── compare-original.cid │ │ │ │ ├── sclbasics.scd │ │ │ │ ├── testFile73.nsdoc │ │ │ │ ├── testFile74.nsdoc │ │ │ │ └── testFile81.nsdoc │ │ │ ├── history.scd │ │ │ ├── importieds │ │ │ │ ├── duplicate.iid │ │ │ │ ├── emptyproject.scd │ │ │ │ ├── invalid.iid │ │ │ │ ├── multipleied.scd │ │ │ │ ├── parsererror.iid │ │ │ │ ├── template.icd │ │ │ │ └── valid.iid │ │ │ ├── invalid2007B.scd │ │ │ ├── lnodewizard.scd │ │ │ ├── menu │ │ │ │ ├── compare-ied-changed.scd │ │ │ │ └── compare-ied-original.scd │ │ │ ├── missingCommunication.scd │ │ │ ├── missingSubstation.scd │ │ │ ├── no-history.scd │ │ │ ├── nsdoc │ │ │ │ ├── IEC_61850-7-2.nsdoc │ │ │ │ ├── invalid.nsdoc │ │ │ │ └── wrong-version.nsdoc │ │ │ ├── subscriberinfo2003.scd │ │ │ ├── subscriberinfo2007.scd │ │ │ ├── templates │ │ │ │ ├── datypes.scd │ │ │ │ ├── dotypes.scd │ │ │ │ └── missingdatatypes.scd │ │ │ ├── updatedesc │ │ │ │ ├── testSignalListComma.csv │ │ │ │ ├── testSignalListSemicolon.csv │ │ │ │ ├── updatedescABB.scd │ │ │ │ └── updatedescSEL.scd │ │ │ ├── updatesubstation-ours.scd │ │ │ ├── valid2003.scd │ │ │ ├── valid2007B.scd │ │ │ ├── valid2007B4.scd │ │ │ ├── valid2007B4ForDAIValidation.scd │ │ │ ├── valid2007B4withIEDModifications.scd │ │ │ ├── valid2007B4withSubstationXY.scd │ │ │ ├── validators │ │ │ │ ├── datatypetemplateerrors.scd │ │ │ │ ├── doandsdotestfile.scd │ │ │ │ └── zeroissues.scd │ │ │ ├── virtualied │ │ │ │ └── specificfromfunctions.ssd │ │ │ ├── wizards │ │ │ │ ├── abstractda.scd │ │ │ │ ├── communication.scd │ │ │ │ ├── fcda.scd │ │ │ │ ├── gsecontrol.scd │ │ │ │ ├── gsemove.scd │ │ │ │ ├── ied.scd │ │ │ │ ├── references.scd │ │ │ │ ├── reportcontrol.scd │ │ │ │ ├── sampledvaluecontrol.scd │ │ │ │ ├── settingGroups.scd │ │ │ │ └── substation.scd │ │ │ └── zeroline │ │ │ │ ├── clone │ │ │ │ ├── noUnusedLNode.scd │ │ │ │ ├── refMissmatch.scd │ │ │ │ ├── specificationOnly.scd │ │ │ │ └── validRedirect.scd │ │ │ │ ├── functions.scd │ │ │ │ ├── iedalloctest.scd │ │ │ │ └── substationonly.scd │ │ └── unit │ │ │ ├── editors │ │ │ ├── GooseSubscriberDataBinding.test.ts │ │ │ ├── SMVSubscriberDataBinding.test.ts │ │ │ ├── __snapshots__ │ │ │ │ ├── GooseSubscriberDataBinding.test.snap.js │ │ │ │ ├── GooseSubscriberLaterBinding.test.snap.js │ │ │ │ ├── Publisher.test.snap.js │ │ │ │ ├── SMVSubscriberDataBinding.test.snap.js │ │ │ │ └── SMVSubscriberLaterBinding.test.snap.js │ │ │ ├── cleanup │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── control-blocks-container.test.snap.js │ │ │ │ │ ├── datasets-container.test.snap.js │ │ │ │ │ └── datatypes-container.test.snap.js │ │ │ │ ├── control-blocks-container.test.ts │ │ │ │ ├── datasets-container.test.ts │ │ │ │ ├── datatypes-container.test.ts │ │ │ │ └── foundation.test.ts │ │ │ ├── communication │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── conductingap-editor.test.snap.js │ │ │ │ │ ├── gse-editor.test.snap.js │ │ │ │ │ ├── smv-editor.test.snap.js │ │ │ │ │ └── subnetwork-editor.test.snap.js │ │ │ │ ├── conductingap-editor.test.ts │ │ │ │ ├── gse-editor.test.ts │ │ │ │ ├── smv-editor.test.ts │ │ │ │ └── subnetwork-editor.test.ts │ │ │ ├── ied │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── access-point-container.test.snap.js │ │ │ │ │ ├── da-container.test.snap.js │ │ │ │ │ ├── da-wizard.test.snap.js │ │ │ │ │ ├── do-container.test.snap.js │ │ │ │ │ ├── do-wizard.test.snap.js │ │ │ │ │ ├── element-path.test.snap.js │ │ │ │ │ ├── ied-container.test.snap.js │ │ │ │ │ ├── ldevice-container.test.snap.js │ │ │ │ │ ├── ln-container.test.snap.js │ │ │ │ │ └── server-container.test.snap.js │ │ │ │ ├── access-point-container.test.ts │ │ │ │ ├── da-container.test.ts │ │ │ │ ├── da-wizard.test.ts │ │ │ │ ├── do-container.test.ts │ │ │ │ ├── do-wizard.test.ts │ │ │ │ ├── element-path.test.ts │ │ │ │ ├── foundation.test.ts │ │ │ │ ├── ied-container.test.ts │ │ │ │ ├── ldevice-container.test.ts │ │ │ │ ├── ln-container.test.ts │ │ │ │ ├── server-container.test.ts │ │ │ │ └── test-support.ts │ │ │ ├── protocol104 │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── connectedap-container.test.snap.js │ │ │ │ │ ├── doi-container.test.snap.js │ │ │ │ │ ├── ied-container.test.snap.js │ │ │ │ │ ├── network-container.test.snap.js │ │ │ │ │ ├── subnetwork-container.test.snap.js │ │ │ │ │ └── values-container.test.snap.js │ │ │ │ ├── connectedap-container.test.ts │ │ │ │ ├── doi-container.test.ts │ │ │ │ ├── foundation │ │ │ │ │ ├── actions.test.ts │ │ │ │ │ ├── cdc.test.ts │ │ │ │ │ ├── foundation.test.ts │ │ │ │ │ └── private.test.ts │ │ │ │ ├── ied-container.test.ts │ │ │ │ ├── network-container.test.ts │ │ │ │ ├── subnetwork-container.test.ts │ │ │ │ ├── values-container.test.ts │ │ │ │ └── wizards │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── address.test.snap.js │ │ │ │ │ ├── connectedap.test.snap.js │ │ │ │ │ ├── createAddresses.test.snap.js │ │ │ │ │ ├── doi.test.snap.js │ │ │ │ │ ├── logiclink.test.snap.js │ │ │ │ │ ├── redundancygroup.test.snap.js │ │ │ │ │ ├── selectDo.test.snap.js │ │ │ │ │ └── subnetwork.test.snap.js │ │ │ │ │ ├── address.test.ts │ │ │ │ │ ├── connectedap.test.ts │ │ │ │ │ ├── createAddresses.test.ts │ │ │ │ │ ├── doi.test.ts │ │ │ │ │ ├── logiclink.test.ts │ │ │ │ │ ├── redundancygroup.test.ts │ │ │ │ │ ├── selectDo.test.ts │ │ │ │ │ └── subnetwork.test.ts │ │ │ ├── singlelinediagram │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── sld-drawing.test.snap.js │ │ │ │ ├── foundation.test.ts │ │ │ │ ├── orthogonal-connector.test.ts │ │ │ │ ├── sld-drawing.test.ts │ │ │ │ └── wizards │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── bay.test.snap.js │ │ │ │ │ ├── conductingequipment.test.snap.js │ │ │ │ │ └── powertransformer.test.snap.js │ │ │ │ │ ├── bay.test.ts │ │ │ │ │ ├── conductingequipment.test.ts │ │ │ │ │ ├── foundation.test.ts │ │ │ │ │ ├── powertransformer.test.ts │ │ │ │ │ └── wizard-library.test.ts │ │ │ ├── subscription │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── fcda-binding-list.test.snap.js │ │ │ │ │ └── ied-list.test.snap.js │ │ │ │ ├── fcda-binding-list.test.ts │ │ │ │ ├── foundation.test.ts │ │ │ │ ├── goose │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── goose-list.test.snap.js │ │ │ │ │ │ └── subscriber-list.test.snap.js │ │ │ │ │ ├── goose-list.test.ts │ │ │ │ │ └── subscriber-list.test.ts │ │ │ │ ├── ied-list.test.ts │ │ │ │ ├── later-binding │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── ext-ref-later-binding-list.test.snap.js │ │ │ │ │ │ └── ext-ref-ln-binding-list.test.snap.js │ │ │ │ │ ├── ext-ref-later-binding-list.test.ts │ │ │ │ │ ├── ext-ref-ln-binding-list.test.ts │ │ │ │ │ └── foundation.test.ts │ │ │ │ ├── sampledvalues │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ ├── smv-list.test.snap.js │ │ │ │ │ │ └── subscriber-list.test.snap.js │ │ │ │ │ ├── smv-list.test.ts │ │ │ │ │ └── subscriber-list.test.ts │ │ │ │ └── supervision.test.ts │ │ │ ├── substation │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── bay-editor.test.snap.js │ │ │ │ │ ├── conducting-equipment-editor.test.snap.js │ │ │ │ │ ├── eq-function-editor.test.snap.js │ │ │ │ │ ├── eq-sub-function-editor.test.snap.js │ │ │ │ │ ├── function-editor.test.snap.js │ │ │ │ │ ├── general-equipment-editor.test.snap.js │ │ │ │ │ ├── ied-editor.test.snap.js │ │ │ │ │ ├── l-node-editor.test.snap.js │ │ │ │ │ ├── line-editor.test.snap.js │ │ │ │ │ ├── powertransformer-editor.test.snap.js │ │ │ │ │ ├── process-editor.test.snap.js │ │ │ │ │ ├── redirectionUI.test.snap.js │ │ │ │ │ ├── sub-equipment-editor.test.snap.js │ │ │ │ │ ├── sub-function-editor.test.snap.js │ │ │ │ │ ├── substation-editor.test.snap.js │ │ │ │ │ ├── tapchanger-editor.test.snap.js │ │ │ │ │ ├── transformer-winding-editor.test.snap.js │ │ │ │ │ ├── voltage-level-editor.test.snap.js │ │ │ │ │ └── zeroline-pane.test.snap.js │ │ │ │ ├── bay-editor.test.ts │ │ │ │ ├── conducting-equipment-editor.test.ts │ │ │ │ ├── conductingequipmentwizard.test.ts │ │ │ │ ├── eq-function-editor.test.ts │ │ │ │ ├── eq-sub-function-editor.test.ts │ │ │ │ ├── function-editor.test.ts │ │ │ │ ├── general-equipment-editor.test.ts │ │ │ │ ├── ied-editor.test.ts │ │ │ │ ├── l-node-editor.test.ts │ │ │ │ ├── line-editor.test.ts │ │ │ │ ├── lnodewizard.test.ts │ │ │ │ ├── powertransformer-editor.test.ts │ │ │ │ ├── process-editor.test.ts │ │ │ │ ├── redirectionUI.test.ts │ │ │ │ ├── sub-equipment-editor.test.ts │ │ │ │ ├── sub-function-editor.test.ts │ │ │ │ ├── substation-editor.test.ts │ │ │ │ ├── tapchanger-editor.test.ts │ │ │ │ ├── transformer-winding-editor.test.ts │ │ │ │ ├── voltage-level-editor.test.ts │ │ │ │ └── zeroline-pane.test.ts │ │ │ └── templates │ │ │ │ ├── datype.test.ts │ │ │ │ ├── dotype.test.ts │ │ │ │ ├── enumtype.test.ts │ │ │ │ └── lnodetype-wizard.test.ts │ │ │ ├── menu │ │ │ ├── CompareIED.test.ts │ │ │ ├── SclHistory.test.ts │ │ │ ├── SubscriberInfo.test.ts │ │ │ ├── UpdateDescriptionSEL.test.ts │ │ │ ├── UpdateDescritionABB.test.ts │ │ │ ├── VirtualTemplateIED.test.ts │ │ │ ├── __snapshots__ │ │ │ │ ├── CompareIED.test.snap.js │ │ │ │ ├── SclHistory.test.snap.js │ │ │ │ ├── UpdateDescriptionSEL.test.snap.js │ │ │ │ ├── UpdateDescritionABB.test.snap.js │ │ │ │ └── VirtualTemplateIED.test.snap.js │ │ │ ├── updatesubstation.test.ts │ │ │ └── virtualtemplateied │ │ │ │ ├── __snapshots__ │ │ │ │ └── foundation.test.snap.js │ │ │ │ └── foundation.test.ts │ │ │ ├── validators │ │ │ ├── ValidateTemplates.test.ts │ │ │ └── templates │ │ │ │ ├── dabda.test.ts │ │ │ │ ├── datype.test.ts │ │ │ │ ├── doorsdo.test.ts │ │ │ │ ├── dotype.test.ts │ │ │ │ ├── foundation.test.ts │ │ │ │ └── lnodetype.test.ts │ │ │ └── wizards │ │ │ ├── __snapshots__ │ │ │ ├── abstractda.test.snap.js │ │ │ ├── address.test.snap.js │ │ │ ├── clientln.test.snap.js │ │ │ ├── commmap.test.snap.js │ │ │ ├── connectedap-c.test.snap.js │ │ │ ├── connectedap-pattern.test.snap.js │ │ │ ├── connectivitynode.test.snap.js │ │ │ ├── controlwithiedname.test.snap.js │ │ │ ├── dai.test.snap.js │ │ │ ├── dataset.test.snap.js │ │ │ ├── eqfunction.test.snap.js │ │ │ ├── eqsubfunction.test.snap.js │ │ │ ├── fcda.test.snap.js │ │ │ ├── function.test.snap.js │ │ │ ├── generalequipment.test.snap.js │ │ │ ├── gse.test.snap.js │ │ │ ├── gsecontrol.test.snap.js │ │ │ ├── ied.test.snap.js │ │ │ ├── ldevice.test.snap.js │ │ │ ├── line.test.snap.js │ │ │ ├── lnode.test.snap.js │ │ │ ├── optfields.test.snap.js │ │ │ ├── powertransformer.test.snap.js │ │ │ ├── process.test.snap.js │ │ │ ├── reportcontrol.test.snap.js │ │ │ ├── sampledvaluecontrol.test.snap.js │ │ │ ├── smv.test.snap.js │ │ │ ├── smvopts.test.snap.js │ │ │ ├── sub-equipment.test.snap.js │ │ │ ├── subfunction.test.snap.js │ │ │ ├── subnetwork.test.snap.js │ │ │ ├── substation.test.snap.js │ │ │ ├── tapchanger.test.snap.js │ │ │ ├── terminal.test.snap.js │ │ │ ├── transformerwinding.test.snap.js │ │ │ └── trgops.test.snap.js │ │ │ ├── abstractda.test.ts │ │ │ ├── address.test.ts │ │ │ ├── bay.test.ts │ │ │ ├── bda.test.ts │ │ │ ├── clientln.test.ts │ │ │ ├── commmap.test.ts │ │ │ ├── conductingequipment.test.ts │ │ │ ├── connectedap-c.test.ts │ │ │ ├── connectedap-pattern.test.ts │ │ │ ├── connectedap.test.ts │ │ │ ├── connectivitynode.test.ts │ │ │ ├── da.test.ts │ │ │ ├── dai.test.ts │ │ │ ├── dataset.test.ts │ │ │ ├── eqfunction.test.ts │ │ │ ├── eqsubfunction.test.ts │ │ │ ├── fcda.test.ts │ │ │ ├── foundation │ │ │ ├── __snapshots__ │ │ │ │ └── dai-field-type.test.snap.js │ │ │ ├── dai-field-type.test.ts │ │ │ ├── finder.test.ts │ │ │ ├── references.test.ts │ │ │ └── scl.test.ts │ │ │ ├── function.test.ts │ │ │ ├── generalequipment.test.ts │ │ │ ├── gse.test.ts │ │ │ ├── gsecontrol.test.ts │ │ │ ├── ied.test.ts │ │ │ ├── ldevice.test.ts │ │ │ ├── line.test.ts │ │ │ ├── ln.test.ts │ │ │ ├── ln0.test.ts │ │ │ ├── lnode.test.ts │ │ │ ├── optfields.test.ts │ │ │ ├── powertransformer.test.ts │ │ │ ├── process.test.ts │ │ │ ├── reportcontrol.test.ts │ │ │ ├── sampledvaluecontrol.test.ts │ │ │ ├── services.test.ts │ │ │ ├── smv.test.ts │ │ │ ├── smvopts.test.ts │ │ │ ├── sub-equipment.test.ts │ │ │ ├── subfunction.test.ts │ │ │ ├── subnetwork.test.ts │ │ │ ├── substation.test.ts │ │ │ ├── tapchanger.test.ts │ │ │ ├── terminal.test.ts │ │ │ ├── test-support.ts │ │ │ ├── transformerwinding.test.ts │ │ │ ├── trgops.test.ts │ │ │ └── voltagelevel.test.ts │ ├── tsconfig.json │ ├── web-test-runner.config.mjs │ └── workbox-config.cjs ├── wizards │ ├── package.json │ └── project.json └── xml │ ├── .gitignore │ ├── .npmignore │ ├── CHANGELOG.md │ ├── README.md │ ├── package.json │ ├── project.json │ ├── src │ ├── foundation.ts │ └── index.ts │ ├── test │ ├── foundation.test.ts │ └── testfiles │ │ ├── lnodewizard.scd │ │ ├── valid2003.scd │ │ └── valid2007B4.scd │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── web-test-runner.config.mjs └── release-please-config.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | 23 | [*.json] 24 | indent_size = 2 25 | 26 | [*.{html,js,md}] 27 | block_comment_start = /** 28 | block_comment = * 29 | block_comment_end = */ 30 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | CHROME_PATH= -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'import', 'html'], 5 | extends: [ 6 | 'eslint:recommended', 7 | 'plugin:@typescript-eslint/eslint-recommended', 8 | 'plugin:@typescript-eslint/recommended', 9 | 'plugin:import/errors', 10 | 'plugin:import/warnings', 11 | ], 12 | rules: { 13 | // disable the rule for all files 14 | '@typescript-eslint/explicit-function-return-type': 'off', 15 | '@typescript-eslint/no-non-null-assertion': 'off', 16 | 'import/named': 'off', 17 | 'import/no-unresolved': 'off', 18 | 'import/extensions': ['error', 'always', { ignorePackages: true }], 19 | 'import/no-duplicates': 'off', 20 | 'no-duplicate-imports': 'off', 21 | 'tsdoc/syntax': 'warn' 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'Kind: Bug' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: 'Kind: Enhancement' 6 | assignees: '' 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Eg. As a user of OpenSCD I want to ... 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. 14 | 15 | **Requirements** 16 | What are the minimal requirements you need to have for this feature wish 17 | 18 | **Suggestions for a specific user interaction** 19 | Have a specific UI gesture in mind? If you want to discuss this first, please provide your suggestion in the discussions field. 20 | 21 | **Additional information** 22 | For further reading including e.g parts of IEC 61850, Tissues or other sources that triggered your feature wish 23 | 24 | **Test Files** 25 | If possible provide a file that can be used to test the feature and explain what is the outcome of the test with the test file 26 | -------------------------------------------------------------------------------- /.github/workflows/build-and-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy 2 | on: 3 | push: 4 | branches: 5 | - main 6 | paths: 7 | - "packages/**" 8 | 9 | jobs: 10 | build-and-deploy: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2.3.1 15 | with: 16 | submodules: "true" 17 | 18 | - name: Use Node.js 18.x 19 | uses: actions/setup-node@v1 20 | with: 21 | node-version: "18.x" 22 | 23 | - name: Install and Build OpenSCD 24 | run: | 25 | npm i @nx/nx-linux-x64-gnu 26 | npm clean-install 27 | npm run-script build 28 | npm run-script doc 29 | 30 | - name: Copy Core Docs to OpenSCD 31 | run: | 32 | cp -R packages/core/doc packages/distribution/build/core-doc 33 | 34 | - name: Copy Plugin Docs to OpenSCD 35 | run: | 36 | cp -R packages/plugins/doc packages/distribution/build/plugin-doc 37 | 38 | - name: Deploy 39 | uses: JamesIves/github-pages-deploy-action@4.1.5 40 | with: 41 | branch: master 42 | folder: packages/distribution/build 43 | repository-name: openscd/openscd.github.io 44 | ssh-key: ${{ secrets.DEPLOY_KEY }} 45 | -------------------------------------------------------------------------------- /.github/workflows/pr-preview.yml: -------------------------------------------------------------------------------- 1 | name: Deploy PR previews 2 | 3 | on: 4 | pull_request: 5 | types: 6 | - opened 7 | - reopened 8 | - synchronize 9 | - closed 10 | paths: 11 | - "packages/**" 12 | 13 | concurrency: preview-${{ github.ref }} 14 | env: 15 | PR_NUMBER: ${{ github.event.number }} 16 | 17 | jobs: 18 | deploy-preview: 19 | permissions: write-all 20 | runs-on: ubuntu-22.04 21 | steps: 22 | - name: Checkout 23 | uses: actions/checkout@v3 24 | with: 25 | submodules: "true" 26 | - name: Install and Build OpenSCD 27 | if: github.event.action != 'closed' # You might want to skip the build if the PR has been closed 28 | run: | 29 | npm i @nx/nx-linux-x64-gnu 30 | npm clean-install 31 | PUBLIC_URL=open-scd/pr-preview/pr-$PR_NUMBER npm run-script build 32 | 33 | - name: Deploy preview 34 | uses: rossjrw/pr-preview-action@v1 35 | with: 36 | source-dir: packages/distribution/build 37 | umbrella-dir: pr-preview 38 | -------------------------------------------------------------------------------- /.github/workflows/test-and-build.yml: -------------------------------------------------------------------------------- 1 | name: Test and Build 2 | on: pull_request 3 | 4 | jobs: 5 | test-and-build: 6 | runs-on: ubuntu-22.04 7 | steps: 8 | - name: Checkout 9 | uses: actions/checkout@v2.3.1 10 | with: 11 | submodules: "true" 12 | - name: Use Node.js 18.x 13 | uses: actions/setup-node@v1 14 | with: 15 | node-version: "18.x" 16 | 17 | - name: Install and Test OpenSCD 18 | run: | 19 | npm i @nx/nx-linux-x64-gnu 20 | npm clean-install 21 | npx playwright install chromium --with-deps 22 | npm run-script test 23 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | on: 3 | push: 4 | branches-ignore: 5 | - main 6 | paths: 7 | - packages/** 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2.3.1 15 | 16 | - name: Use Node.js 18.x 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: "18.x" 20 | 21 | - name: Install and Test 22 | run: | 23 | npm i @nx/nx-linux-x64-gnu 24 | npm clean-install 25 | npx playwright install chromium --with-deps 26 | npm run-script test 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## editors 2 | /.idea 3 | /.vscode 4 | 5 | ## system files 6 | .DS_Store 7 | 8 | ## npm 9 | node_modules/ 10 | /npm-debug.log 11 | 12 | ## testing 13 | /coverage/ 14 | 15 | # build 16 | /locales.ts 17 | /locales 18 | /dist 19 | /custom-elements.json 20 | /.tsbuildinfo 21 | /.rollup.cache 22 | /build 23 | 24 | # lerna 25 | /lerna-debug.log 26 | 27 | .nx/cache 28 | 29 | # environment variables 30 | .env -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "packages/external-plugins/oscd-publisher"] 2 | path = packages/external-plugins/oscd-publisher 3 | url = https://github.com/openscd/oscd-publisher 4 | branch = deploy 5 | [submodule "packages/external-plugins/oscd-subscriber-later-binding"] 6 | path = packages/external-plugins/oscd-subscriber-later-binding 7 | url = https://github.com/danyill/oscd-subscriber-later-binding 8 | branch = gh-pages 9 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | npx --no -- commitlint --edit $1 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.js 2 | **/*.ts.hbs -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages/openscd": "0.37.0", 3 | "packages/core": "0.1.4", 4 | ".": "0.39.0" 5 | } 6 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'] 3 | }; 4 | -------------------------------------------------------------------------------- /docs/0002-ADR-Atomic-Design.md: -------------------------------------------------------------------------------- 1 | # Atomic Design proposal for Open-SCD 2 | 3 | Date: 2023-05-24 4 | 5 | ## Status 6 | 7 | Open 8 | 9 | ## Context 10 | If we want to build robust reusable components, we should make use of the Atomic Design principal. 11 | This design principal consists of multiple levels of components: 12 | * Atoms 13 | * Molecules 14 | * Organisms 15 | * Templates 16 | * Page 17 | 18 | A molecule is a group of atoms together. An organism is a group of molecules together. etc. etc. 19 | 20 | #### Example 21 | 22 | We have a textfield component (Atom) called @openscd/oscd-textfield. 23 | We also have a button component (Atom) @openscd/oscd-button. 24 | 25 | We now can create a search component (Molecule) called @openscd/oscd-search. 26 | 27 | 28 | ### Background 29 | Related links: 30 | - [Atomic Web Design](https://bradfrost.com/blog/post/atomic-web-design/) 31 | 32 | ## Decision 33 | T.B.D. 34 | 35 | 36 | ## Consequences 37 | This decision will mean that the current OSCD components might need some extra 38 | work to split up components by type (Atoms/Molecules/Organisms). 39 | Also, we might introduce more overhead if we split all the atoms and molecules up by repository. 40 | -------------------------------------------------------------------------------- /docs/core-api/edit-api-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/docs/core-api/edit-api-flow.png -------------------------------------------------------------------------------- /docs/decisions/0001-record-architecture-decisions.md: -------------------------------------------------------------------------------- 1 | # 1. Record architecture decisions 2 | 3 | Date: 2023-07 4 | 5 | ## Status 6 | 7 | Accepted 8 | 9 | ## Context 10 | 11 | We need to record the architectural decisions made on this project. 12 | 13 | ## Decision 14 | 15 | We will follow the decisions recorded in the central organizational 16 | repository ([.github](https://github.com/openscd/.github)), 17 | and record new repo-specific decisions in this repository. 18 | 19 | 20 | We write ADRs in the `docs/decisions` folder instead of a standard `doc/adr`: 21 | - `docs` instead of `doc` because `doc` is used for the generated documentation. 22 | - `decisions` instead of `adrs` because it is more explicit and a followed practice: 23 | [↗ Markdown Any Decision Records - Applying MADR to your project ](https://adr.github.io/madr/#applying-madr-to-your-project) 24 | 25 | ## Consequences 26 | 27 | - It will be harder to track which decisions have to be taken into consideration 28 | - Local decisions will be easier to find 29 | -------------------------------------------------------------------------------- /docs/decisions/0002-use-monorepo.md: -------------------------------------------------------------------------------- 1 | # 2. Use Monorepo 2 | 3 | Date: 2023-08 4 | 5 | ## Status 6 | 7 | Accepted 8 | 9 | ## Context 10 | 11 | We want: 12 | - better access management to core functionalities, plugins and ui components 13 | - easier maintainability and refactorability of critical parts 14 | - more shareable code 15 | 16 | 17 | ## Decision 18 | 19 | We will use a monorepo to manage the codebase for the time being. 20 | 21 | To control access to the codebase we will use CODEOWNERS files. 22 | 23 | 24 | ## Consequences 25 | 26 | - it makes the the dependency discovery and management easier between packages 27 | - we can add packages that can be deployed and published independently and still used directly inside the monorepo 28 | - it will allow us to experiment and beta test packages before publishing them 29 | - CI pipeline runs will be faster because changes are more separated 30 | - it will make it harder to bundle and distribute parts of the base distribution 31 | - it moves the complexity of package management into a concentrated place 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/decisions/0004-openscd-release-and-deployment-strategy.md: -------------------------------------------------------------------------------- 1 | # ADR-0004 - Technical solution for releasing and deployments 2 | 3 | Date: 2024-11-19 4 | 5 | ## Status 6 | 7 | Approved 8 | 9 | ## Context 10 | 11 | Based on the [decision](./0003-extract-plugins.md) to externalize plugins in proper plugins repository a new release and deployment strategy needs to be defined. 12 | This plugins repository is solved as mono repository. 13 | 14 | ## Decision 15 | 16 | ### Release process 17 | 18 | Since OpenSCD is based on [NX](https://nx.dev/) the release strategy needs to rely on NX as well and must allow single releases of sub modules within this mono repository. 19 | Such feature is provided by [NX release](https://nx.dev/recipes/nx-release) specially when using the [NX independently release feature](https://nx.dev/recipes/nx-release/release-projects-independently). 20 | 21 | A possible release command would look like: 22 | ``` 23 | nx release --projects=plugin-1,plugin-3 24 | ``` 25 | 26 | ## Consequences 27 | 28 | - Process needs to be documented so that all developers can easily follow it 29 | - The building of complete OpenSCD Editor, OpenSCD Core + OpenSCD plugins, depends now on two repositories 30 | - Custom OpenSCD eg. CoMPAS OpenSCD will be cleaner and more code can be reused 31 | - Similar Look & Feel of plugins if shared UI-Components are used 32 | - Faster plugin development and integration into OpenSCD Core 33 | -------------------------------------------------------------------------------- /docs/decisions/README.md: -------------------------------------------------------------------------------- 1 | # Decisions 2 | 3 | - [ADR-0001: Record architecture decisions](0001-record-architecture-decisions.md) ✅ active 4 | - [ADR-0002: Use Monorepo](0002-use-monorepo.md) ✅ active 5 | -------------------------------------------------------------------------------- /docs/theming-proposal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/docs/theming-proposal.png -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/lerna/schemas/lerna-schema.json", 3 | "version": "independent", 4 | "packages": ["packages/*"], 5 | "useNx": true 6 | } 7 | -------------------------------------------------------------------------------- /nx.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasksRunnerOptions": { 3 | "default": { 4 | "runner": "nx/tasks-runners/default", 5 | "options": { 6 | "cacheableOperations": ["build"] 7 | } 8 | } 9 | }, 10 | "targetDefaults": { 11 | "lint": { 12 | "inputs": [ 13 | "default", 14 | "{workspaceRoot}/.eslintrc.json", 15 | "{workspaceRoot}/.eslintignore" 16 | ] 17 | }, 18 | "test": { 19 | "inputs": ["default", "^default"], 20 | "dependsOn": ["^test", "build"] 21 | }, 22 | "build": { 23 | "dependsOn": ["clean", "^clean", "^build"] 24 | } 25 | }, 26 | "$schema": "./node_modules/nx/schemas/nx-schema.json", 27 | "defaultBase": "main" 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "openscd-monorepo", 3 | "version": "0.39.0", 4 | "description": "OpenSCD base distribution and plugins", 5 | "private": true, 6 | "workspaces": [ 7 | "packages/*" 8 | ], 9 | "scripts": { 10 | "clean": "lerna run clean", 11 | "build": "npx nx run-many -t build --all", 12 | "doc": "lerna run doc", 13 | "test": "npx nx run-many -t test --all --parallel=false", 14 | "graph": "npx nx graph", 15 | "start": "npx rimraf packages/distribution/node_modules/.cache/snowpack/build/lit@2.8.0 && lerna run start", 16 | "serve": "nx run @openscd/distribution:serve" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/openscd/open-scd.git" 21 | }, 22 | "license": "Apache-2.0", 23 | "devDependencies": { 24 | "@commitlint/cli": "^19.8.0", 25 | "@commitlint/config-conventional": "^19.8.0", 26 | "husky": "^9.1.7", 27 | "lerna": "^7.1.4", 28 | "nx": "18.3.4" 29 | }, 30 | "optionalDependencies": { 31 | "@nx/nx-linux-x64-gnu": "18.3.4" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /packages/addons/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/addons", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "packages/addons/src", 6 | "targets": {} 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/.gitignore: -------------------------------------------------------------------------------- 1 | .tsbuildinfo 2 | 3 | dist/ 4 | node_modules/ 5 | doc/ 6 | -------------------------------------------------------------------------------- /packages/core/.npmignore: -------------------------------------------------------------------------------- 1 | ## editors 2 | /.idea 3 | /.vscode 4 | 5 | ## system files 6 | .DS_Store 7 | 8 | ## npm 9 | /node_modules/ 10 | /npm-debug.log 11 | 12 | ## testing 13 | /coverage/ 14 | 15 | ## local debug 16 | /.npmrc 17 | 18 | ## temp folders 19 | /.tmp/ 20 | 21 | # build 22 | /_site/ 23 | /out-tsc/ 24 | 25 | storybook-static 26 | custom-elements.json 27 | -------------------------------------------------------------------------------- /packages/core/README.md: -------------------------------------------------------------------------------- 1 | # OpenSCD Core 2 | ## \ 3 | 4 | ## Installation 5 | 6 | ```sh 7 | npm i open-scd 8 | ``` 9 | 10 | ## Usage 11 | 12 | ```html 13 | 16 | 17 | 18 | ``` 19 | 20 | ## Linting and formatting 21 | 22 | To scan the project for linting and formatting errors, run 23 | 24 | ```sh 25 | npm run lint 26 | ``` 27 | 28 | To automatically fix linting and formatting errors, run 29 | 30 | ```sh 31 | npm run format 32 | ``` 33 | 34 | We use ESLint and Prettier for linting and formatting. Plugins for automatic 35 | formatting and linting during editing are available for vim, emacs, VSCode, 36 | and all popular IDEs. 37 | 38 | ## Testing with Web Test Runner 39 | 40 | To execute a single test run: 41 | 42 | ```sh 43 | npm test 44 | ``` 45 | 46 | To run the tests in interactive watch mode run: 47 | 48 | ```sh 49 | npm run test:watch 50 | ``` 51 | 52 | ## Tooling configs 53 | 54 | For most of the tools, the configuration is in the `package.json` to reduce the 55 | amount of files in the project. 56 | 57 | ## Local Demo with `web-dev-server` 58 | 59 | ```sh 60 | npm start 61 | ``` 62 | 63 | To run a local development server that serves the basic demo located in `demo/index.html` 64 | 65 | > This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation. 66 | 67 | ## License 68 | 69 | This project is licensed under the [Apache License 2.0](LICENSE). 70 | 71 | © 2022 OpenSCD 72 | -------------------------------------------------------------------------------- /packages/core/demo/AddPlugins.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-alert */ 2 | export default class AddPlugins extends HTMLElement { 3 | /* eslint-disable-next-line class-methods-use-this */ 4 | run() { 5 | const editor = (this.getRootNode()).host; 6 | const kind = window.confirm( 7 | `Add a menu type plugin? 8 | If you choose 'Cancel', an editor type plugin will be added instead.`) 9 | ? 'menu' 10 | : 'editor'; 11 | const requireDoc = window.confirm( 12 | 'Does the plugin require a loaded document? (OK=yes, Cancel=no)') 13 | ; 14 | const name = 15 | window.prompt('Plugin name', 'My plugin') || 16 | 'Default plugin name'; 17 | const icon = 18 | window.prompt('Plugin icon (material icon name)', 'extension') || 19 | 'extension'; 20 | const active = true; 21 | const src = 22 | window.prompt( 23 | 'Plugin source URI', 24 | 'https://example.org/plugin.js' 25 | ) || 'data:text/javascript,'; 26 | const plugin = { name, src, icon, active, requireDoc }; 27 | if ( 28 | !window.confirm( 29 | `Add ${kind} plugin ${JSON.stringify(plugin, null, ' ')}?`) 30 | 31 | ) 32 | return; 33 | if (!editor.plugins[kind]) editor.plugins[kind] = []; 34 | editor.plugins[kind].push(plugin); 35 | editor.requestUpdate('plugins'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /packages/core/demo/embedded.html: -------------------------------------------------------------------------------- 1 | OpenSCD Core Embedding Demo 2 | 3 | 17 | -------------------------------------------------------------------------------- /packages/core/demo/index.html: -------------------------------------------------------------------------------- 1 | OpenSCD Core Demo 2 | 3 | 4 | 9 | 10 | 11 | 20 | 21 | 29 | 30 | 40 | -------------------------------------------------------------------------------- /packages/core/foundation/cyrb64.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Hashes `str` using the cyrb64 variant of 3 | * https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js 4 | * @returns digest - a rather insecure hash, very quickly 5 | */ 6 | export function cyrb64(str: string): string { 7 | /* eslint-disable no-bitwise */ 8 | let h1 = 0xdeadbeef; 9 | let h2 = 0x41c6ce57; 10 | /* eslint-disable-next-line no-plusplus */ 11 | for (let i = 0, ch; i < str.length; i++) { 12 | ch = str.charCodeAt(i); 13 | h1 = Math.imul(h1 ^ ch, 2654435761); 14 | h2 = Math.imul(h2 ^ ch, 1597334677); 15 | } 16 | h1 = 17 | Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ 18 | Math.imul(h2 ^ (h2 >>> 13), 3266489909); 19 | h2 = 20 | Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ 21 | Math.imul(h1 ^ (h1 >>> 13), 3266489909); 22 | return ( 23 | (h2 >>> 0).toString(16).padStart(8, '0') + 24 | (h1 >>> 0).toString(16).padStart(8, '0') 25 | ); 26 | /* eslint-enable no-bitwise */ 27 | } 28 | -------------------------------------------------------------------------------- /packages/core/foundation/deprecated/open-event.ts: -------------------------------------------------------------------------------- 1 | /** Represents a document to be opened. */ 2 | export interface OpenDocDetail { 3 | doc: XMLDocument; 4 | docName: string; 5 | docId?: string; 6 | } 7 | export type OpenDocEvent = CustomEvent; 8 | export function newOpenDocEvent( 9 | doc: XMLDocument, 10 | docName: string, 11 | eventInitDict?: CustomEventInit> 12 | ): OpenDocEvent { 13 | return new CustomEvent('open-doc', { 14 | bubbles: true, 15 | composed: true, 16 | ...eventInitDict, 17 | detail: { doc, docName, ...eventInitDict?.detail }, 18 | }); 19 | } 20 | 21 | declare global { 22 | interface ElementEventMap { 23 | ['open-doc']: OpenDocEvent; 24 | } 25 | } -------------------------------------------------------------------------------- /packages/core/foundation/deprecated/validation.ts: -------------------------------------------------------------------------------- 1 | /** Represents a request for validation. */ 2 | export type ValidateEvent = CustomEvent; 3 | export function newValidateEvent( 4 | eventInitDict?: CustomEventInit 5 | ): ValidateEvent { 6 | return new CustomEvent('validate', { 7 | bubbles: true, 8 | composed: true, 9 | ...eventInitDict, 10 | }); 11 | } 12 | 13 | 14 | declare global { 15 | interface ElementEventMap { 16 | ['validate']: ValidateEvent; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/core/foundation/deprecated/waiter.ts: -------------------------------------------------------------------------------- 1 | /** Represents some work pending completion, upon which `promise` resolves. */ 2 | export interface PendingStateDetail { 3 | promise: Promise; 4 | } 5 | export type PendingStateEvent = CustomEvent; 6 | 7 | /** 8 | * @deprecated 9 | */ 10 | export function newPendingStateEvent( 11 | promise: Promise, 12 | eventInitDict?: CustomEventInit> 13 | ): PendingStateEvent { 14 | return new CustomEvent('pending-state', { 15 | bubbles: true, 16 | composed: true, 17 | ...eventInitDict, 18 | detail: { promise, ...eventInitDict?.detail }, 19 | }); 20 | } 21 | 22 | declare global { 23 | interface ElementEventMap { 24 | ['pending-state']: PendingStateEvent; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/core/foundation/edit-completed-event.ts: -------------------------------------------------------------------------------- 1 | import { Edit, Initiator } from './deprecated/edit-event.js'; 2 | 3 | import { EditorAction } from './deprecated/editor.js'; 4 | 5 | export type EditCompletedDetail = { 6 | edit: Edit | EditorAction; 7 | initiator: Initiator; 8 | }; 9 | 10 | /** Represents the intent to open `doc` with filename `docName`. */ 11 | export type EditCompletedEvent = CustomEvent; 12 | 13 | export function newEditCompletedEvent( 14 | edit: Edit | EditorAction, 15 | initiator: Initiator = 'user' 16 | ): EditCompletedEvent { 17 | return new CustomEvent('oscd-edit-completed', { 18 | bubbles: true, 19 | composed: true, 20 | detail: { 21 | edit: edit, 22 | initiator: initiator, 23 | }, 24 | }); 25 | } 26 | 27 | declare global { 28 | interface ElementEventMap { 29 | ['oscd-edit-completed']: EditCompletedEvent; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/core/foundation/edit-event.ts: -------------------------------------------------------------------------------- 1 | import { EditV2 } from './edit.js'; 2 | 3 | export type EditDetailV2 = EditEventOptionsV2 & { 4 | edit: E; 5 | }; 6 | 7 | export type EditEventV2 = CustomEvent< 8 | EditDetailV2 9 | >; 10 | 11 | type BaseEditEventOptionsV2 = { 12 | title?: string; 13 | squash?: boolean; 14 | } 15 | 16 | export type EditEventOptionsV2 = BaseEditEventOptionsV2 & { 17 | createHistoryEntry?: boolean; 18 | }; 19 | 20 | export function newEditEventV2( 21 | edit: E, 22 | options?: EditEventOptionsV2 23 | ): EditEventV2 { 24 | return new CustomEvent>('oscd-edit-v2', { 25 | composed: true, 26 | bubbles: true, 27 | detail: { ...options, edit }, 28 | }); 29 | } 30 | 31 | declare global { 32 | interface ElementEventMap { 33 | ['oscd-edit-v2']: EditEventV2; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/core/foundation/open-event.ts: -------------------------------------------------------------------------------- 1 | export type OpenDetail = { 2 | doc: XMLDocument; 3 | docName: string; 4 | }; 5 | 6 | /** Represents the intent to open `doc` with filename `docName`. */ 7 | export type OpenEvent = CustomEvent; 8 | 9 | export function newOpenEvent(doc: XMLDocument, docName: string): OpenEvent { 10 | return new CustomEvent('oscd-open', { 11 | bubbles: true, 12 | composed: true, 13 | detail: { doc, docName }, 14 | }); 15 | } 16 | 17 | declare global { 18 | interface ElementEventMap { 19 | ['oscd-open']: OpenEvent; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/core/foundation/plugin.ts: -------------------------------------------------------------------------------- 1 | import { targetLocales } from '../locales.js'; 2 | 3 | export type Plugin = { 4 | // name defines the name of the plugin 5 | name: string; 6 | // src defines the path to the plugins source file 7 | src: string; 8 | // kind defines the type of the plugin 9 | kind: PluginKind; 10 | // activeByDefault configures if the plugin should be active by default 11 | // this is will be user when users resets the plugins 12 | activeByDefault: boolean; 13 | // icon stores the icon name of the Material Icon 14 | icon?: string; 15 | // active shows if the plugin currently is active 16 | active?: boolean; 17 | // requireDoc shows if the plugin requires a document to be loaded 18 | requireDoc?: boolean; 19 | // position defines the position of menu plugins 20 | position?: MenuPosition 21 | translations?: Record<(typeof targetLocales)[number], string>; 22 | }; 23 | 24 | export type PluginSet = { menu: Plugin[]; editor: Plugin[] }; 25 | export type PluginKind = 'editor' | 'menu' | 'validator'; 26 | export const menuPosition = ['top', 'middle', 'bottom'] as const; 27 | export type MenuPosition = (typeof menuPosition)[number]; 28 | 29 | -------------------------------------------------------------------------------- /packages/core/lit-localize.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json", 3 | "sourceLocale": "en", 4 | "targetLocales": ["de"], 5 | "tsConfig": "./tsconfig.json", 6 | "output": { 7 | "mode": "runtime", 8 | "outputDir": "./locales", 9 | "localeCodesModule": "./locales.ts" 10 | }, 11 | "interchange": { 12 | "format": "xliff", 13 | "xliffDir": "./localization/" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/core/locales.ts: -------------------------------------------------------------------------------- 1 | // Do not modify this file by hand! 2 | // Re-generate this file by running lit-localize. 3 | 4 | /** 5 | * The locale code that templates in this source code are written in. 6 | */ 7 | export const sourceLocale = `en`; 8 | 9 | /** 10 | * The other locale codes that this application is localized into. Sorted 11 | * lexicographically. 12 | */ 13 | export const targetLocales = [ 14 | `de`, 15 | ] as const; 16 | 17 | /** 18 | * All valid project locale codes. Sorted lexicographically. 19 | */ 20 | export const allLocales = [ 21 | `de`, 22 | `en`, 23 | ] as const; 24 | -------------------------------------------------------------------------------- /packages/core/locales/de.ts: -------------------------------------------------------------------------------- 1 | 2 | // Do not modify this file by hand! 3 | // Re-generate this file by running lit-localize 4 | 5 | 6 | 7 | 8 | /* eslint-disable no-irregular-whitespace */ 9 | /* eslint-disable @typescript-eslint/no-explicit-any */ 10 | 11 | export const templates = { 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /packages/core/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/core", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "packages/core/src", 6 | "targets": {} 7 | } 8 | -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/app-bar-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/app-bar-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/app-bar-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/app-bar-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/document-name-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/document-name-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/document-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/document-name-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/editor-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/editor-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-selected-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/editor-plugins-selected-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-selected-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/editor-plugins-selected-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-with-doc-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/editor-plugins-with-doc-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-with-doc-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/editor-plugins-with-doc-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-entries-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-entries-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-redone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-entries-redone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-redone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-entries-redone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-undone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-entries-undone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-undone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-entries-undone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-screen-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-screen-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-screen-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/log-screen-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-drawer-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/menu-drawer-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-drawer-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/menu-drawer-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/menu-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/menu-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/app-bar-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/app-bar-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/app-bar-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/app-bar-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/document-name-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/document-name-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/document-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/document-name-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/editor-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/editor-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-selected-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/editor-plugins-selected-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-selected-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/editor-plugins-selected-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-with-doc-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/editor-plugins-with-doc-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-with-doc-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/editor-plugins-with-doc-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-entries-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-entries-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-redone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-entries-redone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-redone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-entries-redone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-undone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-entries-undone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-undone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-entries-undone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-screen-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-screen-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-screen-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/log-screen-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-drawer-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/menu-drawer-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-drawer-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/menu-drawer-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/menu-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/menu-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/app-bar-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/app-bar-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/app-bar-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/app-bar-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/document-name-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/document-name-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/document-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/document-name-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/editor-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/editor-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-selected-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/editor-plugins-selected-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-selected-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/editor-plugins-selected-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-with-doc-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/editor-plugins-with-doc-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-with-doc-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/editor-plugins-with-doc-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-entries-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-entries-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-redone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-entries-redone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-redone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-entries-redone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-undone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-entries-undone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-undone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-entries-undone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-screen-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-screen-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-screen-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/log-screen-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-drawer-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/menu-drawer-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-drawer-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/menu-drawer-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/menu-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/menu-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-en.png -------------------------------------------------------------------------------- /packages/core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "noEmitOnError": true, 7 | "lib": ["es2018", "dom"], 8 | "strict": true, 9 | "esModuleInterop": false, 10 | "allowSyntheticDefaultImports": true, 11 | "experimentalDecorators": true, 12 | "skipLibCheck": true, 13 | "declaration": true, 14 | "importHelpers": true, 15 | "outDir": "dist", 16 | "sourceMap": true, 17 | "inlineSources": true, 18 | "rootDir": "./", 19 | "tsBuildInfoFile": ".tsbuildinfo", 20 | "incremental": true 21 | }, 22 | "include": ["**/*.ts"] 23 | } 24 | -------------------------------------------------------------------------------- /packages/core/web-dev-server.config.js: -------------------------------------------------------------------------------- 1 | // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr'; 2 | 3 | /** Use Hot Module replacement by adding --hmr to the start command */ 4 | const hmr = process.argv.includes('--hmr'); 5 | 6 | export default /** @type {import('@web/dev-server').DevServerConfig} */ ({ 7 | open: '/demo/', 8 | /** Use regular watch mode if HMR is not enabled. */ 9 | watch: !hmr, 10 | /** Resolve bare module imports */ 11 | nodeResolve: { 12 | exportConditions: ['browser', 'development'], 13 | }, 14 | 15 | /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */ 16 | // esbuildTarget: 'auto' 17 | 18 | plugins: [ 19 | /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */ 20 | // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }), 21 | ], 22 | 23 | // See documentation for all available options 24 | }); 25 | -------------------------------------------------------------------------------- /packages/distribution/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | root: true, 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'import', 'html'], 6 | extends: [ 7 | 'eslint:recommended', 8 | 'plugin:@typescript-eslint/eslint-recommended', 9 | 'plugin:@typescript-eslint/recommended', 10 | 'plugin:import/errors', 11 | 'plugin:import/warnings', 12 | ], 13 | rules: { 14 | // disable the rule for all files 15 | '@typescript-eslint/explicit-function-return-type': 'off', 16 | '@typescript-eslint/no-non-null-assertion': 'off', 17 | 'import/named': 'off', 18 | 'import/no-unresolved': 'off', 19 | 'import/extensions': ['error', 'always', { ignorePackages: true }], 20 | 'import/no-duplicates': 'off', 21 | 'no-duplicate-imports': 'off', 22 | 'tsdoc/syntax': 'warn' 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/distribution/.gitignore: -------------------------------------------------------------------------------- 1 | ## editors 2 | /.idea 3 | /.vscode 4 | 5 | ## system files 6 | .DS_Store 7 | 8 | ## npm 9 | node_modules/ 10 | /npm-debug.log 11 | 12 | ## testing 13 | /coverage/ 14 | /**/dist/*.snap.dev.js 15 | 16 | ## docs 17 | /doc/ 18 | 19 | # build 20 | /_site/ 21 | /build/ 22 | /out-tsc/ 23 | -------------------------------------------------------------------------------- /packages/distribution/.nojekyll: -------------------------------------------------------------------------------- 1 | snowpack placeholder 2 | -------------------------------------------------------------------------------- /packages/distribution/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/distribution/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/favicon.ico -------------------------------------------------------------------------------- /packages/distribution/main.ts: -------------------------------------------------------------------------------- 1 | import '@openscd/open-scd/src/open-scd.js'; 2 | -------------------------------------------------------------------------------- /packages/distribution/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "OpenSCD", 3 | "name": "OpenSCD", 4 | "description": "An editor for XML files as described by IEC 61850-6", 5 | "categories": [ 6 | "productivity", 7 | "utilities", 8 | "engineering" 9 | ], 10 | "start_url": ".", 11 | "display": "standalone", 12 | "background_color": "#eee8d5", 13 | "theme_color": "#2aa198", 14 | "orientation": "any", 15 | "lang": "en-US", 16 | "dir": "ltr", 17 | "icons": [ 18 | { 19 | "src": "public/icon.svg", 20 | "sizes": "150x150", 21 | "type": "image/svg+xml", 22 | "purpose": "any monochrome" 23 | }, 24 | { 25 | "src": "public/icon-192x192.png", 26 | "sizes": "192x192", 27 | "type": "image/png", 28 | "purpose": "any" 29 | }, 30 | { 31 | "src": "public/icon-512x512.png", 32 | "sizes": "512x512", 33 | "type": "image/png", 34 | "purpose": "any" 35 | }, 36 | { 37 | "src": "public/maskable_icon.png", 38 | "sizes": "1024x1024", 39 | "type": "image/png", 40 | "purpose": "maskable" 41 | } 42 | ], 43 | "version": "0.36.0" 44 | } 45 | -------------------------------------------------------------------------------- /packages/distribution/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/distribution", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "application", 5 | "sourceRoot": "packages/distribution/src", 6 | "targets": {} 7 | } 8 | -------------------------------------------------------------------------------- /packages/distribution/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/distribution/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/favicon-16x16.png -------------------------------------------------------------------------------- /packages/distribution/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/favicon-32x32.png -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-mono-v13.css: -------------------------------------------------------------------------------- 1 | /* roboto-mono-300 - latin */ 2 | @font-face { 3 | font-family: 'Roboto Mono'; 4 | font-style: normal; 5 | font-weight: 300; 6 | src: local(''), 7 | url('roboto-mono-v13-latin-300.woff2') format('woff2'), /* Super Modern Browsers */ 8 | url('roboto-mono-v13-latin-300.woff') format('woff'), /* Modern Browsers */ 9 | url('roboto-mono-v13-latin-300.ttf') format('truetype'); /* Safari, Android, iOS */ 10 | } 11 | -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-300.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-300.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-300.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-500.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-500.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-500.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-regular.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27.css: -------------------------------------------------------------------------------- 1 | /* roboto-300 - latin */ 2 | @font-face { 3 | font-family: 'Roboto'; 4 | font-style: normal; 5 | font-weight: 300; 6 | src: local(''), 7 | url('roboto-v27-latin-300.woff2') format('woff2'), /* Super Modern Browsers */ 8 | url('roboto-v27-latin-300.woff') format('woff'), /* Modern Browsers */ 9 | url('roboto-v27-latin-300.ttf') format('truetype'); /* Safari, Android, iOS */ 10 | } 11 | /* roboto-regular - latin */ 12 | @font-face { 13 | font-family: 'Roboto'; 14 | font-style: normal; 15 | font-weight: 400; 16 | src: local(''), 17 | url('roboto-v27-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */ 18 | url('roboto-v27-latin-regular.woff') format('woff'), /* Modern Browsers */ 19 | url('roboto-v27-latin-regular.ttf') format('truetype'); /* Safari, Android, iOS */ 20 | } 21 | /* roboto-500 - latin */ 22 | @font-face { 23 | font-family: 'Roboto'; 24 | font-style: normal; 25 | font-weight: 500; 26 | src: local(''), 27 | url('roboto-v27-latin-500.woff2') format('woff2'), /* Super Modern Browsers */ 28 | url('roboto-v27-latin-500.woff') format('woff'), /* Modern Browsers */ 29 | url('roboto-v27-latin-500.ttf') format('truetype'); /* Safari, Android, iOS */ 30 | } 31 | -------------------------------------------------------------------------------- /packages/distribution/public/google/icons/material-icons-outlined.css: -------------------------------------------------------------------------------- 1 | /* fallback */ 2 | @font-face { 3 | font-family: 'Material Icons Outlined'; 4 | font-style: normal; 5 | font-weight: 400; 6 | font-display: block; 7 | src: url(material-icons-outlined.woff2) format('woff2'); 8 | } 9 | 10 | .material-icons-outlined { 11 | font-family: 'Material Icons Outlined'; 12 | font-weight: normal; 13 | font-style: normal; 14 | font-size: 24px; 15 | line-height: 1; 16 | letter-spacing: normal; 17 | text-transform: none; 18 | display: inline-block; 19 | white-space: nowrap; 20 | word-wrap: normal; 21 | direction: ltr; 22 | -webkit-font-feature-settings: 'liga'; 23 | -webkit-font-smoothing: antialiased; 24 | } 25 | -------------------------------------------------------------------------------- /packages/distribution/public/google/icons/material-icons-outlined.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/icons/material-icons-outlined.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/icons/material-symbols-outlined.css: -------------------------------------------------------------------------------- 1 | /* fallback */ 2 | @font-face { 3 | font-family: 'Material Symbols Outlined'; 4 | font-style: normal; 5 | font-weight: 400; 6 | font-display: block; 7 | src: url(material-symbols-outlined.woff2) format('woff2'); 8 | } 9 | 10 | .material-symbols-outlined { 11 | font-family: 'Material Symbols Outlined'; 12 | font-weight: normal; 13 | font-style: normal; 14 | font-size: 24px; 15 | line-height: 1; 16 | letter-spacing: normal; 17 | text-transform: none; 18 | display: inline-block; 19 | white-space: nowrap; 20 | word-wrap: normal; 21 | direction: ltr; 22 | -webkit-font-feature-settings: 'liga'; 23 | -webkit-font-smoothing: antialiased; 24 | } 25 | -------------------------------------------------------------------------------- /packages/distribution/public/google/icons/material-symbols-outlined.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/google/icons/material-symbols-outlined.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/icon-192x192.png -------------------------------------------------------------------------------- /packages/distribution/public/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/icon-512x512.png -------------------------------------------------------------------------------- /packages/distribution/public/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 7 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /packages/distribution/public/js/worker.js: -------------------------------------------------------------------------------- 1 | importScripts('xmlvalidate.js'); 2 | 3 | onmessage = function (e) { 4 | Module.ready.then(function (mod) { 5 | if (e.data.name.toLowerCase().endsWith('.xsd')) 6 | mod.init(e.data.content, e.data.name); 7 | else mod.validate(e.data.content, e.data.name); 8 | }); 9 | }; 10 | -------------------------------------------------------------------------------- /packages/distribution/public/js/xmlvalidate.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/js/xmlvalidate.wasm -------------------------------------------------------------------------------- /packages/distribution/public/maskable_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/maskable_icon.png -------------------------------------------------------------------------------- /packages/distribution/public/monochrome_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/monochrome_icon.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/mstile-144x144.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/mstile-150x150.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/mstile-310x150.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/mstile-310x310.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/mstile-70x70.png -------------------------------------------------------------------------------- /packages/distribution/public/xml/CC-EULA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/distribution/public/xml/CC-EULA.pdf -------------------------------------------------------------------------------- /packages/distribution/public/xml/Disclaimer.md: -------------------------------------------------------------------------------- 1 | **CC-EULA License Requirement**: The files within this directory are subject to the CC-EULA (Creative Commons End User License Agreement) license. Users are required to adhere to the terms and conditions specified in the CC-EULA for the use, distribution, and modification of these files. 2 | 3 | **NSD Files (IEC Code Components) Unmodified**: It is hereby stated that no modifications have been made to the NSD files (IEC Code Components) in this directory. Users are expected to utilize these files in their original form as provided. 4 | 5 | **Modification Restrictions for NSD Files**: In the event that modifications to the NSD files are necessary, it is imperative that any changes comply with the guidelines established by the IEC relevant working groups (TC57). Unauthorized modifications are strictly prohibited. Changes must be submitted through the appropriate channels within the IEC working groups. 6 | 7 | **Applicability to Maintainers, Contributors, and Downstream Users**: These notes apply to maintainers, contributors, and external downstream users of the files within this directory. All individuals and entities interacting with these files are bound by the specified license and guidelines, and any deviations from these terms are not permitted. 8 | 9 | Please ensure strict adherence to these conditions to maintain the integrity of the files and compliance with the relevant licensing and standards. 10 | -------------------------------------------------------------------------------- /packages/distribution/snowpack.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | packageOptions: { 3 | external: [ 4 | '@web/dev-server-core', 5 | '@web/dev-server-esbuild', 6 | 'esbuild', 7 | 'crypto', 8 | ], 9 | }, 10 | exclude: [ 11 | '**/*.@(spec|test).@(js|mjs)', 12 | '**/test/**/*', 13 | '**/out-tsc/**/*', 14 | '**/.editorconfig', 15 | '**/.eslintrc.cjs', 16 | '**/.git/**/*', 17 | '**/.gitignore', 18 | '**/.idea/**/*', 19 | '**/.travis.yml', 20 | '**/package*', 21 | '**/tsconfig.json', 22 | '**/web-test-runner.config.mjs', 23 | '**/node_modules/**/*', 24 | ], 25 | workspaceRoot: '../../', 26 | mount: { 27 | './': '/', 28 | '../plugins/': '/plugins/', 29 | '../openscd/': '/openscd/', 30 | '../external-plugins/': '/external-plugins/', 31 | }, 32 | alias: { 33 | '@openscd/open-scd': '../openscd/', 34 | '@openscd/plugins': '../plugins/', 35 | }, 36 | buildOptions: { 37 | baseUrl: process.env.PUBLIC_URL || '/', 38 | }, 39 | }; 40 | -------------------------------------------------------------------------------- /packages/distribution/sw.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('install', e => { 2 | console.log('Dev (dummy, non-caching) service worker installed'); 3 | }); 4 | 5 | self.addEventListener('fetch', e => { 6 | e.respondWith(fetch(e.request)); 7 | }); 8 | 9 | self.addEventListener('activate', e => { 10 | console.log('Dev (dummy, non-caching) service worker activated'); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/distribution/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "noEmitOnError": true, 7 | "lib": ["es2020", "dom"], 8 | "strict": true, 9 | "esModuleInterop": false, 10 | "allowSyntheticDefaultImports": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "allowJs": true, 14 | "skipLibCheck": true, 15 | "outDir": "out-tsc", 16 | "sourceMap": true, 17 | "inlineSources": true, 18 | "resolveJsonModule": true, 19 | "rootDir": "./" 20 | }, 21 | "include": ["**/*.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/distribution/workbox-config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | globDirectory: 'build/', 3 | globPatterns: [ 4 | 'public/**/*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}', 5 | 'src/**/*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}', 6 | '*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}', 7 | ], 8 | swDest: 'build/sw.js', 9 | runtimeCaching: [ 10 | { 11 | urlPattern: /.*/, 12 | handler: 'NetworkFirst', 13 | }, 14 | ], 15 | skipWaiting: true, 16 | inlineWorkboxRuntime: true, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/openscd/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | root: true, 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'import', 'html'], 6 | extends: [ 7 | 'eslint:recommended', 8 | 'plugin:@typescript-eslint/eslint-recommended', 9 | 'plugin:@typescript-eslint/recommended', 10 | 'plugin:import/errors', 11 | 'plugin:import/warnings', 12 | ], 13 | rules: { 14 | // disable the rule for all files 15 | '@typescript-eslint/explicit-function-return-type': 'off', 16 | '@typescript-eslint/no-non-null-assertion': 'off', 17 | 'import/named': 'off', 18 | 'import/no-unresolved': 'off', 19 | 'import/extensions': ['error', 'always', { ignorePackages: true }], 20 | 'import/no-duplicates': 'off', 21 | 'no-duplicate-imports': 'off', 22 | 'tsdoc/syntax': 'warn' 23 | }, 24 | env: { 25 | browser: true, 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/openscd/.gitignore: -------------------------------------------------------------------------------- 1 | ## editors 2 | /.idea 3 | /.vscode 4 | 5 | ## system files 6 | .DS_Store 7 | 8 | ## npm 9 | node_modules/ 10 | /npm-debug.log 11 | 12 | ## testing 13 | /coverage/ 14 | /**/dist/*.snap.dev.js 15 | 16 | ## docs 17 | /doc/ 18 | 19 | # build 20 | /_site/ 21 | /build/ 22 | /dist/ 23 | -------------------------------------------------------------------------------- /packages/openscd/.nojekyll: -------------------------------------------------------------------------------- 1 | snowpack placeholder 2 | -------------------------------------------------------------------------------- /packages/openscd/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/openscd/favicon.ico -------------------------------------------------------------------------------- /packages/openscd/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/open-scd", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "application", 5 | "sourceRoot": "packages/openscd/src", 6 | "targets": { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Add-DAType-from-templates.md: -------------------------------------------------------------------------------- 1 | As an example this page shows you how to import `DAType` from the templates database. E.g. the `PulseConfig`. 2 | 3 | 1. Open **Template editor** 4 | 2. Click the **Add DAType** button 5 | 3. Select *PulseConfig* from **values** 6 | 4. Don't forget the **id** field 7 | 6. Click on **Save** 8 | 9 | OpenSCD automatically imports all element that are required for a valid definition of a `DAType`. When you do that with an empty project your result should look like this 10 | 11 | ![grafik](https://user-images.githubusercontent.com/66802940/133637394-354eba41-a4b6-4e3c-9458-88b1e608866c.png) -------------------------------------------------------------------------------- /packages/openscd/public/md/Add-DOType-from-templates.md: -------------------------------------------------------------------------------- 1 | As an example this page shows you how to import `DOType` from the templates database. 2 | 3 | 1. Open **Template editor** 4 | 2. Click the **Add DOType** button 5 | 3. Select *DPC* from **values** 6 | 4. Don't forget the **id** field 7 | 6. Click on **Save** 8 | 9 | OpenSCD automatically imports all element that are required for a valid definition of a `DOType`. When you do that with an empty project your result should look like this 10 | 11 | ![grafik](https://user-images.githubusercontent.com/66802940/133636784-d1dbe4e6-7402-479e-8357-9d806d49a785.png) -------------------------------------------------------------------------------- /packages/openscd/public/md/Add-LNodeType-from-templates.md: -------------------------------------------------------------------------------- 1 | As an example this page shows you how to import a `LNodeType` `CSWI` from the templates database. 2 | 3 | 1. Open **Template editor** 4 | 2. Click the **Add LNodeType** button 5 | 3. Select pre-defined logical node class e.g. _CSWI: ... no process bus(PB)_ as **lnClass** 6 | 4. Don't forget the **id** field 7 | 5. Click on **Save** 8 | 9 | OpenSCD automatically imports all element that are required for a valid definition of a `LNodeType` `CSWI`. When you do that with an empty project your result should look like this 10 | 11 | ![grafik](https://user-images.githubusercontent.com/66802940/133465609-18195262-31b3-4fae-a514-88a721b30dfb.png) 12 | -------------------------------------------------------------------------------- /packages/openscd/public/md/All-template-editor-wizards.md: -------------------------------------------------------------------------------- 1 | The **template editor** allows you to create the elements that combined is the data model. To do this job there are 10 wizards pages for each of the elements you can find in the `DataTypeTemplates` section. 2 | 3 | - [EnumType](https://github.com/openscd/open-scd/wiki/Enumeration-EnumType) 4 | - [EnumVal](https://github.com/openscd/open-scd/wiki/Enumeration-EnumVal) 5 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Bay.md: -------------------------------------------------------------------------------- 1 | **Create Bay** 2 | 3 | grafik 4 | 5 | To create a new `Bay` element within the parent `VoltageLevel` 6 | 7 | - Navigate to the **Substation** editor 8 | - Select the parent **VoltageLevel** you want to add the bay to 9 | - Fill in all required value 10 | - Click on **Add** 11 | 12 | The create wizard allows to set 13 | 14 | - `name`: unique identified of the Bay in the parent `VoltageLevel` 15 | - `desc`: human readable description 16 | 17 | **Edit Bay** 18 | 19 | grafik 20 | 21 | To edit a `Bay` element: 22 | 23 | - Navigate to the **Substation** editor 24 | - Select the **Bay** you want to edit 25 | - Click on the **edit** button 26 | - Make the changes and click **Save** 27 | 28 | The element `Bay` has two attributes 29 | 30 | - `name`: unique identified of the Bay in the parent `VoltageLevel` 31 | - `desc`: human readable description 32 | 33 | **Remove Bay** 34 | 35 | To remove an existing `Bay` element within the parent `VoltageLevel` 36 | 37 | - Navigate to the **Substation** editor 38 | - Select the **Bay** you want to remove 39 | - Click on the **delete** button 40 | -------------------------------------------------------------------------------- /packages/openscd/public/md/ClientLN.md: -------------------------------------------------------------------------------- 1 | A `ClientLN` is one of 3 elements that are describing connections between IEDs in a SCL file. 2 | 3 | **HowTo connect Report with ClientLNs** 4 | 5 | OpenSCD allows you to connect `ReportControl` via `ClientLN`. The starting point is the **IED** in the **Substation** editor. 6 | 7 | alt text 8 | 9 | - Click on an **IED** 10 | - Click on **Add connection** button 11 | - The `ClientLN` wizard open 12 | - On the left hand side you can select the `ReportControl` element(s) in the project 13 | - On the right hand side you can see all logical node in the receiving IED (client). 14 | - All so-called client logical nodes - logical nodes allocated to `AccessPoint` are sorted be be on top. 15 | - `LN0` element are sorted to be at the bottom 16 | - Click on `CONNECT` 17 | 18 | ![grafik](https://user-images.githubusercontent.com/66802940/133251594-7d552b24-e64f-4875-932a-07c990c0c7ac.png) 19 | 20 | > NOTE: When `ClientLN` connections are already present in the `Report Control` block the wizard does not close on **CONNECT** 21 | 22 | > NOTE: If the `RptEnabled` `max` attribute is smaller or equal to the `ClientLN` a connection is not possible. The `ReportControl` on the right hand side is disabled. 23 | 24 | > TIP: You can filter for several terms at same time. The space between terms is acting as a logical AND. 25 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Enumeration-EnumVal.md: -------------------------------------------------------------------------------- 1 | 2 | **Add EnumVal** 3 | 4 | You can use OpenSCD to add new `EnumVal`s to an existing `EnumType`. 5 | 6 | alt text 7 | 8 | 1. Navigate to the `EnumType` you want to add a `EnumVal` to open the **Edit EnumType** wizard. 9 | 2. Click on **ENUM VALUE** button in the middle of the wizard. 10 | 11 | *Settings*: 12 | 1. **ord***: Must be unique within the `EnumType`. 13 | 2. **desc**: user-defined description field 14 | 3. **value***: The enumeration value as string. 15 | 16 |   17 | 18 | **Edit EnumVal** 19 | 20 | You can edit existing `EnumVal` element to for example fix issues. 21 | 22 | 1. Navigate to the `EnumType` that contains the `EnumVal` you want to edit 23 | 2. Open the **Edit EnumType** page and click on the `EnumVal` you want to edit the **Edit Enum** wizard. 24 | 25 | *Settings*: 26 | 1. **ord***: Must be unique within the `EnumType`. 27 | 2. **desc**: user-defined description field 28 | 3. **value***: The enumeration value as string. 29 | 30 | 31 |   32 | 33 | *Example:* 34 | ``` 35 | on 36 | ``` 37 | 38 | 39 | 40 | **Remove EnumVal** 41 | 42 | Removing `EnumVal` from `EnumType` might be necessary from time to time to adapt to the definition to vendor specific data model. Es an exampled you can often see that `BehaviorModeKind` to consist of on, test and off only. (test/blocked and on-blocked are removed) 43 | 44 | 1. Open the `EnumVal` you want to remove in **Edit EnumVal** wizard 45 | 2. Click on **Remove** 46 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Extensions.md: -------------------------------------------------------------------------------- 1 | OpenSCD uses extensions to provide built-in functionality and to allow additional functionality beyond the OpenSCD defaults. 2 | 3 | Utilities, IED manufacturers, system integrators or other parties can create extensions and provide an interface for viewing or modifying SCL (including modification of private namespaces). 4 | 5 | There are three types of extensions: 6 | 7 | 1. _Menu_ extensions - shown on the project menu after enabling them. 8 | 2. _Editor_ extensions - shown in the main window after enabling them. 9 | 3. _Validator_ extensions - ensure file compliance with a schema or design rules. 10 | 11 | To enable extensions, open the project menu by clicking on the top three lines in the top left, scrolling to the bottom and selecting the _Extensions_ item. 12 | Then select and deselect functionality. 13 | If you are confident in the source of a custom extension, you can also add an extension from a URL. 14 | 15 | > NOTE: Infrequently used or in-development extensions are disabled by default. 16 | 17 | > NOTE: Where there are many editor extensions, scroll through them by using Shift + Wheel Mouse button. 18 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Global-SCL-manipulation.md: -------------------------------------------------------------------------------- 1 | This page explains with features that are not related to a specific process within a SCL. They have a global character and can be used for a lot of different task. At the moment these is a 2 | 3 | - [Merge functionality](https://github.com/openscd/open-scd/wiki/Merge-functionality) 4 | - [XML editor](https://github.com/openscd/open-scd/wiki/XML-code-editor) - pro mode -------------------------------------------------------------------------------- /packages/openscd/public/md/Home.md: -------------------------------------------------------------------------------- 1 | This is an open repository of information on OpenSCD and IEC 61850-6. You are welcome to share your knowledge with the rest of the world at https://github.com/openscd/open-scd/wiki/Home/_edit 😄 . Welcome aboard! 2 | 3 | You can find information related to topics like 4 | 5 | - [Installation](https://github.com/openscd/open-scd/wiki/Install-OpenSCD) 6 | - [Interface](https://github.com/openscd/open-scd/wiki/Interface) 7 | - [Project workflow](https://github.com/openscd/open-scd/wiki/Project-workflow) 8 | - [Validators used in OpenSCD](https://github.com/openscd/open-scd/wiki/Validators) 9 | - [Extensions](https://github.com/openscd/open-scd/wiki/Extensions) 10 | 11 | as well as features that allow you to manipulate or add specific information to the project covering 12 | 13 | - [Substation section](https://github.com/openscd/open-scd/wiki/Substation-Section-Basics) 14 | - [Communication section](https://github.com/openscd/open-scd/wiki/Communication-Basics) 15 | - [IED section](https://github.com/openscd/open-scd/wiki/IED) 16 | - [DataTypeTemplate section](https://github.com/openscd/open-scd/wiki/DataTypeTemplates) 17 | - [Global SCL manipulation capability](https://github.com/openscd/open-scd/wiki/Global-SCL-manipulation) 18 | -------------------------------------------------------------------------------- /packages/openscd/public/md/IED.md: -------------------------------------------------------------------------------- 1 | Here you can learn how to configure `IED`s with **OpenSCD**. 2 | 3 | ## Create virtual IED 4 | 5 | - [Create SPECIFICATION IED](https://github.com/openscd/open-scd/wiki/Create-Specification-IED-from-functions) 6 | 7 | ## Edit/create/delete control blocks 8 | 9 | - [GSEControl](https://github.com/openscd/open-scd/wiki/Generic-Substation-Event-Basics) (`GOOSE`) 10 | - [SampledValueControl](https://github.com/openscd/open-scd/wiki/Sampled-Values-Basics) 11 | - [ReportControl](https://github.com/openscd/open-scd/wiki/Report-Basics) 12 | 13 | ## Communication mappings 14 | 15 | - [Create report connections](https://github.com/openscd/open-scd/wiki/ClientLN) (`ClientLN`) 16 | - [Create GOOSE connection](https://github.com/openscd/open-scd/wiki/Subscriber-basics) 17 | - [Create Sampled Value connections](https://github.com/openscd/open-scd/wiki/Subscriber-basics) 18 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Interface.md: -------------------------------------------------------------------------------- 1 | OpenSCD makes extensive use of lists which allow filtering by a search query. 2 | 3 | You can use wildcards as part of a search query: 4 | 5 | * A question mark, `?` will match any single character 6 | * An asterisk, `*` will match one or more characters 7 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Power-Transformer.md: -------------------------------------------------------------------------------- 1 | **Create PowerTransformer** 2 | 3 | grafik 4 | 5 | To create a new `PowerTransformer` element within the parent `Bay`, `VoltageLevel` or `Substation` 6 | 7 | - Navigate to the **Substation** editor 8 | - Select the parent you want to add the power transformer to 9 | - Fill in all required values 10 | - Click on **Add** 11 | 12 | The create wizard allows to set 13 | 14 | - `type`: is fixed to `PTR` 15 | - `name`: unique identified of the power transformer in the parent 16 | - `desc`: human readable description 17 | 18 | **Edit PowerTransformer** 19 | 20 | grafik 21 | 22 | To edit a `PowerTransformer` element: 23 | 24 | - Navigate to the **Substation** editor 25 | - Select the **PowerTransformer** you want to edit 26 | - Click on the **edit** button 27 | - Make the changes and click **Save** 28 | 29 | The element `PowerTransformer` has two attributes 30 | 31 | - `name`: unique identified of the Bay in the parent 32 | - `desc`: human readable description 33 | - `type`: fixed to `PTR` 34 | 35 | **Remove PowerTransformer** 36 | 37 | To remove an existing `PowerTransformer` element within the parent `Bay` 38 | 39 | - Navigate to the **Substation** editor 40 | - Select the **PowerTransformer** you want to remove 41 | - Click on the **delete** button 42 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Project-workflow.md: -------------------------------------------------------------------------------- 1 | This page is related to topics concerning project workflow within **OpenSCD**. One of the basic goals of **OpenSCD** is to save the information in the project exclusivity to SCL files and while doing so to avoid `private` elements where possible. To be more precise we try to avoid to put information to namespaces that are not defined by the standard. This shall ensure the likelihood for interoperability in multi vendor projects. Avoiding `private` element does not mean that OpenSCD removes any. In fact for the time being OpenSCD just ignores private section. 2 | 3 | As all information in **OpenSCD** are saved to SCL files and not some proprietary file formats a project is equal to a SCL file. 4 | 5 | ### Create new project 6 | 1. Open **OpenSCD** 7 | 2. Click on **New project** 8 | 9 | ### Open project 10 | 1. Navigate to the **Menu** 11 | 2. Click **Open project** 12 | 13 | > NOTE: You can open any kind of SCL type. 14 | 15 | ### Import information from other SCL files 16 | See more information in [Import IEDs](https://github.com/openscd/open-scd/wiki/Import-IEDs) 17 | 18 | ### Save project 19 | 20 | See more information in [Save project to SCL](https://github.com/openscd/open-scd/wiki/Save-project) -------------------------------------------------------------------------------- /packages/openscd/public/md/Save-project.md: -------------------------------------------------------------------------------- 1 | One of the things that user might be different in OpenSCD compared to a desktop application is **Save project**. As OpenSCD runs in the browser we use the browser standard behavior to save files and in most browsers this means that the file is downloaded in the download folder on your machine directly. 2 | 3 | HOWEVER, you can change this standard behavior. In Chrome and Chromium, this setting is called **Ask where to save each file before downloading**. -------------------------------------------------------------------------------- /packages/openscd/public/md/Substation-Section-Basics.md: -------------------------------------------------------------------------------- 1 | The so-called substation section does have two variants of element. The first one we will refer to as process type elements or process structure that allow to create the physically visible structure in the substation. This process structure consists of the elements: 2 | 3 | - [Substation](https://github.com/openscd/open-scd/wiki/Substation) 4 | - [Voltage Level](https://github.com/openscd/open-scd/wiki/Voltage-Level) 5 | - [Bay](https://github.com/openscd/open-scd/wiki/Bay) 6 | - [Conducting Equipment](https://github.com/openscd/open-scd/wiki/Conducting-Equipment) 7 | - `General Equipment` (not yet implemented) 8 | - [Conducting Equipment](https://github.com/openscd/open-scd/wiki/Power-Transformer) 9 | - `Transformer Winding` (not yet implemented) 10 | - `Neutral Winding` (not yet implemented) 11 | - `Line` (not yet implemented) 12 | - `Process` (not yet implemented) 13 | 14 | the other type of elements we call function type elements or functional structure that consist of the following elements: 15 | 16 | - [Function](https://github.com/openscd/open-scd/wiki/Function) 17 | - [SubFunction](https://github.com/openscd/open-scd/wiki/Function) 18 | - [EqFunction](https://github.com/openscd/open-scd/wiki/Function) 19 | - [EqSubFunction](https://github.com/openscd/open-scd/wiki/Function) 20 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Substation.md: -------------------------------------------------------------------------------- 1 | **Create Substation** 2 | 3 | grafik 4 | 5 | To create a new `Substation` element within the SCL root element 6 | 7 | - Navigate to the **Substation** editor 8 | - Click on the **Add mode** button on the upper right of the editor pane 9 | - Fill in all required value 10 | - Chose if the [substation structure shall be created automatically](https://github.com/openscd/open-scd/wiki/Guess-substation-structure) 11 | - Click on **Add** 12 | 13 | The create wizard allows to set 14 | 15 | - `name`: unique identified of the substation in the SCL root element 16 | - `desc`: human readable description 17 | 18 | **Edit Substation** 19 | 20 | grafik 21 | 22 | To edit a `Substation` element: 23 | 24 | - Navigate to the **Substation** editor 25 | - Select the **Substation** you want to edit 26 | - Click on the **edit** button 27 | - Make the changes and click **Save** 28 | 29 | The element `Substation` has two attributes 30 | 31 | - `name`: unique identified of the substation in the SCL root element 32 | - `desc`: human readable description 33 | 34 | **Remove Substation** 35 | 36 | To remove an existing `Substation` element within the SCL root element 37 | 38 | - Navigate to the **Substation** editor 39 | - Select the **Substation** you want to remove 40 | - Click on the **delete** button 41 | -------------------------------------------------------------------------------- /packages/openscd/public/md/Validate-schema.md: -------------------------------------------------------------------------------- 1 | Schema validation is the most important validation tool. It is crucial to make sure that there are no schema related issues latest on saving the project, as the schema defines the SCL structure it therefore ensures interoperability and should be a minimal requirement. 2 | 3 | Under the hood we are using the industry standard to do schema validation [libxml2](https://en.wikipedia.org/wiki/Libxml2). The external library can be used by other web based tools as well. We have create another repository [xmlvalidate.js](https://github.com/openscd/xmlvalidate.js) that allows you to use the schema validation. 4 | 5 | The results/issues are show in the **diagnostics** pane and als important when there are no issues and the schema validation is successful. This at the end what you want to see :). -------------------------------------------------------------------------------- /packages/openscd/public/md/Validators.md: -------------------------------------------------------------------------------- 1 | Validators are the backbone of this editor. It is very tricky to handle the complexity of an SCL file without it. This is especially true for people just working with SCL files and OpenSCD. In most cases, we try to avoid producing invalid files, but especially in **expert mode**, it is not always possible. 2 | 3 | There are two validation functions implemented at the moment. Both are triggered on opening an project or creating a new project. So every time the project basis change. And all validators are triggered on every editor action. That means every time there are changes in the project basis. All results are displayed in the **diagnostics** pane (Ctrl D) and are group by the validation function 4 | 5 | 6 | 1. [Schema validator](https://github.com/openscd/open-scd/wiki/Validate-schema) 7 | 2. [Templates validator](https://github.com/openscd/open-scd/wiki/Validate-template) -------------------------------------------------------------------------------- /packages/openscd/public/md/XML-code-editor.md: -------------------------------------------------------------------------------- 1 | 2 | With **OpenSCD** elements are manipulated with so-called wizard pages. If such a page has not been created yet for an element you want to manipulate or you just are curious how this element looks like in the XML we have added a **pro mode** that you can select in **Settings** 3 | 4 | alt text 5 | 6 | 1. Open **Menu** 7 | 2. Click on **Setting** 8 | 3. Click on switch **pro mode** 9 | 10 | 11 | 12 | Once this is done you can open any wizard page e.g. **Edit Substation**. You can see a toggle button on the upper right corner. If you click this toggle button the wizard page disappears and the XML code editor appear containing the element in raw XML. 13 | 14 | ![grafik](https://user-images.githubusercontent.com/66802940/133257710-ba6a8824-c51c-48f6-8e93-49125332bd28.png) 15 | 16 | > NOTE: This is a feature for experienced users. You can also use this feature to change SCL content. Behind the scenes the element will be exchanged completely with the updated version. Of course you can undo anytime. 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/openscd/public/xml/CC-EULA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/openscd/public/xml/CC-EULA.pdf -------------------------------------------------------------------------------- /packages/openscd/public/xml/Disclaimer.md: -------------------------------------------------------------------------------- 1 | **CC-EULA License Requirement**: The files within this directory are subject to the CC-EULA (Creative Commons End User License Agreement) license. Users are required to adhere to the terms and conditions specified in the CC-EULA for the use, distribution, and modification of these files. 2 | 3 | **NSD Files (IEC Code Components) Unmodified**: It is hereby stated that no modifications have been made to the NSD files (IEC Code Components) in this directory. Users are expected to utilize these files in their original form as provided. 4 | 5 | **Modification Restrictions for NSD Files**: In the event that modifications to the NSD files are necessary, it is imperative that any changes comply with the guidelines established by the IEC relevant working groups (TC57). Unauthorized modifications are strictly prohibited. Changes must be submitted through the appropriate channels within the IEC working groups. 6 | 7 | **Applicability to Maintainers, Contributors, and Downstream Users**: These notes apply to maintainers, contributors, and external downstream users of the files within this directory. All individuals and entities interacting with these files are bound by the specified license and guidelines, and any deviations from these terms are not permitted. 8 | 9 | Please ensure strict adherence to these conditions to maintain the integrity of the files and compliance with the relevant licensing and standards. 10 | -------------------------------------------------------------------------------- /packages/openscd/src/WizardDivider.ts: -------------------------------------------------------------------------------- 1 | import { 2 | css, 3 | customElement, 4 | html, 5 | LitElement, 6 | property, 7 | TemplateResult, 8 | } from 'lit-element'; 9 | 10 | @customElement('wizard-divider') 11 | export class WizardDividerElement extends LitElement { 12 | @property({ 13 | type: String, 14 | }) 15 | header?: string; 16 | 17 | render(): TemplateResult { 18 | return html` ${this.renderHeader()} ${this.renderSeparator()}`; 19 | } 20 | 21 | private renderHeader(): TemplateResult { 22 | if (!this.header) { 23 | return html``; 24 | } 25 | 26 | return html`

${this.header}

`; 27 | } 28 | 29 | private renderSeparator(): TemplateResult { 30 | return html`
`; 31 | } 32 | 33 | static styles = css` 34 | div { 35 | height: 0px; 36 | margin: 10px 0px 10px 0px; 37 | border-top: none; 38 | border-right: none; 39 | border-left: none; 40 | border-image: initial; 41 | border-bottom: 1px solid rgba(0, 0, 0, 0.12); 42 | } 43 | `; 44 | } 45 | -------------------------------------------------------------------------------- /packages/openscd/src/addons/editor/edit-v1-to-v2-converter.ts: -------------------------------------------------------------------------------- 1 | import { Edit, EditV2, isComplex, isInsert, isNamespaced, isRemove, isUpdate, Update } from '@openscd/core'; 2 | 3 | export function convertEditV1toV2(edit: Edit): EditV2 { 4 | if (isComplex(edit)) { 5 | return edit.map(convertEditV1toV2); 6 | } else if (isRemove(edit)) { 7 | return edit as EditV2; 8 | } else if (isInsert(edit)) { 9 | return edit as EditV2; 10 | } else if (isUpdate(edit)) { 11 | return convertUpdate(edit); 12 | } else { 13 | throw new Error('Unknown edit type'); 14 | } 15 | } 16 | 17 | function convertUpdate(edit: Update): EditV2 { 18 | const attributes: Partial> = {}; 19 | const attributesNS: Partial< 20 | Record>> 21 | > = {}; 22 | 23 | Object.entries(edit.attributes).forEach(([key, value]) => { 24 | if (isNamespaced(value!)) { 25 | const ns = value.namespaceURI; 26 | if (!ns) return; 27 | 28 | if (!attributesNS[ns]) { 29 | attributesNS[ns] = {}; 30 | } 31 | attributesNS[ns]![key] = value.value; 32 | } else attributes[key] = value; 33 | }); 34 | 35 | return { element: edit.element, attributes, attributesNS }; 36 | } 37 | -------------------------------------------------------------------------------- /packages/openscd/src/foundation/nsd.ts: -------------------------------------------------------------------------------- 1 | export const iec6185074 = fetch('public/xml/IEC_61850-7-4_2007B3.nsd') 2 | .then(response => response.text()) 3 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 4 | 5 | export const iec6185073 = fetch('public/xml/IEC_61850-7-3_2007B3.nsd') 6 | .then(response => response.text()) 7 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 8 | 9 | export const iec6185072 = fetch('public/xml/IEC_61850-7-2_2007B3.nsd') 10 | .then(response => response.text()) 11 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 12 | 13 | export const iec6185081 = fetch('public/xml/IEC_61850-8-1_2003A2.nsd') 14 | .then(response => response.text()) 15 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); -------------------------------------------------------------------------------- /packages/openscd/src/icons/compare.ts: -------------------------------------------------------------------------------- 1 | import { svg } from "lit-html"; 2 | 3 | export const elementIcon = svg` 4 | 5 | `; 6 | 7 | export const attributeIcon = svg` 8 | 9 | `; 10 | 11 | export const contentIcon = svg` 12 | 13 | `; 14 | -------------------------------------------------------------------------------- /packages/openscd/src/icons/ied-icons.ts: -------------------------------------------------------------------------------- 1 | import { svg } from "lit-element"; 2 | 3 | export const accessPointIcon = svg` 4 | 5 | `; 6 | 7 | export const serverIcon = svg` 8 | 9 | `; 10 | 11 | export const logicalDeviceIcon = svg` 12 | 13 | `; -------------------------------------------------------------------------------- /packages/openscd/src/plugin-tag.ts: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Hashes `uri` using cyrb64 analogous to 4 | * https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js . 5 | * @returns a valid customElement tagName containing the URI hash. 6 | */ 7 | export function pluginTag(uri: string): string { 8 | let h1 = 0xdeadbeef, 9 | h2 = 0x41c6ce57; 10 | for (let i = 0, ch; i < uri.length; i++) { 11 | ch = uri.charCodeAt(i); 12 | h1 = Math.imul(h1 ^ ch, 2654435761); 13 | h2 = Math.imul(h2 ^ ch, 1597334677); 14 | } 15 | h1 = 16 | Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ 17 | Math.imul(h2 ^ (h2 >>> 13), 3266489909); 18 | h2 = 19 | Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ 20 | Math.imul(h1 ^ (h1 >>> 13), 3266489909); 21 | return 'oscd-plugin' + 22 | ((h2 >>> 0).toString(16).padStart(8, '0') + 23 | (h1 >>> 0).toString(16).padStart(8, '0')) 24 | } 25 | -------------------------------------------------------------------------------- /packages/openscd/src/plugin.events.ts: -------------------------------------------------------------------------------- 1 | import { Plugin, PluginKind } from './plugin.js'; 2 | 3 | /** 4 | * The configure plugin event allows the plugin to request that OpenSCD core add, remove, or reconfigure a plugin. 5 | */ 6 | export type ConfigurePluginDetail = { 7 | name: string; 8 | // The API describes only 'menu' and 'editor' kinds b 9 | // but we still use the 'validator' too, so I just use the type PluginKind 10 | kind: PluginKind; 11 | config: Plugin | null; 12 | }; 13 | 14 | export type ConfigurePluginEvent = CustomEvent; 15 | 16 | /** 17 | * The combination of name and kind uniquely identifies the plugin to be configured. 18 | * If config is null, the plugin is removed. Otherwise, the plugin is added or reconfigured. 19 | */ 20 | export function newConfigurePluginEvent(name: string, kind: PluginKind, config: Plugin | null): ConfigurePluginEvent { 21 | return new CustomEvent('oscd-configure-plugin', { 22 | bubbles: true, 23 | composed: true, 24 | detail: { name, kind, config }, 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /packages/openscd/src/plugin.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit-element'; 2 | import { Plugin as CorePlugin } from "@openscd/core" 3 | 4 | export type Plugin = CorePlugin & { 5 | official?: boolean; 6 | active: boolean; 7 | content?: () => TemplateResult; 8 | }; 9 | 10 | export type PluginConfig = PluginConfigNotMenu | PluginConfigMenu 11 | 12 | export type PluginConfigNotMenu = Omit & { 13 | kind: 'editor' | 'validator'; 14 | } 15 | 16 | export type PluginConfigMenu = Omit & { 17 | kind: 'menu'; 18 | position: MenuPosition; 19 | } 20 | 21 | export type InstalledOfficialPlugin = Plugin & { 22 | src: string; 23 | official: true; 24 | installed: boolean; 25 | }; 26 | 27 | export type PluginKind = 'editor' | 'menu' | 'validator'; 28 | export const menuPosition = ['top', 'middle', 'bottom'] as const; 29 | export type MenuPosition = (typeof menuPosition)[number]; 30 | 31 | -------------------------------------------------------------------------------- /packages/openscd/src/translations/loader.ts: -------------------------------------------------------------------------------- 1 | import { Strings } from 'lit-translate'; 2 | import { de } from './de.js'; 3 | import { en } from './en.js'; 4 | import { Language } from '@openscd/core/foundation/deprecated/settings.js'; 5 | export const languages = { en, de }; 6 | 7 | export type Translations = typeof en; 8 | 9 | export async function loader(lang: string): Promise { 10 | if (Object.keys(languages).includes(lang)) return languages[lang]; 11 | else return {}; 12 | } 13 | -------------------------------------------------------------------------------- /packages/openscd/test/mock-editor-logger.ts: -------------------------------------------------------------------------------- 1 | import { 2 | LitElement, 3 | customElement, 4 | property, 5 | state, 6 | html, 7 | query, 8 | TemplateResult, 9 | } from 'lit-element'; 10 | 11 | import '../src/addons/Editor.js'; 12 | import '../src/addons/History.js'; 13 | import { OscdEditor } from '../src/addons/Editor.js'; 14 | import { OscdHistory } from '../src/addons/History.js'; 15 | 16 | @customElement('mock-editor-logger') 17 | export class MockEditorLogger extends LitElement { 18 | @property({ type: Object }) doc!: XMLDocument; 19 | 20 | @property({ type: String }) docName = 'test'; 21 | 22 | @property({ type: String }) docId = 'test'; 23 | 24 | @state() 25 | editCount = -1; 26 | 27 | @query('oscd-history') 28 | history!: OscdHistory; 29 | 30 | @query('oscd-editor') 31 | editor!: OscdEditor; 32 | 33 | render(): TemplateResult { 34 | return html` 35 | 42 | 43 | `; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /packages/openscd/test/mock-edits.ts: -------------------------------------------------------------------------------- 1 | import { Edit, Insert, Remove, Update } from '@openscd/core'; 2 | 3 | 4 | const element = document.createElement('test-element'); 5 | const parent = document.createElement('test-parent'); 6 | const reference = document.createElement('test-sibling'); 7 | 8 | parent.appendChild(element); 9 | parent.appendChild(reference); 10 | 11 | export const mockEdits = { 12 | insert: (): Insert => ({ parent, node: element, reference }), 13 | remove: (): Remove => ({ node: element }), 14 | update: (): Update => ({ element, attributes: { test: 'value' } }), 15 | complex: (): Edit[] => [ mockEdits.insert(), mockEdits.remove(), mockEdits.update() ], 16 | } 17 | -------------------------------------------------------------------------------- /packages/openscd/test/mock-wizard-editor.ts: -------------------------------------------------------------------------------- 1 | import { 2 | LitElement, 3 | customElement, 4 | TemplateResult, 5 | html, 6 | query, 7 | property 8 | } from 'lit-element'; 9 | 10 | import '../src/addons/Wizards.js'; 11 | 12 | import '../src/addons/Editor.js'; 13 | 14 | import { OscdWizards } from '../src/addons/Wizards.js'; 15 | 16 | @customElement('mock-wizard-editor') 17 | export class MockWizardEditor extends LitElement { 18 | @property({ type: Object }) doc!: XMLDocument; 19 | 20 | @query('oscd-wizards') 21 | wizards!: OscdWizards; 22 | 23 | render(): TemplateResult { 24 | return html` 25 | 32 | 33 | 34 | 35 | 36 | `; 37 | } 38 | 39 | get wizardUI() { 40 | return this.wizards.wizardUI; 41 | } 42 | 43 | get dialog() { 44 | return this.wizardUI.dialog; 45 | } 46 | 47 | get dialogs() { 48 | return this.wizardUI.dialogs; 49 | } 50 | 51 | get workflow() { 52 | return this.wizards.workflow; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /packages/openscd/test/testfiles/foundation/testFile73.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/openscd/test/testfiles/foundation/testFile74.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/openscd/test/testfiles/foundation/testFile81.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/openscd/test/testfiles/nsdoc/IEC_61850-7-2.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /packages/openscd/test/testfiles/nsdoc/invalid.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/openscd/test/testfiles/nsdoc/wrong-version.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/__snapshots__/action-icon.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Basic component action-icon with icon property set looks like the latest snapshot"] = 5 | `
6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |
17 | `; 18 | /* end snapshot Basic component action-icon with icon property set looks like the latest snapshot */ 19 | 20 | snapshots["Basic component action-icon with unset icon property looks like the latest snapshot"] = 21 | `
22 |
23 |
24 | 25 | 26 | 27 | edit 28 | 29 | 30 | 31 | 32 | 33 |
34 |
35 |
36 | `; 37 | /* end snapshot Basic component action-icon with unset icon property looks like the latest snapshot */ 38 | 39 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/__snapshots__/action-pane.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["action-pane looks like the latest snapshot"] = 5 | `
6 |

7 | 8 | 9 | 10 | 11 | test label 12 | 16 |

17 |
18 | 19 | 20 |
21 |
22 | `; 23 | /* end snapshot action-pane looks like the latest snapshot */ 24 | 25 | snapshots["action-pane with icon property set looks like the latest snapshot"] = 26 | `
27 |

28 | 29 | 30 | 31 | edit 32 | 33 | 34 | 35 | test label 36 | 40 |

41 |
42 | 43 | 44 |
45 |
46 | `; 47 | /* end snapshot action-pane with icon property set looks like the latest snapshot */ 48 | 49 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/__snapshots__/filtered-list.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["filtered-list looks like its latest snapshot"] = 5 | `
6 | 7 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
    23 | 24 | 25 |
26 | `; 27 | /* end snapshot filtered-list looks like its latest snapshot */ 28 | 29 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/action-icon.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '../../src/action-icon.js'; 4 | import { ActionIcon } from '../../src/action-icon.js'; 5 | 6 | describe('Basic component action-icon', () => { 7 | let element: ActionIcon; 8 | 9 | beforeEach(async () => { 10 | element = await fixture( 11 | html`` 12 | ); 13 | await element.updateComplete; 14 | }); 15 | describe('with icon property set', () => { 16 | it('looks like the latest snapshot', async () => { 17 | await expect(element).shadowDom.to.equalSnapshot(); 18 | }); 19 | }); 20 | 21 | describe('with unset icon property ', () => { 22 | beforeEach(async () => { 23 | element.icon = 'edit'; 24 | await element.requestUpdate(); 25 | }); 26 | it('looks like the latest snapshot', async () => { 27 | await expect(element).shadowDom.to.equalSnapshot(); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/mock-actions.ts: -------------------------------------------------------------------------------- 1 | import { ComplexAction, SimpleAction } from '@openscd/core/foundation/deprecated/editor.js'; 2 | 3 | const element = document.createElement('test-element'); 4 | const parent = document.createElement('test-parent'); 5 | const reference = document.createElement('test-sibling'); 6 | 7 | parent.appendChild(element); 8 | parent.appendChild(reference); 9 | 10 | export class MockAction { 11 | static get cre(): SimpleAction { 12 | return { new: { parent, element, reference } }; 13 | } 14 | static get del(): SimpleAction { 15 | return { old: { parent, element, reference } }; 16 | } 17 | static get mov(): SimpleAction { 18 | return { old: { parent, element, reference }, new: { parent, reference } }; 19 | } 20 | static get upd(): SimpleAction { 21 | return { old: { element }, new: { element } }; 22 | } 23 | static get complex(): ComplexAction { 24 | return { 25 | actions: [MockAction.cre, MockAction.del, MockAction.mov, MockAction.upd], 26 | title: 'Test complex EditorAction', 27 | }; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/mock-document.ts: -------------------------------------------------------------------------------- 1 | export function mockSCD(): XMLDocument { 2 | return new DOMParser().parseFromString( 3 | ` 4 | 5 | 6 | 7 | 8 | 9 | 10 | `, 11 | 'application/xml' 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/mock-editor.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, customElement } from 'lit-element'; 2 | import { Editing } from '../../src/Editing.js'; 3 | 4 | @customElement('mock-editor') 5 | export class MockEditor extends Editing(LitElement) {} 6 | -------------------------------------------------------------------------------- /packages/openscd/test/unit/schema.test.ts: -------------------------------------------------------------------------------- 1 | import {expect} from "@open-wc/testing"; 2 | 3 | import {isSCLNamespace, SCL_NAMESPACE} from "../../src/schemas.js"; 4 | 5 | describe('schema', () => { 6 | it('when element belongs to SCL Namespace, function should return true', () => { 7 | const doc = document.implementation.createDocument(SCL_NAMESPACE, null, null); 8 | const element = doc.createElementNS(SCL_NAMESPACE, "SCL"); 9 | 10 | expect(isSCLNamespace(element)).to.be.true; 11 | }); 12 | 13 | it('when element not belonging to SCL Namespace, function should return false', () => { 14 | const doc = document.implementation.createDocument(SCL_NAMESPACE, null, null); 15 | const element = doc.createElementNS("https://someother.namespace.com", "SCL"); 16 | 17 | expect(isSCLNamespace(element)).to.be.false; 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/openscd/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "noEmitOnError": true, 7 | "lib": ["es2020", "dom"], 8 | "strict": true, 9 | "esModuleInterop": false, 10 | "allowSyntheticDefaultImports": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "allowJs": true, 14 | "skipLibCheck": true, 15 | "outDir": "./dist", 16 | "sourceMap": true, 17 | "inlineSources": true, 18 | "resolveJsonModule": true, 19 | "rootDir": "./src" 20 | }, 21 | "include": ["./src/**/*.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/plugins/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | module.exports = { 3 | root: true, 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'import', 'html'], 6 | extends: [ 7 | 'eslint:recommended', 8 | 'plugin:@typescript-eslint/eslint-recommended', 9 | 'plugin:@typescript-eslint/recommended', 10 | 'plugin:import/errors', 11 | 'plugin:import/warnings', 12 | ], 13 | rules: { 14 | // disable the rule for all files 15 | '@typescript-eslint/explicit-function-return-type': 'off', 16 | '@typescript-eslint/no-non-null-assertion': 'off', 17 | 'import/named': 'off', 18 | 'import/no-unresolved': 'off', 19 | 'import/extensions': ['error', 'always', { ignorePackages: true }], 20 | 'import/no-duplicates': 'off', 21 | 'no-duplicate-imports': 'off', 22 | 'tsdoc/syntax': 'warn' 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /packages/plugins/.gitignore: -------------------------------------------------------------------------------- 1 | ## editors 2 | /.idea 3 | /.vscode 4 | 5 | ## system files 6 | .DS_Store 7 | 8 | ## npm 9 | node_modules/ 10 | /npm-debug.log 11 | 12 | ## testing 13 | /coverage/ 14 | /**/dist/*.snap.dev.js 15 | 16 | ## docs 17 | /doc/ 18 | 19 | # build 20 | /_site/ 21 | /build/ 22 | /dist/ 23 | -------------------------------------------------------------------------------- /packages/plugins/.nojekyll: -------------------------------------------------------------------------------- 1 | snowpack placeholder 2 | -------------------------------------------------------------------------------- /packages/plugins/README.md: -------------------------------------------------------------------------------- 1 | # `OpenSCD Official Plug-ins` 2 | 3 | All the offical plug-ins are listed [here](https://github.com/openscd/open-scd/blob/main/docs/plug-ins.md) 4 | -------------------------------------------------------------------------------- /packages/plugins/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/plugins", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "packages/plugins/src", 6 | "targets": { 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /packages/plugins/public/js/worker.js: -------------------------------------------------------------------------------- 1 | importScripts('xmlvalidate.js'); 2 | 3 | onmessage = function(e) { 4 | Module.ready.then(function(mod) { 5 | if (e.data.name.toLowerCase().endsWith('.xsd')) 6 | mod.init(e.data.content, e.data.name); 7 | else mod.validate(e.data.content, e.data.name); 8 | }); 9 | }; 10 | -------------------------------------------------------------------------------- /packages/plugins/public/js/xmlvalidate.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/plugins/public/js/xmlvalidate.wasm -------------------------------------------------------------------------------- /packages/plugins/public/xml/CC-EULA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openscd/open-scd/dd6e5507d4dc9c96f7410105cd4622b82c55c43f/packages/plugins/public/xml/CC-EULA.pdf -------------------------------------------------------------------------------- /packages/plugins/snowpack.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: ['@snowpack/plugin-typescript'], 3 | packageOptions: { 4 | external: [ 5 | '@web/dev-server-core', 6 | '@web/dev-server-esbuild', 7 | 'esbuild', 8 | 'crypto', 9 | ], 10 | }, 11 | exclude: [ 12 | '**/*.@(spec|test).@(js|mjs)', 13 | '**/test/**/*', 14 | '**/out-tsc/**/*', 15 | '**/.editorconfig', 16 | '**/.eslintrc.cjs', 17 | '**/.git/**/*', 18 | '**/.gitignore', 19 | '**/.idea/**/*', 20 | '**/.travis.yml', 21 | '**/package*', 22 | '**/tsconfig.json', 23 | '**/web-test-runner.config.mjs', 24 | '**/node_modules/**/*', 25 | ], 26 | workspaceRoot: '../../', 27 | mount: { 28 | '../open-scd/': '/open-scd/', 29 | './': '/', 30 | }, 31 | alias: { 32 | '@openscd/open-scd': '../open-scd/', 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /packages/plugins/src/editors/communication/foundation.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns the first element of type ConnectedAP in the provided element's hierarchy. 3 | * @param element - The reference element to search from 4 | * @returns An element of type ConnectedAP or null 5 | */ 6 | export function getCurrentConnectedAP(element: Element): Element | null { 7 | return element.closest('ConnectedAP'); 8 | } 9 | 10 | /** 11 | * Retrieves all ConnectedAP elements within the same IED as the provided element. 12 | * 13 | * @param element - The reference element to find the current ConnectedAP and its IED. 14 | * @param doc - The XML document containing the SubNetwork and ConnectedAP elements. 15 | * @returns An array of ConnectedAP elements belonging to the same IED as the provided element. 16 | */ 17 | export function getAllConnectedAPsOfSameIED( 18 | element: Element, 19 | doc: XMLDocument 20 | ): Element[] { 21 | if (!element || !doc) { 22 | return []; 23 | } 24 | 25 | const currentConnectedAP = getCurrentConnectedAP(element); 26 | if (!currentConnectedAP) { 27 | return []; 28 | } 29 | 30 | const iedName = currentConnectedAP.getAttribute('iedName'); 31 | 32 | return Array.from( 33 | doc.querySelectorAll(`SubNetwork > ConnectedAP[iedName=${iedName}`) 34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /packages/plugins/src/editors/ied/element-path.ts: -------------------------------------------------------------------------------- 1 | import { 2 | css, 3 | customElement, 4 | html, 5 | LitElement, 6 | state, 7 | TemplateResult, 8 | } from 'lit-element'; 9 | import { FullElementPathEvent } from './foundation.js'; 10 | 11 | @customElement('element-path') 12 | export class ElementPath extends LitElement { 13 | 14 | @state() 15 | elementNames: string[] = []; 16 | 17 | constructor() { 18 | super(); 19 | 20 | const parentSection = this.closest('section'); 21 | if (parentSection) { 22 | parentSection.addEventListener('full-element-path', (event: FullElementPathEvent) => { 23 | this.elementNames = event.detail.elementNames; 24 | }); 25 | } 26 | } 27 | 28 | render(): TemplateResult { 29 | return html` 30 |

${this.elementNames.join(' / ')}

31 | `; 32 | } 33 | 34 | static styles = css` 35 | h3 { 36 | color: var(--mdc-theme-on-surface); 37 | font-family: 'Roboto', sans-serif; 38 | font-weight: 300; 39 | overflow: hidden; 40 | white-space: nowrap; 41 | text-overflow: ellipsis; 42 | margin: 0px; 43 | line-height: 48px; 44 | padding-left: 0.3em; 45 | transition: background-color 150ms linear; 46 | }`; 47 | } 48 | -------------------------------------------------------------------------------- /packages/plugins/src/editors/protocol104/base-container.ts: -------------------------------------------------------------------------------- 1 | import { LitElement, property } from 'lit-element'; 2 | 3 | export class Base104Container extends LitElement { 4 | @property() 5 | doc!: XMLDocument; 6 | @property({ type: Number }) 7 | editCount = -1; 8 | } 9 | -------------------------------------------------------------------------------- /packages/plugins/src/editors/singlelinediagram/wizards/bay.ts: -------------------------------------------------------------------------------- 1 | import { TemplateResult } from 'lit-element'; 2 | import { get } from 'lit-translate'; 3 | 4 | import { Wizard } from '@openscd/open-scd/src/foundation.js'; 5 | 6 | import '@openscd/open-scd/src/wizard-textfield.js'; 7 | import { renderBayWizard } from '../../../wizards/bay.js'; 8 | import { 9 | getDescAttribute, 10 | getNameAttribute, 11 | getXCoordinateAttribute, 12 | getYCoordinateAttribute, 13 | updateNamingAndCoordinatesAction, 14 | renderXYCoordinateFields, 15 | } from './foundation.js'; 16 | 17 | function render( 18 | name: string | null, 19 | desc: string | null, 20 | xCoordinate: string | null, 21 | yCoordinate: string | null 22 | ): TemplateResult[] { 23 | return renderBayWizard(name, desc).concat( 24 | renderXYCoordinateFields(xCoordinate, yCoordinate) 25 | ); 26 | } 27 | 28 | export function editBayWizard(element: Element): Wizard { 29 | return [ 30 | { 31 | title: get('bay.wizard.title.edit'), 32 | element, 33 | primary: { 34 | icon: 'edit', 35 | label: get('save'), 36 | action: updateNamingAndCoordinatesAction(element), 37 | }, 38 | content: render( 39 | getNameAttribute(element), 40 | getDescAttribute(element), 41 | getXCoordinateAttribute(element), 42 | getYCoordinateAttribute(element) 43 | ), 44 | }, 45 | ]; 46 | } 47 | -------------------------------------------------------------------------------- /packages/plugins/src/editors/subscription/goose/foundation.ts: -------------------------------------------------------------------------------- 1 | import { SubscribeStatus } from '../foundation.js'; 2 | 3 | export interface GOOSESelectDetail { 4 | gseControl: Element | undefined; 5 | dataset: Element | undefined; 6 | } 7 | export type GOOSESelectEvent = CustomEvent; 8 | export function newGOOSESelectEvent( 9 | gseControl: Element | undefined, 10 | dataset: Element | undefined, 11 | eventInitDict?: CustomEventInit 12 | ): GOOSESelectEvent { 13 | return new CustomEvent('goose-select', { 14 | bubbles: true, 15 | composed: true, 16 | ...eventInitDict, 17 | detail: { gseControl, dataset, ...eventInitDict?.detail }, 18 | }); 19 | } 20 | 21 | export interface GooseSubscriptionDetail { 22 | element: Element; 23 | subscribeStatus: SubscribeStatus; 24 | } 25 | export type GooseSubscriptionEvent = CustomEvent; 26 | export function newGooseSubscriptionEvent( 27 | element: Element, 28 | subscribeStatus: SubscribeStatus 29 | ): GooseSubscriptionEvent { 30 | return new CustomEvent('goose-subscription', { 31 | bubbles: true, 32 | composed: true, 33 | detail: { element, subscribeStatus }, 34 | }); 35 | } 36 | 37 | declare global { 38 | interface ElementEventMap { 39 | ['goose-select']: GOOSESelectEvent; 40 | ['goose-subscription']: GooseSubscriptionEvent; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/plugins/src/editors/subscription/sampledvalues/foundation.ts: -------------------------------------------------------------------------------- 1 | import { SubscribeStatus } from '../foundation.js'; 2 | 3 | export interface SmvSelectDetail { 4 | smvControl: Element | undefined; 5 | dataset: Element | undefined; 6 | } 7 | export type SmvSelectEvent = CustomEvent; 8 | export function newSmvSelectEvent( 9 | smvControl: Element | undefined, 10 | dataset: Element | undefined, 11 | eventInitDict?: CustomEventInit 12 | ): SmvSelectEvent { 13 | return new CustomEvent('smv-select', { 14 | bubbles: true, 15 | composed: true, 16 | ...eventInitDict, 17 | detail: { smvControl: smvControl, dataset, ...eventInitDict?.detail }, 18 | }); 19 | } 20 | 21 | export interface SmvSubscriptionDetail { 22 | element: Element; 23 | subscribeStatus: SubscribeStatus; 24 | } 25 | export type SmvSubscriptionEvent = CustomEvent; 26 | export function newSmvSubscriptionEvent( 27 | element: Element, 28 | subscribeStatus: SubscribeStatus 29 | ): SmvSubscriptionEvent { 30 | return new CustomEvent('smv-subscription', { 31 | bubbles: true, 32 | composed: true, 33 | detail: { element, subscribeStatus }, 34 | }); 35 | } 36 | 37 | declare global { 38 | interface ElementEventMap { 39 | ['smv-select']: SmvSelectEvent; 40 | ['smv-subscription']: SmvSubscriptionEvent; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/plugins/src/menu/Merge.ts: -------------------------------------------------------------------------------- 1 | import { css, html, LitElement, query, TemplateResult } from 'lit-element'; 2 | 3 | import { newWizardEvent } from '@openscd/open-scd/src/foundation.js'; 4 | import { mergeWizard } from '@openscd/open-scd/src/wizards.js'; 5 | 6 | export default class MergePlugin extends LitElement { 7 | doc!: XMLDocument; 8 | 9 | @query('#merge-plugin-input') pluginFileUI!: HTMLInputElement; 10 | 11 | mergeDoc(event: Event): void { 12 | const file = 13 | (event.target)?.files?.item(0) ?? false; 14 | if (file) 15 | file.text().then(text => { 16 | const doc = new DOMParser().parseFromString(text, 'application/xml'); 17 | this.dispatchEvent( 18 | newWizardEvent( 19 | mergeWizard(this.doc.documentElement, doc.documentElement) 20 | ) 21 | ); 22 | }); 23 | this.pluginFileUI.onchange = null; 24 | } 25 | 26 | async run(): Promise { 27 | this.pluginFileUI.click(); 28 | } 29 | 30 | render(): TemplateResult { 31 | return html` 32 | ((event.target).value = '')} @change=${ 33 | this.mergeDoc 34 | } id="merge-plugin-input" accept=".sed,.scd,.ssd,.isd,.iid,.cid,.icd" type="file">`; 35 | } 36 | 37 | static styles = css` 38 | input { 39 | width: 0; 40 | height: 0; 41 | opacity: 0; 42 | } 43 | `; 44 | } 45 | -------------------------------------------------------------------------------- /packages/plugins/src/validators/templates/dabda.ts: -------------------------------------------------------------------------------- 1 | import { get } from 'lit-translate'; 2 | 3 | import { identity } from '@openscd/open-scd/src/foundation.js'; 4 | import { LogDetailBase } from '@openscd/core/foundation/deprecated/history.js'; 5 | import { getTypeChild, isTypeMissing } from './foundation.js'; 6 | 7 | export async function dAValidator(element: Element): Promise { 8 | if (isTypeMissing(element)) 9 | return [ 10 | { 11 | title: get('validator.templates.missingAttribute', { 12 | attr: 'type', 13 | element: element.tagName, 14 | }), 15 | message: `${identity(element)}`, 16 | }, 17 | ]; 18 | 19 | const child = getTypeChild(element); 20 | if (child === null) 21 | return [ 22 | { 23 | title: get('validator.templates.missingReference', { 24 | tag: 'DO', 25 | name: element.getAttribute('name')!, 26 | }), 27 | message: `${identity(element)}`, 28 | }, 29 | ]; 30 | 31 | return []; 32 | } 33 | -------------------------------------------------------------------------------- /packages/plugins/src/validators/templates/dosdo.ts: -------------------------------------------------------------------------------- 1 | import { get } from 'lit-translate'; 2 | import { identity } from '@openscd/open-scd/src/foundation.js'; 3 | import { LogDetailBase } from '@openscd/core/foundation/deprecated/history.js'; 4 | import { getTypeChild, isTypeMissing } from './foundation.js'; 5 | 6 | export async function dOValidator(element: Element): Promise { 7 | if (isTypeMissing(element)) 8 | return [ 9 | { 10 | title: get('validator.templates.missingAttribute', { 11 | attr: 'type', 12 | element: element.tagName, 13 | }), 14 | message: `${identity(element)}`, 15 | }, 16 | ]; 17 | 18 | const child = getTypeChild(element); 19 | if (child === null) 20 | return [ 21 | { 22 | title: get('validator.templates.missingReference', { 23 | tag: 'DO', 24 | name: element.getAttribute('name')!, 25 | }), 26 | message: `${identity(element)}`, 27 | }, 28 | ]; 29 | 30 | return []; 31 | } 32 | -------------------------------------------------------------------------------- /packages/plugins/src/wizards/foundation/enums.ts: -------------------------------------------------------------------------------- 1 | export const functionalConstraintEnum = [ 2 | 'ST', 3 | 'MX', 4 | 'SP', 5 | 'SV', 6 | 'CF', 7 | 'DC', 8 | 'SG', 9 | 'SE', 10 | 'SR', 11 | 'OR', 12 | 'BL', 13 | 'EX', 14 | 'CO', 15 | ]; 16 | 17 | export const predefinedBasicTypeEnum = [ 18 | 'BOOLEAN', 19 | 'INT8', 20 | 'INT16', 21 | 'INT24', 22 | 'INT32', 23 | 'INT64', 24 | 'INT128', 25 | 'INT8U', 26 | 'INT16U', 27 | 'INT24U', 28 | 'INT32U', 29 | 'FLOAT32', 30 | 'FLOAT64', 31 | 'Enum', 32 | 'Dbpos', 33 | 'Tcmd', 34 | 'Quality', 35 | 'Timestamp', 36 | 'VisString32', 37 | 'VisString64', 38 | 'VisString65', 39 | 'VisString129', 40 | 'VisString255', 41 | 'Octet64', 42 | 'Unicode255', 43 | 'Struct', 44 | 'EntryTime', 45 | 'Check', 46 | 'ObjRef', 47 | 'Currency', 48 | 'PhyComAddr', 49 | 'TrgOps', 50 | 'OptFlds', 51 | 'SvOptFlds', 52 | 'LogOptFlds', 53 | 'EntryID', 54 | 'Octet6', 55 | 'Octet16', 56 | ]; 57 | 58 | export const valKindEnum = ['Spec', 'Conf', 'RO', 'Set']; 59 | 60 | export const smpModEnum = ['SmpPerPeriod', 'SmpPerSec', 'SecPerSmp']; 61 | 62 | export const securityEnabledEnum = [ 63 | 'None', 64 | 'Signature', 65 | 'SignatureAndEncryption', 66 | ]; 67 | -------------------------------------------------------------------------------- /packages/plugins/test/integration/editors/Protocol104.test.ts: -------------------------------------------------------------------------------- 1 | import { html, fixture, expect } from '@open-wc/testing'; 2 | 3 | import '@openscd/open-scd/test/mock-open-scd.js'; 4 | 5 | import Protocol104 from '../../../src/editors/Protocol104.js'; 6 | import { MockOpenSCD } from '@openscd/open-scd/test/mock-open-scd.js'; 7 | 8 | describe('Protocol 104 Plugin', () => { 9 | customElements.define('protocol104-plugin', Protocol104); 10 | let element: Protocol104; 11 | let parent: MockOpenSCD; 12 | let doc: XMLDocument; 13 | 14 | beforeEach(async () => { 15 | doc = await fetch('/test/testfiles/104/valid-subnetwork.scd') 16 | .then(response => response.text()) 17 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 18 | 19 | parent = await fixture( 20 | html`` 23 | ); 24 | element = parent.getActivePlugin(); 25 | }); 26 | 27 | describe('in Values view', () => { 28 | it('the plugin looks like the latest snapshot', async () => { 29 | await expect(element).shadowDom.to.equalSnapshot(); 30 | }); 31 | }); 32 | 33 | describe('in Network view', () => { 34 | beforeEach(async () => { 35 | const radioButton = element.shadowRoot?.querySelector('#byNetworkRadio'); 36 | (radioButton).click(); 37 | await element.updateComplete; 38 | }); 39 | 40 | it('the plugin looks like the latest snapshot', async () => { 41 | await expect(element).shadowDom.to.equalSnapshot(); 42 | }); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /packages/plugins/test/integration/editors/__snapshots__/Substation.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Substation Plugin without a doc loaded looks like the latest snapshot"] = 5 | ` 6 | 7 |

8 | 13 | 14 |

15 | `; 16 | /* end snapshot Substation Plugin without a doc loaded looks like the latest snapshot */ 17 | 18 | -------------------------------------------------------------------------------- /packages/plugins/test/integration/editors/communication/__snapshots__/Communication.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Communication Plugin without a doc loaded looks like the latest snapshot"] = 5 | `

6 | 7 | [communication.missing] 8 | 9 | 14 | 15 |

16 | `; 17 | /* end snapshot Communication Plugin without a doc loaded looks like the latest snapshot */ 18 | 19 | -------------------------------------------------------------------------------- /packages/plugins/test/integration/editors/substation/__snapshots__/bay-editor-wizarding.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["bay-editor wizarding integration looks like the latest snapshot"] = 5 | ` 11 |
12 | 19 | 20 | 25 | 26 |
27 | 33 | 34 | 40 | 41 |
42 | `; 43 | /* end snapshot bay-editor wizarding integration looks like the latest snapshot */ 44 | 45 | -------------------------------------------------------------------------------- /packages/plugins/test/integration/editors/substation/__snapshots__/substation-editor-wizarding.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["substation-editor wizarding integration looks like the latest snapshot"] = 5 | ` 11 |
12 | 19 | 20 | 25 | 26 |
27 | 33 | 34 | 40 | 41 |
42 | `; 43 | /* end snapshot substation-editor wizarding integration looks like the latest snapshot */ 44 | 45 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/foundation/testFile73.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/foundation/testFile74.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/foundation/testFile81.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/history.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/importieds/duplicate.iid: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/importieds/emptyproject.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/importieds/invalid.iid: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/importieds/parsererror.iid: -------------------------------------------------------------------------------- 1 | SCL xmlns="http://www.iec.ch/61850/2003/SCL" version="2007" revision="B" release="4" -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/invalid2007B.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | TrainingIEC61850 5 | 6 | 7 |
8 | 9 | 10 | 110 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/no-history.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/nsdoc/IEC_61850-7-2.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/nsdoc/invalid.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/nsdoc/wrong-version.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/templates/missingdatatypes.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | TrainingIEC61850 5 | 6 | 7 |
8 | 9 | 10 | 110 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/updatedesc/testSignalListComma.csv: -------------------------------------------------------------------------------- 1 | 2 | CB_CLOSED,IED2,IN101 3 | CB_OPEN,IED2,IN102 4 | BB1_DS_CLOSED,IED2,IN103 5 | BB1_DS_OPEN,IED2,IN104 6 | BB2_DS_CLOSED,IED2,IN105 7 | BB2_DS_OPEN,IED2,IN106 8 | LINE_DS_CLOSED,IED2,IN107 9 | LINE_DS_CLOSED,IED2 10 | LINE_DS_CLOSED 11 | LINE_DS_CLOSED,IED2,"IN,107" 12 | , -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/updatedesc/testSignalListSemicolon.csv: -------------------------------------------------------------------------------- 1 | CB_CLOSED;IED2;IN101 2 | CB_OPEN;IED2;IN102 3 | BB1_DS_CLOSED;IED2;IN103 4 | BB1_DS_OPEN;IED2;IN104 5 | BB2_DS_CLOSED;IED2;IN105 6 | BB2_DS_OPEN;IED2;IN106 7 | LINE_DS_CLOSED;IED2;"IN107" 8 | LINE_DS_CLOSED;"IED2" 9 | LINE_DS_CLOSED 10 | ; -------------------------------------------------------------------------------- /packages/plugins/test/testfiles/validators/zeroissues.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/GooseSubscriberDataBinding.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import GooseSubscriberDataBinding from '../../../src/editors/GooseSubscriberDataBinding.js'; 4 | 5 | describe('SMV Subscribe Data Binding Plugin', () => { 6 | customElements.define( 7 | 'goose-subscriber-data-binding-plugin', 8 | GooseSubscriberDataBinding 9 | ); 10 | 11 | let element: GooseSubscriberDataBinding; 12 | let doc: XMLDocument; 13 | 14 | beforeEach(async () => { 15 | doc = await fetch('/test/testfiles/editors/DataBindingGOOSE2007B4.scd') 16 | .then(response => response.text()) 17 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 18 | 19 | element = await fixture( 20 | html`` 23 | ); 24 | }); 25 | 26 | it('looks like the latest snapshot', async () => { 27 | await expect(element).shadowDom.to.equalSnapshot(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/SMVSubscriberDataBinding.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import SMVSubscribeDataBindingPlugin from '../../../src/editors/SMVSubscriberDataBinding.js'; 4 | 5 | describe('SMV Subscribe Data Binding Plugin', () => { 6 | customElements.define( 7 | 'smv-subscribe-data-binding-plugin', 8 | SMVSubscribeDataBindingPlugin 9 | ); 10 | 11 | let element: SMVSubscribeDataBindingPlugin; 12 | let doc: XMLDocument; 13 | 14 | beforeEach(async () => { 15 | doc = await fetch('/test/testfiles/editors/DataBindingSMV2007B4.scd') 16 | .then(response => response.text()) 17 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 18 | 19 | element = await fixture( 20 | html`` 23 | ); 24 | }); 25 | 26 | it('looks like the latest snapshot', async () => { 27 | await expect(element).shadowDom.to.equalSnapshot(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/__snapshots__/GooseSubscriberDataBinding.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["SMV Subscribe Data Binding Plugin looks like the latest snapshot"] = 5 | `
6 |
7 | 11 | 12 | 16 | 17 |
18 |
19 | `; 20 | /* end snapshot SMV Subscribe Data Binding Plugin looks like the latest snapshot */ 21 | 22 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/__snapshots__/GooseSubscriberLaterBinding.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["SMV Subscribe Later Binding Plugin looks like the latest snapshot"] = 5 | `
6 |
7 | 11 | 12 | 16 | 17 |
18 |
19 | `; 20 | /* end snapshot SMV Subscribe Later Binding Plugin looks like the latest snapshot */ 21 | 22 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/__snapshots__/SMVSubscriberDataBinding.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["SMV Subscribe Data Binding Plugin looks like the latest snapshot"] = 5 | `
6 |
7 | 11 | 12 | 16 | 17 |
18 |
19 | `; 20 | /* end snapshot SMV Subscribe Data Binding Plugin looks like the latest snapshot */ 21 | 22 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/__snapshots__/SMVSubscriberLaterBinding.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["SMV Subscribe Later Binding Plugin looks like the latest snapshot"] = 5 | `
6 |
7 | 11 | 12 | 16 | 17 |
18 |
19 | `; 20 | /* end snapshot SMV Subscribe Later Binding Plugin looks like the latest snapshot */ 21 | 22 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/cleanup/foundation.test.ts: -------------------------------------------------------------------------------- 1 | import { expect } from '@open-wc/testing'; 2 | import { identitySort } from '../../../../src/editors/cleanup/foundation.js'; 3 | 4 | describe('Sorting items by their identity', () => { 5 | let doc: Document; 6 | beforeEach(async () => { 7 | doc = await fetch('/test/testfiles/cleanup.scd') 8 | .then(response => response.text()) 9 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 10 | }); 11 | 12 | it('returns the correct name for an element.', () => { 13 | const dataSets = doc.querySelectorAll('DataSet'); 14 | const orderedDataSets = identitySort(Array.from(dataSets)).map(dataSet => 15 | dataSet.getAttribute('name') 16 | ); 17 | // verified through inspection of the identity of each element 18 | // e.g. const ids = identitySort(Array.from(datasets)).map(ds => identity(ds)); 19 | expect(orderedDataSets).to.eql([ 20 | 'GooseDataSet1', 21 | 'GooseDataSet2', 22 | 'LogDataSet1', 23 | 'dataSet', 24 | 'dataSet', 25 | 'GooseDataSet1', 26 | 'PhsMeas1', 27 | 'PhsMeas2', 28 | ]); 29 | 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/communication/__snapshots__/conductingap-editor.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["A component to visualize SCL element ConnectedAP looks like the latest snapshot"] = 5 | ` 10 | 15 | 16 | 21 | 22 | 23 | `; 24 | /* end snapshot A component to visualize SCL element ConnectedAP looks like the latest snapshot */ 25 | 26 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/communication/__snapshots__/gse-editor.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Editor web component for GSE element looks like its latest snapshot"] = 5 | ` 9 | 14 | 15 | 20 | 21 | 27 | 28 | 29 | `; 30 | /* end snapshot Editor web component for GSE element looks like its latest snapshot */ 31 | 32 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/communication/__snapshots__/smv-editor.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Editor web component for SMV element looks like its latest snapshot"] = 5 | ` 9 | 14 | 15 | 20 | 21 | 27 | 28 | 29 | `; 30 | /* end snapshot Editor web component for SMV element looks like its latest snapshot */ 31 | 32 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/ied/__snapshots__/element-path.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["element-path looks like the latest snapshot"] = 5 | `

6 | IED1 / AccessPoint1 / My Little Server 7 |

8 | `; 9 | /* end snapshot element-path looks like the latest snapshot */ 10 | 11 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/ied/__snapshots__/ied-container.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["ied-container looks like the latest snapshot"] = 5 | ` 6 | 7 | developer_board 8 | 9 | 13 | 14 | 15 | 16 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | `; 34 | /* end snapshot ied-container looks like the latest snapshot */ 35 | 36 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/ied/element-path.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '../../../../src/editors/ied/element-path.js'; 4 | import { ElementPath } from '../../../../src/editors/ied/element-path.js'; 5 | 6 | describe('element-path', () => { 7 | let element: ElementPath; 8 | 9 | beforeEach(async () => { 10 | element = await fixture(html``); 13 | }); 14 | 15 | it('looks like the latest snapshot', async () => { 16 | await expect(element).shadowDom.to.equalSnapshot(); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/ied/ied-container.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '../../../../src/editors/ied/ied-container.js'; 4 | import { IedContainer } from '../../../../src/editors/ied/ied-container.js'; 5 | 6 | describe('ied-container', () => { 7 | let element: IedContainer; 8 | let validSCL: XMLDocument; 9 | 10 | beforeEach(async () => { 11 | validSCL = await fetch('/test/testfiles/editors/iedEditorWithIEDs.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | 15 | element = await fixture(html``); 18 | }); 19 | 20 | it('looks like the latest snapshot', async () => { 21 | await expect(element).shadowDom.to.equalSnapshot(); 22 | }); 23 | 24 | it('Should show services icon when Services are available', async () => { 25 | validSCL = await fetch('/test/testfiles/Services.scd') 26 | .then(response => response.text()) 27 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 28 | 29 | element = await fixture(html``); 32 | 33 | expect( 34 | element.shadowRoot!.querySelector("mwc-icon-button[icon='settings']") 35 | ).to.exist; 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/ied/test-support.ts: -------------------------------------------------------------------------------- 1 | export function getAncestorsFromDO(doElement: Element): Element[] { 2 | const lNodeTypeElement = doElement.closest('LNodeType'); 3 | const lnElement = doElement 4 | .closest('SCL')! 5 | .querySelector( 6 | `LN0[lnType="${lNodeTypeElement!.getAttribute('id')}"], ` + 7 | `LN[lnType="${lNodeTypeElement!.getAttribute('id')}"]` 8 | )!; 9 | 10 | const ancestors: Element[] = []; 11 | ancestors.push(lnElement); 12 | ancestors.push(lnElement.closest('LDevice')!); 13 | ancestors.push(lnElement.closest('Server')!); 14 | ancestors.push(lnElement.closest('AccessPoint')!); 15 | ancestors.push(lnElement.closest('IED')!); 16 | return ancestors; 17 | } 18 | 19 | export function getAncestorsFromDA( 20 | daElement: Element, 21 | type: string 22 | ): Element[] { 23 | const doElement = daElement 24 | .closest('SCL')! 25 | .querySelector(`DO[type="${type}"]`)!; 26 | 27 | const ancestors = getAncestorsFromDO(doElement); 28 | ancestors.push(doElement); 29 | return ancestors; 30 | } 31 | 32 | export function getLNClasses(element: Element): string[] { 33 | return Array.from(element.querySelectorAll('LN0, LN')) 34 | .map(element => element.getAttribute('lnClass')) 35 | .filter(value => value) as string[]; 36 | } 37 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/__snapshots__/connectedap-container.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["connectedap-104-editor looks like the latest snapshot"] = 5 | ` 10 | 15 | 16 | 21 | 22 | 23 | `; 24 | /* end snapshot connectedap-104-editor looks like the latest snapshot */ 25 | 26 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/__snapshots__/ied-container.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["ied-104-container - IED with DAI Elements looks like the latest snapshot"] = 5 | ` 6 | 7 | developer_board 8 | 9 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | `; 27 | /* end snapshot ied-104-container - IED with DAI Elements looks like the latest snapshot */ 28 | 29 | snapshots["ied-104-container - IED without DAI Elements looks like the latest snapshot"] = 30 | ` 31 | 32 | developer_board 33 | 34 | 38 | 44 | 45 | 46 | 47 | `; 48 | /* end snapshot ied-104-container - IED without DAI Elements looks like the latest snapshot */ 49 | 50 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/__snapshots__/network-container.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["network-104-container looks like the latest snapshot"] = 5 | ` 10 | 11 |
12 | 13 | 14 | 15 | 16 |
17 | `; 18 | /* end snapshot network-104-container looks like the latest snapshot */ 19 | 20 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/__snapshots__/subnetwork-container.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["subnetwork-104-container looks like the latest snapshot"] = 5 | ` 7 | 11 | 12 | 13 | 14 |
15 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |
39 | `; 40 | /* end snapshot subnetwork-104-container looks like the latest snapshot */ 41 | 42 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/__snapshots__/values-container.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["values-104-container SCL with IED Elements looks like the latest snapshot"] = 5 | ` 6 | 7 | 8 | 9 |

10 | 15 | 16 |

17 | `; 18 | /* end snapshot values-104-container SCL with IED Elements looks like the latest snapshot */ 19 | 20 | snapshots["values-104-container SCL without IED Elements looks like the latest snapshot"] = 21 | `

22 | 23 | [protocol104.values.missing] 24 | 25 |

26 |

27 | 32 | 33 |

34 | `; 35 | /* end snapshot values-104-container SCL without IED Elements looks like the latest snapshot */ 36 | 37 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/subnetwork-container.test.ts: -------------------------------------------------------------------------------- 1 | import { html, fixture, expect } from '@open-wc/testing'; 2 | 3 | import '../../../../src/editors/protocol104/subnetwork-container.js' 4 | import { SubNetwork104Container } from '../../../../src/editors/protocol104/subnetwork-container.js'; 5 | 6 | describe('subnetwork-104-container', () => { 7 | let element: SubNetwork104Container; 8 | let subNetwork: Element; 9 | 10 | beforeEach(async () => { 11 | const validSCL = await fetch('/test/testfiles/104/valid-subnetwork.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | 15 | subNetwork = validSCL.querySelector('SubNetwork[name="F1"]')!; 16 | element = ( 17 | await fixture( 18 | html`` 19 | ) 20 | ); 21 | }); 22 | 23 | it('looks like the latest snapshot', async () => { 24 | await expect(element).shadowDom.to.equalSnapshot(); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/protocol104/wizards/__snapshots__/selectDo.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["data model nodes child getter show DO Picker looks like the latest snapshot"] = 5 | ` 11 |
12 | 13 | 14 |
15 | 21 | 22 | 28 | 29 |
30 | `; 31 | /* end snapshot data model nodes child getter show DO Picker looks like the latest snapshot */ 32 | 33 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/singlelinediagram/wizards/__snapshots__/bay.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Wizards for SCL element Bay (X/Y) looks like the latest snapshot"] = 5 | ` 11 |
12 | 19 | 20 | 26 | 27 | 32 | 33 | 38 | 39 |
40 | 46 | 47 | 53 | 54 |
55 | `; 56 | /* end snapshot Wizards for SCL element Bay (X/Y) looks like the latest snapshot */ 57 | 58 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/singlelinediagram/wizards/foundation.test.ts: -------------------------------------------------------------------------------- 1 | import { expect } from '@open-wc/testing'; 2 | import {getFixedCoordinateValue} from "../../../../../src/editors/singlelinediagram/wizards/foundation.js"; 3 | 4 | describe('Single Line Diagram Wizard foundation', () => { 5 | describe('defines a getFixedCoordinateValue function that', () => { 6 | it("when calling with value null, null will be returned", () => { 7 | expect(getFixedCoordinateValue(null)).to.be.null; 8 | }); 9 | 10 | it("when calling with a positive number, number will be returned", () => { 11 | expect(getFixedCoordinateValue("2")).to.be.equal("2"); 12 | }); 13 | 14 | it("when calling with zero, zero will be returned", () => { 15 | expect(getFixedCoordinateValue("0")).to.be.equal("0"); 16 | }); 17 | 18 | it("when calling with a negative number, zero will be returned", () => { 19 | expect(getFixedCoordinateValue("-2")).to.be.equal("0"); 20 | }); 21 | 22 | it("when calling with a invalid number, zero will be returned", () => { 23 | expect(getFixedCoordinateValue("A2")).to.be.equal("0"); 24 | }); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/subscription/goose/__snapshots__/subscriber-list.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["subscriber-list-goose initially looks like the latest snapshot"] = 5 | `
6 |

7 | [subscription.goose.publisher.subscriberTitle] 8 |

9 | 10 | 15 | 16 | [subscription.subscriber.noControlBlockSelected] 17 | 18 | 19 | 20 |
21 | `; 22 | /* end snapshot subscriber-list-goose initially looks like the latest snapshot */ 23 | 24 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/subscription/goose/subscriber-list.test.ts: -------------------------------------------------------------------------------- 1 | import { html, fixture, expect } from '@open-wc/testing'; 2 | 3 | import '../../../../../src/editors/subscription/goose/subscriber-list.js'; 4 | import { SubscriberList } from '../../../../../src/editors/subscription/goose/subscriber-list.js'; 5 | 6 | describe('subscriber-list-goose', () => { 7 | let element: SubscriberList; 8 | let validSCL: XMLDocument; 9 | 10 | beforeEach(async () => { 11 | validSCL = await fetch('/test/testfiles/valid2007B4.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | 15 | element = await fixture(html``); 18 | }); 19 | 20 | it('initially looks like the latest snapshot', async () => { 21 | await expect(element).shadowDom.to.equalSnapshot(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/subscription/sampledvalues/__snapshots__/subscriber-list.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["subscriber-list-smv initially looks like the latest snapshot"] = 5 | `
6 |

7 | [subscription.smv.publisher.subscriberTitle] 8 |

9 | 10 | 15 | 16 | [subscription.subscriber.noControlBlockSelected] 17 | 18 | 19 | 20 |
21 | `; 22 | /* end snapshot subscriber-list-smv initially looks like the latest snapshot */ 23 | 24 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/subscription/sampledvalues/subscriber-list.test.ts: -------------------------------------------------------------------------------- 1 | import { html, fixture, expect } from '@open-wc/testing'; 2 | 3 | import '../../../../../src/editors/subscription/sampledvalues/subscriber-list.js'; 4 | import { SubscriberList } from '../../../../../src/editors/subscription/sampledvalues/subscriber-list.js'; 5 | 6 | describe('subscriber-list-smv', () => { 7 | let element: SubscriberList; 8 | let validSCL: XMLDocument; 9 | 10 | beforeEach(async () => { 11 | validSCL = await fetch('/test/testfiles/valid2007B4.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | 15 | element = await fixture(html``); 18 | }); 19 | 20 | it('initially looks like the latest snapshot', async () => { 21 | await expect(element).shadowDom.to.equalSnapshot(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/substation/__snapshots__/ied-editor.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["A component to visualize SCL element IED looks like the latest snapshot"] = 5 | ` 10 | 16 | 17 | 23 | 24 | 30 | 31 | 32 | `; 33 | /* end snapshot A component to visualize SCL element IED looks like the latest snapshot */ 34 | 35 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/substation/__snapshots__/l-node-editor.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["web component rendering LNode element as reference to a LN/LN0 within IED looks like the latest snapshot"] = 5 | ` 9 | 10 | 11 | 16 | 17 | 22 | 23 | 24 | `; 25 | /* end snapshot web component rendering LNode element as reference to a LN/LN0 within IED looks like the latest snapshot */ 26 | 27 | snapshots["web component rendering LNode element as instance of a LNodeType only looks like the latest snapshot"] = 28 | ` 34 | 35 | 36 | 41 | 42 | 47 | 48 | 53 | 54 | 55 | `; 56 | /* end snapshot web component rendering LNode element as instance of a LNodeType only looks like the latest snapshot */ 57 | 58 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/substation/general-equipment-editor.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '../../../../src/editors/substation/general-equipment-editor.js'; 4 | import { GeneralEquipmentEditor } from '../../../../src/editors/substation/general-equipment-editor.js'; 5 | 6 | describe('Editor web component for GeneralEquipment SCL element', () => { 7 | let element: GeneralEquipmentEditor; 8 | let doc: XMLDocument; 9 | 10 | beforeEach(async () => { 11 | doc = await fetch('/test/testfiles/editors/substation/generalequipment.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | 15 | const generalEquipment = doc.querySelector('GeneralEquipment'); 16 | element = await fixture( 17 | html`` 21 | ); 22 | }); 23 | 24 | describe('rendered as action icon', () => { 25 | beforeEach(async () => { 26 | element.showfunctions = false; 27 | await element.updateComplete; 28 | }); 29 | 30 | it('looks like the latest snapshot', async () => 31 | await expect(element).shadowDom.to.equalSnapshot()); 32 | }); 33 | 34 | describe('rendered as action pane', () => { 35 | beforeEach(async () => { 36 | element.showfunctions = true; 37 | await element.updateComplete; 38 | }); 39 | 40 | it('look like the latest snapshot', async () => 41 | await expect(element).shadowDom.to.equalSnapshot()); 42 | }); 43 | }); 44 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/substation/lnodewizard.test.ts: -------------------------------------------------------------------------------- 1 | import { expect } from '@open-wc/testing'; 2 | 3 | import { getLNode } from '../../../../src/wizards/lnode.js'; 4 | 5 | describe('lnodewizard', () => { 6 | describe('defines a getLNode function that', () => { 7 | let doc: Document; 8 | beforeEach(async () => { 9 | doc = await fetch('/test/testfiles/lnodewizard.scd') 10 | .then(response => response.text()) 11 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 12 | }); 13 | 14 | it('returns LNode on existing lnode references in the parent element', () => { 15 | expect( 16 | getLNode( 17 | doc.querySelector('Bay[name="COUPLING_BAY"]')!, 18 | doc.querySelector( 19 | 'IED[name="IED2"] LDevice[inst="CBSW"] > LN[lnClass="XSWI"][inst="3"]' 20 | )! 21 | ) 22 | ).to.not.be.null; 23 | }); 24 | 25 | it('returns LNode with missing or empty prefix in LN', () => { 26 | expect( 27 | getLNode( 28 | doc.querySelector('Bay[name="COUPLING_BAY"]')!, 29 | doc.querySelector( 30 | 'IED[name="IED2"] LDevice[inst="CBSW"] > LN[lnClass="LPHD"][inst="1"]' 31 | )! 32 | ) 33 | ).to.not.be.null; 34 | }); 35 | 36 | it('returns LNode with missing or empty prefix and missing or empty inst in LN0', () => { 37 | expect( 38 | getLNode( 39 | doc.querySelector('Bay[name="COUPLING_BAY"]')!, 40 | doc.querySelector('IED[name="IED2"] LDevice[inst="CBSW"] > LN0')! 41 | ) 42 | ).to.not.be.null; 43 | }); 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/menu/virtualtemplateied/__snapshots__/foundation.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["foundation for virtual IED creation getSpecificationIED function looks like the latest snapshot"] = 5 | ` 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 26 | 27 | 28 | 29 | 34 | 35 | 41 | 42 | 43 | 44 | 45 | 46 | `; 47 | /* end snapshot foundation for virtual IED creation getSpecificationIED function looks like the latest snapshot */ 48 | 49 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/validators/templates/foundation.test.ts: -------------------------------------------------------------------------------- 1 | import { expect } from '@open-wc/testing'; 2 | 3 | import { 4 | tagValidator, 5 | validateChildren, 6 | } from '../../../../src/validators/templates/foundation.js'; 7 | 8 | describe('validator foundation', () => { 9 | describe('tagValidator', () => { 10 | it('tagValidator returns undefined with missing tagName', () => { 11 | expect(tagValidator['noTag']).to.be.undefined; 12 | }); 13 | }); 14 | describe('validateChildren', () => { 15 | let element: Element; 16 | beforeEach(() => { 17 | element = new DOMParser().parseFromString( 18 | '', 19 | 'application/xml' 20 | ).documentElement; 21 | }); 22 | it('does not throw Issues for unknown childTags', async () => { 23 | const issues = await validateChildren(element); 24 | expect(issues.length).to.equal(0); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/__snapshots__/address.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["address renderGseSmvAddress looks like the latest snapshot"] = 5 | ` 11 |
12 | 13 | 14 | 15 | 16 | 21 | 22 | 27 | 28 | 35 | 36 | 42 | 43 |
44 | 50 | 51 |
52 | `; 53 | /* end snapshot address renderGseSmvAddress looks like the latest snapshot */ 54 | 55 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/__snapshots__/connectivitynode.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Wizards for SCL element ConnectivityNode looks like the latest snapshot"] = 5 | ` 11 |
12 | 20 | 21 | 28 | 29 |
30 | 36 | 37 |
38 | `; 39 | /* end snapshot Wizards for SCL element ConnectivityNode looks like the latest snapshot */ 40 | 41 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/__snapshots__/fcda.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["create wizard for FCDA element with a valid SCL file looks like the last snapshot"] = 5 | ` 11 |
12 | 13 | 14 |
15 | 21 | 22 | 28 | 29 |
30 | `; 31 | /* end snapshot create wizard for FCDA element with a valid SCL file looks like the last snapshot */ 32 | 33 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/__snapshots__/ldevice.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Wizards for SCL element LDevice Allowing/Disallowing ldName editing looks like the latest snapshot"] = 5 | ` 11 |
12 | 19 | 20 | 27 | 28 | 33 | 34 |
35 | 41 | 42 | 48 | 49 |
50 | `; 51 | /* end snapshot Wizards for SCL element LDevice Allowing/Disallowing ldName editing looks like the latest snapshot */ 52 | 53 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/__snapshots__/terminal.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Wizards for SCL element Terminal looks like the latest snapshot"] = 5 | ` 11 |
12 | 20 | 21 | 28 | 29 | 36 | 37 |
38 | 44 | 45 |
46 | `; 47 | /* end snapshot Wizards for SCL element Terminal looks like the latest snapshot */ 48 | 49 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/__snapshots__/trgops.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Wizards for SCL TrgOps element define an edit wizard that looks like the latest snapshot"] = 5 | ` 11 |
12 | 17 | 18 | 23 | 24 | 29 | 30 | 35 | 36 | 41 | 42 |
43 | 49 | 50 | 56 | 57 |
58 | `; 59 | /* end snapshot Wizards for SCL TrgOps element define an edit wizard that looks like the latest snapshot */ 60 | 61 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/connectivitynode.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '@openscd/open-scd/src/addons/Wizards.js'; 4 | import { OscdWizards } from '@openscd/open-scd/src/addons/Wizards.js'; 5 | 6 | import { editConnectivityNodeWizard } from '../../../src/wizards/connectivitynode.js'; 7 | 8 | describe('Wizards for SCL element ConnectivityNode', () => { 9 | let doc: XMLDocument; 10 | let element: OscdWizards; 11 | 12 | beforeEach(async () => { 13 | element = await fixture( 14 | html`` 15 | ); 16 | doc = await fetch('/test/testfiles/valid2007B4withSubstationXY.scd') 17 | .then(response => response.text()) 18 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 19 | 20 | const wizard = editConnectivityNodeWizard( 21 | doc.querySelector('ConnectivityNode')! 22 | ); 23 | element.workflow.push(() => wizard); 24 | await element.requestUpdate(); 25 | }); 26 | it('looks like the latest snapshot', async () => { 27 | await expect(element.wizardUI.dialog).dom.to.equalSnapshot(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/services.test.ts: -------------------------------------------------------------------------------- 1 | import { expect } from '@open-wc/testing'; 2 | 3 | import { isEmptyObject } from '../../../src/wizards/services.js'; 4 | 5 | describe('Wizards for SCL element Services', () => { 6 | it('Simple empty input object is empty', () => { 7 | const sut = { 8 | foo: '', 9 | }; 10 | 11 | expect(isEmptyObject(sut)).to.be.true; 12 | }); 13 | it('Complex empty input object is empty', () => { 14 | const sut = { 15 | foo: { 16 | bar: '', 17 | }, 18 | }; 19 | expect(isEmptyObject(sut)).to.be.true; 20 | }); 21 | it('Simple filled input object is not empty', () => { 22 | const sut = { 23 | foo: 'bar', 24 | }; 25 | expect(isEmptyObject(sut)).to.be.false; 26 | }); 27 | it('Complex filled input object is not empty', () => { 28 | const sut = { 29 | foo: { 30 | bar: 'qux', 31 | }, 32 | }; 33 | expect(isEmptyObject(sut)).to.be.false; 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/wizards/terminal.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '@openscd/open-scd/src/addons/Wizards.js'; 4 | import { OscdWizards } from '@openscd/open-scd/src/addons/Wizards.js'; 5 | 6 | import { editTerminalWizard } from '../../../src/wizards/terminal.js'; 7 | 8 | describe('Wizards for SCL element Terminal', () => { 9 | let doc: XMLDocument; 10 | let element: OscdWizards; 11 | 12 | beforeEach(async () => { 13 | element = await fixture( 14 | html`` 15 | ); 16 | doc = await fetch('/test/testfiles/valid2007B4withSubstationXY.scd') 17 | .then(response => response.text()) 18 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 19 | 20 | const wizard = editTerminalWizard(doc.querySelector('Terminal')!); 21 | element.workflow.push(() => wizard); 22 | await element.requestUpdate(); 23 | }); 24 | it('looks like the latest snapshot', async () => { 25 | await expect(element.wizardUI.dialog).dom.to.equalSnapshot(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /packages/plugins/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "noEmitOnError": true, 7 | "lib": ["es2020", "dom"], 8 | "strict": true, 9 | "esModuleInterop": false, 10 | "allowSyntheticDefaultImports": true, 11 | "experimentalDecorators": true, 12 | "importHelpers": true, 13 | "allowJs": true, 14 | "skipLibCheck": true, 15 | "outDir": "dist", 16 | "sourceMap": true, 17 | "inlineSources": true, 18 | "resolveJsonModule": true, 19 | "rootDir": "./src" 20 | }, 21 | "include": ["src/**/*.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/plugins/workbox-config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | globDirectory: 'build/', 3 | globPatterns: [ 4 | 'public/**/*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}', 5 | 'src/**/*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}', 6 | '*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}', 7 | ], 8 | swDest: 'build/sw.js', 9 | runtimeCaching: [ 10 | { 11 | urlPattern: /.*/, 12 | handler: 'NetworkFirst', 13 | }, 14 | ], 15 | skipWaiting: true, 16 | inlineWorkboxRuntime: true, 17 | }; 18 | -------------------------------------------------------------------------------- /packages/wizards/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/wizards", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "packages/wizards/src", 6 | "targets": {} 7 | } 8 | -------------------------------------------------------------------------------- /packages/xml/.gitignore: -------------------------------------------------------------------------------- 1 | .tsbuildinfo 2 | 3 | dist/ 4 | node_modules/ 5 | doc/ 6 | coverage/ 7 | -------------------------------------------------------------------------------- /packages/xml/.npmignore: -------------------------------------------------------------------------------- 1 | ## editors 2 | /.idea 3 | /.vscode 4 | 5 | ## system files 6 | .DS_Store 7 | 8 | ## npm 9 | /node_modules/ 10 | /npm-debug.log 11 | 12 | ## testing 13 | /coverage/ 14 | 15 | ## local debug 16 | /.npmrc 17 | 18 | ## temp folders 19 | /.tmp/ 20 | 21 | # build 22 | /_site/ 23 | /out-tsc/ 24 | 25 | storybook-static 26 | custom-elements.json 27 | -------------------------------------------------------------------------------- /packages/xml/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | -------------------------------------------------------------------------------- /packages/xml/README.md: -------------------------------------------------------------------------------- 1 | # OpenSCD XML 2 | -------------------------------------------------------------------------------- /packages/xml/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@openscd/xml", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "library", 5 | "sourceRoot": "packages/xml/src", 6 | "targets": {} 7 | } 8 | -------------------------------------------------------------------------------- /packages/xml/src/index.ts: -------------------------------------------------------------------------------- 1 | export { createElement, cloneElement, getUniqueElementName, getChildElementsByTagName, formatXml } from './foundation.js'; 2 | -------------------------------------------------------------------------------- /packages/xml/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "esnext", 5 | "moduleResolution": "node", 6 | "noEmitOnError": true, 7 | "lib": ["es2018", "dom"], 8 | "strict": true, 9 | "esModuleInterop": false, 10 | "allowSyntheticDefaultImports": true, 11 | "experimentalDecorators": true, 12 | "declaration": true, 13 | "importHelpers": true, 14 | "outDir": "./dist", 15 | "sourceMap": true, 16 | "inlineSources": true, 17 | "rootDir": "./src", 18 | "tsBuildInfoFile": ".tsbuildinfo", 19 | "incremental": true, 20 | "skipLibCheck": true 21 | }, 22 | "include": ["src/**/*.ts"] 23 | } 24 | -------------------------------------------------------------------------------- /packages/xml/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "rootDir": "./" 5 | }, 6 | "files": [ 7 | "./**/*.ts" 8 | ] 9 | } -------------------------------------------------------------------------------- /packages/xml/web-test-runner.config.mjs: -------------------------------------------------------------------------------- 1 | // import { playwrightLauncher } from '@web/test-runner-playwright'; 2 | import { esbuildPlugin } from '@web/dev-server-esbuild'; 3 | 4 | export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({ 5 | /** we run test directly on TypeScript files */ 6 | plugins: [esbuildPlugin({ ts: true })], 7 | 8 | /** Resolve bare module imports */ 9 | nodeResolve: true, 10 | 11 | /** filter browser logs 12 | * Plugins have a fix URL and do not fit to the file structure in test environment. 13 | * Creating open-scd in the tests leads to error in the browser log - we had to disable the browser log 14 | */ 15 | browserLogs: false, 16 | 17 | /** specify groups for unit and integrations tests 18 | * hint: no --group definition runs all groups 19 | */ 20 | groups: [ 21 | { 22 | name: 'unit', 23 | files: 'test/**/*.test.ts', 24 | }, 25 | ], 26 | }); 27 | --------------------------------------------------------------------------------