@epa-wg/custom-element-dist 0.0.28 → 0.0.31
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/custom-element-dist.iml +11 -0
- package/.idea/inspectionProfiles/Project_Default.xml +24 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.storybook/main.ts +21 -19
- package/.storybook/preview.ts +25 -25
- package/README.md +4 -4
- package/coverage/coverage-final.json +21 -22
- package/coverage/index.html +24 -39
- 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 +248 -242
- package/coverage/src/custom-element/http-request.js.html +12 -12
- package/coverage/src/custom-element/index.html +14 -14
- 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 +28 -28
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/css.test.stories.ts.html +1 -1
- package/coverage/src/stories/dom-merge.test.stories.ts.html +1 -1
- package/coverage/src/stories/external-template.test.stories.ts.html +1 -1
- package/coverage/src/stories/form.test.stories.ts.html +1 -1
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +19 -19
- package/coverage/src/stories/local-storage.test.stories.ts.html +17 -17
- package/coverage/src/stories/location-element.test.stories.ts.html +3 -6
- package/coverage/src/stories/module-url.test.stories.ts.html +1 -1
- package/coverage/src/stories/set-url.test.stories.ts.html +1 -1
- package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +1 -1
- package/coverage/src/stories/slice-events.test.stories.ts.html +284 -23
- package/coverage/src/stories/slots.test.stories.ts.html +1 -1
- package/coverage/src/stories/testStoryBook.ts.html +7 -7
- package/coverage/src/stories/version-select.test.stories.ts.html +1 -1
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-BbJMY20-.cjs +97 -0
- package/dist/{custom-element-BOIPgtxz.js → custom-element-CoRNKeEP.js} +122 -120
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +2 -2
- package/dist/demo/a.svg +26 -26
- package/dist/demo/data-slices.html +37 -0
- package/dist/demo/demo.css +0 -3
- package/package.json +13 -13
- package/public/demo/a.svg +26 -26
- package/public/demo/data-slices.html +37 -0
- package/public/demo/demo.css +0 -3
- package/src/custom-element/custom-element.js +4 -2
- package/src/custom-element/demo/a.svg +26 -26
- package/src/custom-element/demo/data-slices.html +37 -0
- package/src/custom-element/demo/demo.css +0 -3
- package/src/custom-element/ide/web-types-dce.json +1 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/material/angular.css +987 -987
- package/src/material/components/autocomplete.html +239 -240
- package/src/material/components/dropdown.html +93 -46
- package/src/material/components/icon-link.html +161 -0
- package/src/material/components/menu.html +234 -234
- package/src/material/components.html +121 -108
- package/src/material/demo.css +36 -31
- package/src/material/index.html +110 -168
- package/src/material/material.css +356 -356
- package/src/material/theme/README.md +17 -17
- package/src/material/theme/semantic.css +113 -112
- package/src/mocks/versions.mock.ts +8 -8
- package/src/stories/attributes.test.stories.ts +20 -20
- package/src/stories/location-element.test.stories.ts +1 -2
- package/src/stories/slice-events.test.stories.ts +87 -0
- package/storybook-static/assets/Color-F6OSRLHC-CFyd3TND.js +1 -0
- package/storybook-static/assets/{Configure-CJVwFVjC.js → Configure-UGTbPRKK.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-CFRXHY34-Bz6q-OqD.js → DocsRenderer-CFRXHY34-Dpr5iB0o.js} +2 -2
- package/storybook-static/assets/{attributes.test.stories-BJBuuXgZ.js → attributes.test.stories-DSOLHHOW.js} +38 -36
- package/storybook-static/assets/{css.test.stories-pgbBc17d.js → css.test.stories-Cgn6ICr0.js} +1 -1
- package/storybook-static/assets/custom-element-D59Fok1f.js +97 -0
- package/storybook-static/assets/{dom-merge.test.stories-CXcYP_-J.js → dom-merge.test.stories-CBObfPWg.js} +1 -1
- package/storybook-static/assets/entry-preview-DHVXbf3x.js +26 -0
- package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +2 -0
- package/storybook-static/assets/{external-template.test.stories-CpJ68Ghy.js → external-template.test.stories-VfKUQ8eu.js} +1 -1
- package/storybook-static/assets/{form.test.stories-D35lyqd8.js → form.test.stories-CnuGN7Zw.js} +1 -1
- package/storybook-static/assets/{handlers-B-OZtf2K.js → handlers-V_T7WjNK.js} +21 -21
- package/storybook-static/assets/{http-request.stories-DccXgHyF.js → http-request.stories-8NN1Coqm.js} +1 -1
- package/storybook-static/assets/iframe-DnhkgdtG.js +2 -0
- package/storybook-static/assets/index-3Sfy-t3H.js +769 -0
- package/storybook-static/assets/index-BcZLpTeD.js +8 -0
- package/storybook-static/assets/index-CIBI7sCB.js +1 -0
- package/storybook-static/assets/{index-BSz1w4Gl.js → index-CxRwF5Or.js} +130 -130
- package/storybook-static/assets/{index-lY6s0fkU.js → index-DN1RoK17.js} +1 -1
- package/storybook-static/assets/{index-f2MAjm2i.js → index-DjJD7gkO.js} +1 -1
- package/storybook-static/assets/{local-storage.test.stories-BY-PWhuk.js → local-storage.test.stories-Dk5Yqc7m.js} +1 -1
- package/storybook-static/assets/{location-element.test.stories-3auBYEaU.js → location-element.test.stories-56um6s5L.js} +1 -1
- package/storybook-static/assets/{module-url.test.stories-B7L9cL60.js → module-url.test.stories-DEponQ7l.js} +1 -1
- package/storybook-static/assets/{preview-BRPR-UXC.js → preview-CNKoaWES.js} +1 -1
- package/storybook-static/assets/preview-Czc-sw5H.js +2 -0
- package/storybook-static/assets/preview-DAeyCMnM.js +1 -0
- package/storybook-static/assets/{preview-BUQm51_C.js → preview-vbpHsp94.js} +2 -2
- package/storybook-static/assets/{set-url.test.stories-CuSuDLIx.js → set-url.test.stories-B4E6hIe-.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-BkRKsKem.js → slice-events.test.stories-BR0F-B6I.js} +138 -13
- package/storybook-static/assets/{slots.test.stories-BJCUWFkE.js → slots.test.stories-CgfJIyCr.js} +1 -1
- package/storybook-static/assets/tiny-invariant-CopsF_GD.js +1 -0
- package/storybook-static/assets/{version-select.test.stories-B3ybJn_Z.js → version-select.test.stories-nmxATIwv.js} +1 -1
- package/storybook-static/demo/a.svg +26 -26
- package/storybook-static/demo/data-slices.html +37 -0
- package/storybook-static/demo/demo.css +0 -3
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/index.html +4 -0
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +333 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +40 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +82 -85
- 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-viewport-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/interactions-9/manager-bundle.js +66 -67
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/globals-module-info.js +25 -3
- package/storybook-static/sb-manager/globals-runtime.js +29585 -43124
- package/storybook-static/sb-manager/runtime.js +10647 -9399
- package/storybook-static/sb-preview/runtime.js +3536 -5860
- package/test-runner-jest.config.js +15 -0
- package/coverage/src/custom-element/demo/coverage.svg +0 -10
- package/coverage/src/custom-element/demo/index.html +0 -116
- package/coverage/src/custom-element/demo/z.js/coverage.svg +0 -10
- package/coverage/src/custom-element/demo/z.js.html +0 -112
- package/dist/custom-element-CUsSENWc.cjs +0 -97
- package/dist/demo/s1.xslt +0 -60
- package/dist/demo/z.html +0 -33
- package/dist/demo/z.js +0 -9
- package/dist/demo/z.xml +0 -60
- package/dist/demo/z1.html +0 -34
- package/public/demo/s1.xslt +0 -60
- package/public/demo/z.html +0 -33
- package/public/demo/z.js +0 -9
- package/public/demo/z.xml +0 -60
- package/public/demo/z1.html +0 -34
- package/src/custom-element/demo/s1.xslt +0 -60
- package/src/custom-element/demo/z.html +0 -33
- package/src/custom-element/demo/z.js +0 -9
- package/src/custom-element/demo/z.xml +0 -60
- package/src/custom-element/demo/z1.html +0 -34
- package/src/stories/__screenshots__/http-request.test.ts/http-request-url-change-1.png +0 -0
- package/storybook-static/assets/Color-ERTF36HU-ChyYtq0t.js +0 -1
- package/storybook-static/assets/custom-element-BDGsYgbP.js +0 -97
- package/storybook-static/assets/entry-preview-C313OLrj.js +0 -26
- package/storybook-static/assets/entry-preview-docs-B7ORr9w5.js +0 -2
- package/storybook-static/assets/iframe-Ddc_axoC.js +0 -2
- package/storybook-static/assets/index-BdcJ-iJ7.js +0 -8
- package/storybook-static/assets/index-CiCdFubk.js +0 -634
- package/storybook-static/assets/index-tfEkrhWr.js +0 -1
- package/storybook-static/assets/preview-CcS4DQh8.js +0 -1
- package/storybook-static/assets/preview-CfH4_OzN.js +0 -2
- package/storybook-static/assets/tiny-invariant-BxWVcicq.js +0 -1
- package/storybook-static/demo/s1.xslt +0 -60
- package/storybook-static/demo/z.html +0 -33
- package/storybook-static/demo/z.js +0 -9
- package/storybook-static/demo/z.xml +0 -60
- package/storybook-static/demo/z1.html +0 -34
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const W = "http://www.w3.org/1999/XSL/Transform",
|
|
1
|
+
const W = "http://www.w3.org/1999/XSL/Transform", H = "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", D = (e, l) => (e.ownerDocument || e).createTextNode(l), se = (e) => {
|
|
2
2
|
for (; e.firstChild; ) e.firstChild.remove();
|
|
3
3
|
return e;
|
|
4
|
-
}, V = (e) => (e.getAttributeNames().map((l) => e.removeAttribute(l)), se(e)), le = (e) => (e?.setAttribute("xmlns:xsl", W), e), ae = (e) => (e?.setAttribute("xmlns:xhtml",
|
|
5
|
-
const s = (i) => ((r) => (l && r.append(
|
|
4
|
+
}, V = (e) => (e.getAttributeNames().map((l) => e.removeAttribute(l)), se(e)), le = (e) => (e?.setAttribute("xmlns:xsl", W), e), ae = (e) => (e?.setAttribute("xmlns:xhtml", H), le(e)), ne = (e) => /^[_a-zA-Z][-_:a-zA-Z0-9]*$/.test(e), T = (e, l = "", t = document) => {
|
|
5
|
+
const s = (i) => ((r) => (l && r.append(D(t.ownerDocument || t, l)), r))((t.ownerDocument || t).createElement(i));
|
|
6
6
|
if (ne(e))
|
|
7
7
|
return s(e);
|
|
8
8
|
const a = s("dce-object");
|
|
@@ -15,54 +15,54 @@ const W = "http://www.w3.org/1999/XSL/Transform", k = "http://www.w3.org/1999/xh
|
|
|
15
15
|
t.append(e.firstChild);
|
|
16
16
|
return t;
|
|
17
17
|
};
|
|
18
|
-
function
|
|
18
|
+
function q(e) {
|
|
19
19
|
return new DOMParser().parseFromString(e, "application/xml");
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function X(e) {
|
|
22
22
|
return new XMLSerializer().serializeToString(e);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
const a = (x) => e.ownerDocument.createElement(x), r = ((x, p,
|
|
24
|
+
function U(e, l, t, s) {
|
|
25
|
+
const a = (x) => e.ownerDocument.createElement(x), r = ((x, p, N) => (p.append(N = a(x)), N))(l, e);
|
|
26
26
|
return [...t].forEach((x) => r.append(s(x))), r;
|
|
27
27
|
}
|
|
28
28
|
function fe(e) {
|
|
29
|
-
return e.slot || (e.setAttribute || (e =
|
|
29
|
+
return e.slot || (e.setAttribute || (e = T("span", e.textContent.replaceAll(`
|
|
30
30
|
`, ""))), e.setAttribute("slot", "")), e;
|
|
31
31
|
}
|
|
32
32
|
function K(e, l) {
|
|
33
33
|
e.getAttributeNames().forEach((t) => l.includes(t) || e.removeAttribute(t));
|
|
34
34
|
}
|
|
35
35
|
const Q = (e) => [...e].filter((l) => !(l.nodeType === 3 && l.data.trim() === ""));
|
|
36
|
-
function
|
|
36
|
+
function z(e, l, t) {
|
|
37
37
|
const s = typeof e;
|
|
38
38
|
if (s === "string")
|
|
39
|
-
return
|
|
39
|
+
return T(l, e, t);
|
|
40
40
|
if (s === "number")
|
|
41
|
-
return
|
|
41
|
+
return T(l, "" + e, t);
|
|
42
42
|
if (e instanceof Array) {
|
|
43
|
-
const i =
|
|
44
|
-
return e.map((r) => i.append(
|
|
43
|
+
const i = T("array", "", t);
|
|
44
|
+
return e.map((r) => i.append(z(r, l, t))), i;
|
|
45
45
|
}
|
|
46
46
|
if (e instanceof FormData) {
|
|
47
|
-
const i =
|
|
47
|
+
const i = T("form-data", "", t);
|
|
48
48
|
for (const r of e)
|
|
49
|
-
i.append(
|
|
49
|
+
i.append(z(r[1], r[0], t));
|
|
50
50
|
return i;
|
|
51
51
|
}
|
|
52
|
-
const a =
|
|
52
|
+
const a = T(l, "", t);
|
|
53
53
|
for (let i in e)
|
|
54
|
-
pe(e[i]) || typeof e[i] == "function" || e[i] instanceof Window || (typeof e[i] != "object" && ne(i) ? a.setAttribute(i, e[i]) : a.append(
|
|
54
|
+
pe(e[i]) || typeof e[i] == "function" || e[i] instanceof Window || (typeof e[i] != "object" && ne(i) ? a.setAttribute(i, e[i]) : a.append(z(e[i], i, t)));
|
|
55
55
|
return a;
|
|
56
56
|
}
|
|
57
57
|
function ee(e) {
|
|
58
|
-
if (
|
|
58
|
+
if ($(e, "*", (l) => [...l.childNodes].filter((t) => t.nodeType === 3 && t.parentNode.localName !== "style" && t.data).forEach((t) => {
|
|
59
59
|
const s = t.data, a = s.matchAll(/{([^}]*)}/g);
|
|
60
60
|
if (a) {
|
|
61
|
-
let i = 0, r = (p) =>
|
|
61
|
+
let i = 0, r = (p) => D(t, p), x = [];
|
|
62
62
|
if ([...a].forEach((p) => {
|
|
63
63
|
p.index > i && x.push(r(p.input.substring(i, p.index)));
|
|
64
|
-
const
|
|
65
|
-
|
|
64
|
+
const N = e.querySelector("value-of").cloneNode();
|
|
65
|
+
N.setAttribute("select", p[1]), x.push(N), i = p.index + p[0].length;
|
|
66
66
|
}), i < s.length && x.push(r(s.substring(i, s.length))), x.length) {
|
|
67
67
|
for (let p of x)
|
|
68
68
|
l.insertBefore(p, t);
|
|
@@ -79,9 +79,9 @@ function ee(e) {
|
|
|
79
79
|
function he(e, l = "xsl:stylesheet") {
|
|
80
80
|
if (e.tagName === l || e.documentElement?.tagName === l)
|
|
81
81
|
return ee(e);
|
|
82
|
-
const t =
|
|
82
|
+
const t = q(`<xsl:stylesheet version="1.0" xmlns:xsl="${W}" xmlns:xhtml="${H}" xmlns:exsl="${ue}" exclude-result-prefixes="exsl" >
|
|
83
83
|
<xsl:output method="xml"/>
|
|
84
|
-
<xsl:template match="/"><dce-root xmlns="${
|
|
84
|
+
<xsl:template match="/"><dce-root xmlns="${H}"><xsl:apply-templates select="*" /></dce-root></xsl:template>
|
|
85
85
|
<xsl:template match="*[name()='template']">
|
|
86
86
|
<xsl:apply-templates mode="sanitize" select="*|text()"/>
|
|
87
87
|
</xsl:template>
|
|
@@ -136,24 +136,24 @@ function he(e, l = "xsl:stylesheet") {
|
|
|
136
136
|
</xsl:for-each>
|
|
137
137
|
</xsl:template>
|
|
138
138
|
</xsl:stylesheet>`), s = new XSLTProcessor(), a = ((n) => {
|
|
139
|
-
|
|
139
|
+
$(n, "custom-element", (b) => {
|
|
140
140
|
b.firstElementChild.localName === "template" && ([...b.firstElementChild.content.childNodes].forEach((y) => b.append(y)), b.firstElementChild.remove());
|
|
141
|
-
}),
|
|
141
|
+
}), $(n, "script", (b) => b.remove());
|
|
142
142
|
const c = n.content ?? n.firstElementChild?.content ?? n.body ?? n;
|
|
143
|
-
we.forEach((b) =>
|
|
144
|
-
const
|
|
145
|
-
const y =
|
|
146
|
-
return y.replaceChild(
|
|
143
|
+
we.forEach((b) => $(c, b, (y) => Te(y, c)));
|
|
144
|
+
const A = n.firstElementChild?.content || n.content, E = (b) => {
|
|
145
|
+
const y = q("<xhtml/>"), j = y.importNode(b, !0);
|
|
146
|
+
return y.replaceChild(j, y.documentElement), ae(j);
|
|
147
147
|
};
|
|
148
|
-
if (
|
|
149
|
-
const b =
|
|
150
|
-
return [...
|
|
148
|
+
if (A) {
|
|
149
|
+
const b = T("div");
|
|
150
|
+
return [...A.childNodes].map((y) => b.append(y.cloneNode(!0))), E(b);
|
|
151
151
|
}
|
|
152
152
|
return E(n.documentElement || n.body || n);
|
|
153
|
-
})(e), i =
|
|
153
|
+
})(e), i = q(
|
|
154
154
|
`<xsl:stylesheet version="1.0"
|
|
155
155
|
xmlns:xsl="${W}"
|
|
156
|
-
xmlns:xhtml="${
|
|
156
|
+
xmlns:xhtml="${H}"
|
|
157
157
|
xmlns:dce="urn:schemas-epa-wg:dce"
|
|
158
158
|
xmlns:exsl="http://exslt.org/common"
|
|
159
159
|
exclude-result-prefixes="exsl"
|
|
@@ -190,26 +190,26 @@ function he(e, l = "xsl:stylesheet") {
|
|
|
190
190
|
s.importStylesheet(t);
|
|
191
191
|
const r = s.transformToFragment(a, document), x = (n, c) => n.querySelector(c), p = x(i, 'template[mode="payload"]');
|
|
192
192
|
if (!r)
|
|
193
|
-
return console.error("transformation error", { xml: a.outerHTML, xsl:
|
|
193
|
+
return console.error("transformation error", { xml: a.outerHTML, xsl: X(t) });
|
|
194
194
|
if (r.firstElementChild.localName !== "dce-root") {
|
|
195
195
|
const n = r.ownerDocument.createElement("dce-root");
|
|
196
196
|
[...r.childNodes].forEach((c) => n.append(c)), r.append(n);
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const N = [];
|
|
199
199
|
[...r.querySelectorAll("dce-root>attribute")].forEach((n) => {
|
|
200
200
|
K(n, "namespace,name,select");
|
|
201
|
-
const c = J(n, "xsl:param"),
|
|
201
|
+
const c = J(n, "xsl:param"), A = f(n, "name");
|
|
202
202
|
p.append(c), K(c, "select,name");
|
|
203
203
|
let E = f(c, "select")?.split("??");
|
|
204
|
-
E || (E = ["//" +
|
|
204
|
+
E || (E = ["//" + A, `'${c.textContent}'`], V(c), c.setAttribute("name", A));
|
|
205
205
|
let b;
|
|
206
206
|
if (E?.length > 1) {
|
|
207
207
|
c.removeAttribute("select");
|
|
208
208
|
const y = x(i, 'template[match="ignore"]>choose').cloneNode(!0);
|
|
209
|
-
V(y.firstElementChild).append(
|
|
209
|
+
V(y.firstElementChild).append(D(y, "{" + E[0] + "}")), V(y.lastElementChild).append(D(y, "{" + E[1] + "}")), y.firstElementChild.setAttribute("test", E[0]), c.append(y), b = y.cloneNode(!0);
|
|
210
210
|
} else
|
|
211
211
|
b = J(n, "xsl:value-of");
|
|
212
|
-
b.removeAttribute("name"), n.append(b), n.removeAttribute("select"),
|
|
212
|
+
b.removeAttribute("name"), n.append(b), n.removeAttribute("select"), N.push(c);
|
|
213
213
|
}), [...r.querySelectorAll("[value]")].filter((n) => n.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach((n) => {
|
|
214
214
|
const c = f(n, "value");
|
|
215
215
|
c && n.setAttribute("value", Ae(c));
|
|
@@ -217,22 +217,22 @@ function he(e, l = "xsl:stylesheet") {
|
|
|
217
217
|
for (const n of r.childNodes)
|
|
218
218
|
p.append(i.importNode(n, !0));
|
|
219
219
|
[...p.getElementsByTagName("xsl:template")].forEach((n) => p.ownerDocument.documentElement.append(n));
|
|
220
|
-
const
|
|
221
|
-
const c =
|
|
222
|
-
|
|
220
|
+
const S = x(i, 'call-template[name="slot"]'), u = (n) => {
|
|
221
|
+
const c = S.cloneNode(!0), A = f(n, "name");
|
|
222
|
+
A && c.firstElementChild.setAttribute("select", `'${A}'`);
|
|
223
223
|
for (let E of n.childNodes)
|
|
224
224
|
c.lastElementChild.append(E);
|
|
225
225
|
return c;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
$(p, "slot", (n) => n.parentNode.replaceChild(u(n), n));
|
|
228
228
|
const m = ee(i);
|
|
229
|
-
return m.params =
|
|
229
|
+
return m.params = N, m;
|
|
230
230
|
}
|
|
231
231
|
async function xe(e) {
|
|
232
232
|
return await new Promise((t, s) => {
|
|
233
233
|
const a = new XMLHttpRequest();
|
|
234
234
|
a.open("GET", e), a.responseType = "document", a.onload = () => {
|
|
235
|
-
a.readyState === a.DONE && a.status === 200 ? t(a.responseXML?.body || a.responseXML ||
|
|
235
|
+
a.readyState === a.DONE && a.status === 200 ? t(a.responseXML?.body || a.responseXML || T("div", a.responseText)) : s(`${a.statusText} - ${e}`);
|
|
236
236
|
}, a.addEventListener("error", (i) => s(i)), a.send();
|
|
237
237
|
});
|
|
238
238
|
}
|
|
@@ -254,26 +254,28 @@ const ie = (e) => e.split("|").map((l) => l.trim()).filter((l) => l), ye = (e, l
|
|
|
254
254
|
i.push(x);
|
|
255
255
|
return i;
|
|
256
256
|
}
|
|
257
|
-
return [...e.childNodes].find((i) => i.localName === t) || a(
|
|
257
|
+
return [...e.childNodes].find((i) => i.localName === t) || a(T(t, "", s));
|
|
258
258
|
}).flat();
|
|
259
259
|
function te(e, l, t, s) {
|
|
260
260
|
if (!t.sliceProcessed)
|
|
261
261
|
return t.sliceProcessed = 1, ye(e, l ?? "").map((a) => {
|
|
262
|
-
const i = e.ownerDocument, r = t.sliceEventSource, x = t.sliceElement, p = () => [...a.childNodes].filter((
|
|
263
|
-
|
|
262
|
+
const i = e.ownerDocument, r = t.sliceEventSource, x = t.sliceElement, p = () => [...a.childNodes].filter((d) => d.nodeType === 3 || d.localName === "value" || d.localName === "form-data").map((d) => d.remove());
|
|
263
|
+
r.getAttributeNames().map((d) => a.setAttribute(d, f(r, d))), [...a.childNodes].filter((d) => d.localName === "event").map((d) => d.remove()), "validationMessage" in r && a.setAttribute("validation-message", r.validationMessage), t.type === "init" && p(), a.append(z(t, "event", i));
|
|
264
|
+
const N = (r.type === "checkbox" || r.type === "radio") && !r.checked;
|
|
265
|
+
if (x.hasAttribute("slice-value")) {
|
|
264
266
|
r.value === void 0 ? a.removeAttribute("value") : a.setAttribute("value", r.value);
|
|
265
|
-
const
|
|
266
|
-
p(), a.append(
|
|
267
|
+
const d = N ? "" : M(f(x, "slice-value"), a);
|
|
268
|
+
p(), a.append(D(i, d));
|
|
267
269
|
} else {
|
|
268
270
|
if ("elements" in r)
|
|
269
|
-
return p(), a.append(
|
|
270
|
-
const
|
|
271
|
-
p(),
|
|
271
|
+
return p(), a.append(z(new FormData(r), "value", a.ownerDocument)), a;
|
|
272
|
+
const d = N ? "" : r.value ?? f(r, "value");
|
|
273
|
+
p(), d == null ? [...a.childNodes].filter((S) => S.localName !== "event").map((S) => S.remove()) : de(d) ? a.append(D(i, d)) : a.append(z(d, "value", a.ownerDocument));
|
|
272
274
|
}
|
|
273
275
|
return a;
|
|
274
276
|
});
|
|
275
277
|
}
|
|
276
|
-
function
|
|
278
|
+
function $(e, l, t) {
|
|
277
279
|
e.querySelectorAll && [...e.querySelectorAll(l)].forEach(t);
|
|
278
280
|
}
|
|
279
281
|
const ge = async (e, l) => {
|
|
@@ -351,10 +353,10 @@ const Ae = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
|
|
|
351
353
|
return e;
|
|
352
354
|
const l = e.split("??"), t = l.shift(), s = Y(l.join("??"));
|
|
353
355
|
return l.length ? `concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )` : e;
|
|
354
|
-
},
|
|
356
|
+
}, M = (e, l) => {
|
|
355
357
|
const t = e.split("??");
|
|
356
358
|
if (t.length > 1)
|
|
357
|
-
return
|
|
359
|
+
return M(t[0], l) || M(t[1], l);
|
|
358
360
|
e = Y(e);
|
|
359
361
|
const s = l.ownerDocument.evaluate(e, l);
|
|
360
362
|
switch (s.resultType) {
|
|
@@ -370,7 +372,7 @@ const Ae = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
|
|
|
370
372
|
a += i.textContent;
|
|
371
373
|
return a;
|
|
372
374
|
}, we = "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(","), Te = (e, l) => {
|
|
373
|
-
const t =
|
|
375
|
+
const t = T("xsl:" + e.localName);
|
|
374
376
|
for (let s of e.attributes)
|
|
375
377
|
t.setAttribute(s.name, s.value);
|
|
376
378
|
for (; e.firstChild; )
|
|
@@ -384,32 +386,32 @@ const Ae = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
|
|
|
384
386
|
}), s.replaceChildren(...a);
|
|
385
387
|
}
|
|
386
388
|
};
|
|
387
|
-
class
|
|
389
|
+
class Ce extends HTMLElement {
|
|
388
390
|
static observedAttributes = ["src", "tag", "hidden"];
|
|
389
391
|
async connectedCallback() {
|
|
390
392
|
this.firstElementChild && this.firstElementChild.localName !== "template" && console.warn(`custom-element used without template wrapping content
|
|
391
393
|
`, this.outerHTML);
|
|
392
394
|
const l = await ge(f(this, "src"), this), t = f(this, "tag"), s = t || "dce-" + crypto.randomUUID();
|
|
393
|
-
for (const
|
|
394
|
-
|
|
395
|
+
for (const u of l)
|
|
396
|
+
$(u.templateNode || u.content || u, "style", (m) => {
|
|
395
397
|
const n = m.closest("slot"), c = n ? `slot[name="${n.name}"]` : "";
|
|
396
398
|
m.innerHTML = `${s} ${c}{${m.innerHTML}}`, this.append(m);
|
|
397
399
|
});
|
|
398
|
-
const a = l.map((
|
|
400
|
+
const a = l.map((u) => he(u)), i = a.map((u, m) => {
|
|
399
401
|
m = new XSLTProcessor();
|
|
400
402
|
try {
|
|
401
|
-
m.importStylesheet(
|
|
403
|
+
m.importStylesheet(u);
|
|
402
404
|
} catch (n) {
|
|
403
|
-
console.error(n,
|
|
405
|
+
console.error(n, X(u));
|
|
404
406
|
}
|
|
405
407
|
return m;
|
|
406
408
|
});
|
|
407
|
-
Object.defineProperty(this, "xsltString", { get: () => a.map((
|
|
409
|
+
Object.defineProperty(this, "xsltString", { get: () => a.map((u) => X(u)).join(`
|
|
408
410
|
`) });
|
|
409
|
-
const r = this, x = [...this.templateNode.querySelectorAll("[slice]")], p = x.map((
|
|
410
|
-
class
|
|
411
|
+
const r = this, x = [...this.templateNode.querySelectorAll("[slice]")], p = x.map((u) => f(u, "slice")).filter((u) => !u.includes("/")).filter((u, m, n) => n.indexOf(u) === m).map(ie).flat(), N = a.reduce((u, m) => (m.params && u.push(...m.params), u), []);
|
|
412
|
+
class d extends HTMLElement {
|
|
411
413
|
static get observedAttributes() {
|
|
412
|
-
return
|
|
414
|
+
return N.map((m) => f(m, "name"));
|
|
413
415
|
}
|
|
414
416
|
#e = 0;
|
|
415
417
|
connectedCallback() {
|
|
@@ -425,90 +427,90 @@ class Se extends HTMLElement {
|
|
|
425
427
|
} else
|
|
426
428
|
g.nodeType === 1 ? h.insertAdjacentElement("beforebegin", g) : g.nodeType === 3 && h.insertAdjacentText("beforebegin", g.data);
|
|
427
429
|
}
|
|
428
|
-
const n =
|
|
429
|
-
le(
|
|
430
|
-
const E =
|
|
431
|
-
|
|
432
|
-
const b =
|
|
430
|
+
const n = q("<datadom/>").documentElement, c = (h, g = "") => ((o) => (g && o.append(D(n, g)), o))(n.ownerDocument.createElement(h)), A = U(n, "payload", m, fe);
|
|
431
|
+
le(A), ae(A), this.innerHTML = "";
|
|
432
|
+
const E = U(n, "attributes", this.attributes, (h) => c(h.nodeName, h.value));
|
|
433
|
+
U(n, "dataset", Object.keys(this.dataset), (h) => c(h, this.dataset[h]));
|
|
434
|
+
const b = U(n, "slice", p, (h) => c(h, "")), y = (h) => M(h, b);
|
|
433
435
|
this.xml = n;
|
|
434
|
-
const
|
|
436
|
+
const j = [], G = () => {
|
|
435
437
|
const h = {};
|
|
436
|
-
for (let g; g =
|
|
438
|
+
for (let g; g = j.pop(); ) {
|
|
437
439
|
const o = f(g.sliceElement, "slice");
|
|
438
440
|
h[o] || (te(b, o, g), h[o] = g);
|
|
439
441
|
}
|
|
440
|
-
Object.keys(h).length !== 0 &&
|
|
442
|
+
Object.keys(h).length !== 0 && k();
|
|
441
443
|
};
|
|
442
444
|
let O;
|
|
443
445
|
this.onSlice = (h) => {
|
|
444
|
-
|
|
446
|
+
j.push(h), O || (O = setTimeout(() => {
|
|
445
447
|
G(), O = 0;
|
|
446
448
|
}, 1));
|
|
447
449
|
};
|
|
448
|
-
const
|
|
450
|
+
const k = this.transform = () => {
|
|
449
451
|
if (this.#e)
|
|
450
452
|
debugger;
|
|
451
453
|
this.#e = 1, i.map((o, v) => {
|
|
452
|
-
const
|
|
453
|
-
return
|
|
454
|
-
`,
|
|
454
|
+
const C = o.transformToFragment(n.ownerDocument, document);
|
|
455
|
+
return C || console.error(`XSLT transformation error. xsl:
|
|
456
|
+
`, X(a[v]), `
|
|
455
457
|
xml:
|
|
456
|
-
`,
|
|
458
|
+
`, X(n)), C;
|
|
457
459
|
}).map((o) => {
|
|
458
460
|
o && (oe(o), re(this, o.childNodes));
|
|
459
|
-
}),
|
|
461
|
+
}), d.observedAttributes.map((o) => {
|
|
460
462
|
let v = f(this.firstElementChild, o);
|
|
461
463
|
v !== f(this, o) && (this.setAttribute(o, v), this.#t(o, v));
|
|
462
464
|
});
|
|
463
465
|
function g(o) {
|
|
464
466
|
let v = o;
|
|
465
467
|
if (o.localName === "slice") {
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
468
|
+
const C = f(o, "for");
|
|
469
|
+
if (C || (v = o.parentElement), C === "^")
|
|
468
470
|
do
|
|
469
471
|
v = v.previousElementSibling;
|
|
470
472
|
while (v.localName === "slice");
|
|
471
473
|
else
|
|
472
|
-
v = this.querySelector(
|
|
474
|
+
v = this.querySelector(C);
|
|
473
475
|
if (!v)
|
|
474
|
-
return console.warn(`can not find selector in "slice for=${
|
|
476
|
+
return console.warn(`can not find selector in "slice for=${C}" `, o.outerHTML);
|
|
475
477
|
f(o, "slice") || o.setAttribute("slice", f(o, "name"));
|
|
476
478
|
}
|
|
477
479
|
return v;
|
|
478
480
|
}
|
|
479
|
-
|
|
481
|
+
$(this, "[slice],[slice-event]", (o) => {
|
|
480
482
|
let v = f(o, "slice-event");
|
|
481
|
-
const
|
|
482
|
-
o.dceInitialized || (o.dceInitialized = 1,
|
|
483
|
-
|
|
484
|
-
const me = te(b, f(
|
|
485
|
-
|
|
486
|
-
if (!
|
|
483
|
+
const C = o.hasAttribute("slice-value") || o.hasAttribute("value") || o.value, P = g(o);
|
|
484
|
+
o.dceInitialized || (o.dceInitialized = 1, P.hasAttribute("custom-validity") && (v += " change submit"), [...new Set((v || "change").split(" "))].forEach((ce) => P.addEventListener(ce, (w) => {
|
|
485
|
+
w.sliceElement = o, w.sliceEventSource = w.currentTarget || w.target, w.sliceProcessed = 0;
|
|
486
|
+
const me = te(b, f(w.sliceElement, "slice"), w);
|
|
487
|
+
$(this, "[custom-validity]", (R) => {
|
|
488
|
+
if (!R.setCustomValidity)
|
|
487
489
|
return;
|
|
488
|
-
const F = f(
|
|
490
|
+
const F = f(R, "custom-validity");
|
|
489
491
|
try {
|
|
490
|
-
const
|
|
491
|
-
|
|
492
|
-
} catch (
|
|
493
|
-
console.error(
|
|
492
|
+
const I = F && M(F, E);
|
|
493
|
+
R.setCustomValidity(I === !0 ? "" : I === !1 ? "invalid" : I);
|
|
494
|
+
} catch (I) {
|
|
495
|
+
console.error(I, "xPath", F);
|
|
494
496
|
}
|
|
495
497
|
});
|
|
496
|
-
const _ = f(
|
|
498
|
+
const _ = f(P, "custom-validity"), L = _ && M(_, E), B = L === !0 ? "" : L;
|
|
497
499
|
if (_) {
|
|
498
|
-
if (o.setCustomValidity ? o.setCustomValidity(B) : o.validationMessage = B, me.map((
|
|
499
|
-
return
|
|
500
|
-
setTimeout(
|
|
500
|
+
if (o.setCustomValidity ? o.setCustomValidity(B) : o.validationMessage = B, me.map((R) => R.setAttribute("validation-message", B)), w.type === "submit")
|
|
501
|
+
return L === !0 ? void 0 : (setTimeout(k, 1), !!L === L ? (L || w.preventDefault(), L) : L ? (w.preventDefault(), !1) : void 0);
|
|
502
|
+
setTimeout(k, 1);
|
|
501
503
|
}
|
|
502
|
-
this.onSlice(
|
|
503
|
-
})), (!v || v.includes("init")) && (
|
|
504
|
+
this.onSlice(w);
|
|
505
|
+
})), (!v || v.includes("init")) && (C ? this.onSlice({ type: "init", target: P, sliceElement: o, sliceEventSource: P }) : o.value = y(f(o, "slice"))));
|
|
504
506
|
}), this.#e = 0;
|
|
505
507
|
};
|
|
506
|
-
|
|
508
|
+
k(), G();
|
|
507
509
|
}
|
|
508
510
|
#t(m, n) {
|
|
509
511
|
m === "value" && (this.value = n);
|
|
510
512
|
let c = this.xml.querySelector(`attributes>${m}`);
|
|
511
|
-
c ? V(c).append(
|
|
513
|
+
c ? V(c).append(D(c, n)) : (c = T(m, n, this.xml), this.xml.querySelector("attributes").append(c)), this.dispatchEvent(new CustomEvent("change", { bubbles: !0, detail: { [m]: n } }));
|
|
512
514
|
}
|
|
513
515
|
attributeChangedCallback(m, n, c) {
|
|
514
516
|
!this.xml || this.#e || (this.#t(m, c), this.transform());
|
|
@@ -517,15 +519,15 @@ xml:
|
|
|
517
519
|
return r;
|
|
518
520
|
}
|
|
519
521
|
}
|
|
520
|
-
const
|
|
521
|
-
window.customElements.get(
|
|
522
|
+
const S = (u) => {
|
|
523
|
+
window.customElements.get(u) !== d && window.customElements.define(u, d);
|
|
522
524
|
};
|
|
523
525
|
if (t)
|
|
524
|
-
|
|
526
|
+
S(t);
|
|
525
527
|
else {
|
|
526
|
-
const
|
|
527
|
-
this.setAttribute("tag",
|
|
528
|
-
const m = document.createElement(
|
|
528
|
+
const u = s;
|
|
529
|
+
this.setAttribute("tag", u), S(u);
|
|
530
|
+
const m = document.createElement(u);
|
|
529
531
|
this.getAttributeNames().forEach((n) => m.setAttribute(n, this.getAttribute(n))), m.append(...[...this.childNodes].filter((n) => n.localName !== "style")), this.append(m);
|
|
530
532
|
}
|
|
531
533
|
}
|
|
@@ -536,13 +538,13 @@ xml:
|
|
|
536
538
|
return this;
|
|
537
539
|
}
|
|
538
540
|
get xslt() {
|
|
539
|
-
return
|
|
541
|
+
return q(this.xsltString);
|
|
540
542
|
}
|
|
541
543
|
}
|
|
542
|
-
window.customElements.define("custom-element",
|
|
544
|
+
window.customElements.define("custom-element", Ce);
|
|
543
545
|
export {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
+
Ce as C,
|
|
547
|
+
X as a,
|
|
546
548
|
xe as b,
|
|
547
549
|
he as c,
|
|
548
550
|
be as d,
|
|
@@ -555,11 +557,11 @@ export {
|
|
|
555
557
|
Ae as k,
|
|
556
558
|
Y as l,
|
|
557
559
|
ve as m,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
+
M as n,
|
|
561
|
+
z as o,
|
|
560
562
|
we as p,
|
|
561
563
|
Te as q,
|
|
562
564
|
Q as s,
|
|
563
565
|
ee as t,
|
|
564
|
-
|
|
566
|
+
q as x
|
|
565
567
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./custom-element-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./custom-element-BbJMY20-.cjs"),l=require("./http-request-DPrY7mGh.cjs"),t=require("./local-storage-78EivJ_B.cjs"),a=require("./location-element-DRB7hCwA.cjs");exports.CustomElement=e.CustomElement;exports.appendByDceId=e.appendByDceId;exports.assureSlices=e.assureSlices;exports.assureUID=e.assureUID;exports.assureUnique=e.assureUnique;exports.createXsltFromDom=e.createXsltFromDom;exports.deepEqual=e.deepEqual;exports.default=e.CustomElement;exports.evalCurly=e.evalCurly;exports.event2slice=e.event2slice;exports.merge=e.merge;exports.mergeAttr=e.mergeAttr;exports.obj2node=e.obj2node;exports.sanitizeBlankText=e.sanitizeBlankText;exports.tagUid=e.tagUid;exports.toXsl=e.toXsl;exports.xPath=e.xPath;exports.xPathDefaults=e.xPathDefaults;exports.xhrTemplate=e.xhrTemplate;exports.xml2dom=e.xml2dom;exports.xmlString=e.xmlString;exports.xslTags=e.xslTags;exports.HttpRequestElement=l.HttpRequestElement;exports.LocalStorageElement=t.LocalStorageElement;exports.localStorageSetItem=t.localStorageSetItem;exports.localStorage_clear=t.localStorage_clear;exports.localStorage_removeItem=t.localStorage_removeItem;exports.localStorage_setItem=t.localStorage_setItem;exports.LocationElement=a.LocationElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as e } from "./custom-element-
|
|
2
|
-
import { h as o, e as l, j as r, g as m, c, d as n, k as x, f as p, i as g, m as i, o as u, s as d, t as f, q as S, n as E, l as I, b as h, x as q, a as D, p as L } from "./custom-element-
|
|
1
|
+
import { C as e } from "./custom-element-CoRNKeEP.js";
|
|
2
|
+
import { h as o, e as l, j as r, g as m, c, d as n, k as x, f as p, i as g, m as i, o as u, s as d, t as f, q as S, n as E, l as I, b as h, x as q, a as D, p as L } from "./custom-element-CoRNKeEP.js";
|
|
3
3
|
import { H as v } from "./http-request-BOvP4KTl.js";
|
|
4
4
|
import { L as T, c as U, b as _, a as j, l as k } from "./local-storage-DzmNKzgN.js";
|
|
5
5
|
import { L as B } from "./location-element-FJlONi2n.js";
|
package/dist/demo/a.svg
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
<svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
2
|
-
<defs>
|
|
3
|
-
|
|
4
|
-
</defs>
|
|
5
|
-
<polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/>
|
|
6
|
-
<path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
7
|
-
<path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
8
|
-
<path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/>
|
|
9
|
-
<path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
|
|
10
|
-
<path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
|
|
11
|
-
<path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/>
|
|
12
|
-
<path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/>
|
|
13
|
-
<path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/>
|
|
14
|
-
<path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
15
|
-
<path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/>
|
|
16
|
-
<path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
17
|
-
<path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
18
|
-
<path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
19
|
-
<path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/>
|
|
20
|
-
<path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/>
|
|
21
|
-
<path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
22
|
-
<path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/>
|
|
23
|
-
<path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
|
|
24
|
-
<path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
|
|
25
|
-
<path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
26
|
-
<path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
1
|
+
<svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
2
|
+
<defs>
|
|
3
|
+
|
|
4
|
+
</defs>
|
|
5
|
+
<polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/>
|
|
6
|
+
<path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
7
|
+
<path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
8
|
+
<path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/>
|
|
9
|
+
<path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
|
|
10
|
+
<path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
|
|
11
|
+
<path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/>
|
|
12
|
+
<path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/>
|
|
13
|
+
<path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/>
|
|
14
|
+
<path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
15
|
+
<path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/>
|
|
16
|
+
<path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
17
|
+
<path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
18
|
+
<path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
19
|
+
<path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/>
|
|
20
|
+
<path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/>
|
|
21
|
+
<path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
22
|
+
<path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/>
|
|
23
|
+
<path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
|
|
24
|
+
<path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
|
|
25
|
+
<path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
|
|
26
|
+
<path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
|
|
27
27
|
</svg>
|
|
@@ -210,6 +210,43 @@
|
|
|
210
210
|
</template>
|
|
211
211
|
</html-demo-element>
|
|
212
212
|
|
|
213
|
+
<html-demo-element legend="12. checkbox use"
|
|
214
|
+
description="The value is empty when unchecked. Otherwise taken either from slice-value or value attribute.">
|
|
215
|
+
<p>Check the box to see the value in slice</p>
|
|
216
|
+
<template>
|
|
217
|
+
<custom-element>
|
|
218
|
+
<template>
|
|
219
|
+
<input type="checkbox" slice="is-checked" value="V0" checked/>
|
|
220
|
+
slice: {/datadom/slice/is-checked} <br/>
|
|
221
|
+
<xsl:variable name="v1">V1</xsl:variable> <br/>
|
|
222
|
+
$v1={$v1}<br/>
|
|
223
|
+
|
|
224
|
+
<!-- slice-variable is XPath. $v1 is available only in template, embedding trick -->
|
|
225
|
+
<input type="checkbox" slice="s2" slice-value="'{$v1}'"/>
|
|
226
|
+
slice 2: {//s2} <br/>
|
|
227
|
+
|
|
228
|
+
<!-- variable is used in template scope -->
|
|
229
|
+
<input type="checkbox" slice="s3" value="{$v1}"/>
|
|
230
|
+
slice 3: {//s3}
|
|
231
|
+
</template>
|
|
232
|
+
</custom-element>
|
|
233
|
+
</template>
|
|
234
|
+
</html-demo-element>
|
|
235
|
+
|
|
236
|
+
<html-demo-element legend="13. Radio buttons use"
|
|
237
|
+
description="The value is empty when unchecked. Otherwise taken either from slice-value or value attribute.">
|
|
238
|
+
<p>Check the radiobutton to see the value in slice</p>
|
|
239
|
+
<template>
|
|
240
|
+
<custom-element>
|
|
241
|
+
<template>
|
|
242
|
+
V0: <input type="radio" slice="radio-group" value="V0" name="g1"/> <br/>
|
|
243
|
+
V1: <input type="radio" slice="radio-group" value="V1" name="g1" checked/> <br/>
|
|
244
|
+
slice: {//radio-group} <br/>
|
|
245
|
+
</template>
|
|
246
|
+
</custom-element>
|
|
247
|
+
</template>
|
|
248
|
+
</html-demo-element>
|
|
249
|
+
|
|
213
250
|
<script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
|
|
214
251
|
|
|
215
252
|
</body>
|
package/dist/demo/demo.css
CHANGED