@epa-wg/custom-element-dist 0.0.34 → 0.0.35
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/.gitattributes +4 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.yarn/install-state.gz +0 -0
- package/.yarnrc.yml +1 -0
- package/README.md +5 -5
- package/coverage/coverage-final.json +3 -3
- package/coverage/index.html +5 -5
- 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 +341 -341
- package/coverage/src/custom-element/http-request.js.html +10 -10
- package/coverage/src/custom-element/index.html +5 -5
- package/coverage/src/custom-element/local-storage.js.html +1 -1
- package/coverage/src/custom-element/location-element.js.html +1 -1
- package/coverage/src/custom-element/module-url.js.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/material/theme/colors.js.html +1 -1
- package/coverage/src/material/theme/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/frame.canvas.ts.html +1 -1
- package/coverage/src/stories/http-request.stories.ts.html +1 -1
- package/coverage/src/stories/index.html +1 -1
- package/coverage/src/stories/testStoryBook.ts.html +12 -12
- package/coverage/src/sum.ts.html +1 -1
- package/dist/{custom-element-BqtjrCRF.cjs → custom-element-Bssk9jRy.cjs} +1 -1
- package/dist/{custom-element-BoYMoUtP.js → custom-element-BzDjIYMe.js} +1 -1
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +2 -2
- package/dist/demo/s.xml +1 -3864
- package/dist/demo/s.xslt +351 -13
- package/dist/mockServiceWorker.js +105 -63
- package/package.json +5 -4
- package/public/demo/s.xml +1 -3864
- package/public/demo/s.xslt +351 -13
- package/public/mockServiceWorker.js +105 -63
- package/src/custom-element/custom-element.js +1 -1
- package/src/custom-element/demo/s.xml +1 -3864
- package/src/custom-element/demo/s.xslt +351 -13
- package/src/custom-element/ide/customData-dce.json +123 -0
- package/src/custom-element/ide/web-types-dce.json +128 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/mocks/versions.mock.ts +1 -1
- package/src/stories/xslt-conditionals.test.stories.ts +1 -1
- package/src/stories/xslt-for-each.test.stories.ts +336 -0
- package/src/stories/xslt-if.test.stories.ts +1 -1
- package/storybook-static/assets/{Color-F6OSRLHC-CzTOSlqB.js → Color-F6OSRLHC-DeDlDLjU.js} +1 -1
- package/storybook-static/assets/{Configure-7GqRsAoJ.js → Configure-CH_tIP5N.js} +1 -1
- package/storybook-static/assets/{DocsRenderer-CFRXHY34-Duc5rSIm.js → DocsRenderer-CFRXHY34-Bc9EPsUI.js} +2 -2
- package/storybook-static/assets/{attributes.test.stories-DYuxF8h1.js → attributes.test.stories-BtamFQkF.js} +1 -1
- package/storybook-static/assets/{css.test.stories-LOmvINyb.js → css.test.stories-BfNxLgwr.js} +1 -1
- package/storybook-static/assets/{custom-element-Bwx7otrT.js → custom-element-CnmjNo0g.js} +1 -1
- package/storybook-static/assets/{dom-merge.test.stories-CEKhWjaS.js → dom-merge.test.stories-DxnitrLK.js} +1 -1
- package/storybook-static/assets/{external-template.test.stories-jHu0wsJ-.js → external-template.test.stories-BTsww7B0.js} +1 -1
- package/storybook-static/assets/{form.test.stories-CUyUnmwP.js → form.test.stories-DNJFtPJb.js} +1 -1
- package/storybook-static/assets/{handlers-F7GUfMqr.js → handlers-Dvg8CAeR.js} +1 -1
- package/storybook-static/assets/{http-request.stories-wyX5-QOv.js → http-request.stories-DgrBNle8.js} +1 -1
- package/storybook-static/assets/{iframe-BS_DPWl0.js → iframe-DiVWehoI.js} +2 -2
- package/storybook-static/assets/{index-DB7LLObI.js → index-CdEbhcV9.js} +1 -1
- package/storybook-static/assets/{index-V1EGs-wm.js → index-w6iX3YlR.js} +3 -3
- package/storybook-static/assets/{local-storage.test.stories-BxOhsf1k.js → local-storage.test.stories-Hwq80yUr.js} +1 -1
- package/storybook-static/assets/{location-element.test.stories-DqhvvUoa.js → location-element.test.stories-mEhZzm7x.js} +1 -1
- package/storybook-static/assets/{module-url.test.stories-C1gG9G7Y.js → module-url.test.stories-Bj46iT0V.js} +1 -1
- package/storybook-static/assets/{preview-Cwy1XFu2.js → preview-BjbXcJci.js} +2 -2
- package/storybook-static/assets/{preview-D6sehqkw.js → preview-CfuT8gak.js} +1 -1
- package/storybook-static/assets/{set-url.test.stories-BKQNdknJ.js → set-url.test.stories-hzxLcqmm.js} +1 -1
- package/storybook-static/assets/{slice-events.test.stories-ChqULCeA.js → slice-events.test.stories-DVyXFRU1.js} +1 -1
- package/storybook-static/assets/{slots.test.stories-BlyLoCRe.js → slots.test.stories-CS544nS4.js} +1 -1
- package/storybook-static/assets/{version-select.test.stories-CPGSh1tR.js → version-select.test.stories-D36nfYBq.js} +1 -1
- package/storybook-static/assets/{xslt-conditionals.test.stories-YC6QPqWZ.js → xslt-conditionals.test.stories-BS1PTIHe.js} +2 -2
- package/storybook-static/assets/xslt-for-each.test.stories-CtPS20RK.js +329 -0
- package/storybook-static/assets/{xslt-if.test.stories-BRSWy2-x.js → xslt-if.test.stories-DcHrAMSY.js} +2 -2
- package/storybook-static/demo/s.xml +1 -3864
- package/storybook-static/demo/s.xslt +351 -13
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +105 -63
- package/storybook-static/project.json +1 -1
|
@@ -189,13 +189,13 @@
|
|
|
189
189
|
<span class="cline-any cline-neutral"> </span>
|
|
190
190
|
<span class="cline-any cline-yes">5x</span>
|
|
191
191
|
<span class="cline-any cline-neutral"> </span>
|
|
192
|
-
<span class="cline-any cline-yes">
|
|
193
|
-
<span class="cline-any cline-yes">
|
|
192
|
+
<span class="cline-any cline-yes">31x</span>
|
|
193
|
+
<span class="cline-any cline-yes">31x</span>
|
|
194
194
|
<span class="cline-any cline-neutral"> </span>
|
|
195
195
|
<span class="cline-any cline-neutral"> </span>
|
|
196
196
|
<span class="cline-any cline-neutral"> </span>
|
|
197
|
-
<span class="cline-any cline-yes">
|
|
198
|
-
<span class="cline-any cline-yes">
|
|
197
|
+
<span class="cline-any cline-yes">35x</span>
|
|
198
|
+
<span class="cline-any cline-yes">23x</span>
|
|
199
199
|
<span class="cline-any cline-yes">12x</span>
|
|
200
200
|
<span class="cline-any cline-yes">12x</span>
|
|
201
201
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -237,12 +237,12 @@
|
|
|
237
237
|
<span class="cline-any cline-neutral"> </span>
|
|
238
238
|
<span class="cline-any cline-neutral"> </span>
|
|
239
239
|
<span class="cline-any cline-neutral"> </span>
|
|
240
|
-
<span class="cline-any cline-yes">
|
|
241
|
-
<span class="cline-any cline-yes">
|
|
240
|
+
<span class="cline-any cline-yes">69x</span>
|
|
241
|
+
<span class="cline-any cline-yes">38x</span>
|
|
242
242
|
<span class="cline-any cline-neutral"> </span>
|
|
243
|
-
<span class="cline-any cline-yes">
|
|
244
|
-
<span class="cline-any cline-yes">
|
|
245
|
-
<span class="cline-any cline-yes">
|
|
243
|
+
<span class="cline-any cline-yes">38x</span>
|
|
244
|
+
<span class="cline-any cline-yes">38x</span>
|
|
245
|
+
<span class="cline-any cline-yes">30x</span>
|
|
246
246
|
<span class="cline-any cline-neutral"> </span>
|
|
247
247
|
<span class="cline-any cline-yes">8x</span>
|
|
248
248
|
<span class="cline-any cline-yes">8x</span>
|
|
@@ -358,7 +358,7 @@ export default HttpRequestElement;
|
|
|
358
358
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
359
359
|
Code coverage generated by
|
|
360
360
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
361
|
-
at
|
|
361
|
+
at 2026-01-10T23:35:15.244Z
|
|
362
362
|
</div>
|
|
363
363
|
<script src="../../prettify.js"></script>
|
|
364
364
|
<script>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">86.
|
|
33
|
+
<span class="strong">86.91% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>412/474</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="92.43" class="pct high">92.43%</td>
|
|
87
87
|
<td data-value="674" class="abs high">623/674</td>
|
|
88
|
-
<td data-value="85.
|
|
89
|
-
<td data-value="
|
|
88
|
+
<td data-value="85.89" class="pct high">85.89%</td>
|
|
89
|
+
<td data-value="390" class="abs high">335/390</td>
|
|
90
90
|
<td data-value="94.96" class="pct high">94.96%</td>
|
|
91
91
|
<td data-value="139" class="abs high">132/139</td>
|
|
92
92
|
<td data-value="92.34" class="pct high">92.34%</td>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at
|
|
164
|
+
at 2026-01-10T23:35:15.244Z
|
|
165
165
|
</div>
|
|
166
166
|
<script src="../../prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -346,7 +346,7 @@ export default LocalStorageElement;
|
|
|
346
346
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
347
347
|
Code coverage generated by
|
|
348
348
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
349
|
-
at
|
|
349
|
+
at 2026-01-10T23:35:15.244Z
|
|
350
350
|
</div>
|
|
351
351
|
<script src="../../prettify.js"></script>
|
|
352
352
|
<script>
|
|
@@ -397,7 +397,7 @@ export default LocationElement;</pre></td></tr></table></pre>
|
|
|
397
397
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
398
398
|
Code coverage generated by
|
|
399
399
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
400
|
-
at
|
|
400
|
+
at 2026-01-10T23:35:15.244Z
|
|
401
401
|
</div>
|
|
402
402
|
<script src="../../prettify.js"></script>
|
|
403
403
|
<script>
|
|
@@ -172,7 +172,7 @@ export default ModuleUrl;
|
|
|
172
172
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
173
173
|
Code coverage generated by
|
|
174
174
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
175
|
-
at
|
|
175
|
+
at 2026-01-10T23:35:15.244Z
|
|
176
176
|
</div>
|
|
177
177
|
<script src="../../prettify.js"></script>
|
|
178
178
|
<script>
|
package/coverage/src/index.html
CHANGED
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at 2026-01-10T23:35:15.244Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -202,7 +202,7 @@ export class CssRulesElement extends HTMLElement
|
|
|
202
202
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
203
203
|
Code coverage generated by
|
|
204
204
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
205
|
-
at
|
|
205
|
+
at 2026-01-10T23:35:15.244Z
|
|
206
206
|
</div>
|
|
207
207
|
<script src="../../../prettify.js"></script>
|
|
208
208
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at 2026-01-10T23:35:15.244Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -181,7 +181,7 @@ export const handlers =
|
|
|
181
181
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
182
182
|
Code coverage generated by
|
|
183
183
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
184
|
-
at
|
|
184
|
+
at 2026-01-10T23:35:15.244Z
|
|
185
185
|
</div>
|
|
186
186
|
<script src="../../prettify.js"></script>
|
|
187
187
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at 2026-01-10T23:35:15.244Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -160,7 +160,7 @@ frameCanvas(frameTestId: string, canvas: ReturnType<typeof within>)
|
|
|
160
160
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
161
161
|
Code coverage generated by
|
|
162
162
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
163
|
-
at
|
|
163
|
+
at 2026-01-10T23:35:15.244Z
|
|
164
164
|
</div>
|
|
165
165
|
<script src="../../prettify.js"></script>
|
|
166
166
|
<script>
|
|
@@ -802,7 +802,7 @@ from <code>${url}</code>
|
|
|
802
802
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
803
803
|
Code coverage generated by
|
|
804
804
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
805
|
-
at
|
|
805
|
+
at 2026-01-10T23:35:15.244Z
|
|
806
806
|
</div>
|
|
807
807
|
<script src="../../prettify.js"></script>
|
|
808
808
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at
|
|
134
|
+
at 2026-01-10T23:35:15.244Z
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -96,28 +96,28 @@
|
|
|
96
96
|
<span class="cline-any cline-neutral"> </span>
|
|
97
97
|
<span class="cline-any cline-neutral"> </span>
|
|
98
98
|
<span class="cline-any cline-neutral"> </span>
|
|
99
|
-
<span class="cline-any cline-yes">
|
|
100
|
-
<span class="cline-any cline-yes">
|
|
99
|
+
<span class="cline-any cline-yes">89x</span>
|
|
100
|
+
<span class="cline-any cline-yes">89x</span>
|
|
101
101
|
<span class="cline-any cline-neutral"> </span>
|
|
102
|
-
<span class="cline-any cline-yes">
|
|
103
|
-
<span class="cline-any cline-yes">
|
|
102
|
+
<span class="cline-any cline-yes">89x</span>
|
|
103
|
+
<span class="cline-any cline-yes">89x</span>
|
|
104
104
|
<span class="cline-any cline-neutral"> </span>
|
|
105
105
|
<span class="cline-any cline-neutral"> </span>
|
|
106
106
|
<span class="cline-any cline-neutral"> </span>
|
|
107
107
|
<span class="cline-any cline-neutral"> </span>
|
|
108
108
|
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-yes">
|
|
109
|
+
<span class="cline-any cline-yes">15x</span>
|
|
110
110
|
<span class="cline-any cline-neutral"> </span>
|
|
111
111
|
<span class="cline-any cline-neutral"> </span>
|
|
112
|
-
<span class="cline-any cline-yes">
|
|
112
|
+
<span class="cline-any cline-yes">15x</span>
|
|
113
113
|
<span class="cline-any cline-neutral"> </span>
|
|
114
|
-
<span class="cline-any cline-yes">
|
|
115
|
-
<span class="cline-any cline-yes">
|
|
116
|
-
<span class="cline-any cline-yes">
|
|
117
|
-
<span class="cline-any cline-yes">
|
|
114
|
+
<span class="cline-any cline-yes">104x</span>
|
|
115
|
+
<span class="cline-any cline-yes">104x</span>
|
|
116
|
+
<span class="cline-any cline-yes">15x</span>
|
|
117
|
+
<span class="cline-any cline-yes">89x</span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span>
|
|
119
119
|
<span class="cline-any cline-neutral"> </span>
|
|
120
|
-
<span class="cline-any cline-yes">
|
|
120
|
+
<span class="cline-any cline-yes">15x</span>
|
|
121
121
|
<span class="cline-any cline-neutral"> </span>
|
|
122
122
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type {StoryObj, Meta} from '@storybook/web-components';
|
|
123
123
|
import {it} from 'vitest';
|
|
@@ -154,7 +154,7 @@ export async function testStoryBook<TProps>( mod: Record<string, StoryO
|
|
|
154
154
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
155
155
|
Code coverage generated by
|
|
156
156
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
157
|
-
at
|
|
157
|
+
at 2026-01-10T23:35:15.244Z
|
|
158
158
|
</div>
|
|
159
159
|
<script src="../../prettify.js"></script>
|
|
160
160
|
<script>
|
package/coverage/src/sum.ts.html
CHANGED
|
@@ -79,7 +79,7 @@ export function sum(a: number, b: number) {
|
|
|
79
79
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
80
80
|
Code coverage generated by
|
|
81
81
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
82
|
-
at
|
|
82
|
+
at 2026-01-10T23:35:15.244Z
|
|
83
83
|
</div>
|
|
84
84
|
<script src="../prettify.js"></script>
|
|
85
85
|
<script>
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
<xsl:with-param name="defaultvalue"/>
|
|
90
90
|
</xsl:call-template>
|
|
91
91
|
</xsl:variable>
|
|
92
|
-
</xsl:stylesheet>`);o.importStylesheet(n);const v=o.transformToFragment(y,document),u=(i,r)=>i.querySelector(r),w=u(x,'template[mode="payload"]');if(!v)return console.error("transformation error",{xml:y.outerHTML,xsl:U(n)});if(v.firstElementChild.localName!=="dce-root"){const i=v.ownerDocument.createElement("dce-root");[...v.childNodes].forEach(r=>i.append(r)),v.append(i)}[...v.querySelectorAll("[test]")].forEach(i=>{const r=d(i,"test"),f=r.replace(/hasBoolAttribute\((.*?)\)/g,(g,h,b,T,P)=>{const L=h.substring(1);return`(not($${L} = 'false') and ($${L} = '' or $${L} = '${L}' or $${L} = 'true' ))`});r!==f&&i.setAttribute("test",f)}),[...v.querySelectorAll("dce-root>attribute")].forEach(i=>{K(i,"namespace,name,select");const r=te(i,"xsl:param"),f=d(i,"name");if(t.push(f),i.childNodes.length&&(l[f]=i.textContent),w.append(r),i.hasAttribute("select")){a[f]=d(i,"select"),K(r,"select,name");let g=d(i,"select").split("??"),h;if(g?.length>1){r.removeAttribute("select");const b=u(x,'template[match="ignore"]>choose').cloneNode(!0);F(b.firstElementChild).append(D(b,"{"+g[0]+"}")),b.firstElementChild.setAttribute("test",g[0]);for(let T=1;T<g.length-1;T++){const P=b.firstElementChild.cloneNode(!0);F(P).append(D(b,"{"+g[T]+"}")),P.setAttribute("test",g[T]),b.insertBefore(P,b.lastElementChild)}F(b.lastElementChild).append(D(b,"{"+g[g.length-1]+"}")),r.append(b),h=b.cloneNode(!0)}else h=te(i,"xsl:value-of");h.removeAttribute("name"),i.append(h),i.removeAttribute("select")}else K(r,"name"),r.setAttribute("select","/datadom/attributes/"+f),l[f]||i.remove()}),[...v.querySelectorAll("[value]")].filter(i=>i.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach(i=>{const r=d(i,"value");r&&i.setAttribute("value",Ne(r))});for(const i of v.childNodes)w.append(x.importNode(i,!0));[...w.getElementsByTagName("xsl:template")].forEach(i=>w.ownerDocument.documentElement.append(i));const O=u(x,'call-template[name="slot"]'),H=i=>{const r=O.cloneNode(!0),f=d(i,"name");f&&r.firstElementChild.setAttribute("select",`'${f}'`);for(let g of i.childNodes)r.lastElementChild.append(g);return r};z(w,"slot",i=>i.parentNode.replaceChild(H(i),i));const p=le(x);return ee(p,{declaredAttributes:t,hardcodedAttributes:l,exposedAttributes:a}),p}async function be(e){return await new Promise((t,l)=>{const a=new XMLHttpRequest;a.open("GET",e),a.responseType="document",a.onload=()=>{a.readyState===a.DONE&&a.status===200?t(a.responseXML?.body||a.responseXML||C("div",a.responseText)):l(`${a.statusText} - ${e}`)},a.addEventListener("error",n=>l(n)),a.send()})}function ye(e,s,t=!1){if(e===s)return!0;if(typeof e!="object"||e===null||typeof s!="object"||s===null||Object.keys(e).length!==Object.keys(s).length)return t;for(let l in e)if(!(l in s)||!ye(e[l],s[l]))return t;return!0}const ge=e=>e.split("|").map(s=>s.trim()).filter(s=>s),Ae=(e,s)=>ge(s).map(t=>{let l=e.ownerDocument,a=n=>(e.append(n),n);if(t.includes("/")){const n=[],o=l.evaluate(t,e);for(let y;y=o.iterateNext();)n.push(y);return n}return[...e.childNodes].find(n=>n.localName===t)||a(C(t,"",l))}).flat();function ne(e,s,t,l){if(!t.sliceProcessed)return t.sliceProcessed=1,Ae(e,s??"").map(a=>{const n=e.ownerDocument,o=t.sliceEventSource,y=t.sliceElement,x=()=>[...a.childNodes].filter(u=>u.nodeType===3||u.localName==="value"||u.localName==="form-data").map(u=>u.remove());o.getAttributeNames().map(u=>a.setAttribute(u,d(o,u))),[...a.childNodes].filter(u=>u.localName==="event").map(u=>u.remove()),"validationMessage"in o&&a.setAttribute("validation-message",o.validationMessage),t.type==="init"&&x(),a.append(M(t,"event",n));const v=(o.type==="checkbox"||o.type==="radio")&&!o.checked;if(y.hasAttribute("slice-value")){o.value===void 0?a.removeAttribute("value"):a.setAttribute("value",o.value);const u=v?"":I(d(y,"slice-value"),a);x(),a.append(D(n,u))}else{if("elements"in o)return x(),a.append(M(new FormData(o),"value",a.ownerDocument)),a;const u=v?"":o.value??d(o,"value");if(x(),u==null)[...a.childNodes].filter(w=>w.localName!=="event").map(w=>w.remove()),a.removeAttribute("value");else{const w=De(u)?D(n,u):M(u,"value",a.ownerDocument);a.append(w),a.setAttribute("value",u)}}return a})}function z(e,s,t){e.querySelectorAll&&[...e.querySelectorAll(s)].forEach(t)}const je=async(e,s)=>{if(!e||!e.trim())return[s];if(e.startsWith("#"))return(t=>{const l=t.querySelectorAll(e);return[...l.length?l:t.getRootNode().querySelectorAll(e)]})(s.parentElement);try{const[t,l]=e.split("#");if(e.charAt(0)===".")e=new URL(t,s.closest("[base]")?.getAttribute("base")||location).href;else try{e=(void 0)(t),l&&(e+="#"+l)}catch(n){console.error(n.message)}const a=await be(e);if(s.setAttributeNS("xml","base",e),l){const n=a.querySelectorAll("#"+l);return n.length?[...n]:(console.error("template not found",e+"#"+l),[s])}return[a]}catch{return[s]}};function ae(e,s){for(let n of e.attributes)try{const o=n.name;if(o.startsWith("xmlns"))continue;n.namespaceURI?(!s.hasAttributeNS(n.namespaceURI,o)||s.getAttributeNS(n.namespaceURI,o)!==n.value)&&s.setAttributeNS(n.namespaceURI,o,n.value):(!s.hasAttribute(o)||s.getAttribute(o)!==n.value)&&s.setAttribute(n.name,n.value),n.name==="value"&&(s.value=n.value)}catch(o){console.warn("attribute assignment error",o?.message||o)}const t=s.dceExportedAttributes,l=s.getAttribute("dce-exported-attributes"),a=l?new Set(l.split(" ")):null;for(let n of s.getAttributeNames())!e.hasAttribute(n)&&!t?.has(n)&&!a?.has(n)&&s.removeAttribute(n)}function ie(e,s=0){const t={};for(const l of e.childNodes){const a=d(l,"data-dce-id")||l.dceId||0;if(!t[a])a?t[a]=1:(t[a]=l.dceId=++s,l.setAttribute&&l.setAttribute("data-dce-id",l.dceId));else{const n=l.dceId=a+"-"+t[a]++;l.setAttribute&&l.setAttribute("data-dce-id",n)}l.childNodes.length&&ie(l)}}function ve(e,s,t){t=1*t;for(let l of e.childNodes)if((l.dceId??l.getAttribute("data-dce-id")*1)>t)return e.insertBefore(s,l);e.append(s)}function re(e,s){if(e.firstElementChild?.localName==="dce-root"&&s[0]?.localName!=="dce-root")return;if(!s.length)return e.firstElementChild?.localName!=="dce-root"&&de(e);const t={};for(let l of e.childNodes)t[l.dceId],me(l)?(l.data.trim(),t[l.dceId||0]=l):t[d(l,"data-dce-id")||0]=l;for(let l of[...s]){const a=d(l,"data-dce-id")||l.dceId,n=t[a];n?(me(l)?n.nodeValue!==l.nodeValue&&(n.nodeValue=l.nodeValue):(ae(l,n),(n.childNodes.length||l.childNodes.length)&&re(n,l.childNodes)),delete t[a]):ve(e,l,a)}for(let l of Object.values(t))l.localName!=="dce-root"&&l.remove()}function Ee(e,s){return e.hasAttribute(s)||e.setAttribute(s,crypto.randomUUID()),e.getAttribute(s)}const Ne=e=>[...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map(t=>`${t[1]}{${W(t[3])}}${t[4]}`).join(""),W=e=>{if(!e.trim())return e;const s=e.split("??"),t=s.shift(),l=W(s.join("??"));return s.length?`concat( ${t} , substring( ${l} , (1+string-length( ${l} )) * string-length( ${t} ) ) )`:e},I=(e,s)=>{const t=e.split("??");if(t.length>1)return I(t[0],s)||I(t[1],s);e=W(e);const l=s.ownerDocument.evaluate(e,s);switch(l.resultType){case XPathResult.NUMBER_TYPE:return l.numberValue;case XPathResult.STRING_TYPE:return l.stringValue;case XPathResult.BOOLEAN_TYPE:return l.booleanValue}let a="";for(let n;n=l.iterateNext();)a+=n.textContent;return a},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,s)=>{const t=C("xsl:"+e.localName);for(let a of e.attributes)t.setAttribute(a.name,a.value);for(;e.firstChild;)t.append(e.firstChild);const l=
|
|
92
|
+
</xsl:stylesheet>`);o.importStylesheet(n);const v=o.transformToFragment(y,document),u=(i,r)=>i.querySelector(r),w=u(x,'template[mode="payload"]');if(!v)return console.error("transformation error",{xml:y.outerHTML,xsl:U(n)});if(v.firstElementChild.localName!=="dce-root"){const i=v.ownerDocument.createElement("dce-root");[...v.childNodes].forEach(r=>i.append(r)),v.append(i)}[...v.querySelectorAll("[test]")].forEach(i=>{const r=d(i,"test"),f=r.replace(/hasBoolAttribute\((.*?)\)/g,(g,h,b,T,P)=>{const L=h.substring(1);return`(not($${L} = 'false') and ($${L} = '' or $${L} = '${L}' or $${L} = 'true' ))`});r!==f&&i.setAttribute("test",f)}),[...v.querySelectorAll("dce-root>attribute")].forEach(i=>{K(i,"namespace,name,select");const r=te(i,"xsl:param"),f=d(i,"name");if(t.push(f),i.childNodes.length&&(l[f]=i.textContent),w.append(r),i.hasAttribute("select")){a[f]=d(i,"select"),K(r,"select,name");let g=d(i,"select").split("??"),h;if(g?.length>1){r.removeAttribute("select");const b=u(x,'template[match="ignore"]>choose').cloneNode(!0);F(b.firstElementChild).append(D(b,"{"+g[0]+"}")),b.firstElementChild.setAttribute("test",g[0]);for(let T=1;T<g.length-1;T++){const P=b.firstElementChild.cloneNode(!0);F(P).append(D(b,"{"+g[T]+"}")),P.setAttribute("test",g[T]),b.insertBefore(P,b.lastElementChild)}F(b.lastElementChild).append(D(b,"{"+g[g.length-1]+"}")),r.append(b),h=b.cloneNode(!0)}else h=te(i,"xsl:value-of");h.removeAttribute("name"),i.append(h),i.removeAttribute("select")}else K(r,"name"),r.setAttribute("select","/datadom/attributes/"+f),l[f]||i.remove()}),[...v.querySelectorAll("[value]")].filter(i=>i.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach(i=>{const r=d(i,"value");r&&i.setAttribute("value",Ne(r))});for(const i of v.childNodes)w.append(x.importNode(i,!0));[...w.getElementsByTagName("xsl:template")].forEach(i=>w.ownerDocument.documentElement.append(i));const O=u(x,'call-template[name="slot"]'),H=i=>{const r=O.cloneNode(!0),f=d(i,"name");f&&r.firstElementChild.setAttribute("select",`'${f}'`);for(let g of i.childNodes)r.lastElementChild.append(g);return r};z(w,"slot",i=>i.parentNode.replaceChild(H(i),i));const p=le(x);return ee(p,{declaredAttributes:t,hardcodedAttributes:l,exposedAttributes:a}),p}async function be(e){return await new Promise((t,l)=>{const a=new XMLHttpRequest;a.open("GET",e),a.responseType="document",a.onload=()=>{a.readyState===a.DONE&&a.status===200?t(a.responseXML?.body||a.responseXML||C("div",a.responseText)):l(`${a.statusText} - ${e}`)},a.addEventListener("error",n=>l(n)),a.send()})}function ye(e,s,t=!1){if(e===s)return!0;if(typeof e!="object"||e===null||typeof s!="object"||s===null||Object.keys(e).length!==Object.keys(s).length)return t;for(let l in e)if(!(l in s)||!ye(e[l],s[l]))return t;return!0}const ge=e=>e.split("|").map(s=>s.trim()).filter(s=>s),Ae=(e,s)=>ge(s).map(t=>{let l=e.ownerDocument,a=n=>(e.append(n),n);if(t.includes("/")){const n=[],o=l.evaluate(t,e);for(let y;y=o.iterateNext();)n.push(y);return n}return[...e.childNodes].find(n=>n.localName===t)||a(C(t,"",l))}).flat();function ne(e,s,t,l){if(!t.sliceProcessed)return t.sliceProcessed=1,Ae(e,s??"").map(a=>{const n=e.ownerDocument,o=t.sliceEventSource,y=t.sliceElement,x=()=>[...a.childNodes].filter(u=>u.nodeType===3||u.localName==="value"||u.localName==="form-data").map(u=>u.remove());o.getAttributeNames().map(u=>a.setAttribute(u,d(o,u))),[...a.childNodes].filter(u=>u.localName==="event").map(u=>u.remove()),"validationMessage"in o&&a.setAttribute("validation-message",o.validationMessage),t.type==="init"&&x(),a.append(M(t,"event",n));const v=(o.type==="checkbox"||o.type==="radio")&&!o.checked;if(y.hasAttribute("slice-value")){o.value===void 0?a.removeAttribute("value"):a.setAttribute("value",o.value);const u=v?"":I(d(y,"slice-value"),a);x(),a.append(D(n,u))}else{if("elements"in o)return x(),a.append(M(new FormData(o),"value",a.ownerDocument)),a;const u=v?"":o.value??d(o,"value");if(x(),u==null)[...a.childNodes].filter(w=>w.localName!=="event").map(w=>w.remove()),a.removeAttribute("value");else{const w=De(u)?D(n,u):M(u,"value",a.ownerDocument);a.append(w),a.setAttribute("value",u)}}return a})}function z(e,s,t){e.querySelectorAll&&[...e.querySelectorAll(s)].forEach(t)}const je=async(e,s)=>{if(!e||!e.trim())return[s];if(e.startsWith("#"))return(t=>{const l=t.querySelectorAll(e);return[...l.length?l:t.getRootNode().querySelectorAll(e)]})(s.parentElement);try{const[t,l]=e.split("#");if(e.charAt(0)===".")e=new URL(t,s.closest("[base]")?.getAttribute("base")||location).href;else try{e=(void 0)(t),l&&(e+="#"+l)}catch(n){console.error(n.message)}const a=await be(e);if(s.setAttributeNS("xml","base",e),l){const n=a.querySelectorAll("#"+l);return n.length?[...n]:(console.error("template not found",e+"#"+l),[s])}return[a]}catch{return[s]}};function ae(e,s){for(let n of e.attributes)try{const o=n.name;if(o.startsWith("xmlns"))continue;n.namespaceURI?(!s.hasAttributeNS(n.namespaceURI,o)||s.getAttributeNS(n.namespaceURI,o)!==n.value)&&s.setAttributeNS(n.namespaceURI,o,n.value):(!s.hasAttribute(o)||s.getAttribute(o)!==n.value)&&s.setAttribute(n.name,n.value),n.name==="value"&&(s.value=n.value)}catch(o){console.warn("attribute assignment error",o?.message||o)}const t=s.dceExportedAttributes,l=s.getAttribute("dce-exported-attributes"),a=l?new Set(l.split(" ")):null;for(let n of s.getAttributeNames())!e.hasAttribute(n)&&!t?.has(n)&&!a?.has(n)&&s.removeAttribute(n)}function ie(e,s=0){const t={};for(const l of e.childNodes){const a=d(l,"data-dce-id")||l.dceId||0;if(!t[a])a?t[a]=1:(t[a]=l.dceId=++s,l.setAttribute&&l.setAttribute("data-dce-id",l.dceId));else{const n=l.dceId=a+"-"+t[a]++;l.setAttribute&&l.setAttribute("data-dce-id",n)}l.childNodes.length&&ie(l)}}function ve(e,s,t){t=1*t;for(let l of e.childNodes)if((l.dceId??l.getAttribute("data-dce-id")*1)>t)return e.insertBefore(s,l);e.append(s)}function re(e,s){if(e.firstElementChild?.localName==="dce-root"&&s[0]?.localName!=="dce-root")return;if(!s.length)return e.firstElementChild?.localName!=="dce-root"&&de(e);const t={};for(let l of e.childNodes)t[l.dceId],me(l)?(l.data.trim(),t[l.dceId||0]=l):t[d(l,"data-dce-id")||0]=l;for(let l of[...s]){const a=d(l,"data-dce-id")||l.dceId,n=t[a];n?(me(l)?n.nodeValue!==l.nodeValue&&(n.nodeValue=l.nodeValue):(ae(l,n),(n.childNodes.length||l.childNodes.length)&&re(n,l.childNodes)),delete t[a]):ve(e,l,a)}for(let l of Object.values(t))l.localName!=="dce-root"&&l.remove()}function Ee(e,s){return e.hasAttribute(s)||e.setAttribute(s,crypto.randomUUID()),e.getAttribute(s)}const Ne=e=>[...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map(t=>`${t[1]}{${W(t[3])}}${t[4]}`).join(""),W=e=>{if(!e.trim())return e;const s=e.split("??"),t=s.shift(),l=W(s.join("??"));return s.length?`concat( ${t} , substring( ${l} , (1+string-length( ${l} )) * string-length( ${t} ) ) )`:e},I=(e,s)=>{const t=e.split("??");if(t.length>1)return I(t[0],s)||I(t[1],s);e=W(e);const l=s.ownerDocument.evaluate(e,s);switch(l.resultType){case XPathResult.NUMBER_TYPE:return l.numberValue;case XPathResult.STRING_TYPE:return l.stringValue;case XPathResult.BOOLEAN_TYPE:return l.booleanValue}let a="";for(let n;n=l.iterateNext();)a+=n.textContent;return a},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,s)=>{const t=C("xsl:"+e.localName);for(let a of e.attributes)t.setAttribute(a.name,a.value);for(;e.firstChild;)t.append(e.firstChild);const l="if,choose,for-each".includes(e.localName)?(()=>{const a=C("span");return a.append(t),a})():t;if(e.parentElement)e.parentElement.replaceChild(l,e);else{const a=e.parentElement||s,n=[...a.childNodes];n.forEach((o,y)=>{o===e&&(n[y]=l)}),a.replaceChildren(...n)}};class Se extends HTMLElement{static observedAttributes=["src","tag","hidden"];async connectedCallback(){this.firstElementChild&&this.firstElementChild.localName!=="template"&&console.log(`custom-element used without template wrapping content
|
|
93
93
|
`,this.outerHTML);const s=await je(d(this,"src"),this),t=d(this,"tag"),l=t||"dce-"+crypto.randomUUID();for(const p of s)z(p.templateNode||p.content||p,"style",i=>{const r=i.closest("slot"),f=r?`slot[name="${r.name}"]`:"";i.innerHTML=`${l} ${f}{${i.innerHTML}}`,this.append(i)});const a=s.map(p=>xe(p)),n=a.map((p,i)=>{i=new XSLTProcessor;try{i.importStylesheet(p)}catch(r){console.error(r,U(p))}return i});Object.defineProperty(this,"xsltString",{get:()=>a.map(p=>U(p)).join(`
|
|
94
94
|
`)});const o=this,y=[...this.templateNode.querySelectorAll("[slice]")],x=y.map(p=>d(p,"slice")).filter(p=>!p.includes("/")).filter((p,i,r)=>r.indexOf(p)===i).map(ge).flat(),{declaredAttributes:v,hardcodedAttributes:u,exposedAttributes:w}=a[0],oe=new Set([...Object.keys(u),...Object.keys(w)]);class O extends HTMLElement{static get observedAttributes(){return v}#e=0;get dceExportedAttributes(){return oe}connectedCallback(){let i=se(this.childNodes);if(this.firstElementChild?.tagName==="TEMPLATE"){this.firstElementChild!==this.lastElementChild&&console.error("payload should have TEMPLATE as only child",this.outerHTML);const c=this.firstElementChild;c.remove(),i=se(c.content.childNodes);for(const E of i)if(E.localName==="style"){const m=Ee(this,"data-dce-style");E.innerHTML=`${l}[data-dce-style="${m}"]{${E.innerHTML}}`,c.insertAdjacentElement("beforebegin",E)}else E.nodeType===1?c.insertAdjacentElement("beforebegin",E):E.nodeType===3&&c.insertAdjacentText("beforebegin",E.data)}const r=X("<datadom/>").documentElement,f=(c,E="")=>(m=>(E&&m.append(D(r,E)),m))(r.ownerDocument.createElement(c)),g=_(r,"payload",i,Le);pe(g),fe(g),this.innerHTML="";const h=_(r,"attributes",this.attributes,c=>f(c.nodeName,c.value)),b=c=>this.hasAttribute(c)||[...h.children].find(E=>E.localName===c);ae(this,h),Object.keys(u).map(c=>b(c)||h.append(f(c,u[c]))),Object.keys(w).map(c=>b(c)||h.append(f(c))),_(r,"dataset",Object.keys(this.dataset),c=>f(c,this.dataset[c]));const T=_(r,"slice",x,c=>f(c,"")),P=c=>I(c,T);this.xml=r;const L=[],ce=()=>{const c={};for(let E;E=L.pop();){const m=d(E.sliceElement,"slice");c[m]||(ne(T,m,E),c[m]=E)}Object.keys(c).length!==0&&B()};let Y;this.onSlice=c=>{L.push(c),Y||(Y=setTimeout(()=>{ce(),Y=0},1))};const B=this.transform=()=>{if(this.#e)debugger;this.#e=1;const c=()=>{n.map((A,S)=>{const V=A.transformToFragment(r.ownerDocument,document);return V||console.error(`XSLT transformation error. xsl:
|
|
95
95
|
`,U(a[S]),`
|
|
@@ -411,7 +411,7 @@ const $e = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
|
|
|
411
411
|
t.setAttribute(a.name, a.value);
|
|
412
412
|
for (; e.firstChild; )
|
|
413
413
|
t.append(e.firstChild);
|
|
414
|
-
const l =
|
|
414
|
+
const l = "if,choose,for-each".includes(e.localName) ? (() => {
|
|
415
415
|
const a = C("span");
|
|
416
416
|
return a.append(t), a;
|
|
417
417
|
})() : t;
|
|
@@ -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-Bssk9jRy.cjs"),l=require("./http-request-DSaowcG1.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.cloneAs=e.cloneAs;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.mix=e.mix;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 { j as o, f as l, l as r, i as m, c, b as n, e as x, n as p, g, k as i, h as u, m as d, o as f, s as S, t as E, u as I, q as h, p as q, d as D, x as L, a as b, r as v } from "./custom-element-
|
|
1
|
+
import { C as e } from "./custom-element-BzDjIYMe.js";
|
|
2
|
+
import { j as o, f as l, l as r, i as m, c, b as n, e as x, n as p, g, k as i, h as u, m as d, o as f, s as S, t as E, u as I, q as h, p as q, d as D, x as L, a as b, r as v } from "./custom-element-BzDjIYMe.js";
|
|
3
3
|
import { H as T } from "./http-request-DTCzZ1gc.js";
|
|
4
4
|
import { L as _, c as j, b as k, a as y, l as A } from "./local-storage-DzmNKzgN.js";
|
|
5
5
|
import { L as H } from "./location-element-FJlONi2n.js";
|