@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.
- package/.idea/inspectionProfiles/Project_Default.xml +2 -1
- package/.storybook/main.ts +3 -7
- package/.storybook/preview.ts +4 -6
- package/README.md +4 -4
- package/coverage/coverage-final.json +7 -18
- package/coverage/index.html +30 -30
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +719 -473
- package/coverage/src/custom-element/http-request.js/coverage.svg +1 -1
- package/coverage/src/custom-element/http-request.js.html +6 -6
- package/coverage/src/custom-element/index.html +29 -29
- package/coverage/src/custom-element/local-storage.js.html +1 -1
- package/coverage/src/custom-element/location-element.js.html +31 -31
- package/coverage/src/custom-element/module-url.js/coverage.svg +1 -1
- package/coverage/src/custom-element/module-url.js.html +20 -20
- package/coverage/src/index.html +1 -1
- package/coverage/src/mocks/handlers.ts.html +1 -1
- package/coverage/src/mocks/index.html +1 -1
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/{attributes.test.stories.ts → frame.canvas.ts}/coverage.svg +1 -1
- package/coverage/src/stories/frame.canvas.ts.html +175 -0
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +14 -179
- package/coverage/src/stories/testStoryBook.ts.html +8 -8
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-6slVaFEs.cjs +97 -0
- package/dist/custom-element-WnOqmEOe.js +609 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +30 -28
- package/dist/demo/a.html +51 -38
- package/dist/demo/attributes.html +153 -0
- package/dist/demo/data-slices.html +2 -2
- package/dist/demo/external-template.html +1 -0
- package/dist/demo/external-templates-sb-6.html +42 -0
- package/dist/demo/external-templates-sb-7.html +42 -0
- package/dist/demo/form.html +42 -0
- package/dist/demo/hex-grid-dce.html +1 -1
- package/dist/demo/hex-grid.html +1 -1
- package/dist/demo/html-template.html +1 -1
- package/dist/demo/module-url-sb-2.html +46 -0
- package/dist/demo/module-url-sb-4.html +48 -0
- package/dist/demo/module-url-sb-5.html +53 -0
- package/dist/demo/parameters.html +20 -1
- package/dist/demo/s.xml +66 -9
- package/dist/demo/s.xslt +89 -16
- package/dist/demo/ss.html +12 -22
- package/dist/mockServiceWorker.js +31 -8
- package/package.json +25 -26
- package/public/demo/a.html +51 -38
- package/public/demo/attributes.html +153 -0
- package/public/demo/data-slices.html +2 -2
- package/public/demo/external-template.html +1 -0
- package/public/demo/external-templates-sb-6.html +42 -0
- package/public/demo/external-templates-sb-7.html +42 -0
- package/public/demo/form.html +42 -0
- package/public/demo/hex-grid-dce.html +1 -1
- package/public/demo/hex-grid.html +1 -1
- package/public/demo/html-template.html +1 -1
- package/public/demo/module-url-sb-2.html +46 -0
- package/public/demo/module-url-sb-4.html +48 -0
- package/public/demo/module-url-sb-5.html +53 -0
- package/public/demo/parameters.html +20 -1
- package/public/demo/s.xml +66 -9
- package/public/demo/s.xslt +89 -16
- package/public/demo/ss.html +12 -22
- package/public/mockServiceWorker.js +31 -8
- package/src/custom-element/custom-element.d.ts +4 -0
- package/src/custom-element/custom-element.js +148 -66
- package/src/custom-element/demo/a.html +51 -38
- package/src/custom-element/demo/attributes.html +153 -0
- package/src/custom-element/demo/data-slices.html +2 -2
- package/src/custom-element/demo/external-template.html +1 -0
- package/src/custom-element/demo/form.html +42 -0
- package/src/custom-element/demo/hex-grid-dce.html +1 -1
- package/src/custom-element/demo/hex-grid.html +1 -1
- package/src/custom-element/demo/html-template.html +1 -1
- package/src/custom-element/demo/parameters.html +20 -1
- package/src/custom-element/demo/s.xml +66 -9
- package/src/custom-element/demo/s.xslt +89 -16
- package/src/custom-element/demo/ss.html +12 -22
- package/src/custom-element/ide/web-types-dce.json +1 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +1 -1
- package/src/material/components/badge.html +240 -0
- package/src/material/components/dropdown.html +26 -14
- package/src/material/components/icon-link.html +1 -0
- package/src/material/components/icon.html +253 -0
- package/src/material/components/input.html +571 -0
- package/src/material/components/menu.html +7 -5
- package/src/material/components.html +48 -11
- package/src/material/theme/semantic.css +20 -1
- package/src/mocks/versions.mock.ts +1 -1
- package/src/stories/__screenshots__/attributes.test.stories.ts +1 -0
- package/src/stories/__screenshots__/external-template.test.stories.ts +1 -0
- package/src/stories/__screenshots__/module-url.test.stories.ts +1 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-definition-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Attributes-runtime-change-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-Instance-Attributes-2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-cloneAs-el-newTag--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mergeAttr--from--to---3.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/attributes-mix-to-from--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-definition-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Attributes-runtime-change-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-Instance-Attributes-2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-cloneAs-el-newTag--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-headers-and-response-status-and-headers-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-delayed--5-seconds-response-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-http-request-with-error-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---2.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mergeAttr--from--to---3.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-mix-to-from--1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-url-and-slice-1.png +0 -0
- package/src/stories/__screenshots__/stories.test.ts/http-request-url-change-1.png +0 -0
- package/src/stories/attributes.test.stories.ts +177 -11
- package/src/stories/external-template.test.stories.ts +17 -15
- package/src/stories/frame.canvas.ts +31 -0
- package/src/stories/module-url.test.stories.ts +29 -61
- package/storybook-static/assets/Color-F6OSRLHC-Cbp293x2.js +1 -0
- package/storybook-static/assets/Configure-BrFr4SLE.js +165 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-DhHzJiIO.js +2 -0
- package/storybook-static/assets/attributes.test.stories-CzWkKw0e.js +1 -0
- package/storybook-static/assets/attributes.test.stories-Gg9LQTEK.js +349 -0
- package/storybook-static/assets/{css.test.stories-Cgn6ICr0.js → css.test.stories-B_3ltOrx.js} +1 -1
- package/storybook-static/assets/custom-element-CPnvJnn8.js +97 -0
- package/storybook-static/assets/{dom-merge.test.stories-CBObfPWg.js → dom-merge.test.stories-nQxcgLoM.js} +1 -1
- package/storybook-static/assets/entry-preview-docs-Dwczwtsc.js +2 -0
- package/storybook-static/assets/external-template.test.stories-BivZqBTp.js +1 -0
- package/storybook-static/assets/{external-template.test.stories-VfKUQ8eu.js → external-template.test.stories-DZ-rjnfd.js} +39 -41
- package/storybook-static/assets/{form.test.stories-CnuGN7Zw.js → form.test.stories-DQhPYtMj.js} +1 -1
- package/storybook-static/assets/frame.canvas-ClTqYyMN.js +1 -0
- package/storybook-static/assets/{handlers-V_T7WjNK.js → handlers-CLkps6Nz.js} +17 -14
- package/storybook-static/assets/{http-request.stories-8NN1Coqm.js → http-request.stories-jo0f73nw.js} +1 -1
- package/storybook-static/assets/iframe-CZwRpnn9.js +199 -0
- package/storybook-static/assets/index-B68YUdzy.js +621 -0
- package/storybook-static/assets/index-BwkS7JH_.js +8 -0
- package/storybook-static/assets/index-CJQtnF9V.js +1 -0
- package/storybook-static/assets/index-Dr4PwNfd.js +240 -0
- package/storybook-static/assets/{local-storage.test.stories-Dk5Yqc7m.js → local-storage.test.stories-uA5EKRPf.js} +1 -1
- package/storybook-static/assets/{location-element.test.stories-56um6s5L.js → location-element.test.stories-Cu-6Elcg.js} +1 -1
- package/storybook-static/assets/module-url.test.stories-CD_wusXQ.js +142 -0
- package/storybook-static/assets/module-url.test.stories-CTjUAk3J.js +1 -0
- package/storybook-static/assets/preview-1xJJ3sKE.js +1 -0
- package/storybook-static/assets/preview-BFlNN3Wj.js +1 -0
- package/storybook-static/assets/preview-CTOeX_lO.js +1 -0
- package/storybook-static/assets/preview-Cm4PPhHS.js +50 -0
- package/storybook-static/assets/preview-CuCH40jj.js +2 -0
- package/storybook-static/assets/preview-DfTudP20.js +1 -0
- package/storybook-static/assets/{set-url.test.stories-B4E6hIe-.js → set-url.test.stories-CY7B9BVZ.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-BR0F-B6I.js → slice-events.test.stories-BVnPXm6e.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-CgfJIyCr.js → slots.test.stories-Dxsa9KdA.js} +1 -1
- package/storybook-static/assets/{version-select.test.stories-nmxATIwv.js → version-select.test.stories-Buga1PAa.js} +1 -1
- package/storybook-static/demo/a.html +51 -38
- package/storybook-static/demo/attributes.html +153 -0
- package/storybook-static/demo/data-slices.html +2 -2
- package/storybook-static/demo/external-template.html +1 -0
- package/storybook-static/demo/external-templates-sb-6.html +42 -0
- package/storybook-static/demo/external-templates-sb-7.html +42 -0
- package/storybook-static/demo/form.html +42 -0
- package/storybook-static/demo/hex-grid-dce.html +1 -1
- package/storybook-static/demo/hex-grid.html +1 -1
- package/storybook-static/demo/html-template.html +1 -1
- package/storybook-static/demo/module-url-sb-2.html +46 -0
- package/storybook-static/demo/module-url-sb-4.html +48 -0
- package/storybook-static/demo/module-url-sb-5.html +53 -0
- package/storybook-static/demo/parameters.html +20 -1
- package/storybook-static/demo/s.xml +66 -9
- package/storybook-static/demo/s.xslt +89 -16
- package/storybook-static/demo/ss.html +12 -22
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +6 -10
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +31 -8
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +391 -0
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +230 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-9/manager-bundle.js +58 -58
- package/storybook-static/sb-manager/globals-module-info.js +9 -0
- package/storybook-static/sb-manager/globals-runtime.js +10719 -10473
- package/storybook-static/sb-manager/runtime.js +4944 -6321
- package/coverage/src/stories/attributes.test.stories.ts.html +0 -514
- package/coverage/src/stories/css.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/css.test.stories.ts.html +0 -460
- package/coverage/src/stories/dom-merge.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/dom-merge.test.stories.ts.html +0 -706
- package/coverage/src/stories/external-template.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/external-template.test.stories.ts.html +0 -865
- package/coverage/src/stories/form.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/form.test.stories.ts.html +0 -661
- package/coverage/src/stories/local-storage.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/local-storage.test.stories.ts.html +0 -1315
- package/coverage/src/stories/location-element.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/location-element.test.stories.ts.html +0 -523
- package/coverage/src/stories/module-url.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/module-url.test.stories.ts.html +0 -640
- package/coverage/src/stories/set-url.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/set-url.test.stories.ts.html +0 -433
- package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/slice-events.test.stories.ts.html +0 -952
- package/coverage/src/stories/slots.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/slots.test.stories.ts.html +0 -742
- package/coverage/src/stories/version-select.test.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/version-select.test.stories.ts.html +0 -397
- package/dist/custom-element-BbJMY20-.cjs +0 -97
- package/dist/custom-element-CoRNKeEP.js +0 -567
- package/storybook-static/assets/Color-F6OSRLHC-CFyd3TND.js +0 -1
- package/storybook-static/assets/Configure-UGTbPRKK.js +0 -165
- package/storybook-static/assets/DocsRenderer-CFRXHY34-Dpr5iB0o.js +0 -2
- package/storybook-static/assets/attributes.test.stories-DSOLHHOW.js +0 -152
- package/storybook-static/assets/custom-element-D59Fok1f.js +0 -97
- package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +0 -2
- package/storybook-static/assets/iframe-DnhkgdtG.js +0 -2
- package/storybook-static/assets/index-3Sfy-t3H.js +0 -769
- package/storybook-static/assets/index-BcZLpTeD.js +0 -8
- package/storybook-static/assets/index-CIBI7sCB.js +0 -1
- package/storybook-static/assets/index-CxRwF5Or.js +0 -234
- package/storybook-static/assets/index-D-8MO0q_.js +0 -1
- package/storybook-static/assets/index-DN1RoK17.js +0 -1
- package/storybook-static/assets/index-DjJD7gkO.js +0 -1
- package/storybook-static/assets/module-url.test.stories-DEponQ7l.js +0 -208
- package/storybook-static/assets/preview-BhhEZcNS.js +0 -1
- package/storybook-static/assets/preview-CNKoaWES.js +0 -1
- package/storybook-static/assets/preview-Czc-sw5H.js +0 -2
- package/storybook-static/assets/preview-DAeyCMnM.js +0 -1
- package/storybook-static/assets/preview-DHPc-V4N.js +0 -1
- package/storybook-static/assets/preview-DYzi3Z2p.js +0 -1
- package/storybook-static/assets/preview-vbpHsp94.js +0 -52
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +0 -333
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +0 -40
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +0 -391
- package/storybook-static/sb-addons/links-1/manager-bundle.js +0 -3
- package/storybook-static/sb-preview/globals.js +0 -33
- package/storybook-static/sb-preview/runtime.js +0 -7174
- package/test-runner-jest.config.js +0 -15
- /package/storybook-static/sb-addons/{essentials-actions-3 → essentials-actions-2}/manager-bundle.js.LEGAL.txt +0 -0
- /package/storybook-static/sb-addons/{essentials-controls-2 → essentials-controls-1}/manager-bundle.js.LEGAL.txt +0 -0
- /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-
|
|
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
|
|
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=
|
|
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")}},
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
|
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(
|
|
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
|
|
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}}};
|
|
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
|
-
}`,...
|
|
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
|
-
}`,...
|
|
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
|
-
}`,...
|
|
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
|
-
}`,...
|
|
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
|
-
|
|
252
|
-
|
|
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
|
|
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
|
-
<
|
|
269
|
-
|
|
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
|
|
279
|
-
expect(
|
|
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}}};
|
|
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
|
-
}`,...
|
|
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};
|
package/storybook-static/assets/{form.test.stories-CnuGN7Zw.js → form.test.stories-DQhPYtMj.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as i,e as n,u as e}from"./index-
|
|
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};
|