@dso-toolkit/core 34.2.1 → 36.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 +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +7 -3
- 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 +2 -2
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -2
- package/dist/cjs/dso-header.cjs.entry.js +16 -7
- 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-image-overlay.cjs.entry.js +62 -0
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +22 -19
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +289 -419
- 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 +3 -3
- package/dist/cjs/dso-tooltip.cjs.entry.js +8 -4
- package/dist/cjs/dso-tree-view.cjs.entry.js +9 -9
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +6 -712
- package/dist/cjs/focus-trap.esm-a85643b0.js +746 -0
- package/dist/cjs/{index-5ea63531.js → index-dfb4ea62.js} +73 -64
- package/dist/cjs/index.esm-3520a2a6.js +427 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/alert/alert.template.js +1 -1
- package/dist/collection/components/anchor/anchor.template.js +1 -1
- package/dist/collection/components/autosuggest/autosuggest.css +1 -1
- package/dist/collection/components/autosuggest/autosuggest.js +6 -2
- package/dist/collection/components/badge/badge.template.js +1 -1
- package/dist/collection/components/button/button.template.js +1 -1
- package/dist/collection/components/date-picker/date-picker.css +6 -6
- package/dist/collection/components/date-picker/date-picker.template.js +1 -1
- package/dist/collection/components/definition-list/definition-list.template.js +2 -2
- package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +1 -1
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +38 -9
- package/dist/collection/components/header/header.template.js +4 -2
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +2 -2
- package/dist/collection/components/highlight-box/highlight-box.template.js +5 -2
- package/dist/collection/components/icon/icon.template.js +1 -1
- package/dist/collection/components/image-overlay/image-overlay.css +263 -0
- package/dist/collection/components/image-overlay/image-overlay.js +72 -0
- package/dist/collection/components/image-overlay/image-overlay.template.js +7 -0
- package/dist/collection/components/label/label.template.js +2 -2
- package/dist/collection/components/list/list.template.js +1 -1
- package/dist/collection/components/map-controls/map-controls.js +17 -19
- package/dist/collection/components/ozon-content/get-node-name.function.js +9 -0
- package/dist/collection/components/ozon-content/nodes/al.node.js +14 -0
- package/dist/collection/components/ozon-content/nodes/document.node.js +9 -0
- package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +15 -0
- package/dist/collection/components/ozon-content/nodes/fallback.node.js +11 -0
- package/dist/collection/components/ozon-content/nodes/illustratie.node.js +13 -0
- package/dist/collection/components/ozon-content/nodes/inhoud.node.js +14 -0
- package/dist/collection/components/ozon-content/nodes/inline.nodes.js +21 -0
- package/dist/collection/components/ozon-content/nodes/int-ref.node.js +26 -0
- package/dist/collection/components/ozon-content/nodes/noot.node.js +27 -0
- package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec-mapper.js +39 -0
- package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec.interface.js +2 -0
- package/dist/collection/components/ozon-content/nodes/table.node/index.js +1 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table-cell.js +25 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table-colgroup.js +4 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table-rows.js +5 -0
- package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +32 -0
- package/dist/collection/components/ozon-content/nodes/text.node.js +9 -0
- package/dist/collection/components/ozon-content/ozon-content-context.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +80 -0
- package/dist/collection/components/ozon-content/ozon-content-node-context.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-node-state.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content-node.interface.js +1 -0
- package/dist/collection/components/ozon-content/ozon-content.css +84 -23
- package/dist/collection/components/ozon-content/ozon-content.js +21 -33
- package/dist/collection/components/progress-bar/progress-bar.template.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.template.js +1 -1
- package/dist/collection/components/selectable/selectable.css +7 -1
- package/dist/collection/components/selectable/selectable.template.js +1 -1
- package/dist/collection/components/toggletip/toggletip.template.js +2 -2
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.template.js +1 -1
- package/dist/collection/components/tree-view/tree-item.js +7 -7
- package/dist/collection/components/tree-view/tree-view.css +86 -15
- package/dist/collection/components/viewer-grid/viewer-grid.css +32 -4
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +1541 -1400
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-016ed5a8.entry.js +1 -0
- package/dist/dso-toolkit/p-0216f283.entry.js +1 -0
- package/dist/dso-toolkit/{p-348414bf.entry.js → p-09bcacd0.entry.js} +1 -1
- package/dist/dso-toolkit/{p-2b6a3dfa.entry.js → p-117a31fe.entry.js} +1 -1
- package/dist/dso-toolkit/p-131d54e3.js +5 -0
- package/dist/dso-toolkit/{p-50b63cf4.entry.js → p-1eeadd3e.entry.js} +1 -1
- package/dist/dso-toolkit/{p-ad540748.entry.js → p-2279329b.entry.js} +1 -1
- package/dist/dso-toolkit/p-258e8371.entry.js +1 -0
- package/dist/dso-toolkit/{p-bc14cafd.entry.js → p-3ced438e.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c54ecae1.entry.js → p-406b179d.entry.js} +1 -1
- package/dist/dso-toolkit/p-4b5f6b4c.entry.js +1 -0
- package/dist/dso-toolkit/{p-3b493a2c.entry.js → p-527a85b6.entry.js} +1 -1
- package/dist/dso-toolkit/{p-94dffa65.entry.js → p-52f159e7.entry.js} +1 -1
- package/dist/dso-toolkit/{p-dc86d830.entry.js → p-58f5e092.entry.js} +1 -1
- package/dist/dso-toolkit/p-5e5fbd41.js +5 -0
- package/dist/dso-toolkit/{p-f0b67246.entry.js → p-639228f6.entry.js} +1 -1
- package/dist/dso-toolkit/{p-951f5872.entry.js → p-6a8452bd.entry.js} +1 -1
- package/dist/dso-toolkit/{p-4e573fc5.entry.js → p-98ef5f8c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-94b79e43.entry.js → p-a1c9bb35.entry.js} +1 -1
- package/dist/dso-toolkit/{p-3c4dbd89.entry.js → p-a5008a4e.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c95108fe.entry.js → p-a59dcbb0.entry.js} +1 -1
- package/dist/dso-toolkit/p-b06c275a.entry.js +1 -0
- package/dist/dso-toolkit/p-b4222d6e.entry.js +1 -0
- package/dist/dso-toolkit/{p-dad72605.js → p-b9eb3491.js} +1 -1
- package/dist/dso-toolkit/p-bec38cf5.entry.js +1 -0
- package/dist/dso-toolkit/{p-ad2210ad.entry.js → p-d0d3ca99.entry.js} +1 -1
- package/dist/dso-toolkit/{p-5037944e.entry.js → p-d72edd80.entry.js} +1 -1
- package/dist/dso-toolkit/{p-1fefbf8c.entry.js → p-e1934ab6.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +7 -3
- 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 +2 -2
- package/dist/esm/dso-dropdown-menu.entry.js +2 -2
- package/dist/esm/dso-header.entry.js +16 -7
- 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-image-overlay.entry.js +58 -0
- package/dist/esm/dso-info-button.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/dso-map-controls.entry.js +22 -19
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +289 -419
- 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 +3 -3
- package/dist/esm/dso-tooltip.entry.js +8 -4
- package/dist/esm/dso-tree-view.entry.js +9 -9
- package/dist/esm/dso-viewer-grid.entry.js +4 -710
- package/dist/esm/focus-trap.esm-a01ad6c9.js +744 -0
- package/dist/esm/{index-d54cae76.js → index-9ec8c07f.js} +73 -64
- package/dist/esm/index.esm-45465af7.js +422 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/autosuggest/autosuggest.d.ts +15 -1
- package/dist/types/components/header/header.d.ts +7 -1
- package/dist/types/components/header/header.template.d.ts +1 -1
- package/dist/types/components/image-overlay/image-overlay.d.ts +15 -0
- package/dist/types/components/image-overlay/image-overlay.template.d.ts +2 -0
- package/dist/types/components/ozon-content/get-node-name.function.d.ts +1 -0
- package/dist/types/components/ozon-content/nodes/al.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/document.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/ext-ref.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/fallback.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/illustratie.node.d.ts +5 -0
- package/dist/types/components/ozon-content/nodes/inhoud.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/inline.nodes.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/int-ref.node.d.ts +6 -0
- package/dist/types/components/ozon-content/nodes/noot.node.d.ts +8 -0
- package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec-mapper.d.ts +2 -0
- package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec.interface.d.ts +10 -0
- package/dist/types/components/ozon-content/nodes/table.node/index.d.ts +1 -0
- package/dist/types/components/ozon-content/nodes/table.node/table-cell.d.ts +8 -0
- package/dist/types/components/ozon-content/nodes/table.node/table-colgroup.d.ts +5 -0
- package/dist/types/components/ozon-content/nodes/table.node/table-rows.d.ts +8 -0
- package/dist/types/components/ozon-content/nodes/table.node/table.node.d.ts +7 -0
- package/dist/types/components/ozon-content/nodes/text.node.d.ts +5 -0
- package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +8 -0
- package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +11 -0
- package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +7 -0
- package/dist/types/components/ozon-content/ozon-content-node-state.interface.d.ts +3 -0
- package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +7 -0
- package/dist/types/components/ozon-content/ozon-content.d.ts +7 -10
- package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +2 -2
- package/dist/types/components.d.ts +22 -8
- package/dist/types/icon/dso-icon-sass-function.d.ts +1 -1
- package/package.json +31 -27
- package/dist/cjs/index.esm-2ac7081c.js +0 -267
- package/dist/collection/components/ozon-content/ozon-content.transformer.js +0 -105
- package/dist/dso-toolkit/p-20856f91.entry.js +0 -1
- package/dist/dso-toolkit/p-88bc5873.entry.js +0 -1
- package/dist/dso-toolkit/p-8b6e3abc.entry.js +0 -1
- package/dist/dso-toolkit/p-8bf3a60e.js +0 -5
- package/dist/dso-toolkit/p-a7306b7b.entry.js +0 -1
- package/dist/dso-toolkit/p-daa1e29d.entry.js +0 -1
- package/dist/dso-toolkit/p-de3ab027.entry.js +0 -5
- package/dist/esm/index.esm-a1362957.js +0 -262
- package/dist/types/components/ozon-content/ozon-content.transformer.d.ts +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, createEvent, Fragment, Host, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
3
|
|
|
4
4
|
function toVal(mix) {
|
|
@@ -48,7 +48,7 @@ let Alert = class extends HTMLElement {
|
|
|
48
48
|
constructor() {
|
|
49
49
|
super();
|
|
50
50
|
this.__registerHost();
|
|
51
|
-
|
|
51
|
+
this.__attachShadow();
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
54
|
const status = Alert.statusMap.get(this.status);
|
|
@@ -72,7 +72,7 @@ let AttachmentsCounter = class extends HTMLElement {
|
|
|
72
72
|
constructor() {
|
|
73
73
|
super();
|
|
74
74
|
this.__registerHost();
|
|
75
|
-
|
|
75
|
+
this.__attachShadow();
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
78
|
return (h("span", { class: "dso-attachments" }, this.count, " ", h("span", { class: "sr-only" }, "bijlage", this.count !== 1 ? 'n' : '')));
|
|
@@ -235,7 +235,7 @@ function escapeStringRegexp(string) {
|
|
|
235
235
|
.replace(/-/g, '\\x2d');
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
const autosuggestCss = ".sc-dso-autosuggest-h{display:block;position:relative}ul.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-top:2px;padding:4px 0;position:absolute;left:0;right:0;top:100%;z-index:
|
|
238
|
+
const autosuggestCss = ".sc-dso-autosuggest-h{display:block;position:relative}ul.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-top:2px;padding:4px 0;position:absolute;left:0;right:0;top:100%;z-index:200}ul.sc-dso-autosuggest li.sc-dso-autosuggest{display:flex;justify-content:space-between;padding:4px 18px}li[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#39870c}li[aria-selected=true].sc-dso-autosuggest,li[aria-selected=true].sc-dso-autosuggest .type.sc-dso-autosuggest{color:#fff}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest{color:#666}";
|
|
239
239
|
|
|
240
240
|
let Autosuggest = class extends HTMLElement {
|
|
241
241
|
constructor() {
|
|
@@ -245,7 +245,11 @@ let Autosuggest = class extends HTMLElement {
|
|
|
245
245
|
this.changeEmitter = createEvent(this, "dsoChange", 7);
|
|
246
246
|
this.searchEmitter = createEvent(this, "dsoSearch", 7);
|
|
247
247
|
/**
|
|
248
|
-
* The suggestions for the value of the slotted input element
|
|
248
|
+
* The suggestions for the value of the slotted input element. Optionally a
|
|
249
|
+
* Suggestion can have a `type` and `item`.
|
|
250
|
+
*
|
|
251
|
+
* The `type` is used to style the suggestion. `item` can be use to reference
|
|
252
|
+
* the original object that was used to create the suggestion.
|
|
249
253
|
*/
|
|
250
254
|
this.suggestions = [];
|
|
251
255
|
/**
|
|
@@ -462,7 +466,7 @@ let Badge = class extends HTMLElement {
|
|
|
462
466
|
constructor() {
|
|
463
467
|
super();
|
|
464
468
|
this.__registerHost();
|
|
465
|
-
|
|
469
|
+
this.__attachShadow();
|
|
466
470
|
}
|
|
467
471
|
render() {
|
|
468
472
|
return (h("span", { class: clsx('dso-badge', { [`badge-${this.status}`]: this.status }) }, h("span", { class: "sr-only" }, this.status ? Badge.statusMap.get(this.status) : 'Badge', ": "), h("slot", null)));
|
|
@@ -482,7 +486,7 @@ let Banner = class extends HTMLElement {
|
|
|
482
486
|
constructor() {
|
|
483
487
|
super();
|
|
484
488
|
this.__registerHost();
|
|
485
|
-
|
|
489
|
+
this.__attachShadow();
|
|
486
490
|
}
|
|
487
491
|
render() {
|
|
488
492
|
return (h("section", { class: clsx('dso-banner', `alert-${this.status}`), role: "alert" }, h("slot", null)));
|
|
@@ -745,7 +749,7 @@ const localization = {
|
|
|
745
749
|
]
|
|
746
750
|
};
|
|
747
751
|
|
|
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:
|
|
752
|
+
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:101}.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:210}@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:210}@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:100}.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:101}.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:100}.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
753
|
|
|
750
754
|
function range(from, to) {
|
|
751
755
|
var result = [];
|
|
@@ -1160,12 +1164,24 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
1160
1164
|
};
|
|
1161
1165
|
|
|
1162
1166
|
/*!
|
|
1163
|
-
* tabbable 5.
|
|
1167
|
+
* tabbable 5.3.1
|
|
1164
1168
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1165
1169
|
*/
|
|
1166
|
-
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
1170
|
+
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
1167
1171
|
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
1168
|
-
var
|
|
1172
|
+
var NoElement = typeof Element === 'undefined';
|
|
1173
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
1174
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
1175
|
+
return element.getRootNode();
|
|
1176
|
+
} : function (element) {
|
|
1177
|
+
return element.ownerDocument;
|
|
1178
|
+
};
|
|
1179
|
+
/**
|
|
1180
|
+
* @param {Element} el container to check in
|
|
1181
|
+
* @param {boolean} includeContainer add container to check
|
|
1182
|
+
* @param {(node: Element) => boolean} filter filter candidates
|
|
1183
|
+
* @returns {Element[]}
|
|
1184
|
+
*/
|
|
1169
1185
|
|
|
1170
1186
|
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
1171
1187
|
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
@@ -1177,31 +1193,112 @@ var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
|
1177
1193
|
candidates = candidates.filter(filter);
|
|
1178
1194
|
return candidates;
|
|
1179
1195
|
};
|
|
1196
|
+
/**
|
|
1197
|
+
* @callback GetShadowRoot
|
|
1198
|
+
* @param {Element} element to check for shadow root
|
|
1199
|
+
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
1200
|
+
*/
|
|
1180
1201
|
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
}
|
|
1202
|
+
/**
|
|
1203
|
+
* @typedef {Object} CandidatesScope
|
|
1204
|
+
* @property {Element} scope contains inner candidates
|
|
1205
|
+
* @property {Element[]} candidates
|
|
1206
|
+
*/
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* @typedef {Object} IterativeOptions
|
|
1210
|
+
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
1211
|
+
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
1212
|
+
* or a boolean stating if it has an undisclosed shadow root
|
|
1213
|
+
* @property {(node: Element) => boolean} filter filter candidates
|
|
1214
|
+
* @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list
|
|
1215
|
+
*/
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* @param {Element[]} elements list of element containers to match candidates from
|
|
1219
|
+
* @param {boolean} includeContainer add container list to check
|
|
1220
|
+
* @param {IterativeOptions} options
|
|
1221
|
+
* @returns {Array.<Element|CandidatesScope>}
|
|
1222
|
+
*/
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
1226
|
+
var candidates = [];
|
|
1227
|
+
var elementsToCheck = Array.from(elements);
|
|
1184
1228
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1229
|
+
while (elementsToCheck.length) {
|
|
1230
|
+
var element = elementsToCheck.shift();
|
|
1187
1231
|
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1232
|
+
if (element.tagName === 'SLOT') {
|
|
1233
|
+
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
1234
|
+
var assigned = element.assignedElements();
|
|
1235
|
+
var content = assigned.length ? assigned : element.children;
|
|
1236
|
+
var nestedCandidates = getCandidatesIteratively(content, true, options);
|
|
1192
1237
|
|
|
1238
|
+
if (options.flatten) {
|
|
1239
|
+
candidates.push.apply(candidates, nestedCandidates);
|
|
1240
|
+
} else {
|
|
1241
|
+
candidates.push({
|
|
1242
|
+
scope: element,
|
|
1243
|
+
candidates: nestedCandidates
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
} else {
|
|
1247
|
+
// check candidate element
|
|
1248
|
+
var validCandidate = matches.call(element, candidateSelector);
|
|
1249
|
+
|
|
1250
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
1251
|
+
candidates.push(element);
|
|
1252
|
+
} // iterate over shadow content if possible
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
|
|
1256
|
+
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
1257
|
+
|
|
1258
|
+
if (shadowRoot) {
|
|
1259
|
+
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
1260
|
+
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
1261
|
+
// child candidates found because they're likely slotted elements (elements that are
|
|
1262
|
+
// children of the web component element (which has the shadow), in the light dom, but
|
|
1263
|
+
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
1264
|
+
// _after_ we return from this recursive call
|
|
1265
|
+
var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
1193
1266
|
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1267
|
+
if (options.flatten) {
|
|
1268
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
|
1269
|
+
} else {
|
|
1270
|
+
candidates.push({
|
|
1271
|
+
scope: element,
|
|
1272
|
+
candidates: _nestedCandidates
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
} else {
|
|
1276
|
+
// there's not shadow so just dig into the element's (light dom) children
|
|
1277
|
+
// __without__ giving the element special scope treatment
|
|
1278
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1201
1282
|
|
|
1283
|
+
return candidates;
|
|
1284
|
+
};
|
|
1202
1285
|
|
|
1203
|
-
|
|
1204
|
-
|
|
1286
|
+
var getTabindex = function getTabindex(node, isScope) {
|
|
1287
|
+
if (node.tabIndex < 0) {
|
|
1288
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
1289
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
1290
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
1291
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
1292
|
+
// order, consider their tab index to be 0.
|
|
1293
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
1294
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
1295
|
+
//
|
|
1296
|
+
// isScope is positive for custom element with shadow root or slot that by default
|
|
1297
|
+
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
1298
|
+
// content to be inserted in the correct position
|
|
1299
|
+
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || node.isContentEditable) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
|
|
1300
|
+
return 0;
|
|
1301
|
+
}
|
|
1205
1302
|
}
|
|
1206
1303
|
|
|
1207
1304
|
return node.tabIndex;
|
|
@@ -1239,7 +1336,7 @@ var isTabbableRadio = function isTabbableRadio(node) {
|
|
|
1239
1336
|
return true;
|
|
1240
1337
|
}
|
|
1241
1338
|
|
|
1242
|
-
var radioScope = node.form || node
|
|
1339
|
+
var radioScope = node.form || getRootNode(node);
|
|
1243
1340
|
|
|
1244
1341
|
var queryRadios = function queryRadios(name) {
|
|
1245
1342
|
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
@@ -1271,7 +1368,18 @@ var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
|
1271
1368
|
return isRadio(node) && !isTabbableRadio(node);
|
|
1272
1369
|
};
|
|
1273
1370
|
|
|
1274
|
-
var
|
|
1371
|
+
var isZeroArea = function isZeroArea(node) {
|
|
1372
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
1373
|
+
width = _node$getBoundingClie.width,
|
|
1374
|
+
height = _node$getBoundingClie.height;
|
|
1375
|
+
|
|
1376
|
+
return width === 0 && height === 0;
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
var isHidden = function isHidden(node, _ref) {
|
|
1380
|
+
var displayCheck = _ref.displayCheck,
|
|
1381
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
1382
|
+
|
|
1275
1383
|
if (getComputedStyle(node).visibility === 'hidden') {
|
|
1276
1384
|
return true;
|
|
1277
1385
|
}
|
|
@@ -1284,19 +1392,47 @@ var isHidden = function isHidden(node, displayCheck) {
|
|
|
1284
1392
|
}
|
|
1285
1393
|
|
|
1286
1394
|
if (!displayCheck || displayCheck === 'full') {
|
|
1287
|
-
|
|
1288
|
-
if
|
|
1289
|
-
|
|
1395
|
+
if (typeof getShadowRoot === 'function') {
|
|
1396
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
1397
|
+
// 'non-zero-area' fallback
|
|
1398
|
+
var originalNode = node;
|
|
1399
|
+
|
|
1400
|
+
while (node) {
|
|
1401
|
+
var parentElement = node.parentElement;
|
|
1402
|
+
var rootNode = getRootNode(node);
|
|
1403
|
+
|
|
1404
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
1405
|
+
) {
|
|
1406
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
1407
|
+
// fall back to a non-zero-area test
|
|
1408
|
+
return isZeroArea(node);
|
|
1409
|
+
} else if (node.assignedSlot) {
|
|
1410
|
+
// iterate up slot
|
|
1411
|
+
node = node.assignedSlot;
|
|
1412
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
1413
|
+
// cross shadow boundary
|
|
1414
|
+
node = rootNode.host;
|
|
1415
|
+
} else {
|
|
1416
|
+
// iterate up normal dom
|
|
1417
|
+
node = parentElement;
|
|
1418
|
+
}
|
|
1290
1419
|
}
|
|
1291
1420
|
|
|
1292
|
-
node =
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1421
|
+
node = originalNode;
|
|
1422
|
+
} // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
1423
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
1424
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
1425
|
+
// didn't find it sitting in an undisclosed shadow (or shadows are disabled) so now we
|
|
1426
|
+
// can just test to see if it would normally be visible or not
|
|
1427
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
1428
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
1429
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
1430
|
+
// up the hierarchy either
|
|
1431
|
+
|
|
1298
1432
|
|
|
1299
|
-
return
|
|
1433
|
+
return !node.getClientRects().length;
|
|
1434
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
1435
|
+
return isZeroArea(node);
|
|
1300
1436
|
}
|
|
1301
1437
|
|
|
1302
1438
|
return false;
|
|
@@ -1306,29 +1442,21 @@ var isHidden = function isHidden(node, displayCheck) {
|
|
|
1306
1442
|
|
|
1307
1443
|
|
|
1308
1444
|
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
1309
|
-
if (
|
|
1310
|
-
var parentNode = node.parentElement;
|
|
1445
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
1446
|
+
var parentNode = node.parentElement; // check if `node` is contained in a disabled <fieldset>
|
|
1311
1447
|
|
|
1312
1448
|
while (parentNode) {
|
|
1313
1449
|
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
1314
|
-
// look for the first <legend>
|
|
1315
|
-
// <fieldset>: if the node is in that legend, it'll be enabled even
|
|
1316
|
-
// though the fieldset is disabled; otherwise, the node is in a
|
|
1317
|
-
// secondary/subsequent legend, or somewhere else within the fieldset
|
|
1318
|
-
// (however deep nested) and it'll be disabled
|
|
1450
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
1319
1451
|
for (var i = 0; i < parentNode.children.length; i++) {
|
|
1320
|
-
var child = parentNode.children.item(i);
|
|
1452
|
+
var child = parentNode.children.item(i); // when the first <legend> (in document order) is found
|
|
1321
1453
|
|
|
1322
1454
|
if (child.tagName === 'LEGEND') {
|
|
1323
|
-
if
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
// where it is now, it'll be disabled
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
return true;
|
|
1455
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
1456
|
+
// return whether `node` is a descendant of its first <legend>
|
|
1457
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
1330
1458
|
}
|
|
1331
|
-
} // the
|
|
1459
|
+
} // the disabled <fieldset> containing `node` has no <legend>
|
|
1332
1460
|
|
|
1333
1461
|
|
|
1334
1462
|
return true;
|
|
@@ -1344,7 +1472,7 @@ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
|
1344
1472
|
};
|
|
1345
1473
|
|
|
1346
1474
|
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
1347
|
-
if (node.disabled || isHiddenInput(node) || isHidden(node, options
|
|
1475
|
+
if (node.disabled || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
|
|
1348
1476
|
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
1349
1477
|
return false;
|
|
1350
1478
|
}
|
|
@@ -1353,40 +1481,76 @@ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(o
|
|
|
1353
1481
|
};
|
|
1354
1482
|
|
|
1355
1483
|
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
1356
|
-
if (
|
|
1484
|
+
if (isNonTabbableRadio(node) || getTabindex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
1357
1485
|
return false;
|
|
1358
1486
|
}
|
|
1359
1487
|
|
|
1360
1488
|
return true;
|
|
1361
1489
|
};
|
|
1490
|
+
/**
|
|
1491
|
+
* @param {Array.<Element|CandidatesScope>} candidates
|
|
1492
|
+
* @returns Element[]
|
|
1493
|
+
*/
|
|
1362
1494
|
|
|
1363
|
-
|
|
1364
|
-
|
|
1495
|
+
|
|
1496
|
+
var sortByOrder = function sortByOrder(candidates) {
|
|
1365
1497
|
var regularTabbables = [];
|
|
1366
1498
|
var orderedTabbables = [];
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
var
|
|
1499
|
+
candidates.forEach(function (item, i) {
|
|
1500
|
+
var isScope = !!item.scope;
|
|
1501
|
+
var element = isScope ? item.scope : item;
|
|
1502
|
+
var candidateTabindex = getTabindex(element, isScope);
|
|
1503
|
+
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
1370
1504
|
|
|
1371
1505
|
if (candidateTabindex === 0) {
|
|
1372
|
-
regularTabbables.push(
|
|
1506
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
1373
1507
|
} else {
|
|
1374
1508
|
orderedTabbables.push({
|
|
1375
1509
|
documentOrder: i,
|
|
1376
1510
|
tabIndex: candidateTabindex,
|
|
1377
|
-
|
|
1511
|
+
item: item,
|
|
1512
|
+
isScope: isScope,
|
|
1513
|
+
content: elements
|
|
1378
1514
|
});
|
|
1379
1515
|
}
|
|
1380
1516
|
});
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1517
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
1518
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
1519
|
+
return acc;
|
|
1520
|
+
}, []).concat(regularTabbables);
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
var tabbable = function tabbable(el, options) {
|
|
1524
|
+
options = options || {};
|
|
1525
|
+
var candidates;
|
|
1526
|
+
|
|
1527
|
+
if (options.getShadowRoot) {
|
|
1528
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
1529
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
1530
|
+
flatten: false,
|
|
1531
|
+
getShadowRoot: options.getShadowRoot
|
|
1532
|
+
});
|
|
1533
|
+
} else {
|
|
1534
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
return sortByOrder(candidates);
|
|
1385
1538
|
};
|
|
1386
1539
|
|
|
1387
1540
|
var focusable = function focusable(el, options) {
|
|
1388
1541
|
options = options || {};
|
|
1389
|
-
var candidates
|
|
1542
|
+
var candidates;
|
|
1543
|
+
|
|
1544
|
+
if (options.getShadowRoot) {
|
|
1545
|
+
candidates = getCandidatesIteratively([el], options.includeContainer, {
|
|
1546
|
+
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
1547
|
+
flatten: true,
|
|
1548
|
+
getShadowRoot: options.getShadowRoot
|
|
1549
|
+
});
|
|
1550
|
+
} else {
|
|
1551
|
+
candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1390
1554
|
return candidates;
|
|
1391
1555
|
};
|
|
1392
1556
|
|
|
@@ -1426,7 +1590,7 @@ let DropdownMenu = class extends HTMLElement {
|
|
|
1426
1590
|
constructor() {
|
|
1427
1591
|
super();
|
|
1428
1592
|
this.__registerHost();
|
|
1429
|
-
|
|
1593
|
+
this.__attachShadow();
|
|
1430
1594
|
/**
|
|
1431
1595
|
* Whether the menu is open or closed.
|
|
1432
1596
|
* This attribute is reflected and mutable.
|
|
@@ -1578,14 +1742,16 @@ let DropdownMenu = class extends HTMLElement {
|
|
|
1578
1742
|
static get style() { return dropdownMenuCss; }
|
|
1579
1743
|
};
|
|
1580
1744
|
|
|
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;padding:0 16px;position:relative}@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 (max-width: 767px){.logo-container{max-width:200px}}.logo-container+.dropdown dso-dropdown-menu{position:static}@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:
|
|
1745
|
+
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;padding:0 16px;position:relative}@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 (max-width: 767px){.logo-container{max-width:200px}}.logo-container+.dropdown dso-dropdown-menu{position:static}@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:220}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: 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:100%}}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 a:hover{background-color:#fff;color:#275937;text-decoration:underline}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{margin-top:28px}}.dropdown dso-dropdown-menu .dso-dropdown-options{left:0;right:0;top:100%}.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;position:relative}.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
1746
|
|
|
1583
1747
|
const minDesktopViewportWidth = 992;
|
|
1584
1748
|
let Header = class extends HTMLElement {
|
|
1585
1749
|
constructor() {
|
|
1586
1750
|
super();
|
|
1587
1751
|
this.__registerHost();
|
|
1588
|
-
|
|
1752
|
+
this.__attachShadow();
|
|
1753
|
+
this.menuItemClick = createEvent(this, "menuItemClick", 7);
|
|
1754
|
+
this.mainMenu = [];
|
|
1589
1755
|
this.useDropDownMenu = "auto";
|
|
1590
1756
|
this.showDropDown = false;
|
|
1591
1757
|
this.isLoggedIn = false;
|
|
@@ -1595,6 +1761,16 @@ let Header = class extends HTMLElement {
|
|
|
1595
1761
|
this.setDropDownMenu();
|
|
1596
1762
|
this.setOverflowMenu();
|
|
1597
1763
|
}, 100);
|
|
1764
|
+
this.MenuItem = (item) => {
|
|
1765
|
+
const click = (event) => {
|
|
1766
|
+
event.preventDefault();
|
|
1767
|
+
this.menuItemClick.emit({
|
|
1768
|
+
originalEvent: event,
|
|
1769
|
+
menuItem: item,
|
|
1770
|
+
});
|
|
1771
|
+
};
|
|
1772
|
+
return (h("li", { class: item.active ? "dso-active" : undefined }, h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick: click }, item.label)));
|
|
1773
|
+
};
|
|
1598
1774
|
}
|
|
1599
1775
|
watchUseDropDownMenu(value) {
|
|
1600
1776
|
if (value === "auto") {
|
|
@@ -1646,16 +1822,13 @@ let Header = class extends HTMLElement {
|
|
|
1646
1822
|
disconnectedCallback() {
|
|
1647
1823
|
window.removeEventListener("resize", this.onWindowResize);
|
|
1648
1824
|
}
|
|
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
1825
|
render() {
|
|
1653
1826
|
return (h(Fragment, null, h("div", { class: clsx("dso-header", {
|
|
1654
1827
|
["use-drop-down"]: this.showDropDown,
|
|
1655
1828
|
["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 &&
|
|
1829
|
+
}), 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 && this.mainMenu.length > 0 && (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
1830
|
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 &&
|
|
1831
|
+
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 && this.mainMenu.length > 0 && (h(Fragment, null, h("div", { class: "dso-header-session" }, this.userProfileUrl &&
|
|
1659
1832
|
this.userProfileName &&
|
|
1660
1833
|
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
1834
|
.filter((_, index) => index < this.mainMenu.length - this.overflowMenuItems)
|
|
@@ -1679,7 +1852,7 @@ let HelpcenterPanel = class extends HTMLElement {
|
|
|
1679
1852
|
constructor() {
|
|
1680
1853
|
super();
|
|
1681
1854
|
this.__registerHost();
|
|
1682
|
-
|
|
1855
|
+
this.__attachShadow();
|
|
1683
1856
|
this.label = "Hulp nodig";
|
|
1684
1857
|
this.visibility = "hidden";
|
|
1685
1858
|
this.isOpen = "close";
|
|
@@ -1717,7 +1890,7 @@ let HighlightBox = class extends HTMLElement {
|
|
|
1717
1890
|
constructor() {
|
|
1718
1891
|
super();
|
|
1719
1892
|
this.__registerHost();
|
|
1720
|
-
|
|
1893
|
+
this.__attachShadow();
|
|
1721
1894
|
}
|
|
1722
1895
|
render() {
|
|
1723
1896
|
var _a;
|
|
@@ -2316,7 +2489,7 @@ let Icon = class extends HTMLElement {
|
|
|
2316
2489
|
constructor() {
|
|
2317
2490
|
super();
|
|
2318
2491
|
this.__registerHost();
|
|
2319
|
-
|
|
2492
|
+
this.__attachShadow();
|
|
2320
2493
|
}
|
|
2321
2494
|
render() {
|
|
2322
2495
|
if (this.icon) {
|
|
@@ -2330,770 +2503,1439 @@ let Icon = class extends HTMLElement {
|
|
|
2330
2503
|
static get style() { return iconCss; }
|
|
2331
2504
|
};
|
|
2332
2505
|
|
|
2333
|
-
|
|
2506
|
+
/*!
|
|
2507
|
+
* focus-trap 6.8.1
|
|
2508
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
2509
|
+
*/
|
|
2334
2510
|
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
return (h(Fragment, null, !this.fixed && (h("button", { type: "button", onClick: e => this.close.emit(e) }, h("span", { class: "sr-only" }, "Sluiten"))), h("slot", null)));
|
|
2511
|
+
function ownKeys(object, enumerableOnly) {
|
|
2512
|
+
var keys = Object.keys(object);
|
|
2513
|
+
|
|
2514
|
+
if (Object.getOwnPropertySymbols) {
|
|
2515
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
2516
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
2517
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
2518
|
+
})), keys.push.apply(keys, symbols);
|
|
2344
2519
|
}
|
|
2345
|
-
static get style() { return infoCss; }
|
|
2346
|
-
};
|
|
2347
2520
|
|
|
2348
|
-
|
|
2521
|
+
return keys;
|
|
2522
|
+
}
|
|
2349
2523
|
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
handleToggle(e) {
|
|
2359
|
-
this.active = !this.active;
|
|
2360
|
-
this.toggle.emit({ originalEvent: e, active: this.active });
|
|
2524
|
+
function _objectSpread2(target) {
|
|
2525
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2526
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
2527
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
2528
|
+
_defineProperty(target, key, source[key]);
|
|
2529
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
2530
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
2531
|
+
});
|
|
2361
2532
|
}
|
|
2362
|
-
|
|
2363
|
-
|
|
2533
|
+
|
|
2534
|
+
return target;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
function _defineProperty(obj, key, value) {
|
|
2538
|
+
if (key in obj) {
|
|
2539
|
+
Object.defineProperty(obj, key, {
|
|
2540
|
+
value: value,
|
|
2541
|
+
enumerable: true,
|
|
2542
|
+
configurable: true,
|
|
2543
|
+
writable: true
|
|
2544
|
+
});
|
|
2545
|
+
} else {
|
|
2546
|
+
obj[key] = value;
|
|
2364
2547
|
}
|
|
2365
|
-
|
|
2548
|
+
|
|
2549
|
+
return obj;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
var activeFocusTraps = function () {
|
|
2553
|
+
var trapQueue = [];
|
|
2554
|
+
return {
|
|
2555
|
+
activateTrap: function activateTrap(trap) {
|
|
2556
|
+
if (trapQueue.length > 0) {
|
|
2557
|
+
var activeTrap = trapQueue[trapQueue.length - 1];
|
|
2558
|
+
|
|
2559
|
+
if (activeTrap !== trap) {
|
|
2560
|
+
activeTrap.pause();
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
var trapIndex = trapQueue.indexOf(trap);
|
|
2565
|
+
|
|
2566
|
+
if (trapIndex === -1) {
|
|
2567
|
+
trapQueue.push(trap);
|
|
2568
|
+
} else {
|
|
2569
|
+
// move this existing trap to the front of the queue
|
|
2570
|
+
trapQueue.splice(trapIndex, 1);
|
|
2571
|
+
trapQueue.push(trap);
|
|
2572
|
+
}
|
|
2573
|
+
},
|
|
2574
|
+
deactivateTrap: function deactivateTrap(trap) {
|
|
2575
|
+
var trapIndex = trapQueue.indexOf(trap);
|
|
2576
|
+
|
|
2577
|
+
if (trapIndex !== -1) {
|
|
2578
|
+
trapQueue.splice(trapIndex, 1);
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
if (trapQueue.length > 0) {
|
|
2582
|
+
trapQueue[trapQueue.length - 1].unpause();
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
}();
|
|
2587
|
+
|
|
2588
|
+
var isSelectableInput = function isSelectableInput(node) {
|
|
2589
|
+
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
2366
2590
|
};
|
|
2367
2591
|
|
|
2368
|
-
|
|
2592
|
+
var isEscapeEvent = function isEscapeEvent(e) {
|
|
2593
|
+
return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
|
|
2594
|
+
};
|
|
2369
2595
|
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
super();
|
|
2373
|
-
this.__registerHost();
|
|
2374
|
-
attachShadow(this);
|
|
2375
|
-
this.removeClick = createEvent(this, "removeClick", 7);
|
|
2376
|
-
}
|
|
2377
|
-
render() {
|
|
2378
|
-
const status = this.status && Label.statusMap.get(this.status);
|
|
2379
|
-
return (h("span", { class: clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) }, h("slot", { name: "symbol" }), status && (h("span", { class: "sr-only" }, status, ": ")), h("slot", null), this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false }, h("span", { class: "sr-only" }, "Verwijder"), h("dso-icon", { icon: "times" })))));
|
|
2380
|
-
}
|
|
2381
|
-
static get style() { return labelCss; }
|
|
2596
|
+
var isTabEvent = function isTabEvent(e) {
|
|
2597
|
+
return e.key === 'Tab' || e.keyCode === 9;
|
|
2382
2598
|
};
|
|
2383
|
-
Label.statusMap = new Map([
|
|
2384
|
-
['info', 'Opmerking'],
|
|
2385
|
-
['success', 'Gelukt'],
|
|
2386
|
-
['warning', 'Waarschuwing'],
|
|
2387
|
-
['danger', 'Fout']
|
|
2388
|
-
]);
|
|
2389
2599
|
|
|
2390
|
-
|
|
2600
|
+
var delay = function delay(fn) {
|
|
2601
|
+
return setTimeout(fn, 0);
|
|
2602
|
+
}; // Array.find/findIndex() are not supported on IE; this replicates enough
|
|
2603
|
+
// of Array.findIndex() for our needs
|
|
2391
2604
|
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
}
|
|
2400
|
-
baseLayerChangeHandler(baseLayer) {
|
|
2401
|
-
this.baseLayerChange.emit({ activeBaseLayer: baseLayer });
|
|
2402
|
-
}
|
|
2403
|
-
componentDidRender() {
|
|
2404
|
-
this.baseLayers
|
|
2405
|
-
.filter(l => { var _a, _b; return !l.disabled && ((_b = (_a = this.previousBaselayers) === null || _a === void 0 ? void 0 : _a.find(p => p.id === l.id)) === null || _b === void 0 ? void 0 : _b.disabled) === true; })
|
|
2406
|
-
.forEach(o => {
|
|
2407
|
-
var _a;
|
|
2408
|
-
(_a = this.selectableRefs[o.id]) === null || _a === void 0 ? void 0 : _a.toggleInfo(false);
|
|
2409
|
-
});
|
|
2410
|
-
this.previousBaselayers = this.baseLayers;
|
|
2411
|
-
}
|
|
2412
|
-
render() {
|
|
2413
|
-
for (const ref in this.selectableRefs) {
|
|
2414
|
-
delete this.selectableRefs[ref];
|
|
2605
|
+
|
|
2606
|
+
var findIndex = function findIndex(arr, fn) {
|
|
2607
|
+
var idx = -1;
|
|
2608
|
+
arr.every(function (value, i) {
|
|
2609
|
+
if (fn(value)) {
|
|
2610
|
+
idx = i;
|
|
2611
|
+
return false; // break
|
|
2415
2612
|
}
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
static get style() { return mapBaseLayersCss; }
|
|
2613
|
+
|
|
2614
|
+
return true; // next
|
|
2615
|
+
});
|
|
2616
|
+
return idx;
|
|
2421
2617
|
};
|
|
2618
|
+
/**
|
|
2619
|
+
* Get an option's value when it could be a plain value, or a handler that provides
|
|
2620
|
+
* the value.
|
|
2621
|
+
* @param {*} value Option's value to check.
|
|
2622
|
+
* @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
|
|
2623
|
+
* @returns {*} The `value`, or the handler's returned value.
|
|
2624
|
+
*/
|
|
2422
2625
|
|
|
2423
|
-
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}";
|
|
2424
2626
|
|
|
2425
|
-
var
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
}
|
|
2429
|
-
return privateMap.get(receiver);
|
|
2430
|
-
};
|
|
2431
|
-
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
2432
|
-
if (!privateMap.has(receiver)) {
|
|
2433
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
2627
|
+
var valueOrHandler = function valueOrHandler(value) {
|
|
2628
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
2629
|
+
params[_key - 1] = arguments[_key];
|
|
2434
2630
|
}
|
|
2435
|
-
|
|
2436
|
-
return value;
|
|
2631
|
+
|
|
2632
|
+
return typeof value === 'function' ? value.apply(void 0, params) : value;
|
|
2437
2633
|
};
|
|
2438
|
-
var _closeButtonElement, _toggleButtonElement;
|
|
2439
|
-
const transitionDuration$1 = 300; // Sync with $transition-duration in ./map-controls.scss
|
|
2440
|
-
let MapControls = class extends HTMLElement {
|
|
2441
|
-
constructor() {
|
|
2442
|
-
super();
|
|
2443
|
-
this.__registerHost();
|
|
2444
|
-
attachShadow(this);
|
|
2445
|
-
this.zoomIn = createEvent(this, "zoomIn", 7);
|
|
2446
|
-
this.zoomOut = createEvent(this, "zoomOut", 7);
|
|
2447
|
-
this.open = false;
|
|
2448
|
-
this.hideContent = !this.open;
|
|
2449
|
-
_closeButtonElement.set(this, void 0);
|
|
2450
|
-
_toggleButtonElement.set(this, void 0);
|
|
2451
|
-
}
|
|
2452
|
-
watchOpen(open) {
|
|
2453
|
-
if (open) {
|
|
2454
|
-
this.hideContent = false;
|
|
2455
|
-
setTimeout(() => __classPrivateFieldGet(this, _closeButtonElement).focus(), transitionDuration$1);
|
|
2456
|
-
}
|
|
2457
|
-
else {
|
|
2458
|
-
setTimeout(() => {
|
|
2459
|
-
this.hideContent = true;
|
|
2460
|
-
__classPrivateFieldGet(this, _toggleButtonElement).focus();
|
|
2461
|
-
}, transitionDuration$1);
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
render() {
|
|
2465
|
-
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)))));
|
|
2466
|
-
}
|
|
2467
|
-
static get watchers() { return {
|
|
2468
|
-
"open": ["watchOpen"]
|
|
2469
|
-
}; }
|
|
2470
|
-
static get style() { return mapControlsCss; }
|
|
2471
|
-
};
|
|
2472
|
-
_closeButtonElement = new WeakMap(), _toggleButtonElement = new WeakMap();
|
|
2473
|
-
|
|
2474
|
-
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}";
|
|
2475
2634
|
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
const checked = e.detail.target instanceof HTMLInputElement ? !!e.detail.target.checked : false;
|
|
2486
|
-
this.toggleOverlay.emit({ overlay, checked });
|
|
2487
|
-
}
|
|
2488
|
-
componentDidRender() {
|
|
2489
|
-
this.overlays
|
|
2490
|
-
.filter(o => { var _a, _b; return !o.disabled && ((_b = (_a = this.previousOverlays) === null || _a === void 0 ? void 0 : _a.find(p => p.id === o.id)) === null || _b === void 0 ? void 0 : _b.disabled) === true; })
|
|
2491
|
-
.forEach(o => {
|
|
2492
|
-
var _a;
|
|
2493
|
-
(_a = this.selectableRefs[o.id]) === null || _a === void 0 ? void 0 : _a.toggleInfo(false);
|
|
2494
|
-
});
|
|
2495
|
-
this.previousOverlays = this.overlays;
|
|
2496
|
-
}
|
|
2497
|
-
render() {
|
|
2498
|
-
for (const ref in this.selectableRefs) {
|
|
2499
|
-
delete this.selectableRefs[ref];
|
|
2500
|
-
}
|
|
2501
|
-
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", { key: overlay.id, type: "checkbox", value: overlay.name, checked: overlay.checked, disabled: overlay.disabled, ref: ref => this.selectableRefs[overlay.id] = ref, onDsoChange: e => this.overlayChangeHandler(overlay, e) }, overlay.name, overlay.info
|
|
2502
|
-
? h("p", { slot: "info" }, overlay.info)
|
|
2503
|
-
: null))))));
|
|
2504
|
-
}
|
|
2505
|
-
static get style() { return mapOverlaysCss; }
|
|
2635
|
+
var getActualTarget = function getActualTarget(event) {
|
|
2636
|
+
// NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
|
|
2637
|
+
// shadow host. However, event.target.composedPath() will be an array of
|
|
2638
|
+
// nodes "clicked" from inner-most (the actual element inside the shadow) to
|
|
2639
|
+
// outer-most (the host HTML document). If we have access to composedPath(),
|
|
2640
|
+
// then use its first element; otherwise, fall back to event.target (and
|
|
2641
|
+
// this only works for an _open_ shadow DOM; otherwise,
|
|
2642
|
+
// composedPath()[0] === event.target always).
|
|
2643
|
+
return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
|
|
2506
2644
|
};
|
|
2507
2645
|
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
var
|
|
2512
|
-
|
|
2513
|
-
if (!isString) {
|
|
2514
|
-
var invalidType = _typeof(input);
|
|
2646
|
+
var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
2647
|
+
// SSR: a live trap shouldn't be created in this type of environment so this
|
|
2648
|
+
// should be safe code to execute if the `document` option isn't specified
|
|
2649
|
+
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
|
2515
2650
|
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2651
|
+
var config = _objectSpread2({
|
|
2652
|
+
returnFocusOnDeactivate: true,
|
|
2653
|
+
escapeDeactivates: true,
|
|
2654
|
+
delayInitialFocus: true
|
|
2655
|
+
}, userOptions);
|
|
2520
2656
|
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2657
|
+
var state = {
|
|
2658
|
+
// containers given to createFocusTrap()
|
|
2659
|
+
// @type {Array<HTMLElement>}
|
|
2660
|
+
containers: [],
|
|
2661
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
2662
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
2663
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
2664
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
2665
|
+
// result in an error being thrown)
|
|
2666
|
+
// @type {Array<{
|
|
2667
|
+
// container: HTMLElement,
|
|
2668
|
+
// tabbableNodes: Array<HTMLElement>, // empty if none
|
|
2669
|
+
// focusableNodes: Array<HTMLElement>, // empty if none
|
|
2670
|
+
// firstTabbableNode: HTMLElement|null,
|
|
2671
|
+
// lastTabbableNode: HTMLElement|null,
|
|
2672
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
2673
|
+
// }>}
|
|
2674
|
+
containerGroups: [],
|
|
2675
|
+
// same order/length as `containers` list
|
|
2676
|
+
// references to objects in `containerGroups`, but only those that actually have
|
|
2677
|
+
// tabbable nodes in them
|
|
2678
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
2679
|
+
// the same length
|
|
2680
|
+
tabbableGroups: [],
|
|
2681
|
+
nodeFocusedBeforeActivation: null,
|
|
2682
|
+
mostRecentlyFocusedNode: null,
|
|
2683
|
+
active: false,
|
|
2684
|
+
paused: false,
|
|
2685
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
2686
|
+
// has been delayed during activation
|
|
2687
|
+
delayInitialFocusTimer: undefined
|
|
2688
|
+
};
|
|
2689
|
+
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
|
|
2524
2690
|
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2691
|
+
/**
|
|
2692
|
+
* Gets a configuration option value.
|
|
2693
|
+
* @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
|
|
2694
|
+
* value will be taken from this object. Otherwise, value will be taken from base configuration.
|
|
2695
|
+
* @param {string} optionName Name of the option whose value is sought.
|
|
2696
|
+
* @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
|
|
2697
|
+
* IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
|
|
2698
|
+
*/
|
|
2530
2699
|
|
|
2531
|
-
|
|
2532
|
-
|
|
2700
|
+
var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
|
|
2701
|
+
return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
|
|
2702
|
+
};
|
|
2703
|
+
/**
|
|
2704
|
+
* Finds the index of the container that contains the element.
|
|
2705
|
+
* @param {HTMLElement} element
|
|
2706
|
+
* @returns {number} Index of the container in either `state.containers` or
|
|
2707
|
+
* `state.containerGroups` (the order/length of these lists are the same); -1
|
|
2708
|
+
* if the element isn't found.
|
|
2709
|
+
*/
|
|
2533
2710
|
|
|
2534
|
-
var default_fqdn_options = {
|
|
2535
|
-
require_tld: true,
|
|
2536
|
-
allow_underscores: false,
|
|
2537
|
-
allow_trailing_dot: false,
|
|
2538
|
-
allow_numeric_tld: false,
|
|
2539
|
-
allow_wildcard: false
|
|
2540
|
-
};
|
|
2541
|
-
function isFQDN(str, options) {
|
|
2542
|
-
assertString(str);
|
|
2543
|
-
options = merge(options, default_fqdn_options);
|
|
2544
|
-
/* Remove the optional trailing dot before checking validity */
|
|
2545
2711
|
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2712
|
+
var findContainerIndex = function findContainerIndex(element) {
|
|
2713
|
+
// NOTE: search `containerGroups` because it's possible a group contains no tabbable
|
|
2714
|
+
// nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
|
|
2715
|
+
// and we still need to find the element in there
|
|
2716
|
+
return state.containerGroups.findIndex(function (_ref) {
|
|
2717
|
+
var container = _ref.container,
|
|
2718
|
+
tabbableNodes = _ref.tabbableNodes;
|
|
2719
|
+
return container.contains(element) || // fall back to explicit tabbable search which will take into consideration any
|
|
2720
|
+
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
2721
|
+
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
2722
|
+
// look inside web components even if open)
|
|
2723
|
+
tabbableNodes.find(function (node) {
|
|
2724
|
+
return node === element;
|
|
2725
|
+
});
|
|
2726
|
+
});
|
|
2727
|
+
};
|
|
2728
|
+
/**
|
|
2729
|
+
* Gets the node for the given option, which is expected to be an option that
|
|
2730
|
+
* can be either a DOM node, a string that is a selector to get a node, `false`
|
|
2731
|
+
* (if a node is explicitly NOT given), or a function that returns any of these
|
|
2732
|
+
* values.
|
|
2733
|
+
* @param {string} optionName
|
|
2734
|
+
* @returns {undefined | false | HTMLElement | SVGElement} Returns
|
|
2735
|
+
* `undefined` if the option is not specified; `false` if the option
|
|
2736
|
+
* resolved to `false` (node explicitly not given); otherwise, the resolved
|
|
2737
|
+
* DOM node.
|
|
2738
|
+
* @throws {Error} If the option is set, not `false`, and is not, or does not
|
|
2739
|
+
* resolve to a node.
|
|
2740
|
+
*/
|
|
2550
2741
|
|
|
2551
2742
|
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
}
|
|
2743
|
+
var getNodeForOption = function getNodeForOption(optionName) {
|
|
2744
|
+
var optionValue = config[optionName];
|
|
2555
2745
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2746
|
+
if (typeof optionValue === 'function') {
|
|
2747
|
+
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
2748
|
+
params[_key2 - 1] = arguments[_key2];
|
|
2749
|
+
}
|
|
2558
2750
|
|
|
2559
|
-
|
|
2560
|
-
// disallow fqdns without tld
|
|
2561
|
-
if (parts.length < 2) {
|
|
2562
|
-
return false;
|
|
2751
|
+
optionValue = optionValue.apply(void 0, params);
|
|
2563
2752
|
}
|
|
2564
2753
|
|
|
2565
|
-
if (
|
|
2566
|
-
|
|
2567
|
-
|
|
2754
|
+
if (!optionValue) {
|
|
2755
|
+
if (optionValue === undefined || optionValue === false) {
|
|
2756
|
+
return optionValue;
|
|
2757
|
+
} // else, empty string (invalid), null (invalid), 0 (invalid)
|
|
2568
2758
|
|
|
2569
2759
|
|
|
2570
|
-
|
|
2571
|
-
return false;
|
|
2760
|
+
throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
|
|
2572
2761
|
}
|
|
2573
|
-
} // reject numeric TLDs
|
|
2574
2762
|
|
|
2763
|
+
var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
|
|
2575
2764
|
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
}
|
|
2765
|
+
if (typeof optionValue === 'string') {
|
|
2766
|
+
node = doc.querySelector(optionValue); // resolve to node, or null if fails
|
|
2579
2767
|
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2768
|
+
if (!node) {
|
|
2769
|
+
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
|
2770
|
+
}
|
|
2583
2771
|
}
|
|
2584
2772
|
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
} // disallow full-width chars
|
|
2773
|
+
return node;
|
|
2774
|
+
};
|
|
2588
2775
|
|
|
2776
|
+
var getInitialFocusNode = function getInitialFocusNode() {
|
|
2777
|
+
var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
|
|
2589
2778
|
|
|
2590
|
-
if (
|
|
2779
|
+
if (node === false) {
|
|
2591
2780
|
return false;
|
|
2592
|
-
}
|
|
2781
|
+
}
|
|
2593
2782
|
|
|
2783
|
+
if (node === undefined) {
|
|
2784
|
+
// option not specified: use fallback options
|
|
2785
|
+
if (findContainerIndex(doc.activeElement) >= 0) {
|
|
2786
|
+
node = doc.activeElement;
|
|
2787
|
+
} else {
|
|
2788
|
+
var firstTabbableGroup = state.tabbableGroups[0];
|
|
2789
|
+
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
|
|
2594
2790
|
|
|
2595
|
-
|
|
2596
|
-
|
|
2791
|
+
node = firstTabbableNode || getNodeForOption('fallbackFocus');
|
|
2792
|
+
}
|
|
2597
2793
|
}
|
|
2598
2794
|
|
|
2599
|
-
if (!
|
|
2600
|
-
|
|
2795
|
+
if (!node) {
|
|
2796
|
+
throw new Error('Your focus-trap needs to have at least one focusable element');
|
|
2601
2797
|
}
|
|
2602
2798
|
|
|
2603
|
-
return
|
|
2604
|
-
}
|
|
2605
|
-
}
|
|
2606
|
-
|
|
2607
|
-
/**
|
|
2608
|
-
11.3. Examples
|
|
2609
|
-
|
|
2610
|
-
The following addresses
|
|
2611
|
-
|
|
2612
|
-
fe80::1234 (on the 1st link of the node)
|
|
2613
|
-
ff02::5678 (on the 5th link of the node)
|
|
2614
|
-
ff08::9abc (on the 10th organization of the node)
|
|
2799
|
+
return node;
|
|
2800
|
+
};
|
|
2615
2801
|
|
|
2616
|
-
|
|
2802
|
+
var updateTabbableNodes = function updateTabbableNodes() {
|
|
2803
|
+
state.containerGroups = state.containers.map(function (container) {
|
|
2804
|
+
var tabbableNodes = tabbable(container, config.tabbableOptions); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
2805
|
+
// are a superset of tabbable nodes
|
|
2617
2806
|
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2807
|
+
var focusableNodes = focusable(container, config.tabbableOptions);
|
|
2808
|
+
return {
|
|
2809
|
+
container: container,
|
|
2810
|
+
tabbableNodes: tabbableNodes,
|
|
2811
|
+
focusableNodes: focusableNodes,
|
|
2812
|
+
firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,
|
|
2813
|
+
lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,
|
|
2814
|
+
|
|
2815
|
+
/**
|
|
2816
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
2817
|
+
* in this container, if any.
|
|
2818
|
+
* @param {HTMLElement} node
|
|
2819
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
2820
|
+
* in reverse.
|
|
2821
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
2822
|
+
*/
|
|
2823
|
+
nextTabbableNode: function nextTabbableNode(node) {
|
|
2824
|
+
var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2825
|
+
// NOTE: If tabindex is positive (in order to manipulate the tab order separate
|
|
2826
|
+
// from the DOM order), this __will not work__ because the list of focusableNodes,
|
|
2827
|
+
// while it contains tabbable nodes, does not sort its nodes in any order other
|
|
2828
|
+
// than DOM order, because it can't: Where would you place focusable (but not
|
|
2829
|
+
// tabbable) nodes in that order? They have no order, because they aren't tabbale...
|
|
2830
|
+
// Support for positive tabindex is already broken and hard to manage (possibly
|
|
2831
|
+
// not supportable, TBD), so this isn't going to make things worse than they
|
|
2832
|
+
// already are, and at least makes things better for the majority of cases where
|
|
2833
|
+
// tabindex is either 0/unset or negative.
|
|
2834
|
+
// FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
|
|
2835
|
+
var nodeIdx = focusableNodes.findIndex(function (n) {
|
|
2836
|
+
return n === node;
|
|
2837
|
+
});
|
|
2621
2838
|
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2839
|
+
if (nodeIdx < 0) {
|
|
2840
|
+
return undefined;
|
|
2841
|
+
}
|
|
2625
2842
|
|
|
2626
|
-
|
|
2627
|
-
|
|
2843
|
+
if (forward) {
|
|
2844
|
+
return focusableNodes.slice(nodeIdx + 1).find(function (n) {
|
|
2845
|
+
return isTabbable(n, config.tabbableOptions);
|
|
2846
|
+
});
|
|
2847
|
+
}
|
|
2628
2848
|
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2849
|
+
return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
|
|
2850
|
+
return isTabbable(n, config.tabbableOptions);
|
|
2851
|
+
});
|
|
2852
|
+
}
|
|
2853
|
+
};
|
|
2854
|
+
});
|
|
2855
|
+
state.tabbableGroups = state.containerGroups.filter(function (group) {
|
|
2856
|
+
return group.tabbableNodes.length > 0;
|
|
2857
|
+
}); // throw if no groups have tabbable nodes and we don't have a fallback focus node either
|
|
2632
2858
|
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2859
|
+
if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
|
|
2860
|
+
) {
|
|
2861
|
+
throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
|
|
2862
|
+
}
|
|
2863
|
+
};
|
|
2636
2864
|
|
|
2637
|
-
var
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z-.:]{1,})?$');
|
|
2642
|
-
function isIP(str) {
|
|
2643
|
-
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
2644
|
-
assertString(str);
|
|
2645
|
-
version = String(version);
|
|
2865
|
+
var tryFocus = function tryFocus(node) {
|
|
2866
|
+
if (node === false) {
|
|
2867
|
+
return;
|
|
2868
|
+
}
|
|
2646
2869
|
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2870
|
+
if (node === doc.activeElement) {
|
|
2871
|
+
return;
|
|
2872
|
+
}
|
|
2650
2873
|
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
return
|
|
2874
|
+
if (!node || !node.focus) {
|
|
2875
|
+
tryFocus(getInitialFocusNode());
|
|
2876
|
+
return;
|
|
2654
2877
|
}
|
|
2655
2878
|
|
|
2656
|
-
|
|
2657
|
-
|
|
2879
|
+
node.focus({
|
|
2880
|
+
preventScroll: !!config.preventScroll
|
|
2658
2881
|
});
|
|
2659
|
-
|
|
2660
|
-
}
|
|
2882
|
+
state.mostRecentlyFocusedNode = node;
|
|
2661
2883
|
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2884
|
+
if (isSelectableInput(node)) {
|
|
2885
|
+
node.select();
|
|
2886
|
+
}
|
|
2887
|
+
};
|
|
2665
2888
|
|
|
2666
|
-
|
|
2667
|
-
|
|
2889
|
+
var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
|
|
2890
|
+
var node = getNodeForOption('setReturnFocus', previousActiveElement);
|
|
2891
|
+
return node ? node : node === false ? false : previousActiveElement;
|
|
2892
|
+
}; // This needs to be done on mousedown and touchstart instead of click
|
|
2893
|
+
// so that it precedes the focus event.
|
|
2668
2894
|
|
|
2669
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2670
2895
|
|
|
2671
|
-
|
|
2896
|
+
var checkPointerDown = function checkPointerDown(e) {
|
|
2897
|
+
var target = getActualTarget(e);
|
|
2672
2898
|
|
|
2673
|
-
|
|
2899
|
+
if (findContainerIndex(target) >= 0) {
|
|
2900
|
+
// allow the click since it ocurred inside the trap
|
|
2901
|
+
return;
|
|
2902
|
+
}
|
|
2674
2903
|
|
|
2675
|
-
|
|
2904
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
2905
|
+
// immediately deactivate the trap
|
|
2906
|
+
trap.deactivate({
|
|
2907
|
+
// if, on deactivation, we should return focus to the node originally-focused
|
|
2908
|
+
// when the trap was activated (or the configured `setReturnFocus` node),
|
|
2909
|
+
// then assume it's also OK to return focus to the outside node that was
|
|
2910
|
+
// just clicked, causing deactivation, as long as that node is focusable;
|
|
2911
|
+
// if it isn't focusable, then return focus to the original node focused
|
|
2912
|
+
// on activation (or the configured `setReturnFocus` node)
|
|
2913
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
2914
|
+
// which will result in the outside click setting focus to the node
|
|
2915
|
+
// that was clicked, whether it's focusable or not; by setting
|
|
2916
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
2917
|
+
// on activation (or the configured `setReturnFocus` node)
|
|
2918
|
+
returnFocus: config.returnFocusOnDeactivate && !isFocusable(target, config.tabbableOptions)
|
|
2919
|
+
});
|
|
2920
|
+
return;
|
|
2921
|
+
} // This is needed for mobile devices.
|
|
2922
|
+
// (If we'll only let `click` events through,
|
|
2923
|
+
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
2676
2924
|
|
|
2677
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
2678
2925
|
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2926
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
2927
|
+
// allow the click outside the trap to take place
|
|
2928
|
+
return;
|
|
2929
|
+
} // otherwise, prevent the click
|
|
2682
2930
|
|
|
2683
|
-
require_protocol - if set as true isURL will return false if protocol is not present in the URL
|
|
2684
|
-
require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
|
|
2685
|
-
protocols - valid protocols can be modified with this option
|
|
2686
|
-
require_host - if set as false isURL will not check if host is present in the URL
|
|
2687
|
-
require_port - if set as true isURL will check if port is present in the URL
|
|
2688
|
-
allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
|
|
2689
|
-
validate_length - if set as false isURL will skip string length validation (IE maximum is 2083)
|
|
2690
2931
|
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
var default_url_options = {
|
|
2694
|
-
protocols: ['http', 'https', 'ftp'],
|
|
2695
|
-
require_tld: true,
|
|
2696
|
-
require_protocol: false,
|
|
2697
|
-
require_host: true,
|
|
2698
|
-
require_port: false,
|
|
2699
|
-
require_valid_protocol: true,
|
|
2700
|
-
allow_underscores: false,
|
|
2701
|
-
allow_trailing_dot: false,
|
|
2702
|
-
allow_protocol_relative_urls: false,
|
|
2703
|
-
allow_fragments: true,
|
|
2704
|
-
allow_query_components: true,
|
|
2705
|
-
validate_length: true
|
|
2706
|
-
};
|
|
2707
|
-
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
2932
|
+
e.preventDefault();
|
|
2933
|
+
}; // In case focus escapes the trap for some strange reason, pull it back in.
|
|
2708
2934
|
|
|
2709
|
-
function isRegExp(obj) {
|
|
2710
|
-
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
2711
|
-
}
|
|
2712
2935
|
|
|
2713
|
-
function
|
|
2714
|
-
|
|
2715
|
-
var
|
|
2936
|
+
var checkFocusIn = function checkFocusIn(e) {
|
|
2937
|
+
var target = getActualTarget(e);
|
|
2938
|
+
var targetContained = findContainerIndex(target) >= 0; // In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
2716
2939
|
|
|
2717
|
-
if (
|
|
2718
|
-
|
|
2940
|
+
if (targetContained || target instanceof Document) {
|
|
2941
|
+
if (targetContained) {
|
|
2942
|
+
state.mostRecentlyFocusedNode = target;
|
|
2943
|
+
}
|
|
2944
|
+
} else {
|
|
2945
|
+
// escaped! pull it back in to where it just left
|
|
2946
|
+
e.stopImmediatePropagation();
|
|
2947
|
+
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
2719
2948
|
}
|
|
2720
|
-
}
|
|
2949
|
+
}; // Hijack Tab events on the first and last focusable nodes of the trap,
|
|
2950
|
+
// in order to prevent focus from escaping. If it escapes for even a
|
|
2951
|
+
// moment it can end up scrolling the page and causing confusion so we
|
|
2952
|
+
// kind of need to capture the action at the keydown phase.
|
|
2721
2953
|
|
|
2722
|
-
return false;
|
|
2723
|
-
}
|
|
2724
2954
|
|
|
2725
|
-
function
|
|
2726
|
-
|
|
2955
|
+
var checkTab = function checkTab(e) {
|
|
2956
|
+
var target = getActualTarget(e);
|
|
2957
|
+
updateTabbableNodes();
|
|
2958
|
+
var destinationNode = null;
|
|
2727
2959
|
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2960
|
+
if (state.tabbableGroups.length > 0) {
|
|
2961
|
+
// make sure the target is actually contained in a group
|
|
2962
|
+
// NOTE: the target may also be the container itself if it's focusable
|
|
2963
|
+
// with tabIndex='-1' and was given initial focus
|
|
2964
|
+
var containerIndex = findContainerIndex(target);
|
|
2965
|
+
var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
|
|
2731
2966
|
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2967
|
+
if (containerIndex < 0) {
|
|
2968
|
+
// target not found in any group: quite possible focus has escaped the trap,
|
|
2969
|
+
// so bring it back in to...
|
|
2970
|
+
if (e.shiftKey) {
|
|
2971
|
+
// ...the last node in the last group
|
|
2972
|
+
destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
|
|
2973
|
+
} else {
|
|
2974
|
+
// ...the first node in the first group
|
|
2975
|
+
destinationNode = state.tabbableGroups[0].firstTabbableNode;
|
|
2976
|
+
}
|
|
2977
|
+
} else if (e.shiftKey) {
|
|
2978
|
+
// REVERSE
|
|
2979
|
+
// is the target the first tabbable node in a group?
|
|
2980
|
+
var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
|
|
2981
|
+
var firstTabbableNode = _ref2.firstTabbableNode;
|
|
2982
|
+
return target === firstTabbableNode;
|
|
2983
|
+
});
|
|
2735
2984
|
|
|
2736
|
-
|
|
2985
|
+
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
|
2986
|
+
// an exception case where the target is either the container itself, or
|
|
2987
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
2988
|
+
// and user clicked on it or node was programmatically given focus)
|
|
2989
|
+
// and is not followed by any other tabbable node, in which
|
|
2990
|
+
// case, we should handle shift+tab as if focus were on the container's
|
|
2991
|
+
// first tabbable node, and go to the last tabbable node of the LAST group
|
|
2992
|
+
startOfGroupIndex = containerIndex;
|
|
2993
|
+
}
|
|
2737
2994
|
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2995
|
+
if (startOfGroupIndex >= 0) {
|
|
2996
|
+
// YES: then shift+tab should go to the last tabbable node in the
|
|
2997
|
+
// previous group (and wrap around to the last tabbable node of
|
|
2998
|
+
// the LAST group if it's the first tabbable node of the FIRST group)
|
|
2999
|
+
var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
|
|
3000
|
+
var destinationGroup = state.tabbableGroups[destinationGroupIndex];
|
|
3001
|
+
destinationNode = destinationGroup.lastTabbableNode;
|
|
3002
|
+
}
|
|
3003
|
+
} else {
|
|
3004
|
+
// FORWARD
|
|
3005
|
+
// is the target the last tabbable node in a group?
|
|
3006
|
+
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
|
|
3007
|
+
var lastTabbableNode = _ref3.lastTabbableNode;
|
|
3008
|
+
return target === lastTabbableNode;
|
|
3009
|
+
});
|
|
2741
3010
|
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
3011
|
+
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|
|
3012
|
+
// an exception case where the target is the container itself, or
|
|
3013
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
3014
|
+
// and user clicked on it or node was programmatically given focus)
|
|
3015
|
+
// and is not followed by any other tabbable node, in which
|
|
3016
|
+
// case, we should handle tab as if focus were on the container's
|
|
3017
|
+
// last tabbable node, and go to the first tabbable node of the FIRST group
|
|
3018
|
+
lastOfGroupIndex = containerIndex;
|
|
3019
|
+
}
|
|
2745
3020
|
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
3021
|
+
if (lastOfGroupIndex >= 0) {
|
|
3022
|
+
// YES: then tab should go to the first tabbable node in the next
|
|
3023
|
+
// group (and wrap around to the first tabbable node of the FIRST
|
|
3024
|
+
// group if it's the last tabbable node of the LAST group)
|
|
3025
|
+
var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
|
|
3026
|
+
|
|
3027
|
+
var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
|
|
3028
|
+
destinationNode = _destinationGroup.firstTabbableNode;
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
3031
|
+
} else {
|
|
3032
|
+
// NOTE: the fallbackFocus option does not support returning false to opt-out
|
|
3033
|
+
destinationNode = getNodeForOption('fallbackFocus');
|
|
3034
|
+
}
|
|
2749
3035
|
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
url = split.shift();
|
|
2755
|
-
split = url.split('://');
|
|
3036
|
+
if (destinationNode) {
|
|
3037
|
+
e.preventDefault();
|
|
3038
|
+
tryFocus(destinationNode);
|
|
3039
|
+
} // else, let the browser take care of [shift+]tab and move the focus
|
|
2756
3040
|
|
|
2757
|
-
|
|
2758
|
-
protocol = split.shift().toLowerCase();
|
|
3041
|
+
};
|
|
2759
3042
|
|
|
2760
|
-
|
|
2761
|
-
|
|
3043
|
+
var checkKey = function checkKey(e) {
|
|
3044
|
+
if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {
|
|
3045
|
+
e.preventDefault();
|
|
3046
|
+
trap.deactivate();
|
|
3047
|
+
return;
|
|
2762
3048
|
}
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
return false;
|
|
3049
|
+
|
|
3050
|
+
if (isTabEvent(e)) {
|
|
3051
|
+
checkTab(e);
|
|
3052
|
+
return;
|
|
2768
3053
|
}
|
|
3054
|
+
};
|
|
2769
3055
|
|
|
2770
|
-
|
|
2771
|
-
|
|
3056
|
+
var checkClick = function checkClick(e) {
|
|
3057
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
3058
|
+
return;
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
var target = getActualTarget(e);
|
|
2772
3062
|
|
|
2773
|
-
|
|
3063
|
+
if (findContainerIndex(target) >= 0) {
|
|
3064
|
+
return;
|
|
3065
|
+
}
|
|
2774
3066
|
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
3067
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
3068
|
+
return;
|
|
3069
|
+
}
|
|
2778
3070
|
|
|
2779
|
-
|
|
2780
|
-
|
|
3071
|
+
e.preventDefault();
|
|
3072
|
+
e.stopImmediatePropagation();
|
|
3073
|
+
}; //
|
|
3074
|
+
// EVENT LISTENERS
|
|
3075
|
+
//
|
|
2781
3076
|
|
|
2782
|
-
if (url === '' && !options.require_host) {
|
|
2783
|
-
return true;
|
|
2784
|
-
}
|
|
2785
3077
|
|
|
2786
|
-
|
|
3078
|
+
var addListeners = function addListeners() {
|
|
3079
|
+
if (!state.active) {
|
|
3080
|
+
return;
|
|
3081
|
+
} // There can be only one listening focus trap at a time
|
|
2787
3082
|
|
|
2788
|
-
if (split.length > 1) {
|
|
2789
|
-
if (options.disallow_auth) {
|
|
2790
|
-
return false;
|
|
2791
|
-
}
|
|
2792
3083
|
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
}
|
|
3084
|
+
activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
|
|
3085
|
+
// that caused the focus trap activation.
|
|
2796
3086
|
|
|
2797
|
-
|
|
3087
|
+
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
|
|
3088
|
+
tryFocus(getInitialFocusNode());
|
|
3089
|
+
}) : tryFocus(getInitialFocusNode());
|
|
3090
|
+
doc.addEventListener('focusin', checkFocusIn, true);
|
|
3091
|
+
doc.addEventListener('mousedown', checkPointerDown, {
|
|
3092
|
+
capture: true,
|
|
3093
|
+
passive: false
|
|
3094
|
+
});
|
|
3095
|
+
doc.addEventListener('touchstart', checkPointerDown, {
|
|
3096
|
+
capture: true,
|
|
3097
|
+
passive: false
|
|
3098
|
+
});
|
|
3099
|
+
doc.addEventListener('click', checkClick, {
|
|
3100
|
+
capture: true,
|
|
3101
|
+
passive: false
|
|
3102
|
+
});
|
|
3103
|
+
doc.addEventListener('keydown', checkKey, {
|
|
3104
|
+
capture: true,
|
|
3105
|
+
passive: false
|
|
3106
|
+
});
|
|
3107
|
+
return trap;
|
|
3108
|
+
};
|
|
2798
3109
|
|
|
2799
|
-
|
|
2800
|
-
|
|
3110
|
+
var removeListeners = function removeListeners() {
|
|
3111
|
+
if (!state.active) {
|
|
3112
|
+
return;
|
|
2801
3113
|
}
|
|
2802
3114
|
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
3115
|
+
doc.removeEventListener('focusin', checkFocusIn, true);
|
|
3116
|
+
doc.removeEventListener('mousedown', checkPointerDown, true);
|
|
3117
|
+
doc.removeEventListener('touchstart', checkPointerDown, true);
|
|
3118
|
+
doc.removeEventListener('click', checkClick, true);
|
|
3119
|
+
doc.removeEventListener('keydown', checkKey, true);
|
|
3120
|
+
return trap;
|
|
3121
|
+
}; //
|
|
3122
|
+
// TRAP DEFINITION
|
|
3123
|
+
//
|
|
2807
3124
|
|
|
2808
|
-
if (user === '' && password === '') {
|
|
2809
|
-
return false;
|
|
2810
|
-
}
|
|
2811
|
-
}
|
|
2812
3125
|
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
3126
|
+
trap = {
|
|
3127
|
+
activate: function activate(activateOptions) {
|
|
3128
|
+
if (state.active) {
|
|
3129
|
+
return this;
|
|
3130
|
+
}
|
|
2817
3131
|
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
port_str = ipv6_match[2] || null;
|
|
2822
|
-
} else {
|
|
2823
|
-
split = hostname.split(':');
|
|
2824
|
-
host = split.shift();
|
|
3132
|
+
var onActivate = getOption(activateOptions, 'onActivate');
|
|
3133
|
+
var onPostActivate = getOption(activateOptions, 'onPostActivate');
|
|
3134
|
+
var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
|
|
2825
3135
|
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
}
|
|
3136
|
+
if (!checkCanFocusTrap) {
|
|
3137
|
+
updateTabbableNodes();
|
|
3138
|
+
}
|
|
2830
3139
|
|
|
2831
|
-
|
|
2832
|
-
|
|
3140
|
+
state.active = true;
|
|
3141
|
+
state.paused = false;
|
|
3142
|
+
state.nodeFocusedBeforeActivation = doc.activeElement;
|
|
2833
3143
|
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
} else if (options.require_port) {
|
|
2838
|
-
return false;
|
|
2839
|
-
}
|
|
3144
|
+
if (onActivate) {
|
|
3145
|
+
onActivate();
|
|
3146
|
+
}
|
|
2840
3147
|
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
3148
|
+
var finishActivation = function finishActivation() {
|
|
3149
|
+
if (checkCanFocusTrap) {
|
|
3150
|
+
updateTabbableNodes();
|
|
3151
|
+
}
|
|
2844
3152
|
|
|
2845
|
-
|
|
2846
|
-
return false;
|
|
2847
|
-
}
|
|
3153
|
+
addListeners();
|
|
2848
3154
|
|
|
2849
|
-
|
|
3155
|
+
if (onPostActivate) {
|
|
3156
|
+
onPostActivate();
|
|
3157
|
+
}
|
|
3158
|
+
};
|
|
2850
3159
|
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
3160
|
+
if (checkCanFocusTrap) {
|
|
3161
|
+
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
3162
|
+
return this;
|
|
3163
|
+
}
|
|
2854
3164
|
|
|
2855
|
-
|
|
2856
|
-
|
|
3165
|
+
finishActivation();
|
|
3166
|
+
return this;
|
|
3167
|
+
},
|
|
3168
|
+
deactivate: function deactivate(deactivateOptions) {
|
|
3169
|
+
if (!state.active) {
|
|
3170
|
+
return this;
|
|
3171
|
+
}
|
|
2857
3172
|
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
const anchorElement = (_a = composedPath
|
|
2919
|
-
.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.find((e) => e instanceof HTMLAnchorElement && e.classList.contains('noot'));
|
|
2920
|
-
if (!anchorElement) {
|
|
2921
|
-
return false;
|
|
2922
|
-
}
|
|
2923
|
-
event.preventDefault();
|
|
2924
|
-
const open = anchorElement.classList.contains('dso-open');
|
|
2925
|
-
if (open) {
|
|
2926
|
-
anchorElement.classList.remove('dso-open');
|
|
2927
|
-
anchorElement.setAttribute('aria-expanded', 'false');
|
|
2928
|
-
}
|
|
2929
|
-
else {
|
|
2930
|
-
anchorElement.classList.add('dso-open');
|
|
2931
|
-
anchorElement.setAttribute('aria-expanded', 'true');
|
|
2932
|
-
}
|
|
2933
|
-
return true;
|
|
2934
|
-
}
|
|
2935
|
-
handleContentAnchor(composedPath, event) {
|
|
2936
|
-
if (composedPath.some(e => e instanceof HTMLAnchorElement)) {
|
|
2937
|
-
event.preventDefault();
|
|
2938
|
-
const anchor = composedPath.find((e) => e instanceof HTMLAnchorElement);
|
|
2939
|
-
const href = anchor.href;
|
|
2940
|
-
this.anchorClick.emit({
|
|
2941
|
-
href,
|
|
2942
|
-
documentComponent: href.substr(href.indexOf('#') + 1),
|
|
2943
|
-
originalEvent: event
|
|
3173
|
+
clearTimeout(state.delayInitialFocusTimer); // noop if undefined
|
|
3174
|
+
|
|
3175
|
+
state.delayInitialFocusTimer = undefined;
|
|
3176
|
+
removeListeners();
|
|
3177
|
+
state.active = false;
|
|
3178
|
+
state.paused = false;
|
|
3179
|
+
activeFocusTraps.deactivateTrap(trap);
|
|
3180
|
+
var onDeactivate = getOption(deactivateOptions, 'onDeactivate');
|
|
3181
|
+
var onPostDeactivate = getOption(deactivateOptions, 'onPostDeactivate');
|
|
3182
|
+
var checkCanReturnFocus = getOption(deactivateOptions, 'checkCanReturnFocus');
|
|
3183
|
+
|
|
3184
|
+
if (onDeactivate) {
|
|
3185
|
+
onDeactivate();
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
var returnFocus = getOption(deactivateOptions, 'returnFocus', 'returnFocusOnDeactivate');
|
|
3189
|
+
|
|
3190
|
+
var finishDeactivation = function finishDeactivation() {
|
|
3191
|
+
delay(function () {
|
|
3192
|
+
if (returnFocus) {
|
|
3193
|
+
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
3194
|
+
}
|
|
3195
|
+
|
|
3196
|
+
if (onPostDeactivate) {
|
|
3197
|
+
onPostDeactivate();
|
|
3198
|
+
}
|
|
3199
|
+
});
|
|
3200
|
+
};
|
|
3201
|
+
|
|
3202
|
+
if (returnFocus && checkCanReturnFocus) {
|
|
3203
|
+
checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
|
|
3204
|
+
return this;
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
finishDeactivation();
|
|
3208
|
+
return this;
|
|
3209
|
+
},
|
|
3210
|
+
pause: function pause() {
|
|
3211
|
+
if (state.paused || !state.active) {
|
|
3212
|
+
return this;
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
state.paused = true;
|
|
3216
|
+
removeListeners();
|
|
3217
|
+
return this;
|
|
3218
|
+
},
|
|
3219
|
+
unpause: function unpause() {
|
|
3220
|
+
if (!state.paused || !state.active) {
|
|
3221
|
+
return this;
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3224
|
+
state.paused = false;
|
|
3225
|
+
updateTabbableNodes();
|
|
3226
|
+
addListeners();
|
|
3227
|
+
return this;
|
|
3228
|
+
},
|
|
3229
|
+
updateContainerElements: function updateContainerElements(containerElements) {
|
|
3230
|
+
var elementsAsArray = [].concat(containerElements).filter(Boolean);
|
|
3231
|
+
state.containers = elementsAsArray.map(function (element) {
|
|
3232
|
+
return typeof element === 'string' ? doc.querySelector(element) : element;
|
|
2944
3233
|
});
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
const containerIndex = composedPath.findIndex(this.isHostElement);
|
|
2952
|
-
if (containerIndex === -1) {
|
|
2953
|
-
return false;
|
|
3234
|
+
|
|
3235
|
+
if (state.active) {
|
|
3236
|
+
updateTabbableNodes();
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
return this;
|
|
2954
3240
|
}
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
3241
|
+
}; // initialize container elements
|
|
3242
|
+
|
|
3243
|
+
trap.updateContainerElements(elements);
|
|
3244
|
+
return trap;
|
|
3245
|
+
};
|
|
2962
3246
|
|
|
2963
|
-
const
|
|
3247
|
+
const imageOverlayCss = "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{display:inline-block;position:relative}:host(:hover) .open,.open:focus{opacity:1}.open{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);min-width:auto;padding:8px;opacity:0;position:absolute;right:16px;top:16px}.open:focus,.open:focus-visible{outline-offset:2px}.open:active{outline:0}.open.extern::after,.open.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.open:hover{background-color:#39870c;border-color:#39870c;color:#fff}.open:active{background-color:#275937;border-color:#275937;color:#fff}.open[disabled],.open[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.open.btn-sm{line-height:16px}.open.btn-sm dso-icon,.open.btn-sm svg.di,.open.btn-sm.extern::after,.open.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.open.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}.open.download:hover::after{--dso-icon:var(--di-download-wit)}.open.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.open.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}.open.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.open.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.open>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.dimmer{position:fixed;top:0;left:0;right:0;bottom:0;z-index:19;display:flex;padding:32px;background-color:rgba(255, 255, 255, 0.8);justify-content:center}.wrapper{box-shadow:0 8px 24px 0 rgba(25, 25, 25, 0.4);position:relative;z-index:20;align-self:center;line-height:0}.wrapper img{width:auto;height:auto;max-width:100%;max-height:calc(100vh - 64px)}.close{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);min-width:auto;padding:8px;position:absolute;top:16px;right:16px}.close:focus,.close:focus-visible{outline-offset:2px}.close:active{outline:0}.close.extern::after,.close.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.close:hover{background-color:#39870c;border-color:#39870c;color:#fff}.close:active{background-color:#275937;border-color:#275937;color:#fff}.close[disabled],.close[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.close.btn-sm{line-height:16px}.close.btn-sm dso-icon,.close.btn-sm svg.di,.close.btn-sm.extern::after,.close.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.close.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.download:hover::after{--dso-icon:var(--di-download-wit)}.close.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.close.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.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.close.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.close>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}";
|
|
2964
3248
|
|
|
2965
|
-
let
|
|
3249
|
+
let ImageOverlay = class extends HTMLElement {
|
|
2966
3250
|
constructor() {
|
|
2967
3251
|
super();
|
|
2968
3252
|
this.__registerHost();
|
|
2969
|
-
this.
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
this.transformer.handleClickEvent(event);
|
|
3253
|
+
this.__attachShadow();
|
|
3254
|
+
this.active = false;
|
|
3255
|
+
this.focused = false;
|
|
2973
3256
|
}
|
|
2974
|
-
|
|
2975
|
-
this.
|
|
3257
|
+
componentDidLoad() {
|
|
3258
|
+
this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
|
|
3259
|
+
this.mutationObserver.observe(this.host, {
|
|
3260
|
+
attributes: true,
|
|
3261
|
+
subtree: true
|
|
3262
|
+
});
|
|
2976
3263
|
}
|
|
2977
|
-
|
|
2978
|
-
|
|
3264
|
+
disconnectedCallback() {
|
|
3265
|
+
var _a, _b;
|
|
3266
|
+
(_a = this.trap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
3267
|
+
(_b = this.mutationObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
2979
3268
|
}
|
|
2980
3269
|
render() {
|
|
2981
|
-
|
|
3270
|
+
var _a;
|
|
3271
|
+
const { src, alt } = (_a = this.host.querySelector('img')) !== null && _a !== void 0 ? _a : {};
|
|
3272
|
+
return (h(Host, { tabindex: this.focused ? -1 : 0, onFocus: () => {
|
|
3273
|
+
var _a;
|
|
3274
|
+
(_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3275
|
+
} }, this.active && src && alt && (h("div", { class: "dimmer", ref: element => this.wrapperElement = element }, h("div", { class: "wrapper" }, h("img", { src: src, alt: alt }), h("button", { type: "button", class: "close", onClick: () => this.active = false }, h("dso-icon", { icon: "times" }), h("span", null, "Sluiten"))))), h("slot", null), h("button", { type: "button", class: "open", ref: element => this.buttonElement = element, onClick: () => this.active = true, onFocus: () => this.focused = true, onBlur: () => this.focused = false }, h("dso-icon", { icon: "external-link" }), h("span", null, "Afbeelding vergroot weergeven"))));
|
|
2982
3276
|
}
|
|
2983
3277
|
componentDidRender() {
|
|
2984
|
-
var _a;
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
3278
|
+
var _a, _b;
|
|
3279
|
+
if (this.active && this.wrapperElement && !this.trap) {
|
|
3280
|
+
this.trap = createFocusTrap(this.wrapperElement, {
|
|
3281
|
+
escapeDeactivates: true,
|
|
3282
|
+
clickOutsideDeactivates: (e) => {
|
|
3283
|
+
if (e instanceof MouseEvent && e.composedPath()[0] === this.wrapperElement) {
|
|
3284
|
+
this.active = false;
|
|
3285
|
+
return false;
|
|
3286
|
+
}
|
|
3287
|
+
return true;
|
|
3288
|
+
},
|
|
3289
|
+
setReturnFocus: (_a = this.buttonElement) !== null && _a !== void 0 ? _a : false,
|
|
3290
|
+
onDeactivate: () => this.active = false
|
|
3291
|
+
}).activate();
|
|
2988
3292
|
}
|
|
2989
|
-
else {
|
|
2990
|
-
(
|
|
3293
|
+
else if (!this.active && this.trap) {
|
|
3294
|
+
(_b = this.trap) === null || _b === void 0 ? void 0 : _b.deactivate();
|
|
3295
|
+
delete this.trap;
|
|
2991
3296
|
}
|
|
2992
3297
|
}
|
|
2993
|
-
|
|
3298
|
+
get host() { return this; }
|
|
3299
|
+
static get style() { return imageOverlayCss; }
|
|
2994
3300
|
};
|
|
2995
3301
|
|
|
2996
|
-
const
|
|
3302
|
+
const infoCss = "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{--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}";
|
|
2997
3303
|
|
|
2998
|
-
let
|
|
3304
|
+
let Info = class extends HTMLElement {
|
|
2999
3305
|
constructor() {
|
|
3000
3306
|
super();
|
|
3001
3307
|
this.__registerHost();
|
|
3002
|
-
|
|
3003
|
-
this.
|
|
3004
|
-
this.max = 100;
|
|
3308
|
+
this.__attachShadow();
|
|
3309
|
+
this.close = createEvent(this, "close", 7);
|
|
3005
3310
|
}
|
|
3006
3311
|
render() {
|
|
3007
|
-
|
|
3008
|
-
const progressPercentage = `${progressNumber}%`;
|
|
3009
|
-
return (h("div", { class: "progress" }, h("div", { class: "progress-bar", role: "progressbar", "aria-labelledby": "progress-bar-label", "aria-valuenow": progressNumber, "aria-valuemin": this.min, "aria-valuemax": this.max, style: { width: `${progressPercentage}` } }, h("span", { id: "progress-bar-label" }, h("slot", null)))));
|
|
3312
|
+
return (h(Fragment, null, !this.fixed && (h("button", { type: "button", onClick: e => this.close.emit(e) }, h("span", { class: "sr-only" }, "Sluiten"))), h("slot", null)));
|
|
3010
3313
|
}
|
|
3011
|
-
static get style() { return
|
|
3314
|
+
static get style() { return infoCss; }
|
|
3012
3315
|
};
|
|
3013
3316
|
|
|
3014
|
-
const
|
|
3317
|
+
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)}";
|
|
3015
3318
|
|
|
3016
|
-
let
|
|
3319
|
+
let InfoButton = class extends HTMLElement {
|
|
3017
3320
|
constructor() {
|
|
3018
3321
|
super();
|
|
3019
3322
|
this.__registerHost();
|
|
3020
|
-
|
|
3323
|
+
this.__attachShadow();
|
|
3324
|
+
this.toggle = createEvent(this, "toggle", 7);
|
|
3325
|
+
this.label = 'Toelichting bij optie';
|
|
3326
|
+
}
|
|
3327
|
+
handleToggle(e) {
|
|
3328
|
+
this.active = !this.active;
|
|
3329
|
+
this.toggle.emit({ originalEvent: e, active: this.active });
|
|
3021
3330
|
}
|
|
3022
3331
|
render() {
|
|
3023
|
-
|
|
3024
|
-
const label = (_a = this.label) !== null && _a !== void 0 ? _a : 'Resultaten laden: een moment geduld alstublieft.';
|
|
3025
|
-
return (h(Host, null, h("div", { class: "dso-progress-indicator-spinner", role: "progressbar", "aria-labelledby": "progress-indicator-label" }, h("svg", { class: "spinner", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" }, h("style", null, `
|
|
3026
|
-
.spinner { animation: rotator 8s linear infinite; transform-origin: center; }
|
|
3027
|
-
@keyframes rotator { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
|
|
3028
|
-
.path { stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: #39870c; animation: dash 2s ease-in-out infinite; }
|
|
3029
|
-
@keyframes dash { 0% { stroke-dashoffset: 265; } 50% { stroke-dashoffset: 65; transform:rotate(90deg); } 100% { stroke-dashoffset: 265; transform:rotate(360deg); }
|
|
3030
|
-
`), h("circle", { class: "path", fill: "none", "stroke-width": "10", "stroke-linecap": "butt", cx: "50", cy: "50", r: "45" }))), h("span", { id: "progress-indicator-label", class: "dso-progress-indicator-label" }, label)));
|
|
3332
|
+
return (h("button", { type: "button", class: clsx('btn', { 'dso-open': !!this.active, 'dso-info-secondary': !!this.secondary }), "aria-expanded": typeof this.active === 'boolean' ? this.active.toString() : undefined, onClick: e => this.handleToggle(e) }, h("span", { class: "sr-only" }, this.label)));
|
|
3031
3333
|
}
|
|
3032
|
-
static get style() { return
|
|
3334
|
+
static get style() { return infoButtonCss; }
|
|
3033
3335
|
};
|
|
3034
3336
|
|
|
3035
|
-
const
|
|
3337
|
+
const labelCss = ":host{display:inline-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}.dso-label{background-color:#f2f2f2;border-radius:4px;color:#191919;display:inline-block;line-height:1.5}.dso-label:not(.dso-label-bright){padding:4px 8px}.dso-label:focus-within,.dso-label.dso-hover{text-decoration:line-through}.dso-label button{background:none;border:0;border-radius:0 4px 4px 0;color:inherit;float:right;font-size:16px;margin-bottom:-4px;margin-left:8px;margin-right:-4px;margin-top:0;padding:0}.dso-label button:hover{cursor:pointer}.dso-label button>dso-icon,.dso-label button>svg.di{display:block}.dso-label.dso-compact{border:0;padding:0 8px}.dso-label.dso-label-info{background-color:#6ca4d9;color:#191919}.dso-label.dso-label-primary{background-color:#275937;color:#fff}.dso-label.dso-label-success{background-color:#39870c;color:#fff}.dso-label.dso-label-warning{background-color:#dcd400;color:#191919}.dso-label.dso-label-danger{background-color:#ce3f51;color:#fff}.dso-label.dso-label-bright{background-color:#fff;color:#191919;border:1px solid #ccc;padding:3px 7px}";
|
|
3036
3338
|
|
|
3037
|
-
let
|
|
3339
|
+
let Label = class extends HTMLElement {
|
|
3038
3340
|
constructor() {
|
|
3039
3341
|
super();
|
|
3040
3342
|
this.__registerHost();
|
|
3041
|
-
|
|
3042
|
-
this.
|
|
3043
|
-
this.infoActive = false;
|
|
3044
|
-
this.fallbackIdentifier = createIdentifier('DsoSelectable');
|
|
3343
|
+
this.__attachShadow();
|
|
3344
|
+
this.removeClick = createEvent(this, "removeClick", 7);
|
|
3045
3345
|
}
|
|
3046
|
-
|
|
3047
|
-
|
|
3346
|
+
render() {
|
|
3347
|
+
const status = this.status && Label.statusMap.get(this.status);
|
|
3348
|
+
return (h("span", { class: clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) }, h("slot", { name: "symbol" }), status && (h("span", { class: "sr-only" }, status, ": ")), h("slot", null), this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false }, h("span", { class: "sr-only" }, "Verwijder"), h("dso-icon", { icon: "times" })))));
|
|
3048
3349
|
}
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3350
|
+
static get style() { return labelCss; }
|
|
3351
|
+
};
|
|
3352
|
+
Label.statusMap = new Map([
|
|
3353
|
+
['info', 'Opmerking'],
|
|
3354
|
+
['success', 'Gelukt'],
|
|
3355
|
+
['warning', 'Waarschuwing'],
|
|
3356
|
+
['danger', 'Fout']
|
|
3357
|
+
]);
|
|
3358
|
+
|
|
3359
|
+
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}";
|
|
3360
|
+
|
|
3361
|
+
let MapBaseLayers = class extends HTMLElement {
|
|
3362
|
+
constructor() {
|
|
3363
|
+
super();
|
|
3364
|
+
this.__registerHost();
|
|
3365
|
+
this.__attachShadow();
|
|
3366
|
+
this.baseLayerChange = createEvent(this, "baseLayerChange", 7);
|
|
3367
|
+
this.selectableRefs = {};
|
|
3368
|
+
}
|
|
3369
|
+
baseLayerChangeHandler(baseLayer) {
|
|
3370
|
+
this.baseLayerChange.emit({ activeBaseLayer: baseLayer });
|
|
3371
|
+
}
|
|
3372
|
+
componentDidRender() {
|
|
3373
|
+
this.baseLayers
|
|
3374
|
+
.filter(l => { var _a, _b; return !l.disabled && ((_b = (_a = this.previousBaselayers) === null || _a === void 0 ? void 0 : _a.find(p => p.id === l.id)) === null || _b === void 0 ? void 0 : _b.disabled) === true; })
|
|
3375
|
+
.forEach(o => {
|
|
3376
|
+
var _a;
|
|
3377
|
+
(_a = this.selectableRefs[o.id]) === null || _a === void 0 ? void 0 : _a.toggleInfo(false);
|
|
3055
3378
|
});
|
|
3056
|
-
this.
|
|
3379
|
+
this.previousBaselayers = this.baseLayers;
|
|
3057
3380
|
}
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3381
|
+
render() {
|
|
3382
|
+
for (const ref in this.selectableRefs) {
|
|
3383
|
+
delete this.selectableRefs[ref];
|
|
3384
|
+
}
|
|
3385
|
+
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, ref: ref => this.selectableRefs[baseLayer.id] = ref, onDsoChange: () => this.baseLayerChangeHandler(baseLayer) }, baseLayer.name, baseLayer.info
|
|
3386
|
+
? h("p", { slot: "info" }, baseLayer.info)
|
|
3387
|
+
: null))))));
|
|
3061
3388
|
}
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3389
|
+
static get style() { return mapBaseLayersCss; }
|
|
3390
|
+
};
|
|
3391
|
+
|
|
3392
|
+
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}";
|
|
3393
|
+
|
|
3394
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3395
|
+
if (kind === "a" && !f)
|
|
3396
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
3397
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
3398
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3399
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3400
|
+
};
|
|
3401
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3402
|
+
if (kind === "m")
|
|
3403
|
+
throw new TypeError("Private method is not writable");
|
|
3404
|
+
if (kind === "a" && !f)
|
|
3405
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
3406
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
3407
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3408
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
3409
|
+
};
|
|
3410
|
+
var _MapControls_closeButtonElement, _MapControls_toggleButtonElement;
|
|
3411
|
+
const transitionDuration$1 = 300; // Sync with $transition-duration in ./map-controls.scss
|
|
3412
|
+
let MapControls = class extends HTMLElement {
|
|
3413
|
+
constructor() {
|
|
3414
|
+
super();
|
|
3415
|
+
this.__registerHost();
|
|
3416
|
+
this.__attachShadow();
|
|
3417
|
+
this.zoomIn = createEvent(this, "zoomIn", 7);
|
|
3418
|
+
this.zoomOut = createEvent(this, "zoomOut", 7);
|
|
3419
|
+
this.open = false;
|
|
3420
|
+
this.hideContent = !this.open;
|
|
3421
|
+
_MapControls_closeButtonElement.set(this, void 0);
|
|
3422
|
+
_MapControls_toggleButtonElement.set(this, void 0);
|
|
3423
|
+
}
|
|
3424
|
+
watchOpen(open) {
|
|
3425
|
+
if (open) {
|
|
3426
|
+
this.hideContent = false;
|
|
3427
|
+
setTimeout(() => __classPrivateFieldGet(this, _MapControls_closeButtonElement, "f").focus(), transitionDuration$1);
|
|
3428
|
+
}
|
|
3429
|
+
else {
|
|
3430
|
+
setTimeout(() => {
|
|
3431
|
+
this.hideContent = true;
|
|
3432
|
+
__classPrivateFieldGet(this, _MapControls_toggleButtonElement, "f").focus();
|
|
3433
|
+
}, transitionDuration$1);
|
|
3065
3434
|
}
|
|
3066
|
-
this.input.indeterminate = !!this.indeterminate;
|
|
3067
3435
|
}
|
|
3068
3436
|
render() {
|
|
3069
|
-
|
|
3070
|
-
const hasInfo = !!this.host.querySelector('[slot="info"]');
|
|
3071
|
-
return (h(Fragment, null, h("input", { type: this.type, id: this.getIdentifier(), value: this.value, name: this.name, "aria-invalid": (_a = this.invalid) === null || _a === void 0 ? void 0 : _a.toString(), "aria-describedby": this.describedById, disabled: this.disabled, required: this.required, checked: this.checked, onChange: e => this.change.emit(e), ref: (el) => this.input = el }), h("label", { htmlFor: this.getIdentifier() }, h("slot", null)), hasInfo && (h(Fragment, null, !this.infoFixed && (h("dso-info-button", { active: this.infoActive, onToggle: e => this.infoActive = e.detail.active })), h("dso-info", { fixed: this.infoFixed, active: this.infoActive, onClose: () => this.infoActive = false }, h("slot", { name: "info" }))))));
|
|
3072
|
-
}
|
|
3073
|
-
getIdentifier() {
|
|
3074
|
-
var _a;
|
|
3075
|
-
return (_a = this.identifier) !== null && _a !== void 0 ? _a : this.fallbackIdentifier;
|
|
3437
|
+
return (h(Host, null, h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _MapControls_toggleButtonElement, element, "f") }, 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, _MapControls_closeButtonElement, element, "f") }, h("span", null, "Sluit dialoog"), h("dso-icon", { icon: "times" }))), h("div", { class: "content" }, h("slot", null)))));
|
|
3076
3438
|
}
|
|
3077
|
-
get host() { return this; }
|
|
3078
3439
|
static get watchers() { return {
|
|
3079
|
-
"
|
|
3440
|
+
"open": ["watchOpen"]
|
|
3080
3441
|
}; }
|
|
3081
|
-
static get style() { return
|
|
3442
|
+
static get style() { return mapControlsCss; }
|
|
3082
3443
|
};
|
|
3444
|
+
_MapControls_closeButtonElement = new WeakMap(), _MapControls_toggleButtonElement = new WeakMap();
|
|
3083
3445
|
|
|
3084
|
-
const
|
|
3446
|
+
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}";
|
|
3085
3447
|
|
|
3086
|
-
let
|
|
3448
|
+
let MapOverlays = class extends HTMLElement {
|
|
3087
3449
|
constructor() {
|
|
3088
3450
|
super();
|
|
3089
3451
|
this.__registerHost();
|
|
3090
|
-
|
|
3091
|
-
this.
|
|
3092
|
-
this.
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
};
|
|
3452
|
+
this.__attachShadow();
|
|
3453
|
+
this.toggleOverlay = createEvent(this, "toggleOverlay", 7);
|
|
3454
|
+
this.selectableRefs = {};
|
|
3455
|
+
}
|
|
3456
|
+
overlayChangeHandler(overlay, e) {
|
|
3457
|
+
const checked = e.detail.target instanceof HTMLInputElement ? !!e.detail.target.checked : false;
|
|
3458
|
+
this.toggleOverlay.emit({ overlay, checked });
|
|
3459
|
+
}
|
|
3460
|
+
componentDidRender() {
|
|
3461
|
+
this.overlays
|
|
3462
|
+
.filter(o => { var _a, _b; return !o.disabled && ((_b = (_a = this.previousOverlays) === null || _a === void 0 ? void 0 : _a.find(p => p.id === o.id)) === null || _b === void 0 ? void 0 : _b.disabled) === true; })
|
|
3463
|
+
.forEach(o => {
|
|
3464
|
+
var _a;
|
|
3465
|
+
(_a = this.selectableRefs[o.id]) === null || _a === void 0 ? void 0 : _a.toggleInfo(false);
|
|
3466
|
+
});
|
|
3467
|
+
this.previousOverlays = this.overlays;
|
|
3468
|
+
}
|
|
3469
|
+
render() {
|
|
3470
|
+
for (const ref in this.selectableRefs) {
|
|
3471
|
+
delete this.selectableRefs[ref];
|
|
3472
|
+
}
|
|
3473
|
+
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", { key: overlay.id, type: "checkbox", value: overlay.name, checked: overlay.checked, disabled: overlay.disabled, ref: ref => this.selectableRefs[overlay.id] = ref, onDsoChange: e => this.overlayChangeHandler(overlay, e) }, overlay.name, overlay.info
|
|
3474
|
+
? h("p", { slot: "info" }, overlay.info)
|
|
3475
|
+
: null))))));
|
|
3476
|
+
}
|
|
3477
|
+
static get style() { return mapOverlaysCss; }
|
|
3478
|
+
};
|
|
3479
|
+
|
|
3480
|
+
function getNodeName$1(node) {
|
|
3481
|
+
if (node instanceof Element) {
|
|
3482
|
+
return node.localName;
|
|
3483
|
+
}
|
|
3484
|
+
if (node.nodeName.includes(':')) {
|
|
3485
|
+
return node.nodeName.substring(node.nodeName.indexOf(':') + 1);
|
|
3486
|
+
}
|
|
3487
|
+
return node.nodeName;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
class OzonContentAlNode {
|
|
3491
|
+
constructor() {
|
|
3492
|
+
this.name = 'Al';
|
|
3493
|
+
}
|
|
3494
|
+
render(node, { mapNodeToJsx, path }) {
|
|
3495
|
+
const nestedAl = path.some(node => getNodeName$1(node) === 'Al');
|
|
3496
|
+
const content = mapNodeToJsx(node.childNodes);
|
|
3497
|
+
return nestedAl
|
|
3498
|
+
? h("span", { role: "paragraph" }, content)
|
|
3499
|
+
: h("p", null, content);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
class OzonContentDocumentNode {
|
|
3504
|
+
constructor() {
|
|
3505
|
+
this.name = '#document';
|
|
3506
|
+
}
|
|
3507
|
+
render(node, { mapNodeToJsx }) {
|
|
3508
|
+
return h(Fragment, null, mapNodeToJsx(node.childNodes));
|
|
3509
|
+
}
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
class OzonContentExtRefNode {
|
|
3513
|
+
constructor() {
|
|
3514
|
+
this.name = [
|
|
3515
|
+
'ExtRef',
|
|
3516
|
+
'ExtIoRef'
|
|
3517
|
+
];
|
|
3518
|
+
}
|
|
3519
|
+
render(node, { mapNodeToJsx }) {
|
|
3520
|
+
var _a;
|
|
3521
|
+
return (h("a", { target: "_blank", rel: "noopener noreferrer", href: (_a = node.getAttribute('ref')) !== null && _a !== void 0 ? _a : undefined },
|
|
3522
|
+
h("span", { class: "sr-only" }, "opent in nieuw venster"),
|
|
3523
|
+
mapNodeToJsx(node.childNodes)));
|
|
3524
|
+
}
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
class OzonContentIllustratieNode {
|
|
3528
|
+
constructor() {
|
|
3529
|
+
this.name = [
|
|
3530
|
+
'Illustratie',
|
|
3531
|
+
'InlineTekstAfbeelding'
|
|
3532
|
+
];
|
|
3533
|
+
}
|
|
3534
|
+
render(node) {
|
|
3535
|
+
var _a, _b, _c, _d;
|
|
3536
|
+
return (h("img", { src: (_a = node.getAttribute('naam')) !== null && _a !== void 0 ? _a : undefined, alt: (_b = node.getAttribute('naam')) !== null && _b !== void 0 ? _b : undefined, height: (_c = node.getAttribute('hoogte')) !== null && _c !== void 0 ? _c : undefined, width: (_d = node.getAttribute('breedte')) !== null && _d !== void 0 ? _d : undefined }));
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
class OzonContentInhoudNode {
|
|
3541
|
+
constructor() {
|
|
3542
|
+
this.name = [
|
|
3543
|
+
'Inhoud',
|
|
3544
|
+
'Opschrift',
|
|
3545
|
+
'ContainerBlocksType',
|
|
3546
|
+
'BlockMixedcontentMetMaximaleInlinesMarkersPopupsType'
|
|
3547
|
+
];
|
|
3548
|
+
}
|
|
3549
|
+
render(node, { mapNodeToJsx }) {
|
|
3550
|
+
return h("div", { class: "dso-rich-content" }, mapNodeToJsx(node.childNodes));
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
class OzonContentInlineNodes {
|
|
3555
|
+
constructor() {
|
|
3556
|
+
this.name = [
|
|
3557
|
+
'sub',
|
|
3558
|
+
'sup',
|
|
3559
|
+
'strong',
|
|
3560
|
+
'b',
|
|
3561
|
+
'u',
|
|
3562
|
+
'i',
|
|
3563
|
+
'br'
|
|
3564
|
+
];
|
|
3565
|
+
}
|
|
3566
|
+
render(node, { mapNodeToJsx }) {
|
|
3567
|
+
if (node.localName === 'br') {
|
|
3568
|
+
return h("br", null);
|
|
3569
|
+
}
|
|
3570
|
+
const Tag = node.localName;
|
|
3571
|
+
return h(Tag, null, mapNodeToJsx(node.childNodes));
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
class OzonContentIntRefNode {
|
|
3576
|
+
constructor() {
|
|
3577
|
+
this.name = 'IntRef';
|
|
3578
|
+
}
|
|
3579
|
+
render(node, { mapNodeToJsx, emitAnchorClick }) {
|
|
3580
|
+
const ref = node.getAttribute('ref');
|
|
3581
|
+
if (!ref) {
|
|
3582
|
+
return mapNodeToJsx(node.childNodes);
|
|
3583
|
+
}
|
|
3584
|
+
const intRefOnClick = (event) => {
|
|
3585
|
+
event.preventDefault();
|
|
3586
|
+
const target = event.currentTarget;
|
|
3587
|
+
if (!(target instanceof HTMLAnchorElement)) {
|
|
3588
|
+
return;
|
|
3589
|
+
}
|
|
3590
|
+
const { href } = target;
|
|
3591
|
+
emitAnchorClick({
|
|
3592
|
+
href,
|
|
3593
|
+
documentComponent: ref,
|
|
3594
|
+
originalEvent: event
|
|
3595
|
+
});
|
|
3596
|
+
};
|
|
3597
|
+
return (h("a", { href: `#${ref}`, onClick: intRefOnClick }, mapNodeToJsx(node.childNodes)));
|
|
3598
|
+
}
|
|
3599
|
+
}
|
|
3600
|
+
|
|
3601
|
+
class OzonContentNootNode {
|
|
3602
|
+
constructor() {
|
|
3603
|
+
this.name = 'Noot';
|
|
3604
|
+
this.handles = ['NootNummer'];
|
|
3605
|
+
}
|
|
3606
|
+
identify() {
|
|
3607
|
+
return 'Noot';
|
|
3608
|
+
}
|
|
3609
|
+
render(node, { mapNodeToJsx, state: openNoteId, setState }) {
|
|
3610
|
+
var _a, _b;
|
|
3611
|
+
const noteId = node.getAttribute('id');
|
|
3612
|
+
if (!noteId) {
|
|
3613
|
+
console.error('Noot node without id', node);
|
|
3614
|
+
return h(Fragment, null);
|
|
3615
|
+
}
|
|
3616
|
+
const noteControlsId = `dso-ozon-note-${noteId}`;
|
|
3617
|
+
const childNodes = Array.from(node.childNodes);
|
|
3618
|
+
const nootNummer = (_b = (_a = childNodes.find(n => getNodeName$1(n) === 'NootNummer')) === null || _a === void 0 ? void 0 : _a.textContent) !== null && _b !== void 0 ? _b : noteId;
|
|
3619
|
+
return (h(Fragment, null,
|
|
3620
|
+
h("sup", null,
|
|
3621
|
+
h("button", { type: "button", class: "toggle-note", id: noteControlsId, onClick: () => setState === null || setState === void 0 ? void 0 : setState(openNoteId === noteId ? undefined : noteId), onBlur: () => setState === null || setState === void 0 ? void 0 : setState(undefined), "aria-expanded": openNoteId === noteId ? 'true' : 'false' }, nootNummer)),
|
|
3622
|
+
h("dso-tooltip", { active: openNoteId === noteId, for: noteControlsId, stateless: true },
|
|
3623
|
+
h("span", { role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(':scope > Al')))))));
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3627
|
+
function mapColspecs(count, nodeList) {
|
|
3628
|
+
const elements = Array.from(nodeList);
|
|
3629
|
+
const totalWidth = getTotalWidth(elements);
|
|
3630
|
+
return {
|
|
3631
|
+
totalWidth,
|
|
3632
|
+
count,
|
|
3633
|
+
columns: elements.map((element, index) => {
|
|
3634
|
+
var _a;
|
|
3635
|
+
const colNumber = element.getAttribute('colnum');
|
|
3636
|
+
return {
|
|
3637
|
+
name: (_a = element.getAttribute('colname')) !== null && _a !== void 0 ? _a : '',
|
|
3638
|
+
number: colNumber ? parseInt(colNumber, 10) : index + 1,
|
|
3639
|
+
width: getWidth(totalWidth, element)
|
|
3640
|
+
};
|
|
3641
|
+
})
|
|
3642
|
+
};
|
|
3643
|
+
}
|
|
3644
|
+
function getTotalWidth(elements) {
|
|
3645
|
+
return elements.reduce((totalWidth, element) => {
|
|
3646
|
+
var _a, _b;
|
|
3647
|
+
const width = (_b = (_a = element.getAttribute('colwidth')) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/, '')) !== null && _b !== void 0 ? _b : '';
|
|
3648
|
+
const colWidth = parseInt(width, 10);
|
|
3649
|
+
return totalWidth + (isNaN(colWidth) ? 0 : colWidth);
|
|
3650
|
+
}, 0);
|
|
3651
|
+
}
|
|
3652
|
+
function getWidth(totalWidth, element) {
|
|
3653
|
+
const width = element.getAttribute('colwidth');
|
|
3654
|
+
if (!width) {
|
|
3655
|
+
return undefined;
|
|
3656
|
+
}
|
|
3657
|
+
if (width === '*') {
|
|
3658
|
+
return '100%';
|
|
3659
|
+
}
|
|
3660
|
+
if (width.includes('*') || width.match(/^[\d+]$/)) {
|
|
3661
|
+
const colWidth = parseInt(width.replace(/[^0-9]/, ''), 10);
|
|
3662
|
+
return `${Math.round(colWidth / totalWidth * 100)}%`;
|
|
3663
|
+
}
|
|
3664
|
+
return width;
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
const Colgroup = ({ colspecs }) => (colspecs.columns.length > 0
|
|
3668
|
+
? (h("colgroup", null, colspecs.columns.map(colspec => (h("col", { style: { width: colspec.width } })))))
|
|
3669
|
+
: h(Fragment, null));
|
|
3670
|
+
|
|
3671
|
+
function getData(cell) {
|
|
3672
|
+
return {
|
|
3673
|
+
moreRows: cell.getAttribute('morerows'),
|
|
3674
|
+
nameStart: cell.getAttribute('namest'),
|
|
3675
|
+
nameEnd: cell.getAttribute('nameend')
|
|
3676
|
+
};
|
|
3677
|
+
}
|
|
3678
|
+
function getColspan({ columns }, nameStart, nameEnd) {
|
|
3679
|
+
const colspecStart = columns.find(c => c.name === nameStart);
|
|
3680
|
+
const colspecEnd = columns.find(c => c.name === nameEnd);
|
|
3681
|
+
if (!colspecStart || !colspecEnd) {
|
|
3682
|
+
return undefined;
|
|
3683
|
+
}
|
|
3684
|
+
const colspan = colspecEnd.number - colspecStart.number + 1;
|
|
3685
|
+
return colspan === 1 ? undefined : colspan;
|
|
3686
|
+
}
|
|
3687
|
+
const Cell = ({ context: { mapNodeToJsx }, colspecs, cell }) => {
|
|
3688
|
+
const { moreRows, nameStart, nameEnd } = getData(cell);
|
|
3689
|
+
const td = {
|
|
3690
|
+
rowSpan: moreRows ? parseInt(moreRows, 10) + 1 : undefined,
|
|
3691
|
+
colSpan: colspecs && nameStart && nameEnd ? getColspan(colspecs, nameStart, nameEnd) : undefined
|
|
3692
|
+
};
|
|
3693
|
+
return (h("td", Object.assign({}, td), mapNodeToJsx(cell.childNodes)));
|
|
3694
|
+
};
|
|
3695
|
+
|
|
3696
|
+
const Rows = ({ context, colspecs, rows }) => {
|
|
3697
|
+
return (h(Fragment, null, rows.map(row => (h("tr", null, Array.from(row.children).map(cell => (h(Cell, { cell: cell, colspecs: colspecs, context: context }))))))));
|
|
3698
|
+
};
|
|
3699
|
+
|
|
3700
|
+
function mapData(node) {
|
|
3701
|
+
var _a, _b, _c;
|
|
3702
|
+
const tgroup = node.querySelector(':scope > tgroup');
|
|
3703
|
+
const colAttribute = (_a = tgroup === null || tgroup === void 0 ? void 0 : tgroup.getAttribute('cols')) !== null && _a !== void 0 ? _a : undefined;
|
|
3704
|
+
const columnCount = colAttribute ? parseInt(colAttribute, 10) : undefined;
|
|
3705
|
+
return {
|
|
3706
|
+
caption: (_c = (_b = node.querySelector(':scope > title')) === null || _b === void 0 ? void 0 : _b.textContent) !== null && _c !== void 0 ? _c : undefined,
|
|
3707
|
+
colspecs: tgroup && columnCount ? mapColspecs(columnCount, tgroup.querySelectorAll(':scope > colspec')) : undefined,
|
|
3708
|
+
headRows: Array.from(node.querySelectorAll(':scope > tgroup > thead > row')),
|
|
3709
|
+
bodyRows: Array.from(node.querySelectorAll(':scope > tgroup > tbody > row'))
|
|
3710
|
+
};
|
|
3711
|
+
}
|
|
3712
|
+
class OzonContentTableNode {
|
|
3713
|
+
constructor() {
|
|
3714
|
+
this.name = 'table';
|
|
3715
|
+
this.handles = ['title', 'tgroup', 'colspec', 'thead', 'tbody', 'row', 'cell'];
|
|
3716
|
+
}
|
|
3717
|
+
render(node, context) {
|
|
3718
|
+
const { caption, colspecs, headRows, bodyRows } = mapData(node);
|
|
3719
|
+
return (h("table", { class: "table" },
|
|
3720
|
+
caption && (h("caption", null, caption)),
|
|
3721
|
+
colspecs && (h(Colgroup, { colspecs: colspecs })),
|
|
3722
|
+
headRows.length > 0 && (h("thead", null,
|
|
3723
|
+
h(Rows, { rows: headRows, colspecs: colspecs, context: context }))),
|
|
3724
|
+
bodyRows.length > 0 && (h("tbody", null,
|
|
3725
|
+
h(Rows, { rows: bodyRows, colspecs: colspecs, context: context })))));
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
class OzonContentTextNode {
|
|
3730
|
+
constructor() {
|
|
3731
|
+
this.name = '#text';
|
|
3732
|
+
}
|
|
3733
|
+
render(node) {
|
|
3734
|
+
return h(Fragment, null, node.textContent);
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
class OzonContentFallbackNode {
|
|
3739
|
+
constructor() {
|
|
3740
|
+
// This name does not match any elements
|
|
3741
|
+
this.name = ['<fallback>'];
|
|
3742
|
+
}
|
|
3743
|
+
render(node, { mapNodeToJsx }) {
|
|
3744
|
+
return (h("span", { class: `fallback od-${getNodeName$1(node)}` }, mapNodeToJsx(node.childNodes)));
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
|
|
3748
|
+
class Mapper {
|
|
3749
|
+
constructor() {
|
|
3750
|
+
this.mappers = [
|
|
3751
|
+
new OzonContentTextNode(),
|
|
3752
|
+
new OzonContentDocumentNode(),
|
|
3753
|
+
new OzonContentInhoudNode(),
|
|
3754
|
+
new OzonContentIntRefNode(),
|
|
3755
|
+
new OzonContentExtRefNode(),
|
|
3756
|
+
new OzonContentAlNode(),
|
|
3757
|
+
new OzonContentInlineNodes(),
|
|
3758
|
+
new OzonContentIllustratieNode(),
|
|
3759
|
+
new OzonContentNootNode(),
|
|
3760
|
+
new OzonContentTableNode()
|
|
3761
|
+
];
|
|
3762
|
+
this.skip = this.mappers.reduce((t, m) => {
|
|
3763
|
+
if (m.handles) {
|
|
3764
|
+
t.push(...m.handles);
|
|
3765
|
+
}
|
|
3766
|
+
return t;
|
|
3767
|
+
}, []);
|
|
3768
|
+
this.fallbackNode = new OzonContentFallbackNode();
|
|
3769
|
+
this.domParser = new DOMParser();
|
|
3770
|
+
}
|
|
3771
|
+
findMapper(name) {
|
|
3772
|
+
var _a;
|
|
3773
|
+
if (this.skip.includes(name)) {
|
|
3774
|
+
return undefined;
|
|
3775
|
+
}
|
|
3776
|
+
return (_a = this.mappers.find(m => {
|
|
3777
|
+
if (Array.isArray(m.name)) {
|
|
3778
|
+
return m.name.includes(name);
|
|
3779
|
+
}
|
|
3780
|
+
return m.name === name;
|
|
3781
|
+
})) !== null && _a !== void 0 ? _a : this.fallbackNode;
|
|
3782
|
+
}
|
|
3783
|
+
mapNodeToJsx(node, context, path) {
|
|
3784
|
+
var _a;
|
|
3785
|
+
if (node instanceof NodeList) {
|
|
3786
|
+
return h(Fragment, null, Array.from(node).map(n => this.mapNodeToJsx(n, context, path)));
|
|
3787
|
+
}
|
|
3788
|
+
if (Array.isArray(node)) {
|
|
3789
|
+
return h(Fragment, null, node.map(n => this.mapNodeToJsx(n, context, path)));
|
|
3790
|
+
}
|
|
3791
|
+
const nodeName = getNodeName$1(node);
|
|
3792
|
+
const mapper = this.findMapper(nodeName);
|
|
3793
|
+
if (!mapper) {
|
|
3794
|
+
return h(Fragment, null);
|
|
3795
|
+
}
|
|
3796
|
+
const identity = (_a = mapper.identify) === null || _a === void 0 ? void 0 : _a.call(mapper, node);
|
|
3797
|
+
const state = identity ? context.state[identity] : undefined;
|
|
3798
|
+
const setState = identity ? (state) => context.setState(Object.assign(Object.assign({}, context.state), { [identity]: state })) : undefined;
|
|
3799
|
+
return mapper.render(node, {
|
|
3800
|
+
mapNodeToJsx: n => this.mapNodeToJsx(n, context, [...path, node]),
|
|
3801
|
+
emitAnchorClick: context.emitAnchorClick,
|
|
3802
|
+
setState,
|
|
3803
|
+
state,
|
|
3804
|
+
path
|
|
3805
|
+
});
|
|
3806
|
+
}
|
|
3807
|
+
transform(xml, context) {
|
|
3808
|
+
if (!this.cache || this.cache.xml !== xml) {
|
|
3809
|
+
this.cache = { xml, document: this.domParser.parseFromString(xml, 'text/xml') };
|
|
3810
|
+
}
|
|
3811
|
+
const xmlDocument = this.cache.document;
|
|
3812
|
+
return this.mapNodeToJsx(xmlDocument.getRootNode(), context, []);
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
const ozonContentCss = ".sc-dso-ozon-content-h{display:block}button.toggle-note.sc-dso-ozon-content{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}button.toggle-note.sc-dso-ozon-content:focus,button.toggle-note.sc-dso-ozon-content:focus-visible{outline-offset:2px}button.toggle-note.sc-dso-ozon-content:active{outline:0}button.toggle-note.extern.sc-dso-ozon-content::after,button.toggle-note.download.sc-dso-ozon-content::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}button.toggle-note[disabled].sc-dso-ozon-content{color:#afcf9d}button.toggle-note.sc-dso-ozon-content:not([disabled]):hover{color:#676cb0;text-decoration:underline}button.toggle-note.sc-dso-ozon-content:not([disabled]):active{color:#676cb0}button.toggle-note.btn-align.sc-dso-ozon-content{line-height:calc(1.5em - 1px);padding:11px 0;position:relative}button.toggle-note.extern.sc-dso-ozon-content::after,button.toggle-note.download.sc-dso-ozon-content::after{position:relative;top:-2px}button.toggle-note.download.sc-dso-ozon-content::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}button.toggle-note.download[disabled].sc-dso-ozon-content::after{--dso-icon:var(--di-download-grasgroen-40)}button.toggle-note.download.sc-dso-ozon-content:not([disabled]):hover::after,button.toggle-note.download.sc-dso-ozon-content:not([disabled]):active::after{--dso-icon:var(--di-download-scampi)}button.toggle-note.extern.sc-dso-ozon-content::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}button.toggle-note.extern[disabled].sc-dso-ozon-content::after{--dso-icon:var(--di-external-link-grasgroen-40)}button.toggle-note.extern.sc-dso-ozon-content:not([disabled]):hover::after,button.toggle-note.extern.sc-dso-ozon-content:not([disabled]):active::after{--dso-icon:var(--di-external-link-scampi)}button.toggle-note.sc-dso-ozon-content dso-icon.sc-dso-ozon-content+span.sc-dso-ozon-content:not(.sr-only),button.toggle-note.sc-dso-ozon-content svg.di.sc-dso-ozon-content+span.sc-dso-ozon-content:not(.sr-only),button.toggle-note.sc-dso-ozon-content span.sc-dso-ozon-content:not(.sr-only)+dso-icon.sc-dso-ozon-content,button.toggle-note.sc-dso-ozon-content span.sc-dso-ozon-content:not(.sr-only)+svg.di.sc-dso-ozon-content{margin-left:8px}button.toggle-note.sc-dso-ozon-content dso-icon.sc-dso-ozon-content,button.toggle-note.sc-dso-ozon-content svg.di.sc-dso-ozon-content,button.toggle-note.sc-dso-ozon-content span.sc-dso-ozon-content{vertical-align:middle}span[role=section].sc-dso-ozon-content,span[role=paragraph].sc-dso-ozon-content{display:block}.fallback.sc-dso-ozon-content{display:block}.od-Term.sc-dso-ozon-content{font-weight:700}.od-Definitie.sc-dso-ozon-content,.od-Tussenkop.sc-dso-ozon-content{font-style:italic}.od-Inhoud.sc-dso-ozon-content,.od-Inhoud.sc-dso-ozon-content>.od-Lijst.sc-dso-ozon-content,.od-IntIoRef.sc-dso-ozon-content,.od-Lidnr.sc-dso-ozon-content,.od-LiNr.sc-dso-ozon-content,.od-Opschrift.sc-dso-ozon-content,.od-Tussenkop.sc-dso-ozon-content{display:inline}.od-Al.sc-dso-ozon-content,.od-Lijstaanhef.sc-dso-ozon-content{margin-bottom:0.75em}.od-IntIoRef.sc-dso-ozon-content{border-bottom:1px dotted}.od-LiNummer.sc-dso-ozon-content{float:left;min-width:0.7em;padding-right:0.3em;text-align:right}.od-Figuur.sc-dso-ozon-content img.sc-dso-ozon-content{margin-left:25px;max-width:100%;height:auto}.od-Figuur.sc-dso-ozon-content .od-Bijschrift.sc-dso-ozon-content{font-size:0.75rem;margin-left:25px;padding-bottom:2.5rem}.od-Tabel.sc-dso-ozon-content thead.sc-dso-ozon-content{font-weight:600}.od-Kadertekst.sc-dso-ozon-content{border:1px solid #e5e5e5;margin-bottom:1rem;padding:1rem}";
|
|
3817
|
+
|
|
3818
|
+
let OzonContent = class extends HTMLElement {
|
|
3819
|
+
constructor() {
|
|
3820
|
+
super();
|
|
3821
|
+
this.__registerHost();
|
|
3822
|
+
this.anchorClick = createEvent(this, "anchorClick", 7);
|
|
3823
|
+
this.state = {};
|
|
3824
|
+
this.mapper = new Mapper();
|
|
3825
|
+
}
|
|
3826
|
+
render() {
|
|
3827
|
+
var _a;
|
|
3828
|
+
const context = {
|
|
3829
|
+
state: this.state,
|
|
3830
|
+
setState: state => this.state = state,
|
|
3831
|
+
emitAnchorClick: this.anchorClick.emit
|
|
3832
|
+
};
|
|
3833
|
+
return this.mapper.transform((_a = this.content) !== null && _a !== void 0 ? _a : '', context);
|
|
3834
|
+
}
|
|
3835
|
+
static get style() { return ozonContentCss; }
|
|
3836
|
+
};
|
|
3837
|
+
|
|
3838
|
+
const progressBarCss = ":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}.progress{background-color:#fff;border:1px solid #39870c;height:16px;margin-bottom:calc(16px + 1em);position:relative}.progress .progress-bar{background-color:#39870c;color:#fff;float:left;font-size:14px;height:100%;line-height:16px;text-align:center;width:0%}.progress .progress-bar>span:not(.sr-only){color:#191919;left:0;position:absolute;top:calc(100% + 8px)}";
|
|
3839
|
+
|
|
3840
|
+
let ProgressBar = class extends HTMLElement {
|
|
3841
|
+
constructor() {
|
|
3842
|
+
super();
|
|
3843
|
+
this.__registerHost();
|
|
3844
|
+
this.__attachShadow();
|
|
3845
|
+
this.min = 0;
|
|
3846
|
+
this.max = 100;
|
|
3847
|
+
}
|
|
3848
|
+
render() {
|
|
3849
|
+
const progressNumber = Math.round(this.progress);
|
|
3850
|
+
const progressPercentage = `${progressNumber}%`;
|
|
3851
|
+
return (h("div", { class: "progress" }, h("div", { class: "progress-bar", role: "progressbar", "aria-labelledby": "progress-bar-label", "aria-valuenow": progressNumber, "aria-valuemin": this.min, "aria-valuemax": this.max, style: { width: `${progressPercentage}` } }, h("span", { id: "progress-bar-label" }, h("slot", null)))));
|
|
3852
|
+
}
|
|
3853
|
+
static get style() { return progressBarCss; }
|
|
3854
|
+
};
|
|
3855
|
+
|
|
3856
|
+
const progressIndicatorCss = "*,*::after,*::before{box-sizing:border-box}.dso-progress-indicator-spinner{display:inline-block;margin:0;position:relative;vertical-align:middle}span.dso-progress-indicator-label{margin-left:16px;vertical-align:middle}:host{display:block}:host([block]){align-items:center;display:flex;justify-content:center}:host([size=small]) .dso-progress-indicator-spinner,:host(:not([size=medium]):not([size=large])) .dso-progress-indicator-spinner{height:24px;width:24px}:host([size=small]):host([block]),:host(:not([size=medium]):not([size=large])):host([block]){padding:12px 16px}:host([size=medium]) .dso-progress-indicator-spinner{height:32px;width:32px}:host([size=medium]):host([block]){padding:16px}:host([size=large]) .dso-progress-indicator-spinner{height:48px;width:48px}:host([size=large]):host([block]){padding:24px 16px}";
|
|
3857
|
+
|
|
3858
|
+
let Progressindicator = class extends HTMLElement {
|
|
3859
|
+
constructor() {
|
|
3860
|
+
super();
|
|
3861
|
+
this.__registerHost();
|
|
3862
|
+
this.__attachShadow();
|
|
3863
|
+
}
|
|
3864
|
+
render() {
|
|
3865
|
+
var _a;
|
|
3866
|
+
const label = (_a = this.label) !== null && _a !== void 0 ? _a : 'Resultaten laden: een moment geduld alstublieft.';
|
|
3867
|
+
return (h(Host, null, h("div", { class: "dso-progress-indicator-spinner", role: "progressbar", "aria-labelledby": "progress-indicator-label" }, h("svg", { class: "spinner", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg" }, h("style", null, `
|
|
3868
|
+
.spinner { animation: rotator 8s linear infinite; transform-origin: center; }
|
|
3869
|
+
@keyframes rotator { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
|
|
3870
|
+
.path { stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: #39870c; animation: dash 2s ease-in-out infinite; }
|
|
3871
|
+
@keyframes dash { 0% { stroke-dashoffset: 265; } 50% { stroke-dashoffset: 65; transform:rotate(90deg); } 100% { stroke-dashoffset: 265; transform:rotate(360deg); }
|
|
3872
|
+
`), h("circle", { class: "path", fill: "none", "stroke-width": "10", "stroke-linecap": "butt", cx: "50", cy: "50", r: "45" }))), h("span", { id: "progress-indicator-label", class: "dso-progress-indicator-label" }, label)));
|
|
3873
|
+
}
|
|
3874
|
+
static get style() { return progressIndicatorCss; }
|
|
3875
|
+
};
|
|
3876
|
+
|
|
3877
|
+
const selectableCss = ":host{display:block;padding:0 0 0 32px;position:relative}:host .dso-selectable-options{list-style:none;margin-top:8px;padding-left:0}:host .dso-selectable-options li+li{margin-top:8px}:host label{font-weight:400;line-height:24px;margin:0}:host input[type=checkbox][disabled]+label::before,:host input[type=checkbox][disabled]:active+label::before,:host input[type=checkbox][disabled]:focus+label::before,:host input[type=radio][disabled]+label::before,:host input[type=radio][disabled]:active+label::before,:host input[type=radio][disabled]:focus+label::before{background-color:#fff;box-shadow:0 0 0 2px #e5e5e5}:host input[type=checkbox],:host input[type=radio]{height:24px;left:0;margin:0;opacity:0;position:absolute;top:0;width:24px;z-index:100;zoom:1}@media (prefers-contrast: more){:host input[type=checkbox],:host input[type=radio]{opacity:1}}:host input[type=checkbox]:not([disabled]),:host input[type=radio]:not([disabled]){cursor:pointer}:host input[type=checkbox]+label,:host input[type=radio]+label{display:inline;font-style:normal;padding-left:0}:host input[type=checkbox]+label::before,:host input[type=radio]+label::before{background:#fff;border:0;box-shadow:0 0 0 2px var(--dso-selectable-color, #275937);content:\"\";height:20px;left:2px;position:absolute;top:2px;width:20px}:host input[type=checkbox]:focus,:host input[type=radio]:focus{outline:0}:host input[type=checkbox]:focus+label::before,:host input[type=radio]:focus+label::before{box-shadow:0 0 0 3px var(--dso-selectable-color, #275937);height:18px;left:3px;top:3px;width:18px}:host input[type=checkbox]:active+label::before,:host input[type=checkbox].active+label::before,:host input[type=radio]:active+label::before,:host input[type=radio].active+label::before{background-color:#ebf3e6;box-shadow:0 0 0 1px #275937;height:22px;left:1px;top:1px;width:22px}:host input[type=checkbox]+label::before{border-radius:4px}:host input[type=checkbox]+label::after{background:transparent;content:\"\";left:6px;opacity:0;position:absolute;top:6px;zoom:1}:host input[type=checkbox]:checked+label::after,:host input[type=checkbox]:indeterminate+label::after{opacity:1}:host input[type=checkbox]:checked+label::after{border:solid;border-color:var(--dso-selectable-color, #39870c);border-top-color:transparent;border-width:0 0 3px 3px;height:8px;transform:rotate(-45deg);width:13px}:host input[type=checkbox]:indeterminate+label::after{background-color:var(--dso-selectable-color, #39870c);height:12px;width:12px}:host input[type=radio]+label::before{border-radius:50%}:host input[type=radio]+label::after{background-color:transparent;border-radius:50%;content:\"\";height:12px;left:6px;opacity:0;position:absolute;top:6px;width:12px;zoom:1}:host input[type=radio]:checked+label::after{background-color:var(--dso-selectable-color, #39870c);opacity:1}:host>dso-info{float:none;margin:8px 16px 0 -32px;width:calc(100% + 32px)}:host(:not(:last-child)){margin-bottom:8px}*,*::after,*::before{box-sizing:border-box}";
|
|
3878
|
+
|
|
3879
|
+
let Selectable = class extends HTMLElement {
|
|
3880
|
+
constructor() {
|
|
3881
|
+
super();
|
|
3882
|
+
this.__registerHost();
|
|
3883
|
+
this.__attachShadow();
|
|
3884
|
+
this.change = createEvent(this, "dsoChange", 7);
|
|
3885
|
+
this.infoActive = false;
|
|
3886
|
+
this.fallbackIdentifier = createIdentifier('DsoSelectable');
|
|
3887
|
+
}
|
|
3888
|
+
async toggleInfo(active) {
|
|
3889
|
+
this.infoActive = active !== null && active !== void 0 ? active : !this.infoActive;
|
|
3890
|
+
}
|
|
3891
|
+
componentDidLoad() {
|
|
3892
|
+
var _a;
|
|
3893
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
3894
|
+
this.mutationObserver = new MutationObserver(() => forceUpdate(this.host));
|
|
3895
|
+
this.mutationObserver.observe(this.host, {
|
|
3896
|
+
childList: true
|
|
3897
|
+
});
|
|
3898
|
+
this.setIndeterminate();
|
|
3899
|
+
}
|
|
3900
|
+
disconnectedCallback() {
|
|
3901
|
+
var _a;
|
|
3902
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
3903
|
+
}
|
|
3904
|
+
setIndeterminate() {
|
|
3905
|
+
if (!(this.input instanceof HTMLInputElement) || this.type != 'checkbox') {
|
|
3906
|
+
return;
|
|
3907
|
+
}
|
|
3908
|
+
this.input.indeterminate = !!this.indeterminate;
|
|
3909
|
+
}
|
|
3910
|
+
render() {
|
|
3911
|
+
var _a;
|
|
3912
|
+
const hasInfo = !!this.host.querySelector('[slot="info"]');
|
|
3913
|
+
return (h(Fragment, null, h("input", { type: this.type, id: this.getIdentifier(), value: this.value, name: this.name, "aria-invalid": (_a = this.invalid) === null || _a === void 0 ? void 0 : _a.toString(), "aria-describedby": this.describedById, disabled: this.disabled, required: this.required, checked: this.checked, onChange: e => this.change.emit(e), ref: (el) => this.input = el }), h("label", { htmlFor: this.getIdentifier() }, h("slot", null)), hasInfo && (h(Fragment, null, !this.infoFixed && (h("dso-info-button", { active: this.infoActive, onToggle: e => this.infoActive = e.detail.active })), h("dso-info", { fixed: this.infoFixed, active: this.infoActive, onClose: () => this.infoActive = false }, h("slot", { name: "info" }))))));
|
|
3914
|
+
}
|
|
3915
|
+
getIdentifier() {
|
|
3916
|
+
var _a;
|
|
3917
|
+
return (_a = this.identifier) !== null && _a !== void 0 ? _a : this.fallbackIdentifier;
|
|
3918
|
+
}
|
|
3919
|
+
get host() { return this; }
|
|
3920
|
+
static get watchers() { return {
|
|
3921
|
+
"indeterminate": ["setIndeterminate"]
|
|
3922
|
+
}; }
|
|
3923
|
+
static get style() { return selectableCss; }
|
|
3924
|
+
};
|
|
3925
|
+
|
|
3926
|
+
const toggletipCss = "*,*::after,*::before{box-sizing:border-box}:host(:focus){outline:none}";
|
|
3927
|
+
|
|
3928
|
+
let Toggletip = class extends HTMLElement {
|
|
3929
|
+
constructor() {
|
|
3930
|
+
super();
|
|
3931
|
+
this.__registerHost();
|
|
3932
|
+
this.__attachShadow();
|
|
3933
|
+
this.active = false;
|
|
3934
|
+
this.label = "Toelichting";
|
|
3935
|
+
this.position = "right";
|
|
3936
|
+
this.click = () => {
|
|
3937
|
+
this.active ? this.close() : this.open();
|
|
3938
|
+
};
|
|
3097
3939
|
this.open = () => {
|
|
3098
3940
|
this.active = true;
|
|
3099
3941
|
this.host.addEventListener("keydown", this.keyDownListener);
|
|
@@ -3439,6 +4281,10 @@ function getContainingBlock(element) {
|
|
|
3439
4281
|
|
|
3440
4282
|
var currentNode = getParentNode(element);
|
|
3441
4283
|
|
|
4284
|
+
if (isShadowRoot(currentNode)) {
|
|
4285
|
+
currentNode = currentNode.host;
|
|
4286
|
+
}
|
|
4287
|
+
|
|
3442
4288
|
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
3443
4289
|
var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
3444
4290
|
// create a containing block.
|
|
@@ -3662,7 +4508,7 @@ function mapToStyles(_ref2) {
|
|
|
3662
4508
|
|
|
3663
4509
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
3664
4510
|
sideY = bottom;
|
|
3665
|
-
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
4511
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
3666
4512
|
offsetParent[heightProp];
|
|
3667
4513
|
y -= offsetY - popperRect.height;
|
|
3668
4514
|
y *= gpuAcceleration ? 1 : -1;
|
|
@@ -3670,7 +4516,7 @@ function mapToStyles(_ref2) {
|
|
|
3670
4516
|
|
|
3671
4517
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
3672
4518
|
sideX = right;
|
|
3673
|
-
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
4519
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
3674
4520
|
offsetParent[widthProp];
|
|
3675
4521
|
x -= offsetX - popperRect.width;
|
|
3676
4522
|
x *= gpuAcceleration ? 1 : -1;
|
|
@@ -4956,7 +5802,7 @@ var maxSize = {
|
|
|
4956
5802
|
}
|
|
4957
5803
|
};
|
|
4958
5804
|
|
|
4959
|
-
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:
|
|
5805
|
+
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:410}.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}";
|
|
4960
5806
|
|
|
4961
5807
|
// Keep const in sync with $tooltip-transition-duration in @dso-toolkit/sources/tooltip.scss tooltip_root() mixin
|
|
4962
5808
|
const transitionDuration = 150;
|
|
@@ -4964,7 +5810,7 @@ let Tooltip = class extends HTMLElement {
|
|
|
4964
5810
|
constructor() {
|
|
4965
5811
|
super();
|
|
4966
5812
|
this.__registerHost();
|
|
4967
|
-
|
|
5813
|
+
this.__attachShadow();
|
|
4968
5814
|
/**
|
|
4969
5815
|
* Set position of tooltip relative to target
|
|
4970
5816
|
*/
|
|
@@ -5113,32 +5959,32 @@ let Tooltip = class extends HTMLElement {
|
|
|
5113
5959
|
};
|
|
5114
5960
|
|
|
5115
5961
|
const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
|
|
5116
|
-
var _a, _b, _c;
|
|
5117
|
-
return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
|
|
5962
|
+
var _a, _b, _c, _d;
|
|
5963
|
+
return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems, 'is-expanded': (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) }), role: 'none' },
|
|
5118
5964
|
h("div", { class: "tree-branch-control" }, item.hasItems
|
|
5119
5965
|
?
|
|
5120
5966
|
h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
5121
|
-
h("dso-icon", { icon: item.open ? '
|
|
5967
|
+
h("dso-icon", { icon: item.open ? 'minus-square' : 'plus-square' }))
|
|
5122
5968
|
: h("dso-icon", null)),
|
|
5123
|
-
h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((
|
|
5969
|
+
h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_b = item.items) === null || _b === void 0 ? void 0 : _b.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
5124
5970
|
item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
|
|
5125
5971
|
item.href
|
|
5126
5972
|
? h("a", { href: item.href, tabindex: "-1" }, item.label)
|
|
5127
|
-
: h("span", null, item.label), (
|
|
5128
|
-
|
|
5973
|
+
: h("span", null, item.label), (_c = item.icons) === null || _c === void 0 ? void 0 :
|
|
5974
|
+
_c.map((icon) => h("dso-icon", { icon: icon.icon, title: icon.label }))),
|
|
5129
5975
|
item.open &&
|
|
5130
5976
|
h(Fragment, null, item.hasItems && !item.items && item.loading
|
|
5131
5977
|
? h("dso-progress-indicator", { size: "small", label: "Resultaten laden: een moment geduld alstublieft." })
|
|
5132
|
-
: h("ul", { role: "group" }, (
|
|
5978
|
+
: h("ul", { role: "group" }, (_d = item.items) === null || _d === void 0 ? void 0 : _d.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
|
|
5133
5979
|
};
|
|
5134
5980
|
|
|
5135
|
-
const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host
|
|
5981
|
+
const treeViewCss = ":host ul{list-style-type:none;padding-inline-start:32px;position:relative}:host li{position:relative}:host ul[role=tree]{padding-left:0}:host ul[role=group]::before{border-left:1px solid #275937;content:\"\";height:8px;left:44px;position:absolute;top:0;width:0}:host li:not(.has-child)::before{border-top:1px solid #275937;content:\"\";height:0;left:12px;position:absolute;top:20px;width:16px}:host li:not(.has-child)::after{border-left:1px solid #275937;content:\"\";height:100%;left:12px;position:absolute;top:8px;width:0}:host li:not(.has-child):last-child::after{height:20px;top:0}:host li.has-child::before{border-top:1px solid #275937;content:\"\";height:0;left:24px;position:absolute;top:20px;width:4px}:host li.has-child:not(:last-child)::after{border-left:1px solid #275937;content:\"\";height:calc(100% - 24px);left:12px;position:absolute;top:32px;width:0}:host li.has-child.is-expanded:last-child::after{border-left:1px solid #275937;content:\"\";height:calc(100% - 32px);left:12px;position:absolute;top:32px;width:0}:host .tree-branch-control{color:#39870c;display:inline-block;font-size:16px;margin:8px 8px 8px 0;vertical-align:top}:host .tree-branch-control>div{cursor:pointer}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0;max-width:calc(100% - 40px)}:host .tree-content a{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.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.active{color:#8b4a6a;font-style:italic;font-weight:700;text-decoration:underline}:host .tree-content.active:hover,:host .tree-content.active:focus{text-decoration:none}:host .tree-content.active a{color:#8b4a6a}:host .tree-content.active a:hover,:host .tree-content.active a:focus{text-decoration:none}:host .tree-content dso-icon{color:#39870c;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}";
|
|
5136
5982
|
|
|
5137
5983
|
let TreeView = class extends HTMLElement {
|
|
5138
5984
|
constructor() {
|
|
5139
5985
|
super();
|
|
5140
5986
|
this.__registerHost();
|
|
5141
|
-
|
|
5987
|
+
this.__attachShadow();
|
|
5142
5988
|
this.openItem = createEvent(this, "openItem", 7);
|
|
5143
5989
|
this.closeItem = createEvent(this, "closeItem", 7);
|
|
5144
5990
|
this.clickItem = createEvent(this, "clickItem", 7);
|
|
@@ -5287,713 +6133,6 @@ let TreeView = class extends HTMLElement {
|
|
|
5287
6133
|
static get style() { return treeViewCss; }
|
|
5288
6134
|
};
|
|
5289
6135
|
|
|
5290
|
-
/*!
|
|
5291
|
-
* focus-trap 6.7.3
|
|
5292
|
-
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
5293
|
-
*/
|
|
5294
|
-
|
|
5295
|
-
function ownKeys(object, enumerableOnly) {
|
|
5296
|
-
var keys = Object.keys(object);
|
|
5297
|
-
|
|
5298
|
-
if (Object.getOwnPropertySymbols) {
|
|
5299
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
5300
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
5301
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
5302
|
-
})), keys.push.apply(keys, symbols);
|
|
5303
|
-
}
|
|
5304
|
-
|
|
5305
|
-
return keys;
|
|
5306
|
-
}
|
|
5307
|
-
|
|
5308
|
-
function _objectSpread2(target) {
|
|
5309
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
5310
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
5311
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
5312
|
-
_defineProperty(target, key, source[key]);
|
|
5313
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
5314
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5315
|
-
});
|
|
5316
|
-
}
|
|
5317
|
-
|
|
5318
|
-
return target;
|
|
5319
|
-
}
|
|
5320
|
-
|
|
5321
|
-
function _defineProperty(obj, key, value) {
|
|
5322
|
-
if (key in obj) {
|
|
5323
|
-
Object.defineProperty(obj, key, {
|
|
5324
|
-
value: value,
|
|
5325
|
-
enumerable: true,
|
|
5326
|
-
configurable: true,
|
|
5327
|
-
writable: true
|
|
5328
|
-
});
|
|
5329
|
-
} else {
|
|
5330
|
-
obj[key] = value;
|
|
5331
|
-
}
|
|
5332
|
-
|
|
5333
|
-
return obj;
|
|
5334
|
-
}
|
|
5335
|
-
|
|
5336
|
-
var activeFocusTraps = function () {
|
|
5337
|
-
var trapQueue = [];
|
|
5338
|
-
return {
|
|
5339
|
-
activateTrap: function activateTrap(trap) {
|
|
5340
|
-
if (trapQueue.length > 0) {
|
|
5341
|
-
var activeTrap = trapQueue[trapQueue.length - 1];
|
|
5342
|
-
|
|
5343
|
-
if (activeTrap !== trap) {
|
|
5344
|
-
activeTrap.pause();
|
|
5345
|
-
}
|
|
5346
|
-
}
|
|
5347
|
-
|
|
5348
|
-
var trapIndex = trapQueue.indexOf(trap);
|
|
5349
|
-
|
|
5350
|
-
if (trapIndex === -1) {
|
|
5351
|
-
trapQueue.push(trap);
|
|
5352
|
-
} else {
|
|
5353
|
-
// move this existing trap to the front of the queue
|
|
5354
|
-
trapQueue.splice(trapIndex, 1);
|
|
5355
|
-
trapQueue.push(trap);
|
|
5356
|
-
}
|
|
5357
|
-
},
|
|
5358
|
-
deactivateTrap: function deactivateTrap(trap) {
|
|
5359
|
-
var trapIndex = trapQueue.indexOf(trap);
|
|
5360
|
-
|
|
5361
|
-
if (trapIndex !== -1) {
|
|
5362
|
-
trapQueue.splice(trapIndex, 1);
|
|
5363
|
-
}
|
|
5364
|
-
|
|
5365
|
-
if (trapQueue.length > 0) {
|
|
5366
|
-
trapQueue[trapQueue.length - 1].unpause();
|
|
5367
|
-
}
|
|
5368
|
-
}
|
|
5369
|
-
};
|
|
5370
|
-
}();
|
|
5371
|
-
|
|
5372
|
-
var isSelectableInput = function isSelectableInput(node) {
|
|
5373
|
-
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
5374
|
-
};
|
|
5375
|
-
|
|
5376
|
-
var isEscapeEvent = function isEscapeEvent(e) {
|
|
5377
|
-
return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;
|
|
5378
|
-
};
|
|
5379
|
-
|
|
5380
|
-
var isTabEvent = function isTabEvent(e) {
|
|
5381
|
-
return e.key === 'Tab' || e.keyCode === 9;
|
|
5382
|
-
};
|
|
5383
|
-
|
|
5384
|
-
var delay = function delay(fn) {
|
|
5385
|
-
return setTimeout(fn, 0);
|
|
5386
|
-
}; // Array.find/findIndex() are not supported on IE; this replicates enough
|
|
5387
|
-
// of Array.findIndex() for our needs
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
var findIndex = function findIndex(arr, fn) {
|
|
5391
|
-
var idx = -1;
|
|
5392
|
-
arr.every(function (value, i) {
|
|
5393
|
-
if (fn(value)) {
|
|
5394
|
-
idx = i;
|
|
5395
|
-
return false; // break
|
|
5396
|
-
}
|
|
5397
|
-
|
|
5398
|
-
return true; // next
|
|
5399
|
-
});
|
|
5400
|
-
return idx;
|
|
5401
|
-
};
|
|
5402
|
-
/**
|
|
5403
|
-
* Get an option's value when it could be a plain value, or a handler that provides
|
|
5404
|
-
* the value.
|
|
5405
|
-
* @param {*} value Option's value to check.
|
|
5406
|
-
* @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
|
|
5407
|
-
* @returns {*} The `value`, or the handler's returned value.
|
|
5408
|
-
*/
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
var valueOrHandler = function valueOrHandler(value) {
|
|
5412
|
-
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
5413
|
-
params[_key - 1] = arguments[_key];
|
|
5414
|
-
}
|
|
5415
|
-
|
|
5416
|
-
return typeof value === 'function' ? value.apply(void 0, params) : value;
|
|
5417
|
-
};
|
|
5418
|
-
|
|
5419
|
-
var getActualTarget = function getActualTarget(event) {
|
|
5420
|
-
// NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
|
|
5421
|
-
// shadow host. However, event.target.composedPath() will be an array of
|
|
5422
|
-
// nodes "clicked" from inner-most (the actual element inside the shadow) to
|
|
5423
|
-
// outer-most (the host HTML document). If we have access to composedPath(),
|
|
5424
|
-
// then use its first element; otherwise, fall back to event.target (and
|
|
5425
|
-
// this only works for an _open_ shadow DOM; otherwise,
|
|
5426
|
-
// composedPath()[0] === event.target always).
|
|
5427
|
-
return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
|
|
5428
|
-
};
|
|
5429
|
-
|
|
5430
|
-
var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
5431
|
-
// SSR: a live trap shouldn't be created in this type of environment so this
|
|
5432
|
-
// should be safe code to execute if the `document` option isn't specified
|
|
5433
|
-
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
|
5434
|
-
|
|
5435
|
-
var config = _objectSpread2({
|
|
5436
|
-
returnFocusOnDeactivate: true,
|
|
5437
|
-
escapeDeactivates: true,
|
|
5438
|
-
delayInitialFocus: true
|
|
5439
|
-
}, userOptions);
|
|
5440
|
-
|
|
5441
|
-
var state = {
|
|
5442
|
-
// @type {Array<HTMLElement>}
|
|
5443
|
-
containers: [],
|
|
5444
|
-
// list of objects identifying the first and last tabbable nodes in all containers/groups in
|
|
5445
|
-
// the trap
|
|
5446
|
-
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
5447
|
-
// is active, but the trap should never get to a state where there isn't at least one group
|
|
5448
|
-
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
5449
|
-
// result in an error being thrown)
|
|
5450
|
-
// @type {Array<{
|
|
5451
|
-
// container: HTMLElement,
|
|
5452
|
-
// firstTabbableNode: HTMLElement|null,
|
|
5453
|
-
// lastTabbableNode: HTMLElement|null,
|
|
5454
|
-
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
5455
|
-
// }>}
|
|
5456
|
-
tabbableGroups: [],
|
|
5457
|
-
nodeFocusedBeforeActivation: null,
|
|
5458
|
-
mostRecentlyFocusedNode: null,
|
|
5459
|
-
active: false,
|
|
5460
|
-
paused: false,
|
|
5461
|
-
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
5462
|
-
// has been delayed during activation
|
|
5463
|
-
delayInitialFocusTimer: undefined
|
|
5464
|
-
};
|
|
5465
|
-
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
|
|
5466
|
-
|
|
5467
|
-
var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
|
|
5468
|
-
return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
|
|
5469
|
-
};
|
|
5470
|
-
|
|
5471
|
-
var containersContain = function containersContain(element) {
|
|
5472
|
-
return !!(element && state.containers.some(function (container) {
|
|
5473
|
-
return container.contains(element);
|
|
5474
|
-
}));
|
|
5475
|
-
};
|
|
5476
|
-
/**
|
|
5477
|
-
* Gets the node for the given option, which is expected to be an option that
|
|
5478
|
-
* can be either a DOM node, a string that is a selector to get a node, `false`
|
|
5479
|
-
* (if a node is explicitly NOT given), or a function that returns any of these
|
|
5480
|
-
* values.
|
|
5481
|
-
* @param {string} optionName
|
|
5482
|
-
* @returns {undefined | false | HTMLElement | SVGElement} Returns
|
|
5483
|
-
* `undefined` if the option is not specified; `false` if the option
|
|
5484
|
-
* resolved to `false` (node explicitly not given); otherwise, the resolved
|
|
5485
|
-
* DOM node.
|
|
5486
|
-
* @throws {Error} If the option is set, not `false`, and is not, or does not
|
|
5487
|
-
* resolve to a node.
|
|
5488
|
-
*/
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
var getNodeForOption = function getNodeForOption(optionName) {
|
|
5492
|
-
var optionValue = config[optionName];
|
|
5493
|
-
|
|
5494
|
-
if (typeof optionValue === 'function') {
|
|
5495
|
-
for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
5496
|
-
params[_key2 - 1] = arguments[_key2];
|
|
5497
|
-
}
|
|
5498
|
-
|
|
5499
|
-
optionValue = optionValue.apply(void 0, params);
|
|
5500
|
-
}
|
|
5501
|
-
|
|
5502
|
-
if (!optionValue) {
|
|
5503
|
-
if (optionValue === undefined || optionValue === false) {
|
|
5504
|
-
return optionValue;
|
|
5505
|
-
} // else, empty string (invalid), null (invalid), 0 (invalid)
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
|
|
5509
|
-
}
|
|
5510
|
-
|
|
5511
|
-
var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
|
|
5512
|
-
|
|
5513
|
-
if (typeof optionValue === 'string') {
|
|
5514
|
-
node = doc.querySelector(optionValue); // resolve to node, or null if fails
|
|
5515
|
-
|
|
5516
|
-
if (!node) {
|
|
5517
|
-
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
|
5518
|
-
}
|
|
5519
|
-
}
|
|
5520
|
-
|
|
5521
|
-
return node;
|
|
5522
|
-
};
|
|
5523
|
-
|
|
5524
|
-
var getInitialFocusNode = function getInitialFocusNode() {
|
|
5525
|
-
var node = getNodeForOption('initialFocus'); // false explicitly indicates we want no initialFocus at all
|
|
5526
|
-
|
|
5527
|
-
if (node === false) {
|
|
5528
|
-
return false;
|
|
5529
|
-
}
|
|
5530
|
-
|
|
5531
|
-
if (node === undefined) {
|
|
5532
|
-
// option not specified: use fallback options
|
|
5533
|
-
if (containersContain(doc.activeElement)) {
|
|
5534
|
-
node = doc.activeElement;
|
|
5535
|
-
} else {
|
|
5536
|
-
var firstTabbableGroup = state.tabbableGroups[0];
|
|
5537
|
-
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode; // NOTE: `fallbackFocus` option function cannot return `false` (not supported)
|
|
5538
|
-
|
|
5539
|
-
node = firstTabbableNode || getNodeForOption('fallbackFocus');
|
|
5540
|
-
}
|
|
5541
|
-
}
|
|
5542
|
-
|
|
5543
|
-
if (!node) {
|
|
5544
|
-
throw new Error('Your focus-trap needs to have at least one focusable element');
|
|
5545
|
-
}
|
|
5546
|
-
|
|
5547
|
-
return node;
|
|
5548
|
-
};
|
|
5549
|
-
|
|
5550
|
-
var updateTabbableNodes = function updateTabbableNodes() {
|
|
5551
|
-
state.tabbableGroups = state.containers.map(function (container) {
|
|
5552
|
-
var tabbableNodes = tabbable(container); // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
5553
|
-
// are a superset of tabbable nodes
|
|
5554
|
-
|
|
5555
|
-
var focusableNodes = focusable(container);
|
|
5556
|
-
|
|
5557
|
-
if (tabbableNodes.length > 0) {
|
|
5558
|
-
return {
|
|
5559
|
-
container: container,
|
|
5560
|
-
firstTabbableNode: tabbableNodes[0],
|
|
5561
|
-
lastTabbableNode: tabbableNodes[tabbableNodes.length - 1],
|
|
5562
|
-
|
|
5563
|
-
/**
|
|
5564
|
-
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
5565
|
-
* in this container, if any.
|
|
5566
|
-
* @param {HTMLElement} node
|
|
5567
|
-
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
5568
|
-
* in reverse.
|
|
5569
|
-
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
5570
|
-
*/
|
|
5571
|
-
nextTabbableNode: function nextTabbableNode(node) {
|
|
5572
|
-
var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
5573
|
-
// NOTE: If tabindex is positive (in order to manipulate the tab order separate
|
|
5574
|
-
// from the DOM order), this __will not work__ because the list of focusableNodes,
|
|
5575
|
-
// while it contains tabbable nodes, does not sort its nodes in any order other
|
|
5576
|
-
// than DOM order, because it can't: Where would you place focusable (but not
|
|
5577
|
-
// tabbable) nodes in that order? They have no order, because they aren't tabbale...
|
|
5578
|
-
// Support for positive tabindex is already broken and hard to manage (possibly
|
|
5579
|
-
// not supportable, TBD), so this isn't going to make things worse than they
|
|
5580
|
-
// already are, and at least makes things better for the majority of cases where
|
|
5581
|
-
// tabindex is either 0/unset or negative.
|
|
5582
|
-
// FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375
|
|
5583
|
-
var nodeIdx = focusableNodes.findIndex(function (n) {
|
|
5584
|
-
return n === node;
|
|
5585
|
-
});
|
|
5586
|
-
|
|
5587
|
-
if (forward) {
|
|
5588
|
-
return focusableNodes.slice(nodeIdx + 1).find(function (n) {
|
|
5589
|
-
return isTabbable(n);
|
|
5590
|
-
});
|
|
5591
|
-
}
|
|
5592
|
-
|
|
5593
|
-
return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {
|
|
5594
|
-
return isTabbable(n);
|
|
5595
|
-
});
|
|
5596
|
-
}
|
|
5597
|
-
};
|
|
5598
|
-
}
|
|
5599
|
-
|
|
5600
|
-
return undefined;
|
|
5601
|
-
}).filter(function (group) {
|
|
5602
|
-
return !!group;
|
|
5603
|
-
}); // remove groups with no tabbable nodes
|
|
5604
|
-
// throw if no groups have tabbable nodes and we don't have a fallback focus node either
|
|
5605
|
-
|
|
5606
|
-
if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
|
|
5607
|
-
) {
|
|
5608
|
-
throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
|
|
5609
|
-
}
|
|
5610
|
-
};
|
|
5611
|
-
|
|
5612
|
-
var tryFocus = function tryFocus(node) {
|
|
5613
|
-
if (node === false) {
|
|
5614
|
-
return;
|
|
5615
|
-
}
|
|
5616
|
-
|
|
5617
|
-
if (node === doc.activeElement) {
|
|
5618
|
-
return;
|
|
5619
|
-
}
|
|
5620
|
-
|
|
5621
|
-
if (!node || !node.focus) {
|
|
5622
|
-
tryFocus(getInitialFocusNode());
|
|
5623
|
-
return;
|
|
5624
|
-
}
|
|
5625
|
-
|
|
5626
|
-
node.focus({
|
|
5627
|
-
preventScroll: !!config.preventScroll
|
|
5628
|
-
});
|
|
5629
|
-
state.mostRecentlyFocusedNode = node;
|
|
5630
|
-
|
|
5631
|
-
if (isSelectableInput(node)) {
|
|
5632
|
-
node.select();
|
|
5633
|
-
}
|
|
5634
|
-
};
|
|
5635
|
-
|
|
5636
|
-
var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
|
|
5637
|
-
var node = getNodeForOption('setReturnFocus', previousActiveElement);
|
|
5638
|
-
return node ? node : node === false ? false : previousActiveElement;
|
|
5639
|
-
}; // This needs to be done on mousedown and touchstart instead of click
|
|
5640
|
-
// so that it precedes the focus event.
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
var checkPointerDown = function checkPointerDown(e) {
|
|
5644
|
-
var target = getActualTarget(e);
|
|
5645
|
-
|
|
5646
|
-
if (containersContain(target)) {
|
|
5647
|
-
// allow the click since it ocurred inside the trap
|
|
5648
|
-
return;
|
|
5649
|
-
}
|
|
5650
|
-
|
|
5651
|
-
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
5652
|
-
// immediately deactivate the trap
|
|
5653
|
-
trap.deactivate({
|
|
5654
|
-
// if, on deactivation, we should return focus to the node originally-focused
|
|
5655
|
-
// when the trap was activated (or the configured `setReturnFocus` node),
|
|
5656
|
-
// then assume it's also OK to return focus to the outside node that was
|
|
5657
|
-
// just clicked, causing deactivation, as long as that node is focusable;
|
|
5658
|
-
// if it isn't focusable, then return focus to the original node focused
|
|
5659
|
-
// on activation (or the configured `setReturnFocus` node)
|
|
5660
|
-
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
5661
|
-
// which will result in the outside click setting focus to the node
|
|
5662
|
-
// that was clicked, whether it's focusable or not; by setting
|
|
5663
|
-
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
5664
|
-
// on activation (or the configured `setReturnFocus` node)
|
|
5665
|
-
returnFocus: config.returnFocusOnDeactivate && !isFocusable(target)
|
|
5666
|
-
});
|
|
5667
|
-
return;
|
|
5668
|
-
} // This is needed for mobile devices.
|
|
5669
|
-
// (If we'll only let `click` events through,
|
|
5670
|
-
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
5674
|
-
// allow the click outside the trap to take place
|
|
5675
|
-
return;
|
|
5676
|
-
} // otherwise, prevent the click
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
e.preventDefault();
|
|
5680
|
-
}; // In case focus escapes the trap for some strange reason, pull it back in.
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
var checkFocusIn = function checkFocusIn(e) {
|
|
5684
|
-
var target = getActualTarget(e);
|
|
5685
|
-
var targetContained = containersContain(target); // In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
5686
|
-
|
|
5687
|
-
if (targetContained || target instanceof Document) {
|
|
5688
|
-
if (targetContained) {
|
|
5689
|
-
state.mostRecentlyFocusedNode = target;
|
|
5690
|
-
}
|
|
5691
|
-
} else {
|
|
5692
|
-
// escaped! pull it back in to where it just left
|
|
5693
|
-
e.stopImmediatePropagation();
|
|
5694
|
-
tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
5695
|
-
}
|
|
5696
|
-
}; // Hijack Tab events on the first and last focusable nodes of the trap,
|
|
5697
|
-
// in order to prevent focus from escaping. If it escapes for even a
|
|
5698
|
-
// moment it can end up scrolling the page and causing confusion so we
|
|
5699
|
-
// kind of need to capture the action at the keydown phase.
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
var checkTab = function checkTab(e) {
|
|
5703
|
-
var target = getActualTarget(e);
|
|
5704
|
-
updateTabbableNodes();
|
|
5705
|
-
var destinationNode = null;
|
|
5706
|
-
|
|
5707
|
-
if (state.tabbableGroups.length > 0) {
|
|
5708
|
-
// make sure the target is actually contained in a group
|
|
5709
|
-
// NOTE: the target may also be the container itself if it's focusable
|
|
5710
|
-
// with tabIndex='-1' and was given initial focus
|
|
5711
|
-
var containerIndex = findIndex(state.tabbableGroups, function (_ref) {
|
|
5712
|
-
var container = _ref.container;
|
|
5713
|
-
return container.contains(target);
|
|
5714
|
-
});
|
|
5715
|
-
var containerGroup = containerIndex >= 0 ? state.tabbableGroups[containerIndex] : undefined;
|
|
5716
|
-
|
|
5717
|
-
if (containerIndex < 0) {
|
|
5718
|
-
// target not found in any group: quite possible focus has escaped the trap,
|
|
5719
|
-
// so bring it back in to...
|
|
5720
|
-
if (e.shiftKey) {
|
|
5721
|
-
// ...the last node in the last group
|
|
5722
|
-
destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
|
|
5723
|
-
} else {
|
|
5724
|
-
// ...the first node in the first group
|
|
5725
|
-
destinationNode = state.tabbableGroups[0].firstTabbableNode;
|
|
5726
|
-
}
|
|
5727
|
-
} else if (e.shiftKey) {
|
|
5728
|
-
// REVERSE
|
|
5729
|
-
// is the target the first tabbable node in a group?
|
|
5730
|
-
var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {
|
|
5731
|
-
var firstTabbableNode = _ref2.firstTabbableNode;
|
|
5732
|
-
return target === firstTabbableNode;
|
|
5733
|
-
});
|
|
5734
|
-
|
|
5735
|
-
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup.nextTabbableNode(target, false))) {
|
|
5736
|
-
// an exception case where the target is either the container itself, or
|
|
5737
|
-
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
5738
|
-
// and user clicked on it or node was programmatically given focus)
|
|
5739
|
-
// and is not followed by any other tabbable node, in which
|
|
5740
|
-
// case, we should handle shift+tab as if focus were on the container's
|
|
5741
|
-
// first tabbable node, and go to the last tabbable node of the LAST group
|
|
5742
|
-
startOfGroupIndex = containerIndex;
|
|
5743
|
-
}
|
|
5744
|
-
|
|
5745
|
-
if (startOfGroupIndex >= 0) {
|
|
5746
|
-
// YES: then shift+tab should go to the last tabbable node in the
|
|
5747
|
-
// previous group (and wrap around to the last tabbable node of
|
|
5748
|
-
// the LAST group if it's the first tabbable node of the FIRST group)
|
|
5749
|
-
var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
|
|
5750
|
-
var destinationGroup = state.tabbableGroups[destinationGroupIndex];
|
|
5751
|
-
destinationNode = destinationGroup.lastTabbableNode;
|
|
5752
|
-
}
|
|
5753
|
-
} else {
|
|
5754
|
-
// FORWARD
|
|
5755
|
-
// is the target the last tabbable node in a group?
|
|
5756
|
-
var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {
|
|
5757
|
-
var lastTabbableNode = _ref3.lastTabbableNode;
|
|
5758
|
-
return target === lastTabbableNode;
|
|
5759
|
-
});
|
|
5760
|
-
|
|
5761
|
-
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target) && !isTabbable(target) && !containerGroup.nextTabbableNode(target))) {
|
|
5762
|
-
// an exception case where the target is the container itself, or
|
|
5763
|
-
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
5764
|
-
// and user clicked on it or node was programmatically given focus)
|
|
5765
|
-
// and is not followed by any other tabbable node, in which
|
|
5766
|
-
// case, we should handle tab as if focus were on the container's
|
|
5767
|
-
// last tabbable node, and go to the first tabbable node of the FIRST group
|
|
5768
|
-
lastOfGroupIndex = containerIndex;
|
|
5769
|
-
}
|
|
5770
|
-
|
|
5771
|
-
if (lastOfGroupIndex >= 0) {
|
|
5772
|
-
// YES: then tab should go to the first tabbable node in the next
|
|
5773
|
-
// group (and wrap around to the first tabbable node of the FIRST
|
|
5774
|
-
// group if it's the last tabbable node of the LAST group)
|
|
5775
|
-
var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
|
|
5776
|
-
|
|
5777
|
-
var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
|
|
5778
|
-
destinationNode = _destinationGroup.firstTabbableNode;
|
|
5779
|
-
}
|
|
5780
|
-
}
|
|
5781
|
-
} else {
|
|
5782
|
-
// NOTE: the fallbackFocus option does not support returning false to opt-out
|
|
5783
|
-
destinationNode = getNodeForOption('fallbackFocus');
|
|
5784
|
-
}
|
|
5785
|
-
|
|
5786
|
-
if (destinationNode) {
|
|
5787
|
-
e.preventDefault();
|
|
5788
|
-
tryFocus(destinationNode);
|
|
5789
|
-
} // else, let the browser take care of [shift+]tab and move the focus
|
|
5790
|
-
|
|
5791
|
-
};
|
|
5792
|
-
|
|
5793
|
-
var checkKey = function checkKey(e) {
|
|
5794
|
-
if (isEscapeEvent(e) && valueOrHandler(config.escapeDeactivates, e) !== false) {
|
|
5795
|
-
e.preventDefault();
|
|
5796
|
-
trap.deactivate();
|
|
5797
|
-
return;
|
|
5798
|
-
}
|
|
5799
|
-
|
|
5800
|
-
if (isTabEvent(e)) {
|
|
5801
|
-
checkTab(e);
|
|
5802
|
-
return;
|
|
5803
|
-
}
|
|
5804
|
-
};
|
|
5805
|
-
|
|
5806
|
-
var checkClick = function checkClick(e) {
|
|
5807
|
-
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
5808
|
-
return;
|
|
5809
|
-
}
|
|
5810
|
-
|
|
5811
|
-
var target = getActualTarget(e);
|
|
5812
|
-
|
|
5813
|
-
if (containersContain(target)) {
|
|
5814
|
-
return;
|
|
5815
|
-
}
|
|
5816
|
-
|
|
5817
|
-
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
5818
|
-
return;
|
|
5819
|
-
}
|
|
5820
|
-
|
|
5821
|
-
e.preventDefault();
|
|
5822
|
-
e.stopImmediatePropagation();
|
|
5823
|
-
}; //
|
|
5824
|
-
// EVENT LISTENERS
|
|
5825
|
-
//
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
var addListeners = function addListeners() {
|
|
5829
|
-
if (!state.active) {
|
|
5830
|
-
return;
|
|
5831
|
-
} // There can be only one listening focus trap at a time
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
activeFocusTraps.activateTrap(trap); // Delay ensures that the focused element doesn't capture the event
|
|
5835
|
-
// that caused the focus trap activation.
|
|
5836
|
-
|
|
5837
|
-
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
|
|
5838
|
-
tryFocus(getInitialFocusNode());
|
|
5839
|
-
}) : tryFocus(getInitialFocusNode());
|
|
5840
|
-
doc.addEventListener('focusin', checkFocusIn, true);
|
|
5841
|
-
doc.addEventListener('mousedown', checkPointerDown, {
|
|
5842
|
-
capture: true,
|
|
5843
|
-
passive: false
|
|
5844
|
-
});
|
|
5845
|
-
doc.addEventListener('touchstart', checkPointerDown, {
|
|
5846
|
-
capture: true,
|
|
5847
|
-
passive: false
|
|
5848
|
-
});
|
|
5849
|
-
doc.addEventListener('click', checkClick, {
|
|
5850
|
-
capture: true,
|
|
5851
|
-
passive: false
|
|
5852
|
-
});
|
|
5853
|
-
doc.addEventListener('keydown', checkKey, {
|
|
5854
|
-
capture: true,
|
|
5855
|
-
passive: false
|
|
5856
|
-
});
|
|
5857
|
-
return trap;
|
|
5858
|
-
};
|
|
5859
|
-
|
|
5860
|
-
var removeListeners = function removeListeners() {
|
|
5861
|
-
if (!state.active) {
|
|
5862
|
-
return;
|
|
5863
|
-
}
|
|
5864
|
-
|
|
5865
|
-
doc.removeEventListener('focusin', checkFocusIn, true);
|
|
5866
|
-
doc.removeEventListener('mousedown', checkPointerDown, true);
|
|
5867
|
-
doc.removeEventListener('touchstart', checkPointerDown, true);
|
|
5868
|
-
doc.removeEventListener('click', checkClick, true);
|
|
5869
|
-
doc.removeEventListener('keydown', checkKey, true);
|
|
5870
|
-
return trap;
|
|
5871
|
-
}; //
|
|
5872
|
-
// TRAP DEFINITION
|
|
5873
|
-
//
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
trap = {
|
|
5877
|
-
activate: function activate(activateOptions) {
|
|
5878
|
-
if (state.active) {
|
|
5879
|
-
return this;
|
|
5880
|
-
}
|
|
5881
|
-
|
|
5882
|
-
var onActivate = getOption(activateOptions, 'onActivate');
|
|
5883
|
-
var onPostActivate = getOption(activateOptions, 'onPostActivate');
|
|
5884
|
-
var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
|
|
5885
|
-
|
|
5886
|
-
if (!checkCanFocusTrap) {
|
|
5887
|
-
updateTabbableNodes();
|
|
5888
|
-
}
|
|
5889
|
-
|
|
5890
|
-
state.active = true;
|
|
5891
|
-
state.paused = false;
|
|
5892
|
-
state.nodeFocusedBeforeActivation = doc.activeElement;
|
|
5893
|
-
|
|
5894
|
-
if (onActivate) {
|
|
5895
|
-
onActivate();
|
|
5896
|
-
}
|
|
5897
|
-
|
|
5898
|
-
var finishActivation = function finishActivation() {
|
|
5899
|
-
if (checkCanFocusTrap) {
|
|
5900
|
-
updateTabbableNodes();
|
|
5901
|
-
}
|
|
5902
|
-
|
|
5903
|
-
addListeners();
|
|
5904
|
-
|
|
5905
|
-
if (onPostActivate) {
|
|
5906
|
-
onPostActivate();
|
|
5907
|
-
}
|
|
5908
|
-
};
|
|
5909
|
-
|
|
5910
|
-
if (checkCanFocusTrap) {
|
|
5911
|
-
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
5912
|
-
return this;
|
|
5913
|
-
}
|
|
5914
|
-
|
|
5915
|
-
finishActivation();
|
|
5916
|
-
return this;
|
|
5917
|
-
},
|
|
5918
|
-
deactivate: function deactivate(deactivateOptions) {
|
|
5919
|
-
if (!state.active) {
|
|
5920
|
-
return this;
|
|
5921
|
-
}
|
|
5922
|
-
|
|
5923
|
-
clearTimeout(state.delayInitialFocusTimer); // noop if undefined
|
|
5924
|
-
|
|
5925
|
-
state.delayInitialFocusTimer = undefined;
|
|
5926
|
-
removeListeners();
|
|
5927
|
-
state.active = false;
|
|
5928
|
-
state.paused = false;
|
|
5929
|
-
activeFocusTraps.deactivateTrap(trap);
|
|
5930
|
-
var onDeactivate = getOption(deactivateOptions, 'onDeactivate');
|
|
5931
|
-
var onPostDeactivate = getOption(deactivateOptions, 'onPostDeactivate');
|
|
5932
|
-
var checkCanReturnFocus = getOption(deactivateOptions, 'checkCanReturnFocus');
|
|
5933
|
-
|
|
5934
|
-
if (onDeactivate) {
|
|
5935
|
-
onDeactivate();
|
|
5936
|
-
}
|
|
5937
|
-
|
|
5938
|
-
var returnFocus = getOption(deactivateOptions, 'returnFocus', 'returnFocusOnDeactivate');
|
|
5939
|
-
|
|
5940
|
-
var finishDeactivation = function finishDeactivation() {
|
|
5941
|
-
delay(function () {
|
|
5942
|
-
if (returnFocus) {
|
|
5943
|
-
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
5944
|
-
}
|
|
5945
|
-
|
|
5946
|
-
if (onPostDeactivate) {
|
|
5947
|
-
onPostDeactivate();
|
|
5948
|
-
}
|
|
5949
|
-
});
|
|
5950
|
-
};
|
|
5951
|
-
|
|
5952
|
-
if (returnFocus && checkCanReturnFocus) {
|
|
5953
|
-
checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
|
|
5954
|
-
return this;
|
|
5955
|
-
}
|
|
5956
|
-
|
|
5957
|
-
finishDeactivation();
|
|
5958
|
-
return this;
|
|
5959
|
-
},
|
|
5960
|
-
pause: function pause() {
|
|
5961
|
-
if (state.paused || !state.active) {
|
|
5962
|
-
return this;
|
|
5963
|
-
}
|
|
5964
|
-
|
|
5965
|
-
state.paused = true;
|
|
5966
|
-
removeListeners();
|
|
5967
|
-
return this;
|
|
5968
|
-
},
|
|
5969
|
-
unpause: function unpause() {
|
|
5970
|
-
if (!state.paused || !state.active) {
|
|
5971
|
-
return this;
|
|
5972
|
-
}
|
|
5973
|
-
|
|
5974
|
-
state.paused = false;
|
|
5975
|
-
updateTabbableNodes();
|
|
5976
|
-
addListeners();
|
|
5977
|
-
return this;
|
|
5978
|
-
},
|
|
5979
|
-
updateContainerElements: function updateContainerElements(containerElements) {
|
|
5980
|
-
var elementsAsArray = [].concat(containerElements).filter(Boolean);
|
|
5981
|
-
state.containers = elementsAsArray.map(function (element) {
|
|
5982
|
-
return typeof element === 'string' ? doc.querySelector(element) : element;
|
|
5983
|
-
});
|
|
5984
|
-
|
|
5985
|
-
if (state.active) {
|
|
5986
|
-
updateTabbableNodes();
|
|
5987
|
-
}
|
|
5988
|
-
|
|
5989
|
-
return this;
|
|
5990
|
-
}
|
|
5991
|
-
}; // initialize container elements
|
|
5992
|
-
|
|
5993
|
-
trap.updateContainerElements(elements);
|
|
5994
|
-
return trap;
|
|
5995
|
-
};
|
|
5996
|
-
|
|
5997
6136
|
const ViewerGridFilterpanelButtons = ({ onApply, onCancel }) => (h("div", { class: "filterpanel-buttons" },
|
|
5998
6137
|
h("button", { type: "button", class: "cancel-button", onClick: onCancel },
|
|
5999
6138
|
h("span", null, "Annuleren")),
|
|
@@ -6001,13 +6140,13 @@ const ViewerGridFilterpanelButtons = ({ onApply, onCancel }) => (h("div", { clas
|
|
|
6001
6140
|
h("span", null, "Toepassen"),
|
|
6002
6141
|
h("dso-icon", { icon: "chevron-right" }))));
|
|
6003
6142
|
|
|
6004
|
-
const viewerGridCss = "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}h1,.h1,h2,.h2,h3,.h3{margin-top:24px}h1{color:#275937;font-size:2rem;font-weight:700}h2{color:#275937;font-size:1.5rem;font-weight:700}h3{color:#275937;font-size:1.25rem;font-weight:600}h4,.h4,h5,.h5,h6,.h6{margin-top:12px}h4{color:#275937;font-size:1rem;font-weight:600}h5{color:#191919;font-size:1rem;font-weight:600}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{margin-bottom:12px}*,*::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}#filterpanel,.overlay{background-color:#fff;height:100%;overflow-y:auto;position:absolute;z-index:2}#filterpanel{box-shadow:2px 0 5px #666;padding:40px 16px 8px;left:0;max-width:896px;width:calc(100vw - 40px)}@media screen and (max-width: 768px){#filterpanel{width:100vw}#filterpanel::before{display:none !important}}#filterpanel::before{content:\"\";display:block;position:fixed;top:0;bottom:0;right:0;left:896px;background-color:rgba(0, 0, 0, 0.5)}@media screen and (max-width: 936px){#filterpanel::before{left:auto;width:40px}}.overlay{box-shadow:-2px 0 5px #666;padding:40px 16px 8px;right:0;width:624px}@media screen and (max-width: 624px){.overlay{width:100vw}}.overlay::before{content:\"\";display:block;position:fixed;top:0;bottom:0;left:0;right:624px;background-color:rgba(0, 0, 0, 0.5)}.filterpanel-buttons{text-align:right}.filterpanel-buttons .cancel-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;line-height:16px}.filterpanel-buttons .cancel-button:focus,.filterpanel-buttons .cancel-button:focus-visible{outline-offset:2px}.filterpanel-buttons .cancel-button:active{outline:0}.filterpanel-buttons .cancel-button.extern::after,.filterpanel-buttons .cancel-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.filterpanel-buttons .cancel-button:hover{background-color:#39870c;border-color:#39870c;color:#fff}.filterpanel-buttons .cancel-button:active{background-color:#275937;border-color:#275937;color:#fff}.filterpanel-buttons .cancel-button[disabled],.filterpanel-buttons .cancel-button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.filterpanel-buttons .cancel-button.btn-sm{line-height:16px}.filterpanel-buttons .cancel-button.btn-sm dso-icon,.filterpanel-buttons .cancel-button.btn-sm svg.di,.filterpanel-buttons .cancel-button.btn-sm.extern::after,.filterpanel-buttons .cancel-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .cancel-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}.filterpanel-buttons .cancel-button.download:hover::after{--dso-icon:var(--di-download-wit)}.filterpanel-buttons .cancel-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.filterpanel-buttons .cancel-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}.filterpanel-buttons .cancel-button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.filterpanel-buttons .cancel-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.filterpanel-buttons .cancel-button dso-icon,.filterpanel-buttons .cancel-button svg.di{margin-left:-8px;margin-right:8px}.filterpanel-buttons .cancel-button span+dso-icon,.filterpanel-buttons .cancel-button span+svg.di{margin-left:8px;margin-right:-8px}.filterpanel-buttons .cancel-button dso-icon,.filterpanel-buttons .cancel-button svg.di,.filterpanel-buttons .cancel-button.extern::after,.filterpanel-buttons .cancel-button.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .apply-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:#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;line-height:16px}.filterpanel-buttons .apply-button:focus,.filterpanel-buttons .apply-button:focus-visible{outline-offset:2px}.filterpanel-buttons .apply-button:active{outline:0}.filterpanel-buttons .apply-button.extern::after,.filterpanel-buttons .apply-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.filterpanel-buttons .apply-button:hover{background-color:#275937;border-color:#275937;color:#fff}.filterpanel-buttons .apply-button:active{background-color:#15301e;border-color:#15301e;color:#fff}.filterpanel-buttons .apply-button[disabled],.filterpanel-buttons .apply-button[disabled]:hover{background-color:#afcf9d;border-color:#afcf9d;color:#fff}.filterpanel-buttons .apply-button.btn-sm{line-height:16px}.filterpanel-buttons .apply-button.btn-sm dso-icon,.filterpanel-buttons .apply-button.btn-sm svg.di,.filterpanel-buttons .apply-button.btn-sm.extern::after,.filterpanel-buttons .apply-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .apply-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}.filterpanel-buttons .apply-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}.filterpanel-buttons .apply-button dso-icon,.filterpanel-buttons .apply-button svg.di{margin-left:-8px;margin-right:8px}.filterpanel-buttons .apply-button span+dso-icon,.filterpanel-buttons .apply-button span+svg.di{margin-left:8px;margin-right:-8px}.filterpanel-buttons .apply-button dso-icon,.filterpanel-buttons .apply-button svg.di,.filterpanel-buttons .apply-button.extern::after,.filterpanel-buttons .apply-button.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .cancel-button+.apply-button{margin-left:16px}";
|
|
6143
|
+
const viewerGridCss = "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}h1,.h1,h2,.h2,h3,.h3{margin-bottom:16px;margin-top:24px}h1,.h1{line-height:1.25}h1{color:#275937;font-size:2rem;font-weight:700}h2,.h2{line-height:1.33}h2{color:#275937;font-size:1.5rem;font-weight:700}h3,.h3{line-height:1.2}h3{color:#275937;font-size:1.25rem;font-weight:600}h4,.h4,h5,.h5,h6,.h6{margin-bottom:16px;margin-top:12px}h4,.h4{line-height:1.5}h4{color:#275937;font-size:1rem;font-weight:600}h5,.h5{line-height:1.5}h5{color:#191919;font-size:1rem;font-weight:600}h6,.h6{line-height:1.5}*,*::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:100}.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}#filterpanel,.overlay{background-color:#fff;height:100%;overflow-y:auto;position:absolute;z-index:101}#filterpanel{box-shadow:2px 0 5px #666;padding:40px 16px 8px;left:0;max-width:896px;width:calc(100vw - 40px)}@media screen and (max-width: 768px){#filterpanel{width:100vw}#filterpanel::before{display:none !important}}#filterpanel::before{content:\"\";display:block;position:fixed;top:0;bottom:0;right:0;left:896px;background-color:rgba(0, 0, 0, 0.5)}@media screen and (max-width: 936px){#filterpanel::before{left:auto;width:40px}}.overlay{box-shadow:-2px 0 5px #666;padding:40px 16px 8px;right:0;width:624px}@media screen and (max-width: 624px){.overlay{width:100vw}}.overlay::before{content:\"\";display:block;position:fixed;top:0;bottom:0;left:0;right:624px;background-color:rgba(0, 0, 0, 0.5)}.filterpanel-buttons{text-align:right}.filterpanel-buttons .cancel-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;line-height:16px}.filterpanel-buttons .cancel-button:focus,.filterpanel-buttons .cancel-button:focus-visible{outline-offset:2px}.filterpanel-buttons .cancel-button:active{outline:0}.filterpanel-buttons .cancel-button.extern::after,.filterpanel-buttons .cancel-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.filterpanel-buttons .cancel-button:hover{background-color:#39870c;border-color:#39870c;color:#fff}.filterpanel-buttons .cancel-button:active{background-color:#275937;border-color:#275937;color:#fff}.filterpanel-buttons .cancel-button[disabled],.filterpanel-buttons .cancel-button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.filterpanel-buttons .cancel-button.btn-sm{line-height:16px}.filterpanel-buttons .cancel-button.btn-sm dso-icon,.filterpanel-buttons .cancel-button.btn-sm svg.di,.filterpanel-buttons .cancel-button.btn-sm.extern::after,.filterpanel-buttons .cancel-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .cancel-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}.filterpanel-buttons .cancel-button.download:hover::after{--dso-icon:var(--di-download-wit)}.filterpanel-buttons .cancel-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.filterpanel-buttons .cancel-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}.filterpanel-buttons .cancel-button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.filterpanel-buttons .cancel-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.filterpanel-buttons .cancel-button dso-icon,.filterpanel-buttons .cancel-button svg.di{margin-left:-8px;margin-right:8px}.filterpanel-buttons .cancel-button span+dso-icon,.filterpanel-buttons .cancel-button span+svg.di{margin-left:8px;margin-right:-8px}.filterpanel-buttons .cancel-button dso-icon,.filterpanel-buttons .cancel-button svg.di,.filterpanel-buttons .cancel-button.extern::after,.filterpanel-buttons .cancel-button.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .apply-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:#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;line-height:16px}.filterpanel-buttons .apply-button:focus,.filterpanel-buttons .apply-button:focus-visible{outline-offset:2px}.filterpanel-buttons .apply-button:active{outline:0}.filterpanel-buttons .apply-button.extern::after,.filterpanel-buttons .apply-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.filterpanel-buttons .apply-button:hover{background-color:#275937;border-color:#275937;color:#fff}.filterpanel-buttons .apply-button:active{background-color:#15301e;border-color:#15301e;color:#fff}.filterpanel-buttons .apply-button[disabled],.filterpanel-buttons .apply-button[disabled]:hover{background-color:#afcf9d;border-color:#afcf9d;color:#fff}.filterpanel-buttons .apply-button.btn-sm{line-height:16px}.filterpanel-buttons .apply-button.btn-sm dso-icon,.filterpanel-buttons .apply-button.btn-sm svg.di,.filterpanel-buttons .apply-button.btn-sm.extern::after,.filterpanel-buttons .apply-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .apply-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}.filterpanel-buttons .apply-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}.filterpanel-buttons .apply-button dso-icon,.filterpanel-buttons .apply-button svg.di{margin-left:-8px;margin-right:8px}.filterpanel-buttons .apply-button span+dso-icon,.filterpanel-buttons .apply-button span+svg.di{margin-left:8px;margin-right:-8px}.filterpanel-buttons .apply-button dso-icon,.filterpanel-buttons .apply-button svg.di,.filterpanel-buttons .apply-button.extern::after,.filterpanel-buttons .apply-button.download::after{margin-bottom:-4px;margin-top:-4px}.filterpanel-buttons .cancel-button+.apply-button{margin-left:16px}";
|
|
6005
6144
|
|
|
6006
6145
|
let ViewerGrid = class extends HTMLElement {
|
|
6007
6146
|
constructor() {
|
|
6008
6147
|
super();
|
|
6009
6148
|
this.__registerHost();
|
|
6010
|
-
|
|
6149
|
+
this.__attachShadow();
|
|
6011
6150
|
this.closeOverlay = createEvent(this, "closeOverlay", 7);
|
|
6012
6151
|
this.filterpanelCancel = createEvent(this, "filterpanelCancel", 7);
|
|
6013
6152
|
this.filterpanelApply = createEvent(this, "filterpanelApply", 7);
|
|
@@ -6107,13 +6246,14 @@ const DsoHeader = /*@__PURE__*/proxyCustomElement(Header, [1,"dso-header",{"logi
|
|
|
6107
6246
|
const DsoHelpcenterPanel = /*@__PURE__*/proxyCustomElement(HelpcenterPanel, [1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]);
|
|
6108
6247
|
const DsoHighlightBox = /*@__PURE__*/proxyCustomElement(HighlightBox, [1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]);
|
|
6109
6248
|
const DsoIcon = /*@__PURE__*/proxyCustomElement(Icon, [1,"dso-icon",{"icon":[1]}]);
|
|
6249
|
+
const DsoImageOverlay = /*@__PURE__*/proxyCustomElement(ImageOverlay, [1,"dso-image-overlay",{"active":[32],"focused":[32]}]);
|
|
6110
6250
|
const DsoInfo = /*@__PURE__*/proxyCustomElement(Info, [1,"dso-info",{"fixed":[516],"active":[516]}]);
|
|
6111
6251
|
const DsoInfoButton = /*@__PURE__*/proxyCustomElement(InfoButton, [1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]);
|
|
6112
6252
|
const DsoLabel = /*@__PURE__*/proxyCustomElement(Label, [1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]);
|
|
6113
6253
|
const DsoMapBaseLayers = /*@__PURE__*/proxyCustomElement(MapBaseLayers, [1,"dso-map-base-layers",{"baseLayers":[16]}]);
|
|
6114
6254
|
const DsoMapControls = /*@__PURE__*/proxyCustomElement(MapControls, [1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]);
|
|
6115
6255
|
const DsoMapOverlays = /*@__PURE__*/proxyCustomElement(MapOverlays, [1,"dso-map-overlays",{"overlays":[16]}]);
|
|
6116
|
-
const DsoOzonContent = /*@__PURE__*/proxyCustomElement(OzonContent, [
|
|
6256
|
+
const DsoOzonContent = /*@__PURE__*/proxyCustomElement(OzonContent, [2,"dso-ozon-content",{"content":[1],"state":[32]}]);
|
|
6117
6257
|
const DsoProgressBar = /*@__PURE__*/proxyCustomElement(ProgressBar, [1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]);
|
|
6118
6258
|
const DsoProgressIndicator = /*@__PURE__*/proxyCustomElement(Progressindicator, [1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]);
|
|
6119
6259
|
const DsoSelectable = /*@__PURE__*/proxyCustomElement(Selectable, [1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}]);
|
|
@@ -6135,6 +6275,7 @@ const defineCustomElements = (opts) => {
|
|
|
6135
6275
|
DsoHelpcenterPanel,
|
|
6136
6276
|
DsoHighlightBox,
|
|
6137
6277
|
DsoIcon,
|
|
6278
|
+
DsoImageOverlay,
|
|
6138
6279
|
DsoInfo,
|
|
6139
6280
|
DsoInfoButton,
|
|
6140
6281
|
DsoLabel,
|
|
@@ -6157,4 +6298,4 @@ const defineCustomElements = (opts) => {
|
|
|
6157
6298
|
}
|
|
6158
6299
|
};
|
|
6159
6300
|
|
|
6160
|
-
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 };
|
|
6301
|
+
export { DsoAlert, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoDatePicker, DsoDropdownMenu, DsoHeader, DsoHelpcenterPanel, DsoHighlightBox, DsoIcon, DsoImageOverlay, DsoInfo, DsoInfoButton, DsoLabel, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoOzonContent, DsoProgressBar, DsoProgressIndicator, DsoSelectable, DsoToggletip, DsoTooltip, DsoTreeView, DsoViewerGrid, defineCustomElements };
|