@omicronenergy/oscd-scl-dialogs 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +4 -2
- package/custom-elements.json +265 -1
- package/dist/wizards/connectedap.js +6 -3
- package/dist/wizards/connectedap.js.map +1 -1
- package/dist/wizards/dataset.d.ts +2 -0
- package/dist/wizards/dataset.js +86 -0
- package/dist/wizards/dataset.js.map +1 -0
- package/dist/wizards/dataset.spec.d.ts +1 -0
- package/dist/wizards/dataset.spec.js +240 -0
- package/dist/wizards/dataset.spec.js.map +1 -0
- package/dist/wizards/gsecontrol.d.ts +2 -0
- package/dist/wizards/gsecontrol.js +86 -0
- package/dist/wizards/gsecontrol.js.map +1 -0
- package/dist/wizards/gsecontrol.spec.d.ts +1 -0
- package/dist/wizards/gsecontrol.spec.js +216 -0
- package/dist/wizards/gsecontrol.spec.js.map +1 -0
- package/dist/wizards/patterns.d.ts +2 -0
- package/dist/wizards/patterns.js +2 -0
- package/dist/wizards/patterns.js.map +1 -1
- package/dist/wizards/sampledvaluecontrol.d.ts +2 -0
- package/dist/wizards/sampledvaluecontrol.js +115 -0
- package/dist/wizards/sampledvaluecontrol.js.map +1 -0
- package/dist/wizards/sampledvaluecontrol.spec.d.ts +1 -0
- package/dist/wizards/sampledvaluecontrol.spec.js +227 -0
- package/dist/wizards/sampledvaluecontrol.spec.js.map +1 -0
- package/dist/wizards/smvopts.d.ts +2 -0
- package/dist/wizards/smvopts.js +43 -0
- package/dist/wizards/smvopts.js.map +1 -0
- package/dist/wizards/smvopts.spec.d.ts +1 -0
- package/dist/wizards/smvopts.spec.js +193 -0
- package/dist/wizards/smvopts.spec.js.map +1 -0
- package/dist/wizards/wizards.js +14 -2
- package/dist/wizards/wizards.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.14](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/compare/oscd-scl-dialogs-v0.0.13...oscd-scl-dialogs-v0.0.14) (2026-04-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* connectedap adding illegal attribute to Address ([92ad0d7](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/commit/92ad0d7319012ded4603cdaacbafa886ff90d4fb))
|
|
9
|
+
|
|
10
|
+
## [0.0.13](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/compare/oscd-scl-dialogs-v0.0.12...oscd-scl-dialogs-v0.0.13) (2026-03-30)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* "GSEControl" & "SampledValueControl" edit support ([b0f6441](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/commit/b0f644147a76e8399c9b8f91def00c0449d06505))
|
|
16
|
+
|
|
3
17
|
## [0.0.12](https://github.com/OMICRONEnergyOSS/oscd-scl-dialogs/compare/oscd-scl-dialogs-v0.0.11...oscd-scl-dialogs-v0.0.12) (2026-03-06)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Currently supported Tag matrix
|
|
|
33
33
|
| DOI | ❌ | ❌ |
|
|
34
34
|
| DOType | ✅ | ❌ |
|
|
35
35
|
| DataObjectDirectory | ❌ | ❌ |
|
|
36
|
-
| DataSet | ❌ |
|
|
36
|
+
| DataSet | ❌ | ✅ |
|
|
37
37
|
| DataSetDirectory | ❌ | ❌ |
|
|
38
38
|
| DataTypeTemplates | ❌ | ❌ |
|
|
39
39
|
| DynAssociation | ❌ | ❌ |
|
|
@@ -53,6 +53,7 @@ Currently supported Tag matrix
|
|
|
53
53
|
| GOOSE | ❌ | ❌ |
|
|
54
54
|
| GOOSESecurity | ❌ | ❌ |
|
|
55
55
|
| GSE | ❌ | ✅ |
|
|
56
|
+
| GSEControl | ❌ | ✅ |
|
|
56
57
|
| GSEDir | ❌ | ❌ |
|
|
57
58
|
| GSESettings | ❌ | ❌ |
|
|
58
59
|
| GSSE | ❌ | ❌ |
|
|
@@ -90,6 +91,7 @@ Currently supported Tag matrix
|
|
|
90
91
|
| ReportSettings | ❌ | ❌ |
|
|
91
92
|
| RptEnabled | ❌ | ❌ |
|
|
92
93
|
| SamplesPerSec | ❌ | ❌ |
|
|
94
|
+
| SampledValueControl | ❌ | ✅ |
|
|
93
95
|
| SecPerSamples | ❌ | ❌ |
|
|
94
96
|
| SCL | ❌ | ❌ |
|
|
95
97
|
| SDI | ❌ | ❌ |
|
|
@@ -103,7 +105,7 @@ Currently supported Tag matrix
|
|
|
103
105
|
| SGEdit | ❌ | ❌ |
|
|
104
106
|
| SmpRate | ❌ | ❌ |
|
|
105
107
|
| SMV | ❌ | ✅ |
|
|
106
|
-
| SmvOpts | ❌ |
|
|
108
|
+
| SmvOpts | ❌ | ✅ |
|
|
107
109
|
| SMVsc | ❌ | ❌ |
|
|
108
110
|
| SMVSecurity | ❌ | ❌ |
|
|
109
111
|
| SMVSettings | ❌ | ❌ |
|
package/custom-elements.json
CHANGED
|
@@ -2207,6 +2207,62 @@
|
|
|
2207
2207
|
}
|
|
2208
2208
|
]
|
|
2209
2209
|
},
|
|
2210
|
+
{
|
|
2211
|
+
"kind": "javascript-module",
|
|
2212
|
+
"path": "wizards/dataset.spec.ts",
|
|
2213
|
+
"declarations": [],
|
|
2214
|
+
"exports": [
|
|
2215
|
+
{
|
|
2216
|
+
"kind": "custom-element-definition",
|
|
2217
|
+
"name": "scl-text-field",
|
|
2218
|
+
"declaration": {
|
|
2219
|
+
"name": "SclTextField",
|
|
2220
|
+
"package": "@openenergytools/scl-text-field"
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
"kind": "custom-element-definition",
|
|
2225
|
+
"name": "selection-list",
|
|
2226
|
+
"declaration": {
|
|
2227
|
+
"name": "SelectionList",
|
|
2228
|
+
"package": "@openenergytools/filterable-lists/dist/SelectionList.js"
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
]
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"kind": "javascript-module",
|
|
2235
|
+
"path": "wizards/dataset.ts",
|
|
2236
|
+
"declarations": [
|
|
2237
|
+
{
|
|
2238
|
+
"kind": "function",
|
|
2239
|
+
"name": "editDataSetWizard",
|
|
2240
|
+
"return": {
|
|
2241
|
+
"type": {
|
|
2242
|
+
"text": "Wizard"
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
"parameters": [
|
|
2246
|
+
{
|
|
2247
|
+
"name": "element",
|
|
2248
|
+
"type": {
|
|
2249
|
+
"text": "Element"
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
]
|
|
2253
|
+
}
|
|
2254
|
+
],
|
|
2255
|
+
"exports": [
|
|
2256
|
+
{
|
|
2257
|
+
"kind": "js",
|
|
2258
|
+
"name": "editDataSetWizard",
|
|
2259
|
+
"declaration": {
|
|
2260
|
+
"name": "editDataSetWizard",
|
|
2261
|
+
"module": "wizards/dataset.ts"
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
]
|
|
2265
|
+
},
|
|
2210
2266
|
{
|
|
2211
2267
|
"kind": "javascript-module",
|
|
2212
2268
|
"path": "wizards/datype.ts",
|
|
@@ -2737,6 +2793,70 @@
|
|
|
2737
2793
|
}
|
|
2738
2794
|
]
|
|
2739
2795
|
},
|
|
2796
|
+
{
|
|
2797
|
+
"kind": "javascript-module",
|
|
2798
|
+
"path": "wizards/gsecontrol.spec.ts",
|
|
2799
|
+
"declarations": [],
|
|
2800
|
+
"exports": [
|
|
2801
|
+
{
|
|
2802
|
+
"kind": "custom-element-definition",
|
|
2803
|
+
"name": "scl-text-field",
|
|
2804
|
+
"declaration": {
|
|
2805
|
+
"name": "SclTextField",
|
|
2806
|
+
"package": "@openenergytools/scl-text-field"
|
|
2807
|
+
}
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"kind": "custom-element-definition",
|
|
2811
|
+
"name": "scl-select",
|
|
2812
|
+
"declaration": {
|
|
2813
|
+
"name": "SclSelect",
|
|
2814
|
+
"package": "@openenergytools/scl-select"
|
|
2815
|
+
}
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"kind": "custom-element-definition",
|
|
2819
|
+
"name": "scl-checkbox",
|
|
2820
|
+
"declaration": {
|
|
2821
|
+
"name": "SclCheckbox",
|
|
2822
|
+
"package": "@openenergytools/scl-checkbox"
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
]
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
"kind": "javascript-module",
|
|
2829
|
+
"path": "wizards/gsecontrol.ts",
|
|
2830
|
+
"declarations": [
|
|
2831
|
+
{
|
|
2832
|
+
"kind": "function",
|
|
2833
|
+
"name": "editGSEControlWizard",
|
|
2834
|
+
"return": {
|
|
2835
|
+
"type": {
|
|
2836
|
+
"text": "Wizard"
|
|
2837
|
+
}
|
|
2838
|
+
},
|
|
2839
|
+
"parameters": [
|
|
2840
|
+
{
|
|
2841
|
+
"name": "element",
|
|
2842
|
+
"type": {
|
|
2843
|
+
"text": "Element"
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
]
|
|
2847
|
+
}
|
|
2848
|
+
],
|
|
2849
|
+
"exports": [
|
|
2850
|
+
{
|
|
2851
|
+
"kind": "js",
|
|
2852
|
+
"name": "editGSEControlWizard",
|
|
2853
|
+
"declaration": {
|
|
2854
|
+
"name": "editGSEControlWizard",
|
|
2855
|
+
"module": "wizards/gsecontrol.ts"
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
]
|
|
2859
|
+
},
|
|
2740
2860
|
{
|
|
2741
2861
|
"kind": "javascript-module",
|
|
2742
2862
|
"path": "wizards/ied.ts",
|
|
@@ -3365,6 +3485,22 @@
|
|
|
3365
3485
|
},
|
|
3366
3486
|
"default": "['SmpPerPeriod', 'SmpPerSec', 'SecPerSmp']"
|
|
3367
3487
|
},
|
|
3488
|
+
{
|
|
3489
|
+
"kind": "variable",
|
|
3490
|
+
"name": "tGSEControlType",
|
|
3491
|
+
"type": {
|
|
3492
|
+
"text": "array"
|
|
3493
|
+
},
|
|
3494
|
+
"default": "['GOOSE', 'GSSE']"
|
|
3495
|
+
},
|
|
3496
|
+
{
|
|
3497
|
+
"kind": "variable",
|
|
3498
|
+
"name": "tSecurityEnable",
|
|
3499
|
+
"type": {
|
|
3500
|
+
"text": "array"
|
|
3501
|
+
},
|
|
3502
|
+
"default": "['None', 'Signature', 'SignatureAndEncryption']"
|
|
3503
|
+
},
|
|
3368
3504
|
{
|
|
3369
3505
|
"kind": "variable",
|
|
3370
3506
|
"name": "typePattern",
|
|
@@ -3456,6 +3592,22 @@
|
|
|
3456
3592
|
"module": "wizards/patterns.ts"
|
|
3457
3593
|
}
|
|
3458
3594
|
},
|
|
3595
|
+
{
|
|
3596
|
+
"kind": "js",
|
|
3597
|
+
"name": "tGSEControlType",
|
|
3598
|
+
"declaration": {
|
|
3599
|
+
"name": "tGSEControlType",
|
|
3600
|
+
"module": "wizards/patterns.ts"
|
|
3601
|
+
}
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
"kind": "js",
|
|
3605
|
+
"name": "tSecurityEnable",
|
|
3606
|
+
"declaration": {
|
|
3607
|
+
"name": "tSecurityEnable",
|
|
3608
|
+
"module": "wizards/patterns.ts"
|
|
3609
|
+
}
|
|
3610
|
+
},
|
|
3459
3611
|
{
|
|
3460
3612
|
"kind": "js",
|
|
3461
3613
|
"name": "typePattern",
|
|
@@ -3582,6 +3734,70 @@
|
|
|
3582
3734
|
}
|
|
3583
3735
|
]
|
|
3584
3736
|
},
|
|
3737
|
+
{
|
|
3738
|
+
"kind": "javascript-module",
|
|
3739
|
+
"path": "wizards/sampledvaluecontrol.spec.ts",
|
|
3740
|
+
"declarations": [],
|
|
3741
|
+
"exports": [
|
|
3742
|
+
{
|
|
3743
|
+
"kind": "custom-element-definition",
|
|
3744
|
+
"name": "scl-text-field",
|
|
3745
|
+
"declaration": {
|
|
3746
|
+
"name": "SclTextField",
|
|
3747
|
+
"package": "@openenergytools/scl-text-field"
|
|
3748
|
+
}
|
|
3749
|
+
},
|
|
3750
|
+
{
|
|
3751
|
+
"kind": "custom-element-definition",
|
|
3752
|
+
"name": "scl-select",
|
|
3753
|
+
"declaration": {
|
|
3754
|
+
"name": "SclSelect",
|
|
3755
|
+
"package": "@openenergytools/scl-select"
|
|
3756
|
+
}
|
|
3757
|
+
},
|
|
3758
|
+
{
|
|
3759
|
+
"kind": "custom-element-definition",
|
|
3760
|
+
"name": "scl-checkbox",
|
|
3761
|
+
"declaration": {
|
|
3762
|
+
"name": "SclCheckbox",
|
|
3763
|
+
"package": "@openenergytools/scl-checkbox"
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
]
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
"kind": "javascript-module",
|
|
3770
|
+
"path": "wizards/sampledvaluecontrol.ts",
|
|
3771
|
+
"declarations": [
|
|
3772
|
+
{
|
|
3773
|
+
"kind": "function",
|
|
3774
|
+
"name": "editSampledValueControlWizard",
|
|
3775
|
+
"return": {
|
|
3776
|
+
"type": {
|
|
3777
|
+
"text": "Wizard"
|
|
3778
|
+
}
|
|
3779
|
+
},
|
|
3780
|
+
"parameters": [
|
|
3781
|
+
{
|
|
3782
|
+
"name": "element",
|
|
3783
|
+
"type": {
|
|
3784
|
+
"text": "Element"
|
|
3785
|
+
}
|
|
3786
|
+
}
|
|
3787
|
+
]
|
|
3788
|
+
}
|
|
3789
|
+
],
|
|
3790
|
+
"exports": [
|
|
3791
|
+
{
|
|
3792
|
+
"kind": "js",
|
|
3793
|
+
"name": "editSampledValueControlWizard",
|
|
3794
|
+
"declaration": {
|
|
3795
|
+
"name": "editSampledValueControlWizard",
|
|
3796
|
+
"module": "wizards/sampledvaluecontrol.ts"
|
|
3797
|
+
}
|
|
3798
|
+
}
|
|
3799
|
+
]
|
|
3800
|
+
},
|
|
3585
3801
|
{
|
|
3586
3802
|
"kind": "javascript-module",
|
|
3587
3803
|
"path": "wizards/sdo.ts",
|
|
@@ -3673,6 +3889,54 @@
|
|
|
3673
3889
|
}
|
|
3674
3890
|
]
|
|
3675
3891
|
},
|
|
3892
|
+
{
|
|
3893
|
+
"kind": "javascript-module",
|
|
3894
|
+
"path": "wizards/smvopts.spec.ts",
|
|
3895
|
+
"declarations": [],
|
|
3896
|
+
"exports": [
|
|
3897
|
+
{
|
|
3898
|
+
"kind": "custom-element-definition",
|
|
3899
|
+
"name": "scl-checkbox",
|
|
3900
|
+
"declaration": {
|
|
3901
|
+
"name": "SclCheckbox",
|
|
3902
|
+
"package": "@openenergytools/scl-checkbox"
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
]
|
|
3906
|
+
},
|
|
3907
|
+
{
|
|
3908
|
+
"kind": "javascript-module",
|
|
3909
|
+
"path": "wizards/smvopts.ts",
|
|
3910
|
+
"declarations": [
|
|
3911
|
+
{
|
|
3912
|
+
"kind": "function",
|
|
3913
|
+
"name": "editSmvOptsWizard",
|
|
3914
|
+
"return": {
|
|
3915
|
+
"type": {
|
|
3916
|
+
"text": "Wizard"
|
|
3917
|
+
}
|
|
3918
|
+
},
|
|
3919
|
+
"parameters": [
|
|
3920
|
+
{
|
|
3921
|
+
"name": "element",
|
|
3922
|
+
"type": {
|
|
3923
|
+
"text": "Element"
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
]
|
|
3927
|
+
}
|
|
3928
|
+
],
|
|
3929
|
+
"exports": [
|
|
3930
|
+
{
|
|
3931
|
+
"kind": "js",
|
|
3932
|
+
"name": "editSmvOptsWizard",
|
|
3933
|
+
"declaration": {
|
|
3934
|
+
"name": "editSmvOptsWizard",
|
|
3935
|
+
"module": "wizards/smvopts.ts"
|
|
3936
|
+
}
|
|
3937
|
+
}
|
|
3938
|
+
]
|
|
3939
|
+
},
|
|
3676
3940
|
{
|
|
3677
3941
|
"kind": "javascript-module",
|
|
3678
3942
|
"path": "wizards/subequipment.ts",
|
|
@@ -4331,7 +4595,7 @@
|
|
|
4331
4595
|
"type": {
|
|
4332
4596
|
"text": "Record<\n string,\n {\n edit: SclElementWizard;\n create: SclElementWizard;\n }\n>"
|
|
4333
4597
|
},
|
|
4334
|
-
"default": "{ AccessControl: { edit: emptyWizard, create: emptyWizard, }, AccessPoint: { edit: emptyWizard, create: emptyWizard, }, Address: { edit: emptyWizard, create: emptyWizard, }, Association: { edit: emptyWizard, create: emptyWizard, }, Authentication: { edit: emptyWizard, create: emptyWizard, }, Bay: { edit: editBayWizard, create: createBayWizard, }, BDA: { edit: editBDaWizard, create: emptyWizard, }, BitRate: { edit: emptyWizard, create: emptyWizard, }, ClientLN: { edit: emptyWizard, create: emptyWizard, }, ClientServices: { edit: emptyWizard, create: emptyWizard, }, CommProt: { edit: emptyWizard, create: emptyWizard, }, Communication: { edit: emptyWizard, create: emptyWizard, }, ConductingEquipment: { edit: editConductingEquipmentWizard, create: createConductingEquipmentWizard, }, ConfDataSet: { edit: emptyWizard, create: emptyWizard, }, ConfLdName: { edit: emptyWizard, create: emptyWizard, }, ConfLNs: { edit: emptyWizard, create: emptyWizard, }, ConfLogControl: { edit: emptyWizard, create: emptyWizard, }, ConfReportControl: { edit: emptyWizard, create: emptyWizard, }, ConfSG: { edit: emptyWizard, create: emptyWizard, }, ConfSigRef: { edit: emptyWizard, create: emptyWizard, }, ConnectedAP: { edit: editConnectedApWizard, create: createConnectedApWizard, }, DA: { edit: editDAWizard, create: createDaWizard, }, DAType: { edit: emptyWizard, create: emptyWizard, }, DO: { edit: editDoWizard, create: createDoWizard, }, DOI: { edit: emptyWizard, create: emptyWizard, }, DOType: { edit: emptyWizard, create: createDOTypeWizard, }, DataObjectDirectory: { edit: emptyWizard, create: emptyWizard, }, DataSet: { edit:
|
|
4598
|
+
"default": "{ AccessControl: { edit: emptyWizard, create: emptyWizard, }, AccessPoint: { edit: emptyWizard, create: emptyWizard, }, Address: { edit: emptyWizard, create: emptyWizard, }, Association: { edit: emptyWizard, create: emptyWizard, }, Authentication: { edit: emptyWizard, create: emptyWizard, }, Bay: { edit: editBayWizard, create: createBayWizard, }, BDA: { edit: editBDaWizard, create: emptyWizard, }, BitRate: { edit: emptyWizard, create: emptyWizard, }, ClientLN: { edit: emptyWizard, create: emptyWizard, }, ClientServices: { edit: emptyWizard, create: emptyWizard, }, CommProt: { edit: emptyWizard, create: emptyWizard, }, Communication: { edit: emptyWizard, create: emptyWizard, }, ConductingEquipment: { edit: editConductingEquipmentWizard, create: createConductingEquipmentWizard, }, ConfDataSet: { edit: emptyWizard, create: emptyWizard, }, ConfLdName: { edit: emptyWizard, create: emptyWizard, }, ConfLNs: { edit: emptyWizard, create: emptyWizard, }, ConfLogControl: { edit: emptyWizard, create: emptyWizard, }, ConfReportControl: { edit: emptyWizard, create: emptyWizard, }, ConfSG: { edit: emptyWizard, create: emptyWizard, }, ConfSigRef: { edit: emptyWizard, create: emptyWizard, }, ConnectedAP: { edit: editConnectedApWizard, create: createConnectedApWizard, }, DA: { edit: editDAWizard, create: createDaWizard, }, DAType: { edit: emptyWizard, create: emptyWizard, }, DO: { edit: editDoWizard, create: createDoWizard, }, DOI: { edit: emptyWizard, create: emptyWizard, }, DOType: { edit: emptyWizard, create: createDOTypeWizard, }, DataObjectDirectory: { edit: emptyWizard, create: emptyWizard, }, DataSet: { edit: editDataSetWizard, create: emptyWizard, }, DataSetDirectory: { edit: emptyWizard, create: emptyWizard, }, DataTypeTemplates: { edit: emptyWizard, create: emptyWizard, }, DynAssociation: { edit: emptyWizard, create: emptyWizard, }, DynDataSet: { edit: emptyWizard, create: emptyWizard, }, EnumType: { edit: emptyWizard, create: createEnumTypeWizard, }, EnumVal: { edit: editEnumValWizard, create: createEnumValWizard, }, EqFunction: { edit: editEqFunctionWizard, create: createEqFunctionWizard, }, EqSubFunction: { edit: editEqSubFunctionWizard, create: createEqSubFunctionWizard, }, ExtRef: { edit: emptyWizard, create: emptyWizard, }, FileHandling: { edit: emptyWizard, create: emptyWizard, }, Function: { edit: editFunctionWizard, create: createFunctionWizard, }, GeneralEquipment: { edit: editGeneralEquipmentWizard, create: createGeneralEquipmentWizard, }, GetCBValues: { edit: emptyWizard, create: emptyWizard, }, GetDataObjectDefinition: { edit: emptyWizard, create: emptyWizard, }, GetDataSetValue: { edit: emptyWizard, create: emptyWizard, }, GetDirectory: { edit: emptyWizard, create: emptyWizard, }, GOOSE: { edit: emptyWizard, create: emptyWizard, }, GOOSESecurity: { edit: emptyWizard, create: emptyWizard, }, GSE: { edit: editGseWizard, create: emptyWizard, }, GSEControl: { edit: editGSEControlWizard, create: emptyWizard, }, GSEDir: { edit: emptyWizard, create: emptyWizard, }, GSESettings: { edit: emptyWizard, create: emptyWizard, }, GSSE: { edit: emptyWizard, create: emptyWizard, }, Header: { edit: emptyWizard, create: emptyWizard, }, History: { edit: emptyWizard, create: emptyWizard, }, Hitem: { edit: emptyWizard, create: emptyWizard, }, IED: { edit: editIEDWizard, create: createIEDWizard, }, IEDName: { edit: emptyWizard, create: emptyWizard, }, Inputs: { edit: emptyWizard, create: emptyWizard, }, IssuerName: { edit: emptyWizard, create: emptyWizard, }, KDC: { edit: emptyWizard, create: emptyWizard, }, LDevice: { edit: editLDeviceWizard, create: createLDeviceWizard, }, LN: { edit: updateLNWizard, create: createLNWizard, }, LN0: { edit: updateLN0Wizard, create: emptyWizard, }, LNode: { edit: editLNodeWizard, create: createLNodeWizard, }, LNodeType: { edit: emptyWizard, create: createLNodeTypeWizard, }, Line: { edit: editLineWizard, create: createLineWizard, }, Log: { edit: emptyWizard, create: emptyWizard, }, LogControl: { edit: emptyWizard, create: emptyWizard, }, LogSettings: { edit: emptyWizard, create: emptyWizard, }, MaxTime: { edit: emptyWizard, create: emptyWizard, }, McSecurity: { edit: emptyWizard, create: emptyWizard, }, MinTime: { edit: emptyWizard, create: emptyWizard, }, NeutralPoint: { edit: emptyWizard, create: emptyWizard, }, P: { edit: emptyWizard, create: emptyWizard, }, PhysConn: { edit: emptyWizard, create: emptyWizard, }, PowerTransformer: { edit: editPowerTransformerWizard, create: createPowerTransformerWizard, }, Private: { edit: emptyWizard, create: emptyWizard, }, Process: { edit: editProcessWizard, create: createProcessWizard, }, ProtNs: { edit: emptyWizard, create: emptyWizard, }, Protocol: { edit: emptyWizard, create: emptyWizard, }, ReadWrite: { edit: emptyWizard, create: emptyWizard, }, RedProt: { edit: emptyWizard, create: emptyWizard, }, ReportControl: { edit: emptyWizard, create: emptyWizard, }, ReportSettings: { edit: emptyWizard, create: emptyWizard, }, RptEnabled: { edit: emptyWizard, create: emptyWizard, }, SamplesPerSec: { edit: emptyWizard, create: emptyWizard, }, SampledValueControl: { edit: editSampledValueControlWizard, create: emptyWizard, }, SecPerSamples: { edit: emptyWizard, create: emptyWizard, }, SCL: { edit: emptyWizard, create: emptyWizard, }, SDI: { edit: emptyWizard, create: emptyWizard, }, SDO: { edit: editSDoWizard, create: createSDoWizard, }, Server: { edit: emptyWizard, create: emptyWizard, }, ServerAt: { edit: emptyWizard, create: emptyWizard, }, Services: { edit: emptyWizard, create: emptyWizard, }, SetDataSetValue: { edit: emptyWizard, create: emptyWizard, }, SettingControl: { edit: emptyWizard, create: emptyWizard, }, SettingGroups: { edit: emptyWizard, create: emptyWizard, }, SGEdit: { edit: emptyWizard, create: emptyWizard, }, SmpRate: { edit: emptyWizard, create: emptyWizard, }, SMV: { edit: editSMvWizard, create: emptyWizard, }, SmvOpts: { edit: editSmvOptsWizard, create: emptyWizard, }, SMVsc: { edit: emptyWizard, create: emptyWizard, }, SMVSecurity: { edit: emptyWizard, create: emptyWizard, }, SMVSettings: { edit: emptyWizard, create: emptyWizard, }, SubEquipment: { edit: editSubEquipmentWizard, create: createSubEquipmentWizard, }, SubFunction: { edit: editSubFunctionWizard, create: createSubFunctionWizard, }, SubNetwork: { edit: editSubNetworkWizard, create: createSubNetworkWizard, }, Subject: { edit: emptyWizard, create: emptyWizard, }, Substation: { edit: editSubstationWizard, create: createSubstationWizard, }, SupSubscription: { edit: emptyWizard, create: emptyWizard, }, TapChanger: { edit: editTapChangerWizard, create: createTapChangerWizard, }, Text: { edit: editTextWizard, create: createTextWizard, }, TimerActivatedControl: { edit: emptyWizard, create: emptyWizard, }, TimeSyncProt: { edit: emptyWizard, create: emptyWizard, }, TransformerWinding: { edit: editTransformerWindingWizard, create: createTransformerWindingWizard, }, Val: { edit: emptyWizard, create: emptyWizard, }, ValueHandling: { edit: emptyWizard, create: emptyWizard, }, Voltage: { edit: emptyWizard, create: emptyWizard, }, VoltageLevel: { edit: editVoltageLevelWizard, create: createVoltageLevelWizard, }, }"
|
|
4335
4599
|
}
|
|
4336
4600
|
],
|
|
4337
4601
|
"exports": [
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
+
import { SclCheckbox } from '@openenergytools/scl-checkbox';
|
|
2
3
|
import { appIdGenerator, getReference, identity, macAddressGenerator, } from '@openscd/scl-lib';
|
|
3
4
|
import { compareNames, createElement, getTypes, getValue, } from '../foundation.js';
|
|
4
5
|
import { contentAddress, updateAddress } from './address.js';
|
|
@@ -284,9 +285,11 @@ function updateAction(element) {
|
|
|
284
285
|
const instType = wizard.querySelector('#instType').value === 'true';
|
|
285
286
|
const addressContent = {};
|
|
286
287
|
inputs.forEach(input => {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
if (!(input instanceof SclCheckbox)) {
|
|
289
|
+
const key = input.label;
|
|
290
|
+
const value = getValue(input);
|
|
291
|
+
addressContent[key] = value;
|
|
292
|
+
}
|
|
290
293
|
});
|
|
291
294
|
return updateAddress(element, addressContent, instType);
|
|
292
295
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectedap.js","sourceR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;SACpB;KACF,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,OAAgB;IACpC,OAAO,CAAC,MAA4B,EAAE,MAAe,EAAY,EAAE;QACjE,MAAM,QAAQ,GACX,MAAM,CAAC,aAAa,CAAC,WAAW,CAAiB,CAAC,KAAK,KAAK,MAAM,CAAC;QAEtE,MAAM,cAAc,GAAkC,EAAE,CAAC;QACzD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACrB,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC;YACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC9B,cAAc,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QAC9B,CAAC,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;QACL,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;SAC9B;QACD,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC","sourcesContent":["import { html } from 'lit';\n\nimport { EditV2 } from '@openscd/oscd-api';\n\nimport {\n SelectionList,\n SelectItem,\n} from '@openenergytools/filterable-lists/dist/SelectionList.js';\nimport { SclCheckbox } from '@openenergytools/scl-checkbox';\n\nimport {\n appIdGenerator,\n getReference,\n identity,\n macAddressGenerator,\n} from '@openscd/scl-lib';\n\nimport {\n compareNames,\n createElement,\n getTypes,\n getValue,\n Wizard,\n WizardActor,\n WizardInputElement,\n} from '../foundation.js';\n\nimport { contentAddress, updateAddress } from './address.js';\n\ninterface AccessPointDescription {\n element: Element;\n connected?: boolean;\n}\n\nfunction initSMVElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorSmv: () => string | null;\n appidGeneratorSmv: () => string | null;\n unconnectedSampledValueControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('SampledValueControl') ?? [])\n .filter(sampledValueControl => {\n const id = identity(sampledValueControl) as string;\n\n if (options.unconnectedSampledValueControl.has(id)) {\n options.unconnectedSampledValueControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(sampledValueControl => {\n const cbName = sampledValueControl.getAttribute('name');\n const ldInst =\n sampledValueControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const sMV = createElement(connectedAp.ownerDocument, 'SMV', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: sMV,\n reference: getReference(connectedAp, 'SMV'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: sMV,\n node: address,\n reference: getReference(sMV, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorSmv();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorSmv();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n });\n\n return actions;\n}\n\nfunction initGSeElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorGse: () => string | null;\n appidGeneratorGse: () => string | null;\n unconnectedGseControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('GSEControl') ?? [])\n .filter(gseControl => {\n const id = identity(gseControl) as string;\n\n if (options.unconnectedGseControl.has(id)) {\n options.unconnectedGseControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(gseControl => {\n const cbName = gseControl.getAttribute('name');\n const ldInst =\n gseControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const gSE = createElement(connectedAp.ownerDocument, 'GSE', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: gSE,\n reference: getReference(connectedAp, 'GSE'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: gSE,\n node: address,\n reference: getReference(gSE, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorGse();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorGse();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n\n const minTime = createElement(connectedAp.ownerDocument, 'MinTime', {\n unit: 's',\n multiplier: 'm',\n });\n minTime.textContent = '10';\n actions.push({\n parent: gSE,\n node: minTime,\n reference: getReference(gSE, 'MinTime'),\n });\n\n const maxTime = createElement(connectedAp.ownerDocument, 'MaxTime', {\n unit: 's',\n multiplier: 'm',\n });\n maxTime.textContent = '10000';\n actions.push({\n parent: gSE,\n node: maxTime,\n reference: getReference(gSE, 'MaxTime'),\n });\n });\n\n return actions;\n}\n\nfunction unconnectedGseControls(doc: XMLDocument): Set<string> {\n const allGseControl = Array.from(doc.querySelectorAll('GSEControl'));\n\n const unconnectedGseControl = allGseControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> GSE[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedGseControl);\n return mySet;\n}\n\nfunction unconnectedSampledValueControls(doc: XMLDocument): Set<string> {\n const allSmvControl = Array.from(doc.querySelectorAll('SampledValueControl'));\n\n const unconnectedSmvControl = allSmvControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> SMV[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedSmvControl);\n return mySet;\n}\n\nfunction createConnectedApAction(parent: Element): WizardActor {\n return (_: WizardInputElement[], wizard: Element): EditV2[] => {\n const doc = parent.ownerDocument;\n\n // generators ensure unique MAC-Address and APPID across the project\n const macGeneratorSmv = macAddressGenerator(doc, 'SMV');\n const appidGeneratorSmv = appIdGenerator(doc, 'SMV');\n const macGeneratorGse = macAddressGenerator(doc, 'GSE');\n const appidGeneratorGse = appIdGenerator(doc, 'GSE');\n\n // track GSE and SMV for multiselect access points connection\n const unconnectedGseControl = unconnectedGseControls(doc);\n const unconnectedSampledValueControl = unconnectedSampledValueControls(doc);\n\n const list = wizard.querySelector('#apList') as SelectionList;\n if (!list) {\n return [];\n }\n\n const actions = list.selectedElements.map(accP => {\n const id = `${identity(accP)}`;\n const [iedName, apName] = id.split('>');\n const connAPactions: EditV2[] = [];\n\n const connectedAp = createElement(parent.ownerDocument, 'ConnectedAP', {\n iedName,\n apName,\n });\n connAPactions.push({\n parent,\n node: connectedAp,\n reference: getReference(parent, 'ConnectedAP'),\n });\n connAPactions.push(\n ...initSMVElements(doc, connectedAp, {\n macGeneratorSmv,\n appidGeneratorSmv,\n unconnectedSampledValueControl,\n }),\n );\n connAPactions.push(\n ...initGSeElements(doc, connectedAp, {\n macGeneratorGse,\n appidGeneratorGse,\n unconnectedGseControl,\n }),\n );\n\n return connAPactions;\n });\n\n return actions;\n };\n}\n\n/** Sorts connected `AccessPoint`s to the bottom. */\nfunction compareAccessPointConnection(\n a: AccessPointDescription,\n b: AccessPointDescription,\n): number {\n if (a.connected !== b.connected) {\n return b.connected ? -1 : 1;\n }\n return 0;\n}\n\nfunction existConnectedAp(accessPoint: Element): boolean {\n const iedName = accessPoint.closest('IED')?.getAttribute('name');\n const apName = accessPoint.getAttribute('name');\n\n const connAp = accessPoint.ownerDocument.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"][apName=\"${apName}\"]`,\n );\n\n return !!connAp;\n}\n\n/** @returns single page [[`Wizard`]] for creating SCL element ConnectedAP. */\nexport function createConnectedApWizard(element: Element): Wizard {\n const doc = element.ownerDocument;\n\n const accessPoints = Array.from(doc.querySelectorAll(':root > IED'))\n .sort(compareNames)\n .flatMap(ied =>\n Array.from(ied.querySelectorAll(':root > IED > AccessPoint')),\n )\n .map(accesspoint => ({\n element: accesspoint,\n connected: existConnectedAp(accesspoint),\n }))\n .sort(compareAccessPointConnection);\n\n const items: SelectItem[] = accessPoints.map(appP => ({\n headline: `${identity(appP.element)}`,\n supportingText: appP.connected ? 'AccessPoint already connected!' : '',\n selected: !appP.connected,\n disabled: appP.connected,\n attachedElement: appP.element,\n }));\n\n return {\n title: 'Add ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: createConnectedApAction(element),\n },\n content: [\n html`<selection-list\n id=\"apList\"\n multi\n .items=${items}\n filterable\n ></selection-list>`,\n ],\n };\n}\n\nfunction updateAction(element: Element): WizardActor {\n return (inputs: WizardInputElement[], wizard: Element): EditV2[] => {\n const instType: boolean =\n (wizard.querySelector('#instType') as SclCheckbox).value === 'true';\n\n const addressContent: Record<string, string | null> = {};\n inputs.forEach(input => {\n const key = input.label;\n const value = getValue(input);\n addressContent[key] = value;\n });\n\n return updateAddress(element, addressContent, instType);\n };\n}\n\n/** @returns single page [[`Wizard`]] to edit SCL element ConnectedAP. */\nexport function editConnectedApWizard(element: Element): Wizard {\n return {\n title: 'Edit ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: updateAction(element),\n },\n content: [...contentAddress({ element, types: getTypes(element) })],\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"connectedap.js","sourceRoot":"","sources":["../../wizards/connectedap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAQ3B,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EACL,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAQ,GAIT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAO7D,SAA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AAE,CAAC;gBACpC,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC;gBACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAC9B,cAAc,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAC9B,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IAC1D,CAAC,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;QACL,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;SAC9B;QACD,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC","sourcesContent":["import { html } from 'lit';\n\nimport { EditV2 } from '@openscd/oscd-api';\n\nimport {\n SelectionList,\n SelectItem,\n} from '@openenergytools/filterable-lists/dist/SelectionList.js';\nimport { SclCheckbox } from '@openenergytools/scl-checkbox';\n\nimport {\n appIdGenerator,\n getReference,\n identity,\n macAddressGenerator,\n} from '@openscd/scl-lib';\n\nimport {\n compareNames,\n createElement,\n getTypes,\n getValue,\n Wizard,\n WizardActor,\n WizardInputElement,\n} from '../foundation.js';\n\nimport { contentAddress, updateAddress } from './address.js';\n\ninterface AccessPointDescription {\n element: Element;\n connected?: boolean;\n}\n\nfunction initSMVElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorSmv: () => string | null;\n appidGeneratorSmv: () => string | null;\n unconnectedSampledValueControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('SampledValueControl') ?? [])\n .filter(sampledValueControl => {\n const id = identity(sampledValueControl) as string;\n\n if (options.unconnectedSampledValueControl.has(id)) {\n options.unconnectedSampledValueControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(sampledValueControl => {\n const cbName = sampledValueControl.getAttribute('name');\n const ldInst =\n sampledValueControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const sMV = createElement(connectedAp.ownerDocument, 'SMV', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: sMV,\n reference: getReference(connectedAp, 'SMV'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: sMV,\n node: address,\n reference: getReference(sMV, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorSmv();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorSmv();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n });\n\n return actions;\n}\n\nfunction initGSeElements(\n doc: XMLDocument,\n connectedAp: Element,\n options: {\n macGeneratorGse: () => string | null;\n appidGeneratorGse: () => string | null;\n unconnectedGseControl: Set<string>;\n },\n): EditV2[] {\n const actions: EditV2[] = [];\n\n const ied = doc.querySelector(\n `IED[name=\"${connectedAp.getAttribute('iedName')}\"]`,\n );\n\n Array.from(ied?.querySelectorAll('GSEControl') ?? [])\n .filter(gseControl => {\n const id = identity(gseControl) as string;\n\n if (options.unconnectedGseControl.has(id)) {\n options.unconnectedGseControl.delete(id);\n return true;\n }\n\n return false;\n })\n .forEach(gseControl => {\n const cbName = gseControl.getAttribute('name');\n const ldInst =\n gseControl.closest('LDevice')?.getAttribute('inst') ?? null;\n\n const gSE = createElement(connectedAp.ownerDocument, 'GSE', {\n cbName,\n ldInst,\n });\n actions.push({\n parent: connectedAp,\n node: gSE,\n reference: getReference(connectedAp, 'GSE'),\n });\n\n const address = createElement(connectedAp.ownerDocument, 'Address', {});\n actions.push({\n parent: gSE,\n node: address,\n reference: getReference(gSE, 'Address'),\n });\n\n const pMac = createElement(connectedAp.ownerDocument, 'P', {\n type: 'MAC-Address',\n });\n pMac.textContent = options.macGeneratorGse();\n actions.push({\n parent: address,\n node: pMac,\n reference: getReference(address, 'P'),\n });\n\n const pAppId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'APPID',\n });\n pAppId.textContent = options.appidGeneratorGse();\n actions.push({\n parent: address,\n node: pAppId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanId = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-ID',\n });\n pVlanId.textContent = '000';\n actions.push({\n parent: address,\n node: pVlanId,\n reference: getReference(address, 'P'),\n });\n\n const pVlanPrio = createElement(connectedAp.ownerDocument, 'P', {\n type: 'VLAN-PRIORITY',\n });\n pVlanPrio.textContent = '4';\n actions.push({\n parent: address,\n node: pVlanPrio,\n reference: getReference(address, 'P'),\n });\n\n const minTime = createElement(connectedAp.ownerDocument, 'MinTime', {\n unit: 's',\n multiplier: 'm',\n });\n minTime.textContent = '10';\n actions.push({\n parent: gSE,\n node: minTime,\n reference: getReference(gSE, 'MinTime'),\n });\n\n const maxTime = createElement(connectedAp.ownerDocument, 'MaxTime', {\n unit: 's',\n multiplier: 'm',\n });\n maxTime.textContent = '10000';\n actions.push({\n parent: gSE,\n node: maxTime,\n reference: getReference(gSE, 'MaxTime'),\n });\n });\n\n return actions;\n}\n\nfunction unconnectedGseControls(doc: XMLDocument): Set<string> {\n const allGseControl = Array.from(doc.querySelectorAll('GSEControl'));\n\n const unconnectedGseControl = allGseControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> GSE[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedGseControl);\n return mySet;\n}\n\nfunction unconnectedSampledValueControls(doc: XMLDocument): Set<string> {\n const allSmvControl = Array.from(doc.querySelectorAll('SampledValueControl'));\n\n const unconnectedSmvControl = allSmvControl\n .filter(gseControl => {\n const iedName = gseControl.closest('IED')?.getAttribute('name');\n const ldInst = gseControl.closest('LDevice')?.getAttribute('inst');\n const cbName = gseControl.getAttribute('name');\n\n return !doc.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"] ` +\n `> SMV[ldInst=\"${ldInst}\"][cbName=\"${cbName}\"]`,\n );\n })\n .map(gseControl => identity(gseControl) as string);\n\n const mySet = new Set(unconnectedSmvControl);\n return mySet;\n}\n\nfunction createConnectedApAction(parent: Element): WizardActor {\n return (_: WizardInputElement[], wizard: Element): EditV2[] => {\n const doc = parent.ownerDocument;\n\n // generators ensure unique MAC-Address and APPID across the project\n const macGeneratorSmv = macAddressGenerator(doc, 'SMV');\n const appidGeneratorSmv = appIdGenerator(doc, 'SMV');\n const macGeneratorGse = macAddressGenerator(doc, 'GSE');\n const appidGeneratorGse = appIdGenerator(doc, 'GSE');\n\n // track GSE and SMV for multiselect access points connection\n const unconnectedGseControl = unconnectedGseControls(doc);\n const unconnectedSampledValueControl = unconnectedSampledValueControls(doc);\n\n const list = wizard.querySelector('#apList') as SelectionList;\n if (!list) {\n return [];\n }\n\n const actions = list.selectedElements.map(accP => {\n const id = `${identity(accP)}`;\n const [iedName, apName] = id.split('>');\n const connAPactions: EditV2[] = [];\n\n const connectedAp = createElement(parent.ownerDocument, 'ConnectedAP', {\n iedName,\n apName,\n });\n connAPactions.push({\n parent,\n node: connectedAp,\n reference: getReference(parent, 'ConnectedAP'),\n });\n connAPactions.push(\n ...initSMVElements(doc, connectedAp, {\n macGeneratorSmv,\n appidGeneratorSmv,\n unconnectedSampledValueControl,\n }),\n );\n connAPactions.push(\n ...initGSeElements(doc, connectedAp, {\n macGeneratorGse,\n appidGeneratorGse,\n unconnectedGseControl,\n }),\n );\n\n return connAPactions;\n });\n\n return actions;\n };\n}\n\n/** Sorts connected `AccessPoint`s to the bottom. */\nfunction compareAccessPointConnection(\n a: AccessPointDescription,\n b: AccessPointDescription,\n): number {\n if (a.connected !== b.connected) {\n return b.connected ? -1 : 1;\n }\n return 0;\n}\n\nfunction existConnectedAp(accessPoint: Element): boolean {\n const iedName = accessPoint.closest('IED')?.getAttribute('name');\n const apName = accessPoint.getAttribute('name');\n\n const connAp = accessPoint.ownerDocument.querySelector(\n `ConnectedAP[iedName=\"${iedName}\"][apName=\"${apName}\"]`,\n );\n\n return !!connAp;\n}\n\n/** @returns single page [[`Wizard`]] for creating SCL element ConnectedAP. */\nexport function createConnectedApWizard(element: Element): Wizard {\n const doc = element.ownerDocument;\n\n const accessPoints = Array.from(doc.querySelectorAll(':root > IED'))\n .sort(compareNames)\n .flatMap(ied =>\n Array.from(ied.querySelectorAll(':root > IED > AccessPoint')),\n )\n .map(accesspoint => ({\n element: accesspoint,\n connected: existConnectedAp(accesspoint),\n }))\n .sort(compareAccessPointConnection);\n\n const items: SelectItem[] = accessPoints.map(appP => ({\n headline: `${identity(appP.element)}`,\n supportingText: appP.connected ? 'AccessPoint already connected!' : '',\n selected: !appP.connected,\n disabled: appP.connected,\n attachedElement: appP.element,\n }));\n\n return {\n title: 'Add ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: createConnectedApAction(element),\n },\n content: [\n html`<selection-list\n id=\"apList\"\n multi\n .items=${items}\n filterable\n ></selection-list>`,\n ],\n };\n}\n\nfunction updateAction(element: Element): WizardActor {\n return (inputs: WizardInputElement[], wizard: Element): EditV2[] => {\n const instType: boolean =\n (wizard.querySelector('#instType') as SclCheckbox).value === 'true';\n\n const addressContent: Record<string, string | null> = {};\n inputs.forEach(input => {\n if (!(input instanceof SclCheckbox)) {\n const key = input.label;\n const value = getValue(input);\n addressContent[key] = value;\n }\n });\n\n return updateAddress(element, addressContent, instType);\n };\n}\n\n/** @returns single page [[`Wizard`]] to edit SCL element ConnectedAP. */\nexport function editConnectedApWizard(element: Element): Wizard {\n return {\n title: 'Edit ConnectedAP',\n primary: {\n icon: 'save',\n label: 'save',\n action: updateAction(element),\n },\n content: [...contentAddress({ element, types: getTypes(element) })],\n };\n}\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { getValue, } from '../foundation.js';
|
|
3
|
+
function fcdaLabel(fcda) {
|
|
4
|
+
const parts = [];
|
|
5
|
+
const ldInst = fcda.getAttribute('ldInst');
|
|
6
|
+
if (ldInst)
|
|
7
|
+
parts.push(ldInst);
|
|
8
|
+
const prefix = fcda.getAttribute('prefix') ?? '';
|
|
9
|
+
const lnClass = fcda.getAttribute('lnClass') ?? '';
|
|
10
|
+
const lnInst = fcda.getAttribute('lnInst') ?? '';
|
|
11
|
+
if (lnClass)
|
|
12
|
+
parts.push(`${prefix}${lnClass}${lnInst}`);
|
|
13
|
+
const doName = fcda.getAttribute('doName');
|
|
14
|
+
if (doName)
|
|
15
|
+
parts.push(doName);
|
|
16
|
+
const daName = fcda.getAttribute('daName');
|
|
17
|
+
if (daName)
|
|
18
|
+
parts.push(daName);
|
|
19
|
+
const fc = fcda.getAttribute('fc');
|
|
20
|
+
if (fc)
|
|
21
|
+
parts.push(`[${fc}]`);
|
|
22
|
+
return parts.join('.');
|
|
23
|
+
}
|
|
24
|
+
function render(options) {
|
|
25
|
+
return [
|
|
26
|
+
html `<scl-text-field
|
|
27
|
+
label="name"
|
|
28
|
+
.value=${options.name}
|
|
29
|
+
disabled
|
|
30
|
+
dialogInitialFocus
|
|
31
|
+
></scl-text-field>`,
|
|
32
|
+
html `<scl-text-field
|
|
33
|
+
label="desc"
|
|
34
|
+
.value=${options.desc}
|
|
35
|
+
nullable
|
|
36
|
+
></scl-text-field>`,
|
|
37
|
+
html `<selection-list
|
|
38
|
+
id="fcda-list"
|
|
39
|
+
.items=${options.fcdas.map(fcda => ({
|
|
40
|
+
headline: fcdaLabel(fcda),
|
|
41
|
+
attachedElement: fcda,
|
|
42
|
+
selected: true,
|
|
43
|
+
}))}
|
|
44
|
+
></selection-list>`,
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
function updateAction(element) {
|
|
48
|
+
return (inputs, wizard) => {
|
|
49
|
+
const name = getValue(inputs.find(i => i.label === 'name'));
|
|
50
|
+
const desc = getValue(inputs.find(i => i.label === 'desc'));
|
|
51
|
+
const edits = [];
|
|
52
|
+
// Collect FCDA removals from the selection list
|
|
53
|
+
const list = wizard.querySelector('#fcda-list');
|
|
54
|
+
if (list) {
|
|
55
|
+
const selectedFcdas = new Set(list.selectedElements);
|
|
56
|
+
const allFcdas = Array.from(element.querySelectorAll('FCDA'));
|
|
57
|
+
for (const fcda of allFcdas) {
|
|
58
|
+
if (!selectedFcdas.has(fcda)) {
|
|
59
|
+
edits.push({ node: fcda });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Collect attribute changes
|
|
64
|
+
if (name !== element.getAttribute('name') ||
|
|
65
|
+
desc !== element.getAttribute('desc')) {
|
|
66
|
+
edits.push({ element, attributes: { name, desc } });
|
|
67
|
+
}
|
|
68
|
+
return edits;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export function editDataSetWizard(element) {
|
|
72
|
+
return {
|
|
73
|
+
title: 'Edit DataSet',
|
|
74
|
+
primary: {
|
|
75
|
+
icon: 'edit',
|
|
76
|
+
label: 'save',
|
|
77
|
+
action: updateAction(element),
|
|
78
|
+
},
|
|
79
|
+
content: render({
|
|
80
|
+
name: element.getAttribute('name') ?? '',
|
|
81
|
+
desc: element.getAttribute('desc'),
|
|
82
|
+
fcdas: Array.from(element.querySelectorAll('FCDA')),
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=dataset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataset.js","sourceRoot":"","sources":["../../wizards/dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAM3C,OAAO,EACL,QAAQ,GAIT,MAAM,kBAAkB,CAAC;AAQ1B,SAAS,SAAS,CAAC,IAAa;IAC9B,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE/B,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACnD,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACjD,IAAI,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;IAExD,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE/B,MAAM,M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G,IAAI,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACrD,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9D,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;gBAC5B,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7B,CAAC;YACH,CAAC;QACH,CAAC;QAED,4BAA4B;QAC5B,IACE,IAAI,KAAK,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC;YACrC,IAAI,KAAK,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,EACrC,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACtD,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,OAAO;QACL,KAAK,EAAE,cAAc;QACrB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC;SAC9B;QACD,OAAO,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE;YACxC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC;YAClC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;SACpD,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["import { html, TemplateResult } from 'lit';\n\nimport { EditV2 } from '@openscd/oscd-api';\n\nimport { SelectionList } from '@openenergytools/filterable-lists/dist/SelectionList.js';\n\nimport {\n getValue,\n Wizard,\n WizardActor,\n WizardInputElement,\n} from '../foundation.js';\n\ntype RenderOptions = {\n name: string;\n desc: string | null;\n fcdas: Element[];\n};\n\nfunction fcdaLabel(fcda: Element): string {\n const parts: string[] = [];\n\n const ldInst = fcda.getAttribute('ldInst');\n if (ldInst) parts.push(ldInst);\n\n const prefix = fcda.getAttribute('prefix') ?? '';\n const lnClass = fcda.getAttribute('lnClass') ?? '';\n const lnInst = fcda.getAttribute('lnInst') ?? '';\n if (lnClass) parts.push(`${prefix}${lnClass}${lnInst}`);\n\n const doName = fcda.getAttribute('doName');\n if (doName) parts.push(doName);\n\n const daName = fcda.getAttribute('daName');\n if (daName) parts.push(daName);\n\n const fc = fcda.getAttribute('fc');\n if (fc) parts.push(`[${fc}]`);\n\n return parts.join('.');\n}\n\nfunction render(options: RenderOptions): TemplateResult[] {\n return [\n html`<scl-text-field\n label=\"name\"\n .value=${options.name}\n disabled\n dialogInitialFocus\n ></scl-text-field>`,\n html`<scl-text-field\n label=\"desc\"\n .value=${options.desc}\n nullable\n ></scl-text-field>`,\n html`<selection-list\n id=\"fcda-list\"\n .items=${options.fcdas.map(fcda => ({\n headline: fcdaLabel(fcda),\n attachedElement: fcda,\n selected: true,\n }))}\n ></selection-list>`,\n ];\n}\n\nfunction updateAction(element: Element): WizardActor {\n return (inputs: WizardInputElement[], wizard: Element): EditV2[] => {\n const name = getValue(inputs.find(i => i.label === 'name')!)!;\n const desc = getValue(inputs.find(i => i.label === 'desc')!);\n\n const edits: EditV2[] = [];\n\n // Collect FCDA removals from the selection list\n const list = wizard.querySelector('#fcda-list') as SelectionList | null;\n if (list) {\n const selectedFcdas = new Set(list.selectedElements);\n const allFcdas = Array.from(element.querySelectorAll('FCDA'));\n for (const fcda of allFcdas) {\n if (!selectedFcdas.has(fcda)) {\n edits.push({ node: fcda });\n }\n }\n }\n\n // Collect attribute changes\n if (\n name !== element.getAttribute('name') ||\n desc !== element.getAttribute('desc')\n ) {\n edits.push({ element, attributes: { name, desc } });\n }\n\n return edits;\n };\n}\n\nexport function editDataSetWizard(element: Element): Wizard {\n return {\n title: 'Edit DataSet',\n primary: {\n icon: 'edit',\n label: 'save',\n action: updateAction(element),\n },\n content: render({\n name: element.getAttribute('name') ?? '',\n desc: element.getAttribute('desc'),\n fcdas: Array.from(element.querySelectorAll('FCDA')),\n }),\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|