@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
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { isComplex, isInsert, isNamespaced, isRemove, isUpdate } from '@
|
|
2
|
-
export function convertEditV1toV2(edit) {
|
|
3
|
-
if (isComplex(edit)) {
|
|
4
|
-
return edit.map(convertEditV1toV2);
|
|
5
|
-
}
|
|
6
|
-
else if (isRemove(edit)) {
|
|
7
|
-
return edit;
|
|
8
|
-
}
|
|
9
|
-
else if (isInsert(edit)) {
|
|
10
|
-
return edit;
|
|
11
|
-
}
|
|
12
|
-
else if (isUpdate(edit)) {
|
|
13
|
-
return convertUpdate(edit);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
throw new Error('Unknown edit type');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function convertUpdate(edit) {
|
|
20
|
-
const attributes = {};
|
|
21
|
-
const attributesNS = {};
|
|
22
|
-
Object.entries(edit.attributes).forEach(([key, value]) => {
|
|
23
|
-
if (isNamespaced(value)) {
|
|
24
|
-
const ns = value.namespaceURI;
|
|
25
|
-
if (!ns)
|
|
26
|
-
return;
|
|
27
|
-
if (!attributesNS[ns]) {
|
|
28
|
-
attributesNS[ns] = {};
|
|
29
|
-
}
|
|
30
|
-
attributesNS[ns][key] = value.value;
|
|
31
|
-
}
|
|
32
|
-
else
|
|
33
|
-
attributes[key] = value;
|
|
34
|
-
});
|
|
35
|
-
return { element: edit.element, attributes, attributesNS };
|
|
36
|
-
}
|
|
1
|
+
import { isComplex, isInsert, isNamespaced, isRemove, isUpdate } from '@openscd/core';
|
|
2
|
+
export function convertEditV1toV2(edit) {
|
|
3
|
+
if (isComplex(edit)) {
|
|
4
|
+
return edit.map(convertEditV1toV2);
|
|
5
|
+
}
|
|
6
|
+
else if (isRemove(edit)) {
|
|
7
|
+
return edit;
|
|
8
|
+
}
|
|
9
|
+
else if (isInsert(edit)) {
|
|
10
|
+
return edit;
|
|
11
|
+
}
|
|
12
|
+
else if (isUpdate(edit)) {
|
|
13
|
+
return convertUpdate(edit);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
throw new Error('Unknown edit type');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function convertUpdate(edit) {
|
|
20
|
+
const attributes = {};
|
|
21
|
+
const attributesNS = {};
|
|
22
|
+
Object.entries(edit.attributes).forEach(([key, value]) => {
|
|
23
|
+
if (isNamespaced(value)) {
|
|
24
|
+
const ns = value.namespaceURI;
|
|
25
|
+
if (!ns)
|
|
26
|
+
return;
|
|
27
|
+
if (!attributesNS[ns]) {
|
|
28
|
+
attributesNS[ns] = {};
|
|
29
|
+
}
|
|
30
|
+
attributesNS[ns][key] = value.value;
|
|
31
|
+
}
|
|
32
|
+
else
|
|
33
|
+
attributes[key] = value;
|
|
34
|
+
});
|
|
35
|
+
return { element: edit.element, attributes, attributesNS };
|
|
36
|
+
}
|
|
37
37
|
//# sourceMappingURL=edit-v1-to-v2-converter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit-v1-to-v2-converter.js","sourceRoot":"","sources":["../../../src/addons/editor/edit-v1-to-v2-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAU,MAAM,
|
|
1
|
+
{"version":3,"file":"edit-v1-to-v2-converter.js","sourceRoot":"","sources":["../../../src/addons/editor/edit-v1-to-v2-converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAU,MAAM,eAAe,CAAC;AAE5G,MAAM,UAAU,iBAAiB,CAAC,IAAU;IAC1C,IAAI,SAAS,CAAC,IAAI,CAAC,EAAE;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;KACpC;SAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QACzB,OAAO,IAAc,CAAC;KACvB;SAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QACzB,OAAO,IAAc,CAAC;KACvB;SAAM,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QACzB,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC;KAC5B;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACtC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,UAAU,GAA2C,EAAE,CAAC;IAC9D,MAAM,YAAY,GAEd,EAAE,CAAC;IAEP,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACvD,IAAI,YAAY,CAAC,KAAM,CAAC,EAAE;YACxB,MAAM,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC;YAC9B,IAAI,CAAC,EAAE;gBAAE,OAAO;YAEhB,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE;gBACrB,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;aACvB;YACD,YAAY,CAAC,EAAE,CAAE,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC;SACtC;;YAAM,UAAU,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAC7D,CAAC","sourcesContent":["import { Edit, EditV2, isComplex, isInsert, isNamespaced, isRemove, isUpdate, Update } from '@openscd/core';\n\nexport function convertEditV1toV2(edit: Edit): EditV2 {\n if (isComplex(edit)) {\n return edit.map(convertEditV1toV2);\n } else if (isRemove(edit)) {\n return edit as EditV2;\n } else if (isInsert(edit)) {\n return edit as EditV2;\n } else if (isUpdate(edit)) {\n return convertUpdate(edit);\n } else {\n throw new Error('Unknown edit type');\n }\n}\n\nfunction convertUpdate(edit: Update): EditV2 {\n const attributes: Partial<Record<string, string | null>> = {};\n const attributesNS: Partial<\n Record<string, Partial<Record<string, string | null>>>\n > = {};\n\n Object.entries(edit.attributes).forEach(([key, value]) => {\n if (isNamespaced(value!)) {\n const ns = value.namespaceURI;\n if (!ns) return;\n\n if (!attributesNS[ns]) {\n attributesNS[ns] = {};\n }\n attributesNS[ns]![key] = value.value;\n } else attributes[key] = value;\n });\n\n return { element: edit.element, attributes, attributesNS };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EditV2 } from '@
|
|
2
|
-
export declare const getLogText: (edit: EditV2) => {
|
|
3
|
-
title: string;
|
|
4
|
-
message?: string;
|
|
5
|
-
};
|
|
1
|
+
import { EditV2 } from '@openscd/core';
|
|
2
|
+
export declare const getLogText: (edit: EditV2) => {
|
|
3
|
+
title: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { isInsertV2, isRemoveV2, isSetAttributesV2, isSetTextContentV2, isComplexV2 } from '@
|
|
2
|
-
import { get } from 'lit-translate';
|
|
3
|
-
export const getLogText = (edit) => {
|
|
4
|
-
if (isInsertV2(edit)) {
|
|
5
|
-
const name = edit.node instanceof Element ?
|
|
6
|
-
edit.node.tagName :
|
|
7
|
-
get('editing.node');
|
|
8
|
-
return { title: get('editing.created', { name }) };
|
|
9
|
-
}
|
|
10
|
-
else if (isSetAttributesV2(edit) || isSetTextContentV2(edit)) {
|
|
11
|
-
const name = edit.element.tagName;
|
|
12
|
-
return { title: get('editing.updated', { name }) };
|
|
13
|
-
}
|
|
14
|
-
else if (isRemoveV2(edit)) {
|
|
15
|
-
const name = edit.node instanceof Element ?
|
|
16
|
-
edit.node.tagName :
|
|
17
|
-
get('editing.node');
|
|
18
|
-
return { title: get('editing.deleted', { name }) };
|
|
19
|
-
}
|
|
20
|
-
else if (isComplexV2(edit)) {
|
|
21
|
-
const message = edit.map(e => getLogText(e)).map(({ title }) => title).join(', ');
|
|
22
|
-
return { title: get('editing.complex'), message };
|
|
23
|
-
}
|
|
24
|
-
return { title: '' };
|
|
25
|
-
};
|
|
1
|
+
import { isInsertV2, isRemoveV2, isSetAttributesV2, isSetTextContentV2, isComplexV2 } from '@openscd/core';
|
|
2
|
+
import { get } from 'lit-translate';
|
|
3
|
+
export const getLogText = (edit) => {
|
|
4
|
+
if (isInsertV2(edit)) {
|
|
5
|
+
const name = edit.node instanceof Element ?
|
|
6
|
+
edit.node.tagName :
|
|
7
|
+
get('editing.node');
|
|
8
|
+
return { title: get('editing.created', { name }) };
|
|
9
|
+
}
|
|
10
|
+
else if (isSetAttributesV2(edit) || isSetTextContentV2(edit)) {
|
|
11
|
+
const name = edit.element.tagName;
|
|
12
|
+
return { title: get('editing.updated', { name }) };
|
|
13
|
+
}
|
|
14
|
+
else if (isRemoveV2(edit)) {
|
|
15
|
+
const name = edit.node instanceof Element ?
|
|
16
|
+
edit.node.tagName :
|
|
17
|
+
get('editing.node');
|
|
18
|
+
return { title: get('editing.deleted', { name }) };
|
|
19
|
+
}
|
|
20
|
+
else if (isComplexV2(edit)) {
|
|
21
|
+
const message = edit.map(e => getLogText(e)).map(({ title }) => title).join(', ');
|
|
22
|
+
return { title: get('editing.complex'), message };
|
|
23
|
+
}
|
|
24
|
+
return { title: '' };
|
|
25
|
+
};
|
|
26
26
|
//# sourceMappingURL=get-log-text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-log-text.js","sourceRoot":"","sources":["../../../src/addons/history/get-log-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"get-log-text.js","sourceRoot":"","sources":["../../../src/addons/history/get-log-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAuC,EAAE;IAC9E,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;QACpB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,YAAY,OAAO,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnB,GAAG,CAAC,cAAc,CAAC,CAAC;QACpB,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;KACpD;SAAM,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,EAAE;QAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;QAClC,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;KACpD;SAAM,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,YAAY,OAAO,CAAC,CAAC;YAC3C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnB,GAAG,CAAC,cAAc,CAAC,CAAC;QACpB,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;KACpD;SAAM,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE;QAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClF,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC;KACnD;IAED,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AACvB,CAAC,CAAA","sourcesContent":["import {\n EditV2,\n isInsertV2,\n isRemoveV2,\n isSetAttributesV2,\n isSetTextContentV2,\n isComplexV2\n} from '@openscd/core';\nimport { get } from 'lit-translate';\n\nexport const getLogText = (edit: EditV2): { title: string, message?: string } => {\n if (isInsertV2(edit)) {\n const name = edit.node instanceof Element ?\n edit.node.tagName :\n get('editing.node');\n return { title: get('editing.created', { name }) };\n } else if (isSetAttributesV2(edit) || isSetTextContentV2(edit)) {\n const name = edit.element.tagName;\n return { title: get('editing.updated', { name }) };\n } else if (isRemoveV2(edit)) {\n const name = edit.node instanceof Element ?\n edit.node.tagName :\n get('editing.node');\n return { title: get('editing.deleted', { name }) };\n } else if (isComplexV2(edit)) {\n const message = edit.map(e => getLogText(e)).map(({ title }) => title).join(', ');\n return { title: get('editing.complex'), message };\n }\n \n return { title: '' };\n}\n"]}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import '@material/mwc-list';
|
|
3
|
-
import '@material/mwc-tab';
|
|
4
|
-
import '@material/mwc-tab-bar';
|
|
5
|
-
import '@material/mwc-button';
|
|
6
|
-
import { Plugin } from "../../plugin.js";
|
|
7
|
-
export declare class OscdMenuTabs extends LitElement {
|
|
8
|
-
editors: Plugin[];
|
|
9
|
-
_activeEditor: Plugin | undefined;
|
|
10
|
-
get activeEditor(): Plugin | undefined;
|
|
11
|
-
set activeEditor(editor: Plugin | undefined);
|
|
12
|
-
private activeTabIndex;
|
|
13
|
-
render(): TemplateResult;
|
|
14
|
-
static styles: import("lit-element").CSSResult;
|
|
15
|
-
private handleActivatedEditorTab;
|
|
16
|
-
private dispatchActivateEditor;
|
|
17
|
-
}
|
|
18
|
-
export declare const TabActivatedEventKey = "oscd-editor-tab-activated";
|
|
19
|
-
export type TabActivatedEvent = CustomEvent<TabActivatedEventDetail>;
|
|
20
|
-
export type TabActivatedEventDetail = {
|
|
21
|
-
editor: Plugin;
|
|
22
|
-
};
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
+
import '@material/mwc-list';
|
|
3
|
+
import '@material/mwc-tab';
|
|
4
|
+
import '@material/mwc-tab-bar';
|
|
5
|
+
import '@material/mwc-button';
|
|
6
|
+
import { Plugin } from "../../plugin.js";
|
|
7
|
+
export declare class OscdMenuTabs extends LitElement {
|
|
8
|
+
editors: Plugin[];
|
|
9
|
+
_activeEditor: Plugin | undefined;
|
|
10
|
+
get activeEditor(): Plugin | undefined;
|
|
11
|
+
set activeEditor(editor: Plugin | undefined);
|
|
12
|
+
private activeTabIndex;
|
|
13
|
+
render(): TemplateResult;
|
|
14
|
+
static styles: import("lit-element").CSSResult;
|
|
15
|
+
private handleActivatedEditorTab;
|
|
16
|
+
private dispatchActivateEditor;
|
|
17
|
+
}
|
|
18
|
+
export declare const TabActivatedEventKey = "oscd-editor-tab-activated";
|
|
19
|
+
export type TabActivatedEvent = CustomEvent<TabActivatedEventDetail>;
|
|
20
|
+
export type TabActivatedEventDetail = {
|
|
21
|
+
editor: Plugin;
|
|
22
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { customElement, html, LitElement, property, state, css } from 'lit-element';
|
|
3
|
-
import '@material/mwc-list';
|
|
4
|
-
import '@material/mwc-tab';
|
|
5
|
-
import '@material/mwc-tab-bar';
|
|
6
|
-
import '@material/mwc-button';
|
|
7
|
-
let OscdMenuTabs = class OscdMenuTabs extends LitElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.editors = [];
|
|
11
|
-
this.activeTabIndex = 0;
|
|
12
|
-
}
|
|
13
|
-
get activeEditor() { return this._activeEditor; }
|
|
14
|
-
set activeEditor(editor) {
|
|
15
|
-
this._activeEditor = editor;
|
|
16
|
-
const editorIndex = this.editors.findIndex(e => e.name === editor?.name && e.src === editor?.src);
|
|
17
|
-
this.activeTabIndex = editorIndex > -1 ? editorIndex : 0;
|
|
18
|
-
this.requestUpdate();
|
|
19
|
-
}
|
|
20
|
-
;
|
|
21
|
-
render() {
|
|
22
|
-
if (this.editors.length === 0) {
|
|
23
|
-
return html ``;
|
|
24
|
-
}
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, html, LitElement, property, state, css } from 'lit-element';
|
|
3
|
+
import '@material/mwc-list';
|
|
4
|
+
import '@material/mwc-tab';
|
|
5
|
+
import '@material/mwc-tab-bar';
|
|
6
|
+
import '@material/mwc-button';
|
|
7
|
+
let OscdMenuTabs = class OscdMenuTabs extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.editors = [];
|
|
11
|
+
this.activeTabIndex = 0;
|
|
12
|
+
}
|
|
13
|
+
get activeEditor() { return this._activeEditor; }
|
|
14
|
+
set activeEditor(editor) {
|
|
15
|
+
this._activeEditor = editor;
|
|
16
|
+
const editorIndex = this.editors.findIndex(e => e.name === editor?.name && e.src === editor?.src);
|
|
17
|
+
this.activeTabIndex = editorIndex > -1 ? editorIndex : 0;
|
|
18
|
+
this.requestUpdate();
|
|
19
|
+
}
|
|
20
|
+
;
|
|
21
|
+
render() {
|
|
22
|
+
if (this.editors.length === 0) {
|
|
23
|
+
return html ``;
|
|
24
|
+
}
|
|
25
25
|
return html `
|
|
26
26
|
<mwc-tab-bar
|
|
27
27
|
@MDCTabBar:activated=${this.handleActivatedEditorTab}
|
|
@@ -29,46 +29,46 @@ let OscdMenuTabs = class OscdMenuTabs extends LitElement {
|
|
|
29
29
|
>
|
|
30
30
|
${this.editors.map(EditorTab)}
|
|
31
31
|
</mwc-tab-bar>
|
|
32
|
-
`;
|
|
33
|
-
}
|
|
34
|
-
handleActivatedEditorTab(e) {
|
|
35
|
-
const tabIndex = e.detail.index;
|
|
36
|
-
const editor = this.editors[tabIndex];
|
|
37
|
-
this.activeTabIndex = tabIndex;
|
|
38
|
-
this.dispatchActivateEditor(editor);
|
|
39
|
-
}
|
|
40
|
-
dispatchActivateEditor(editor) {
|
|
41
|
-
const newEvent = new CustomEvent(TabActivatedEventKey, {
|
|
42
|
-
detail: { editor },
|
|
43
|
-
composed: true,
|
|
44
|
-
bubbles: true
|
|
45
|
-
});
|
|
46
|
-
this.dispatchEvent(newEvent);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
handleActivatedEditorTab(e) {
|
|
35
|
+
const tabIndex = e.detail.index;
|
|
36
|
+
const editor = this.editors[tabIndex];
|
|
37
|
+
this.activeTabIndex = tabIndex;
|
|
38
|
+
this.dispatchActivateEditor(editor);
|
|
39
|
+
}
|
|
40
|
+
dispatchActivateEditor(editor) {
|
|
41
|
+
const newEvent = new CustomEvent(TabActivatedEventKey, {
|
|
42
|
+
detail: { editor },
|
|
43
|
+
composed: true,
|
|
44
|
+
bubbles: true
|
|
45
|
+
});
|
|
46
|
+
this.dispatchEvent(newEvent);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
49
|
OscdMenuTabs.styles = css `
|
|
50
50
|
mwc-tab {
|
|
51
51
|
background-color: var(--primary);
|
|
52
52
|
--mdc-theme-primary: var(--mdc-theme-on-primary);
|
|
53
53
|
}
|
|
54
|
-
`;
|
|
55
|
-
__decorate([
|
|
56
|
-
property({ type: Array })
|
|
57
|
-
], OscdMenuTabs.prototype, "editors", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
property({ type: Object })
|
|
60
|
-
], OscdMenuTabs.prototype, "activeEditor", null);
|
|
61
|
-
__decorate([
|
|
62
|
-
state()
|
|
63
|
-
], OscdMenuTabs.prototype, "activeTabIndex", void 0);
|
|
64
|
-
OscdMenuTabs = __decorate([
|
|
65
|
-
customElement('oscd-menu-tabs')
|
|
66
|
-
], OscdMenuTabs);
|
|
67
|
-
export { OscdMenuTabs };
|
|
68
|
-
function EditorTab({ name, icon }) {
|
|
54
|
+
`;
|
|
55
|
+
__decorate([
|
|
56
|
+
property({ type: Array })
|
|
57
|
+
], OscdMenuTabs.prototype, "editors", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
property({ type: Object })
|
|
60
|
+
], OscdMenuTabs.prototype, "activeEditor", null);
|
|
61
|
+
__decorate([
|
|
62
|
+
state()
|
|
63
|
+
], OscdMenuTabs.prototype, "activeTabIndex", void 0);
|
|
64
|
+
OscdMenuTabs = __decorate([
|
|
65
|
+
customElement('oscd-menu-tabs')
|
|
66
|
+
], OscdMenuTabs);
|
|
67
|
+
export { OscdMenuTabs };
|
|
68
|
+
function EditorTab({ name, icon }) {
|
|
69
69
|
return html `
|
|
70
70
|
<mwc-tab label=${name} icon=${icon || 'edit'}> </mwc-tab>
|
|
71
|
-
`;
|
|
72
|
-
}
|
|
73
|
-
export const TabActivatedEventKey = 'oscd-editor-tab-activated';
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
export const TabActivatedEventKey = 'oscd-editor-tab-activated';
|
|
74
74
|
//# sourceMappingURL=menu-tabs.js.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import type { Button } from '@material/mwc-button';
|
|
3
|
-
import type { Dialog } from '@material/mwc-dialog';
|
|
4
|
-
import { List } from '@material/mwc-list';
|
|
5
|
-
import type { Select } from '@material/mwc-select';
|
|
6
|
-
import type { Switch } from '@material/mwc-switch';
|
|
7
|
-
import type { TextField } from '@material/mwc-textfield';
|
|
8
|
-
import '@material/mwc-dialog';
|
|
9
|
-
import '@material/mwc-drawer';
|
|
10
|
-
import '@material/mwc-list';
|
|
11
|
-
import '@material/mwc-select';
|
|
12
|
-
import '@material/mwc-switch';
|
|
13
|
-
import '@material/mwc-textfield';
|
|
14
|
-
export declare class OscdCustomPluginDialog extends LitElement {
|
|
15
|
-
dialog: Dialog;
|
|
16
|
-
pluginSrcInput: TextField;
|
|
17
|
-
pluginNameInput: TextField;
|
|
18
|
-
pluginKindList: List;
|
|
19
|
-
requireDoc: Switch;
|
|
20
|
-
positionList: Select;
|
|
21
|
-
addButton: Button;
|
|
22
|
-
render(): TemplateResult;
|
|
23
|
-
static styles: import("lit-element").CSSResult;
|
|
24
|
-
close(): void;
|
|
25
|
-
show(): void;
|
|
26
|
-
get open(): boolean;
|
|
27
|
-
private handleAddPlugin;
|
|
28
|
-
}
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
+
import type { Button } from '@material/mwc-button';
|
|
3
|
+
import type { Dialog } from '@material/mwc-dialog';
|
|
4
|
+
import { List } from '@material/mwc-list';
|
|
5
|
+
import type { Select } from '@material/mwc-select';
|
|
6
|
+
import type { Switch } from '@material/mwc-switch';
|
|
7
|
+
import type { TextField } from '@material/mwc-textfield';
|
|
8
|
+
import '@material/mwc-dialog';
|
|
9
|
+
import '@material/mwc-drawer';
|
|
10
|
+
import '@material/mwc-list';
|
|
11
|
+
import '@material/mwc-select';
|
|
12
|
+
import '@material/mwc-switch';
|
|
13
|
+
import '@material/mwc-textfield';
|
|
14
|
+
export declare class OscdCustomPluginDialog extends LitElement {
|
|
15
|
+
dialog: Dialog;
|
|
16
|
+
pluginSrcInput: TextField;
|
|
17
|
+
pluginNameInput: TextField;
|
|
18
|
+
pluginKindList: List;
|
|
19
|
+
requireDoc: Switch;
|
|
20
|
+
positionList: Select;
|
|
21
|
+
addButton: Button;
|
|
22
|
+
render(): TemplateResult;
|
|
23
|
+
static styles: import("lit-element").CSSResult;
|
|
24
|
+
close(): void;
|
|
25
|
+
show(): void;
|
|
26
|
+
get open(): boolean;
|
|
27
|
+
private handleAddPlugin;
|
|
28
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { customElement, html, LitElement, query, css, } from 'lit-element';
|
|
3
|
-
import { get } from 'lit-translate';
|
|
4
|
-
import { newAddExternalPluginEvent, pluginIcons } from '../../open-scd.js';
|
|
5
|
-
import { menuPosition } from "../../plugin.js";
|
|
6
|
-
import '@material/mwc-dialog';
|
|
7
|
-
import '@material/mwc-drawer';
|
|
8
|
-
import '@material/mwc-list';
|
|
9
|
-
import '@material/mwc-select';
|
|
10
|
-
import '@material/mwc-switch';
|
|
11
|
-
import '@material/mwc-textfield';
|
|
12
|
-
let OscdCustomPluginDialog = class OscdCustomPluginDialog extends LitElement {
|
|
13
|
-
render() {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, html, LitElement, query, css, } from 'lit-element';
|
|
3
|
+
import { get } from 'lit-translate';
|
|
4
|
+
import { newAddExternalPluginEvent, pluginIcons } from '../../open-scd.js';
|
|
5
|
+
import { menuPosition } from "../../plugin.js";
|
|
6
|
+
import '@material/mwc-dialog';
|
|
7
|
+
import '@material/mwc-drawer';
|
|
8
|
+
import '@material/mwc-list';
|
|
9
|
+
import '@material/mwc-select';
|
|
10
|
+
import '@material/mwc-switch';
|
|
11
|
+
import '@material/mwc-textfield';
|
|
12
|
+
let OscdCustomPluginDialog = class OscdCustomPluginDialog extends LitElement {
|
|
13
|
+
render() {
|
|
14
14
|
return html `
|
|
15
15
|
<mwc-dialog id="dialog" heading="${get('plugins.add.heading')}">
|
|
16
16
|
<div style="display: flex; flex-direction: column; row-gap: 8px;">
|
|
@@ -101,38 +101,38 @@ let OscdCustomPluginDialog = class OscdCustomPluginDialog extends LitElement {
|
|
|
101
101
|
@click=${() => this.handleAddPlugin()}>
|
|
102
102
|
</mwc-button>
|
|
103
103
|
</mwc-dialog>
|
|
104
|
-
`;
|
|
105
|
-
}
|
|
106
|
-
close() {
|
|
107
|
-
this.dialog.close();
|
|
108
|
-
}
|
|
109
|
-
show() {
|
|
110
|
-
this.dialog.show();
|
|
111
|
-
}
|
|
112
|
-
get open() {
|
|
113
|
-
return this.dialog.open;
|
|
114
|
-
}
|
|
115
|
-
handleAddPlugin() {
|
|
116
|
-
if (!(this.pluginSrcInput.checkValidity() &&
|
|
117
|
-
this.pluginNameInput.checkValidity() &&
|
|
118
|
-
this.pluginKindList.selected &&
|
|
119
|
-
this.requireDoc &&
|
|
120
|
-
this.positionList.selected))
|
|
121
|
-
return;
|
|
122
|
-
this.dispatchEvent(newAddExternalPluginEvent({
|
|
123
|
-
src: this.pluginSrcInput.value,
|
|
124
|
-
name: this.pluginNameInput.value,
|
|
125
|
-
kind: this.pluginKindList.selected.value,
|
|
126
|
-
requireDoc: this.requireDoc.checked,
|
|
127
|
-
position: this.positionList.value,
|
|
128
|
-
active: true,
|
|
129
|
-
// this is an added plugin and will be remove by reset either way
|
|
130
|
-
activeByDefault: false,
|
|
131
|
-
}));
|
|
132
|
-
this.requestUpdate();
|
|
133
|
-
this.dialog.close();
|
|
134
|
-
}
|
|
135
|
-
};
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
close() {
|
|
107
|
+
this.dialog.close();
|
|
108
|
+
}
|
|
109
|
+
show() {
|
|
110
|
+
this.dialog.show();
|
|
111
|
+
}
|
|
112
|
+
get open() {
|
|
113
|
+
return this.dialog.open;
|
|
114
|
+
}
|
|
115
|
+
handleAddPlugin() {
|
|
116
|
+
if (!(this.pluginSrcInput.checkValidity() &&
|
|
117
|
+
this.pluginNameInput.checkValidity() &&
|
|
118
|
+
this.pluginKindList.selected &&
|
|
119
|
+
this.requireDoc &&
|
|
120
|
+
this.positionList.selected))
|
|
121
|
+
return;
|
|
122
|
+
this.dispatchEvent(newAddExternalPluginEvent({
|
|
123
|
+
src: this.pluginSrcInput.value,
|
|
124
|
+
name: this.pluginNameInput.value,
|
|
125
|
+
kind: this.pluginKindList.selected.value,
|
|
126
|
+
requireDoc: this.requireDoc.checked,
|
|
127
|
+
position: this.positionList.value,
|
|
128
|
+
active: true,
|
|
129
|
+
// this is an added plugin and will be remove by reset either way
|
|
130
|
+
activeByDefault: false,
|
|
131
|
+
}));
|
|
132
|
+
this.requestUpdate();
|
|
133
|
+
this.dialog.close();
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
136
|
OscdCustomPluginDialog.styles = css `
|
|
137
137
|
|
|
138
138
|
mwc-dialog {
|
|
@@ -148,30 +148,30 @@ OscdCustomPluginDialog.styles = css `
|
|
|
148
148
|
display: block;
|
|
149
149
|
margin-top: 16px;
|
|
150
150
|
}
|
|
151
|
-
`;
|
|
152
|
-
__decorate([
|
|
153
|
-
query('#dialog')
|
|
154
|
-
], OscdCustomPluginDialog.prototype, "dialog", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
query('#pluginSrcInput')
|
|
157
|
-
], OscdCustomPluginDialog.prototype, "pluginSrcInput", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
query('#pluginNameInput')
|
|
160
|
-
], OscdCustomPluginDialog.prototype, "pluginNameInput", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
query('#pluginKindList')
|
|
163
|
-
], OscdCustomPluginDialog.prototype, "pluginKindList", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
query('#requireDoc')
|
|
166
|
-
], OscdCustomPluginDialog.prototype, "requireDoc", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
query('#positionList')
|
|
169
|
-
], OscdCustomPluginDialog.prototype, "positionList", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
query('#addButton')
|
|
172
|
-
], OscdCustomPluginDialog.prototype, "addButton", void 0);
|
|
173
|
-
OscdCustomPluginDialog = __decorate([
|
|
174
|
-
customElement('oscd-custom-plugin-dialog')
|
|
175
|
-
], OscdCustomPluginDialog);
|
|
176
|
-
export { OscdCustomPluginDialog };
|
|
151
|
+
`;
|
|
152
|
+
__decorate([
|
|
153
|
+
query('#dialog')
|
|
154
|
+
], OscdCustomPluginDialog.prototype, "dialog", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
query('#pluginSrcInput')
|
|
157
|
+
], OscdCustomPluginDialog.prototype, "pluginSrcInput", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
query('#pluginNameInput')
|
|
160
|
+
], OscdCustomPluginDialog.prototype, "pluginNameInput", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
query('#pluginKindList')
|
|
163
|
+
], OscdCustomPluginDialog.prototype, "pluginKindList", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
query('#requireDoc')
|
|
166
|
+
], OscdCustomPluginDialog.prototype, "requireDoc", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
query('#positionList')
|
|
169
|
+
], OscdCustomPluginDialog.prototype, "positionList", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
query('#addButton')
|
|
172
|
+
], OscdCustomPluginDialog.prototype, "addButton", void 0);
|
|
173
|
+
OscdCustomPluginDialog = __decorate([
|
|
174
|
+
customElement('oscd-custom-plugin-dialog')
|
|
175
|
+
], OscdCustomPluginDialog);
|
|
176
|
+
export { OscdCustomPluginDialog };
|
|
177
177
|
//# sourceMappingURL=custom-plugin-dialog.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import type { Dialog } from '@material/mwc-dialog';
|
|
3
|
-
import '@material/mwc-dialog';
|
|
4
|
-
import '@material/mwc-list';
|
|
5
|
-
import type { List } from '@material/mwc-list';
|
|
6
|
-
import { Plugin } from "../../plugin.js";
|
|
7
|
-
export declare class OscdPluginManager extends LitElement {
|
|
8
|
-
/** The plugins to render the layout. */
|
|
9
|
-
plugins: Plugin[];
|
|
10
|
-
root: Dialog;
|
|
11
|
-
pluginList: List;
|
|
12
|
-
render(): TemplateResult;
|
|
13
|
-
static styles: import("lit-element").CSSResult;
|
|
14
|
-
show(): void;
|
|
15
|
-
private generateEditorListItems;
|
|
16
|
-
private generateMenuListItems;
|
|
17
|
-
private generateValidatorListItems;
|
|
18
|
-
private dispatchOpenCustomPluginDialogEvent;
|
|
19
|
-
private renderPluginListItem;
|
|
20
|
-
}
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
+
import type { Dialog } from '@material/mwc-dialog';
|
|
3
|
+
import '@material/mwc-dialog';
|
|
4
|
+
import '@material/mwc-list';
|
|
5
|
+
import type { List } from '@material/mwc-list';
|
|
6
|
+
import { Plugin } from "../../plugin.js";
|
|
7
|
+
export declare class OscdPluginManager extends LitElement {
|
|
8
|
+
/** The plugins to render the layout. */
|
|
9
|
+
plugins: Plugin[];
|
|
10
|
+
root: Dialog;
|
|
11
|
+
pluginList: List;
|
|
12
|
+
render(): TemplateResult;
|
|
13
|
+
static styles: import("lit-element").CSSResult;
|
|
14
|
+
show(): void;
|
|
15
|
+
private generateEditorListItems;
|
|
16
|
+
private generateMenuListItems;
|
|
17
|
+
private generateValidatorListItems;
|
|
18
|
+
private dispatchOpenCustomPluginDialogEvent;
|
|
19
|
+
private renderPluginListItem;
|
|
20
|
+
}
|