@supersoniks/concorde 2.0.7 → 3.0.0

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 (406) hide show
  1. package/build-infos.json +1 -0
  2. package/index.html +44 -0
  3. package/notes de migration.md +21 -0
  4. package/package.json +23 -290
  5. package/scripts/prebuild.mjs +22 -0
  6. package/{components.js → src/components.ts} +5 -2
  7. package/src/concorde-loaded.ts +3 -0
  8. package/src/core/_types/types.ts +55 -0
  9. package/src/core/components/functional/date/date.md +290 -0
  10. package/src/core/components/functional/date/date.ts +206 -0
  11. package/src/core/components/functional/example/example.ts +11 -0
  12. package/src/core/components/functional/fetch/fetch.md +117 -0
  13. package/{core/components/functional/fetch/fetch.js → src/core/components/functional/fetch/fetch.ts} +33 -37
  14. package/src/core/components/functional/if/if.md +16 -0
  15. package/src/core/components/functional/if/if.test.ts +40 -0
  16. package/src/core/components/functional/if/if.ts +23 -0
  17. package/src/core/components/functional/list/list.md +194 -0
  18. package/src/core/components/functional/list/list.ts +236 -0
  19. package/src/core/components/functional/mix/mix.md +41 -0
  20. package/src/core/components/functional/mix/mix.ts +95 -0
  21. package/src/core/components/functional/queue/queue.md +87 -0
  22. package/src/core/components/functional/queue/queue.ts +279 -0
  23. package/src/core/components/functional/router/redirect.ts +44 -0
  24. package/src/core/components/functional/router/router.md +112 -0
  25. package/src/core/components/functional/router/router.ts +108 -0
  26. package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +229 -0
  27. package/{core → src/core}/components/functional/sdui/default-library.json +13 -13
  28. package/src/core/components/functional/sdui/example.json +99 -0
  29. package/src/core/components/functional/sdui/sdui-utils.ts +62 -0
  30. package/src/core/components/functional/sdui/sdui.md +356 -0
  31. package/src/core/components/functional/sdui/sdui.ts +230 -0
  32. package/src/core/components/functional/sdui/types.ts +34 -0
  33. package/src/core/components/functional/sonic-scope/sonic-scope.ts +13 -0
  34. package/src/core/components/functional/states/states.md +87 -0
  35. package/src/core/components/functional/states/states.ts +121 -0
  36. package/src/core/components/functional/submit/submit.md +48 -0
  37. package/src/core/components/functional/submit/submit.ts +265 -0
  38. package/src/core/components/functional/subscriber/subscriber.md +91 -0
  39. package/src/core/components/functional/subscriber/subscriber.ts +28 -0
  40. package/src/core/components/functional/value/value.md +35 -0
  41. package/src/core/components/functional/value/value.ts +18 -0
  42. package/{core/components/ui/_css/scroll.js → src/core/components/ui/_css/scroll.ts} +3 -2
  43. package/{core/components/ui/_css/size.js → src/core/components/ui/_css/size.ts} +5 -2
  44. package/{core/components/ui/_css/type.js → src/core/components/ui/_css/type.ts} +5 -3
  45. package/src/core/components/ui/alert/alert.md +121 -0
  46. package/src/core/components/ui/alert/alert.ts +177 -0
  47. package/src/core/components/ui/badge/badge.md +102 -0
  48. package/{core/components/ui/badge/badge.js → src/core/components/ui/badge/badge.ts} +36 -51
  49. package/src/core/components/ui/button/button.md +184 -0
  50. package/{core/components/ui/button/button.js → src/core/components/ui/button/button.ts} +258 -302
  51. package/src/core/components/ui/captcha/captcha.md +12 -0
  52. package/src/core/components/ui/captcha/captcha.ts +88 -0
  53. package/src/core/components/ui/card/card-footer.ts +19 -0
  54. package/src/core/components/ui/card/card-header-descripton.ts +24 -0
  55. package/{core/components/ui/card/card-header.js → src/core/components/ui/card/card-header.ts} +28 -38
  56. package/src/core/components/ui/card/card-main.ts +24 -0
  57. package/src/core/components/ui/card/card.md +96 -0
  58. package/{core/components/ui/card/card.js → src/core/components/ui/card/card.ts} +23 -34
  59. package/src/core/components/ui/divider/divider.md +35 -0
  60. package/{core/components/ui/divider/divider.js → src/core/components/ui/divider/divider.ts} +35 -65
  61. package/src/core/components/ui/form/checkbox/checkbox.md +96 -0
  62. package/{core/components/ui/form/checkbox/checkbox.js → src/core/components/ui/form/checkbox/checkbox.ts} +79 -98
  63. package/{core/components/ui/form/css/form-control.js → src/core/components/ui/form/css/form-control.ts} +9 -5
  64. package/src/core/components/ui/form/fieldset/fieldset.md +129 -0
  65. package/src/core/components/ui/form/fieldset/fieldset.ts +96 -0
  66. package/src/core/components/ui/form/fieldset/legend-description.ts +23 -0
  67. package/src/core/components/ui/form/fieldset/legend.ts +90 -0
  68. package/src/core/components/ui/form/form-actions/form-actions.md +77 -0
  69. package/src/core/components/ui/form/form-actions/form-actions.ts +32 -0
  70. package/src/core/components/ui/form/form-layout/form-layout.md +43 -0
  71. package/src/core/components/ui/form/form-layout/form-layout.ts +71 -0
  72. package/src/core/components/ui/form/input/input.md +168 -0
  73. package/src/core/components/ui/form/input/input.ts +227 -0
  74. package/src/core/components/ui/form/input/password-helper.ts +68 -0
  75. package/src/core/components/ui/form/input/same-value-helper.ts +48 -0
  76. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +130 -0
  77. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +285 -0
  78. package/src/core/components/ui/form/radio/radio.md +86 -0
  79. package/src/core/components/ui/form/radio/radio.ts +44 -0
  80. package/src/core/components/ui/form/select/select.md +99 -0
  81. package/src/core/components/ui/form/select/select.ts +310 -0
  82. package/src/core/components/ui/form/textarea/textarea.md +66 -0
  83. package/src/core/components/ui/form/textarea/textarea.ts +119 -0
  84. package/src/core/components/ui/group/group.md +75 -0
  85. package/src/core/components/ui/group/group.ts +101 -0
  86. package/src/core/components/ui/icon/icon.md +125 -0
  87. package/src/core/components/ui/icon/icon.stories.ts +100 -0
  88. package/src/core/components/ui/icon/icon.ts +106 -0
  89. package/src/core/components/ui/icon/icons.json +1 -0
  90. package/src/core/components/ui/icon/icons.ts +130 -0
  91. package/src/core/components/ui/icon/svgs/cancel.svg +3 -0
  92. package/src/core/components/ui/icon/svgs/check-circled-outline.svg +4 -0
  93. package/src/core/components/ui/icon/svgs/check.svg +3 -0
  94. package/src/core/components/ui/icon/svgs/emoji-puzzled.svg +1 -0
  95. package/src/core/components/ui/icon/svgs/info-empty.svg +5 -0
  96. package/src/core/components/ui/icon/svgs/loader.svg +1 -0
  97. package/src/core/components/ui/icon/svgs/minus-small.svg +3 -0
  98. package/src/core/components/ui/icon/svgs/more-horiz.svg +5 -0
  99. package/src/core/components/ui/icon/svgs/more-vert.svg +5 -0
  100. package/src/core/components/ui/icon/svgs/nav-arrow-down.svg +3 -0
  101. package/src/core/components/ui/icon/svgs/warning-circled-outline.svg +5 -0
  102. package/src/core/components/ui/image/image.md +107 -0
  103. package/src/core/components/ui/image/image.ts +117 -0
  104. package/src/core/components/ui/link/link.md +43 -0
  105. package/src/core/components/ui/link/link.ts +108 -0
  106. package/src/core/components/ui/loader/loader.md +37 -0
  107. package/src/core/components/ui/loader/loader.stories.ts +25 -0
  108. package/src/core/components/ui/loader/loader.ts +81 -0
  109. package/{core/components/ui/loader/styles/fixed.js → src/core/components/ui/loader/styles/fixed.ts} +2 -1
  110. package/{core/components/ui/loader/styles/inline.js → src/core/components/ui/loader/styles/inline.ts} +3 -2
  111. package/src/core/components/ui/menu/menu-item.ts +30 -0
  112. package/src/core/components/ui/menu/menu.md +288 -0
  113. package/src/core/components/ui/menu/menu.ts +292 -0
  114. package/src/core/components/ui/modal/modal-actions.ts +35 -0
  115. package/src/core/components/ui/modal/modal-close.ts +36 -0
  116. package/src/core/components/ui/modal/modal-content.ts +19 -0
  117. package/src/core/components/ui/modal/modal-subtitle.ts +23 -0
  118. package/src/core/components/ui/modal/modal-title.ts +22 -0
  119. package/src/core/components/ui/modal/modal.md +123 -0
  120. package/src/core/components/ui/modal/modal.stories.ts +140 -0
  121. package/src/core/components/ui/modal/modal.ts +386 -0
  122. package/src/core/components/ui/pop/pop.md +79 -0
  123. package/src/core/components/ui/pop/pop.ts +291 -0
  124. package/src/core/components/ui/progress/progress.md +65 -0
  125. package/{core/components/ui/progress/progress.js → src/core/components/ui/progress/progress.ts} +31 -50
  126. package/src/core/components/ui/table/table-caption.ts +21 -0
  127. package/src/core/components/ui/table/table-tbody.ts +32 -0
  128. package/src/core/components/ui/table/table-td.ts +47 -0
  129. package/src/core/components/ui/table/table-tfoot.ts +20 -0
  130. package/src/core/components/ui/table/table-th.ts +56 -0
  131. package/src/core/components/ui/table/table-thead.ts +18 -0
  132. package/src/core/components/ui/table/table-tr.ts +48 -0
  133. package/src/core/components/ui/table/table.md +467 -0
  134. package/{core/components/ui/table/table.js → src/core/components/ui/table/table.ts} +32 -53
  135. package/{core/components/ui/theme/theme-collection/core-variables.js → src/core/components/ui/theme/theme-collection/core-variables.ts} +3 -2
  136. package/{core/components/ui/theme/theme-collection/dark.js → src/core/components/ui/theme/theme-collection/dark.ts} +5 -3
  137. package/{core/components/ui/theme/theme-collection/light.js → src/core/components/ui/theme/theme-collection/light.ts} +3 -2
  138. package/src/core/components/ui/theme/theme.ts +118 -0
  139. package/src/core/components/ui/toast/message-subscriber.stories.ts +43 -0
  140. package/src/core/components/ui/toast/message-subscriber.ts +37 -0
  141. package/{core/components/ui/toast/toast-item.js → src/core/components/ui/toast/toast-item.ts} +86 -113
  142. package/src/core/components/ui/toast/toast.ts +237 -0
  143. package/src/core/components/ui/toast/types.ts +14 -0
  144. package/src/core/components/ui/tooltip/tooltip.md +37 -0
  145. package/{core/components/ui/tooltip/tooltip.js → src/core/components/ui/tooltip/tooltip.ts} +26 -47
  146. package/{core/components/ui/ui.js → src/core/components/ui/ui.ts} +2 -0
  147. package/src/core/core.ts +22 -0
  148. package/src/core/decorators/Subscriber.ts +187 -0
  149. package/src/core/directives/DataProvider.ts +113 -0
  150. package/src/core/directives/Wording.ts +220 -0
  151. package/src/core/mixins/Fetcher.ts +258 -0
  152. package/src/core/mixins/FormCheckable.ts +287 -0
  153. package/src/core/mixins/FormElement.ts +275 -0
  154. package/src/core/mixins/FormInput.ts +135 -0
  155. package/src/core/mixins/Subscriber.ts +352 -0
  156. package/src/core/mixins/TemplatesContainer.ts +70 -0
  157. package/{core/mixins/mixins.d.ts → src/core/mixins/mixins.ts} +1 -1
  158. package/src/core/utils/Arrays.ts +161 -0
  159. package/src/core/utils/DataBindObserver.ts +286 -0
  160. package/src/core/utils/Electron.ts +15 -0
  161. package/src/core/utils/Format.ts +58 -0
  162. package/src/core/utils/HTML.ts +126 -0
  163. package/src/core/utils/LocationHandler.ts +139 -0
  164. package/src/core/utils/Objects.ts +103 -0
  165. package/src/core/utils/PublisherProxy.ts +786 -0
  166. package/src/core/utils/Utils.ts +12 -0
  167. package/src/core/utils/api.ts +456 -0
  168. package/{core/utils/url-pattern.d.ts → src/core/utils/url-pattern.ts} +1 -0
  169. package/{decorators.js → src/decorators.ts} +6 -2
  170. package/{directives.js → src/directives.ts} +11 -6
  171. package/src/docs/_core-concept/overview.md +57 -0
  172. package/src/docs/_core-concept/subscriber.md +76 -0
  173. package/src/docs/_getting-started/concorde-outside.md +141 -0
  174. package/src/docs/_getting-started/create-a-component.md +137 -0
  175. package/src/docs/_getting-started/pubsub.md +150 -0
  176. package/src/docs/_getting-started/start.md +37 -0
  177. package/src/docs/_getting-started/theming.md +91 -0
  178. package/src/docs/code.ts +281 -0
  179. package/src/docs/docs.ts +6 -0
  180. package/src/docs/example/users.ts +64 -0
  181. package/src/docs/navigation/navigation.ts +101 -0
  182. package/src/docs/prism/index.ts +6 -0
  183. package/src/docs/prism/prism.css +158 -0
  184. package/src/docs/prism/prism.js +1022 -0
  185. package/src/docs/search/docs-search.json +3767 -0
  186. package/src/docs/search/markdown-renderer.ts +40 -0
  187. package/src/docs/search/page.ts +40 -0
  188. package/src/docs/search/search.ts +184 -0
  189. package/src/docs.ts +2 -0
  190. package/src/index.ts +7 -0
  191. package/{mixins.js → src/mixins.ts} +10 -6
  192. package/src/tag-list.json +1 -0
  193. package/src/test-utils/TestUtils.ts +13 -0
  194. package/src/tsconfig.json +113 -0
  195. package/{utils.js → src/utils.ts} +15 -11
  196. package/test-utils/TestUtils.ts +13 -0
  197. package/vite/config.js +136 -0
  198. package/vite.config.mts +87 -0
  199. package/README.md +0 -27
  200. package/cli.js +0 -75
  201. package/components.d.ts +0 -4
  202. package/concorde-core.bundle.js +0 -3427
  203. package/concorde-core.es.js +0 -14372
  204. package/core/_types/types.d.ts +0 -28
  205. package/core/_types/types.js +0 -2
  206. package/core/components/functional/date/date.d.ts +0 -45
  207. package/core/components/functional/date/date.js +0 -243
  208. package/core/components/functional/example/example.d.ts +0 -7
  209. package/core/components/functional/example/example.js +0 -26
  210. package/core/components/functional/fetch/fetch.d.ts +0 -93
  211. package/core/components/functional/functional.js +0 -15
  212. package/core/components/functional/if/if.d.ts +0 -12
  213. package/core/components/functional/if/if.js +0 -38
  214. package/core/components/functional/if/if.test.d.ts +0 -1
  215. package/core/components/functional/if/if.test.js +0 -35
  216. package/core/components/functional/list/list.d.ts +0 -117
  217. package/core/components/functional/list/list.js +0 -214
  218. package/core/components/functional/mix/mix.d.ts +0 -22
  219. package/core/components/functional/mix/mix.js +0 -102
  220. package/core/components/functional/queue/queue.d.ts +0 -67
  221. package/core/components/functional/queue/queue.js +0 -310
  222. package/core/components/functional/router/redirect.d.ts +0 -18
  223. package/core/components/functional/router/redirect.js +0 -53
  224. package/core/components/functional/router/router.d.ts +0 -27
  225. package/core/components/functional/router/router.js +0 -119
  226. package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -58
  227. package/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -215
  228. package/core/components/functional/sdui/sdui-utils.d.ts +0 -5
  229. package/core/components/functional/sdui/sdui-utils.js +0 -63
  230. package/core/components/functional/sdui/sdui.d.ts +0 -136
  231. package/core/components/functional/sdui/sdui.js +0 -254
  232. package/core/components/functional/sdui/types.d.ts +0 -37
  233. package/core/components/functional/sdui/types.js +0 -1
  234. package/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -5
  235. package/core/components/functional/sonic-scope/sonic-scope.js +0 -21
  236. package/core/components/functional/states/states.d.ts +0 -29
  237. package/core/components/functional/states/states.js +0 -134
  238. package/core/components/functional/submit/submit.d.ts +0 -30
  239. package/core/components/functional/submit/submit.js +0 -236
  240. package/core/components/functional/subscriber/subscriber.d.ts +0 -12
  241. package/core/components/functional/subscriber/subscriber.js +0 -38
  242. package/core/components/functional/value/value.d.ts +0 -7
  243. package/core/components/functional/value/value.js +0 -27
  244. package/core/components/ui/_css/scroll.d.ts +0 -1
  245. package/core/components/ui/_css/size.d.ts +0 -2
  246. package/core/components/ui/_css/type.d.ts +0 -2
  247. package/core/components/ui/alert/alert.d.ts +0 -34
  248. package/core/components/ui/alert/alert.js +0 -202
  249. package/core/components/ui/badge/badge.d.ts +0 -26
  250. package/core/components/ui/button/button.d.ts +0 -171
  251. package/core/components/ui/captcha/captcha.d.ts +0 -30
  252. package/core/components/ui/captcha/captcha.js +0 -93
  253. package/core/components/ui/card/card-footer.d.ts +0 -4
  254. package/core/components/ui/card/card-footer.js +0 -24
  255. package/core/components/ui/card/card-header-descripton.d.ts +0 -5
  256. package/core/components/ui/card/card-header-descripton.js +0 -32
  257. package/core/components/ui/card/card-header.d.ts +0 -8
  258. package/core/components/ui/card/card-main.d.ts +0 -4
  259. package/core/components/ui/card/card-main.js +0 -28
  260. package/core/components/ui/card/card.d.ts +0 -12
  261. package/core/components/ui/divider/divider.d.ts +0 -15
  262. package/core/components/ui/form/checkbox/checkbox.d.ts +0 -181
  263. package/core/components/ui/form/css/form-control.d.ts +0 -4
  264. package/core/components/ui/form/fieldset/fieldset.d.ts +0 -23
  265. package/core/components/ui/form/fieldset/fieldset.js +0 -118
  266. package/core/components/ui/form/fieldset/legend-description.d.ts +0 -5
  267. package/core/components/ui/form/fieldset/legend-description.js +0 -30
  268. package/core/components/ui/form/fieldset/legend.d.ts +0 -16
  269. package/core/components/ui/form/fieldset/legend.js +0 -112
  270. package/core/components/ui/form/form-actions/form-actions.d.ts +0 -7
  271. package/core/components/ui/form/form-actions/form-actions.js +0 -46
  272. package/core/components/ui/form/form-layout/form-layout.d.ts +0 -12
  273. package/core/components/ui/form/form-layout/form-layout.js +0 -83
  274. package/core/components/ui/form/input/input.d.ts +0 -106
  275. package/core/components/ui/form/input/input.js +0 -268
  276. package/core/components/ui/form/input/password-helper.d.ts +0 -25
  277. package/core/components/ui/form/input/password-helper.js +0 -119
  278. package/core/components/ui/form/input/same-value-helper.d.ts +0 -16
  279. package/core/components/ui/form/input/same-value-helper.js +0 -77
  280. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -136
  281. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -296
  282. package/core/components/ui/form/radio/radio.d.ts +0 -12
  283. package/core/components/ui/form/radio/radio.js +0 -50
  284. package/core/components/ui/form/select/select.d.ts +0 -58
  285. package/core/components/ui/form/select/select.js +0 -298
  286. package/core/components/ui/form/textarea/textarea.d.ts +0 -84
  287. package/core/components/ui/form/textarea/textarea.js +0 -150
  288. package/core/components/ui/group/group.d.ts +0 -16
  289. package/core/components/ui/group/group.js +0 -118
  290. package/core/components/ui/icon/icon.d.ts +0 -26
  291. package/core/components/ui/icon/icon.js +0 -113
  292. package/core/components/ui/icon/icons.d.ts +0 -10
  293. package/core/components/ui/icon/icons.js +0 -126
  294. package/core/components/ui/icon/icons.json +0 -1
  295. package/core/components/ui/image/image.d.ts +0 -15
  296. package/core/components/ui/image/image.js +0 -153
  297. package/core/components/ui/link/link.d.ts +0 -29
  298. package/core/components/ui/link/link.js +0 -124
  299. package/core/components/ui/loader/loader.d.ts +0 -23
  300. package/core/components/ui/loader/loader.js +0 -97
  301. package/core/components/ui/loader/styles/fixed.d.ts +0 -1
  302. package/core/components/ui/loader/styles/inline.d.ts +0 -1
  303. package/core/components/ui/menu/menu-item.d.ts +0 -5
  304. package/core/components/ui/menu/menu-item.js +0 -34
  305. package/core/components/ui/menu/menu.d.ts +0 -41
  306. package/core/components/ui/menu/menu.js +0 -313
  307. package/core/components/ui/modal/modal-actions.d.ts +0 -7
  308. package/core/components/ui/modal/modal-actions.js +0 -42
  309. package/core/components/ui/modal/modal-close.d.ts +0 -7
  310. package/core/components/ui/modal/modal-close.js +0 -43
  311. package/core/components/ui/modal/modal-content.d.ts +0 -5
  312. package/core/components/ui/modal/modal-content.js +0 -26
  313. package/core/components/ui/modal/modal-subtitle.d.ts +0 -5
  314. package/core/components/ui/modal/modal-subtitle.js +0 -30
  315. package/core/components/ui/modal/modal-title.d.ts +0 -5
  316. package/core/components/ui/modal/modal-title.js +0 -29
  317. package/core/components/ui/modal/modal.d.ts +0 -58
  318. package/core/components/ui/modal/modal.js +0 -401
  319. package/core/components/ui/pop/pop.d.ts +0 -37
  320. package/core/components/ui/pop/pop.js +0 -299
  321. package/core/components/ui/progress/progress.d.ts +0 -10
  322. package/core/components/ui/table/table-caption.d.ts +0 -5
  323. package/core/components/ui/table/table-caption.js +0 -28
  324. package/core/components/ui/table/table-tbody.d.ts +0 -5
  325. package/core/components/ui/table/table-tbody.js +0 -39
  326. package/core/components/ui/table/table-td.d.ts +0 -12
  327. package/core/components/ui/table/table-td.js +0 -68
  328. package/core/components/ui/table/table-tfoot.d.ts +0 -5
  329. package/core/components/ui/table/table-tfoot.js +0 -27
  330. package/core/components/ui/table/table-th.d.ts +0 -11
  331. package/core/components/ui/table/table-th.js +0 -73
  332. package/core/components/ui/table/table-thead.d.ts +0 -5
  333. package/core/components/ui/table/table-thead.js +0 -25
  334. package/core/components/ui/table/table-tr.d.ts +0 -13
  335. package/core/components/ui/table/table-tr.js +0 -66
  336. package/core/components/ui/table/table.d.ts +0 -17
  337. package/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -1
  338. package/core/components/ui/theme/theme-collection/dark.d.ts +0 -1
  339. package/core/components/ui/theme/theme-collection/light.d.ts +0 -1
  340. package/core/components/ui/theme/theme.d.ts +0 -19
  341. package/core/components/ui/theme/theme.js +0 -124
  342. package/core/components/ui/toast/message-subscriber.d.ts +0 -18
  343. package/core/components/ui/toast/message-subscriber.js +0 -40
  344. package/core/components/ui/toast/toast-item.d.ts +0 -19
  345. package/core/components/ui/toast/toast.d.ts +0 -25
  346. package/core/components/ui/toast/toast.js +0 -226
  347. package/core/components/ui/toast/types.d.ts +0 -11
  348. package/core/components/ui/toast/types.js +0 -1
  349. package/core/components/ui/tooltip/tooltip.d.ts +0 -10
  350. package/core/components/ui/ui.d.ts +0 -32
  351. package/core/core.d.ts +0 -4
  352. package/core/core.js +0 -19
  353. package/core/decorators/Subscriber.d.ts +0 -4
  354. package/core/decorators/Subscriber.js +0 -166
  355. package/core/directives/DataProvider.d.ts +0 -23
  356. package/core/directives/DataProvider.js +0 -102
  357. package/core/directives/Wording.d.ts +0 -42
  358. package/core/directives/Wording.js +0 -202
  359. package/core/mixins/Fetcher.d.ts +0 -90
  360. package/core/mixins/Fetcher.js +0 -242
  361. package/core/mixins/FormCheckable.d.ts +0 -88
  362. package/core/mixins/FormCheckable.js +0 -306
  363. package/core/mixins/FormElement.d.ts +0 -32
  364. package/core/mixins/FormElement.js +0 -272
  365. package/core/mixins/FormInput.d.ts +0 -70
  366. package/core/mixins/FormInput.js +0 -81
  367. package/core/mixins/Subscriber.d.ts +0 -36
  368. package/core/mixins/Subscriber.js +0 -333
  369. package/core/mixins/TemplatesContainer.d.ts +0 -13
  370. package/core/mixins/TemplatesContainer.js +0 -69
  371. package/core/mixins/mixins.js +0 -6
  372. package/core/utils/Arrays.d.ts +0 -97
  373. package/core/utils/Arrays.js +0 -140
  374. package/core/utils/DataBindObserver.d.ts +0 -83
  375. package/core/utils/DataBindObserver.js +0 -264
  376. package/core/utils/Electron.d.ts +0 -7
  377. package/core/utils/Electron.js +0 -11
  378. package/core/utils/Format.d.ts +0 -12
  379. package/core/utils/Format.js +0 -38
  380. package/core/utils/HTML.d.ts +0 -42
  381. package/core/utils/HTML.js +0 -119
  382. package/core/utils/LocationHandler.d.ts +0 -46
  383. package/core/utils/LocationHandler.js +0 -133
  384. package/core/utils/Objects.d.ts +0 -28
  385. package/core/utils/Objects.js +0 -102
  386. package/core/utils/PublisherProxy.d.ts +0 -176
  387. package/core/utils/PublisherProxy.js +0 -709
  388. package/core/utils/Utils.d.ts +0 -4
  389. package/core/utils/Utils.js +0 -12
  390. package/core/utils/api.d.ts +0 -139
  391. package/core/utils/api.js +0 -391
  392. package/core/utils/url-pattern.js +0 -2
  393. package/decorators.d.ts +0 -3
  394. package/directives.d.ts +0 -40
  395. package/img/concorde-logo.svg +0 -1
  396. package/img/concorde.png +0 -0
  397. package/img/concorde_def.png +0 -0
  398. package/mixins.d.ts +0 -181
  399. package/svg/regular/plane.svg +0 -1
  400. package/svg/solid/plane.svg +0 -1
  401. package/test-utils/TestUtils.d.ts +0 -4
  402. package/test-utils/TestUtils.js +0 -12
  403. package/utils.d.ts +0 -20
  404. /package/{core/components/functional/functional.d.ts → src/core/components/functional/functional.ts} +0 -0
  405. /package/{core → src/core}/components/ui/theme/css/tailwind.css +0 -0
  406. /package/{core → src/core}/components/ui/theme/css/tailwind.d.ts +0 -0
@@ -0,0 +1,108 @@
1
+ import {html, LitElement} from "lit";
2
+ import {customElement, property} from "lit/decorators.js";
3
+ import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
4
+ import {templateContent} from "lit/directives/template-content.js";
5
+ import LocationHandler from "@supersoniks/concorde/core/utils/LocationHandler";
6
+ import {repeat} from "lit/directives/repeat.js";
7
+ import UrlPattern from "url-pattern";
8
+ import TemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
9
+ const tagName = "sonic-router";
10
+ /**
11
+ * ### Le router observe les modification document.location et met à jour sa vu de la manière suivante :
12
+ * * Il boucle sur ses template enfants et test si la regexp contenue dans l'attribut *data-route* match document.location
13
+ * * Si oui le contenu du template est affiché
14
+ * * Si l'attribut dataProviderExpression est fourni le contenu est entouré d'une div :
15
+ * * L'attribut "dataProvider" de cette div est le resultat de l'appel à la fonction replace sur la propriété location avec comme paramettres la regexpe et dataproviderExpression.
16
+ * * On peut également utiliser les des expressions du type url-pattern pour les paramètres de la route voir les exemples
17
+ * * les subscribers/fetch... du template ser réfèrerons à ce dataProvider
18
+ *
19
+ * **Exemples **
20
+ * Avec location = /youpla/utilisateur/2 :
21
+ * * RegExp : data-route = /utilisateur/(\d+) et dataproviderExpression = /user/$1 l'attribut dataProvider vaudra "/user/2"
22
+ * * url-pattern : /*utilisateur/:id et dataproviderExpression = /user/:id l'attribut dataProvider vaudra "/user/2"
23
+ */
24
+
25
+ @customElement(tagName)
26
+ export class SonicRouter extends Subscriber(TemplatesContainer(LitElement)) {
27
+ templateValueAttribute = "data-route";
28
+
29
+ @property({type: String}) fallBackRoute?: string;
30
+
31
+ connectedCallback() {
32
+ this.noShadowDom = "";
33
+ LocationHandler.onChange(this);
34
+ super.connectedCallback();
35
+ }
36
+ disconnectedCallback(): void {
37
+ LocationHandler.offChange(this);
38
+ super.disconnectedCallback();
39
+ }
40
+ private _location: string = document.location.href.replace(document.location.origin, "");
41
+
42
+ @property() set location(value: string) {
43
+ this._location = value;
44
+ this.requestUpdate();
45
+ }
46
+ get location() {
47
+ return this._location;
48
+ }
49
+
50
+ render() {
51
+ const templates = [];
52
+ for (const t of this.templatePartsList) {
53
+ const path = t.getAttribute(this.templateValueAttribute) || "";
54
+ const regexp = new RegExp(path);
55
+ if (regexp.test(this.location)) {
56
+ templates.push(t);
57
+ } else {
58
+ try {
59
+ if (new UrlPattern("(/)*" + path + "*").match(this.location)) {
60
+ t.setAttribute("mode", "patternMatching");
61
+ templates.push(t);
62
+ }
63
+ } catch (e) {
64
+ if (this.location.indexOf(path.replace(document.location.origin, "")) != -1) {
65
+ templates.push(t);
66
+ }
67
+ }
68
+ }
69
+ }
70
+ if (templates.length == 0) {
71
+ if (this.fallBackRoute && this.isConnected) {
72
+ document.location.href = this.fallBackRoute;
73
+ }
74
+ const fallback = this.templatePartsList.find((t) => t.hasAttribute("data-fallback"));
75
+ if (fallback) {
76
+ templates.push(fallback);
77
+ }
78
+ }
79
+
80
+ return html`${repeat(
81
+ templates,
82
+ (template, index) => {
83
+ template;
84
+ return index + new Date().getTime();
85
+ },
86
+ (template) => {
87
+ if (template.title) document.title = template.title;
88
+ if (template.hasAttribute("dataProviderExpression")) {
89
+ let dataProvider = "";
90
+ const dataProviderExpression = template.getAttribute("dataProviderExpression") || "";
91
+ if (template.getAttribute("mode") == "patternMatching") {
92
+ const matcher = new UrlPattern("(/)*" + (template.getAttribute(this.templateValueAttribute) || "") + "*");
93
+ const filler = new UrlPattern(dataProviderExpression);
94
+ dataProvider = filler.stringify(matcher.match(this.location));
95
+ } else {
96
+ const regexp = new RegExp(template.getAttribute(this.templateValueAttribute) || "");
97
+ const match = (this.location + "").match(regexp);
98
+ if (match) {
99
+ dataProvider = match.shift()?.replace(regexp, dataProviderExpression) || "";
100
+ }
101
+ }
102
+ return html`<div style="display:contents" dataProvider="${dataProvider}">${templateContent(template)}</div>`;
103
+ }
104
+ return templateContent(template);
105
+ }
106
+ )}`;
107
+ }
108
+ }
@@ -0,0 +1,229 @@
1
+ import {
2
+ SDUINode,
3
+ SDUITransformDescription,
4
+ SDUITransformActionName,
5
+ SDUITransformActionFunction,
6
+ SDUITransformAction,
7
+ SDUITransformList,
8
+ SDUIDescriptor,
9
+ } from "@supersoniks/concorde/core/components/functional/sdui/types";
10
+ export default class SDUIDescriptorTransformer {
11
+ sduiDescriptor?: SDUIDescriptor;
12
+
13
+ /**
14
+ * Tranform un SDUIDescriptor via une SDUITransformDescription
15
+ * Attention fonction non pure : la sduiDescriptor est modifiée en place.
16
+ * * La librarie de la sduiDescriptor est mise à jour avec celle présente dans SDUITransformDescription<br>
17
+ * Si des clefs de librairie correspondent, celles de SDUITransformDescription ecrasent celles existantes
18
+ * * Ensuite des actions de transformations sont menées sur les nodes du SDUIDescriptor
19
+ *
20
+ */
21
+ async transform(sduiDescriptor: SDUIDescriptor, transformDescriptor: SDUITransformDescription) {
22
+ this.sduiDescriptor = sduiDescriptor;
23
+ if (this.sduiDescriptor.library) {
24
+ for (const key in transformDescriptor.library) {
25
+ this.sduiDescriptor.library[key] = transformDescriptor.library[key];
26
+ }
27
+ }
28
+ for (const item of transformDescriptor.transforms) {
29
+ this.transformAction(item);
30
+ }
31
+ }
32
+ /**
33
+ * Effectue une actions de transformation sur les noeuds (nodes) de la sduiDescriptor (SDUIDescriptor)
34
+ * La des noeuds impacté est sélectionnée via pattern matching (voir SDUITransformAction.pattern et getNodesMatchingPatterns);
35
+ * Voir le détail des actions de transformations dns les fonctions appellées dans le switch.
36
+ */
37
+ transformAction(transformAction: SDUITransformAction) {
38
+ const uis = this.getNodesMatchingPatterns(transformAction.patterns, this.sduiDescriptor);
39
+ (this as Record<SDUITransformActionName, SDUITransformActionFunction>)[transformAction.action](
40
+ transformAction,
41
+ uis
42
+ );
43
+ }
44
+ /**
45
+ * Retourne les noeuds du SDUIDescriptor qui matche la liste de patterns fournis, dans l'ordre des patterns fournis
46
+ */
47
+ getNodesMatchingPatterns(patterns: Array<SDUINode> | undefined, node?: SDUIDescriptor): SDUITransformList {
48
+ if (!patterns) return [];
49
+ if (!node) return [];
50
+ const nodes: Array<SDUINode> | undefined = node.nodes;
51
+ if (!nodes) return [];
52
+ let result: SDUITransformList = [];
53
+ let index = 0;
54
+ for (const pattern of patterns) {
55
+ for (const child of nodes) {
56
+ if (this.nodeMatchesPattern(pattern, child)) {
57
+ result.push({parent: node, child: child, index: index});
58
+ }
59
+ result = result.concat(this.getNodesMatchingPatterns([pattern], child));
60
+ index++;
61
+ }
62
+ }
63
+ return result;
64
+ }
65
+
66
+ /**
67
+ * Utilisé pour voir si un élément du pattern match le même élement du noeud en cours de traitement
68
+ */
69
+ stringMatchesExpression(stringToTest?: string, regExpString?: string) {
70
+ return !regExpString || (stringToTest && stringToTest.match(regExpString));
71
+ }
72
+
73
+ /**
74
+ * Return true si le pattern match avec le noeud, false sinon.
75
+ */
76
+ nodeMatchesPattern(pattern: SDUINode, node: SDUINode) {
77
+ const patternDynamic = pattern as Record<string, string>;
78
+ const nodeDynamic = node as Record<string, string>;
79
+ const keys = ["libraryKey", "innerHTML", "prefix", "suffix", "markup"];
80
+ for (const key of keys) {
81
+ if (!this.stringMatchesExpression(nodeDynamic[key], patternDynamic[key])) {
82
+ return false;
83
+ }
84
+ }
85
+ const patternAttributes = pattern.attributes;
86
+ const nodeAttributes = node.attributes;
87
+ if (patternAttributes && !nodeAttributes) return false;
88
+ if (patternAttributes) {
89
+ for (const name in patternAttributes) {
90
+ if (!nodeAttributes || !this.stringMatchesExpression(nodeAttributes[name], patternAttributes[name])) {
91
+ return false;
92
+ }
93
+ }
94
+ }
95
+ return true;
96
+ }
97
+ /**
98
+ * Pour chaque élément de la liste, remplace l'élément par ses enfants
99
+ */
100
+ unwrap(transformAction: SDUITransformAction, list: SDUITransformList) {
101
+ transformAction;
102
+ for (const item of list) {
103
+ item.parent.nodes?.splice(item.parent.nodes.indexOf(item.child), 1);
104
+ if (item.child.nodes) {
105
+ item.parent.nodes?.splice(item.parent.nodes.indexOf(item.child), 0, ...item.child.nodes);
106
+ }
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Regroupe tous les éléments de la liste dans l'élément fourni via la prop `ui` de transformAction
112
+ * L'élément créé est inséré en lieu et place du premier élément de la liste
113
+ */
114
+ wrap(transformAction: SDUITransformAction, list: SDUITransformList) {
115
+ const wrapper = {...transformAction.ui} as SDUINode;
116
+ if (!wrapper.nodes) wrapper.nodes = [];
117
+ let i = 0;
118
+ for (const item of list) {
119
+ wrapper.nodes?.push(item.child);
120
+ if (i > 0) {
121
+ item.parent.nodes?.splice(item.parent.nodes.indexOf(item.child), 1);
122
+ }
123
+ i++;
124
+ }
125
+ const idx = list[0]?.parent.nodes?.indexOf(list[0].child);
126
+ if (idx) {
127
+ list[0].parent.nodes?.splice(idx, 1);
128
+ list[0].parent.nodes?.splice(idx, 0, wrapper);
129
+ }
130
+ }
131
+
132
+ /**
133
+ * Déplace tous les noeuds de la liste avant ou après le noeuds sélectionné par pattern matching via l'attribut correspondant `before` ou `after`
134
+ */
135
+ move(transformAction: SDUITransformAction, list: SDUITransformList) {
136
+ for (const item of list) {
137
+ item.parent.nodes?.splice(item.parent.nodes.indexOf(item.child), 1);
138
+ let list: SDUITransformList = [];
139
+ if (transformAction.after) list = this.getNodesMatchingPatterns([transformAction.after], this.sduiDescriptor);
140
+ if (transformAction.before) list = this.getNodesMatchingPatterns([transformAction.before], this.sduiDescriptor);
141
+ const element = list[0];
142
+ if (element) {
143
+ element.parent.nodes?.splice(
144
+ element.parent.nodes.indexOf(element.child) + (transformAction.after ? 1 : 0),
145
+ 0,
146
+ item.child
147
+ );
148
+ }
149
+ }
150
+ }
151
+ /**
152
+ * Transform ous les éléments fourni dans la liste en un élément créé a partir du model fourni dans ui.
153
+ * Les props attributs et autre props de chaque élément sont conservés si non remapés
154
+ */
155
+ remap(transformAction: SDUITransformAction, list: SDUITransformList) {
156
+ for (const item of list) {
157
+ const newUI = {...transformAction.ui} as SDUINode;
158
+ if (!newUI.attributes) {
159
+ newUI.attributes = {};
160
+ }
161
+ const childAttributes = item.child.attributes;
162
+ if (childAttributes) {
163
+ for (const key in childAttributes) {
164
+ if (!Object.prototype.hasOwnProperty.call(newUI.attributes, "key"))
165
+ newUI.attributes[key] = childAttributes[key];
166
+ }
167
+ }
168
+
169
+ const keys = ["libraryKey", "innerHTML", "prefix", "suffix", "markup"];
170
+ const childDynamic = item.child as Record<string, object | string>;
171
+ const newUIDynamic = newUI as Record<string, object | string>;
172
+ for (const key of keys) {
173
+ if (!Object.prototype.hasOwnProperty.call(newUI, key) && childDynamic[key])
174
+ newUIDynamic[key] = childDynamic[key];
175
+ }
176
+
177
+ if (!newUI.nodes) {
178
+ newUI.nodes = [];
179
+ }
180
+ const childNodes = item.child.nodes;
181
+ if (childNodes) {
182
+ for (const node of childNodes) {
183
+ newUI.nodes.push(node);
184
+ }
185
+ }
186
+ const idx = item.parent.nodes?.indexOf(item.child) || -1;
187
+ if (idx != -1) {
188
+ item.parent.nodes?.splice(idx, 1);
189
+ item.parent.nodes?.splice(idx, 0, newUI);
190
+ }
191
+ }
192
+ }
193
+ /**
194
+ * Supprime tous les éléments de la liste.
195
+ */
196
+ delete(transformAction: SDUITransformAction, list: SDUITransformList) {
197
+ transformAction;
198
+ for (const item of list) {
199
+ item.parent.nodes?.splice(item.parent.nodes.indexOf(item.child), 1);
200
+ }
201
+ }
202
+
203
+ /**
204
+ * Ajoute une copie de l'élément décrit dans la propriété ui de transformAction avant ou après chaque élément de la liste
205
+ * La positione st déterminée par l'attribute before ou after ou in qui est un pattern permettant la sélection de l'élément de référence pur l'ajout
206
+ */
207
+ insert(transformAction: SDUITransformAction, list: SDUITransformList) {
208
+ const positionType = transformAction.after ? "after" : transformAction.before ? "before" : "in";
209
+ list = [];
210
+ if (transformAction.after) {
211
+ list = this.getNodesMatchingPatterns([transformAction.after], this.sduiDescriptor);
212
+ } else if (transformAction.before) {
213
+ list = this.getNodesMatchingPatterns([transformAction.before], this.sduiDescriptor);
214
+ } else if (transformAction.in) {
215
+ list = this.getNodesMatchingPatterns([transformAction.in], this.sduiDescriptor);
216
+ }
217
+ const node = list[0];
218
+ if (node) {
219
+ if (positionType == "in") {
220
+ if (!node.child.nodes) node.child.nodes = [];
221
+ node.child.nodes.push({...transformAction.ui} as SDUINode);
222
+ } else {
223
+ node.parent.nodes?.splice(node.parent.nodes.indexOf(node.child) + (positionType == "after" ? 1 : 0), 0, {
224
+ ...transformAction.ui,
225
+ } as SDUINode);
226
+ }
227
+ }
228
+ }
229
+ }
@@ -10,13 +10,13 @@
10
10
  },
11
11
  "fieldset": {
12
12
  "tagName": "sonic-fieldset",
13
- "nodes": [{ "libraryKey": "formLayout" }],
14
- "contentElementSelector": "sonic-form-layout"
13
+ "nodes":[{"libraryKey":"formLayout"}],
14
+ "contentElementSelector":"sonic-form-layout"
15
15
  },
16
16
  "managed_file": {
17
17
  "tagName": "sonic-input",
18
18
  "attributes": {
19
- "variant": "ghost",
19
+ "variant":"ghost",
20
20
  "type": "file"
21
21
  }
22
22
  },
@@ -61,17 +61,17 @@
61
61
  "attributes": {
62
62
  "onClick": true
63
63
  },
64
- "contentElementSelector": "sonic-button",
65
- "nodes": [
64
+ "contentElementSelector":"sonic-button",
65
+ "nodes":[
66
66
  {
67
- "libraryKey": "button",
68
- "attributes": { "type": "success" },
69
- "nodes": [
67
+ "libraryKey":"button",
68
+ "attributes":{"type":"success"},
69
+ "nodes":[
70
70
  {
71
- "tagName": "sonic-icon",
72
- "attributes": {
73
- "name": "check",
74
- "slot": "prefix"
71
+ "tagName":"sonic-icon",
72
+ "attributes":{
73
+ "name":"check",
74
+ "slot":"prefix"
75
75
  }
76
76
  }
77
77
  ]
@@ -105,4 +105,4 @@
105
105
  "divider": {
106
106
  "tagName": "sonic-divider"
107
107
  }
108
- }
108
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "nodes": [
3
+ {
4
+ "tagName": "div",
5
+ "attributes": {
6
+ "class": "flex gap-2 items-center",
7
+ "formdataprovider": "states-basic-example"
8
+ },
9
+ "nodes": [
10
+ {
11
+ "tagName": "sonic-button",
12
+ "attributes": {
13
+ "radio": "",
14
+ "name": "selection",
15
+ "value": "#home",
16
+ "checked": "",
17
+ "size": "xs"
18
+ },
19
+ "innerHTML": "Home"
20
+ },
21
+ {
22
+ "tagName": "sonic-button",
23
+ "attributes": {
24
+ "radio": "",
25
+ "name": "selection",
26
+ "value": "#about",
27
+ "size": "xs"
28
+ },
29
+ "innerHTML": "About"
30
+ },
31
+ {
32
+ "tagName": "sonic-button",
33
+ "attributes": {
34
+ "radio": "",
35
+ "name": "selection",
36
+ "value": "#work",
37
+ "size": "xs"
38
+ },
39
+ "innerHTML": "Work"
40
+ },
41
+ {
42
+ "tagName": "sonic-button",
43
+ "attributes": {
44
+ "radio": "",
45
+ "name": "selection",
46
+ "value": "#contact",
47
+ "size": "xs"
48
+ },
49
+ "innerHTML": "Contact"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "tagName": "div",
55
+ "attributes": {
56
+ "class": "text-center text-neutral-700 border rounded text-4xl my-6 p-3 "
57
+ },
58
+ "nodes": [
59
+ {
60
+ "tagName": "sonic-states",
61
+ "attributes": {
62
+ "dataprovider": "states-basic-example",
63
+ "data-path": "selection"
64
+ },
65
+ "nodes": [
66
+ {
67
+ "tagName": "template",
68
+ "attributes": {
69
+ "data-value": "#home"
70
+ },
71
+ "innerHTML": "Home"
72
+ },
73
+ {
74
+ "tagName": "template",
75
+ "attributes": {
76
+ "data-value": "#about"
77
+ },
78
+ "innerHTML": "About"
79
+ },
80
+ {
81
+ "tagName": "template",
82
+ "attributes": {
83
+ "data-value": "#work"
84
+ },
85
+ "innerHTML": "Work"
86
+ },
87
+ {
88
+ "tagName": "template",
89
+ "attributes": {
90
+ "data-value": "#contact"
91
+ },
92
+ "innerHTML": "Contact"
93
+ }
94
+ ]
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ }
@@ -0,0 +1,62 @@
1
+ import {SDUIDescriptor, SDUINode} from "./types";
2
+ export default class SDUIUtils {
3
+ static toJson(nodes: HTMLCollection) {
4
+ const desc: SDUIDescriptor = {};
5
+ desc.nodes = [];
6
+ for (const node of nodes) {
7
+ const parsedChild = SDUIUtils.parseNode(node);
8
+ if (parsedChild) {
9
+ desc.nodes.push(parsedChild);
10
+ }
11
+ }
12
+ const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(desc, null, 2));
13
+ const dlAnchorElem = document.createElement("a");
14
+ dlAnchorElem.setAttribute("href", dataStr);
15
+ dlAnchorElem.setAttribute("download", "sdui.json");
16
+ document.body.appendChild(dlAnchorElem);
17
+ dlAnchorElem.click();
18
+ dlAnchorElem.remove();
19
+ return JSON.stringify(desc, null, 4);
20
+ }
21
+ static parseNode(node: Node) {
22
+ const sdui: SDUINode = {};
23
+ const nodeType = node.nodeType;
24
+ if (nodeType == Node.ELEMENT_NODE) {
25
+ const name = node.nodeName.toLowerCase();
26
+ sdui.tagName = name;
27
+ const element = node as HTMLElement;
28
+ sdui.attributes = {};
29
+ const attributes = element.attributes;
30
+ const attrLength = attributes.length;
31
+ for (let i = 0; i < attrLength; i++) {
32
+ const attribute = attributes.item(i);
33
+ if (attribute) sdui.attributes[attribute.name] = attribute.value;
34
+ }
35
+
36
+ let childNodes = element.childNodes;
37
+ let children = element.children;
38
+ if (name == "template") {
39
+ const template = node as HTMLTemplateElement;
40
+ childNodes = template.content.childNodes;
41
+ children = template.content.children;
42
+ }
43
+ if (children.length > 0) {
44
+ sdui.nodes = [];
45
+ for (const ch of childNodes) {
46
+ const parsedChild = SDUIUtils.parseNode(ch);
47
+ if (parsedChild) {
48
+ sdui.nodes.push(parsedChild);
49
+ }
50
+ }
51
+ } else if (element.innerHTML) {
52
+ sdui.innerHTML = element.innerHTML;
53
+ }
54
+ }
55
+ if (nodeType == Node.TEXT_NODE) {
56
+ const content = (node.textContent || "").trim();
57
+ if (!content) return null;
58
+ sdui.markup = content;
59
+ }
60
+ return sdui;
61
+ }
62
+ }