@compas-oscd/open-scd 0.34.17 → 0.34.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WizardDivider.d.ts +8 -8
- package/dist/WizardDivider.js +26 -26
- package/dist/Wizarding.js +36 -36
- package/dist/Wizarding.js.map +1 -1
- package/dist/action-icon.d.ts +25 -25
- package/dist/action-icon.js +51 -51
- package/dist/action-pane.d.ts +25 -25
- package/dist/action-pane.js +86 -86
- package/dist/addons/Editor.d.ts +25 -25
- package/dist/addons/Editor.js +105 -105
- package/dist/addons/Editor.js.map +1 -1
- package/dist/addons/History.d.ts +86 -93
- package/dist/addons/History.js +301 -302
- package/dist/addons/History.js.map +1 -1
- package/dist/addons/Layout.d.ts +96 -96
- package/dist/addons/Layout.js +448 -448
- package/dist/addons/Layout.js.map +1 -1
- package/dist/addons/Settings.d.ts +68 -68
- package/dist/addons/Settings.js +272 -272
- package/dist/addons/Settings.js.map +1 -1
- package/dist/addons/Waiter.d.ts +14 -14
- package/dist/addons/Waiter.js +40 -40
- package/dist/addons/Waiter.js.map +1 -1
- package/dist/addons/Wizards.d.ts +15 -15
- package/dist/addons/Wizards.js +46 -46
- package/dist/addons/editor/edit-action-to-v1-converter.d.ts +3 -3
- package/dist/addons/editor/edit-action-to-v1-converter.js +95 -95
- package/dist/addons/editor/edit-action-to-v1-converter.js.map +1 -1
- package/dist/addons/editor/edit-v1-to-v2-converter.d.ts +2 -2
- package/dist/addons/editor/edit-v1-to-v2-converter.js +36 -36
- package/dist/addons/editor/edit-v1-to-v2-converter.js.map +1 -1
- package/dist/addons/history/get-log-text.d.ts +5 -5
- package/dist/addons/history/get-log-text.js +25 -25
- package/dist/addons/history/get-log-text.js.map +1 -1
- package/dist/addons/menu-tabs/menu-tabs.d.ts +22 -22
- package/dist/addons/menu-tabs/menu-tabs.js +59 -59
- package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts +28 -28
- package/dist/addons/plugin-manager/custom-plugin-dialog.js +71 -71
- package/dist/addons/plugin-manager/plugin-manager.d.ts +20 -20
- package/dist/addons/plugin-manager/plugin-manager.js +77 -77
- package/dist/core/api/api.js +7 -0
- package/dist/core/api/api.js.map +1 -0
- package/dist/core/api/editor/subject.js +22 -0
- package/dist/core/api/editor/subject.js.map +1 -0
- package/dist/core/api/editor/xml-editor.js +82 -0
- package/dist/core/api/editor/xml-editor.js.map +1 -0
- package/dist/core/api/plugin-state-api.js +27 -0
- package/dist/core/api/plugin-state-api.js.map +1 -0
- package/dist/core/foundation/cyrb64.js +26 -0
- package/dist/core/foundation/cyrb64.js.map +1 -0
- package/dist/core/foundation/deprecated/edit-event.js +44 -0
- package/dist/core/foundation/deprecated/edit-event.js.map +1 -0
- package/dist/core/foundation/deprecated/editor.js +94 -0
- package/dist/core/foundation/deprecated/editor.js.map +1 -0
- package/dist/core/foundation/deprecated/history.js +17 -0
- package/dist/core/foundation/deprecated/history.js.map +1 -0
- package/dist/core/foundation/deprecated/open-event.js +9 -0
- package/dist/core/foundation/deprecated/open-event.js.map +1 -0
- package/dist/core/foundation/deprecated/settings.js +19 -0
- package/dist/core/foundation/deprecated/settings.js.map +1 -0
- package/dist/core/foundation/deprecated/validation.js +8 -0
- package/dist/core/foundation/deprecated/validation.js.map +1 -0
- package/dist/core/foundation/deprecated/waiter.js +12 -0
- package/dist/core/foundation/deprecated/waiter.js.map +1 -0
- package/dist/core/foundation/edit-completed-event.js +11 -0
- package/dist/core/foundation/edit-completed-event.js.map +1 -0
- package/dist/core/foundation/edit-event.js +8 -0
- package/dist/core/foundation/edit-event.js.map +1 -0
- package/dist/core/foundation/edit.js +31 -0
- package/dist/core/foundation/edit.js.map +1 -0
- package/dist/core/foundation/handle-edit.js +151 -0
- package/dist/core/foundation/handle-edit.js.map +1 -0
- package/dist/core/foundation/open-event.js +8 -0
- package/dist/core/foundation/open-event.js.map +1 -0
- package/dist/core/foundation/plugin.js +2 -0
- package/dist/core/foundation/plugin.js.map +1 -0
- package/dist/core/foundation.js +14 -0
- package/dist/core/foundation.js.map +1 -0
- package/dist/core/locales.js +21 -0
- package/dist/core/locales.js.map +1 -0
- package/dist/filtered-list.d.ts +27 -27
- package/dist/filtered-list.js +118 -118
- package/dist/finder-list.d.ts +37 -37
- package/dist/finder-list.js +153 -153
- package/dist/foundation/compare.d.ts +79 -79
- package/dist/foundation/compare.js +216 -216
- package/dist/foundation/dai.d.ts +30 -30
- package/dist/foundation/dai.js +126 -126
- package/dist/foundation/generators.d.ts +13 -13
- package/dist/foundation/generators.js +66 -66
- package/dist/foundation/ied.d.ts +22 -22
- package/dist/foundation/ied.js +83 -83
- package/dist/foundation/ied.js.map +1 -1
- package/dist/foundation/nsd.d.ts +4 -4
- package/dist/foundation/nsd.js +12 -12
- package/dist/foundation/nsdoc.d.ts +14 -14
- package/dist/foundation/nsdoc.js +178 -178
- package/dist/foundation/scl.d.ts +1 -1
- package/dist/foundation/scl.js +63 -63
- package/dist/foundation.d.ts +230 -230
- package/dist/foundation.js +1921 -1921
- package/dist/foundation.js.map +1 -1
- package/dist/icons/compare.d.ts +3 -3
- package/dist/icons/compare.js +4 -4
- package/dist/icons/icons.d.ts +41 -41
- package/dist/icons/icons.js +92 -92
- package/dist/icons/ied-icons.d.ts +3 -3
- package/dist/icons/ied-icons.js +4 -4
- package/dist/icons/lnode.d.ts +16 -16
- package/dist/icons/lnode.js +17 -17
- package/dist/open-scd.d.ts +131 -131
- package/dist/open-scd.js +438 -438
- package/dist/open-scd.js.map +1 -1
- package/dist/openscd/src/WizardDivider.js +37 -0
- package/dist/openscd/src/WizardDivider.js.map +1 -0
- package/dist/openscd/src/Wizarding.js +38 -0
- package/dist/openscd/src/Wizarding.js.map +1 -0
- package/dist/openscd/src/action-icon.js +220 -0
- package/dist/openscd/src/action-icon.js.map +1 -0
- package/dist/openscd/src/action-pane.js +176 -0
- package/dist/openscd/src/action-pane.js.map +1 -0
- package/dist/openscd/src/addons/Editor.js +106 -0
- package/dist/openscd/src/addons/Editor.js.map +1 -0
- package/dist/openscd/src/addons/History.js +490 -0
- package/dist/openscd/src/addons/History.js.map +1 -0
- package/dist/openscd/src/addons/Layout.js +619 -0
- package/dist/openscd/src/addons/Layout.js.map +1 -0
- package/dist/openscd/src/addons/Settings.js +465 -0
- package/dist/openscd/src/addons/Settings.js.map +1 -0
- package/dist/openscd/src/addons/Waiter.js +45 -0
- package/dist/openscd/src/addons/Waiter.js.map +1 -0
- package/dist/openscd/src/addons/Wizards.js +48 -0
- package/dist/openscd/src/addons/Wizards.js.map +1 -0
- package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js +96 -0
- package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js.map +1 -0
- package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js +37 -0
- package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js.map +1 -0
- package/dist/openscd/src/addons/history/get-log-text.js +26 -0
- package/dist/openscd/src/addons/history/get-log-text.js.map +1 -0
- package/dist/openscd/src/addons/menu-tabs/menu-tabs.js +74 -0
- package/dist/openscd/src/addons/menu-tabs/menu-tabs.js.map +1 -0
- package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js +177 -0
- package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js.map +1 -0
- package/dist/openscd/src/addons/plugin-manager/plugin-manager.js +165 -0
- package/dist/openscd/src/addons/plugin-manager/plugin-manager.js.map +1 -0
- package/dist/openscd/src/filtered-list.js +168 -0
- package/dist/openscd/src/filtered-list.js.map +1 -0
- package/dist/openscd/src/finder-list.js +207 -0
- package/dist/openscd/src/finder-list.js.map +1 -0
- package/dist/openscd/src/foundation/compare.js +273 -0
- package/dist/openscd/src/foundation/compare.js.map +1 -0
- package/dist/openscd/src/foundation/dai.js +127 -0
- package/dist/openscd/src/foundation/dai.js.map +1 -0
- package/dist/openscd/src/foundation/generators.js +67 -0
- package/dist/openscd/src/foundation/generators.js.map +1 -0
- package/dist/openscd/src/foundation/ied.js +84 -0
- package/dist/openscd/src/foundation/ied.js.map +1 -0
- package/dist/openscd/src/foundation/nsd.js +13 -0
- package/dist/openscd/src/foundation/nsd.js.map +1 -0
- package/dist/openscd/src/foundation/nsdoc.js +180 -0
- package/dist/openscd/src/foundation/nsdoc.js.map +1 -0
- package/dist/openscd/src/foundation/scl.js +64 -0
- package/dist/openscd/src/foundation/scl.js.map +1 -0
- package/dist/openscd/src/foundation.js +1922 -0
- package/dist/openscd/src/foundation.js.map +1 -0
- package/dist/openscd/src/icons/compare.js +11 -0
- package/dist/openscd/src/icons/compare.js.map +1 -0
- package/dist/openscd/src/icons/icons.js +611 -0
- package/dist/openscd/src/icons/icons.js.map +1 -0
- package/dist/openscd/src/icons/ied-icons.js +11 -0
- package/dist/openscd/src/icons/ied-icons.js.map +1 -0
- package/dist/openscd/src/icons/lnode.js +50 -0
- package/dist/openscd/src/icons/lnode.js.map +1 -0
- package/dist/openscd/src/open-scd.js +483 -0
- package/dist/openscd/src/open-scd.js.map +1 -0
- package/dist/openscd/src/oscd-filter-button.js +89 -0
- package/dist/openscd/src/oscd-filter-button.js.map +1 -0
- package/dist/openscd/src/plain-compare-list.js +132 -0
- package/dist/openscd/src/plain-compare-list.js.map +1 -0
- package/dist/openscd/src/plugin-tag.js +23 -0
- package/dist/openscd/src/plugin-tag.js.map +1 -0
- package/dist/openscd/src/plugin.events.js +12 -0
- package/dist/openscd/src/plugin.events.js.map +1 -0
- package/dist/openscd/src/plugin.js +2 -0
- package/dist/openscd/src/plugin.js.map +1 -0
- package/dist/openscd/src/plugins.js +256 -0
- package/dist/openscd/src/plugins.js.map +1 -0
- package/dist/openscd/src/schemas.js +9325 -0
- package/dist/openscd/src/schemas.js.map +1 -0
- package/dist/openscd/src/themes.js +122 -0
- package/dist/openscd/src/themes.js.map +1 -0
- package/dist/openscd/src/translations/de.js +954 -0
- package/dist/openscd/src/translations/de.js.map +1 -0
- package/dist/openscd/src/translations/en.js +950 -0
- package/dist/openscd/src/translations/en.js.map +1 -0
- package/dist/openscd/src/translations/loader.js +10 -0
- package/dist/openscd/src/translations/loader.js.map +1 -0
- package/dist/openscd/src/wizard-checkbox.js +152 -0
- package/dist/openscd/src/wizard-checkbox.js.map +1 -0
- package/dist/openscd/src/wizard-dialog.js +374 -0
- package/dist/openscd/src/wizard-dialog.js.map +1 -0
- package/dist/openscd/src/wizard-select.js +115 -0
- package/dist/openscd/src/wizard-select.js.map +1 -0
- package/dist/openscd/src/wizard-textfield.js +191 -0
- package/dist/openscd/src/wizard-textfield.js.map +1 -0
- package/dist/openscd/src/wizards.js +196 -0
- package/dist/openscd/src/wizards.js.map +1 -0
- package/dist/oscd-filter-button.d.ts +27 -27
- package/dist/oscd-filter-button.js +59 -59
- package/dist/plain-compare-list.d.ts +36 -36
- package/dist/plain-compare-list.js +70 -70
- package/dist/plugin-tag.d.ts +6 -6
- package/dist/plugin-tag.js +22 -22
- package/dist/plugin.d.ts +23 -23
- package/dist/plugin.events.d.ts +15 -15
- package/dist/plugin.events.js +11 -11
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +255 -255
- package/dist/schemas.d.ts +58 -58
- package/dist/schemas.js +59 -59
- package/dist/themes.d.ts +3 -3
- package/dist/themes.js +13 -13
- package/dist/themes.js.map +1 -1
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +952 -952
- package/dist/translations/en.d.ts +963 -963
- package/dist/translations/en.js +948 -948
- package/dist/translations/loader.d.ts +12 -12
- package/dist/translations/loader.js +9 -9
- package/dist/translations/loader.js.map +1 -1
- package/dist/wizard-checkbox.d.ts +37 -37
- package/dist/wizard-checkbox.js +130 -130
- package/dist/wizard-dialog.d.ts +45 -45
- package/dist/wizard-dialog.js +235 -235
- package/dist/wizard-dialog.js.map +1 -1
- package/dist/wizard-select.d.ts +31 -31
- package/dist/wizard-select.js +102 -102
- package/dist/wizard-textfield.d.ts +50 -50
- package/dist/wizard-textfield.js +162 -162
- package/dist/wizards.d.ts +23 -23
- package/dist/wizards.js +148 -148
- package/dist/wizards.js.map +1 -1
- package/dist/xml/src/foundation.js +67 -0
- package/dist/xml/src/foundation.js.map +1 -0
- package/dist/xml/src/index.js +2 -0
- package/dist/xml/src/index.js.map +1 -0
- package/package.json +29 -127
- package/dist/Wizarding.d.ts +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../src/icons/icons.ts"],"names":[],"mappings":"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","sourcesContent":["import { html, svg, SVGTemplateResult, TemplateResult } from 'lit-element';\n\nexport type iconType =\n | 'action'\n | 'dAIcon'\n | 'dOIcon'\n | 'enumIcon'\n | 'info'\n | 'warning'\n | 'error'\n | 'reset'\n | 'reportIcon'\n | 'smvIcon'\n | 'gooseIcon'\n | 'lNIcon'\n | 'logIcon';\n\nexport const editIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 25 25\"\n>\n <path\n d=\"M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z\"\n stroke=\"currentColor\"\n fill=\"transparent\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n</svg>`;\n\nconst pathsSVG = {\n action: svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M13 3c-4.97 0-9\n 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7\n 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0\n 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\" fill=\"currentColor\"></path>`,\n dAIcon: svg`<path fill=\"currentColor\" d=\"m4.2 0c-2.31 0-4.2 1.89-4.2 4.2v11.6c0 2.31 1.89 4.2 4.2 4.2h18.1c2.31 0 4.2-1.89 4.2-4.2v-11.6c0-2.31-1.89-4.2-4.2-4.2zm0 1.89h18.1c1.29 0 2.3 1.01 2.3 2.3v11.6c0 1.29-1.01 2.31-2.3 2.31h-18.1c-1.29 0-2.3-1.01-2.3-2.31v-11.6c0-1.29 1.01-2.3 2.3-2.3z\"/><path fill=\"currentColor\" d=\"m12.5 9.94q0 1.55-0.509 2.71-0.503 1.15-1.43 1.76-0.923 0.611-2.12 0.611h-3.37v-10h3.02q2.11 0 3.26 1.28 1.15 1.27 1.15 3.65zm-1.76 0q0-1.61-0.698-2.46-0.698-0.852-1.99-0.852h-1.24v6.77h1.48q1.12 0 1.79-0.931 0.663-0.931 0.663-2.53z\"/><path fill=\"currentColor\" d=\"m19.7 15-0.74-2.56h-3.18l-0.74 2.56h-1.75l3.04-10h2.06l3.03 10zm-1.13-4.13-0.823-2.88-0.379-1.46q-0.0947 0.412-0.178 0.739-0.0829 0.327-1.02 3.59z\"/>`,\n dOIcon: svg`<path fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.89\" d=\"m4.2 0.945h18.1c1.8 0 3.25 1.45 3.25 3.25v11.6c0 1.8-1.45 3.25-3.25 3.25h-18.1c-1.8 0-3.25-1.45-3.25-3.25v-11.6c0-1.8 1.45-3.25 3.25-3.25z\"/><path d=\"m12.1 9.94q0 1.55-0.509 2.71-0.503 1.15-1.43 1.76-0.923 0.611-2.12 0.611h-3.37v-10h3.02q2.11 0 3.26 1.28 1.15 1.27 1.15 3.65zm-1.76 0q0-1.61-0.698-2.46-0.698-0.852-1.99-0.852h-1.24v6.77h1.48q1.12 0 1.79-0.931 0.663-0.931 0.663-2.53z\"/><path d=\"m21.6 9.97q0 1.56-0.515 2.75-0.515 1.19-1.47 1.82-0.959 0.625-2.24 0.625-1.97 0-3.08-1.39-1.11-1.39-1.11-3.81 0-2.41 1.11-3.76t3.1-1.35 3.1 1.36q1.12 1.36 1.12 3.74zm-1.78 0q0-1.62-0.639-2.54-0.639-0.923-1.79-0.923-1.17 0-1.81 0.916-0.639 0.909-0.639 2.54 0 1.65 0.651 2.6 0.657 0.945 1.79 0.945 1.17 0 1.81-0.923 0.639-0.923 0.639-2.62z\"/>`,\n enumIcon: svg`<path fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.89\" d=\"m4.2 0.945h18.1c1.8 0 3.25 1.45 3.25 3.25v11.6c0 1.8-1.45 3.25-3.25 3.25h-18.1c-1.8 0-3.25-1.45-3.25-3.25v-11.6c0-1.8 1.45-3.25 3.25-3.25z\"/><path d=\"m5.37 15v-10h6.56v1.62h-4.81v2.51h4.45v1.62h-4.45v2.64h5.06v1.62z\"/><path d=\"m18.5 15-3.63-7.71q0.107 1.12 0.107 1.8v5.9h-1.55v-10h1.99l3.69 7.77q-0.107-1.07-0.107-1.95v-5.82h1.55v10z\"/>`,\n info: svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\" fill=\"currentColor\"></path>`,\n warning: svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\" fill=\"currentColor\"></path>`,\n error: svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"></path><path d=\"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM19 14.9L14.9 19H9.1L5 14.9V9.1L9.1 5h5.8L19 9.1v5.8z\" fill=\"currentColor\"></path><path d=\"M11 7h2v7h-2z\" fill=\"currentColor\"></path><circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>`,\n gooseIcon: svg`<path fill=\"currentColor\" d=\"M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n lNIcon: svg`<path stroke=\"currentColor\" stroke-width=\"1.89\" fill=\"none\" d=\"m4.2 0.945h18.1c1.8 0 3.25 1.45 3.25 3.25v11.6c0 1.8-1.45 3.25-3.25 3.25h-18.1c-1.8 0-3.25-1.45-3.25-3.25v-11.6c0-1.8 1.45-3.25 3.25-3.25z\"/><path fill=\"currentColor\" d=\"m5.71 15v-10h1.75v8.39h4.47v1.62z\"/><path fill=\"currentColor\" d=\"m18.2 15-3.63-7.71q0.107 1.12 0.107 1.8v5.9h-1.55v-10h1.99l3.69 7.77q-0.107-1.07-0.107-1.95v-5.82h1.55v10z\"/>`,\n logIcon: svg`<path fill=\"currentColor\" d=\"M9,7H11V15H15V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n reportIcon: svg`<path fill=\"currentColor\" d=\"M9,7H13A2,2 0 0,1 15,9V11C15,11.84 14.5,12.55 13.76,12.85L15,17H13L11.8,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,16.41 7.58,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n smvIcon: svg`<path fill=\"currentColor\" d=\"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n};\n\nexport const gooseIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['gooseIcon']}</svg>`;\n\nexport const reportIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['reportIcon']}</svg>`;\n\nexport const smvIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['smvIcon']}</svg>`;\n\nexport const logIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['logIcon']}</svg>`;\n\nexport const controlBlockIcons: Partial<Record<string, SVGTemplateResult>> = {\n ReportControl: reportIcon,\n LogControl: logIcon,\n GSEControl: gooseIcon,\n SampledValueControl: smvIcon,\n};\n\nexport const inputIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M14,12L10,8V11H2V13H10V16M20,18V6C20,4.89 19.1,4 18,4H6A2,2 0 0,0 4,6V9H6V6H18V18H6V15H4V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18Z\" />\n</svg>`;\n\nexport const clientIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M21,14V4H3V14H21M21,2A2,2 0 0,1 23,4V16A2,2 0 0,1 21,18H14L16,21V22H8V21L10,18H3C1.89,18 1,17.1 1,16V4C1,2.89 1.89,2 3,2H21M4,5H15V10H4V5M16,5H20V7H16V5M20,8V13H16V8H20M4,11H9V13H4V11M10,11H15V13H10V11Z\" />\n</svg>`;\n\nexport const disconnect = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M3.88,13.46L2.46,14.88L4.59,17L2.46,19.12L3.88,20.54L6,18.41L8.12,20.54L9.54,19.12L7.41,17L9.54,14.88L8.12,13.46L6,15.59L3.88,13.46M14,15H20V19H14V15Z\" />\n</svg>`;\n\nexport type iconProperty = {\n width: number;\n height: number;\n};\n\nexport const iconProperties: Partial<Record<iconType, iconProperty>> = {\n dAIcon: {\n width: 26.5,\n height: 24,\n },\n dOIcon: {\n width: 26.5,\n height: 24,\n },\n enumIcon: {\n width: 26.5,\n height: 24,\n },\n lNIcon: {\n width: 26.5,\n height: 24,\n },\n};\n\nexport const dataTypeTemplateIcons: Partial<Record<string, SVGTemplateResult>> =\n {\n DAType: getIcon('dAIcon'),\n DOType: getIcon('dOIcon'),\n EnumType: getIcon('enumIcon'),\n LNodeType: getIcon('lNIcon'),\n };\n\nexport const iconColors: { [key: string]: string } = {\n info: '--cyan',\n warning: '--yellow',\n error: '--red',\n action: '--blue',\n};\n\nexport function getIcon(type: iconType): TemplateResult {\n if (type === 'reset') return html``;\n const height = iconProperties[type]?.height ?? 24;\n const width = iconProperties[type]?.width ?? 24;\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"${height}\"\n viewBox=\"0 0 ${width} ${height}\"\n width=\"${width}\"\n >\n ${pathsSVG[type]}\n </svg> `;\n}\n\nexport function getFilterIcon(type: iconType, state: boolean): TemplateResult {\n if (type === 'reset') return html``;\n const height = iconProperties[type]?.height ?? 24;\n const width = iconProperties[type]?.width ?? 24;\n return html`<svg\n slot=\"${state ? 'onIcon' : 'offIcon'}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"${height}\"\n viewBox=\"0 0 ${width} ${height}\"\n width=\"${width}\"\n >\n ${pathsSVG[type]}\n </svg> `;\n}\n\nexport const networkConfigIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n slot=\"icon\"\n width=\"25px\"\n height=\"25px\"\n style=\"margin-bottom:0px;\"\n>\n <rect\n width=\"8\"\n height=\"8\"\n x=\"8.5\"\n y=\"2\"\n rx=\"1\"\n ry=\"1\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <rect\n width=\"8\"\n height=\"8\"\n x=\"2.5\"\n y=\"15\"\n rx=\"1\"\n ry=\"1\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <rect\n width=\"8\"\n height=\"8\"\n x=\"15\"\n y=\"15\"\n rx=\"1\"\n ry=\"1\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n\n <line\n x1=\"2\"\n y1=\"12.5\"\n x2=\"23\"\n y2=\"12.5\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"1.5\"\n />\n <line\n x1=\"12.5\"\n y1=\"10\"\n x2=\"12.5\"\n y2=\"12.5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <line\n x1=\"6.5\"\n y1=\"12.5\"\n x2=\"6.5\"\n y2=\"15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <line\n x1=\"19\"\n y1=\"12.5\"\n x2=\"19\"\n y2=\"15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n</svg>`;\n\nexport const zeroLineIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n slot=\"icon\"\n viewBox=\"0 0 25 25\"\n>\n <path\n d=\"M 2 9 L 12.5 2 L 23 9 L 21 9 L 21 21 L 4 21 L 4 9 Z\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M 11 7 L 17.5 7 L 13.5 11 L 16.5 11 L 10 19 L 11.5 13 L 8.5 13 Z \"\n fill=\"currentColor\"\n />\n</svg>`;\n\nexport const voltageLevelIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M11.13,20.06L3.63,6.93c-.27-.48-.11-1.09.37-1.36h0c.48-.27,1.09-.11,1.36.37l6.64,11.61,6.64-11.61c.27-.48.88-.65,1.36-.37h0c.48.27.65.88.37,1.36l-7.5,13.13c-.38.67-1.35.67-1.74,0Z\"\n />\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const bayIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n stroke-width: 0px;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M7.75,8c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-1.25c0,.84.52,1.55,1.25,1.85v8.65h1.5v-8.65c.73-.3,1.25-1.01,1.25-1.85h-1.25v-1.5Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M12.75,8c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-1.25c0,.84.52,1.55,1.25,1.85v8.65h1.5v-8.65c.73-.3,1.25-1.01,1.25-1.85h-1.25v-1.5Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M17.75,8c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-1.25c0,.84.52,1.55,1.25,1.85v8.65h1.5v-8.65c.73-.3,1.25-1.01,1.25-1.85h-1.25v-1.5Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M20,4H4c-1.1,0-2,.9-2,2v4c0,1.1.9,2,2,2v-6h16v6c1.1,0,2-.9,2-2v-4c0-1.1-.9-2-2-2Z\"\n />\n</svg>`;\n\nexport const disconnectorIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <g>\n <path\n class=\"cls-1\"\n d=\"M12.71,15.29l-6.79-6.79c-.39-.39-1.02-.39-1.41,0-.39.39-.39,1.02,0,1.41l6.5,6.5v4.59c0,.55.45,1,1,1s1-.45,1-1v-5c0-.13-.03-.26-.08-.38-.05-.12-.12-.23-.22-.33Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M14,6h-1v-3c0-.55-.45-1-1-1s-1,.45-1,1v3h-1c-.55,0-1,.45-1,1s.45,1,1,1h4c.55,0,1-.45,1-1s-.45-1-1-1Z\"\n />\n </g>\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const circuitBreakerIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <g>\n <path\n class=\"cls-1\"\n d=\"M12.71,15.29l-6.79-6.79c-.39-.39-1.02-.39-1.41,0-.39.39-.39,1.02,0,1.41l6.5,6.5v4.59c0,.55.45,1,1,1s1-.45,1-1v-5c0-.13-.03-.26-.08-.38-.05-.12-.12-.23-.22-.33Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M13.41,7l1.29-1.29c.39-.39.39-1.02,0-1.41s-1.02-.39-1.41,0l-1.29,1.29-1.29-1.29c-.39-.39-1.02-.39-1.41,0s-.39,1.02,0,1.41l1.29,1.29-1.29,1.29c-.39.39-.39,1.02,0,1.41.2.2.45.29.71.29s.51-.1.71-.29l1.29-1.29,1.29,1.29c.2.2.45.29.71.29s.51-.1.71-.29c.39-.39.39-1.02,0-1.41l-1.29-1.29Z\"\n />\n </g>\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const currentTransformerIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M19,12c0-3.53-2.61-6.43-6-6.92v-2.08c0-.55-.45-1-1-1s-1,.45-1,1v2.08c-3.39.49-6,3.39-6,6.92s2.61,6.43,6,6.92v2.08c0,.55.45,1,1,1s1-.45,1-1v-2.08c3.39-.49,6-3.39,6-6.92ZM7,12c0-2.42,1.72-4.44,4-4.9v9.8c-2.28-.46-4-2.48-4-4.9ZM13,16.9V7.1c2.28.46,4,2.48,4,4.9s-1.72,4.44-4,4.9Z\"\n />\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const voltageTransformerIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M17,10c0-2.42-1.72-4.44-4-4.9v-2.1s0-1-1-1-1,1-1,1v2.1c-2.28.46-4,2.48-4,4.9,0,.71.15,1.39.42,2-.27.61-.42,1.29-.42,2,0,2.42,1.72,4.44,4,4.9v1.1h-1c-.55,0-1,.45-1,1s.45,1,1,1h4c.55,0,1-.45,1-1s-.45-1-1-1h-1v-1.1c2.28-.46,4-2.48,4-4.9,0-.71-.15-1.39-.42-2,.27-.61.42-1.29.42-2ZM12,7c1.66,0,3,1.34,3,3,0,0,0,.01,0,.02-.84-.63-1.87-1.02-3-1.02s-2.16.39-3,1.02c0,0,0-.01,0-.02,0-1.66,1.34-3,3-3ZM14.22,12c-.55.61-1.34,1-2.22,1s-1.67-.39-2.22-1c.55-.61,1.34-1,2.22-1s1.67.39,2.22,1ZM12,17c-1.66,0-3-1.34-3-3,0,0,0-.01,0-.02.84.63,1.87,1.02,3,1.02s2.16-.39,3-1.02c0,0,0,.01,0,.02,0,1.66-1.34,3-3,3Z\"\n />\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const earthSwitchIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <g>\n <path\n class=\"cls-1\"\n d=\"M13,20h-2c-.55,0-1,.45-1,1s.45,1,1,1h2c.55,0,1-.45,1-1s-.45-1-1-1Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M15,16h-2v-5c0-.13-.03-.26-.08-.38-.05-.12-.12-.23-.22-.33L5.91,3.5c-.39-.39-1.02-.39-1.41,0-.39.39-.39,1.02,0,1.41l6.5,6.5v4.59h-2c-.55,0-1,.45-1,1s.45,1,1,1h6c.55,0,1-.45,1-1s-.45-1-1-1Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M10,4h4c.55,0,1-.45,1-1s-.45-1-1-1h-4c-.55,0-1,.45-1,1s.45,1,1,1Z\"\n />\n </g>\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const generalConductingEquipmentIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n stroke-width: 0px;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M20.41,3.59c-.78-.78-2.05-.78-2.83,0-.59.59-.73,1.47-.43,2.19l-1.49,1.49c-1.02-.79-2.29-1.27-3.67-1.27-3.31,0-6,2.69-6,6,0,1.38.48,2.66,1.27,3.67l-1.49,1.49c-.73-.31-1.6-.17-2.19.43-.78.78-.78,2.05,0,2.83.78.78,2.05.78,2.83,0,.59-.59.73-1.47.43-2.19l1.49-1.49c1.02.79,2.29,1.27,3.67,1.27,3.31,0,6-2.69,6-6,0-1.38-.48-2.66-1.27-3.67l1.49-1.49c.73.31,1.6.17,2.19-.43.78-.78.78-2.05,0-2.83ZM12,16c-2.21,0-4-1.79-4-4s1.79-4,4-4,4,1.79,4,4-1.79,4-4,4Z\"\n />\n</svg>`;\n\nexport const connectivityNodeIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <circle\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"1\"\n cx=\"12.5\"\n cy=\"12.5\"\n r=\"5\"\n />\n</svg>`;\n\nexport const powerTransformerTwoWindingIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 25 25\"\n>\n <line\n x1=\"12.5\"\n y1=\"2\"\n x2=\"12.5\"\n y2=\"5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle\n cx=\"12.5\"\n cy=\"10\"\n r=\"5\"\n stroke=\"currentColor\"\n fill=\"transparent\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle\n cx=\"12.5\"\n cy=\"15\"\n r=\"5\"\n stroke=\"currentColor\"\n fill=\"transparent\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <line\n x1=\"12.5\"\n y1=\"20\"\n x2=\"12.5\"\n y2=\"23\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n</svg>`;\n\nexport const openSCDIcon = html` <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n style=\"width:100px;height:100px\"\n viewBox=\"0 0 25 25\"\n>\n <path\n d=\"M 2 9 L 12.5 2 L 23 9 L 21 9 L 21 21 L 4 21 L 4 9 Z\"\n fill=\"#eee8d5\"\n stroke=\"#6c71c4\"\n stroke-width=\"2\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M 11 7 L 17.5 7 L 13.5 11 L 16.5 11 L 10 19 L 11.5 13 L 8.5 13 Z \"\n fill=\"#2aa198\"\n />\n</svg>`;\n\nexport const sizableSmvIcon = svg`\n <svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n </svg>`;\n\nexport const sizableGooseIcon = svg`<svg viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const substationIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<g>\n <path class=\"cls-1\" d=\"M19.3,7.94l-6-5.14c-.75-.64-1.85-.65-2.6,0l-6,5.14c-.44.38-.7.93-.7,1.52v9.54c0,1.1.9,2,2,2h12c1.1,0,2-.9,2-2v-9.54c0-.58-.25-1.14-.7-1.52ZM18,19H6v-9.54l6-5.14,6,5.14v9.54Z\"/>\n <path class=\"cls-1\" d=\"M11.57,7.74l-3,5c-.09.15-.09.35,0,.5.09.16.26.25.44.25h2v3.5c0,.22.15.42.37.48.04.01.09.02.13.02.17,0,.34-.09.43-.24l3-5c.09-.15.09-.35,0-.5-.09-.16-.26-.25-.44-.25h-2v-3.5c0-.22-.15-.42-.37-.48-.22-.06-.45.03-.56.22Z\"/>\n</g>\n<rect class=\"cls-2\" y=\"0\" width=\"24\" height=\"24\"/>\n</svg>`;\nexport const lineIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<path class=\"cls-1\" d=\"M14.39,11.93l-1.39.58v-1.84l2.15-.89c.51-.21.75-.8.54-1.31-.21-.51-.8-.75-1.31-.54l-1.39.58V3c0-.55-.45-1-1-1s-1,.45-1,1v6.33l-2.15.89c-.51.21-.75.8-.54,1.31.21.51.8.75,1.31.54l1.39-.58v1.84l-2.15.89c-.51.21-.75.8-.54,1.31.21.51.8.75,1.31.54l1.39-.58v5.5c0,.55.45,1,1,1s1-.45,1-1v-6.33l2.15-.89c.51-.21.75-.8.54-1.31-.21-.51-.8-.75-1.31-.54Z\"/>\n<rect class=\"cls-2\" width=\"24\" height=\"24\"/>\n</svg>`;\nexport const processIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<path class=\"cls-1\" d=\"M18.71,15.29c-.39-.39-1.02-.39-1.41,0s-.39,1.02,0,1.41l.29.29h-5.59c0-1.1-.9-2-2-2h-2c-1.01,0-1.84.76-1.97,1.74-.61-.34-1.03-.99-1.03-1.74,0-1.1.9-2,2-2h5c0,1.1.9,2,2,2h2c1.1,0,2-.9,2-2v-.14c1.72-.45,3-2,3-3.86,0-2.21-1.79-4-4-4h-5c0-1.1-.9-2-2-2h-2c-1.1,0-2,.9-2,2h-2c-.55,0-1,.45-1,1s.45,1,1,1h2c0,1.1.9,2,2,2h2c1.1,0,2-.9,2-2h5c1.1,0,2,.9,2,2,0,.75-.42,1.39-1.03,1.74-.13-.98-.96-1.74-1.97-1.74h-2c-1.1,0-2,.9-2,2h-5c-2.21,0-4,1.79-4,4,0,1.86,1.28,3.41,3,3.86v.14c0,1.1.9,2,2,2h2c1.1,0,2-.9,2-2h5.59l-.29.29c-.39.39-.39,1.02,0,1.41.2.2.45.29.71.29s.51-.1.71-.29l2-2c.39-.39.39-1.02,0-1.41l-2-2ZM8,7v-2h2v2s-2,0-2,0ZM14,11h2v2s-2,0-2,0v-2ZM8,19v-2h2v2s-2,0-2,0Z\"/>\n<rect class=\"cls-2\" y=\"0\" width=\"24\" height=\"24\"/>\n</svg>`;\n\nexport const transformerWindingIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<g>\n <path class=\"cls-1\" d=\"M19,20h-2c-1.21,0-2.18-1.09-1.97-2.34.16-.98,1.09-1.66,2.08-1.66h-.11c.55,0,1-.45,1-1s-.42-.96-.95-.99c.04,0,.08-.01.12-.01h-.17c-1.21,0-2.18-1.09-1.97-2.34.16-.98,1.09-1.66,2.08-1.66h-.11c.55,0,1-.45,1-1s-.42-.96-.95-.99c.04,0,.08-.01.12-.01h-.17c-1.21,0-2.18-1.09-1.97-2.34.16-.98,1.09-1.66,2.08-1.66h1.89c.55,0,1-.45,1-1s-.45-1-1-1h-1.83c-2.09,0-3.95,1.53-4.15,3.61-.13,1.37.44,2.59,1.38,3.41-.76.64-1.28,1.55-1.38,2.59-.13,1.37.44,2.59,1.38,3.41-.76.64-1.28,1.55-1.38,2.59-.23,2.39,1.64,4.39,3.98,4.39h2c.55,0,1-.45,1-1s-.45-1-1-1Z\"/>\n <path class=\"cls-1\" d=\"M10.98,6.39c.23-2.39-1.64-4.39-3.98-4.39h-2c-.55,0-1,.45-1,1s.45,1,1,1h2c1.21,0,2.18,1.09,1.97,2.34-.16.98-1.09,1.66-2.08,1.66h.11c-.55,0-1,.45-1,1s.42.96.95.99c-.04,0-.08.01-.12.01h.17c1.21,0,2.18,1.09,1.97,2.34-.16.98-1.09,1.66-2.08,1.66h.11c-.55,0-1,.45-1,1,0,.28.11.53.29.71.17.17.4.27.65.28h0s.03.01.05.01c1.21,0,2.18,1.09,1.97,2.34-.16.98-1.09,1.66-2.08,1.66h-1.89c-.55,0-1,.45-1,1s.45,1,1,1h1.83c2.09,0,3.95-1.53,4.15-3.61.13-1.37-.44-2.59-1.38-3.41.76-.64,1.28-1.55,1.38-2.59.13-1.37-.44-2.59-1.38-3.41.76-.64,1.28-1.55,1.38-2.59Z\"/>\n <path class=\"cls-1\" d=\"M6.83,16h.17s-.03,0-.05-.01c-.04,0-.08.01-.12.01Z\"/>\n</g>\n<rect class=\"cls-2\" width=\"24\" height=\"24\"/>\n</svg>`;\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { svg } from "lit-element";
|
|
2
|
+
export const accessPointIcon = svg `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
|
|
3
|
+
<path fill="currentColor" d="M4.93,4.93C3.12,6.74 2,9.24 2,12C2,14.76 3.12,17.26 4.93,19.07L6.34,17.66C4.89,16.22 4,14.22 4,12C4,9.79 4.89,7.78 6.34,6.34L4.93,4.93M19.07,4.93L17.66,6.34C19.11,7.78 20,9.79 20,12C20,14.22 19.11,16.22 17.66,17.66L19.07,19.07C20.88,17.26 22,14.76 22,12C22,9.24 20.88,6.74 19.07,4.93M7.76,7.76C6.67,8.85 6,10.35 6,12C6,13.65 6.67,15.15 7.76,16.24L9.17,14.83C8.45,14.11 8,13.11 8,12C8,10.89 8.45,9.89 9.17,9.17L7.76,7.76M16.24,7.76L14.83,9.17C15.55,9.89 16,10.89 16,12C16,13.11 15.55,14.11 14.83,14.83L16.24,16.24C17.33,15.15 18,13.65 18,12C18,10.35 17.33,8.85 16.24,7.76M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" />
|
|
4
|
+
</svg>`;
|
|
5
|
+
export const serverIcon = svg `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
|
|
6
|
+
<path fill="currentColor" d="M4,1H20A1,1 0 0,1 21,2V6A1,1 0 0,1 20,7H4A1,1 0 0,1 3,6V2A1,1 0 0,1 4,1M4,9H20A1,1 0 0,1 21,10V14A1,1 0 0,1 20,15H4A1,1 0 0,1 3,14V10A1,1 0 0,1 4,9M4,17H20A1,1 0 0,1 21,18V22A1,1 0 0,1 20,23H4A1,1 0 0,1 3,22V18A1,1 0 0,1 4,17M9,5H10V3H9V5M9,13H10V11H9V13M9,21H10V19H9V21M5,3V5H7V3H5M5,11V13H7V11H5M5,19V21H7V19H5Z" />
|
|
7
|
+
</svg>`;
|
|
8
|
+
export const logicalDeviceIcon = svg `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
|
|
9
|
+
<path fill="currentColor" d="M13,13H18V15H13M13,9H18V11H13M6.91,7.41L11.5,12L6.91,16.6L5.5,15.18L8.68,12L5.5,8.82M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" />
|
|
10
|
+
</svg>`;
|
|
11
|
+
//# sourceMappingURL=ied-icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ied-icons.js","sourceRoot":"","sources":["../../../../src/icons/ied-icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;OAE3B,CAAC;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;OAEtB,CAAC;AAER,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;OAE7B,CAAC","sourcesContent":["import { svg } from \"lit-element\";\n\nexport const accessPointIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M4.93,4.93C3.12,6.74 2,9.24 2,12C2,14.76 3.12,17.26 4.93,19.07L6.34,17.66C4.89,16.22 4,14.22 4,12C4,9.79 4.89,7.78 6.34,6.34L4.93,4.93M19.07,4.93L17.66,6.34C19.11,7.78 20,9.79 20,12C20,14.22 19.11,16.22 17.66,17.66L19.07,19.07C20.88,17.26 22,14.76 22,12C22,9.24 20.88,6.74 19.07,4.93M7.76,7.76C6.67,8.85 6,10.35 6,12C6,13.65 6.67,15.15 7.76,16.24L9.17,14.83C8.45,14.11 8,13.11 8,12C8,10.89 8.45,9.89 9.17,9.17L7.76,7.76M16.24,7.76L14.83,9.17C15.55,9.89 16,10.89 16,12C16,13.11 15.55,14.11 14.83,14.83L16.24,16.24C17.33,15.15 18,13.65 18,12C18,10.35 17.33,8.85 16.24,7.76M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" />\n</svg>`;\n\nexport const serverIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M4,1H20A1,1 0 0,1 21,2V6A1,1 0 0,1 20,7H4A1,1 0 0,1 3,6V2A1,1 0 0,1 4,1M4,9H20A1,1 0 0,1 21,10V14A1,1 0 0,1 20,15H4A1,1 0 0,1 3,14V10A1,1 0 0,1 4,9M4,17H20A1,1 0 0,1 21,18V22A1,1 0 0,1 20,23H4A1,1 0 0,1 3,22V18A1,1 0 0,1 4,17M9,5H10V3H9V5M9,13H10V11H9V13M9,21H10V19H9V21M5,3V5H7V3H5M5,11V13H7V11H5M5,19V21H7V19H5Z\" />\n</svg>`;\n\nexport const logicalDeviceIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M13,13H18V15H13M13,9H18V11H13M6.91,7.41L11.5,12L6.91,16.6L5.5,15.18L8.68,12L5.5,8.82M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z\" />\n</svg>`;"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { svg } from 'lit-element';
|
|
2
|
+
export const systemLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
3
|
+
<path fill="currentColor" d="M9,7H11V15H15V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
4
|
+
</svg>`;
|
|
5
|
+
export const automationLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
6
|
+
<path fill="currentColor" d="M11,7H13A2,2 0 0,1 15,9V17H13V13H11V17H9V9A2,2 0 0,1 11,7M11,9V11H13V9H11M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2Z" />
|
|
7
|
+
</svg>`;
|
|
8
|
+
export const controlLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
9
|
+
<path fill="currentColor" d="M11,7H13A2,2 0 0,1 15,9V10H13V9H11V15H13V14H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
10
|
+
</svg>`;
|
|
11
|
+
export const functionalLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
12
|
+
<path fill="currentColor" d="M9,7H15V9H11V11H14V13H11V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
13
|
+
</svg>`;
|
|
14
|
+
export const generalLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
15
|
+
<path fill="currentColor" d="M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
16
|
+
</svg>`;
|
|
17
|
+
export const interfacingLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
18
|
+
<path fill="currentColor" d="M14,7V9H13V15H14V17H10V15H11V9H10V7H14M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
19
|
+
</svg>`;
|
|
20
|
+
export const nonElectricalLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
21
|
+
<path fill="currentColor" d="M9,7H11V10.33L13,7H15L12,12L15,17H13L11,13.67V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
22
|
+
</svg>`;
|
|
23
|
+
export const measurementLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
24
|
+
<path fill="currentColor" d="M9,7H15A2,2 0 0,1 17,9V17H15V9H13V16H11V9H9V17H7V9A2,2 0 0,1 9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
25
|
+
</svg>`;
|
|
26
|
+
export const protectionLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
27
|
+
<path fill="currentColor" d="M9,7H13A2,2 0 0,1 15,9V11A2,2 0 0,1 13,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
28
|
+
</svg>`;
|
|
29
|
+
export const qualityLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
30
|
+
<path fill="currentColor" d="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M11,7H13A2,2 0 0,1 15,9V15A2,2 0 0,1 13,17V19H11V17A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M11,9V15H13V9H11Z" />
|
|
31
|
+
</svg>`;
|
|
32
|
+
export const protectionRelatedLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
33
|
+
<path fill="currentColor" d="M9,7H13A2,2 0 0,1 15,9V11C15,11.84 14.5,12.55 13.76,12.85L15,17H13L11.8,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,16.41 7.58,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
34
|
+
</svg>`;
|
|
35
|
+
export const supervisionLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
36
|
+
<path fill="currentColor" d="M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
37
|
+
</svg>`;
|
|
38
|
+
export const transformerLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
39
|
+
<path fill="currentColor" d="M9,7H15V9H13V17H11V9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
40
|
+
</svg>`;
|
|
41
|
+
export const switchgearLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
42
|
+
<path fill="currentColor" d="M9,7H11L12,9.5L13,7H15L13,12L15,17H13L12,14.5L11,17H9L11,12L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
43
|
+
</svg>`;
|
|
44
|
+
export const powerTransformerLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
45
|
+
<path fill="currentColor" d="M9,7H11L12,10L13,7H15L13,13V17H11V13L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
46
|
+
</svg>`;
|
|
47
|
+
export const furtherPowerSystemEquipmentLogicalNode = svg `<svg viewBox="0 0 24 24">
|
|
48
|
+
<path fill="currentColor" d="M9,7H15V9L11,15H15V17H9V15L13,9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
|
|
49
|
+
</svg>`;
|
|
50
|
+
//# sourceMappingURL=lnode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lnode.js","sourceRoot":"","sources":["../../../../src/icons/lnode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;OAE7B,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;OAE9B,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;OAE9B,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;;OAEpC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;OAE9B,CAAC;AAER,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;OAExC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;OAEvC,CAAC;AAER,MAAM,CAAC,MAAM,sCAAsC,GAAG,GAAG,CAAA;;OAElD,CAAC","sourcesContent":["import { svg } from 'lit-element';\n\nexport const systemLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H11V15H15V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const automationLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H13A2,2 0 0,1 15,9V17H13V13H11V17H9V9A2,2 0 0,1 11,7M11,9V11H13V9H11M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2Z\" />\n</svg>`;\n\nexport const controlLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H13A2,2 0 0,1 15,9V10H13V9H11V15H13V14H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const functionalLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15V9H11V11H14V13H11V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const generalLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const interfacingLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M14,7V9H13V15H14V17H10V15H11V9H10V7H14M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const nonElectricalLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M9,7H11V10.33L13,7H15L12,12L15,17H13L11,13.67V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const measurementLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15A2,2 0 0,1 17,9V17H15V9H13V16H11V9H9V17H7V9A2,2 0 0,1 9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const protectionLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H13A2,2 0 0,1 15,9V11A2,2 0 0,1 13,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const qualityLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M11,7H13A2,2 0 0,1 15,9V15A2,2 0 0,1 13,17V19H11V17A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M11,9V15H13V9H11Z\" />\n</svg>`;\n\nexport const protectionRelatedLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H13A2,2 0 0,1 15,9V11C15,11.84 14.5,12.55 13.76,12.85L15,17H13L11.8,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,16.41 7.58,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const supervisionLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const transformerLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15V9H13V17H11V9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const switchgearLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H11L12,9.5L13,7H15L13,12L15,17H13L12,14.5L11,17H9L11,12L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const powerTransformerLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H11L12,10L13,7H15L13,13V17H11V13L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const furtherPowerSystemEquipmentLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15V9L11,15H15V17H9V15L13,9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n"]}
|
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, html, LitElement, property, state, } from 'lit-element';
|
|
3
|
+
import { classMap } from 'lit-html/directives/class-map';
|
|
4
|
+
import '@material/mwc-icon';
|
|
5
|
+
import '@material/mwc-icon-button';
|
|
6
|
+
import '@material/mwc-linear-progress';
|
|
7
|
+
import '@material/mwc-list';
|
|
8
|
+
import '@material/mwc-list/mwc-list-item';
|
|
9
|
+
import '@material/mwc-tab';
|
|
10
|
+
import '@material/mwc-tab-bar';
|
|
11
|
+
import '@material/mwc-top-app-bar-fixed';
|
|
12
|
+
import '@material/mwc-drawer';
|
|
13
|
+
import '@material/mwc-button';
|
|
14
|
+
import '@material/mwc-dialog';
|
|
15
|
+
import '@material/mwc-formfield';
|
|
16
|
+
import '@material/mwc-list/mwc-check-list-item';
|
|
17
|
+
import '@material/mwc-list/mwc-radio-list-item';
|
|
18
|
+
import '@material/mwc-select';
|
|
19
|
+
import '@material/mwc-switch';
|
|
20
|
+
import '@material/mwc-textfield';
|
|
21
|
+
import { newOpenDocEvent } from '@openscd/core/foundation/deprecated/open-event.js';
|
|
22
|
+
import { newPendingStateEvent } from '@openscd/core/foundation/deprecated/waiter.js';
|
|
23
|
+
import './addons/Settings.js';
|
|
24
|
+
import './addons/Waiter.js';
|
|
25
|
+
import './addons/Wizards.js';
|
|
26
|
+
import './addons/Editor.js';
|
|
27
|
+
import './addons/History.js';
|
|
28
|
+
import './addons/Layout.js';
|
|
29
|
+
import { officialPlugins as builtinPlugins } from './plugins.js';
|
|
30
|
+
import { initializeNsdoc } from './foundation/nsdoc.js';
|
|
31
|
+
import { OscdApi, XMLEditor } from '@openscd/core';
|
|
32
|
+
import { newConfigurePluginEvent } from './plugin.events.js';
|
|
33
|
+
import { newLogEvent } from '@openscd/core/foundation/deprecated/history';
|
|
34
|
+
import { pluginTag } from './plugin-tag.js';
|
|
35
|
+
/** The `<open-scd>` custom element is the main entry point of the
|
|
36
|
+
* Open Substation Configuration Designer. */
|
|
37
|
+
let OpenSCD = class OpenSCD extends LitElement {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
this.doc = null;
|
|
41
|
+
/** The name of the current [[`doc`]] */
|
|
42
|
+
this.docName = '';
|
|
43
|
+
/** The UUID of the current [[`doc`]] */
|
|
44
|
+
this.docId = '';
|
|
45
|
+
this.editor = new XMLEditor();
|
|
46
|
+
/** Object containing all *.nsdoc files and a function extracting element's label form them*/
|
|
47
|
+
this.nsdoc = initializeNsdoc();
|
|
48
|
+
this.currentSrc = '';
|
|
49
|
+
this.storedPlugins = [];
|
|
50
|
+
this.editCount = -1;
|
|
51
|
+
this.unsubscribers = [];
|
|
52
|
+
/**
|
|
53
|
+
* @prop {PluginSet} plugins - Set of plugins that are used by OpenSCD
|
|
54
|
+
*/
|
|
55
|
+
this.plugins = { menu: [], editor: [] };
|
|
56
|
+
this.loadedPlugins = new Set();
|
|
57
|
+
// PLUGGING INTERFACES
|
|
58
|
+
this.pluginTags = new Map();
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return html `<oscd-waiter>
|
|
62
|
+
<oscd-settings .host=${this}>
|
|
63
|
+
<oscd-wizards .host=${this}>
|
|
64
|
+
<oscd-history
|
|
65
|
+
.host=${this}
|
|
66
|
+
.editor=${this.editor}
|
|
67
|
+
>
|
|
68
|
+
<oscd-editor
|
|
69
|
+
.doc=${this.doc}
|
|
70
|
+
.docName=${this.docName}
|
|
71
|
+
.docId=${this.docId}
|
|
72
|
+
.host=${this}
|
|
73
|
+
.editCount=${this.editCount}
|
|
74
|
+
.editor=${this.editor}
|
|
75
|
+
>
|
|
76
|
+
<oscd-layout
|
|
77
|
+
@add-external-plugin=${this.handleAddExternalPlugin}
|
|
78
|
+
@oscd-configure-plugin=${this.handleConfigurationPluginEvent}
|
|
79
|
+
@set-plugins=${(e) => this.setPlugins(e.detail.selectedPlugins)}
|
|
80
|
+
.host=${this}
|
|
81
|
+
.doc=${this.doc}
|
|
82
|
+
.docName=${this.docName}
|
|
83
|
+
.editCount=${this.editCount}
|
|
84
|
+
.plugins=${this.storedPlugins}
|
|
85
|
+
.editor=${this.editor}
|
|
86
|
+
>
|
|
87
|
+
</oscd-layout>
|
|
88
|
+
</oscd-editor>
|
|
89
|
+
</oscd-history>
|
|
90
|
+
</oscd-wizards>
|
|
91
|
+
</oscd-settings>
|
|
92
|
+
</oscd-waiter>`;
|
|
93
|
+
}
|
|
94
|
+
/** The current file's URL. `blob:` URLs are *revoked after parsing*! */
|
|
95
|
+
get src() {
|
|
96
|
+
return this.currentSrc;
|
|
97
|
+
}
|
|
98
|
+
set src(value) {
|
|
99
|
+
this.currentSrc = value;
|
|
100
|
+
this.dispatchEvent(newPendingStateEvent(this.loadDoc(value)));
|
|
101
|
+
}
|
|
102
|
+
/** Loads and parses an `XMLDocument` after [[`src`]] has changed. */
|
|
103
|
+
async loadDoc(src) {
|
|
104
|
+
const response = await fetch(src);
|
|
105
|
+
const text = await response.text();
|
|
106
|
+
if (!text)
|
|
107
|
+
return;
|
|
108
|
+
const doc = new DOMParser().parseFromString(text, 'application/xml');
|
|
109
|
+
const docName = src;
|
|
110
|
+
this.dispatchEvent(newOpenDocEvent(doc, docName));
|
|
111
|
+
if (src.startsWith('blob:'))
|
|
112
|
+
URL.revokeObjectURL(src);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @deprecated Use `handleConfigurationPluginEvent` instead
|
|
117
|
+
*/
|
|
118
|
+
handleAddExternalPlugin(e) {
|
|
119
|
+
this.addExternalPlugin(e.detail.plugin);
|
|
120
|
+
const { name, kind } = e.detail.plugin;
|
|
121
|
+
const event = newConfigurePluginEvent(name, kind, e.detail.plugin);
|
|
122
|
+
this.handleConfigurationPluginEvent(event);
|
|
123
|
+
}
|
|
124
|
+
handleConfigurationPluginEvent(e) {
|
|
125
|
+
const { name, kind, config } = e.detail;
|
|
126
|
+
const hasPlugin = this.hasPlugin(name, kind);
|
|
127
|
+
const hasConfig = config !== null;
|
|
128
|
+
const isChangeEvent = hasPlugin && hasConfig;
|
|
129
|
+
const isRemoveEvent = hasPlugin && !hasConfig;
|
|
130
|
+
const isAddEvent = !hasPlugin && hasConfig;
|
|
131
|
+
// the `&& config`is only because typescript
|
|
132
|
+
// cannot infer that `isChangeEvent` and `isAddEvent` implies `config !== null`
|
|
133
|
+
if (isChangeEvent && config) {
|
|
134
|
+
this.changePlugin(config);
|
|
135
|
+
}
|
|
136
|
+
else if (isRemoveEvent) {
|
|
137
|
+
this.removePlugin(name, kind);
|
|
138
|
+
}
|
|
139
|
+
else if (isAddEvent && config) {
|
|
140
|
+
this.addPlugin(config);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
const event = newLogEvent({
|
|
144
|
+
kind: "error",
|
|
145
|
+
title: "Invalid plugin configuration event",
|
|
146
|
+
message: JSON.stringify({ name, kind, config }),
|
|
147
|
+
});
|
|
148
|
+
this.dispatchEvent(event);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
connectedCallback() {
|
|
152
|
+
super.connectedCallback();
|
|
153
|
+
this.loadPlugins();
|
|
154
|
+
this.unsubscribers.push(this.editor.subscribe(e => this.editCount++), this.editor.subscribeUndoRedo(e => this.editCount++));
|
|
155
|
+
// TODO: let Lit handle the event listeners, move to render()
|
|
156
|
+
this.addEventListener('reset-plugins', this.resetPlugins);
|
|
157
|
+
}
|
|
158
|
+
disconnectedCallback() {
|
|
159
|
+
this.unsubscribers.forEach(u => u());
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @param name
|
|
164
|
+
* @param kind
|
|
165
|
+
* @returns the index of the plugin in the stored plugin list
|
|
166
|
+
*/
|
|
167
|
+
findPluginIndex(name, kind) {
|
|
168
|
+
return this.storedPlugins.findIndex(p => p.name === name && p.kind === kind);
|
|
169
|
+
}
|
|
170
|
+
hasPlugin(name, kind) {
|
|
171
|
+
return this.findPluginIndex(name, kind) > -1;
|
|
172
|
+
}
|
|
173
|
+
removePlugin(name, kind) {
|
|
174
|
+
const newPlugins = this.storedPlugins.filter(p => p.name !== name || p.kind !== kind);
|
|
175
|
+
this.updateStoredPlugins(newPlugins);
|
|
176
|
+
}
|
|
177
|
+
addPlugin(plugin) {
|
|
178
|
+
const newPlugins = [...this.storedPlugins, plugin];
|
|
179
|
+
this.updateStoredPlugins(newPlugins);
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @param plugin
|
|
184
|
+
* @throws if the plugin is not found
|
|
185
|
+
*/
|
|
186
|
+
changePlugin(plugin) {
|
|
187
|
+
const storedPlugins = this.storedPlugins;
|
|
188
|
+
const { name, kind } = plugin;
|
|
189
|
+
const pluginIndex = this.findPluginIndex(name, kind);
|
|
190
|
+
if (pluginIndex < 0) {
|
|
191
|
+
const event = newLogEvent({
|
|
192
|
+
kind: "error",
|
|
193
|
+
title: "Plugin not found, stopping change process",
|
|
194
|
+
message: JSON.stringify({ name, kind }),
|
|
195
|
+
});
|
|
196
|
+
this.dispatchEvent(event);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const pluginToChange = storedPlugins[pluginIndex];
|
|
200
|
+
const changedPlugin = { ...pluginToChange, ...plugin };
|
|
201
|
+
const newPlugins = [...storedPlugins];
|
|
202
|
+
newPlugins.splice(pluginIndex, 1, changedPlugin);
|
|
203
|
+
// this.storePlugins(newPlugins);
|
|
204
|
+
this.updateStoredPlugins(newPlugins);
|
|
205
|
+
}
|
|
206
|
+
resetPlugins() {
|
|
207
|
+
const builtInPlugins = this.getBuiltInPlugins();
|
|
208
|
+
const allPlugins = [...builtInPlugins, ...this.parsedPlugins];
|
|
209
|
+
const newPluginConfigs = allPlugins.map(plugin => {
|
|
210
|
+
return {
|
|
211
|
+
...plugin,
|
|
212
|
+
active: plugin.activeByDefault ?? false,
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
this.storePlugins(newPluginConfigs);
|
|
216
|
+
}
|
|
217
|
+
get parsedPlugins() {
|
|
218
|
+
const menuPlugins = this.plugins.menu.map((plugin) => {
|
|
219
|
+
let newPosition = plugin.position;
|
|
220
|
+
if (typeof plugin.position === 'number') {
|
|
221
|
+
newPosition = undefined;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
...plugin,
|
|
225
|
+
position: newPosition,
|
|
226
|
+
kind: 'menu',
|
|
227
|
+
active: plugin.active ?? false,
|
|
228
|
+
};
|
|
229
|
+
});
|
|
230
|
+
const editorPlugins = this.plugins.editor.map((plugin) => {
|
|
231
|
+
const editorPlugin = {
|
|
232
|
+
...plugin,
|
|
233
|
+
position: undefined,
|
|
234
|
+
kind: 'editor',
|
|
235
|
+
active: plugin.active ?? false,
|
|
236
|
+
};
|
|
237
|
+
return editorPlugin;
|
|
238
|
+
});
|
|
239
|
+
const allPlugnis = [...menuPlugins, ...editorPlugins];
|
|
240
|
+
return allPlugnis;
|
|
241
|
+
}
|
|
242
|
+
updateStoredPlugins(newPlugins) {
|
|
243
|
+
//
|
|
244
|
+
// Generate content of each plugin
|
|
245
|
+
//
|
|
246
|
+
const plugins = newPlugins.map(plugin => {
|
|
247
|
+
const isInstalled = plugin.src && plugin.active;
|
|
248
|
+
if (!isInstalled) {
|
|
249
|
+
return plugin;
|
|
250
|
+
}
|
|
251
|
+
return this.addContent(plugin);
|
|
252
|
+
});
|
|
253
|
+
//
|
|
254
|
+
// Merge built-in plugins
|
|
255
|
+
//
|
|
256
|
+
const mergedPlugins = plugins.map(plugin => {
|
|
257
|
+
const isBuiltIn = !plugin?.official;
|
|
258
|
+
if (!isBuiltIn) {
|
|
259
|
+
return plugin;
|
|
260
|
+
}
|
|
261
|
+
;
|
|
262
|
+
const builtInPlugin = [...this.getBuiltInPlugins(), ...this.parsedPlugins]
|
|
263
|
+
.find(p => p.src === plugin.src);
|
|
264
|
+
return {
|
|
265
|
+
...builtInPlugin,
|
|
266
|
+
...plugin,
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
this.storePlugins(mergedPlugins);
|
|
270
|
+
}
|
|
271
|
+
storePlugins(plugins) {
|
|
272
|
+
this.storedPlugins = plugins;
|
|
273
|
+
const pluginConfigs = JSON.stringify(plugins.map(withoutContent));
|
|
274
|
+
localStorage.setItem('plugins', pluginConfigs);
|
|
275
|
+
}
|
|
276
|
+
getPluginConfigsFromLocalStorage() {
|
|
277
|
+
const pluginsConfigStr = localStorage.getItem('plugins') ?? '[]';
|
|
278
|
+
return JSON.parse(pluginsConfigStr);
|
|
279
|
+
}
|
|
280
|
+
get locale() {
|
|
281
|
+
return navigator.language || 'en-US';
|
|
282
|
+
}
|
|
283
|
+
get docs() {
|
|
284
|
+
const docs = {};
|
|
285
|
+
if (this.doc) {
|
|
286
|
+
docs[this.docName] = this.doc;
|
|
287
|
+
}
|
|
288
|
+
return docs;
|
|
289
|
+
}
|
|
290
|
+
setPlugins(selectedPlugins) {
|
|
291
|
+
const newPlugins = this.storedPlugins.map((storedPlugin) => {
|
|
292
|
+
const isSelected = selectedPlugins.some((selectedPlugin) => {
|
|
293
|
+
return selectedPlugin.name === storedPlugin.name
|
|
294
|
+
&& selectedPlugin.src === storedPlugin.src;
|
|
295
|
+
});
|
|
296
|
+
return {
|
|
297
|
+
...storedPlugin,
|
|
298
|
+
active: isSelected
|
|
299
|
+
};
|
|
300
|
+
});
|
|
301
|
+
this.updateStoredPlugins(newPlugins);
|
|
302
|
+
}
|
|
303
|
+
loadPlugins() {
|
|
304
|
+
const localPluginConfigs = this.getPluginConfigsFromLocalStorage();
|
|
305
|
+
const overwritesOfBultInPlugins = localPluginConfigs.filter((p) => {
|
|
306
|
+
return this.getBuiltInPlugins().some(b => b.src === p.src);
|
|
307
|
+
});
|
|
308
|
+
const userInstalledPlugins = localPluginConfigs.filter((p) => {
|
|
309
|
+
return !this.getBuiltInPlugins().some(b => b.src === p.src);
|
|
310
|
+
});
|
|
311
|
+
const mergedBuiltInPlugins = this.getBuiltInPlugins().map((builtInPlugin) => {
|
|
312
|
+
let overwrite = overwritesOfBultInPlugins.find(p => p.src === builtInPlugin.src);
|
|
313
|
+
const mergedPlugin = {
|
|
314
|
+
...builtInPlugin,
|
|
315
|
+
...overwrite,
|
|
316
|
+
active: overwrite?.active ?? builtInPlugin.activeByDefault,
|
|
317
|
+
};
|
|
318
|
+
return mergedPlugin;
|
|
319
|
+
});
|
|
320
|
+
const mergedPlugins = [...mergedBuiltInPlugins, ...userInstalledPlugins];
|
|
321
|
+
this.updateStoredPlugins(mergedPlugins);
|
|
322
|
+
}
|
|
323
|
+
async addExternalPlugin(plugin) {
|
|
324
|
+
if (this.storedPlugins.some(p => p.src === plugin.src))
|
|
325
|
+
return;
|
|
326
|
+
const newPlugins = this.storedPlugins;
|
|
327
|
+
newPlugins.push(plugin);
|
|
328
|
+
this.storePlugins(newPlugins);
|
|
329
|
+
}
|
|
330
|
+
getBuiltInPlugins() {
|
|
331
|
+
return builtinPlugins;
|
|
332
|
+
}
|
|
333
|
+
addContent(plugin) {
|
|
334
|
+
const tag = this.pluginTag(plugin.src);
|
|
335
|
+
if (!this.loadedPlugins.has(tag)) {
|
|
336
|
+
this.loadedPlugins.add(tag);
|
|
337
|
+
import(plugin.src).then((mod) => {
|
|
338
|
+
customElements.define(tag, mod.default);
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
return {
|
|
342
|
+
...plugin,
|
|
343
|
+
content: () => {
|
|
344
|
+
return staticTagHtml `<${tag}
|
|
345
|
+
.doc=${this.doc}
|
|
346
|
+
.docName=${this.docName}
|
|
347
|
+
.editCount=${this.editCount}
|
|
348
|
+
.plugins=${this.storedPlugins}
|
|
349
|
+
.docId=${this.docId}
|
|
350
|
+
.pluginId=${plugin.src}
|
|
351
|
+
.nsdoc=${this.nsdoc}
|
|
352
|
+
.docs=${this.docs}
|
|
353
|
+
.locale=${this.locale}
|
|
354
|
+
.oscdApi=${new OscdApi(tag)}
|
|
355
|
+
.editor=${this.editor}
|
|
356
|
+
class="${classMap({
|
|
357
|
+
plugin: true,
|
|
358
|
+
menu: plugin.kind === 'menu',
|
|
359
|
+
validator: plugin.kind === 'validator',
|
|
360
|
+
editor: plugin.kind === 'editor',
|
|
361
|
+
})}"
|
|
362
|
+
></${tag}>`;
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
pluginTag(uri) {
|
|
367
|
+
if (!this.pluginTags.has(uri)) {
|
|
368
|
+
const tag = pluginTag(uri);
|
|
369
|
+
this.pluginTags.set(uri, tag);
|
|
370
|
+
}
|
|
371
|
+
return this.pluginTags.get(uri);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
__decorate([
|
|
375
|
+
property({ attribute: false })
|
|
376
|
+
], OpenSCD.prototype, "doc", void 0);
|
|
377
|
+
__decorate([
|
|
378
|
+
property({ type: String })
|
|
379
|
+
], OpenSCD.prototype, "docName", void 0);
|
|
380
|
+
__decorate([
|
|
381
|
+
property({ type: String })
|
|
382
|
+
], OpenSCD.prototype, "docId", void 0);
|
|
383
|
+
__decorate([
|
|
384
|
+
property({ attribute: false })
|
|
385
|
+
], OpenSCD.prototype, "nsdoc", void 0);
|
|
386
|
+
__decorate([
|
|
387
|
+
property({ type: String })
|
|
388
|
+
], OpenSCD.prototype, "src", null);
|
|
389
|
+
__decorate([
|
|
390
|
+
state()
|
|
391
|
+
], OpenSCD.prototype, "storedPlugins", void 0);
|
|
392
|
+
__decorate([
|
|
393
|
+
state()
|
|
394
|
+
], OpenSCD.prototype, "editCount", void 0);
|
|
395
|
+
__decorate([
|
|
396
|
+
property({ type: Object })
|
|
397
|
+
], OpenSCD.prototype, "plugins", void 0);
|
|
398
|
+
__decorate([
|
|
399
|
+
state()
|
|
400
|
+
], OpenSCD.prototype, "loadedPlugins", void 0);
|
|
401
|
+
__decorate([
|
|
402
|
+
state()
|
|
403
|
+
], OpenSCD.prototype, "pluginTags", void 0);
|
|
404
|
+
OpenSCD = __decorate([
|
|
405
|
+
customElement('open-scd')
|
|
406
|
+
], OpenSCD);
|
|
407
|
+
export { OpenSCD };
|
|
408
|
+
export function newResetPluginsEvent() {
|
|
409
|
+
return new CustomEvent('reset-plugins', { bubbles: true, composed: true });
|
|
410
|
+
}
|
|
411
|
+
export function newAddExternalPluginEvent(plugin) {
|
|
412
|
+
return new CustomEvent('add-external-plugin', {
|
|
413
|
+
bubbles: true,
|
|
414
|
+
composed: true,
|
|
415
|
+
detail: { plugin },
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
export function newSetPluginsEvent(selectedPlugins) {
|
|
419
|
+
return new CustomEvent('set-plugins', {
|
|
420
|
+
bubbles: true,
|
|
421
|
+
composed: true,
|
|
422
|
+
detail: { selectedPlugins },
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* This is a template literal tag function. See:
|
|
427
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates
|
|
428
|
+
*
|
|
429
|
+
* Passes its arguments to LitElement's `html` tag after combining the first and
|
|
430
|
+
* last expressions with the first two and last two static strings.
|
|
431
|
+
* Throws unless the first and last expressions are identical strings.
|
|
432
|
+
*
|
|
433
|
+
* We need this to get around the expression location limitations documented in
|
|
434
|
+
* https://lit.dev/docs/templates/expressions/#expression-locations
|
|
435
|
+
*
|
|
436
|
+
* After upgrading to Lit 2 we can use their static HTML functions instead:
|
|
437
|
+
* https://lit.dev/docs/api/static-html/
|
|
438
|
+
*/
|
|
439
|
+
function staticTagHtml(oldStrings, ...oldArgs) {
|
|
440
|
+
const args = [...oldArgs];
|
|
441
|
+
const firstArg = args.shift();
|
|
442
|
+
const lastArg = args.pop();
|
|
443
|
+
if (firstArg !== lastArg)
|
|
444
|
+
throw new Error(`Opening tag <${firstArg}> does not match closing tag </${lastArg}>.`);
|
|
445
|
+
const strings = [...oldStrings];
|
|
446
|
+
const firstString = strings.shift();
|
|
447
|
+
const secondString = strings.shift();
|
|
448
|
+
const lastString = strings.pop();
|
|
449
|
+
const penultimateString = strings.pop();
|
|
450
|
+
strings.unshift(`${firstString}${firstArg}${secondString}`);
|
|
451
|
+
strings.push(`${penultimateString}${lastArg}${lastString}`);
|
|
452
|
+
return html(strings, ...args);
|
|
453
|
+
}
|
|
454
|
+
function withoutContent(plugin) {
|
|
455
|
+
return { ...plugin, content: undefined };
|
|
456
|
+
}
|
|
457
|
+
export const pluginIcons = {
|
|
458
|
+
editor: 'tab',
|
|
459
|
+
menu: 'play_circle',
|
|
460
|
+
validator: 'rule_folder',
|
|
461
|
+
top: 'play_circle',
|
|
462
|
+
middle: 'play_circle',
|
|
463
|
+
bottom: 'play_circle',
|
|
464
|
+
};
|
|
465
|
+
const menuOrder = [
|
|
466
|
+
'editor',
|
|
467
|
+
'top',
|
|
468
|
+
'validator',
|
|
469
|
+
'middle',
|
|
470
|
+
'bottom',
|
|
471
|
+
];
|
|
472
|
+
function menuCompare(a, b) {
|
|
473
|
+
if (a.kind === b.kind && a.position === b.position)
|
|
474
|
+
return 0;
|
|
475
|
+
const earlier = menuOrder.find(kind => [a.kind, b.kind, a.position, b.position].includes(kind));
|
|
476
|
+
return [a.kind, a.position].includes(earlier) ? -1 : 1;
|
|
477
|
+
}
|
|
478
|
+
function compareNeedsDoc(a, b) {
|
|
479
|
+
if (a.requireDoc === b.requireDoc)
|
|
480
|
+
return 0;
|
|
481
|
+
return a.requireDoc ? 1 : -1;
|
|
482
|
+
}
|
|
483
|
+
//# sourceMappingURL=open-scd.js.map
|