@epa-wg/custom-element-dist 0.0.21 → 0.0.23
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/.gitignore +8 -0
- package/README.md +4 -4
- package/coverage/coverage-final.json +13 -11
- package/coverage/index.html +30 -30
- package/coverage/src/custom-element/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
- package/coverage/src/custom-element/custom-element.js.html +603 -420
- package/coverage/src/custom-element/http-request.js.html +10 -10
- package/coverage/src/custom-element/index.html +18 -18
- package/coverage/src/custom-element/local-storage.js.html +2 -2
- package/coverage/src/custom-element/location-element.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/{css.stories.ts → attributes.test.stories.ts}/coverage.svg +1 -1
- package/coverage/src/stories/{attributes.stories.ts.html → attributes.test.stories.ts.html} +113 -83
- package/coverage/src/stories/coverage.svg +1 -1
- package/coverage/src/stories/css.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/{css.stories.ts.html → css.test.stories.ts.html} +122 -65
- package/coverage/src/stories/dom-merge.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/{dom-merge.stories.ts.html → dom-merge.test.stories.ts.html} +118 -70
- package/coverage/src/stories/external-template.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/{external-template.stories.ts.html → external-template.test.stories.ts.html} +180 -150
- package/coverage/src/stories/form.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/form.test.stories.ts.html +655 -0
- package/coverage/src/stories/http-request.stories.ts.html +7 -7
- package/coverage/src/stories/index.html +118 -88
- package/coverage/src/stories/{dom-merge.stories.ts → local-storage.test.stories.ts}/coverage.svg +1 -1
- package/coverage/src/stories/{local-storage.stories.ts.html → local-storage.test.stories.ts.html} +475 -439
- package/coverage/src/stories/{external-template.stories.ts → location-element.test.stories.ts}/coverage.svg +1 -1
- package/coverage/src/stories/{location-element.stories.ts.html → location-element.test.stories.ts.html} +134 -98
- package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/slice-events.test.stories.ts.html +685 -0
- package/coverage/src/stories/slots.test.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/slots.test.stories.ts.html +736 -0
- package/coverage/src/stories/{renderPlay.ts.html → testStoryBook.ts.html} +44 -26
- package/coverage/src/sum.ts.html +1 -1
- package/dist/custom-element-BISbI4SU.js +463 -0
- package/dist/custom-element-N-sWiqGK.cjs +53 -0
- package/dist/custom-element-bundle.cjs +1 -1
- package/dist/custom-element-bundle.js +2 -2
- package/dist/mockServiceWorker.js +1 -1
- package/package.json +4 -4
- package/public/mockServiceWorker.js +1 -1
- package/src/custom-element/custom-element.d.ts +4 -0
- package/src/custom-element/custom-element.js +103 -42
- package/src/custom-element/demo/a.html +38 -41
- package/src/custom-element/demo/b.html +13 -0
- package/src/custom-element/demo/data-slices.html +32 -0
- package/src/custom-element/demo/form.html +240 -0
- package/src/custom-element/demo/s.xml +11 -14
- package/src/custom-element/demo/s.xslt +22 -38
- package/src/custom-element/demo/s1.xslt +60 -0
- package/src/custom-element/ide/customData-dce.json +14 -1
- package/src/custom-element/ide/web-types-dce.json +6 -1
- package/src/custom-element/ide/web-types-xsl.json +1 -1
- package/src/custom-element/index.html +1 -0
- package/src/custom-element.test.ts +24 -8
- package/src/stories/{attributes.stories.ts → attributes.test.stories.ts} +19 -9
- package/src/stories/{css.stories.ts → css.test.stories.ts} +28 -9
- package/src/stories/{dom-merge.stories.ts → dom-merge.test.stories.ts} +19 -3
- package/src/stories/{external-template.stories.ts → external-template.test.stories.ts} +13 -3
- package/src/stories/form.test.stories.ts +190 -0
- package/src/stories/http-request.stories.ts +6 -6
- package/src/stories/http-request.test.ts +0 -9
- package/src/stories/{local-storage.stories.ts → local-storage.test.stories.ts} +24 -12
- package/src/stories/{location-element.stories.ts → location-element.test.stories.ts} +21 -9
- package/src/stories/{slice-events.stories.ts → slice-events.test.stories.ts} +88 -5
- package/src/stories/slots.test.stories.ts +217 -0
- package/src/stories/testStoryBook.ts +28 -0
- package/storybook-static/assets/{Color-RQJUDNI5-C4yZhNbM.js → Color-PRSJMWNM-BD_Ds9NW.js} +1 -1
- package/storybook-static/assets/{Configure-C7d36rng.js → Configure-70I_VApa.js} +1 -1
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-9dn0-HCP.js +2 -0
- package/storybook-static/assets/WithTooltip-KJL26V4Q-C6g5GOU9.js +1 -0
- package/storybook-static/assets/{attributes.stories-ZB0RTY1d.js → attributes.test.stories-BEOraI4E.js} +22 -21
- package/storybook-static/assets/css.test.stories-D9WaxrEv.js +96 -0
- package/storybook-static/assets/custom-element-BV8-hRQS.js +219 -0
- package/storybook-static/assets/{dom-merge.stories-CgHZUABU.js → dom-merge.test.stories-BhbNeum_.js} +5 -6
- package/storybook-static/assets/{entry-preview-CQqNFx4W.js → entry-preview-DrgzXgwT.js} +1 -1
- package/storybook-static/assets/{entry-preview-docs-CWgqLfd3.js → entry-preview-docs-Bxv0qQWs.js} +1 -1
- package/storybook-static/assets/{external-template.stories-DtSLMxvg.js → external-template.test.stories-Bpr_wxBo.js} +23 -24
- package/storybook-static/assets/form.test.stories-3tURbEdv.js +250 -0
- package/storybook-static/assets/{formatter-B5HCVTEV-tKeEfJA9.js → formatter-2WMMO6ZP-6IvBq34u.js} +5 -5
- package/storybook-static/assets/http-request.stories-8K_qSs8C.js +300 -0
- package/storybook-static/assets/iframe-zdt9kuj6.js +2 -0
- package/storybook-static/assets/index-B3oZkK3F.js +1 -0
- package/storybook-static/assets/index-C30JwJMK.js +548 -0
- package/storybook-static/assets/index-CVRyq5ci.js +27 -0
- package/storybook-static/assets/index-DXimoRZY.js +1 -0
- package/storybook-static/assets/{index-DnEJ_bKa.js → index-DhXZyjEd.js} +1 -1
- package/storybook-static/assets/index-DuIEV_9C.js +13 -0
- package/storybook-static/assets/{lit-element-B4_0akdT.js → lit-element-CenEXOuS.js} +2 -2
- package/storybook-static/assets/{local-storage.stories-BkO6djDz.js → local-storage.test.stories-CtisAQBB.js} +28 -24
- package/storybook-static/assets/{location-element.stories-DCIOUd0D.js → location-element.test.stories-5O_t_m4Y.js} +11 -11
- package/storybook-static/assets/preview-4Up_z4Em.js +7 -0
- package/storybook-static/assets/preview-BKCN0mOr.js +1 -0
- package/storybook-static/assets/{preview-CkgAD_DE.js → preview-D0eCfQft.js} +2 -2
- package/storybook-static/assets/preview-DRnyIGXK.js +48 -0
- package/storybook-static/assets/preview-FpHGYA1q.js +1 -0
- package/storybook-static/assets/{preview-PxUn-cIn.js → preview-TCN6m6T-.js} +1 -1
- package/storybook-static/assets/slice-events.test.stories-BSXCLIA5.js +231 -0
- package/storybook-static/assets/slots.test.stories-B1vqfHmN.js +214 -0
- package/storybook-static/assets/syntaxhighlighter-BP7B2CQK-DpPBKyTO.js +1 -0
- package/storybook-static/iframe.html +153 -10
- package/storybook-static/index.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/mockServiceWorker.js +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +35 -29
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +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 +5 -5
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +35 -35
- 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-10/manager-bundle.js +18 -16
- package/storybook-static/sb-addons/links-1/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +1 -1
- package/storybook-static/sb-manager/WithTooltip-KJL26V4Q-5LS5AN27.js +1 -0
- package/storybook-static/sb-manager/{chunk-S4VOIVUE.js → chunk-B3YDJJJH.js} +9 -9
- package/storybook-static/sb-manager/{chunk-FEE35O7J.js → chunk-BLWCBWKL.js} +3 -3
- package/storybook-static/sb-manager/{chunk-XCO5HRLK.js → chunk-GUVK2GTO.js} +3 -3
- package/storybook-static/sb-manager/chunk-LFRML3ZV.js +186 -0
- package/storybook-static/sb-manager/chunk-MC7RAF2B.js +274 -0
- package/storybook-static/sb-manager/{chunk-XP3HGWTR.js → chunk-ZR5JZWHI.js} +1 -1
- package/storybook-static/sb-manager/{formatter-B5HCVTEV-7DCBOGO6.js → formatter-2WMMO6ZP-JI7RHVTW.js} +1 -1
- package/storybook-static/sb-manager/globals-module-info.js +1 -1
- package/storybook-static/sb-manager/globals-runtime.js +1 -1
- package/storybook-static/sb-manager/index.js +1 -1
- package/storybook-static/sb-manager/runtime.js +1 -1
- package/storybook-static/sb-manager/{syntaxhighlighter-JOJW2KGS-VF6EEVPI.js → syntaxhighlighter-BP7B2CQK-WOJYHKQR.js} +1 -1
- package/storybook-static/sb-preview/runtime.js +28 -11
- package/tsconfig.json +31 -21
- package/vite.config.js +5 -5
- package/yarn.lock +10242 -0
- package/.vscode/settings.json +0 -24
- package/coverage/src/stories/local-storage.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/location-element.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/renderPlay.ts/coverage.svg +0 -10
- package/coverage/src/stories/slice-events.stories.ts/coverage.svg +0 -10
- package/coverage/src/stories/slice-events.stories.ts.html +0 -436
- package/dist/custom-element-B4v-KaIh.cjs +0 -53
- package/dist/custom-element-_g0GTup2.js +0 -436
- package/src/stories/attributes.test.ts +0 -14
- package/src/stories/css.test.ts +0 -12
- package/src/stories/dom-merge.test.ts +0 -12
- package/src/stories/external-template.test.ts +0 -12
- package/src/stories/local-storage.test.ts +0 -12
- package/src/stories/location-element.test.ts +0 -14
- package/src/stories/renderPlay.ts +0 -22
- package/src/stories/slice-events.test.ts +0 -12
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-BLMupvSb.js +0 -2
- package/storybook-static/assets/WithTooltip-Y7J54OF7-BAQSPSFk.js +0 -1
- package/storybook-static/assets/css.stories-CLSX-Xxd.js +0 -86
- package/storybook-static/assets/custom-element-BLZZ00dz.js +0 -53
- package/storybook-static/assets/http-request.stories-CUzlXO89.js +0 -300
- package/storybook-static/assets/iframe-gCvlWuoC.js +0 -2
- package/storybook-static/assets/index-CBQwM6ST.js +0 -508
- package/storybook-static/assets/index-CDavW7r9.js +0 -193
- package/storybook-static/assets/index-CQA5dlr6.js +0 -13
- package/storybook-static/assets/index-DgaNIR0t.js +0 -1
- package/storybook-static/assets/index-Dkj0J1ds.js +0 -1
- package/storybook-static/assets/preview-C6t8KBFr.js +0 -1
- package/storybook-static/assets/preview-CYD85dwb.js +0 -7
- package/storybook-static/assets/preview-D8LadFCz.js +0 -48
- package/storybook-static/assets/preview-DNpCpRPf.js +0 -1
- package/storybook-static/assets/slice-events.stories-DXKjXI37.js +0 -115
- package/storybook-static/assets/syntaxhighlighter-JOJW2KGS-C04pIVD3.js +0 -1
- package/storybook-static/sb-manager/WithTooltip-Y7J54OF7-CEHQ77YF.js +0 -1
- package/storybook-static/sb-manager/chunk-E3WK6ZOZ.js +0 -234
- package/storybook-static/sb-manager/chunk-E6ABNH5R.js +0 -183
- /package/coverage/src/stories/{attributes.stories.ts → testStoryBook.ts}/coverage.svg +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for src/stories/location-element.stories.ts</title>
|
|
6
|
+
<title>Code coverage report for src/stories/location-element.test.stories.ts</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
8
|
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
9
|
<link rel="stylesheet" href="../../base.css" />
|
|
@@ -19,34 +19,34 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/stories</a> location-element.stories.ts</h1>
|
|
22
|
+
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/stories</a> location-element.test.stories.ts</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">19.35% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>12/62</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">100% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>5/5</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">12.5% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>2/16</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">22% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>11/50</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -196,7 +196,20 @@
|
|
|
196
196
|
<a name='L131'></a><a href='#L131'>131</a>
|
|
197
197
|
<a name='L132'></a><a href='#L132'>132</a>
|
|
198
198
|
<a name='L133'></a><a href='#L133'>133</a>
|
|
199
|
-
<a name='L134'></a><a href='#L134'>134</a
|
|
199
|
+
<a name='L134'></a><a href='#L134'>134</a>
|
|
200
|
+
<a name='L135'></a><a href='#L135'>135</a>
|
|
201
|
+
<a name='L136'></a><a href='#L136'>136</a>
|
|
202
|
+
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
|
+
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
|
+
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
|
+
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
+
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
|
+
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
|
+
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
+
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
+
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
+
<a name='L146'></a><a href='#L146'>146</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
212
|
+
<span class="cline-any cline-neutral"> </span>
|
|
200
213
|
<span class="cline-any cline-neutral"> </span>
|
|
201
214
|
<span class="cline-any cline-neutral"> </span>
|
|
202
215
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -213,7 +226,7 @@
|
|
|
213
226
|
<span class="cline-any cline-neutral"> </span>
|
|
214
227
|
<span class="cline-any cline-neutral"> </span>
|
|
215
228
|
<span class="cline-any cline-neutral"> </span>
|
|
216
|
-
<span class="cline-any cline-
|
|
229
|
+
<span class="cline-any cline-no"> </span>
|
|
217
230
|
<span class="cline-any cline-neutral"> </span>
|
|
218
231
|
<span class="cline-any cline-neutral"> </span>
|
|
219
232
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -270,27 +283,27 @@
|
|
|
270
283
|
<span class="cline-any cline-neutral"> </span>
|
|
271
284
|
<span class="cline-any cline-neutral"> </span>
|
|
272
285
|
<span class="cline-any cline-neutral"> </span>
|
|
273
|
-
<span class="cline-any cline-
|
|
274
|
-
<span class="cline-any cline-
|
|
275
|
-
<span class="cline-any cline-
|
|
276
|
-
<span class="cline-any cline-
|
|
277
|
-
<span class="cline-any cline-
|
|
278
|
-
<span class="cline-any cline-
|
|
286
|
+
<span class="cline-any cline-no"> </span>
|
|
287
|
+
<span class="cline-any cline-no"> </span>
|
|
288
|
+
<span class="cline-any cline-no"> </span>
|
|
289
|
+
<span class="cline-any cline-no"> </span>
|
|
290
|
+
<span class="cline-any cline-no"> </span>
|
|
291
|
+
<span class="cline-any cline-no"> </span>
|
|
279
292
|
<span class="cline-any cline-neutral"> </span>
|
|
280
|
-
<span class="cline-any cline-
|
|
281
|
-
<span class="cline-any cline-
|
|
282
|
-
<span class="cline-any cline-
|
|
293
|
+
<span class="cline-any cline-no"> </span>
|
|
294
|
+
<span class="cline-any cline-no"> </span>
|
|
295
|
+
<span class="cline-any cline-no"> </span>
|
|
283
296
|
<span class="cline-any cline-neutral"> </span>
|
|
284
|
-
<span class="cline-any cline-
|
|
285
|
-
<span class="cline-any cline-
|
|
286
|
-
<span class="cline-any cline-
|
|
297
|
+
<span class="cline-any cline-no"> </span>
|
|
298
|
+
<span class="cline-any cline-no"> </span>
|
|
299
|
+
<span class="cline-any cline-no"> </span>
|
|
287
300
|
<span class="cline-any cline-neutral"> </span>
|
|
288
|
-
<span class="cline-any cline-
|
|
289
|
-
<span class="cline-any cline-
|
|
301
|
+
<span class="cline-any cline-no"> </span>
|
|
302
|
+
<span class="cline-any cline-no"> </span>
|
|
290
303
|
<span class="cline-any cline-neutral"> </span>
|
|
291
|
-
<span class="cline-any cline-
|
|
292
|
-
<span class="cline-any cline-
|
|
293
|
-
<span class="cline-any cline-
|
|
304
|
+
<span class="cline-any cline-no"> </span>
|
|
305
|
+
<span class="cline-any cline-no"> </span>
|
|
306
|
+
<span class="cline-any cline-no"> </span>
|
|
294
307
|
<span class="cline-any cline-neutral"> </span>
|
|
295
308
|
<span class="cline-any cline-neutral"> </span>
|
|
296
309
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -303,39 +316,51 @@
|
|
|
303
316
|
<span class="cline-any cline-neutral"> </span>
|
|
304
317
|
<span class="cline-any cline-neutral"> </span>
|
|
305
318
|
<span class="cline-any cline-neutral"> </span>
|
|
306
|
-
<span class="cline-any cline-
|
|
307
|
-
<span class="cline-any cline-
|
|
308
|
-
<span class="cline-any cline-
|
|
309
|
-
<span class="cline-any cline-
|
|
310
|
-
<span class="cline-any cline-
|
|
311
|
-
<span class="cline-any cline-
|
|
312
|
-
<span class="cline-any cline-
|
|
319
|
+
<span class="cline-any cline-no"> </span>
|
|
320
|
+
<span class="cline-any cline-no"> </span>
|
|
321
|
+
<span class="cline-any cline-no"> </span>
|
|
322
|
+
<span class="cline-any cline-no"> </span>
|
|
323
|
+
<span class="cline-any cline-no"> </span>
|
|
324
|
+
<span class="cline-any cline-no"> </span>
|
|
325
|
+
<span class="cline-any cline-no"> </span>
|
|
326
|
+
<span class="cline-any cline-neutral"> </span>
|
|
327
|
+
<span class="cline-any cline-no"> </span>
|
|
328
|
+
<span class="cline-any cline-no"> </span>
|
|
329
|
+
<span class="cline-any cline-no"> </span>
|
|
330
|
+
<span class="cline-any cline-no"> </span>
|
|
331
|
+
<span class="cline-any cline-no"> </span>
|
|
332
|
+
<span class="cline-any cline-no"> </span>
|
|
333
|
+
<span class="cline-any cline-no"> </span>
|
|
334
|
+
<span class="cline-any cline-neutral"> </span>
|
|
335
|
+
<span class="cline-any cline-no"> </span>
|
|
336
|
+
<span class="cline-any cline-no"> </span>
|
|
337
|
+
<span class="cline-any cline-no"> </span>
|
|
338
|
+
<span class="cline-any cline-no"> </span>
|
|
339
|
+
<span class="cline-any cline-no"> </span>
|
|
340
|
+
<span class="cline-any cline-no"> </span>
|
|
341
|
+
<span class="cline-any cline-no"> </span>
|
|
342
|
+
<span class="cline-any cline-neutral"> </span>
|
|
343
|
+
<span class="cline-any cline-neutral"> </span>
|
|
344
|
+
<span class="cline-any cline-neutral"> </span>
|
|
345
|
+
<span class="cline-any cline-neutral"> </span>
|
|
313
346
|
<span class="cline-any cline-neutral"> </span>
|
|
314
|
-
<span class="cline-any cline-yes">1x</span>
|
|
315
|
-
<span class="cline-any cline-yes">1x</span>
|
|
316
|
-
<span class="cline-any cline-yes">1x</span>
|
|
317
|
-
<span class="cline-any cline-yes">1x</span>
|
|
318
|
-
<span class="cline-any cline-yes">1x</span>
|
|
319
|
-
<span class="cline-any cline-yes">1x</span>
|
|
320
|
-
<span class="cline-any cline-yes">1x</span>
|
|
321
347
|
<span class="cline-any cline-neutral"> </span>
|
|
322
348
|
<span class="cline-any cline-yes">1x</span>
|
|
349
|
+
<span class="cline-any cline-neutral"> </span>
|
|
350
|
+
<span class="cline-any cline-neutral"> </span>
|
|
323
351
|
<span class="cline-any cline-yes">1x</span>
|
|
324
352
|
<span class="cline-any cline-yes">1x</span>
|
|
325
353
|
<span class="cline-any cline-yes">1x</span>
|
|
326
354
|
<span class="cline-any cline-yes">1x</span>
|
|
327
|
-
<span class="cline-any cline-yes">1x</span>
|
|
328
|
-
<span class="cline-any cline-yes">1x</span>
|
|
329
|
-
<span class="cline-any cline-neutral"> </span>
|
|
330
|
-
<span class="cline-any cline-neutral"> </span>
|
|
331
355
|
<span class="cline-any cline-neutral"> </span>
|
|
332
356
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// noinspection DuplicatedCode
|
|
333
357
|
|
|
334
|
-
import type { StoryObj }
|
|
335
|
-
import {expect, getByTestId, within}
|
|
358
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
359
|
+
import {expect, getByTestId, within} from '@storybook/test';
|
|
336
360
|
|
|
337
361
|
import '../custom-element/custom-element.js';
|
|
338
362
|
import '../custom-element/location-element.js';
|
|
363
|
+
import {RealtimeEventInSlice, SliceInitChangeEvent} from './slice-events.test.stories';
|
|
339
364
|
|
|
340
365
|
type TProps = { title: string; slice: string; href: string; live:string; body:string};
|
|
341
366
|
const defs: TProps =
|
|
@@ -346,7 +371,7 @@ const defs: TProps =
|
|
|
346
371
|
, body: ``
|
|
347
372
|
};
|
|
348
373
|
type Story = StoryObj<TProps>;
|
|
349
|
-
function sleep(
|
|
374
|
+
function <span class="fstat-no" title="function not covered" >sleep(m</span>s: number) { <span class="cstat-no" title="statement not covered" >return new Promise(<span class="fstat-no" title="function not covered" >(r</span>esolve) => <span class="cstat-no" title="statement not covered" >setTimeout(resolve, ms))</span>; }</span>
|
|
350
375
|
|
|
351
376
|
function render(args: TProps)
|
|
352
377
|
{
|
|
@@ -357,13 +382,13 @@ function render(args: TProps)
|
|
|
357
382
|
|
|
358
383
|
<custom-element>
|
|
359
384
|
<template><!-- wrapping into template to prevent images loading within DCE declaration -->
|
|
360
|
-
<location-element
|
|
361
|
-
slice="${ slice }"
|
|
362
|
-
${ href ? `href="${ href }"`:''}
|
|
385
|
+
<location-element
|
|
386
|
+
slice="${ slice }"
|
|
387
|
+
${ href ? `href="${ href }"`:''}
|
|
363
388
|
live="${ live }"
|
|
364
389
|
></location-element>
|
|
365
|
-
|
|
366
|
-
|
|
390
|
+
|
|
391
|
+
|
|
367
392
|
${ body }
|
|
368
393
|
<xhtml:table>
|
|
369
394
|
<xhtml:tbody>
|
|
@@ -371,12 +396,12 @@ function render(args: TProps)
|
|
|
371
396
|
<xhtml:th><h3> URL properties </h3></xhtml:th>
|
|
372
397
|
<xhtml:td>{count(//value/@*)}</xhtml:td>
|
|
373
398
|
</xhtml:tr>
|
|
374
|
-
<apply-templates mode="attrs" select="
|
|
399
|
+
<apply-templates mode="attrs" select="//${ slice }/value/@*"></apply-templates>
|
|
375
400
|
</xhtml:tbody>
|
|
376
401
|
</xhtml:table>
|
|
377
402
|
<xhtml:table>
|
|
378
403
|
<h3> URL parameters </h3>
|
|
379
|
-
<apply-templates mode="attrs" select="
|
|
404
|
+
<apply-templates mode="attrs" select="//${ slice }/value/params/*/*"></apply-templates>
|
|
380
405
|
</xhtml:table>
|
|
381
406
|
<xsl:template mode="attrs" match="*|@*">
|
|
382
407
|
<xhtml:tr>
|
|
@@ -401,29 +426,29 @@ export const Demo:Story =
|
|
|
401
426
|
<button onclick="history.pushState( {'{}'},'', '/location.html?pushstate=p1&p2=P2#h1')">history.pushState</button>
|
|
402
427
|
<button onclick="history.replaceState( {'{}'},'', '/vacation.html?replaceState=r1&r2=R2#h2')">history.replaceState</button>
|
|
403
428
|
`}
|
|
404
|
-
, play: async ({canvasElement}) =>
|
|
429
|
+
, play: <span class="fstat-no" title="function not covered" >async ({</span>canvasElement}) =>
|
|
405
430
|
{
|
|
406
|
-
const canvas = within(canvasElement)
|
|
407
|
-
await canvas.findByText(Demo.args!.title as string)
|
|
408
|
-
const val = (
|
|
409
|
-
, byText = txt =>
|
|
410
|
-
, expectMatch = (l
|
|
411
|
-
, locationProps = 'href,origin,protocol,host,hostname,port,pathname,search,hash'.split(',')
|
|
431
|
+
const canvas = <span class="cstat-no" title="statement not covered" >within(canvasElement);</span>
|
|
432
|
+
<span class="cstat-no" title="statement not covered" > await canvas.findByText(Demo.args!.title as string);</span>
|
|
433
|
+
const val = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rop)=> <span class="cstat-no" title="statement not covered" >canvas.getByTestId('param-'+prop).textContent.trim()</span></span>
|
|
434
|
+
, byText = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >txt =><span class="cstat-no" title="statement not covered" >c</span>anvas.getByText(txt)</span></span>
|
|
435
|
+
, expectMatch = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>,prop) => <span class="cstat-no" title="statement not covered" >expect( val(prop)).toEqual(l[prop],prop)</span></span>
|
|
436
|
+
, locationProps = <span class="cstat-no" title="statement not covered" >'href,origin,protocol,host,hostname,port,pathname,search,hash'.split(',');</span>
|
|
412
437
|
|
|
413
|
-
locationProps.forEach( prop=>
|
|
414
|
-
byText('history.pushState').click()
|
|
415
|
-
await sleep(100)
|
|
438
|
+
<span class="cstat-no" title="statement not covered" > locationProps.forEach( <span class="fstat-no" title="function not covered" >prop=><span class="cstat-no" title="statement not covered" >e</span>xpectMatch(window.location,prop) )</span></span>
|
|
439
|
+
<span class="cstat-no" title="statement not covered" > byText('history.pushState').click();</span>
|
|
440
|
+
<span class="cstat-no" title="statement not covered" > await sleep(100);</span>
|
|
416
441
|
|
|
417
|
-
expect(val('pathname')).toEqual('/location.html')
|
|
418
|
-
expect(val('search')).toEqual('?pushstate=p1&p2=P2')
|
|
419
|
-
locationProps.forEach( prop=>
|
|
442
|
+
<span class="cstat-no" title="statement not covered" > expect(val('pathname')).toEqual('/location.html');</span>
|
|
443
|
+
<span class="cstat-no" title="statement not covered" > expect(val('search')).toEqual('?pushstate=p1&p2=P2');</span>
|
|
444
|
+
<span class="cstat-no" title="statement not covered" > locationProps.forEach( <span class="fstat-no" title="function not covered" >prop=><span class="cstat-no" title="statement not covered" >e</span>xpectMatch(window.location,prop) )</span></span>
|
|
420
445
|
|
|
421
|
-
byText('history.replaceState').click()
|
|
422
|
-
await sleep(100)
|
|
446
|
+
<span class="cstat-no" title="statement not covered" > byText('history.replaceState').click();</span>
|
|
447
|
+
<span class="cstat-no" title="statement not covered" > await sleep(100);</span>
|
|
423
448
|
|
|
424
|
-
expect(val('pathname')).toEqual('/vacation.html')
|
|
425
|
-
expect(val('search')).toEqual('?replaceState=r1&r2=R2')
|
|
426
|
-
locationProps.forEach( prop=>
|
|
449
|
+
<span class="cstat-no" title="statement not covered" > expect(val('pathname')).toEqual('/vacation.html');</span>
|
|
450
|
+
<span class="cstat-no" title="statement not covered" > expect(val('search')).toEqual('?replaceState=r1&r2=R2');</span>
|
|
451
|
+
<span class="cstat-no" title="statement not covered" > locationProps.forEach( <span class="fstat-no" title="function not covered" >prop=><span class="cstat-no" title="statement not covered" >e</span>xpectMatch(window.location,prop) )</span></span>
|
|
427
452
|
},
|
|
428
453
|
};
|
|
429
454
|
|
|
@@ -434,34 +459,45 @@ export const SrcAttribute:Story =
|
|
|
434
459
|
<button onclick="document.querySelector('location-element').setAttribute('href','/location.html?a1=A1&b2=B2#h2')">/location.html?a1=A1&b2=B2#h2</button>
|
|
435
460
|
<button onclick="document.querySelector('location-element').setAttribute('href','/vacation.html?c1=C1&d2=D2#h3')">/vacation.html?c1=C1&d2=D2#h3</button>
|
|
436
461
|
`}
|
|
437
|
-
, play: async ({canvasElement}) =>
|
|
462
|
+
, play: <span class="fstat-no" title="function not covered" >async ({</span>canvasElement}) =>
|
|
438
463
|
{
|
|
439
|
-
const canvas = within(canvasElement)
|
|
440
|
-
await canvas.findByText(SrcAttribute.args!.title as string)
|
|
441
|
-
const val = (
|
|
442
|
-
, byText = txt =>
|
|
443
|
-
, expectMatch = (l
|
|
444
|
-
, locationProps = 'origin,protocol,host,hostname,port'.split(',')
|
|
445
|
-
locationProps.forEach( prop=>
|
|
464
|
+
const canvas = <span class="cstat-no" title="statement not covered" >within(canvasElement);</span>
|
|
465
|
+
<span class="cstat-no" title="statement not covered" > await canvas.findByText(SrcAttribute.args!.title as string);</span>
|
|
466
|
+
const val = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rop)=> <span class="cstat-no" title="statement not covered" >canvas.getByTestId('param-'+prop).textContent.trim()</span></span>
|
|
467
|
+
, byText = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >txt =><span class="cstat-no" title="statement not covered" >c</span>anvas.getByText(txt)</span></span>
|
|
468
|
+
, expectMatch = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(l</span>,prop) => <span class="cstat-no" title="statement not covered" >expect( val(prop)).toEqual(l[prop],prop)</span></span>
|
|
469
|
+
, locationProps = <span class="cstat-no" title="statement not covered" >'origin,protocol,host,hostname,port'.split(',');</span>
|
|
470
|
+
<span class="cstat-no" title="statement not covered" > locationProps.forEach( <span class="fstat-no" title="function not covered" >prop=><span class="cstat-no" title="statement not covered" >e</span>xpectMatch(window.location,prop) )</span></span>
|
|
446
471
|
|
|
447
|
-
byText('/location.html?a1=A1&b2=B2#h2').click()
|
|
448
|
-
await sleep(10)
|
|
449
|
-
expect(val('pathname')).toEqual('/location.html', 'pathname #2')
|
|
450
|
-
expect(val('search')).toEqual('?a1=A1&b2=B2')
|
|
451
|
-
expect(val('hash')).toEqual('#h2')
|
|
452
|
-
expect(val('a1')).toEqual('A1')
|
|
453
|
-
expect(val('b2')).toEqual('B2')
|
|
472
|
+
<span class="cstat-no" title="statement not covered" > byText('/location.html?a1=A1&b2=B2#h2').click();</span>
|
|
473
|
+
<span class="cstat-no" title="statement not covered" > await sleep(10);</span>
|
|
474
|
+
<span class="cstat-no" title="statement not covered" > expect(val('pathname')).toEqual('/location.html', 'pathname #2');</span>
|
|
475
|
+
<span class="cstat-no" title="statement not covered" > expect(val('search')).toEqual('?a1=A1&b2=B2');</span>
|
|
476
|
+
<span class="cstat-no" title="statement not covered" > expect(val('hash')).toEqual('#h2');</span>
|
|
477
|
+
<span class="cstat-no" title="statement not covered" > expect(val('a1')).toEqual('A1');</span>
|
|
478
|
+
<span class="cstat-no" title="statement not covered" > expect(val('b2')).toEqual('B2');</span>
|
|
454
479
|
|
|
455
|
-
byText('/vacation.html?c1=C1&d2=D2#h3').click()
|
|
456
|
-
await sleep(10)
|
|
457
|
-
expect(val('pathname')).toEqual('/vacation.html', 'pathname #3')
|
|
458
|
-
expect(val('search')).toEqual('?c1=C1&d2=D2')
|
|
459
|
-
expect(val('hash')).toEqual('#h3')
|
|
460
|
-
expect(val('c1')).toEqual('C1')
|
|
461
|
-
expect(val('d2')).toEqual('D2')
|
|
480
|
+
<span class="cstat-no" title="statement not covered" > byText('/vacation.html?c1=C1&d2=D2#h3').click();</span>
|
|
481
|
+
<span class="cstat-no" title="statement not covered" > await sleep(10);</span>
|
|
482
|
+
<span class="cstat-no" title="statement not covered" > expect(val('pathname')).toEqual('/vacation.html', 'pathname #3');</span>
|
|
483
|
+
<span class="cstat-no" title="statement not covered" > expect(val('search')).toEqual('?c1=C1&d2=D2');</span>
|
|
484
|
+
<span class="cstat-no" title="statement not covered" > expect(val('hash')).toEqual('#h3');</span>
|
|
485
|
+
<span class="cstat-no" title="statement not covered" > expect(val('c1')).toEqual('C1');</span>
|
|
486
|
+
<span class="cstat-no" title="statement not covered" > expect(val('d2')).toEqual('D2');</span>
|
|
462
487
|
|
|
463
488
|
},
|
|
464
489
|
};
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
/* istanbul ignore else -- @preserve */
|
|
493
|
+
if( 'test' === import.meta.env.MODE &&
|
|
494
|
+
!import.meta.url.includes('skiptest') )
|
|
495
|
+
{
|
|
496
|
+
const mod = await import('./location-element.test.stories.ts?skiptest');
|
|
497
|
+
const { testStoryBook } = await import('./testStoryBook')
|
|
498
|
+
const { describe } = await import('vitest')
|
|
499
|
+
describe(meta.title, () => testStoryBook( mod, meta ) );
|
|
500
|
+
}
|
|
465
501
|
</pre></td></tr></table></pre>
|
|
466
502
|
|
|
467
503
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -469,7 +505,7 @@ export const SrcAttribute:Story =
|
|
|
469
505
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
470
506
|
Code coverage generated by
|
|
471
507
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
472
|
-
at 2024-
|
|
508
|
+
at 2024-06-27T03:24:38.495Z
|
|
473
509
|
</div>
|
|
474
510
|
<script src="../../prettify.js"></script>
|
|
475
511
|
<script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg viewBox="0 0 140 32" height="20px" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<style>
|
|
3
|
+
.heavy { font: bold 16px sans-serif; fill:white; }
|
|
4
|
+
.percent { font: bold 16px monotype; fill: white; }
|
|
5
|
+
</style>
|
|
6
|
+
<rect width="140" height="32" fill="#473" rx="4"/>
|
|
7
|
+
<rect width="88" height="32" fill="#534" rx="4"/>
|
|
8
|
+
<text x="8" y="21" class="heavy">coverage</text>
|
|
9
|
+
<text x="94" y="22" class="percent">15.38%</text>
|
|
10
|
+
</svg>
|