@dooboostore/simple-web-component 1.0.18 → 1.0.21

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 (618) hide show
  1. package/README.md +2065 -164
  2. package/dist/cjs/config/config.js +2 -0
  3. package/dist/cjs/config/config.js.map +2 -2
  4. package/dist/cjs/decorators/addEventListener.js +8 -8
  5. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  6. package/dist/cjs/decorators/appendChild.js +53 -9
  7. package/dist/cjs/decorators/appendChild.js.map +2 -2
  8. package/dist/cjs/decorators/attribute.js +141 -0
  9. package/dist/cjs/decorators/attribute.js.map +7 -0
  10. package/dist/cjs/decorators/changedAttribute.js +5 -5
  11. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  12. package/dist/cjs/decorators/classList.js +104 -0
  13. package/dist/cjs/decorators/classList.js.map +7 -0
  14. package/dist/cjs/decorators/elementDefine.js +334 -425
  15. package/dist/cjs/decorators/elementDefine.js.map +3 -3
  16. package/dist/cjs/decorators/emitCustomEvent.js +65 -13
  17. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  18. package/dist/cjs/decorators/index.js +4 -0
  19. package/dist/cjs/decorators/index.js.map +2 -2
  20. package/dist/cjs/decorators/lifecycles.js +4 -4
  21. package/dist/cjs/decorators/lifecycles.js.map +2 -2
  22. package/dist/cjs/decorators/onConnectedInnerHtml.js +4 -4
  23. package/dist/cjs/decorators/onConnectedInnerHtml.js.map +2 -2
  24. package/dist/cjs/decorators/query.js +60 -36
  25. package/dist/cjs/decorators/query.js.map +2 -2
  26. package/dist/cjs/decorators/queryAll.js +47 -23
  27. package/dist/cjs/decorators/queryAll.js.map +2 -2
  28. package/dist/cjs/decorators/replaceChildren.js +32 -6
  29. package/dist/cjs/decorators/replaceChildren.js.map +2 -2
  30. package/dist/cjs/decorators/setAttribute.js +64 -10
  31. package/dist/cjs/decorators/setAttribute.js.map +2 -2
  32. package/dist/cjs/decorators/style.js +88 -0
  33. package/dist/cjs/decorators/style.js.map +7 -0
  34. package/dist/cjs/elements/SwcAppEngine.js +30 -15
  35. package/dist/cjs/elements/SwcAppEngine.js.map +3 -3
  36. package/dist/cjs/elements/SwcAppMixin.js +79 -0
  37. package/dist/cjs/elements/SwcAppMixin.js.map +7 -0
  38. package/dist/cjs/elements/SwcAsync.js +58 -123
  39. package/dist/cjs/elements/SwcAsync.js.map +3 -3
  40. package/dist/cjs/elements/SwcChoose.js +52 -76
  41. package/dist/cjs/elements/SwcChoose.js.map +3 -3
  42. package/dist/cjs/elements/SwcIf.js +66 -94
  43. package/dist/cjs/elements/SwcIf.js.map +3 -3
  44. package/dist/cjs/elements/SwcLoop.js +73 -174
  45. package/dist/cjs/elements/SwcLoop.js.map +3 -3
  46. package/dist/cjs/elements/SwcSubTemplates.js +12 -37
  47. package/dist/cjs/elements/SwcSubTemplates.js.map +3 -3
  48. package/dist/cjs/elements/index.js +1 -8
  49. package/dist/cjs/elements/index.js.map +2 -2
  50. package/dist/cjs/elements/register.js +831 -0
  51. package/dist/cjs/elements/register.js.map +7 -0
  52. package/dist/cjs/index.js +14 -3
  53. package/dist/cjs/index.js.map +2 -2
  54. package/dist/cjs/router/ElementRouter.js +7 -7
  55. package/dist/cjs/router/ElementRouter.js.map +2 -2
  56. package/dist/cjs/types.js.map +1 -1
  57. package/dist/cjs/utils/TemplateUtils.js +103 -0
  58. package/dist/cjs/utils/TemplateUtils.js.map +7 -0
  59. package/dist/cjs/utils/Utils.js +10 -7
  60. package/dist/cjs/utils/Utils.js.map +2 -2
  61. package/dist/esm/config/config.js +2 -0
  62. package/dist/esm/config/config.js.map +2 -2
  63. package/dist/esm/decorators/addEventListener.js +5 -5
  64. package/dist/esm/decorators/addEventListener.js.map +2 -2
  65. package/dist/esm/decorators/appendChild.js +52 -8
  66. package/dist/esm/decorators/appendChild.js.map +2 -2
  67. package/dist/esm/decorators/attribute.js +122 -0
  68. package/dist/esm/decorators/attribute.js.map +7 -0
  69. package/dist/esm/decorators/changedAttribute.js +1 -1
  70. package/dist/esm/decorators/changedAttribute.js.map +1 -1
  71. package/dist/esm/decorators/classList.js +85 -0
  72. package/dist/esm/decorators/classList.js.map +7 -0
  73. package/dist/esm/decorators/elementDefine.js +334 -425
  74. package/dist/esm/decorators/elementDefine.js.map +3 -3
  75. package/dist/esm/decorators/emitCustomEvent.js +62 -10
  76. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  77. package/dist/esm/decorators/index.js +4 -0
  78. package/dist/esm/decorators/index.js.map +2 -2
  79. package/dist/esm/decorators/lifecycles.js +1 -1
  80. package/dist/esm/decorators/lifecycles.js.map +1 -1
  81. package/dist/esm/decorators/onConnectedInnerHtml.js +1 -1
  82. package/dist/esm/decorators/onConnectedInnerHtml.js.map +1 -1
  83. package/dist/esm/decorators/query.js +58 -34
  84. package/dist/esm/decorators/query.js.map +2 -2
  85. package/dist/esm/decorators/queryAll.js +45 -21
  86. package/dist/esm/decorators/queryAll.js.map +2 -2
  87. package/dist/esm/decorators/replaceChildren.js +28 -2
  88. package/dist/esm/decorators/replaceChildren.js.map +2 -2
  89. package/dist/esm/decorators/setAttribute.js +62 -8
  90. package/dist/esm/decorators/setAttribute.js.map +2 -2
  91. package/dist/esm/decorators/style.js +69 -0
  92. package/dist/esm/decorators/style.js.map +7 -0
  93. package/dist/esm/elements/SwcAppEngine.js +27 -12
  94. package/dist/esm/elements/SwcAppEngine.js.map +2 -2
  95. package/dist/esm/elements/SwcAppMixin.js +60 -0
  96. package/dist/esm/elements/SwcAppMixin.js.map +7 -0
  97. package/dist/esm/elements/SwcAsync.js +58 -123
  98. package/dist/esm/elements/SwcAsync.js.map +3 -3
  99. package/dist/esm/elements/SwcChoose.js +52 -76
  100. package/dist/esm/elements/SwcChoose.js.map +3 -3
  101. package/dist/esm/elements/SwcIf.js +66 -94
  102. package/dist/esm/elements/SwcIf.js.map +3 -3
  103. package/dist/esm/elements/SwcLoop.js +72 -173
  104. package/dist/esm/elements/SwcLoop.js.map +3 -3
  105. package/dist/esm/elements/SwcSubTemplates.js +12 -37
  106. package/dist/esm/elements/SwcSubTemplates.js.map +3 -3
  107. package/dist/esm/elements/index.js +1 -8
  108. package/dist/esm/elements/index.js.map +2 -2
  109. package/dist/esm/elements/register.js +812 -0
  110. package/dist/esm/elements/register.js.map +7 -0
  111. package/dist/esm/index.js +14 -3
  112. package/dist/esm/index.js.map +2 -2
  113. package/dist/esm/router/ElementRouter.js +2 -2
  114. package/dist/esm/router/ElementRouter.js.map +1 -1
  115. package/dist/esm/types.js.map +1 -1
  116. package/dist/esm/utils/TemplateUtils.js +84 -0
  117. package/dist/esm/utils/TemplateUtils.js.map +7 -0
  118. package/dist/esm/utils/Utils.js +6 -3
  119. package/dist/esm/utils/Utils.js.map +2 -2
  120. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +4910 -7463
  121. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  122. package/dist/types/config/config.d.ts +1 -0
  123. package/dist/types/config/config.d.ts.map +1 -1
  124. package/dist/types/decorators/addEventListener.d.ts +11 -11
  125. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  126. package/dist/types/decorators/appendChild.d.ts +1 -1
  127. package/dist/types/decorators/appendChild.d.ts.map +1 -1
  128. package/dist/types/decorators/attribute.d.ts +23 -0
  129. package/dist/types/decorators/attribute.d.ts.map +1 -0
  130. package/dist/types/decorators/classList.d.ts +34 -0
  131. package/dist/types/decorators/classList.d.ts.map +1 -0
  132. package/dist/types/decorators/elementDefine.d.ts +9 -5
  133. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  134. package/dist/types/decorators/emitCustomEvent.d.ts +7 -4
  135. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  136. package/dist/types/decorators/index.d.ts +4 -0
  137. package/dist/types/decorators/index.d.ts.map +1 -1
  138. package/dist/types/decorators/query.d.ts +7 -8
  139. package/dist/types/decorators/query.d.ts.map +1 -1
  140. package/dist/types/decorators/queryAll.d.ts +5 -9
  141. package/dist/types/decorators/queryAll.d.ts.map +1 -1
  142. package/dist/types/decorators/replaceChildren.d.ts.map +1 -1
  143. package/dist/types/decorators/setAttribute.d.ts +16 -3
  144. package/dist/types/decorators/setAttribute.d.ts.map +1 -1
  145. package/dist/types/decorators/style.d.ts +24 -0
  146. package/dist/types/decorators/style.d.ts.map +1 -0
  147. package/dist/types/elements/SwcAppEngine.d.ts +6 -5
  148. package/dist/types/elements/SwcAppEngine.d.ts.map +1 -1
  149. package/dist/types/elements/SwcAppMixin.d.ts +364 -0
  150. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -0
  151. package/dist/types/elements/SwcAsync.d.ts +2 -6
  152. package/dist/types/elements/SwcAsync.d.ts.map +1 -1
  153. package/dist/types/elements/SwcChoose.d.ts +2 -1
  154. package/dist/types/elements/SwcChoose.d.ts.map +1 -1
  155. package/dist/types/elements/SwcIf.d.ts +5 -6
  156. package/dist/types/elements/SwcIf.d.ts.map +1 -1
  157. package/dist/types/elements/SwcLoop.d.ts +4 -10
  158. package/dist/types/elements/SwcLoop.d.ts.map +1 -1
  159. package/dist/types/elements/SwcSubTemplates.d.ts.map +1 -1
  160. package/dist/types/elements/index.d.ts +1 -8
  161. package/dist/types/elements/index.d.ts.map +1 -1
  162. package/dist/types/elements/register.d.ts +2 -0
  163. package/dist/types/elements/register.d.ts.map +1 -0
  164. package/dist/types/index.d.ts +8 -3
  165. package/dist/types/index.d.ts.map +1 -1
  166. package/dist/types/router/ElementRouter.d.ts +1 -1
  167. package/dist/types/router/ElementRouter.d.ts.map +1 -1
  168. package/dist/types/types.d.ts +8 -2
  169. package/dist/types/types.d.ts.map +1 -1
  170. package/dist/types/utils/TemplateUtils.d.ts +54 -0
  171. package/dist/types/utils/TemplateUtils.d.ts.map +1 -0
  172. package/dist/types/utils/Utils.d.ts.map +1 -1
  173. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +4910 -7463
  174. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  175. package/package.json +11 -6
  176. package/src/config/config.ts +2 -0
  177. package/src/decorators/addEventListener.ts +13 -12
  178. package/src/decorators/appendChild.ts +53 -9
  179. package/src/decorators/attribute.ts +158 -0
  180. package/src/decorators/changedAttribute.ts +1 -1
  181. package/src/decorators/classList.ts +117 -0
  182. package/src/decorators/elementDefine.ts +371 -425
  183. package/src/decorators/emitCustomEvent.ts +77 -13
  184. package/src/decorators/index.ts +4 -0
  185. package/src/decorators/lifecycles.ts +1 -1
  186. package/src/decorators/onConnectedInnerHtml.ts +1 -1
  187. package/src/decorators/query.ts +58 -38
  188. package/src/decorators/queryAll.ts +45 -29
  189. package/src/decorators/replaceChildren.ts +31 -2
  190. package/src/decorators/setAttribute.ts +86 -12
  191. package/src/decorators/style.ts +89 -0
  192. package/src/elements/SwcAppEngine.ts +34 -18
  193. package/src/elements/SwcAppMixin.ts +65 -0
  194. package/src/elements/SwcAsync.ts +58 -128
  195. package/src/elements/SwcChoose.ts +51 -77
  196. package/src/elements/SwcIf.ts +64 -86
  197. package/src/elements/SwcLoop.ts +71 -168
  198. package/src/elements/SwcSubTemplates.ts +0 -13
  199. package/src/elements/index.ts +1 -8
  200. package/src/elements/register.ts +735 -0
  201. package/src/index.ts +17 -5
  202. package/src/router/ElementRouter.ts +2 -2
  203. package/src/types.ts +15 -6
  204. package/src/utils/TemplateUtils.ts +83 -0
  205. package/src/utils/Utils.ts +6 -3
  206. package/dist/cjs/elements/SwcApp.js +0 -55
  207. package/dist/cjs/elements/SwcApp.js.map +0 -7
  208. package/dist/cjs/elements/is/SwcAppAnchor.js +0 -55
  209. package/dist/cjs/elements/is/SwcAppAnchor.js.map +0 -7
  210. package/dist/cjs/elements/is/SwcAppArea.js +0 -55
  211. package/dist/cjs/elements/is/SwcAppArea.js.map +0 -7
  212. package/dist/cjs/elements/is/SwcAppAudio.js +0 -55
  213. package/dist/cjs/elements/is/SwcAppAudio.js.map +0 -7
  214. package/dist/cjs/elements/is/SwcAppBase.js +0 -55
  215. package/dist/cjs/elements/is/SwcAppBase.js.map +0 -7
  216. package/dist/cjs/elements/is/SwcAppBody.js +0 -55
  217. package/dist/cjs/elements/is/SwcAppBody.js.map +0 -7
  218. package/dist/cjs/elements/is/SwcAppButton.js +0 -55
  219. package/dist/cjs/elements/is/SwcAppButton.js.map +0 -7
  220. package/dist/cjs/elements/is/SwcAppCanvas.js +0 -55
  221. package/dist/cjs/elements/is/SwcAppCanvas.js.map +0 -7
  222. package/dist/cjs/elements/is/SwcAppData.js +0 -55
  223. package/dist/cjs/elements/is/SwcAppData.js.map +0 -7
  224. package/dist/cjs/elements/is/SwcAppDataList.js +0 -55
  225. package/dist/cjs/elements/is/SwcAppDataList.js.map +0 -7
  226. package/dist/cjs/elements/is/SwcAppDetails.js +0 -55
  227. package/dist/cjs/elements/is/SwcAppDetails.js.map +0 -7
  228. package/dist/cjs/elements/is/SwcAppDialog.js +0 -55
  229. package/dist/cjs/elements/is/SwcAppDialog.js.map +0 -7
  230. package/dist/cjs/elements/is/SwcAppDiv.js +0 -55
  231. package/dist/cjs/elements/is/SwcAppDiv.js.map +0 -7
  232. package/dist/cjs/elements/is/SwcAppDl.js +0 -55
  233. package/dist/cjs/elements/is/SwcAppDl.js.map +0 -7
  234. package/dist/cjs/elements/is/SwcAppEmbed.js +0 -55
  235. package/dist/cjs/elements/is/SwcAppEmbed.js.map +0 -7
  236. package/dist/cjs/elements/is/SwcAppFieldSet.js +0 -55
  237. package/dist/cjs/elements/is/SwcAppFieldSet.js.map +0 -7
  238. package/dist/cjs/elements/is/SwcAppForm.js +0 -55
  239. package/dist/cjs/elements/is/SwcAppForm.js.map +0 -7
  240. package/dist/cjs/elements/is/SwcAppHeading.js +0 -55
  241. package/dist/cjs/elements/is/SwcAppHeading.js.map +0 -7
  242. package/dist/cjs/elements/is/SwcAppHr.js +0 -55
  243. package/dist/cjs/elements/is/SwcAppHr.js.map +0 -7
  244. package/dist/cjs/elements/is/SwcAppIFrame.js +0 -55
  245. package/dist/cjs/elements/is/SwcAppIFrame.js.map +0 -7
  246. package/dist/cjs/elements/is/SwcAppImage.js +0 -55
  247. package/dist/cjs/elements/is/SwcAppImage.js.map +0 -7
  248. package/dist/cjs/elements/is/SwcAppInput.js +0 -55
  249. package/dist/cjs/elements/is/SwcAppInput.js.map +0 -7
  250. package/dist/cjs/elements/is/SwcAppLabel.js +0 -55
  251. package/dist/cjs/elements/is/SwcAppLabel.js.map +0 -7
  252. package/dist/cjs/elements/is/SwcAppLegend.js +0 -55
  253. package/dist/cjs/elements/is/SwcAppLegend.js.map +0 -7
  254. package/dist/cjs/elements/is/SwcAppLi.js +0 -55
  255. package/dist/cjs/elements/is/SwcAppLi.js.map +0 -7
  256. package/dist/cjs/elements/is/SwcAppLink.js +0 -55
  257. package/dist/cjs/elements/is/SwcAppLink.js.map +0 -7
  258. package/dist/cjs/elements/is/SwcAppMap.js +0 -55
  259. package/dist/cjs/elements/is/SwcAppMap.js.map +0 -7
  260. package/dist/cjs/elements/is/SwcAppMeta.js +0 -55
  261. package/dist/cjs/elements/is/SwcAppMeta.js.map +0 -7
  262. package/dist/cjs/elements/is/SwcAppMeter.js +0 -55
  263. package/dist/cjs/elements/is/SwcAppMeter.js.map +0 -7
  264. package/dist/cjs/elements/is/SwcAppMod.js +0 -55
  265. package/dist/cjs/elements/is/SwcAppMod.js.map +0 -7
  266. package/dist/cjs/elements/is/SwcAppObject.js +0 -55
  267. package/dist/cjs/elements/is/SwcAppObject.js.map +0 -7
  268. package/dist/cjs/elements/is/SwcAppOl.js +0 -55
  269. package/dist/cjs/elements/is/SwcAppOl.js.map +0 -7
  270. package/dist/cjs/elements/is/SwcAppOptGroup.js +0 -55
  271. package/dist/cjs/elements/is/SwcAppOptGroup.js.map +0 -7
  272. package/dist/cjs/elements/is/SwcAppOption.js +0 -55
  273. package/dist/cjs/elements/is/SwcAppOption.js.map +0 -7
  274. package/dist/cjs/elements/is/SwcAppOutput.js +0 -55
  275. package/dist/cjs/elements/is/SwcAppOutput.js.map +0 -7
  276. package/dist/cjs/elements/is/SwcAppParagraph.js +0 -55
  277. package/dist/cjs/elements/is/SwcAppParagraph.js.map +0 -7
  278. package/dist/cjs/elements/is/SwcAppParam.js +0 -55
  279. package/dist/cjs/elements/is/SwcAppParam.js.map +0 -7
  280. package/dist/cjs/elements/is/SwcAppPicture.js +0 -55
  281. package/dist/cjs/elements/is/SwcAppPicture.js.map +0 -7
  282. package/dist/cjs/elements/is/SwcAppPre.js +0 -55
  283. package/dist/cjs/elements/is/SwcAppPre.js.map +0 -7
  284. package/dist/cjs/elements/is/SwcAppProgress.js +0 -55
  285. package/dist/cjs/elements/is/SwcAppProgress.js.map +0 -7
  286. package/dist/cjs/elements/is/SwcAppQuote.js +0 -55
  287. package/dist/cjs/elements/is/SwcAppQuote.js.map +0 -7
  288. package/dist/cjs/elements/is/SwcAppScript.js +0 -55
  289. package/dist/cjs/elements/is/SwcAppScript.js.map +0 -7
  290. package/dist/cjs/elements/is/SwcAppSelect.js +0 -55
  291. package/dist/cjs/elements/is/SwcAppSelect.js.map +0 -7
  292. package/dist/cjs/elements/is/SwcAppSlot.js +0 -55
  293. package/dist/cjs/elements/is/SwcAppSlot.js.map +0 -7
  294. package/dist/cjs/elements/is/SwcAppSource.js +0 -55
  295. package/dist/cjs/elements/is/SwcAppSource.js.map +0 -7
  296. package/dist/cjs/elements/is/SwcAppSpan.js +0 -55
  297. package/dist/cjs/elements/is/SwcAppSpan.js.map +0 -7
  298. package/dist/cjs/elements/is/SwcAppStyle.js +0 -55
  299. package/dist/cjs/elements/is/SwcAppStyle.js.map +0 -7
  300. package/dist/cjs/elements/is/SwcAppTable.js +0 -55
  301. package/dist/cjs/elements/is/SwcAppTable.js.map +0 -7
  302. package/dist/cjs/elements/is/SwcAppTableCell.js +0 -55
  303. package/dist/cjs/elements/is/SwcAppTableCell.js.map +0 -7
  304. package/dist/cjs/elements/is/SwcAppTableRow.js +0 -55
  305. package/dist/cjs/elements/is/SwcAppTableRow.js.map +0 -7
  306. package/dist/cjs/elements/is/SwcAppTableSection.js +0 -55
  307. package/dist/cjs/elements/is/SwcAppTableSection.js.map +0 -7
  308. package/dist/cjs/elements/is/SwcAppTemplate.js +0 -55
  309. package/dist/cjs/elements/is/SwcAppTemplate.js.map +0 -7
  310. package/dist/cjs/elements/is/SwcAppTextArea.js +0 -55
  311. package/dist/cjs/elements/is/SwcAppTextArea.js.map +0 -7
  312. package/dist/cjs/elements/is/SwcAppTime.js +0 -55
  313. package/dist/cjs/elements/is/SwcAppTime.js.map +0 -7
  314. package/dist/cjs/elements/is/SwcAppTitle.js +0 -55
  315. package/dist/cjs/elements/is/SwcAppTitle.js.map +0 -7
  316. package/dist/cjs/elements/is/SwcAppTrack.js +0 -55
  317. package/dist/cjs/elements/is/SwcAppTrack.js.map +0 -7
  318. package/dist/cjs/elements/is/SwcAppUl.js +0 -55
  319. package/dist/cjs/elements/is/SwcAppUl.js.map +0 -7
  320. package/dist/cjs/elements/is/SwcAppVideo.js +0 -55
  321. package/dist/cjs/elements/is/SwcAppVideo.js.map +0 -7
  322. package/dist/cjs/elements/is/index.js +0 -74
  323. package/dist/cjs/elements/is/index.js.map +0 -7
  324. package/dist/esm/elements/SwcApp.js +0 -36
  325. package/dist/esm/elements/SwcApp.js.map +0 -7
  326. package/dist/esm/elements/is/SwcAppAnchor.js +0 -36
  327. package/dist/esm/elements/is/SwcAppAnchor.js.map +0 -7
  328. package/dist/esm/elements/is/SwcAppArea.js +0 -36
  329. package/dist/esm/elements/is/SwcAppArea.js.map +0 -7
  330. package/dist/esm/elements/is/SwcAppAudio.js +0 -36
  331. package/dist/esm/elements/is/SwcAppAudio.js.map +0 -7
  332. package/dist/esm/elements/is/SwcAppBase.js +0 -36
  333. package/dist/esm/elements/is/SwcAppBase.js.map +0 -7
  334. package/dist/esm/elements/is/SwcAppBody.js +0 -36
  335. package/dist/esm/elements/is/SwcAppBody.js.map +0 -7
  336. package/dist/esm/elements/is/SwcAppButton.js +0 -36
  337. package/dist/esm/elements/is/SwcAppButton.js.map +0 -7
  338. package/dist/esm/elements/is/SwcAppCanvas.js +0 -36
  339. package/dist/esm/elements/is/SwcAppCanvas.js.map +0 -7
  340. package/dist/esm/elements/is/SwcAppData.js +0 -36
  341. package/dist/esm/elements/is/SwcAppData.js.map +0 -7
  342. package/dist/esm/elements/is/SwcAppDataList.js +0 -36
  343. package/dist/esm/elements/is/SwcAppDataList.js.map +0 -7
  344. package/dist/esm/elements/is/SwcAppDetails.js +0 -36
  345. package/dist/esm/elements/is/SwcAppDetails.js.map +0 -7
  346. package/dist/esm/elements/is/SwcAppDialog.js +0 -36
  347. package/dist/esm/elements/is/SwcAppDialog.js.map +0 -7
  348. package/dist/esm/elements/is/SwcAppDiv.js +0 -36
  349. package/dist/esm/elements/is/SwcAppDiv.js.map +0 -7
  350. package/dist/esm/elements/is/SwcAppDl.js +0 -36
  351. package/dist/esm/elements/is/SwcAppDl.js.map +0 -7
  352. package/dist/esm/elements/is/SwcAppEmbed.js +0 -36
  353. package/dist/esm/elements/is/SwcAppEmbed.js.map +0 -7
  354. package/dist/esm/elements/is/SwcAppFieldSet.js +0 -36
  355. package/dist/esm/elements/is/SwcAppFieldSet.js.map +0 -7
  356. package/dist/esm/elements/is/SwcAppForm.js +0 -36
  357. package/dist/esm/elements/is/SwcAppForm.js.map +0 -7
  358. package/dist/esm/elements/is/SwcAppHeading.js +0 -36
  359. package/dist/esm/elements/is/SwcAppHeading.js.map +0 -7
  360. package/dist/esm/elements/is/SwcAppHr.js +0 -36
  361. package/dist/esm/elements/is/SwcAppHr.js.map +0 -7
  362. package/dist/esm/elements/is/SwcAppIFrame.js +0 -36
  363. package/dist/esm/elements/is/SwcAppIFrame.js.map +0 -7
  364. package/dist/esm/elements/is/SwcAppImage.js +0 -36
  365. package/dist/esm/elements/is/SwcAppImage.js.map +0 -7
  366. package/dist/esm/elements/is/SwcAppInput.js +0 -36
  367. package/dist/esm/elements/is/SwcAppInput.js.map +0 -7
  368. package/dist/esm/elements/is/SwcAppLabel.js +0 -36
  369. package/dist/esm/elements/is/SwcAppLabel.js.map +0 -7
  370. package/dist/esm/elements/is/SwcAppLegend.js +0 -36
  371. package/dist/esm/elements/is/SwcAppLegend.js.map +0 -7
  372. package/dist/esm/elements/is/SwcAppLi.js +0 -36
  373. package/dist/esm/elements/is/SwcAppLi.js.map +0 -7
  374. package/dist/esm/elements/is/SwcAppLink.js +0 -36
  375. package/dist/esm/elements/is/SwcAppLink.js.map +0 -7
  376. package/dist/esm/elements/is/SwcAppMap.js +0 -36
  377. package/dist/esm/elements/is/SwcAppMap.js.map +0 -7
  378. package/dist/esm/elements/is/SwcAppMeta.js +0 -36
  379. package/dist/esm/elements/is/SwcAppMeta.js.map +0 -7
  380. package/dist/esm/elements/is/SwcAppMeter.js +0 -36
  381. package/dist/esm/elements/is/SwcAppMeter.js.map +0 -7
  382. package/dist/esm/elements/is/SwcAppMod.js +0 -36
  383. package/dist/esm/elements/is/SwcAppMod.js.map +0 -7
  384. package/dist/esm/elements/is/SwcAppObject.js +0 -36
  385. package/dist/esm/elements/is/SwcAppObject.js.map +0 -7
  386. package/dist/esm/elements/is/SwcAppOl.js +0 -36
  387. package/dist/esm/elements/is/SwcAppOl.js.map +0 -7
  388. package/dist/esm/elements/is/SwcAppOptGroup.js +0 -36
  389. package/dist/esm/elements/is/SwcAppOptGroup.js.map +0 -7
  390. package/dist/esm/elements/is/SwcAppOption.js +0 -36
  391. package/dist/esm/elements/is/SwcAppOption.js.map +0 -7
  392. package/dist/esm/elements/is/SwcAppOutput.js +0 -36
  393. package/dist/esm/elements/is/SwcAppOutput.js.map +0 -7
  394. package/dist/esm/elements/is/SwcAppParagraph.js +0 -36
  395. package/dist/esm/elements/is/SwcAppParagraph.js.map +0 -7
  396. package/dist/esm/elements/is/SwcAppParam.js +0 -36
  397. package/dist/esm/elements/is/SwcAppParam.js.map +0 -7
  398. package/dist/esm/elements/is/SwcAppPicture.js +0 -36
  399. package/dist/esm/elements/is/SwcAppPicture.js.map +0 -7
  400. package/dist/esm/elements/is/SwcAppPre.js +0 -36
  401. package/dist/esm/elements/is/SwcAppPre.js.map +0 -7
  402. package/dist/esm/elements/is/SwcAppProgress.js +0 -36
  403. package/dist/esm/elements/is/SwcAppProgress.js.map +0 -7
  404. package/dist/esm/elements/is/SwcAppQuote.js +0 -36
  405. package/dist/esm/elements/is/SwcAppQuote.js.map +0 -7
  406. package/dist/esm/elements/is/SwcAppScript.js +0 -36
  407. package/dist/esm/elements/is/SwcAppScript.js.map +0 -7
  408. package/dist/esm/elements/is/SwcAppSelect.js +0 -36
  409. package/dist/esm/elements/is/SwcAppSelect.js.map +0 -7
  410. package/dist/esm/elements/is/SwcAppSlot.js +0 -36
  411. package/dist/esm/elements/is/SwcAppSlot.js.map +0 -7
  412. package/dist/esm/elements/is/SwcAppSource.js +0 -36
  413. package/dist/esm/elements/is/SwcAppSource.js.map +0 -7
  414. package/dist/esm/elements/is/SwcAppSpan.js +0 -36
  415. package/dist/esm/elements/is/SwcAppSpan.js.map +0 -7
  416. package/dist/esm/elements/is/SwcAppStyle.js +0 -36
  417. package/dist/esm/elements/is/SwcAppStyle.js.map +0 -7
  418. package/dist/esm/elements/is/SwcAppTable.js +0 -36
  419. package/dist/esm/elements/is/SwcAppTable.js.map +0 -7
  420. package/dist/esm/elements/is/SwcAppTableCell.js +0 -36
  421. package/dist/esm/elements/is/SwcAppTableCell.js.map +0 -7
  422. package/dist/esm/elements/is/SwcAppTableRow.js +0 -36
  423. package/dist/esm/elements/is/SwcAppTableRow.js.map +0 -7
  424. package/dist/esm/elements/is/SwcAppTableSection.js +0 -36
  425. package/dist/esm/elements/is/SwcAppTableSection.js.map +0 -7
  426. package/dist/esm/elements/is/SwcAppTemplate.js +0 -36
  427. package/dist/esm/elements/is/SwcAppTemplate.js.map +0 -7
  428. package/dist/esm/elements/is/SwcAppTextArea.js +0 -36
  429. package/dist/esm/elements/is/SwcAppTextArea.js.map +0 -7
  430. package/dist/esm/elements/is/SwcAppTime.js +0 -36
  431. package/dist/esm/elements/is/SwcAppTime.js.map +0 -7
  432. package/dist/esm/elements/is/SwcAppTitle.js +0 -36
  433. package/dist/esm/elements/is/SwcAppTitle.js.map +0 -7
  434. package/dist/esm/elements/is/SwcAppTrack.js +0 -36
  435. package/dist/esm/elements/is/SwcAppTrack.js.map +0 -7
  436. package/dist/esm/elements/is/SwcAppUl.js +0 -36
  437. package/dist/esm/elements/is/SwcAppUl.js.map +0 -7
  438. package/dist/esm/elements/is/SwcAppVideo.js +0 -36
  439. package/dist/esm/elements/is/SwcAppVideo.js.map +0 -7
  440. package/dist/esm/elements/is/index.js +0 -58
  441. package/dist/esm/elements/is/index.js.map +0 -7
  442. package/dist/types/elements/SwcApp.d.ts +0 -9
  443. package/dist/types/elements/SwcApp.d.ts.map +0 -1
  444. package/dist/types/elements/is/SwcAppAnchor.d.ts +0 -9
  445. package/dist/types/elements/is/SwcAppAnchor.d.ts.map +0 -1
  446. package/dist/types/elements/is/SwcAppArea.d.ts +0 -9
  447. package/dist/types/elements/is/SwcAppArea.d.ts.map +0 -1
  448. package/dist/types/elements/is/SwcAppAudio.d.ts +0 -9
  449. package/dist/types/elements/is/SwcAppAudio.d.ts.map +0 -1
  450. package/dist/types/elements/is/SwcAppBase.d.ts +0 -9
  451. package/dist/types/elements/is/SwcAppBase.d.ts.map +0 -1
  452. package/dist/types/elements/is/SwcAppBody.d.ts +0 -9
  453. package/dist/types/elements/is/SwcAppBody.d.ts.map +0 -1
  454. package/dist/types/elements/is/SwcAppButton.d.ts +0 -9
  455. package/dist/types/elements/is/SwcAppButton.d.ts.map +0 -1
  456. package/dist/types/elements/is/SwcAppCanvas.d.ts +0 -9
  457. package/dist/types/elements/is/SwcAppCanvas.d.ts.map +0 -1
  458. package/dist/types/elements/is/SwcAppData.d.ts +0 -9
  459. package/dist/types/elements/is/SwcAppData.d.ts.map +0 -1
  460. package/dist/types/elements/is/SwcAppDataList.d.ts +0 -9
  461. package/dist/types/elements/is/SwcAppDataList.d.ts.map +0 -1
  462. package/dist/types/elements/is/SwcAppDetails.d.ts +0 -9
  463. package/dist/types/elements/is/SwcAppDetails.d.ts.map +0 -1
  464. package/dist/types/elements/is/SwcAppDialog.d.ts +0 -9
  465. package/dist/types/elements/is/SwcAppDialog.d.ts.map +0 -1
  466. package/dist/types/elements/is/SwcAppDiv.d.ts +0 -9
  467. package/dist/types/elements/is/SwcAppDiv.d.ts.map +0 -1
  468. package/dist/types/elements/is/SwcAppDl.d.ts +0 -9
  469. package/dist/types/elements/is/SwcAppDl.d.ts.map +0 -1
  470. package/dist/types/elements/is/SwcAppEmbed.d.ts +0 -9
  471. package/dist/types/elements/is/SwcAppEmbed.d.ts.map +0 -1
  472. package/dist/types/elements/is/SwcAppFieldSet.d.ts +0 -9
  473. package/dist/types/elements/is/SwcAppFieldSet.d.ts.map +0 -1
  474. package/dist/types/elements/is/SwcAppForm.d.ts +0 -9
  475. package/dist/types/elements/is/SwcAppForm.d.ts.map +0 -1
  476. package/dist/types/elements/is/SwcAppHeading.d.ts +0 -9
  477. package/dist/types/elements/is/SwcAppHeading.d.ts.map +0 -1
  478. package/dist/types/elements/is/SwcAppHr.d.ts +0 -9
  479. package/dist/types/elements/is/SwcAppHr.d.ts.map +0 -1
  480. package/dist/types/elements/is/SwcAppIFrame.d.ts +0 -9
  481. package/dist/types/elements/is/SwcAppIFrame.d.ts.map +0 -1
  482. package/dist/types/elements/is/SwcAppImage.d.ts +0 -9
  483. package/dist/types/elements/is/SwcAppImage.d.ts.map +0 -1
  484. package/dist/types/elements/is/SwcAppInput.d.ts +0 -9
  485. package/dist/types/elements/is/SwcAppInput.d.ts.map +0 -1
  486. package/dist/types/elements/is/SwcAppLabel.d.ts +0 -9
  487. package/dist/types/elements/is/SwcAppLabel.d.ts.map +0 -1
  488. package/dist/types/elements/is/SwcAppLegend.d.ts +0 -9
  489. package/dist/types/elements/is/SwcAppLegend.d.ts.map +0 -1
  490. package/dist/types/elements/is/SwcAppLi.d.ts +0 -9
  491. package/dist/types/elements/is/SwcAppLi.d.ts.map +0 -1
  492. package/dist/types/elements/is/SwcAppLink.d.ts +0 -9
  493. package/dist/types/elements/is/SwcAppLink.d.ts.map +0 -1
  494. package/dist/types/elements/is/SwcAppMap.d.ts +0 -9
  495. package/dist/types/elements/is/SwcAppMap.d.ts.map +0 -1
  496. package/dist/types/elements/is/SwcAppMeta.d.ts +0 -9
  497. package/dist/types/elements/is/SwcAppMeta.d.ts.map +0 -1
  498. package/dist/types/elements/is/SwcAppMeter.d.ts +0 -9
  499. package/dist/types/elements/is/SwcAppMeter.d.ts.map +0 -1
  500. package/dist/types/elements/is/SwcAppMod.d.ts +0 -9
  501. package/dist/types/elements/is/SwcAppMod.d.ts.map +0 -1
  502. package/dist/types/elements/is/SwcAppObject.d.ts +0 -9
  503. package/dist/types/elements/is/SwcAppObject.d.ts.map +0 -1
  504. package/dist/types/elements/is/SwcAppOl.d.ts +0 -9
  505. package/dist/types/elements/is/SwcAppOl.d.ts.map +0 -1
  506. package/dist/types/elements/is/SwcAppOptGroup.d.ts +0 -9
  507. package/dist/types/elements/is/SwcAppOptGroup.d.ts.map +0 -1
  508. package/dist/types/elements/is/SwcAppOption.d.ts +0 -9
  509. package/dist/types/elements/is/SwcAppOption.d.ts.map +0 -1
  510. package/dist/types/elements/is/SwcAppOutput.d.ts +0 -9
  511. package/dist/types/elements/is/SwcAppOutput.d.ts.map +0 -1
  512. package/dist/types/elements/is/SwcAppParagraph.d.ts +0 -9
  513. package/dist/types/elements/is/SwcAppParagraph.d.ts.map +0 -1
  514. package/dist/types/elements/is/SwcAppParam.d.ts +0 -9
  515. package/dist/types/elements/is/SwcAppParam.d.ts.map +0 -1
  516. package/dist/types/elements/is/SwcAppPicture.d.ts +0 -9
  517. package/dist/types/elements/is/SwcAppPicture.d.ts.map +0 -1
  518. package/dist/types/elements/is/SwcAppPre.d.ts +0 -9
  519. package/dist/types/elements/is/SwcAppPre.d.ts.map +0 -1
  520. package/dist/types/elements/is/SwcAppProgress.d.ts +0 -9
  521. package/dist/types/elements/is/SwcAppProgress.d.ts.map +0 -1
  522. package/dist/types/elements/is/SwcAppQuote.d.ts +0 -9
  523. package/dist/types/elements/is/SwcAppQuote.d.ts.map +0 -1
  524. package/dist/types/elements/is/SwcAppScript.d.ts +0 -9
  525. package/dist/types/elements/is/SwcAppScript.d.ts.map +0 -1
  526. package/dist/types/elements/is/SwcAppSelect.d.ts +0 -9
  527. package/dist/types/elements/is/SwcAppSelect.d.ts.map +0 -1
  528. package/dist/types/elements/is/SwcAppSlot.d.ts +0 -9
  529. package/dist/types/elements/is/SwcAppSlot.d.ts.map +0 -1
  530. package/dist/types/elements/is/SwcAppSource.d.ts +0 -9
  531. package/dist/types/elements/is/SwcAppSource.d.ts.map +0 -1
  532. package/dist/types/elements/is/SwcAppSpan.d.ts +0 -9
  533. package/dist/types/elements/is/SwcAppSpan.d.ts.map +0 -1
  534. package/dist/types/elements/is/SwcAppStyle.d.ts +0 -9
  535. package/dist/types/elements/is/SwcAppStyle.d.ts.map +0 -1
  536. package/dist/types/elements/is/SwcAppTable.d.ts +0 -9
  537. package/dist/types/elements/is/SwcAppTable.d.ts.map +0 -1
  538. package/dist/types/elements/is/SwcAppTableCell.d.ts +0 -9
  539. package/dist/types/elements/is/SwcAppTableCell.d.ts.map +0 -1
  540. package/dist/types/elements/is/SwcAppTableRow.d.ts +0 -9
  541. package/dist/types/elements/is/SwcAppTableRow.d.ts.map +0 -1
  542. package/dist/types/elements/is/SwcAppTableSection.d.ts +0 -9
  543. package/dist/types/elements/is/SwcAppTableSection.d.ts.map +0 -1
  544. package/dist/types/elements/is/SwcAppTemplate.d.ts +0 -9
  545. package/dist/types/elements/is/SwcAppTemplate.d.ts.map +0 -1
  546. package/dist/types/elements/is/SwcAppTextArea.d.ts +0 -9
  547. package/dist/types/elements/is/SwcAppTextArea.d.ts.map +0 -1
  548. package/dist/types/elements/is/SwcAppTime.d.ts +0 -9
  549. package/dist/types/elements/is/SwcAppTime.d.ts.map +0 -1
  550. package/dist/types/elements/is/SwcAppTitle.d.ts +0 -9
  551. package/dist/types/elements/is/SwcAppTitle.d.ts.map +0 -1
  552. package/dist/types/elements/is/SwcAppTrack.d.ts +0 -9
  553. package/dist/types/elements/is/SwcAppTrack.d.ts.map +0 -1
  554. package/dist/types/elements/is/SwcAppUl.d.ts +0 -9
  555. package/dist/types/elements/is/SwcAppUl.d.ts.map +0 -1
  556. package/dist/types/elements/is/SwcAppVideo.d.ts +0 -9
  557. package/dist/types/elements/is/SwcAppVideo.d.ts.map +0 -1
  558. package/dist/types/elements/is/index.d.ts +0 -58
  559. package/dist/types/elements/is/index.d.ts.map +0 -1
  560. package/src/elements/SwcApp.ts +0 -26
  561. package/src/elements/is/SwcAppAnchor.ts +0 -26
  562. package/src/elements/is/SwcAppArea.ts +0 -26
  563. package/src/elements/is/SwcAppAudio.ts +0 -26
  564. package/src/elements/is/SwcAppBase.ts +0 -26
  565. package/src/elements/is/SwcAppBody.ts +0 -26
  566. package/src/elements/is/SwcAppButton.ts +0 -26
  567. package/src/elements/is/SwcAppCanvas.ts +0 -26
  568. package/src/elements/is/SwcAppData.ts +0 -26
  569. package/src/elements/is/SwcAppDataList.ts +0 -26
  570. package/src/elements/is/SwcAppDetails.ts +0 -26
  571. package/src/elements/is/SwcAppDialog.ts +0 -26
  572. package/src/elements/is/SwcAppDiv.ts +0 -26
  573. package/src/elements/is/SwcAppDl.ts +0 -26
  574. package/src/elements/is/SwcAppEmbed.ts +0 -26
  575. package/src/elements/is/SwcAppFieldSet.ts +0 -26
  576. package/src/elements/is/SwcAppForm.ts +0 -26
  577. package/src/elements/is/SwcAppHeading.ts +0 -26
  578. package/src/elements/is/SwcAppHr.ts +0 -26
  579. package/src/elements/is/SwcAppIFrame.ts +0 -26
  580. package/src/elements/is/SwcAppImage.ts +0 -26
  581. package/src/elements/is/SwcAppInput.ts +0 -26
  582. package/src/elements/is/SwcAppLabel.ts +0 -26
  583. package/src/elements/is/SwcAppLegend.ts +0 -26
  584. package/src/elements/is/SwcAppLi.ts +0 -26
  585. package/src/elements/is/SwcAppLink.ts +0 -26
  586. package/src/elements/is/SwcAppMap.ts +0 -26
  587. package/src/elements/is/SwcAppMeta.ts +0 -26
  588. package/src/elements/is/SwcAppMeter.ts +0 -26
  589. package/src/elements/is/SwcAppMod.ts +0 -26
  590. package/src/elements/is/SwcAppObject.ts +0 -26
  591. package/src/elements/is/SwcAppOl.ts +0 -26
  592. package/src/elements/is/SwcAppOptGroup.ts +0 -26
  593. package/src/elements/is/SwcAppOption.ts +0 -26
  594. package/src/elements/is/SwcAppOutput.ts +0 -26
  595. package/src/elements/is/SwcAppParagraph.ts +0 -26
  596. package/src/elements/is/SwcAppParam.ts +0 -26
  597. package/src/elements/is/SwcAppPicture.ts +0 -26
  598. package/src/elements/is/SwcAppPre.ts +0 -26
  599. package/src/elements/is/SwcAppProgress.ts +0 -26
  600. package/src/elements/is/SwcAppQuote.ts +0 -26
  601. package/src/elements/is/SwcAppScript.ts +0 -26
  602. package/src/elements/is/SwcAppSelect.ts +0 -26
  603. package/src/elements/is/SwcAppSlot.ts +0 -26
  604. package/src/elements/is/SwcAppSource.ts +0 -26
  605. package/src/elements/is/SwcAppSpan.ts +0 -26
  606. package/src/elements/is/SwcAppStyle.ts +0 -26
  607. package/src/elements/is/SwcAppTable.ts +0 -26
  608. package/src/elements/is/SwcAppTableCell.ts +0 -26
  609. package/src/elements/is/SwcAppTableRow.ts +0 -26
  610. package/src/elements/is/SwcAppTableSection.ts +0 -26
  611. package/src/elements/is/SwcAppTemplate.ts +0 -26
  612. package/src/elements/is/SwcAppTextArea.ts +0 -26
  613. package/src/elements/is/SwcAppTime.ts +0 -26
  614. package/src/elements/is/SwcAppTitle.ts +0 -26
  615. package/src/elements/is/SwcAppTrack.ts +0 -26
  616. package/src/elements/is/SwcAppUl.ts +0 -26
  617. package/src/elements/is/SwcAppVideo.ts +0 -26
  618. package/src/elements/is/index.ts +0 -57
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/elements/SwcAppEngine.ts"],
4
- "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { ElementRouter } from '../router/ElementRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\nimport { ConstructorType, Optional } from '@dooboostore/core/types';\nimport { FunctionUtils } from '@dooboostore/core/function/FunctionUtils';\n\nexport type SwcConfigType = {\n rootRouter: ConstructorType<any>;\n routeType: 'path' | 'hash' | 'element';\n path?: string;\n window: Window;\n};\n\nexport type SwcAttributeConfigType = Optional<SwcConfigType, 'routeType' | 'window'>;\n\nexport class SwcAppEngine {\n public simpleApplication?: SimpleApplication;\n public router?: Router;\n private routerSubscription?: Subscription;\n private _isInitialized = false;\n\n constructor(private host: HTMLElement) {}\n\n async connect() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Wait for event loop to ensure attributes and global scripts are ready\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const configStr = this.host.getAttribute('swc-get-application-config');\n if (!configStr) return;\n\n try {\n const userConfig: SwcAttributeConfigType = FunctionUtils.executeReturn({ script: configStr, context: this.host });\n if (userConfig && userConfig.rootRouter) {\n const _config: SwcConfigType = {\n routeType: 'element',\n window: window,\n ...userConfig\n } as SwcConfigType;\n\n // Router Selection\n if (_config.routeType === 'path') {\n this.router = new PathRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'hash') {\n this.router = new HashRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'element') {\n this.router = new ElementRouter({ window: _config.window, firstUrl: _config.path });\n }\n\n // Routing sync\n if (this.router) {\n this.routerSubscription = this.router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.simpleApplication?.routing(route.path);\n }\n });\n }\n\n // App start\n this.simpleApplication = new SimpleApplication(new SimOption({ excludeProxys: [Node], rootRouter: _config.rootRouter }));\n\n const otherInstanceSim = new Map<any, any>();\n if (this.router) otherInstanceSim.set(Router, this.router);\n this.simpleApplication.run(otherInstanceSim);\n\n // Rendering\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.host.shadowRoot) this.host.shadowRoot.replaceChildren(data);\n else this.host.replaceChildren(data);\n }\n\n if (_config.path) await this.router?.go(_config.path);\n }\n } catch (e) {\n console.error('[SWC-APP-ENGINE] Init failed:', e);\n }\n }\n\n disconnect() {\n this.routerSubscription?.unsubscribe();\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAkC;AAClC,wBAA2B;AAC3B,wBAA2B;AAC3B,2BAA8B;AAC9B,uBAA0B;AAC1B,oBAAwC;AAGxC,2BAA8B;AAWvB,MAAM,aAAa;AAAA,EAMxB,YAAoB,MAAmB;AAAnB;AAFpB,SAAQ,iBAAiB;AAAA,EAEe;AAAA,EAExC,MAAM,UAAU;AACd,QAAI,KAAK,eAAgB;AACzB,SAAK,iBAAiB;AAGtB,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,CAAC,CAAC;AAEnD,UAAM,YAAY,KAAK,KAAK,aAAa,4BAA4B;AACrE,QAAI,CAAC,UAAW;AAEhB,QAAI;AACF,YAAM,aAAqC,mCAAc,cAAc,EAAE,QAAQ,WAAW,SAAS,KAAK,KAAK,CAAC;AAChH,UAAI,cAAc,WAAW,YAAY;AACvC,cAAM,UAAyB;AAAA,UAC7B,WAAW;AAAA,UACX;AAAA,UACA,GAAG;AAAA,QACL;AAGA,YAAI,QAAQ,cAAc,QAAQ;AAChC,eAAK,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,KAAK,CAAC;AAAA,QACjF,WAAW,QAAQ,cAAc,QAAQ;AACvC,eAAK,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,KAAK,CAAC;AAAA,QACjF,WAAW,QAAQ,cAAc,WAAW;AAC1C,eAAK,SAAS,IAAI,mCAAc,EAAE,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,KAAK,CAAC;AAAA,QACpF;AAGA,YAAI,KAAK,QAAQ;AACf,eAAK,qBAAqB,KAAK,OAAO,WAAW,UAAU,CAAC,UAA2B;AACrF,gBAAI,MAAM,iBAAiB,OAAO;AAChC,mBAAK,mBAAmB,QAAQ,MAAM,IAAI;AAAA,YAC5C;AAAA,UACF,CAAC;AAAA,QACH;AAGA,aAAK,oBAAoB,IAAI,2CAAkB,IAAI,2BAAU,EAAE,eAAe,CAAC,IAAI,GAAG,YAAY,QAAQ,WAAW,CAAC,CAAC;AAEvH,cAAM,mBAAmB,oBAAI,IAAc;AAC3C,YAAI,KAAK,OAAQ,kBAAiB,IAAI,sBAAQ,KAAK,MAAM;AACzD,aAAK,kBAAkB,IAAI,gBAAgB;AAG3C,cAAM,OAAO,KAAK,kBAAkB,IAAI,QAAQ,UAAU;AAC1D,YAAI,gBAAgB,MAAM;AACxB,cAAI,KAAK,KAAK,WAAY,MAAK,KAAK,WAAW,gBAAgB,IAAI;AAAA,cAC9D,MAAK,KAAK,gBAAgB,IAAI;AAAA,QACrC;AAEA,YAAI,QAAQ,KAAM,OAAM,KAAK,QAAQ,GAAG,QAAQ,IAAI;AAAA,MACtD;AAAA,IACF,SAAS,GAAG;AACV,cAAQ,MAAM,iCAAiC,CAAC;AAAA,IAClD;AAAA,EACF;AAAA,EAEA,aAAa;AACX,SAAK,oBAAoB,YAAY;AAAA,EACvC;AACF;",
6
- "names": []
4
+ "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { PathRouter } from '@dooboostore/core-web';\nimport { HashRouter } from '@dooboostore/core-web';\nimport { ElementRouter } from '../router/ElementRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { Router, RouterEventType } from '@dooboostore/core-web';\nimport { Subscription } from '@dooboostore/core';\nimport { ConstructorType, OptionalType } from '@dooboostore/core';\nimport { FunctionUtils } from '@dooboostore/core';\nimport { SwcUtils } from '../utils/Utils';\n\nexport type SwcConfigType = {\n rootRouter: ConstructorType<any> | symbol;\n routeType: 'path' | 'hash' | 'element';\n connectMode?: 'direct' | 'swap';\n path?: string;\n window: Window;\n};\n\nexport type SwcAttributeConfigType = OptionalType<SwcConfigType, 'routeType' | 'window'>;\n\nexport class SwcAppEngine {\n public simpleApplication?: SimpleApplication;\n public router?: Router;\n private routerSubscription?: Subscription;\n private _isInitialized = false;\n\n constructor(private host: HTMLElement) {}\n\n async connect(config?: SwcAttributeConfigType) {\n if (this._isInitialized) return;\n\n let userConfig = config;\n const win = this.host.ownerDocument?.defaultView || window;\n const Node = (win as any).Node as typeof globalThis.Node;\n if (!userConfig) {\n const configStr = this.host.getAttribute('swc-get-application-config');\n if (configStr) {\n try {\n userConfig = FunctionUtils.executeReturn({\n script: configStr,\n context: this.host,\n args: SwcUtils.getHelperAndHostSet(win, this.host)\n });\n } catch (e) {\n console.error('[SWC-APP-ENGINE] Script execution failed:', e);\n }\n }\n }\n\n if (!userConfig) return;\n this._isInitialized = true;\n\n try {\n if (userConfig.rootRouter) {\n const _config: SwcConfigType = {\n routeType: 'element',\n window: win,\n ...userConfig\n } as SwcConfigType;\n\n // Router Selection\n if (_config.routeType === 'path') {\n this.router = new PathRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'hash') {\n this.router = new HashRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'element') {\n this.router = new ElementRouter({ window: _config.window, firstUrl: _config.path });\n }\n\n // Routing sync\n if (this.router) {\n this.routerSubscription = this.router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.simpleApplication?.routing(route.path);\n }\n });\n }\n\n\n // App start\n this.simpleApplication = new SimpleApplication(new SimOption({ excludeProxys: [Node], rootRouter: _config.rootRouter }));\n\n const otherInstanceSim = new Map<any, any>();\n if (this.router) otherInstanceSim.set(Router, this.router);\n this.simpleApplication.run(otherInstanceSim);\n\n // Rendering\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.host.shadowRoot) this.host.shadowRoot.replaceChildren(data);\n else this.host.replaceChildren(data);\n }\n\n if (_config.path) this.router?.go(_config.path);\n }\n } catch (e) {\n console.error('[SWC-APP-ENGINE] Init failed:', e);\n }\n }\n\n disconnect() {\n this.routerSubscription?.unsubscribe();\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAAkC;AAClC,sBAA2B;AAC3B,IAAAA,mBAA2B;AAC3B,2BAA8B;AAC9B,uBAA0B;AAC1B,IAAAA,mBAAwC;AAGxC,IAAAC,eAA8B;AAC9B,mBAAyB;AAYlB,MAAM,aAAa;AAAA,EAMxB,YAAoB,MAAmB;AAAnB;AAFpB,SAAQ,iBAAiB;AAAA,EAEe;AAAA,EAExC,MAAM,QAAQ,QAAiC;AAC7C,QAAI,KAAK,eAAgB;AAEzB,QAAI,aAAa;AACjB,UAAM,MAAM,KAAK,KAAK,eAAe,eAAe;AACpD,UAAM,OAAQ,IAAY;AAC1B,QAAI,CAAC,YAAY;AACf,YAAM,YAAY,KAAK,KAAK,aAAa,4BAA4B;AACrE,UAAI,WAAW;AACb,YAAI;AACF,uBAAa,2BAAc,cAAc;AAAA,YACvC,QAAQ;AAAA,YACR,SAAS,KAAK;AAAA,YACd,MAAM,sBAAS,oBAAoB,KAAK,KAAK,IAAI;AAAA,UACnD,CAAC;AAAA,QACH,SAAS,GAAG;AACV,kBAAQ,MAAM,6CAA6C,CAAC;AAAA,QAC9D;AAAA,MACF;AAAA,IACF;AAEA,QAAI,CAAC,WAAY;AACjB,SAAK,iBAA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Q,MAAM,iCAAiC,CAAC;AAAA,IAClD;AAAA,EACF;AAAA,EAEA,aAAa;AACX,SAAK,oBAAoB,YAAY;AAAA,EACvC;AACF;",
6
+ "names": ["import_core_web", "import_core"]
7
7
  }
@@ -0,0 +1,79 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var SwcAppMixin_exports = {};
19
+ __export(SwcAppMixin_exports, {
20
+ SwcAppMixin: () => SwcAppMixin
21
+ });
22
+ module.exports = __toCommonJS(SwcAppMixin_exports);
23
+ var import_SwcAppEngine = require("./SwcAppEngine");
24
+ function SwcAppMixin(Base) {
25
+ return class extends Base {
26
+ constructor() {
27
+ super(...arguments);
28
+ this.__swc_engine = new import_SwcAppEngine.SwcAppEngine(this);
29
+ }
30
+ get simpleApplication() {
31
+ return this.__swc_engine.simpleApplication;
32
+ }
33
+ get router() {
34
+ return this.__swc_engine.router;
35
+ }
36
+ async connect(config) {
37
+ const mode = config?.connectMode || "direct";
38
+ if (mode !== "swap") {
39
+ await this.__swc_engine.connect(config);
40
+ this.setAttribute("swc-connect-mode", "direct");
41
+ return;
42
+ }
43
+ const parent = this.parentNode;
44
+ if (!parent) {
45
+ await this.__swc_engine.connect(config);
46
+ this.setAttribute("swc-connect-mode", "direct");
47
+ return;
48
+ }
49
+ const clonedApp = this.cloneNode(true);
50
+ clonedApp.style.display = "none";
51
+ parent.insertBefore(clonedApp, this.nextSibling);
52
+ try {
53
+ await clonedApp.connect({ ...config || {}, connectMode: "direct" });
54
+ if (this.parentNode) {
55
+ this.parentNode.removeChild(this);
56
+ }
57
+ clonedApp.setAttribute("swc-connect-mode", "swap");
58
+ clonedApp.style.display = "";
59
+ } catch (e) {
60
+ if (clonedApp.parentNode) {
61
+ clonedApp.parentNode.removeChild(clonedApp);
62
+ }
63
+ throw e;
64
+ }
65
+ }
66
+ connectedCallback() {
67
+ if (super.connectedCallback) super.connectedCallback();
68
+ this.connect();
69
+ }
70
+ disconnectedCallback() {
71
+ if (super.disconnectedCallback) super.disconnectedCallback();
72
+ this.__swc_engine.disconnect();
73
+ }
74
+ async routing(path) {
75
+ await this.__swc_engine.router?.go(path);
76
+ }
77
+ };
78
+ }
79
+ //# sourceMappingURL=SwcAppMixin.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/elements/SwcAppMixin.ts"],
4
+ "sourcesContent": ["import { SwcAppEngine, SwcAttributeConfigType } from './SwcAppEngine';\n\nexport function SwcAppMixin<T extends { new (...args: any[]): HTMLElement }>(Base: T) {\n return class extends Base {\n __swc_engine = new SwcAppEngine(this as any);\n\n get simpleApplication() {\n return this.__swc_engine.simpleApplication;\n }\n get router() {\n return this.__swc_engine.router;\n }\n\n async connect(config?: SwcAttributeConfigType) {\n const mode = config?.connectMode || 'direct';\n\n if (mode !== 'swap') {\n await this.__swc_engine.connect(config);\n this.setAttribute('swc-connect-mode', 'direct');\n return;\n }\n\n const parent = this.parentNode;\n if (!parent) {\n await this.__swc_engine.connect(config);\n this.setAttribute('swc-connect-mode', 'direct');\n return;\n }\n\n const clonedApp = this.cloneNode(true) as any;\n clonedApp.style.display = 'none';\n parent.insertBefore(clonedApp, this.nextSibling);\n\n try {\n await clonedApp.connect({ ...(config || {}), connectMode: 'direct' });\n if (this.parentNode) {\n this.parentNode.removeChild(this);\n }\n clonedApp.setAttribute('swc-connect-mode', 'swap');\n clonedApp.style.display = '';\n } catch (e) {\n if (clonedApp.parentNode) {\n clonedApp.parentNode.removeChild(clonedApp);\n }\n throw e;\n }\n }\n\n connectedCallback() {\n // @ts-ignore\n if (super.connectedCallback) super.connectedCallback();\n this.connect();\n }\n\n disconnectedCallback() {\n // @ts-ignore\n if (super.disconnectedCallback) super.disconnectedCallback();\n this.__swc_engine.disconnect();\n }\n\n async routing(path: string) {\n await this.__swc_engine.router?.go(path);\n }\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAqD;AAE9C,SAAS,YAA6D,MAAS;AACpF,SAAO,cAAc,KAAK;AAAA,IAAnB;AAAA;AACL,0BAAe,IAAI,iCAAa,IAAW;AAAA;AAAA,IAE3C,IAAI,oBAAoB;AACtB,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,IACA,IAAI,SAAS;AACX,aAAO,KAAK,aAAa;AAAA,IAC3B;AAAA,IAEA,MAAM,QAAQ,QAAiC;AAC7C,YAAM,OAAO,QAAQ,eAAe;AAEpC,UAAI,SAAS,QAAQ;AACnB,cAAM,KAAK,aAAa,QAAQ,MAAM;AACtC,aAAK,aAAa,oBAAoB,QAAQ;AAC9C;AAAA,MACF;AAEA,YAAM,SAAS,KAAK;AACpB,UAAI,CAAC,QAAQ;AACX,cAAM,KAAK,aAAa,QAAQ,MAAM;AACtC,aAAK,aAAa,oBAAoB,QAAQ;AAC9C;AAAA,MACF;AAEA,YAAM,YAAY,KAAK,UAAU,IAAI;AACrC,gBAAU,MAAM,UAAU;AAC1B,aAAO,aAAa,WAAW,KAAK,WAAW;AAE/C,UAAI;AACF,cAAM,UAAU,QAAQ,EAAE,GAAI,UAAU,CAAC,GAAI,aAAa,SAAS,CAAC;AACpE,YAAI,KAAK,YAAY;AACnB,eAAK,WAAW,YAAY,IAAI;AAAA,QAClC;AACA,kBAAU,aAAa,oBAAoB,MAAM;AACjD,kBAAU,MAAM,UAAU;AAAA,MAC5B,SAAS,GAAG;AACV,YAAI,UAAU,YAAY;AACxB,oBAAU,WAAW,YAAY,SAAS;AAAA,QAC5C;AACA,cAAM;AAAA,MACR;AAAA,IACF;AAAA,IAEA,oBAAoB;AAElB,UAAI,MAAM,kBAAmB,OAAM,kBAAkB;AACrD,WAAK,QAAQ;AAAA,IACf;AAAA,IAEA,uBAAuB;AAErB,UAAI,MAAM,qBAAsB,OAAM,qBAAqB;AAC3D,WAAK,aAAa,WAAW;AAAA,IAC/B;AAAA,IAEA,MAAM,QAAQ,MAAc;AAC1B,YAAM,KAAK,aAAa,QAAQ,GAAG,IAAI;AAAA,IACzC;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -20,10 +20,9 @@ __export(SwcAsync_exports, {
20
20
  SwcAsync: () => SwcAsync
21
21
  });
22
22
  module.exports = __toCommonJS(SwcAsync_exports);
23
- var import_elementDefine = require("../decorators/elementDefine");
24
23
  var import_changedAttribute = require("../decorators/changedAttribute");
25
24
  var import_Utils = require("../utils/Utils");
26
- var import_FunctionUtils = require("@dooboostore/core/function/FunctionUtils");
25
+ var import_core = require("@dooboostore/core");
27
26
  var __decorate = function(decorators, target, key, desc) {
28
27
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29
28
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -33,140 +32,79 @@ var __decorate = function(decorators, target, key, desc) {
33
32
  var __metadata = function(k, v) {
34
33
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
35
34
  };
36
- let SwcAsync = class SwcAsync2 extends HTMLTemplateElement {
35
+ class SwcAsync extends HTMLTemplateElement {
37
36
  constructor() {
38
37
  super(...arguments);
39
38
  this._nodes = [];
40
- this._currentPromise = null;
41
39
  this._value = null;
42
40
  }
43
- get value() {
44
- return this._value;
45
- }
46
- set value(nv) {
47
- if (nv instanceof Promise) {
48
- this.handlePromise(nv);
49
- } else {
50
- this._value = nv;
51
- this.render(nv === null ? "default" : "success", nv);
52
- }
41
+ _resolvePortal() {
42
+ const portalScript = this.getAttribute("on-get-portal");
43
+ if (!portalScript)
44
+ return this.parentElement;
45
+ const win = this.ownerDocument?.defaultView || window;
46
+ const res = import_core.FunctionUtils.executeReturn({
47
+ script: portalScript,
48
+ context: this,
49
+ args: import_Utils.SwcUtils.getHelperAndHostSet(win, this)
50
+ });
51
+ if (res instanceof HTMLElement)
52
+ return res;
53
+ if (typeof res === "string")
54
+ return win.document.querySelector(res);
55
+ return this.parentElement;
53
56
  }
54
- refresh(newValue) {
55
- const script = newValue !== void 0 ? newValue : this.getAttribute("on-get-value");
56
- if (!script) {
57
- this.value = null;
58
- return;
59
- }
60
- if (!this.parentElement)
57
+ _executeCloneCallback(attr, args) {
58
+ const script = this.getAttribute(attr);
59
+ if (!script)
61
60
  return;
62
- const helperHostSet = import_Utils.SwcUtils.getHelperAndHostSet(window, this);
63
- try {
64
- const result = import_FunctionUtils.FunctionUtils.executeReturn({
65
- script,
66
- context: this,
67
- args: helperHostSet
68
- });
69
- if (result instanceof Promise) {
70
- this.handlePromise(result);
71
- } else {
72
- this.value = result;
73
- }
74
- } catch (e) {
75
- this.render("error", e);
76
- }
61
+ import_core.FunctionUtils.execute({ script, context: this, args });
77
62
  }
78
- async handlePromise(promise) {
79
- this._currentPromise = promise;
80
- this.render("loading");
81
- try {
82
- const result = await promise;
83
- if (this._currentPromise !== promise)
84
- return;
63
+ refresh() {
64
+ const script = this.getAttribute("on-get-value");
65
+ if (!script)
66
+ return;
67
+ const win = this.ownerDocument?.defaultView || window;
68
+ const result = import_core.FunctionUtils.executeReturn({ script, context: this, args: import_Utils.SwcUtils.getHelperAndHostSet(win, this) });
69
+ if (result instanceof Promise) {
70
+ this.render("loading");
71
+ result.then((v) => {
72
+ this._value = v;
73
+ this.render("success");
74
+ }).catch((e) => this.render("error"));
75
+ } else {
85
76
  this._value = result;
86
- this.render("success", result);
87
- } catch (e) {
88
- if (this._currentPromise !== promise)
89
- return;
90
- this.render("error", e);
77
+ this.render("success");
91
78
  }
92
79
  }
93
- render(state, data) {
80
+ render(state) {
94
81
  this.cleanup();
95
- if (!this.parentElement)
82
+ const portal = this._resolvePortal();
83
+ if (!portal)
96
84
  return;
97
- let fragment;
98
- const ctx = {
99
- $nodes: [],
100
- $elements: [],
101
- $state: state,
102
- $value: null,
103
- $error: null
104
- };
105
- if (state === "default") {
106
- const t = this.content.querySelector('template[is="swc-default"]');
107
- fragment = t ? t.content.cloneNode(true) : document.createDocumentFragment();
108
- } else if (state === "loading") {
109
- const t = this.content.querySelector('template[is="swc-loading"]');
110
- fragment = t ? t.content.cloneNode(true) : document.createDocumentFragment();
111
- } else if (state === "error") {
112
- const t = this.content.querySelector('template[is="swc-error"]');
113
- ctx.$error = data;
114
- fragment = t ? t.content.cloneNode(true) : document.createDocumentFragment();
115
- } else {
116
- const t = this.content.querySelector('template[is="swc-success"]');
117
- ctx.$value = data;
118
- if (t) {
119
- fragment = t.content.cloneNode(true);
85
+ const win = this.ownerDocument?.defaultView || window;
86
+ const helperSet = import_Utils.SwcUtils.getHelperAndHostSet(win, this);
87
+ const t = this.content.querySelector(`template[is="swc-${state}"]`);
88
+ if (t) {
89
+ const clone = t.content.cloneNode(true);
90
+ this._nodes = Array.from(clone.childNodes);
91
+ const elements = this._nodes.filter((n) => n.nodeType === 1);
92
+ const groupArgs = { ...helperSet, $value: this._value, $nodes: this._nodes, $elements: elements, $firstElement: elements[0], $state: state };
93
+ this._nodes.forEach((n, nodeIdx) => {
94
+ if (n instanceof HTMLElement)
95
+ n.__swc_host = this;
96
+ this._executeCloneCallback("on-clone-node", { ...groupArgs, $node: n, $nodeIndex: nodeIdx, $isElement: n.nodeType === 1 });
97
+ });
98
+ this._executeCloneCallback("on-clone-nodes", groupArgs);
99
+ if (portal === this.parentElement) {
100
+ portal.insertBefore(clone, this.nextSibling);
120
101
  } else {
121
- const clone = this.content.cloneNode(true);
122
- Array.from(clone.querySelectorAll('template[is="swc-loading"], template[is="swc-error"], template[is="swc-success"], template[is="swc-default"]')).forEach((tmp) => tmp.remove());
123
- fragment = clone;
102
+ portal.appendChild(clone);
124
103
  }
125
104
  }
126
- this.mount(fragment, ctx);
127
- }
128
- mount(fragment, ctx) {
129
- const nodes = Array.from(fragment.childNodes);
130
- const elements = nodes.filter((n) => n.nodeType === 1);
131
- Object.assign(ctx, {
132
- $nodes: nodes,
133
- $elements: elements,
134
- $firstNode: nodes[0],
135
- $lastNode: nodes[nodes.length - 1],
136
- $firstElement: elements[0],
137
- $lastElement: elements[elements.length - 1]
138
- });
139
- this._executeCallback("on-clone-nodes", ctx);
140
- nodes.forEach((node, nodeIndex) => {
141
- if (node instanceof HTMLElement) {
142
- node.__swc_host = this;
143
- }
144
- this._executeCallback("on-clone-node", {
145
- ...ctx,
146
- $node: node,
147
- $nodeIndex: nodeIndex,
148
- $isElement: node.nodeType === 1
149
- });
150
- });
151
- this._nodes = nodes;
152
- this.parentElement?.insertBefore(fragment, this.nextSibling);
153
- }
154
- _executeCallback(attrName, extraArgs) {
155
- const script = this.getAttribute(attrName);
156
- if (!script)
157
- return;
158
- const helperHostSet = import_Utils.SwcUtils.getHelperAndHostSet(window, this);
159
- try {
160
- import_FunctionUtils.FunctionUtils.execute({ script, context: this, args: { ...helperHostSet, ...extraArgs } });
161
- } catch (e) {
162
- console.error(`[SwcAsync] Error in ${attrName}:`, e);
163
- }
164
105
  }
165
106
  cleanup() {
166
- this._nodes.forEach((n) => {
167
- if (n.parentElement)
168
- n.parentElement.removeChild(n);
169
- });
107
+ this._nodes.forEach((n) => n.parentElement?.removeChild(n));
170
108
  this._nodes = [];
171
109
  }
172
110
  connectedCallback() {
@@ -175,14 +113,11 @@ let SwcAsync = class SwcAsync2 extends HTMLTemplateElement {
175
113
  disconnectedCallback() {
176
114
  this.cleanup();
177
115
  }
178
- };
116
+ }
179
117
  __decorate([
180
118
  (0, import_changedAttribute.changedAttribute)("on-get-value"),
181
119
  __metadata("design:type", Function),
182
- __metadata("design:paramtypes", [String]),
120
+ __metadata("design:paramtypes", []),
183
121
  __metadata("design:returntype", void 0)
184
122
  ], SwcAsync.prototype, "refresh", null);
185
- SwcAsync = __decorate([
186
- (0, import_elementDefine.elementDefine)({ name: "swc-async", extends: "template" })
187
- ], SwcAsync);
188
123
  //# sourceMappingURL=SwcAsync.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/elements/SwcAsync.ts"],
4
- "sourcesContent": ["import { elementDefine } from '../decorators/elementDefine';\nimport { changedAttribute } from '../decorators/changedAttribute';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core/function/FunctionUtils';\nimport { SwcLoading, SwcError, SwcSuccess, SwcDefault } from './SwcSubTemplates';\n\n@elementDefine({ name: 'swc-async', extends: 'template' })\nexport class SwcAsync extends HTMLTemplateElement {\n private _nodes: Node[] = [];\n private _currentPromise: Promise<any> | null = null;\n private _value: any = null;\n\n get value(): any {\n return this._value;\n }\n\n set value(nv: any) {\n if (nv instanceof Promise) {\n this.handlePromise(nv);\n } else {\n this._value = nv;\n this.render(nv === null ? 'default' : 'success', nv);\n }\n }\n\n @changedAttribute('on-get-value')\n private refresh(newValue?: string | null) {\n const script = newValue !== undefined ? newValue : this.getAttribute('on-get-value');\n if (!script) {\n this.value = null; // Triggers default render\n return;\n }\n if (!this.parentElement) return;\n\n const helperHostSet = SwcUtils.getHelperAndHostSet(window, this);\n try {\n const result = FunctionUtils.executeReturn({\n script,\n context: this,\n args: helperHostSet\n });\n\n if (result instanceof Promise) {\n this.handlePromise(result);\n } else {\n this.value = result;\n }\n } catch (e) {\n this.render('error', e);\n }\n }\n\n private async handlePromise(promise: Promise<any>) {\n this._currentPromise = promise;\n this.render('loading');\n\n try {\n const result = await promise;\n if (this._currentPromise !== promise) return;\n this._value = result;\n this.render('success', result);\n } catch (e) {\n if (this._currentPromise !== promise) return;\n this.render('error', e);\n }\n }\n\n private render(state: 'loading' | 'error' | 'success' | 'default', data?: any) {\n this.cleanup();\n if (!this.parentElement) return;\n\n let fragment: DocumentFragment;\n const ctx: any = {\n $nodes: [],\n $elements: [],\n $state: state,\n $value: null,\n $error: null\n };\n\n if (state === 'default') {\n const t = this.content.querySelector('template[is=\"swc-default\"]') as HTMLTemplateElement;\n fragment = t ? (t.content.cloneNode(true) as DocumentFragment) : document.createDocumentFragment();\n } else if (state === 'loading') {\n const t = this.content.querySelector('template[is=\"swc-loading\"]') as HTMLTemplateElement;\n fragment = t ? (t.content.cloneNode(true) as DocumentFragment) : document.createDocumentFragment();\n } else if (state === 'error') {\n const t = this.content.querySelector('template[is=\"swc-error\"]') as HTMLTemplateElement;\n ctx.$error = data;\n fragment = t ? (t.content.cloneNode(true) as DocumentFragment) : document.createDocumentFragment();\n } else {\n // Success\n const t = this.content.querySelector('template[is=\"swc-success\"]') as HTMLTemplateElement;\n ctx.$value = data;\n if (t) {\n fragment = t.content.cloneNode(true) as DocumentFragment;\n } else {\n const clone = this.content.cloneNode(true) as DocumentFragment;\n Array.from(clone.querySelectorAll('template[is=\"swc-loading\"], template[is=\"swc-error\"], template[is=\"swc-success\"], template[is=\"swc-default\"]')).forEach(tmp => tmp.remove());\n fragment = clone;\n }\n }\n\n this.mount(fragment, ctx);\n }\n\n private mount(fragment: DocumentFragment, ctx: any) {\n const nodes = Array.from(fragment.childNodes);\n const elements = nodes.filter(n => n.nodeType === 1) as HTMLElement[];\n\n Object.assign(ctx, {\n $nodes: nodes,\n $elements: elements,\n $firstNode: nodes[0],\n $lastNode: nodes[nodes.length - 1],\n $firstElement: elements[0],\n $lastElement: elements[elements.length - 1]\n });\n\n // Execution Callbacks\n this._executeCallback('on-clone-nodes', ctx);\n nodes.forEach((node, nodeIndex) => {\n if (node instanceof HTMLElement) {\n (node as any).__swc_host = this;\n }\n this._executeCallback('on-clone-node', {\n ...ctx,\n $node: node,\n $nodeIndex: nodeIndex,\n $isElement: node.nodeType === 1\n });\n });\n\n this._nodes = nodes;\n this.parentElement?.insertBefore(fragment, this.nextSibling);\n }\n\n private _executeCallback(attrName: string, extraArgs: Record<string, any>) {\n const script = this.getAttribute(attrName);\n if (!script) return;\n const helperHostSet = SwcUtils.getHelperAndHostSet(window, this);\n try {\n FunctionUtils.execute({ script, context: this, args: { ...helperHostSet, ...extraArgs } });\n } catch (e) {\n console.error(`[SwcAsync] Error in ${attrName}:`, e);\n }\n }\n\n private cleanup() {\n this._nodes.forEach(n => {\n if (n.parentElement) n.parentElement.removeChild(n);\n });\n this._nodes = [];\n }\n\n connectedCallback() {\n this.refresh();\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA8B;AAC9B,8BAAiC;AACjC,mBAAyB;AACzB,2BAA8B;;;;;;;;;;AAIvB,IAAM,WAAN,MAAMA,kBAAiB,oBAAmB;EAA1C,cAAA;;AACG,SAAA,SAAiB,CAAA;AACjB,SAAA,kBAAuC;AACvC,SAAA,SAAc;EAwJxB;EAtJE,IAAI,QAAK;AACP,WAAO,KAAK;EACd;EAEA,IAAI,MAAM,IAAO;AACf,QAAI,cAAc,SAAS;AACzB,WAAK,cAAc,EAAE;IACvB,OAAO;AACL,WAAK,SAAS;AACd,WAAK,OAAO,OAAO,OAAO,YAAY,WAAW,EAAE;IACrD;EACF;EAGQ,QAAQ,UAAwB;AACtC,UAAM,SAAS,aAAa,SAAY,WAAW,KAAK,aAAa,cAAc;AACnF,QAAI,CAAC,QAAQ;AACX,WAAK,QAAQ;AACb;IACF;AACA,QAAI,CAAC,KAAK;AAAe;AAEzB,UAAM,gBAAgB,sBAAS,oBAAoB,QAAQ,IAAI;AAC/D,QAAI;AACF,YAAM,SAAS,mCAAc,cAAc;QACzC;QACA,SAAS;QACT,MAA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AoB;AAClB,SAAK,QAAO;EACd;;AAvIQ,WAAA;MADP,0CAAiB,cAAc;;;;;AAlBrB,WAAQ,WAAA;MADpB,oCAAc,EAAE,MAAM,aAAa,SAAS,WAAU,CAAE;GAC5C,QAAQ;",
6
- "names": ["SwcAsync"]
4
+ "sourcesContent": ["import { changedAttribute } from '../decorators/changedAttribute';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core';\n\nexport class SwcAsync extends HTMLTemplateElement {\n private _nodes: Node[] = [];\n private _value: any = null;\n\n private _resolvePortal(): Element | null {\n const portalScript = this.getAttribute('on-get-portal');\n if (!portalScript) return this.parentElement;\n\n const win = this.ownerDocument?.defaultView || window;\n const res = FunctionUtils.executeReturn({\n script: portalScript,\n context: this,\n args: SwcUtils.getHelperAndHostSet(win, this)\n });\n\n if (res instanceof HTMLElement) return res;\n if (typeof res === 'string') return win.document.querySelector(res);\n return this.parentElement;\n }\n\n private _executeCloneCallback(attr: string, args: any) {\n const script = this.getAttribute(attr);\n if (!script) return;\n FunctionUtils.execute({ script, context: this, args });\n }\n\n @changedAttribute('on-get-value')\n private refresh() {\n const script = this.getAttribute('on-get-value');\n if (!script) return;\n const win = this.ownerDocument?.defaultView || window;\n const result = FunctionUtils.executeReturn({ script, context: this, args: SwcUtils.getHelperAndHostSet(win, this) });\n\n if (result instanceof Promise) {\n this.render('loading');\n result\n .then(v => {\n this._value = v;\n this.render('success');\n })\n .catch(e => this.render('error'));\n } else {\n this._value = result;\n this.render('success');\n }\n }\n\n private render(state: string) {\n this.cleanup();\n const portal = this._resolvePortal();\n if (!portal) return;\n\n const win = this.ownerDocument?.defaultView || window;\n const helperSet = SwcUtils.getHelperAndHostSet(win, this);\n\n const t = this.content.querySelector(`template[is=\"swc-${state}\"]`) as HTMLTemplateElement;\n if (t) {\n const clone = t.content.cloneNode(true) as DocumentFragment;\n this._nodes = Array.from(clone.childNodes);\n const elements = this._nodes.filter(n => n.nodeType === 1) as HTMLElement[];\n const groupArgs = { ...helperSet, $value: this._value, $nodes: this._nodes, $elements: elements, $firstElement: elements[0], $state: state };\n\n this._nodes.forEach((n, nodeIdx) => {\n if (n instanceof HTMLElement) (n as any).__swc_host = this;\n this._executeCloneCallback('on-clone-node', { ...groupArgs, $node: n, $nodeIndex: nodeIdx, $isElement: n.nodeType === 1 });\n });\n\n this._executeCloneCallback('on-clone-nodes', groupArgs);\n\n if (portal === this.parentElement) {\n portal.insertBefore(clone, this.nextSibling);\n } else {\n portal.appendChild(clone);\n }\n }\n }\n\n private cleanup() {\n this._nodes.forEach(n => n.parentElement?.removeChild(n));\n this._nodes = [];\n }\n\n connectedCallback() {\n this.refresh();\n }\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,8BAAiC;AACjC,mBAAyB;AACzB,kBAA8B;;;;;;;;;;AAExB,MAAO,iBAAiB,oBAAmB;EAAjD,cAAA;;AACU,SAAA,SAAiB,CAAA;AACjB,SAAA,SAAc;EAsFxB;EApFU,iBAAc;AACpB,UAAM,eAAe,KAAK,aAAa,eAAe;AACtD,QAAI,CAAC;AAAc,aAAO,KAAK;AAE/B,UAAM,MAAM,KAAK,eAAe,eAAe;AAC/C,UAAM,MAAM,0BAAc,cAAc;MACtC,QAAQ;MACR,SAAS;MACT,MAAM,sBAAS,oBAAoB,KAAK,IAAI;KAC7C;AAED,QAAI,eAAe;AAAa,aAAO;AACvC,QAAI,OAAO,QAAQ;AAAU,aAAO,IAAI,SAAS,cAAc,GAAG;AAClE,WAAO,KAAK;EACd;EAEQ,sBAAsB,MAAc,MAAS;AACnD,UAAM,SAAS,KAAK,aAAa,IAAI;AACrC,QAAI,CAAC;AAAQ;AACb,8BAAc,QAAQ,EAAE,QAAQ,SAAS,MAAM,KAAI,CAAE;EACvD;EAGQ,UAAO;AACb,UAAM,SAAS,KAAK,aAAa,cAAc;AAC/C,QAAI,CAAC;AAAQ;AACb,UAAM,MAAM,KAAK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O;AACb,SAAK,OAAO,QAAQ,OAAK,EAAE,eAAe,YAAY,CAAC,CAAC;AACxD,SAAK,SAAS,CAAA;EAChB;EAEA,oBAAiB;AACf,SAAK,QAAO;EACd;EACA,uBAAoB;AAClB,SAAK,QAAO;EACd;;AA5DQ,WAAA;MADP,0CAAiB,cAAc;;;;;",
6
+ "names": []
7
7
  }
@@ -20,10 +20,9 @@ __export(SwcChoose_exports, {
20
20
  SwcChoose: () => SwcChoose
21
21
  });
22
22
  module.exports = __toCommonJS(SwcChoose_exports);
23
- var import_elementDefine = require("../decorators/elementDefine");
24
23
  var import_changedAttribute = require("../decorators/changedAttribute");
25
24
  var import_Utils = require("../utils/Utils");
26
- var import_FunctionUtils = require("@dooboostore/core/function/FunctionUtils");
25
+ var import_core = require("@dooboostore/core");
27
26
  var __decorate = function(decorators, target, key, desc) {
28
27
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
29
28
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -33,7 +32,7 @@ var __decorate = function(decorators, target, key, desc) {
33
32
  var __metadata = function(k, v) {
34
33
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
35
34
  };
36
- let SwcChoose = class SwcChoose2 extends HTMLTemplateElement {
35
+ class SwcChoose extends HTMLTemplateElement {
37
36
  constructor() {
38
37
  super(...arguments);
39
38
  this._nodes = [];
@@ -46,94 +45,74 @@ let SwcChoose = class SwcChoose2 extends HTMLTemplateElement {
46
45
  this._value = nv;
47
46
  this.render();
48
47
  }
49
- _executeCallback(attrName, extraArgs) {
50
- const script = this.getAttribute(attrName);
48
+ _resolvePortal() {
49
+ const portalScript = this.getAttribute("on-get-portal");
50
+ if (!portalScript)
51
+ return this.parentElement;
52
+ const win = this.ownerDocument?.defaultView || window;
53
+ const res = import_core.FunctionUtils.executeReturn({
54
+ script: portalScript,
55
+ context: this,
56
+ args: import_Utils.SwcUtils.getHelperAndHostSet(win, this)
57
+ });
58
+ if (res instanceof HTMLElement)
59
+ return res;
60
+ if (typeof res === "string")
61
+ return win.document.querySelector(res);
62
+ return this.parentElement;
63
+ }
64
+ _executeCloneCallback(attr, args) {
65
+ const script = this.getAttribute(attr);
51
66
  if (!script)
52
67
  return;
53
- const helperHostSet = import_Utils.SwcUtils.getHelperAndHostSet(window, this);
54
- try {
55
- import_FunctionUtils.FunctionUtils.execute({ script, context: this, args: { ...helperHostSet, ...extraArgs } });
56
- } catch (e) {
57
- console.error(`[SwcChoose] Error in ${attrName}:`, e);
58
- }
68
+ import_core.FunctionUtils.execute({ script, context: this, args });
59
69
  }
60
- refresh(newValue) {
61
- const script = newValue !== void 0 ? newValue : this.getAttribute("on-get-value");
70
+ refresh() {
71
+ const script = this.getAttribute("on-get-value");
62
72
  if (!script) {
63
73
  this.value = null;
64
74
  return;
65
75
  }
66
- if (!this.parentElement)
67
- return;
68
- const helperHostSet = import_Utils.SwcUtils.getHelperAndHostSet(window, this);
69
- try {
70
- const result = import_FunctionUtils.FunctionUtils.executeReturn({
71
- script,
72
- context: this,
73
- args: helperHostSet
74
- });
75
- this.value = result;
76
- } catch (e) {
77
- console.error("[SwcChoose] Error in on-get-value:", e);
78
- }
76
+ const win = this.ownerDocument?.defaultView || window;
77
+ const result = import_core.FunctionUtils.executeReturn({ script, context: this, args: import_Utils.SwcUtils.getHelperAndHostSet(win, this) });
78
+ this.value = result;
79
79
  }
80
80
  render() {
81
81
  this.cleanup();
82
- if (!this.parentElement)
82
+ const portal = this._resolvePortal();
83
+ if (!portal)
83
84
  return;
85
+ const win = this.ownerDocument?.defaultView || window;
86
+ const helperSet = import_Utils.SwcUtils.getHelperAndHostSet(win, this);
84
87
  const templates = Array.from(this.content.querySelectorAll("template"));
85
88
  let selected = null;
86
- let otherwise = null;
87
- let defaultTmp = null;
88
89
  for (const t of templates) {
89
- const is = t.getAttribute("is");
90
- if (is === "swc-when") {
91
- const whenVal = t.getAttribute("value");
92
- if (String(whenVal) === String(this._value)) {
93
- selected = t;
94
- break;
95
- }
96
- } else if (is === "swc-otherwise") {
97
- otherwise = t;
98
- } else if (is === "swc-default") {
99
- defaultTmp = t;
90
+ if (t.getAttribute("is") === "swc-when" && String(t.getAttribute("value")) === String(this._value)) {
91
+ selected = t;
92
+ break;
100
93
  }
101
94
  }
102
- const targetTemplate = (this._value == null ? defaultTmp : selected) || otherwise || defaultTmp;
103
- if (targetTemplate) {
104
- const clone = targetTemplate.content.cloneNode(true);
105
- const nodes = Array.from(clone.childNodes);
106
- const elements = nodes.filter((n) => n.nodeType === 1);
107
- const ctx = {
108
- $value: this._value,
109
- $nodes: nodes,
110
- $elements: elements,
111
- $firstNode: nodes[0],
112
- $lastNode: nodes[nodes.length - 1],
113
- $firstElement: elements[0],
114
- $lastElement: elements[elements.length - 1]
115
- };
116
- this._executeCallback("on-clone-nodes", ctx);
117
- nodes.forEach((node, nodeIndex) => {
118
- if (node instanceof HTMLElement) {
119
- node.__swc_host = this;
120
- }
121
- this._executeCallback("on-clone-node", {
122
- ...ctx,
123
- $node: node,
124
- $nodeIndex: nodeIndex,
125
- $isElement: node.nodeType === 1
126
- });
95
+ const target = selected || this.content.querySelector('template[is="swc-otherwise"]');
96
+ if (target) {
97
+ const clone = target.content.cloneNode(true);
98
+ this._nodes = Array.from(clone.childNodes);
99
+ const elements = this._nodes.filter((n) => n.nodeType === 1);
100
+ const groupArgs = { ...helperSet, $value: this._value, $nodes: this._nodes, $elements: elements, $firstElement: elements[0] };
101
+ this._nodes.forEach((n, nodeIdx) => {
102
+ if (n instanceof HTMLElement)
103
+ n.__swc_host = this;
104
+ this._executeCloneCallback("on-clone-node", { ...groupArgs, $node: n, $nodeIndex: nodeIdx, $isElement: n.nodeType === 1 });
127
105
  });
128
- this._nodes = nodes;
129
- this.parentElement.insertBefore(clone, this.nextSibling);
106
+ this._executeCloneCallback("on-clone-nodes", groupArgs);
107
+ if (portal === this.parentElement) {
108
+ portal.insertBefore(clone, this.nextSibling);
109
+ } else {
110
+ portal.appendChild(clone);
111
+ }
130
112
  }
131
113
  }
132
114
  cleanup() {
133
- this._nodes.forEach((n) => {
134
- if (n.parentElement)
135
- n.parentElement.removeChild(n);
136
- });
115
+ this._nodes.forEach((n) => n.parentElement?.removeChild(n));
137
116
  this._nodes = [];
138
117
  }
139
118
  connectedCallback() {
@@ -142,14 +121,11 @@ let SwcChoose = class SwcChoose2 extends HTMLTemplateElement {
142
121
  disconnectedCallback() {
143
122
  this.cleanup();
144
123
  }
145
- };
124
+ }
146
125
  __decorate([
147
126
  (0, import_changedAttribute.changedAttribute)("on-get-value"),
148
127
  __metadata("design:type", Function),
149
- __metadata("design:paramtypes", [String]),
128
+ __metadata("design:paramtypes", []),
150
129
  __metadata("design:returntype", void 0)
151
130
  ], SwcChoose.prototype, "refresh", null);
152
- SwcChoose = __decorate([
153
- (0, import_elementDefine.elementDefine)({ name: "swc-choose", extends: "template" })
154
- ], SwcChoose);
155
131
  //# sourceMappingURL=SwcChoose.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/elements/SwcChoose.ts"],
4
- "sourcesContent": ["import { elementDefine } from '../decorators/elementDefine';\nimport { changedAttribute } from '../decorators/changedAttribute';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core/function/FunctionUtils';\nimport { SwcWhen, SwcOtherwise } from './SwcSubTemplates';\n\n@elementDefine({ name: 'swc-choose', extends: 'template' })\nexport class SwcChoose extends HTMLTemplateElement {\n private _nodes: Node[] = [];\n private _value: any = null;\n\n get value(): any {\n return this._value;\n }\n\n set value(nv: any) {\n this._value = nv;\n this.render();\n }\n\n private _executeCallback(attrName: string, extraArgs: Record<string, any>) {\n const script = this.getAttribute(attrName);\n if (!script) return;\n const helperHostSet = SwcUtils.getHelperAndHostSet(window, this);\n try {\n FunctionUtils.execute({ script, context: this, args: { ...helperHostSet, ...extraArgs } });\n } catch (e) {\n console.error(`[SwcChoose] Error in ${attrName}:`, e);\n }\n }\n\n @changedAttribute('on-get-value')\n private refresh(newValue?: string | null) {\n const script = newValue !== undefined ? newValue : this.getAttribute('on-get-value');\n if (!script) {\n this.value = null;\n return;\n }\n if (!this.parentElement) return;\n\n const helperHostSet = SwcUtils.getHelperAndHostSet(window, this);\n try {\n const result = FunctionUtils.executeReturn({\n script,\n context: this,\n args: helperHostSet\n });\n this.value = result;\n } catch (e) {\n console.error('[SwcChoose] Error in on-get-value:', e);\n }\n }\n\n private render() {\n this.cleanup();\n if (!this.parentElement) return;\n\n const templates = Array.from(this.content.querySelectorAll('template'));\n let selected: HTMLTemplateElement | null = null;\n let otherwise: HTMLTemplateElement | null = null;\n let defaultTmp: HTMLTemplateElement | null = null;\n\n for (const t of templates) {\n const is = t.getAttribute('is');\n if (is === 'swc-when') {\n const whenVal = t.getAttribute('value');\n if (String(whenVal) === String(this._value)) {\n selected = t;\n break;\n }\n } else if (is === 'swc-otherwise') {\n otherwise = t;\n } else if (is === 'swc-default') {\n defaultTmp = t;\n }\n }\n\n const targetTemplate = (this._value == null ? defaultTmp : selected) || otherwise || defaultTmp;\n if (targetTemplate) {\n const clone = targetTemplate.content.cloneNode(true) as DocumentFragment;\n const nodes = Array.from(clone.childNodes);\n const elements = nodes.filter(n => n.nodeType === 1) as HTMLElement[];\n\n const ctx = {\n $value: this._value,\n $nodes: nodes,\n $elements: elements,\n $firstNode: nodes[0],\n $lastNode: nodes[nodes.length - 1],\n $firstElement: elements[0],\n $lastElement: elements[elements.length - 1]\n };\n\n // Execution Callbacks\n this._executeCallback('on-clone-nodes', ctx);\n nodes.forEach((node, nodeIndex) => {\n if (node instanceof HTMLElement) {\n (node as any).__swc_host = this;\n }\n this._executeCallback('on-clone-node', {\n ...ctx,\n $node: node,\n $nodeIndex: nodeIndex,\n $isElement: node.nodeType === 1\n });\n });\n\n this._nodes = nodes;\n this.parentElement.insertBefore(clone, this.nextSibling);\n }\n }\n\n private cleanup() {\n this._nodes.forEach(n => {\n if (n.parentElement) n.parentElement.removeChild(n);\n });\n this._nodes = [];\n }\n\n connectedCallback() {\n this.refresh();\n }\n\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA8B;AAC9B,8BAAiC;AACjC,mBAAyB;AACzB,2BAA8B;;;;;;;;;;AAIvB,IAAM,YAAN,MAAMA,mBAAkB,oBAAmB;EAA3C,cAAA;;AACG,SAAA,SAAiB,CAAA;AACjB,SAAA,SAAc;EAqHxB;EAnHE,IAAI,QAAK;AACP,WAAO,KAAK;EACd;EAEA,IAAI,MAAM,IAAO;AACf,SAAK,SAAS;AACd,SAAK,OAAM;EACb;EAEQ,iBAAiB,UAAkB,WAA8B;AACvE,UAAM,SAAS,KAAK,aAAa,QAAQ;AACzC,QAAI,CAAC;AAAQ;AACb,UAAM,gBAAgB,sBAAS,oBAAoB,QAAQ,IAAI;AAC/D,QAAI;AACF,yCAAc,QAAQ,EAAE,QAAQ,SAAS,MAAM,MAAM,EAAE,GAAG,eAAe,GAAG,UAAS,EAAE,CAAE;IAC3F,SAAS,GAAG;AACV,cAAQ,MAAM,wBAAwB,QAAQ,KAAK,CAAC;IACtD;EACF;EAGQ,QAAQ,UAAwB;AACtC,UAAM,SAAS,aAAa,SAAY,WAAW,KAAK,aAAa,cAAc;AACnF,QAAI,CAAC,QAAQ;AACX,WAAK,QAAQ;AACb;IACF;AACA,QAAI,CAAC,KAAK;AAAe;AAEzB,UAAM,gBAAgB,sBAAS,oBAAoB,QAAQ,IAAI;AAC/D,QAAI;AACF,YAAM,SAAS,mCAAc,cAAc;QACzC;QACA,SAAS;QACT,MAAM;OACP;AACD,WAAK,QAAQ;IACf,SAAS,GAAG;AACV,cAAQ,MAAM,sCAAsC,CAAC;IACvD;EACF;EAEQ,SAAM;AACZ,SAAK,QAAO;AACZ,QAAI,CAAC,KAAK;AAAe;AAEzB,UAAM,YAAY,MAAM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;AACf,SAAK,QAAO;EACd;EAEA,uBAAoB;AAClB,SAAK,QAAO;EACd;;AA7FQ,WAAA;MADP,0CAAiB,cAAc;;;;;AAxBrB,YAAS,WAAA;MADrB,oCAAc,EAAE,MAAM,cAAc,SAAS,WAAU,CAAE;GAC7C,SAAS;",
6
- "names": ["SwcChoose"]
4
+ "sourcesContent": ["import { changedAttribute } from '../decorators/changedAttribute';\nimport { SwcUtils } from '../utils/Utils';\nimport { FunctionUtils } from '@dooboostore/core';\n\nexport class SwcChoose extends HTMLTemplateElement {\n private _nodes: Node[] = [];\n private _value: any = null;\n\n get value(): any {\n return this._value;\n }\n set value(nv: any) {\n this._value = nv;\n this.render();\n }\n\n private _resolvePortal(): Element | null {\n const portalScript = this.getAttribute('on-get-portal');\n if (!portalScript) return this.parentElement;\n\n const win = this.ownerDocument?.defaultView || window;\n const res = FunctionUtils.executeReturn({\n script: portalScript,\n context: this,\n args: SwcUtils.getHelperAndHostSet(win, this)\n });\n\n if (res instanceof HTMLElement) return res;\n if (typeof res === 'string') return win.document.querySelector(res);\n return this.parentElement;\n }\n\n private _executeCloneCallback(attr: string, args: any) {\n const script = this.getAttribute(attr);\n if (!script) return;\n FunctionUtils.execute({ script, context: this, args });\n }\n\n @changedAttribute('on-get-value')\n private refresh() {\n const script = this.getAttribute('on-get-value');\n if (!script) {\n this.value = null;\n return;\n }\n const win = this.ownerDocument?.defaultView || window;\n const result = FunctionUtils.executeReturn({ script, context: this, args: SwcUtils.getHelperAndHostSet(win, this) });\n this.value = result;\n }\n\n private render() {\n this.cleanup();\n const portal = this._resolvePortal();\n if (!portal) return;\n\n const win = this.ownerDocument?.defaultView || window;\n const helperSet = SwcUtils.getHelperAndHostSet(win, this);\n\n const templates = Array.from(this.content.querySelectorAll('template'));\n let selected: HTMLTemplateElement | null = null;\n for (const t of templates) {\n if (t.getAttribute('is') === 'swc-when' && String(t.getAttribute('value')) === String(this._value)) {\n selected = t;\n break;\n }\n }\n const target = selected || (this.content.querySelector('template[is=\"swc-otherwise\"]') as HTMLTemplateElement);\n\n if (target) {\n const clone = target.content.cloneNode(true) as DocumentFragment;\n this._nodes = Array.from(clone.childNodes);\n const elements = this._nodes.filter(n => n.nodeType === 1) as HTMLElement[];\n const groupArgs = { ...helperSet, $value: this._value, $nodes: this._nodes, $elements: elements, $firstElement: elements[0] };\n\n this._nodes.forEach((n, nodeIdx) => {\n if (n instanceof HTMLElement) (n as any).__swc_host = this;\n this._executeCloneCallback('on-clone-node', { ...groupArgs, $node: n, $nodeIndex: nodeIdx, $isElement: n.nodeType === 1 });\n });\n\n this._executeCloneCallback('on-clone-nodes', groupArgs);\n\n if (portal === this.parentElement) {\n portal.insertBefore(clone, this.nextSibling);\n } else {\n portal.appendChild(clone);\n }\n }\n }\n\n private cleanup() {\n this._nodes.forEach(n => n.parentElement?.removeChild(n));\n this._nodes = [];\n }\n\n connectedCallback() {\n this.refresh();\n }\n disconnectedCallback() {\n this.cleanup();\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,8BAAiC;AACjC,mBAAyB;AACzB,kBAA8B;;;;;;;;;;AAExB,MAAO,kBAAkB,oBAAmB;EAAlD,cAAA;;AACU,SAAA,SAAiB,CAAA;AACjB,SAAA,SAAc;EA8FxB;EA5FE,IAAI,QAAK;AACP,WAAO,KAAK;EACd;EACA,IAAI,MAAM,IAAO;AACf,SAAK,SAAS;AACd,SAAK,OAAM;EACb;EAEQ,iBAAc;AACpB,UAAM,eAAe,KAAK,aAAa,eAAe;AACtD,QAAI,CAAC;AAAc,aAAO,KAAK;AAE/B,UAAM,MAAM,KAAK,eAAe,eAAe;AAC/C,UAAM,MAAM,0BAAc,cAAc;MACtC,QAAQ;MACR,SAAS;MACT,MAAM,sBAAS,oBAAoB,KAAK,IAAI;KAC7C;AAED,QAAI,eAAe;AAAa,aAAO;AACvC,QAAI,OAAO,QAAQ;AAAU,aAAO,IAAI,SAAS,cAAc,GAAG;AAClE,WAAO,KAAK;EACd;E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