@compas-oscd/open-scd 0.34.3 → 0.34.5
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/src/addons/History.d.ts +8 -1
- package/dist/src/addons/History.js +1 -0
- package/dist/src/addons/History.js.map +1 -1
- package/package.json +1 -1
- package/dist/WizardDivider.d.ts +0 -8
- package/dist/WizardDivider.js +0 -37
- package/dist/WizardDivider.js.map +0 -1
- package/dist/Wizarding.d.ts +0 -10
- package/dist/Wizarding.js +0 -38
- package/dist/Wizarding.js.map +0 -1
- package/dist/action-icon.d.ts +0 -25
- package/dist/action-icon.js +0 -220
- package/dist/action-icon.js.map +0 -1
- package/dist/action-pane.d.ts +0 -25
- package/dist/action-pane.js +0 -176
- package/dist/action-pane.js.map +0 -1
- package/dist/addons/Editor.d.ts +0 -25
- package/dist/addons/Editor.js +0 -106
- package/dist/addons/Editor.js.map +0 -1
- package/dist/addons/History.d.ts +0 -86
- package/dist/addons/History.js +0 -490
- package/dist/addons/History.js.map +0 -1
- package/dist/addons/Layout.d.ts +0 -96
- package/dist/addons/Layout.js +0 -619
- package/dist/addons/Layout.js.map +0 -1
- package/dist/addons/Settings.d.ts +0 -68
- package/dist/addons/Settings.js +0 -465
- package/dist/addons/Settings.js.map +0 -1
- package/dist/addons/Waiter.d.ts +0 -14
- package/dist/addons/Waiter.js +0 -45
- package/dist/addons/Waiter.js.map +0 -1
- package/dist/addons/Wizards.d.ts +0 -15
- package/dist/addons/Wizards.js +0 -48
- package/dist/addons/Wizards.js.map +0 -1
- package/dist/addons/editor/edit-action-to-v1-converter.d.ts +0 -3
- package/dist/addons/editor/edit-action-to-v1-converter.js +0 -96
- package/dist/addons/editor/edit-action-to-v1-converter.js.map +0 -1
- package/dist/addons/editor/edit-v1-to-v2-converter.d.ts +0 -2
- package/dist/addons/editor/edit-v1-to-v2-converter.js +0 -37
- package/dist/addons/editor/edit-v1-to-v2-converter.js.map +0 -1
- package/dist/addons/history/get-log-text.d.ts +0 -5
- package/dist/addons/history/get-log-text.js +0 -26
- package/dist/addons/history/get-log-text.js.map +0 -1
- package/dist/addons/menu-tabs/menu-tabs.d.ts +0 -22
- package/dist/addons/menu-tabs/menu-tabs.js +0 -74
- package/dist/addons/menu-tabs/menu-tabs.js.map +0 -1
- package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts +0 -28
- package/dist/addons/plugin-manager/custom-plugin-dialog.js +0 -177
- package/dist/addons/plugin-manager/custom-plugin-dialog.js.map +0 -1
- package/dist/addons/plugin-manager/plugin-manager.d.ts +0 -20
- package/dist/addons/plugin-manager/plugin-manager.js +0 -165
- package/dist/addons/plugin-manager/plugin-manager.js.map +0 -1
- package/dist/filtered-list.d.ts +0 -27
- package/dist/filtered-list.js +0 -168
- package/dist/filtered-list.js.map +0 -1
- package/dist/finder-list.d.ts +0 -37
- package/dist/finder-list.js +0 -207
- package/dist/finder-list.js.map +0 -1
- package/dist/foundation/compare.d.ts +0 -79
- package/dist/foundation/compare.js +0 -273
- package/dist/foundation/compare.js.map +0 -1
- package/dist/foundation/dai.d.ts +0 -30
- package/dist/foundation/dai.js +0 -127
- package/dist/foundation/dai.js.map +0 -1
- package/dist/foundation/generators.d.ts +0 -13
- package/dist/foundation/generators.js +0 -67
- package/dist/foundation/generators.js.map +0 -1
- package/dist/foundation/ied.d.ts +0 -22
- package/dist/foundation/ied.js +0 -84
- package/dist/foundation/ied.js.map +0 -1
- package/dist/foundation/nsd.d.ts +0 -4
- package/dist/foundation/nsd.js +0 -13
- package/dist/foundation/nsd.js.map +0 -1
- package/dist/foundation/nsdoc.d.ts +0 -14
- package/dist/foundation/nsdoc.js +0 -180
- package/dist/foundation/nsdoc.js.map +0 -1
- package/dist/foundation/scl.d.ts +0 -1
- package/dist/foundation/scl.js +0 -64
- package/dist/foundation/scl.js.map +0 -1
- package/dist/foundation.d.ts +0 -230
- package/dist/foundation.js +0 -1922
- package/dist/foundation.js.map +0 -1
- package/dist/icons/compare.d.ts +0 -3
- package/dist/icons/compare.js +0 -11
- package/dist/icons/compare.js.map +0 -1
- package/dist/icons/icons.d.ts +0 -41
- package/dist/icons/icons.js +0 -611
- package/dist/icons/icons.js.map +0 -1
- package/dist/icons/ied-icons.d.ts +0 -3
- package/dist/icons/ied-icons.js +0 -11
- package/dist/icons/ied-icons.js.map +0 -1
- package/dist/icons/lnode.d.ts +0 -16
- package/dist/icons/lnode.js +0 -50
- package/dist/icons/lnode.js.map +0 -1
- package/dist/open-scd.d.ts +0 -131
- package/dist/open-scd.js +0 -483
- package/dist/open-scd.js.map +0 -1
- package/dist/oscd-filter-button.d.ts +0 -27
- package/dist/oscd-filter-button.js +0 -89
- package/dist/oscd-filter-button.js.map +0 -1
- package/dist/plain-compare-list.d.ts +0 -36
- package/dist/plain-compare-list.js +0 -132
- package/dist/plain-compare-list.js.map +0 -1
- package/dist/plugin-tag.d.ts +0 -6
- package/dist/plugin-tag.js +0 -23
- package/dist/plugin-tag.js.map +0 -1
- package/dist/plugin.d.ts +0 -23
- package/dist/plugin.events.d.ts +0 -15
- package/dist/plugin.events.js +0 -12
- package/dist/plugin.events.js.map +0 -1
- package/dist/plugin.js +0 -2
- package/dist/plugin.js.map +0 -1
- package/dist/plugins.d.ts +0 -3
- package/dist/plugins.js +0 -256
- package/dist/plugins.js.map +0 -1
- package/dist/schemas.d.ts +0 -58
- package/dist/schemas.js +0 -9325
- package/dist/schemas.js.map +0 -1
- package/dist/themes.d.ts +0 -3
- package/dist/themes.js +0 -122
- package/dist/themes.js.map +0 -1
- package/dist/translations/de.d.ts +0 -2
- package/dist/translations/de.js +0 -954
- package/dist/translations/de.js.map +0 -1
- package/dist/translations/en.d.ts +0 -963
- package/dist/translations/en.js +0 -950
- package/dist/translations/en.js.map +0 -1
- package/dist/translations/loader.d.ts +0 -12
- package/dist/translations/loader.js +0 -10
- package/dist/translations/loader.js.map +0 -1
- package/dist/wizard-checkbox.d.ts +0 -37
- package/dist/wizard-checkbox.js +0 -152
- package/dist/wizard-checkbox.js.map +0 -1
- package/dist/wizard-dialog.d.ts +0 -45
- package/dist/wizard-dialog.js +0 -374
- package/dist/wizard-dialog.js.map +0 -1
- package/dist/wizard-select.d.ts +0 -31
- package/dist/wizard-select.js +0 -115
- package/dist/wizard-select.js.map +0 -1
- package/dist/wizard-textfield.d.ts +0 -50
- package/dist/wizard-textfield.js +0 -191
- package/dist/wizard-textfield.js.map +0 -1
- package/dist/wizards.d.ts +0 -23
- package/dist/wizards.js +0 -196
- package/dist/wizards.js.map +0 -1
package/dist/action-pane.js
DELETED
|
@@ -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
|
package/dist/action-pane.js.map
DELETED
|
@@ -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,oB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;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"]}
|
package/dist/addons/Editor.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/addons/Editor.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { newEditEvent, newEditEventV2 } from '@openscd/core';
|
|
3
|
-
import { property, LitElement, customElement, html, } from 'lit-element';
|
|
4
|
-
import { get } from 'lit-translate';
|
|
5
|
-
import { newLogEvent } from '@openscd/core/foundation/deprecated/history.js';
|
|
6
|
-
import { newValidateEvent } from '@openscd/core/foundation/deprecated/validation.js';
|
|
7
|
-
import { isComplex, isInsert, isRemove, isUpdate, } from '@openscd/core';
|
|
8
|
-
import { convertEditActiontoV1 } from './editor/edit-action-to-v1-converter.js';
|
|
9
|
-
import { convertEditV1toV2 } from './editor/edit-v1-to-v2-converter.js';
|
|
10
|
-
let OscdEditor = class OscdEditor extends LitElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
/** The `XMLDocument` to be edited */
|
|
14
|
-
this.doc = null;
|
|
15
|
-
/** The name of the current [[`doc`]] */
|
|
16
|
-
this.docName = '';
|
|
17
|
-
/** The UUID of the current [[`doc`]] */
|
|
18
|
-
this.docId = '';
|
|
19
|
-
}
|
|
20
|
-
onAction(event) {
|
|
21
|
-
const edit = convertEditActiontoV1(event.detail.action);
|
|
22
|
-
const editV2 = convertEditV1toV2(edit);
|
|
23
|
-
this.host.dispatchEvent(newEditEventV2(editV2));
|
|
24
|
-
}
|
|
25
|
-
handleEditEvent(event) {
|
|
26
|
-
/**
|
|
27
|
-
* This is a compatibility fix for plugins based on open energy tools edit events
|
|
28
|
-
* because their edit event look slightly different
|
|
29
|
-
* see https://github.com/OpenEnergyTools/open-scd-core/blob/main/foundation/edit-event-v1.ts for details
|
|
30
|
-
*/
|
|
31
|
-
if (isOpenEnergyEditEvent(event)) {
|
|
32
|
-
event = convertOpenEnergyEditEventToEditEvent(event);
|
|
33
|
-
}
|
|
34
|
-
const edit = event.detail.edit;
|
|
35
|
-
const editV2 = convertEditV1toV2(edit);
|
|
36
|
-
this.host.dispatchEvent(newEditEventV2(editV2));
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @deprecated [Move to handleOpenDoc instead]
|
|
41
|
-
*/
|
|
42
|
-
async onOpenDoc(event) {
|
|
43
|
-
this.doc = event.detail.doc;
|
|
44
|
-
this.docName = event.detail.docName;
|
|
45
|
-
this.docId = event.detail.docId ?? '';
|
|
46
|
-
await this.updateComplete;
|
|
47
|
-
this.dispatchEvent(newValidateEvent());
|
|
48
|
-
this.dispatchEvent(newLogEvent({
|
|
49
|
-
kind: 'info',
|
|
50
|
-
title: get('openSCD.loaded', { name: this.docName }),
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
handleOpenDoc({ detail: { docName, doc } }) {
|
|
54
|
-
this.doc = doc;
|
|
55
|
-
this.docName = docName;
|
|
56
|
-
}
|
|
57
|
-
connectedCallback() {
|
|
58
|
-
super.connectedCallback();
|
|
59
|
-
// Deprecated editor action API, use 'oscd-edit' instead.
|
|
60
|
-
this.host.addEventListener('editor-action', this.onAction.bind(this));
|
|
61
|
-
// Deprecated edit event API, use 'oscd-edit-v2' instead.
|
|
62
|
-
this.host.addEventListener('oscd-edit', event => this.handleEditEvent(event));
|
|
63
|
-
this.host.addEventListener('oscd-edit-v2', event => this.handleEditEventV2(event));
|
|
64
|
-
this.host.addEventListener('open-doc', this.onOpenDoc);
|
|
65
|
-
this.host.addEventListener('oscd-open', this.handleOpenDoc);
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
return html `<slot></slot>`;
|
|
69
|
-
}
|
|
70
|
-
async handleEditEventV2(event) {
|
|
71
|
-
const { edit, title, squash } = event.detail;
|
|
72
|
-
this.editor.commit(edit, { title, squash });
|
|
73
|
-
await this.updateComplete;
|
|
74
|
-
this.dispatchEvent(newValidateEvent());
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
__decorate([
|
|
78
|
-
property({ attribute: false })
|
|
79
|
-
], OscdEditor.prototype, "doc", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
property({ type: String })
|
|
82
|
-
], OscdEditor.prototype, "docName", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
property({ type: String })
|
|
85
|
-
], OscdEditor.prototype, "docId", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
property({ type: Object })
|
|
88
|
-
], OscdEditor.prototype, "editor", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
property({
|
|
91
|
-
type: Object,
|
|
92
|
-
})
|
|
93
|
-
], OscdEditor.prototype, "host", void 0);
|
|
94
|
-
OscdEditor = __decorate([
|
|
95
|
-
customElement('oscd-editor')
|
|
96
|
-
], OscdEditor);
|
|
97
|
-
export { OscdEditor };
|
|
98
|
-
function isOpenEnergyEditEvent(event) {
|
|
99
|
-
const eventDetail = event.detail;
|
|
100
|
-
return isComplex(eventDetail) || isInsert(eventDetail) || isUpdate(eventDetail) || isRemove(eventDetail);
|
|
101
|
-
}
|
|
102
|
-
function convertOpenEnergyEditEventToEditEvent(event) {
|
|
103
|
-
const eventDetail = event.detail;
|
|
104
|
-
return newEditEvent(eventDetail);
|
|
105
|
-
}
|
|
106
|
-
//# sourceMappingURL=Editor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../src/addons/Editor.ts"],"names":[],"mappings":";AAAA,OAAO,EAGL,YAAY,EACZ,cAAc,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,aAAa,EAEb,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAOpC,OAAO,EAAE,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AAGrF,OAAO,EAGL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGjE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QACL,qCAAqC;QAErC,QAAG,GAAuB,IAAI,CAAC;QAC/B,wCAAwC;QACZ,YAAO,GAAG,EAAE,CAAC;QACzC,wCAAwC;QACZ,UAAK,GAAG,EAAE,CAAC;IAmFzC,CAAC;IA1ES,QAAQ,CAAC,KA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E,CAAC;2CAAc;AAEb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AAEX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAoB;AAK/C;IAHC,QAAQ,CAAC;QACR,IAAI,EAAE,MAAM;KACb,CAAC;wCACiB;AAdR,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA0FtB;SA1FY,UAAU;AA4FvB,SAAS,qBAAqB,CAAC,KAA2B;IACxD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAc,CAAC;IACzC,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC3G,CAAC;AAED,SAAS,qCAAqC,CAAC,KAA2B;IACxE,MAAM,WAAW,GAAG,KAAK,CAAC,MAAc,CAAC;IACzC,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import {\n EditEventV2,\n OpenEvent,\n newEditEvent,\n newEditEventV2,\n XMLEditor\n} from '@openscd/core';\nimport {\n property,\n LitElement,\n customElement,\n TemplateResult,\n html,\n} from 'lit-element';\nimport { get } from 'lit-translate';\n\nimport {\n EditorAction,\n EditorActionEvent,\n} from '@openscd/core/foundation/deprecated/editor.js';\n\nimport { newLogEvent } from '@openscd/core/foundation/deprecated/history.js';\nimport { newValidateEvent } from '@openscd/core/foundation/deprecated/validation.js';\nimport { OpenDocEvent } from '@openscd/core/foundation/deprecated/open-event.js';\n\nimport {\n Edit,\n EditEvent,\n isComplex,\n isInsert,\n isRemove,\n isUpdate,\n} from '@openscd/core';\n\nimport { convertEditActiontoV1 } from './editor/edit-action-to-v1-converter.js';\nimport { convertEditV1toV2 } from './editor/edit-v1-to-v2-converter.js';\n\n@customElement('oscd-editor')\nexport class OscdEditor extends LitElement {\n /** The `XMLDocument` to be edited */\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 /** XML Editor to apply changes to the scd */\n @property({ type: Object }) editor!: XMLEditor;\n\n @property({\n type: Object,\n })\n host!: HTMLElement;\n\n private onAction(event: EditorActionEvent<EditorAction>) {\n const edit = convertEditActiontoV1(event.detail.action);\n const editV2 = convertEditV1toV2(edit);\n\n this.host.dispatchEvent(newEditEventV2(editV2));\n }\n\n handleEditEvent(event: EditEvent) {\n /**\n * This is a compatibility fix for plugins based on open energy tools edit events\n * because their edit event look slightly different\n * see https://github.com/OpenEnergyTools/open-scd-core/blob/main/foundation/edit-event-v1.ts for details\n */\n if (isOpenEnergyEditEvent(event)) {\n event = convertOpenEnergyEditEventToEditEvent(event);\n }\n\n const edit = event.detail.edit;\n const editV2 = convertEditV1toV2(edit);\n\n this.host.dispatchEvent(newEditEventV2(editV2));\n }\n\n /**\n *\n * @deprecated [Move to handleOpenDoc instead]\n */\n private async onOpenDoc(event: OpenDocEvent) {\n this.doc = event.detail.doc;\n this.docName = event.detail.docName;\n this.docId = event.detail.docId ?? '';\n\n await this.updateComplete;\n\n this.dispatchEvent(newValidateEvent());\n\n this.dispatchEvent(\n newLogEvent({\n kind: 'info',\n title: get('openSCD.loaded', { name: this.docName }),\n })\n );\n }\n\n handleOpenDoc({ detail: { docName, doc } }: OpenEvent) {\n this.doc = doc;\n this.docName = docName;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n\n // Deprecated editor action API, use 'oscd-edit' instead.\n this.host.addEventListener('editor-action', this.onAction.bind(this));\n // Deprecated edit event API, use 'oscd-edit-v2' instead.\n this.host.addEventListener('oscd-edit', event => this.handleEditEvent(event));\n\n this.host.addEventListener('oscd-edit-v2', event => this.handleEditEventV2(event));\n this.host.addEventListener('open-doc', this.onOpenDoc);\n this.host.addEventListener('oscd-open', this.handleOpenDoc);\n }\n\n render(): TemplateResult {\n return html`<slot></slot>`;\n }\n\n async handleEditEventV2(event: EditEventV2) {\n const { edit, title, squash } = event.detail;\n\n this.editor.commit(edit, { title, squash });\n\n await this.updateComplete;\n this.dispatchEvent(newValidateEvent());\n }\n}\n\nfunction isOpenEnergyEditEvent(event: CustomEvent<unknown>): boolean {\n const eventDetail = event.detail as Edit;\n return isComplex(eventDetail) || isInsert(eventDetail) || isUpdate(eventDetail) || isRemove(eventDetail);\n}\n\nfunction convertOpenEnergyEditEventToEditEvent(event: CustomEvent<unknown>): EditEvent {\n const eventDetail = event.detail as Edit;\n return newEditEvent(eventDetail);\n}\n"]}
|
package/dist/addons/History.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { TemplateResult, LitElement } from 'lit-element';
|
|
2
|
-
import '@material/mwc-button';
|
|
3
|
-
import '@material/mwc-dialog';
|
|
4
|
-
import '@material/mwc-icon';
|
|
5
|
-
import '@material/mwc-icon-button';
|
|
6
|
-
import '@material/mwc-icon-button-toggle';
|
|
7
|
-
import '@material/mwc-list';
|
|
8
|
-
import '@material/mwc-list/mwc-list-item';
|
|
9
|
-
import '@material/mwc-snackbar';
|
|
10
|
-
import { Dialog } from '@material/mwc-dialog';
|
|
11
|
-
import { Snackbar } from '@material/mwc-snackbar';
|
|
12
|
-
import '../filtered-list.js';
|
|
13
|
-
import { InfoEntry, IssueDetail, LogEntry } from '@openscd/core/foundation/deprecated/history.js';
|
|
14
|
-
import { XMLEditor } from '@openscd/core';
|
|
15
|
-
interface HistoryItem {
|
|
16
|
-
title: string;
|
|
17
|
-
message?: string;
|
|
18
|
-
time: number;
|
|
19
|
-
isActive: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare enum HistoryUIKind {
|
|
22
|
-
log = "log",
|
|
23
|
-
history = "history",
|
|
24
|
-
diagnostic = "diagnostic"
|
|
25
|
-
}
|
|
26
|
-
export interface HistoryUIDetail {
|
|
27
|
-
show: boolean;
|
|
28
|
-
kind: HistoryUIKind;
|
|
29
|
-
}
|
|
30
|
-
export type HistoryUIEvent = CustomEvent<HistoryUIDetail>;
|
|
31
|
-
export declare function newHistoryUIEvent(show: boolean, kind: HistoryUIKind, eventInitDict?: CustomEventInit<Partial<HistoryUIDetail>>): HistoryUIEvent;
|
|
32
|
-
export interface EmptyIssuesDetail {
|
|
33
|
-
pluginSrc: string;
|
|
34
|
-
}
|
|
35
|
-
export type EmptyIssuesEvent = CustomEvent<EmptyIssuesDetail>;
|
|
36
|
-
export declare function newEmptyIssuesEvent(pluginSrc: string, eventInitDict?: CustomEventInit<Partial<EmptyIssuesDetail>>): EmptyIssuesEvent;
|
|
37
|
-
export declare class OscdHistory extends LitElement {
|
|
38
|
-
/** All [[`LogEntry`]]s received so far through [[`LogEvent`]]s. */
|
|
39
|
-
log: InfoEntry[];
|
|
40
|
-
/** XML Editor to apply changes to the scd */
|
|
41
|
-
editor: XMLEditor;
|
|
42
|
-
diagnoses: Map<string, IssueDetail[]>;
|
|
43
|
-
host: HTMLElement;
|
|
44
|
-
latestIssue: IssueDetail;
|
|
45
|
-
history: HistoryItem[];
|
|
46
|
-
logUI: Dialog;
|
|
47
|
-
historyUI: Dialog;
|
|
48
|
-
diagnosticUI: Dialog;
|
|
49
|
-
errorUI: Snackbar;
|
|
50
|
-
warningUI: Snackbar;
|
|
51
|
-
infoUI: Snackbar;
|
|
52
|
-
issueUI: Snackbar;
|
|
53
|
-
private unsubscribers;
|
|
54
|
-
private onIssue;
|
|
55
|
-
undo(): void;
|
|
56
|
-
redo(): void;
|
|
57
|
-
private onReset;
|
|
58
|
-
private onInfo;
|
|
59
|
-
private onLog;
|
|
60
|
-
private historyUIHandler;
|
|
61
|
-
private emptyIssuesHandler;
|
|
62
|
-
private handleKeyPress;
|
|
63
|
-
private updateHistory;
|
|
64
|
-
constructor();
|
|
65
|
-
connectedCallback(): void;
|
|
66
|
-
disconnectedCallback(): void;
|
|
67
|
-
renderLogEntry(entry: InfoEntry, index: number, log: LogEntry[]): TemplateResult;
|
|
68
|
-
renderHistoryEntry(entry: HistoryItem): TemplateResult;
|
|
69
|
-
private formatTime;
|
|
70
|
-
private renderLog;
|
|
71
|
-
private renderHistory;
|
|
72
|
-
private renderIssueEntry;
|
|
73
|
-
renderValidatorsIssues(issues: IssueDetail[]): TemplateResult[];
|
|
74
|
-
private renderIssues;
|
|
75
|
-
private renderFilterButtons;
|
|
76
|
-
private renderLogDialog;
|
|
77
|
-
private renderHistoryUI;
|
|
78
|
-
render(): TemplateResult;
|
|
79
|
-
}
|
|
80
|
-
declare global {
|
|
81
|
-
interface ElementEventMap {
|
|
82
|
-
'history-dialog-ui': CustomEvent<HistoryUIDetail>;
|
|
83
|
-
'empty-issues': CustomEvent<EmptyIssuesDetail>;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
export {};
|