@compas-oscd/open-scd 0.34.12 → 0.34.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/package.json +1 -1
  2. package/dist/src/WizardDivider.d.ts +0 -8
  3. package/dist/src/WizardDivider.js +0 -37
  4. package/dist/src/WizardDivider.js.map +0 -1
  5. package/dist/src/Wizarding.d.ts +0 -10
  6. package/dist/src/Wizarding.js +0 -38
  7. package/dist/src/Wizarding.js.map +0 -1
  8. package/dist/src/action-icon.d.ts +0 -25
  9. package/dist/src/action-icon.js +0 -220
  10. package/dist/src/action-icon.js.map +0 -1
  11. package/dist/src/action-pane.d.ts +0 -25
  12. package/dist/src/action-pane.js +0 -176
  13. package/dist/src/action-pane.js.map +0 -1
  14. package/dist/src/addons/Editor.d.ts +0 -25
  15. package/dist/src/addons/Editor.js +0 -106
  16. package/dist/src/addons/Editor.js.map +0 -1
  17. package/dist/src/addons/History.d.ts +0 -93
  18. package/dist/src/addons/History.js +0 -491
  19. package/dist/src/addons/History.js.map +0 -1
  20. package/dist/src/addons/Layout.d.ts +0 -96
  21. package/dist/src/addons/Layout.js +0 -619
  22. package/dist/src/addons/Layout.js.map +0 -1
  23. package/dist/src/addons/Settings.d.ts +0 -68
  24. package/dist/src/addons/Settings.js +0 -465
  25. package/dist/src/addons/Settings.js.map +0 -1
  26. package/dist/src/addons/Waiter.d.ts +0 -14
  27. package/dist/src/addons/Waiter.js +0 -45
  28. package/dist/src/addons/Waiter.js.map +0 -1
  29. package/dist/src/addons/Wizards.d.ts +0 -15
  30. package/dist/src/addons/Wizards.js +0 -48
  31. package/dist/src/addons/Wizards.js.map +0 -1
  32. package/dist/src/addons/editor/edit-action-to-v1-converter.d.ts +0 -3
  33. package/dist/src/addons/editor/edit-action-to-v1-converter.js +0 -96
  34. package/dist/src/addons/editor/edit-action-to-v1-converter.js.map +0 -1
  35. package/dist/src/addons/editor/edit-v1-to-v2-converter.d.ts +0 -2
  36. package/dist/src/addons/editor/edit-v1-to-v2-converter.js +0 -37
  37. package/dist/src/addons/editor/edit-v1-to-v2-converter.js.map +0 -1
  38. package/dist/src/addons/history/get-log-text.d.ts +0 -5
  39. package/dist/src/addons/history/get-log-text.js +0 -26
  40. package/dist/src/addons/history/get-log-text.js.map +0 -1
  41. package/dist/src/addons/menu-tabs/menu-tabs.d.ts +0 -22
  42. package/dist/src/addons/menu-tabs/menu-tabs.js +0 -74
  43. package/dist/src/addons/menu-tabs/menu-tabs.js.map +0 -1
  44. package/dist/src/addons/plugin-manager/custom-plugin-dialog.d.ts +0 -28
  45. package/dist/src/addons/plugin-manager/custom-plugin-dialog.js +0 -177
  46. package/dist/src/addons/plugin-manager/custom-plugin-dialog.js.map +0 -1
  47. package/dist/src/addons/plugin-manager/plugin-manager.d.ts +0 -20
  48. package/dist/src/addons/plugin-manager/plugin-manager.js +0 -165
  49. package/dist/src/addons/plugin-manager/plugin-manager.js.map +0 -1
  50. package/dist/src/filtered-list.d.ts +0 -27
  51. package/dist/src/filtered-list.js +0 -168
  52. package/dist/src/filtered-list.js.map +0 -1
  53. package/dist/src/finder-list.d.ts +0 -37
  54. package/dist/src/finder-list.js +0 -207
  55. package/dist/src/finder-list.js.map +0 -1
  56. package/dist/src/foundation/compare.d.ts +0 -79
  57. package/dist/src/foundation/compare.js +0 -273
  58. package/dist/src/foundation/compare.js.map +0 -1
  59. package/dist/src/foundation/dai.d.ts +0 -30
  60. package/dist/src/foundation/dai.js +0 -127
  61. package/dist/src/foundation/dai.js.map +0 -1
  62. package/dist/src/foundation/generators.d.ts +0 -13
  63. package/dist/src/foundation/generators.js +0 -67
  64. package/dist/src/foundation/generators.js.map +0 -1
  65. package/dist/src/foundation/ied.d.ts +0 -22
  66. package/dist/src/foundation/ied.js +0 -84
  67. package/dist/src/foundation/ied.js.map +0 -1
  68. package/dist/src/foundation/nsd.d.ts +0 -4
  69. package/dist/src/foundation/nsd.js +0 -13
  70. package/dist/src/foundation/nsd.js.map +0 -1
  71. package/dist/src/foundation/nsdoc.d.ts +0 -14
  72. package/dist/src/foundation/nsdoc.js +0 -180
  73. package/dist/src/foundation/nsdoc.js.map +0 -1
  74. package/dist/src/foundation/scl.d.ts +0 -1
  75. package/dist/src/foundation/scl.js +0 -64
  76. package/dist/src/foundation/scl.js.map +0 -1
  77. package/dist/src/foundation.d.ts +0 -230
  78. package/dist/src/foundation.js +0 -1922
  79. package/dist/src/foundation.js.map +0 -1
  80. package/dist/src/icons/compare.d.ts +0 -3
  81. package/dist/src/icons/compare.js +0 -11
  82. package/dist/src/icons/compare.js.map +0 -1
  83. package/dist/src/icons/icons.d.ts +0 -41
  84. package/dist/src/icons/icons.js +0 -611
  85. package/dist/src/icons/icons.js.map +0 -1
  86. package/dist/src/icons/ied-icons.d.ts +0 -3
  87. package/dist/src/icons/ied-icons.js +0 -11
  88. package/dist/src/icons/ied-icons.js.map +0 -1
  89. package/dist/src/icons/lnode.d.ts +0 -16
  90. package/dist/src/icons/lnode.js +0 -50
  91. package/dist/src/icons/lnode.js.map +0 -1
  92. package/dist/src/open-scd.d.ts +0 -131
  93. package/dist/src/open-scd.js +0 -483
  94. package/dist/src/open-scd.js.map +0 -1
  95. package/dist/src/oscd-filter-button.d.ts +0 -27
  96. package/dist/src/oscd-filter-button.js +0 -89
  97. package/dist/src/oscd-filter-button.js.map +0 -1
  98. package/dist/src/plain-compare-list.d.ts +0 -36
  99. package/dist/src/plain-compare-list.js +0 -132
  100. package/dist/src/plain-compare-list.js.map +0 -1
  101. package/dist/src/plugin-tag.d.ts +0 -6
  102. package/dist/src/plugin-tag.js +0 -23
  103. package/dist/src/plugin-tag.js.map +0 -1
  104. package/dist/src/plugin.d.ts +0 -23
  105. package/dist/src/plugin.events.d.ts +0 -15
  106. package/dist/src/plugin.events.js +0 -12
  107. package/dist/src/plugin.events.js.map +0 -1
  108. package/dist/src/plugin.js +0 -2
  109. package/dist/src/plugin.js.map +0 -1
  110. package/dist/src/plugins.d.ts +0 -3
  111. package/dist/src/plugins.js +0 -256
  112. package/dist/src/plugins.js.map +0 -1
  113. package/dist/src/schemas.d.ts +0 -58
  114. package/dist/src/schemas.js +0 -9325
  115. package/dist/src/schemas.js.map +0 -1
  116. package/dist/src/themes.d.ts +0 -3
  117. package/dist/src/themes.js +0 -122
  118. package/dist/src/themes.js.map +0 -1
  119. package/dist/src/translations/de.d.ts +0 -2
  120. package/dist/src/translations/de.js +0 -954
  121. package/dist/src/translations/de.js.map +0 -1
  122. package/dist/src/translations/en.d.ts +0 -963
  123. package/dist/src/translations/en.js +0 -950
  124. package/dist/src/translations/en.js.map +0 -1
  125. package/dist/src/translations/loader.d.ts +0 -12
  126. package/dist/src/translations/loader.js +0 -10
  127. package/dist/src/translations/loader.js.map +0 -1
  128. package/dist/src/wizard-checkbox.d.ts +0 -37
  129. package/dist/src/wizard-checkbox.js +0 -152
  130. package/dist/src/wizard-checkbox.js.map +0 -1
  131. package/dist/src/wizard-dialog.d.ts +0 -45
  132. package/dist/src/wizard-dialog.js +0 -374
  133. package/dist/src/wizard-dialog.js.map +0 -1
  134. package/dist/src/wizard-select.d.ts +0 -31
  135. package/dist/src/wizard-select.js +0 -115
  136. package/dist/src/wizard-select.js.map +0 -1
  137. package/dist/src/wizard-textfield.d.ts +0 -50
  138. package/dist/src/wizard-textfield.js +0 -191
  139. package/dist/src/wizard-textfield.js.map +0 -1
  140. package/dist/src/wizards.d.ts +0 -23
  141. package/dist/src/wizards.js +0 -196
  142. package/dist/src/wizards.js.map +0 -1
  143. package/dist/test/foundation.d.ts +0 -34
  144. package/dist/test/foundation.js +0 -55
  145. package/dist/test/foundation.js.map +0 -1
  146. package/dist/test/mock-editor-logger.d.ts +0 -16
  147. package/dist/test/mock-editor-logger.js +0 -53
  148. package/dist/test/mock-editor-logger.js.map +0 -1
  149. package/dist/test/mock-edits.d.ts +0 -7
  150. package/dist/test/mock-edits.js +0 -12
  151. package/dist/test/mock-edits.js.map +0 -1
  152. package/dist/test/mock-open-scd.d.ts +0 -22
  153. package/dist/test/mock-open-scd.js +0 -53
  154. package/dist/test/mock-open-scd.js.map +0 -1
  155. package/dist/test/mock-plugins.d.ts +0 -33
  156. package/dist/test/mock-plugins.js +0 -239
  157. package/dist/test/mock-plugins.js.map +0 -1
  158. package/dist/test/mock-wizard-editor.d.ts +0 -15
  159. package/dist/test/mock-wizard-editor.js +0 -50
  160. package/dist/test/mock-wizard-editor.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compas-oscd/open-scd",
3
- "version": "0.34.12",
3
+ "version": "0.34.14",
4
4
  "repository": "https://github.com/openscd/open-scd.git",
5
5
  "directory": "packages/openscd",
6
6
  "description": "A bottom-up substation configuration designer for projects described using SCL `IEC 61850-6` Edition 2 or greater.",
@@ -1,8 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit-element';
2
- export declare class WizardDividerElement extends LitElement {
3
- header?: string;
4
- render(): TemplateResult;
5
- private renderHeader;
6
- private renderSeparator;
7
- static styles: import("lit-element").CSSResult;
8
- }
@@ -1,37 +0,0 @@
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
@@ -1 +0,0 @@
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"]}
@@ -1,10 +0,0 @@
1
- import { LitElementConstructor, Mixin, WizardFactory } from './foundation.js';
2
- import './wizard-dialog.js';
3
- import { WizardDialog } from './wizard-dialog.js';
4
- /** `LitElement` mixin that adds a `workflow` property which [[`Wizard`]]s are
5
- * queued onto on incoming [[`WizardEvent`]]s, first come first displayed. */
6
- export type WizardingElement = Mixin<typeof Wizarding>;
7
- export declare function Wizarding<TBase extends LitElementConstructor>(Base: TBase): TBase & (new (...args: any[]) => {
8
- workflow: WizardFactory[];
9
- wizardUI: WizardDialog;
10
- });
@@ -1,38 +0,0 @@
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=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Ae,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,gBAAuB,CAAC;AACjC,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>(\n Base: TBase\n): TBase & (new (...args: any[]) => {\n workflow: WizardFactory[];\n wizardUI: WizardDialog;\n}) {\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 as any;\n}\n"]}
@@ -1,25 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit-element';
2
- import '@material/mwc-icon';
3
- /**
4
- * A responsive container rendering actions in a header.
5
- *
6
- * The "action" slot may contain up to eight icon buttons.
7
- * The "icon" slot, if filled overrides the icon property.
8
- * The default slot will be rendered into the pane body in a single column.
9
- */
10
- export declare class ActionIcon extends LitElement {
11
- /** caption text, displayed in the header */
12
- label?: string;
13
- /** icon name, displayed unless the "icon" slot is filled */
14
- icon?: string;
15
- /** color header with secondary theme color while focus is within */
16
- secondary: boolean;
17
- /** highlight pane with dotted outline */
18
- highlighted: boolean;
19
- /** disables CSS adoption to action buttons */
20
- hideActions: boolean;
21
- firstUpdated(): Promise<void>;
22
- private renderIcon;
23
- render(): TemplateResult;
24
- static styles: import("lit-element").CSSResult;
25
- }
@@ -1,220 +0,0 @@
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
@@ -1 +0,0 @@
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,UAA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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"]}
@@ -1,25 +0,0 @@
1
- import { LitElement, TemplateResult } from 'lit-element';
2
- import '@material/mwc-icon';
3
- /**
4
- * A responsive container rendering actions in a header.
5
- *
6
- * The "action" slot may contain up to eight icon buttons.
7
- * The "icon" slot, if filled overrides the icon property.
8
- * The default slot will be rendered into the pane body in a single column.
9
- */
10
- export declare class ActionPane extends LitElement {
11
- /** caption text, displayed in the header */
12
- label?: string;
13
- /** icon name, displayed unless the "icon" slot is filled */
14
- icon?: string;
15
- /** color header with secondary theme color while focus is within */
16
- secondary: boolean;
17
- /** highlight pane with dotted outline */
18
- highlighted: boolean;
19
- /** nesting level, default (closest pane ancestor's level) + 1 */
20
- level: number;
21
- firstUpdated(): Promise<void>;
22
- private renderHeader;
23
- render(): TemplateResult;
24
- static styles: import("lit-element").CSSResult;
25
- }
@@ -1,176 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-pane.js","sourceRoot":"","sources":["../../src/action-pane.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,GAAG,EACH,aAAa,EACb,IAAI,EACJ,UAAU,EACV,QAAQ,GAET,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,SAAS,SAAS,CAAoB,IAAU,EAAE,QAAgB;IAChE,MAAM,OAAO,GACX,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY;QACjC,CAAC,CAAW,IAAK,CAAC,OAAO,CAAI,QAAQ,CAAC;QACtC,CAAC,CAAC,IAAI,CAAC;IAEX,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAE5B,MAAM,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E;YACpB,KAAK,CAAC;gBACJ,OAAO,IAAI,CAAA,cAAc,KAAK,KAAK,OAAO,OAAO,CAAC;YACpD,KAAK,CAAC;gBACJ,OAAO,IAAI,CAAA,cAAc,KAAK,KAAK,OAAO,OAAO,CAAC;YACpD,KAAK,CAAC;gBACJ,OAAO,IAAI,CAAA,cAAc,KAAK,KAAK,OAAO,OAAO,CAAC;YACpD;gBACE,OAAO,IAAI,CAAA,cAAc,KAAK,KAAK,OAAO,OAAO,CAAC;SACrD;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;eACA,QAAQ,CAAC;YAChB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,UAAU,EAAE,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;SACjC,CAAC;;QAEA,IAAI,CAAC,YAAY,EAAE;;eAEZ,CAAC;IACd,CAAC;;AAEM,iBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8ElB,CAAC;AA5IF;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,MAAM,EAAE,CAAC;yCACjB;AAfC,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAgJtB;SAhJY,UAAU","sourcesContent":["import {\n css,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n} from 'lit-element';\nimport { classMap } from 'lit-html/directives/class-map';\n\nimport '@material/mwc-icon';\nimport { nothing } from 'lit-html';\n\nfunction closestTo<E extends Element>(node: Node, selector: string): E | null {\n const closest =\n node.nodeType === Node.ELEMENT_NODE\n ? (<Element>node).closest<E>(selector)\n : null;\n\n if (closest) return closest;\n\n const root = <Document | DocumentFragment>node.getRootNode();\n\n if (root instanceof ShadowRoot) return closestTo(root.host, selector);\n\n return null;\n}\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-pane')\nexport class ActionPane 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 /** nesting level, default (closest pane ancestor's level) + 1 */\n @property({ type: Number })\n level = 1;\n\n async firstUpdated(): Promise<void> {\n this.tabIndex = 0;\n\n const parentPane = closestTo<ActionPane>(this.parentNode!, 'action-pane');\n if (parentPane) this.level = parentPane.level + 1;\n\n this.level = Math.floor(this.level);\n }\n\n private renderHeader(): TemplateResult {\n const content = html`<span\n ><slot name=\"icon\"\n >${this.icon\n ? html`<mwc-icon>${this.icon}</mwc-icon>`\n : nothing}</slot\n ></span\n >\n ${this.label ?? nothing}\n <nav><slot name=\"action\"></slot></nav>`;\n\n const headingLevel = Math.floor(Math.max(this.level, 1));\n // Sometimes a TemplateResult is passed in as Label, not a string. So only when it's a string show a title.\n const title = typeof this.label === 'string' ? this.label : '';\n switch (headingLevel) {\n case 1:\n return html`<h1 title=\"${title}\">${content}</h1>`;\n case 2:\n return html`<h2 title=\"${title}\">${content}</h2>`;\n case 3:\n return html`<h3 title=\"${title}\">${content}</h3>`;\n default:\n return html`<h4 title=\"${title}\">${content}</h4>`;\n }\n }\n\n render(): TemplateResult {\n return html`<section\n class=\"${classMap({\n secondary: this.secondary,\n highlighted: this.highlighted,\n contrasted: this.level % 2 === 0,\n })}\"\n >\n ${this.renderHeader()}\n <div><slot></slot></div>\n </section>`;\n }\n\n static styles = css`\n :host {\n outline: none;\n }\n\n :host(:focus-within) section {\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 outline-width: 4px;\n transition: all 250ms linear;\n }\n\n section {\n background-color: var(--mdc-theme-surface);\n transition: all 200ms linear;\n outline-style: solid;\n margin: 0px;\n outline-width: 0px;\n outline-color: var(--mdc-theme-primary);\n }\n\n section.secondary {\n outline-color: var(--mdc-theme-secondary);\n }\n\n section > div {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 8px 12px 16px;\n clear: right;\n }\n\n .highlighted {\n outline-style: dotted;\n outline-width: 2px;\n }\n\n :host(:focus-within) .highlighted {\n outline-style: solid;\n }\n\n .contrasted {\n background-color: var(--mdc-theme-on-primary);\n }\n\n h1,\n h2,\n h3,\n h4 {\n color: var(--mdc-theme-on-surface);\n font-family: 'Roboto', sans-serif;\n font-weight: 300;\n overflow: clip visible;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: 0px;\n line-height: 52px;\n padding-left: 0.3em;\n }\n\n nav {\n float: right;\n }\n\n mwc-icon {\n vertical-align: middle;\n position: relative;\n top: -0.1em;\n --mdc-icon-size: 1em;\n }\n\n ::slotted([slot='icon']) {\n vertical-align: middle;\n position: relative;\n top: -0.1em;\n --mdc-icon-size: 1em;\n }\n `;\n}\n"]}
@@ -1,25 +0,0 @@
1
- import { EditEventV2, OpenEvent, XMLEditor } from '@openscd/core';
2
- import { LitElement, TemplateResult } from 'lit-element';
3
- import { EditEvent } from '@openscd/core';
4
- export declare class OscdEditor extends LitElement {
5
- /** The `XMLDocument` to be edited */
6
- doc: XMLDocument | null;
7
- /** The name of the current [[`doc`]] */
8
- docName: string;
9
- /** The UUID of the current [[`doc`]] */
10
- docId: string;
11
- /** XML Editor to apply changes to the scd */
12
- editor: XMLEditor;
13
- host: HTMLElement;
14
- private onAction;
15
- handleEditEvent(event: EditEvent): void;
16
- /**
17
- *
18
- * @deprecated [Move to handleOpenDoc instead]
19
- */
20
- private onOpenDoc;
21
- handleOpenDoc({ detail: { docName, doc } }: OpenEvent): void;
22
- connectedCallback(): void;
23
- render(): TemplateResult;
24
- handleEditEventV2(event: EditEventV2): Promise<void>;
25
- }