@compas-oscd/open-scd 0.34.21 → 0.34.23
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 +1 -0
- package/dist/WizardDivider.d.ts.map +1 -0
- package/dist/Wizarding.d.ts +20 -0
- package/dist/Wizarding.d.ts.map +1 -0
- package/dist/Wizarding.js +4 -1
- package/dist/Wizarding.js.map +1 -1
- package/dist/action-icon.d.ts +1 -0
- package/dist/action-icon.d.ts.map +1 -0
- package/dist/action-pane.d.ts +1 -0
- package/dist/action-pane.d.ts.map +1 -0
- package/dist/addons/Editor.d.ts +1 -0
- package/dist/addons/Editor.d.ts.map +1 -0
- package/dist/addons/History.d.ts +11 -0
- package/dist/addons/History.d.ts.map +1 -0
- package/dist/addons/History.js +10 -0
- package/dist/addons/History.js.map +1 -1
- package/dist/addons/Layout.d.ts +1 -0
- package/dist/addons/Layout.d.ts.map +1 -0
- package/dist/addons/Settings.d.ts +1 -0
- package/dist/addons/Settings.d.ts.map +1 -0
- package/dist/addons/Waiter.d.ts +1 -0
- package/dist/addons/Waiter.d.ts.map +1 -0
- package/dist/addons/Wizards.d.ts +1 -0
- package/dist/addons/Wizards.d.ts.map +1 -0
- package/dist/addons/editor/edit-action-to-v1-converter.d.ts +1 -0
- package/dist/addons/editor/edit-action-to-v1-converter.d.ts.map +1 -0
- package/dist/addons/editor/edit-v1-to-v2-converter.d.ts +1 -0
- package/dist/addons/editor/edit-v1-to-v2-converter.d.ts.map +1 -0
- package/dist/addons/history/get-log-text.d.ts +1 -0
- package/dist/addons/history/get-log-text.d.ts.map +1 -0
- package/dist/addons/menu-tabs/menu-tabs.d.ts +1 -0
- package/dist/addons/menu-tabs/menu-tabs.d.ts.map +1 -0
- package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts +1 -0
- package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts.map +1 -0
- package/dist/addons/plugin-manager/plugin-manager.d.ts +1 -0
- package/dist/addons/plugin-manager/plugin-manager.d.ts.map +1 -0
- package/dist/filtered-list.d.ts +1 -0
- package/dist/filtered-list.d.ts.map +1 -0
- package/dist/finder-list.d.ts +1 -0
- package/dist/finder-list.d.ts.map +1 -0
- package/dist/foundation/compare.d.ts +1 -0
- package/dist/foundation/compare.d.ts.map +1 -0
- package/dist/foundation/dai.d.ts +1 -0
- package/dist/foundation/dai.d.ts.map +1 -0
- package/dist/foundation/generators.d.ts +1 -0
- package/dist/foundation/generators.d.ts.map +1 -0
- package/dist/foundation/ied.d.ts +1 -0
- package/dist/foundation/ied.d.ts.map +1 -0
- package/dist/foundation/nsd.d.ts +1 -0
- package/dist/foundation/nsd.d.ts.map +1 -0
- package/dist/foundation/nsdoc.d.ts +1 -0
- package/dist/foundation/nsdoc.d.ts.map +1 -0
- package/dist/foundation/scl.d.ts +1 -0
- package/dist/foundation/scl.d.ts.map +1 -0
- package/dist/foundation.d.ts +1 -0
- package/dist/foundation.d.ts.map +1 -0
- package/dist/icons/compare.d.ts +1 -0
- package/dist/icons/compare.d.ts.map +1 -0
- package/dist/icons/icons.d.ts +1 -0
- package/dist/icons/icons.d.ts.map +1 -0
- package/dist/icons/ied-icons.d.ts +1 -0
- package/dist/icons/ied-icons.d.ts.map +1 -0
- package/dist/icons/lnode.d.ts +1 -0
- package/dist/icons/lnode.d.ts.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/open-scd.d.ts +1 -0
- package/dist/open-scd.d.ts.map +1 -0
- package/dist/oscd-filter-button.d.ts +1 -0
- package/dist/oscd-filter-button.d.ts.map +1 -0
- package/dist/plain-compare-list.d.ts +1 -0
- package/dist/plain-compare-list.d.ts.map +1 -0
- package/dist/plugin-tag.d.ts +1 -0
- package/dist/plugin-tag.d.ts.map +1 -0
- package/dist/plugin.d.ts +1 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.events.d.ts +1 -0
- package/dist/plugin.events.d.ts.map +1 -0
- package/dist/plugins.d.ts +1 -0
- package/dist/plugins.d.ts.map +1 -0
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/themes.d.ts +1 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/translations/de.d.ts +1 -0
- package/dist/translations/de.d.ts.map +1 -0
- package/dist/translations/en.d.ts +1 -0
- package/dist/translations/en.d.ts.map +1 -0
- package/dist/translations/loader.d.ts +1 -0
- package/dist/translations/loader.d.ts.map +1 -0
- package/dist/wizard-checkbox.d.ts +1 -0
- package/dist/wizard-checkbox.d.ts.map +1 -0
- package/dist/wizard-dialog.d.ts +1 -0
- package/dist/wizard-dialog.d.ts.map +1 -0
- package/dist/wizard-select.d.ts +1 -0
- package/dist/wizard-select.d.ts.map +1 -0
- package/dist/wizard-textfield.d.ts +2 -1
- package/dist/wizard-textfield.d.ts.map +1 -0
- package/dist/wizards.d.ts +1 -0
- package/dist/wizards.d.ts.map +1 -0
- package/package.json +317 -47
- package/dist/core/api/api.js +0 -7
- package/dist/core/api/api.js.map +0 -1
- package/dist/core/api/editor/subject.js +0 -22
- package/dist/core/api/editor/subject.js.map +0 -1
- package/dist/core/api/editor/xml-editor.js +0 -82
- package/dist/core/api/editor/xml-editor.js.map +0 -1
- package/dist/core/api/plugin-state-api.js +0 -27
- package/dist/core/api/plugin-state-api.js.map +0 -1
- package/dist/core/foundation/cyrb64.js +0 -26
- package/dist/core/foundation/cyrb64.js.map +0 -1
- package/dist/core/foundation/deprecated/edit-event.js +0 -44
- package/dist/core/foundation/deprecated/edit-event.js.map +0 -1
- package/dist/core/foundation/deprecated/editor.js +0 -94
- package/dist/core/foundation/deprecated/editor.js.map +0 -1
- package/dist/core/foundation/deprecated/history.js +0 -17
- package/dist/core/foundation/deprecated/history.js.map +0 -1
- package/dist/core/foundation/deprecated/open-event.js +0 -9
- package/dist/core/foundation/deprecated/open-event.js.map +0 -1
- package/dist/core/foundation/deprecated/settings.js +0 -19
- package/dist/core/foundation/deprecated/settings.js.map +0 -1
- package/dist/core/foundation/deprecated/validation.js +0 -8
- package/dist/core/foundation/deprecated/validation.js.map +0 -1
- package/dist/core/foundation/deprecated/waiter.js +0 -12
- package/dist/core/foundation/deprecated/waiter.js.map +0 -1
- package/dist/core/foundation/edit-completed-event.js +0 -11
- package/dist/core/foundation/edit-completed-event.js.map +0 -1
- package/dist/core/foundation/edit-event.js +0 -8
- package/dist/core/foundation/edit-event.js.map +0 -1
- package/dist/core/foundation/edit.js +0 -31
- package/dist/core/foundation/edit.js.map +0 -1
- package/dist/core/foundation/handle-edit.js +0 -151
- package/dist/core/foundation/handle-edit.js.map +0 -1
- package/dist/core/foundation/open-event.js +0 -8
- package/dist/core/foundation/open-event.js.map +0 -1
- package/dist/core/foundation/plugin.js +0 -2
- package/dist/core/foundation/plugin.js.map +0 -1
- package/dist/core/foundation.js +0 -14
- package/dist/core/foundation.js.map +0 -1
- package/dist/core/locales.js +0 -21
- package/dist/core/locales.js.map +0 -1
- package/dist/openscd/src/WizardDivider.js +0 -37
- package/dist/openscd/src/WizardDivider.js.map +0 -1
- package/dist/openscd/src/Wizarding.js +0 -38
- package/dist/openscd/src/Wizarding.js.map +0 -1
- package/dist/openscd/src/action-icon.js +0 -220
- package/dist/openscd/src/action-icon.js.map +0 -1
- package/dist/openscd/src/action-pane.js +0 -176
- package/dist/openscd/src/action-pane.js.map +0 -1
- package/dist/openscd/src/addons/Editor.js +0 -106
- package/dist/openscd/src/addons/Editor.js.map +0 -1
- package/dist/openscd/src/addons/History.js +0 -490
- package/dist/openscd/src/addons/History.js.map +0 -1
- package/dist/openscd/src/addons/Layout.js +0 -619
- package/dist/openscd/src/addons/Layout.js.map +0 -1
- package/dist/openscd/src/addons/Settings.js +0 -465
- package/dist/openscd/src/addons/Settings.js.map +0 -1
- package/dist/openscd/src/addons/Waiter.js +0 -45
- package/dist/openscd/src/addons/Waiter.js.map +0 -1
- package/dist/openscd/src/addons/Wizards.js +0 -48
- package/dist/openscd/src/addons/Wizards.js.map +0 -1
- package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js +0 -96
- package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js.map +0 -1
- package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js +0 -37
- package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js.map +0 -1
- package/dist/openscd/src/addons/history/get-log-text.js +0 -26
- package/dist/openscd/src/addons/history/get-log-text.js.map +0 -1
- package/dist/openscd/src/addons/menu-tabs/menu-tabs.js +0 -74
- package/dist/openscd/src/addons/menu-tabs/menu-tabs.js.map +0 -1
- package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js +0 -177
- package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js.map +0 -1
- package/dist/openscd/src/addons/plugin-manager/plugin-manager.js +0 -165
- package/dist/openscd/src/addons/plugin-manager/plugin-manager.js.map +0 -1
- package/dist/openscd/src/filtered-list.js +0 -168
- package/dist/openscd/src/filtered-list.js.map +0 -1
- package/dist/openscd/src/finder-list.js +0 -207
- package/dist/openscd/src/finder-list.js.map +0 -1
- package/dist/openscd/src/foundation/compare.js +0 -273
- package/dist/openscd/src/foundation/compare.js.map +0 -1
- package/dist/openscd/src/foundation/dai.js +0 -127
- package/dist/openscd/src/foundation/dai.js.map +0 -1
- package/dist/openscd/src/foundation/generators.js +0 -67
- package/dist/openscd/src/foundation/generators.js.map +0 -1
- package/dist/openscd/src/foundation/ied.js +0 -84
- package/dist/openscd/src/foundation/ied.js.map +0 -1
- package/dist/openscd/src/foundation/nsd.js +0 -13
- package/dist/openscd/src/foundation/nsd.js.map +0 -1
- package/dist/openscd/src/foundation/nsdoc.js +0 -180
- package/dist/openscd/src/foundation/nsdoc.js.map +0 -1
- package/dist/openscd/src/foundation/scl.js +0 -64
- package/dist/openscd/src/foundation/scl.js.map +0 -1
- package/dist/openscd/src/foundation.js +0 -1922
- package/dist/openscd/src/foundation.js.map +0 -1
- package/dist/openscd/src/icons/compare.js +0 -11
- package/dist/openscd/src/icons/compare.js.map +0 -1
- package/dist/openscd/src/icons/icons.js +0 -611
- package/dist/openscd/src/icons/icons.js.map +0 -1
- package/dist/openscd/src/icons/ied-icons.js +0 -11
- package/dist/openscd/src/icons/ied-icons.js.map +0 -1
- package/dist/openscd/src/icons/lnode.js +0 -50
- package/dist/openscd/src/icons/lnode.js.map +0 -1
- package/dist/openscd/src/open-scd.js +0 -483
- package/dist/openscd/src/open-scd.js.map +0 -1
- package/dist/openscd/src/oscd-filter-button.js +0 -89
- package/dist/openscd/src/oscd-filter-button.js.map +0 -1
- package/dist/openscd/src/plain-compare-list.js +0 -132
- package/dist/openscd/src/plain-compare-list.js.map +0 -1
- package/dist/openscd/src/plugin-tag.js +0 -23
- package/dist/openscd/src/plugin-tag.js.map +0 -1
- package/dist/openscd/src/plugin.events.js +0 -12
- package/dist/openscd/src/plugin.events.js.map +0 -1
- package/dist/openscd/src/plugin.js +0 -2
- package/dist/openscd/src/plugin.js.map +0 -1
- package/dist/openscd/src/plugins.js +0 -256
- package/dist/openscd/src/plugins.js.map +0 -1
- package/dist/openscd/src/schemas.js +0 -9325
- package/dist/openscd/src/schemas.js.map +0 -1
- package/dist/openscd/src/themes.js +0 -122
- package/dist/openscd/src/themes.js.map +0 -1
- package/dist/openscd/src/translations/de.js +0 -954
- package/dist/openscd/src/translations/de.js.map +0 -1
- package/dist/openscd/src/translations/en.js +0 -950
- package/dist/openscd/src/translations/en.js.map +0 -1
- package/dist/openscd/src/translations/loader.js +0 -10
- package/dist/openscd/src/translations/loader.js.map +0 -1
- package/dist/openscd/src/wizard-checkbox.js +0 -152
- package/dist/openscd/src/wizard-checkbox.js.map +0 -1
- package/dist/openscd/src/wizard-dialog.js +0 -374
- package/dist/openscd/src/wizard-dialog.js.map +0 -1
- package/dist/openscd/src/wizard-select.js +0 -115
- package/dist/openscd/src/wizard-select.js.map +0 -1
- package/dist/openscd/src/wizard-textfield.js +0 -191
- package/dist/openscd/src/wizard-textfield.js.map +0 -1
- package/dist/openscd/src/wizards.js +0 -196
- package/dist/openscd/src/wizards.js.map +0 -1
- package/dist/xml/src/foundation.js +0 -67
- package/dist/xml/src/foundation.js.map +0 -1
- package/dist/xml/src/index.js +0 -2
- package/dist/xml/src/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compas-oscd/open-scd",
|
|
3
|
-
"version": "0.34.
|
|
4
|
-
"repository":
|
|
5
|
-
|
|
3
|
+
"version": "0.34.23",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/com-pas/open-scd.git",
|
|
7
|
+
"directory": "packages/openscd"
|
|
8
|
+
},
|
|
6
9
|
"description": "A bottom-up substation configuration designer for projects described using SCL `IEC 61850-6` Edition 2 or greater.",
|
|
7
10
|
"keywords": [
|
|
8
11
|
"SCL",
|
|
@@ -14,52 +17,318 @@
|
|
|
14
17
|
],
|
|
15
18
|
"author": "OMICRON electronics GmbH",
|
|
16
19
|
"license": "Apache-2.0",
|
|
17
|
-
"main": "./dist/
|
|
18
|
-
"module": "./dist/
|
|
20
|
+
"main": "./dist/index.js",
|
|
21
|
+
"module": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./src/addons/Waiter.js": {
|
|
30
|
+
"types": "./dist/addons/Waiter.d.ts",
|
|
31
|
+
"import": "./dist/addons/Waiter.js",
|
|
32
|
+
"default": "./dist/addons/Waiter.js"
|
|
33
|
+
},
|
|
34
|
+
"./src/addons/Settings.js": {
|
|
35
|
+
"types": "./dist/addons/Settings.d.ts",
|
|
36
|
+
"import": "./dist/addons/Settings.js",
|
|
37
|
+
"default": "./dist/addons/Settings.js"
|
|
38
|
+
},
|
|
39
|
+
"./src/addons/History.js": {
|
|
40
|
+
"types": "./dist/addons/History.d.ts",
|
|
41
|
+
"import": "./dist/addons/History.js",
|
|
42
|
+
"default": "./dist/addons/History.js"
|
|
43
|
+
},
|
|
44
|
+
"./src/addons/Layout.js": {
|
|
45
|
+
"types": "./dist/addons/Layout.d.ts",
|
|
46
|
+
"import": "./dist/addons/Layout.js",
|
|
47
|
+
"default": "./dist/addons/Layout.js"
|
|
48
|
+
},
|
|
49
|
+
"./src/foundation.js": {
|
|
50
|
+
"types": "./dist/foundation.d.ts",
|
|
51
|
+
"import": "./dist/foundation.js",
|
|
52
|
+
"default": "./dist/foundation.js"
|
|
53
|
+
},
|
|
54
|
+
"./src/foundation": {
|
|
55
|
+
"types": "./dist/foundation.d.ts",
|
|
56
|
+
"import": "./dist/foundation.js",
|
|
57
|
+
"default": "./dist/foundation.js"
|
|
58
|
+
},
|
|
59
|
+
"./src/foundation/nsdoc.js": {
|
|
60
|
+
"types": "./dist/foundation/nsdoc.d.ts",
|
|
61
|
+
"import": "./dist/foundation/nsdoc.js",
|
|
62
|
+
"default": "./dist/foundation/nsdoc.js"
|
|
63
|
+
},
|
|
64
|
+
"./src/plugin.js": {
|
|
65
|
+
"types": "./dist/plugin.d.ts",
|
|
66
|
+
"import": "./dist/plugin.js",
|
|
67
|
+
"default": "./dist/plugin.js"
|
|
68
|
+
},
|
|
69
|
+
"./src/plugin.events.js": {
|
|
70
|
+
"types": "./dist/plugin.events.d.ts",
|
|
71
|
+
"import": "./dist/plugin.events.js",
|
|
72
|
+
"default": "./dist/plugin.events.js"
|
|
73
|
+
},
|
|
74
|
+
"./src/plugin-tag.js": {
|
|
75
|
+
"types": "./dist/plugin-tag.d.ts",
|
|
76
|
+
"import": "./dist/plugin-tag.js",
|
|
77
|
+
"default": "./dist/plugin-tag.js"
|
|
78
|
+
},
|
|
79
|
+
"./src/schemas.js": {
|
|
80
|
+
"types": "./dist/schemas.d.ts",
|
|
81
|
+
"import": "./dist/schemas.js",
|
|
82
|
+
"default": "./dist/schemas.js"
|
|
83
|
+
},
|
|
84
|
+
"./src/wizards.js": {
|
|
85
|
+
"types": "./dist/wizards.d.ts",
|
|
86
|
+
"import": "./dist/wizards.js",
|
|
87
|
+
"default": "./dist/wizards.js"
|
|
88
|
+
},
|
|
89
|
+
"./src/translations/de.js": {
|
|
90
|
+
"types": "./dist/translations/de.d.ts",
|
|
91
|
+
"import": "./dist/translations/de.js",
|
|
92
|
+
"default": "./dist/translations/de.js"
|
|
93
|
+
},
|
|
94
|
+
"./src/translations/en.js": {
|
|
95
|
+
"types": "./dist/translations/en.d.ts",
|
|
96
|
+
"import": "./dist/translations/en.js",
|
|
97
|
+
"default": "./dist/translations/en.js"
|
|
98
|
+
},
|
|
99
|
+
"./src/filtered-list.js": {
|
|
100
|
+
"types": "./dist/filtered-list.d.ts",
|
|
101
|
+
"import": "./dist/filtered-list.js",
|
|
102
|
+
"default": "./dist/filtered-list.js"
|
|
103
|
+
},
|
|
104
|
+
"./finder-list.js": {
|
|
105
|
+
"types": "./dist/finder-list.d.ts",
|
|
106
|
+
"import": "./dist/finder-list.js",
|
|
107
|
+
"default": "./dist/finder-list.js"
|
|
108
|
+
},
|
|
109
|
+
"./src/wizard-textfield.js": {
|
|
110
|
+
"types": "./dist/wizard-textfield.d.ts",
|
|
111
|
+
"import": "./dist/wizard-textfield.js",
|
|
112
|
+
"default": "./dist/wizard-textfield.js"
|
|
113
|
+
},
|
|
114
|
+
"./src/oscd-filter-button.js": {
|
|
115
|
+
"types": "./dist/oscd-filter-button.d.ts",
|
|
116
|
+
"import": "./dist/oscd-filter-button.js",
|
|
117
|
+
"default": "./dist/oscd-filter-button.js"
|
|
118
|
+
},
|
|
119
|
+
"./src/WizardDivider.js": {
|
|
120
|
+
"types": "./dist/WizardDivider.d.ts",
|
|
121
|
+
"import": "./dist/WizardDivider.js",
|
|
122
|
+
"default": "./dist/WizardDivider.js"
|
|
123
|
+
},
|
|
124
|
+
"./wizard-checkbox.js": {
|
|
125
|
+
"types": "./dist/wizard-checkbox.d.ts",
|
|
126
|
+
"import": "./dist/wizard-checkbox.js",
|
|
127
|
+
"default": "./dist/wizard-checkbox.js"
|
|
128
|
+
},
|
|
129
|
+
"./wizard-dialog.js": {
|
|
130
|
+
"types": "./dist/wizard-dialog.d.ts",
|
|
131
|
+
"import": "./dist/wizard-dialog.js",
|
|
132
|
+
"default": "./dist/wizard-dialog.js"
|
|
133
|
+
},
|
|
134
|
+
"./wizard-select.js": {
|
|
135
|
+
"types": "./dist/wizard-select.d.ts",
|
|
136
|
+
"import": "./dist/wizard-select.js",
|
|
137
|
+
"default": "./dist/wizard-select.js"
|
|
138
|
+
},
|
|
139
|
+
"./src/plain-compare-list.js": {
|
|
140
|
+
"types": "./dist/plain-compare-list.d.ts",
|
|
141
|
+
"import": "./dist/plain-compare-list.js",
|
|
142
|
+
"default": "./dist/plain-compare-list.js"
|
|
143
|
+
},
|
|
144
|
+
"./src/action-pane.js": {
|
|
145
|
+
"types": "./dist/action-pane.d.ts",
|
|
146
|
+
"import": "./dist/action-pane.js",
|
|
147
|
+
"default": "./dist/action-pane.js"
|
|
148
|
+
},
|
|
149
|
+
"./src/action-icon.js": {
|
|
150
|
+
"types": "./dist/action-icon.d.ts",
|
|
151
|
+
"import": "./dist/action-icon.js",
|
|
152
|
+
"default": "./dist/action-icon.js"
|
|
153
|
+
},
|
|
154
|
+
"./addons/Waiter.js": {
|
|
155
|
+
"types": "./dist/addons/Waiter.d.ts",
|
|
156
|
+
"import": "./dist/addons/Waiter.js",
|
|
157
|
+
"default": "./dist/addons/Waiter.js"
|
|
158
|
+
},
|
|
159
|
+
"./addons/Settings.js": {
|
|
160
|
+
"types": "./dist/addons/Settings.d.ts",
|
|
161
|
+
"import": "./dist/addons/Settings.js",
|
|
162
|
+
"default": "./dist/addons/Settings.js"
|
|
163
|
+
},
|
|
164
|
+
"./addons/History.js": {
|
|
165
|
+
"types": "./dist/addons/History.d.ts",
|
|
166
|
+
"import": "./dist/addons/History.js",
|
|
167
|
+
"default": "./dist/addons/History.js"
|
|
168
|
+
},
|
|
169
|
+
"./addons/Layout.js": {
|
|
170
|
+
"types": "./dist/addons/Layout.d.ts",
|
|
171
|
+
"import": "./dist/addons/Layout.js",
|
|
172
|
+
"default": "./dist/addons/Layout.js"
|
|
173
|
+
},
|
|
174
|
+
"./addons/Wizards.js": {
|
|
175
|
+
"types": "./dist/addons/Wizards.d.ts",
|
|
176
|
+
"import": "./dist/addons/Wizards.js",
|
|
177
|
+
"default": "./dist/addons/Wizards.js"
|
|
178
|
+
},
|
|
179
|
+
"./foundation.js": {
|
|
180
|
+
"types": "./dist/foundation.d.ts",
|
|
181
|
+
"import": "./dist/foundation.js",
|
|
182
|
+
"default": "./dist/foundation.js"
|
|
183
|
+
},
|
|
184
|
+
"./foundation": {
|
|
185
|
+
"types": "./dist/foundation.d.ts",
|
|
186
|
+
"import": "./dist/foundation.js",
|
|
187
|
+
"default": "./dist/foundation.js"
|
|
188
|
+
},
|
|
189
|
+
"./foundation/nsdoc.js": {
|
|
190
|
+
"types": "./dist/foundation/nsdoc.d.ts",
|
|
191
|
+
"import": "./dist/foundation/nsdoc.js",
|
|
192
|
+
"default": "./dist/foundation/nsdoc.js"
|
|
193
|
+
},
|
|
194
|
+
"./foundation/compare.js": {
|
|
195
|
+
"types": "./dist/foundation/compare.d.ts",
|
|
196
|
+
"import": "./dist/foundation/compare.js",
|
|
197
|
+
"default": "./dist/foundation/compare.js"
|
|
198
|
+
},
|
|
199
|
+
"./foundation/dai.js": {
|
|
200
|
+
"types": "./dist/foundation/dai.d.ts",
|
|
201
|
+
"import": "./dist/foundation/dai.js",
|
|
202
|
+
"default": "./dist/foundation/dai.js"
|
|
203
|
+
},
|
|
204
|
+
"./foundation/generators.js": {
|
|
205
|
+
"types": "./dist/foundation/generators.d.ts",
|
|
206
|
+
"import": "./dist/foundation/generators.js",
|
|
207
|
+
"default": "./dist/foundation/generators.js"
|
|
208
|
+
},
|
|
209
|
+
"./foundation/ied.js": {
|
|
210
|
+
"types": "./dist/foundation/ied.d.ts",
|
|
211
|
+
"import": "./dist/foundation/ied.js",
|
|
212
|
+
"default": "./dist/foundation/ied.js"
|
|
213
|
+
},
|
|
214
|
+
"./foundation/nsd.js": {
|
|
215
|
+
"types": "./dist/foundation/nsd.d.ts",
|
|
216
|
+
"import": "./dist/foundation/nsd.js",
|
|
217
|
+
"default": "./dist/foundation/nsd.js"
|
|
218
|
+
},
|
|
219
|
+
"./foundation/scl.js": {
|
|
220
|
+
"types": "./dist/foundation/scl.d.ts",
|
|
221
|
+
"import": "./dist/foundation/scl.js",
|
|
222
|
+
"default": "./dist/foundation/scl.js"
|
|
223
|
+
},
|
|
224
|
+
"./icons/icons.js": {
|
|
225
|
+
"types": "./dist/icons/icons.d.ts",
|
|
226
|
+
"import": "./dist/icons/icons.js",
|
|
227
|
+
"default": "./dist/icons/icons.js"
|
|
228
|
+
},
|
|
229
|
+
"./icons/compare.js": {
|
|
230
|
+
"types": "./dist/icons/compare.d.ts",
|
|
231
|
+
"import": "./dist/icons/compare.js",
|
|
232
|
+
"default": "./dist/icons/compare.js"
|
|
233
|
+
},
|
|
234
|
+
"./icons/ied-icons.js": {
|
|
235
|
+
"types": "./dist/icons/ied-icons.d.ts",
|
|
236
|
+
"import": "./dist/icons/ied-icons.js",
|
|
237
|
+
"default": "./dist/icons/ied-icons.js"
|
|
238
|
+
},
|
|
239
|
+
"./icons/lnode.js": {
|
|
240
|
+
"types": "./dist/icons/lnode.d.ts",
|
|
241
|
+
"import": "./dist/icons/lnode.js",
|
|
242
|
+
"default": "./dist/icons/lnode.js"
|
|
243
|
+
},
|
|
244
|
+
"./WizardDivider.js": {
|
|
245
|
+
"types": "./dist/WizardDivider.d.ts",
|
|
246
|
+
"import": "./dist/WizardDivider.js",
|
|
247
|
+
"default": "./dist/WizardDivider.js"
|
|
248
|
+
},
|
|
249
|
+
"./Wizarding.js": {
|
|
250
|
+
"types": "./dist/Wizarding.d.ts",
|
|
251
|
+
"import": "./dist/Wizarding.js",
|
|
252
|
+
"default": "./dist/Wizarding.js"
|
|
253
|
+
},
|
|
254
|
+
"./plugin.js": {
|
|
255
|
+
"types": "./dist/plugin.d.ts",
|
|
256
|
+
"import": "./dist/plugin.js",
|
|
257
|
+
"default": "./dist/plugin.js"
|
|
258
|
+
},
|
|
259
|
+
"./plugin.events.js": {
|
|
260
|
+
"types": "./dist/plugin.events.d.ts",
|
|
261
|
+
"import": "./dist/plugin.events.js",
|
|
262
|
+
"default": "./dist/plugin.events.js"
|
|
263
|
+
},
|
|
264
|
+
"./plugin-tag.js": {
|
|
265
|
+
"types": "./dist/plugin-tag.d.ts",
|
|
266
|
+
"import": "./dist/plugin-tag.js",
|
|
267
|
+
"default": "./dist/plugin-tag.js"
|
|
268
|
+
},
|
|
269
|
+
"./schemas.js": {
|
|
270
|
+
"types": "./dist/schemas.d.ts",
|
|
271
|
+
"import": "./dist/schemas.js",
|
|
272
|
+
"default": "./dist/schemas.js"
|
|
273
|
+
},
|
|
274
|
+
"./wizards.js": {
|
|
275
|
+
"types": "./dist/wizards.d.ts",
|
|
276
|
+
"import": "./dist/wizards.js",
|
|
277
|
+
"default": "./dist/wizards.js"
|
|
278
|
+
},
|
|
279
|
+
"./translations/de.js": {
|
|
280
|
+
"types": "./dist/translations/de.d.ts",
|
|
281
|
+
"import": "./dist/translations/de.js",
|
|
282
|
+
"default": "./dist/translations/de.js"
|
|
283
|
+
},
|
|
284
|
+
"./translations/en.js": {
|
|
285
|
+
"types": "./dist/translations/en.d.ts",
|
|
286
|
+
"import": "./dist/translations/en.js",
|
|
287
|
+
"default": "./dist/translations/en.js"
|
|
288
|
+
},
|
|
289
|
+
"./filtered-list.js": {
|
|
290
|
+
"types": "./dist/filtered-list.d.ts",
|
|
291
|
+
"import": "./dist/filtered-list.js",
|
|
292
|
+
"default": "./dist/filtered-list.js"
|
|
293
|
+
},
|
|
294
|
+
"./wizard-textfield.js": {
|
|
295
|
+
"types": "./dist/wizard-textfield.d.ts",
|
|
296
|
+
"import": "./dist/wizard-textfield.js",
|
|
297
|
+
"default": "./dist/wizard-textfield.js"
|
|
298
|
+
},
|
|
299
|
+
"./oscd-filter-button.js": {
|
|
300
|
+
"types": "./dist/oscd-filter-button.d.ts",
|
|
301
|
+
"import": "./dist/oscd-filter-button.js",
|
|
302
|
+
"default": "./dist/oscd-filter-button.js"
|
|
303
|
+
},
|
|
304
|
+
"./plain-compare-list.js": {
|
|
305
|
+
"types": "./dist/plain-compare-list.d.ts",
|
|
306
|
+
"import": "./dist/plain-compare-list.js",
|
|
307
|
+
"default": "./dist/plain-compare-list.js"
|
|
308
|
+
},
|
|
309
|
+
"./action-pane.js": {
|
|
310
|
+
"types": "./dist/action-pane.d.ts",
|
|
311
|
+
"import": "./dist/action-pane.js",
|
|
312
|
+
"default": "./dist/action-pane.js"
|
|
313
|
+
},
|
|
314
|
+
"./action-icon.js": {
|
|
315
|
+
"types": "./dist/action-icon.d.ts",
|
|
316
|
+
"import": "./dist/action-icon.js",
|
|
317
|
+
"default": "./dist/action-icon.js"
|
|
318
|
+
},
|
|
319
|
+
"./*": {
|
|
320
|
+
"types": "./dist/*.d.ts",
|
|
321
|
+
"import": "./dist/*.js",
|
|
322
|
+
"default": "./dist/*.js"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
19
325
|
"type": "module",
|
|
20
326
|
"files": [
|
|
21
|
-
"
|
|
327
|
+
"dist/**/*.js",
|
|
328
|
+
"dist/**/*.d.ts",
|
|
329
|
+
"dist/**/*.d.ts.map",
|
|
330
|
+
"dist/**/*.js.map"
|
|
22
331
|
],
|
|
23
|
-
"exports": {
|
|
24
|
-
".": "./dist/open-scd.js",
|
|
25
|
-
"./src/foundation": "./dist/foundation.js",
|
|
26
|
-
"./src/foundation.js": "./dist/foundation.js",
|
|
27
|
-
"./src/foundation/compare.js": "./dist/foundation/compare.js",
|
|
28
|
-
"./src/foundation/dai.js": "./dist/foundation/dai.js",
|
|
29
|
-
"./src/foundation/generators.js": "./dist/foundation/generators.js",
|
|
30
|
-
"./src/foundation/ied.js": "./dist/foundation/ied.js",
|
|
31
|
-
"./src/foundation/nsd.js": "./dist/foundation/nsd.js",
|
|
32
|
-
"./src/foundation/nsdoc.js": "./dist/foundation/nsdoc.js",
|
|
33
|
-
"./src/foundation/scl.js": "./dist/foundation/scl.js",
|
|
34
|
-
"./src/icons/icons.js": "./dist/icons/icons.js",
|
|
35
|
-
"./src/icons/ied-icons.js": "./dist/icons/ied-icons.js",
|
|
36
|
-
"./src/icons/lnode.js": "./dist/icons/lnode.js",
|
|
37
|
-
"./src/action-icon.js": "./dist/action-icon.js",
|
|
38
|
-
"./src/action-pane.js": "./dist/action-pane.js",
|
|
39
|
-
"./src/filtered-list.js": "./dist/filtered-list.js",
|
|
40
|
-
"./src/finder-list.js": "./dist/finder-list.js",
|
|
41
|
-
"./src/oscd-filter-button.js": "./dist/oscd-filter-button.js",
|
|
42
|
-
"./src/plain-compare-list.js": "./dist/plain-compare-list.js",
|
|
43
|
-
"./src/schemas.js": "./dist/schemas.js",
|
|
44
|
-
"./src/wizard-checkbox.js": "./dist/wizard-checkbox.js",
|
|
45
|
-
"./src/wizard-select.js": "./dist/wizard-select.js",
|
|
46
|
-
"./src/wizard-textfield.js": "./dist/wizard-textfield.js",
|
|
47
|
-
"./src/WizardDivider.js": "./dist/WizardDivider.js",
|
|
48
|
-
"./src/wizards.js": "./dist/wizards.js",
|
|
49
|
-
"./src/addons/History.js": "./dist/addons/History.js",
|
|
50
|
-
"./src/addons/Layout.js": "./dist/addons/Layout.js",
|
|
51
|
-
"./src/addons/Settings.js": "./dist/addons/Settings.js",
|
|
52
|
-
"./src/addons/Waiter.js": "./dist/addons/Waiter.js",
|
|
53
|
-
"./addons/History.js": "./dist/addons/History.js",
|
|
54
|
-
"./addons/Layout.js": "./dist/addons/Layout.js",
|
|
55
|
-
"./addons/Settings.js": "./dist/addons/Settings.js",
|
|
56
|
-
"./addons/Waiter.js": "./dist/addons/Waiter.js",
|
|
57
|
-
"./src/plugin-tag.js": "./dist/plugin-tag.js",
|
|
58
|
-
"./src/plugin.events.js": "./dist/plugin.events.js",
|
|
59
|
-
"./src/plugin.js": "./dist/plugin.js",
|
|
60
|
-
"./src/translations/de.js": "./dist/translations/de.js",
|
|
61
|
-
"./src/translations/en.js": "./dist/translations/en.js"
|
|
62
|
-
},
|
|
63
332
|
"dependencies": {
|
|
64
333
|
"@material/mwc-dialog": "0.22.1",
|
|
65
334
|
"@material/mwc-drawer": "0.22.1",
|
|
@@ -112,7 +381,8 @@
|
|
|
112
381
|
"release:patch": "standard-version --release-as patch",
|
|
113
382
|
"release:major": "standard-version --release-as major",
|
|
114
383
|
"bundle": "npm run test && npm run bundle:notest",
|
|
115
|
-
"build": "tsc"
|
|
384
|
+
"build": "tsc && tsc --project tsconfig.declarations.json",
|
|
385
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
116
386
|
},
|
|
117
387
|
"devDependencies": {
|
|
118
388
|
"@commitlint/cli": "^13.1.0",
|
package/dist/core/api/api.js
DELETED
package/dist/core/api/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../core/api/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,OAAO,OAAO;IAGlB,YAAY,SAAiB;QAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC;IACnD,CAAC;CACF","sourcesContent":["import { PluginStateApi } from './plugin-state-api.js';\n\nexport class OscdApi {\n public pluginState: PluginStateApi;\n\n constructor(pluginTag: string) {\n this.pluginState = new PluginStateApi(pluginTag);\n }\n}\n"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export class Subject {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.subscribers = [];
|
|
4
|
-
}
|
|
5
|
-
next(value) {
|
|
6
|
-
this.subscribers.forEach(s => s(value));
|
|
7
|
-
}
|
|
8
|
-
subscribe(subscriber) {
|
|
9
|
-
this.subscribers.push(subscriber);
|
|
10
|
-
return () => {
|
|
11
|
-
this.unsubscribe(subscriber);
|
|
12
|
-
return subscriber;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
unsubscribe(subscriber) {
|
|
16
|
-
const indexToRemove = this.subscribers.findIndex(s => s === subscriber);
|
|
17
|
-
if (indexToRemove > -1) {
|
|
18
|
-
this.subscribers.splice(indexToRemove, 1);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=subject.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subject.js","sourceRoot":"","sources":["../../../../../core/api/editor/subject.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,OAAO;IAApB;QACU,gBAAW,GAAoB,EAAE,CAAC;IAqB5C,CAAC;IAnBQ,IAAI,CAAC,KAAQ;QAClB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC;IAEM,SAAS,CAAC,UAAyB;QACxC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAElC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC7B,OAAO,UAAU,CAAC;QACpB,CAAC,CAAA;IACH,CAAC;IAEM,WAAW,CAAC,UAAyB;QAC1C,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;QACxE,IAAI,aAAa,GAAG,CAAC,CAAC,EAAE;YACtB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;SAC3C;IACH,CAAC;CACF","sourcesContent":["export type Subscriber<T> = (value: T) => void;\nexport type Unsubscriber<T> = () => Subscriber<T>;\n\nexport class Subject<T> {\n private subscribers: Subscriber<T>[] = [];\n\n public next(value: T): void {\n this.subscribers.forEach(s => s(value));\n }\n\n public subscribe(subscriber: Subscriber<T>): Unsubscriber<T> {\n this.subscribers.push(subscriber);\n\n return () => {\n this.unsubscribe(subscriber);\n return subscriber;\n }\n }\n\n public unsubscribe(subscriber: Subscriber<T>): void {\n const indexToRemove = this.subscribers.findIndex(s => s === subscriber);\n if (indexToRemove > -1) {\n this.subscribers.splice(indexToRemove, 1);\n }\n }\n}\n"]}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Subject } from './subject.js';
|
|
2
|
-
import { handleEditV2 } from '../../foundation.js';
|
|
3
|
-
export class XMLEditor {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.past = [];
|
|
6
|
-
this.future = [];
|
|
7
|
-
this.commitSubject = new Subject();
|
|
8
|
-
this.undoSubject = new Subject();
|
|
9
|
-
this.redoSubject = new Subject();
|
|
10
|
-
}
|
|
11
|
-
get canUndo() {
|
|
12
|
-
return this.past.length > 0;
|
|
13
|
-
}
|
|
14
|
-
get canRedo() {
|
|
15
|
-
return this.future.length > 0;
|
|
16
|
-
}
|
|
17
|
-
reset() {
|
|
18
|
-
this.past = [];
|
|
19
|
-
this.future = [];
|
|
20
|
-
}
|
|
21
|
-
commit(change, { title, squash } = {}) {
|
|
22
|
-
const commit = squash && this.past.length
|
|
23
|
-
? this.past[this.past.length - 1]
|
|
24
|
-
: { undo: [], redo: [], time: Date.now() };
|
|
25
|
-
// TODO: Fix type once issue is fixed https://github.com/openscd/oscd-api/issues/57
|
|
26
|
-
const undo = handleEditV2(change);
|
|
27
|
-
// typed as per https://github.com/microsoft/TypeScript/issues/49280#issuecomment-1144181818 recommendation:
|
|
28
|
-
commit.undo.unshift(...[undo].flat(Infinity));
|
|
29
|
-
commit.redo.push(...[change].flat(Infinity));
|
|
30
|
-
if (title)
|
|
31
|
-
commit.title = title;
|
|
32
|
-
if (squash && this.past.length)
|
|
33
|
-
this.past.pop();
|
|
34
|
-
this.past.push(commit);
|
|
35
|
-
this.future = [];
|
|
36
|
-
this.commitSubject.next(commit);
|
|
37
|
-
return commit;
|
|
38
|
-
}
|
|
39
|
-
;
|
|
40
|
-
undo() {
|
|
41
|
-
const commit = this.past.pop();
|
|
42
|
-
if (!commit)
|
|
43
|
-
return;
|
|
44
|
-
// TODO: Fix type once issue is fixed https://github.com/openscd/oscd-api/issues/57
|
|
45
|
-
handleEditV2(commit.undo);
|
|
46
|
-
this.future.unshift(commit);
|
|
47
|
-
this.undoSubject.next(commit);
|
|
48
|
-
return commit;
|
|
49
|
-
}
|
|
50
|
-
;
|
|
51
|
-
redo() {
|
|
52
|
-
const commit = this.future.shift();
|
|
53
|
-
if (!commit)
|
|
54
|
-
return;
|
|
55
|
-
// TODO: Fix type once issue is fixed https://github.com/openscd/oscd-api/issues/57
|
|
56
|
-
handleEditV2(commit.redo);
|
|
57
|
-
this.past.push(commit);
|
|
58
|
-
this.redoSubject.next(commit);
|
|
59
|
-
return commit;
|
|
60
|
-
}
|
|
61
|
-
;
|
|
62
|
-
subscribe(txCallback) {
|
|
63
|
-
return this.commitSubject.subscribe(txCallback);
|
|
64
|
-
}
|
|
65
|
-
;
|
|
66
|
-
subscribeUndo(txCallback) {
|
|
67
|
-
return this.undoSubject.subscribe(txCallback);
|
|
68
|
-
}
|
|
69
|
-
subscribeRedo(txCallback) {
|
|
70
|
-
return this.redoSubject.subscribe(txCallback);
|
|
71
|
-
}
|
|
72
|
-
subscribeUndoRedo(txCallback) {
|
|
73
|
-
const unsubscribeUndo = this.subscribeUndo(txCallback);
|
|
74
|
-
const unsubscribeRedo = this.subscribeRedo(txCallback);
|
|
75
|
-
return () => {
|
|
76
|
-
unsubscribeUndo();
|
|
77
|
-
unsubscribeRedo();
|
|
78
|
-
return txCallback;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=xml-editor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xml-editor.js","sourceRoot":"","sources":["../../../../../core/api/editor/xml-editor.ts"],"names":[],"mappings":"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","sourcesContent":["import { Transactor, TransactedCallback, Commit, CommitOptions } from '@openscd/oscd-api/dist/Transactor.js';\nimport { EditV2 } from '@openscd/oscd-api/dist/editv2.js';\n\nimport { Subject } from './subject.js';\nimport { handleEditV2 } from '../../foundation.js';\n\nexport interface OscdCommit<C> extends Commit<C> {\n time: number;\n}\n\nexport class XMLEditor implements Transactor<EditV2> {\n public past: OscdCommit<EditV2>[] = [];\n public future: OscdCommit<EditV2>[] = [];\n\n private commitSubject = new Subject<OscdCommit<EditV2>>();\n private undoSubject = new Subject<OscdCommit<EditV2>>();\n private redoSubject = new Subject<OscdCommit<EditV2>>();\n\n get canUndo(): boolean {\n return this.past.length > 0;\n }\n\n get canRedo(): boolean {\n return this.future.length > 0;\n }\n\n reset(): void {\n this.past = [];\n this.future = [];\n }\n\n commit(change: EditV2, { title, squash }: CommitOptions = {}): OscdCommit<EditV2> {\n const commit: OscdCommit<EditV2> =\n squash && this.past.length\n ? this.past[this.past.length - 1]\n : { undo: [], redo: [], time: Date.now() };\n // TODO: Fix type once issue is fixed https://github.com/openscd/oscd-api/issues/57\n const undo = handleEditV2(change as any);\n // typed as per https://github.com/microsoft/TypeScript/issues/49280#issuecomment-1144181818 recommendation:\n commit.undo.unshift(...[undo].flat(Infinity as 1));\n commit.redo.push(...[change].flat(Infinity as 1));\n if (title) commit.title = title;\n if (squash && this.past.length) this.past.pop();\n this.past.push(commit);\n this.future = [];\n this.commitSubject.next(commit);\n return commit;\n };\n\n undo(): OscdCommit<EditV2> | undefined {\n const commit = this.past.pop();\n if (!commit) return;\n // TODO: Fix type once issue is fixed https://github.com/openscd/oscd-api/issues/57\n handleEditV2(commit.undo as any);\n this.future.unshift(commit);\n this.undoSubject.next(commit);\n return commit;\n };\n\n redo(): OscdCommit<EditV2> | undefined {\n const commit = this.future.shift();\n if (!commit) return;\n // TODO: Fix type once issue is fixed https://github.com/openscd/oscd-api/issues/57\n handleEditV2(commit.redo as any);\n this.past.push(commit);\n this.redoSubject.next(commit);\n return commit;\n };\n\n subscribe(txCallback: TransactedCallback<EditV2>): () => TransactedCallback<EditV2> {\n return this.commitSubject.subscribe(txCallback) as () => TransactedCallback<EditV2>;\n };\n\n subscribeUndo(txCallback: TransactedCallback<EditV2>): () => TransactedCallback<EditV2> {\n return this.undoSubject.subscribe(txCallback) as () => TransactedCallback<EditV2>;\n }\n\n subscribeRedo(txCallback: TransactedCallback<EditV2>): () => TransactedCallback<EditV2> {\n return this.redoSubject.subscribe(txCallback) as () => TransactedCallback<EditV2>;\n }\n\n subscribeUndoRedo(txCallback: TransactedCallback<EditV2>): () => TransactedCallback<EditV2> {\n const unsubscribeUndo = this.subscribeUndo(txCallback);\n const unsubscribeRedo = this.subscribeRedo(txCallback);\n\n return () => {\n unsubscribeUndo();\n unsubscribeRedo();\n return txCallback;\n }\n }\n}\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export class PluginStateApi {
|
|
2
|
-
constructor(tag) {
|
|
3
|
-
this.pluginTag = tag;
|
|
4
|
-
}
|
|
5
|
-
setState(state) {
|
|
6
|
-
this.setPluginState(state);
|
|
7
|
-
}
|
|
8
|
-
getState() {
|
|
9
|
-
return this.getPluginState();
|
|
10
|
-
}
|
|
11
|
-
updateState(partialState) {
|
|
12
|
-
const pluginState = this.getPluginState();
|
|
13
|
-
const patchedState = {
|
|
14
|
-
...pluginState,
|
|
15
|
-
...partialState
|
|
16
|
-
};
|
|
17
|
-
this.setPluginState(patchedState);
|
|
18
|
-
}
|
|
19
|
-
setPluginState(state) {
|
|
20
|
-
PluginStateApi.state[this.pluginTag] = state;
|
|
21
|
-
}
|
|
22
|
-
getPluginState() {
|
|
23
|
-
return PluginStateApi.state[this.pluginTag] ?? null;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
PluginStateApi.state = {};
|
|
27
|
-
//# sourceMappingURL=plugin-state-api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-state-api.js","sourceRoot":"","sources":["../../../../core/api/plugin-state-api.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,cAAc;IAIzB,YAAY,GAAW;QACrB,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACvB,CAAC;IAEM,QAAQ,CAAC,KAAyB;QACvC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC/B,CAAC;IAEM,WAAW,CAAC,YAAkC;QACnD,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,MAAM,YAAY,GAAG;YACnB,GAAG,WAAW;YACd,GAAG,YAAY;SAChB,CAAC;QACF,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAEO,cAAc,CAAC,KAAyB;QAC9C,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;IAC/C,CAAC;IAEO,cAAc;QACpB,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;IACtD,CAAC;;AA9Bc,oBAAK,GAA0C,EAAE,CAAC","sourcesContent":["type PluginState = {\n [key: string]: unknown\n}\n\nexport class PluginStateApi {\n private static state: { [tag: string]: PluginState | null } = {};\n private pluginTag: string;\n\n constructor(tag: string) {\n this.pluginTag = tag;\n }\n\n public setState(state: PluginState | null): void {\n this.setPluginState(state);\n }\n\n public getState(): PluginState | null {\n return this.getPluginState();\n }\n\n public updateState(partialState: Partial<PluginState>): void {\n const pluginState = this.getPluginState();\n const patchedState = {\n ...pluginState,\n ...partialState\n };\n this.setPluginState(patchedState);\n }\n\n private setPluginState(state: PluginState | null): void {\n PluginStateApi.state[this.pluginTag] = state;\n }\n\n private getPluginState(): PluginState | null {\n return PluginStateApi.state[this.pluginTag] ?? null;\n }\n}\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hashes `str` using the cyrb64 variant of
|
|
3
|
-
* https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js
|
|
4
|
-
* @returns digest - a rather insecure hash, very quickly
|
|
5
|
-
*/
|
|
6
|
-
export function cyrb64(str) {
|
|
7
|
-
/* eslint-disable no-bitwise */
|
|
8
|
-
let h1 = 0xdeadbeef;
|
|
9
|
-
let h2 = 0x41c6ce57;
|
|
10
|
-
/* eslint-disable-next-line no-plusplus */
|
|
11
|
-
for (let i = 0, ch; i < str.length; i++) {
|
|
12
|
-
ch = str.charCodeAt(i);
|
|
13
|
-
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
14
|
-
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
15
|
-
}
|
|
16
|
-
h1 =
|
|
17
|
-
Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^
|
|
18
|
-
Math.imul(h2 ^ (h2 >>> 13), 3266489909);
|
|
19
|
-
h2 =
|
|
20
|
-
Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^
|
|
21
|
-
Math.imul(h1 ^ (h1 >>> 13), 3266489909);
|
|
22
|
-
return ((h2 >>> 0).toString(16).padStart(8, '0') +
|
|
23
|
-
(h1 >>> 0).toString(16).padStart(8, '0'));
|
|
24
|
-
/* eslint-enable no-bitwise */
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=cyrb64.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cyrb64.js","sourceRoot":"","sources":["../../../../core/foundation/cyrb64.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,GAAW;IAChC,+BAA+B;IAC/B,IAAI,EAAE,GAAG,UAAU,CAAC;IACpB,IAAI,EAAE,GAAG,UAAU,CAAC;IACpB,0CAA0C;IAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACvC,EAAE,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACvB,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;QACpC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,CAAC,CAAC;KACrC;IACD,EAAE;QACA,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,CAAC;YACvC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;IAC1C,EAAE;QACA,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,CAAC;YACvC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC;IAC1C,OAAO,CACL,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;QACxC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CACzC,CAAC;IACF,8BAA8B;AAChC,CAAC","sourcesContent":["/**\n * Hashes `str` using the cyrb64 variant of\n * https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js\n * @returns digest - a rather insecure hash, very quickly\n */\nexport function cyrb64(str: string): string {\n /* eslint-disable no-bitwise */\n let h1 = 0xdeadbeef;\n let h2 = 0x41c6ce57;\n /* eslint-disable-next-line no-plusplus */\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n h1 =\n Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^\n Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 =\n Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^\n Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n return (\n (h2 >>> 0).toString(16).padStart(8, '0') +\n (h1 >>> 0).toString(16).padStart(8, '0')\n );\n /* eslint-enable no-bitwise */\n}\n"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Use the new edit event V2 API instead.
|
|
3
|
-
*/
|
|
4
|
-
export function isComplex(edit) {
|
|
5
|
-
return edit instanceof Array;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use the new edit event V2 API instead.
|
|
9
|
-
*/
|
|
10
|
-
export function isInsert(edit) {
|
|
11
|
-
return edit.parent !== undefined;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Use the new edit event V2 API instead.
|
|
15
|
-
*/
|
|
16
|
-
export function isNamespaced(value) {
|
|
17
|
-
return value !== null && typeof value !== 'string';
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated Use the new edit event V2 API instead.
|
|
21
|
-
*/
|
|
22
|
-
export function isUpdate(edit) {
|
|
23
|
-
return edit.element !== undefined;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use the new edit event V2 API instead.
|
|
27
|
-
*/
|
|
28
|
-
export function isRemove(edit) {
|
|
29
|
-
return (edit.parent === undefined && edit.node !== undefined);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Use the new edit event V2 API instead.
|
|
33
|
-
*/
|
|
34
|
-
export function newEditEvent(edit, initiator = 'user') {
|
|
35
|
-
return new CustomEvent('oscd-edit', {
|
|
36
|
-
composed: true,
|
|
37
|
-
bubbles: true,
|
|
38
|
-
detail: {
|
|
39
|
-
edit: edit,
|
|
40
|
-
initiator: initiator,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=edit-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"edit-event.js","sourceRoot":"","sources":["../../../../../core/foundation/deprecated/edit-event.ts"],"names":[],"mappings":"AA6CA;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,IAAU;IAClC,OAAO,IAAI,YAAY,KAAK,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAQ,IAAe,CAAC,MAAM,KAAK,SAAS,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAqB;IAErB,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAQ,IAAe,CAAC,OAAO,KAAK,SAAS,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAU;IACjC,OAAO,CACJ,IAAe,CAAC,MAAM,KAAK,SAAS,IAAK,IAAe,CAAC,IAAI,KAAK,SAAS,CAC7E,CAAC;AACJ,CAAC;AAeD;;GAEG;AACH,MAAM,UAAU,YAAY,CAC1B,IAAO,EACP,YAAuB,MAAM;IAE7B,OAAO,IAAI,WAAW,CAAkB,WAAW,EAAE;QACnD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;SACrB;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type Initiator = 'user' | 'system' | 'undo' | 'redo' | string;\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type Insert = {\n parent: Node;\n node: Node;\n reference: Node | null;\n};\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type NamespacedAttributeValue = {\n value: string | null;\n namespaceURI: string | null;\n};\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type AttributeValue = string | null | NamespacedAttributeValue;\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type Update = {\n element: Element;\n attributes: Partial<Record<string, AttributeValue>>;\n};\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type Remove = {\n node: Node;\n};\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type Edit = Insert | Update | Remove | Edit[];\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport function isComplex(edit: Edit): edit is Edit[] {\n return edit instanceof Array;\n}\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport function isInsert(edit: Edit): edit is Insert {\n return (edit as Insert).parent !== undefined;\n}\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport function isNamespaced(\n value: AttributeValue\n): value is NamespacedAttributeValue {\n return value !== null && typeof value !== 'string';\n}\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport function isUpdate(edit: Edit): edit is Update {\n return (edit as Update).element !== undefined;\n}\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport function isRemove(edit: Edit): edit is Remove {\n return (\n (edit as Insert).parent === undefined && (edit as Remove).node !== undefined\n );\n}\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport interface EditEventDetail<E extends Edit = Edit> {\n edit: E;\n initiator: Initiator;\n}\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport type EditEvent = CustomEvent<EditEventDetail>;\n\n/**\n * @deprecated Use the new edit event V2 API instead.\n */\nexport function newEditEvent<E extends Edit>(\n edit: E,\n initiator: Initiator = 'user'\n): EditEvent {\n return new CustomEvent<EditEventDetail>('oscd-edit', {\n composed: true,\n bubbles: true,\n detail: {\n edit: edit,\n initiator: initiator,\n },\n });\n}\n\ndeclare global {\n interface ElementEventMap {\n ['oscd-edit']: EditEvent;\n }\n}\n"]}
|