@dso-toolkit/core 54.0.1 → 54.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-accordion.cjs.entry.js +4 -1
- package/dist/cjs/dso-annotation-output.cjs.entry.js +5 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +3 -3
- package/dist/cjs/dso-date-picker.cjs.entry.js +16 -2
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +2 -1
- package/dist/cjs/dso-expandable-heading.cjs.entry.js +1 -1
- package/dist/cjs/dso-expandable.cjs.entry.js +3 -0
- package/dist/cjs/dso-info_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +2 -2
- package/dist/cjs/dso-pagination.cjs.entry.js +17 -4
- package/dist/cjs/dso-responsive-element.cjs.entry.js +3 -0
- package/dist/cjs/dso-scrollable.cjs.entry.js +101 -0
- package/dist/cjs/dso-table.cjs.entry.js +3 -0
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +8 -2
- package/dist/cjs/dso-tree-view.cjs.entry.js +8 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/accordion.js +4 -1
- package/dist/collection/components/annotation-output/annotation-output.js +5 -1
- package/dist/collection/components/autosuggest/autosuggest.js +3 -3
- package/dist/collection/components/date-picker/date-picker-month.js +5 -1
- package/dist/collection/components/date-picker/date-picker.js +6 -0
- package/dist/collection/components/date-picker/date-utils.js +5 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +2 -1
- package/dist/collection/components/expandable/expandable.js +8 -1
- package/dist/collection/components/expandable-heading/expandable-heading.css +4 -4
- package/dist/collection/components/map-controls/map-controls.css +0 -5
- package/dist/collection/components/map-controls/map-controls.js +1 -1
- package/dist/collection/components/pagination/pagination.js +17 -4
- package/dist/collection/components/responsive-element/responsive-element.js +3 -0
- package/dist/collection/components/scrollable/scrollable.css +50 -0
- package/dist/collection/components/scrollable/scrollable.interfaces.js +1 -0
- package/dist/collection/components/scrollable/scrollable.js +149 -0
- package/dist/collection/components/selectable/selectable.css +1 -1
- package/dist/collection/components/table/table.js +3 -0
- package/dist/collection/components/tooltip/tooltip.js +8 -2
- package/dist/collection/components/tree-view/tree-view.js +8 -1
- package/dist/collection/components/viewer-grid/viewer-grid.css +2 -2
- package/dist/collection/index.js +1 -0
- package/dist/components/dropdown-menu.js +2 -1
- package/dist/components/dso-accordion.js +4 -1
- package/dist/components/dso-annotation-output.js +5 -1
- package/dist/components/dso-autosuggest.js +3 -3
- package/dist/components/dso-date-picker.js +16 -2
- package/dist/components/dso-expandable-heading.js +1 -1
- package/dist/components/dso-map-controls.js +10 -4
- package/dist/components/dso-pagination.js +17 -4
- package/dist/components/dso-scrollable.d.ts +11 -0
- package/dist/components/dso-scrollable.js +6 -0
- package/dist/components/dso-table.js +3 -0
- package/dist/components/dso-tree-view.js +8 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/expandable.js +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/responsive-element.js +3 -0
- package/dist/components/scrollable.js +115 -0
- package/dist/components/selectable.js +1 -1
- package/dist/components/tooltip.js +8 -2
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-281aa19e.entry.js +1 -0
- package/dist/dso-toolkit/p-296657d3.entry.js +1 -0
- package/dist/dso-toolkit/{p-5e50b616.entry.js → p-564a5d95.entry.js} +1 -1
- package/dist/dso-toolkit/p-5d533423.entry.js +1 -0
- package/dist/dso-toolkit/{p-bb90ea4c.entry.js → p-7912940d.entry.js} +1 -1
- package/dist/dso-toolkit/p-9361b19e.entry.js +1 -0
- package/dist/dso-toolkit/p-ae45e550.entry.js +1 -0
- package/dist/dso-toolkit/p-b9777372.entry.js +1 -0
- package/dist/dso-toolkit/p-baef3721.entry.js +1 -0
- package/dist/dso-toolkit/p-bc975b99.entry.js +1 -0
- package/dist/dso-toolkit/p-c2215704.entry.js +1 -0
- package/dist/dso-toolkit/{p-fa2f1a1c.entry.js → p-ca4fee8d.entry.js} +1 -1
- package/dist/dso-toolkit/p-ccff72e8.entry.js +1 -0
- package/dist/dso-toolkit/p-e8c46f70.entry.js +1 -0
- package/dist/dso-toolkit/{p-fe7ca25f.entry.js → p-f0c5d1b4.entry.js} +1 -1
- package/dist/dso-toolkit/p-f3e38af3.entry.js +1 -0
- package/dist/esm/dso-accordion.entry.js +4 -1
- package/dist/esm/dso-annotation-output.entry.js +5 -1
- package/dist/esm/dso-autosuggest.entry.js +3 -3
- package/dist/esm/dso-date-picker.entry.js +16 -2
- package/dist/esm/dso-dropdown-menu.entry.js +2 -1
- package/dist/esm/dso-expandable-heading.entry.js +1 -1
- package/dist/esm/dso-expandable.entry.js +3 -0
- package/dist/esm/dso-info_2.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +2 -2
- package/dist/esm/dso-pagination.entry.js +17 -4
- package/dist/esm/dso-responsive-element.entry.js +3 -0
- package/dist/esm/dso-scrollable.entry.js +97 -0
- package/dist/esm/dso-table.entry.js +3 -0
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +8 -2
- package/dist/esm/dso-tree-view.entry.js +8 -1
- package/dist/esm/dso-viewer-grid.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/expandable/expandable.d.ts +2 -2
- package/dist/types/components/expandable/expandable.interfaces.d.ts +2 -2
- package/dist/types/components/scrollable/scrollable.d.ts +21 -0
- package/dist/types/components/scrollable/scrollable.interfaces.d.ts +4 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +28 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/dso-toolkit/p-09424a1d.entry.js +0 -1
- package/dist/dso-toolkit/p-36224d6f.entry.js +0 -1
- package/dist/dso-toolkit/p-588bc4d7.entry.js +0 -1
- package/dist/dso-toolkit/p-5de8b79a.entry.js +0 -1
- package/dist/dso-toolkit/p-a1616935.entry.js +0 -1
- package/dist/dso-toolkit/p-ad0b38cf.entry.js +0 -1
- package/dist/dso-toolkit/p-b7580ce3.entry.js +0 -1
- package/dist/dso-toolkit/p-c54ad578.entry.js +0 -1
- package/dist/dso-toolkit/p-cf9b79df.entry.js +0 -1
- package/dist/dso-toolkit/p-d987ef37.entry.js +0 -1
- package/dist/dso-toolkit/p-eaae698e.entry.js +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import debounce from "debounce";
|
|
4
|
+
const resizeObserver = new ResizeObserver(debounce((entries) => entries.forEach((entry) => { var _a; return (_a = getScrollableComponentFromResizeObserverEntry(entry)) === null || _a === void 0 ? void 0 : _a._setScrollState(); }), 50));
|
|
5
|
+
function getScrollableComponentFromResizeObserverEntry({ target, }) {
|
|
6
|
+
if (target.parentNode instanceof ShadowRoot && isDsoScrollableComponent(target.parentNode.host)) {
|
|
7
|
+
return target.parentNode.host;
|
|
8
|
+
}
|
|
9
|
+
if (target.parentElement && isDsoScrollableComponent(target.parentElement)) {
|
|
10
|
+
return target.parentElement;
|
|
11
|
+
}
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
function isDsoScrollableComponent(element) {
|
|
15
|
+
return element.tagName === "DSO-SCROLLABLE" && "_setScrollState" in element;
|
|
16
|
+
}
|
|
17
|
+
export class Scrollable {
|
|
18
|
+
constructor() {
|
|
19
|
+
// One MutationObserver per instance because of https://github.com/whatwg/dom/issues/126
|
|
20
|
+
this.mutationObserver = new MutationObserver((entries) => entries.forEach(({ target }) => {
|
|
21
|
+
var _a;
|
|
22
|
+
const element = (_a = target.parentElement) === null || _a === void 0 ? void 0 : _a.closest("dso-scrollable");
|
|
23
|
+
if (element !== this.host) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this._setScrollState();
|
|
27
|
+
}));
|
|
28
|
+
this.scrollPosition = "noScroll";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Internal method. Do not use.
|
|
32
|
+
*/
|
|
33
|
+
async _setScrollState() {
|
|
34
|
+
const scrollPosition = this.getScrollPosition();
|
|
35
|
+
if (this.scrollPosition !== scrollPosition) {
|
|
36
|
+
this.scrollPosition = scrollPosition;
|
|
37
|
+
if (this.scrollPosition === "top" || this.scrollPosition === "bottom") {
|
|
38
|
+
this.dsoScrollEnd.emit({ scrollEnd: this.scrollPosition });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
get slottedElements() {
|
|
43
|
+
return Array.from(this.host.children);
|
|
44
|
+
}
|
|
45
|
+
getScrollPosition() {
|
|
46
|
+
if (!this.scrollContainerDiv) {
|
|
47
|
+
return "noScroll";
|
|
48
|
+
}
|
|
49
|
+
const { scrollHeight, clientHeight, scrollTop } = this.scrollContainerDiv;
|
|
50
|
+
if (scrollHeight <= clientHeight) {
|
|
51
|
+
return "noScroll";
|
|
52
|
+
}
|
|
53
|
+
if (scrollTop === 0) {
|
|
54
|
+
return "top";
|
|
55
|
+
}
|
|
56
|
+
if (scrollHeight - scrollTop - clientHeight < 1) {
|
|
57
|
+
return "bottom";
|
|
58
|
+
}
|
|
59
|
+
if (scrollTop > 0) {
|
|
60
|
+
return "middle";
|
|
61
|
+
}
|
|
62
|
+
return "noScroll";
|
|
63
|
+
}
|
|
64
|
+
componentDidLoad() {
|
|
65
|
+
this.mutationObserver.observe(this.host, {
|
|
66
|
+
characterData: true,
|
|
67
|
+
attributes: false,
|
|
68
|
+
childList: false,
|
|
69
|
+
subtree: true,
|
|
70
|
+
});
|
|
71
|
+
if (this.scrollContainerDiv instanceof HTMLDivElement) {
|
|
72
|
+
resizeObserver.observe(this.scrollContainerDiv);
|
|
73
|
+
}
|
|
74
|
+
this.slottedElements.forEach((element) => resizeObserver.observe(element));
|
|
75
|
+
}
|
|
76
|
+
disconnectedCallback() {
|
|
77
|
+
if (this.scrollContainerDiv instanceof HTMLDivElement) {
|
|
78
|
+
resizeObserver.unobserve(this.scrollContainerDiv);
|
|
79
|
+
}
|
|
80
|
+
this.mutationObserver.disconnect();
|
|
81
|
+
this.slottedElements.forEach((element) => resizeObserver.unobserve(element));
|
|
82
|
+
}
|
|
83
|
+
render() {
|
|
84
|
+
return (h("div", { class: "dso-shadow-container" }, h("div", { ref: (el) => (this.scrollContainerDiv = el), class: clsx("dso-scroll-container", {
|
|
85
|
+
[`dso-scroll-${this.scrollPosition}`]: this.scrollPosition !== "noScroll",
|
|
86
|
+
}), onScroll: () => this._setScrollState() }, h("slot", null))));
|
|
87
|
+
}
|
|
88
|
+
static get is() { return "dso-scrollable"; }
|
|
89
|
+
static get encapsulation() { return "shadow"; }
|
|
90
|
+
static get originalStyleUrls() {
|
|
91
|
+
return {
|
|
92
|
+
"$": ["scrollable.scss"]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static get styleUrls() {
|
|
96
|
+
return {
|
|
97
|
+
"$": ["scrollable.css"]
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
static get states() {
|
|
101
|
+
return {
|
|
102
|
+
"scrollPosition": {}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
static get events() {
|
|
106
|
+
return [{
|
|
107
|
+
"method": "dsoScrollEnd",
|
|
108
|
+
"name": "dsoScrollEnd",
|
|
109
|
+
"bubbles": true,
|
|
110
|
+
"cancelable": true,
|
|
111
|
+
"composed": true,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": "Event emitted when the scrollbar has reached top or bottom."
|
|
115
|
+
},
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "DsoScrollEndEvent",
|
|
118
|
+
"resolved": "DsoScrollEndEvent",
|
|
119
|
+
"references": {
|
|
120
|
+
"DsoScrollEndEvent": {
|
|
121
|
+
"location": "import",
|
|
122
|
+
"path": "./scrollable.interfaces"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}];
|
|
127
|
+
}
|
|
128
|
+
static get methods() {
|
|
129
|
+
return {
|
|
130
|
+
"_setScrollState": {
|
|
131
|
+
"complexType": {
|
|
132
|
+
"signature": "() => Promise<void>",
|
|
133
|
+
"parameters": [],
|
|
134
|
+
"references": {
|
|
135
|
+
"Promise": {
|
|
136
|
+
"location": "global"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"return": "Promise<void>"
|
|
140
|
+
},
|
|
141
|
+
"docs": {
|
|
142
|
+
"text": "Internal method. Do not use.",
|
|
143
|
+
"tags": []
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
static get elementRef() { return "host"; }
|
|
149
|
+
}
|
|
@@ -65,6 +65,9 @@ export class Table {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
setResponsiveTable([dsoTable]) {
|
|
68
|
+
if (!dsoTable) {
|
|
69
|
+
throw new Error("No dsoTable found");
|
|
70
|
+
}
|
|
68
71
|
const tableElement = dsoTable.target.querySelector("table");
|
|
69
72
|
if (dsoTable && tableElement instanceof HTMLTableElement) {
|
|
70
73
|
this.isResponsive =
|
|
@@ -42,6 +42,12 @@ export class Tooltip {
|
|
|
42
42
|
activate: () => (this.active = true),
|
|
43
43
|
deactivate: () => (this.active = false),
|
|
44
44
|
};
|
|
45
|
+
this.onMouseLeave = () => {
|
|
46
|
+
var _a;
|
|
47
|
+
if (!this.element.matches(":hover") && !((_a = this.target) === null || _a === void 0 ? void 0 : _a.matches(":hover"))) {
|
|
48
|
+
this.callbacks.deactivate();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
45
51
|
this.keyDownListener = (event) => {
|
|
46
52
|
if (event.key === "Escape") {
|
|
47
53
|
this.deactivate();
|
|
@@ -139,7 +145,7 @@ export class Tooltip {
|
|
|
139
145
|
}
|
|
140
146
|
if (!this.stateless && this.target) {
|
|
141
147
|
this.target.addEventListener("mouseenter", this.callbacks.activate);
|
|
142
|
-
this.target.addEventListener("mouseleave", this.
|
|
148
|
+
[this.element, this.target].forEach((element) => element.addEventListener("mouseleave", this.onMouseLeave));
|
|
143
149
|
this.target.addEventListener("focus", this.callbacks.activate);
|
|
144
150
|
this.target.addEventListener("blur", this.callbacks.deactivate);
|
|
145
151
|
}
|
|
@@ -149,7 +155,7 @@ export class Tooltip {
|
|
|
149
155
|
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
150
156
|
if (!this.stateless && this.target) {
|
|
151
157
|
this.target.removeEventListener("mouseenter", this.callbacks.activate);
|
|
152
|
-
this.target.removeEventListener("mouseleave", this.
|
|
158
|
+
[this.element, this.target].forEach((element) => element.removeEventListener("mouseleave", this.onMouseLeave));
|
|
153
159
|
this.target.removeEventListener("focus", this.callbacks.activate);
|
|
154
160
|
this.target.removeEventListener("blur", this.callbacks.deactivate);
|
|
155
161
|
}
|
|
@@ -84,6 +84,9 @@ export class TreeView {
|
|
|
84
84
|
return false;
|
|
85
85
|
}
|
|
86
86
|
const itemToFocus = path[path.length - 1];
|
|
87
|
+
if (!itemToFocus) {
|
|
88
|
+
throw new Error("No itemToFocus found");
|
|
89
|
+
}
|
|
87
90
|
const elementToFocus = Array.from((_a = tree.querySelectorAll("p")) !== null && _a !== void 0 ? _a : [])
|
|
88
91
|
.filter((item) => item.offsetWidth > 0 && item.offsetHeight > 0)
|
|
89
92
|
.find((item) => item.dataset["itemId"] === itemToFocus.id);
|
|
@@ -119,7 +122,11 @@ export class TreeView {
|
|
|
119
122
|
index = focusableItems.length - 1;
|
|
120
123
|
break;
|
|
121
124
|
}
|
|
122
|
-
|
|
125
|
+
const focusableItem = focusableItems[index];
|
|
126
|
+
if (!focusableItem) {
|
|
127
|
+
throw new Error("No focusableItem found");
|
|
128
|
+
}
|
|
129
|
+
TreeView.setFocus(tree, focusableItem);
|
|
123
130
|
}
|
|
124
131
|
static expandItemOrFocusChild(tree, target) {
|
|
125
132
|
var _a;
|
package/dist/collection/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export * from "./components/modal/modal.interfaces";
|
|
|
15
15
|
export * from "./components/ozon-content/ozon-content.interfaces";
|
|
16
16
|
export * from "./components/pagination/pagination.interfaces";
|
|
17
17
|
export * from "./components/responsive-element/responsive-element.interfaces";
|
|
18
|
+
export * from "./components/scrollable/scrollable.interfaces";
|
|
18
19
|
export * from "./components/selectable/selectable.interfaces";
|
|
19
20
|
export * from "./components/slide-toggle/slide-toggle.interfaces";
|
|
20
21
|
export * from "./components/tree-view/tree-view.interfaces";
|
|
@@ -197,6 +197,7 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
197
197
|
return activeEl;
|
|
198
198
|
}
|
|
199
199
|
tabInPopup(direction) {
|
|
200
|
+
var _a;
|
|
200
201
|
const tabs = this.tabbables;
|
|
201
202
|
const currentIndex = tabs.findIndex((e) => e === this.getActiveElement());
|
|
202
203
|
let nextIndex = currentIndex + direction;
|
|
@@ -206,7 +207,7 @@ const DropdownMenu = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
206
207
|
else if (nextIndex < 0) {
|
|
207
208
|
nextIndex = tabs.length - 1;
|
|
208
209
|
}
|
|
209
|
-
tabs[nextIndex].focus();
|
|
210
|
+
(_a = tabs[nextIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
210
211
|
}
|
|
211
212
|
render() {
|
|
212
213
|
return (h(Host, { onFocusout: this.focusOutListener, tabindex: this.open ? "-1" : undefined }, h("slot", { name: "toggle" }), h("div", { hidden: !this.open }, h("slot", null))));
|
|
@@ -45,7 +45,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
45
45
|
async toggleSection(sectionElement, event) {
|
|
46
46
|
const sections = Array.from(this.host.querySelectorAll(":scope > dso-accordion-section"));
|
|
47
47
|
if (typeof sectionElement === "number") {
|
|
48
|
-
|
|
48
|
+
const section = sections[sectionElement];
|
|
49
|
+
if (section instanceof HTMLElement) {
|
|
50
|
+
sectionElement = section;
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
if (!(sectionElement instanceof HTMLElement) || !sections.includes(sectionElement)) {
|
|
51
54
|
return;
|
|
@@ -16,9 +16,13 @@ const AnnotationOutput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
16
16
|
}
|
|
17
17
|
async toggleAnnotation(e, identifier) {
|
|
18
18
|
AnnotationService.toggle(identifier);
|
|
19
|
+
const open = AnnotationService.state[this.identifier];
|
|
20
|
+
if (open === undefined) {
|
|
21
|
+
throw new Error(`No state found for ${this.identifier}`);
|
|
22
|
+
}
|
|
19
23
|
this.dsoToggle.emit({
|
|
20
24
|
originalEvent: e,
|
|
21
|
-
open
|
|
25
|
+
open,
|
|
22
26
|
});
|
|
23
27
|
}
|
|
24
28
|
toggleHandler(e) {
|
|
@@ -131,10 +131,10 @@ const Autosuggest = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
131
131
|
throw new ReferenceError("Mandatory label for text input not found");
|
|
132
132
|
}
|
|
133
133
|
const label = this.input.labels[0];
|
|
134
|
-
if (label.id) {
|
|
134
|
+
if (label === null || label === void 0 ? void 0 : label.id) {
|
|
135
135
|
this.labelId = label.id;
|
|
136
136
|
}
|
|
137
|
-
else {
|
|
137
|
+
else if (label) {
|
|
138
138
|
label.id = this.labelId;
|
|
139
139
|
}
|
|
140
140
|
this.input.setAttribute("role", "combobox");
|
|
@@ -156,7 +156,7 @@ const Autosuggest = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
156
156
|
(_c = this.input) === null || _c === void 0 ? void 0 : _c.removeEventListener("focusin", this.onFocusIn);
|
|
157
157
|
}
|
|
158
158
|
markTerms(suggestionValue, terms) {
|
|
159
|
-
if (!suggestionValue || !terms || terms.length === 0) {
|
|
159
|
+
if (!suggestionValue || !terms || terms.length === 0 || terms[0] === undefined) {
|
|
160
160
|
return [""];
|
|
161
161
|
}
|
|
162
162
|
const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, "gi");
|
|
@@ -36,7 +36,11 @@ function parseDutchDate(value) {
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
const matches = value.split("-");
|
|
39
|
-
if (matches.length === 3 &&
|
|
39
|
+
if (matches.length === 3 &&
|
|
40
|
+
typeof matches[0] === "string" &&
|
|
41
|
+
typeof matches[1] === "string" &&
|
|
42
|
+
typeof matches[2] === "string" &&
|
|
43
|
+
matches[2].length === 4) {
|
|
40
44
|
return createDate(matches[2], matches[1], matches[0]);
|
|
41
45
|
}
|
|
42
46
|
}
|
|
@@ -172,7 +176,11 @@ function chunk(array, chunkSize) {
|
|
|
172
176
|
function mapWithOffset(array, startingOffset, mapFn) {
|
|
173
177
|
return array.map((_, i) => {
|
|
174
178
|
const adjustedIndex = (i + startingOffset) % array.length;
|
|
175
|
-
|
|
179
|
+
const item = array[adjustedIndex];
|
|
180
|
+
if (!item) {
|
|
181
|
+
throw new Error("No item found");
|
|
182
|
+
}
|
|
183
|
+
return mapFn(item);
|
|
176
184
|
});
|
|
177
185
|
}
|
|
178
186
|
const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, localization, firstDayOfWeek, min, max, onDateSelect, onKeyboardNavigation, focusedDayRef, onMouseDown, onFocusIn, }) => {
|
|
@@ -348,6 +356,9 @@ const DsoDatePicker$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
348
356
|
};
|
|
349
357
|
this.handleTouchStart = (event) => {
|
|
350
358
|
const touch = event.changedTouches[0];
|
|
359
|
+
if (!touch) {
|
|
360
|
+
throw new Error("No touch found");
|
|
361
|
+
}
|
|
351
362
|
this.initialTouchX = touch.pageX;
|
|
352
363
|
this.initialTouchY = touch.pageY;
|
|
353
364
|
};
|
|
@@ -357,6 +368,9 @@ const DsoDatePicker$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
357
368
|
this.handleTouchEnd = (event) => {
|
|
358
369
|
var _a, _b;
|
|
359
370
|
const touch = event.changedTouches[0];
|
|
371
|
+
if (!touch) {
|
|
372
|
+
throw new Error("No touch found");
|
|
373
|
+
}
|
|
360
374
|
const distX = touch.pageX - ((_a = this.initialTouchX) !== null && _a !== void 0 ? _a : 0); // get horizontal dist traveled
|
|
361
375
|
const distY = touch.pageY - ((_b = this.initialTouchY) !== null && _b !== void 0 ? _b : 0); // get vertical dist traveled
|
|
362
376
|
const threshold = 70;
|
|
@@ -20,7 +20,7 @@ const Heading = ({ heading, ref, className }, children) => {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const expandableHeadingCss = "h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{color:#275937}h1,.h1,h2,.h2,h3,.h3{margin-
|
|
23
|
+
const expandableHeadingCss = "h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6{color:#275937}h1,.h1,h2,.h2,h3,.h3{margin-block-end:16px;margin-block-start:24px}h1,.h1{line-height:1.25}h1{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-block-end:16px;margin-block-start: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}ins{background-color:#e4f1d4;box-shadow:0 1px 3px 1px rgba(0, 0, 0, 0.25);color:#000;text-decoration:none}:host{display:block;margin-inline:-8px;padding-inline:8px}:host(.dso-del){background-color:#f5d8dc;color:#000;text-decoration:line-through}:host(.dso-ins){background-color:#e4f1d4;box-shadow:0 1px 3px 1px rgba(0, 0, 0, 0.25);color:#000}*,*::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-edit-action-text{margin-bottom:8px;margin-top:-8px}.dso-edit-action-text span{display:inline-block;font-style:italic}.dso-edit-action-text+.expandable-heading{margin-top:0;padding-top:0}.expandable-heading{align-items:center;display:flex;margin-bottom:8px;margin-top:8px}.expandable-heading h2,.expandable-heading h3,.expandable-heading h4,.expandable-heading h5,.expandable-heading h6{font-size:1rem;margin-bottom:0;margin-right:8px;margin-top:0}.expandable-heading button{align-items:flex-start;cursor:pointer;background-color:transparent;border:0;color:inherit;display:flex;line-height:24px;font-size:inherit;font-weight:inherit;padding:0;text-align:left}.expandable-heading button>dso-icon{flex-shrink:0}.expandable-heading.dso-expandable-heading-black button{color:#000}dso-expandable{padding-left:24px}.addons-end{display:inline-block;margin-left:auto}";
|
|
24
24
|
|
|
25
25
|
const ExpandableHeading = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
26
26
|
constructor() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$
|
|
2
|
+
import { d as defineCustomElement$3 } from './icon.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './scrollable.js';
|
|
3
4
|
|
|
4
5
|
const transitionDuration = 300; // Sync with $transition-duration in ./map-controls.scss
|
|
5
6
|
|
|
6
|
-
const mapControlsCss = ":host {\n background-color: #fff;\n border: 1px solid #ccc;\n bottom: 0;\n display: block;\n font-family: Asap, sans-serif;\n position: absolute;\n top: 0;\n left: 100%;\n transition: transform 300ms ease;\n width: 300px;\n}\n\n*,\n*::after,\n*::before {\n box-sizing: border-box;\n}\n\n:host([open]) {\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.3);\n transform: translateX(-100%);\n}\n:host([open]) .toggle-visibility-button {\n display: none;\n}\n\nbutton {\n -webkit-appearance: button;\n color: inherit;\n cursor: pointer;\n font: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n margin: 0;\n overflow: visible;\n text-transform: none;\n}\nbutton[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.toggle-visibility-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);\n font-weight: 600;\n margin-right: 16px;\n padding: 8px 16px;\n white-space: nowrap;\n position: absolute;\n right: calc(100% + 56px);\n top: 16px;\n}\n.toggle-visibility-button:focus, .toggle-visibility-button:focus-visible {\n outline-offset: 2px;\n}\n.toggle-visibility-button:active {\n outline: 0;\n}\n.toggle-visibility-button:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.toggle-visibility-button:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.toggle-visibility-button[disabled], .toggle-visibility-button[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.toggle-visibility-button.btn-sm {\n line-height: 1rem;\n}\n.toggle-visibility-button.btn-sm dso-icon,\n.toggle-visibility-button.btn-sm svg.di, .toggle-visibility-button.btn-sm.extern::after, .toggle-visibility-button.btn-sm.download::after, .toggle-visibility-button.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.toggle-visibility-button.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button dso-icon,\n.toggle-visibility-button svg.di {\n margin-left: -8px;\n margin-right: 8px;\n}\n.toggle-visibility-button span + dso-icon,\n.toggle-visibility-button span + svg.di {\n margin-left: 8px;\n margin-right: -8px;\n}\n.toggle-visibility-button.dso-spinner-left[disabled], .toggle-visibility-button.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.toggle-visibility-button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.toggle-visibility-button.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.toggle-visibility-button.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.toggle-visibility-button.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.toggle-visibility-button.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button:focus-visible {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n outline: none;\n}\n\n.zoom-buttons {\n border-radius: 4px;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);\n display: flex;\n flex-wrap: wrap;\n flex: 0 0;\n position: absolute;\n right: calc(100% + 16px);\n top: 16px;\n}\n.zoom-buttons button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n padding: 8px;\n border-radius: 0;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n flex: 0 0 100%;\n height: 40px;\n min-width: auto;\n width: 40px;\n}\n.zoom-buttons button:focus, .zoom-buttons button:focus-visible {\n outline-offset: 2px;\n}\n.zoom-buttons button:active {\n outline: 0;\n}\n.zoom-buttons button:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.zoom-buttons button:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.zoom-buttons button[disabled], .zoom-buttons button[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.zoom-buttons button.btn-sm {\n line-height: 1rem;\n}\n.zoom-buttons button.btn-sm dso-icon,\n.zoom-buttons button.btn-sm svg.di, .zoom-buttons button.btn-sm.extern::after, .zoom-buttons button.btn-sm.download::after, .zoom-buttons button.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.zoom-buttons button.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button > span {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.zoom-buttons button.dso-spinner-left[disabled], .zoom-buttons button.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.zoom-buttons button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.zoom-buttons button.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.zoom-buttons button.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.zoom-buttons button.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.zoom-buttons button.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button:focus-visible {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n outline: none;\n}\n.zoom-buttons button + button {\n border-radius: 0;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-top: 1px solid #ccc;\n}\n\n.close-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n border: 0;\n color: #39870c;\n line-height: 1;\n padding: 0;\n background-color: transparent;\n padding: 0;\n position: absolute;\n right: 16px;\n top: 16px;\n}\n.close-button:focus, .close-button:focus-visible {\n outline-offset: 2px;\n}\n.close-button:active {\n outline: 0;\n}\n.close-button[disabled] {\n color: #afcf9d;\n}\n.close-button[disabled].dso-spinner-left, .close-button[disabled].dso-spinner-right {\n color: #39870c;\n}\n.close-button:not([disabled]):hover {\n color: #275937;\n text-decoration: underline;\n text-underline-position: under;\n}\n.close-button:not([disabled]):active {\n color: #173521;\n}\n.close-button.btn-align {\n line-height: calc(1.5em - 1px);\n padding: 11px 0;\n position: relative;\n}\n.close-button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-right: 8px;\n}\n.close-button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-left: 8px;\n}\n.close-button > span {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\nsection:not([hidden]) {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\nheader,\n.content {\n padding: 16px;\n}\n\nheader {\n border-bottom: 1px solid #ccc;\n flex-grow: 0;\n position: relative;\n}\nheader h2 {\n color: #275937;\n font-family: \"Asap\", sans-serif;\n line-height: 1;\n margin: 0;\n}\n\n.content {\n flex-grow: 1;\n overflow-y: auto;\n}";
|
|
7
|
+
const mapControlsCss = ":host {\n background-color: #fff;\n border: 1px solid #ccc;\n bottom: 0;\n display: block;\n font-family: Asap, sans-serif;\n position: absolute;\n top: 0;\n left: 100%;\n transition: transform 300ms ease;\n width: 300px;\n}\n\n*,\n*::after,\n*::before {\n box-sizing: border-box;\n}\n\n:host([open]) {\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.3);\n transform: translateX(-100%);\n}\n:host([open]) .toggle-visibility-button {\n display: none;\n}\n\nbutton {\n -webkit-appearance: button;\n color: inherit;\n cursor: pointer;\n font: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n margin: 0;\n overflow: visible;\n text-transform: none;\n}\nbutton[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n.toggle-visibility-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);\n font-weight: 600;\n margin-right: 16px;\n padding: 8px 16px;\n white-space: nowrap;\n position: absolute;\n right: calc(100% + 56px);\n top: 16px;\n}\n.toggle-visibility-button:focus, .toggle-visibility-button:focus-visible {\n outline-offset: 2px;\n}\n.toggle-visibility-button:active {\n outline: 0;\n}\n.toggle-visibility-button:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.toggle-visibility-button:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.toggle-visibility-button[disabled], .toggle-visibility-button[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.toggle-visibility-button.btn-sm {\n line-height: 1rem;\n}\n.toggle-visibility-button.btn-sm dso-icon,\n.toggle-visibility-button.btn-sm svg.di, .toggle-visibility-button.btn-sm.extern::after, .toggle-visibility-button.btn-sm.download::after, .toggle-visibility-button.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.toggle-visibility-button.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button dso-icon,\n.toggle-visibility-button svg.di {\n margin-left: -8px;\n margin-right: 8px;\n}\n.toggle-visibility-button span + dso-icon,\n.toggle-visibility-button span + svg.di {\n margin-left: 8px;\n margin-right: -8px;\n}\n.toggle-visibility-button.dso-spinner-left[disabled], .toggle-visibility-button.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.toggle-visibility-button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.toggle-visibility-button.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.toggle-visibility-button.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.toggle-visibility-button.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.toggle-visibility-button.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}\n.toggle-visibility-button:focus-visible {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n outline: none;\n}\n\n.zoom-buttons {\n border-radius: 4px;\n box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.5);\n display: flex;\n flex-wrap: wrap;\n flex: 0 0;\n position: absolute;\n right: calc(100% + 16px);\n top: 16px;\n}\n.zoom-buttons button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n border-width: 1px;\n border-style: solid;\n border-radius: 4px;\n line-height: 1.5;\n min-width: 56px;\n padding: 11px 15px;\n border: 0;\n padding: 8px;\n border-radius: 0;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n flex: 0 0 100%;\n height: 40px;\n min-width: auto;\n width: 40px;\n}\n.zoom-buttons button:focus, .zoom-buttons button:focus-visible {\n outline-offset: 2px;\n}\n.zoom-buttons button:active {\n outline: 0;\n}\n.zoom-buttons button:hover {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n}\n.zoom-buttons button:active {\n background-color: #275937;\n border-color: #275937;\n color: #fff;\n}\n.zoom-buttons button[disabled], .zoom-buttons button[disabled]:hover {\n background-color: #fff;\n border-color: #afcf9d;\n color: #afcf9d;\n}\n.zoom-buttons button.btn-sm {\n line-height: 1rem;\n}\n.zoom-buttons button.btn-sm dso-icon,\n.zoom-buttons button.btn-sm svg.di, .zoom-buttons button.btn-sm.extern::after, .zoom-buttons button.btn-sm.download::after, .zoom-buttons button.btn-sm.dso-spinner::before {\n margin-bottom: -4px;\n margin-top: -4px;\n}\n.zoom-buttons button.btn-sm.dso-spinner-left::before {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button.btn-sm.dso-spinner-right::after {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button > span {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.zoom-buttons button.dso-spinner-left[disabled], .zoom-buttons button.dso-spinner-right[disabled] {\n background-color: #fff;\n border-color: #39870c;\n color: #39870c;\n}\n.zoom-buttons button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.zoom-buttons button.dso-spinner-left:not([disabled]):hover::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-right: 8px;\n}\n.zoom-buttons button.dso-spinner-left:not([disabled]).btn-sm:hover::before {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.zoom-buttons button.dso-spinner-right:not([disabled]):hover::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %23fff; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: top;\n width: 24px;\n margin-left: 8px;\n}\n.zoom-buttons button.dso-spinner-right:not([disabled]).btn-sm:hover::after {\n height: 16px;\n width: 16px;\n}\n.zoom-buttons button:focus-visible {\n background-color: #39870c;\n border-color: #39870c;\n color: #fff;\n outline: none;\n}\n.zoom-buttons button + button {\n border-radius: 0;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-top: 1px solid #ccc;\n}\n\n.close-button {\n display: inline-block;\n font-size: 1em;\n font-weight: 500;\n margin-bottom: 0;\n text-decoration: none;\n touch-action: manipulation;\n text-align: left;\n user-select: none;\n vertical-align: middle;\n border: 0;\n color: #39870c;\n line-height: 1;\n padding: 0;\n background-color: transparent;\n padding: 0;\n position: absolute;\n right: 16px;\n top: 16px;\n}\n.close-button:focus, .close-button:focus-visible {\n outline-offset: 2px;\n}\n.close-button:active {\n outline: 0;\n}\n.close-button[disabled] {\n color: #afcf9d;\n}\n.close-button[disabled].dso-spinner-left, .close-button[disabled].dso-spinner-right {\n color: #39870c;\n}\n.close-button:not([disabled]):hover {\n color: #275937;\n text-decoration: underline;\n text-underline-position: under;\n}\n.close-button:not([disabled]):active {\n color: #173521;\n}\n.close-button.btn-align {\n line-height: calc(1.5em - 1px);\n padding: 11px 0;\n position: relative;\n}\n.close-button.dso-spinner-left::before {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-right: 8px;\n}\n.close-button.dso-spinner-right::after {\n background-image: url(\"data:image/svg+xml,%3Csvg class='spinner' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E .spinner %7B animation: rotator 8s linear infinite; transform-origin: center; %7D @keyframes rotator %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D .path %7B stroke-dasharray: 265; stroke-dashoffset: 0; transform-origin: center; stroke: %2339870c; animation: dash 2s ease-in-out infinite; %7D @keyframes dash %7B 0%25 %7B stroke-dashoffset: 265; %7D 50%25 %7B stroke-dashoffset: 65; transform:rotate(90deg); %7D 100%25 %7B stroke-dashoffset: 265; transform:rotate(360deg); %7D %3C/style%3E%3Ccircle class='path' fill='none' stroke-width='10' stroke-linecap='butt' cx='50' cy='50' r='45'%3E%3C/circle%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n content: \"\";\n display: inline-block;\n height: 24px;\n vertical-align: middle;\n width: 24px;\n margin-left: 8px;\n}\n.close-button > span {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\nsection:not([hidden]) {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\nheader,\n.content {\n padding: 16px;\n}\n\nheader {\n border-bottom: 1px solid #ccc;\n flex-grow: 0;\n position: relative;\n}\nheader h2 {\n color: #275937;\n font-family: \"Asap\", sans-serif;\n line-height: 1;\n margin: 0;\n}";
|
|
7
8
|
|
|
8
9
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
10
|
if (kind === "a" && !f)
|
|
@@ -58,7 +59,7 @@ const MapControls = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
render() {
|
|
61
|
-
return (h(Host, null, h("button", { type: "button", id: "toggle-visibility-button", class: "toggle-visibility-button", onClick: (e) => this.toggleVisibility(e), ref: (element) => (__classPrivateFieldSet(this, _MapControls_toggleButtonElement, element, "f")) }, h("dso-icon", { icon: "layers" }), h("span", null, "Kaartlagen")), h("div", { class: "zoom-buttons" }, h("button", { type: "button", onClick: (e) => this.dsoZoomIn.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.dsoZoomOut.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, this.panelTitle), h("button", { type: "button", class: "close-button", onClick: (e) => this.toggleVisibility(e), ref: (element) => (__classPrivateFieldSet(this, _MapControls_closeButtonElement, element, "f")) }, h("span", null, "Verberg paneel ", this.panelTitle), h("dso-icon", { icon: "times" }))), h("div", { class: "content" }, h("slot", null)))));
|
|
62
|
+
return (h(Host, null, h("button", { type: "button", id: "toggle-visibility-button", class: "toggle-visibility-button", onClick: (e) => this.toggleVisibility(e), ref: (element) => (__classPrivateFieldSet(this, _MapControls_toggleButtonElement, element, "f")) }, h("dso-icon", { icon: "layers" }), h("span", null, "Kaartlagen")), h("div", { class: "zoom-buttons" }, h("button", { type: "button", onClick: (e) => this.dsoZoomIn.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.dsoZoomOut.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, this.panelTitle), h("button", { type: "button", class: "close-button", onClick: (e) => this.toggleVisibility(e), ref: (element) => (__classPrivateFieldSet(this, _MapControls_closeButtonElement, element, "f")) }, h("span", null, "Verberg paneel ", this.panelTitle), h("dso-icon", { icon: "times" }))), h("dso-scrollable", null, h("div", { class: "content" }, h("slot", null))))));
|
|
62
63
|
}
|
|
63
64
|
static get watchers() { return {
|
|
64
65
|
"open": ["watchOpen"]
|
|
@@ -75,7 +76,7 @@ function defineCustomElement$1() {
|
|
|
75
76
|
if (typeof customElements === "undefined") {
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
|
-
const components = ["dso-map-controls", "dso-icon"];
|
|
79
|
+
const components = ["dso-map-controls", "dso-icon", "dso-scrollable"];
|
|
79
80
|
components.forEach(tagName => { switch (tagName) {
|
|
80
81
|
case "dso-map-controls":
|
|
81
82
|
if (!customElements.get(tagName)) {
|
|
@@ -83,6 +84,11 @@ function defineCustomElement$1() {
|
|
|
83
84
|
}
|
|
84
85
|
break;
|
|
85
86
|
case "dso-icon":
|
|
87
|
+
if (!customElements.get(tagName)) {
|
|
88
|
+
defineCustomElement$3();
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "dso-scrollable":
|
|
86
92
|
if (!customElements.get(tagName)) {
|
|
87
93
|
defineCustomElement$2();
|
|
88
94
|
}
|
|
@@ -49,7 +49,12 @@ const Pagination = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
49
49
|
const availablePositions = this.availablePositions;
|
|
50
50
|
const currentPage = (_a = this.currentPage) !== null && _a !== void 0 ? _a : 0;
|
|
51
51
|
const pages = this.getPages(currentPage, this.availablePositions, this.totalPages);
|
|
52
|
-
return (h("dso-responsive-element", { ref: (element) => (this.responsiveElement = element) }, h("ul", { class: "pagination" }, h("li", { class: currentPage <= 1 || currentPage > this.totalPages ? "dso-page-hidden" : undefined }, h("a", { href: this.formatHref((_b = pages[pages.indexOf(currentPage) - 1]) !== null && _b !== void 0 ? _b : 1), "aria-label": "Vorige", onClick: (e) => { var _a; return currentPage && this.clickHandler(e, (_a = pages[pages.indexOf(currentPage) - 1]) !== null && _a !== void 0 ? _a : 1); } }, h("dso-icon", { icon: "chevron-left" }))), pages.map((page) => (h(Fragment, null, this.showEllipsisBeforeLast(pages, page, availablePositions
|
|
52
|
+
return (h("dso-responsive-element", { ref: (element) => (this.responsiveElement = element) }, h("ul", { class: "pagination" }, h("li", { class: currentPage <= 1 || currentPage > this.totalPages ? "dso-page-hidden" : undefined }, h("a", { href: this.formatHref((_b = pages[pages.indexOf(currentPage) - 1]) !== null && _b !== void 0 ? _b : 1), "aria-label": "Vorige", onClick: (e) => { var _a; return currentPage && this.clickHandler(e, (_a = pages[pages.indexOf(currentPage) - 1]) !== null && _a !== void 0 ? _a : 1); } }, h("dso-icon", { icon: "chevron-left" }))), pages.map((page) => (h(Fragment, null, this.showEllipsisBeforeLast(pages, page, availablePositions) && (h("li", null, h("span", null, "..."))), h("li", { key: page, class: currentPage === page ? "active" : undefined }, currentPage === page ? (h("span", { "aria-current": "page" }, page)) : (h("a", { href: this.formatHref(page), onClick: (e) => this.clickHandler(e, page) }, page))), this.showEllipsisAfterFirst(pages, page, availablePositions) && (h("li", null, h("span", null, "...")))))), h("li", { class: currentPage < 1 || currentPage >= this.totalPages ? "dso-page-hidden" : undefined }, h("a", { href: this.formatHref((_c = pages[pages.indexOf(currentPage) + 1]) !== null && _c !== void 0 ? _c : this.totalPages), "aria-label": "Volgende", onClick: (e) => {
|
|
53
|
+
var _a;
|
|
54
|
+
return currentPage &&
|
|
55
|
+
this.totalPages &&
|
|
56
|
+
this.clickHandler(e, (_a = pages[pages.indexOf(currentPage) + 1]) !== null && _a !== void 0 ? _a : this.totalPages);
|
|
57
|
+
} }, h("dso-icon", { icon: "chevron-right" }))))));
|
|
53
58
|
}
|
|
54
59
|
getAvailablePositions(sizePositions) {
|
|
55
60
|
if (sizePositions % 2 === 0) {
|
|
@@ -110,14 +115,22 @@ const Pagination = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
110
115
|
return range.filter((v, i, a) => a.indexOf(v) === i);
|
|
111
116
|
}
|
|
112
117
|
showEllipsisAfterFirst(pages, page, availablePositions) {
|
|
118
|
+
const totalPages = pages[pages.length - 1];
|
|
119
|
+
if (!totalPages) {
|
|
120
|
+
throw new Error("No totalPages");
|
|
121
|
+
}
|
|
113
122
|
return (pages.indexOf(page) === 0 &&
|
|
114
|
-
|
|
123
|
+
totalPages > availablePositions - 2 &&
|
|
115
124
|
!pages.some((p) => p === 2) &&
|
|
116
125
|
availablePositions >= 7);
|
|
117
126
|
}
|
|
118
|
-
showEllipsisBeforeLast(pages, page, availablePositions
|
|
127
|
+
showEllipsisBeforeLast(pages, page, availablePositions) {
|
|
128
|
+
const totalPages = pages[pages.length - 1];
|
|
129
|
+
if (!totalPages) {
|
|
130
|
+
throw new Error("No totalPages");
|
|
131
|
+
}
|
|
119
132
|
return (pages.indexOf(page) === pages.length - 1 &&
|
|
120
|
-
|
|
133
|
+
totalPages > availablePositions - 2 &&
|
|
121
134
|
!pages.some((p) => p === totalPages - 1) &&
|
|
122
135
|
availablePositions >= 7);
|
|
123
136
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface DsoScrollable extends Components.DsoScrollable, HTMLElement {}
|
|
4
|
+
export const DsoScrollable: {
|
|
5
|
+
prototype: DsoScrollable;
|
|
6
|
+
new (): DsoScrollable;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -72,6 +72,9 @@ const Table = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
setResponsiveTable([dsoTable]) {
|
|
75
|
+
if (!dsoTable) {
|
|
76
|
+
throw new Error("No dsoTable found");
|
|
77
|
+
}
|
|
75
78
|
const tableElement = dsoTable.target.querySelector("table");
|
|
76
79
|
if (dsoTable && tableElement instanceof HTMLTableElement) {
|
|
77
80
|
this.isResponsive =
|
|
@@ -107,6 +107,9 @@ const TreeView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
107
107
|
return false;
|
|
108
108
|
}
|
|
109
109
|
const itemToFocus = path[path.length - 1];
|
|
110
|
+
if (!itemToFocus) {
|
|
111
|
+
throw new Error("No itemToFocus found");
|
|
112
|
+
}
|
|
110
113
|
const elementToFocus = Array.from((_a = tree.querySelectorAll("p")) !== null && _a !== void 0 ? _a : [])
|
|
111
114
|
.filter((item) => item.offsetWidth > 0 && item.offsetHeight > 0)
|
|
112
115
|
.find((item) => item.dataset["itemId"] === itemToFocus.id);
|
|
@@ -142,7 +145,11 @@ const TreeView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
142
145
|
index = focusableItems.length - 1;
|
|
143
146
|
break;
|
|
144
147
|
}
|
|
145
|
-
|
|
148
|
+
const focusableItem = focusableItems[index];
|
|
149
|
+
if (!focusableItem) {
|
|
150
|
+
throw new Error("No focusableItem found");
|
|
151
|
+
}
|
|
152
|
+
TreeView.setFocus(tree, focusableItem);
|
|
146
153
|
}
|
|
147
154
|
static expandItemOrFocusChild(tree, target) {
|
|
148
155
|
var _a;
|