@epa-wg/custom-element-dist 0.0.27 → 0.0.28
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/.storybook/main.ts +2 -2
- package/README.md +4 -4
- package/coverage/coverage-final.json +22 -22
- package/coverage/index.html +18 -18
- 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 +490 -367
- package/coverage/src/custom-element/demo/index.html +1 -1
- package/coverage/src/custom-element/demo/z.js.html +1 -1
- package/coverage/src/custom-element/http-request.js.html +12 -12
- package/coverage/src/custom-element/index.html +19 -19
- package/coverage/src/custom-element/local-storage.js.html +52 -52
- package/coverage/src/custom-element/location-element.js.html +4 -4
- package/coverage/src/custom-element/module-url.js.html +1 -1
- 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/attributes.test.stories.ts.html +11 -2
- package/coverage/src/stories/css.test.stories.ts.html +8 -2
- package/coverage/src/stories/dom-merge.test.stories.ts.html +3 -3
- package/coverage/src/stories/external-template.test.stories.ts.html +8 -2
- package/coverage/src/stories/form.test.stories.ts.html +8 -2
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +1 -1
- package/coverage/src/stories/local-storage.test.stories.ts.html +24 -18
- package/coverage/src/stories/location-element.test.stories.ts.html +8 -2
- package/coverage/src/stories/module-url.test.stories.ts.html +8 -2
- package/coverage/src/stories/set-url.test.stories.ts.html +8 -2
- package/coverage/src/stories/slice-events.test.stories.ts.html +8 -2
- package/coverage/src/stories/slots.test.stories.ts.html +8 -2
- package/coverage/src/stories/testStoryBook.ts.html +12 -12
- package/coverage/src/stories/version-select.test.stories.ts.html +8 -2
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-BOIPgtxz.js +565 -0
- package/dist/custom-element-CUsSENWc.cjs +97 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +22 -21
- package/dist/demo/a.svg +26 -26
- package/dist/demo/s.xml +18 -3
- package/dist/demo/s.xslt +37 -54
- package/dist/demo/s1.xslt +59 -59
- package/dist/demo/ss.html +24 -57
- package/dist/demo/z.html +33 -33
- package/dist/demo/z.xml +59 -59
- package/dist/demo/z1.html +34 -34
- package/package.json +13 -13
- package/public/demo/a.svg +26 -26
- package/public/demo/s.xml +18 -3
- package/public/demo/s.xslt +37 -54
- package/public/demo/s1.xslt +59 -59
- package/public/demo/ss.html +24 -57
- package/public/demo/z.html +33 -33
- package/public/demo/z.xml +59 -59
- package/public/demo/z1.html +34 -34
- package/src/custom-element/custom-element.js +61 -20
- package/src/custom-element/demo/a.svg +26 -26
- package/src/custom-element/demo/s.xml +18 -3
- package/src/custom-element/demo/s.xslt +37 -54
- package/src/custom-element/demo/s1.xslt +59 -59
- package/src/custom-element/demo/ss.html +24 -57
- package/src/custom-element/demo/z.html +33 -33
- package/src/custom-element/demo/z.xml +59 -59
- package/src/custom-element/demo/z1.html +34 -34
- package/src/custom-element/ide/web-types-dce.json +1 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/dce-social-preview.png +0 -0
- package/src/material/angular.css +987 -0
- package/src/material/components/autocomplete.html +241 -0
- package/src/material/components/dropdown.html +115 -0
- package/src/material/components/menu.html +235 -0
- package/src/material/components.html +109 -0
- package/src/material/demo.css +31 -0
- package/src/material/index.html +169 -0
- package/src/material/material.css +357 -0
- package/src/material/theme/README.md +18 -0
- package/src/material/theme/semantic.css +112 -0
- package/src/mocks/versions.mock.ts +8 -8
- package/src/stories/attributes.test.stories.ts +3 -0
- package/src/stories/css.test.stories.ts +2 -0
- package/src/stories/dom-merge.test.stories.ts +2 -2
- package/src/stories/external-template.test.stories.ts +2 -0
- package/src/stories/form.test.stories.ts +2 -0
- package/src/stories/local-storage.test.stories.ts +2 -0
- package/src/stories/location-element.test.stories.ts +2 -0
- package/src/stories/module-url.test.stories.ts +2 -0
- package/src/stories/set-url.test.stories.ts +2 -0
- package/src/stories/slice-events.test.stories.ts +2 -0
- package/src/stories/slots.test.stories.ts +2 -0
- package/src/stories/version-select.test.stories.ts +2 -0
- package/storybook-static/assets/Color-ERTF36HU-ChyYtq0t.js +1 -0
- package/storybook-static/assets/Configure-CJVwFVjC.js +165 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-Bz6q-OqD.js +2 -0
- package/storybook-static/assets/{attributes.test.stories-Bt5V18qO.js → attributes.test.stories-BJBuuXgZ.js} +4 -4
- package/storybook-static/assets/{css.test.stories-CGYy2daE.js → css.test.stories-pgbBc17d.js} +1 -1
- package/storybook-static/assets/custom-element-BDGsYgbP.js +97 -0
- package/storybook-static/assets/{dom-merge.test.stories-XlsZ0UvX.js → dom-merge.test.stories-CXcYP_-J.js} +5 -5
- package/storybook-static/assets/entry-preview-C313OLrj.js +26 -0
- package/storybook-static/assets/{entry-preview-docs-BMKNVQXA.js → entry-preview-docs-B7ORr9w5.js} +2 -2
- package/storybook-static/assets/{external-template.test.stories-Bt_Pflu8.js → external-template.test.stories-CpJ68Ghy.js} +13 -13
- package/storybook-static/assets/{form.test.stories-B0NoI8wm.js → form.test.stories-D35lyqd8.js} +2 -2
- package/storybook-static/assets/{handlers-B5969HUu.js → handlers-B-OZtf2K.js} +6 -6
- package/storybook-static/assets/{http-request.stories-B2skuTFV.js → http-request.stories-DccXgHyF.js} +6 -6
- package/storybook-static/assets/iframe-Ddc_axoC.js +2 -0
- package/storybook-static/assets/index-BSz1w4Gl.js +234 -0
- package/storybook-static/assets/index-BdcJ-iJ7.js +8 -0
- package/storybook-static/assets/index-CiCdFubk.js +634 -0
- package/storybook-static/assets/{index-C7lvoJNv.js → index-f2MAjm2i.js} +1 -1
- package/storybook-static/assets/index-lY6s0fkU.js +1 -0
- package/storybook-static/assets/index-tfEkrhWr.js +1 -0
- package/storybook-static/assets/{local-storage.test.stories-DfY6feqG.js → local-storage.test.stories-BY-PWhuk.js} +5 -5
- package/storybook-static/assets/{location-element.test.stories-944AotIJ.js → location-element.test.stories-3auBYEaU.js} +3 -3
- package/storybook-static/assets/{module-url.test.stories-DSKcwApl.js → module-url.test.stories-B7L9cL60.js} +6 -6
- package/storybook-static/assets/{preview-0Jj89qip.js → preview-BRPR-UXC.js} +1 -1
- package/storybook-static/assets/{preview-AJR7rVPD.js → preview-BUQm51_C.js} +1 -1
- package/storybook-static/assets/{preview-DB9FwMii.js → preview-BWzBA1C2.js} +1 -1
- package/storybook-static/assets/preview-BhhEZcNS.js +1 -0
- package/storybook-static/assets/preview-CcS4DQh8.js +1 -0
- package/storybook-static/assets/{preview-CadgX-4y.js → preview-CfH4_OzN.js} +2 -2
- package/storybook-static/assets/{preview-FpHGYA1q.js → preview-DHPc-V4N.js} +1 -1
- package/storybook-static/assets/preview-DYzi3Z2p.js +1 -0
- package/storybook-static/assets/{preview-4Up_z4Em.js → preview-caVMbCIR.js} +2 -2
- package/storybook-static/assets/preview-ncvtW_hb.js +34 -0
- package/storybook-static/assets/{set-url.test.stories-DjLHKkEh.js → set-url.test.stories-CuSuDLIx.js} +3 -3
- package/storybook-static/assets/{slice-events.test.stories-8I_BrHd6.js → slice-events.test.stories-BkRKsKem.js} +4 -4
- package/storybook-static/assets/{slots.test.stories-CvZz4jyP.js → slots.test.stories-BJCUWFkE.js} +8 -8
- package/storybook-static/assets/{version-select.test.stories-DSxmJylI.js → version-select.test.stories-B3ybJn_Z.js} +2 -2
- package/storybook-static/demo/a.svg +26 -26
- package/storybook-static/demo/s.xml +18 -3
- package/storybook-static/demo/s.xslt +37 -54
- package/storybook-static/demo/s1.xslt +59 -59
- package/storybook-static/demo/ss.html +24 -57
- package/storybook-static/demo/z.html +33 -33
- package/storybook-static/demo/z.xml +59 -59
- package/storybook-static/demo/z1.html +34 -34
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +3 -7
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +9 -9
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +76 -94
- 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 +211 -0
- package/storybook-static/sb-addons/interactions-9/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +11 -0
- package/storybook-static/sb-manager/globals-runtime.js +27803 -26928
- package/storybook-static/sb-manager/runtime.js +10341 -10136
- package/storybook-static/sb-preview/runtime.js +3841 -3828
- package/.idea/custom-element-dist.iml +0 -9
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/dist/custom-element-BMMsP1Dy.js +0 -533
- package/dist/custom-element-CPSk7s0j.cjs +0 -87
- package/storybook-static/assets/Color-KGDBMAHA-CJo5gHY3.js +0 -1
- package/storybook-static/assets/Configure-DdXbGKhY.js +0 -173
- package/storybook-static/assets/DocsRenderer-PKQXORMH-DLnpL5hE.js +0 -2
- package/storybook-static/assets/custom-element-D8hcDZHh.js +0 -265
- package/storybook-static/assets/entry-preview-BKQ8UCxI.js +0 -8
- package/storybook-static/assets/iframe-Dfrt81rk.js +0 -2
- package/storybook-static/assets/index-Ay195x2L.js +0 -605
- package/storybook-static/assets/index-C3ChPTMh.js +0 -1
- package/storybook-static/assets/index-C8k3Z-3Y.js +0 -28
- package/storybook-static/assets/index-DGdNYaqV.js +0 -8
- package/storybook-static/assets/index-Gpdhz4ab.js +0 -1
- package/storybook-static/assets/lit-element-DzhCn-8W.js +0 -19
- package/storybook-static/assets/preview-BJPLiuSt.js +0 -1
- package/storybook-static/assets/preview-BMWqy4Bi.js +0 -1
- package/storybook-static/assets/preview-BnWGZYux.js +0 -1
- package/storybook-static/assets/preview-Djh1_Tal.js +0 -20
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +0 -336
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +0 -77
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +0 -234
- /package/{storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt → src/material/guide/getting-started/index.html} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-tfEkrhWr.js","./index-f2MAjm2i.js","./index-CiCdFubk.js","./iframe-Ddc_axoC.js","./index-BdcJ-iJ7.js","./index-D-8MO0q_.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as h}from"./iframe-Ddc_axoC.js";import{af as d,ag as s,ah as E,ai as v,aj as R,ae as n,ak as w}from"./index-CiCdFubk.js";import"../sb-preview/runtime.js";import"./index-BdcJ-iJ7.js";import"./index-D-8MO0q_.js";import"./index-DrFu-skq.js";var l,u=d;l=u.createRoot,u.hydrateRoot;var a=new Map;function _(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var f=({callback:e,children:t})=>{let r=s.useRef();return s.useLayoutEffect(()=>{r.current!==e&&(r.current=e,e())},[e]),t};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,t=null;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}});var g=async(e,t,r)=>{let o=await y(t,r);if(_()){o.render(e);return}let{promise:i,resolve:c}=Promise.withResolvers();return o.render(s.createElement(f,{callback:c},e)),i},x=(e,t)=>{let r=a.get(e);r&&(r.unmount(),a.delete(e))},y=async(e,t)=>{let r=a.get(e);return r||(r=l(e,t),a.set(e,r)),r},D={code:E,a:v,...R},C=class extends s.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:n.createElement(n.Fragment,null,t)}},O=class{constructor(){this.render=async(e,t,r)=>{let o={...D,...t?.components},i=w;return new Promise((c,p)=>{h(async()=>{const{MDXProvider:m}=await import("./index-tfEkrhWr.js");return{MDXProvider:m}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url).then(({MDXProvider:m})=>g(n.createElement(C,{showException:p,key:Math.random()},n.createElement(m,{components:o},n.createElement(i,{context:e,docsParameter:t}))),r)).then(()=>c())})},this.unmount=e=>{x(e)}}};export{O as DocsRenderer,D as defaultComponents};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as o,e}from"./
|
|
1
|
+
import{w as o,e}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";function s(i){return new Promise(a=>setTimeout(a,i))}function r(i){const{title:a,body:t}=i;return`
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>${a}</legend>
|
|
4
4
|
${t}
|
|
@@ -68,7 +68,7 @@ import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";f
|
|
|
68
68
|
play: async ({
|
|
69
69
|
canvasElement
|
|
70
70
|
}) => {
|
|
71
|
-
const titleText =
|
|
71
|
+
const titleText = AttributeDefaults.args!.title as string;
|
|
72
72
|
const canvas = within(canvasElement),
|
|
73
73
|
code = async id => (await canvas.findByTestId(id)).textContent.trim();
|
|
74
74
|
expect(await await canvas.findByTestId('p1')).toHaveTextContent('default_P1');
|
|
@@ -101,7 +101,7 @@ import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";f
|
|
|
101
101
|
play: async ({
|
|
102
102
|
canvasElement
|
|
103
103
|
}) => {
|
|
104
|
-
const titleText =
|
|
104
|
+
const titleText = AttributeDefaults.args!.title as string;
|
|
105
105
|
const canvas = within(canvasElement),
|
|
106
106
|
code = async id => (await canvas.findByTestId(id)).textContent.trim();
|
|
107
107
|
await sleep(20);
|
|
@@ -139,7 +139,7 @@ import{w as o,e}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.js";f
|
|
|
139
139
|
play: async ({
|
|
140
140
|
canvasElement
|
|
141
141
|
}) => {
|
|
142
|
-
const titleText =
|
|
142
|
+
const titleText = AttributeDefaults.args!.title as string;
|
|
143
143
|
const canvas = within(canvasElement),
|
|
144
144
|
code = async id => (await canvas.findByTestId(id)).textContent.trim();
|
|
145
145
|
await sleep(20);
|
package/storybook-static/assets/{css.test.stories-CGYy2daE.js → css.test.stories-pgbBc17d.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as i,e as t}from"./
|
|
1
|
+
import{w as i,e as t}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";const g={title:"",tag:"",style:"",slot:"",payload:""};function p(n){const{title:e,tag:o,style:s,slot:a,payload:l}={...g,...n};return`
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>${e}</legend>
|
|
4
4
|
<custom-element ${o?`tag="${o}"`:""} >
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
const W="http://www.w3.org/1999/XSL/Transform",V="http://www.w3.org/1999/xhtml",ue="http://exslt.org/common",f=(e,l)=>e.getAttribute?.(l),Z=e=>e.nodeType===3,de=e=>typeof e=="string",pe=e=>e&&typeof e.nodeType=="number",$=(e,l)=>(e.ownerDocument||e).createTextNode(l),se=e=>{for(;e.firstChild;)e.firstChild.remove();return e},_=e=>(e.getAttributeNames().map(l=>e.removeAttribute(l)),se(e)),le=e=>(e?.setAttribute("xmlns:xsl",W),e),ne=e=>(e?.setAttribute("xmlns:xhtml",V),le(e)),ae=e=>/^[_a-zA-Z][-_:a-zA-Z0-9]*$/.test(e),w=(e,l="",t=document)=>{const s=i=>(r=>(l&&r.append($(t.ownerDocument||t,l)),r))((t.ownerDocument||t).createElement(i));if(ae(e))return s(e);const n=s("dce-object");return n.setAttribute("dce-object-name",e),n},J=(e,l)=>{const t=e.ownerDocument.createElementNS(e.namespaceURI,l);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);return t};function j(e){return new DOMParser().parseFromString(e,"application/xml")}function X(e){return new XMLSerializer().serializeToString(e)}function H(e,l,t,s){const n=x=>e.ownerDocument.createElement(x),r=((x,p,u)=>(p.append(u=n(x)),u))(l,e);return[...t].forEach(x=>r.append(s(x))),r}function fe(e){return e.slot||(e.setAttribute||(e=w("span",e.textContent.replaceAll(`
|
|
2
|
+
`,""))),e.setAttribute("slot","")),e}function K(e,l){e.getAttributeNames().forEach(t=>l.includes(t)||e.removeAttribute(t))}const Q=e=>[...e].filter(l=>!(l.nodeType===3&&l.data.trim()===""));function D(e,l,t){const s=typeof e;if(s==="string")return w(l,e,t);if(s==="number")return w(l,""+e,t);if(e instanceof Array){const i=w("array","",t);return e.map(r=>i.append(D(r,l,t))),i}if(e instanceof FormData){const i=w("form-data","",t);for(const r of e)i.append(D(r[1],r[0],t));return i}const n=w(l,"",t);for(let i in e)pe(e[i])||typeof e[i]=="function"||e[i]instanceof Window||(typeof e[i]!="object"&&ae(i)?n.setAttribute(i,e[i]):n.append(D(e[i],i,t)));return n}function ee(e){if(L(e,"*",l=>[...l.childNodes].filter(t=>t.nodeType===3&&t.parentNode.localName!=="style"&&t.data).forEach(t=>{const s=t.data,n=s.matchAll(/{([^}]*)}/g);if(n){let i=0,r=p=>$(t,p),x=[];if([...n].forEach(p=>{p.index>i&&x.push(r(p.input.substring(i,p.index)));const u=e.querySelector("value-of").cloneNode();u.setAttribute("select",p[1]),x.push(u),i=p.index+p[0].length}),i<s.length&&x.push(r(s.substring(i,s.length))),x.length){for(let p of x)l.insertBefore(p,t);l.removeChild(t)}}})),"all"in e){let l=1;for(let t of e.all)t.setAttribute&&!t.tagName.startsWith("xsl:")&&t.setAttribute("data-dce-id",""+l++)}return e}function he(e,l="xsl:stylesheet"){if(e.tagName===l||e.documentElement?.tagName===l)return ee(e);const t=j(`<xsl:stylesheet version="1.0" xmlns:xsl="${W}" xmlns:xhtml="${V}" xmlns:exsl="${ue}" exclude-result-prefixes="exsl" >
|
|
3
|
+
<xsl:output method="xml"/>
|
|
4
|
+
<xsl:template match="/"><dce-root xmlns="${V}"><xsl:apply-templates select="*" /></dce-root></xsl:template>
|
|
5
|
+
<xsl:template match="*[name()='template']">
|
|
6
|
+
<xsl:apply-templates mode="sanitize" select="*|text()"/>
|
|
7
|
+
</xsl:template>
|
|
8
|
+
<xsl:template match="*">
|
|
9
|
+
<xsl:apply-templates mode="sanitize" select="*|text()"/>
|
|
10
|
+
</xsl:template>
|
|
11
|
+
<xsl:template match="*[name()='svg']|*[name()='math']">
|
|
12
|
+
<xsl:apply-templates mode="sanitize" select="."/>
|
|
13
|
+
</xsl:template>
|
|
14
|
+
<xsl:template mode="sanitize" match="*[count(text())=1 and count(*)=0]">
|
|
15
|
+
<xsl:copy>
|
|
16
|
+
<xsl:apply-templates mode="sanitize" select="@*"/>
|
|
17
|
+
<xsl:value-of select="text()"></xsl:value-of>
|
|
18
|
+
</xsl:copy>
|
|
19
|
+
</xsl:template>
|
|
20
|
+
<xsl:template mode="sanitize" match="xhtml:*[count(text())=1 and count(*)=0]">
|
|
21
|
+
<xsl:element name="{local-name()}">
|
|
22
|
+
<xsl:apply-templates mode="sanitize" select="@*"/>
|
|
23
|
+
<xsl:value-of select="text()"></xsl:value-of>
|
|
24
|
+
</xsl:element>
|
|
25
|
+
</xsl:template>
|
|
26
|
+
<xsl:template mode="sanitize" match="*|@*">
|
|
27
|
+
<xsl:copy>
|
|
28
|
+
<xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
|
|
29
|
+
</xsl:copy>
|
|
30
|
+
</xsl:template>
|
|
31
|
+
<xsl:template mode="sanitize" match="text()[normalize-space(.) = '']"/>
|
|
32
|
+
<xsl:template mode="sanitize" match="text()">
|
|
33
|
+
<dce-text>
|
|
34
|
+
<xsl:copy/>
|
|
35
|
+
</dce-text>
|
|
36
|
+
</xsl:template>
|
|
37
|
+
<xsl:template mode="sanitize" match="xsl:value-of|*[name()='slot']">
|
|
38
|
+
<xsl:copy>
|
|
39
|
+
<xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
|
|
40
|
+
</xsl:copy>
|
|
41
|
+
</xsl:template>
|
|
42
|
+
<xsl:template mode="sanitize" match="xhtml:*">
|
|
43
|
+
<xsl:element name="{local-name()}">
|
|
44
|
+
<xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
|
|
45
|
+
</xsl:element>
|
|
46
|
+
</xsl:template>
|
|
47
|
+
<xsl:template mode="sanitize" match="xhtml:input">
|
|
48
|
+
<xsl:element name="{local-name()}">
|
|
49
|
+
<xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
|
|
50
|
+
</xsl:element>
|
|
51
|
+
<xsl:for-each select="*">
|
|
52
|
+
<xsl:copy>
|
|
53
|
+
<xsl:attribute name="for" >^</xsl:attribute>
|
|
54
|
+
<xsl:apply-templates mode="sanitize" select="*|@*|text()"/>
|
|
55
|
+
</xsl:copy>
|
|
56
|
+
</xsl:for-each>
|
|
57
|
+
</xsl:template>
|
|
58
|
+
</xsl:stylesheet>`),s=new XSLTProcessor,n=(a=>{L(a,"custom-element",b=>{b.firstElementChild.localName==="template"&&([...b.firstElementChild.content.childNodes].forEach(y=>b.append(y)),b.firstElementChild.remove())}),L(a,"script",b=>b.remove());const c=a.content??a.firstElementChild?.content??a.body??a;Ae.forEach(b=>L(c,b,y=>we(y,c)));const N=a.firstElementChild?.content||a.content,E=b=>{const y=j("<xhtml/>"),M=y.importNode(b,!0);return y.replaceChild(M,y.documentElement),ne(M)};if(N){const b=w("div");return[...N.childNodes].map(y=>b.append(y.cloneNode(!0))),E(b)}return E(a.documentElement||a.body||a)})(e),i=j(`<xsl:stylesheet version="1.0"
|
|
59
|
+
xmlns:xsl="${W}"
|
|
60
|
+
xmlns:xhtml="${V}"
|
|
61
|
+
xmlns:dce="urn:schemas-epa-wg:dce"
|
|
62
|
+
xmlns:exsl="http://exslt.org/common"
|
|
63
|
+
exclude-result-prefixes="exsl"
|
|
64
|
+
>
|
|
65
|
+
<xsl:template match="ignore">
|
|
66
|
+
<xsl:choose>
|
|
67
|
+
<xsl:when test="//attr">{//attr}</xsl:when>
|
|
68
|
+
<xsl:otherwise>{def}</xsl:otherwise>
|
|
69
|
+
</xsl:choose><xsl:value-of select="."></xsl:value-of></xsl:template>
|
|
70
|
+
<xsl:template mode="payload" match="attributes"></xsl:template>
|
|
71
|
+
<xsl:template match="/">
|
|
72
|
+
<xsl:apply-templates mode="payload" select="/datadom/attributes"/>
|
|
73
|
+
</xsl:template>
|
|
74
|
+
<xsl:template name="slot" >
|
|
75
|
+
<xsl:param name="slotname" />
|
|
76
|
+
<xsl:param name="defaultvalue" />
|
|
77
|
+
<xsl:choose>
|
|
78
|
+
<xsl:when test="//payload/*[@slot=$slotname]">
|
|
79
|
+
<xsl:copy-of select="//payload/*[@slot=$slotname]"/>
|
|
80
|
+
</xsl:when>
|
|
81
|
+
<xsl:otherwise>
|
|
82
|
+
<xsl:copy-of select="$defaultvalue"/>
|
|
83
|
+
</xsl:otherwise>
|
|
84
|
+
</xsl:choose>
|
|
85
|
+
</xsl:template>
|
|
86
|
+
<xsl:variable name="js-injected-body">
|
|
87
|
+
<xsl:call-template name="slot" >
|
|
88
|
+
<xsl:with-param name="slotname" select="''"/>
|
|
89
|
+
<xsl:with-param name="defaultvalue"/>
|
|
90
|
+
</xsl:call-template>
|
|
91
|
+
</xsl:variable>
|
|
92
|
+
</xsl:stylesheet>`);s.importStylesheet(t);const r=s.transformToFragment(n,document),x=(a,c)=>a.querySelector(c),p=x(i,'template[mode="payload"]');if(!r)return console.error("transformation error",{xml:n.outerHTML,xsl:X(t)});if(r.firstElementChild.localName!=="dce-root"){const a=r.ownerDocument.createElement("dce-root");[...r.childNodes].forEach(c=>a.append(c)),r.append(a)}const u=[];[...r.querySelectorAll("dce-root>attribute")].forEach(a=>{K(a,"namespace,name,select");const c=J(a,"xsl:param"),N=f(a,"name");p.append(c),K(c,"select,name");let E=f(c,"select")?.split("??");E||(E=["//"+N,`'${c.textContent}'`],_(c),c.setAttribute("name",N));let b;if(E?.length>1){c.removeAttribute("select");const y=x(i,'template[match="ignore"]>choose').cloneNode(!0);_(y.firstElementChild).append($(y,"{"+E[0]+"}")),_(y.lastElementChild).append($(y,"{"+E[1]+"}")),y.firstElementChild.setAttribute("test",E[0]),c.append(y),b=y.cloneNode(!0)}else b=J(a,"xsl:value-of");b.removeAttribute("name"),a.append(b),a.removeAttribute("select"),u.push(c)}),[...r.querySelectorAll("[value]")].filter(a=>a.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach(a=>{const c=f(a,"value");c&&a.setAttribute("value",Ne(c))});for(const a of r.childNodes)p.append(i.importNode(a,!0));[...p.getElementsByTagName("xsl:template")].forEach(a=>p.ownerDocument.documentElement.append(a));const q=x(i,'call-template[name="slot"]'),d=a=>{const c=q.cloneNode(!0),N=f(a,"name");N&&c.firstElementChild.setAttribute("select",`'${N}'`);for(let E of a.childNodes)c.lastElementChild.append(E);return c};L(p,"slot",a=>a.parentNode.replaceChild(d(a),a));const m=ee(i);return m.params=u,m}async function xe(e){return await new Promise((t,s)=>{const n=new XMLHttpRequest;n.open("GET",e),n.responseType="document",n.onload=()=>{n.readyState===n.DONE&&n.status===200?t(n.responseXML?.body||n.responseXML||w("div",n.responseText)):s(`${n.statusText} - ${e}`)},n.addEventListener("error",i=>s(i)),n.send()})}const ie=e=>e.split("|").map(l=>l.trim()).filter(l=>l),be=(e,l)=>ie(l).map(t=>{let s=e.ownerDocument,n=i=>(e.append(i),i);if(t.includes("/")){const i=[],r=s.evaluate(t,e);for(let x;x=r.iterateNext();)i.push(x);return i}return[...e.childNodes].find(i=>i.localName===t)||n(w(t,"",s))}).flat();function te(e,l,t,s){if(!t.sliceProcessed)return t.sliceProcessed=1,be(e,l??"").map(n=>{const i=e.ownerDocument,r=t.sliceEventSource,x=t.sliceElement,p=()=>[...n.childNodes].filter(u=>u.nodeType===3||u.localName==="value"||u.localName==="form-data").map(u=>u.remove());if(r.getAttributeNames().map(u=>n.setAttribute(u,f(r,u))),[...n.childNodes].filter(u=>u.localName==="event").map(u=>u.remove()),"validationMessage"in r&&n.setAttribute("validation-message",r.validationMessage),t.type==="init"&&p(),n.append(D(t,"event",i)),x.hasAttribute("slice-value")){r.value===void 0?n.removeAttribute("value"):n.setAttribute("value",r.value);const u=z(f(x,"slice-value"),n);p(),n.append($(i,u))}else{if("elements"in r)return p(),n.append(D(new FormData(r),"value",n.ownerDocument)),n;const u=r.value??f(r,"value");p(),u==null?[...n.childNodes].filter(T=>T.localName!=="event").map(T=>T.remove()):de(u)?n.append($(i,u)):n.append(D(u,"value",n.ownerDocument))}return n})}function L(e,l,t){e.querySelectorAll&&[...e.querySelectorAll(l)].forEach(t)}const ye=async(e,l)=>{if(!e||!e.trim())return[l];if(e.startsWith("#"))return(t=>{const s=t.querySelectorAll(e);return[...s.length?s:t.getRootNode().querySelectorAll(e)]})(l.parentElement);try{const[t,s]=e.split("#");if(e.charAt(0)===".")e=new URL(t,l.closest("[base]")?.getAttribute("base")||location).href;else try{e=import.meta.resolve(t),s&&(e+="#"+s)}catch(i){console.error(i.message)}const n=await xe(e);if(l.setAttributeNS("xml","base",e),s){const i=n.querySelectorAll("#"+s);return i.length?[...i]:(console.error("template not found",e+"#"+s),[l])}return[n]}catch{return[l]}};function ve(e,l){for(let t of e.attributes)t.namespaceURI?l.setAttributeNS(t.namespaceURI,t.name,t.value):l.setAttribute(t.name,t.value),t.name==="value"&&(l.value=t.value)}function oe(e,l=0){const t={};for(const s of e.childNodes){const n=f(s,"data-dce-id")||s.dceId||0;if(!t[n])n?t[n]=1:(t[n]=s.dceId=++l,s.setAttribute&&s.setAttribute("data-dce-id",s.dceId));else{const i=s.dceId=n+"-"+t[n]++;s.setAttribute&&s.setAttribute("data-dce-id",i)}s.childNodes.length&&oe(s)}}function ge(e,l,t){t=1*t;for(let s of e.childNodes)if((s.dceId??s.getAttribute("data-dce-id")*1)>t)return e.insertBefore(l,s);e.append(l)}function re(e,l){if(e.firstElementChild?.localName==="dce-root"&&l[0].localName!=="dce-root")return;if(!l.length)return e.firstElementChild?.localName!=="dce-root"&&se(e);const t={};for(let s of e.childNodes)t[s.dceId],Z(s)?(s.data.trim(),t[s.dceId||0]=s):t[f(s,"data-dce-id")||0]=s;for(let s of[...l]){const n=f(s,"data-dce-id")||s.dceId,i=t[n];i?(Z(s)?i.nodeValue!==s.nodeValue&&(i.nodeValue=s.nodeValue):(ve(s,i),(i.childNodes.length||s.childNodes.length)&&re(i,s.childNodes)),delete t[n]):ge(e,s,n)}for(let s of Object.values(t))s.localName!=="dce-root"&&s.remove()}function Ee(e,l){return e.hasAttribute(l)||e.setAttribute(l,crypto.randomUUID()),e.getAttribute(l)}const Ne=e=>[...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map(t=>`${t[1]}{${Y(t[3])}}${t[4]}`).join(""),Y=e=>{if(!e.trim())return e;const l=e.split("??"),t=l.shift(),s=Y(l.join("??"));return l.length?`concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )`:e},z=(e,l)=>{const t=e.split("??");if(t.length>1)return z(t[0],l)||z(t[1],l);e=Y(e);const s=l.ownerDocument.evaluate(e,l);switch(s.resultType){case XPathResult.NUMBER_TYPE:return s.numberValue;case XPathResult.STRING_TYPE:return s.stringValue;case XPathResult.BOOLEAN_TYPE:return s.booleanValue}let n="";for(let i;i=s.iterateNext();)n+=i.textContent;return n},Ae="stylesheet,transform,import,include,strip-space,preserve-space,output,key,decimal-format,namespace-alias,value-of,copy-of,number,apply-templates,apply-imports,for-each,sort,if,choose,when,otherwise,attribute-set,call-template,with-param,variable,param,text,processing-instruction,element,attribute,comment,copy,message,fallback".split(","),we=(e,l)=>{const t=w("xsl:"+e.localName);for(let s of e.attributes)t.setAttribute(s.name,s.value);for(;e.firstChild;)t.append(e.firstChild);if(e.parentElement)e.parentElement.replaceChild(t,e);else{const s=e.parentElement||l,n=[...s.childNodes];n.forEach((i,r)=>{i===e&&(n[r]=t)}),s.replaceChildren(...n)}};class Te extends HTMLElement{static observedAttributes=["src","tag","hidden"];async connectedCallback(){this.firstElementChild&&this.firstElementChild.localName!=="template"&&console.warn(`custom-element used without template wrapping content
|
|
93
|
+
`,this.outerHTML);const l=await ye(f(this,"src"),this),t=f(this,"tag"),s=t||"dce-"+crypto.randomUUID();for(const d of l)L(d.templateNode||d.content||d,"style",m=>{const a=m.closest("slot"),c=a?`slot[name="${a.name}"]`:"";m.innerHTML=`${s} ${c}{${m.innerHTML}}`,this.append(m)});const n=l.map(d=>he(d)),i=n.map((d,m)=>{m=new XSLTProcessor;try{m.importStylesheet(d)}catch(a){console.error(a,X(d))}return m});Object.defineProperty(this,"xsltString",{get:()=>n.map(d=>X(d)).join(`
|
|
94
|
+
`)});const r=this,x=[...this.templateNode.querySelectorAll("[slice]")],p=x.map(d=>f(d,"slice")).filter(d=>!d.includes("/")).filter((d,m,a)=>a.indexOf(d)===m).map(ie).flat(),u=n.reduce((d,m)=>(m.params&&d.push(...m.params),d),[]);class T extends HTMLElement{static get observedAttributes(){return u.map(m=>f(m,"name"))}#e=0;connectedCallback(){let m=Q(this.childNodes);if(this.firstElementChild?.tagName==="TEMPLATE"){this.firstElementChild!==this.lastElementChild&&console.error("payload should have TEMPLATE as only child",this.outerHTML);const h=this.firstElementChild;h.remove(),m=Q(h.content.childNodes);for(const v of m)if(v.localName==="style"){const o=Ee(this,"data-dce-style");v.innerHTML=`${s}[data-dce-style="${o}"]{${v.innerHTML}}`,h.insertAdjacentElement("beforebegin",v)}else v.nodeType===1?h.insertAdjacentElement("beforebegin",v):v.nodeType===3&&h.insertAdjacentText("beforebegin",v.data)}const a=j("<datadom/>").documentElement,c=(h,v="")=>(o=>(v&&o.append($(a,v)),o))(a.ownerDocument.createElement(h)),N=H(a,"payload",m,fe);le(N),ne(N),this.innerHTML="";const E=H(a,"attributes",this.attributes,h=>c(h.nodeName,h.value));H(a,"dataset",Object.keys(this.dataset),h=>c(h,this.dataset[h]));const b=H(a,"slice",p,h=>c(h,"")),y=h=>z(h,b);this.xml=a;const M=[],G=()=>{const h={};for(let v;v=M.pop();){const o=f(v.sliceElement,"slice");h[o]||(te(b,o,v),h[o]=v)}Object.keys(h).length!==0&&U()};let O;this.onSlice=h=>{M.push(h),O||(O=setTimeout(()=>{G(),O=0},1))};const U=this.transform=()=>{if(this.#e)debugger;this.#e=1,i.map((o,g)=>{const S=o.transformToFragment(a.ownerDocument,document);return S||console.error(`XSLT transformation error. xsl:
|
|
95
|
+
`,X(n[g]),`
|
|
96
|
+
xml:
|
|
97
|
+
`,X(a)),S}).map(o=>{o&&(oe(o),re(this,o.childNodes))}),T.observedAttributes.map(o=>{let g=f(this.firstElementChild,o);g!==f(this,o)&&(this.setAttribute(o,g),this.#t(o,g))});function v(o){let g=o;if(o.localName==="slice"){const S=f(o,"for");if(S||(g=o.parentElement),S==="^")do g=g.previousElementSibling;while(g.localName==="slice");else g=this.querySelector(S);if(!g)return console.warn(`can not find selector in "slice for=${S}" `,o.outerHTML);f(o,"slice")||o.setAttribute("slice",f(o,"name"))}return g}L(this,"[slice],[slice-event]",o=>{let g=f(o,"slice-event");const S=o.hasAttribute("slice-value")||o.hasAttribute("value")||o.value,P=v(o);o.dceInitialized||(o.dceInitialized=1,P.hasAttribute("custom-validity")&&(g+=" change submit"),[...new Set((g||"change").split(" "))].forEach(ce=>P.addEventListener(ce,A=>{A.sliceElement=o,A.sliceEventSource=A.currentTarget||A.target,A.sliceProcessed=0;const me=te(b,f(A.sliceElement,"slice"),A);L(this,"[custom-validity]",R=>{if(!R.setCustomValidity)return;const F=f(R,"custom-validity");try{const I=F&&z(F,E);R.setCustomValidity(I===!0?"":I===!1?"invalid":I)}catch(I){console.error(I,"xPath",F)}});const k=f(P,"custom-validity"),C=k&&z(k,E),B=C===!0?"":C;if(k){if(o.setCustomValidity?o.setCustomValidity(B):o.validationMessage=B,me.map(R=>R.setAttribute("validation-message",B)),A.type==="submit")return C===!0?void 0:(setTimeout(U,1),!!C===C?(C||A.preventDefault(),C):C?(A.preventDefault(),!1):void 0);setTimeout(U,1)}this.onSlice(A)})),(!g||g.includes("init"))&&(S?this.onSlice({type:"init",target:P,sliceElement:o,sliceEventSource:P}):o.value=y(f(o,"slice"))))}),this.#e=0};U(),G()}#t(m,a){m==="value"&&(this.value=a);let c=this.xml.querySelector(`attributes>${m}`);c?_(c).append($(c,a)):(c=w(m,a,this.xml),this.xml.querySelector("attributes").append(c)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{[m]:a}}))}attributeChangedCallback(m,a,c){!this.xml||this.#e||(this.#t(m,c),this.transform())}get dce(){return r}}const q=d=>{window.customElements.get(d)!==T&&window.customElements.define(d,T)};if(t)q(t);else{const d=s;this.setAttribute("tag",d),q(d);const m=document.createElement(d);this.getAttributeNames().forEach(a=>m.setAttribute(a,this.getAttribute(a))),m.append(...[...this.childNodes].filter(a=>a.localName!=="style")),this.append(m)}}get templateNode(){return this.firstElementChild?.tagName==="TEMPLATE"?this.firstElementChild.content:this}get dce(){return this}get xslt(){return j(this.xsltString)}}window.customElements.define("custom-element",Te);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as d,e as a,u as c,f as u}from"./
|
|
1
|
+
import{w as d,e as a,u as c,f as u}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";function p(n){return new Promise(e=>setTimeout(e,n))}function m(n){const{title:e,body:t}=n;return`
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>${e}</legend>
|
|
4
4
|
${t}
|
|
@@ -110,7 +110,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
|
|
|
110
110
|
play: async ({
|
|
111
111
|
canvasElement
|
|
112
112
|
}) => {
|
|
113
|
-
const titleText =
|
|
113
|
+
const titleText = CharsCountInTextarea.args!.title as string;
|
|
114
114
|
const canvas = within(canvasElement);
|
|
115
115
|
await canvas.findByText(titleText);
|
|
116
116
|
await sleep(100);
|
|
@@ -163,7 +163,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
|
|
|
163
163
|
play: async ({
|
|
164
164
|
canvasElement
|
|
165
165
|
}) => {
|
|
166
|
-
const titleText =
|
|
166
|
+
const titleText = WordCountOnType.args!.title as string;
|
|
167
167
|
const canvas = within(canvasElement);
|
|
168
168
|
await canvas.findByText(titleText);
|
|
169
169
|
const input = await canvas.findByTestId('input-id');
|
|
@@ -207,7 +207,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
|
|
|
207
207
|
play: async ({
|
|
208
208
|
canvasElement
|
|
209
209
|
}) => {
|
|
210
|
-
const titleText =
|
|
210
|
+
const titleText = OrderPreservingOn2ndTransform.args!.title as string;
|
|
211
211
|
const canvas = within(canvasElement);
|
|
212
212
|
await canvas.findByText(titleText);
|
|
213
213
|
|
|
@@ -247,7 +247,7 @@ import{w as d,e as a,u as c,f as u}from"./custom-element-D8hcDZHh.js";import"./i
|
|
|
247
247
|
play: async ({
|
|
248
248
|
canvasElement
|
|
249
249
|
}) => {
|
|
250
|
-
const titleText =
|
|
250
|
+
const titleText = ReadSystemValidityMessage.args!.title as string;
|
|
251
251
|
const canvas = within(canvasElement);
|
|
252
252
|
await canvas.findByText(titleText);
|
|
253
253
|
await userEvent.type(canvas.getByTestId('inp1'), 'Hi');
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{d as ot}from"./index-DrFu-skq.js";/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const U=globalThis,L=U.ShadowRoot&&(U.ShadyCSS===void 0||U.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,G=Symbol(),z=new WeakMap;let ht=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==G)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(L&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=z.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&z.set(e,t))}return t}toString(){return this.cssText}};const lt=r=>new ht(typeof r=="string"?r:r+"",void 0,G),at=(r,t)=>{if(L)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=U.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},B=L?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return lt(e)})(r):r;/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const{is:ct,defineProperty:dt,getOwnPropertyDescriptor:pt,getOwnPropertyNames:ut,getOwnPropertySymbols:$t,getPrototypeOf:_t}=Object,H=globalThis,D=H.trustedTypes,ft=D?D.emptyScript:"",At=H.reactiveElementPolyfillSupport,E=(r,t)=>r,R={toAttribute(r,t){switch(t){case Boolean:r=r?ft:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},J=(r,t)=>!ct(r,t),I={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:J};Symbol.metadata??=Symbol("metadata"),H.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=I){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&dt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=pt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return i?.call(this)},set(o){const a=i?.call(this);n.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??I}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;const t=_t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){const e=this.properties,s=[...ut(e),...$t(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(B(i))}else t!==void 0&&e.push(B(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:R).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:R;this._$Em=i,this[i]=o.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??=this.constructor.getPropertyOptions(t),!(s.hasChanged??J)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s)n.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(e=>this._$EC(e,this[e])),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[E("elementProperties")]=new Map,y[E("finalized")]=new Map,At?.({ReactiveElement:y}),(H.reactiveElementVersions??=[]).push("2.0.4");/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2017 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const k=globalThis,x=k.trustedTypes,W=x?x.createPolicy("lit-html",{createHTML:r=>r}):void 0,Q="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,X="?"+_,mt=`<${X}>`,m=document,b=()=>m.createComment(""),w=r=>r===null||typeof r!="object"&&typeof r!="function",j=Array.isArray,yt=r=>j(r)||typeof r?.[Symbol.iterator]=="function",N=`[
|
|
14
|
+
\f\r]`,S=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,q=/>/g,f=RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),K=/'/g,Y=/"/g,tt=/^(?:script|style|textarea|title)$/i,g=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Z=new WeakMap,A=m.createTreeWalker(m,129);function et(r,t){if(!j(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return W!==void 0?W.createHTML(t):t}const gt=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=S;for(let a=0;a<e;a++){const h=r[a];let c,p,l=-1,u=0;for(;u<h.length&&(o.lastIndex=u,p=o.exec(h),p!==null);)u=o.lastIndex,o===S?p[1]==="!--"?o=V:p[1]!==void 0?o=q:p[2]!==void 0?(tt.test(p[2])&&(i=RegExp("</"+p[2],"g")),o=f):p[3]!==void 0&&(o=f):o===f?p[0]===">"?(o=i??S,l=-1):p[1]===void 0?l=-2:(l=o.lastIndex-p[2].length,c=p[1],o=p[3]===void 0?f:p[3]==='"'?Y:K):o===Y||o===K?o=f:o===V||o===q?o=S:(o=f,i=void 0);const $=o===f&&r[a+1].startsWith("/>")?" ":"";n+=o===S?h+mt:l>=0?(s.push(c),h.slice(0,l)+Q+h.slice(l)+_+$):h+_+(l===-2?a:$)}return[et(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class P{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,h=this.parts,[c,p]=gt(t,e);if(this.el=P.createElement(c,s),A.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(i=A.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const l of i.getAttributeNames())if(l.endsWith(Q)){const u=p[o++],$=i.getAttribute(l).split(_),C=/([.?@])?(.*)/.exec(u);h.push({type:1,index:n,name:C[2],strings:$,ctor:C[1]==="."?St:C[1]==="?"?Et:C[1]==="@"?bt:M}),i.removeAttribute(l)}else l.startsWith(_)&&(h.push({type:6,index:n}),i.removeAttribute(l));if(tt.test(i.tagName)){const l=i.textContent.split(_),u=l.length-1;if(u>0){i.textContent=x?x.emptyScript:"";for(let $=0;$<u;$++)i.append(l[$],b()),A.nextNode(),h.push({type:2,index:++n});i.append(l[u],b())}}}else if(i.nodeType===8)if(i.data===X)h.push({type:2,index:n});else{let l=-1;for(;(l=i.data.indexOf(_,l+1))!==-1;)h.push({type:7,index:n}),l+=_.length-1}n++}}static createElement(t,e){const s=m.createElement("template");return s.innerHTML=t,s}}function v(r,t,e=r,s){if(t===g)return t;let i=s!==void 0?e.o?.[s]:e.l;const n=w(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e.o??=[])[s]=i:e.l=i),i!==void 0&&(t=v(r,i._$AS(r,t.values),i,s)),t}class vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??m).importNode(e,!0);A.currentNode=i;let n=A.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new O(n,n.nextSibling,this,t):h.type===1?c=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(c=new wt(n,this,t)),this._$AV.push(c),h=s[++a]}o!==h?.index&&(n=A.nextNode(),o++)}return A.currentNode=m,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class O{get _$AU(){return this._$AM?._$AU??this.v}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=v(this,t,e),w(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==g&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):yt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&w(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=P.createElement(et(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const n=new vt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=Z.get(t.strings);return e===void 0&&Z.set(t.strings,e=new P(t)),e}k(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new O(this.O(b()),this.O(b()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this.v=t,this._$AP?.(t))}}class M{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=v(this,t,e,0),o=!w(t)||t!==this._$AH&&t!==g,o&&(this._$AH=t);else{const a=t;let h,c;for(t=n[0],h=0;h<n.length-1;h++)c=v(this,a[s+h],e,h),c===g&&(c=this._$AH[h]),o||=!w(c)||c!==this._$AH[h],c===d?t=d:t!==d&&(t+=(c??"")+n[h+1]),this._$AH[h]=c}o&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class St extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Et extends M{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class bt extends M{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=v(this,t,e,0)??d)===g)return;const s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class wt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){v(this,t)}}const Pt=k.litHtmlPolyfillSupport;Pt?.(P,O),(k.litHtmlVersions??=[]).push("3.2.0");const st=(r,t,e)=>{const s=e?.renderBefore??t;let i=s._$litPart$;if(i===void 0){const n=e?.renderBefore??null;s._$litPart$=i=new O(t.insertBefore(b(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2017 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/class T extends y{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=st(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return g}}T._$litElement$=!0,T.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:T});const Ot=globalThis.litElementPolyfillSupport;Ot?.({LitElement:T});(globalThis.litElementVersions??=[]).push("4.1.0");/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2020 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/const Ct=(r,t)=>t===void 0?r?._$litType$!==void 0:r?._$litType$===t,{simulatePageLoad:F,simulateDOMContentLoaded:Ut}=__STORYBOOK_MODULE_PREVIEW_API__,{global:Tt}=__STORYBOOK_MODULE_GLOBAL__;var xt=Object.defineProperty,Ht=(r,t)=>{for(var e in t)xt(r,e,{get:t[e],enumerable:!0})},Mt={};Ht(Mt,{parameters:()=>nt,render:()=>it,renderToCanvas:()=>rt});var{Node:Nt}=Tt,it=(r,t)=>{let{id:e,component:s}=t;if(!s)throw new Error(`Unable to render story ${e} as the component annotation is missing from the default export`);let i=document.createElement(s);return Object.entries(r).forEach(([n,o])=>{i[n]=o}),i};function rt({storyFn:r,kind:t,name:e,showMain:s,showError:i,forceRemount:n},o){let a=r();if(s(),Ct(a)){(n||!o.querySelector('[id="root-inner"]'))&&(o.innerHTML='<div id="root-inner"></div>');let h=o.querySelector('[id="root-inner"]');st(a,h),F(o)}else if(typeof a=="string")o.innerHTML=a,F(o);else if(a instanceof Nt){if(o.firstChild===a&&!n)return;o.innerHTML="",o.appendChild(a),Ut()}else i({title:`Expecting an HTML snippet or DOM node from the story: "${e}" of "${t}".`,description:ot`
|
|
24
|
+
Did you forget to return the HTML snippet from the story?
|
|
25
|
+
Use "() => <your snippet or node>" or when defining the story.
|
|
26
|
+
`})}var nt={renderer:"web-components"};const kt=Object.freeze(Object.defineProperty({__proto__:null,parameters:nt,render:it,renderToCanvas:rt},Symbol.toStringTag,{value:"Module"}));export{st as Q,kt as e};
|
package/storybook-static/assets/{entry-preview-docs-BMKNVQXA.js → entry-preview-docs-B7ORr9w5.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
See the readme of addon-docs for web components for more details.`)}function c(){return i.__STORYBOOK_CUSTOM_ELEMENTS__||i.__STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__}var{window:
|
|
1
|
+
import{Q as p}from"./entry-preview-C313OLrj.js";import{D as u,c as E,y}from"./index-BdcJ-iJ7.js";import{i as g}from"./tiny-invariant-BxWVcicq.js";import"./index-DrFu-skq.js";const{global:i}=__STORYBOOK_MODULE_GLOBAL__;__STORYBOOK_MODULE_PREVIEW_API__;var{window:v}=i;v.STORYBOOK_ENV="web-components";function d(e){if(!e)return!1;if(typeof e=="string")return!0;throw new Error('Provided component needs to be a string. e.g. component: "my-element"')}function l(e){if(!e)return!1;if(e.tags&&Array.isArray(e.tags)||e.modules&&Array.isArray(e.modules))return!0;throw new Error(`You need to setup valid meta data in your config.js via setCustomElements().
|
|
2
|
+
See the readme of addon-docs for web components for more details.`)}function c(){return i.__STORYBOOK_CUSTOM_ELEMENTS__||i.__STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__}var{window:w,EventSource:S}=i;typeof module<"u"&&module?.hot?.decline&&(module.hot.decline(),new S("__webpack_hmr").addEventListener("message",function(e){try{let{action:r}=JSON.parse(e.data);r==="built"&&w.location.reload()}catch{}}));const{logger:m}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{useEffect:D,addons:b}=__STORYBOOK_MODULE_PREVIEW_API__;function _(e,r){let t;switch(r){case"attributes":case"properties":t={name:e.type?.text||e.type};break;case"slots":t={name:"string"};break;default:t={name:"void"};break}return{name:e.name,required:!1,description:e.description,type:t,table:{category:r,type:{summary:e.type?.text||e.type},defaultValue:{summary:e.default!==void 0?e.default:e.defaultValue}}}}function h(e){let r=e.name.replace(/(-|_|:|\.|\s)+(.)?/g,(t,n,a)=>a?a.toUpperCase():"").replace(/^([A-Z])/,t=>t.toLowerCase());return r=`on${r.charAt(0).toUpperCase()+r.substr(1)}`,[{name:r,action:{name:e.name},table:{disable:!0}},_(e,"events")]}function o(e,r){return e&&e.filter(t=>t&&t.name).reduce((t,n)=>{if(n.kind==="method")return t;switch(r){case"events":h(n).forEach(a=>{g(a.name,`${a} should have a name property.`),t[a.name]=a});break;default:t[n.name]=_(n,r);break}return t},{})}var C=(e,r)=>{if(!d(e)||!l(r))return null;let t=r.tags.find(n=>n.name.toUpperCase()===e.toUpperCase());return t||m.warn(`Component not found in custom-elements.json: ${e}`),t},M=(e,r)=>{if(!d(e)||!l(r))return null;let t;return r?.modules?.forEach(n=>{n?.declarations?.forEach(a=>{a.tagName===e&&(t=a)})}),t||m.warn(`Component not found in custom-elements.json: ${e}`),t},f=(e,r)=>r?.version==="experimental"?C(e,r):M(e,r),A=(e,r)=>{let t=f(e,r);return t&&{...o(t.members??[],"properties"),...o(t.properties??[],"properties"),...o(t.attributes??[],"attributes"),...o(t.events??[],"events"),...o(t.slots??[],"slots"),...o(t.cssProperties??[],"css custom properties"),...o(t.cssParts??[],"css shadow parts")}},T=e=>{let r=c();return A(e,r)},L=e=>{let r=f(e,c());return r&&r.description},R=/<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;function I(e){let r=e?.parameters.docs?.source,t=e?.parameters.__isArgsStory;return r?.type===u.DYNAMIC?!1:!t||r?.code||r?.type===u.CODE}function U(e,r){let t=e(),n=r?.parameters.docs?.source?.excludeDecorators?r.originalStoryFn(r.args,r):t,a;if(D(()=>{let{id:s,unmappedArgs:O}=r;a&&b.getChannel().emit(y,{id:s,source:a,args:O})}),!I(r)){let s=window.document.createElement("div");n instanceof DocumentFragment?p(n.cloneNode(!0),s):p(n,s),a=s.innerHTML.replace(R,"")}return t}var V=[U],K={docs:{extractArgTypes:T,extractComponentDescription:L,story:{inline:!0},source:{type:u.DYNAMIC,language:"html"}}},$=[E];export{$ as argTypesEnhancers,V as decorators,K as parameters};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as l,e as a}from"./
|
|
1
|
+
import{w as l,e as a}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";function f(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}
|
|
@@ -91,7 +91,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
91
91
|
canvasElement
|
|
92
92
|
}) => {
|
|
93
93
|
const canvas = within(canvasElement);
|
|
94
|
-
await canvas.findByText(
|
|
94
|
+
await canvas.findByText(TemplateInPage.args!.title as string);
|
|
95
95
|
const val = prop => canvas.getByTestId(prop).textContent.trim();
|
|
96
96
|
expect(val('slot-override')).toEqual('👋 World!');
|
|
97
97
|
expect(val('slot-default')).toEqual('Hello World!');
|
|
@@ -111,7 +111,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
111
111
|
canvasElement
|
|
112
112
|
}) => {
|
|
113
113
|
const canvas = within(canvasElement);
|
|
114
|
-
await canvas.findByText(
|
|
114
|
+
await canvas.findByText(NoTag.args!.title as string);
|
|
115
115
|
expect(canvasElement.querySelectorAll('custom-element')[0].textContent.trim()).toEqual('🏗️ construction');
|
|
116
116
|
expect(canvasElement.querySelectorAll('custom-element')[1].textContent.trim()).toEqual('🏗️ construction');
|
|
117
117
|
}
|
|
@@ -135,7 +135,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
135
135
|
canvasElement
|
|
136
136
|
}) => {
|
|
137
137
|
const canvas = within(canvasElement);
|
|
138
|
-
await canvas.findByText(
|
|
138
|
+
await canvas.findByText(ExternalSvg.args!.title as string);
|
|
139
139
|
await expect(canvas.getByText('inline DCE loading from SVG ...')).toBeInTheDocument();
|
|
140
140
|
|
|
141
141
|
// needs separate test
|
|
@@ -163,7 +163,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
163
163
|
canvasElement
|
|
164
164
|
}) => {
|
|
165
165
|
const canvas = within(canvasElement);
|
|
166
|
-
await canvas.findByText(
|
|
166
|
+
await canvas.findByText(ExternalXsltFile.args!.title as string);
|
|
167
167
|
expect(canvasElement.querySelector('dce-external-4').innerHTML).to.include('Hi');
|
|
168
168
|
expect(canvasElement.querySelector('[data-smile="👼"]').innerHTML).to.include('loading from XSLT ...');
|
|
169
169
|
await expect(await canvas.findByTestId('data-fruit')).toHaveTextContent('🍌');
|
|
@@ -183,7 +183,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
183
183
|
canvasElement
|
|
184
184
|
}) => {
|
|
185
185
|
const canvas = within(canvasElement);
|
|
186
|
-
await canvas.findByText(
|
|
186
|
+
await canvas.findByText(ExternalHtmlFile.args!.title as string);
|
|
187
187
|
await canvas.findByText('👋');
|
|
188
188
|
const t5 = canvasElement.querySelector('dce-external-5').innerHTML;
|
|
189
189
|
expect(t5).to.include('👋');
|
|
@@ -204,7 +204,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
204
204
|
canvasElement
|
|
205
205
|
}) => {
|
|
206
206
|
const canvas = within(canvasElement);
|
|
207
|
-
await canvas.findByText(
|
|
207
|
+
await canvas.findByText(ExternalHtmlFileInline.args!.title as string);
|
|
208
208
|
await canvas.findByText('👋');
|
|
209
209
|
const t5 = canvasElement.innerHTML;
|
|
210
210
|
expect(t5).to.include('👋');
|
|
@@ -225,7 +225,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
225
225
|
canvasElement
|
|
226
226
|
}) => {
|
|
227
227
|
const canvas = within(canvasElement);
|
|
228
|
-
await canvas.findByText(
|
|
228
|
+
await canvas.findByText(HtmlWithinHtmlFile.args!.title as string);
|
|
229
229
|
expect(await canvas.findByText('👋')).toBeInTheDocument();
|
|
230
230
|
}
|
|
231
231
|
}`,...d.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
|
|
@@ -241,7 +241,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
241
241
|
canvasElement
|
|
242
242
|
}) => {
|
|
243
243
|
const canvas = within(canvasElement);
|
|
244
|
-
await canvas.findByText(
|
|
244
|
+
await canvas.findByText(SvgWithinHtmlFile.args!.title as string);
|
|
245
245
|
expect(await canvas.findByTestId('svg-test')).toBeInTheDocument();
|
|
246
246
|
}
|
|
247
247
|
}`,...p.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
|
|
@@ -257,7 +257,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
257
257
|
canvasElement
|
|
258
258
|
}) => {
|
|
259
259
|
const canvas = within(canvasElement);
|
|
260
|
-
await canvas.findByText(
|
|
260
|
+
await canvas.findByText(MathMLWithinHtmlFile.args!.title as string);
|
|
261
261
|
const ml = await canvas.findByTestId('ml-test');
|
|
262
262
|
expect(ml.firstElementChild.localName).toEqual('mrow');
|
|
263
263
|
}
|
|
@@ -274,7 +274,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
274
274
|
canvasElement
|
|
275
275
|
}) => {
|
|
276
276
|
const canvas = within(canvasElement);
|
|
277
|
-
await canvas.findByText(
|
|
277
|
+
await canvas.findByText(ByIdWithinXsltFile.args!.title as string);
|
|
278
278
|
const ml = await canvas.findByTestId('src');
|
|
279
279
|
expect(ml.textContent).to.include('/html-template.xhtml#embedded-xsl');
|
|
280
280
|
}
|
|
@@ -291,7 +291,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
291
291
|
canvasElement
|
|
292
292
|
}) => {
|
|
293
293
|
const canvas = within(canvasElement);
|
|
294
|
-
await canvas.findByText(
|
|
294
|
+
await canvas.findByText(MissingIdWithinXsltFile.args!.title as string);
|
|
295
295
|
await sleep(100);
|
|
296
296
|
const ml = await canvas.findByTestId('no-id');
|
|
297
297
|
expect(ml.textContent).to.include('element with id=none is missing in template');
|
|
@@ -309,7 +309,7 @@ import{w as l,e as a}from"./custom-element-D8hcDZHh.js";import"./index-C8k3Z-3Y.
|
|
|
309
309
|
canvasElement
|
|
310
310
|
}) => {
|
|
311
311
|
const canvas = within(canvasElement);
|
|
312
|
-
await canvas.findByText(
|
|
312
|
+
await canvas.findByText(EmbeddingInAnotherFile.args!.title as string);
|
|
313
313
|
await sleep(1);
|
|
314
314
|
expect(await canvas.findByText('embed-1.html')).toBeInTheDocument();
|
|
315
315
|
expect(await canvas.findByText('🖖')).toBeInTheDocument();
|
package/storybook-static/assets/{form.test.stories-B0NoI8wm.js → form.test.stories-D35lyqd8.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as i,e as n,u as e}from"./
|
|
1
|
+
import{w as i,e as n,u as e}from"./index-BSz1w4Gl.js";import"./custom-element-BDGsYgbP.js";function l(a){const{title:t,body:s}=a;return`
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>${t}</legend>
|
|
4
4
|
${s}
|
|
@@ -111,7 +111,7 @@ import{w as i,e as n,u as e}from"./custom-element-D8hcDZHh.js";import"./index-C8
|
|
|
111
111
|
play: async ({
|
|
112
112
|
canvasElement
|
|
113
113
|
}) => {
|
|
114
|
-
const titleText =
|
|
114
|
+
const titleText = SystemMessage.args!.title as string;
|
|
115
115
|
const canvas = within(canvasElement);
|
|
116
116
|
await expect(canvas.queryByTestId('validation-msg')).toBeNull();
|
|
117
117
|
const input = await canvas.findByTestId('input-1');
|