@epa-wg/custom-element-dist 0.0.31 → 0.0.33

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 (249) hide show
  1. package/.idea/inspectionProfiles/Project_Default.xml +2 -1
  2. package/.storybook/main.ts +3 -7
  3. package/.storybook/preview.ts +4 -6
  4. package/README.md +4 -4
  5. package/coverage/coverage-final.json +7 -18
  6. package/coverage/index.html +30 -30
  7. package/coverage/src/custom-element/coverage.svg +1 -1
  8. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  9. package/coverage/src/custom-element/custom-element.js.html +719 -473
  10. package/coverage/src/custom-element/http-request.js/coverage.svg +1 -1
  11. package/coverage/src/custom-element/http-request.js.html +6 -6
  12. package/coverage/src/custom-element/index.html +29 -29
  13. package/coverage/src/custom-element/local-storage.js.html +1 -1
  14. package/coverage/src/custom-element/location-element.js.html +31 -31
  15. package/coverage/src/custom-element/module-url.js/coverage.svg +1 -1
  16. package/coverage/src/custom-element/module-url.js.html +20 -20
  17. package/coverage/src/index.html +1 -1
  18. package/coverage/src/mocks/handlers.ts.html +1 -1
  19. package/coverage/src/mocks/index.html +1 -1
  20. package/coverage/src/stories/coverage.svg +1 -1
  21. package/coverage/src/stories/{attributes.test.stories.ts → frame.canvas.ts}/coverage.svg +1 -1
  22. package/coverage/src/stories/frame.canvas.ts.html +175 -0
  23. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  24. package/coverage/src/stories/index.html +14 -179
  25. package/coverage/src/stories/testStoryBook.ts.html +8 -8
  26. package/coverage/src/sum.ts.html +1 -1
  27. package/dist/custom-element-6slVaFEs.cjs +97 -0
  28. package/dist/custom-element-WnOqmEOe.js +609 -0
  29. package/dist/custom-element-bundle.cjs +1 -1
  30. package/dist/custom-element-bundle.js +30 -28
  31. package/dist/demo/a.html +51 -38
  32. package/dist/demo/attributes.html +153 -0
  33. package/dist/demo/data-slices.html +2 -2
  34. package/dist/demo/external-template.html +1 -0
  35. package/dist/demo/external-templates-sb-6.html +42 -0
  36. package/dist/demo/external-templates-sb-7.html +42 -0
  37. package/dist/demo/form.html +42 -0
  38. package/dist/demo/hex-grid-dce.html +1 -1
  39. package/dist/demo/hex-grid.html +1 -1
  40. package/dist/demo/html-template.html +1 -1
  41. package/dist/demo/module-url-sb-2.html +46 -0
  42. package/dist/demo/module-url-sb-4.html +48 -0
  43. package/dist/demo/module-url-sb-5.html +53 -0
  44. package/dist/demo/parameters.html +20 -1
  45. package/dist/demo/s.xml +66 -9
  46. package/dist/demo/s.xslt +89 -16
  47. package/dist/demo/ss.html +12 -22
  48. package/dist/mockServiceWorker.js +31 -8
  49. package/package.json +25 -26
  50. package/public/demo/a.html +51 -38
  51. package/public/demo/attributes.html +153 -0
  52. package/public/demo/data-slices.html +2 -2
  53. package/public/demo/external-template.html +1 -0
  54. package/public/demo/external-templates-sb-6.html +42 -0
  55. package/public/demo/external-templates-sb-7.html +42 -0
  56. package/public/demo/form.html +42 -0
  57. package/public/demo/hex-grid-dce.html +1 -1
  58. package/public/demo/hex-grid.html +1 -1
  59. package/public/demo/html-template.html +1 -1
  60. package/public/demo/module-url-sb-2.html +46 -0
  61. package/public/demo/module-url-sb-4.html +48 -0
  62. package/public/demo/module-url-sb-5.html +53 -0
  63. package/public/demo/parameters.html +20 -1
  64. package/public/demo/s.xml +66 -9
  65. package/public/demo/s.xslt +89 -16
  66. package/public/demo/ss.html +12 -22
  67. package/public/mockServiceWorker.js +31 -8
  68. package/src/custom-element/custom-element.d.ts +4 -0
  69. package/src/custom-element/custom-element.js +148 -66
  70. package/src/custom-element/demo/a.html +51 -38
  71. package/src/custom-element/demo/attributes.html +153 -0
  72. package/src/custom-element/demo/data-slices.html +2 -2
  73. package/src/custom-element/demo/external-template.html +1 -0
  74. package/src/custom-element/demo/form.html +42 -0
  75. package/src/custom-element/demo/hex-grid-dce.html +1 -1
  76. package/src/custom-element/demo/hex-grid.html +1 -1
  77. package/src/custom-element/demo/html-template.html +1 -1
  78. package/src/custom-element/demo/parameters.html +20 -1
  79. package/src/custom-element/demo/s.xml +66 -9
  80. package/src/custom-element/demo/s.xslt +89 -16
  81. package/src/custom-element/demo/ss.html +12 -22
  82. package/src/custom-element/ide/web-types-dce.json +1 -1
  83. package/src/custom-element/ide/web-types-xsl.json +1 -1
  84. package/src/custom-element/index.html +1 -1
  85. package/src/material/components/badge.html +240 -0
  86. package/src/material/components/dropdown.html +26 -14
  87. package/src/material/components/icon-link.html +1 -0
  88. package/src/material/components/icon.html +253 -0
  89. package/src/material/components/input.html +571 -0
  90. package/src/material/components/menu.html +7 -5
  91. package/src/material/components.html +48 -11
  92. package/src/material/theme/semantic.css +20 -1
  93. package/src/mocks/versions.mock.ts +1 -1
  94. package/src/stories/__screenshots__/attributes.test.stories.ts +1 -0
  95. package/src/stories/__screenshots__/external-template.test.stories.ts +1 -0
  96. package/src/stories/__screenshots__/module-url.test.stories.ts +1 -0
  97. package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-definition-1.png +0 -0
  98. package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-runtime-change-1.png +0 -0
  99. package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-1.png +0 -0
  100. package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-2.png +0 -0
  101. package/src/stories/__screenshots__/stories.test.ts/attributes-cloneAs-el-newTag--1.png +0 -0
  102. package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---1.png +0 -0
  103. package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---2.png +0 -0
  104. package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---3.png +0 -0
  105. package/src/stories/__screenshots__/stories.test.ts/attributes-mix-to-from--1.png +0 -0
  106. package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-definition-1.png +0 -0
  107. package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-runtime-change-1.png +0 -0
  108. package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-1.png +0 -0
  109. package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-2.png +0 -0
  110. package/src/stories/__screenshots__/stories.test.ts/http-request-cloneAs-el-newTag--1.png +0 -0
  111. package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-headers-and-response-status-and-headers-1.png +0 -0
  112. package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-delayed--5-seconds-response-1.png +0 -0
  113. package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-error-1.png +0 -0
  114. package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---1.png +0 -0
  115. package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---2.png +0 -0
  116. package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---3.png +0 -0
  117. package/src/stories/__screenshots__/stories.test.ts/http-request-mix-to-from--1.png +0 -0
  118. package/src/stories/__screenshots__/stories.test.ts/http-request-url-and-slice-1.png +0 -0
  119. package/src/stories/__screenshots__/stories.test.ts/http-request-url-change-1.png +0 -0
  120. package/src/stories/attributes.test.stories.ts +177 -11
  121. package/src/stories/external-template.test.stories.ts +17 -15
  122. package/src/stories/frame.canvas.ts +31 -0
  123. package/src/stories/module-url.test.stories.ts +29 -61
  124. package/storybook-static/assets/Color-F6OSRLHC-Cbp293x2.js +1 -0
  125. package/storybook-static/assets/Configure-BrFr4SLE.js +165 -0
  126. package/storybook-static/assets/DocsRenderer-CFRXHY34-DhHzJiIO.js +2 -0
  127. package/storybook-static/assets/attributes.test.stories-CzWkKw0e.js +1 -0
  128. package/storybook-static/assets/attributes.test.stories-Gg9LQTEK.js +349 -0
  129. package/storybook-static/assets/{css.test.stories-Cgn6ICr0.js → css.test.stories-B_3ltOrx.js} +1 -1
  130. package/storybook-static/assets/custom-element-CPnvJnn8.js +97 -0
  131. package/storybook-static/assets/{dom-merge.test.stories-CBObfPWg.js → dom-merge.test.stories-nQxcgLoM.js} +1 -1
  132. package/storybook-static/assets/entry-preview-docs-Dwczwtsc.js +2 -0
  133. package/storybook-static/assets/external-template.test.stories-BivZqBTp.js +1 -0
  134. package/storybook-static/assets/{external-template.test.stories-VfKUQ8eu.js → external-template.test.stories-DZ-rjnfd.js} +39 -41
  135. package/storybook-static/assets/{form.test.stories-CnuGN7Zw.js → form.test.stories-DQhPYtMj.js} +1 -1
  136. package/storybook-static/assets/frame.canvas-ClTqYyMN.js +1 -0
  137. package/storybook-static/assets/{handlers-V_T7WjNK.js → handlers-CLkps6Nz.js} +17 -14
  138. package/storybook-static/assets/{http-request.stories-8NN1Coqm.js → http-request.stories-jo0f73nw.js} +1 -1
  139. package/storybook-static/assets/iframe-CZwRpnn9.js +199 -0
  140. package/storybook-static/assets/index-B68YUdzy.js +621 -0
  141. package/storybook-static/assets/index-BwkS7JH_.js +8 -0
  142. package/storybook-static/assets/index-CJQtnF9V.js +1 -0
  143. package/storybook-static/assets/index-Dr4PwNfd.js +240 -0
  144. package/storybook-static/assets/{local-storage.test.stories-Dk5Yqc7m.js → local-storage.test.stories-uA5EKRPf.js} +1 -1
  145. package/storybook-static/assets/{location-element.test.stories-56um6s5L.js → location-element.test.stories-Cu-6Elcg.js} +1 -1
  146. package/storybook-static/assets/module-url.test.stories-CD_wusXQ.js +142 -0
  147. package/storybook-static/assets/module-url.test.stories-CTjUAk3J.js +1 -0
  148. package/storybook-static/assets/preview-1xJJ3sKE.js +1 -0
  149. package/storybook-static/assets/preview-BFlNN3Wj.js +1 -0
  150. package/storybook-static/assets/preview-CTOeX_lO.js +1 -0
  151. package/storybook-static/assets/preview-Cm4PPhHS.js +50 -0
  152. package/storybook-static/assets/preview-CuCH40jj.js +2 -0
  153. package/storybook-static/assets/preview-DfTudP20.js +1 -0
  154. package/storybook-static/assets/{set-url.test.stories-B4E6hIe-.js → set-url.test.stories-CY7B9BVZ.js} +1 -1
  155. package/storybook-static/assets/{slice-events.test.stories-BR0F-B6I.js → slice-events.test.stories-BVnPXm6e.js} +1 -1
  156. package/storybook-static/assets/{slots.test.stories-CgfJIyCr.js → slots.test.stories-Dxsa9KdA.js} +1 -1
  157. package/storybook-static/assets/{version-select.test.stories-nmxATIwv.js → version-select.test.stories-Buga1PAa.js} +1 -1
  158. package/storybook-static/demo/a.html +51 -38
  159. package/storybook-static/demo/attributes.html +153 -0
  160. package/storybook-static/demo/data-slices.html +2 -2
  161. package/storybook-static/demo/external-template.html +1 -0
  162. package/storybook-static/demo/external-templates-sb-6.html +42 -0
  163. package/storybook-static/demo/external-templates-sb-7.html +42 -0
  164. package/storybook-static/demo/form.html +42 -0
  165. package/storybook-static/demo/hex-grid-dce.html +1 -1
  166. package/storybook-static/demo/hex-grid.html +1 -1
  167. package/storybook-static/demo/html-template.html +1 -1
  168. package/storybook-static/demo/module-url-sb-2.html +46 -0
  169. package/storybook-static/demo/module-url-sb-4.html +48 -0
  170. package/storybook-static/demo/module-url-sb-5.html +53 -0
  171. package/storybook-static/demo/parameters.html +20 -1
  172. package/storybook-static/demo/s.xml +66 -9
  173. package/storybook-static/demo/s.xslt +89 -16
  174. package/storybook-static/demo/ss.html +12 -22
  175. package/storybook-static/iframe.html +1 -1
  176. package/storybook-static/index.html +6 -10
  177. package/storybook-static/index.json +1 -1
  178. package/storybook-static/mockServiceWorker.js +31 -8
  179. package/storybook-static/project.json +1 -1
  180. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  181. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
  182. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +391 -0
  183. package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +230 -0
  184. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
  185. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
  186. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
  187. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  188. package/storybook-static/sb-addons/interactions-9/manager-bundle.js +58 -58
  189. package/storybook-static/sb-manager/globals-module-info.js +9 -0
  190. package/storybook-static/sb-manager/globals-runtime.js +10719 -10473
  191. package/storybook-static/sb-manager/runtime.js +4944 -6321
  192. package/coverage/src/stories/attributes.test.stories.ts.html +0 -514
  193. package/coverage/src/stories/css.test.stories.ts/coverage.svg +0 -10
  194. package/coverage/src/stories/css.test.stories.ts.html +0 -460
  195. package/coverage/src/stories/dom-merge.test.stories.ts/coverage.svg +0 -10
  196. package/coverage/src/stories/dom-merge.test.stories.ts.html +0 -706
  197. package/coverage/src/stories/external-template.test.stories.ts/coverage.svg +0 -10
  198. package/coverage/src/stories/external-template.test.stories.ts.html +0 -865
  199. package/coverage/src/stories/form.test.stories.ts/coverage.svg +0 -10
  200. package/coverage/src/stories/form.test.stories.ts.html +0 -661
  201. package/coverage/src/stories/local-storage.test.stories.ts/coverage.svg +0 -10
  202. package/coverage/src/stories/local-storage.test.stories.ts.html +0 -1315
  203. package/coverage/src/stories/location-element.test.stories.ts/coverage.svg +0 -10
  204. package/coverage/src/stories/location-element.test.stories.ts.html +0 -523
  205. package/coverage/src/stories/module-url.test.stories.ts/coverage.svg +0 -10
  206. package/coverage/src/stories/module-url.test.stories.ts.html +0 -640
  207. package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +0 -10
  208. package/coverage/src/stories/set-url.test.stories.ts.html +0 -433
  209. package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +0 -10
  210. package/coverage/src/stories/slice-events.test.stories.ts.html +0 -952
  211. package/coverage/src/stories/slots.test.stories.ts/coverage.svg +0 -10
  212. package/coverage/src/stories/slots.test.stories.ts.html +0 -742
  213. package/coverage/src/stories/version-select.test.stories.ts/coverage.svg +0 -10
  214. package/coverage/src/stories/version-select.test.stories.ts.html +0 -397
  215. package/dist/custom-element-BbJMY20-.cjs +0 -97
  216. package/dist/custom-element-CoRNKeEP.js +0 -567
  217. package/storybook-static/assets/Color-F6OSRLHC-CFyd3TND.js +0 -1
  218. package/storybook-static/assets/Configure-UGTbPRKK.js +0 -165
  219. package/storybook-static/assets/DocsRenderer-CFRXHY34-Dpr5iB0o.js +0 -2
  220. package/storybook-static/assets/attributes.test.stories-DSOLHHOW.js +0 -152
  221. package/storybook-static/assets/custom-element-D59Fok1f.js +0 -97
  222. package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +0 -2
  223. package/storybook-static/assets/iframe-DnhkgdtG.js +0 -2
  224. package/storybook-static/assets/index-3Sfy-t3H.js +0 -769
  225. package/storybook-static/assets/index-BcZLpTeD.js +0 -8
  226. package/storybook-static/assets/index-CIBI7sCB.js +0 -1
  227. package/storybook-static/assets/index-CxRwF5Or.js +0 -234
  228. package/storybook-static/assets/index-D-8MO0q_.js +0 -1
  229. package/storybook-static/assets/index-DN1RoK17.js +0 -1
  230. package/storybook-static/assets/index-DjJD7gkO.js +0 -1
  231. package/storybook-static/assets/module-url.test.stories-DEponQ7l.js +0 -208
  232. package/storybook-static/assets/preview-BhhEZcNS.js +0 -1
  233. package/storybook-static/assets/preview-CNKoaWES.js +0 -1
  234. package/storybook-static/assets/preview-Czc-sw5H.js +0 -2
  235. package/storybook-static/assets/preview-DAeyCMnM.js +0 -1
  236. package/storybook-static/assets/preview-DHPc-V4N.js +0 -1
  237. package/storybook-static/assets/preview-DYzi3Z2p.js +0 -1
  238. package/storybook-static/assets/preview-vbpHsp94.js +0 -52
  239. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +0 -333
  240. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +0 -40
  241. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +0 -3
  242. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +0 -391
  243. package/storybook-static/sb-addons/links-1/manager-bundle.js +0 -3
  244. package/storybook-static/sb-preview/globals.js +0 -33
  245. package/storybook-static/sb-preview/runtime.js +0 -7174
  246. package/test-runner-jest.config.js +0 -15
  247. /package/storybook-static/sb-addons/{essentials-actions-3 → essentials-actions-2}/manager-bundle.js.LEGAL.txt +0 -0
  248. /package/storybook-static/sb-addons/{essentials-controls-2 → essentials-controls-1}/manager-bundle.js.LEGAL.txt +0 -0
  249. /package/storybook-static/sb-addons/{links-1 → essentials-docs-3}/manager-bundle.js.LEGAL.txt +0 -0
@@ -1,9 +1,9 @@
1
- import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.js";function f(t){return new Promise(e=>setTimeout(e,t))}function h(t){const{title:e,body:n}=t;return`
1
+ import{w as l,e as a}from"./index-Dr4PwNfd.js";import"./custom-element-CPnvJnn8.js";import{f as T}from"./frame.canvas-ClTqYyMN.js";function v(t){return new Promise(e=>setTimeout(e,t))}function h(t){const{title:e,body:n}=t;return`
2
2
  <fieldset>
3
3
  <legend>${e}</legend>
4
4
  ${n}
5
5
  </fieldset>
6
- `}const B={title:"external-templates",render:h},s={args:{title:"Template in page DOM",body:`
6
+ `}const b={title:"external-templates",render:h},s={args:{title:"Template in page DOM",body:`
7
7
  <template id="template1">
8
8
  <slot>Hello</slot> World!
9
9
  </template>
@@ -13,24 +13,24 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
13
13
 
14
14
  <dce-internal data-testid="slot-override">👋</dce-internal>
15
15
  <dce-internal data-testid="slot-default"></dce-internal>
16
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(s.args.title);const n=T=>e.getByTestId(T).textContent.trim();a(n("slot-override")).toEqual("👋 World!"),a(n("slot-default")).toEqual("Hello World!")}},i={args:{title:"no tag, template in same DOM",body:`
16
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(s.args.title);const n=y=>e.getByTestId(y).textContent?.trim();a(n("slot-override")).toEqual("👋 World!"),a(n("slot-default")).toEqual("Hello World!")}},i={args:{title:"no tag, template in same DOM",body:`
17
17
  <template id="template2">
18
18
  🏗️ construction
19
19
  </template>
20
20
 
21
21
  <custom-element src="#template2"></custom-element>
22
- <custom-element src="#template2"></custom-element>`},play:async({canvasElement:t})=>{await l(t).findByText(i.args.title),a(t.querySelectorAll("custom-element")[0].textContent.trim()).toEqual("🏗️ construction"),a(t.querySelectorAll("custom-element")[1].textContent.trim()).toEqual("🏗️ construction")}},m={args:{title:"External SVG as template",body:`
22
+ <custom-element src="#template2"></custom-element>`},play:async({canvasElement:t})=>{await l(t).findByText(i.args.title),a(t.querySelectorAll("custom-element")[0].textContent.trim()).toEqual("🏗️ construction"),a(t.querySelectorAll("custom-element")[1].textContent.trim()).toEqual("🏗️ construction")}},o={args:{title:"External SVG as template",body:`
23
23
  <custom-element tag="dce-external" src="/confused.svg">
24
24
  <template><i>loading from SVG ...</i></template>
25
25
  </custom-element>
26
26
  <dce-external></dce-external>
27
- <custom-element src="confused.svg">
27
+ <custom-element src="/confused.svg">
28
28
  <i>inline DCE loading from SVG ...</i>
29
29
  </custom-element>
30
30
  <custom-element src="no.svg">
31
31
  <i>fallback for missing image</i>
32
32
  </custom-element>
33
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(m.args.title),await a(e.getByText("inline DCE loading from SVG ...")).toBeInTheDocument(),a(t.querySelector('[src="confused.svg"]').innerHTML).to.include("loading from SVG ..."),await a(await e.findByText("fallback for missing image")).toBeInTheDocument(),await a(await e.findByTitle("Confused")).toBeInTheDocument()}},o={args:{title:"External XSLT file",body:`
33
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(o.args.title),await a(e.getByText("inline DCE loading from SVG ...")).toBeInTheDocument(),a(t.querySelector('[src="/confused.svg"]').innerHTML).to.include("loading from SVG ..."),await a(await e.findByText("fallback for missing image")).toBeInTheDocument(),await a(await e.findByTitle("Confused")).toBeInTheDocument()}},m={args:{title:"External XSLT file",body:`
34
34
  <custom-element tag="dce-external-4" src="/tree.xsl">
35
35
  <template><i>loading from XSLT ...</i></template>
36
36
  </custom-element>
@@ -39,16 +39,16 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
39
39
  <custom-element src="/tree.xsl" data-smile="👼" data-basket="🍒">
40
40
  <i>inline DCE loading from XSLT ...</i>
41
41
  </custom-element>
42
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(o.args.title),a(t.querySelector("dce-external-4").innerHTML).to.include("Hi"),a(t.querySelector('[data-smile="👼"]').innerHTML).to.include("loading from XSLT ..."),await a(await e.findByTestId("data-fruit")).toHaveTextContent("🍌"),await a(await e.findByTestId("data-smile")).toHaveTextContent("👼")}},c={args:{title:"external HTML template",body:`
42
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(m.args.title),a(t.querySelector("dce-external-4").innerHTML).to.include("Hi"),a(t.querySelector('[data-smile="👼"]').innerHTML).to.include("loading from XSLT ..."),await a(await e.findByTestId("data-fruit")).toHaveTextContent("🍌"),await a(await e.findByTestId("data-smile")).toHaveTextContent("👼")}},r={args:{title:"external HTML template",body:`
43
43
  <custom-element tag="dce-external-5" src="/html-template.html">
44
44
  <template><i>loading from HTML file ...</i></template>
45
45
  </custom-element>
46
46
  <dce-external-5 title="DCE with external XSLT template" data-fruit="🍌">Hi</dce-external-5>
47
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(c.args.title),await e.findByText("👋");const n=t.querySelector("dce-external-5").innerHTML;a(n).to.include("👋"),a(n).to.include("👌"),a(n).to.include("<svg"),a(n).to.include("<math")}},r={args:{title:"external HTML template",body:`
47
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(r.args.title),await e.findByText("👋");const n=t.querySelector("dce-external-5").innerHTML;a(n).to.include("👋"),a(n).to.include("👌"),a(n).to.include("<svg"),a(n).to.include("<math")}},c={args:{title:"external HTML template",body:`
48
48
  <custom-element src="/html-template.html" data-smile="👼" data-basket="🍒">
49
49
  <i>inline DCE loading from HTML file ...</i>
50
50
  </custom-element>
51
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(r.args.title),await e.findByText("👋");const n=t.innerHTML;a(n).to.include("👋"),a(n).to.include("👌"),a(n).to.include("<svg"),a(n).to.include("<math")}},d={args:{title:"external HTML template - html by id",body:`
51
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(c.args.title),await e.findByText("👋");const n=t.innerHTML;a(n).to.include("👋"),a(n).to.include("👌"),a(n).to.include("<svg"),a(n).to.include("<math")}},d={args:{title:"external HTML template - html by id",body:`
52
52
  <custom-element src="/html-template.html#wave">
53
53
  <template><i>loading HTML from templates file ...</i></template>
54
54
  </custom-element>
@@ -56,23 +56,21 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
56
56
  <custom-element src="/html-template.html#dwc-logo">
57
57
  <template><i>loading SVG from templates file ...</i></template>
58
58
  </custom-element>
59
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(p.args.title),a(await e.findByTestId("svg-test")).toBeInTheDocument()}},u={args:{title:"external HTML template - MathML by id",body:`
60
- <custom-element src="/html-template.html#sophomores-dream">
61
- <template><i>loading MathML from HTML file ...</i></template>
62
- </custom-element>
63
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(u.args.title);const n=await e.findByTestId("ml-test");a(n.firstElementChild.localName).toEqual("mrow")}},g={args:{title:"external XHTML template - xsl by id",body:`
64
- <custom-element src="/html-template.xhtml#embedded-xsl">
65
- <template>whole XSLT is embedded into HTML body</template>
66
- </custom-element>
67
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(g.args.title);const n=await e.findByTestId("src");a(n.textContent).to.include("/html-template.xhtml#embedded-xsl")}},x={args:{title:"external HTML template - missing id",body:`
59
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(p.args.title),a(await e.findByTestId("svg-test")).toBeInTheDocument()}},u={args:{title:"6. external HTML template - MathML by id",body:`
60
+ <iframe src="/demo/external-templates-sb-6.html" data-testid="fr"></iframe>
61
+
62
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(u.args.title);const y=await(await T("fr",e)).findByTestId("ml-test");a(y.firstElementChild.localName).toEqual("mrow")}},g={args:{title:"7. external XHTML template - xsl by id",body:`
63
+ <iframe src="/demo/external-templates-sb-7.html" data-testid="fr"></iframe>
64
+
65
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(g.args.title);const n=await T("fr",e);await a(await n.findByText("whole XSLT is embedded into HTML body")).toBeInTheDocument(),await a(await n.findByText("./html-template.xhtml#embedded-xsl")).toBeInTheDocument()}},x={args:{title:"external HTML template - missing id",body:`
68
66
  <custom-element src="/html-template.html#none">
69
67
  <template><i data-testid="no-id">element with id=none is missing in template</i></template>
70
68
  </custom-element>
71
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(x.args.title),await f(100);const n=await e.findByTestId("no-id");a(n.textContent).to.include("element with id=none is missing in template")}},y={args:{title:"external file with embedding of another external DCE",body:`
69
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(x.args.title),await v(100);const n=await e.findByTestId("no-id");a(n.textContent).to.include("element with id=none is missing in template")}},f={args:{title:"external file with embedding of another external DCE",body:`
72
70
  <custom-element src="/embed-1.html">
73
71
  loading from embed-1.html ...
74
72
  </custom-element>
75
- `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(y.args.title),await f(1),a(await e.findByText("embed-1.html")).toBeInTheDocument(),a(await e.findByText("🖖")).toBeInTheDocument()}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
73
+ `},play:async({canvasElement:t})=>{const e=l(t);await e.findByText(f.args.title),await v(1),a(await e.findByText("embed-1.html")).toBeInTheDocument(),a(await e.findByText("🖖")).toBeInTheDocument()}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
76
74
  args: {
77
75
  title: 'Template in page DOM',
78
76
  body: \`
@@ -92,7 +90,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
92
90
  }) => {
93
91
  const canvas = within(canvasElement);
94
92
  await canvas.findByText(TemplateInPage.args!.title as string);
95
- const val = prop => canvas.getByTestId(prop).textContent.trim();
93
+ const val = (prop: string) => canvas.getByTestId(prop).textContent?.trim();
96
94
  expect(val('slot-override')).toEqual('👋 World!');
97
95
  expect(val('slot-default')).toEqual('Hello World!');
98
96
  }
@@ -115,7 +113,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
115
113
  expect(canvasElement.querySelectorAll('custom-element')[0].textContent.trim()).toEqual('🏗️ construction');
116
114
  expect(canvasElement.querySelectorAll('custom-element')[1].textContent.trim()).toEqual('🏗️ construction');
117
115
  }
118
- }`,...i.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
116
+ }`,...i.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
119
117
  args: {
120
118
  title: 'External SVG as template',
121
119
  body: \`
@@ -123,7 +121,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
123
121
  <template><i>loading from SVG ...</i></template>
124
122
  </custom-element>
125
123
  <dce-external></dce-external>
126
- <custom-element src="confused.svg">
124
+ <custom-element src="/confused.svg">
127
125
  <i>inline DCE loading from SVG ...</i>
128
126
  </custom-element>
129
127
  <custom-element src="no.svg">
@@ -141,11 +139,11 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
141
139
  // needs separate test
142
140
  // await expect( await canvas.findByText('loading from SVG ...')).toBeInTheDocument();
143
141
 
144
- expect(canvasElement.querySelector('[src="confused.svg"]').innerHTML).to.include('loading from SVG ...');
142
+ expect(canvasElement.querySelector('[src="/confused.svg"]').innerHTML).to.include('loading from SVG ...');
145
143
  await expect(await canvas.findByText('fallback for missing image')).toBeInTheDocument();
146
144
  await expect(await canvas.findByTitle('Confused')).toBeInTheDocument();
147
145
  }
148
- }`,...m.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
146
+ }`,...o.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
149
147
  args: {
150
148
  title: 'External XSLT file',
151
149
  body: \`
@@ -169,7 +167,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
169
167
  await expect(await canvas.findByTestId('data-fruit')).toHaveTextContent('🍌');
170
168
  await expect(await canvas.findByTestId('data-smile')).toHaveTextContent('👼');
171
169
  }
172
- }`,...o.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
170
+ }`,...m.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
173
171
  args: {
174
172
  title: 'external HTML template',
175
173
  body: \`
@@ -191,7 +189,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
191
189
  expect(t5).to.include('<svg');
192
190
  expect(t5).to.include('<math');
193
191
  }
194
- }`,...c.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
192
+ }`,...r.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
195
193
  args: {
196
194
  title: 'external HTML template',
197
195
  body: \`
@@ -212,7 +210,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
212
210
  expect(t5).to.include('<svg');
213
211
  expect(t5).to.include('<math');
214
212
  }
215
- }`,...r.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
213
+ }`,...c.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
216
214
  args: {
217
215
  title: 'external HTML template - html by id',
218
216
  body: \`
@@ -246,11 +244,10 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
246
244
  }
247
245
  }`,...p.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
248
246
  args: {
249
- title: 'external HTML template - MathML by id',
247
+ title: '6. external HTML template - MathML by id',
250
248
  body: \`
251
- <custom-element src="/html-template.html#sophomores-dream">
252
- <template><i>loading MathML from HTML file ...</i></template>
253
- </custom-element>
249
+ <iframe src="/demo/external-templates-sb-6.html" data-testid="fr"></iframe>
250
+
254
251
  \`
255
252
  },
256
253
  play: async ({
@@ -258,16 +255,16 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
258
255
  }) => {
259
256
  const canvas = within(canvasElement);
260
257
  await canvas.findByText(MathMLWithinHtmlFile.args!.title as string);
261
- const ml = await canvas.findByTestId('ml-test');
258
+ const frCanvas = await frameCanvas('fr', canvas);
259
+ const ml = await frCanvas.findByTestId('ml-test');
262
260
  expect(ml.firstElementChild.localName).toEqual('mrow');
263
261
  }
264
262
  }`,...u.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
265
263
  args: {
266
- title: 'external XHTML template - xsl by id',
264
+ title: '7. external XHTML template - xsl by id',
267
265
  body: \`
268
- <custom-element src="/html-template.xhtml#embedded-xsl">
269
- <template>whole XSLT is embedded into HTML body</template>
270
- </custom-element>
266
+ <iframe src="/demo/external-templates-sb-7.html" data-testid="fr"></iframe>
267
+
271
268
  \`
272
269
  },
273
270
  play: async ({
@@ -275,8 +272,9 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
275
272
  }) => {
276
273
  const canvas = within(canvasElement);
277
274
  await canvas.findByText(ByIdWithinXsltFile.args!.title as string);
278
- const ml = await canvas.findByTestId('src');
279
- expect(ml.textContent).to.include('/html-template.xhtml#embedded-xsl');
275
+ const frCanvas = await frameCanvas('fr', canvas);
276
+ await expect(await frCanvas.findByText('whole XSLT is embedded into HTML body')).toBeInTheDocument();
277
+ await expect(await frCanvas.findByText('./html-template.xhtml#embedded-xsl')).toBeInTheDocument();
280
278
  }
281
279
  }`,...g.parameters?.docs?.source}}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
282
280
  args: {
@@ -296,7 +294,7 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
296
294
  const ml = await canvas.findByTestId('no-id');
297
295
  expect(ml.textContent).to.include('element with id=none is missing in template');
298
296
  }
299
- }`,...x.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
297
+ }`,...x.parameters?.docs?.source}}};f.parameters={...f.parameters,docs:{...f.parameters?.docs,source:{originalSource:`{
300
298
  args: {
301
299
  title: 'external file with embedding of another external DCE',
302
300
  body: \`
@@ -314,4 +312,4 @@ import{w as l,e as a}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.
314
312
  expect(await canvas.findByText('embed-1.html')).toBeInTheDocument();
315
313
  expect(await canvas.findByText('🖖')).toBeInTheDocument();
316
314
  }
317
- }`,...y.parameters?.docs?.source}}};const E=["TemplateInPage","NoTag","ExternalSvg","ExternalXsltFile","ExternalHtmlFile","ExternalHtmlFileInline","HtmlWithinHtmlFile","SvgWithinHtmlFile","MathMLWithinHtmlFile","ByIdWithinXsltFile","MissingIdWithinXsltFile","EmbeddingInAnotherFile"];export{g as ByIdWithinXsltFile,y as EmbeddingInAnotherFile,c as ExternalHtmlFile,r as ExternalHtmlFileInline,m as ExternalSvg,o as ExternalXsltFile,d as HtmlWithinHtmlFile,u as MathMLWithinHtmlFile,x as MissingIdWithinXsltFile,i as NoTag,p as SvgWithinHtmlFile,s as TemplateInPage,E as __namedExportsOrder,B as default};
315
+ }`,...f.parameters?.docs?.source}}};const H=["TemplateInPage","NoTag","ExternalSvg","ExternalXsltFile","ExternalHtmlFile","ExternalHtmlFileInline","HtmlWithinHtmlFile","SvgWithinHtmlFile","MathMLWithinHtmlFile","ByIdWithinXsltFile","MissingIdWithinXsltFile","EmbeddingInAnotherFile"];export{g as ByIdWithinXsltFile,f as EmbeddingInAnotherFile,r as ExternalHtmlFile,c as ExternalHtmlFileInline,o as ExternalSvg,m as ExternalXsltFile,d as HtmlWithinHtmlFile,u as MathMLWithinHtmlFile,x as MissingIdWithinXsltFile,i as NoTag,p as SvgWithinHtmlFile,s as TemplateInPage,H as __namedExportsOrder,b as default};
@@ -1,4 +1,4 @@
1
- import{w as i,e as n,u as e}from"./index-CxRwF5Or.js";import"./custom-element-D59Fok1f.js";function l(a){const{title:t,body:s}=a;return`
1
+ import{w as i,e as n,u as e}from"./index-Dr4PwNfd.js";import"./custom-element-CPnvJnn8.js";function l(a){const{title:t,body:s}=a;return`
2
2
  <fieldset>
3
3
  <legend>${t}</legend>
4
4
  ${s}
@@ -0,0 +1 @@
1
+ import{w as a}from"./index-Dr4PwNfd.js";async function r(t,e){const n=await e.findByTestId(t);return new Promise(o=>n.addEventListener("load",()=>{o(a(n.contentWindow?.document.documentElement))}))}export{r as f};