@dso-toolkit/core 33.1.0 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
- package/dist/cjs/dso-autosuggest.cjs.entry.js +8 -72
- 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 +11 -11
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +19 -232
- package/dist/cjs/dso-header.cjs.entry.js +101 -0
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-info-button.cjs.entry.js +2 -2
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-label.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +7 -6
- package/dist/cjs/dso-map-controls.cjs.entry.js +3 -3
- package/dist/cjs/dso-map-overlays.cjs.entry.js +9 -10
- package/dist/cjs/dso-ozon-content.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +2 -2
- package/dist/cjs/dso-tooltip.cjs.entry.js +169 -76
- package/dist/cjs/dso-tree-view.cjs.entry.js +2 -2
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +778 -0
- package/dist/cjs/{index-fcdfdd38.js → index-5ea63531.js} +26 -2
- package/dist/cjs/index-794ad37a.js +72 -0
- package/dist/cjs/index.esm-2ac7081c.js +267 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/alert/alert.css +0 -3
- package/dist/collection/components/anchor/anchor.template.js +17 -0
- package/dist/collection/components/attachments-counter/attachments-counter.css +0 -4
- package/dist/collection/components/autosuggest/autosuggest.css +0 -3
- package/dist/collection/components/autosuggest/autosuggest.js +19 -1
- package/dist/collection/components/autosuggest/autosuggest.template.js +2 -1
- package/dist/collection/components/badge/badge.css +0 -3
- package/dist/collection/components/banner/banner.css +0 -3
- package/dist/collection/components/button/button.template.js +48 -0
- package/dist/collection/components/context/context.template.js +42 -0
- package/dist/collection/components/date-picker/date-picker.css +0 -3
- package/dist/collection/components/date-picker/date-picker.js +10 -10
- package/dist/collection/components/definition-list/definition-list.template.js +36 -0
- package/dist/collection/components/dropdown-menu/dropdown-menu.css +0 -3
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +15 -4
- package/dist/collection/components/header/header.css +433 -0
- package/dist/collection/components/header/header.js +294 -0
- package/dist/collection/components/header/header.template.js +32 -0
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.css +0 -3
- package/dist/collection/components/highlight-box/highlight-box.css +0 -3
- package/dist/collection/components/icon/icon.css +0 -4
- package/dist/collection/components/info/info.css +1 -4
- package/dist/collection/components/info-button/info-button.css +1 -3
- package/dist/collection/components/label/label.css +0 -3
- package/dist/collection/components/label/label.js +2 -1
- package/dist/collection/components/label-group/label-group.template.js +7 -0
- package/dist/collection/components/list/list.template.js +37 -0
- package/dist/collection/components/map-base-layers/map-base-layers.css +4 -3
- package/dist/collection/components/map-base-layers/map-base-layers.js +10 -27
- package/dist/collection/components/map-controls/map-controls.css +18 -11
- package/dist/collection/components/map-controls/map-controls.js +10 -11
- package/dist/collection/components/map-controls/map-controls.template.js +12 -20
- package/dist/collection/components/map-overlays/map-overlays.css +4 -3
- package/dist/collection/components/map-overlays/map-overlays.js +13 -35
- package/dist/collection/components/ozon-content/ozon-content.css +0 -3
- package/dist/collection/components/progress-bar/progress-bar.css +0 -3
- package/dist/collection/components/progress-indicator/progress-indicator.css +0 -3
- package/dist/collection/components/selectable/selectable.css +0 -3
- package/dist/collection/components/toggletip/toggletip.css +0 -3
- package/dist/collection/components/tooltip/tooltip.css +34 -15
- package/dist/collection/components/tooltip/tooltip.js +19 -4
- package/dist/collection/components/tooltip/tooltip.template.js +3 -5
- package/dist/collection/components/tree-view/tree-view.css +3 -3
- package/dist/collection/components/viewer-grid/viewer-grid-document-header.template.js +39 -0
- package/dist/collection/components/viewer-grid/viewer-grid-document-list-item.template.js +19 -0
- package/dist/collection/components/viewer-grid/viewer-grid-filterblok.template.js +28 -0
- package/dist/collection/components/viewer-grid/viewer-grid.css +251 -0
- package/dist/collection/components/viewer-grid/viewer-grid.js +127 -0
- package/dist/collection/components/viewer-grid/viewer-grid.template.js +23 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +1130 -117
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-06de0fa1.entry.js +1 -0
- package/dist/dso-toolkit/p-10aa1fba.entry.js +1 -0
- package/dist/dso-toolkit/p-17f073d1.entry.js +1 -0
- package/dist/dso-toolkit/p-1805f5b0.js +1 -0
- package/dist/dso-toolkit/{p-75233655.entry.js → p-1fefbf8c.entry.js} +1 -1
- package/dist/dso-toolkit/{p-a52d3623.entry.js → p-20856f91.entry.js} +1 -1
- package/dist/dso-toolkit/{p-262858dd.entry.js → p-2b6a3dfa.entry.js} +1 -1
- package/dist/dso-toolkit/{p-be5682cc.entry.js → p-348414bf.entry.js} +1 -1
- package/dist/dso-toolkit/{p-984551a8.entry.js → p-3b493a2c.entry.js} +1 -1
- package/dist/dso-toolkit/p-4e573fc5.entry.js +1 -0
- package/dist/dso-toolkit/{p-c9c1bc8f.entry.js → p-5037944e.entry.js} +1 -1
- package/dist/dso-toolkit/p-7b006b11.entry.js +1 -0
- package/dist/dso-toolkit/p-8bf3a60e.js +5 -0
- package/dist/dso-toolkit/p-8f21d07d.entry.js +5 -0
- package/dist/dso-toolkit/{p-83f166b3.entry.js → p-94dffa65.entry.js} +1 -1
- package/dist/dso-toolkit/{p-b07991b9.entry.js → p-951f5872.entry.js} +1 -1
- package/dist/dso-toolkit/p-a6c9e063.entry.js +1 -0
- package/dist/dso-toolkit/p-a7306b7b.entry.js +1 -0
- package/dist/dso-toolkit/p-aadc4f8e.entry.js +1 -0
- package/dist/dso-toolkit/p-ad2210ad.entry.js +1 -0
- package/dist/dso-toolkit/{p-b5b946de.entry.js → p-bc14cafd.entry.js} +1 -1
- package/dist/dso-toolkit/{p-5665f1ee.entry.js → p-c54ecae1.entry.js} +1 -1
- package/dist/dso-toolkit/p-c95108fe.entry.js +1 -0
- package/dist/dso-toolkit/{p-e814d644.entry.js → p-daa1e29d.entry.js} +1 -1
- package/dist/dso-toolkit/p-dad72605.js +1 -0
- package/dist/dso-toolkit/{p-2e7d535c.entry.js → p-dc86d830.entry.js} +1 -1
- package/dist/dso-toolkit/{p-19de4cc7.entry.js → p-f0b67246.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +2 -2
- package/dist/esm/dso-autosuggest.entry.js +7 -71
- 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 +11 -11
- package/dist/esm/dso-dropdown-menu.entry.js +17 -230
- package/dist/esm/dso-header.entry.js +97 -0
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-info-button.entry.js +2 -2
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-label.entry.js +2 -2
- package/dist/esm/dso-map-base-layers.entry.js +7 -6
- package/dist/esm/dso-map-controls.entry.js +3 -3
- package/dist/esm/dso-map-overlays.entry.js +9 -10
- package/dist/esm/dso-ozon-content.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +2 -2
- package/dist/esm/dso-tooltip.entry.js +169 -76
- package/dist/esm/dso-tree-view.entry.js +2 -2
- package/dist/esm/dso-viewer-grid.entry.js +774 -0
- package/dist/esm/{index-61410be2.js → index-d54cae76.js} +26 -2
- package/dist/esm/index-f2bf58ce.js +70 -0
- package/dist/esm/index.esm-a1362957.js +262 -0
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/anchor/anchor.template.d.ts +2 -0
- package/dist/types/components/autosuggest/autosuggest.d.ts +5 -0
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
- package/dist/types/components/button/button.template.d.ts +2 -0
- package/dist/types/components/context/context.template.d.ts +3 -0
- package/dist/types/components/definition-list/definition-list.template.d.ts +3 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +36 -0
- package/dist/types/components/header/header.template.d.ts +2 -0
- package/dist/types/components/label-group/label-group.template.d.ts +2 -0
- package/dist/types/components/list/list.template.d.ts +3 -0
- package/dist/types/components/map-base-layers/map-base-layers.d.ts +3 -4
- package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +6 -1
- package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
- package/dist/types/components/map-overlays/map-overlays.d.ts +4 -4
- package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +7 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components/viewer-grid/viewer-grid-document-header.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid-document-list-item.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid-filterblok.template.d.ts +3 -0
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +22 -0
- package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +3 -0
- package/dist/types/components.d.ts +54 -8
- package/package.json +4 -2
- package/dist/dso-toolkit/p-08427682.entry.js +0 -1
- package/dist/dso-toolkit/p-39dae284.entry.js +0 -1
- package/dist/dso-toolkit/p-741e96de.entry.js +0 -5
- package/dist/dso-toolkit/p-759920d0.entry.js +0 -1
- package/dist/dso-toolkit/p-9e9f8bcf.entry.js +0 -1
- package/dist/dso-toolkit/p-a40eeb32.js +0 -1
- package/dist/dso-toolkit/p-affe82e6.entry.js +0 -1
- package/dist/dso-toolkit/p-e03d7741.entry.js +0 -1
- package/dist/dso-toolkit/p-e4269e02.entry.js +0 -1
- package/dist/dso-toolkit/p-e7700d9e.entry.js +0 -1
|
@@ -1,75 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-d54cae76.js';
|
|
2
|
+
import { d as debounce_1 } from './index-f2bf58ce.js';
|
|
2
3
|
import { v as v4 } from './v4-fa4bb814.js';
|
|
3
4
|
|
|
4
|
-
/**
|
|
5
|
-
* Returns a function, that, as long as it continues to be invoked, will not
|
|
6
|
-
* be triggered. The function will be called after it stops being called for
|
|
7
|
-
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
8
|
-
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
9
|
-
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
10
|
-
*
|
|
11
|
-
* @source underscore.js
|
|
12
|
-
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
13
|
-
* @param {Function} function to wrap
|
|
14
|
-
* @param {Number} timeout in ms (`100`)
|
|
15
|
-
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
16
|
-
* @api public
|
|
17
|
-
*/
|
|
18
|
-
function debounce(func, wait, immediate){
|
|
19
|
-
var timeout, args, context, timestamp, result;
|
|
20
|
-
if (null == wait) wait = 100;
|
|
21
|
-
|
|
22
|
-
function later() {
|
|
23
|
-
var last = Date.now() - timestamp;
|
|
24
|
-
|
|
25
|
-
if (last < wait && last >= 0) {
|
|
26
|
-
timeout = setTimeout(later, wait - last);
|
|
27
|
-
} else {
|
|
28
|
-
timeout = null;
|
|
29
|
-
if (!immediate) {
|
|
30
|
-
result = func.apply(context, args);
|
|
31
|
-
context = args = null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
var debounced = function(){
|
|
36
|
-
context = this;
|
|
37
|
-
args = arguments;
|
|
38
|
-
timestamp = Date.now();
|
|
39
|
-
var callNow = immediate && !timeout;
|
|
40
|
-
if (!timeout) timeout = setTimeout(later, wait);
|
|
41
|
-
if (callNow) {
|
|
42
|
-
result = func.apply(context, args);
|
|
43
|
-
context = args = null;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return result;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
debounced.clear = function() {
|
|
50
|
-
if (timeout) {
|
|
51
|
-
clearTimeout(timeout);
|
|
52
|
-
timeout = null;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
debounced.flush = function() {
|
|
57
|
-
if (timeout) {
|
|
58
|
-
result = func.apply(context, args);
|
|
59
|
-
context = args = null;
|
|
60
|
-
|
|
61
|
-
clearTimeout(timeout);
|
|
62
|
-
timeout = null;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
return debounced;
|
|
67
|
-
}
|
|
68
|
-
// Adds compatibility for ES modules
|
|
69
|
-
debounce.debounce = debounce;
|
|
70
|
-
|
|
71
|
-
var debounce_1 = debounce;
|
|
72
|
-
|
|
73
5
|
function escapeStringRegexp(string) {
|
|
74
6
|
if (typeof string !== 'string') {
|
|
75
7
|
throw new TypeError('Expected a string');
|
|
@@ -89,6 +21,7 @@ let Autosuggest = class {
|
|
|
89
21
|
registerInstance(this, hostRef);
|
|
90
22
|
this.selectEmitter = createEvent(this, "dsoSelect", 7);
|
|
91
23
|
this.changeEmitter = createEvent(this, "dsoChange", 7);
|
|
24
|
+
this.searchEmitter = createEvent(this, "dsoSearch", 7);
|
|
92
25
|
/**
|
|
93
26
|
* The suggestions for the value of the slotted input element
|
|
94
27
|
*/
|
|
@@ -275,9 +208,12 @@ let Autosuggest = class {
|
|
|
275
208
|
this.selectFirstSuggestion();
|
|
276
209
|
}
|
|
277
210
|
pickSelectedValue() {
|
|
278
|
-
if (this.selectedSuggestion) {
|
|
211
|
+
if (this.selectedSuggestion && this.showSuggestions) {
|
|
279
212
|
this.selectEmitter.emit(this.selectedSuggestion);
|
|
280
213
|
}
|
|
214
|
+
else {
|
|
215
|
+
this.searchEmitter.emit(this.input.value);
|
|
216
|
+
}
|
|
281
217
|
this.closeSuggestions();
|
|
282
218
|
}
|
|
283
219
|
listboxItemId(suggestion) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-d54cae76.js';
|
|
2
2
|
import { c as clsx } from './clsx.m-071989db.js';
|
|
3
3
|
|
|
4
4
|
const badgeCss = ":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-badge{background-color:#666;border-radius:1em;color:#fff;display:inline-block;font-size:0.875em;line-height:1em;padding:4px 8px}.dso-badge.badge-info{background-color:#6ca4d9;color:#191919}.dso-badge.badge-primary{background-color:#275937;color:#fff}.dso-badge.badge-success{background-color:#39870c;color:#fff}.dso-badge.badge-warning{background-color:#dcd400;color:#191919}.dso-badge.badge-danger{background-color:#ce3f51;color:#fff}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-d54cae76.js';
|
|
2
2
|
import { c as clsx } from './clsx.m-071989db.js';
|
|
3
3
|
|
|
4
4
|
const bannerCss = ":host{display:block;--di-status-danger:url(\"data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-warning:url(\"data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e\");--di-download-grijs90:url(\"data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e\");--di-external-link-grijs90:url(\"data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.dso-banner{padding:16px 0;position:relative}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-d54cae76.js';
|
|
2
2
|
import { c as createIdentifier } from './create-identifier-22acd3a3.js';
|
|
3
3
|
|
|
4
4
|
var DaysOfWeek;
|
|
@@ -240,7 +240,7 @@ const localization = {
|
|
|
240
240
|
]
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
const datePickerCss = "
|
|
243
|
+
const datePickerCss = ".sc-dso-date-picker-h{display:block}.dso-date.sc-dso-date-picker *.sc-dso-date-picker,.dso-date.sc-dso-date-picker *.sc-dso-date-picker::before,.dso-date.sc-dso-date-picker *.sc-dso-date-picker::after{box-sizing:border-box}.dso-date.sc-dso-date-picker{box-sizing:border-box;color:#191919;display:block;font-family:\"Asap\", sans-serif;margin:0;position:relative;text-align:left;width:100%}.dso-date__input.sc-dso-date-picker{display:block;width:100%;height:40px;padding:6px 14px;font-size:16px;line-height:1.5;color:#191919;background-color:#fff;background-image:none;border:1px solid #275937;border-radius:4px;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s}.dso-date__input.sc-dso-date-picker::-moz-placeholder{color:#666;opacity:1}.dso-date__input.sc-dso-date-picker:-ms-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-webkit-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-ms-expand{background-color:transparent;border:0}.dso-date__input.sc-dso-date-picker:focus{border-color:#275937;outline:0;box-shadow:inset 0 0 0 1px #275937}.dso-date__input[disabled].sc-dso-date-picker,.dso-date__input[readonly].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{background-color:#fff;opacity:1}.dso-date__input[disabled].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{cursor:default}.dso-date__input[disabled].sc-dso-date-picker{border-color:#e5e5e5;color:#999}.dso-date__input[readonly].sc-dso-date-picker{border-width:1px}.dso-date__input[type=text].sc-dso-date-picker{line-height:40px}.dso-date__input[size].sc-dso-date-picker{width:auto}.dso-date__toggle.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;-webkit-user-select:none;align-items:center;appearance:none;background:transparent;border:0;border-radius:0;border-bottom-right-radius:4px;border-top-right-radius:4px;color:#39870c;cursor:pointer;display:flex;height:38px;justify-content:center;padding:0;position:absolute;right:0;transform:translateY(-50%);top:50%;user-select:none;width:38px;z-index:2}.dso-date__toggle.sc-dso-date-picker:disabled{color:#afcf9d;cursor:pointer}.dso-date__dialog.sc-dso-date-picker{display:flex;right:0;min-width:320px;opacity:0;position:absolute;top:100%;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;visibility:hidden;will-change:transform, opacity, visibility;z-index:600}@media (max-width: 35.9375em){.dso-date__dialog.sc-dso-date-picker{background:rgba(25, 25, 25, 0.5);bottom:0;position:fixed;left:0;right:0;top:0;transform:translateZ(0);transform-origin:bottom center}}.dso-date__dialog.is-left.sc-dso-date-picker{left:auto;right:0;width:auto}.dso-date__dialog.is-active.sc-dso-date-picker{opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.dso-date__dialog-content.sc-dso-date-picker{background:#fff;border:1px solid rgba(0, 0, 0, 0.1);border-radius:4px;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);margin-left:auto;margin-right:-1px;margin-top:8px;max-width:310px;min-width:290px;padding:16px;position:relative;transform:none;width:100%;z-index:600}@media (max-width: 35.9375em){.dso-date__dialog-content.sc-dso-date-picker{border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;bottom:0;left:0;margin:0;max-width:none;min-height:26em;opacity:0;padding:0 8% 20px;position:absolute;transform:translateZ(0) translateY(100%);transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;visibility:hidden;will-change:transform, opacity, visibility}.is-active.sc-dso-date-picker .dso-date__dialog-content.sc-dso-date-picker{opacity:1;transform:translateZ(0) translateY(0);visibility:visible}}.dso-date__table.sc-dso-date-picker{border-collapse:collapse;border-spacing:0;color:#191919;font-size:1rem;font-weight:400;line-height:1.25;min-width:280px;table-layout:fixed;text-align:center;width:100%}.dso-date__table-header.sc-dso-date-picker{font-size:0.875em;font-weight:600;height:36px;line-height:36px;text-decoration:none;text-transform:uppercase}.dso-date__cell.sc-dso-date-picker{height:40px;padding:1px;text-align:center;width:40px}.dso-date__day.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;box-shadow:0 0 0 1px transparent;color:#191919;cursor:pointer;display:inline-block;font-family:\"Asap\", sans-serif;font-variant-numeric:tabular-nums;font-weight:400;height:38px;line-height:0;padding:0;position:relative;text-align:center;vertical-align:middle;width:38px;z-index:1}.dso-date__day.is-today.sc-dso-date-picker{background:transparent;height:36px;box-shadow:0 0 0 1px #39870c;width:36px}.dso-date__day.sc-dso-date-picker:hover,.dso-date__day.sc-dso-date-picker:active{background:#39870c;color:#fff}.dso-date__day.sc-dso-date-picker:focus{background:transparent;box-shadow:0 0 0 2px #275937;color:#191919;height:34px;outline:0;width:34px}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker{background:#39870c;color:#fff}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker:focus{background:transparent}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker:focus span[aria-hidden=true].sc-dso-date-picker{background:#39870c;border:1px solid #fff;line-height:32px}.dso-date__day.is-outside.sc-dso-date-picker{background:#f2f2f2;box-shadow:none;color:#666;cursor:default;pointer-events:none}.dso-date__day.is-disabled.sc-dso-date-picker{background:#fff;cursor:default}.dso-date__day.is-disabled.sc-dso-date-picker:hover{color:#666}.dso-date__day.sc-dso-date-picker span[aria-hidden=true].sc-dso-date-picker{border-radius:50%;display:inline-block;height:34px;line-height:34px;width:34px}.dso-date__header.sc-dso-date-picker{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px;width:100%}.dso-date__header.sc-dso-date-picker span.sc-dso-date-picker{font-size:0.875rem}.dso-date__nav.sc-dso-date-picker{white-space:nowrap}.dso-date__prev.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;align-items:center;appearance:none;background:transparent;border:1px solid #39870c;border-radius:4px;box-sizing:border-box;color:#39870c;cursor:pointer;display:inline-flex;font-size:1em;height:32px;justify-content:center;margin-left:8px;padding:0;width:32px}@media (max-width: 35.9375em){.dso-date__prev.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker{height:40px;width:40px}}.dso-date__prev.sc-dso-date-picker:hover,.dso-date__prev.sc-dso-date-picker:active,.dso-date__next.sc-dso-date-picker:hover,.dso-date__next.sc-dso-date-picker:active{background-color:#39870c;color:#fff}.dso-date__prev.sc-dso-date-picker:focus,.dso-date__next.sc-dso-date-picker:focus{background:transparent;color:#39870c}.dso-date__prev.sc-dso-date-picker:disabled,.dso-date__prev.sc-dso-date-picker:disabled:hover,.dso-date__next.sc-dso-date-picker:disabled,.dso-date__next.sc-dso-date-picker:disabled:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d;opacity:1}.dso-date__prev.sc-dso-date-picker svg.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker svg.sc-dso-date-picker{margin:0 auto}.dso-date__select.sc-dso-date-picker{display:inline-flex;height:28px;line-height:28px;position:relative}.dso-date__select.sc-dso-date-picker span.sc-dso-date-picker{margin-right:4px}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker{color:#275937;cursor:pointer;font-size:1rem;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:2}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker:focus+.dso-date__select-label.sc-dso-date-picker{box-shadow:0 0 0 2px #275937}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker:disabled{color:#afcf9d}.dso-date__select-label.sc-dso-date-picker{align-items:center;border-radius:4px;color:#39870c;display:flex;padding:0 4px 0 8px;pointer-events:none;position:relative;width:100%;z-index:1}.dso-date__select-label.sc-dso-date-picker span.sc-dso-date-picker{font-size:1.25rem;font-weight:600;line-height:1.25}.dso-date__select-label.sc-dso-date-picker svg.sc-dso-date-picker{width:16px;height:16px}.dso-date__mobile.sc-dso-date-picker{align-items:center;border-bottom:1px solid rgba(0, 0, 0, 0.12);display:flex;font-size:1em;justify-content:space-between;margin-bottom:20px;margin-left:-10%;overflow:hidden;padding:12px 20px;position:relative;text-overflow:ellipsis;white-space:nowrap;width:120%}@media (min-width: 36em){.dso-date__mobile.sc-dso-date-picker{border:0;margin:0;overflow:visible;padding:0;position:absolute;right:-16px;top:-16px;width:auto}}.dso-date__mobile-heading.sc-dso-date-picker{display:inline-block;font-weight:600;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.dso-date__mobile-heading.sc-dso-date-picker{display:none}}.dso-date__close.sc-dso-date-picker{-webkit-appearance:none;align-items:center;appearance:none;background-color:#fff;border:0;border-radius:50%;color:#39870c;cursor:pointer;display:flex;font-size:1em;height:32px;justify-content:center;margin-right:-4px;padding:0;width:32px}@media (min-width: 36em){.dso-date__close.sc-dso-date-picker{margin-right:0;opacity:0}}.dso-date__close.sc-dso-date-picker:focus{box-shadow:0 0 0 2px #275937;outline:none}@media (min-width: 36em){.dso-date__close.sc-dso-date-picker:focus{opacity:1}}.dso-date__vhidden.sc-dso-date-picker{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;top:0;width:1px}";
|
|
244
244
|
|
|
245
245
|
function range(from, to) {
|
|
246
246
|
var result = [];
|
|
@@ -474,8 +474,7 @@ let DsoDatePicker = class {
|
|
|
474
474
|
};
|
|
475
475
|
this.handleInputChange = (e) => {
|
|
476
476
|
const target = e.target;
|
|
477
|
-
|
|
478
|
-
this.setValue(target.value);
|
|
477
|
+
this.setValue(target.value.replace(DISALLOWED_CHARACTERS, ""));
|
|
479
478
|
};
|
|
480
479
|
this.processFocusedDayNode = (element) => {
|
|
481
480
|
this.focusedDayNode = element;
|
|
@@ -488,13 +487,12 @@ let DsoDatePicker = class {
|
|
|
488
487
|
* Component event handling.
|
|
489
488
|
*/
|
|
490
489
|
handleDocumentClick(e) {
|
|
491
|
-
var _a;
|
|
492
490
|
if (!this.open) {
|
|
493
491
|
return;
|
|
494
492
|
}
|
|
495
493
|
const path = e.composedPath();
|
|
496
494
|
for (const target of path) {
|
|
497
|
-
if (target instanceof Node &&
|
|
495
|
+
if (target instanceof Node && this.element.contains(target)) {
|
|
498
496
|
return;
|
|
499
497
|
}
|
|
500
498
|
}
|
|
@@ -581,10 +579,7 @@ let DsoDatePicker = class {
|
|
|
581
579
|
event.valueAsDate = parseDutchDate(value);
|
|
582
580
|
}
|
|
583
581
|
if (event.valueAsDate) {
|
|
584
|
-
event.value =
|
|
585
|
-
}
|
|
586
|
-
else {
|
|
587
|
-
this.value = "";
|
|
582
|
+
event.value = printDutchDate(event.valueAsDate);
|
|
588
583
|
}
|
|
589
584
|
if (!event.valueAsDate && this.required) {
|
|
590
585
|
event.error = "required";
|
|
@@ -592,9 +587,14 @@ let DsoDatePicker = class {
|
|
|
592
587
|
if (event.value && !event.valueAsDate) {
|
|
593
588
|
event.error = "invalid";
|
|
594
589
|
}
|
|
590
|
+
this.value = event.value;
|
|
595
591
|
this.dateChange.emit(event);
|
|
596
592
|
}
|
|
597
593
|
componentDidLoad() {
|
|
594
|
+
const valueAsDate = parseDutchDate(this.value);
|
|
595
|
+
if (valueAsDate) {
|
|
596
|
+
this.value = printDutchDate(valueAsDate);
|
|
597
|
+
}
|
|
598
598
|
if (this.dsoAutofocus) {
|
|
599
599
|
this.setFocus();
|
|
600
600
|
}
|
|
@@ -621,7 +621,7 @@ let DsoDatePicker = class {
|
|
|
621
621
|
if (maxDate) {
|
|
622
622
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
623
623
|
}
|
|
624
|
-
return (h(Host, null, h("div", { class: "dso-date" }, h("div", { class: "dso-date__input-wrapper" }, h("input", { class: "dso-date__input", value:
|
|
624
|
+
return (h(Host, null, h("div", { class: "dso-date" }, h("div", { class: "dso-date__input-wrapper" }, h("input", { class: "dso-date__input", value: this.value, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }), h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, h("span", { class: "dso-date__toggle-icon" }, h("dso-icon", { icon: "calendar" })), h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), h("div", { class: {
|
|
625
625
|
"dso-date__dialog": true,
|
|
626
626
|
"is-left": this.direction === "left",
|
|
627
627
|
"is-active": this.open,
|
|
@@ -1,231 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-d54cae76.js';
|
|
2
|
+
import { t as tabbable } from './index.esm-a1362957.js';
|
|
2
3
|
import { v as v4 } from './v4-fa4bb814.js';
|
|
3
4
|
|
|
4
|
-
/*!
|
|
5
|
-
* tabbable 5.2.1
|
|
6
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
7
|
-
*/
|
|
8
|
-
var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
|
|
9
|
-
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
10
|
-
var matches = typeof Element === 'undefined' ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
11
|
-
|
|
12
|
-
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
13
|
-
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
14
|
-
|
|
15
|
-
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
16
|
-
candidates.unshift(el);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
candidates = candidates.filter(filter);
|
|
20
|
-
return candidates;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
var isContentEditable = function isContentEditable(node) {
|
|
24
|
-
return node.contentEditable === 'true';
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var getTabindex = function getTabindex(node) {
|
|
28
|
-
var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);
|
|
29
|
-
|
|
30
|
-
if (!isNaN(tabindexAttr)) {
|
|
31
|
-
return tabindexAttr;
|
|
32
|
-
} // Browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
33
|
-
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (isContentEditable(node)) {
|
|
37
|
-
return 0;
|
|
38
|
-
} // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
39
|
-
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
40
|
-
// yet they are still part of the regular tab order; in FF, they get a default
|
|
41
|
-
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
42
|
-
// order, consider their tab index to be 0.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if ((node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {
|
|
46
|
-
return 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return node.tabIndex;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
53
|
-
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
var isInput = function isInput(node) {
|
|
57
|
-
return node.tagName === 'INPUT';
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
var isHiddenInput = function isHiddenInput(node) {
|
|
61
|
-
return isInput(node) && node.type === 'hidden';
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
65
|
-
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
66
|
-
return child.tagName === 'SUMMARY';
|
|
67
|
-
});
|
|
68
|
-
return r;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
72
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
73
|
-
if (nodes[i].checked && nodes[i].form === form) {
|
|
74
|
-
return nodes[i];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
var isTabbableRadio = function isTabbableRadio(node) {
|
|
80
|
-
if (!node.name) {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var radioScope = node.form || node.ownerDocument;
|
|
85
|
-
|
|
86
|
-
var queryRadios = function queryRadios(name) {
|
|
87
|
-
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
var radioSet;
|
|
91
|
-
|
|
92
|
-
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
93
|
-
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
94
|
-
} else {
|
|
95
|
-
try {
|
|
96
|
-
radioSet = queryRadios(node.name);
|
|
97
|
-
} catch (err) {
|
|
98
|
-
// eslint-disable-next-line no-console
|
|
99
|
-
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var checked = getCheckedRadio(radioSet, node.form);
|
|
105
|
-
return !checked || checked === node;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
var isRadio = function isRadio(node) {
|
|
109
|
-
return isInput(node) && node.type === 'radio';
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
113
|
-
return isRadio(node) && !isTabbableRadio(node);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
var isHidden = function isHidden(node, displayCheck) {
|
|
117
|
-
if (getComputedStyle(node).visibility === 'hidden') {
|
|
118
|
-
return true;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
122
|
-
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
123
|
-
|
|
124
|
-
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
125
|
-
return true;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (!displayCheck || displayCheck === 'full') {
|
|
129
|
-
while (node) {
|
|
130
|
-
if (getComputedStyle(node).display === 'none') {
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
node = node.parentElement;
|
|
135
|
-
}
|
|
136
|
-
} else if (displayCheck === 'non-zero-area') {
|
|
137
|
-
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
138
|
-
width = _node$getBoundingClie.width,
|
|
139
|
-
height = _node$getBoundingClie.height;
|
|
140
|
-
|
|
141
|
-
return width === 0 && height === 0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return false;
|
|
145
|
-
}; // form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
146
|
-
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
147
|
-
// fieldset
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
151
|
-
if (isInput(node) || node.tagName === 'SELECT' || node.tagName === 'TEXTAREA' || node.tagName === 'BUTTON') {
|
|
152
|
-
var parentNode = node.parentElement;
|
|
153
|
-
|
|
154
|
-
while (parentNode) {
|
|
155
|
-
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
156
|
-
// look for the first <legend> as an immediate child of the disabled
|
|
157
|
-
// <fieldset>: if the node is in that legend, it'll be enabled even
|
|
158
|
-
// though the fieldset is disabled; otherwise, the node is in a
|
|
159
|
-
// secondary/subsequent legend, or somewhere else within the fieldset
|
|
160
|
-
// (however deep nested) and it'll be disabled
|
|
161
|
-
for (var i = 0; i < parentNode.children.length; i++) {
|
|
162
|
-
var child = parentNode.children.item(i);
|
|
163
|
-
|
|
164
|
-
if (child.tagName === 'LEGEND') {
|
|
165
|
-
if (child.contains(node)) {
|
|
166
|
-
return false;
|
|
167
|
-
} // the node isn't in the first legend (in doc order), so no matter
|
|
168
|
-
// where it is now, it'll be disabled
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return true;
|
|
172
|
-
}
|
|
173
|
-
} // the node isn't in a legend, so no matter where it is now, it'll be disabled
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
parentNode = parentNode.parentElement;
|
|
180
|
-
}
|
|
181
|
-
} // else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
182
|
-
// enabled/disabled state
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return false;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
189
|
-
if (node.disabled || isHiddenInput(node) || isHidden(node, options.displayCheck) || // For a details element with a summary, the summary element gets the focus
|
|
190
|
-
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
return true;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
198
|
-
if (!isNodeMatchingSelectorFocusable(options, node) || isNonTabbableRadio(node) || getTabindex(node) < 0) {
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
return true;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
var tabbable = function tabbable(el, options) {
|
|
206
|
-
options = options || {};
|
|
207
|
-
var regularTabbables = [];
|
|
208
|
-
var orderedTabbables = [];
|
|
209
|
-
var candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
210
|
-
candidates.forEach(function (candidate, i) {
|
|
211
|
-
var candidateTabindex = getTabindex(candidate);
|
|
212
|
-
|
|
213
|
-
if (candidateTabindex === 0) {
|
|
214
|
-
regularTabbables.push(candidate);
|
|
215
|
-
} else {
|
|
216
|
-
orderedTabbables.push({
|
|
217
|
-
documentOrder: i,
|
|
218
|
-
tabIndex: candidateTabindex,
|
|
219
|
-
node: candidate
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
var tabbableNodes = orderedTabbables.sort(sortOrderedTabbables).map(function (a) {
|
|
224
|
-
return a.node;
|
|
225
|
-
}).concat(regularTabbables);
|
|
226
|
-
return tabbableNodes;
|
|
227
|
-
};
|
|
228
|
-
|
|
229
5
|
const dropdownMenuCss = ":host(:focus){outline:none}:host{--di-check-wit:url(\"data:image/svg+xml,%3csvg id='check' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z'/%3e %3c/svg%3e\");--di-chevron-down:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-down-wit:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-scampi:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23676cb0%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");--di-chevron-up-wit:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:inline-block;position:relative}";
|
|
230
6
|
|
|
231
7
|
let DropdownMenu = class {
|
|
@@ -321,9 +97,6 @@ let DropdownMenu = class {
|
|
|
321
97
|
this.openPopup();
|
|
322
98
|
}
|
|
323
99
|
}
|
|
324
|
-
componentDidRender() {
|
|
325
|
-
this.host.setAttribute("tabindex", "-1");
|
|
326
|
-
}
|
|
327
100
|
componentWillRender() {
|
|
328
101
|
for (const li of Array.from(this.host.getElementsByTagName("li"))) {
|
|
329
102
|
for (const tab of tabbable(li)) {
|
|
@@ -338,6 +111,7 @@ let DropdownMenu = class {
|
|
|
338
111
|
}
|
|
339
112
|
}
|
|
340
113
|
openPopup() {
|
|
114
|
+
this.host.setAttribute("tabindex", "-1");
|
|
341
115
|
this.host.addEventListener("keydown", this.keyDownListener);
|
|
342
116
|
this.host.addEventListener("focusout", this.focusOutListener);
|
|
343
117
|
this.button.setAttribute("aria-expanded", "true");
|
|
@@ -347,11 +121,24 @@ let DropdownMenu = class {
|
|
|
347
121
|
this.host.removeEventListener("keydown", this.keyDownListener);
|
|
348
122
|
this.host.removeEventListener("focusout", this.focusOutListener);
|
|
349
123
|
this.button.setAttribute("aria-expanded", "false");
|
|
124
|
+
this.host.removeAttribute("tabindex");
|
|
350
125
|
this.tabbables.forEach((tabbable) => tabbable.removeEventListener("click", this.escape));
|
|
351
126
|
}
|
|
127
|
+
getActiveElement(root = document) {
|
|
128
|
+
const activeEl = root.activeElement;
|
|
129
|
+
if (!activeEl) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
if (activeEl.shadowRoot) {
|
|
133
|
+
return this.getActiveElement(activeEl.shadowRoot);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
return activeEl;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
352
139
|
tabInPopup(direction) {
|
|
353
140
|
const tabs = this.tabbables;
|
|
354
|
-
const currentIndex = tabs.findIndex((e) => e ===
|
|
141
|
+
const currentIndex = tabs.findIndex((e) => e === this.getActiveElement());
|
|
355
142
|
let nextIndex = currentIndex + direction;
|
|
356
143
|
if (nextIndex >= tabs.length) {
|
|
357
144
|
nextIndex = 0;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { r as registerInstance, h, F as Fragment, g as getElement } from './index-d54cae76.js';
|
|
2
|
+
import { c as clsx } from './clsx.m-071989db.js';
|
|
3
|
+
import { d as debounce_1 } from './index-f2bf58ce.js';
|
|
4
|
+
|
|
5
|
+
const headerCss = ":host{--di-chevron-down-bosgroen:url(\"data:image/svg+xml,%3csvg id='chevron-down' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M12%2c16%2c5.29%2c9.63a.93.93%2c0%2c0%2c1%2c0-1.35%2c1%2c1%2c0%2c0%2c1%2c1.42%2c0l5.29%2c5%2c5.29-5a1%2c1%2c0%2c0%2c1%2c1.42%2c0%2c.91.91%2c0%2c0%2c1%2c0%2c1.34Z'/%3e %3c/svg%3e\");--di-chevron-up-bosgroen:url(\"data:image/svg+xml,%3csvg id='chevron-up' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M18%2c16a1%2c1%2c0%2c0%2c1-.71-.28l-5.29-5-5.29%2c5a1%2c1%2c0%2c0%2c1-1.42%2c0%2c.93.93%2c0%2c0%2c1%2c0-1.35L12%2c8l6.71%2c6.38a.91.91%2c0%2c0%2c1%2c0%2c1.34A1%2c1%2c0%2c0%2c1%2c18%2c16Z'/%3e %3c/svg%3e\");display:block}.dso-header{border-bottom:1px solid #ccc;display:flex;flex-wrap:wrap}@media screen and (min-width: 768px){.dso-header{align-items:center}}@media screen and (max-width: 991px){.dso-header.use-drop-down{flex-wrap:nowrap}}.logo-container{display:flex;flex-wrap:wrap;padding-bottom:16px;padding-top:16px}@media screen and (min-width: 768px){.sub-logo{margin-left:24px}}@media screen and (max-width: 767px){.sub-logo{flex-basis:100%}}.login,.logout{margin-right:16px}.profile a,.logout a,.login a{text-decoration:none;color:#39870c;font-weight:600}.profile a:hover,.profile a:focus,.logout a:hover,.logout a:focus,.login a:hover,.login a:focus{text-decoration:none}.profile a:active,.logout a:active,.login a:active{text-decoration:underline}.dso-header-session{display:flex;margin-left:auto}.dso-header-session .profile a{margin-left:8px}.dso-header-session .profile+.logout{border-left:3px solid #ccc;margin-left:16px;padding-left:16px}.dso-navbar{flex-basis:100%}dso-dropdown-menu>.dso-primary::after,dso-dropdown-menu>.dso-secondary::after,dso-dropdown-menu>.dso-tertiary::after,dso-dropdown-menu>.btn::after{content:\"\";display:inline-block;margin-left:8px}dso-dropdown-menu>.dso-primary::after,dso-dropdown-menu>.btn-primary::after{background:var(--dso-icon, var(--di-chevron-down-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}dso-dropdown-menu>.dso-secondary::after,dso-dropdown-menu>.btn-default::after{background:var(--dso-icon, var(--di-chevron-down)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}dso-dropdown-menu>.dso-secondary:hover::after,dso-dropdown-menu>.btn-default:hover::after{--dso-icon:var(--di-chevron-down-wit)}dso-dropdown-menu>.dso-tertiary::after,dso-dropdown-menu>.btn-link::after{background:var(--dso-icon, var(--di-chevron-down)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;position:relative;top:-2px}dso-dropdown-menu>.dso-tertiary:hover::after,dso-dropdown-menu>.btn-link:hover::after{--dso-icon:var(--di-chevron-down-scampi)}dso-dropdown-menu .dso-group-label{color:#999;font-size:0.875em;font-weight:400;margin:0;padding:4px 20px 2px;text-transform:uppercase}dso-dropdown-menu ul{margin:0;padding:0}dso-dropdown-menu ul:not(:last-child){border-bottom:1px solid #e5e5e5;margin-bottom:11px;padding-bottom:11px}dso-dropdown-menu .dso-dropdown-options{background-clip:padding-box;background-color:#fff;border-radius:4px;border:1px solid rgba(0, 0, 0, 0.15);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);font-size:16px;margin:2px 0 0;min-width:160px;padding:5px 0;position:absolute;text-align:left;top:100%;z-index:1000}dso-dropdown-menu .dso-dropdown-options li{list-style:none}dso-dropdown-menu .dso-dropdown-options li a:visited{color:#191919}dso-dropdown-menu .dso-dropdown-options li a,dso-dropdown-menu .dso-dropdown-options li button{text-decoration:none;clear:both;color:#191919;display:block;font-weight:400;line-height:1.5;padding:3px 20px;text-decoration:none;white-space:nowrap}dso-dropdown-menu .dso-dropdown-options li a:hover,dso-dropdown-menu .dso-dropdown-options li a:focus,dso-dropdown-menu .dso-dropdown-options li a:active,dso-dropdown-menu .dso-dropdown-options li button:hover,dso-dropdown-menu .dso-dropdown-options li button:focus,dso-dropdown-menu .dso-dropdown-options li button:active{text-decoration:underline}dso-dropdown-menu .dso-dropdown-options li a:hover,dso-dropdown-menu .dso-dropdown-options li a:focus,dso-dropdown-menu .dso-dropdown-options li button:hover,dso-dropdown-menu .dso-dropdown-options li button:focus{background-color:#39870c;border-color:#39870c;color:#fff;text-decoration:none}dso-dropdown-menu .dso-dropdown-options li button{background-color:transparent;border:0;border-radius:0;text-align:inherit;width:100%}dso-dropdown-menu[dropdown-align=right] .dso-dropdown-options{right:0}dso-dropdown-menu[open]>.dso-primary::after,dso-dropdown-menu[open]>.btn-primary::after{--dso-icon:var(--di-chevron-up-wit)}dso-dropdown-menu[open]>.dso-secondary::after,dso-dropdown-menu[open]>.btn-default::after{--dso-icon:var(--di-chevron-up)}dso-dropdown-menu[open]>.dso-secondary:hover::after,dso-dropdown-menu[open]>.btn-default:hover::after{--dso-icon:var(--di-chevron-up-wit)}dso-dropdown-menu[open]>.dso-tertiary::after,dso-dropdown-menu[open]>.btn-link::after{--dso-icon:var(--di-chevron-up)}dso-dropdown-menu[open]>.dso-tertiary:hover::after,dso-dropdown-menu[open]>.btn-link:hover::after{--dso-icon:var(--di-chevron-up-scampi)}dso-dropdown-menu[open] button::after{background:var(--dso-icon, var(--di-chevron-up-bosgroen)) no-repeat;background-position:center;background-size:cover;height:1.2em;vertical-align:top;width:1.2em}dso-dropdown-menu[checkable] .dso-group-label{padding-left:40px}dso-dropdown-menu[checkable] li a,dso-dropdown-menu[checkable] li button{padding-left:40px}dso-dropdown-menu[checkable] li.dso-checked a:not(:focus),dso-dropdown-menu[checkable] li.dso-checked button:not(:focus){background-color:#39870c;border-color:#39870c;color:#fff}dso-dropdown-menu[checkable] li.dso-checked a::before,dso-dropdown-menu[checkable] li.dso-checked button::before{background:var(--dso-icon, var(--di-check-wit)) no-repeat;background-position:center;background-size:cover;height:24px;vertical-align:top;width:24px;content:\"\";display:block;float:left;margin-left:-32px;margin-right:8px}dso-dropdown-menu button{align-items:flex-end;background-color:transparent;border:0;display:flex;font-family:Asap, sans-serif;padding-right:32px}dso-dropdown-menu button::after{background:var(--dso-icon, var(--di-chevron-down-bosgroen)) no-repeat;background-position:center;background-size:cover;height:1.2em;vertical-align:top;width:1.2em;content:\"\";display:inline-block;margin-left:8px;position:absolute;right:0;top:50%;transform:translateY(-50%)}@media screen and (max-width: 991px){dso-dropdown-menu[dropdown-align=right] .dso-dropdown-options{right:-16px}}@media screen and (max-width: 767px){dso-dropdown-menu{top:12px}}dso-dropdown-menu .dso-dropdown-options{border:0;border-radius:0}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options ul{width:320px}@media screen and (max-width: 991px){dso-dropdown-menu .dso-dropdown-options dso-dropdown-options ul{width:100vw}}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li a{color:#275937;font-size:1.25rem;padding:16px}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li.dso-active a{font-weight:600}dso-dropdown-menu .dso-dropdown-options dso-dropdown-options li+li{border-top:1px solid #ccc}.dropdown{margin-left:auto}@media screen and (max-width: 767px){.dropdown dso-dropdown-menu{top:28px}}.dropdown dso-dropdown-menu .dso-dropdown-options{top:calc(100% + 29px)}@media screen and (max-width: 767px){.dropdown dso-dropdown-menu .dso-dropdown-options{top:72px}}.dropdown dso-dropdown-menu[open] button::after{background:var(--dso-icon, var(--di-chevron-up)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.dropdown dso-dropdown-menu button{color:#39870c;font-size:16px;font-weight:600}.dropdown dso-dropdown-menu button:hover,.dropdown dso-dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dropdown dso-dropdown-menu button::after{background:var(--dso-icon, var(--di-chevron-down)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.dso-nav{align-items:end;column-gap:32px;display:flex;list-style:none;margin-bottom:0;margin-top:0;padding-left:0}.dso-nav>li{margin-bottom:4px}.dso-nav>li>a{display:block}.dso-nav>li>a,.dso-nav>li>a:hover,.dso-nav>li>a:focus,.dso-nav>li>a:visited{color:#275937}.dso-nav>li.dso-active,.dso-nav>li.is-active{margin-bottom:0}.dso-nav>li.dso-active>a,.dso-nav>li.is-active>a{border-bottom:4px solid #8b4a6a;font-weight:bold}.dso-nav.dso-nav-main>li>a{text-decoration:none;font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;white-space:nowrap}.dso-nav.dso-nav-main>li>a:hover,.dso-nav.dso-nav-main>li>a:focus,.dso-nav.dso-nav-main>li>a:active{text-decoration:underline}.dso-nav.dso-nav-main dso-dropdown-menu .dso-dropdown-options{top:calc(100% + 3px)}.dso-nav.dso-nav-main dso-dropdown-menu button{font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;align-items:center;color:#275937;padding-right:32px}.dso-nav.dso-nav-main dso-dropdown-menu button:hover,.dso-nav.dso-nav-main dso-dropdown-menu button:active{cursor:pointer;text-decoration:underline}.dso-nav.dso-nav-main dso-dropdown-menu button::after{top:auto;transform:none}.dso-nav.dso-nav-sub>li{display:inline-block}.dso-nav.dso-nav-sub>li>a{text-decoration:none;font-size:16px;margin-top:4px;padding:4px 8px 3px}.dso-nav.dso-nav-sub>li>a:hover,.dso-nav.dso-nav-sub>li>a:focus,.dso-nav.dso-nav-sub>li>a:active{text-decoration:underline}.dso-nav .menu-user-home{margin-left:auto}.dso-nav .menu-user-home dso-icon{height:1em;margin-right:8px;position:relative;top:-2px;width:1.2em}";
|
|
6
|
+
|
|
7
|
+
const minDesktopViewportWidth = 992;
|
|
8
|
+
let Header = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.useDropDownMenu = "auto";
|
|
12
|
+
this.showDropDown = false;
|
|
13
|
+
this.isLoggedIn = false;
|
|
14
|
+
this.hasSubLogo = false;
|
|
15
|
+
this.overflowMenuItems = 0;
|
|
16
|
+
this.onWindowResize = debounce_1(() => {
|
|
17
|
+
this.setDropDownMenu();
|
|
18
|
+
this.setOverflowMenu();
|
|
19
|
+
}, 100);
|
|
20
|
+
}
|
|
21
|
+
watchUseDropDownMenu(value) {
|
|
22
|
+
if (value === "auto") {
|
|
23
|
+
this.setDropDownMenu();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this.showDropDown = value === "always";
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
this.hasSubLogo = this.host.querySelector("*[slot = 'sub-logo']") !== null;
|
|
30
|
+
}
|
|
31
|
+
shrinkMenuToFit() {
|
|
32
|
+
if (!this.wrapper || !this.nav) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (this.wrapper.clientWidth >= this.nav.clientWidth) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (this.overflowMenuItems >= this.mainMenu.length) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.overflowMenuItems++;
|
|
42
|
+
}
|
|
43
|
+
componentDidRender() {
|
|
44
|
+
if (this.showDropDown) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
window.setTimeout(() => this.shrinkMenuToFit(), 0);
|
|
48
|
+
}
|
|
49
|
+
setOverflowMenu() {
|
|
50
|
+
if (this.showDropDown) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (this.overflowMenuItems != 0) {
|
|
54
|
+
this.overflowMenuItems = 0;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.shrinkMenuToFit();
|
|
58
|
+
}
|
|
59
|
+
setDropDownMenu() {
|
|
60
|
+
if (this.useDropDownMenu !== "auto") {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.showDropDown = window.innerWidth < minDesktopViewportWidth;
|
|
64
|
+
}
|
|
65
|
+
connectedCallback() {
|
|
66
|
+
window.addEventListener("resize", this.onWindowResize);
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
window.removeEventListener("resize", this.onWindowResize);
|
|
70
|
+
}
|
|
71
|
+
MenuItem(item) {
|
|
72
|
+
return (h("li", { class: item.active ? "dso-active" : undefined }, h("a", { href: item.url, "aria-current": item.active ? "page" : undefined }, item.label)));
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return (h(Fragment, null, h("div", { class: clsx("dso-header", {
|
|
76
|
+
["use-drop-down"]: this.showDropDown,
|
|
77
|
+
["has-sub-logo"]: this.hasSubLogo,
|
|
78
|
+
}), 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 &&
|
|
79
|
+
this.userProfileName &&
|
|
80
|
+
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 &&
|
|
81
|
+
this.userProfileName &&
|
|
82
|
+
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
|
|
83
|
+
.filter((_, index) => index < this.mainMenu.length - this.overflowMenuItems)
|
|
84
|
+
.map(this.MenuItem), this.overflowMenuItems > 0 && (h("li", null, h("dso-dropdown-menu", { "dropdown-align": "left" }, h("button", { type: "button", class: "tertiary", slot: "toggle" }, h("span", null, "Meer")), h("div", { class: "dso-dropdown-options" }, h("dso-dropdown-options", null, h("ul", null, this.mainMenu
|
|
85
|
+
.filter((_, index) => index >=
|
|
86
|
+
this.mainMenu.length -
|
|
87
|
+
this.overflowMenuItems)
|
|
88
|
+
.map(this.MenuItem))))))), this.userHomeUrl && (h("li", { class: "menu-user-home" }, h("a", { href: this.userHomeUrl }, h("dso-icon", { icon: "user-line" }), "Mijn Omgevingsloket"))))))))));
|
|
89
|
+
}
|
|
90
|
+
get host() { return getElement(this); }
|
|
91
|
+
static get watchers() { return {
|
|
92
|
+
"useDropDownMenu": ["watchUseDropDownMenu"]
|
|
93
|
+
}; }
|
|
94
|
+
};
|
|
95
|
+
Header.style = headerCss;
|
|
96
|
+
|
|
97
|
+
export { Header as dso_header };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, F as Fragment } from './index-
|
|
1
|
+
import { r as registerInstance, h, F as Fragment } from './index-d54cae76.js';
|
|
2
2
|
|
|
3
3
|
const helpcenterPanelCss = ":host{display:block;--di-times:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\");--di-times-wit:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: white%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\")}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.wrapper{height:100%;left:0;position:fixed;top:0;visibility:hidden;width:100%}.wrapper.visible{visibility:visible}.dimscreen{background-color:#000;height:100%;opacity:0.4;width:100%}.open-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#39870c;border-color:#39870c;color:#fff;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;bottom:16px;font-family:Asap, sans-serif;position:fixed;right:16px}.open-button:focus,.open-button:focus-visible{outline-offset:2px}.open-button:active{outline:0}.open-button.extern::after,.open-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.open-button:focus,.open-button:focus-visible{outline-offset:2px}.open-button:active{outline:0}.open-button.extern::after,.open-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.open-button:hover{background-color:#275937;border-color:#275937;color:#fff}.open-button:active{background-color:#15301e;border-color:#15301e;color:#fff}.open-button[disabled],.open-button[disabled]:hover{background-color:#afcf9d;border-color:#afcf9d;color:#fff}.open-button.btn-sm{line-height:16px}.open-button.btn-sm dso-icon,.open-button.btn-sm svg.di,.open-button.btn-sm.extern::after,.open-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.open-button.download::after{background:var(--dso-icon, var(--di-download-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.open-button.extern::after{background:var(--dso-icon, var(--di-external-link-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.open-button dso-icon,.open-button svg.di{margin-left:-8px;margin-right:8px}.open-button span+dso-icon,.open-button span+svg.di{margin-left:8px;margin-right:-8px}.open-button:hover{cursor:pointer}.open-button.open{display:none}.close-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border-right:0;border-top:0;border-radius:0 0 0 8px;height:40px;min-width:40px;padding:0;position:fixed;right:0;width:40px;top:0}.close-button:focus,.close-button:focus-visible{outline-offset:2px}.close-button:active{outline:0}.close-button.extern::after,.close-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}.close-button:hover{background-color:#39870c;border-color:#39870c;color:#fff}.close-button:active{background-color:#275937;border-color:#275937;color:#fff}.close-button[disabled],.close-button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}.close-button.btn-sm{line-height:16px}.close-button.btn-sm dso-icon,.close-button.btn-sm svg.di,.close-button.btn-sm.extern::after,.close-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}.close-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.close-button.download:hover::after{--dso-icon:var(--di-download-wit)}.close-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}.close-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.close-button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}.close-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}.close-button dso-icon,.close-button svg.di{margin-left:-8px;margin-right:8px}.close-button span+dso-icon,.close-button span+svg.di{margin-left:8px;margin-right:-8px}.close-button::before{background:var(--dso-icon, var(--di-times)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%)}.close-button:hover,.close-button:active,.close-button:focus{cursor:pointer}.close-button:hover::before,.close-button:active::before,.close-button:focus::before{background:var(--dso-icon, var(--di-times-wit)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}.close-button.close{display:none}.iframe-container{background-color:#fff;border:0;border-left:1px solid #ccc;box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.4);height:100%;position:absolute;right:-640px;top:0;transition:right 0.5s;width:640px}.iframe-container.open{right:0}iframe{border:0;height:100%;width:100%}";
|
|
4
4
|
|