├── .editorconfig ├── .env.example ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── release.yml └── workflows │ ├── build-project.yml │ ├── release-project.yml │ ├── stale-issues.yml │ ├── test-and-build.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .prettierignore ├── .release-please-manifest.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── GLOSSARY.MD ├── LICENSE.md ├── README.md ├── ROADMAP.md ├── SECURITY.md ├── docs ├── 0001-ADR-Theming.md ├── 0002-ADR-Atomic-Design.md ├── core-api │ └── 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 ├── plug-ins.md └── theming-proposal.png ├── lerna.json ├── nx.json ├── package-lock.json ├── package.json └── packages ├── addons ├── package.json └── project.json ├── compas-open-scd ├── .eslintrc.cjs ├── .gitignore ├── .nojekyll ├── CHANGELOG.md ├── DEVELOPMENT.md ├── Dockerfile ├── LICENSE.md ├── ModHeader.png ├── README.md ├── RELEASING.md ├── ROADMAP.md ├── browserconfig.xml ├── favicon.ico ├── index.html ├── manifest.json ├── package.json ├── public │ ├── ace │ │ ├── ext-searchbox.js │ │ ├── mode-xml.js │ │ ├── theme-solarized_dark.js │ │ ├── theme-solarized_light.js │ │ └── worker-xml.js │ ├── apple-touch-icon.png │ ├── cim │ │ └── README.md │ ├── conf │ │ └── export-ied-params.json │ ├── 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-black.svg │ ├── icon-color.svg │ ├── init-js │ │ └── init.js │ ├── js │ │ ├── init.js │ │ ├── plugins.js │ │ ├── worker.js │ │ ├── xmlvalidate.js │ │ └── xmlvalidate.wasm │ ├── maskable_icon.png │ ├── 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 │ │ ├── CoMPAS-Versions-Editor.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 │ ├── monochrome_icon.png │ ├── mstile-144x144.png │ ├── mstile-150x150.png │ ├── mstile-310x150.png │ ├── mstile-310x310.png │ ├── mstile-70x70.png │ ├── nsdoc │ │ └── README.md │ └── 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 │ ├── addons │ │ ├── CompasHistory.ts │ │ ├── CompasLayout.ts │ │ ├── CompasSession.ts │ │ └── CompasSettings.ts │ ├── compas-editors │ │ ├── CompasVersions.ts │ │ ├── Sitipe.ts │ │ ├── autogen-substation.ts │ │ ├── foundation.ts │ │ └── sitipe │ │ │ ├── foundation.ts │ │ │ ├── sitipe-bay.ts │ │ │ ├── sitipe-service.ts │ │ │ └── sitipe-substation.ts │ ├── compas-services │ │ ├── CompasCimMappingService.ts │ │ ├── CompasNSDocFileService.ts │ │ ├── CompasSclAutoAlignmentService.ts │ │ ├── CompasSclDataService.ts │ │ ├── CompasUserInfoService.ts │ │ ├── CompasValidatorService.ts │ │ ├── Websocket.ts │ │ └── foundation.ts │ ├── compas-wizards │ │ └── scl.ts │ ├── compas │ │ ├── CompasAutoAlignment.ts │ │ ├── CompasChangeSetRadiogroup.ts │ │ ├── CompasComment.ts │ │ ├── CompasExistsIn.ts │ │ ├── CompasImportFromApi.ts │ │ ├── CompasLabelsField.ts │ │ ├── CompasLoading.ts │ │ ├── CompasNsdoc.ts │ │ ├── CompasOpen.ts │ │ ├── CompasSave.ts │ │ ├── CompasSclList.ts │ │ ├── CompasSclTypeList.ts │ │ ├── CompasSclTypeSelect.ts │ │ ├── CompasSessionExpiredDialog.ts │ │ ├── CompasSessionExpiringDialog.ts │ │ ├── CompasSettings.ts │ │ ├── CompasUploadVersion.ts │ │ ├── CompasUserInfo.ts │ │ ├── foundation.ts │ │ └── private.ts │ ├── file.ts │ ├── locamation │ │ ├── LocamationIEDList.ts │ │ ├── LocamationLNEdit.ts │ │ ├── LocamationLNList.ts │ │ └── foundation.ts │ ├── menu │ │ ├── CompasAutoAlignment.ts │ │ ├── CompasCimMapping.ts │ │ ├── CompasCompareIED.ts │ │ ├── CompasImportFromApi.ts │ │ ├── CompasImportIEDs.ts │ │ ├── CompasMerge.ts │ │ ├── CompasOpen.ts │ │ ├── CompasSave.ts │ │ ├── CompasSaveAs.ts │ │ ├── CompasSaveAsVersion.ts │ │ ├── CompasSettings.ts │ │ ├── CompasUpdateSubstation.ts │ │ ├── ExportIEDParams.ts │ │ └── LocamationVMU.ts │ ├── open-scd.ts │ ├── plugin-tag.ts │ ├── polyfill │ │ └── scoped-custom-elements-polyfill.js │ ├── translations │ │ ├── de.ts │ │ ├── en.ts │ │ └── loader.ts │ └── validators │ │ └── CompasValidateSchema.ts ├── sw.js ├── test │ ├── integration │ │ ├── __snapshots__ │ │ │ ├── Setting.test.snap.js │ │ │ └── open-scd.test.snap.js │ │ ├── compas-editors │ │ │ ├── CompasVersions.test.ts │ │ │ ├── __snapshots__ │ │ │ │ └── CompasVersions.test.snap.js │ │ │ ├── autogen-substation.test.ts │ │ │ └── sitipe-bay.test.ts │ │ └── compas │ │ │ └── foundation.test.ts │ ├── mock-compas-open-scd.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 │ │ ├── Sitipe.scd │ │ ├── SubEquipment.scd │ │ ├── cleanup.scd │ │ ├── comm-map.scd │ │ ├── communication.scd │ │ ├── communication │ │ │ └── communication.scd │ │ ├── compas │ │ │ ├── compas-scl-private-missing-compas-elements.scd │ │ │ ├── compas-scl-private-missing-private.scd │ │ │ ├── compas-scl-private-update-existing.scd │ │ │ ├── minigrid-3.0.0.cid │ │ │ ├── minigrid-3.1.0.cid │ │ │ ├── save-compas-as-version.scd │ │ │ ├── save-compas.scd │ │ │ └── test-scd.cid │ │ ├── conductingequipmentwizard.scd │ │ ├── editors │ │ │ ├── DataBindingGOOSE2007B4.scd │ │ │ ├── DataBindingSMV2007B4.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 │ │ ├── locamation │ │ │ └── LCMTN_VMU_MMS.scd │ │ ├── menu │ │ │ ├── autogen-substation │ │ │ │ └── autogen-substation-demo.scd │ │ │ ├── compare-ied-changed.scd │ │ │ ├── compare-ied-original.scd │ │ │ ├── export-ied-params-no-ied.scd │ │ │ └── export-ied-params.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 │ │ │ ├── CompasValidation.scd │ │ │ ├── datatypetemplateerrors.scd │ │ │ ├── doandsdotestfile.scd │ │ │ └── zeroissues.scd │ │ ├── virtualied │ │ │ └── specificfromfunctions.ssd │ │ ├── wizards │ │ │ ├── abstractda.scd │ │ │ ├── communication.scd │ │ │ ├── fcda.scd │ │ │ ├── gsecontrol.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 │ │ ├── CompasHistoring.test.ts │ │ ├── CompasPlugging.test.ts │ │ ├── __snapshots__ │ │ ├── Logging.test.snap.js │ │ ├── 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 │ │ ├── compas-editors │ │ ├── Sitipe.test.ts │ │ ├── __snapshots__ │ │ │ └── Sitipe.test.snap.js │ │ └── sitipe │ │ │ ├── __snapshots__ │ │ │ └── sitipe-substation.test.snap.js │ │ │ └── sitipe-substation.test.ts │ │ ├── compas-services │ │ ├── CompasNSDocFileService.test.ts │ │ └── foundation.test.ts │ │ ├── compas-wizards │ │ ├── __snapshots__ │ │ │ └── scl.test.snap.js │ │ └── scl.test.ts │ │ ├── compas │ │ ├── CompasAutoAlignment.test.ts │ │ ├── CompasChangeSet.test.ts │ │ ├── CompasComment.test.ts │ │ ├── CompasExistsIn.test.ts │ │ ├── CompasImportFromApi.test.ts │ │ ├── CompasLabelsField.test.ts │ │ ├── CompasLoading.test.ts │ │ ├── CompasOpen.test.ts │ │ ├── CompasSave.test.ts │ │ ├── CompasSclDataServiceResponses.ts │ │ ├── CompasSclList.test.ts │ │ ├── CompasScltypeList.test.ts │ │ ├── CompasScltypeSelect.test.ts │ │ ├── CompasSessionExpiredDialog.test.ts │ │ ├── CompasSessionExpiringDialog.test.ts │ │ ├── CompasSettings.test.ts │ │ ├── CompasUploadVersion.test.ts │ │ ├── __snapshots__ │ │ │ ├── CompasAutoAlignment.test.snap.js │ │ │ ├── CompasChangeSet.test.snap.js │ │ │ ├── CompasComment.test.snap.js │ │ │ ├── CompasCompareDialog.test.snap.js │ │ │ ├── CompasImportFromApi.test.snap.js │ │ │ ├── CompasLabelsField.test.snap.js │ │ │ ├── CompasLoading.test.snap.js │ │ │ ├── CompasOpen.test.snap.js │ │ │ ├── CompasSave.test.snap.js │ │ │ ├── CompasScl.test.snap.js │ │ │ ├── CompasSclList.test.snap.js │ │ │ ├── CompasScltypeList.test.snap.js │ │ │ ├── CompasScltypeSelect.test.snap.js │ │ │ ├── CompasSessionExpiredDialog.test.snap.js │ │ │ ├── CompasSessionExpiringDialog.test.snap.js │ │ │ ├── CompasSettings.test.snap.js │ │ │ └── CompasUploadVersion.test.snap.js │ │ ├── foundation.test.ts │ │ ├── private.test.ts │ │ └── test-support.ts │ │ ├── locamation │ │ ├── LocamationIEDList.test.ts │ │ ├── LocamationLNEdit.test.ts │ │ ├── LocamationLNList.test.ts │ │ ├── __snapshots__ │ │ │ ├── LocamationIEDList.test.snap.js │ │ │ ├── LocamationLNEdit.test.snap.js │ │ │ └── LocamationLNList.test.snap.js │ │ └── foundation.test.ts │ │ ├── menu │ │ ├── CompasCompareIED.test.ts │ │ ├── CompasOpen.test.ts │ │ ├── CompasSave.test.ts │ │ ├── CompasSaveAs.test.ts │ │ ├── CompasSaveAsVersion.test.ts │ │ └── __snapshots__ │ │ │ ├── CompareIED.test.snap.js │ │ │ ├── CompasCompareIED.test.snap.js │ │ │ ├── CompasOpen.test.snap.js │ │ │ ├── CompasSave.test.snap.js │ │ │ ├── CompasSaveAs.test.snap.js │ │ │ ├── CompasSaveAsVersion.test.snap.js │ │ │ ├── SclHistory.test.snap.js │ │ │ ├── UpdateDescriptionSEL.test.snap.js │ │ │ ├── UpdateDescritionABB.test.snap.js │ │ │ └── VirtualTemplateIED.test.snap.js │ │ ├── validators │ │ └── CompasValidateSchema.test.ts │ │ └── wizards │ │ └── compas-test-support.ts ├── tsconfig.json ├── web-test-runner.config.mjs └── workbox-config.cjs ├── 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 ├── 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 │ │ └── 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.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 │ │ ├── GooseSubscriberLaterBinding.ts │ │ ├── GooseSubscriberMessageBinding.ts │ │ ├── IED.ts │ │ ├── Protocol104.ts │ │ ├── Publisher.ts │ │ ├── SMVSubscriberDataBinding.ts │ │ ├── SMVSubscriberLaterBinding.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 │ │ │ ├── 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 │ │ ├── publisher │ │ │ ├── data-set-editor.ts │ │ │ ├── data-set-element-editor.ts │ │ │ ├── foundation.ts │ │ │ ├── gse-control-editor.ts │ │ │ ├── gse-control-element-editor.ts │ │ │ ├── report-control-editor.ts │ │ │ ├── report-control-element-editor.ts │ │ │ ├── sampled-value-control-editor.ts │ │ │ └── sampled-value-control-element-editor.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 │ │ ├── Export104.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 │ │ ├── export104 │ │ │ └── foundation.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 │ │ │ ├── GooseSubscriberLaterBinding.test.ts │ │ │ ├── GooseSubscriberMessageBinding.test.ts │ │ │ ├── IED.test.ts │ │ │ ├── Protocol104.test.ts │ │ │ ├── SMVSubscriberDataBinding.test.ts │ │ │ ├── SMVSubscriberLaterBinding.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 │ │ ├── export104 │ │ │ └── export104.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 │ │ │ ├── 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 │ │ ├── GooseSubscriberLaterBinding.test.ts │ │ ├── Publisher.test.ts │ │ ├── SMVSubscriberDataBinding.test.ts │ │ ├── SMVSubscriberLaterBinding.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 │ │ ├── publisher │ │ │ ├── __snapshots__ │ │ │ │ ├── data-set-editor.test.snap.js │ │ │ │ ├── data-set-element-editor.test.snap.js │ │ │ │ ├── gse-control-editor.test.snap.js │ │ │ │ ├── gse-control-element-editor.test.snap.js │ │ │ │ ├── report-control-editor.test.snap.js │ │ │ │ ├── report-control-element-editor.test.snap.js │ │ │ │ ├── sampled-value-control-editor.test.snap.js │ │ │ │ └── sampled-value-control-element-editor.test.snap.js │ │ │ ├── data-set-editor.test.ts │ │ │ ├── data-set-element-editor.test.ts │ │ │ ├── foundation.test.ts │ │ │ ├── gse-control-editor.test.ts │ │ │ ├── gse-control-element-editor.test.ts │ │ │ ├── report-control-editor.test.ts │ │ │ ├── report-control-element-editor.test.ts │ │ │ ├── sampled-value-control-editor.test.ts │ │ │ └── sampled-value-control-element-editor.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 │ │ ├── 104Export │ │ │ └── foundation.test.ts │ │ ├── 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 │ │ ├── controlwithiedname.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 /.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= -------------------------------------------------------------------------------- /.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/dependabot.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Alliander N.V. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | version: 2 6 | 7 | updates: 8 | # Maintain dependencies for GitHub Actions 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | open-pull-requests-limit: 5 14 | - package-ecosystem: "docker" 15 | directory: "packages/compas-open-scd/" 16 | schedule: 17 | interval: "daily" 18 | open-pull-requests-limit: 5 19 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2022 Alliander N.V. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | changelog: 6 | exclude: 7 | labels: 8 | - wontfix 9 | - duplicate 10 | - invalid 11 | categories: 12 | - title: New Features 13 | labels: 14 | - enhancement 15 | - title: Bugfixes 16 | labels: 17 | - bug 18 | - title: Tooling changes 19 | labels: 20 | - tooling 21 | - title: Dependency updates 22 | labels: 23 | - dependencies 24 | - title: Other Changes 25 | labels: 26 | - "*" 27 | -------------------------------------------------------------------------------- /.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@v4.1.4 10 | with: 11 | submodules: 'true' 12 | 13 | - name: Use Node.js 18.x 14 | uses: actions/setup-node@v4 15 | with: 16 | node-version: "18.x" 17 | 18 | - name: Install and Test OpenSCD 19 | run: | 20 | npm ci 21 | npm run-script build 22 | cd packages/compas-open-scd 23 | npm run-script test 24 | -------------------------------------------------------------------------------- /.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@v4.1.4 15 | with: 16 | submodules: 'true' 17 | 18 | - name: Use Node.js 18.x 19 | uses: actions/setup-node@v4 20 | with: 21 | node-version: "18.x" 22 | 23 | - name: Install and Test 24 | run: | 25 | npm ci 26 | npm run-script build 27 | cd packages/compas-open-scd 28 | npm run-script test 29 | -------------------------------------------------------------------------------- /.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 -------------------------------------------------------------------------------- /.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.38.0" 5 | } 6 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Please go to [Security Advisories](https://github.com/com-pas/compas-open-scd/security/advisories) to privately report a security vulnerability, 6 | our contributors will try to respond within a week of your report with a rough plan for a fix and new tests. 7 | -------------------------------------------------------------------------------- /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/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/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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 | "targetDependencies": { 27 | "build": [ 28 | { 29 | "target": "build", 30 | "projects": "dependencies" 31 | } 32 | ] 33 | }, 34 | "$schema": "./node_modules/nx/schemas/nx-schema.json", 35 | "defaultBase": "main" 36 | } 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "compas-openscd-monorepo", 3 | "version": "0.0.1", 4 | "description": "CoMPAS OpenSCD base distribution and plugins", 5 | "private": true, 6 | "workspaces": [ 7 | "packages/*" 8 | ], 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "build": "npx nx run-many -t build --all" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/com-pas/compas-open-scd.git" 16 | }, 17 | "license": "Apache-2.0", 18 | "devDependencies": { 19 | "nx": "18.3.4" 20 | }, 21 | "optionalDependencies": { 22 | "@nx/nx-linux-x64-gnu": "18.3.4" 23 | } 24 | } -------------------------------------------------------------------------------- /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/compas-open-scd/.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 | -------------------------------------------------------------------------------- /packages/compas-open-scd/.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 | 24 | /public/cim/**/*.xml 25 | -------------------------------------------------------------------------------- /packages/compas-open-scd/.nojekyll: -------------------------------------------------------------------------------- 1 | snowpack placeholder 2 | -------------------------------------------------------------------------------- /packages/compas-open-scd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM bitnami/nginx:1.27.3 2 | COPY build/. /app/ 3 | 4 | VOLUME /opt/bitnami/nginx/conf/server_blocks/ 5 | VOLUME /app/public/cim 6 | VOLUME /app/public/conf 7 | VOLUME /app/public/nsdoc -------------------------------------------------------------------------------- /packages/compas-open-scd/ModHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/ModHeader.png -------------------------------------------------------------------------------- /packages/compas-open-scd/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/compas-open-scd/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/favicon.ico -------------------------------------------------------------------------------- /packages/compas-open-scd/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "CoMPAS - OpenSCD", 3 | "name": "CoMPAS - 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-color.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.33.0" 44 | } 45 | -------------------------------------------------------------------------------- /packages/compas-open-scd/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/cim/README.md: -------------------------------------------------------------------------------- 1 | Directory containing fixed files for the 'Import from API' plugin, namely: 2 | 3 | - cim-eq-hoorn-v3.xml 4 | - cim-eq-makkum.xml 5 | - cim-eq-winselingseweg-voorbeeld.xml 6 | - EQ-entsoe-voorbeeld.xml 7 | 8 | Without these files, the 'Import from API' doesn't work and the hardcoded files cannot be opened. -------------------------------------------------------------------------------- /packages/compas-open-scd/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/favicon-16x16.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/favicon-32x32.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-mono-v13-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-mono-v13-latin-300.ttf -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-mono-v13-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-mono-v13-latin-300.woff -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-mono-v13-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-mono-v13-latin-300.woff2 -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/public/google/fonts/roboto-v27-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-300.ttf -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-300.woff -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-300.woff2 -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-500.ttf -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-500.woff -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-500.woff2 -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-regular.ttf -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-regular.woff -------------------------------------------------------------------------------- /packages/compas-open-scd/public/google/fonts/roboto-v27-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/fonts/roboto-v27-latin-regular.woff2 -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/public/google/icons/material-icons-outlined.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/icons/material-icons-outlined.woff2 -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/public/google/icons/material-symbols-outlined.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/google/icons/material-symbols-outlined.woff2 -------------------------------------------------------------------------------- /packages/compas-open-scd/public/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/icon-192x192.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/icon-512x512.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/init-js/init.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/init-js/init.js -------------------------------------------------------------------------------- /packages/compas-open-scd/public/js/init.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/js/init.js -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/public/js/xmlvalidate.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/js/xmlvalidate.wasm -------------------------------------------------------------------------------- /packages/compas-open-scd/public/maskable_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/maskable_icon.png -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/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/compas-open-scd/public/monochrome_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/monochrome_icon.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/mstile-144x144.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/mstile-150x150.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/mstile-310x150.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/mstile-310x310.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/mstile-70x70.png -------------------------------------------------------------------------------- /packages/compas-open-scd/public/nsdoc/README.md: -------------------------------------------------------------------------------- 1 | Directory containing fixed nsdoc for the 'Validation' plugin: 2 | 3 | - IEC_61850-7-2_2007B3-en.nsdoc 4 | - IEC_61850-7-3_2007B3-en.nsdoc 5 | - IEC_61850-7-4_2007B3-en.nsdoc 6 | - IEC_61850-8-1_2003A2-en.nsdoc 7 | -------------------------------------------------------------------------------- /packages/compas-open-scd/public/xml/CC-EULA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/compas-open-scd/public/xml/CC-EULA.pdf -------------------------------------------------------------------------------- /packages/compas-open-scd/src/compas-editors/foundation.ts: -------------------------------------------------------------------------------- 1 | import {css} from "lit-element"; 2 | 3 | export function getElementByName(parent: Element, namespace: string, tagName: string): Element | null { 4 | const elements = parent.getElementsByTagNameNS(namespace, tagName); 5 | if (elements.length > 0) { 6 | return elements.item(0); 7 | } 8 | return null; 9 | } 10 | 11 | /** Common `CSS` styles used by Compas Editors subeditors */ 12 | export const styles = css` 13 | :host(.moving) section { 14 | opacity: 0.3; 15 | } 16 | 17 | section { 18 | background-color: var(--mdc-theme-surface); 19 | transition: all 200ms linear; 20 | outline-color: var(--mdc-theme-primary); 21 | outline-style: solid; 22 | outline-width: 0px; 23 | opacity: 1; 24 | } 25 | 26 | h1 { 27 | color: var(--mdc-theme-on-surface); 28 | font-family: 'Roboto', sans-serif; 29 | font-weight: 300; 30 | overflow: hidden; 31 | white-space: nowrap; 32 | text-overflow: ellipsis; 33 | margin: 0px; 34 | line-height: 48px; 35 | padding-left: 0.3em; 36 | transition: background-color 150ms linear; 37 | } 38 | `; 39 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/compas-editors/sitipe/foundation.ts: -------------------------------------------------------------------------------- 1 | // Substation element hierarchy 2 | const substationPath = [':root', 'Substation', 'VoltageLevel', 'Bay']; 3 | 4 | export type SubstationTag = 'Substation' | 'VoltageLevel' | 'Bay'; 5 | 6 | /** `Private`-safeguarded selectors for `Substation` and its descendants */ 7 | export const selectors = >( 8 | Object.fromEntries( 9 | substationPath.map((e, i, a) => [e, a.slice(0, i + 1).join(' > ')]) 10 | ) 11 | ); 12 | 13 | export const SIEMENS_SITIPE_IED_REF = 'Siemens-SITIPE-IEDRef'; 14 | 15 | export const SIEMENS_SITIPE_BAY_TEMPLATE = 'Siemens-SITIPE-BayTemplate'; 16 | 17 | export const SIEMENS_SITIPE_IED_TEMPLATE_REF = 'Siemens-SITIPE-IEDTemplateRef'; 18 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/compas-services/CompasUserInfoService.ts: -------------------------------------------------------------------------------- 1 | import {CompasSettings} from "../compas/CompasSettings.js"; 2 | import {handleError, handleResponse, parseXml} from "./foundation.js"; 3 | 4 | export function CompasUserInfoService() { 5 | 6 | function getCompasSettings() { 7 | return CompasSettings().compasSettings; 8 | } 9 | 10 | return { 11 | getCompasUserInfo(): Promise { 12 | const userInfoUrl = getCompasSettings().sclDataServiceUrl + '/common/v1/userinfo'; 13 | return fetch(userInfoUrl) 14 | .catch(handleError) 15 | .then(handleResponse) 16 | .then(parseXml); 17 | }, 18 | 19 | ping(): Promise { 20 | const pingUrl = getCompasSettings().sclDataServiceUrl + '/q/health/ready'; 21 | return fetch(pingUrl) 22 | .catch(handleError) 23 | .then(handleResponse); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/compas/CompasLoading.ts: -------------------------------------------------------------------------------- 1 | import {customElement, html, LitElement, TemplateResult} from "lit-element"; 2 | import {translate} from "lit-translate"; 3 | 4 | import '@material/mwc-list'; 5 | import '@material/mwc-list/mwc-list-item'; 6 | 7 | @customElement('compas-loading') 8 | export class CompasLoadingElement extends LitElement { 9 | render(): TemplateResult { 10 | return html` 11 | 12 | ${translate("compas.loading")} 13 | 14 | ` 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/file.ts: -------------------------------------------------------------------------------- 1 | export function formatXml(xml: string, tab?: string): string { 2 | let formatted = '', 3 | indent = ''; 4 | 5 | if (!tab) tab = '\t'; 6 | xml.split(/>\s*\r\n'; 9 | if (node.match(/^]*[^/]$/)) indent += tab; 10 | }); 11 | return formatted.substring(1, formatted.length - 3); 12 | } 13 | 14 | export function saveDocumentToFile(doc: Document | null, docName: string) { 15 | if (doc) { 16 | const blob = new Blob( 17 | [formatXml(new XMLSerializer().serializeToString(doc))], 18 | { 19 | type: 'application/xml', 20 | } 21 | ); 22 | 23 | const a = document.createElement('a'); 24 | a.download = docName; 25 | a.href = URL.createObjectURL(blob); 26 | a.dataset.downloadurl = ['application/xml', a.download, a.href].join(':'); 27 | a.style.display = 'none'; 28 | document.body.appendChild(a); 29 | a.click(); 30 | document.body.removeChild(a); 31 | setTimeout(function () { 32 | URL.revokeObjectURL(a.href); 33 | }, 5000); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/menu/CompasCompareIED.ts: -------------------------------------------------------------------------------- 1 | import { html, TemplateResult } from 'lit-element'; 2 | 3 | import '../compas/CompasOpen.js'; 4 | 5 | import { DocRetrievedEvent } from '../compas/CompasOpen.js'; 6 | 7 | import CompareIEDPlugin from '@openscd/plugins/src/menu/CompareIED.js'; 8 | 9 | export default class CompasCompareIEDPlugin extends CompareIEDPlugin { 10 | /** 11 | * Overwriting the render function for opening the template project. 12 | * Now it will also be possible to select the template project from the CoMPAS Data Service. 13 | * 14 | * @override 15 | */ 16 | protected renderSelectTemplateFile(): TemplateResult { 17 | return html` { 19 | this.templateDoc = evt.detail.doc; 20 | }} 21 | > 22 | ${this.renderCloseButton()}`; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/menu/CompasImportFromApi.ts: -------------------------------------------------------------------------------- 1 | import { html, LitElement } from 'lit-element'; 2 | import { get } from 'lit-translate'; 3 | 4 | import '@openscd/open-scd/src/filtered-list.js'; 5 | import '@openscd/open-scd/src/wizard-textfield.js'; 6 | import { newWizardEvent, Wizard } from '@openscd/open-scd/src/foundation.js'; 7 | 8 | import '../compas/CompasImportFromApi.js'; 9 | 10 | export default class ImportFromApiPlugin extends LitElement { 11 | private importFromApiWizard(): Wizard { 12 | return [ 13 | { 14 | title: get('compas.import.title'), 15 | content: [html``], 16 | }, 17 | ]; 18 | } 19 | 20 | async run(): Promise { 21 | this.dispatchEvent(newWizardEvent(this.importFromApiWizard())); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/menu/LocamationVMU.ts: -------------------------------------------------------------------------------- 1 | import {LitElement} from 'lit-element'; 2 | 3 | import {newWizardEvent} from '@openscd/open-scd/src/foundation.js'; 4 | import {Nsdoc} from "@openscd/open-scd/src/foundation/nsdoc.js"; 5 | 6 | import "../locamation/LocamationIEDList.js"; 7 | 8 | import {locamationIEDListWizard} from "../locamation/LocamationIEDList.js"; 9 | 10 | export default class LocamationVMUMenuPlugin extends LitElement { 11 | doc!: XMLDocument; 12 | nsdoc!: Nsdoc; 13 | 14 | async run(): Promise { 15 | this.dispatchEvent(newWizardEvent(locamationIEDListWizard(this.doc, this.nsdoc))); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/plugin-tag.ts: -------------------------------------------------------------------------------- 1 | export function pluginTag(uri: string): string { 2 | let h1 = 0xdeadbeef, 3 | h2 = 0x41c6ce57; 4 | for (let i = 0, ch; i < uri.length; i++) { 5 | ch = uri.charCodeAt(i); 6 | h1 = Math.imul(h1 ^ ch, 2654435761); 7 | h2 = Math.imul(h2 ^ ch, 1597334677); 8 | } 9 | h1 = 10 | Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ 11 | Math.imul(h2 ^ (h2 >>> 13), 3266489909); 12 | h2 = 13 | Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ 14 | Math.imul(h1 ^ (h1 >>> 13), 3266489909); 15 | return 'oscd-plugin' + 16 | ((h2 >>> 0).toString(16).padStart(8, '0') + 17 | (h1 >>> 0).toString(16).padStart(8, '0')) 18 | } 19 | -------------------------------------------------------------------------------- /packages/compas-open-scd/src/translations/loader.ts: -------------------------------------------------------------------------------- 1 | import { Strings } from 'lit-translate'; 2 | import { de as compasDe } from './de.js'; 3 | import { en as compasEn } from './en.js'; 4 | import { de as oscdDe } from '@openscd/open-scd/src/translations/de.js'; 5 | import { en as oscdEn } from '@openscd/open-scd/src/translations/en.js'; 6 | 7 | export type Language = 'en' | 'de'; 8 | export const languages = { 9 | en: { ...oscdEn, ...compasEn }, 10 | de: { ...oscdDe, ...compasDe }, 11 | }; 12 | 13 | export type Translations = typeof compasEn; 14 | 15 | export async function loader(lang: string): Promise { 16 | if (Object.keys(languages).includes(lang)) return languages[lang]; 17 | else return {}; 18 | } 19 | -------------------------------------------------------------------------------- /packages/compas-open-scd/sw.js: -------------------------------------------------------------------------------- 1 | self.addEventListener('install', () => { 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', () => { 10 | console.log('Dev (dummy, non-caching) service worker activated'); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/compas/compas-scl-private-missing-compas-elements.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/compas/compas-scl-private-missing-private.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/compas/compas-scl-private-update-existing.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | existing 5 | CID 6 | 7 | Label1 8 | 9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/compas/save-compas-as-version.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AmsterdamCS 5 | SCD 6 | 7 | Amsterdam 8 | 9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/compas/save-compas.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | UtrechtCS 5 | CID 6 | 7 | Utrecht 8 | 9 | 10 |
11 | 12 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/foundation/testFile73.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/foundation/testFile74.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/foundation/testFile81.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/history.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/importieds/emptyproject.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/importieds/invalid.iid: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/importieds/parsererror.iid: -------------------------------------------------------------------------------- 1 | SCL xmlns="http://www.iec.ch/61850/2003/SCL" version="2007" revision="B" release="4" -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/no-history.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/nsdoc/IEC_61850-7-2.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/nsdoc/invalid.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/nsdoc/wrong-version.nsdoc: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/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/compas-open-scd/test/testfiles/validators/CompasValidation.scd: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | existing 7 | 8 |
9 | TrainingIEC61850 10 | 11 | 12 | 13 |
14 | 15 | 16 | 20 17 | 18 | 19 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/testfiles/validators/zeroissues.scd: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/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 | 15 |

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

27 | 28 | 29 | 30 | edit 31 | 32 | 33 | 34 | 38 |

39 |
40 | 41 | 42 |
43 |
44 | `; 45 | /* end snapshot action-pane with icon property set looks like the latest snapshot */ 46 | 47 | -------------------------------------------------------------------------------- /packages/compas-open-scd/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/compas-open-scd/test/unit/compas-editors/__snapshots__/Sitipe.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Sitipe plugin No doc loaded Should look like latest snapshot"] = 5 | `
6 |

7 | 8 | [substation.missing] 9 | 10 |

11 |
12 | `; 13 | /* end snapshot Sitipe plugin No doc loaded Should look like latest snapshot */ 14 | 15 | snapshots["Sitipe plugin With Doc loaded Should look like latest snapshot"] = 16 | `
17 |
18 | 19 | 20 |
21 |
22 | `; 23 | /* end snapshot Sitipe plugin With Doc loaded Should look like latest snapshot */ 24 | 25 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas-editors/sitipe/sitipe-substation.test.ts: -------------------------------------------------------------------------------- 1 | import { fixture, html, expect } from '@open-wc/testing'; 2 | 3 | import '../../../../src/compas-editors/sitipe/sitipe-substation.js'; 4 | import { SitipeSubstation } from '../../../../src/compas-editors/sitipe/sitipe-substation.js'; 5 | 6 | describe('sitipe-substation', () => { 7 | let element: SitipeSubstation; 8 | let doc: XMLDocument; 9 | 10 | beforeEach(async () => { 11 | doc = await fetch('/test/testfiles/Sitipe.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | 15 | element = ( 16 | await fixture( 17 | html`` 21 | ) 22 | ); 23 | 24 | await element.updateComplete; 25 | }); 26 | 27 | it('looks like the latest snapshot', async () => { 28 | await expect(element).shadowDom.to.equalSnapshot(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/CompasComment.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import { CompasCommentElement } from '../../../src/compas/CompasComment.js'; 4 | import '../../../src/compas/CompasComment.js'; 5 | 6 | describe('compas-comment', () => { 7 | let element: CompasCommentElement; 8 | beforeEach(async () => { 9 | element = await fixture(html``); 10 | }); 11 | 12 | it('will be valid', () => { 13 | // When nothing entered it will also be valid. 14 | expect(element.valid()).to.be.true; 15 | 16 | element.value = 'Some comments'; 17 | expect(element.valid()).to.be.true; 18 | }); 19 | 20 | it('will return entered value', () => { 21 | const value = 'Some comments'; 22 | element.value = value; 23 | 24 | expect(element.value).to.be.equal(value); 25 | }); 26 | 27 | it('looks like the latest snapshot', async () => { 28 | await expect(element).shadowDom.to.equalSnapshot(); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/CompasImportFromApi.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | import CompasImportFromApiElement from '../../../src/compas/CompasImportFromApi.js'; 3 | 4 | import '../../../src/compas/CompasImportFromApi.js'; 5 | 6 | describe('compas-import-from-api', () => { 7 | let element: CompasImportFromApiElement; 8 | 9 | beforeEach(async () => { 10 | element = await fixture( 11 | html`` 12 | ); 13 | await element.requestUpdate(); 14 | await element.updateComplete; 15 | }); 16 | 17 | it('looks like the latest snapshot', async () => { 18 | await expect(element).shadowDom.to.equalSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/CompasLoading.test.ts: -------------------------------------------------------------------------------- 1 | import {fixture, html, expect} from '@open-wc/testing'; 2 | 3 | import {CompasLoadingElement} from "../../../src/compas/CompasLoading.js"; 4 | import "../../../src/compas/CompasLoading.js"; 5 | 6 | describe('compas-loading', () => { 7 | let element: CompasLoadingElement; 8 | beforeEach(async () => { 9 | element = await fixture( 10 | html`` 11 | ); 12 | }); 13 | 14 | it('looks like the latest snapshot', async () => { 15 | await expect(element).shadowDom.to.equalSnapshot(); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/__snapshots__/CompasChangeSet.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-changeset-radiogroup looks like the latest snapshot"] = 5 | ` 6 | 14 | [compas.changeset.major] 15 | 16 | 24 | [compas.changeset.minor] 25 | 26 | 34 | [compas.changeset.patch] 35 | 36 | 37 | `; 38 | /* end snapshot compas-changeset-radiogroup looks like the latest snapshot */ 39 | 40 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/__snapshots__/CompasComment.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-comment looks like the latest snapshot"] = 5 | ` 11 | 12 | `; 13 | /* end snapshot compas-comment looks like the latest snapshot */ 14 | 15 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/__snapshots__/CompasImportFromApi.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-import-from-api looks like the latest snapshot"] = 5 | ` 6 | 11 | cim-eq-hoorn-v3 12 | 13 | 18 | cim-eq-makkum 19 | 20 | 25 | cim-eq-winselingseweg-voorbeeld 26 | 27 | 32 | EQ-entsoe-voorbeeld 33 | 34 | 35 | `; 36 | /* end snapshot compas-import-from-api looks like the latest snapshot */ 37 | 38 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/__snapshots__/CompasLoading.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-loading looks like the latest snapshot"] = 5 | ` 6 | 11 | 12 | [compas.loading] 13 | 14 | 15 | 16 | `; 17 | /* end snapshot compas-loading looks like the latest snapshot */ 18 | 19 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/compas/__snapshots__/CompasSessionExpiringDialog.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-session-expiring-dialog looks like the latest snapshot"] = 5 | ` 10 |
11 | [compas.session.explainExpiring] 12 |
13 | 17 | [compas.session.continue] 18 | 19 |
20 | `; 21 | /* end snapshot compas-session-expiring-dialog looks like the latest snapshot */ 22 | 23 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/menu/CompasOpen.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import CompasOpenMenuPlugin from '../../../src/menu/CompasOpen.js'; 4 | 5 | describe('open-drawer', () => { 6 | if (customElements.get('compare-open-menu') === undefined) 7 | customElements.define('compare-open-menu', CompasOpenMenuPlugin); 8 | 9 | let plugin: CompasOpenMenuPlugin; 10 | 11 | beforeEach(async () => { 12 | plugin = await fixture(html``); 13 | await plugin.updateComplete; 14 | }); 15 | 16 | it('looks like the latest snapshot', async () => { 17 | await expect(plugin).shadowDom.to.equalSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/menu/__snapshots__/CompasCompareIED.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["Compas Compare IED Plugin show template project selection dialog looks like its latest snapshot"] = 5 | ` 6 | 7 | 8 | 14 | 15 | 16 | `; 17 | /* end snapshot Compas Compare IED Plugin show template project selection dialog looks like its latest snapshot */ 18 | 19 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/menu/__snapshots__/CompasOpen.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-open-menu looks like the latest snapshot"] = 5 | ` 9 | 10 | 11 | 18 | 19 | 20 | `; 21 | /* end snapshot compas-open-menu looks like the latest snapshot */ 22 | 23 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/menu/__snapshots__/CompasSave.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-save-menu with no document loaded looks like the latest snapshot"] = 5 | ` 9 | 10 | 11 | 12 | `; 13 | /* end snapshot compas-save-menu with no document loaded looks like the latest snapshot */ 14 | 15 | snapshots["compas-save-menu with document loaded looks like the latest snapshot"] = 16 | ` 20 | 21 | 22 | 28 | 29 | 36 | 37 | 38 | `; 39 | /* end snapshot compas-save-menu with document loaded looks like the latest snapshot */ 40 | 41 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/menu/__snapshots__/CompasSaveAs.test.snap.js: -------------------------------------------------------------------------------- 1 | /* @web/test-runner snapshot v1 */ 2 | export const snapshots = {}; 3 | 4 | snapshots["compas-save-menu with no document loaded looks like the latest snapshot"] = 5 | ` 9 | 10 | 11 | 12 | `; 13 | /* end snapshot compas-save-menu with no document loaded looks like the latest snapshot */ 14 | 15 | snapshots["compas-save-menu with document loaded looks like the latest snapshot"] = 16 | ` 20 | 21 | 22 | 28 | 29 | 36 | 37 | 38 | `; 39 | /* end snapshot compas-save-menu with document loaded looks like the latest snapshot */ 40 | 41 | -------------------------------------------------------------------------------- /packages/compas-open-scd/test/unit/wizards/compas-test-support.ts: -------------------------------------------------------------------------------- 1 | import { expect } from '@open-wc/testing'; 2 | 3 | import { 4 | ComplexAction, 5 | isSimple 6 | } from '@openscd/core/foundation/deprecated/editor.js'; 7 | import { 8 | WizardActor, 9 | WizardInputElement, 10 | } from '@openscd/open-scd/src/foundation.js'; 11 | 12 | export function executeWizardComplexAction( 13 | wizardActor: WizardActor, 14 | wizard: Element, 15 | inputs: WizardInputElement[] 16 | ): ComplexAction { 17 | const complexActions = wizardActor(inputs, wizard); 18 | expect(complexActions.length).to.equal(1); 19 | expect(complexActions[0]).to.not.satisfy(isSimple); 20 | return complexActions[0]; 21 | } 22 | -------------------------------------------------------------------------------- /packages/compas-open-scd/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/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/demo/embedded.html: -------------------------------------------------------------------------------- 1 | OpenSCD Core Embedding Demo 2 | 3 | 17 | -------------------------------------------------------------------------------- /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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/app-bar-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/app-bar-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/app-bar-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/document-name-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/document-name-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/document-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/document-name-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/editor-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/editor-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-selected-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/editor-plugins-selected-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/editor-plugins-selected-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/editor-plugins-with-doc-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-entries-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-entries-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-redone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-entries-redone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-redone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-entries-redone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-undone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-entries-undone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-entries-undone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-entries-undone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-screen-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-screen-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/log-screen-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/log-screen-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-drawer-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/menu-drawer-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-drawer-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/menu-drawer-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/menu-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/menu-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Chromium/baseline/menu-plugins-triggered-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/app-bar-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/app-bar-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/app-bar-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/app-bar-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/document-name-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/document-name-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/document-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/document-name-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/editor-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/editor-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-selected-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/editor-plugins-selected-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/editor-plugins-selected-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/editor-plugins-with-doc-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-entries-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-entries-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-redone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-entries-redone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-redone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-entries-redone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-undone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-entries-undone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-entries-undone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-entries-undone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-screen-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-screen-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/log-screen-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/log-screen-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-drawer-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/menu-drawer-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-drawer-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/menu-drawer-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/menu-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/menu-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Firefox/baseline/menu-plugins-triggered-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/app-bar-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/app-bar-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/app-bar-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/app-bar-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/document-name-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/document-name-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/document-name-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/document-name-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/editor-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/editor-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-selected-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/editor-plugins-selected-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/editor-plugins-selected-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/editor-plugins-with-doc-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-entries-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-entries-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-redone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-entries-redone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-redone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-entries-redone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-undone-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-entries-undone-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-entries-undone-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-entries-undone-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-screen-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-screen-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/log-screen-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/log-screen-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-drawer-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/menu-drawer-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-drawer-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/menu-drawer-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/menu-plugins-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/menu-plugins-en.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-de.png -------------------------------------------------------------------------------- /packages/core/screenshots/Webkit/baseline/menu-plugins-triggered-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/distribution/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/favicon-16x16.png -------------------------------------------------------------------------------- /packages/distribution/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/favicon-32x32.png -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-mono-v13-latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-300.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-300.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-300.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-500.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-500.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-500.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-regular.ttf -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff -------------------------------------------------------------------------------- /packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/fonts/roboto-v27-latin-regular.woff2 -------------------------------------------------------------------------------- /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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/google/icons/material-symbols-outlined.woff2 -------------------------------------------------------------------------------- /packages/distribution/public/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/icon-192x192.png -------------------------------------------------------------------------------- /packages/distribution/public/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/js/xmlvalidate.wasm -------------------------------------------------------------------------------- /packages/distribution/public/maskable_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/maskable_icon.png -------------------------------------------------------------------------------- /packages/distribution/public/monochrome_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/monochrome_icon.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/mstile-144x144.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/mstile-150x150.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/mstile-310x150.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/mstile-310x310.png -------------------------------------------------------------------------------- /packages/distribution/public/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/mstile-70x70.png -------------------------------------------------------------------------------- /packages/distribution/public/xml/CC-EULA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/distribution/public/xml/CC-EULA.pdf -------------------------------------------------------------------------------- /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 | }, 31 | alias: { 32 | '@openscd/open-scd': '../openscd/', 33 | '@openscd/plugins': '../plugins/', 34 | }, 35 | buildOptions: { 36 | baseUrl: process.env.PUBLIC_URL || '/', 37 | }, 38 | }; 39 | -------------------------------------------------------------------------------- /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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/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/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/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/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/openscd/public/xml/CC-EULA.pdf -------------------------------------------------------------------------------- /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/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/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-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/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/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/packages/plugins/public/js/xmlvalidate.wasm -------------------------------------------------------------------------------- /packages/plugins/public/xml/CC-EULA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/com-pas/compas-open-scd/88ba11e9565f167ba1cf4b9a37efeab253b82dbc/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/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/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/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/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/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/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/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/GooseSubscriberLaterBinding.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import GooseSubscriberLaterBinding from '../../../src/editors/GooseSubscriberLaterBinding.js'; 4 | 5 | describe('SMV Subscribe Later Binding Plugin', () => { 6 | customElements.define( 7 | 'goose-subscriber-later-binding-plugin', 8 | GooseSubscriberLaterBinding 9 | ); 10 | 11 | let element: GooseSubscriberLaterBinding; 12 | let doc: XMLDocument; 13 | 14 | beforeEach(async () => { 15 | doc = await fetch('/test/testfiles/editors/LaterBindingGOOSE2007B4.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/SMVSubscriberLaterBinding.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import SMVSubscribeLaterBindingPlugin from '../../../src/editors/SMVSubscriberLaterBinding.js'; 4 | 5 | describe('SMV Subscribe Later Binding Plugin', () => { 6 | customElements.define( 7 | 'smv-subscribe-later-binding-plugin', 8 | SMVSubscribeLaterBindingPlugin 9 | ); 10 | 11 | let element: SMVSubscribeLaterBindingPlugin; 12 | let doc: XMLDocument; 13 | 14 | beforeEach(async () => { 15 | doc = await fetch('/test/testfiles/editors/LaterBindingSMV2007B4.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 | 22 | `; 23 | /* end snapshot Editor web component for GSE element looks like its latest snapshot */ 24 | 25 | -------------------------------------------------------------------------------- /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 | 22 | `; 23 | /* end snapshot Editor web component for SMV element looks like its latest snapshot */ 24 | 25 | -------------------------------------------------------------------------------- /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/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__/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__/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/publisher/foundation.test.ts: -------------------------------------------------------------------------------- 1 | export function cloneTestDoc(doc: XMLDocument): XMLDocument { 2 | const newDoc = document.implementation.createDocument( 3 | doc.lookupNamespaceURI(''), 4 | doc.documentElement.tagName, 5 | doc.doctype 6 | ); 7 | 8 | newDoc.documentElement.replaceWith(doc.documentElement); 9 | 10 | return newDoc; 11 | } 12 | -------------------------------------------------------------------------------- /packages/plugins/test/unit/editors/publisher/gse-control-element-editor.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, fixture, html } from '@open-wc/testing'; 2 | 3 | import '../../../../src/editors/publisher/gse-control-element-editor.js'; 4 | import { GseControlElementEditor } from '../../../../src/editors/publisher/gse-control-element-editor.js'; 5 | 6 | describe('Editor for GSEControl element and its direct children', () => { 7 | let doc: XMLDocument; 8 | let element: GseControlElementEditor; 9 | 10 | beforeEach(async () => { 11 | doc = await fetch('/test/testfiles/wizards/gsecontrol.scd') 12 | .then(response => response.text()) 13 | .then(str => new DOMParser().parseFromString(str, 'application/xml')); 14 | }); 15 | 16 | describe('with valid GSEControl', () => { 17 | beforeEach(async () => { 18 | const gseControl = doc.querySelector('GSEControl')!; 19 | 20 | element = await fixture( 21 | html`` 24 | ); 25 | }); 26 | 27 | it('looks like the latest snapshot', async () => 28 | await expect(element).shadowDom.to.equalSnapshot()); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /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/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__/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/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 | --------------------------------------------------------------------------------