@epa-wg/custom-element-dist 0.0.1
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/.editorconfig +11 -0
- package/.gitignore +26 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/compiler.xml +6 -0
- package/.idea/custom-element-dist.iml +13 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.storybook/main.ts +21 -0
- package/.storybook/preview.ts +17 -0
- package/.vscode/settings.json +24 -0
- package/LICENSE +201 -0
- package/README.md +32 -0
- package/bin/build.sh +8 -0
- package/bin/clean.sh +5 -0
- package/bin/postinstall.sh +17 -0
- package/bin/start.sh +2 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +161 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/src/coverage.svg +10 -0
- package/coverage/src/custom-element/coverage.svg +10 -0
- package/coverage/src/custom-element/custom-element.js/coverage.svg +10 -0
- package/coverage/src/custom-element/custom-element.js.html +2149 -0
- package/coverage/src/custom-element/http-request.js/coverage.svg +10 -0
- package/coverage/src/custom-element/http-request.js.html +352 -0
- package/coverage/src/custom-element/index.html +161 -0
- package/coverage/src/custom-element/local-storage.js/coverage.svg +10 -0
- package/coverage/src/custom-element/local-storage.js.html +346 -0
- package/coverage/src/custom-element/location-element.js/coverage.svg +10 -0
- package/coverage/src/custom-element/location-element.js.html +343 -0
- package/coverage/src/index.html +116 -0
- package/coverage/src/mocks/coverage.svg +10 -0
- package/coverage/src/mocks/handlers.ts/coverage.svg +10 -0
- package/coverage/src/mocks/handlers.ts.html +172 -0
- package/coverage/src/mocks/index.html +116 -0
- package/coverage/src/stories/attributes.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/attributes.stories.ts.html +481 -0
- package/coverage/src/stories/coverage.svg +10 -0
- package/coverage/src/stories/css.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/css.stories.ts.html +397 -0
- package/coverage/src/stories/dom-merge.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/dom-merge.stories.ts.html +424 -0
- package/coverage/src/stories/external-template.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/external-template.stories.ts.html +820 -0
- package/coverage/src/stories/http-request.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/http-request.stories.ts.html +817 -0
- package/coverage/src/stories/index.html +236 -0
- package/coverage/src/stories/local-storage.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/local-storage.stories.ts.html +1249 -0
- package/coverage/src/stories/location-element.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/location-element.stories.ts.html +484 -0
- package/coverage/src/stories/renderPlay.ts/coverage.svg +10 -0
- package/coverage/src/stories/renderPlay.ts.html +151 -0
- package/coverage/src/stories/slice-events.stories.ts/coverage.svg +10 -0
- package/coverage/src/stories/slice-events.stories.ts.html +436 -0
- package/coverage/src/sum.ts/coverage.svg +10 -0
- package/coverage/src/sum.ts.html +94 -0
- package/dist/confused.svg +37 -0
- package/dist/custom-element-B4v-KaIh.cjs +53 -0
- package/dist/custom-element-_g0GTup2.js +436 -0
- package/dist/custom-element-bundle.cjs +1 -0
- package/dist/custom-element-bundle.js +31 -0
- package/dist/embed-1.html +3 -0
- package/dist/html-template.html +126 -0
- package/dist/html-template.xhtml +45 -0
- package/dist/html-template.xml +45 -0
- package/dist/http-request-BOvP4KTl.js +56 -0
- package/dist/http-request-DPrY7mGh.cjs +1 -0
- package/dist/local-storage-Boafngui.cjs +1 -0
- package/dist/local-storage-BqDEu2kF.js +59 -0
- package/dist/location-element-2m0gWq_d.cjs +1 -0
- package/dist/location-element-nA_wsqBt.js +49 -0
- package/dist/mockServiceWorker.js +284 -0
- package/dist/tree.xsl +33 -0
- package/dist/vite.svg +1 -0
- package/index.html +17 -0
- package/package.json +97 -0
- package/public/confused.svg +37 -0
- package/public/embed-1.html +3 -0
- package/public/html-template.html +126 -0
- package/public/html-template.xhtml +45 -0
- package/public/html-template.xml +45 -0
- package/public/mockServiceWorker.js +284 -0
- package/public/tree.xsl +33 -0
- package/public/vite.svg +1 -0
- package/src/assets/lit.svg +1 -0
- package/src/custom-element/custom-element.d.ts +36 -0
- package/src/custom-element/custom-element.js +688 -0
- package/src/custom-element/demo/a.html +63 -0
- package/src/custom-element/demo/confused.svg +37 -0
- package/src/custom-element/demo/data-slices.html +184 -0
- package/src/custom-element/demo/dce-social-preview.png +0 -0
- package/src/custom-element/demo/demo.css +22 -0
- package/src/custom-element/demo/dom-merge.html +123 -0
- package/src/custom-element/demo/embed-1.html +3 -0
- package/src/custom-element/demo/external-template.html +179 -0
- package/src/custom-element/demo/hex-grid-dce.html +183 -0
- package/src/custom-element/demo/hex-grid-transform.png +0 -0
- package/src/custom-element/demo/hex-grid.html +66 -0
- package/src/custom-element/demo/html-template.html +126 -0
- package/src/custom-element/demo/html-template.xhtml +45 -0
- package/src/custom-element/demo/html-template.xml +45 -0
- package/src/custom-element/demo/http-request.html +143 -0
- package/src/custom-element/demo/local-storage.html +218 -0
- package/src/custom-element/demo/location-element.html +155 -0
- package/src/custom-element/demo/logo.png +0 -0
- package/src/custom-element/demo/parameters.html +70 -0
- package/src/custom-element/demo/s.xml +14 -0
- package/src/custom-element/demo/s.xslt +76 -0
- package/src/custom-element/demo/scoped-css.html +169 -0
- package/src/custom-element/demo/ss.html +57 -0
- package/src/custom-element/demo/table.xml +25 -0
- package/src/custom-element/demo/table.xsl +293 -0
- package/src/custom-element/demo/template.xsl +46 -0
- package/src/custom-element/demo/tree.xml +25 -0
- package/src/custom-element/demo/tree.xsl +33 -0
- package/src/custom-element/demo/wc-square.svg +1 -0
- package/src/custom-element/demo/xhtml-template.xhtml +45 -0
- package/src/custom-element/demo/z.html +62 -0
- package/src/custom-element/demo/z.xml +60 -0
- package/src/custom-element/http-request.js +89 -0
- package/src/custom-element/ide/IDE.md +31 -0
- package/src/custom-element/ide/customData-dce.json +112 -0
- package/src/custom-element/ide/customData-xsl.json +1018 -0
- package/src/custom-element/ide/web-types-dce.json +111 -0
- package/src/custom-element/ide/web-types-xsl.json +867 -0
- package/src/custom-element/index.html +168 -0
- package/src/custom-element/index.js +7 -0
- package/src/custom-element/local-storage.js +87 -0
- package/src/custom-element/location-element.js +87 -0
- package/src/custom-element.test.ts +10 -0
- package/src/index.css +38 -0
- package/src/mocks/handlers.ts +29 -0
- package/src/mocks/pokemons.mock.ts +13 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/attributes.stories.ts +132 -0
- package/src/stories/attributes.test.ts +14 -0
- package/src/stories/css.stories.ts +104 -0
- package/src/stories/css.test.ts +12 -0
- package/src/stories/dom-merge.stories.ts +113 -0
- package/src/stories/dom-merge.test.ts +12 -0
- package/src/stories/external-template.stories.ts +245 -0
- package/src/stories/external-template.test.ts +12 -0
- package/src/stories/http-request.stories.ts +244 -0
- package/src/stories/http-request.test.ts +29 -0
- package/src/stories/local-storage.stories.ts +388 -0
- package/src/stories/local-storage.test.ts +12 -0
- package/src/stories/location-element.stories.ts +133 -0
- package/src/stories/location-element.test.ts +14 -0
- package/src/stories/renderPlay.ts +22 -0
- package/src/stories/slice-events.stories.ts +117 -0
- package/src/stories/slice-events.test.ts +12 -0
- package/src/sum.test.ts +6 -0
- package/src/sum.ts +4 -0
- package/src/vite-env.d.ts +1 -0
- package/storybook-static/assets/Color-RQJUDNI5-C4yZhNbM.js +1 -0
- package/storybook-static/assets/Configure-C7d36rng.js +173 -0
- package/storybook-static/assets/DocsRenderer-K4EAMTCU-BLMupvSb.js +2 -0
- package/storybook-static/assets/WithTooltip-Y7J54OF7-BAQSPSFk.js +1 -0
- package/storybook-static/assets/accessibility-W_h2acOZ.png +0 -0
- package/storybook-static/assets/addon-library-BWUCAmyN.png +0 -0
- package/storybook-static/assets/attributes.stories-ZB0RTY1d.js +151 -0
- package/storybook-static/assets/context-C0qIqeS4.png +0 -0
- package/storybook-static/assets/css.stories-CLSX-Xxd.js +86 -0
- package/storybook-static/assets/custom-element-BLZZ00dz.js +53 -0
- package/storybook-static/assets/docs---vsFbMi.png +0 -0
- package/storybook-static/assets/dom-merge.stories-CgHZUABU.js +138 -0
- package/storybook-static/assets/entry-preview-CQqNFx4W.js +8 -0
- package/storybook-static/assets/entry-preview-docs-CWgqLfd3.js +2 -0
- package/storybook-static/assets/external-template.stories-DtSLMxvg.js +316 -0
- package/storybook-static/assets/figma-plugin-CH2hELiO.png +0 -0
- package/storybook-static/assets/formatter-B5HCVTEV-tKeEfJA9.js +58 -0
- package/storybook-static/assets/http-request.stories-CUzlXO89.js +300 -0
- package/storybook-static/assets/iframe-gCvlWuoC.js +2 -0
- package/storybook-static/assets/index-CBQwM6ST.js +508 -0
- package/storybook-static/assets/index-CDavW7r9.js +193 -0
- package/storybook-static/assets/index-CQA5dlr6.js +13 -0
- package/storybook-static/assets/index-Cc7K62zD.js +3 -0
- package/storybook-static/assets/index-DgaNIR0t.js +1 -0
- package/storybook-static/assets/index-Dkj0J1ds.js +1 -0
- package/storybook-static/assets/index-DnEJ_bKa.js +1 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/lit-element-B4_0akdT.js +19 -0
- package/storybook-static/assets/local-storage.stories-BkO6djDz.js +415 -0
- package/storybook-static/assets/location-element.stories-DCIOUd0D.js +108 -0
- package/storybook-static/assets/preview-B4GcaC1c.js +1 -0
- package/storybook-static/assets/preview-B63p-W8V.js +20 -0
- package/storybook-static/assets/preview-BAz7FMXc.js +396 -0
- package/storybook-static/assets/preview-BDY5ThwJ.js +1 -0
- package/storybook-static/assets/preview-C6t8KBFr.js +1 -0
- package/storybook-static/assets/preview-CYD85dwb.js +7 -0
- package/storybook-static/assets/preview-CkgAD_DE.js +2 -0
- package/storybook-static/assets/preview-D8LadFCz.js +48 -0
- package/storybook-static/assets/preview-DNpCpRPf.js +1 -0
- package/storybook-static/assets/preview-PxUn-cIn.js +1 -0
- package/storybook-static/assets/share-DGA-UcQf.png +0 -0
- package/storybook-static/assets/slice-events.stories-DXKjXI37.js +115 -0
- package/storybook-static/assets/styling-Bk6zjRzU.png +0 -0
- package/storybook-static/assets/syntaxhighlighter-JOJW2KGS-C04pIVD3.js +1 -0
- package/storybook-static/assets/testing-cbzR9l9r.png +0 -0
- package/storybook-static/assets/theming-D6WJLNoW.png +0 -0
- package/storybook-static/assets/tiny-invariant-BxWVcicq.js +1 -0
- package/storybook-static/confused.svg +37 -0
- package/storybook-static/embed-1.html +3 -0
- package/storybook-static/favicon.svg +7 -0
- package/storybook-static/html-template.html +126 -0
- package/storybook-static/html-template.xhtml +45 -0
- package/storybook-static/html-template.xml +45 -0
- package/storybook-static/iframe.html +492 -0
- package/storybook-static/index.html +163 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/mockServiceWorker.js +284 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +327 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +40 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +60 -0
- package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +33 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/links-1/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/fonts.css +31 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/WithTooltip-Y7J54OF7-CEHQ77YF.js +1 -0
- package/storybook-static/sb-manager/chunk-E3WK6ZOZ.js +234 -0
- package/storybook-static/sb-manager/chunk-E6ABNH5R.js +183 -0
- package/storybook-static/sb-manager/chunk-FEE35O7J.js +9 -0
- package/storybook-static/sb-manager/chunk-S4VOIVUE.js +347 -0
- package/storybook-static/sb-manager/chunk-XCO5HRLK.js +6 -0
- package/storybook-static/sb-manager/chunk-XP3HGWTR.js +1 -0
- package/storybook-static/sb-manager/formatter-B5HCVTEV-7DCBOGO6.js +58 -0
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals-runtime.js +1 -0
- package/storybook-static/sb-manager/globals.js +1 -0
- package/storybook-static/sb-manager/index.js +1 -0
- package/storybook-static/sb-manager/runtime.js +1 -0
- package/storybook-static/sb-manager/syntaxhighlighter-JOJW2KGS-VF6EEVPI.js +1 -0
- package/storybook-static/sb-preview/globals.js +1 -0
- package/storybook-static/sb-preview/runtime.js +139 -0
- package/storybook-static/tree.xsl +33 -0
- package/storybook-static/vite.svg +1 -0
- package/tsconfig.json +25 -0
- package/vite.config.js +55 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18"><defs><style>.cls-1{fill:#c2e6f1;}.cls-2{fill:#dcf1f7;}.cls-3{fill:#2d4554;}.cls-4{fill:#60cae5;}</style></defs><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/></svg>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>template based on HTML file</title>
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<b id="wave">👋</b>
|
|
9
|
+
<b id="ok">👌</b>
|
|
10
|
+
<svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18"><defs><style>.cls-1{fill:#c2e6f1;}.cls-2{fill:#dcf1f7;}.cls-3{fill:#2d4554;}.cls-4{fill:#60cae5;}</style></defs><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/><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"/></svg>
|
|
11
|
+
<xsl:stylesheet
|
|
12
|
+
id="embedded-xsl"
|
|
13
|
+
version="1.0"
|
|
14
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
15
|
+
<xsl:output
|
|
16
|
+
method="html"
|
|
17
|
+
omit-xml-declaration="yes"
|
|
18
|
+
standalone="yes"
|
|
19
|
+
indent="yes"
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<xsl:template match="/">
|
|
23
|
+
<xsl:apply-templates select="*"/>
|
|
24
|
+
</xsl:template>
|
|
25
|
+
<xsl:template match="*">
|
|
26
|
+
<details style="padding:0 1rem" open="open">
|
|
27
|
+
<summary>
|
|
28
|
+
<b style="color:green"><xsl:value-of select="name()"/></b>
|
|
29
|
+
<xsl:apply-templates select="@*"/>
|
|
30
|
+
</summary>
|
|
31
|
+
<xsl:value-of select="./text()"/>
|
|
32
|
+
<xsl:apply-templates select="*"/>
|
|
33
|
+
</details>
|
|
34
|
+
</xsl:template>
|
|
35
|
+
<xsl:template match="@*">
|
|
36
|
+
<code style="margin-left:1rem;color:brown"><xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</code>
|
|
37
|
+
</xsl:template>
|
|
38
|
+
<xsl:template match="text()">
|
|
39
|
+
<p>
|
|
40
|
+
<xsl:value-of select="."/>
|
|
41
|
+
</p>
|
|
42
|
+
</xsl:template>
|
|
43
|
+
</xsl:stylesheet>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<dce-root xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
|
2
|
+
xmlns:dce="urn:schemas-epa-wg:dce" data-dce-id="1">
|
|
3
|
+
<location-element xmlns="" slice="window-url" live="" data-dce-id="2"></location-element>
|
|
4
|
+
<table xmlns="" data-dce-id="3">
|
|
5
|
+
<tbody data-dce-id="0-1">
|
|
6
|
+
<tr data-dce-id="4">
|
|
7
|
+
<th data-dce-id="5"><h3 data-dce-id="6"> URL properties </h3></th>
|
|
8
|
+
<td data-dce-id="7">9</td>
|
|
9
|
+
</tr>
|
|
10
|
+
<tr data-dce-id="10">
|
|
11
|
+
<th data-dce-id="11">href</th>
|
|
12
|
+
<td data-dce-id="12">http://localhost:63342/custom-element/demo/a.html?_ijt=dmv0p4go000q47lg48i5im92f7&_ij_reload=RELOAD_ON_SAVE</td>
|
|
13
|
+
</tr>
|
|
14
|
+
<tr data-dce-id="10-1">
|
|
15
|
+
<th data-dce-id="11">origin</th>
|
|
16
|
+
<td data-dce-id="12">http://localhost:63342</td>
|
|
17
|
+
</tr>
|
|
18
|
+
<tr data-dce-id="10-2">
|
|
19
|
+
<th data-dce-id="11">protocol</th>
|
|
20
|
+
<td data-dce-id="12">http:</td>
|
|
21
|
+
</tr>
|
|
22
|
+
<tr data-dce-id="10-3">
|
|
23
|
+
<th data-dce-id="11">host</th>
|
|
24
|
+
<td data-dce-id="12">localhost:63342</td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr data-dce-id="10-4">
|
|
27
|
+
<th data-dce-id="11">hostname</th>
|
|
28
|
+
<td data-dce-id="12">localhost</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr data-dce-id="10-5">
|
|
31
|
+
<th data-dce-id="11">port</th>
|
|
32
|
+
<td data-dce-id="12">63342</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr data-dce-id="10-6">
|
|
35
|
+
<th data-dce-id="11">pathname</th>
|
|
36
|
+
<td data-dce-id="12">/custom-element/demo/a.html</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr data-dce-id="10-7">
|
|
39
|
+
<th data-dce-id="11">search</th>
|
|
40
|
+
<td data-dce-id="12">?_ijt=dmv0p4go000q47lg48i5im92f7&_ij_reload=RELOAD_ON_SAVE</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr data-dce-id="10-8">
|
|
43
|
+
<th data-dce-id="11">hash</th>
|
|
44
|
+
<td data-dce-id="12"></td>
|
|
45
|
+
</tr>
|
|
46
|
+
</tbody>
|
|
47
|
+
</table>
|
|
48
|
+
<h3 data-dce-id="9"> URL parameters </h3>
|
|
49
|
+
<table xmlns="" data-dce-id="8">
|
|
50
|
+
|
|
51
|
+
<tbody data-dce-id="0-1">
|
|
52
|
+
<tr data-dce-id="10">
|
|
53
|
+
<th data-dce-id="11">_ijt</th>
|
|
54
|
+
<td data-dce-id="12">dmv0p4go000q47lg48i5im92f7</td>
|
|
55
|
+
</tr>
|
|
56
|
+
<tr data-dce-id="10-1">
|
|
57
|
+
<th data-dce-id="11">_ij_reload</th>
|
|
58
|
+
<td data-dce-id="12">RELOAD_ON_SAVE</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
</dce-root>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<dce-root data-dce-id="1" xmlns:dce="urn:schemas-epa-wg:dce" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
3
|
+
<location-element slice="window-url" data-dce-id="2"/>
|
|
4
|
+
<table data-dce-id="3">
|
|
5
|
+
<tr data-dce-id="4">
|
|
6
|
+
<th data-dce-id="5">
|
|
7
|
+
<u data-dce-id="6">URL properties</u>
|
|
8
|
+
</th>
|
|
9
|
+
</tr>
|
|
10
|
+
<tr data-dce-id="7">
|
|
11
|
+
<th data-dce-id="8">href</th>
|
|
12
|
+
<td data-dce-id="9">http://localhost:63342/custom-element/demo/a.html?_ijt=qca6trk5kne6eo4s4tomq4egmm&_ij_reload=RELOAD_ON_SAVE</td>
|
|
13
|
+
</tr>
|
|
14
|
+
<tr data-dce-id="7">
|
|
15
|
+
<th data-dce-id="8">origin</th>
|
|
16
|
+
<td data-dce-id="9">http://localhost:63342</td>
|
|
17
|
+
</tr>
|
|
18
|
+
<tr data-dce-id="7">
|
|
19
|
+
<th data-dce-id="8">protocol</th>
|
|
20
|
+
<td data-dce-id="9">http:</td>
|
|
21
|
+
</tr>
|
|
22
|
+
<tr data-dce-id="7">
|
|
23
|
+
<th data-dce-id="8">host</th>
|
|
24
|
+
<td data-dce-id="9">localhost:63342</td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr data-dce-id="7">
|
|
27
|
+
<th data-dce-id="8">hostname</th>
|
|
28
|
+
<td data-dce-id="9">localhost</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr data-dce-id="7">
|
|
31
|
+
<th data-dce-id="8">port</th>
|
|
32
|
+
<td data-dce-id="9">63342</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr data-dce-id="7">
|
|
35
|
+
<th data-dce-id="8">pathname</th>
|
|
36
|
+
<td data-dce-id="9">/custom-element/demo/a.html</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr data-dce-id="7">
|
|
39
|
+
<th data-dce-id="8">search</th>
|
|
40
|
+
<td data-dce-id="9">?_ijt=qca6trk5kne6eo4s4tomq4egmm&_ij_reload=RELOAD_ON_SAVE</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr data-dce-id="7">
|
|
43
|
+
<th data-dce-id="8">hash</th>
|
|
44
|
+
<td data-dce-id="9"/>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr data-dce-id="10">
|
|
47
|
+
<th data-dce-id="11">
|
|
48
|
+
<u data-dce-id="12">URL parameters</u>
|
|
49
|
+
</th>
|
|
50
|
+
</tr>
|
|
51
|
+
<tr data-dce-id="13">
|
|
52
|
+
<th data-dce-id="14">_ijt</th>
|
|
53
|
+
<td data-dce-id="15">qca6trk5kne6eo4s4tomq4egmm</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr data-dce-id="13">
|
|
56
|
+
<th data-dce-id="14">_ij_reload</th>
|
|
57
|
+
<td data-dce-id="15">RELOAD_ON_SAVE</td>
|
|
58
|
+
</tr>
|
|
59
|
+
</table>
|
|
60
|
+
</dce-root>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const attr = (el, attr)=> el.getAttribute(attr);
|
|
2
|
+
|
|
3
|
+
export class HttpRequestElement extends HTMLElement
|
|
4
|
+
{
|
|
5
|
+
static observedAttributes =
|
|
6
|
+
[ 'value' // populated from localStorage, if defined initially, sets the value in storage
|
|
7
|
+
, 'slice'
|
|
8
|
+
, 'url'
|
|
9
|
+
, 'method'
|
|
10
|
+
, 'header-accept'
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
get requestHeaders()
|
|
14
|
+
{ const ret = {};
|
|
15
|
+
[...this.attributes].filter(a=>a.name.startsWith('header-')).map( a => ret[a.name.substring(7)] = a.value );
|
|
16
|
+
return ret
|
|
17
|
+
}
|
|
18
|
+
get requestProps()
|
|
19
|
+
{ const ret = {};
|
|
20
|
+
[...this.attributes].filter(a=>!a.name.startsWith('header-'))
|
|
21
|
+
.filter(a=>!a.name.startsWith('slice')).map( a => ret[a.name] = a.value );
|
|
22
|
+
return ret
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
disconnectedCallback(){ this.#destroy?.(); }
|
|
26
|
+
|
|
27
|
+
connectedCallback()
|
|
28
|
+
{
|
|
29
|
+
setTimeout(()=>this.fetch(),0)
|
|
30
|
+
}
|
|
31
|
+
#inProgressUrl = ''
|
|
32
|
+
#destroy = ()=>{}
|
|
33
|
+
|
|
34
|
+
async fetch()
|
|
35
|
+
{
|
|
36
|
+
if( !this.closest('body') )
|
|
37
|
+
return;
|
|
38
|
+
const url = attr(this, 'url') || '';
|
|
39
|
+
if( !url )
|
|
40
|
+
{ this.#destroy?.();
|
|
41
|
+
return this.value = {};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if( this.#inProgressUrl === url )
|
|
45
|
+
return ;
|
|
46
|
+
|
|
47
|
+
this.#inProgressUrl = url;
|
|
48
|
+
const controller = new AbortController();
|
|
49
|
+
this.#destroy = ()=> { controller.abort(this.localName+' disconnected'); this.#inProgressUrl = ''; }
|
|
50
|
+
|
|
51
|
+
const request = { ...this.requestProps, headers: this.requestHeaders }
|
|
52
|
+
, slice = { request }
|
|
53
|
+
, update = () => this.dispatchEvent( new Event('change') );
|
|
54
|
+
this.value = slice;
|
|
55
|
+
|
|
56
|
+
update();
|
|
57
|
+
const response = await fetch(url,{ ...this.requestProps, signal: controller.signal, headers: this.requestHeaders })
|
|
58
|
+
, r = {headers: {}};
|
|
59
|
+
[...response.headers].map( ([k,v]) => r.headers[k] = v );
|
|
60
|
+
'ok,status,statusText,type,url,redirected'.split(',').map( k=> r[k] = response[k] )
|
|
61
|
+
|
|
62
|
+
slice.response = r;
|
|
63
|
+
update();
|
|
64
|
+
if( r.headers['content-type']?.includes('json'))
|
|
65
|
+
try
|
|
66
|
+
{ slice.data = await response.json();
|
|
67
|
+
update();
|
|
68
|
+
}catch(_e){}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
attributeChangedCallback(name, oldValue, newValue)
|
|
72
|
+
{ if( name === 'url' )
|
|
73
|
+
{ if( oldValue !== newValue)
|
|
74
|
+
{
|
|
75
|
+
oldValue && this.#destroy?.();
|
|
76
|
+
if( newValue )
|
|
77
|
+
setTimeout(()=>this.fetch(),10)
|
|
78
|
+
else
|
|
79
|
+
{ this.value = {}
|
|
80
|
+
setTimeout(()=>this.dispatchEvent( new Event('change') ),10)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
window.customElements.define( 'http-request', HttpRequestElement );
|
|
89
|
+
export default HttpRequestElement;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Ide setup for DCE
|
|
2
|
+
<details>
|
|
3
|
+
<summary> VS Code </summary>
|
|
4
|
+
Copy into `.vscode/settings.json`
|
|
5
|
+
|
|
6
|
+
{
|
|
7
|
+
"html.customData": [
|
|
8
|
+
"./node_modules/@epa-wg/custom-element/ide/customData-dce.json",
|
|
9
|
+
"./node_modules/@epa-wg/custom-element/ide/customData-xsl.json",
|
|
10
|
+
"./customData.json"
|
|
11
|
+
],
|
|
12
|
+
}
|
|
13
|
+
After editing the DCE in the HTML sources, update `./customData.json` with project' custom tags and attributes.
|
|
14
|
+
</details>
|
|
15
|
+
|
|
16
|
+
<details>
|
|
17
|
+
<summary> IntelliJ </summary>
|
|
18
|
+
Append into `package.json`
|
|
19
|
+
|
|
20
|
+
{
|
|
21
|
+
"web-types":[ "./node_modules/@epa-wg/custom-element/ide/web-types-dce.json",
|
|
22
|
+
"./node_modules/@epa-wg/custom-element/ide/web-types-xsl.json",
|
|
23
|
+
"./web_types.json"
|
|
24
|
+
],
|
|
25
|
+
}
|
|
26
|
+
After editing the DCE in the HTML, update `./web-types.json` with project' custom tags and attributes.
|
|
27
|
+
</details>
|
|
28
|
+
|
|
29
|
+
# Publishing your components
|
|
30
|
+
When preparing your package for publishing, make sure the instructions on IDE support with your package and DCE package
|
|
31
|
+
tags covered in IntelliJ and VS Code format.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1.1,
|
|
3
|
+
"globalAttributes": [
|
|
4
|
+
{
|
|
5
|
+
"name": "slice",
|
|
6
|
+
"description": {
|
|
7
|
+
"kind": "markdown",
|
|
8
|
+
"value": "Defines the name of data slice in DCE where the data from `value` will be propagated on `change` or by `slice-event` event\n\nOn: any component with `value` and associated change event"
|
|
9
|
+
},
|
|
10
|
+
"references": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Demo",
|
|
13
|
+
"url": "https://unpkg.com/@epa-wg/custom-element/demo/dom-merge.html"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "slice-event",
|
|
19
|
+
"description": {
|
|
20
|
+
"kind": "markdown",
|
|
21
|
+
"value": "Defines the event name on which `value` would be synchronized with DCE slice\n\nOn: any component with `value` and associated change event"
|
|
22
|
+
},
|
|
23
|
+
"references": [
|
|
24
|
+
{
|
|
25
|
+
"name": "Demo",
|
|
26
|
+
"url": "https://unpkg.com/@epa-wg/custom-element/demo/dom-merge.html"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "slice-value",
|
|
32
|
+
"description": {
|
|
33
|
+
"kind": "markdown",
|
|
34
|
+
"value": "XPath expression to populate into the slice"
|
|
35
|
+
},
|
|
36
|
+
"references": [
|
|
37
|
+
{
|
|
38
|
+
"name": "Demo",
|
|
39
|
+
"url": "https://unpkg.com/@epa-wg/custom-element/demo/data-slices.html"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"tags": [
|
|
45
|
+
{
|
|
46
|
+
"name": "custom-element",
|
|
47
|
+
"description": "Declarative Cuestom ELement(DCE). `<custom-element tag='my-element'></custom-element>`.",
|
|
48
|
+
"attributes": [
|
|
49
|
+
{
|
|
50
|
+
"name": "hidden",
|
|
51
|
+
"description": "hides DCE definition to prevent visual appearance of content. Wrap the payload into template tag to prevent applying the inline CSS in global scope.",
|
|
52
|
+
"type": "boolean"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "tag",
|
|
56
|
+
"description": "HTML tag for Custom Element. Used for window.customElements.define(). If not set, would be generated and DCE instance rendered inline.",
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "src",
|
|
61
|
+
"description": "full, relative, or hash URL to DCE template",
|
|
62
|
+
"type": "string",
|
|
63
|
+
"references": [
|
|
64
|
+
{
|
|
65
|
+
"name": "example",
|
|
66
|
+
"url": "https://unpkg.com/@epa-wg/custom-element/demo/external-template.html"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"references": [
|
|
72
|
+
{
|
|
73
|
+
"name": "custom-element",
|
|
74
|
+
"url": "https://github.com/EPA-WG/custom-element"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "for-each",
|
|
80
|
+
"description": "The <xsl:for-each> element selects a set of nodes and processes each of them in the same way. It is often used to iterate through a set of nodes or to change the current node. If one or more <xsl:sort> elements appear as the children of this element, sorting occurs before processing. Otherwise, nodes are processed in document order.",
|
|
81
|
+
"attributes": [
|
|
82
|
+
{
|
|
83
|
+
"name": "select",
|
|
84
|
+
"description": "Uses an XPath expression to select nodes to be processed.",
|
|
85
|
+
"type": "string",
|
|
86
|
+
"references": [
|
|
87
|
+
{
|
|
88
|
+
"name": "MDN docs",
|
|
89
|
+
"url": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each#select"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"references": [
|
|
95
|
+
{
|
|
96
|
+
"name": "for-each",
|
|
97
|
+
"url": "https://developer.mozilla.org/en-US/docs/Web/XSLT/Element/for-each"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "slice",
|
|
103
|
+
"description": "Synthetic element for defining the slice-attributed when more then one slice/event/value associated with parent element",
|
|
104
|
+
"references": [
|
|
105
|
+
{
|
|
106
|
+
"name": "README",
|
|
107
|
+
"url": "https://github.com/EPA-WG/custom-element/tree/develop?tab=readme-ov-file#interactivity-via-data-slice-triggered-by-events"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|