@compas-oscd/open-scd 0.34.16 → 0.34.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WizardDivider.d.ts +8 -8
- package/dist/WizardDivider.js +26 -26
- package/dist/Wizarding.js +36 -36
- package/dist/Wizarding.js.map +1 -1
- package/dist/action-icon.d.ts +25 -25
- package/dist/action-icon.js +51 -51
- package/dist/action-pane.d.ts +25 -25
- package/dist/action-pane.js +86 -86
- package/dist/addons/Editor.d.ts +25 -25
- package/dist/addons/Editor.js +105 -105
- package/dist/addons/Editor.js.map +1 -1
- package/dist/addons/History.d.ts +86 -93
- package/dist/addons/History.js +301 -302
- package/dist/addons/History.js.map +1 -1
- package/dist/addons/Layout.d.ts +96 -96
- package/dist/addons/Layout.js +448 -448
- package/dist/addons/Layout.js.map +1 -1
- package/dist/addons/Settings.d.ts +68 -68
- package/dist/addons/Settings.js +272 -272
- package/dist/addons/Settings.js.map +1 -1
- package/dist/addons/Waiter.d.ts +14 -14
- package/dist/addons/Waiter.js +40 -40
- package/dist/addons/Waiter.js.map +1 -1
- package/dist/addons/Wizards.d.ts +15 -15
- package/dist/addons/Wizards.js +46 -46
- package/dist/addons/editor/edit-action-to-v1-converter.d.ts +3 -3
- package/dist/addons/editor/edit-action-to-v1-converter.js +95 -95
- package/dist/addons/editor/edit-action-to-v1-converter.js.map +1 -1
- package/dist/addons/editor/edit-v1-to-v2-converter.d.ts +2 -2
- package/dist/addons/editor/edit-v1-to-v2-converter.js +36 -36
- package/dist/addons/editor/edit-v1-to-v2-converter.js.map +1 -1
- package/dist/addons/history/get-log-text.d.ts +5 -5
- package/dist/addons/history/get-log-text.js +25 -25
- package/dist/addons/history/get-log-text.js.map +1 -1
- package/dist/addons/menu-tabs/menu-tabs.d.ts +22 -22
- package/dist/addons/menu-tabs/menu-tabs.js +59 -59
- package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts +28 -28
- package/dist/addons/plugin-manager/custom-plugin-dialog.js +71 -71
- package/dist/addons/plugin-manager/plugin-manager.d.ts +20 -20
- package/dist/addons/plugin-manager/plugin-manager.js +77 -77
- package/dist/core/api/api.js +7 -0
- package/dist/core/api/api.js.map +1 -0
- package/dist/core/api/editor/subject.js +22 -0
- package/dist/core/api/editor/subject.js.map +1 -0
- package/dist/core/api/editor/xml-editor.js +82 -0
- package/dist/core/api/editor/xml-editor.js.map +1 -0
- package/dist/core/api/plugin-state-api.js +27 -0
- package/dist/core/api/plugin-state-api.js.map +1 -0
- package/dist/core/foundation/cyrb64.js +26 -0
- package/dist/core/foundation/cyrb64.js.map +1 -0
- package/dist/core/foundation/deprecated/edit-event.js +44 -0
- package/dist/core/foundation/deprecated/edit-event.js.map +1 -0
- package/dist/core/foundation/deprecated/editor.js +94 -0
- package/dist/core/foundation/deprecated/editor.js.map +1 -0
- package/dist/core/foundation/deprecated/history.js +17 -0
- package/dist/core/foundation/deprecated/history.js.map +1 -0
- package/dist/core/foundation/deprecated/open-event.js +9 -0
- package/dist/core/foundation/deprecated/open-event.js.map +1 -0
- package/dist/core/foundation/deprecated/settings.js +19 -0
- package/dist/core/foundation/deprecated/settings.js.map +1 -0
- package/dist/core/foundation/deprecated/validation.js +8 -0
- package/dist/core/foundation/deprecated/validation.js.map +1 -0
- package/dist/core/foundation/deprecated/waiter.js +12 -0
- package/dist/core/foundation/deprecated/waiter.js.map +1 -0
- package/dist/core/foundation/edit-completed-event.js +11 -0
- package/dist/core/foundation/edit-completed-event.js.map +1 -0
- package/dist/core/foundation/edit-event.js +8 -0
- package/dist/core/foundation/edit-event.js.map +1 -0
- package/dist/core/foundation/edit.js +31 -0
- package/dist/core/foundation/edit.js.map +1 -0
- package/dist/core/foundation/handle-edit.js +151 -0
- package/dist/core/foundation/handle-edit.js.map +1 -0
- package/dist/core/foundation/open-event.js +8 -0
- package/dist/core/foundation/open-event.js.map +1 -0
- package/dist/core/foundation/plugin.js +2 -0
- package/dist/core/foundation/plugin.js.map +1 -0
- package/dist/core/foundation.js +14 -0
- package/dist/core/foundation.js.map +1 -0
- package/dist/core/locales.js +21 -0
- package/dist/core/locales.js.map +1 -0
- package/dist/filtered-list.d.ts +27 -27
- package/dist/filtered-list.js +118 -118
- package/dist/finder-list.d.ts +37 -37
- package/dist/finder-list.js +153 -153
- package/dist/foundation/compare.d.ts +79 -79
- package/dist/foundation/compare.js +216 -216
- package/dist/foundation/dai.d.ts +30 -30
- package/dist/foundation/dai.js +126 -126
- package/dist/foundation/generators.d.ts +13 -13
- package/dist/foundation/generators.js +66 -66
- package/dist/foundation/ied.d.ts +22 -22
- package/dist/foundation/ied.js +83 -83
- package/dist/foundation/ied.js.map +1 -1
- package/dist/foundation/nsd.d.ts +4 -4
- package/dist/foundation/nsd.js +12 -12
- package/dist/foundation/nsdoc.d.ts +14 -14
- package/dist/foundation/nsdoc.js +178 -178
- package/dist/foundation/scl.d.ts +1 -1
- package/dist/foundation/scl.js +63 -63
- package/dist/foundation.d.ts +230 -230
- package/dist/foundation.js +1921 -1921
- package/dist/foundation.js.map +1 -1
- package/dist/icons/compare.d.ts +3 -3
- package/dist/icons/compare.js +4 -4
- package/dist/icons/icons.d.ts +41 -41
- package/dist/icons/icons.js +92 -92
- package/dist/icons/ied-icons.d.ts +3 -3
- package/dist/icons/ied-icons.js +4 -4
- package/dist/icons/lnode.d.ts +16 -16
- package/dist/icons/lnode.js +17 -17
- package/dist/open-scd.d.ts +131 -131
- package/dist/open-scd.js +438 -438
- package/dist/open-scd.js.map +1 -1
- package/dist/openscd/src/WizardDivider.js +37 -0
- package/dist/openscd/src/WizardDivider.js.map +1 -0
- package/dist/openscd/src/Wizarding.js +38 -0
- package/dist/openscd/src/Wizarding.js.map +1 -0
- package/dist/openscd/src/action-icon.js +220 -0
- package/dist/openscd/src/action-icon.js.map +1 -0
- package/dist/openscd/src/action-pane.js +176 -0
- package/dist/openscd/src/action-pane.js.map +1 -0
- package/dist/openscd/src/addons/Editor.js +106 -0
- package/dist/openscd/src/addons/Editor.js.map +1 -0
- package/dist/openscd/src/addons/History.js +490 -0
- package/dist/openscd/src/addons/History.js.map +1 -0
- package/dist/openscd/src/addons/Layout.js +619 -0
- package/dist/openscd/src/addons/Layout.js.map +1 -0
- package/dist/openscd/src/addons/Settings.js +465 -0
- package/dist/openscd/src/addons/Settings.js.map +1 -0
- package/dist/openscd/src/addons/Waiter.js +45 -0
- package/dist/openscd/src/addons/Waiter.js.map +1 -0
- package/dist/openscd/src/addons/Wizards.js +48 -0
- package/dist/openscd/src/addons/Wizards.js.map +1 -0
- package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js +96 -0
- package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js.map +1 -0
- package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js +37 -0
- package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js.map +1 -0
- package/dist/openscd/src/addons/history/get-log-text.js +26 -0
- package/dist/openscd/src/addons/history/get-log-text.js.map +1 -0
- package/dist/openscd/src/addons/menu-tabs/menu-tabs.js +74 -0
- package/dist/openscd/src/addons/menu-tabs/menu-tabs.js.map +1 -0
- package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js +177 -0
- package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js.map +1 -0
- package/dist/openscd/src/addons/plugin-manager/plugin-manager.js +165 -0
- package/dist/openscd/src/addons/plugin-manager/plugin-manager.js.map +1 -0
- package/dist/openscd/src/filtered-list.js +168 -0
- package/dist/openscd/src/filtered-list.js.map +1 -0
- package/dist/openscd/src/finder-list.js +207 -0
- package/dist/openscd/src/finder-list.js.map +1 -0
- package/dist/openscd/src/foundation/compare.js +273 -0
- package/dist/openscd/src/foundation/compare.js.map +1 -0
- package/dist/openscd/src/foundation/dai.js +127 -0
- package/dist/openscd/src/foundation/dai.js.map +1 -0
- package/dist/openscd/src/foundation/generators.js +67 -0
- package/dist/openscd/src/foundation/generators.js.map +1 -0
- package/dist/openscd/src/foundation/ied.js +84 -0
- package/dist/openscd/src/foundation/ied.js.map +1 -0
- package/dist/openscd/src/foundation/nsd.js +13 -0
- package/dist/openscd/src/foundation/nsd.js.map +1 -0
- package/dist/openscd/src/foundation/nsdoc.js +180 -0
- package/dist/openscd/src/foundation/nsdoc.js.map +1 -0
- package/dist/openscd/src/foundation/scl.js +64 -0
- package/dist/openscd/src/foundation/scl.js.map +1 -0
- package/dist/openscd/src/foundation.js +1922 -0
- package/dist/openscd/src/foundation.js.map +1 -0
- package/dist/openscd/src/icons/compare.js +11 -0
- package/dist/openscd/src/icons/compare.js.map +1 -0
- package/dist/openscd/src/icons/icons.js +611 -0
- package/dist/openscd/src/icons/icons.js.map +1 -0
- package/dist/openscd/src/icons/ied-icons.js +11 -0
- package/dist/openscd/src/icons/ied-icons.js.map +1 -0
- package/dist/openscd/src/icons/lnode.js +50 -0
- package/dist/openscd/src/icons/lnode.js.map +1 -0
- package/dist/openscd/src/open-scd.js +483 -0
- package/dist/openscd/src/open-scd.js.map +1 -0
- package/dist/openscd/src/oscd-filter-button.js +89 -0
- package/dist/openscd/src/oscd-filter-button.js.map +1 -0
- package/dist/openscd/src/plain-compare-list.js +132 -0
- package/dist/openscd/src/plain-compare-list.js.map +1 -0
- package/dist/openscd/src/plugin-tag.js +23 -0
- package/dist/openscd/src/plugin-tag.js.map +1 -0
- package/dist/openscd/src/plugin.events.js +12 -0
- package/dist/openscd/src/plugin.events.js.map +1 -0
- package/dist/openscd/src/plugin.js +2 -0
- package/dist/openscd/src/plugin.js.map +1 -0
- package/dist/openscd/src/plugins.js +256 -0
- package/dist/openscd/src/plugins.js.map +1 -0
- package/dist/openscd/src/schemas.js +9325 -0
- package/dist/openscd/src/schemas.js.map +1 -0
- package/dist/openscd/src/themes.js +122 -0
- package/dist/openscd/src/themes.js.map +1 -0
- package/dist/openscd/src/translations/de.js +954 -0
- package/dist/openscd/src/translations/de.js.map +1 -0
- package/dist/openscd/src/translations/en.js +950 -0
- package/dist/openscd/src/translations/en.js.map +1 -0
- package/dist/openscd/src/translations/loader.js +10 -0
- package/dist/openscd/src/translations/loader.js.map +1 -0
- package/dist/openscd/src/wizard-checkbox.js +152 -0
- package/dist/openscd/src/wizard-checkbox.js.map +1 -0
- package/dist/openscd/src/wizard-dialog.js +374 -0
- package/dist/openscd/src/wizard-dialog.js.map +1 -0
- package/dist/openscd/src/wizard-select.js +115 -0
- package/dist/openscd/src/wizard-select.js.map +1 -0
- package/dist/openscd/src/wizard-textfield.js +191 -0
- package/dist/openscd/src/wizard-textfield.js.map +1 -0
- package/dist/openscd/src/wizards.js +196 -0
- package/dist/openscd/src/wizards.js.map +1 -0
- package/dist/oscd-filter-button.d.ts +27 -27
- package/dist/oscd-filter-button.js +59 -59
- package/dist/plain-compare-list.d.ts +36 -36
- package/dist/plain-compare-list.js +70 -70
- package/dist/plugin-tag.d.ts +6 -6
- package/dist/plugin-tag.js +22 -22
- package/dist/plugin.d.ts +23 -23
- package/dist/plugin.events.d.ts +15 -15
- package/dist/plugin.events.js +11 -11
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/plugins.d.ts +3 -3
- package/dist/plugins.js +255 -255
- package/dist/schemas.d.ts +58 -58
- package/dist/schemas.js +59 -59
- package/dist/themes.d.ts +3 -3
- package/dist/themes.js +13 -13
- package/dist/themes.js.map +1 -1
- package/dist/translations/de.d.ts +2 -2
- package/dist/translations/de.js +952 -952
- package/dist/translations/en.d.ts +963 -963
- package/dist/translations/en.js +948 -948
- package/dist/translations/loader.d.ts +12 -12
- package/dist/translations/loader.js +9 -9
- package/dist/translations/loader.js.map +1 -1
- package/dist/wizard-checkbox.d.ts +37 -37
- package/dist/wizard-checkbox.js +130 -130
- package/dist/wizard-dialog.d.ts +45 -45
- package/dist/wizard-dialog.js +235 -235
- package/dist/wizard-dialog.js.map +1 -1
- package/dist/wizard-select.d.ts +31 -31
- package/dist/wizard-select.js +102 -102
- package/dist/wizard-textfield.d.ts +50 -50
- package/dist/wizard-textfield.js +162 -162
- package/dist/wizards.d.ts +23 -23
- package/dist/wizards.js +148 -148
- package/dist/wizards.js.map +1 -1
- package/dist/xml/src/foundation.js +67 -0
- package/dist/xml/src/foundation.js.map +1 -0
- package/dist/xml/src/index.js +2 -0
- package/dist/xml/src/index.js.map +1 -0
- package/package.json +29 -127
- package/dist/Wizarding.d.ts +0 -10
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Strings } from 'lit-translate';
|
|
2
|
-
import { en } from './en.js';
|
|
3
|
-
export interface TranslationObject {
|
|
4
|
-
[key: string]: string | TranslationObject;
|
|
5
|
-
}
|
|
6
|
-
export interface Languages {
|
|
7
|
-
de: TranslationObject;
|
|
8
|
-
en: TranslationObject;
|
|
9
|
-
}
|
|
10
|
-
export declare const languages: Languages;
|
|
11
|
-
export type Translations = typeof en;
|
|
12
|
-
export declare function loader(lang: string): Promise<Strings>;
|
|
1
|
+
import { Strings } from 'lit-translate';
|
|
2
|
+
import { en } from './en.js';
|
|
3
|
+
export interface TranslationObject {
|
|
4
|
+
[key: string]: string | TranslationObject;
|
|
5
|
+
}
|
|
6
|
+
export interface Languages {
|
|
7
|
+
de: TranslationObject;
|
|
8
|
+
en: TranslationObject;
|
|
9
|
+
}
|
|
10
|
+
export declare const languages: Languages;
|
|
11
|
+
export type Translations = typeof en;
|
|
12
|
+
export declare function loader(lang: string): Promise<Strings>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { de } from './de.js';
|
|
2
|
-
import { en } from './en.js';
|
|
3
|
-
export const languages = { en, de };
|
|
4
|
-
export async function loader(lang) {
|
|
5
|
-
if (Object.keys(languages).includes(lang))
|
|
6
|
-
return languages[lang];
|
|
7
|
-
else
|
|
8
|
-
return {};
|
|
9
|
-
}
|
|
1
|
+
import { de } from './de.js';
|
|
2
|
+
import { en } from './en.js';
|
|
3
|
+
export const languages = { en, de };
|
|
4
|
+
export async function loader(lang) {
|
|
5
|
+
if (Object.keys(languages).includes(lang))
|
|
6
|
+
return languages[lang];
|
|
7
|
+
else
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/translations/loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAY7B,MAAM,CAAC,MAAM,SAAS,GAAc,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAI/C,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAY;IACvC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAW,IAAI,CAAC,CAAC;;QACvE,OAAO,EAAE,CAAC;AACjB,CAAC","sourcesContent":["import { Strings } from 'lit-translate';\nimport { de } from './de.js';\nimport { en } from './en.js';\nimport { Language } from '@
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/translations/loader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAY7B,MAAM,CAAC,MAAM,SAAS,GAAc,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAI/C,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAY;IACvC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAW,IAAI,CAAC,CAAC;;QACvE,OAAO,EAAE,CAAC;AACjB,CAAC","sourcesContent":["import { Strings } from 'lit-translate';\nimport { de } from './de.js';\nimport { en } from './en.js';\nimport { Language } from '@openscd/core/foundation/deprecated/settings.js';\n\nexport interface TranslationObject {\n [key: string]: string | TranslationObject;\n}\n\nexport interface Languages {\n de: TranslationObject;\n en: TranslationObject;\n}\n\nexport const languages: Languages = { en, de };\n\nexport type Translations = typeof en;\n\nexport async function loader(lang: string): Promise<Strings> {\n if (Object.keys(languages).includes(lang)) return languages[<Language>lang];\n else return {};\n}\n"]}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import '@material/mwc-formfield';
|
|
3
|
-
import '@material/mwc-switch';
|
|
4
|
-
import '@material/mwc-checkbox';
|
|
5
|
-
import { Checkbox } from '@material/mwc-checkbox';
|
|
6
|
-
import { Switch } from '@material/mwc-switch';
|
|
7
|
-
/** A potentially `nullable` labelled checkbox. */
|
|
8
|
-
export declare class WizardCheckbox extends LitElement {
|
|
9
|
-
label: string;
|
|
10
|
-
/** Parenthetical information rendered after the label: `label (helper)` */
|
|
11
|
-
helper: string;
|
|
12
|
-
/** Whether [[`maybeValue`]] may be `null` */
|
|
13
|
-
nullable: boolean;
|
|
14
|
-
/** The default `checked` state while [[`maybeValue`]] is `null`. */
|
|
15
|
-
defaultChecked: boolean;
|
|
16
|
-
/** Is `"true"` when checked, `"false"` un-checked, `null` if [[`nullable`]]. */
|
|
17
|
-
get maybeValue(): string | null;
|
|
18
|
-
set maybeValue(check: string | null);
|
|
19
|
-
/** Disables component including null switch */
|
|
20
|
-
disabled: boolean;
|
|
21
|
-
private isNull;
|
|
22
|
-
private get null();
|
|
23
|
-
private set null(value);
|
|
24
|
-
private initChecked;
|
|
25
|
-
get checked(): boolean;
|
|
26
|
-
set checked(value: boolean);
|
|
27
|
-
private deactivateCheckbox;
|
|
28
|
-
get formfieldLabel(): string;
|
|
29
|
-
nullSwitch?: Switch;
|
|
30
|
-
checkbox?: Checkbox;
|
|
31
|
-
private nulled;
|
|
32
|
-
private enable;
|
|
33
|
-
private disable;
|
|
34
|
-
firstUpdated(): void;
|
|
35
|
-
renderSwitch(): TemplateResult;
|
|
36
|
-
render(): TemplateResult;
|
|
37
|
-
}
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
+
import '@material/mwc-formfield';
|
|
3
|
+
import '@material/mwc-switch';
|
|
4
|
+
import '@material/mwc-checkbox';
|
|
5
|
+
import { Checkbox } from '@material/mwc-checkbox';
|
|
6
|
+
import { Switch } from '@material/mwc-switch';
|
|
7
|
+
/** A potentially `nullable` labelled checkbox. */
|
|
8
|
+
export declare class WizardCheckbox extends LitElement {
|
|
9
|
+
label: string;
|
|
10
|
+
/** Parenthetical information rendered after the label: `label (helper)` */
|
|
11
|
+
helper: string;
|
|
12
|
+
/** Whether [[`maybeValue`]] may be `null` */
|
|
13
|
+
nullable: boolean;
|
|
14
|
+
/** The default `checked` state while [[`maybeValue`]] is `null`. */
|
|
15
|
+
defaultChecked: boolean;
|
|
16
|
+
/** Is `"true"` when checked, `"false"` un-checked, `null` if [[`nullable`]]. */
|
|
17
|
+
get maybeValue(): string | null;
|
|
18
|
+
set maybeValue(check: string | null);
|
|
19
|
+
/** Disables component including null switch */
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
private isNull;
|
|
22
|
+
private get null();
|
|
23
|
+
private set null(value);
|
|
24
|
+
private initChecked;
|
|
25
|
+
get checked(): boolean;
|
|
26
|
+
set checked(value: boolean);
|
|
27
|
+
private deactivateCheckbox;
|
|
28
|
+
get formfieldLabel(): string;
|
|
29
|
+
nullSwitch?: Switch;
|
|
30
|
+
checkbox?: Checkbox;
|
|
31
|
+
private nulled;
|
|
32
|
+
private enable;
|
|
33
|
+
private disable;
|
|
34
|
+
firstUpdated(): void;
|
|
35
|
+
renderSwitch(): TemplateResult;
|
|
36
|
+
render(): TemplateResult;
|
|
37
|
+
}
|
package/dist/wizard-checkbox.js
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { customElement, html, LitElement, property, query, state, } from 'lit-element';
|
|
3
|
-
import '@material/mwc-formfield';
|
|
4
|
-
import '@material/mwc-switch';
|
|
5
|
-
import '@material/mwc-checkbox';
|
|
6
|
-
/** A potentially `nullable` labelled checkbox. */
|
|
7
|
-
let WizardCheckbox = class WizardCheckbox extends LitElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.label = '';
|
|
11
|
-
/** Parenthetical information rendered after the label: `label (helper)` */
|
|
12
|
-
this.helper = '';
|
|
13
|
-
/** Whether [[`maybeValue`]] may be `null` */
|
|
14
|
-
this.nullable = false;
|
|
15
|
-
/** The default `checked` state while [[`maybeValue`]] is `null`. */
|
|
16
|
-
this.defaultChecked = false;
|
|
17
|
-
/** Disables component including null switch */
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
this.isNull = false;
|
|
20
|
-
this.initChecked = false;
|
|
21
|
-
this.deactivateCheckbox = false;
|
|
22
|
-
this.nulled = null;
|
|
23
|
-
}
|
|
24
|
-
/** Is `"true"` when checked, `"false"` un-checked, `null` if [[`nullable`]]. */
|
|
25
|
-
get maybeValue() {
|
|
26
|
-
return this.null ? null : this.checked ? 'true' : 'false';
|
|
27
|
-
}
|
|
28
|
-
set maybeValue(check) {
|
|
29
|
-
if (check === null)
|
|
30
|
-
this.null = true;
|
|
31
|
-
else {
|
|
32
|
-
this.null = false;
|
|
33
|
-
this.checked = check === 'true' ? true : false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
get null() {
|
|
37
|
-
return this.nullable && this.isNull;
|
|
38
|
-
}
|
|
39
|
-
set null(value) {
|
|
40
|
-
if (!this.nullable || value === this.isNull)
|
|
41
|
-
return;
|
|
42
|
-
this.isNull = value;
|
|
43
|
-
if (this.null)
|
|
44
|
-
this.disable();
|
|
45
|
-
else
|
|
46
|
-
this.enable();
|
|
47
|
-
}
|
|
48
|
-
get checked() {
|
|
49
|
-
return this.checkbox?.checked ?? this.initChecked;
|
|
50
|
-
}
|
|
51
|
-
set checked(value) {
|
|
52
|
-
if (this.checkbox)
|
|
53
|
-
this.checkbox.checked = value;
|
|
54
|
-
else
|
|
55
|
-
this.initChecked = value;
|
|
56
|
-
}
|
|
57
|
-
get formfieldLabel() {
|
|
58
|
-
return this.helper ? `${this.helper} (${this.label})` : this.label;
|
|
59
|
-
}
|
|
60
|
-
enable() {
|
|
61
|
-
if (this.nulled === null)
|
|
62
|
-
return;
|
|
63
|
-
this.checked = this.nulled;
|
|
64
|
-
this.nulled = null;
|
|
65
|
-
this.deactivateCheckbox = false;
|
|
66
|
-
}
|
|
67
|
-
disable() {
|
|
68
|
-
if (this.nulled !== null)
|
|
69
|
-
return;
|
|
70
|
-
this.nulled = this.checked;
|
|
71
|
-
this.checked = this.defaultChecked;
|
|
72
|
-
this.deactivateCheckbox = true;
|
|
73
|
-
}
|
|
74
|
-
firstUpdated() {
|
|
75
|
-
this.requestUpdate();
|
|
76
|
-
}
|
|
77
|
-
renderSwitch() {
|
|
78
|
-
if (this.nullable) {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, html, LitElement, property, query, state, } from 'lit-element';
|
|
3
|
+
import '@material/mwc-formfield';
|
|
4
|
+
import '@material/mwc-switch';
|
|
5
|
+
import '@material/mwc-checkbox';
|
|
6
|
+
/** A potentially `nullable` labelled checkbox. */
|
|
7
|
+
let WizardCheckbox = class WizardCheckbox extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.label = '';
|
|
11
|
+
/** Parenthetical information rendered after the label: `label (helper)` */
|
|
12
|
+
this.helper = '';
|
|
13
|
+
/** Whether [[`maybeValue`]] may be `null` */
|
|
14
|
+
this.nullable = false;
|
|
15
|
+
/** The default `checked` state while [[`maybeValue`]] is `null`. */
|
|
16
|
+
this.defaultChecked = false;
|
|
17
|
+
/** Disables component including null switch */
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
this.isNull = false;
|
|
20
|
+
this.initChecked = false;
|
|
21
|
+
this.deactivateCheckbox = false;
|
|
22
|
+
this.nulled = null;
|
|
23
|
+
}
|
|
24
|
+
/** Is `"true"` when checked, `"false"` un-checked, `null` if [[`nullable`]]. */
|
|
25
|
+
get maybeValue() {
|
|
26
|
+
return this.null ? null : this.checked ? 'true' : 'false';
|
|
27
|
+
}
|
|
28
|
+
set maybeValue(check) {
|
|
29
|
+
if (check === null)
|
|
30
|
+
this.null = true;
|
|
31
|
+
else {
|
|
32
|
+
this.null = false;
|
|
33
|
+
this.checked = check === 'true' ? true : false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get null() {
|
|
37
|
+
return this.nullable && this.isNull;
|
|
38
|
+
}
|
|
39
|
+
set null(value) {
|
|
40
|
+
if (!this.nullable || value === this.isNull)
|
|
41
|
+
return;
|
|
42
|
+
this.isNull = value;
|
|
43
|
+
if (this.null)
|
|
44
|
+
this.disable();
|
|
45
|
+
else
|
|
46
|
+
this.enable();
|
|
47
|
+
}
|
|
48
|
+
get checked() {
|
|
49
|
+
return this.checkbox?.checked ?? this.initChecked;
|
|
50
|
+
}
|
|
51
|
+
set checked(value) {
|
|
52
|
+
if (this.checkbox)
|
|
53
|
+
this.checkbox.checked = value;
|
|
54
|
+
else
|
|
55
|
+
this.initChecked = value;
|
|
56
|
+
}
|
|
57
|
+
get formfieldLabel() {
|
|
58
|
+
return this.helper ? `${this.helper} (${this.label})` : this.label;
|
|
59
|
+
}
|
|
60
|
+
enable() {
|
|
61
|
+
if (this.nulled === null)
|
|
62
|
+
return;
|
|
63
|
+
this.checked = this.nulled;
|
|
64
|
+
this.nulled = null;
|
|
65
|
+
this.deactivateCheckbox = false;
|
|
66
|
+
}
|
|
67
|
+
disable() {
|
|
68
|
+
if (this.nulled !== null)
|
|
69
|
+
return;
|
|
70
|
+
this.nulled = this.checked;
|
|
71
|
+
this.checked = this.defaultChecked;
|
|
72
|
+
this.deactivateCheckbox = true;
|
|
73
|
+
}
|
|
74
|
+
firstUpdated() {
|
|
75
|
+
this.requestUpdate();
|
|
76
|
+
}
|
|
77
|
+
renderSwitch() {
|
|
78
|
+
if (this.nullable) {
|
|
79
79
|
return html `<mwc-switch
|
|
80
80
|
style="margin-left: 12px;"
|
|
81
81
|
?checked=${!this.null}
|
|
82
82
|
?disabled=${this.disabled}
|
|
83
|
-
@change=${() => {
|
|
84
|
-
this.null = !this.nullSwitch.checked;
|
|
83
|
+
@change=${() => {
|
|
84
|
+
this.null = !this.nullSwitch.checked;
|
|
85
85
|
}}
|
|
86
|
-
></mwc-switch>`;
|
|
87
|
-
}
|
|
88
|
-
return html ``;
|
|
89
|
-
}
|
|
90
|
-
render() {
|
|
86
|
+
></mwc-switch>`;
|
|
87
|
+
}
|
|
88
|
+
return html ``;
|
|
89
|
+
}
|
|
90
|
+
render() {
|
|
91
91
|
return html `
|
|
92
92
|
<div style="display: flex; flex-direction: row;">
|
|
93
93
|
<div style="flex: auto;">
|
|
94
94
|
<mwc-formfield
|
|
95
95
|
label="${this.formfieldLabel}"
|
|
96
|
-
style="${this.deactivateCheckbox || this.disabled
|
|
97
|
-
? `--mdc-theme-text-primary-on-background:rgba(0, 0, 0, 0.38)`
|
|
96
|
+
style="${this.deactivateCheckbox || this.disabled
|
|
97
|
+
? `--mdc-theme-text-primary-on-background:rgba(0, 0, 0, 0.38)`
|
|
98
98
|
: ``}"
|
|
99
99
|
><mwc-checkbox
|
|
100
100
|
?checked=${this.initChecked}
|
|
@@ -106,47 +106,47 @@ let WizardCheckbox = class WizardCheckbox extends LitElement {
|
|
|
106
106
|
${this.renderSwitch()}
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
|
-
`;
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
__decorate([
|
|
113
|
-
property({ type: String })
|
|
114
|
-
], WizardCheckbox.prototype, "label", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
property({ type: String })
|
|
117
|
-
], WizardCheckbox.prototype, "helper", void 0);
|
|
118
|
-
__decorate([
|
|
119
|
-
property({ type: Boolean })
|
|
120
|
-
], WizardCheckbox.prototype, "nullable", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
property({ type: Boolean })
|
|
123
|
-
], WizardCheckbox.prototype, "defaultChecked", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
property({ type: String })
|
|
126
|
-
], WizardCheckbox.prototype, "maybeValue", null);
|
|
127
|
-
__decorate([
|
|
128
|
-
property({ type: Boolean })
|
|
129
|
-
], WizardCheckbox.prototype, "disabled", void 0);
|
|
130
|
-
__decorate([
|
|
131
|
-
state()
|
|
132
|
-
], WizardCheckbox.prototype, "null", null);
|
|
133
|
-
__decorate([
|
|
134
|
-
state()
|
|
135
|
-
], WizardCheckbox.prototype, "checked", null);
|
|
136
|
-
__decorate([
|
|
137
|
-
state()
|
|
138
|
-
], WizardCheckbox.prototype, "deactivateCheckbox", void 0);
|
|
139
|
-
__decorate([
|
|
140
|
-
state()
|
|
141
|
-
], WizardCheckbox.prototype, "formfieldLabel", null);
|
|
142
|
-
__decorate([
|
|
143
|
-
query('mwc-switch')
|
|
144
|
-
], WizardCheckbox.prototype, "nullSwitch", void 0);
|
|
145
|
-
__decorate([
|
|
146
|
-
query('mwc-checkbox')
|
|
147
|
-
], WizardCheckbox.prototype, "checkbox", void 0);
|
|
148
|
-
WizardCheckbox = __decorate([
|
|
149
|
-
customElement('wizard-checkbox')
|
|
150
|
-
], WizardCheckbox);
|
|
151
|
-
export { WizardCheckbox };
|
|
109
|
+
`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: String })
|
|
114
|
+
], WizardCheckbox.prototype, "label", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: String })
|
|
117
|
+
], WizardCheckbox.prototype, "helper", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
property({ type: Boolean })
|
|
120
|
+
], WizardCheckbox.prototype, "nullable", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
property({ type: Boolean })
|
|
123
|
+
], WizardCheckbox.prototype, "defaultChecked", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
property({ type: String })
|
|
126
|
+
], WizardCheckbox.prototype, "maybeValue", null);
|
|
127
|
+
__decorate([
|
|
128
|
+
property({ type: Boolean })
|
|
129
|
+
], WizardCheckbox.prototype, "disabled", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
state()
|
|
132
|
+
], WizardCheckbox.prototype, "null", null);
|
|
133
|
+
__decorate([
|
|
134
|
+
state()
|
|
135
|
+
], WizardCheckbox.prototype, "checked", null);
|
|
136
|
+
__decorate([
|
|
137
|
+
state()
|
|
138
|
+
], WizardCheckbox.prototype, "deactivateCheckbox", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
state()
|
|
141
|
+
], WizardCheckbox.prototype, "formfieldLabel", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
query('mwc-switch')
|
|
144
|
+
], WizardCheckbox.prototype, "nullSwitch", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
query('mwc-checkbox')
|
|
147
|
+
], WizardCheckbox.prototype, "checkbox", void 0);
|
|
148
|
+
WizardCheckbox = __decorate([
|
|
149
|
+
customElement('wizard-checkbox')
|
|
150
|
+
], WizardCheckbox);
|
|
151
|
+
export { WizardCheckbox };
|
|
152
152
|
//# sourceMappingURL=wizard-checkbox.js.map
|
package/dist/wizard-dialog.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
-
import '@material/mwc-button';
|
|
3
|
-
import '@material/mwc-dialog';
|
|
4
|
-
import '@material/mwc-icon-button';
|
|
5
|
-
import '@material/mwc-icon-button-toggle';
|
|
6
|
-
import '@material/mwc-menu';
|
|
7
|
-
import { Dialog } from '@material/mwc-dialog';
|
|
8
|
-
import { IconButton } from '@material/mwc-icon-button';
|
|
9
|
-
import { Menu } from '@material/mwc-menu';
|
|
10
|
-
import 'ace-custom-element';
|
|
11
|
-
import './wizard-checkbox.js';
|
|
12
|
-
import './wizard-textfield.js';
|
|
13
|
-
import './wizard-select.js';
|
|
14
|
-
import { Wizard, WizardInputElement, WizardPage, WizardActor, WizardMenuActor } from './foundation.js';
|
|
15
|
-
/** A wizard style dialog consisting of several pages commiting some
|
|
16
|
-
* [[`EditorAction`]] on completion and aborting on dismissal. */
|
|
17
|
-
export declare class WizardDialog extends LitElement {
|
|
18
|
-
/** The [[`Wizard`]] implemented by this dialog. */
|
|
19
|
-
wizard: Wizard;
|
|
20
|
-
/** Index of the currently active [[`WizardPage`]] */
|
|
21
|
-
pageIndex: number;
|
|
22
|
-
dialogs: NodeListOf<Dialog>;
|
|
23
|
-
inputs: NodeListOf<WizardInputElement>;
|
|
24
|
-
actionsMenu: Menu;
|
|
25
|
-
menuButton: IconButton;
|
|
26
|
-
/** The `Dialog` showing the active [[`WizardPage`]]. */
|
|
27
|
-
get dialog(): Dialog | undefined;
|
|
28
|
-
get code(): boolean;
|
|
29
|
-
/** Checks the inputs of all [[`WizardPage`]]s for validity. */
|
|
30
|
-
checkValidity(): boolean;
|
|
31
|
-
private get firstInvalidPage();
|
|
32
|
-
prev(): void;
|
|
33
|
-
next(): Promise<void>;
|
|
34
|
-
/** Commits `action` if all inputs are valid, reports validity otherwise. */
|
|
35
|
-
act(action?: WizardActor, primary?: boolean): Promise<boolean>;
|
|
36
|
-
/** Triggers menu action callback */
|
|
37
|
-
menuAct(action?: WizardMenuActor): Promise<void>;
|
|
38
|
-
private onClosed;
|
|
39
|
-
constructor();
|
|
40
|
-
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
41
|
-
renderMenu(page: WizardPage): TemplateResult;
|
|
42
|
-
renderPage(page: WizardPage, index: number): TemplateResult;
|
|
43
|
-
render(): TemplateResult;
|
|
44
|
-
static styles: import("lit-element").CSSResult;
|
|
45
|
-
}
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit-element';
|
|
2
|
+
import '@material/mwc-button';
|
|
3
|
+
import '@material/mwc-dialog';
|
|
4
|
+
import '@material/mwc-icon-button';
|
|
5
|
+
import '@material/mwc-icon-button-toggle';
|
|
6
|
+
import '@material/mwc-menu';
|
|
7
|
+
import { Dialog } from '@material/mwc-dialog';
|
|
8
|
+
import { IconButton } from '@material/mwc-icon-button';
|
|
9
|
+
import { Menu } from '@material/mwc-menu';
|
|
10
|
+
import 'ace-custom-element';
|
|
11
|
+
import './wizard-checkbox.js';
|
|
12
|
+
import './wizard-textfield.js';
|
|
13
|
+
import './wizard-select.js';
|
|
14
|
+
import { Wizard, WizardInputElement, WizardPage, WizardActor, WizardMenuActor } from './foundation.js';
|
|
15
|
+
/** A wizard style dialog consisting of several pages commiting some
|
|
16
|
+
* [[`EditorAction`]] on completion and aborting on dismissal. */
|
|
17
|
+
export declare class WizardDialog extends LitElement {
|
|
18
|
+
/** The [[`Wizard`]] implemented by this dialog. */
|
|
19
|
+
wizard: Wizard;
|
|
20
|
+
/** Index of the currently active [[`WizardPage`]] */
|
|
21
|
+
pageIndex: number;
|
|
22
|
+
dialogs: NodeListOf<Dialog>;
|
|
23
|
+
inputs: NodeListOf<WizardInputElement>;
|
|
24
|
+
actionsMenu: Menu;
|
|
25
|
+
menuButton: IconButton;
|
|
26
|
+
/** The `Dialog` showing the active [[`WizardPage`]]. */
|
|
27
|
+
get dialog(): Dialog | undefined;
|
|
28
|
+
get code(): boolean;
|
|
29
|
+
/** Checks the inputs of all [[`WizardPage`]]s for validity. */
|
|
30
|
+
checkValidity(): boolean;
|
|
31
|
+
private get firstInvalidPage();
|
|
32
|
+
prev(): void;
|
|
33
|
+
next(): Promise<void>;
|
|
34
|
+
/** Commits `action` if all inputs are valid, reports validity otherwise. */
|
|
35
|
+
act(action?: WizardActor, primary?: boolean): Promise<boolean>;
|
|
36
|
+
/** Triggers menu action callback */
|
|
37
|
+
menuAct(action?: WizardMenuActor): Promise<void>;
|
|
38
|
+
private onClosed;
|
|
39
|
+
constructor();
|
|
40
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
41
|
+
renderMenu(page: WizardPage): TemplateResult;
|
|
42
|
+
renderPage(page: WizardPage, index: number): TemplateResult;
|
|
43
|
+
render(): TemplateResult;
|
|
44
|
+
static styles: import("lit-element").CSSResult;
|
|
45
|
+
}
|