@compas-oscd/open-scd 0.34.17 → 0.34.19
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 +38 -127
- package/dist/Wizarding.d.ts +0 -10
package/dist/open-scd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-scd.js","sourceRoot":"","sources":["../src/open-scd.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,GAEN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,2BAA2B,CAAC;AACnC,OAAO,+BAA+B,CAAC;AACvC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iCAAiC,CAAC;AACzC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,yBAAyB,CAAC;AACjC,OAAO,wCAAwC,CAAC;AAChD,OAAO,wCAAwC,CAAC;AAChD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,uDAAuD,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAI5B,OAAO,EAAE,eAAe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CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CACxD,CAAC;IACF,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS;IAC3C,IAAI,CAAC,CAAC,UAAU,KAAK,CAAC,CAAC,UAAU;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import {\n customElement,\n html,\n LitElement,\n property,\n state,\n TemplateResult,\n} from 'lit-element';\nimport { classMap } from 'lit-html/directives/class-map';\n\nimport '@material/mwc-icon';\nimport '@material/mwc-icon-button';\nimport '@material/mwc-linear-progress';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item';\nimport '@material/mwc-tab';\nimport '@material/mwc-tab-bar';\nimport '@material/mwc-top-app-bar-fixed';\nimport '@material/mwc-drawer';\nimport '@material/mwc-button';\nimport '@material/mwc-dialog';\nimport '@material/mwc-formfield';\nimport '@material/mwc-list/mwc-check-list-item';\nimport '@material/mwc-list/mwc-radio-list-item';\nimport '@material/mwc-select';\nimport '@material/mwc-switch';\nimport '@material/mwc-textfield';\n\nimport { newOpenDocEvent } from '@compas-oscd/core/foundation/deprecated/open-event.js';\nimport { newPendingStateEvent } from '@compas-oscd/core/foundation/deprecated/waiter.js';\n\nimport './addons/Settings.js';\nimport './addons/Waiter.js';\nimport './addons/Wizards.js';\nimport './addons/Editor.js';\nimport './addons/History.js';\nimport './addons/Layout.js';\n\nimport { ActionDetail } from '@material/mwc-list';\n\nimport { officialPlugins as builtinPlugins } from './plugins.js';\nimport { initializeNsdoc, Nsdoc } from './foundation/nsdoc.js';\nimport type {\n PluginSet,\n Plugin as CorePlugin,\n EditCompletedEvent,\n} from '@compas-oscd/core';\nimport { OscdApi, XMLEditor } from '@compas-oscd/core';\n\nimport { InstalledOfficialPlugin, MenuPosition, PluginKind, Plugin } from \"./plugin.js\"\nimport { ConfigurePluginEvent, ConfigurePluginDetail, newConfigurePluginEvent } from './plugin.events.js';\nimport { newLogEvent } from '@compas-oscd/core/foundation/deprecated/history';\nimport { pluginTag } from './plugin-tag.js';\n\n\n\n/** The `<open-scd>` custom element is the main entry point of the\n * Open Substation Configuration Designer. */\n@customElement('open-scd')\nexport class OpenSCD extends LitElement {\n\n render(): TemplateResult {\n return html`<oscd-waiter>\n <oscd-settings .host=${this}>\n <oscd-wizards .host=${this}>\n <oscd-history\n .host=${this}\n .editor=${this.editor}\n >\n <oscd-editor\n .doc=${this.doc}\n .docName=${this.docName}\n .docId=${this.docId}\n .host=${this}\n .editCount=${this.editCount}\n .editor=${this.editor}\n >\n <oscd-layout\n @add-external-plugin=${this.handleAddExternalPlugin}\n @oscd-configure-plugin=${this.handleConfigurationPluginEvent}\n @set-plugins=${ (e: SetPluginsEvent) => this.setPlugins(e.detail.selectedPlugins) }\n .host=${this}\n .doc=${this.doc}\n .docName=${this.docName}\n .editCount=${this.editCount}\n .plugins=${this.storedPlugins}\n .editor=${this.editor}\n >\n </oscd-layout>\n </oscd-editor>\n </oscd-history>\n </oscd-wizards>\n </oscd-settings>\n </oscd-waiter>`;\n }\n\n\n @property({ attribute: false })\n doc: XMLDocument | null = null;\n /** The name of the current [[`doc`]] */\n @property({ type: String }) docName = '';\n /** The UUID of the current [[`doc`]] */\n @property({ type: String }) docId = '';\n\n editor = new XMLEditor();\n\n /** Object containing all *.nsdoc files and a function extracting element's label form them*/\n @property({ attribute: false })\n nsdoc: Nsdoc = initializeNsdoc();\n\n private currentSrc = '';\n /** The current file's URL. `blob:` URLs are *revoked after parsing*! */\n @property({ type: String })\n get src(): string {\n return this.currentSrc;\n }\n\n set src(value: string) {\n this.currentSrc = value;\n this.dispatchEvent(newPendingStateEvent(this.loadDoc(value)));\n }\n\n @state() private storedPlugins: Plugin[] = [];\n\n @state() private editCount = -1;\n\n private unsubscribers: (() => any)[] = [];\n\n /** Loads and parses an `XMLDocument` after [[`src`]] has changed. */\n private async loadDoc(src: string): Promise<void> {\n const response = await fetch(src);\n const text = await response.text();\n if (!text) return;\n\n const doc = new DOMParser().parseFromString(text, 'application/xml');\n const docName = src;\n this.dispatchEvent(newOpenDocEvent(doc, docName));\n\n if (src.startsWith('blob:')) URL.revokeObjectURL(src);\n }\n\n /**\n *\n * @deprecated Use `handleConfigurationPluginEvent` instead\n */\n public handleAddExternalPlugin(e: AddExternalPluginEvent){\n this.addExternalPlugin(e.detail.plugin);\n const {name, kind} = e.detail.plugin\n\n const event = newConfigurePluginEvent(name,kind, e.detail.plugin)\n\n this.handleConfigurationPluginEvent(event)\n }\n\n\n public handleConfigurationPluginEvent(e: ConfigurePluginEvent){\n const { name, kind, config } = e.detail;\n\n const hasPlugin = this.hasPlugin(name, kind);\n const hasConfig = config !== null;\n const isChangeEvent = hasPlugin && hasConfig;\n const isRemoveEvent = hasPlugin && !hasConfig;\n const isAddEvent = !hasPlugin && hasConfig;\n\n // the `&& config`is only because typescript\n // cannot infer that `isChangeEvent` and `isAddEvent` implies `config !== null`\n if(isChangeEvent && config){\n this.changePlugin(config);\n\n }else if(isRemoveEvent){\n this.removePlugin(name, kind);\n\n }else if(isAddEvent && config){\n this.addPlugin(config);\n\n }else{\n const event = newLogEvent({\n kind: \"error\",\n title: \"Invalid plugin configuration event\",\n message: JSON.stringify({name, kind, config}),\n });\n this.dispatchEvent(event);\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.loadPlugins();\n\n this.unsubscribers.push(\n this.editor.subscribe(e => this.editCount++),\n this.editor.subscribeUndoRedo(e => this.editCount++)\n );\n\n // TODO: let Lit handle the event listeners, move to render()\n this.addEventListener('reset-plugins', this.resetPlugins);\n }\n\n disconnectedCallback(): void {\n this.unsubscribers.forEach(u => u());\n }\n\n\n /**\n *\n * @param name\n * @param kind\n * @returns the index of the plugin in the stored plugin list\n */\n private findPluginIndex(name: string, kind: PluginKind): number {\n return this.storedPlugins.findIndex(p => p.name === name && p.kind === kind);\n }\n\n private hasPlugin(name: string, kind: PluginKind): boolean {\n return this.findPluginIndex(name, kind) > -1;\n }\n\n private removePlugin(name: string, kind: PluginKind) {\n const newPlugins = this.storedPlugins.filter(\n p => p.name !== name || p.kind !== kind\n );\n this.updateStoredPlugins(newPlugins);\n }\n\n private addPlugin(plugin: Plugin) {\n const newPlugins = [...this.storedPlugins, plugin];\n this.updateStoredPlugins(newPlugins);\n }\n\n /**\n *\n * @param plugin\n * @throws if the plugin is not found\n */\n private changePlugin(plugin: Plugin) {\n const storedPlugins = this.storedPlugins;\n const {name, kind} = plugin;\n const pluginIndex = this.findPluginIndex(name, kind);\n\n if(pluginIndex < 0) {\n const event = newLogEvent({\n kind: \"error\",\n title: \"Plugin not found, stopping change process\",\n message: JSON.stringify({name, kind}),\n })\n this.dispatchEvent(event);\n return;\n }\n\n const pluginToChange = storedPlugins[pluginIndex]\n const changedPlugin = {...pluginToChange, ...plugin}\n const newPlugins = [...storedPlugins]\n newPlugins.splice(pluginIndex, 1, changedPlugin)\n\n // this.storePlugins(newPlugins);\n this.updateStoredPlugins(newPlugins);\n }\n\n private resetPlugins(): void {\n const builtInPlugins = this.getBuiltInPlugins()\n const allPlugins = [...builtInPlugins, ...this.parsedPlugins]\n\n const newPluginConfigs = allPlugins.map(plugin => {\n return {\n ...plugin,\n active: plugin.activeByDefault ?? false,\n }\n })\n\n this.storePlugins(newPluginConfigs)\n }\n\n /**\n * @prop {PluginSet} plugins - Set of plugins that are used by OpenSCD\n */\n @property({ type: Object }) plugins: PluginSet = { menu: [], editor: [] };\n get parsedPlugins(): Plugin[] {\n const menuPlugins: Plugin[] = this.plugins.menu.map((plugin) => {\n let newPosition: MenuPosition | undefined = plugin.position as MenuPosition;\n if(typeof plugin.position === 'number') {\n newPosition = undefined\n }\n\n return {\n ...plugin,\n position: newPosition,\n kind: 'menu' as PluginKind,\n active: plugin.active ?? false,\n }\n })\n\n const editorPlugins: Plugin[] = this.plugins.editor.map((plugin) => {\n const editorPlugin: Plugin = {\n ...plugin,\n position: undefined,\n kind: 'editor' as PluginKind,\n active: plugin.active ?? false,\n }\n return editorPlugin\n })\n\n const allPlugnis = [...menuPlugins, ...editorPlugins]\n return allPlugnis\n }\n\n\n\n private updateStoredPlugins(newPlugins: Plugin[]) {\n //\n // Generate content of each plugin\n //\n const plugins = newPlugins.map(plugin => {\n const isInstalled = plugin.src && plugin.active\n if(!isInstalled) { return plugin }\n\n return this.addContent(plugin)\n })\n\n //\n // Merge built-in plugins\n //\n const mergedPlugins = plugins.map(plugin => {\n const isBuiltIn = !plugin?.official\n if (!isBuiltIn){ return plugin };\n\n const builtInPlugin = [...this.getBuiltInPlugins(), ...this.parsedPlugins]\n .find(p => p.src === plugin.src);\n\n return <Plugin>{\n ...builtInPlugin,\n ...plugin,\n };\n })\n this.storePlugins(mergedPlugins);\n }\n\n private storePlugins(plugins: Plugin[]) {\n this.storedPlugins = plugins\n const pluginConfigs = JSON.stringify(plugins.map(withoutContent))\n localStorage.setItem('plugins', pluginConfigs);\n }\n private getPluginConfigsFromLocalStorage(): Plugin[] {\n const pluginsConfigStr = localStorage.getItem('plugins') ?? '[]'\n return JSON.parse(pluginsConfigStr) as Plugin[]\n }\n\n\n protected get locale(): string {\n return navigator.language || 'en-US';\n }\n\n get docs(): Record<string, XMLDocument> {\n const docs: Record<string, XMLDocument> = {};\n\n if (this.doc) {\n docs[this.docName] = this.doc;\n }\n\n return docs;\n }\n\n private setPlugins(selectedPlugins: Plugin[]) {\n\n const newPlugins: Plugin[] = this.storedPlugins.map((storedPlugin) => {\n const isSelected = selectedPlugins.some( (selectedPlugin) => {\n return selectedPlugin.name === storedPlugin.name\n && selectedPlugin.src === storedPlugin.src\n })\n return {\n ...storedPlugin,\n active: isSelected\n }\n })\n\n this.updateStoredPlugins(newPlugins);\n }\n\n private loadPlugins(){\n const localPluginConfigs = this.getPluginConfigsFromLocalStorage()\n\n const overwritesOfBultInPlugins = localPluginConfigs.filter((p) => {\n return this.getBuiltInPlugins().some(b => b.src === p.src)\n })\n\n const userInstalledPlugins = localPluginConfigs.filter((p) => {\n return !this.getBuiltInPlugins().some(b => b.src === p.src)\n })\n const mergedBuiltInPlugins = this.getBuiltInPlugins().map((builtInPlugin) => {\n let overwrite = overwritesOfBultInPlugins.find(p => p.src === builtInPlugin.src)\n\n const mergedPlugin: Plugin = {\n ...builtInPlugin,\n ...overwrite,\n active: overwrite?.active ?? builtInPlugin.activeByDefault,\n }\n\n return mergedPlugin\n })\n\n const mergedPlugins = [...mergedBuiltInPlugins, ...userInstalledPlugins]\n\n this.updateStoredPlugins(mergedPlugins)\n }\n\n private async addExternalPlugin(\n plugin: Omit<Plugin, 'content'>\n ): Promise<void> {\n if (this.storedPlugins.some(p => p.src === plugin.src)) return;\n\n const newPlugins: Omit<Plugin, 'content'>[] = this.storedPlugins;\n newPlugins.push(plugin);\n this.storePlugins(newPlugins);\n }\n\n protected getBuiltInPlugins(): CorePlugin[] {\n return builtinPlugins\n }\n\n private addContent(plugin: Omit<Plugin, 'content'>): Plugin {\n const tag = this.pluginTag(plugin.src);\n\n if (!this.loadedPlugins.has(tag)) {\n this.loadedPlugins.add(tag);\n import(plugin.src).then((mod) => {\n customElements.define(tag, mod.default)\n })\n }\n return {\n ...plugin,\n content: () => {\n return staticTagHtml`<${tag}\n .doc=${this.doc}\n .docName=${this.docName}\n .editCount=${this.editCount}\n .plugins=${this.storedPlugins}\n .docId=${this.docId}\n .pluginId=${plugin.src}\n .nsdoc=${this.nsdoc}\n .docs=${this.docs}\n .locale=${this.locale}\n .oscdApi=${new OscdApi(tag)}\n .editor=${this.editor}\n class=\"${classMap({\n plugin: true,\n menu: plugin.kind === 'menu',\n validator: plugin.kind === 'validator',\n editor: plugin.kind === 'editor',\n })}\"\n ></${tag}>`\n },\n };\n }\n\n @state() private loadedPlugins = new Set<string>();\n\n // PLUGGING INTERFACES\n @state() private pluginTags = new Map<string, string>();\n\n private pluginTag(uri: string): string {\n if (!this.pluginTags.has(uri)) {\n const tag = pluginTag(uri);\n this.pluginTags.set(uri, tag);\n }\n\n return this.pluginTags.get(uri)!;\n }\n\n\n}\n\ndeclare global {\n interface ElementEventMap {\n 'reset-plugins': CustomEvent;\n 'add-external-plugin': CustomEvent<AddExternalPluginDetail>;\n 'set-plugins': CustomEvent<SetPluginsDetail>;\n }\n}\n\n\n// HOSTING INTERFACES\n\nexport interface MenuItem {\n icon: string;\n name: string;\n src?: string;\n hint?: string;\n actionItem?: boolean;\n action?: (event: CustomEvent<ActionDetail>) => void;\n disabled?: () => boolean;\n content: () => TemplateResult;\n kind: string;\n}\n\nexport interface Validator {\n validate: () => Promise<void>;\n}\n\nexport interface MenuPlugin {\n run: () => Promise<void>;\n}\n\nexport function newResetPluginsEvent(): CustomEvent {\n return new CustomEvent('reset-plugins', { bubbles: true, composed: true });\n}\n\nexport interface AddExternalPluginDetail {\n plugin: Omit<Plugin, 'content'>;\n}\n\nexport type AddExternalPluginEvent = CustomEvent<AddExternalPluginDetail>;\n\nexport function newAddExternalPluginEvent(\n plugin: Omit<Plugin, 'content'>\n): AddExternalPluginEvent {\n return new CustomEvent<AddExternalPluginDetail>('add-external-plugin', {\n bubbles: true,\n composed: true,\n detail: { plugin },\n });\n}\n\nexport interface SetPluginsDetail {\n selectedPlugins: Plugin[];\n}\n\nexport type SetPluginsEvent = CustomEvent<SetPluginsDetail>;\n\nexport function newSetPluginsEvent(selectedPlugins: Plugin[]): SetPluginsEvent {\n return new CustomEvent<SetPluginsDetail>('set-plugins', {\n bubbles: true,\n composed: true,\n detail: { selectedPlugins },\n });\n}\n\n\n\n\n/**\n * This is a template literal tag function. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates\n *\n * Passes its arguments to LitElement's `html` tag after combining the first and\n * last expressions with the first two and last two static strings.\n * Throws unless the first and last expressions are identical strings.\n *\n * We need this to get around the expression location limitations documented in\n * https://lit.dev/docs/templates/expressions/#expression-locations\n *\n * After upgrading to Lit 2 we can use their static HTML functions instead:\n * https://lit.dev/docs/api/static-html/\n */\nfunction staticTagHtml(\n oldStrings: ReadonlyArray<string>,\n ...oldArgs: unknown[]\n): TemplateResult {\n const args = [...oldArgs];\n const firstArg = args.shift();\n const lastArg = args.pop();\n\n if (firstArg !== lastArg)\n throw new Error(\n `Opening tag <${firstArg}> does not match closing tag </${lastArg}>.`\n );\n\n const strings = [...oldStrings] as string[] & { raw: string[] };\n const firstString = strings.shift();\n const secondString = strings.shift();\n\n const lastString = strings.pop();\n const penultimateString = strings.pop();\n\n strings.unshift(`${firstString}${firstArg}${secondString}`);\n strings.push(`${penultimateString}${lastArg}${lastString}`);\n\n return html(<TemplateStringsArray>strings, ...args);\n}\n\n\nfunction withoutContent<P extends Plugin | InstalledOfficialPlugin>(\n plugin: P\n): P {\n return { ...plugin, content: undefined };\n}\n\nexport const pluginIcons: Record<PluginKind | MenuPosition, string> = {\n editor: 'tab',\n menu: 'play_circle',\n validator: 'rule_folder',\n top: 'play_circle',\n middle: 'play_circle',\n bottom: 'play_circle',\n};\n\nconst menuOrder: (PluginKind | MenuPosition)[] = [\n 'editor',\n 'top',\n 'validator',\n 'middle',\n 'bottom',\n];\n\nfunction menuCompare(a: Plugin, b: Plugin): -1 | 0 | 1 {\n if (a.kind === b.kind && a.position === b.position) return 0;\n const earlier = menuOrder.find(kind =>\n [a.kind, b.kind, a.position, b.position].includes(kind)\n );\n return [a.kind, a.position].includes(earlier) ? -1 : 1;\n}\n\nfunction compareNeedsDoc(a: Plugin, b: Plugin): -1 | 0 | 1 {\n if (a.requireDoc === b.requireDoc) return 0;\n return a.requireDoc ? 1 : -1;\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"open-scd.js","sourceRoot":"","sources":["../src/open-scd.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,CAAC,CAAC,UAAU;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC","sourcesContent":["import {\n customElement,\n html,\n LitElement,\n property,\n state,\n TemplateResult,\n} from 'lit-element';\nimport { classMap } from 'lit-html/directives/class-map';\n\nimport '@material/mwc-icon';\nimport '@material/mwc-icon-button';\nimport '@material/mwc-linear-progress';\nimport '@material/mwc-list';\nimport '@material/mwc-list/mwc-list-item';\nimport '@material/mwc-tab';\nimport '@material/mwc-tab-bar';\nimport '@material/mwc-top-app-bar-fixed';\nimport '@material/mwc-drawer';\nimport '@material/mwc-button';\nimport '@material/mwc-dialog';\nimport '@material/mwc-formfield';\nimport '@material/mwc-list/mwc-check-list-item';\nimport '@material/mwc-list/mwc-radio-list-item';\nimport '@material/mwc-select';\nimport '@material/mwc-switch';\nimport '@material/mwc-textfield';\n\nimport { newOpenDocEvent } from '@openscd/core/foundation/deprecated/open-event.js';\nimport { newPendingStateEvent } from '@openscd/core/foundation/deprecated/waiter.js';\n\nimport './addons/Settings.js';\nimport './addons/Waiter.js';\nimport './addons/Wizards.js';\nimport './addons/Editor.js';\nimport './addons/History.js';\nimport './addons/Layout.js';\n\nimport { ActionDetail } from '@material/mwc-list';\n\nimport { officialPlugins as builtinPlugins } from './plugins.js';\nimport { initializeNsdoc, Nsdoc } from './foundation/nsdoc.js';\nimport type {\n PluginSet,\n Plugin as CorePlugin,\n EditCompletedEvent,\n} from '@openscd/core';\nimport { OscdApi, XMLEditor } from '@openscd/core';\n\nimport { InstalledOfficialPlugin, MenuPosition, PluginKind, Plugin } from \"./plugin.js\"\nimport { ConfigurePluginEvent, ConfigurePluginDetail, newConfigurePluginEvent } from './plugin.events.js';\nimport { newLogEvent } from '@openscd/core/foundation/deprecated/history';\nimport { pluginTag } from './plugin-tag.js';\n\n\n\n/** The `<open-scd>` custom element is the main entry point of the\n * Open Substation Configuration Designer. */\n@customElement('open-scd')\nexport class OpenSCD extends LitElement {\n\n render(): TemplateResult {\n return html`<oscd-waiter>\n <oscd-settings .host=${this}>\n <oscd-wizards .host=${this}>\n <oscd-history\n .host=${this}\n .editor=${this.editor}\n >\n <oscd-editor\n .doc=${this.doc}\n .docName=${this.docName}\n .docId=${this.docId}\n .host=${this}\n .editCount=${this.editCount}\n .editor=${this.editor}\n >\n <oscd-layout\n @add-external-plugin=${this.handleAddExternalPlugin}\n @oscd-configure-plugin=${this.handleConfigurationPluginEvent}\n @set-plugins=${ (e: SetPluginsEvent) => this.setPlugins(e.detail.selectedPlugins) }\n .host=${this}\n .doc=${this.doc}\n .docName=${this.docName}\n .editCount=${this.editCount}\n .plugins=${this.storedPlugins}\n .editor=${this.editor}\n >\n </oscd-layout>\n </oscd-editor>\n </oscd-history>\n </oscd-wizards>\n </oscd-settings>\n </oscd-waiter>`;\n }\n\n\n @property({ attribute: false })\n doc: XMLDocument | null = null;\n /** The name of the current [[`doc`]] */\n @property({ type: String }) docName = '';\n /** The UUID of the current [[`doc`]] */\n @property({ type: String }) docId = '';\n\n editor = new XMLEditor();\n\n /** Object containing all *.nsdoc files and a function extracting element's label form them*/\n @property({ attribute: false })\n nsdoc: Nsdoc = initializeNsdoc();\n\n private currentSrc = '';\n /** The current file's URL. `blob:` URLs are *revoked after parsing*! */\n @property({ type: String })\n get src(): string {\n return this.currentSrc;\n }\n\n set src(value: string) {\n this.currentSrc = value;\n this.dispatchEvent(newPendingStateEvent(this.loadDoc(value)));\n }\n\n @state() private storedPlugins: Plugin[] = [];\n\n @state() private editCount = -1;\n\n private unsubscribers: (() => any)[] = [];\n\n /** Loads and parses an `XMLDocument` after [[`src`]] has changed. */\n private async loadDoc(src: string): Promise<void> {\n const response = await fetch(src);\n const text = await response.text();\n if (!text) return;\n\n const doc = new DOMParser().parseFromString(text, 'application/xml');\n const docName = src;\n this.dispatchEvent(newOpenDocEvent(doc, docName));\n\n if (src.startsWith('blob:')) URL.revokeObjectURL(src);\n }\n\n /**\n *\n * @deprecated Use `handleConfigurationPluginEvent` instead\n */\n public handleAddExternalPlugin(e: AddExternalPluginEvent){\n this.addExternalPlugin(e.detail.plugin);\n const {name, kind} = e.detail.plugin\n\n const event = newConfigurePluginEvent(name,kind, e.detail.plugin)\n\n this.handleConfigurationPluginEvent(event)\n }\n\n\n public handleConfigurationPluginEvent(e: ConfigurePluginEvent){\n const { name, kind, config } = e.detail;\n\n const hasPlugin = this.hasPlugin(name, kind);\n const hasConfig = config !== null;\n const isChangeEvent = hasPlugin && hasConfig;\n const isRemoveEvent = hasPlugin && !hasConfig;\n const isAddEvent = !hasPlugin && hasConfig;\n\n // the `&& config`is only because typescript\n // cannot infer that `isChangeEvent` and `isAddEvent` implies `config !== null`\n if(isChangeEvent && config){\n this.changePlugin(config);\n\n }else if(isRemoveEvent){\n this.removePlugin(name, kind);\n\n }else if(isAddEvent && config){\n this.addPlugin(config);\n\n }else{\n const event = newLogEvent({\n kind: \"error\",\n title: \"Invalid plugin configuration event\",\n message: JSON.stringify({name, kind, config}),\n });\n this.dispatchEvent(event);\n }\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.loadPlugins();\n\n this.unsubscribers.push(\n this.editor.subscribe(e => this.editCount++),\n this.editor.subscribeUndoRedo(e => this.editCount++)\n );\n\n // TODO: let Lit handle the event listeners, move to render()\n this.addEventListener('reset-plugins', this.resetPlugins);\n }\n\n disconnectedCallback(): void {\n this.unsubscribers.forEach(u => u());\n }\n\n\n /**\n *\n * @param name\n * @param kind\n * @returns the index of the plugin in the stored plugin list\n */\n private findPluginIndex(name: string, kind: PluginKind): number {\n return this.storedPlugins.findIndex(p => p.name === name && p.kind === kind);\n }\n\n private hasPlugin(name: string, kind: PluginKind): boolean {\n return this.findPluginIndex(name, kind) > -1;\n }\n\n private removePlugin(name: string, kind: PluginKind) {\n const newPlugins = this.storedPlugins.filter(\n p => p.name !== name || p.kind !== kind\n );\n this.updateStoredPlugins(newPlugins);\n }\n\n private addPlugin(plugin: Plugin) {\n const newPlugins = [...this.storedPlugins, plugin];\n this.updateStoredPlugins(newPlugins);\n }\n\n /**\n *\n * @param plugin\n * @throws if the plugin is not found\n */\n private changePlugin(plugin: Plugin) {\n const storedPlugins = this.storedPlugins;\n const {name, kind} = plugin;\n const pluginIndex = this.findPluginIndex(name, kind);\n\n if(pluginIndex < 0) {\n const event = newLogEvent({\n kind: \"error\",\n title: \"Plugin not found, stopping change process\",\n message: JSON.stringify({name, kind}),\n })\n this.dispatchEvent(event);\n return;\n }\n\n const pluginToChange = storedPlugins[pluginIndex]\n const changedPlugin = {...pluginToChange, ...plugin}\n const newPlugins = [...storedPlugins]\n newPlugins.splice(pluginIndex, 1, changedPlugin)\n\n // this.storePlugins(newPlugins);\n this.updateStoredPlugins(newPlugins);\n }\n\n private resetPlugins(): void {\n const builtInPlugins = this.getBuiltInPlugins()\n const allPlugins = [...builtInPlugins, ...this.parsedPlugins]\n\n const newPluginConfigs = allPlugins.map(plugin => {\n return {\n ...plugin,\n active: plugin.activeByDefault ?? false,\n }\n })\n\n this.storePlugins(newPluginConfigs)\n }\n\n /**\n * @prop {PluginSet} plugins - Set of plugins that are used by OpenSCD\n */\n @property({ type: Object }) plugins: PluginSet = { menu: [], editor: [] };\n get parsedPlugins(): Plugin[] {\n const menuPlugins: Plugin[] = this.plugins.menu.map((plugin) => {\n let newPosition: MenuPosition | undefined = plugin.position as MenuPosition;\n if(typeof plugin.position === 'number') {\n newPosition = undefined\n }\n\n return {\n ...plugin,\n position: newPosition,\n kind: 'menu' as PluginKind,\n active: plugin.active ?? false,\n }\n })\n\n const editorPlugins: Plugin[] = this.plugins.editor.map((plugin) => {\n const editorPlugin: Plugin = {\n ...plugin,\n position: undefined,\n kind: 'editor' as PluginKind,\n active: plugin.active ?? false,\n }\n return editorPlugin\n })\n\n const allPlugnis = [...menuPlugins, ...editorPlugins]\n return allPlugnis\n }\n\n\n\n private updateStoredPlugins(newPlugins: Plugin[]) {\n //\n // Generate content of each plugin\n //\n const plugins = newPlugins.map(plugin => {\n const isInstalled = plugin.src && plugin.active\n if(!isInstalled) { return plugin }\n\n return this.addContent(plugin)\n })\n\n //\n // Merge built-in plugins\n //\n const mergedPlugins = plugins.map(plugin => {\n const isBuiltIn = !plugin?.official\n if (!isBuiltIn){ return plugin };\n\n const builtInPlugin = [...this.getBuiltInPlugins(), ...this.parsedPlugins]\n .find(p => p.src === plugin.src);\n\n return <Plugin>{\n ...builtInPlugin,\n ...plugin,\n };\n })\n this.storePlugins(mergedPlugins);\n }\n\n private storePlugins(plugins: Plugin[]) {\n this.storedPlugins = plugins\n const pluginConfigs = JSON.stringify(plugins.map(withoutContent))\n localStorage.setItem('plugins', pluginConfigs);\n }\n private getPluginConfigsFromLocalStorage(): Plugin[] {\n const pluginsConfigStr = localStorage.getItem('plugins') ?? '[]'\n return JSON.parse(pluginsConfigStr) as Plugin[]\n }\n\n\n protected get locale(): string {\n return navigator.language || 'en-US';\n }\n\n get docs(): Record<string, XMLDocument> {\n const docs: Record<string, XMLDocument> = {};\n\n if (this.doc) {\n docs[this.docName] = this.doc;\n }\n\n return docs;\n }\n\n private setPlugins(selectedPlugins: Plugin[]) {\n\n const newPlugins: Plugin[] = this.storedPlugins.map((storedPlugin) => {\n const isSelected = selectedPlugins.some( (selectedPlugin) => {\n return selectedPlugin.name === storedPlugin.name\n && selectedPlugin.src === storedPlugin.src\n })\n return {\n ...storedPlugin,\n active: isSelected\n }\n })\n\n this.updateStoredPlugins(newPlugins);\n }\n\n private loadPlugins(){\n const localPluginConfigs = this.getPluginConfigsFromLocalStorage()\n\n const overwritesOfBultInPlugins = localPluginConfigs.filter((p) => {\n return this.getBuiltInPlugins().some(b => b.src === p.src)\n })\n\n const userInstalledPlugins = localPluginConfigs.filter((p) => {\n return !this.getBuiltInPlugins().some(b => b.src === p.src)\n })\n const mergedBuiltInPlugins = this.getBuiltInPlugins().map((builtInPlugin) => {\n let overwrite = overwritesOfBultInPlugins.find(p => p.src === builtInPlugin.src)\n\n const mergedPlugin: Plugin = {\n ...builtInPlugin,\n ...overwrite,\n active: overwrite?.active ?? builtInPlugin.activeByDefault,\n }\n\n return mergedPlugin\n })\n\n const mergedPlugins = [...mergedBuiltInPlugins, ...userInstalledPlugins]\n\n this.updateStoredPlugins(mergedPlugins)\n }\n\n private async addExternalPlugin(\n plugin: Omit<Plugin, 'content'>\n ): Promise<void> {\n if (this.storedPlugins.some(p => p.src === plugin.src)) return;\n\n const newPlugins: Omit<Plugin, 'content'>[] = this.storedPlugins;\n newPlugins.push(plugin);\n this.storePlugins(newPlugins);\n }\n\n protected getBuiltInPlugins(): CorePlugin[] {\n return builtinPlugins\n }\n\n private addContent(plugin: Omit<Plugin, 'content'>): Plugin {\n const tag = this.pluginTag(plugin.src);\n\n if (!this.loadedPlugins.has(tag)) {\n this.loadedPlugins.add(tag);\n import(plugin.src).then((mod) => {\n customElements.define(tag, mod.default)\n })\n }\n return {\n ...plugin,\n content: () => {\n return staticTagHtml`<${tag}\n .doc=${this.doc}\n .docName=${this.docName}\n .editCount=${this.editCount}\n .plugins=${this.storedPlugins}\n .docId=${this.docId}\n .pluginId=${plugin.src}\n .nsdoc=${this.nsdoc}\n .docs=${this.docs}\n .locale=${this.locale}\n .oscdApi=${new OscdApi(tag)}\n .editor=${this.editor}\n class=\"${classMap({\n plugin: true,\n menu: plugin.kind === 'menu',\n validator: plugin.kind === 'validator',\n editor: plugin.kind === 'editor',\n })}\"\n ></${tag}>`\n },\n };\n }\n\n @state() private loadedPlugins = new Set<string>();\n\n // PLUGGING INTERFACES\n @state() private pluginTags = new Map<string, string>();\n\n private pluginTag(uri: string): string {\n if (!this.pluginTags.has(uri)) {\n const tag = pluginTag(uri);\n this.pluginTags.set(uri, tag);\n }\n\n return this.pluginTags.get(uri)!;\n }\n\n\n}\n\ndeclare global {\n interface ElementEventMap {\n 'reset-plugins': CustomEvent;\n 'add-external-plugin': CustomEvent<AddExternalPluginDetail>;\n 'set-plugins': CustomEvent<SetPluginsDetail>;\n }\n}\n\n\n// HOSTING INTERFACES\n\nexport interface MenuItem {\n icon: string;\n name: string;\n src?: string;\n hint?: string;\n actionItem?: boolean;\n action?: (event: CustomEvent<ActionDetail>) => void;\n disabled?: () => boolean;\n content: () => TemplateResult;\n kind: string;\n}\n\nexport interface Validator {\n validate: () => Promise<void>;\n}\n\nexport interface MenuPlugin {\n run: () => Promise<void>;\n}\n\nexport function newResetPluginsEvent(): CustomEvent {\n return new CustomEvent('reset-plugins', { bubbles: true, composed: true });\n}\n\nexport interface AddExternalPluginDetail {\n plugin: Omit<Plugin, 'content'>;\n}\n\nexport type AddExternalPluginEvent = CustomEvent<AddExternalPluginDetail>;\n\nexport function newAddExternalPluginEvent(\n plugin: Omit<Plugin, 'content'>\n): AddExternalPluginEvent {\n return new CustomEvent<AddExternalPluginDetail>('add-external-plugin', {\n bubbles: true,\n composed: true,\n detail: { plugin },\n });\n}\n\nexport interface SetPluginsDetail {\n selectedPlugins: Plugin[];\n}\n\nexport type SetPluginsEvent = CustomEvent<SetPluginsDetail>;\n\nexport function newSetPluginsEvent(selectedPlugins: Plugin[]): SetPluginsEvent {\n return new CustomEvent<SetPluginsDetail>('set-plugins', {\n bubbles: true,\n composed: true,\n detail: { selectedPlugins },\n });\n}\n\n\n\n\n/**\n * This is a template literal tag function. See:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates\n *\n * Passes its arguments to LitElement's `html` tag after combining the first and\n * last expressions with the first two and last two static strings.\n * Throws unless the first and last expressions are identical strings.\n *\n * We need this to get around the expression location limitations documented in\n * https://lit.dev/docs/templates/expressions/#expression-locations\n *\n * After upgrading to Lit 2 we can use their static HTML functions instead:\n * https://lit.dev/docs/api/static-html/\n */\nfunction staticTagHtml(\n oldStrings: ReadonlyArray<string>,\n ...oldArgs: unknown[]\n): TemplateResult {\n const args = [...oldArgs];\n const firstArg = args.shift();\n const lastArg = args.pop();\n\n if (firstArg !== lastArg)\n throw new Error(\n `Opening tag <${firstArg}> does not match closing tag </${lastArg}>.`\n );\n\n const strings = [...oldStrings] as string[] & { raw: string[] };\n const firstString = strings.shift();\n const secondString = strings.shift();\n\n const lastString = strings.pop();\n const penultimateString = strings.pop();\n\n strings.unshift(`${firstString}${firstArg}${secondString}`);\n strings.push(`${penultimateString}${lastArg}${lastString}`);\n\n return html(<TemplateStringsArray>strings, ...args);\n}\n\n\nfunction withoutContent<P extends Plugin | InstalledOfficialPlugin>(\n plugin: P\n): P {\n return { ...plugin, content: undefined };\n}\n\nexport const pluginIcons: Record<PluginKind | MenuPosition, string> = {\n editor: 'tab',\n menu: 'play_circle',\n validator: 'rule_folder',\n top: 'play_circle',\n middle: 'play_circle',\n bottom: 'play_circle',\n};\n\nconst menuOrder: (PluginKind | MenuPosition)[] = [\n 'editor',\n 'top',\n 'validator',\n 'middle',\n 'bottom',\n];\n\nfunction menuCompare(a: Plugin, b: Plugin): -1 | 0 | 1 {\n if (a.kind === b.kind && a.position === b.position) return 0;\n const earlier = menuOrder.find(kind =>\n [a.kind, b.kind, a.position, b.position].includes(kind)\n );\n return [a.kind, a.position].includes(earlier) ? -1 : 1;\n}\n\nfunction compareNeedsDoc(a: Plugin, b: Plugin): -1 | 0 | 1 {\n if (a.requireDoc === b.requireDoc) return 0;\n return a.requireDoc ? 1 : -1;\n}\n\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, customElement, html, LitElement, property, } from 'lit-element';
|
|
3
|
+
let WizardDividerElement = class WizardDividerElement extends LitElement {
|
|
4
|
+
render() {
|
|
5
|
+
return html ` ${this.renderHeader()} ${this.renderSeparator()}`;
|
|
6
|
+
}
|
|
7
|
+
renderHeader() {
|
|
8
|
+
if (!this.header) {
|
|
9
|
+
return html ``;
|
|
10
|
+
}
|
|
11
|
+
return html `<h4 class="header">${this.header}</h4>`;
|
|
12
|
+
}
|
|
13
|
+
renderSeparator() {
|
|
14
|
+
return html `<div role="separator"></div>`;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
WizardDividerElement.styles = css `
|
|
18
|
+
div {
|
|
19
|
+
height: 0px;
|
|
20
|
+
margin: 10px 0px 10px 0px;
|
|
21
|
+
border-top: none;
|
|
22
|
+
border-right: none;
|
|
23
|
+
border-left: none;
|
|
24
|
+
border-image: initial;
|
|
25
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
28
|
+
__decorate([
|
|
29
|
+
property({
|
|
30
|
+
type: String,
|
|
31
|
+
})
|
|
32
|
+
], WizardDividerElement.prototype, "header", void 0);
|
|
33
|
+
WizardDividerElement = __decorate([
|
|
34
|
+
customElement('wizard-divider')
|
|
35
|
+
], WizardDividerElement);
|
|
36
|
+
export { WizardDividerElement };
|
|
37
|
+
//# sourceMappingURL=WizardDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WizardDivider.js","sourceRoot":"","sources":["../../../src/WizardDivider.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,aAAa,EACb,IAAI,EACJ,UAAU,EACV,QAAQ,GAET,MAAM,aAAa,CAAC;AAGd,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAMlD,MAAM;QACJ,OAAO,IAAI,CAAA,IAAI,IAAI,CAAC,YAAY,EAAE,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;IACjE,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChB,OAAO,IAAI,CAAA,EAAE,CAAC;SACf;QAED,OAAO,IAAI,CAAA,sBAAsB,IAAI,CAAC,MAAM,OAAO,CAAC;IACtD,CAAC;IAEO,eAAe;QACrB,OAAO,IAAI,CAAA,8BAA8B,CAAC;IAC5C,CAAC;;AAEM,2BAAM,GAAG,GAAG,CAAA;;;;;;;;;;GAUlB,CAAC;AA5BF;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,MAAM;KACb,CAAC;oDACc;AAJL,oBAAoB;IADhC,aAAa,CAAC,gBAAgB,CAAC;GACnB,oBAAoB,CAiChC;SAjCY,oBAAoB","sourcesContent":["import {\n css,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n} from 'lit-element';\n\n@customElement('wizard-divider')\nexport class WizardDividerElement extends LitElement {\n @property({\n type: String,\n })\n header?: string;\n\n render(): TemplateResult {\n return html` ${this.renderHeader()} ${this.renderSeparator()}`;\n }\n\n private renderHeader(): TemplateResult {\n if (!this.header) {\n return html``;\n }\n\n return html`<h4 class=\"header\">${this.header}</h4>`;\n }\n\n private renderSeparator(): TemplateResult {\n return html`<div role=\"separator\"></div>`;\n }\n\n static styles = css`\n div {\n height: 0px;\n margin: 10px 0px 10px 0px;\n border-top: none;\n border-right: none;\n border-left: none;\n border-image: initial;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n }\n `;\n}\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, state, query } from 'lit-element';
|
|
3
|
+
import { ifImplemented, } from './foundation.js';
|
|
4
|
+
import './wizard-dialog.js';
|
|
5
|
+
export function Wizarding(Base) {
|
|
6
|
+
class WizardingElement extends Base {
|
|
7
|
+
onWizard(we) {
|
|
8
|
+
const wizard = we.detail.wizard;
|
|
9
|
+
if (wizard === null)
|
|
10
|
+
this.workflow.shift();
|
|
11
|
+
else if (we.detail.subwizard)
|
|
12
|
+
this.workflow.unshift(wizard);
|
|
13
|
+
else
|
|
14
|
+
this.workflow.push(wizard);
|
|
15
|
+
this.requestUpdate('workflow');
|
|
16
|
+
this.updateComplete.then(() => this.wizardUI.updateComplete.then(() => this.wizardUI.dialog?.updateComplete.then(() => this.wizardUI.dialog?.focus())));
|
|
17
|
+
}
|
|
18
|
+
constructor(...args) {
|
|
19
|
+
super(...args);
|
|
20
|
+
/** FIFO queue of [[`Wizard`]]s to display. */
|
|
21
|
+
this.workflow = [];
|
|
22
|
+
this.addEventListener('wizard', this.onWizard);
|
|
23
|
+
this.addEventListener('editor-action', () => this.wizardUI.requestUpdate());
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return html `${ifImplemented(super.render())}
|
|
27
|
+
<wizard-dialog .wizard=${this.workflow[0]?.() ?? []}></wizard-dialog>`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
__decorate([
|
|
31
|
+
state()
|
|
32
|
+
], WizardingElement.prototype, "workflow", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
query('wizard-dialog')
|
|
35
|
+
], WizardingElement.prototype, "wizardUI", void 0);
|
|
36
|
+
return WizardingElement;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=Wizarding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wizarding.js","sourceRoot":"","sources":["../../../src/Wizarding.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAkB,KAAK,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,aAAa,GAKd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,oBAAoB,CAAC;AAO5B,MAAM,UAAU,SAAS,CAAsC,IAAW;IACxE,MAAM,gBAAiB,SAAQ,IAAI;QAOzB,QAAQ,CAAC,EAAe;YAC9B,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;YAChC,IAAI,MAAM,KAAK,IAAI;gBAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;iBACtC,IAAI,EAAE,CAAC,MAAM,CAAC,SAAS;gBAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;;gBACvD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAChC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC/B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAC5B,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CACrC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAC7C,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,CAC9B,CACF,CACF,CAAC;QACJ,CAAC;QAED,YAAY,GAAG,IAAW;YACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAtBjB,8CAA8C;YAE9C,aAAQ,GAAoB,EAAE,CAAC;YAsB7B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC/C,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,GAAG,EAAE,CAC1C,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAC9B,CAAC;QACJ,CAAC;QAED,MAAM;YACJ,OAAO,IAAI,CAAA,GAAG,aAAa,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;iCAChB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,mBAAmB,CAAC;QAC3E,CAAC;KACF;IAhCC;QADC,KAAK,EAAE;sDACuB;IAEP;QAAvB,KAAK,CAAC,eAAe,CAAC;sDAAyB;IAgClD,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { html, state, TemplateResult, query } from 'lit-element';\nimport {\n ifImplemented,\n LitElementConstructor,\n Mixin,\n WizardEvent,\n WizardFactory,\n} from './foundation.js';\n\nimport './wizard-dialog.js';\nimport { WizardDialog } from './wizard-dialog.js';\n\n/** `LitElement` mixin that adds a `workflow` property which [[`Wizard`]]s are\n * queued onto on incoming [[`WizardEvent`]]s, first come first displayed. */\nexport type WizardingElement = Mixin<typeof Wizarding>;\n\nexport function Wizarding<TBase extends LitElementConstructor>(Base: TBase) {\n class WizardingElement extends Base {\n /** FIFO queue of [[`Wizard`]]s to display. */\n @state()\n workflow: WizardFactory[] = [];\n\n @query('wizard-dialog') wizardUI!: WizardDialog;\n\n private onWizard(we: WizardEvent) {\n const wizard = we.detail.wizard;\n if (wizard === null) this.workflow.shift();\n else if (we.detail.subwizard) this.workflow.unshift(wizard);\n else this.workflow.push(wizard);\n this.requestUpdate('workflow');\n this.updateComplete.then(() =>\n this.wizardUI.updateComplete.then(() =>\n this.wizardUI.dialog?.updateComplete.then(() =>\n this.wizardUI.dialog?.focus()\n )\n )\n );\n }\n\n constructor(...args: any[]) {\n super(...args);\n\n this.addEventListener('wizard', this.onWizard);\n this.addEventListener('editor-action', () =>\n this.wizardUI.requestUpdate()\n );\n }\n\n render(): TemplateResult {\n return html`${ifImplemented(super.render())}\n <wizard-dialog .wizard=${this.workflow[0]?.() ?? []}></wizard-dialog>`;\n }\n }\n\n return WizardingElement;\n}\n"]}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, customElement, html, LitElement, property, } from 'lit-element';
|
|
3
|
+
import { nothing } from 'lit-html';
|
|
4
|
+
import '@material/mwc-icon';
|
|
5
|
+
/**
|
|
6
|
+
* A responsive container rendering actions in a header.
|
|
7
|
+
*
|
|
8
|
+
* The "action" slot may contain up to eight icon buttons.
|
|
9
|
+
* The "icon" slot, if filled overrides the icon property.
|
|
10
|
+
* The default slot will be rendered into the pane body in a single column.
|
|
11
|
+
*/
|
|
12
|
+
let ActionIcon = class ActionIcon extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
/** color header with secondary theme color while focus is within */
|
|
16
|
+
this.secondary = false;
|
|
17
|
+
/** highlight pane with dotted outline */
|
|
18
|
+
this.highlighted = false;
|
|
19
|
+
/** disables CSS adoption to action buttons */
|
|
20
|
+
this.hideActions = false;
|
|
21
|
+
}
|
|
22
|
+
async firstUpdated() {
|
|
23
|
+
this.tabIndex = 0;
|
|
24
|
+
}
|
|
25
|
+
renderIcon() {
|
|
26
|
+
return html `<span>
|
|
27
|
+
<slot name="icon"
|
|
28
|
+
>${this.icon ? html `<mwc-icon>${this.icon}</mwc-icon>` : nothing}</slot
|
|
29
|
+
></span
|
|
30
|
+
> `;
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return html `<header>${this.label ?? nothing}</header>
|
|
34
|
+
<section>${this.renderIcon()}<slot name="action"></slot></section>
|
|
35
|
+
<footer>${this.label ?? nothing}</footer>`;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
ActionIcon.styles = css `
|
|
39
|
+
:host {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
outline: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
section {
|
|
46
|
+
align-self: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
::slotted([slot='icon']),
|
|
50
|
+
mwc-icon {
|
|
51
|
+
display: block;
|
|
52
|
+
color: var(--mdc-theme-on-surface);
|
|
53
|
+
transition: transform 150ms linear, box-shadow 200ms linear;
|
|
54
|
+
outline-color: var(--mdc-theme-primary);
|
|
55
|
+
outline-style: solid;
|
|
56
|
+
margin: 0px;
|
|
57
|
+
outline-width: 0px;
|
|
58
|
+
width: 64px;
|
|
59
|
+
height: 64px;
|
|
60
|
+
--mdc-icon-size: 64px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([secondary]) ::slotted([slot='icon']),
|
|
64
|
+
:host([secondary]) mwc-icon {
|
|
65
|
+
outline-color: var(--mdc-theme-secondary);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([highlighted]) ::slotted([slot='icon']),
|
|
69
|
+
:host([highlighted]) mwc-icon {
|
|
70
|
+
outline-style: dotted;
|
|
71
|
+
outline-width: 2px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host(:focus-within) ::slotted([slot='icon']),
|
|
75
|
+
:host(:focus-within) mwc-icon {
|
|
76
|
+
outline-style: solid;
|
|
77
|
+
outline-width: 4px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host(:focus-within:not([hideActions])) ::slotted([slot='icon']),
|
|
81
|
+
:host(:focus-within:not([hideActions])) mwc-icon {
|
|
82
|
+
transform: scale(0.8);
|
|
83
|
+
transition: all 250ms linear;
|
|
84
|
+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
85
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
::slotted([slot='icon']:hover),
|
|
89
|
+
mwc-icon:hover {
|
|
90
|
+
outline-style: dashed;
|
|
91
|
+
outline-width: 2px;
|
|
92
|
+
transition: transform 200ms linear, box-shadow 250ms linear;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
::slotted([slot='action']) {
|
|
96
|
+
color: var(--mdc-theme-on-surface);
|
|
97
|
+
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
98
|
+
opacity 200ms linear;
|
|
99
|
+
position: absolute;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
z-index: 1;
|
|
102
|
+
opacity: 0;
|
|
103
|
+
margin-top: -56px;
|
|
104
|
+
margin-left: 8px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:host(:focus-within) ::slotted([slot='action']) {
|
|
108
|
+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
109
|
+
opacity 250ms linear;
|
|
110
|
+
pointer-events: auto;
|
|
111
|
+
opacity: 1;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(1)) {
|
|
115
|
+
transform: translate(0px, -52px);
|
|
116
|
+
}
|
|
117
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(2)) {
|
|
118
|
+
transform: translate(0px, 52px);
|
|
119
|
+
}
|
|
120
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(3)) {
|
|
121
|
+
transform: translate(52px, 0px);
|
|
122
|
+
}
|
|
123
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(4)) {
|
|
124
|
+
transform: translate(-52px, 0px);
|
|
125
|
+
}
|
|
126
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(5)) {
|
|
127
|
+
transform: translate(52px, -52px);
|
|
128
|
+
}
|
|
129
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(6)) {
|
|
130
|
+
transform: translate(-52px, 52px);
|
|
131
|
+
}
|
|
132
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(7)) {
|
|
133
|
+
transform: translate(-52px, -52px);
|
|
134
|
+
}
|
|
135
|
+
:host(:focus-within) ::slotted([slot='action']:nth-of-type(8)) {
|
|
136
|
+
transform: translate(52px, 52px);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
footer {
|
|
140
|
+
color: var(--mdc-theme-on-surface);
|
|
141
|
+
font-family: 'Roboto', sans-serif;
|
|
142
|
+
font-weight: 300;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
text-overflow: ellipsis;
|
|
146
|
+
margin: 0px;
|
|
147
|
+
text-align: center;
|
|
148
|
+
align-self: center;
|
|
149
|
+
max-width: 100%;
|
|
150
|
+
direction: rtl;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
header {
|
|
154
|
+
color: var(--mdc-theme-on-primary);
|
|
155
|
+
background-color: var(--mdc-theme-primary);
|
|
156
|
+
font-family: 'Roboto', sans-serif;
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
font-size: 1.2em;
|
|
159
|
+
position: absolute;
|
|
160
|
+
text-align: center;
|
|
161
|
+
align-self: center;
|
|
162
|
+
max-width: 100vw;
|
|
163
|
+
padding: 4px 8px;
|
|
164
|
+
border-radius: 4px;
|
|
165
|
+
opacity: 0;
|
|
166
|
+
transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
167
|
+
opacity 200ms linear;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([secondary]) header {
|
|
171
|
+
background-color: var(--mdc-theme-secondary);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host(:hover) header {
|
|
175
|
+
position: absolute;
|
|
176
|
+
opacity: 1;
|
|
177
|
+
transform: translate(0, -40px);
|
|
178
|
+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
179
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
|
|
180
|
+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
181
|
+
opacity 250ms linear;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:host(:focus-within) header {
|
|
185
|
+
position: absolute;
|
|
186
|
+
opacity: 1;
|
|
187
|
+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
188
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
|
|
189
|
+
transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
190
|
+
opacity 250ms linear;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:host(:focus-within:not([hideActions])) header {
|
|
194
|
+
transform: translate(0, -80px);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:host(:focus-within[hideActions]) header {
|
|
198
|
+
transform: translate(0, -40px);
|
|
199
|
+
}
|
|
200
|
+
`;
|
|
201
|
+
__decorate([
|
|
202
|
+
property({ type: String })
|
|
203
|
+
], ActionIcon.prototype, "label", void 0);
|
|
204
|
+
__decorate([
|
|
205
|
+
property({ type: String })
|
|
206
|
+
], ActionIcon.prototype, "icon", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
property({ type: Boolean })
|
|
209
|
+
], ActionIcon.prototype, "secondary", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
property({ type: Boolean })
|
|
212
|
+
], ActionIcon.prototype, "highlighted", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: Boolean })
|
|
215
|
+
], ActionIcon.prototype, "hideActions", void 0);
|
|
216
|
+
ActionIcon = __decorate([
|
|
217
|
+
customElement('action-icon')
|
|
218
|
+
], ActionIcon);
|
|
219
|
+
export { ActionIcon };
|
|
220
|
+
//# sourceMappingURL=action-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-icon.js","sourceRoot":"","sources":["../../../src/action-icon.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,aAAa,EACb,IAAI,EACJ,UAAU,EACV,QAAQ,GAET,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,oBAAoB,CAAC;AAE5B;;;;;;GAMG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAOL,oEAAoE;QAEpE,cAAS,GAAG,KAAK,CAAC;QAClB,yCAAyC;QAEzC,gBAAW,GAAG,KAAK,CAAC;QACpB,8CAA8C;QAE9C,gBAAW,GAAG,KAAK,CAAC;IAuLtB,CAAC;IArLC,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpB,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAA;;WAEJ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,aAAa,IAAI,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,OAAO;;OAEjE,CAAC;IACN,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA,WAAW,IAAI,CAAC,KAAK,IAAI,OAAO;iBAC9B,IAAI,CAAC,UAAU,EAAE;gBAClB,IAAI,CAAC,KAAK,IAAI,OAAO,WAAW,CAAC;IAC/C,CAAC;;AAEM,iBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkKlB,CAAC;AAlMF;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACb;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACV;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;+CACR;AAfT,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAsMtB;SAtMY,UAAU","sourcesContent":["import {\n css,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n} from 'lit-element';\nimport { nothing } from 'lit-html';\n\nimport '@material/mwc-icon';\n\n/**\n * A responsive container rendering actions in a header.\n *\n * The \"action\" slot may contain up to eight icon buttons.\n * The \"icon\" slot, if filled overrides the icon property.\n * The default slot will be rendered into the pane body in a single column.\n */\n@customElement('action-icon')\nexport class ActionIcon extends LitElement {\n /** caption text, displayed in the header */\n @property({ type: String })\n label?: string;\n /** icon name, displayed unless the \"icon\" slot is filled */\n @property({ type: String })\n icon?: string;\n /** color header with secondary theme color while focus is within */\n @property({ type: Boolean })\n secondary = false;\n /** highlight pane with dotted outline */\n @property({ type: Boolean })\n highlighted = false;\n /** disables CSS adoption to action buttons */\n @property({ type: Boolean })\n hideActions = false;\n\n async firstUpdated(): Promise<void> {\n this.tabIndex = 0;\n }\n\n private renderIcon(): TemplateResult {\n return html`<span>\n <slot name=\"icon\"\n >${this.icon ? html`<mwc-icon>${this.icon}</mwc-icon>` : nothing}</slot\n ></span\n > `;\n }\n\n render(): TemplateResult {\n return html`<header>${this.label ?? nothing}</header>\n <section>${this.renderIcon()}<slot name=\"action\"></slot></section>\n <footer>${this.label ?? nothing}</footer>`;\n }\n\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n outline: none;\n }\n\n section {\n align-self: center;\n }\n\n ::slotted([slot='icon']),\n mwc-icon {\n display: block;\n color: var(--mdc-theme-on-surface);\n transition: transform 150ms linear, box-shadow 200ms linear;\n outline-color: var(--mdc-theme-primary);\n outline-style: solid;\n margin: 0px;\n outline-width: 0px;\n width: 64px;\n height: 64px;\n --mdc-icon-size: 64px;\n }\n\n :host([secondary]) ::slotted([slot='icon']),\n :host([secondary]) mwc-icon {\n outline-color: var(--mdc-theme-secondary);\n }\n\n :host([highlighted]) ::slotted([slot='icon']),\n :host([highlighted]) mwc-icon {\n outline-style: dotted;\n outline-width: 2px;\n }\n\n :host(:focus-within) ::slotted([slot='icon']),\n :host(:focus-within) mwc-icon {\n outline-style: solid;\n outline-width: 4px;\n }\n\n :host(:focus-within:not([hideActions])) ::slotted([slot='icon']),\n :host(:focus-within:not([hideActions])) mwc-icon {\n transform: scale(0.8);\n transition: all 250ms linear;\n box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);\n }\n\n ::slotted([slot='icon']:hover),\n mwc-icon:hover {\n outline-style: dashed;\n outline-width: 2px;\n transition: transform 200ms linear, box-shadow 250ms linear;\n }\n\n ::slotted([slot='action']) {\n color: var(--mdc-theme-on-surface);\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),\n opacity 200ms linear;\n position: absolute;\n pointer-events: none;\n z-index: 1;\n opacity: 0;\n margin-top: -56px;\n margin-left: 8px;\n }\n\n :host(:focus-within) ::slotted([slot='action']) {\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),\n opacity 250ms linear;\n pointer-events: auto;\n opacity: 1;\n }\n\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(1)) {\n transform: translate(0px, -52px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(2)) {\n transform: translate(0px, 52px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(3)) {\n transform: translate(52px, 0px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(4)) {\n transform: translate(-52px, 0px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(5)) {\n transform: translate(52px, -52px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(6)) {\n transform: translate(-52px, 52px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(7)) {\n transform: translate(-52px, -52px);\n }\n :host(:focus-within) ::slotted([slot='action']:nth-of-type(8)) {\n transform: translate(52px, 52px);\n }\n\n footer {\n color: var(--mdc-theme-on-surface);\n font-family: 'Roboto', sans-serif;\n font-weight: 300;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0px;\n text-align: center;\n align-self: center;\n max-width: 100%;\n direction: rtl;\n }\n\n header {\n color: var(--mdc-theme-on-primary);\n background-color: var(--mdc-theme-primary);\n font-family: 'Roboto', sans-serif;\n font-weight: 500;\n font-size: 1.2em;\n position: absolute;\n text-align: center;\n align-self: center;\n max-width: 100vw;\n padding: 4px 8px;\n border-radius: 4px;\n opacity: 0;\n transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),\n opacity 200ms linear;\n }\n\n :host([secondary]) header {\n background-color: var(--mdc-theme-secondary);\n }\n\n :host(:hover) header {\n position: absolute;\n opacity: 1;\n transform: translate(0, -40px);\n box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),\n opacity 250ms linear;\n }\n\n :host(:focus-within) header {\n position: absolute;\n opacity: 1;\n box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);\n transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1),\n opacity 250ms linear;\n }\n\n :host(:focus-within:not([hideActions])) header {\n transform: translate(0, -80px);\n }\n\n :host(:focus-within[hideActions]) header {\n transform: translate(0, -40px);\n }\n `;\n}\n"]}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, customElement, html, LitElement, property, } from 'lit-element';
|
|
3
|
+
import { classMap } from 'lit-html/directives/class-map';
|
|
4
|
+
import '@material/mwc-icon';
|
|
5
|
+
import { nothing } from 'lit-html';
|
|
6
|
+
function closestTo(node, selector) {
|
|
7
|
+
const closest = node.nodeType === Node.ELEMENT_NODE
|
|
8
|
+
? node.closest(selector)
|
|
9
|
+
: null;
|
|
10
|
+
if (closest)
|
|
11
|
+
return closest;
|
|
12
|
+
const root = node.getRootNode();
|
|
13
|
+
if (root instanceof ShadowRoot)
|
|
14
|
+
return closestTo(root.host, selector);
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A responsive container rendering actions in a header.
|
|
19
|
+
*
|
|
20
|
+
* The "action" slot may contain up to eight icon buttons.
|
|
21
|
+
* The "icon" slot, if filled overrides the icon property.
|
|
22
|
+
* The default slot will be rendered into the pane body in a single column.
|
|
23
|
+
*/
|
|
24
|
+
let ActionPane = class ActionPane extends LitElement {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
/** color header with secondary theme color while focus is within */
|
|
28
|
+
this.secondary = false;
|
|
29
|
+
/** highlight pane with dotted outline */
|
|
30
|
+
this.highlighted = false;
|
|
31
|
+
/** nesting level, default (closest pane ancestor's level) + 1 */
|
|
32
|
+
this.level = 1;
|
|
33
|
+
}
|
|
34
|
+
async firstUpdated() {
|
|
35
|
+
this.tabIndex = 0;
|
|
36
|
+
const parentPane = closestTo(this.parentNode, 'action-pane');
|
|
37
|
+
if (parentPane)
|
|
38
|
+
this.level = parentPane.level + 1;
|
|
39
|
+
this.level = Math.floor(this.level);
|
|
40
|
+
}
|
|
41
|
+
renderHeader() {
|
|
42
|
+
const content = html `<span
|
|
43
|
+
><slot name="icon"
|
|
44
|
+
>${this.icon
|
|
45
|
+
? html `<mwc-icon>${this.icon}</mwc-icon>`
|
|
46
|
+
: nothing}</slot
|
|
47
|
+
></span
|
|
48
|
+
>
|
|
49
|
+
${this.label ?? nothing}
|
|
50
|
+
<nav><slot name="action"></slot></nav>`;
|
|
51
|
+
const headingLevel = Math.floor(Math.max(this.level, 1));
|
|
52
|
+
// Sometimes a TemplateResult is passed in as Label, not a string. So only when it's a string show a title.
|
|
53
|
+
const title = typeof this.label === 'string' ? this.label : '';
|
|
54
|
+
switch (headingLevel) {
|
|
55
|
+
case 1:
|
|
56
|
+
return html `<h1 title="${title}">${content}</h1>`;
|
|
57
|
+
case 2:
|
|
58
|
+
return html `<h2 title="${title}">${content}</h2>`;
|
|
59
|
+
case 3:
|
|
60
|
+
return html `<h3 title="${title}">${content}</h3>`;
|
|
61
|
+
default:
|
|
62
|
+
return html `<h4 title="${title}">${content}</h4>`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
render() {
|
|
66
|
+
return html `<section
|
|
67
|
+
class="${classMap({
|
|
68
|
+
secondary: this.secondary,
|
|
69
|
+
highlighted: this.highlighted,
|
|
70
|
+
contrasted: this.level % 2 === 0,
|
|
71
|
+
})}"
|
|
72
|
+
>
|
|
73
|
+
${this.renderHeader()}
|
|
74
|
+
<div><slot></slot></div>
|
|
75
|
+
</section>`;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
ActionPane.styles = css `
|
|
79
|
+
:host {
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host(:focus-within) section {
|
|
84
|
+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
85
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.2);
|
|
86
|
+
outline-width: 4px;
|
|
87
|
+
transition: all 250ms linear;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
section {
|
|
91
|
+
background-color: var(--mdc-theme-surface);
|
|
92
|
+
transition: all 200ms linear;
|
|
93
|
+
outline-style: solid;
|
|
94
|
+
margin: 0px;
|
|
95
|
+
outline-width: 0px;
|
|
96
|
+
outline-color: var(--mdc-theme-primary);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
section.secondary {
|
|
100
|
+
outline-color: var(--mdc-theme-secondary);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
section > div {
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
gap: 12px;
|
|
107
|
+
padding: 8px 12px 16px;
|
|
108
|
+
clear: right;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.highlighted {
|
|
112
|
+
outline-style: dotted;
|
|
113
|
+
outline-width: 2px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host(:focus-within) .highlighted {
|
|
117
|
+
outline-style: solid;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.contrasted {
|
|
121
|
+
background-color: var(--mdc-theme-on-primary);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
h1,
|
|
125
|
+
h2,
|
|
126
|
+
h3,
|
|
127
|
+
h4 {
|
|
128
|
+
color: var(--mdc-theme-on-surface);
|
|
129
|
+
font-family: 'Roboto', sans-serif;
|
|
130
|
+
font-weight: 300;
|
|
131
|
+
overflow: clip visible;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
text-overflow: ellipsis;
|
|
134
|
+
margin: 0px;
|
|
135
|
+
line-height: 52px;
|
|
136
|
+
padding-left: 0.3em;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
nav {
|
|
140
|
+
float: right;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
mwc-icon {
|
|
144
|
+
vertical-align: middle;
|
|
145
|
+
position: relative;
|
|
146
|
+
top: -0.1em;
|
|
147
|
+
--mdc-icon-size: 1em;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
::slotted([slot='icon']) {
|
|
151
|
+
vertical-align: middle;
|
|
152
|
+
position: relative;
|
|
153
|
+
top: -0.1em;
|
|
154
|
+
--mdc-icon-size: 1em;
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
__decorate([
|
|
158
|
+
property({ type: String })
|
|
159
|
+
], ActionPane.prototype, "label", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
property({ type: String })
|
|
162
|
+
], ActionPane.prototype, "icon", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
property({ type: Boolean })
|
|
165
|
+
], ActionPane.prototype, "secondary", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
property({ type: Boolean })
|
|
168
|
+
], ActionPane.prototype, "highlighted", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
property({ type: Number })
|
|
171
|
+
], ActionPane.prototype, "level", void 0);
|
|
172
|
+
ActionPane = __decorate([
|
|
173
|
+
customElement('action-pane')
|
|
174
|
+
], ActionPane);
|
|
175
|
+
export { ActionPane };
|
|
176
|
+
//# sourceMappingURL=action-pane.js.map
|