@compas-oscd/open-scd 0.34.22 → 0.34.24

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.
Files changed (241) hide show
  1. package/dist/WizardDivider.d.ts +1 -0
  2. package/dist/WizardDivider.d.ts.map +1 -0
  3. package/dist/Wizarding.d.ts +20 -0
  4. package/dist/Wizarding.d.ts.map +1 -0
  5. package/dist/Wizarding.js +4 -1
  6. package/dist/Wizarding.js.map +1 -1
  7. package/dist/action-icon.d.ts +1 -0
  8. package/dist/action-icon.d.ts.map +1 -0
  9. package/dist/action-pane.d.ts +1 -0
  10. package/dist/action-pane.d.ts.map +1 -0
  11. package/dist/addons/Editor.d.ts +1 -0
  12. package/dist/addons/Editor.d.ts.map +1 -0
  13. package/dist/addons/History.d.ts +12 -1
  14. package/dist/addons/History.d.ts.map +1 -0
  15. package/dist/addons/History.js +10 -0
  16. package/dist/addons/History.js.map +1 -1
  17. package/dist/addons/Layout.d.ts +1 -0
  18. package/dist/addons/Layout.d.ts.map +1 -0
  19. package/dist/addons/Settings.d.ts +1 -0
  20. package/dist/addons/Settings.d.ts.map +1 -0
  21. package/dist/addons/Waiter.d.ts +1 -0
  22. package/dist/addons/Waiter.d.ts.map +1 -0
  23. package/dist/addons/Wizards.d.ts +1 -0
  24. package/dist/addons/Wizards.d.ts.map +1 -0
  25. package/dist/addons/editor/edit-action-to-v1-converter.d.ts +1 -0
  26. package/dist/addons/editor/edit-action-to-v1-converter.d.ts.map +1 -0
  27. package/dist/addons/editor/edit-v1-to-v2-converter.d.ts +1 -0
  28. package/dist/addons/editor/edit-v1-to-v2-converter.d.ts.map +1 -0
  29. package/dist/addons/history/get-log-text.d.ts +1 -0
  30. package/dist/addons/history/get-log-text.d.ts.map +1 -0
  31. package/dist/addons/menu-tabs/menu-tabs.d.ts +1 -0
  32. package/dist/addons/menu-tabs/menu-tabs.d.ts.map +1 -0
  33. package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts +1 -0
  34. package/dist/addons/plugin-manager/custom-plugin-dialog.d.ts.map +1 -0
  35. package/dist/addons/plugin-manager/plugin-manager.d.ts +1 -0
  36. package/dist/addons/plugin-manager/plugin-manager.d.ts.map +1 -0
  37. package/dist/filtered-list.d.ts +1 -0
  38. package/dist/filtered-list.d.ts.map +1 -0
  39. package/dist/finder-list.d.ts +1 -0
  40. package/dist/finder-list.d.ts.map +1 -0
  41. package/dist/foundation/compare.d.ts +1 -0
  42. package/dist/foundation/compare.d.ts.map +1 -0
  43. package/dist/foundation/dai.d.ts +1 -0
  44. package/dist/foundation/dai.d.ts.map +1 -0
  45. package/dist/foundation/generators.d.ts +1 -0
  46. package/dist/foundation/generators.d.ts.map +1 -0
  47. package/dist/foundation/ied.d.ts +1 -0
  48. package/dist/foundation/ied.d.ts.map +1 -0
  49. package/dist/foundation/nsd.d.ts +1 -0
  50. package/dist/foundation/nsd.d.ts.map +1 -0
  51. package/dist/foundation/nsdoc.d.ts +1 -0
  52. package/dist/foundation/nsdoc.d.ts.map +1 -0
  53. package/dist/foundation/scl.d.ts +1 -0
  54. package/dist/foundation/scl.d.ts.map +1 -0
  55. package/dist/foundation.d.ts +1 -0
  56. package/dist/foundation.d.ts.map +1 -0
  57. package/dist/icons/compare.d.ts +1 -0
  58. package/dist/icons/compare.d.ts.map +1 -0
  59. package/dist/icons/icons.d.ts +1 -0
  60. package/dist/icons/icons.d.ts.map +1 -0
  61. package/dist/icons/ied-icons.d.ts +1 -0
  62. package/dist/icons/ied-icons.d.ts.map +1 -0
  63. package/dist/icons/lnode.d.ts +1 -0
  64. package/dist/icons/lnode.d.ts.map +1 -0
  65. package/dist/index.d.ts +22 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +24 -0
  68. package/dist/index.js.map +1 -0
  69. package/dist/open-scd.d.ts +1 -0
  70. package/dist/open-scd.d.ts.map +1 -0
  71. package/dist/oscd-filter-button.d.ts +1 -0
  72. package/dist/oscd-filter-button.d.ts.map +1 -0
  73. package/dist/plain-compare-list.d.ts +1 -0
  74. package/dist/plain-compare-list.d.ts.map +1 -0
  75. package/dist/plugin-tag.d.ts +1 -0
  76. package/dist/plugin-tag.d.ts.map +1 -0
  77. package/dist/plugin.d.ts +1 -0
  78. package/dist/plugin.d.ts.map +1 -0
  79. package/dist/plugin.events.d.ts +1 -0
  80. package/dist/plugin.events.d.ts.map +1 -0
  81. package/dist/plugins.d.ts +1 -0
  82. package/dist/plugins.d.ts.map +1 -0
  83. package/dist/schemas.d.ts +1 -0
  84. package/dist/schemas.d.ts.map +1 -0
  85. package/dist/themes.d.ts +1 -0
  86. package/dist/themes.d.ts.map +1 -0
  87. package/dist/translations/de.d.ts +1 -0
  88. package/dist/translations/de.d.ts.map +1 -0
  89. package/dist/translations/en.d.ts +1 -0
  90. package/dist/translations/en.d.ts.map +1 -0
  91. package/dist/translations/loader.d.ts +1 -0
  92. package/dist/translations/loader.d.ts.map +1 -0
  93. package/dist/wizard-checkbox.d.ts +1 -0
  94. package/dist/wizard-checkbox.d.ts.map +1 -0
  95. package/dist/wizard-dialog.d.ts +1 -0
  96. package/dist/wizard-dialog.d.ts.map +1 -0
  97. package/dist/wizard-select.d.ts +1 -0
  98. package/dist/wizard-select.d.ts.map +1 -0
  99. package/dist/wizard-textfield.d.ts +2 -1
  100. package/dist/wizard-textfield.d.ts.map +1 -0
  101. package/dist/wizards.d.ts +1 -0
  102. package/dist/wizards.d.ts.map +1 -0
  103. package/package.json +317 -47
  104. package/dist/core/api/api.js +0 -7
  105. package/dist/core/api/api.js.map +0 -1
  106. package/dist/core/api/editor/subject.js +0 -22
  107. package/dist/core/api/editor/subject.js.map +0 -1
  108. package/dist/core/api/editor/xml-editor.js +0 -82
  109. package/dist/core/api/editor/xml-editor.js.map +0 -1
  110. package/dist/core/api/plugin-state-api.js +0 -27
  111. package/dist/core/api/plugin-state-api.js.map +0 -1
  112. package/dist/core/foundation/cyrb64.js +0 -26
  113. package/dist/core/foundation/cyrb64.js.map +0 -1
  114. package/dist/core/foundation/deprecated/edit-event.js +0 -44
  115. package/dist/core/foundation/deprecated/edit-event.js.map +0 -1
  116. package/dist/core/foundation/deprecated/editor.js +0 -94
  117. package/dist/core/foundation/deprecated/editor.js.map +0 -1
  118. package/dist/core/foundation/deprecated/history.js +0 -17
  119. package/dist/core/foundation/deprecated/history.js.map +0 -1
  120. package/dist/core/foundation/deprecated/open-event.js +0 -9
  121. package/dist/core/foundation/deprecated/open-event.js.map +0 -1
  122. package/dist/core/foundation/deprecated/settings.js +0 -19
  123. package/dist/core/foundation/deprecated/settings.js.map +0 -1
  124. package/dist/core/foundation/deprecated/validation.js +0 -8
  125. package/dist/core/foundation/deprecated/validation.js.map +0 -1
  126. package/dist/core/foundation/deprecated/waiter.js +0 -12
  127. package/dist/core/foundation/deprecated/waiter.js.map +0 -1
  128. package/dist/core/foundation/edit-completed-event.js +0 -11
  129. package/dist/core/foundation/edit-completed-event.js.map +0 -1
  130. package/dist/core/foundation/edit-event.js +0 -8
  131. package/dist/core/foundation/edit-event.js.map +0 -1
  132. package/dist/core/foundation/edit.js +0 -31
  133. package/dist/core/foundation/edit.js.map +0 -1
  134. package/dist/core/foundation/handle-edit.js +0 -151
  135. package/dist/core/foundation/handle-edit.js.map +0 -1
  136. package/dist/core/foundation/open-event.js +0 -8
  137. package/dist/core/foundation/open-event.js.map +0 -1
  138. package/dist/core/foundation/plugin.js +0 -2
  139. package/dist/core/foundation/plugin.js.map +0 -1
  140. package/dist/core/foundation.js +0 -14
  141. package/dist/core/foundation.js.map +0 -1
  142. package/dist/core/locales.js +0 -21
  143. package/dist/core/locales.js.map +0 -1
  144. package/dist/openscd/src/WizardDivider.js +0 -37
  145. package/dist/openscd/src/WizardDivider.js.map +0 -1
  146. package/dist/openscd/src/Wizarding.js +0 -38
  147. package/dist/openscd/src/Wizarding.js.map +0 -1
  148. package/dist/openscd/src/action-icon.js +0 -220
  149. package/dist/openscd/src/action-icon.js.map +0 -1
  150. package/dist/openscd/src/action-pane.js +0 -176
  151. package/dist/openscd/src/action-pane.js.map +0 -1
  152. package/dist/openscd/src/addons/Editor.js +0 -106
  153. package/dist/openscd/src/addons/Editor.js.map +0 -1
  154. package/dist/openscd/src/addons/History.js +0 -581
  155. package/dist/openscd/src/addons/History.js.map +0 -1
  156. package/dist/openscd/src/addons/Layout.js +0 -619
  157. package/dist/openscd/src/addons/Layout.js.map +0 -1
  158. package/dist/openscd/src/addons/Settings.js +0 -465
  159. package/dist/openscd/src/addons/Settings.js.map +0 -1
  160. package/dist/openscd/src/addons/Waiter.js +0 -45
  161. package/dist/openscd/src/addons/Waiter.js.map +0 -1
  162. package/dist/openscd/src/addons/Wizards.js +0 -48
  163. package/dist/openscd/src/addons/Wizards.js.map +0 -1
  164. package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js +0 -96
  165. package/dist/openscd/src/addons/editor/edit-action-to-v1-converter.js.map +0 -1
  166. package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js +0 -37
  167. package/dist/openscd/src/addons/editor/edit-v1-to-v2-converter.js.map +0 -1
  168. package/dist/openscd/src/addons/history/get-log-text.js +0 -26
  169. package/dist/openscd/src/addons/history/get-log-text.js.map +0 -1
  170. package/dist/openscd/src/addons/menu-tabs/menu-tabs.js +0 -74
  171. package/dist/openscd/src/addons/menu-tabs/menu-tabs.js.map +0 -1
  172. package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js +0 -177
  173. package/dist/openscd/src/addons/plugin-manager/custom-plugin-dialog.js.map +0 -1
  174. package/dist/openscd/src/addons/plugin-manager/plugin-manager.js +0 -165
  175. package/dist/openscd/src/addons/plugin-manager/plugin-manager.js.map +0 -1
  176. package/dist/openscd/src/filtered-list.js +0 -168
  177. package/dist/openscd/src/filtered-list.js.map +0 -1
  178. package/dist/openscd/src/finder-list.js +0 -207
  179. package/dist/openscd/src/finder-list.js.map +0 -1
  180. package/dist/openscd/src/foundation/compare.js +0 -273
  181. package/dist/openscd/src/foundation/compare.js.map +0 -1
  182. package/dist/openscd/src/foundation/dai.js +0 -127
  183. package/dist/openscd/src/foundation/dai.js.map +0 -1
  184. package/dist/openscd/src/foundation/generators.js +0 -67
  185. package/dist/openscd/src/foundation/generators.js.map +0 -1
  186. package/dist/openscd/src/foundation/ied.js +0 -84
  187. package/dist/openscd/src/foundation/ied.js.map +0 -1
  188. package/dist/openscd/src/foundation/nsd.js +0 -13
  189. package/dist/openscd/src/foundation/nsd.js.map +0 -1
  190. package/dist/openscd/src/foundation/nsdoc.js +0 -180
  191. package/dist/openscd/src/foundation/nsdoc.js.map +0 -1
  192. package/dist/openscd/src/foundation/scl.js +0 -64
  193. package/dist/openscd/src/foundation/scl.js.map +0 -1
  194. package/dist/openscd/src/foundation.js +0 -1922
  195. package/dist/openscd/src/foundation.js.map +0 -1
  196. package/dist/openscd/src/icons/compare.js +0 -11
  197. package/dist/openscd/src/icons/compare.js.map +0 -1
  198. package/dist/openscd/src/icons/icons.js +0 -611
  199. package/dist/openscd/src/icons/icons.js.map +0 -1
  200. package/dist/openscd/src/icons/ied-icons.js +0 -11
  201. package/dist/openscd/src/icons/ied-icons.js.map +0 -1
  202. package/dist/openscd/src/icons/lnode.js +0 -50
  203. package/dist/openscd/src/icons/lnode.js.map +0 -1
  204. package/dist/openscd/src/open-scd.js +0 -483
  205. package/dist/openscd/src/open-scd.js.map +0 -1
  206. package/dist/openscd/src/oscd-filter-button.js +0 -89
  207. package/dist/openscd/src/oscd-filter-button.js.map +0 -1
  208. package/dist/openscd/src/plain-compare-list.js +0 -132
  209. package/dist/openscd/src/plain-compare-list.js.map +0 -1
  210. package/dist/openscd/src/plugin-tag.js +0 -23
  211. package/dist/openscd/src/plugin-tag.js.map +0 -1
  212. package/dist/openscd/src/plugin.events.js +0 -12
  213. package/dist/openscd/src/plugin.events.js.map +0 -1
  214. package/dist/openscd/src/plugin.js +0 -2
  215. package/dist/openscd/src/plugin.js.map +0 -1
  216. package/dist/openscd/src/plugins.js +0 -256
  217. package/dist/openscd/src/plugins.js.map +0 -1
  218. package/dist/openscd/src/schemas.js +0 -9325
  219. package/dist/openscd/src/schemas.js.map +0 -1
  220. package/dist/openscd/src/themes.js +0 -122
  221. package/dist/openscd/src/themes.js.map +0 -1
  222. package/dist/openscd/src/translations/de.js +0 -954
  223. package/dist/openscd/src/translations/de.js.map +0 -1
  224. package/dist/openscd/src/translations/en.js +0 -950
  225. package/dist/openscd/src/translations/en.js.map +0 -1
  226. package/dist/openscd/src/translations/loader.js +0 -10
  227. package/dist/openscd/src/translations/loader.js.map +0 -1
  228. package/dist/openscd/src/wizard-checkbox.js +0 -152
  229. package/dist/openscd/src/wizard-checkbox.js.map +0 -1
  230. package/dist/openscd/src/wizard-dialog.js +0 -374
  231. package/dist/openscd/src/wizard-dialog.js.map +0 -1
  232. package/dist/openscd/src/wizard-select.js +0 -115
  233. package/dist/openscd/src/wizard-select.js.map +0 -1
  234. package/dist/openscd/src/wizard-textfield.js +0 -191
  235. package/dist/openscd/src/wizard-textfield.js.map +0 -1
  236. package/dist/openscd/src/wizards.js +0 -196
  237. package/dist/openscd/src/wizards.js.map +0 -1
  238. package/dist/xml/src/foundation.js +0 -67
  239. package/dist/xml/src/foundation.js.map +0 -1
  240. package/dist/xml/src/index.js +0 -2
  241. package/dist/xml/src/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../src/icons/icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAqC,MAAM,aAAa,CAAC;AAiB3E,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAA;;;;;;;;;;;OAWrB,CAAC;AAER,MAAM,QAAQ,GAAG;IACf,MAAM,EAAE,GAAG,CAAA;;;+FAGkF;IAC7F,MAAM,EAAE,GAAG,CAAA,stBAAstB;IACjuB,MAAM,EAAE,GAAG,CAAA,+xBAA+xB;IAC1yB,QAAQ,EAAE,GAAG,CAAA,iZAAiZ;IAC9Z,IAAI,EAAE,GAAG,CAAA,uOAAuO;IAChP,OAAO,EAAE,GAAG,CAAA,qIAAqI;IACjJ,KAAK,EAAE,GAAG,CAAA,qTAAqT;IAC/T,SAAS,EAAE,GAAG,CAAA,iQAAiQ;IAC/Q,MAAM,EAAE,GAAG,CAAA,yZAAyZ;IACpa,OAAO,EAAE,GAAG,CAAA,sMAAsM;IAClN,UAAU,EAAE,GAAG,CAAA,4RAA4R;IAC3S,OAAO,EAAE,GAAG,CAAA,sRAAsR;CACnS,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA,2DAA2D,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC;AAErH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA,2DAA2D,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC;AAEvH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA,2DAA2D,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC;AAEjH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA,2DAA2D,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC;AAEjH,MAAM,CAAC,MAAM,iBAAiB,GAA+C;IAC3E,aAAa,EAAE,UAAU;IACzB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,SAAS;IACrB,mBAAmB,EAAE,OAAO;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA;;OAErB,CAAC;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;OAEtB,CAAC;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;OAEtB,CAAC;AAOR,MAAM,CAAC,MAAM,cAAc,GAA4C;IACrE,MAAM,EAAE;QACN,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,EAAE;KACX;IACD,MAAM,EAAE;QACN,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,EAAE;KACX;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,EAAE;KACX;IACD,MAAM,EAAE;QACN,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,EAAE;KACX;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAChC;IACE,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC;CAC7B,CAAC;AAEJ,MAAM,CAAC,MAAM,UAAU,GAA8B;IACnD,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,UAAU;IACnB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,MAAM,UAAU,OAAO,CAAC,IAAc;IACpC,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,IAAI,CAAA,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IAClD,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IAChD,OAAO,IAAI,CAAA;;cAEC,MAAM;mBACD,KAAK,IAAI,MAAM;aACrB,KAAK;;MAEZ,QAAQ,CAAC,IAAI,CAAC;UACV,CAAC;AACX,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAc,EAAE,KAAc;IAC1D,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,IAAI,CAAA,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC;IAClD,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC;IAChD,OAAO,IAAI,CAAA;YACD,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;;cAE1B,MAAM;mBACD,KAAK,IAAI,MAAM;aACrB,KAAK;;MAEZ,QAAQ,CAAC,IAAI,CAAC;UACV,CAAC;AACX,CAAC;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0E9B,CAAC;AAER,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;OAgBzB,CAAC;AAER,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4B7B,CAAC;AAER,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BpB,CAAC;AAER,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkC7B,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkC/B,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BnC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BnC,CAAC;AAER,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsC5B,CAAC;AAER,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;OAkB3C,CAAC;AAER,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAA;;;;;;;;;;;OAWjC,CAAC;AAER,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwC3C,CAAC;AAER,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAA;;;;;;;;;;;;;;;;OAgBxB,CAAC;AAER,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;SAGxB,CAAC;AAEV,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;OAE5B,CAAC;AAER,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;OAsB1B,CAAC;AACR,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;OAmBpB,CAAC;AACR,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;OAmBvB,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;OAuBlC,CAAC","sourcesContent":["import { html, svg, SVGTemplateResult, TemplateResult } from 'lit-element';\n\nexport type iconType =\n | 'action'\n | 'dAIcon'\n | 'dOIcon'\n | 'enumIcon'\n | 'info'\n | 'warning'\n | 'error'\n | 'reset'\n | 'reportIcon'\n | 'smvIcon'\n | 'gooseIcon'\n | 'lNIcon'\n | 'logIcon';\n\nexport const editIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 25 25\"\n>\n <path\n d=\"M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z\"\n stroke=\"currentColor\"\n fill=\"transparent\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n</svg>`;\n\nconst pathsSVG = {\n action: svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M13 3c-4.97 0-9\n 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7\n 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0\n 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\" fill=\"currentColor\"></path>`,\n dAIcon: svg`<path fill=\"currentColor\" d=\"m4.2 0c-2.31 0-4.2 1.89-4.2 4.2v11.6c0 2.31 1.89 4.2 4.2 4.2h18.1c2.31 0 4.2-1.89 4.2-4.2v-11.6c0-2.31-1.89-4.2-4.2-4.2zm0 1.89h18.1c1.29 0 2.3 1.01 2.3 2.3v11.6c0 1.29-1.01 2.31-2.3 2.31h-18.1c-1.29 0-2.3-1.01-2.3-2.31v-11.6c0-1.29 1.01-2.3 2.3-2.3z\"/><path fill=\"currentColor\" d=\"m12.5 9.94q0 1.55-0.509 2.71-0.503 1.15-1.43 1.76-0.923 0.611-2.12 0.611h-3.37v-10h3.02q2.11 0 3.26 1.28 1.15 1.27 1.15 3.65zm-1.76 0q0-1.61-0.698-2.46-0.698-0.852-1.99-0.852h-1.24v6.77h1.48q1.12 0 1.79-0.931 0.663-0.931 0.663-2.53z\"/><path fill=\"currentColor\" d=\"m19.7 15-0.74-2.56h-3.18l-0.74 2.56h-1.75l3.04-10h2.06l3.03 10zm-1.13-4.13-0.823-2.88-0.379-1.46q-0.0947 0.412-0.178 0.739-0.0829 0.327-1.02 3.59z\"/>`,\n dOIcon: svg`<path fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.89\" d=\"m4.2 0.945h18.1c1.8 0 3.25 1.45 3.25 3.25v11.6c0 1.8-1.45 3.25-3.25 3.25h-18.1c-1.8 0-3.25-1.45-3.25-3.25v-11.6c0-1.8 1.45-3.25 3.25-3.25z\"/><path d=\"m12.1 9.94q0 1.55-0.509 2.71-0.503 1.15-1.43 1.76-0.923 0.611-2.12 0.611h-3.37v-10h3.02q2.11 0 3.26 1.28 1.15 1.27 1.15 3.65zm-1.76 0q0-1.61-0.698-2.46-0.698-0.852-1.99-0.852h-1.24v6.77h1.48q1.12 0 1.79-0.931 0.663-0.931 0.663-2.53z\"/><path d=\"m21.6 9.97q0 1.56-0.515 2.75-0.515 1.19-1.47 1.82-0.959 0.625-2.24 0.625-1.97 0-3.08-1.39-1.11-1.39-1.11-3.81 0-2.41 1.11-3.76t3.1-1.35 3.1 1.36q1.12 1.36 1.12 3.74zm-1.78 0q0-1.62-0.639-2.54-0.639-0.923-1.79-0.923-1.17 0-1.81 0.916-0.639 0.909-0.639 2.54 0 1.65 0.651 2.6 0.657 0.945 1.79 0.945 1.17 0 1.81-0.923 0.639-0.923 0.639-2.62z\"/>`,\n enumIcon: svg`<path fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.89\" d=\"m4.2 0.945h18.1c1.8 0 3.25 1.45 3.25 3.25v11.6c0 1.8-1.45 3.25-3.25 3.25h-18.1c-1.8 0-3.25-1.45-3.25-3.25v-11.6c0-1.8 1.45-3.25 3.25-3.25z\"/><path d=\"m5.37 15v-10h6.56v1.62h-4.81v2.51h4.45v1.62h-4.45v2.64h5.06v1.62z\"/><path d=\"m18.5 15-3.63-7.71q0.107 1.12 0.107 1.8v5.9h-1.55v-10h1.99l3.69 7.77q-0.107-1.07-0.107-1.95v-5.82h1.55v10z\"/>`,\n info: svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\" fill=\"currentColor\"></path>`,\n warning: svg`<path d=\"M0 0h24v24H0z\" fill=\"none\"></path><path d=\"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\" fill=\"currentColor\"></path>`,\n error: svg`<path d=\"M0 0h24v24H0V0z\" fill=\"none\"></path><path d=\"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM19 14.9L14.9 19H9.1L5 14.9V9.1L9.1 5h5.8L19 9.1v5.8z\" fill=\"currentColor\"></path><path d=\"M11 7h2v7h-2z\" fill=\"currentColor\"></path><circle cx=\"12\" cy=\"16\" r=\"1\" fill=\"currentColor\"></circle>`,\n gooseIcon: svg`<path fill=\"currentColor\" d=\"M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n lNIcon: svg`<path stroke=\"currentColor\" stroke-width=\"1.89\" fill=\"none\" d=\"m4.2 0.945h18.1c1.8 0 3.25 1.45 3.25 3.25v11.6c0 1.8-1.45 3.25-3.25 3.25h-18.1c-1.8 0-3.25-1.45-3.25-3.25v-11.6c0-1.8 1.45-3.25 3.25-3.25z\"/><path fill=\"currentColor\" d=\"m5.71 15v-10h1.75v8.39h4.47v1.62z\"/><path fill=\"currentColor\" d=\"m18.2 15-3.63-7.71q0.107 1.12 0.107 1.8v5.9h-1.55v-10h1.99l3.69 7.77q-0.107-1.07-0.107-1.95v-5.82h1.55v10z\"/>`,\n logIcon: svg`<path fill=\"currentColor\" d=\"M9,7H11V15H15V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n reportIcon: svg`<path fill=\"currentColor\" d=\"M9,7H13A2,2 0 0,1 15,9V11C15,11.84 14.5,12.55 13.76,12.85L15,17H13L11.8,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,16.41 7.58,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n smvIcon: svg`<path fill=\"currentColor\" d=\"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />`,\n};\n\nexport const gooseIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['gooseIcon']}</svg>`;\n\nexport const reportIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['reportIcon']}</svg>`;\n\nexport const smvIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['smvIcon']}</svg>`;\n\nexport const logIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">${pathsSVG['logIcon']}</svg>`;\n\nexport const controlBlockIcons: Partial<Record<string, SVGTemplateResult>> = {\n ReportControl: reportIcon,\n LogControl: logIcon,\n GSEControl: gooseIcon,\n SampledValueControl: smvIcon,\n};\n\nexport const inputIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M14,12L10,8V11H2V13H10V16M20,18V6C20,4.89 19.1,4 18,4H6A2,2 0 0,0 4,6V9H6V6H18V18H6V15H4V18A2,2 0 0,0 6,20H18A2,2 0 0,0 20,18Z\" />\n</svg>`;\n\nexport const clientIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M21,14V4H3V14H21M21,2A2,2 0 0,1 23,4V16A2,2 0 0,1 21,18H14L16,21V22H8V21L10,18H3C1.89,18 1,17.1 1,16V4C1,2.89 1.89,2 3,2H21M4,5H15V10H4V5M16,5H20V7H16V5M20,8V13H16V8H20M4,11H9V13H4V11M10,11H15V13H10V11Z\" />\n</svg>`;\n\nexport const disconnect = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M4,1C2.89,1 2,1.89 2,3V7C2,8.11 2.89,9 4,9H1V11H13V9H10C11.11,9 12,8.11 12,7V3C12,1.89 11.11,1 10,1H4M4,3H10V7H4V3M14,13C12.89,13 12,13.89 12,15V19C12,20.11 12.89,21 14,21H11V23H23V21H20C21.11,21 22,20.11 22,19V15C22,13.89 21.11,13 20,13H14M3.88,13.46L2.46,14.88L4.59,17L2.46,19.12L3.88,20.54L6,18.41L8.12,20.54L9.54,19.12L7.41,17L9.54,14.88L8.12,13.46L6,15.59L3.88,13.46M14,15H20V19H14V15Z\" />\n</svg>`;\n\nexport type iconProperty = {\n width: number;\n height: number;\n};\n\nexport const iconProperties: Partial<Record<iconType, iconProperty>> = {\n dAIcon: {\n width: 26.5,\n height: 24,\n },\n dOIcon: {\n width: 26.5,\n height: 24,\n },\n enumIcon: {\n width: 26.5,\n height: 24,\n },\n lNIcon: {\n width: 26.5,\n height: 24,\n },\n};\n\nexport const dataTypeTemplateIcons: Partial<Record<string, SVGTemplateResult>> =\n {\n DAType: getIcon('dAIcon'),\n DOType: getIcon('dOIcon'),\n EnumType: getIcon('enumIcon'),\n LNodeType: getIcon('lNIcon'),\n };\n\nexport const iconColors: { [key: string]: string } = {\n info: '--cyan',\n warning: '--yellow',\n error: '--red',\n action: '--blue',\n};\n\nexport function getIcon(type: iconType): TemplateResult {\n if (type === 'reset') return html``;\n const height = iconProperties[type]?.height ?? 24;\n const width = iconProperties[type]?.width ?? 24;\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"${height}\"\n viewBox=\"0 0 ${width} ${height}\"\n width=\"${width}\"\n >\n ${pathsSVG[type]}\n </svg> `;\n}\n\nexport function getFilterIcon(type: iconType, state: boolean): TemplateResult {\n if (type === 'reset') return html``;\n const height = iconProperties[type]?.height ?? 24;\n const width = iconProperties[type]?.width ?? 24;\n return html`<svg\n slot=\"${state ? 'onIcon' : 'offIcon'}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"${height}\"\n viewBox=\"0 0 ${width} ${height}\"\n width=\"${width}\"\n >\n ${pathsSVG[type]}\n </svg> `;\n}\n\nexport const networkConfigIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n slot=\"icon\"\n width=\"25px\"\n height=\"25px\"\n style=\"margin-bottom:0px;\"\n>\n <rect\n width=\"8\"\n height=\"8\"\n x=\"8.5\"\n y=\"2\"\n rx=\"1\"\n ry=\"1\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <rect\n width=\"8\"\n height=\"8\"\n x=\"2.5\"\n y=\"15\"\n rx=\"1\"\n ry=\"1\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <rect\n width=\"8\"\n height=\"8\"\n x=\"15\"\n y=\"15\"\n rx=\"1\"\n ry=\"1\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n\n <line\n x1=\"2\"\n y1=\"12.5\"\n x2=\"23\"\n y2=\"12.5\"\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-width=\"1.5\"\n />\n <line\n x1=\"12.5\"\n y1=\"10\"\n x2=\"12.5\"\n y2=\"12.5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <line\n x1=\"6.5\"\n y1=\"12.5\"\n x2=\"6.5\"\n y2=\"15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n <line\n x1=\"19\"\n y1=\"12.5\"\n x2=\"19\"\n y2=\"15\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n />\n</svg>`;\n\nexport const zeroLineIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n slot=\"icon\"\n viewBox=\"0 0 25 25\"\n>\n <path\n d=\"M 2 9 L 12.5 2 L 23 9 L 21 9 L 21 21 L 4 21 L 4 9 Z\"\n fill=\"transparent\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M 11 7 L 17.5 7 L 13.5 11 L 16.5 11 L 10 19 L 11.5 13 L 8.5 13 Z \"\n fill=\"currentColor\"\n />\n</svg>`;\n\nexport const voltageLevelIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M11.13,20.06L3.63,6.93c-.27-.48-.11-1.09.37-1.36h0c.48-.27,1.09-.11,1.36.37l6.64,11.61,6.64-11.61c.27-.48.88-.65,1.36-.37h0c.48.27.65.88.37,1.36l-7.5,13.13c-.38.67-1.35.67-1.74,0Z\"\n />\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const bayIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n stroke-width: 0px;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M7.75,8c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-1.25c0,.84.52,1.55,1.25,1.85v8.65h1.5v-8.65c.73-.3,1.25-1.01,1.25-1.85h-1.25v-1.5Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M12.75,8c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-1.25c0,.84.52,1.55,1.25,1.85v8.65h1.5v-8.65c.73-.3,1.25-1.01,1.25-1.85h-1.25v-1.5Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M17.75,8c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-1.25c0,.84.52,1.55,1.25,1.85v8.65h1.5v-8.65c.73-.3,1.25-1.01,1.25-1.85h-1.25v-1.5Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M20,4H4c-1.1,0-2,.9-2,2v4c0,1.1.9,2,2,2v-6h16v6c1.1,0,2-.9,2-2v-4c0-1.1-.9-2-2-2Z\"\n />\n</svg>`;\n\nexport const disconnectorIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <g>\n <path\n class=\"cls-1\"\n d=\"M12.71,15.29l-6.79-6.79c-.39-.39-1.02-.39-1.41,0-.39.39-.39,1.02,0,1.41l6.5,6.5v4.59c0,.55.45,1,1,1s1-.45,1-1v-5c0-.13-.03-.26-.08-.38-.05-.12-.12-.23-.22-.33Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M14,6h-1v-3c0-.55-.45-1-1-1s-1,.45-1,1v3h-1c-.55,0-1,.45-1,1s.45,1,1,1h4c.55,0,1-.45,1-1s-.45-1-1-1Z\"\n />\n </g>\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const circuitBreakerIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <g>\n <path\n class=\"cls-1\"\n d=\"M12.71,15.29l-6.79-6.79c-.39-.39-1.02-.39-1.41,0-.39.39-.39,1.02,0,1.41l6.5,6.5v4.59c0,.55.45,1,1,1s1-.45,1-1v-5c0-.13-.03-.26-.08-.38-.05-.12-.12-.23-.22-.33Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M13.41,7l1.29-1.29c.39-.39.39-1.02,0-1.41s-1.02-.39-1.41,0l-1.29,1.29-1.29-1.29c-.39-.39-1.02-.39-1.41,0s-.39,1.02,0,1.41l1.29,1.29-1.29,1.29c-.39.39-.39,1.02,0,1.41.2.2.45.29.71.29s.51-.1.71-.29l1.29-1.29,1.29,1.29c.2.2.45.29.71.29s.51-.1.71-.29c.39-.39.39-1.02,0-1.41l-1.29-1.29Z\"\n />\n </g>\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const currentTransformerIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M19,12c0-3.53-2.61-6.43-6-6.92v-2.08c0-.55-.45-1-1-1s-1,.45-1,1v2.08c-3.39.49-6,3.39-6,6.92s2.61,6.43,6,6.92v2.08c0,.55.45,1,1,1s1-.45,1-1v-2.08c3.39-.49,6-3.39,6-6.92ZM7,12c0-2.42,1.72-4.44,4-4.9v9.8c-2.28-.46-4-2.48-4-4.9ZM13,16.9V7.1c2.28.46,4,2.48,4,4.9s-1.72,4.44-4,4.9Z\"\n />\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const voltageTransformerIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M17,10c0-2.42-1.72-4.44-4-4.9v-2.1s0-1-1-1-1,1-1,1v2.1c-2.28.46-4,2.48-4,4.9,0,.71.15,1.39.42,2-.27.61-.42,1.29-.42,2,0,2.42,1.72,4.44,4,4.9v1.1h-1c-.55,0-1,.45-1,1s.45,1,1,1h4c.55,0,1-.45,1-1s-.45-1-1-1h-1v-1.1c2.28-.46,4-2.48,4-4.9,0-.71-.15-1.39-.42-2,.27-.61.42-1.29.42-2ZM12,7c1.66,0,3,1.34,3,3,0,0,0,.01,0,.02-.84-.63-1.87-1.02-3-1.02s-2.16.39-3,1.02c0,0,0-.01,0-.02,0-1.66,1.34-3,3-3ZM14.22,12c-.55.61-1.34,1-2.22,1s-1.67-.39-2.22-1c.55-.61,1.34-1,2.22-1s1.67.39,2.22,1ZM12,17c-1.66,0-3-1.34-3-3,0,0,0-.01,0-.02.84.63,1.87,1.02,3,1.02s2.16-.39,3-1.02c0,0,0,.01,0,.02,0,1.66-1.34,3-3,3Z\"\n />\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const earthSwitchIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1,\n .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: #fff;\n opacity: 0;\n }\n </style>\n </defs>\n <g>\n <path\n class=\"cls-1\"\n d=\"M13,20h-2c-.55,0-1,.45-1,1s.45,1,1,1h2c.55,0,1-.45,1-1s-.45-1-1-1Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M15,16h-2v-5c0-.13-.03-.26-.08-.38-.05-.12-.12-.23-.22-.33L5.91,3.5c-.39-.39-1.02-.39-1.41,0-.39.39-.39,1.02,0,1.41l6.5,6.5v4.59h-2c-.55,0-1,.45-1,1s.45,1,1,1h6c.55,0,1-.45,1-1s-.45-1-1-1Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M10,4h4c.55,0,1-.45,1-1s-.45-1-1-1h-4c-.55,0-1,.45-1,1s.45,1,1,1Z\"\n />\n </g>\n <rect class=\"cls-2\" width=\"24\" height=\"24\" />\n</svg>`;\n\nexport const generalConductingEquipmentIcon = html`<svg\n id=\"Laag_1\"\n data-name=\"Laag 1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n>\n <defs>\n <style>\n .cls-1 {\n fill: currentColor;\n stroke-width: 0px;\n }\n </style>\n </defs>\n <path\n class=\"cls-1\"\n d=\"M20.41,3.59c-.78-.78-2.05-.78-2.83,0-.59.59-.73,1.47-.43,2.19l-1.49,1.49c-1.02-.79-2.29-1.27-3.67-1.27-3.31,0-6,2.69-6,6,0,1.38.48,2.66,1.27,3.67l-1.49,1.49c-.73-.31-1.6-.17-2.19.43-.78.78-.78,2.05,0,2.83.78.78,2.05.78,2.83,0,.59-.59.73-1.47.43-2.19l1.49-1.49c1.02.79,2.29,1.27,3.67,1.27,3.31,0,6-2.69,6-6,0-1.38-.48-2.66-1.27-3.67l1.49-1.49c.73.31,1.6.17,2.19-.43.78-.78.78-2.05,0-2.83ZM12,16c-2.21,0-4-1.79-4-4s1.79-4,4-4,4,1.79,4,4-1.79,4-4,4Z\"\n />\n</svg>`;\n\nexport const connectivityNodeIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <circle\n stroke=\"currentColor\"\n fill=\"currentColor\"\n stroke-width=\"1\"\n cx=\"12.5\"\n cy=\"12.5\"\n r=\"5\"\n />\n</svg>`;\n\nexport const powerTransformerTwoWindingIcon = html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 25 25\"\n>\n <line\n x1=\"12.5\"\n y1=\"2\"\n x2=\"12.5\"\n y2=\"5\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle\n cx=\"12.5\"\n cy=\"10\"\n r=\"5\"\n stroke=\"currentColor\"\n fill=\"transparent\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <circle\n cx=\"12.5\"\n cy=\"15\"\n r=\"5\"\n stroke=\"currentColor\"\n fill=\"transparent\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n <line\n x1=\"12.5\"\n y1=\"20\"\n x2=\"12.5\"\n y2=\"23\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n />\n</svg>`;\n\nexport const openSCDIcon = html` <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n style=\"width:100px;height:100px\"\n viewBox=\"0 0 25 25\"\n>\n <path\n d=\"M 2 9 L 12.5 2 L 23 9 L 21 9 L 21 21 L 4 21 L 4 9 Z\"\n fill=\"#eee8d5\"\n stroke=\"#6c71c4\"\n stroke-width=\"2\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M 11 7 L 17.5 7 L 13.5 11 L 16.5 11 L 10 19 L 11.5 13 L 8.5 13 Z \"\n fill=\"#2aa198\"\n />\n</svg>`;\n\nexport const sizableSmvIcon = svg`\n <svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n </svg>`;\n\nexport const sizableGooseIcon = svg`<svg viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const substationIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<g>\n <path class=\"cls-1\" d=\"M19.3,7.94l-6-5.14c-.75-.64-1.85-.65-2.6,0l-6,5.14c-.44.38-.7.93-.7,1.52v9.54c0,1.1.9,2,2,2h12c1.1,0,2-.9,2-2v-9.54c0-.58-.25-1.14-.7-1.52ZM18,19H6v-9.54l6-5.14,6,5.14v9.54Z\"/>\n <path class=\"cls-1\" d=\"M11.57,7.74l-3,5c-.09.15-.09.35,0,.5.09.16.26.25.44.25h2v3.5c0,.22.15.42.37.48.04.01.09.02.13.02.17,0,.34-.09.43-.24l3-5c.09-.15.09-.35,0-.5-.09-.16-.26-.25-.44-.25h-2v-3.5c0-.22-.15-.42-.37-.48-.22-.06-.45.03-.56.22Z\"/>\n</g>\n<rect class=\"cls-2\" y=\"0\" width=\"24\" height=\"24\"/>\n</svg>`;\nexport const lineIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<path class=\"cls-1\" d=\"M14.39,11.93l-1.39.58v-1.84l2.15-.89c.51-.21.75-.8.54-1.31-.21-.51-.8-.75-1.31-.54l-1.39.58V3c0-.55-.45-1-1-1s-1,.45-1,1v6.33l-2.15.89c-.51.21-.75.8-.54,1.31.21.51.8.75,1.31.54l1.39-.58v1.84l-2.15.89c-.51.21-.75.8-.54,1.31.21.51.8.75,1.31.54l1.39-.58v5.5c0,.55.45,1,1,1s1-.45,1-1v-6.33l2.15-.89c.51-.21.75-.8.54-1.31-.21-.51-.8-.75-1.31-.54Z\"/>\n<rect class=\"cls-2\" width=\"24\" height=\"24\"/>\n</svg>`;\nexport const processIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<path class=\"cls-1\" d=\"M18.71,15.29c-.39-.39-1.02-.39-1.41,0s-.39,1.02,0,1.41l.29.29h-5.59c0-1.1-.9-2-2-2h-2c-1.01,0-1.84.76-1.97,1.74-.61-.34-1.03-.99-1.03-1.74,0-1.1.9-2,2-2h5c0,1.1.9,2,2,2h2c1.1,0,2-.9,2-2v-.14c1.72-.45,3-2,3-3.86,0-2.21-1.79-4-4-4h-5c0-1.1-.9-2-2-2h-2c-1.1,0-2,.9-2,2h-2c-.55,0-1,.45-1,1s.45,1,1,1h2c0,1.1.9,2,2,2h2c1.1,0,2-.9,2-2h5c1.1,0,2,.9,2,2,0,.75-.42,1.39-1.03,1.74-.13-.98-.96-1.74-1.97-1.74h-2c-1.1,0-2,.9-2,2h-5c-2.21,0-4,1.79-4,4,0,1.86,1.28,3.41,3,3.86v.14c0,1.1.9,2,2,2h2c1.1,0,2-.9,2-2h5.59l-.29.29c-.39.39-.39,1.02,0,1.41.2.2.45.29.71.29s.51-.1.71-.29l2-2c.39-.39.39-1.02,0-1.41l-2-2ZM8,7v-2h2v2s-2,0-2,0ZM14,11h2v2s-2,0-2,0v-2ZM8,19v-2h2v2s-2,0-2,0Z\"/>\n<rect class=\"cls-2\" y=\"0\" width=\"24\" height=\"24\"/>\n</svg>`;\n\nexport const transformerWindingIcon = svg`<svg id=\"Laag_1\" data-name=\"Laag 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n<defs>\n <style>\n .cls-1 {\n fill: currentColor;\n }\n\n .cls-1, .cls-2 {\n stroke-width: 0px;\n }\n\n .cls-2 {\n fill: currentColor;\n opacity: 0;\n }\n </style>\n</defs>\n<g>\n <path class=\"cls-1\" d=\"M19,20h-2c-1.21,0-2.18-1.09-1.97-2.34.16-.98,1.09-1.66,2.08-1.66h-.11c.55,0,1-.45,1-1s-.42-.96-.95-.99c.04,0,.08-.01.12-.01h-.17c-1.21,0-2.18-1.09-1.97-2.34.16-.98,1.09-1.66,2.08-1.66h-.11c.55,0,1-.45,1-1s-.42-.96-.95-.99c.04,0,.08-.01.12-.01h-.17c-1.21,0-2.18-1.09-1.97-2.34.16-.98,1.09-1.66,2.08-1.66h1.89c.55,0,1-.45,1-1s-.45-1-1-1h-1.83c-2.09,0-3.95,1.53-4.15,3.61-.13,1.37.44,2.59,1.38,3.41-.76.64-1.28,1.55-1.38,2.59-.13,1.37.44,2.59,1.38,3.41-.76.64-1.28,1.55-1.38,2.59-.23,2.39,1.64,4.39,3.98,4.39h2c.55,0,1-.45,1-1s-.45-1-1-1Z\"/>\n <path class=\"cls-1\" d=\"M10.98,6.39c.23-2.39-1.64-4.39-3.98-4.39h-2c-.55,0-1,.45-1,1s.45,1,1,1h2c1.21,0,2.18,1.09,1.97,2.34-.16.98-1.09,1.66-2.08,1.66h.11c-.55,0-1,.45-1,1s.42.96.95.99c-.04,0-.08.01-.12.01h.17c1.21,0,2.18,1.09,1.97,2.34-.16.98-1.09,1.66-2.08,1.66h.11c-.55,0-1,.45-1,1,0,.28.11.53.29.71.17.17.4.27.65.28h0s.03.01.05.01c1.21,0,2.18,1.09,1.97,2.34-.16.98-1.09,1.66-2.08,1.66h-1.89c-.55,0-1,.45-1,1s.45,1,1,1h1.83c2.09,0,3.95-1.53,4.15-3.61.13-1.37-.44-2.59-1.38-3.41.76-.64,1.28-1.55,1.38-2.59.13-1.37-.44-2.59-1.38-3.41.76-.64,1.28-1.55,1.38-2.59Z\"/>\n <path class=\"cls-1\" d=\"M6.83,16h.17s-.03,0-.05-.01c-.04,0-.08.01-.12.01Z\"/>\n</g>\n<rect class=\"cls-2\" width=\"24\" height=\"24\"/>\n</svg>`;\n"]}
@@ -1,11 +0,0 @@
1
- import { svg } from "lit-element";
2
- export const accessPointIcon = svg `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
3
- <path fill="currentColor" d="M4.93,4.93C3.12,6.74 2,9.24 2,12C2,14.76 3.12,17.26 4.93,19.07L6.34,17.66C4.89,16.22 4,14.22 4,12C4,9.79 4.89,7.78 6.34,6.34L4.93,4.93M19.07,4.93L17.66,6.34C19.11,7.78 20,9.79 20,12C20,14.22 19.11,16.22 17.66,17.66L19.07,19.07C20.88,17.26 22,14.76 22,12C22,9.24 20.88,6.74 19.07,4.93M7.76,7.76C6.67,8.85 6,10.35 6,12C6,13.65 6.67,15.15 7.76,16.24L9.17,14.83C8.45,14.11 8,13.11 8,12C8,10.89 8.45,9.89 9.17,9.17L7.76,7.76M16.24,7.76L14.83,9.17C15.55,9.89 16,10.89 16,12C16,13.11 15.55,14.11 14.83,14.83L16.24,16.24C17.33,15.15 18,13.65 18,12C18,10.35 17.33,8.85 16.24,7.76M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" />
4
- </svg>`;
5
- export const serverIcon = svg `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
6
- <path fill="currentColor" d="M4,1H20A1,1 0 0,1 21,2V6A1,1 0 0,1 20,7H4A1,1 0 0,1 3,6V2A1,1 0 0,1 4,1M4,9H20A1,1 0 0,1 21,10V14A1,1 0 0,1 20,15H4A1,1 0 0,1 3,14V10A1,1 0 0,1 4,9M4,17H20A1,1 0 0,1 21,18V22A1,1 0 0,1 20,23H4A1,1 0 0,1 3,22V18A1,1 0 0,1 4,17M9,5H10V3H9V5M9,13H10V11H9V13M9,21H10V19H9V21M5,3V5H7V3H5M5,11V13H7V11H5M5,19V21H7V19H5Z" />
7
- </svg>`;
8
- export const logicalDeviceIcon = svg `<svg style="width:24px;height:24px" viewBox="0 0 24 24">
9
- <path fill="currentColor" d="M13,13H18V15H13M13,9H18V11H13M6.91,7.41L11.5,12L6.91,16.6L5.5,15.18L8.68,12L5.5,8.82M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z" />
10
- </svg>`;
11
- //# sourceMappingURL=ied-icons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ied-icons.js","sourceRoot":"","sources":["../../../../src/icons/ied-icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAA;;OAE3B,CAAC;AAER,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;OAEtB,CAAC;AAER,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;OAE7B,CAAC","sourcesContent":["import { svg } from \"lit-element\";\n\nexport const accessPointIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M4.93,4.93C3.12,6.74 2,9.24 2,12C2,14.76 3.12,17.26 4.93,19.07L6.34,17.66C4.89,16.22 4,14.22 4,12C4,9.79 4.89,7.78 6.34,6.34L4.93,4.93M19.07,4.93L17.66,6.34C19.11,7.78 20,9.79 20,12C20,14.22 19.11,16.22 17.66,17.66L19.07,19.07C20.88,17.26 22,14.76 22,12C22,9.24 20.88,6.74 19.07,4.93M7.76,7.76C6.67,8.85 6,10.35 6,12C6,13.65 6.67,15.15 7.76,16.24L9.17,14.83C8.45,14.11 8,13.11 8,12C8,10.89 8.45,9.89 9.17,9.17L7.76,7.76M16.24,7.76L14.83,9.17C15.55,9.89 16,10.89 16,12C16,13.11 15.55,14.11 14.83,14.83L16.24,16.24C17.33,15.15 18,13.65 18,12C18,10.35 17.33,8.85 16.24,7.76M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" />\n</svg>`;\n\nexport const serverIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M4,1H20A1,1 0 0,1 21,2V6A1,1 0 0,1 20,7H4A1,1 0 0,1 3,6V2A1,1 0 0,1 4,1M4,9H20A1,1 0 0,1 21,10V14A1,1 0 0,1 20,15H4A1,1 0 0,1 3,14V10A1,1 0 0,1 4,9M4,17H20A1,1 0 0,1 21,18V22A1,1 0 0,1 20,23H4A1,1 0 0,1 3,22V18A1,1 0 0,1 4,17M9,5H10V3H9V5M9,13H10V11H9V13M9,21H10V19H9V21M5,3V5H7V3H5M5,11V13H7V11H5M5,19V21H7V19H5Z\" />\n</svg>`;\n\nexport const logicalDeviceIcon = svg`<svg style=\"width:24px;height:24px\" viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M13,13H18V15H13M13,9H18V11H13M6.91,7.41L11.5,12L6.91,16.6L5.5,15.18L8.68,12L5.5,8.82M5,3C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5Z\" />\n</svg>`;"]}
@@ -1,50 +0,0 @@
1
- import { svg } from 'lit-element';
2
- export const systemLogicalNode = svg `<svg viewBox="0 0 24 24">
3
- <path fill="currentColor" d="M9,7H11V15H15V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
4
- </svg>`;
5
- export const automationLogicalNode = svg `<svg viewBox="0 0 24 24">
6
- <path fill="currentColor" d="M11,7H13A2,2 0 0,1 15,9V17H13V13H11V17H9V9A2,2 0 0,1 11,7M11,9V11H13V9H11M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2Z" />
7
- </svg>`;
8
- export const controlLogicalNode = svg `<svg viewBox="0 0 24 24">
9
- <path fill="currentColor" d="M11,7H13A2,2 0 0,1 15,9V10H13V9H11V15H13V14H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
10
- </svg>`;
11
- export const functionalLogicalNode = svg `<svg viewBox="0 0 24 24">
12
- <path fill="currentColor" d="M9,7H15V9H11V11H14V13H11V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
13
- </svg>`;
14
- export const generalLogicalNode = svg `<svg viewBox="0 0 24 24">
15
- <path fill="currentColor" d="M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
16
- </svg>`;
17
- export const interfacingLogicalNode = svg `<svg viewBox="0 0 24 24">
18
- <path fill="currentColor" d="M14,7V9H13V15H14V17H10V15H11V9H10V7H14M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
19
- </svg>`;
20
- export const nonElectricalLogicalNode = svg `<svg viewBox="0 0 24 24">
21
- <path fill="currentColor" d="M9,7H11V10.33L13,7H15L12,12L15,17H13L11,13.67V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
22
- </svg>`;
23
- export const measurementLogicalNode = svg `<svg viewBox="0 0 24 24">
24
- <path fill="currentColor" d="M9,7H15A2,2 0 0,1 17,9V17H15V9H13V16H11V9H9V17H7V9A2,2 0 0,1 9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
25
- </svg>`;
26
- export const protectionLogicalNode = svg `<svg viewBox="0 0 24 24">
27
- <path fill="currentColor" d="M9,7H13A2,2 0 0,1 15,9V11A2,2 0 0,1 13,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
28
- </svg>`;
29
- export const qualityLogicalNode = svg `<svg viewBox="0 0 24 24">
30
- <path fill="currentColor" d="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M11,7H13A2,2 0 0,1 15,9V15A2,2 0 0,1 13,17V19H11V17A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M11,9V15H13V9H11Z" />
31
- </svg>`;
32
- export const protectionRelatedLogicalNode = svg `<svg viewBox="0 0 24 24">
33
- <path fill="currentColor" d="M9,7H13A2,2 0 0,1 15,9V11C15,11.84 14.5,12.55 13.76,12.85L15,17H13L11.8,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,16.41 7.58,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
34
- </svg>`;
35
- export const supervisionLogicalNode = svg `<svg viewBox="0 0 24 24">
36
- <path fill="currentColor" d="M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
37
- </svg>`;
38
- export const transformerLogicalNode = svg `<svg viewBox="0 0 24 24">
39
- <path fill="currentColor" d="M9,7H15V9H13V17H11V9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
40
- </svg>`;
41
- export const switchgearLogicalNode = svg `<svg viewBox="0 0 24 24">
42
- <path fill="currentColor" d="M9,7H11L12,9.5L13,7H15L13,12L15,17H13L12,14.5L11,17H9L11,12L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
43
- </svg>`;
44
- export const powerTransformerLogicalNode = svg `<svg viewBox="0 0 24 24">
45
- <path fill="currentColor" d="M9,7H11L12,10L13,7H15L13,13V17H11V13L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
46
- </svg>`;
47
- export const furtherPowerSystemEquipmentLogicalNode = svg `<svg viewBox="0 0 24 24">
48
- <path fill="currentColor" d="M9,7H15V9L11,15H15V17H9V15L13,9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z" />
49
- </svg>`;
50
- //# sourceMappingURL=lnode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lnode.js","sourceRoot":"","sources":["../../../../src/icons/lnode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;;OAE7B,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;OAE9B,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;OAE9B,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;;OAEpC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;;OAE9B,CAAC;AAER,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;OAExC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;OAElC,CAAC;AAER,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAA;;OAEjC,CAAC;AAER,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;;OAEvC,CAAC;AAER,MAAM,CAAC,MAAM,sCAAsC,GAAG,GAAG,CAAA;;OAElD,CAAC","sourcesContent":["import { svg } from 'lit-element';\n\nexport const systemLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H11V15H15V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const automationLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H13A2,2 0 0,1 15,9V17H13V13H11V17H9V9A2,2 0 0,1 11,7M11,9V11H13V9H11M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2Z\" />\n</svg>`;\n\nexport const controlLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H13A2,2 0 0,1 15,9V10H13V9H11V15H13V14H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const functionalLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15V9H11V11H14V13H11V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const generalLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H15V9H11V15H13V11H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const interfacingLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M14,7V9H13V15H14V17H10V15H11V9H10V7H14M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const nonElectricalLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n<path fill=\"currentColor\" d=\"M9,7H11V10.33L13,7H15L12,12L15,17H13L11,13.67V17H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const measurementLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15A2,2 0 0,1 17,9V17H15V9H13V16H11V9H9V17H7V9A2,2 0 0,1 9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const protectionLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H13A2,2 0 0,1 15,9V11A2,2 0 0,1 13,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const qualityLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4M11,7H13A2,2 0 0,1 15,9V15A2,2 0 0,1 13,17V19H11V17A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7M11,9V15H13V9H11Z\" />\n</svg>`;\n\nexport const protectionRelatedLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H13A2,2 0 0,1 15,9V11C15,11.84 14.5,12.55 13.76,12.85L15,17H13L11.8,13H11V17H9V7M11,9V11H13V9H11M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,16.41 7.58,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const supervisionLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const transformerLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15V9H13V17H11V9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const switchgearLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H11L12,9.5L13,7H15L13,12L15,17H13L12,14.5L11,17H9L11,12L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const powerTransformerLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H11L12,10L13,7H15L13,13V17H11V13L9,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n\nexport const furtherPowerSystemEquipmentLogicalNode = svg`<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M9,7H15V9L11,15H15V17H9V15L13,9H9V7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\n</svg>`;\n"]}
@@ -1,483 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { customElement, html, LitElement, property, state, } from 'lit-element';
3
- import { classMap } from 'lit-html/directives/class-map';
4
- import '@material/mwc-icon';
5
- import '@material/mwc-icon-button';
6
- import '@material/mwc-linear-progress';
7
- import '@material/mwc-list';
8
- import '@material/mwc-list/mwc-list-item';
9
- import '@material/mwc-tab';
10
- import '@material/mwc-tab-bar';
11
- import '@material/mwc-top-app-bar-fixed';
12
- import '@material/mwc-drawer';
13
- import '@material/mwc-button';
14
- import '@material/mwc-dialog';
15
- import '@material/mwc-formfield';
16
- import '@material/mwc-list/mwc-check-list-item';
17
- import '@material/mwc-list/mwc-radio-list-item';
18
- import '@material/mwc-select';
19
- import '@material/mwc-switch';
20
- import '@material/mwc-textfield';
21
- import { newOpenDocEvent } from '@openscd/core/foundation/deprecated/open-event.js';
22
- import { newPendingStateEvent } from '@openscd/core/foundation/deprecated/waiter.js';
23
- import './addons/Settings.js';
24
- import './addons/Waiter.js';
25
- import './addons/Wizards.js';
26
- import './addons/Editor.js';
27
- import './addons/History.js';
28
- import './addons/Layout.js';
29
- import { officialPlugins as builtinPlugins } from './plugins.js';
30
- import { initializeNsdoc } from './foundation/nsdoc.js';
31
- import { OscdApi, XMLEditor } from '@openscd/core';
32
- import { newConfigurePluginEvent } from './plugin.events.js';
33
- import { newLogEvent } from '@openscd/core/foundation/deprecated/history';
34
- import { pluginTag } from './plugin-tag.js';
35
- /** The `<open-scd>` custom element is the main entry point of the
36
- * Open Substation Configuration Designer. */
37
- let OpenSCD = class OpenSCD extends LitElement {
38
- constructor() {
39
- super(...arguments);
40
- this.doc = null;
41
- /** The name of the current [[`doc`]] */
42
- this.docName = '';
43
- /** The UUID of the current [[`doc`]] */
44
- this.docId = '';
45
- this.editor = new XMLEditor();
46
- /** Object containing all *.nsdoc files and a function extracting element's label form them*/
47
- this.nsdoc = initializeNsdoc();
48
- this.currentSrc = '';
49
- this.storedPlugins = [];
50
- this.editCount = -1;
51
- this.unsubscribers = [];
52
- /**
53
- * @prop {PluginSet} plugins - Set of plugins that are used by OpenSCD
54
- */
55
- this.plugins = { menu: [], editor: [] };
56
- this.loadedPlugins = new Set();
57
- // PLUGGING INTERFACES
58
- this.pluginTags = new Map();
59
- }
60
- render() {
61
- return html `<oscd-waiter>
62
- <oscd-settings .host=${this}>
63
- <oscd-wizards .host=${this}>
64
- <oscd-history
65
- .host=${this}
66
- .editor=${this.editor}
67
- >
68
- <oscd-editor
69
- .doc=${this.doc}
70
- .docName=${this.docName}
71
- .docId=${this.docId}
72
- .host=${this}
73
- .editCount=${this.editCount}
74
- .editor=${this.editor}
75
- >
76
- <oscd-layout
77
- @add-external-plugin=${this.handleAddExternalPlugin}
78
- @oscd-configure-plugin=${this.handleConfigurationPluginEvent}
79
- @set-plugins=${(e) => this.setPlugins(e.detail.selectedPlugins)}
80
- .host=${this}
81
- .doc=${this.doc}
82
- .docName=${this.docName}
83
- .editCount=${this.editCount}
84
- .plugins=${this.storedPlugins}
85
- .editor=${this.editor}
86
- >
87
- </oscd-layout>
88
- </oscd-editor>
89
- </oscd-history>
90
- </oscd-wizards>
91
- </oscd-settings>
92
- </oscd-waiter>`;
93
- }
94
- /** The current file's URL. `blob:` URLs are *revoked after parsing*! */
95
- get src() {
96
- return this.currentSrc;
97
- }
98
- set src(value) {
99
- this.currentSrc = value;
100
- this.dispatchEvent(newPendingStateEvent(this.loadDoc(value)));
101
- }
102
- /** Loads and parses an `XMLDocument` after [[`src`]] has changed. */
103
- async loadDoc(src) {
104
- const response = await fetch(src);
105
- const text = await response.text();
106
- if (!text)
107
- return;
108
- const doc = new DOMParser().parseFromString(text, 'application/xml');
109
- const docName = src;
110
- this.dispatchEvent(newOpenDocEvent(doc, docName));
111
- if (src.startsWith('blob:'))
112
- URL.revokeObjectURL(src);
113
- }
114
- /**
115
- *
116
- * @deprecated Use `handleConfigurationPluginEvent` instead
117
- */
118
- handleAddExternalPlugin(e) {
119
- this.addExternalPlugin(e.detail.plugin);
120
- const { name, kind } = e.detail.plugin;
121
- const event = newConfigurePluginEvent(name, kind, e.detail.plugin);
122
- this.handleConfigurationPluginEvent(event);
123
- }
124
- handleConfigurationPluginEvent(e) {
125
- const { name, kind, config } = e.detail;
126
- const hasPlugin = this.hasPlugin(name, kind);
127
- const hasConfig = config !== null;
128
- const isChangeEvent = hasPlugin && hasConfig;
129
- const isRemoveEvent = hasPlugin && !hasConfig;
130
- const isAddEvent = !hasPlugin && hasConfig;
131
- // the `&& config`is only because typescript
132
- // cannot infer that `isChangeEvent` and `isAddEvent` implies `config !== null`
133
- if (isChangeEvent && config) {
134
- this.changePlugin(config);
135
- }
136
- else if (isRemoveEvent) {
137
- this.removePlugin(name, kind);
138
- }
139
- else if (isAddEvent && config) {
140
- this.addPlugin(config);
141
- }
142
- else {
143
- const event = newLogEvent({
144
- kind: "error",
145
- title: "Invalid plugin configuration event",
146
- message: JSON.stringify({ name, kind, config }),
147
- });
148
- this.dispatchEvent(event);
149
- }
150
- }
151
- connectedCallback() {
152
- super.connectedCallback();
153
- this.loadPlugins();
154
- this.unsubscribers.push(this.editor.subscribe(e => this.editCount++), this.editor.subscribeUndoRedo(e => this.editCount++));
155
- // TODO: let Lit handle the event listeners, move to render()
156
- this.addEventListener('reset-plugins', this.resetPlugins);
157
- }
158
- disconnectedCallback() {
159
- this.unsubscribers.forEach(u => u());
160
- }
161
- /**
162
- *
163
- * @param name
164
- * @param kind
165
- * @returns the index of the plugin in the stored plugin list
166
- */
167
- findPluginIndex(name, kind) {
168
- return this.storedPlugins.findIndex(p => p.name === name && p.kind === kind);
169
- }
170
- hasPlugin(name, kind) {
171
- return this.findPluginIndex(name, kind) > -1;
172
- }
173
- removePlugin(name, kind) {
174
- const newPlugins = this.storedPlugins.filter(p => p.name !== name || p.kind !== kind);
175
- this.updateStoredPlugins(newPlugins);
176
- }
177
- addPlugin(plugin) {
178
- const newPlugins = [...this.storedPlugins, plugin];
179
- this.updateStoredPlugins(newPlugins);
180
- }
181
- /**
182
- *
183
- * @param plugin
184
- * @throws if the plugin is not found
185
- */
186
- changePlugin(plugin) {
187
- const storedPlugins = this.storedPlugins;
188
- const { name, kind } = plugin;
189
- const pluginIndex = this.findPluginIndex(name, kind);
190
- if (pluginIndex < 0) {
191
- const event = newLogEvent({
192
- kind: "error",
193
- title: "Plugin not found, stopping change process",
194
- message: JSON.stringify({ name, kind }),
195
- });
196
- this.dispatchEvent(event);
197
- return;
198
- }
199
- const pluginToChange = storedPlugins[pluginIndex];
200
- const changedPlugin = { ...pluginToChange, ...plugin };
201
- const newPlugins = [...storedPlugins];
202
- newPlugins.splice(pluginIndex, 1, changedPlugin);
203
- // this.storePlugins(newPlugins);
204
- this.updateStoredPlugins(newPlugins);
205
- }
206
- resetPlugins() {
207
- const builtInPlugins = this.getBuiltInPlugins();
208
- const allPlugins = [...builtInPlugins, ...this.parsedPlugins];
209
- const newPluginConfigs = allPlugins.map(plugin => {
210
- return {
211
- ...plugin,
212
- active: plugin.activeByDefault ?? false,
213
- };
214
- });
215
- this.storePlugins(newPluginConfigs);
216
- }
217
- get parsedPlugins() {
218
- const menuPlugins = this.plugins.menu.map((plugin) => {
219
- let newPosition = plugin.position;
220
- if (typeof plugin.position === 'number') {
221
- newPosition = undefined;
222
- }
223
- return {
224
- ...plugin,
225
- position: newPosition,
226
- kind: 'menu',
227
- active: plugin.active ?? false,
228
- };
229
- });
230
- const editorPlugins = this.plugins.editor.map((plugin) => {
231
- const editorPlugin = {
232
- ...plugin,
233
- position: undefined,
234
- kind: 'editor',
235
- active: plugin.active ?? false,
236
- };
237
- return editorPlugin;
238
- });
239
- const allPlugnis = [...menuPlugins, ...editorPlugins];
240
- return allPlugnis;
241
- }
242
- updateStoredPlugins(newPlugins) {
243
- //
244
- // Generate content of each plugin
245
- //
246
- const plugins = newPlugins.map(plugin => {
247
- const isInstalled = plugin.src && plugin.active;
248
- if (!isInstalled) {
249
- return plugin;
250
- }
251
- return this.addContent(plugin);
252
- });
253
- //
254
- // Merge built-in plugins
255
- //
256
- const mergedPlugins = plugins.map(plugin => {
257
- const isBuiltIn = !plugin?.official;
258
- if (!isBuiltIn) {
259
- return plugin;
260
- }
261
- ;
262
- const builtInPlugin = [...this.getBuiltInPlugins(), ...this.parsedPlugins]
263
- .find(p => p.src === plugin.src);
264
- return {
265
- ...builtInPlugin,
266
- ...plugin,
267
- };
268
- });
269
- this.storePlugins(mergedPlugins);
270
- }
271
- storePlugins(plugins) {
272
- this.storedPlugins = plugins;
273
- const pluginConfigs = JSON.stringify(plugins.map(withoutContent));
274
- localStorage.setItem('plugins', pluginConfigs);
275
- }
276
- getPluginConfigsFromLocalStorage() {
277
- const pluginsConfigStr = localStorage.getItem('plugins') ?? '[]';
278
- return JSON.parse(pluginsConfigStr);
279
- }
280
- get locale() {
281
- return navigator.language || 'en-US';
282
- }
283
- get docs() {
284
- const docs = {};
285
- if (this.doc) {
286
- docs[this.docName] = this.doc;
287
- }
288
- return docs;
289
- }
290
- setPlugins(selectedPlugins) {
291
- const newPlugins = this.storedPlugins.map((storedPlugin) => {
292
- const isSelected = selectedPlugins.some((selectedPlugin) => {
293
- return selectedPlugin.name === storedPlugin.name
294
- && selectedPlugin.src === storedPlugin.src;
295
- });
296
- return {
297
- ...storedPlugin,
298
- active: isSelected
299
- };
300
- });
301
- this.updateStoredPlugins(newPlugins);
302
- }
303
- loadPlugins() {
304
- const localPluginConfigs = this.getPluginConfigsFromLocalStorage();
305
- const overwritesOfBultInPlugins = localPluginConfigs.filter((p) => {
306
- return this.getBuiltInPlugins().some(b => b.src === p.src);
307
- });
308
- const userInstalledPlugins = localPluginConfigs.filter((p) => {
309
- return !this.getBuiltInPlugins().some(b => b.src === p.src);
310
- });
311
- const mergedBuiltInPlugins = this.getBuiltInPlugins().map((builtInPlugin) => {
312
- let overwrite = overwritesOfBultInPlugins.find(p => p.src === builtInPlugin.src);
313
- const mergedPlugin = {
314
- ...builtInPlugin,
315
- ...overwrite,
316
- active: overwrite?.active ?? builtInPlugin.activeByDefault,
317
- };
318
- return mergedPlugin;
319
- });
320
- const mergedPlugins = [...mergedBuiltInPlugins, ...userInstalledPlugins];
321
- this.updateStoredPlugins(mergedPlugins);
322
- }
323
- async addExternalPlugin(plugin) {
324
- if (this.storedPlugins.some(p => p.src === plugin.src))
325
- return;
326
- const newPlugins = this.storedPlugins;
327
- newPlugins.push(plugin);
328
- this.storePlugins(newPlugins);
329
- }
330
- getBuiltInPlugins() {
331
- return builtinPlugins;
332
- }
333
- addContent(plugin) {
334
- const tag = this.pluginTag(plugin.src);
335
- if (!this.loadedPlugins.has(tag)) {
336
- this.loadedPlugins.add(tag);
337
- import(plugin.src).then((mod) => {
338
- customElements.define(tag, mod.default);
339
- });
340
- }
341
- return {
342
- ...plugin,
343
- content: () => {
344
- return staticTagHtml `<${tag}
345
- .doc=${this.doc}
346
- .docName=${this.docName}
347
- .editCount=${this.editCount}
348
- .plugins=${this.storedPlugins}
349
- .docId=${this.docId}
350
- .pluginId=${plugin.src}
351
- .nsdoc=${this.nsdoc}
352
- .docs=${this.docs}
353
- .locale=${this.locale}
354
- .oscdApi=${new OscdApi(tag)}
355
- .editor=${this.editor}
356
- class="${classMap({
357
- plugin: true,
358
- menu: plugin.kind === 'menu',
359
- validator: plugin.kind === 'validator',
360
- editor: plugin.kind === 'editor',
361
- })}"
362
- ></${tag}>`;
363
- },
364
- };
365
- }
366
- pluginTag(uri) {
367
- if (!this.pluginTags.has(uri)) {
368
- const tag = pluginTag(uri);
369
- this.pluginTags.set(uri, tag);
370
- }
371
- return this.pluginTags.get(uri);
372
- }
373
- };
374
- __decorate([
375
- property({ attribute: false })
376
- ], OpenSCD.prototype, "doc", void 0);
377
- __decorate([
378
- property({ type: String })
379
- ], OpenSCD.prototype, "docName", void 0);
380
- __decorate([
381
- property({ type: String })
382
- ], OpenSCD.prototype, "docId", void 0);
383
- __decorate([
384
- property({ attribute: false })
385
- ], OpenSCD.prototype, "nsdoc", void 0);
386
- __decorate([
387
- property({ type: String })
388
- ], OpenSCD.prototype, "src", null);
389
- __decorate([
390
- state()
391
- ], OpenSCD.prototype, "storedPlugins", void 0);
392
- __decorate([
393
- state()
394
- ], OpenSCD.prototype, "editCount", void 0);
395
- __decorate([
396
- property({ type: Object })
397
- ], OpenSCD.prototype, "plugins", void 0);
398
- __decorate([
399
- state()
400
- ], OpenSCD.prototype, "loadedPlugins", void 0);
401
- __decorate([
402
- state()
403
- ], OpenSCD.prototype, "pluginTags", void 0);
404
- OpenSCD = __decorate([
405
- customElement('open-scd')
406
- ], OpenSCD);
407
- export { OpenSCD };
408
- export function newResetPluginsEvent() {
409
- return new CustomEvent('reset-plugins', { bubbles: true, composed: true });
410
- }
411
- export function newAddExternalPluginEvent(plugin) {
412
- return new CustomEvent('add-external-plugin', {
413
- bubbles: true,
414
- composed: true,
415
- detail: { plugin },
416
- });
417
- }
418
- export function newSetPluginsEvent(selectedPlugins) {
419
- return new CustomEvent('set-plugins', {
420
- bubbles: true,
421
- composed: true,
422
- detail: { selectedPlugins },
423
- });
424
- }
425
- /**
426
- * This is a template literal tag function. See:
427
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates
428
- *
429
- * Passes its arguments to LitElement's `html` tag after combining the first and
430
- * last expressions with the first two and last two static strings.
431
- * Throws unless the first and last expressions are identical strings.
432
- *
433
- * We need this to get around the expression location limitations documented in
434
- * https://lit.dev/docs/templates/expressions/#expression-locations
435
- *
436
- * After upgrading to Lit 2 we can use their static HTML functions instead:
437
- * https://lit.dev/docs/api/static-html/
438
- */
439
- function staticTagHtml(oldStrings, ...oldArgs) {
440
- const args = [...oldArgs];
441
- const firstArg = args.shift();
442
- const lastArg = args.pop();
443
- if (firstArg !== lastArg)
444
- throw new Error(`Opening tag <${firstArg}> does not match closing tag </${lastArg}>.`);
445
- const strings = [...oldStrings];
446
- const firstString = strings.shift();
447
- const secondString = strings.shift();
448
- const lastString = strings.pop();
449
- const penultimateString = strings.pop();
450
- strings.unshift(`${firstString}${firstArg}${secondString}`);
451
- strings.push(`${penultimateString}${lastArg}${lastString}`);
452
- return html(strings, ...args);
453
- }
454
- function withoutContent(plugin) {
455
- return { ...plugin, content: undefined };
456
- }
457
- export const pluginIcons = {
458
- editor: 'tab',
459
- menu: 'play_circle',
460
- validator: 'rule_folder',
461
- top: 'play_circle',
462
- middle: 'play_circle',
463
- bottom: 'play_circle',
464
- };
465
- const menuOrder = [
466
- 'editor',
467
- 'top',
468
- 'validator',
469
- 'middle',
470
- 'bottom',
471
- ];
472
- function menuCompare(a, b) {
473
- if (a.kind === b.kind && a.position === b.position)
474
- return 0;
475
- const earlier = menuOrder.find(kind => [a.kind, b.kind, a.position, b.position].includes(kind));
476
- return [a.kind, a.position].includes(earlier) ? -1 : 1;
477
- }
478
- function compareNeedsDoc(a, b) {
479
- if (a.requireDoc === b.requireDoc)
480
- return 0;
481
- return a.requireDoc ? 1 : -1;
482
- }
483
- //# sourceMappingURL=open-scd.js.map