@dso-toolkit/core 33.2.0 → 34.1.0
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/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
- package/dist/cjs/dso-autosuggest.cjs.entry.js +3 -71
- package/dist/cjs/dso-badge.cjs.entry.js +1 -1
- package/dist/cjs/dso-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +49 -28
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +19 -232
- package/dist/cjs/dso-header.cjs.entry.js +101 -0
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-info-button.cjs.entry.js +2 -2
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-label.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +7 -6
- package/dist/cjs/dso-map-controls.cjs.entry.js +3 -3
- package/dist/cjs/dso-map-overlays.cjs.entry.js +9 -10
- package/dist/cjs/dso-ozon-content.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +2 -2
- package/dist/cjs/dso-tooltip.cjs.entry.js +169 -76
- package/dist/cjs/dso-tree-view.cjs.entry.js +2 -2
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +778 -0
- package/dist/cjs/{index-fcdfdd38.js → index-5ea63531.js} +26 -2
- package/dist/cjs/index-794ad37a.js +72 -0
- package/dist/cjs/index.esm-2ac7081c.js +267 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/alert/alert.css +0 -3
- package/dist/collection/components/anchor/anchor.template.js +17 -0
- package/dist/collection/components/attachments-counter/attachments-counter.css +0 -4
- package/dist/collection/components/autosuggest/autosuggest.css +0 -3
- package/dist/collection/components/badge/badge.css +0 -3
- package/dist/collection/components/banner/banner.css +0 -3
- package/dist/collection/components/button/button.template.js +48 -0
- package/dist/collection/components/context/context.template.js +42 -0
- package/dist/collection/components/date-picker/date-picker.css +3 -5
- package/dist/collection/components/date-picker/date-picker.js +49 -28
- package/dist/collection/components/date-picker/date-picker.template.js +2 -1
- package/dist/collection/components/definition-list/definition-list.template.js +36 -0
- package/dist/collection/components/dropdown-menu/dropdown-menu.css +0 -3
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +15 -4
- package/dist/collection/components/header/header.css +433 -0
- package/dist/collection/components/header/header.js +294 -0
- package/dist/collection/components/header/header.template.js +32 -0
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +0 -3
- package/dist/collection/components/highlight-box/highlight-box.css +0 -3
- package/dist/collection/components/icon/icon.css +0 -4
- package/dist/collection/components/info/info.css +1 -4
- package/dist/collection/components/info-button/info-button.css +1 -3
- package/dist/collection/components/label/label.css +0 -3
- package/dist/collection/components/label-group/label-group.template.js +7 -0
- package/dist/collection/components/list/list.template.js +37 -0
- package/dist/collection/components/map-base-layers/map-base-layers.css +4 -3
- package/dist/collection/components/map-base-layers/map-base-layers.js +10 -27
- package/dist/collection/components/map-controls/map-controls.css +30 -11
- package/dist/collection/components/map-controls/map-controls.js +10 -11
- package/dist/collection/components/map-controls/map-controls.template.js +12 -20
- package/dist/collection/components/map-overlays/map-overlays.css +4 -3
- package/dist/collection/components/map-overlays/map-overlays.js +13 -35
- package/dist/collection/components/ozon-content/ozon-content.css +0 -3
- package/dist/collection/components/progress-bar/progress-bar.css +0 -3
- package/dist/collection/components/progress-indicator/progress-indicator.css +0 -3
- package/dist/collection/components/selectable/selectable.css +0 -3
- package/dist/collection/components/toggletip/toggletip.css +0 -3
- package/dist/collection/components/tooltip/tooltip.css +34 -15
- package/dist/collection/components/tooltip/tooltip.js +19 -4
- package/dist/collection/components/tooltip/tooltip.template.js +3 -5
- package/dist/collection/components/tree-view/tree-view.css +3 -3
- package/dist/collection/components/viewer-grid/viewer-grid-document-header.template.js +39 -0
- package/dist/collection/components/viewer-grid/viewer-grid-document-list-item.template.js +19 -0
- package/dist/collection/components/viewer-grid/viewer-grid-filterblok.template.js +28 -0
- package/dist/collection/components/viewer-grid/viewer-grid.css +386 -0
- package/dist/collection/components/viewer-grid/viewer-grid.js +128 -0
- package/dist/collection/components/viewer-grid/viewer-grid.template.js +23 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +1162 -132
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-06de0fa1.entry.js +1 -0
- package/dist/dso-toolkit/p-17f073d1.entry.js +1 -0
- package/dist/dso-toolkit/p-1805f5b0.js +1 -0
- package/dist/dso-toolkit/{p-75233655.entry.js → p-1fefbf8c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a52d3623.entry.js → p-20856f91.entry.js} +1 -1
- package/dist/dso-toolkit/{p-262858dd.entry.js → p-2b6a3dfa.entry.js} +1 -1
- package/dist/dso-toolkit/{p-be5682cc.entry.js → p-348414bf.entry.js} +1 -1
- package/dist/dso-toolkit/{p-984551a8.entry.js → p-3b493a2c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-0a08ac9f.entry.js → p-4e573fc5.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c9c1bc8f.entry.js → p-5037944e.entry.js} +1 -1
- package/dist/dso-toolkit/p-7b006b11.entry.js +1 -0
- package/dist/dso-toolkit/p-88bc5873.entry.js +1 -0
- package/dist/dso-toolkit/p-8bf3a60e.js +5 -0
- package/dist/dso-toolkit/p-94b79e43.entry.js +1 -0
- package/dist/dso-toolkit/{p-83f166b3.entry.js → p-94dffa65.entry.js} +1 -1
- package/dist/dso-toolkit/{p-b07991b9.entry.js → p-951f5872.entry.js} +1 -1
- package/dist/dso-toolkit/p-a7306b7b.entry.js +1 -0
- package/dist/dso-toolkit/p-aadc4f8e.entry.js +1 -0
- package/dist/dso-toolkit/p-ad2210ad.entry.js +1 -0
- package/dist/dso-toolkit/p-b69134ed.entry.js +5 -0
- package/dist/dso-toolkit/{p-b5b946de.entry.js → p-bc14cafd.entry.js} +1 -1
- package/dist/dso-toolkit/{p-5665f1ee.entry.js → p-c54ecae1.entry.js} +1 -1
- package/dist/dso-toolkit/p-c95108fe.entry.js +1 -0
- package/dist/dso-toolkit/{p-e814d644.entry.js → p-daa1e29d.entry.js} +1 -1
- package/dist/dso-toolkit/p-dad72605.js +1 -0
- package/dist/dso-toolkit/{p-2e7d535c.entry.js → p-dc86d830.entry.js} +1 -1
- package/dist/dso-toolkit/{p-19de4cc7.entry.js → p-f0b67246.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +2 -2
- package/dist/esm/dso-autosuggest.entry.js +2 -70
- package/dist/esm/dso-badge.entry.js +1 -1
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +49 -28
- package/dist/esm/dso-dropdown-menu.entry.js +17 -230
- package/dist/esm/dso-header.entry.js +97 -0
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-info-button.entry.js +2 -2
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-label.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +7 -6
- package/dist/esm/dso-map-controls.entry.js +3 -3
- package/dist/esm/dso-map-overlays.entry.js +9 -10
- package/dist/esm/dso-ozon-content.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +2 -2
- package/dist/esm/dso-tooltip.entry.js +169 -76
- package/dist/esm/dso-tree-view.entry.js +2 -2
- package/dist/esm/dso-viewer-grid.entry.js +774 -0
- package/dist/esm/{index-61410be2.js → index-d54cae76.js} +26 -2
- package/dist/esm/index-f2bf58ce.js +70 -0
- package/dist/esm/index.esm-a1362957.js +262 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/anchor/anchor.template.d.ts +2 -0
- package/dist/types/components/button/button.template.d.ts +2 -0
- package/dist/types/components/context/context.template.d.ts +3 -0
- package/dist/types/components/date-picker/date-picker.d.ts +3 -1
- package/dist/types/components/date-picker/date-picker.template.d.ts +1 -1
- package/dist/types/components/definition-list/definition-list.template.d.ts +3 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +36 -0
- package/dist/types/components/header/header.template.d.ts +2 -0
- package/dist/types/components/label-group/label-group.template.d.ts +2 -0
- package/dist/types/components/list/list.template.d.ts +3 -0
- package/dist/types/components/map-base-layers/map-base-layers.d.ts +3 -4
- package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +6 -1
- package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
- package/dist/types/components/map-overlays/map-overlays.d.ts +4 -4
- package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +7 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components/viewer-grid/viewer-grid-document-header.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid-document-list-item.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid-filterblok.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -0
- package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +3 -0
- package/dist/types/components.d.ts +50 -8
- package/package.json +4 -2
- package/dist/dso-toolkit/p-08427682.entry.js +0 -1
- package/dist/dso-toolkit/p-731a9631.entry.js +0 -1
- package/dist/dso-toolkit/p-741e96de.entry.js +0 -5
- package/dist/dso-toolkit/p-759920d0.entry.js +0 -1
- package/dist/dso-toolkit/p-a40eeb32.js +0 -1
- package/dist/dso-toolkit/p-affe82e6.entry.js +0 -1
- package/dist/dso-toolkit/p-e4269e02.entry.js +0 -1
- package/dist/dso-toolkit/p-e7700d9e.entry.js +0 -1
- package/dist/dso-toolkit/p-fd5e24c9.entry.js +0 -1
|
@@ -66,7 +66,7 @@ Alert.statusMap = new Map([
|
|
|
66
66
|
['danger', 'Fout']
|
|
67
67
|
]);
|
|
68
68
|
|
|
69
|
-
const attachmentsCounterCss = ":host{display:inline-block;--di-paperclip-grijs:url(\"data:image/svg+xml,%3csvg id='paperclip' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M21.88%2c8.94%2c10%2c20.6A4.63%2c4.63%2c0%2c0%2c1%2c6.62%2c22h0a5.78%2c5.78%2c0%2c0%2c1-4.05-1.81%2c5.34%2c5.34%2c0%2c0%2c1%2c0-7.56l9.3-9.26a1%2c1%2c0%2c1%2c1%2c1.48%2c1.48l-9.3%2c9.26h0a3.26%2c3.26%2c0%2c0%2c0%2c0%2c4.6%2c3.79%2c3.79%2c0%2c0%2c0%2c2.58%2c1.21%2c2.55%2c2.55%2c0%2c0%2c0%2c1.85-.81h0L20.4%2c7.46a1.83%2c1.83%2c0%2c0%2c0%2c.5-1.39%2c2.24%2c2.24%2c0%2c0%2c0-.63-1.44%2c1.85%2c1.85%2c0%2c0%2c0-2.61%2c0h0L7.43%2c14.73a.48.48%2c0%2c0%2c0%2c0%2c.67.48.48%2c0%2c0%2c0%2c.34.14.46.46%2c0%2c0%2c0%2c.34-.14l7.36-7.28a1%2c1%2c0%2c0%2c1%2c1.48%2c0A1%2c1%2c0%2c0%2c1%2c17%2c9.6h0L9.6%2c16.88h0a2.66%2c2.66%2c0%2c0%2c1-3.65%2c0%2c2.55%2c2.55%2c0%2c0%2c1%2c0-3.63L16.17%2c3.15a4%2c4%2c0%2c0%2c1%2c5.59%2c0A4.31%2c4.31%2c0%2c0%2c1%2c23%2c6%2c3.89%2c3.89%2c0%2c0%2c1%2c21.88%2c8.94Z'/%3e %3c/svg%3e\");--di-paperclip-wit:url(\"data:image/svg+xml,%3csvg id='paperclip' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M21.88%2c8.94%2c10%2c20.6A4.63%2c4.63%2c0%2c0%2c1%2c6.62%2c22h0a5.78%2c5.78%2c0%2c0%2c1-4.05-1.81%2c5.34%2c5.34%2c0%2c0%2c1%2c0-7.56l9.3-9.26a1%2c1%2c0%2c1%2c1%2c1.48%2c1.48l-9.3%2c9.26h0a3.26%2c3.26%2c0%2c0%2c0%2c0%2c4.6%2c3.79%2c3.79%2c0%2c0%2c0%2c2.58%2c1.21%2c2.55%2c2.55%2c0%2c0%2c0%2c1.85-.81h0L20.4%2c7.46a1.83%2c1.83%2c0%2c0%2c0%2c.5-1.39%2c2.24%2c2.24%2c0%2c0%2c0-.63-1.44%2c1.85%2c1.85%2c0%2c0%2c0-2.61%2c0h0L7.43%2c14.73a.48.48%2c0%2c0%2c0%2c0%2c.67.48.48%2c0%2c0%2c0%2c.34.14.46.46%2c0%2c0%2c0%2c.34-.14l7.36-7.28a1%2c1%2c0%2c0%2c1%2c1.48%2c0A1%2c1%2c0%2c0%2c1%2c17%2c9.6h0L9.6%2c16.88h0a2.66%2c2.66%2c0%2c0%2c1-3.65%2c0%2c2.55%2c2.55%2c0%2c0%2c1%2c0-3.63L16.17%2c3.15a4%2c4%2c0%2c0%2c1%2c5.59%2c0A4.31%2c4.31%2c0%2c0%2c1%2c23%2c6%2c3.89%2c3.89%2c0%2c0%2c1%2c21.88%2c8.94Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-attachments{color:var(--dso-attachments-counter-color, #666);display:inline-block;font-weight:400;text-decoration:none;white-space:nowrap
|
|
69
|
+
const attachmentsCounterCss = ":host{display:inline-block;--di-paperclip-grijs:url(\"data:image/svg+xml,%3csvg id='paperclip' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M21.88%2c8.94%2c10%2c20.6A4.63%2c4.63%2c0%2c0%2c1%2c6.62%2c22h0a5.78%2c5.78%2c0%2c0%2c1-4.05-1.81%2c5.34%2c5.34%2c0%2c0%2c1%2c0-7.56l9.3-9.26a1%2c1%2c0%2c1%2c1%2c1.48%2c1.48l-9.3%2c9.26h0a3.26%2c3.26%2c0%2c0%2c0%2c0%2c4.6%2c3.79%2c3.79%2c0%2c0%2c0%2c2.58%2c1.21%2c2.55%2c2.55%2c0%2c0%2c0%2c1.85-.81h0L20.4%2c7.46a1.83%2c1.83%2c0%2c0%2c0%2c.5-1.39%2c2.24%2c2.24%2c0%2c0%2c0-.63-1.44%2c1.85%2c1.85%2c0%2c0%2c0-2.61%2c0h0L7.43%2c14.73a.48.48%2c0%2c0%2c0%2c0%2c.67.48.48%2c0%2c0%2c0%2c.34.14.46.46%2c0%2c0%2c0%2c.34-.14l7.36-7.28a1%2c1%2c0%2c0%2c1%2c1.48%2c0A1%2c1%2c0%2c0%2c1%2c17%2c9.6h0L9.6%2c16.88h0a2.66%2c2.66%2c0%2c0%2c1-3.65%2c0%2c2.55%2c2.55%2c0%2c0%2c1%2c0-3.63L16.17%2c3.15a4%2c4%2c0%2c0%2c1%2c5.59%2c0A4.31%2c4.31%2c0%2c0%2c1%2c23%2c6%2c3.89%2c3.89%2c0%2c0%2c1%2c21.88%2c8.94Z'/%3e %3c/svg%3e\");--di-paperclip-wit:url(\"data:image/svg+xml,%3csvg id='paperclip' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M21.88%2c8.94%2c10%2c20.6A4.63%2c4.63%2c0%2c0%2c1%2c6.62%2c22h0a5.78%2c5.78%2c0%2c0%2c1-4.05-1.81%2c5.34%2c5.34%2c0%2c0%2c1%2c0-7.56l9.3-9.26a1%2c1%2c0%2c1%2c1%2c1.48%2c1.48l-9.3%2c9.26h0a3.26%2c3.26%2c0%2c0%2c0%2c0%2c4.6%2c3.79%2c3.79%2c0%2c0%2c0%2c2.58%2c1.21%2c2.55%2c2.55%2c0%2c0%2c0%2c1.85-.81h0L20.4%2c7.46a1.83%2c1.83%2c0%2c0%2c0%2c.5-1.39%2c2.24%2c2.24%2c0%2c0%2c0-.63-1.44%2c1.85%2c1.85%2c0%2c0%2c0-2.61%2c0h0L7.43%2c14.73a.48.48%2c0%2c0%2c0%2c0%2c.67.48.48%2c0%2c0%2c0%2c.34.14.46.46%2c0%2c0%2c0%2c.34-.14l7.36-7.28a1%2c1%2c0%2c0%2c1%2c1.48%2c0A1%2c1%2c0%2c0%2c1%2c17%2c9.6h0L9.6%2c16.88h0a2.66%2c2.66%2c0%2c0%2c1-3.65%2c0%2c2.55%2c2.55%2c0%2c0%2c1%2c0-3.63L16.17%2c3.15a4%2c4%2c0%2c0%2c1%2c5.59%2c0A4.31%2c4.31%2c0%2c0%2c1%2c23%2c6%2c3.89%2c3.89%2c0%2c0%2c1%2c21.88%2c8.94Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-attachments{color:var(--dso-attachments-counter-color, #666);display:inline-block;font-weight:400;text-decoration:none;white-space:nowrap}.dso-attachments::after{background:var(--dso-icon, var(--di-paperclip-grijs)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block}";
|
|
70
70
|
|
|
71
71
|
let AttachmentsCounter = class extends HTMLElement {
|
|
72
72
|
constructor() {
|
|
@@ -745,7 +745,7 @@ const localization = {
|
|
|
745
745
|
]
|
|
746
746
|
};
|
|
747
747
|
|
|
748
|
-
const datePickerCss = "
|
|
748
|
+
const datePickerCss = ".sc-dso-date-picker-h{display:block}.dso-date.sc-dso-date-picker *.sc-dso-date-picker,.dso-date.sc-dso-date-picker *.sc-dso-date-picker::before,.dso-date.sc-dso-date-picker *.sc-dso-date-picker::after{box-sizing:border-box}.dso-date.sc-dso-date-picker{box-sizing:border-box;color:#191919;display:block;font-family:\"Asap\", sans-serif;margin:0;position:relative;text-align:left;width:100%}.dso-date__input.sc-dso-date-picker{display:block;width:100%;height:40px;padding:6px 14px;font-size:16px;line-height:1.5;color:#191919;background-color:#fff;background-image:none;border:1px solid #275937;border-radius:4px;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s}.dso-date__input.sc-dso-date-picker::-moz-placeholder{color:#666;opacity:1}.dso-date__input.sc-dso-date-picker:-ms-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-webkit-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-ms-expand{background-color:transparent;border:0}.dso-date__input.sc-dso-date-picker:focus{border-color:#275937;outline:0;box-shadow:inset 0 0 0 1px #275937}.dso-date__input[disabled].sc-dso-date-picker,.dso-date__input[readonly].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{background-color:#fff;opacity:1}.dso-date__input[disabled].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{cursor:default}.dso-date__input[disabled].sc-dso-date-picker{border-color:#e5e5e5;color:#999}.dso-date__input[readonly].sc-dso-date-picker{border-width:1px}.dso-date__input[type=text].sc-dso-date-picker{line-height:40px}.dso-date__input[size].sc-dso-date-picker{width:auto}.dso-date__toggle.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;-webkit-user-select:none;align-items:center;appearance:none;background:transparent;border:0;border-radius:0;border-bottom-right-radius:4px;border-top-right-radius:4px;color:#39870c;cursor:pointer;display:flex;height:38px;justify-content:center;padding:0;position:absolute;right:0;transform:translateY(-50%);top:50%;user-select:none;width:38px;z-index:2}.dso-date__toggle.sc-dso-date-picker:disabled{color:#afcf9d;cursor:pointer}.dso-date__dialog.sc-dso-date-picker{border-width:1px;display:flex;right:0;min-width:320px;opacity:0;position:absolute;top:100%;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;visibility:hidden;will-change:transform, opacity, visibility;z-index:600}@media (max-width: 35.9375em){.dso-date__dialog.sc-dso-date-picker{background:rgba(25, 25, 25, 0.5);bottom:0;position:fixed;left:0;right:0;top:0;transform:translateZ(0);transform-origin:bottom center}}.dso-date__dialog.is-left.sc-dso-date-picker{left:-11px;right:auto;width:auto}.dso-date__dialog.is-active.sc-dso-date-picker{opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.dso-date__dialog-content.sc-dso-date-picker{background:#fff;border:1px solid rgba(0, 0, 0, 0.1);border-radius:4px;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);margin-left:auto;margin-right:-1px;margin-top:8px;max-width:310px;min-width:290px;padding:16px;position:relative;transform:none;width:100%;z-index:600}@media (max-width: 35.9375em){.dso-date__dialog-content.sc-dso-date-picker{border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;bottom:0;left:0;margin:0;max-width:none;min-height:26em;opacity:0;padding:0 8% 20px;position:absolute;transform:translateZ(0) translateY(100%);transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;visibility:hidden;will-change:transform, opacity, visibility}.is-active.sc-dso-date-picker .dso-date__dialog-content.sc-dso-date-picker{opacity:1;transform:translateZ(0) translateY(0);visibility:visible}}.dso-date__table.sc-dso-date-picker{border-collapse:collapse;border-spacing:0;color:#191919;font-size:1rem;font-weight:400;line-height:1.25;min-width:280px;table-layout:fixed;text-align:center;width:100%}.dso-date__table-header.sc-dso-date-picker{font-size:0.875em;font-weight:600;height:36px;line-height:36px;text-decoration:none;text-transform:uppercase}.dso-date__cell.sc-dso-date-picker{height:40px;padding:1px;text-align:center;width:40px}.dso-date__day.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;box-shadow:0 0 0 1px transparent;color:#191919;cursor:pointer;display:inline-block;font-family:\"Asap\", sans-serif;font-variant-numeric:tabular-nums;font-weight:400;height:38px;line-height:0;padding:0;position:relative;text-align:center;vertical-align:middle;width:38px;z-index:1}.dso-date__day.is-today.sc-dso-date-picker{background:transparent;height:36px;box-shadow:0 0 0 1px #39870c;width:36px}.dso-date__day.sc-dso-date-picker:hover,.dso-date__day.sc-dso-date-picker:active{background:#39870c;color:#fff}.dso-date__day.sc-dso-date-picker:focus{background:transparent;box-shadow:0 0 0 2px #275937;color:#191919;height:34px;outline:0;width:34px}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker{background:#39870c;color:#fff}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker:focus{background:transparent}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker:focus span[aria-hidden=true].sc-dso-date-picker{background:#39870c;border:1px solid #fff;line-height:32px}.dso-date__day.is-outside.sc-dso-date-picker{background:#f2f2f2;box-shadow:none;color:#666;cursor:default;pointer-events:none}.dso-date__day.is-disabled.sc-dso-date-picker{background:#fff;cursor:default}.dso-date__day.is-disabled.sc-dso-date-picker:hover{color:#666}.dso-date__day.sc-dso-date-picker span[aria-hidden=true].sc-dso-date-picker{border-radius:50%;display:inline-block;height:34px;line-height:34px;width:34px}.dso-date__header.sc-dso-date-picker{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px;width:100%}.dso-date__header.sc-dso-date-picker span.sc-dso-date-picker{font-size:0.875rem}.dso-date__nav.sc-dso-date-picker{white-space:nowrap}.dso-date__prev.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;align-items:center;appearance:none;background:transparent;border:1px solid #39870c;border-radius:4px;box-sizing:border-box;color:#39870c;cursor:pointer;display:inline-flex;font-size:1em;height:32px;justify-content:center;margin-left:8px;padding:0;width:32px}@media (max-width: 35.9375em){.dso-date__prev.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker{height:40px;width:40px}}.dso-date__prev.sc-dso-date-picker:hover,.dso-date__prev.sc-dso-date-picker:active,.dso-date__next.sc-dso-date-picker:hover,.dso-date__next.sc-dso-date-picker:active{background-color:#39870c;color:#fff}.dso-date__prev.sc-dso-date-picker:focus,.dso-date__next.sc-dso-date-picker:focus{background:transparent;color:#39870c}.dso-date__prev.sc-dso-date-picker:disabled,.dso-date__prev.sc-dso-date-picker:disabled:hover,.dso-date__next.sc-dso-date-picker:disabled,.dso-date__next.sc-dso-date-picker:disabled:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d;opacity:1}.dso-date__prev.sc-dso-date-picker svg.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker svg.sc-dso-date-picker{margin:0 auto}.dso-date__select.sc-dso-date-picker{display:inline-flex;height:28px;line-height:28px;position:relative}.dso-date__select.sc-dso-date-picker span.sc-dso-date-picker{margin-right:4px}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker{color:#275937;cursor:pointer;font-size:1rem;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:2}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker:focus+.dso-date__select-label.sc-dso-date-picker{box-shadow:0 0 0 2px #275937}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker:disabled{color:#afcf9d}.dso-date__select-label.sc-dso-date-picker{align-items:center;border-radius:4px;color:#39870c;display:flex;padding:0 4px 0 8px;pointer-events:none;position:relative;width:100%;z-index:1}.dso-date__select-label.sc-dso-date-picker span.sc-dso-date-picker{font-size:1.25rem;font-weight:600;line-height:1.25}.dso-date__select-label.sc-dso-date-picker svg.sc-dso-date-picker{width:16px;height:16px}.dso-date__mobile.sc-dso-date-picker{align-items:center;border-bottom:1px solid rgba(0, 0, 0, 0.12);display:flex;font-size:1em;justify-content:space-between;margin-bottom:20px;margin-left:-10%;overflow:hidden;padding:12px 20px;position:relative;text-overflow:ellipsis;white-space:nowrap;width:120%}@media (min-width: 36em){.dso-date__mobile.sc-dso-date-picker{border:0;margin:0;overflow:visible;padding:0;position:absolute;right:-16px;top:-16px;width:auto}}.dso-date__mobile-heading.sc-dso-date-picker{display:inline-block;font-weight:600;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.dso-date__mobile-heading.sc-dso-date-picker{display:none}}.dso-date__close.sc-dso-date-picker{-webkit-appearance:none;align-items:center;appearance:none;background-color:#fff;border:0;border-radius:50%;color:#39870c;cursor:pointer;display:flex;font-size:1em;height:32px;justify-content:center;margin-right:-4px;padding:0;width:32px}@media (min-width: 36em){.dso-date__close.sc-dso-date-picker{margin-right:0;opacity:0}}.dso-date__close.sc-dso-date-picker:focus{box-shadow:0 0 0 2px #275937;outline:none}@media (min-width: 36em){.dso-date__close.sc-dso-date-picker:focus{opacity:1}}.dso-date__vhidden.sc-dso-date-picker{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;top:0;width:1px}";
|
|
749
749
|
|
|
750
750
|
function range(from, to) {
|
|
751
751
|
var result = [];
|
|
@@ -767,13 +767,12 @@ const keyCode = {
|
|
|
767
767
|
RIGHT: 39,
|
|
768
768
|
DOWN: 40,
|
|
769
769
|
};
|
|
770
|
-
const DISALLOWED_CHARACTERS = /[^0-9
|
|
770
|
+
const DISALLOWED_CHARACTERS = /[^0-9\-]+/g;
|
|
771
771
|
const TRANSITION_MS = 300;
|
|
772
772
|
let DsoDatePicker$1 = class extends HTMLElement {
|
|
773
773
|
constructor() {
|
|
774
774
|
super();
|
|
775
775
|
this.__registerHost();
|
|
776
|
-
attachShadow(this);
|
|
777
776
|
this.dateChange = createEvent(this, "dateChange", 7);
|
|
778
777
|
this.dsoBlur = createEvent(this, "dsoBlur", 7);
|
|
779
778
|
this.dsoKeyUp = createEvent(this, "dsoKeyUp", 7);
|
|
@@ -981,7 +980,49 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
981
980
|
};
|
|
982
981
|
this.handleInputChange = (e) => {
|
|
983
982
|
const target = e.target;
|
|
984
|
-
this.setValue(target.value
|
|
983
|
+
this.setValue(target.value);
|
|
984
|
+
};
|
|
985
|
+
this.handleKeyPress = (e) => {
|
|
986
|
+
if (e.key.search(DISALLOWED_CHARACTERS) > -1) {
|
|
987
|
+
e.preventDefault();
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
this.prepareEvent = (value) => {
|
|
991
|
+
var event = {
|
|
992
|
+
component: "dso-date-picker",
|
|
993
|
+
value: "",
|
|
994
|
+
valueAsDate: undefined
|
|
995
|
+
};
|
|
996
|
+
if (value instanceof Date) {
|
|
997
|
+
event.valueAsDate = value;
|
|
998
|
+
}
|
|
999
|
+
else {
|
|
1000
|
+
event.value = value;
|
|
1001
|
+
event.valueAsDate = parseDutchDate(value);
|
|
1002
|
+
}
|
|
1003
|
+
if (event.valueAsDate) {
|
|
1004
|
+
event.value = printDutchDate(event.valueAsDate);
|
|
1005
|
+
}
|
|
1006
|
+
if (!event.valueAsDate && this.required) {
|
|
1007
|
+
event.error = "required";
|
|
1008
|
+
}
|
|
1009
|
+
if (event.value && !event.valueAsDate) {
|
|
1010
|
+
event.error = "invalid";
|
|
1011
|
+
}
|
|
1012
|
+
if (event.valueAsDate && (this.min || this.max)) {
|
|
1013
|
+
const min = parseDutchDate(this.min);
|
|
1014
|
+
const max = parseDutchDate(this.max);
|
|
1015
|
+
const clampValue = clamp(event.valueAsDate, min, max);
|
|
1016
|
+
if (clampValue !== event.valueAsDate && clampValue === min) {
|
|
1017
|
+
event.valueAsDate = undefined;
|
|
1018
|
+
event.error = "min-range";
|
|
1019
|
+
}
|
|
1020
|
+
else if (clampValue !== event.valueAsDate && clampValue === max) {
|
|
1021
|
+
event.valueAsDate = undefined;
|
|
1022
|
+
event.error = "max-range";
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
return event;
|
|
985
1026
|
};
|
|
986
1027
|
this.processFocusedDayNode = (element) => {
|
|
987
1028
|
this.focusedDayNode = element;
|
|
@@ -994,13 +1035,12 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
994
1035
|
* Component event handling.
|
|
995
1036
|
*/
|
|
996
1037
|
handleDocumentClick(e) {
|
|
997
|
-
var _a;
|
|
998
1038
|
if (!this.open) {
|
|
999
1039
|
return;
|
|
1000
1040
|
}
|
|
1001
1041
|
const path = e.composedPath();
|
|
1002
1042
|
for (const target of path) {
|
|
1003
|
-
if (target instanceof Node &&
|
|
1043
|
+
if (target instanceof Node && this.element.contains(target)) {
|
|
1004
1044
|
return;
|
|
1005
1045
|
}
|
|
1006
1046
|
}
|
|
@@ -1074,27 +1114,7 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
1074
1114
|
this.focusedDay = clamp(day, parseDutchDate(this.min), parseDutchDate(this.max));
|
|
1075
1115
|
}
|
|
1076
1116
|
setValue(value) {
|
|
1077
|
-
|
|
1078
|
-
component: "dso-date-picker",
|
|
1079
|
-
value: "",
|
|
1080
|
-
valueAsDate: undefined
|
|
1081
|
-
};
|
|
1082
|
-
if (value instanceof Date) {
|
|
1083
|
-
event.valueAsDate = value;
|
|
1084
|
-
}
|
|
1085
|
-
else {
|
|
1086
|
-
event.value = value;
|
|
1087
|
-
event.valueAsDate = parseDutchDate(value);
|
|
1088
|
-
}
|
|
1089
|
-
if (event.valueAsDate) {
|
|
1090
|
-
event.value = printDutchDate(event.valueAsDate);
|
|
1091
|
-
}
|
|
1092
|
-
if (!event.valueAsDate && this.required) {
|
|
1093
|
-
event.error = "required";
|
|
1094
|
-
}
|
|
1095
|
-
if (event.value && !event.valueAsDate) {
|
|
1096
|
-
event.error = "invalid";
|
|
1097
|
-
}
|
|
1117
|
+
const event = this.prepareEvent(value);
|
|
1098
1118
|
this.value = event.value;
|
|
1099
1119
|
this.dateChange.emit(event);
|
|
1100
1120
|
}
|
|
@@ -1129,7 +1149,7 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
1129
1149
|
if (maxDate) {
|
|
1130
1150
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
1131
1151
|
}
|
|
1132
|
-
return (h(Host, null, h("div", { class: "dso-date" }, h("div", { class: "dso-date__input-wrapper" }, h("input", { class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }), h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, h("span", { class: "dso-date__toggle-icon" }, h("dso-icon", { icon: "calendar" })), h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), h("div", { class: {
|
|
1152
|
+
return (h(Host, null, h("div", { class: "dso-date" }, h("div", { class: "dso-date__input-wrapper" }, h("input", { class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onKeyPress: this.handleKeyPress, onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }), h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, h("span", { class: "dso-date__toggle-icon" }, h("dso-icon", { icon: "calendar" })), h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), h("div", { class: {
|
|
1133
1153
|
"dso-date__dialog": true,
|
|
1134
1154
|
"is-left": this.direction === "left",
|
|
1135
1155
|
"is-active": this.open,
|
|
@@ -1364,6 +1384,42 @@ var tabbable = function tabbable(el, options) {
|
|
|
1364
1384
|
return tabbableNodes;
|
|
1365
1385
|
};
|
|
1366
1386
|
|
|
1387
|
+
var focusable = function focusable(el, options) {
|
|
1388
|
+
options = options || {};
|
|
1389
|
+
var candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
1390
|
+
return candidates;
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
var isTabbable = function isTabbable(node, options) {
|
|
1394
|
+
options = options || {};
|
|
1395
|
+
|
|
1396
|
+
if (!node) {
|
|
1397
|
+
throw new Error('No node provided');
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
1401
|
+
return false;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
1408
|
+
|
|
1409
|
+
var isFocusable = function isFocusable(node, options) {
|
|
1410
|
+
options = options || {};
|
|
1411
|
+
|
|
1412
|
+
if (!node) {
|
|
1413
|
+
throw new Error('No node provided');
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
1417
|
+
return false;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
return isNodeMatchingSelectorFocusable(options, node);
|
|
1421
|
+
};
|
|
1422
|
+
|
|
1367
1423
|
const dropdownMenuCss = ":host(:focus){outline:none}:host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
|
|
1368
1424
|
|
|
1369
1425
|
let DropdownMenu = class extends HTMLElement {
|
|
@@ -1461,9 +1517,6 @@ let DropdownMenu = class extends HTMLElement {
|
|
|
1461
1517
|
this.openPopup();
|
|
1462
1518
|
}
|
|
1463
1519
|
}
|
|
1464
|
-
componentDidRender() {
|
|
1465
|
-
this.host.setAttribute("tabindex", "-1");
|
|
1466
|
-
}
|
|
1467
1520
|
componentWillRender() {
|
|
1468
1521
|
for (const li of Array.from(this.host.getElementsByTagName("li"))) {
|
|
1469
1522
|
for (const tab of tabbable(li)) {
|
|
@@ -1478,6 +1531,7 @@ let DropdownMenu = class extends HTMLElement {
|
|
|
1478
1531
|
}
|
|
1479
1532
|
}
|
|
1480
1533
|
openPopup() {
|
|
1534
|
+
this.host.setAttribute("tabindex", "-1");
|
|
1481
1535
|
this.host.addEventListener("keydown", this.keyDownListener);
|
|
1482
1536
|
this.host.addEventListener("focusout", this.focusOutListener);
|
|
1483
1537
|
this.button.setAttribute("aria-expanded", "true");
|
|
@@ -1487,11 +1541,24 @@ let DropdownMenu = class extends HTMLElement {
|
|
|
1487
1541
|
this.host.removeEventListener("keydown", this.keyDownListener);
|
|
1488
1542
|
this.host.removeEventListener("focusout", this.focusOutListener);
|
|
1489
1543
|
this.button.setAttribute("aria-expanded", "false");
|
|
1544
|
+
this.host.removeAttribute("tabindex");
|
|
1490
1545
|
this.tabbables.forEach((tabbable) => tabbable.removeEventListener("click", this.escape));
|
|
1491
1546
|
}
|
|
1547
|
+
getActiveElement(root = document) {
|
|
1548
|
+
const activeEl = root.activeElement;
|
|
1549
|
+
if (!activeEl) {
|
|
1550
|
+
return null;
|
|
1551
|
+
}
|
|
1552
|
+
if (activeEl.shadowRoot) {
|
|
1553
|
+
return this.getActiveElement(activeEl.shadowRoot);
|
|
1554
|
+
}
|
|
1555
|
+
else {
|
|
1556
|
+
return activeEl;
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1492
1559
|
tabInPopup(direction) {
|
|
1493
1560
|
const tabs = this.tabbables;
|
|
1494
|
-
const currentIndex = tabs.findIndex((e) => e ===
|
|
1561
|
+
const currentIndex = tabs.findIndex((e) => e === this.getActiveElement());
|
|
1495
1562
|
let nextIndex = currentIndex + direction;
|
|
1496
1563
|
if (nextIndex >= tabs.length) {
|
|
1497
1564
|
nextIndex = 0;
|
|
@@ -1511,6 +1578,100 @@ let DropdownMenu = class extends HTMLElement {
|
|
|
1511
1578
|
static get style() { return dropdownMenuCss; }
|
|
1512
1579
|
};
|
|
1513
1580
|
|
|
1581
|
+
const headerCss = ":host{--di-chevron-down-bosgroen:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up-bosgroen:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:block}.dso-header{border-bottom:1px solid #ccc;display:flex;flex-wrap:wrap}@media screen and (min-width: 768px){.dso-header{align-items:center}}@media screen and (max-width: 991px){.dso-header.use-drop-down{flex-wrap:nowrap}}.logo-container{display:flex;flex-wrap:wrap;padding-bottom:16px;padding-top:16px}@media screen and (min-width: 768px){.sub-logo{margin-left:24px}}@media screen and (max-width: 767px){.sub-logo{flex-basis:100%}}.login,.logout{margin-right:16px}.profile a,.logout a,.login a{text-decoration:none;color:#39870c;font-weight:600}.profile a:hover,.profile a:focus,.logout a:hover,.logout a:focus,.login a:hover,.login a:focus{text-decoration:none}.profile a:active,.logout a:active,.login a:active{text-decoration:underline}.dso-header-session{display:flex;margin-left:auto}.dso-header-session .profile a{margin-left:8px}.dso-header-session .profile+.logout{border-left:3px solid #ccc;margin-left:16px;padding-left:16px}.dso-navbar{flex-basis:100%}dso-dropdown-menu>.dso-primary::after,dso-dropdown-menu>.dso-secondary::after,dso-dropdown-menu>.dso-tertiary::after,dso-dropdown-menu>.btn::after{content:\"\";display:inline-block;margin-left:8px}dso-dropdown-menu>.dso-primary::after,dso-dropdown-menu>.btn-primary::after{background:var(--dso-icon, var(--di-chevron-down-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}dso-dropdown-menu>.dso-secondary::after,dso-dropdown-menu>.btn-default::after{background:var(--dso-icon, var(--di-chevron-down)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}dso-dropdown-menu>.dso-secondary:hover::after,dso-dropdown-menu>.btn-default:hover::after{--dso-icon:var(--di-chevron-down-wit)}dso-dropdown-menu>.dso-tertiary::after,dso-dropdown-menu>.btn-link::after{background:var(--dso-icon, var(--di-chevron-down)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;position:relative;top:-2px}dso-dropdown-menu>.dso-tertiary:hover::after,dso-dropdown-menu>.btn-link:hover::after{--dso-icon:var(--di-chevron-down-scampi)}dso-dropdown-menu .dso-group-label{color:#999;font-size:0.875em;font-weight:400;margin:0;padding:4px 20px 2px;text-transform:uppercase}dso-dropdown-menu ul{margin:0;padding:0}dso-dropdown-menu ul:not(:last-child){border-bottom:1px solid #e5e5e5;margin-bottom:11px;padding-bottom:11px}dso-dropdown-menu .dso-dropdown-options{background-clip:padding-box;background-color:#fff;border-radius:4px;border:1px solid rgba(0, 0, 0, 0.15);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);font-size:16px;margin:2px 0 0;min-width:160px;padding:5px 0;position:absolute;text-align:left;top:100%;z-index:1000}dso-dropdown-menu .dso-dropdown-options li{list-style:none}dso-dropdown-menu .dso-dropdown-options li a:visited{color:#191919}dso-dropdown-menu .dso-dropdown-options li a,dso-dropdown-menu .dso-dropdown-options li button{text-decoration:none;clear:both;color:#191919;display:block;font-weight:400;line-height:1.5;padding:3px 20px;text-decoration:none;white-space:nowrap}dso-dropdown-menu .dso-dropdown-options li a:hover,dso-dropdown-menu .dso-dropdown-options li a:focus,dso-dropdown-menu .dso-dropdown-options li a:active,dso-dropdown-menu .dso-dropdown-options li button:hover,dso-dropdown-menu .dso-dropdown-options li button:focus,dso-dropdown-menu .dso-dropdown-options li button:active{text-decoration:underline}dso-dropdown-menu .dso-dropdown-options li a:hover,dso-dropdown-menu .dso-dropdown-options li a:focus,dso-dropdown-menu .dso-dropdown-options li button:hover,dso-dropdown-menu .dso-dropdown-options li button:focus{background-color:#39870c;border-color:#39870c;color:#fff;text-decoration:none}dso-dropdown-menu .dso-dropdown-options li button{background-color:transparent;border:0;border-radius:0;text-align:inherit;width:100%}dso-dropdown-menu[dropdown-align=right] .dso-dropdown-options{right:0}dso-dropdown-menu[open]>.dso-primary::after,dso-dropdown-menu[open]>.btn-primary::after{--dso-icon:var(--di-chevron-up-wit)}dso-dropdown-menu[open]>.dso-secondary::after,dso-dropdown-menu[open]>.btn-default::after{--dso-icon:var(--di-chevron-up)}dso-dropdown-menu[open]>.dso-secondary:hover::after,dso-dropdown-menu[open]>.btn-default:hover::after{--dso-icon:var(--di-chevron-up-wit)}dso-dropdown-menu[open]>.dso-tertiary::after,dso-dropdown-menu[open]>.btn-link::after{--dso-icon:var(--di-chevron-up)}dso-dropdown-menu[open]>.dso-tertiary:hover::after,dso-dropdown-menu[open]>.btn-link:hover::after{--dso-icon:var(--di-chevron-up-scampi)}dso-dropdown-menu[open] button::after{background:var(--dso-icon, var(--di-chevron-up-bosgroen)) no-repeat;background-position:center;background-size:cover;height:1.2em;vertical-align:top;width:1.2em}dso-dropdown-menu[checkable] .dso-group-label{padding-left:40px}dso-dropdown-menu[checkable] li a,dso-dropdown-menu[checkable] li button{padding-left:40px}dso-dropdown-menu[checkable] li.dso-checked a:not(:focus),dso-dropdown-menu[checkable] li.dso-checked button:not(:focus){background-color:#39870c;border-color:#39870c;color:#fff}dso-dropdown-menu[checkable] li.dso-checked a::before,dso-dropdown-menu[checkable] li.dso-checked button::before{background:var(--dso-icon, var(--di-check-wit)) no-repeat;background-position:center;background-size:cover;height:24px;vertical-align:top;width:24px;content:\"\";display:block;float:left;margin-left:-32px;margin-right:8px}dso-dropdown-menu button{align-items:flex-end;background-color:transparent;border:0;display:flex;font-family:Asap, sans-serif;padding-right:32px}dso-dropdown-menu button::after{background:var(--dso-icon, var(--di-chevron-down-bosgroen)) no-repeat;background-position:center;background-size:cover;height:1.2em;vertical-align:top;width:1.2em;content:\"\";display:inline-block;margin-left:8px;position:absolute;right:0;top:50%;transform:translateY(-50%)}@media screen and (max-width: 991px){dso-dropdown-menu[dropdown-align=right] .dso-dropdown-options{right:-16px}}@media screen and (max-width: 767px){dso-dropdown-menu{top:12px}}dso-dropdown-menu .dso-dropdown-options{border:0;border-radius:0}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options ul{width:320px}@media screen and (max-width: 991px){dso-dropdown-menu .dso-dropdown-options dso-dropdown-options ul{width:100vw}}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li a{color:#275937;font-size:1.25rem;padding:16px}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li.dso-active a{font-weight:600}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li+li{border-top:1px solid #ccc}.dropdown{margin-left:auto}@media screen and (max-width: 767px){.dropdown dso-dropdown-menu{top:28px}}.dropdown dso-dropdown-menu .dso-dropdown-options{top:calc(100% + 29px)}@media screen and (max-width: 767px){.dropdown dso-dropdown-menu .dso-dropdown-options{top:72px}}.dropdown dso-dropdown-menu[open] button::after{background:var(--dso-icon, var(--di-chevron-up)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.dropdown dso-dropdown-menu button{color:#39870c;font-size:16px;font-weight:600}.dropdown dso-dropdown-menu button:hover,.dropdown dso-dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dropdown dso-dropdown-menu button::after{background:var(--dso-icon, var(--di-chevron-down)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.dso-nav{align-items:end;column-gap:32px;display:flex;list-style:none;margin-bottom:0;margin-top:0;padding-left:0}.dso-nav>li{margin-bottom:4px}.dso-nav>li>a{display:block}.dso-nav>li>a,.dso-nav>li>a:hover,.dso-nav>li>a:focus,.dso-nav>li>a:visited{color:#275937}.dso-nav>li.dso-active,.dso-nav>li.is-active{margin-bottom:0}.dso-nav>li.dso-active>a,.dso-nav>li.is-active>a{border-bottom:4px solid #8b4a6a;font-weight:bold}.dso-nav.dso-nav-main>li>a{text-decoration:none;font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;white-space:nowrap}.dso-nav.dso-nav-main>li>a:hover,.dso-nav.dso-nav-main>li>a:focus,.dso-nav.dso-nav-main>li>a:active{text-decoration:underline}.dso-nav.dso-nav-main dso-dropdown-menu .dso-dropdown-options{top:calc(100% + 3px)}.dso-nav.dso-nav-main dso-dropdown-menu button{font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;align-items:center;color:#275937;padding-right:32px}.dso-nav.dso-nav-main dso-dropdown-menu button:hover,.dso-nav.dso-nav-main dso-dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dso-nav.dso-nav-main dso-dropdown-menu button::after{top:auto;transform:none}.dso-nav.dso-nav-sub>li{display:inline-block}.dso-nav.dso-nav-sub>li>a{text-decoration:none;font-size:16px;margin-top:4px;padding:4px 8px 3px}.dso-nav.dso-nav-sub>li>a:hover,.dso-nav.dso-nav-sub>li>a:focus,.dso-nav.dso-nav-sub>li>a:active{text-decoration:underline}.dso-nav .menu-user-home{margin-left:auto}.dso-nav .menu-user-home dso-icon{height:1em;margin-right:8px;position:relative;top:-2px;width:1.2em}";
|
|
1582
|
+
|
|
1583
|
+
const minDesktopViewportWidth = 992;
|
|
1584
|
+
let Header = class extends HTMLElement {
|
|
1585
|
+
constructor() {
|
|
1586
|
+
super();
|
|
1587
|
+
this.__registerHost();
|
|
1588
|
+
attachShadow(this);
|
|
1589
|
+
this.useDropDownMenu = "auto";
|
|
1590
|
+
this.showDropDown = false;
|
|
1591
|
+
this.isLoggedIn = false;
|
|
1592
|
+
this.hasSubLogo = false;
|
|
1593
|
+
this.overflowMenuItems = 0;
|
|
1594
|
+
this.onWindowResize = debounce_1(() => {
|
|
1595
|
+
this.setDropDownMenu();
|
|
1596
|
+
this.setOverflowMenu();
|
|
1597
|
+
}, 100);
|
|
1598
|
+
}
|
|
1599
|
+
watchUseDropDownMenu(value) {
|
|
1600
|
+
if (value === "auto") {
|
|
1601
|
+
this.setDropDownMenu();
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
this.showDropDown = value === "always";
|
|
1605
|
+
}
|
|
1606
|
+
componentWillLoad() {
|
|
1607
|
+
this.hasSubLogo = this.host.querySelector("*[slot = 'sub-logo']") !== null;
|
|
1608
|
+
}
|
|
1609
|
+
shrinkMenuToFit() {
|
|
1610
|
+
if (!this.wrapper || !this.nav) {
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
if (this.wrapper.clientWidth >= this.nav.clientWidth) {
|
|
1614
|
+
return;
|
|
1615
|
+
}
|
|
1616
|
+
if (this.overflowMenuItems >= this.mainMenu.length) {
|
|
1617
|
+
return;
|
|
1618
|
+
}
|
|
1619
|
+
this.overflowMenuItems++;
|
|
1620
|
+
}
|
|
1621
|
+
componentDidRender() {
|
|
1622
|
+
if (this.showDropDown) {
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1625
|
+
window.setTimeout(() => this.shrinkMenuToFit(), 0);
|
|
1626
|
+
}
|
|
1627
|
+
setOverflowMenu() {
|
|
1628
|
+
if (this.showDropDown) {
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1631
|
+
if (this.overflowMenuItems != 0) {
|
|
1632
|
+
this.overflowMenuItems = 0;
|
|
1633
|
+
return;
|
|
1634
|
+
}
|
|
1635
|
+
this.shrinkMenuToFit();
|
|
1636
|
+
}
|
|
1637
|
+
setDropDownMenu() {
|
|
1638
|
+
if (this.useDropDownMenu !== "auto") {
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1641
|
+
this.showDropDown = window.innerWidth < minDesktopViewportWidth;
|
|
1642
|
+
}
|
|
1643
|
+
connectedCallback() {
|
|
1644
|
+
window.addEventListener("resize", this.onWindowResize);
|
|
1645
|
+
}
|
|
1646
|
+
disconnectedCallback() {
|
|
1647
|
+
window.removeEventListener("resize", this.onWindowResize);
|
|
1648
|
+
}
|
|
1649
|
+
MenuItem(item) {
|
|
1650
|
+
return (h("li", { class: item.active ? "dso-active" : undefined }, h("a", { href: item.url, "aria-current": item.active ? "page" : undefined }, item.label)));
|
|
1651
|
+
}
|
|
1652
|
+
render() {
|
|
1653
|
+
return (h(Fragment, null, h("div", { class: clsx("dso-header", {
|
|
1654
|
+
["use-drop-down"]: this.showDropDown,
|
|
1655
|
+
["has-sub-logo"]: this.hasSubLogo,
|
|
1656
|
+
}), ref: (element) => (this.wrapper = element) }, h("div", { class: "logo-container" }, h("div", { class: "logo" }, h("slot", { name: "logo" })), h("div", { class: "sub-logo" }, h("slot", { name: "sub-logo" }))), this.showDropDown && (h("div", { class: "dropdown" }, h("dso-dropdown-menu", { "dropdown-align": "right" }, h("button", { type: "button", class: "tertiary", slot: "toggle" }, h("span", null, "Menu")), h("div", { class: "dso-dropdown-options" }, h("dso-dropdown-options", null, h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (h("li", null, h("a", { href: this.userHomeUrl }, "Mijn Omgevingsloket"))), this.loginUrl && !this.isLoggedIn && (h("li", null, h("a", { href: this.loginUrl }, "Inloggen"))), this.userProfileUrl &&
|
|
1657
|
+
this.userProfileName &&
|
|
1658
|
+
this.isLoggedIn && (h("li", null, h("a", { href: this.userProfileUrl }, this.userProfileName, h("span", { class: "profile-label" }, "- Mijn profiel")))), this.logoutUrl && this.isLoggedIn && (h("li", null, h("a", { href: this.logoutUrl }, "Uitloggen"))))))))), !this.showDropDown && (h(Fragment, null, h("div", { class: "dso-header-session" }, this.userProfileUrl &&
|
|
1659
|
+
this.userProfileName &&
|
|
1660
|
+
this.isLoggedIn && (h("div", { class: "profile" }, h("span", { class: "profile-label" }, "Welkom:"), h("a", { href: this.userProfileUrl }, this.userProfileName))), this.loginUrl && !this.isLoggedIn && (h("div", { class: "login" }, h("a", { href: this.loginUrl }, "Inloggen"))), this.logoutUrl && this.isLoggedIn && (h("div", { class: "logout" }, h("a", { href: this.logoutUrl }, "Uitloggen")))), h("nav", { class: "dso-navbar" }, h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) }, this.mainMenu
|
|
1661
|
+
.filter((_, index) => index < this.mainMenu.length - this.overflowMenuItems)
|
|
1662
|
+
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", { "dropdown-align": "left" }, h("button", { type: "button", class: "tertiary", slot: "toggle" }, h("span", null, "Meer")), h("div", { class: "dso-dropdown-options" }, h("dso-dropdown-options", null, h("ul", null, this.mainMenu
|
|
1663
|
+
.filter((_, index) => index >=
|
|
1664
|
+
this.mainMenu.length -
|
|
1665
|
+
this.overflowMenuItems)
|
|
1666
|
+
.map(this.MenuItem))))))), this.userHomeUrl && (h("li", { class: "menu-user-home" }, h("a", { href: this.userHomeUrl }, h("dso-icon", { icon: "user-line" }), "Mijn Omgevingsloket"))))))))));
|
|
1667
|
+
}
|
|
1668
|
+
get host() { return this; }
|
|
1669
|
+
static get watchers() { return {
|
|
1670
|
+
"useDropDownMenu": ["watchUseDropDownMenu"]
|
|
1671
|
+
}; }
|
|
1672
|
+
static get style() { return headerCss; }
|
|
1673
|
+
};
|
|
1674
|
+
|
|
1514
1675
|
const helpcenterPanelCss = ":host{display:block;--di-times:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\");--di-times-wit:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\")}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.wrapper{height:100%;left:0;position:fixed;top:0;visibility:hidden;width:100%}.wrapper.visible{visibility:visible}.dimscreen{background-color:#000;height:100%;opacity:0.4;width:100%}.open-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#39870c;border-color:#39870c;color:#fff;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;bottom:16px;font-family:Asap, sans-serif;position:fixed;right:16px}.open-button:focus,.open-button:focus-visible{outline-offset:2px}.open-button:active{outline:0}.open-button.extern::after,.open-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.open-button:focus,.open-button:focus-visible{outline-offset:2px}.open-button:active{outline:0}.open-button.extern::after,.open-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.open-button:hover{background-color:#275937;border-color:#275937;color:#fff}.open-button:active{background-color:#15301e;border-color:#15301e;color:#fff}.open-button[disabled],.open-button[disabled]:hover{background-color:#afcf9d;border-color:#afcf9d;color:#fff}.open-button.btn-sm{line-height:16px}.open-button.btn-sm dso-icon,.open-button.btn-sm svg.di,.open-button.btn-sm.extern::after,.open-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.open-button.download::after{background:var(--dso-icon, var(--di-download-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.open-button.extern::after{background:var(--dso-icon, var(--di-external-link-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.open-button dso-icon,.open-button svg.di{margin-left:-8px;margin-right:8px}.open-button span+dso-icon,.open-button span+svg.di{margin-left:8px;margin-right:-8px}.open-button:hover{cursor:pointer}.open-button.open{display:none}.close-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border-right:0;border-top:0;border-radius:0 0 0 8px;height:40px;min-width:40px;padding:0;position:fixed;right:0;width:40px;top:0}.close-button:focus,.close-button:focus-visible{outline-offset:2px}.close-button:active{outline:0}.close-button.extern::after,.close-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.close-button:hover{background-color:#39870c;border-color:#39870c;color:#fff}.close-button:active{background-color:#275937;border-color:#275937;color:#fff}.close-button[disabled],.close-button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.close-button.btn-sm{line-height:16px}.close-button.btn-sm dso-icon,.close-button.btn-sm svg.di,.close-button.btn-sm.extern::after,.close-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.close-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.close-button.download:hover::after{--dso-icon:var(--di-download-wit)}.close-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.close-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.close-button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.close-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.close-button dso-icon,.close-button svg.di{margin-left:-8px;margin-right:8px}.close-button span+dso-icon,.close-button span+svg.di{margin-left:8px;margin-right:-8px}.close-button::before{background:var(--dso-icon, var(--di-times)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.close-button:hover,.close-button:active,.close-button:focus{cursor:pointer}.close-button:hover::before,.close-button:active::before,.close-button:focus::before{background:var(--dso-icon, var(--di-times-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.close-button.close{display:none}.iframe-container{background-color:#fff;border:0;border-left:1px solid #ccc;box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.4);height:100%;position:absolute;right:-640px;top:0;transition:right 0.5s;width:640px}.iframe-container.open{right:0}iframe{border:0;height:100%;width:100%}";
|
|
1515
1676
|
|
|
1516
1677
|
const maxCssTransitionMilliseconds = 500;
|
|
@@ -2169,7 +2330,7 @@ let Icon = class extends HTMLElement {
|
|
|
2169
2330
|
static get style() { return iconCss; }
|
|
2170
2331
|
};
|
|
2171
2332
|
|
|
2172
|
-
const infoCss = ":host{--di-times-
|
|
2333
|
+
const infoCss = ":host{--di-times-grijs90:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\");display:block;background-color:#f2f2f2;padding:16px 32px 16px 16px;position:relative}:host>button{background-color:transparent;border-style:none;padding:0;position:absolute;right:8px;top:8px}:host>button::before{background:var(--dso-icon, var(--di-times-grijs90)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block}:host(:not([active]):not([fixed])){display:none}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
2173
2334
|
|
|
2174
2335
|
let Info = class extends HTMLElement {
|
|
2175
2336
|
constructor() {
|
|
@@ -2184,7 +2345,7 @@ let Info = class extends HTMLElement {
|
|
|
2184
2345
|
static get style() { return infoCss; }
|
|
2185
2346
|
};
|
|
2186
2347
|
|
|
2187
|
-
const infoButtonCss = ":host{display:inline-block;--di-info:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-secondary:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active-secondary:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}button{background:var(--dso-icon, var(--di-info)) no-repeat;background-position:center;background-size:cover;height:24px;vertical-align:top;width:24px;border:1px solid transparent;margin-left:8px;padding:0}button.dso-open,button:hover,button:active{--dso-icon:var(--di-info-active)}button.dso-info-secondary{--dso-icon:var(--di-info-secondary)}button.dso-info-secondary.dso-open,button.dso-info-secondary:hover,button.dso-info-secondary:active{--dso-icon:var(--di-info-active-secondary)}";
|
|
2348
|
+
const infoButtonCss = ":host{display:inline-block;--di-info:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-secondary:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active-secondary:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}button{background:var(--dso-icon, var(--di-info)) no-repeat;background-position:center;background-size:cover;height:24px;vertical-align:top;width:24px;border:1px solid transparent;margin-left:8px;padding:0;cursor:pointer}button.dso-open,button:hover,button:active{--dso-icon:var(--di-info-active)}button.dso-info-secondary{--dso-icon:var(--di-info-secondary)}button.dso-info-secondary.dso-open,button.dso-info-secondary:hover,button.dso-info-secondary:active{--dso-icon:var(--di-info-active-secondary)}";
|
|
2188
2349
|
|
|
2189
2350
|
let InfoButton = class extends HTMLElement {
|
|
2190
2351
|
constructor() {
|
|
@@ -2226,7 +2387,7 @@ Label.statusMap = new Map([
|
|
|
2226
2387
|
['danger', 'Fout']
|
|
2227
2388
|
]);
|
|
2228
2389
|
|
|
2229
|
-
const mapBaseLayersCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}fieldset{border:0;margin:0;min-width:0;padding:0}fieldset .control-label{display:inline-block;font-weight:bold;margin-bottom:8px;max-width:100%;text-align:left}";
|
|
2390
|
+
const mapBaseLayersCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}fieldset{border:0;margin:0;min-width:0;padding:0}fieldset .control-label{display:inline-block;font-weight:bold;margin-bottom:8px;max-width:100%;text-align:left}p[slot=info]{margin:0}";
|
|
2230
2391
|
|
|
2231
2392
|
let MapBaseLayers = class extends HTMLElement {
|
|
2232
2393
|
constructor() {
|
|
@@ -2235,17 +2396,18 @@ let MapBaseLayers = class extends HTMLElement {
|
|
|
2235
2396
|
attachShadow(this);
|
|
2236
2397
|
this.baseLayerChange = createEvent(this, "baseLayerChange", 7);
|
|
2237
2398
|
}
|
|
2238
|
-
|
|
2239
|
-
this.
|
|
2240
|
-
this.baseLayerChange.emit(baseLayer);
|
|
2399
|
+
baseLayerChangeHandler(baseLayer) {
|
|
2400
|
+
this.baseLayerChange.emit({ activeBaseLayer: baseLayer });
|
|
2241
2401
|
}
|
|
2242
2402
|
render() {
|
|
2243
|
-
return (h("fieldset", { class: "form-group dso-radios" }, h("legend", { class: "sr-only" }, "Achtergrond"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Achtergrond")), h("div", { class: "dso-field-container" }, this.baseLayers.map(
|
|
2403
|
+
return (h("fieldset", { class: "form-group dso-radios" }, h("legend", { class: "sr-only" }, "Achtergrond"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Achtergrond")), h("div", { class: "dso-field-container" }, this.baseLayers.map(baseLayer => (h("dso-selectable", { key: baseLayer.id, type: "radio", value: baseLayer.name, checked: baseLayer.checked, disabled: baseLayer.disabled, onDsoChange: () => this.baseLayerChangeHandler(baseLayer) }, baseLayer.name, baseLayer.info
|
|
2404
|
+
? h("p", { slot: "info" }, baseLayer.info)
|
|
2405
|
+
: null))))));
|
|
2244
2406
|
}
|
|
2245
2407
|
static get style() { return mapBaseLayersCss; }
|
|
2246
2408
|
};
|
|
2247
2409
|
|
|
2248
|
-
const mapControlsCss = "button{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}button[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}:host{background-color:#fff;border:1px solid #ccc;bottom:0;display:block;font-family:Asap, sans-serif;position:absolute;top:0;left:100%;transition:transform 300ms ease;width:300px}*,*::after,*::before{box-sizing:border-box}:host([open]){box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.3);transform:translateX(-100%)}:host([open]) #toggle-visibility-button{display:none}#
|
|
2410
|
+
const mapControlsCss = "button{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}button[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}:host{background-color:#fff;border:1px solid #ccc;bottom:0;display:block;font-family:Asap, sans-serif;position:absolute;top:0;left:100%;transition:transform 300ms ease;width:300px}*,*::after,*::before{box-sizing:border-box}:host([open]){box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.3);transform:translateX(-100%)}:host([open]) #toggle-visibility-button{display:none}#toggle-visibility-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.5);font-weight:600;margin-right:16px;padding:8px 16px;white-space:nowrap;position:absolute;right:calc(100% + 56px);top:16px}#toggle-visibility-button:focus,#toggle-visibility-button:focus-visible{outline-offset:2px}#toggle-visibility-button:active{outline:0}#toggle-visibility-button.extern::after,#toggle-visibility-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}#toggle-visibility-button:hover{background-color:#39870c;border-color:#39870c;color:#fff}#toggle-visibility-button:active{background-color:#275937;border-color:#275937;color:#fff}#toggle-visibility-button[disabled],#toggle-visibility-button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}#toggle-visibility-button.btn-sm{line-height:16px}#toggle-visibility-button.btn-sm dso-icon,#toggle-visibility-button.btn-sm svg.di,#toggle-visibility-button.btn-sm.extern::after,#toggle-visibility-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}#toggle-visibility-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#toggle-visibility-button.download:hover::after{--dso-icon:var(--di-download-wit)}#toggle-visibility-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}#toggle-visibility-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#toggle-visibility-button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}#toggle-visibility-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}#toggle-visibility-button dso-icon,#toggle-visibility-button svg.di{margin-left:-8px;margin-right:8px}#toggle-visibility-button span+dso-icon,#toggle-visibility-button span+svg.di{margin-left:8px;margin-right:-8px}#toggle-visibility-button:focus-visible{background-color:#39870c;border-color:#39870c;color:#fff;outline:none}#zoom-buttons{border-radius:4px;box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.5);display:flex;flex-wrap:wrap;flex:0 0;position:absolute;right:calc(100% + 16px);top:16px}#zoom-buttons button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;padding:8px;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;flex:0 0 100%;height:40px;min-width:auto;width:40px}#zoom-buttons button:focus,#zoom-buttons button:focus-visible{outline-offset:2px}#zoom-buttons button:active{outline:0}#zoom-buttons button.extern::after,#zoom-buttons button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}#zoom-buttons button:hover{background-color:#39870c;border-color:#39870c;color:#fff}#zoom-buttons button:active{background-color:#275937;border-color:#275937;color:#fff}#zoom-buttons button[disabled],#zoom-buttons button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}#zoom-buttons button.btn-sm{line-height:16px}#zoom-buttons button.btn-sm dso-icon,#zoom-buttons button.btn-sm svg.di,#zoom-buttons button.btn-sm.extern::after,#zoom-buttons button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}#zoom-buttons button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#zoom-buttons button.download:hover::after{--dso-icon:var(--di-download-wit)}#zoom-buttons button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}#zoom-buttons button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#zoom-buttons button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}#zoom-buttons button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}#zoom-buttons button>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}#zoom-buttons button:focus-visible{background-color:#39870c;border-color:#39870c;color:#fff;outline:none}#zoom-buttons button+button{border-radius:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top:1px solid #ccc}#close-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;border:0;color:#39870c;line-height:1;padding:0;background-color:transparent;padding:0;position:absolute;right:16px;top:16px}#close-button:focus,#close-button:focus-visible{outline-offset:2px}#close-button:active{outline:0}#close-button.extern::after,#close-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}#close-button[disabled]{color:#afcf9d}#close-button:not([disabled]):hover{color:#676cb0;text-decoration:underline}#close-button:not([disabled]):active{color:#676cb0}#close-button.btn-align{line-height:calc(1.5em - 1px);padding:11px 0;position:relative}#close-button.extern::after,#close-button.download::after{position:relative;top:-2px}#close-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#close-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}#close-button.download:not([disabled]):hover::after,#close-button.download:not([disabled]):active::after{--dso-icon:var(--di-download-scampi)}#close-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#close-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}#close-button.extern:not([disabled]):hover::after,#close-button.extern:not([disabled]):active::after{--dso-icon:var(--di-external-link-scampi)}#close-button>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}section{display:flex;flex-direction:column;height:100%}header,.content{padding:16px}header{border-bottom:1px solid #ccc;flex-grow:0;position:relative}header h2{color:#275937;font-family:\"Asap\", sans-serif;line-height:1;margin:0}.content{flex-grow:1;overflow-y:auto}";
|
|
2249
2411
|
|
|
2250
2412
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
2251
2413
|
if (!privateMap.has(receiver)) {
|
|
@@ -2287,7 +2449,7 @@ let MapControls = class extends HTMLElement {
|
|
|
2287
2449
|
}
|
|
2288
2450
|
}
|
|
2289
2451
|
render() {
|
|
2290
|
-
return (h(Host, null, h("
|
|
2452
|
+
return (h(Host, null, h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _toggleButtonElement, element) }, h("dso-icon", { icon: "layers" }), h("span", null, "Kaartlagen")), h("div", { id: "zoom-buttons" }, h("button", { type: "button", onClick: e => this.zoomIn.emit(e), disabled: this.disableZoom === 'in' || this.disableZoom === 'both' }, h("span", null, "Zoom in"), h("dso-icon", { icon: "plus" })), h("button", { type: "button", onClick: e => this.zoomOut.emit(e), disabled: this.disableZoom === 'out' || this.disableZoom === 'both' }, h("span", null, "Zoom uit"), h("dso-icon", { icon: "minus" }))), h("section", { hidden: this.hideContent }, h("header", null, h("h2", null, "Kaartlagen"), h("button", { type: "button", id: "close-button", onClick: () => this.open = false, ref: element => __classPrivateFieldSet(this, _closeButtonElement, element) }, h("span", null, "Sluit dialoog"), h("dso-icon", { icon: "times" }))), h("div", { class: "content" }, h("slot", null)))));
|
|
2291
2453
|
}
|
|
2292
2454
|
static get watchers() { return {
|
|
2293
2455
|
"open": ["watchOpen"]
|
|
@@ -2296,24 +2458,23 @@ let MapControls = class extends HTMLElement {
|
|
|
2296
2458
|
};
|
|
2297
2459
|
_closeButtonElement = new WeakMap(), _toggleButtonElement = new WeakMap();
|
|
2298
2460
|
|
|
2299
|
-
const mapOverlaysCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}fieldset{border:0;margin:0;min-width:0;padding:0}fieldset .control-label{display:inline-block;font-weight:bold;margin-bottom:8px;max-width:100%;text-align:left}";
|
|
2461
|
+
const mapOverlaysCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}fieldset{border:0;margin:0;min-width:0;padding:0}fieldset .control-label{display:inline-block;font-weight:bold;margin-bottom:8px;max-width:100%;text-align:left}p[slot=info]{margin:0}";
|
|
2300
2462
|
|
|
2301
2463
|
let MapOverlays = class extends HTMLElement {
|
|
2302
2464
|
constructor() {
|
|
2303
2465
|
super();
|
|
2304
2466
|
this.__registerHost();
|
|
2305
2467
|
attachShadow(this);
|
|
2306
|
-
this.
|
|
2307
|
-
this.checkedOverlays = [];
|
|
2468
|
+
this.toggleOverlay = createEvent(this, "toggleOverlay", 7);
|
|
2308
2469
|
}
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
: this.checkedOverlays.filter(o => o !== overlay);
|
|
2313
|
-
this.checkedOverlaysChange.emit(this.checkedOverlays);
|
|
2470
|
+
overlayChangeHandler(overlay, e) {
|
|
2471
|
+
const checked = e.detail.target instanceof HTMLInputElement ? !!e.detail.target.checked : false;
|
|
2472
|
+
this.toggleOverlay.emit({ overlay, checked });
|
|
2314
2473
|
}
|
|
2315
2474
|
render() {
|
|
2316
|
-
return (h("fieldset", { class: "form-group dso-checkboxes" }, h("legend", { class: "sr-only" }, "Kaartlagen"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Kaartlagen")), h("div", { class: "dso-field-container" }, this.overlays.map(overlay => (h("dso-selectable", { type: "checkbox", value: overlay.name, checked:
|
|
2475
|
+
return (h("fieldset", { class: "form-group dso-checkboxes" }, h("legend", { class: "sr-only" }, "Kaartlagen"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Kaartlagen")), h("div", { class: "dso-field-container" }, this.overlays.map(overlay => (h("dso-selectable", { type: "checkbox", value: overlay.name, checked: overlay.checked, disabled: overlay.disabled, onDsoChange: e => this.overlayChangeHandler(overlay, e) }, overlay.name, overlay.info
|
|
2476
|
+
? h("p", { slot: "info" }, overlay.info)
|
|
2477
|
+
: null))))));
|
|
2317
2478
|
}
|
|
2318
2479
|
static get style() { return mapOverlaysCss; }
|
|
2319
2480
|
};
|
|
@@ -3105,29 +3266,32 @@ function getBasePlacement(placement) {
|
|
|
3105
3266
|
return placement.split('-')[0];
|
|
3106
3267
|
}
|
|
3107
3268
|
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3269
|
+
var max = Math.max;
|
|
3270
|
+
var min = Math.min;
|
|
3271
|
+
var round = Math.round;
|
|
3272
|
+
|
|
3273
|
+
function getBoundingClientRect(element, includeScale) {
|
|
3274
|
+
if (includeScale === void 0) {
|
|
3275
|
+
includeScale = false;
|
|
3276
|
+
}
|
|
3111
3277
|
|
|
3112
3278
|
var rect = element.getBoundingClientRect();
|
|
3113
3279
|
var scaleX = 1;
|
|
3114
|
-
var scaleY = 1;
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
// }
|
|
3130
|
-
// }
|
|
3280
|
+
var scaleY = 1;
|
|
3281
|
+
|
|
3282
|
+
if (isHTMLElement(element) && includeScale) {
|
|
3283
|
+
var offsetHeight = element.offsetHeight;
|
|
3284
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
3285
|
+
// Fallback to 1 in case both values are `0`
|
|
3286
|
+
|
|
3287
|
+
if (offsetWidth > 0) {
|
|
3288
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
3289
|
+
}
|
|
3290
|
+
|
|
3291
|
+
if (offsetHeight > 0) {
|
|
3292
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3131
3295
|
|
|
3132
3296
|
return {
|
|
3133
3297
|
width: rect.width / scaleX,
|
|
@@ -3282,13 +3446,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
3282
3446
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
3283
3447
|
}
|
|
3284
3448
|
|
|
3285
|
-
var max = Math.max;
|
|
3286
|
-
var min = Math.min;
|
|
3287
|
-
var round = Math.round;
|
|
3288
|
-
|
|
3289
3449
|
function within(min$1, value, max$1) {
|
|
3290
3450
|
return max(min$1, min(value, max$1));
|
|
3291
3451
|
}
|
|
3452
|
+
function withinMaxClamp(min, value, max) {
|
|
3453
|
+
var v = within(min, value, max);
|
|
3454
|
+
return v > max ? max : v;
|
|
3455
|
+
}
|
|
3292
3456
|
|
|
3293
3457
|
function getFreshSideObject() {
|
|
3294
3458
|
return {
|
|
@@ -3411,8 +3575,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
3411
3575
|
var win = window;
|
|
3412
3576
|
var dpr = win.devicePixelRatio || 1;
|
|
3413
3577
|
return {
|
|
3414
|
-
x: round(
|
|
3415
|
-
y: round(
|
|
3578
|
+
x: round(x * dpr) / dpr || 0,
|
|
3579
|
+
y: round(y * dpr) / dpr || 0
|
|
3416
3580
|
};
|
|
3417
3581
|
}
|
|
3418
3582
|
|
|
@@ -3427,14 +3591,23 @@ function mapToStyles(_ref2) {
|
|
|
3427
3591
|
position = _ref2.position,
|
|
3428
3592
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
3429
3593
|
adaptive = _ref2.adaptive,
|
|
3430
|
-
roundOffsets = _ref2.roundOffsets
|
|
3431
|
-
|
|
3432
|
-
var
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3594
|
+
roundOffsets = _ref2.roundOffsets,
|
|
3595
|
+
isFixed = _ref2.isFixed;
|
|
3596
|
+
var _offsets$x = offsets.x,
|
|
3597
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
3598
|
+
_offsets$y = offsets.y,
|
|
3599
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
3600
|
+
|
|
3601
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
3602
|
+
x: x,
|
|
3603
|
+
y: y
|
|
3604
|
+
}) : {
|
|
3605
|
+
x: x,
|
|
3606
|
+
y: y
|
|
3607
|
+
};
|
|
3437
3608
|
|
|
3609
|
+
x = _ref3.x;
|
|
3610
|
+
y = _ref3.y;
|
|
3438
3611
|
var hasX = offsets.hasOwnProperty('x');
|
|
3439
3612
|
var hasY = offsets.hasOwnProperty('y');
|
|
3440
3613
|
var sideX = left;
|
|
@@ -3459,16 +3632,18 @@ function mapToStyles(_ref2) {
|
|
|
3459
3632
|
offsetParent = offsetParent;
|
|
3460
3633
|
|
|
3461
3634
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3462
|
-
sideY = bottom;
|
|
3463
|
-
|
|
3464
|
-
|
|
3635
|
+
sideY = bottom;
|
|
3636
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3637
|
+
offsetParent[heightProp];
|
|
3638
|
+
y -= offsetY - popperRect.height;
|
|
3465
3639
|
y *= gpuAcceleration ? 1 : -1;
|
|
3466
3640
|
}
|
|
3467
3641
|
|
|
3468
3642
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3469
|
-
sideX = right;
|
|
3470
|
-
|
|
3471
|
-
|
|
3643
|
+
sideX = right;
|
|
3644
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3645
|
+
offsetParent[widthProp];
|
|
3646
|
+
x -= offsetX - popperRect.width;
|
|
3472
3647
|
x *= gpuAcceleration ? 1 : -1;
|
|
3473
3648
|
}
|
|
3474
3649
|
}
|
|
@@ -3477,6 +3652,17 @@ function mapToStyles(_ref2) {
|
|
|
3477
3652
|
position: position
|
|
3478
3653
|
}, adaptive && unsetSides);
|
|
3479
3654
|
|
|
3655
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
3656
|
+
x: x,
|
|
3657
|
+
y: y
|
|
3658
|
+
}) : {
|
|
3659
|
+
x: x,
|
|
3660
|
+
y: y
|
|
3661
|
+
};
|
|
3662
|
+
|
|
3663
|
+
x = _ref4.x;
|
|
3664
|
+
y = _ref4.y;
|
|
3665
|
+
|
|
3480
3666
|
if (gpuAcceleration) {
|
|
3481
3667
|
var _Object$assign;
|
|
3482
3668
|
|
|
@@ -3486,9 +3672,9 @@ function mapToStyles(_ref2) {
|
|
|
3486
3672
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
3487
3673
|
}
|
|
3488
3674
|
|
|
3489
|
-
function computeStyles(
|
|
3490
|
-
var state =
|
|
3491
|
-
options =
|
|
3675
|
+
function computeStyles(_ref5) {
|
|
3676
|
+
var state = _ref5.state,
|
|
3677
|
+
options = _ref5.options;
|
|
3492
3678
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
3493
3679
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
3494
3680
|
_options$adaptive = options.adaptive,
|
|
@@ -3501,7 +3687,8 @@ function computeStyles(_ref4) {
|
|
|
3501
3687
|
variation: getVariation(state.placement),
|
|
3502
3688
|
popper: state.elements.popper,
|
|
3503
3689
|
popperRect: state.rects.popper,
|
|
3504
|
-
gpuAcceleration: gpuAcceleration
|
|
3690
|
+
gpuAcceleration: gpuAcceleration,
|
|
3691
|
+
isFixed: state.options.strategy === 'fixed'
|
|
3505
3692
|
};
|
|
3506
3693
|
|
|
3507
3694
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -3759,7 +3946,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
3759
3946
|
}
|
|
3760
3947
|
|
|
3761
3948
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
3762
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
3949
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
3763
3950
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
3764
3951
|
// clipping (or hiding) overflowing elements with a position different from
|
|
3765
3952
|
// `initial`
|
|
@@ -4272,6 +4459,14 @@ function preventOverflow(_ref) {
|
|
|
4272
4459
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
4273
4460
|
placement: state.placement
|
|
4274
4461
|
})) : tetherOffset;
|
|
4462
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
4463
|
+
mainAxis: tetherOffsetValue,
|
|
4464
|
+
altAxis: tetherOffsetValue
|
|
4465
|
+
} : Object.assign({
|
|
4466
|
+
mainAxis: 0,
|
|
4467
|
+
altAxis: 0
|
|
4468
|
+
}, tetherOffsetValue);
|
|
4469
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
4275
4470
|
var data = {
|
|
4276
4471
|
x: 0,
|
|
4277
4472
|
y: 0
|
|
@@ -4281,13 +4476,15 @@ function preventOverflow(_ref) {
|
|
|
4281
4476
|
return;
|
|
4282
4477
|
}
|
|
4283
4478
|
|
|
4284
|
-
if (checkMainAxis
|
|
4479
|
+
if (checkMainAxis) {
|
|
4480
|
+
var _offsetModifierState$;
|
|
4481
|
+
|
|
4285
4482
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
4286
4483
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
4287
4484
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
4288
4485
|
var offset = popperOffsets[mainAxis];
|
|
4289
|
-
var min$1 =
|
|
4290
|
-
var max$1 =
|
|
4486
|
+
var min$1 = offset + overflow[mainSide];
|
|
4487
|
+
var max$1 = offset - overflow[altSide];
|
|
4291
4488
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
4292
4489
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
4293
4490
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -4307,36 +4504,45 @@ function preventOverflow(_ref) {
|
|
|
4307
4504
|
// width or height)
|
|
4308
4505
|
|
|
4309
4506
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
4310
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
4311
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
4507
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
4508
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
4312
4509
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
4313
4510
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
4314
|
-
var offsetModifierValue =
|
|
4315
|
-
var tetherMin =
|
|
4316
|
-
var tetherMax =
|
|
4511
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
4512
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
4513
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
4514
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
4515
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
4516
|
+
data[mainAxis] = preventedOffset - offset;
|
|
4517
|
+
}
|
|
4317
4518
|
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
4321
|
-
data[mainAxis] = preventedOffset - offset;
|
|
4322
|
-
}
|
|
4519
|
+
if (checkAltAxis) {
|
|
4520
|
+
var _offsetModifierState$2;
|
|
4323
4521
|
|
|
4324
|
-
|
|
4325
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4522
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
4326
4523
|
|
|
4327
|
-
|
|
4524
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
4328
4525
|
|
|
4329
|
-
|
|
4526
|
+
var _offset = popperOffsets[altAxis];
|
|
4330
4527
|
|
|
4331
|
-
|
|
4528
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
4332
4529
|
|
|
4333
|
-
|
|
4530
|
+
var _min = _offset + overflow[_mainSide];
|
|
4334
4531
|
|
|
4335
|
-
|
|
4532
|
+
var _max = _offset - overflow[_altSide];
|
|
4336
4533
|
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4534
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
4535
|
+
|
|
4536
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
4537
|
+
|
|
4538
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
4539
|
+
|
|
4540
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
4541
|
+
|
|
4542
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
4543
|
+
|
|
4544
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
4545
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
4340
4546
|
}
|
|
4341
4547
|
|
|
4342
4548
|
state.modifiersData[name] = data;
|
|
@@ -4368,8 +4574,8 @@ function getNodeScroll(node) {
|
|
|
4368
4574
|
|
|
4369
4575
|
function isElementScaled(element) {
|
|
4370
4576
|
var rect = element.getBoundingClientRect();
|
|
4371
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
4372
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
4577
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
4578
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
4373
4579
|
return scaleX !== 1 || scaleY !== 1;
|
|
4374
4580
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
4375
4581
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -4381,9 +4587,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4381
4587
|
}
|
|
4382
4588
|
|
|
4383
4589
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
4384
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4590
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
4385
4591
|
var documentElement = getDocumentElement(offsetParent);
|
|
4386
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
4592
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
4387
4593
|
var scroll = {
|
|
4388
4594
|
scrollLeft: 0,
|
|
4389
4595
|
scrollTop: 0
|
|
@@ -4400,7 +4606,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
4400
4606
|
}
|
|
4401
4607
|
|
|
4402
4608
|
if (isHTMLElement(offsetParent)) {
|
|
4403
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
4609
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
4404
4610
|
offsets.x += offsetParent.clientLeft;
|
|
4405
4611
|
offsets.y += offsetParent.clientTop;
|
|
4406
4612
|
} else if (documentElement) {
|
|
@@ -4687,7 +4893,41 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|
|
4687
4893
|
defaultModifiers: defaultModifiers
|
|
4688
4894
|
}); // eslint-disable-next-line import/no-unused-modules
|
|
4689
4895
|
|
|
4690
|
-
|
|
4896
|
+
var maxSize = {
|
|
4897
|
+
name: 'maxSize',
|
|
4898
|
+
enabled: true,
|
|
4899
|
+
phase: 'main',
|
|
4900
|
+
requiresIfExists: ['offset', 'preventOverflow', 'flip'],
|
|
4901
|
+
fn: function fn(_ref) {
|
|
4902
|
+
var state = _ref.state,
|
|
4903
|
+
name = _ref.name,
|
|
4904
|
+
options = _ref.options;
|
|
4905
|
+
var overflow = detectOverflow(state, options);
|
|
4906
|
+
|
|
4907
|
+
var _ref2 = state.modifiersData.preventOverflow || {
|
|
4908
|
+
x: 0,
|
|
4909
|
+
y: 0
|
|
4910
|
+
},
|
|
4911
|
+
x = _ref2.x,
|
|
4912
|
+
y = _ref2.y;
|
|
4913
|
+
|
|
4914
|
+
var _state$rects$popper = state.rects.popper,
|
|
4915
|
+
width = _state$rects$popper.width,
|
|
4916
|
+
height = _state$rects$popper.height;
|
|
4917
|
+
|
|
4918
|
+
var _state$placement$spli = state.placement.split('-'),
|
|
4919
|
+
basePlacement = _state$placement$spli[0];
|
|
4920
|
+
|
|
4921
|
+
var widthProp = basePlacement === 'left' ? 'left' : 'right';
|
|
4922
|
+
var heightProp = basePlacement === 'top' ? 'top' : 'bottom';
|
|
4923
|
+
state.modifiersData[name] = {
|
|
4924
|
+
width: width - overflow[widthProp] - x,
|
|
4925
|
+
height: height - overflow[heightProp] - y
|
|
4926
|
+
};
|
|
4927
|
+
}
|
|
4928
|
+
};
|
|
4929
|
+
|
|
4930
|
+
const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip){color:red !important}:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow{margin-top:0}:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=left]{margin-right:-8px !important}:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow{margin-top:0}*,*::after,*::before{box-sizing:border-box}.tooltip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;display:block;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));font-size:14px;opacity:0;position:absolute;transition:opacity 0.15s linear;z-index:1070}.tooltip.in{opacity:1}.tooltip .tooltip-inner{background-color:#fff;border-radius:4px;color:#191919;display:inline-block;font-size:16px;max-width:640px;padding:8px 16px;position:relative}.tooltip .tooltip-inner.dso-small{max-width:320px}.tooltip .tooltip-arrow{border-color:transparent;border-style:solid;height:0;width:0}.tooltip[data-popper-placement=top]{margin-top:-3px;padding:6px 0}.tooltip[data-popper-placement=top] .tooltip-arrow{border-top-color:#fff;border-width:6px 6px 0;bottom:0}.tooltip[data-popper-placement=top] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=right]{margin-left:3px;padding:0 6px}.tooltip[data-popper-placement=right] .tooltip-arrow{border-right-color:#fff;border-width:6px 6px 6px 0;left:0}.tooltip[data-popper-placement=right] .tooltip-arrow{margin-top:-3px}.tooltip[data-popper-placement=bottom]{margin-top:3px;padding:6px 0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{border-bottom-color:#fff;border-width:0 6px 6px;top:0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=left]{margin-left:-3px;padding:0 6px}.tooltip[data-popper-placement=left] .tooltip-arrow{border-left-color:#fff;border-width:6px 0 6px 6px;right:0}.tooltip[data-popper-placement=left] .tooltip-arrow{margin-top:-3px}";
|
|
4691
4931
|
|
|
4692
4932
|
// Keep const in sync with $tooltip-transition-duration in @dso-toolkit/sources/tooltip.scss tooltip_root() mixin
|
|
4693
4933
|
const transitionDuration = 150;
|
|
@@ -4709,6 +4949,19 @@ let Tooltip = class extends HTMLElement {
|
|
|
4709
4949
|
*/
|
|
4710
4950
|
this.active = false;
|
|
4711
4951
|
this.hidden = true;
|
|
4952
|
+
this.applyMaxSize = {
|
|
4953
|
+
name: 'applyMaxSize',
|
|
4954
|
+
enabled: true,
|
|
4955
|
+
phase: beforeWrite,
|
|
4956
|
+
requires: ['maxSize'],
|
|
4957
|
+
fn({ state }) {
|
|
4958
|
+
let { width } = state.modifiersData.maxSize;
|
|
4959
|
+
if (width < 160) {
|
|
4960
|
+
width = 160;
|
|
4961
|
+
}
|
|
4962
|
+
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), { maxWidth: `${width}px` });
|
|
4963
|
+
},
|
|
4964
|
+
};
|
|
4712
4965
|
}
|
|
4713
4966
|
/**
|
|
4714
4967
|
* Activate the tooltip (Sets the `active` attribute)
|
|
@@ -4766,7 +5019,8 @@ let Tooltip = class extends HTMLElement {
|
|
|
4766
5019
|
}
|
|
4767
5020
|
this.target = this.getTarget();
|
|
4768
5021
|
this.popper = createPopper(this.target, tooltip, {
|
|
4769
|
-
placement: this.position
|
|
5022
|
+
placement: this.position,
|
|
5023
|
+
modifiers: [maxSize, this.applyMaxSize],
|
|
4770
5024
|
});
|
|
4771
5025
|
this.callbacks = {
|
|
4772
5026
|
activate: () => (this.active = true),
|
|
@@ -4798,7 +5052,7 @@ let Tooltip = class extends HTMLElement {
|
|
|
4798
5052
|
}
|
|
4799
5053
|
}
|
|
4800
5054
|
render() {
|
|
4801
|
-
return (h(Host, { hidden: this.hidden }, h("div", { class: clsx('tooltip', { in: this.active }), role: "tooltip" }, !this.noArrow && h("div", { class: "tooltip-arrow" }), h("div", { class: clsx('tooltip-inner', { 'dso-small': this.small }) }, h("slot", null)))));
|
|
5055
|
+
return (h(Host, { class: { 'hidden': this.hidden } }, h("div", { class: clsx('tooltip', { in: this.active }), role: "tooltip" }, !this.noArrow && h("div", { "data-popper-arrow": true, class: "tooltip-arrow" }), h("div", { class: clsx('tooltip-inner', { 'dso-small': this.small }) }, h("slot", null)))));
|
|
4802
5056
|
}
|
|
4803
5057
|
getTarget() {
|
|
4804
5058
|
if (this.for instanceof HTMLElement) {
|
|
@@ -4849,7 +5103,7 @@ const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
|
|
|
4849
5103
|
: h("ul", { role: "group" }, (_c = item.items) === null || _c === void 0 ? void 0 : _c.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
|
|
4850
5104
|
};
|
|
4851
5105
|
|
|
4852
|
-
const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
5106
|
+
const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block;margin:8px 0;vertical-align:top}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0;width:calc(100% - 24px)}:host .tree-content.active{font-weight:700}:host .tree-content.active:hover{text-decoration:underline}:host .tree-content.active a{text-decoration:none}:host .tree-content.selected{color:#191919;font-weight:700;text-decoration:underline}:host .tree-content.selected:hover,:host .tree-content.selected:focus{text-decoration:none}:host .tree-content a,:host .tree-content a:visited{color:#191919;text-decoration:underline}:host .tree-content a:hover,:host .tree-content a:focus{color:#191919;text-decoration:none}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{font-size:0.75em;margin-left:0.5em;vertical-align:text-bottom}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
4853
5107
|
|
|
4854
5108
|
let TreeView = class extends HTMLElement {
|
|
4855
5109
|
constructor() {
|
|
@@ -5004,22 +5258,795 @@ let TreeView = class extends HTMLElement {
|
|
|
5004
5258
|
static get style() { return treeViewCss; }
|
|
5005
5259
|
};
|
|
5006
5260
|
|
|
5261
|
+
/*!
|
|
5262
|
+
* focus-trap 6.7.3
|
|
5263
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
5264
|
+
*/
|
|
5265
|
+
|
|
5266
|
+
function ownKeys(object, enumerableOnly) {
|
|
5267
|
+
var keys = Object.keys(object);
|
|
5268
|
+
|
|
5269
|
+
if (Object.getOwnPropertySymbols) {
|
|
5270
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
5271
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
5272
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
5273
|
+
})), keys.push.apply(keys, symbols);
|
|
5274
|
+
}
|
|
5275
|
+
|
|
5276
|
+
return keys;
|
|
5277
|
+
}
|
|
5278
|
+
|
|
5279
|
+
function _objectSpread2(target) {
|
|
5280
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
5281
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
5282
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
5283
|
+
_defineProperty(target, key, source[key]);
|
|
5284
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
5285
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5286
|
+
});
|
|
5287
|
+
}
|
|
5288
|
+
|
|
5289
|
+
return target;
|
|
5290
|
+
}
|
|
5291
|
+
|
|
5292
|
+
function _defineProperty(obj, key, value) {
|
|
5293
|
+
if (key in obj) {
|
|
5294
|
+
Object.defineProperty(obj, key, {
|
|
5295
|
+
value: value,
|
|
5296
|
+
enumerable: true,
|
|
5297
|
+
configurable: true,
|
|
5298
|
+
writable: true
|
|
5299
|
+
});
|
|
5300
|
+
} else {
|
|
5301
|
+
obj[key] = value;
|
|
5302
|
+
}
|
|
5303
|
+
|
|
5304
|
+
return obj;
|
|
5305
|
+
}
|
|
5306
|
+
|
|
5307
|
+
var activeFocusTraps = function () {
|
|
5308
|
+
var trapQueue = [];
|
|
5309
|
+
return {
|
|
5310
|
+
activateTrap: function activateTrap(trap) {
|
|
5311
|
+
if (trapQueue.length > 0) {
|
|
5312
|
+
var activeTrap = trapQueue[trapQueue.length - 1];
|
|
5313
|
+
|
|
5314
|
+
if (activeTrap !== trap) {
|
|
5315
|
+
activeTrap.pause();
|
|
5316
|
+
}
|
|
5317
|
+
}
|
|
5318
|
+
|
|
5319
|
+
var trapIndex = trapQueue.indexOf(trap);
|
|
5320
|
+
|
|
5321
|
+
if (trapIndex === -1) {
|
|
5322
|
+
trapQueue.push(trap);
|
|
5323
|
+
} else {
|
|
5324
|
+
// move this existing trap to the front of the queue
|
|
5325
|
+
trapQueue.splice(trapIndex, 1);
|
|
5326
|
+
trapQueue.push(trap);
|
|
5327
|
+
}
|
|
5328
|
+
},
|
|
5329
|
+
deactivateTrap: function deactivateTrap(trap) {
|
|
5330
|
+
var trapIndex = trapQueue.indexOf(trap);
|
|
5331
|
+
|
|
5332
|
+
if (trapIndex !== -1) {
|
|
5333
|
+
trapQueue.splice(trapIndex, 1);
|
|
5334
|
+
}
|
|
5335
|
+
|
|
5336
|
+
if (trapQueue.length > 0) {
|
|
5337
|
+
trapQueue[trapQueue.length - 1].unpause();
|
|
5338
|
+
}
|
|
5339
|
+
}
|
|
5340
|
+
};
|
|
5341
|
+
}();
|
|
5342
|
+
|
|
5343
|
+
var isSelectableInput = function isSelectableInput(node) {
|
|
5344
|
+
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
5345
|
+
};
|
|
5346
|
+
|
|
5347
|
+
var isEscapeEvent = function isEscapeEvent(e) {
|
|
5348
|
+
return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
|
|
5349
|
+
};
|
|
5350
|
+
|
|
5351
|
+
var isTabEvent = function isTabEvent(e) {
|
|
5352
|
+
return e.key === 'Tab' || e.keyCode === 9;
|
|
5353
|
+
};
|
|
5354
|
+
|
|
5355
|
+
var delay = function delay(fn) {
|
|
5356
|
+
return setTimeout(fn, 0);
|
|
5357
|
+
}; // Array.find/findIndex() are not supported on IE; this replicates enough
|
|
5358
|
+
// of Array.findIndex() for our needs
|
|
5359
|
+
|
|
5360
|
+
|
|
5361
|
+
var findIndex = function findIndex(arr, fn) {
|
|
5362
|
+
var idx = -1;
|
|
5363
|
+
arr.every(function (value, i) {
|
|
5364
|
+
if (fn(value)) {
|
|
5365
|
+
idx = i;
|
|
5366
|
+
return false; // break
|
|
5367
|
+
}
|
|
5368
|
+
|
|
5369
|
+
return true; // next
|
|
5370
|
+
});
|
|
5371
|
+
return idx;
|
|
5372
|
+
};
|
|
5373
|
+
/**
|
|
5374
|
+
* Get an option's value when it could be a plain value, or a handler that provides
|
|
5375
|
+
* the value.
|
|
5376
|
+
* @param {*} value Option's value to check.
|
|
5377
|
+
* @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
|
|
5378
|
+
* @returns {*} The `value`, or the handler's returned value.
|
|
5379
|
+
*/
|
|
5380
|
+
|
|
5381
|
+
|
|
5382
|
+
var valueOrHandler = function valueOrHandler(value) {
|
|
5383
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
5384
|
+
params[_key - 1] = arguments[_key];
|
|
5385
|
+
}
|
|
5386
|
+
|
|
5387
|
+
return typeof value === 'function' ? value.apply(void 0, params) : value;
|
|
5388
|
+
};
|
|
5389
|
+
|
|
5390
|
+
var getActualTarget = function getActualTarget(event) {
|
|
5391
|
+
// NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
|
|
5392
|
+
// shadow host. However, event.target.composedPath() will be an array of
|
|
5393
|
+
// nodes "clicked" from inner-most (the actual element inside the shadow) to
|
|
5394
|
+
// outer-most (the host HTML document). If we have access to composedPath(),
|
|
5395
|
+
// then use its first element; otherwise, fall back to event.target (and
|
|
5396
|
+
// this only works for an _open_ shadow DOM; otherwise,
|
|
5397
|
+
// composedPath()[0] === event.target always).
|
|
5398
|
+
return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
|
|
5399
|
+
};
|
|
5400
|
+
|
|
5401
|
+
var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
5402
|
+
// SSR: a live trap shouldn't be created in this type of environment so this
|
|
5403
|
+
// should be safe code to execute if the `document` option isn't specified
|
|
5404
|
+
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
|
5405
|
+
|
|
5406
|
+
var config = _objectSpread2({
|
|
5407
|
+
returnFocusOnDeactivate: true,
|
|
5408
|
+
escapeDeactivates: true,
|
|
5409
|
+
delayInitialFocus: true
|
|
5410
|
+
}, userOptions);
|
|
5411
|
+
|
|
5412
|
+
var state = {
|
|
5413
|
+
// @type {Array<HTMLElement>}
|
|
5414
|
+
containers: [],
|
|
5415
|
+
// list of objects identifying the first and last tabbable nodes in all containers/groups in
|
|
5416
|
+
// the trap
|
|
5417
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
5418
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
5419
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
5420
|
+
// result in an error being thrown)
|
|
5421
|
+
// @type {Array<{
|
|
5422
|
+
// container: HTMLElement,
|
|
5423
|
+
// firstTabbableNode: HTMLElement|null,
|
|
5424
|
+
// lastTabbableNode: HTMLElement|null,
|
|
5425
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
5426
|
+
// }>}
|
|
5427
|
+
tabbableGroups: [],
|
|
5428
|
+
nodeFocusedBeforeActivation: null,
|
|
5429
|
+
mostRecentlyFocusedNode: null,
|
|
5430
|
+
active: false,
|
|
5431
|
+
paused: false,
|
|
5432
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
5433
|
+
// has been delayed during activation
|
|
5434
|
+
delayInitialFocusTimer: undefined
|
|
5435
|
+
};
|
|
5436
|
+
var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later
|
|
5437
|
+
|
|
5438
|
+
var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
|
|
5439
|
+
return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
|
|
5440
|
+
};
|
|
5441
|
+
|
|
5442
|
+
var containersContain = function containersContain(element) {
|
|
5443
|
+
return !!(element && state.containers.some(function (container) {
|
|
5444
|
+
return container.contains(element);
|
|
5445
|
+
}));
|
|
5446
|
+
};
|
|
5447
|
+
/**
|
|
5448
|
+
* Gets the node for the given option, which is expected to be an option that
|
|
5449
|
+
* can be either a DOM node, a string that is a selector to get a node, `false`
|
|
5450
|
+
* (if a node is explicitly NOT given), or a function that returns any of these
|
|
5451
|
+
* values.
|
|
5452
|
+
* @param {string} optionName
|
|
5453
|
+
* @returns {undefined | false | HTMLElement | SVGElement} Returns
|
|
5454
|
+
* `undefined` if the option is not specified; `false` if the option
|
|
5455
|
+
* resolved to `false` (node explicitly not given); otherwise, the resolved
|
|
5456
|
+
* DOM node.
|
|
5457
|
+
* @throws {Error} If the option is set, not `false`, and is not, or does not
|
|
5458
|
+
* resolve to a node.
|
|
5459
|
+
*/
|
|
5460
|
+
|
|
5461
|
+
|
|
5462
|
+
var getNodeForOption = function getNodeForOption(optionName) {
|
|
5463
|
+
var optionValue = config[optionName];
|
|
5464
|
+
|
|
5465
|
+
if (typeof optionValue === 'function') {
|
|
5466
|
+
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
5467
|
+
params[_key2 - 1] = arguments[_key2];
|
|
5468
|
+
}
|
|
5469
|
+
|
|
5470
|
+
optionValue = optionValue.apply(void 0, params);
|
|
5471
|
+
}
|
|
5472
|
+
|
|
5473
|
+
if (!optionValue) {
|
|
5474
|
+
if (optionValue === undefined || optionValue === false) {
|
|
5475
|
+
return optionValue;
|
|
5476
|
+
} // else, empty string (invalid), null (invalid), 0 (invalid)
|
|
5477
|
+
|
|
5478
|
+
|
|
5479
|
+
throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
|
|
5480
|
+
}
|
|
5481
|
+
|
|
5482
|
+
var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
|
|
5483
|
+
|
|
5484
|
+
if (typeof optionValue === 'string') {
|
|
5485
|
+
node = doc.querySelector(optionValue); // resolve to node, or null if fails
|
|
5486
|
+
|
|
5487
|
+
if (!node) {
|
|
5488
|
+
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
|
5489
|
+
}
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
return node;
|
|
5493
|
+
};
|
|
5494
|
+
|
|
5495
|
+
var getInitialFocusNode = function getInitialFocusNode() {
|
|
5496
|
+
var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
|
|
5497
|
+
|
|
5498
|
+
if (node === false) {
|
|
5499
|
+
return false;
|
|
5500
|
+
}
|
|
5501
|
+
|
|
5502
|
+
if (node === undefined) {
|
|
5503
|
+
// option not specified: use fallback options
|
|
5504
|
+
if (containersContain(doc.activeElement)) {
|
|
5505
|
+
node = doc.activeElement;
|
|
5506
|
+
} else {
|
|
5507
|
+
var firstTabbableGroup = state.tabbableGroups[0];
|
|
5508
|
+
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
|
|
5509
|
+
|
|
5510
|
+
node = firstTabbableNode || getNodeForOption('fallbackFocus');
|
|
5511
|
+
}
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5514
|
+
if (!node) {
|
|
5515
|
+
throw new Error('Your focus-trap needs to have at least one focusable element');
|
|
5516
|
+
}
|
|
5517
|
+
|
|
5518
|
+
return node;
|
|
5519
|
+
};
|
|
5520
|
+
|
|
5521
|
+
var updateTabbableNodes = function updateTabbableNodes() {
|
|
5522
|
+
state.tabbableGroups = state.containers.map(function (container) {
|
|
5523
|
+
var tabbableNodes = tabbable(container); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
5524
|
+
// are a superset of tabbable nodes
|
|
5525
|
+
|
|
5526
|
+
var focusableNodes = focusable(container);
|
|
5527
|
+
|
|
5528
|
+
if (tabbableNodes.length > 0) {
|
|
5529
|
+
return {
|
|
5530
|
+
container: container,
|
|
5531
|
+
firstTabbableNode: tabbableNodes[0],
|
|
5532
|
+
lastTabbableNode: tabbableNodes[tabbableNodes.length - 1],
|
|
5533
|
+
|
|
5534
|
+
/**
|
|
5535
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
5536
|
+
* in this container, if any.
|
|
5537
|
+
* @param {HTMLElement} node
|
|
5538
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
5539
|
+
* in reverse.
|
|
5540
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
5541
|
+
*/
|
|
5542
|
+
nextTabbableNode: function nextTabbableNode(node) {
|
|
5543
|
+
var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
5544
|
+
// NOTE: If tabindex is positive (in order to manipulate the tab order separate
|
|
5545
|
+
// from the DOM order), this __will not work__ because the list of focusableNodes,
|
|
5546
|
+
// while it contains tabbable nodes, does not sort its nodes in any order other
|
|
5547
|
+
// than DOM order, because it can't: Where would you place focusable (but not
|
|
5548
|
+
// tabbable) nodes in that order? They have no order, because they aren't tabbale...
|
|
5549
|
+
// Support for positive tabindex is already broken and hard to manage (possibly
|
|
5550
|
+
// not supportable, TBD), so this isn't going to make things worse than they
|
|
5551
|
+
// already are, and at least makes things better for the majority of cases where
|
|
5552
|
+
// tabindex is either 0/unset or negative.
|
|
5553
|
+
// FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
|
|
5554
|
+
var nodeIdx = focusableNodes.findIndex(function (n) {
|
|
5555
|
+
return n === node;
|
|
5556
|
+
});
|
|
5557
|
+
|
|
5558
|
+
if (forward) {
|
|
5559
|
+
return focusableNodes.slice(nodeIdx + 1).find(function (n) {
|
|
5560
|
+
return isTabbable(n);
|
|
5561
|
+
});
|
|
5562
|
+
}
|
|
5563
|
+
|
|
5564
|
+
return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
|
|
5565
|
+
return isTabbable(n);
|
|
5566
|
+
});
|
|
5567
|
+
}
|
|
5568
|
+
};
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
return undefined;
|
|
5572
|
+
}).filter(function (group) {
|
|
5573
|
+
return !!group;
|
|
5574
|
+
}); // remove groups with no tabbable nodes
|
|
5575
|
+
// throw if no groups have tabbable nodes and we don't have a fallback focus node either
|
|
5576
|
+
|
|
5577
|
+
if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
|
|
5578
|
+
) {
|
|
5579
|
+
throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
|
|
5580
|
+
}
|
|
5581
|
+
};
|
|
5582
|
+
|
|
5583
|
+
var tryFocus = function tryFocus(node) {
|
|
5584
|
+
if (node === false) {
|
|
5585
|
+
return;
|
|
5586
|
+
}
|
|
5587
|
+
|
|
5588
|
+
if (node === doc.activeElement) {
|
|
5589
|
+
return;
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
if (!node || !node.focus) {
|
|
5593
|
+
tryFocus(getInitialFocusNode());
|
|
5594
|
+
return;
|
|
5595
|
+
}
|
|
5596
|
+
|
|
5597
|
+
node.focus({
|
|
5598
|
+
preventScroll: !!config.preventScroll
|
|
5599
|
+
});
|
|
5600
|
+
state.mostRecentlyFocusedNode = node;
|
|
5601
|
+
|
|
5602
|
+
if (isSelectableInput(node)) {
|
|
5603
|
+
node.select();
|
|
5604
|
+
}
|
|
5605
|
+
};
|
|
5606
|
+
|
|
5607
|
+
var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
|
|
5608
|
+
var node = getNodeForOption('setReturnFocus', previousActiveElement);
|
|
5609
|
+
return node ? node : node === false ? false : previousActiveElement;
|
|
5610
|
+
}; // This needs to be done on mousedown and touchstart instead of click
|
|
5611
|
+
// so that it precedes the focus event.
|
|
5612
|
+
|
|
5613
|
+
|
|
5614
|
+
var checkPointerDown = function checkPointerDown(e) {
|
|
5615
|
+
var target = getActualTarget(e);
|
|
5616
|
+
|
|
5617
|
+
if (containersContain(target)) {
|
|
5618
|
+
// allow the click since it ocurred inside the trap
|
|
5619
|
+
return;
|
|
5620
|
+
}
|
|
5621
|
+
|
|
5622
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
5623
|
+
// immediately deactivate the trap
|
|
5624
|
+
trap.deactivate({
|
|
5625
|
+
// if, on deactivation, we should return focus to the node originally-focused
|
|
5626
|
+
// when the trap was activated (or the configured `setReturnFocus` node),
|
|
5627
|
+
// then assume it's also OK to return focus to the outside node that was
|
|
5628
|
+
// just clicked, causing deactivation, as long as that node is focusable;
|
|
5629
|
+
// if it isn't focusable, then return focus to the original node focused
|
|
5630
|
+
// on activation (or the configured `setReturnFocus` node)
|
|
5631
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
5632
|
+
// which will result in the outside click setting focus to the node
|
|
5633
|
+
// that was clicked, whether it's focusable or not; by setting
|
|
5634
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
5635
|
+
// on activation (or the configured `setReturnFocus` node)
|
|
5636
|
+
returnFocus: config.returnFocusOnDeactivate && !isFocusable(target)
|
|
5637
|
+
});
|
|
5638
|
+
return;
|
|
5639
|
+
} // This is needed for mobile devices.
|
|
5640
|
+
// (If we'll only let `click` events through,
|
|
5641
|
+
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
5642
|
+
|
|
5643
|
+
|
|
5644
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
5645
|
+
// allow the click outside the trap to take place
|
|
5646
|
+
return;
|
|
5647
|
+
} // otherwise, prevent the click
|
|
5648
|
+
|
|
5649
|
+
|
|
5650
|
+
e.preventDefault();
|
|
5651
|
+
}; // In case focus escapes the trap for some strange reason, pull it back in.
|
|
5652
|
+
|
|
5653
|
+
|
|
5654
|
+
var checkFocusIn = function checkFocusIn(e) {
|
|
5655
|
+
var target = getActualTarget(e);
|
|
5656
|
+
var targetContained = containersContain(target); // In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
5657
|
+
|
|
5658
|
+
if (targetContained || target instanceof Document) {
|
|
5659
|
+
if (targetContained) {
|
|
5660
|
+
state.mostRecentlyFocusedNode = target;
|
|
5661
|
+
}
|
|
5662
|
+
} else {
|
|
5663
|
+
// escaped! pull it back in to where it just left
|
|
5664
|
+
e.stopImmediatePropagation();
|
|
5665
|
+
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
5666
|
+
}
|
|
5667
|
+
}; // Hijack Tab events on the first and last focusable nodes of the trap,
|
|
5668
|
+
// in order to prevent focus from escaping. If it escapes for even a
|
|
5669
|
+
// moment it can end up scrolling the page and causing confusion so we
|
|
5670
|
+
// kind of need to capture the action at the keydown phase.
|
|
5671
|
+
|
|
5672
|
+
|
|
5673
|
+
var checkTab = function checkTab(e) {
|
|
5674
|
+
var target = getActualTarget(e);
|
|
5675
|
+
updateTabbableNodes();
|
|
5676
|
+
var destinationNode = null;
|
|
5677
|
+
|
|
5678
|
+
if (state.tabbableGroups.length > 0) {
|
|
5679
|
+
// make sure the target is actually contained in a group
|
|
5680
|
+
// NOTE: the target may also be the container itself if it's focusable
|
|
5681
|
+
// with tabIndex='-1' and was given initial focus
|
|
5682
|
+
var containerIndex = findIndex(state.tabbableGroups, function (_ref) {
|
|
5683
|
+
var container = _ref.container;
|
|
5684
|
+
return container.contains(target);
|
|
5685
|
+
});
|
|
5686
|
+
var containerGroup = containerIndex >= 0 ? state.tabbableGroups[containerIndex] : undefined;
|
|
5687
|
+
|
|
5688
|
+
if (containerIndex < 0) {
|
|
5689
|
+
// target not found in any group: quite possible focus has escaped the trap,
|
|
5690
|
+
// so bring it back in to...
|
|
5691
|
+
if (e.shiftKey) {
|
|
5692
|
+
// ...the last node in the last group
|
|
5693
|
+
destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
|
|
5694
|
+
} else {
|
|
5695
|
+
// ...the first node in the first group
|
|
5696
|
+
destinationNode = state.tabbableGroups[0].firstTabbableNode;
|
|
5697
|
+
}
|
|
5698
|
+
} else if (e.shiftKey) {
|
|
5699
|
+
// REVERSE
|
|
5700
|
+
// is the target the first tabbable node in a group?
|
|
5701
|
+
var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
|
|
5702
|
+
var firstTabbableNode = _ref2.firstTabbableNode;
|
|
5703
|
+
return target === firstTabbableNode;
|
|
5704
|
+
});
|
|
5705
|
+
|
|
5706
|
+
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup.nextTabbableNode(target, false))) {
|
|
5707
|
+
// an exception case where the target is either the container itself, or
|
|
5708
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
5709
|
+
// and user clicked on it or node was programmatically given focus)
|
|
5710
|
+
// and is not followed by any other tabbable node, in which
|
|
5711
|
+
// case, we should handle shift+tab as if focus were on the container's
|
|
5712
|
+
// first tabbable node, and go to the last tabbable node of the LAST group
|
|
5713
|
+
startOfGroupIndex = containerIndex;
|
|
5714
|
+
}
|
|
5715
|
+
|
|
5716
|
+
if (startOfGroupIndex >= 0) {
|
|
5717
|
+
// YES: then shift+tab should go to the last tabbable node in the
|
|
5718
|
+
// previous group (and wrap around to the last tabbable node of
|
|
5719
|
+
// the LAST group if it's the first tabbable node of the FIRST group)
|
|
5720
|
+
var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
|
|
5721
|
+
var destinationGroup = state.tabbableGroups[destinationGroupIndex];
|
|
5722
|
+
destinationNode = destinationGroup.lastTabbableNode;
|
|
5723
|
+
}
|
|
5724
|
+
} else {
|
|
5725
|
+
// FORWARD
|
|
5726
|
+
// is the target the last tabbable node in a group?
|
|
5727
|
+
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
|
|
5728
|
+
var lastTabbableNode = _ref3.lastTabbableNode;
|
|
5729
|
+
return target === lastTabbableNode;
|
|
5730
|
+
});
|
|
5731
|
+
|
|
5732
|
+
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup.nextTabbableNode(target))) {
|
|
5733
|
+
// an exception case where the target is the container itself, or
|
|
5734
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
5735
|
+
// and user clicked on it or node was programmatically given focus)
|
|
5736
|
+
// and is not followed by any other tabbable node, in which
|
|
5737
|
+
// case, we should handle tab as if focus were on the container's
|
|
5738
|
+
// last tabbable node, and go to the first tabbable node of the FIRST group
|
|
5739
|
+
lastOfGroupIndex = containerIndex;
|
|
5740
|
+
}
|
|
5741
|
+
|
|
5742
|
+
if (lastOfGroupIndex >= 0) {
|
|
5743
|
+
// YES: then tab should go to the first tabbable node in the next
|
|
5744
|
+
// group (and wrap around to the first tabbable node of the FIRST
|
|
5745
|
+
// group if it's the last tabbable node of the LAST group)
|
|
5746
|
+
var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
|
|
5747
|
+
|
|
5748
|
+
var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
|
|
5749
|
+
destinationNode = _destinationGroup.firstTabbableNode;
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
} else {
|
|
5753
|
+
// NOTE: the fallbackFocus option does not support returning false to opt-out
|
|
5754
|
+
destinationNode = getNodeForOption('fallbackFocus');
|
|
5755
|
+
}
|
|
5756
|
+
|
|
5757
|
+
if (destinationNode) {
|
|
5758
|
+
e.preventDefault();
|
|
5759
|
+
tryFocus(destinationNode);
|
|
5760
|
+
} // else, let the browser take care of [shift+]tab and move the focus
|
|
5761
|
+
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
var checkKey = function checkKey(e) {
|
|
5765
|
+
if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {
|
|
5766
|
+
e.preventDefault();
|
|
5767
|
+
trap.deactivate();
|
|
5768
|
+
return;
|
|
5769
|
+
}
|
|
5770
|
+
|
|
5771
|
+
if (isTabEvent(e)) {
|
|
5772
|
+
checkTab(e);
|
|
5773
|
+
return;
|
|
5774
|
+
}
|
|
5775
|
+
};
|
|
5776
|
+
|
|
5777
|
+
var checkClick = function checkClick(e) {
|
|
5778
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
5779
|
+
return;
|
|
5780
|
+
}
|
|
5781
|
+
|
|
5782
|
+
var target = getActualTarget(e);
|
|
5783
|
+
|
|
5784
|
+
if (containersContain(target)) {
|
|
5785
|
+
return;
|
|
5786
|
+
}
|
|
5787
|
+
|
|
5788
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
5789
|
+
return;
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5792
|
+
e.preventDefault();
|
|
5793
|
+
e.stopImmediatePropagation();
|
|
5794
|
+
}; //
|
|
5795
|
+
// EVENT LISTENERS
|
|
5796
|
+
//
|
|
5797
|
+
|
|
5798
|
+
|
|
5799
|
+
var addListeners = function addListeners() {
|
|
5800
|
+
if (!state.active) {
|
|
5801
|
+
return;
|
|
5802
|
+
} // There can be only one listening focus trap at a time
|
|
5803
|
+
|
|
5804
|
+
|
|
5805
|
+
activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
|
|
5806
|
+
// that caused the focus trap activation.
|
|
5807
|
+
|
|
5808
|
+
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
|
|
5809
|
+
tryFocus(getInitialFocusNode());
|
|
5810
|
+
}) : tryFocus(getInitialFocusNode());
|
|
5811
|
+
doc.addEventListener('focusin', checkFocusIn, true);
|
|
5812
|
+
doc.addEventListener('mousedown', checkPointerDown, {
|
|
5813
|
+
capture: true,
|
|
5814
|
+
passive: false
|
|
5815
|
+
});
|
|
5816
|
+
doc.addEventListener('touchstart', checkPointerDown, {
|
|
5817
|
+
capture: true,
|
|
5818
|
+
passive: false
|
|
5819
|
+
});
|
|
5820
|
+
doc.addEventListener('click', checkClick, {
|
|
5821
|
+
capture: true,
|
|
5822
|
+
passive: false
|
|
5823
|
+
});
|
|
5824
|
+
doc.addEventListener('keydown', checkKey, {
|
|
5825
|
+
capture: true,
|
|
5826
|
+
passive: false
|
|
5827
|
+
});
|
|
5828
|
+
return trap;
|
|
5829
|
+
};
|
|
5830
|
+
|
|
5831
|
+
var removeListeners = function removeListeners() {
|
|
5832
|
+
if (!state.active) {
|
|
5833
|
+
return;
|
|
5834
|
+
}
|
|
5835
|
+
|
|
5836
|
+
doc.removeEventListener('focusin', checkFocusIn, true);
|
|
5837
|
+
doc.removeEventListener('mousedown', checkPointerDown, true);
|
|
5838
|
+
doc.removeEventListener('touchstart', checkPointerDown, true);
|
|
5839
|
+
doc.removeEventListener('click', checkClick, true);
|
|
5840
|
+
doc.removeEventListener('keydown', checkKey, true);
|
|
5841
|
+
return trap;
|
|
5842
|
+
}; //
|
|
5843
|
+
// TRAP DEFINITION
|
|
5844
|
+
//
|
|
5845
|
+
|
|
5846
|
+
|
|
5847
|
+
trap = {
|
|
5848
|
+
activate: function activate(activateOptions) {
|
|
5849
|
+
if (state.active) {
|
|
5850
|
+
return this;
|
|
5851
|
+
}
|
|
5852
|
+
|
|
5853
|
+
var onActivate = getOption(activateOptions, 'onActivate');
|
|
5854
|
+
var onPostActivate = getOption(activateOptions, 'onPostActivate');
|
|
5855
|
+
var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
|
|
5856
|
+
|
|
5857
|
+
if (!checkCanFocusTrap) {
|
|
5858
|
+
updateTabbableNodes();
|
|
5859
|
+
}
|
|
5860
|
+
|
|
5861
|
+
state.active = true;
|
|
5862
|
+
state.paused = false;
|
|
5863
|
+
state.nodeFocusedBeforeActivation = doc.activeElement;
|
|
5864
|
+
|
|
5865
|
+
if (onActivate) {
|
|
5866
|
+
onActivate();
|
|
5867
|
+
}
|
|
5868
|
+
|
|
5869
|
+
var finishActivation = function finishActivation() {
|
|
5870
|
+
if (checkCanFocusTrap) {
|
|
5871
|
+
updateTabbableNodes();
|
|
5872
|
+
}
|
|
5873
|
+
|
|
5874
|
+
addListeners();
|
|
5875
|
+
|
|
5876
|
+
if (onPostActivate) {
|
|
5877
|
+
onPostActivate();
|
|
5878
|
+
}
|
|
5879
|
+
};
|
|
5880
|
+
|
|
5881
|
+
if (checkCanFocusTrap) {
|
|
5882
|
+
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
5883
|
+
return this;
|
|
5884
|
+
}
|
|
5885
|
+
|
|
5886
|
+
finishActivation();
|
|
5887
|
+
return this;
|
|
5888
|
+
},
|
|
5889
|
+
deactivate: function deactivate(deactivateOptions) {
|
|
5890
|
+
if (!state.active) {
|
|
5891
|
+
return this;
|
|
5892
|
+
}
|
|
5893
|
+
|
|
5894
|
+
clearTimeout(state.delayInitialFocusTimer); // noop if undefined
|
|
5895
|
+
|
|
5896
|
+
state.delayInitialFocusTimer = undefined;
|
|
5897
|
+
removeListeners();
|
|
5898
|
+
state.active = false;
|
|
5899
|
+
state.paused = false;
|
|
5900
|
+
activeFocusTraps.deactivateTrap(trap);
|
|
5901
|
+
var onDeactivate = getOption(deactivateOptions, 'onDeactivate');
|
|
5902
|
+
var onPostDeactivate = getOption(deactivateOptions, 'onPostDeactivate');
|
|
5903
|
+
var checkCanReturnFocus = getOption(deactivateOptions, 'checkCanReturnFocus');
|
|
5904
|
+
|
|
5905
|
+
if (onDeactivate) {
|
|
5906
|
+
onDeactivate();
|
|
5907
|
+
}
|
|
5908
|
+
|
|
5909
|
+
var returnFocus = getOption(deactivateOptions, 'returnFocus', 'returnFocusOnDeactivate');
|
|
5910
|
+
|
|
5911
|
+
var finishDeactivation = function finishDeactivation() {
|
|
5912
|
+
delay(function () {
|
|
5913
|
+
if (returnFocus) {
|
|
5914
|
+
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
5915
|
+
}
|
|
5916
|
+
|
|
5917
|
+
if (onPostDeactivate) {
|
|
5918
|
+
onPostDeactivate();
|
|
5919
|
+
}
|
|
5920
|
+
});
|
|
5921
|
+
};
|
|
5922
|
+
|
|
5923
|
+
if (returnFocus && checkCanReturnFocus) {
|
|
5924
|
+
checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
|
|
5925
|
+
return this;
|
|
5926
|
+
}
|
|
5927
|
+
|
|
5928
|
+
finishDeactivation();
|
|
5929
|
+
return this;
|
|
5930
|
+
},
|
|
5931
|
+
pause: function pause() {
|
|
5932
|
+
if (state.paused || !state.active) {
|
|
5933
|
+
return this;
|
|
5934
|
+
}
|
|
5935
|
+
|
|
5936
|
+
state.paused = true;
|
|
5937
|
+
removeListeners();
|
|
5938
|
+
return this;
|
|
5939
|
+
},
|
|
5940
|
+
unpause: function unpause() {
|
|
5941
|
+
if (!state.paused || !state.active) {
|
|
5942
|
+
return this;
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5945
|
+
state.paused = false;
|
|
5946
|
+
updateTabbableNodes();
|
|
5947
|
+
addListeners();
|
|
5948
|
+
return this;
|
|
5949
|
+
},
|
|
5950
|
+
updateContainerElements: function updateContainerElements(containerElements) {
|
|
5951
|
+
var elementsAsArray = [].concat(containerElements).filter(Boolean);
|
|
5952
|
+
state.containers = elementsAsArray.map(function (element) {
|
|
5953
|
+
return typeof element === 'string' ? doc.querySelector(element) : element;
|
|
5954
|
+
});
|
|
5955
|
+
|
|
5956
|
+
if (state.active) {
|
|
5957
|
+
updateTabbableNodes();
|
|
5958
|
+
}
|
|
5959
|
+
|
|
5960
|
+
return this;
|
|
5961
|
+
}
|
|
5962
|
+
}; // initialize container elements
|
|
5963
|
+
|
|
5964
|
+
trap.updateContainerElements(elements);
|
|
5965
|
+
return trap;
|
|
5966
|
+
};
|
|
5967
|
+
|
|
5968
|
+
const viewerGridCss = "*,*::after,*::before{box-sizing:border-box}:host{display:flex;height:100vh;overflow:hidden;position:relative}:host([small]) .dso-map-panel{flex-basis:375px;min-width:0;max-width:375px}@media screen and (max-width: 375px){:host([small]) .dso-map-panel{flex-basis:100vw;max-width:100vw;min-width:0;transition:none}}:host([medium]) .dso-map-panel{flex-basis:624px;min-width:375px;max-width:624px}@media screen and (max-width: 624px){:host([medium]) .dso-map-panel{flex-basis:100vw;max-width:100vw;min-width:375px;transition:none}}:host([large]) .dso-map-panel{flex-basis:60%;min-width:768px;max-width:1024px}@media screen and (max-width: 768px){:host([large]) .dso-map-panel{flex-basis:100vw;max-width:100vw;min-width:768px;transition:none}}.shrink,.expand,.overlay-close-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;border:0;color:#39870c;line-height:1;padding:0;background-color:transparent}.shrink:focus,.shrink:focus-visible,.expand:focus,.expand:focus-visible,.overlay-close-button:focus,.overlay-close-button:focus-visible{outline-offset:2px}.shrink:active,.expand:active,.overlay-close-button:active{outline:0}.shrink.extern::after,.shrink.download::after,.expand.extern::after,.expand.download::after,.overlay-close-button.extern::after,.overlay-close-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.shrink[disabled],.expand[disabled],.overlay-close-button[disabled]{color:#afcf9d}.shrink:not([disabled]):hover,.expand:not([disabled]):hover,.overlay-close-button:not([disabled]):hover{color:#676cb0;text-decoration:underline}.shrink:not([disabled]):active,.expand:not([disabled]):active,.overlay-close-button:not([disabled]):active{color:#676cb0}.shrink.btn-align,.expand.btn-align,.overlay-close-button.btn-align{line-height:calc(1.5em - 1px);padding:11px 0;position:relative}.shrink.extern::after,.shrink.download::after,.expand.extern::after,.expand.download::after,.overlay-close-button.extern::after,.overlay-close-button.download::after{position:relative;top:-2px}.shrink.download::after,.expand.download::after,.overlay-close-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.shrink.download[disabled]::after,.expand.download[disabled]::after,.overlay-close-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.shrink.download:not([disabled]):hover::after,.shrink.download:not([disabled]):active::after,.expand.download:not([disabled]):hover::after,.expand.download:not([disabled]):active::after,.overlay-close-button.download:not([disabled]):hover::after,.overlay-close-button.download:not([disabled]):active::after{--dso-icon:var(--di-download-scampi)}.shrink.extern::after,.expand.extern::after,.overlay-close-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.shrink.extern[disabled]::after,.expand.extern[disabled]::after,.overlay-close-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.shrink.extern:not([disabled]):hover::after,.shrink.extern:not([disabled]):active::after,.expand.extern:not([disabled]):hover::after,.expand.extern:not([disabled]):active::after,.overlay-close-button.extern:not([disabled]):hover::after,.overlay-close-button.extern:not([disabled]):active::after{--dso-icon:var(--di-external-link-scampi)}.shrink dso-icon+span:not(.sr-only),.shrink svg.di+span:not(.sr-only),.shrink span:not(.sr-only)+dso-icon,.shrink span:not(.sr-only)+svg.di,.expand dso-icon+span:not(.sr-only),.expand svg.di+span:not(.sr-only),.expand span:not(.sr-only)+dso-icon,.expand span:not(.sr-only)+svg.di,.overlay-close-button dso-icon+span:not(.sr-only),.overlay-close-button svg.di+span:not(.sr-only),.overlay-close-button span:not(.sr-only)+dso-icon,.overlay-close-button span:not(.sr-only)+svg.di{margin-left:8px}.shrink dso-icon,.shrink svg.di,.shrink span,.expand dso-icon,.expand svg.di,.expand span,.overlay-close-button dso-icon,.overlay-close-button svg.di,.overlay-close-button span{vertical-align:middle}.shrink:hover,.expand:hover,.overlay-close-button:hover{cursor:pointer}.shrink[disabled],.expand[disabled],.overlay-close-button[disabled]{display:none}.overlay-close-button{position:absolute;top:8px;right:16px}.overlay-close-button .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dso-map-panel{background-color:#fff;box-shadow:2px 0 8px 0 rgba(0, 0, 0, 0.4);flex-shrink:0;flex-grow:0;padding-right:8px;position:relative;transition:flex-basis 0.2s ease-in, max-width 0.2s ease-in, min-width 0.2s ease-in;z-index:1}.dso-map-panel .dso-filterblok-address{font-weight:bold;margin:8px 0}.dso-map-panel .main{height:100%;overflow-y:scroll;padding:8px 16px}.sizing-buttons{left:calc(100% + 1px);overflow-x:hidden;padding:0 4px 4px 0;position:absolute;top:16px;transition:left 0.2s ease-in;width:44px;z-index:-1}.sizing-buttons button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;padding:8px;border-radius:0;border-bottom-right-radius:4px;border-top-right-radius:4px;box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.4);flex:0 0 100%;height:40px;min-width:auto;width:40px}.sizing-buttons button:focus,.sizing-buttons button:focus-visible{outline-offset:2px}.sizing-buttons button:active{outline:0}.sizing-buttons button.extern::after,.sizing-buttons button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.sizing-buttons button:hover{background-color:#39870c;border-color:#39870c;color:#fff}.sizing-buttons button:active{background-color:#275937;border-color:#275937;color:#fff}.sizing-buttons button[disabled],.sizing-buttons button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.sizing-buttons button.btn-sm{line-height:16px}.sizing-buttons button.btn-sm dso-icon,.sizing-buttons button.btn-sm svg.di,.sizing-buttons button.btn-sm.extern::after,.sizing-buttons button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.sizing-buttons button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.sizing-buttons button.download:hover::after{--dso-icon:var(--di-download-wit)}.sizing-buttons button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.sizing-buttons button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.sizing-buttons button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.sizing-buttons button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.sizing-buttons button>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sizing-buttons button:focus-visible{background-color:#39870c;border-color:#39870c;color:#fff;outline:none}.sizing-buttons button:hover dso-icon{color:#fff}.map{height:100%;width:100%;overflow:hidden}.overlay{background-color:#fff;box-shadow:-2px 0 5px #666;height:100%;overflow-y:auto;padding:40px 16px 8px;position:absolute;right:0;width:624px;z-index:2}";
|
|
5969
|
+
|
|
5970
|
+
let ViewerGrid = class extends HTMLElement {
|
|
5971
|
+
constructor() {
|
|
5972
|
+
super();
|
|
5973
|
+
this.__registerHost();
|
|
5974
|
+
attachShadow(this);
|
|
5975
|
+
this.closeOverlay = createEvent(this, "closeOverlay", 7);
|
|
5976
|
+
this.overlayOpen = false;
|
|
5977
|
+
this.mainSize = "large";
|
|
5978
|
+
this.shrinkMain = () => {
|
|
5979
|
+
this.mainSize = this.mainSize == "large" ? "medium" : "small";
|
|
5980
|
+
};
|
|
5981
|
+
this.expandMain = () => {
|
|
5982
|
+
this.mainSize = this.mainSize == "small" ? "medium" : "large";
|
|
5983
|
+
};
|
|
5984
|
+
this.keyDownListener = (event) => {
|
|
5985
|
+
if (event.key != "Escape") {
|
|
5986
|
+
return;
|
|
5987
|
+
}
|
|
5988
|
+
this.closeOverlay.emit(event);
|
|
5989
|
+
};
|
|
5990
|
+
}
|
|
5991
|
+
updateFocusTrap() {
|
|
5992
|
+
if (!this.trap) {
|
|
5993
|
+
return;
|
|
5994
|
+
}
|
|
5995
|
+
if (this.overlayOpen) {
|
|
5996
|
+
this.trap.activate();
|
|
5997
|
+
this.host.addEventListener("keydown", this.keyDownListener);
|
|
5998
|
+
}
|
|
5999
|
+
else {
|
|
6000
|
+
this.trap.deactivate();
|
|
6001
|
+
this.host.removeEventListener("keydown", this.keyDownListener);
|
|
6002
|
+
}
|
|
6003
|
+
}
|
|
6004
|
+
connectedCallback() {
|
|
6005
|
+
this.overlaySlot = this.host.querySelector("div[slot = 'overlay']");
|
|
6006
|
+
}
|
|
6007
|
+
componentDidLoad() {
|
|
6008
|
+
if (!this.overlay || !this.overlaySlot) {
|
|
6009
|
+
return;
|
|
6010
|
+
}
|
|
6011
|
+
this.trap = createFocusTrap([this.overlay, this.overlaySlot], {
|
|
6012
|
+
escapeDeactivates: false,
|
|
6013
|
+
allowOutsideClick: true,
|
|
6014
|
+
});
|
|
6015
|
+
this.updateFocusTrap();
|
|
6016
|
+
}
|
|
6017
|
+
componentDidUpdate() {
|
|
6018
|
+
this.updateFocusTrap();
|
|
6019
|
+
}
|
|
6020
|
+
disconnectedCallback() {
|
|
6021
|
+
if (this.trap) {
|
|
6022
|
+
this.trap.deactivate();
|
|
6023
|
+
}
|
|
6024
|
+
this.host.removeEventListener("keydown", this.keyDownListener);
|
|
6025
|
+
}
|
|
6026
|
+
render() {
|
|
6027
|
+
return (h(Host, Object.assign({}, { [this.mainSize]: true }), h("div", { class: "dso-map-panel" }, h("div", { class: "sizing-buttons" }, h("button", { type: "button", class: "shrink", disabled: this.mainSize == "small", onClick: this.shrinkMain }, h("dso-icon", { icon: "chevron-left" })), h("button", { type: "button", class: "expand", disabled: this.mainSize == "large", onClick: this.expandMain }, h("dso-icon", { icon: "chevron-right" }))), h("div", { class: "main" }, h("slot", { name: "main" }))), h("div", { class: "map" }, h("slot", { name: "map" })), h("div", { class: "overlay", hidden: !this.overlayOpen || !this.overlaySlot, ref: (element) => (this.overlay = element) }, h("button", { type: "button", class: "overlay-close-button", onClick: (e) => this.closeOverlay.emit(e) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "sluiten")), h("slot", { name: "overlay" }))));
|
|
6028
|
+
}
|
|
6029
|
+
get host() { return this; }
|
|
6030
|
+
static get style() { return viewerGridCss; }
|
|
6031
|
+
};
|
|
6032
|
+
|
|
5007
6033
|
const DsoAlert = /*@__PURE__*/proxyCustomElement(Alert, [1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]);
|
|
5008
6034
|
const DsoAttachmentsCounter = /*@__PURE__*/proxyCustomElement(AttachmentsCounter, [1,"dso-attachments-counter",{"count":[2]}]);
|
|
5009
6035
|
const DsoAutosuggest = /*@__PURE__*/proxyCustomElement(Autosuggest, [6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]);
|
|
5010
6036
|
const DsoBadge = /*@__PURE__*/proxyCustomElement(Badge, [1,"dso-badge",{"status":[1]}]);
|
|
5011
6037
|
const DsoBanner = /*@__PURE__*/proxyCustomElement(Banner, [1,"dso-banner",{"status":[1]}]);
|
|
5012
|
-
const DsoDatePicker = /*@__PURE__*/proxyCustomElement(DsoDatePicker$1, [
|
|
6038
|
+
const DsoDatePicker = /*@__PURE__*/proxyCustomElement(DsoDatePicker$1, [2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32]},[[6,"click","handleDocumentClick"]]]);
|
|
5013
6039
|
const DsoDropdownMenu = /*@__PURE__*/proxyCustomElement(DropdownMenu, [1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]);
|
|
6040
|
+
const DsoHeader = /*@__PURE__*/proxyCustomElement(Header, [1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]);
|
|
5014
6041
|
const DsoHelpcenterPanel = /*@__PURE__*/proxyCustomElement(HelpcenterPanel, [1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]);
|
|
5015
6042
|
const DsoHighlightBox = /*@__PURE__*/proxyCustomElement(HighlightBox, [1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]);
|
|
5016
6043
|
const DsoIcon = /*@__PURE__*/proxyCustomElement(Icon, [1,"dso-icon",{"icon":[1]}]);
|
|
5017
6044
|
const DsoInfo = /*@__PURE__*/proxyCustomElement(Info, [1,"dso-info",{"fixed":[516],"active":[516]}]);
|
|
5018
6045
|
const DsoInfoButton = /*@__PURE__*/proxyCustomElement(InfoButton, [1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]);
|
|
5019
6046
|
const DsoLabel = /*@__PURE__*/proxyCustomElement(Label, [1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]);
|
|
5020
|
-
const DsoMapBaseLayers = /*@__PURE__*/proxyCustomElement(MapBaseLayers, [1,"dso-map-base-layers",{"baseLayers":[16]
|
|
6047
|
+
const DsoMapBaseLayers = /*@__PURE__*/proxyCustomElement(MapBaseLayers, [1,"dso-map-base-layers",{"baseLayers":[16]}]);
|
|
5021
6048
|
const DsoMapControls = /*@__PURE__*/proxyCustomElement(MapControls, [1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]);
|
|
5022
|
-
const DsoMapOverlays = /*@__PURE__*/proxyCustomElement(MapOverlays, [1,"dso-map-overlays",{"overlays":[16]
|
|
6049
|
+
const DsoMapOverlays = /*@__PURE__*/proxyCustomElement(MapOverlays, [1,"dso-map-overlays",{"overlays":[16]}]);
|
|
5023
6050
|
const DsoOzonContent = /*@__PURE__*/proxyCustomElement(OzonContent, [0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]);
|
|
5024
6051
|
const DsoProgressBar = /*@__PURE__*/proxyCustomElement(ProgressBar, [1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]);
|
|
5025
6052
|
const DsoProgressIndicator = /*@__PURE__*/proxyCustomElement(Progressindicator, [1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]);
|
|
@@ -5027,6 +6054,7 @@ const DsoSelectable = /*@__PURE__*/proxyCustomElement(Selectable, [1,"dso-select
|
|
|
5027
6054
|
const DsoToggletip = /*@__PURE__*/proxyCustomElement(Toggletip, [1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]);
|
|
5028
6055
|
const DsoTooltip = /*@__PURE__*/proxyCustomElement(Tooltip, [1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32]},[[0,"click","listenClick"]]]);
|
|
5029
6056
|
const DsoTreeView = /*@__PURE__*/proxyCustomElement(TreeView, [1,"dso-tree-view",{"collection":[16]}]);
|
|
6057
|
+
const DsoViewerGrid = /*@__PURE__*/proxyCustomElement(ViewerGrid, [1,"dso-viewer-grid",{"overlayOpen":[4,"overlay-open"],"mainSize":[32]}]);
|
|
5030
6058
|
const defineCustomElements = (opts) => {
|
|
5031
6059
|
if (typeof customElements !== 'undefined') {
|
|
5032
6060
|
[
|
|
@@ -5037,6 +6065,7 @@ const defineCustomElements = (opts) => {
|
|
|
5037
6065
|
DsoBanner,
|
|
5038
6066
|
DsoDatePicker,
|
|
5039
6067
|
DsoDropdownMenu,
|
|
6068
|
+
DsoHeader,
|
|
5040
6069
|
DsoHelpcenterPanel,
|
|
5041
6070
|
DsoHighlightBox,
|
|
5042
6071
|
DsoIcon,
|
|
@@ -5052,7 +6081,8 @@ const defineCustomElements = (opts) => {
|
|
|
5052
6081
|
DsoSelectable,
|
|
5053
6082
|
DsoToggletip,
|
|
5054
6083
|
DsoTooltip,
|
|
5055
|
-
DsoTreeView
|
|
6084
|
+
DsoTreeView,
|
|
6085
|
+
DsoViewerGrid
|
|
5056
6086
|
].forEach(cmp => {
|
|
5057
6087
|
if (!customElements.get(cmp.is)) {
|
|
5058
6088
|
customElements.define(cmp.is, cmp, opts);
|
|
@@ -5061,4 +6091,4 @@ const defineCustomElements = (opts) => {
|
|
|
5061
6091
|
}
|
|
5062
6092
|
};
|
|
5063
6093
|
|
|
5064
|
-
export { DsoAlert, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoDatePicker, DsoDropdownMenu, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoInfo, DsoInfoButton, DsoLabel, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoOzonContent, DsoProgressBar, DsoProgressIndicator, DsoSelectable, DsoToggletip, DsoTooltip, DsoTreeView, defineCustomElements };
|
|
6094
|
+
export { DsoAlert, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoDatePicker, DsoDropdownMenu, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoInfo, DsoInfoButton, DsoLabel, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoOzonContent, DsoProgressBar, DsoProgressIndicator, DsoSelectable, DsoToggletip, DsoTooltip, DsoTreeView, DsoViewerGrid, defineCustomElements };
|