@dso-toolkit/core 35.0.0 → 36.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +2 -2
- 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 +21 -12
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +3 -3
- package/dist/cjs/dso-header.cjs.entry.js +16 -7
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +1 -1
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-icon.cjs.entry.js +1 -1
- package/dist/cjs/dso-image-overlay.cjs.entry.js +4 -4
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +2 -2
- package/dist/cjs/dso-label.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-controls.cjs.entry.js +22 -19
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +36 -24
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +3 -3
- package/dist/cjs/dso-tooltip.cjs.entry.js +8 -4
- package/dist/cjs/dso-tree-view.cjs.entry.js +9 -9
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +4 -4
- package/dist/cjs/{focus-trap.esm-8d3e3fb6.js → focus-trap.esm-a85643b0.js} +102 -68
- package/dist/cjs/{index-5ea63531.js → index-0a7c679a.js} +73 -67
- package/dist/cjs/index.esm-3520a2a6.js +427 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/alert/alert.template.js +1 -1
- package/dist/collection/components/anchor/anchor.template.js +1 -1
- package/dist/collection/components/autosuggest/autosuggest.css +1 -1
- package/dist/collection/components/badge/badge.template.js +1 -1
- package/dist/collection/components/button/button.template.js +1 -1
- package/dist/collection/components/date-picker/date-picker.css +9 -6
- package/dist/collection/components/date-picker/date-picker.js +21 -11
- package/dist/collection/components/date-picker/date-picker.template.js +1 -1
- package/dist/collection/components/definition-list/definition-list.template.js +2 -2
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +1 -1
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +38 -9
- package/dist/collection/components/header/header.template.js +4 -2
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +2 -2
- package/dist/collection/components/highlight-box/highlight-box.template.js +2 -2
- package/dist/collection/components/icon/icon.template.js +1 -1
- package/dist/collection/components/image-overlay/image-overlay.css +1 -1
- package/dist/collection/components/label/label.template.js +2 -2
- package/dist/collection/components/list/list.template.js +1 -1
- package/dist/collection/components/map-controls/map-controls.js +17 -19
- package/dist/collection/components/ozon-content/get-node-name.function.js +9 -0
- package/dist/collection/components/ozon-content/nodes/al.node.js +2 -1
- package/dist/collection/components/ozon-content/nodes/fallback.node.js +2 -1
- package/dist/collection/components/ozon-content/nodes/noot.node.js +15 -15
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +9 -5
- package/dist/collection/components/ozon-content/ozon-content.css +76 -23
- package/dist/collection/components/progress-bar/progress-bar.template.js +1 -1
- package/dist/collection/components/progress-indicator/progress-indicator.template.js +1 -1
- package/dist/collection/components/selectable/selectable.css +7 -1
- package/dist/collection/components/selectable/selectable.template.js +1 -1
- package/dist/collection/components/toggletip/toggletip.template.js +2 -2
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.template.js +1 -1
- package/dist/collection/components/tree-view/tree-item.js +7 -7
- package/dist/collection/components/tree-view/tree-view.css +86 -15
- package/dist/collection/components/viewer-grid/viewer-grid.css +2 -2
- package/dist/custom-elements/index.js +460 -229
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-5037944e.entry.js → p-121c3588.entry.js} +1 -1
- package/dist/dso-toolkit/p-131d54e3.js +5 -0
- package/dist/dso-toolkit/p-1a3db1cd.entry.js +1 -0
- package/dist/dso-toolkit/p-1fd3d18d.entry.js +1 -0
- package/dist/dso-toolkit/{p-ad540748.entry.js → p-2a611af3.entry.js} +1 -1
- package/dist/dso-toolkit/{p-2b6a3dfa.entry.js → p-3cb44a36.entry.js} +1 -1
- package/dist/dso-toolkit/{p-1fefbf8c.entry.js → p-4f904355.entry.js} +1 -1
- package/dist/dso-toolkit/p-5e5fbd41.js +5 -0
- package/dist/dso-toolkit/{p-4e573fc5.entry.js → p-5e614420.entry.js} +1 -1
- package/dist/dso-toolkit/p-72e47943.entry.js +1 -0
- package/dist/dso-toolkit/{p-50b63cf4.entry.js → p-746d70f9.entry.js} +1 -1
- package/dist/dso-toolkit/p-7abe091d.entry.js +1 -0
- package/dist/dso-toolkit/p-7b67e324.entry.js +1 -0
- package/dist/dso-toolkit/{p-3c4dbd89.entry.js → p-8bb8148f.entry.js} +1 -1
- package/dist/dso-toolkit/p-a58b3108.entry.js +1 -0
- package/dist/dso-toolkit/{p-225bbb28.entry.js → p-abd32847.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c6f467b3.entry.js → p-af8a4337.entry.js} +1 -1
- package/dist/dso-toolkit/{p-348414bf.entry.js → p-b29184e1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-bc14cafd.entry.js → p-b86128b3.entry.js} +1 -1
- package/dist/dso-toolkit/p-c62606a3.js +1 -0
- package/dist/dso-toolkit/{p-f0b67246.entry.js → p-d0d279cc.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c95108fe.entry.js → p-d1f62081.entry.js} +1 -1
- package/dist/dso-toolkit/{p-3b493a2c.entry.js → p-d6c47662.entry.js} +1 -1
- package/dist/dso-toolkit/{p-c54ecae1.entry.js → p-daf049bd.entry.js} +1 -1
- package/dist/dso-toolkit/p-e01b1657.entry.js +1 -0
- package/dist/dso-toolkit/{p-94dffa65.entry.js → p-ea14647b.entry.js} +1 -1
- package/dist/dso-toolkit/{p-dc86d830.entry.js → p-efa4a33d.entry.js} +1 -1
- package/dist/dso-toolkit/{p-951f5872.entry.js → p-efb7575f.entry.js} +1 -1
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +2 -2
- 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 +21 -12
- package/dist/esm/dso-dropdown-menu.entry.js +3 -3
- package/dist/esm/dso-header.entry.js +16 -7
- package/dist/esm/dso-helpcenter-panel.entry.js +1 -1
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-icon.entry.js +1 -1
- package/dist/esm/dso-image-overlay.entry.js +4 -4
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +2 -2
- package/dist/esm/dso-label.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +22 -19
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +36 -24
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-toggletip.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +3 -3
- package/dist/esm/dso-tooltip.entry.js +8 -4
- package/dist/esm/dso-tree-view.entry.js +9 -9
- package/dist/esm/dso-viewer-grid.entry.js +4 -4
- package/dist/esm/{focus-trap.esm-299989f2.js → focus-trap.esm-a01ad6c9.js} +102 -68
- package/dist/esm/{index-d54cae76.js → index-1602fde1.js} +73 -67
- package/dist/esm/index.esm-45465af7.js +422 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/date-picker/date-picker.d.ts +2 -0
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +7 -1
- package/dist/types/components/header/header.template.d.ts +1 -1
- package/dist/types/components/ozon-content/get-node-name.function.d.ts +1 -0
- package/dist/types/components/ozon-content/nodes/noot.node.d.ts +2 -2
- package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +0 -1
- package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +0 -1
- package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +0 -1
- package/dist/types/components/ozon-content/ozon-content.d.ts +0 -1
- package/dist/types/components.d.ts +3 -2
- package/dist/types/icon/dso-icon-sass-function.d.ts +1 -1
- package/package.json +30 -26
- package/dist/cjs/index.esm-2ac7081c.js +0 -267
- package/dist/dso-toolkit/p-44905fb1.js +0 -5
- package/dist/dso-toolkit/p-88bc5873.entry.js +0 -1
- package/dist/dso-toolkit/p-8b6e3abc.entry.js +0 -1
- package/dist/dso-toolkit/p-8bf3a60e.js +0 -5
- package/dist/dso-toolkit/p-94b79e43.entry.js +0 -1
- package/dist/dso-toolkit/p-a7306b7b.entry.js +0 -1
- package/dist/dso-toolkit/p-ad2210ad.entry.js +0 -1
- package/dist/dso-toolkit/p-daa1e29d.entry.js +0 -1
- package/dist/dso-toolkit/p-dad72605.js +0 -1
- package/dist/dso-toolkit/p-f193c258.entry.js +0 -1
- package/dist/esm/index.esm-a1362957.js +0 -262
|
@@ -93,7 +93,7 @@ export class DropdownMenu {
|
|
|
93
93
|
this.openPopup();
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
componentDidRender() {
|
|
97
97
|
for (const li of Array.from(this.host.getElementsByTagName("li"))) {
|
|
98
98
|
for (const tab of tabbable(li)) {
|
|
99
99
|
tab.setAttribute("role", this.checkable ? "menuitemradio" : "menuitem");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from "lit-html";
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function dropdownMenuTemplate({ id, button, dropdownAlign, isCheckable, children }) {
|
|
4
4
|
return html `
|
|
5
5
|
<dso-dropdown-menu
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Component, Element, Fragment, h, Prop, State, Watch, } from "@stencil/core";
|
|
1
|
+
import { Component, Element, Event, Fragment, h, Prop, State, Watch, } from "@stencil/core";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import debounce from "debounce";
|
|
4
4
|
const minDesktopViewportWidth = 992;
|
|
5
5
|
export class Header {
|
|
6
6
|
constructor() {
|
|
7
|
+
this.mainMenu = [];
|
|
7
8
|
this.useDropDownMenu = "auto";
|
|
8
9
|
this.showDropDown = false;
|
|
9
10
|
this.isLoggedIn = false;
|
|
@@ -13,6 +14,17 @@ export class Header {
|
|
|
13
14
|
this.setDropDownMenu();
|
|
14
15
|
this.setOverflowMenu();
|
|
15
16
|
}, 100);
|
|
17
|
+
this.MenuItem = (item) => {
|
|
18
|
+
const click = (event) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
this.menuItemClick.emit({
|
|
21
|
+
originalEvent: event,
|
|
22
|
+
menuItem: item,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
return (h("li", { class: item.active ? "dso-active" : undefined },
|
|
26
|
+
h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick: click }, item.label)));
|
|
27
|
+
};
|
|
16
28
|
}
|
|
17
29
|
watchUseDropDownMenu(value) {
|
|
18
30
|
if (value === "auto") {
|
|
@@ -64,10 +76,6 @@ export class Header {
|
|
|
64
76
|
disconnectedCallback() {
|
|
65
77
|
window.removeEventListener("resize", this.onWindowResize);
|
|
66
78
|
}
|
|
67
|
-
MenuItem(item) {
|
|
68
|
-
return (h("li", { class: item.active ? "dso-active" : undefined },
|
|
69
|
-
h("a", { href: item.url, "aria-current": item.active ? "page" : undefined }, item.label)));
|
|
70
|
-
}
|
|
71
79
|
render() {
|
|
72
80
|
return (h(Fragment, null,
|
|
73
81
|
h("div", { class: clsx("dso-header", {
|
|
@@ -79,7 +87,7 @@ export class Header {
|
|
|
79
87
|
h("slot", { name: "logo" })),
|
|
80
88
|
h("div", { class: "sub-logo" },
|
|
81
89
|
h("slot", { name: "sub-logo" }))),
|
|
82
|
-
this.showDropDown && (h("div", { class: "dropdown" },
|
|
90
|
+
this.showDropDown && this.mainMenu.length > 0 && (h("div", { class: "dropdown" },
|
|
83
91
|
h("dso-dropdown-menu", { "dropdown-align": "right" },
|
|
84
92
|
h("button", { type: "button", class: "tertiary", slot: "toggle" },
|
|
85
93
|
h("span", null, "Menu")),
|
|
@@ -99,7 +107,7 @@ export class Header {
|
|
|
99
107
|
h("span", { class: "profile-label" }, "- Mijn profiel")))),
|
|
100
108
|
this.logoutUrl && this.isLoggedIn && (h("li", null,
|
|
101
109
|
h("a", { href: this.logoutUrl }, "Uitloggen"))))))))),
|
|
102
|
-
!this.showDropDown && (h(Fragment, null,
|
|
110
|
+
!this.showDropDown && this.mainMenu.length > 0 && (h(Fragment, null,
|
|
103
111
|
h("div", { class: "dso-header-session" },
|
|
104
112
|
this.userProfileUrl &&
|
|
105
113
|
this.userProfileName &&
|
|
@@ -186,12 +194,13 @@ export class Header {
|
|
|
186
194
|
}
|
|
187
195
|
}
|
|
188
196
|
},
|
|
189
|
-
"required":
|
|
197
|
+
"required": false,
|
|
190
198
|
"optional": false,
|
|
191
199
|
"docs": {
|
|
192
200
|
"tags": [],
|
|
193
201
|
"text": ""
|
|
194
|
-
}
|
|
202
|
+
},
|
|
203
|
+
"defaultValue": "[]"
|
|
195
204
|
},
|
|
196
205
|
"useDropDownMenu": {
|
|
197
206
|
"type": "string",
|
|
@@ -286,6 +295,26 @@ export class Header {
|
|
|
286
295
|
"hasSubLogo": {},
|
|
287
296
|
"overflowMenuItems": {}
|
|
288
297
|
}; }
|
|
298
|
+
static get events() { return [{
|
|
299
|
+
"method": "menuItemClick",
|
|
300
|
+
"name": "menuItemClick",
|
|
301
|
+
"bubbles": true,
|
|
302
|
+
"cancelable": true,
|
|
303
|
+
"composed": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": ""
|
|
307
|
+
},
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "HeaderMenuItemClickEvent",
|
|
310
|
+
"resolved": "HeaderMenuItemClickEvent",
|
|
311
|
+
"references": {
|
|
312
|
+
"HeaderMenuItemClickEvent": {
|
|
313
|
+
"location": "local"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}]; }
|
|
289
318
|
static get elementRef() { return "host"; }
|
|
290
319
|
static get watchers() { return [{
|
|
291
320
|
"propName": "useDropDownMenu",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html } from "lit-html";
|
|
2
|
-
import { ifDefined } from "lit-html/directives/if-defined";
|
|
3
|
-
export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showSubLogo, loginUrl, logoutUrl, isLoggedIn, showLoggedIn, userProfileUrl, userProfileName, userHomeUrl, }) {
|
|
2
|
+
import { ifDefined } from "lit-html/directives/if-defined.js";
|
|
3
|
+
export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showSubLogo, loginUrl, logoutUrl, isLoggedIn, showLoggedIn, userProfileUrl, userProfileName, userHomeUrl, menuItemClick, }) {
|
|
4
4
|
const bindLoginUrl = showLoggedIn && loginUrl ? loginUrl : undefined;
|
|
5
5
|
const bindLogoutUrl = showLoggedIn && logoutUrl ? logoutUrl : undefined;
|
|
6
6
|
return showSubLogo
|
|
@@ -13,6 +13,7 @@ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showS
|
|
|
13
13
|
user-profile-url=${ifDefined(userProfileUrl)}
|
|
14
14
|
user-profile-name=${ifDefined(userProfileName)}
|
|
15
15
|
user-home-url=${ifDefined(userHomeUrl)}
|
|
16
|
+
@menuItemClick=${menuItemClick}
|
|
16
17
|
>
|
|
17
18
|
<div slot="logo"><img height="40" alt="Omgevingsloket" src="${logo}" /></div>
|
|
18
19
|
<div slot="sub-logo"><img alt="Regels op de kaart" src="${subLogo}" /></div></div>
|
|
@@ -26,6 +27,7 @@ export function headerTemplate({ logo, subLogo, mainMenu, useDropDownMenu, showS
|
|
|
26
27
|
user-profile-url=${ifDefined(userProfileUrl)}
|
|
27
28
|
user-profile-name=${ifDefined(userProfileName)}
|
|
28
29
|
user-home-url=${ifDefined(userHomeUrl)}
|
|
30
|
+
@menuItemClick=${menuItemClick}
|
|
29
31
|
>
|
|
30
32
|
<div slot="logo"><img alt="Omgevingsloket" src="${logo}" /></div>
|
|
31
33
|
</dso-header>`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html } from "lit-html";
|
|
2
|
-
import { ifDefined } from "lit-html/directives/if-defined";
|
|
3
|
-
import { unsafeHTML } from "lit-html/directives/unsafe-html";
|
|
2
|
+
import { ifDefined } from "lit-html/directives/if-defined.js";
|
|
3
|
+
import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
|
|
4
4
|
export function helpcenterPanelTemplate({ label, url, content, }) {
|
|
5
5
|
return html `
|
|
6
6
|
${unsafeHTML(content)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
-
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
4
4
|
import { iconTemplate } from '../icon/icon.template';
|
|
5
5
|
export function highlightBoxTemplate({ yellow, white, dropShadow, border, step, icon, richContent }) {
|
|
6
6
|
return html `
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
3
|
-
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
|
|
4
4
|
export function labelTemplate({ status, label, button, compact, symbol }) {
|
|
5
5
|
return html `
|
|
6
6
|
<dso-label
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Keep in sync with packages\css\src\components\list\list.template.ts (https://github.com/dso-toolkit/dso-toolkit/issues/1438)
|
|
2
2
|
import { Type } from '@dso-toolkit/sources';
|
|
3
3
|
import { html } from 'lit-html';
|
|
4
|
-
import { classMap } from 'lit-html/directives/class-map';
|
|
4
|
+
import { classMap } from 'lit-html/directives/class-map.js';
|
|
5
5
|
function ul(children, modifier) {
|
|
6
6
|
return html `
|
|
7
7
|
<ul class="${classMap({
|
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver,
|
|
2
|
-
if (!
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return privateMap.get(receiver);
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
5
|
};
|
|
7
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver,
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return value;
|
|
6
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
13
11
|
};
|
|
14
|
-
var
|
|
12
|
+
var _MapControls_closeButtonElement, _MapControls_toggleButtonElement;
|
|
15
13
|
import { Component, h, Host, Prop, Event, State, Watch } from '@stencil/core';
|
|
16
14
|
const transitionDuration = 300; // Sync with $transition-duration in ./map-controls.scss
|
|
17
15
|
export class MapControls {
|
|
18
16
|
constructor() {
|
|
19
17
|
this.open = false;
|
|
20
18
|
this.hideContent = !this.open;
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
_MapControls_closeButtonElement.set(this, void 0);
|
|
20
|
+
_MapControls_toggleButtonElement.set(this, void 0);
|
|
23
21
|
}
|
|
24
22
|
watchOpen(open) {
|
|
25
23
|
if (open) {
|
|
26
24
|
this.hideContent = false;
|
|
27
|
-
setTimeout(() => __classPrivateFieldGet(this,
|
|
25
|
+
setTimeout(() => __classPrivateFieldGet(this, _MapControls_closeButtonElement, "f").focus(), transitionDuration);
|
|
28
26
|
}
|
|
29
27
|
else {
|
|
30
28
|
setTimeout(() => {
|
|
31
29
|
this.hideContent = true;
|
|
32
|
-
__classPrivateFieldGet(this,
|
|
30
|
+
__classPrivateFieldGet(this, _MapControls_toggleButtonElement, "f").focus();
|
|
33
31
|
}, transitionDuration);
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
render() {
|
|
37
35
|
return (h(Host, null,
|
|
38
|
-
h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this,
|
|
36
|
+
h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _MapControls_toggleButtonElement, element, "f") },
|
|
39
37
|
h("dso-icon", { icon: "layers" }),
|
|
40
38
|
h("span", null, "Kaartlagen")),
|
|
41
39
|
h("div", { id: "zoom-buttons" },
|
|
@@ -48,7 +46,7 @@ export class MapControls {
|
|
|
48
46
|
h("section", { hidden: this.hideContent },
|
|
49
47
|
h("header", null,
|
|
50
48
|
h("h2", null, "Kaartlagen"),
|
|
51
|
-
h("button", { type: "button", id: "close-button", onClick: () => this.open = false, ref: element => __classPrivateFieldSet(this,
|
|
49
|
+
h("button", { type: "button", id: "close-button", onClick: () => this.open = false, ref: element => __classPrivateFieldSet(this, _MapControls_closeButtonElement, element, "f") },
|
|
52
50
|
h("span", null, "Sluit dialoog"),
|
|
53
51
|
h("dso-icon", { icon: "times" }))),
|
|
54
52
|
h("div", { class: "content" },
|
|
@@ -146,4 +144,4 @@ export class MapControls {
|
|
|
146
144
|
"methodName": "watchOpen"
|
|
147
145
|
}]; }
|
|
148
146
|
}
|
|
149
|
-
|
|
147
|
+
_MapControls_closeButtonElement = new WeakMap(), _MapControls_toggleButtonElement = new WeakMap();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
+
import { getNodeName } from '../get-node-name.function';
|
|
2
3
|
export class OzonContentAlNode {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.name = 'Al';
|
|
5
6
|
}
|
|
6
7
|
render(node, { mapNodeToJsx, path }) {
|
|
7
|
-
const nestedAl = path.some(node => node
|
|
8
|
+
const nestedAl = path.some(node => getNodeName(node) === 'Al');
|
|
8
9
|
const content = mapNodeToJsx(node.childNodes);
|
|
9
10
|
return nestedAl
|
|
10
11
|
? h("span", { role: "paragraph" }, content)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
+
import { getNodeName } from '../get-node-name.function';
|
|
2
3
|
export class OzonContentFallbackNode {
|
|
3
4
|
constructor() {
|
|
4
5
|
// This name does not match any elements
|
|
5
6
|
this.name = ['<fallback>'];
|
|
6
7
|
}
|
|
7
8
|
render(node, { mapNodeToJsx }) {
|
|
8
|
-
return (h("span", { class: `fallback od-${node
|
|
9
|
+
return (h("span", { class: `fallback od-${getNodeName(node)}` }, mapNodeToJsx(node.childNodes)));
|
|
9
10
|
}
|
|
10
11
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { h, Fragment } from '@stencil/core';
|
|
2
|
+
import { getNodeName } from '../get-node-name.function';
|
|
2
3
|
export class OzonContentNootNode {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.name = 'Noot';
|
|
5
6
|
this.handles = ['NootNummer'];
|
|
6
7
|
}
|
|
7
|
-
identify(
|
|
8
|
-
|
|
9
|
-
return (_a = node.getAttribute("id")) !== null && _a !== void 0 ? _a : undefined;
|
|
8
|
+
identify() {
|
|
9
|
+
return 'Noot';
|
|
10
10
|
}
|
|
11
|
-
render(node, { mapNodeToJsx, state:
|
|
11
|
+
render(node, { mapNodeToJsx, state: openNoteId, setState }) {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
const noteId =
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const noteId = node.getAttribute('id');
|
|
14
|
+
if (!noteId) {
|
|
15
|
+
console.error('Noot node without id', node);
|
|
16
|
+
return h(Fragment, null);
|
|
17
|
+
}
|
|
18
|
+
const noteControlsId = `dso-ozon-note-${noteId}`;
|
|
16
19
|
const childNodes = Array.from(node.childNodes);
|
|
17
|
-
const nootNummer = (_b = childNodes.find(n => n
|
|
18
|
-
const onClickNote = (event) => {
|
|
19
|
-
event.preventDefault();
|
|
20
|
-
setState === null || setState === void 0 ? void 0 : setState(!noteIsOpen);
|
|
21
|
-
};
|
|
20
|
+
const nootNummer = (_b = (_a = childNodes.find(n => getNodeName(n) === 'NootNummer')) === null || _a === void 0 ? void 0 : _a.textContent) !== null && _b !== void 0 ? _b : noteId;
|
|
22
21
|
return (h(Fragment, null,
|
|
23
|
-
h("
|
|
24
|
-
h("
|
|
25
|
-
h("
|
|
22
|
+
h("sup", null,
|
|
23
|
+
h("button", { type: "button", class: "toggle-note", id: noteControlsId, onClick: () => setState === null || setState === void 0 ? void 0 : setState(openNoteId === noteId ? undefined : noteId), onBlur: () => setState === null || setState === void 0 ? void 0 : setState(undefined), "aria-expanded": openNoteId === noteId ? 'true' : 'false' }, nootNummer)),
|
|
24
|
+
h("dso-tooltip", { active: openNoteId === noteId, for: noteControlsId, stateless: true },
|
|
25
|
+
h("span", { role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(':scope > Al')))))));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -9,6 +9,7 @@ import { OzonContentIntRefNode } from './nodes/int-ref.node';
|
|
|
9
9
|
import { OzonContentNootNode } from './nodes/noot.node';
|
|
10
10
|
import { OzonContentTableNode } from './nodes/table.node';
|
|
11
11
|
import { OzonContentTextNode } from './nodes/text.node';
|
|
12
|
+
import { getNodeName } from './get-node-name.function';
|
|
12
13
|
import { OzonContentFallbackNode } from './nodes/fallback.node';
|
|
13
14
|
export class Mapper {
|
|
14
15
|
constructor() {
|
|
@@ -46,25 +47,28 @@ export class Mapper {
|
|
|
46
47
|
})) !== null && _a !== void 0 ? _a : this.fallbackNode;
|
|
47
48
|
}
|
|
48
49
|
mapNodeToJsx(node, context, path) {
|
|
49
|
-
var _a
|
|
50
|
+
var _a;
|
|
50
51
|
if (node instanceof NodeList) {
|
|
51
52
|
return h(Fragment, null, Array.from(node).map(n => this.mapNodeToJsx(n, context, path)));
|
|
52
53
|
}
|
|
53
54
|
if (Array.isArray(node)) {
|
|
54
55
|
return h(Fragment, null, node.map(n => this.mapNodeToJsx(n, context, path)));
|
|
55
56
|
}
|
|
56
|
-
const nodeName = node
|
|
57
|
+
const nodeName = getNodeName(node);
|
|
57
58
|
const mapper = this.findMapper(nodeName);
|
|
58
|
-
|
|
59
|
+
if (!mapper) {
|
|
60
|
+
return h(Fragment, null);
|
|
61
|
+
}
|
|
62
|
+
const identity = (_a = mapper.identify) === null || _a === void 0 ? void 0 : _a.call(mapper, node);
|
|
59
63
|
const state = identity ? context.state[identity] : undefined;
|
|
60
64
|
const setState = identity ? (state) => context.setState(Object.assign(Object.assign({}, context.state), { [identity]: state })) : undefined;
|
|
61
|
-
return
|
|
65
|
+
return mapper.render(node, {
|
|
62
66
|
mapNodeToJsx: n => this.mapNodeToJsx(n, context, [...path, node]),
|
|
63
67
|
emitAnchorClick: context.emitAnchorClick,
|
|
64
68
|
setState,
|
|
65
69
|
state,
|
|
66
70
|
path
|
|
67
|
-
})
|
|
71
|
+
});
|
|
68
72
|
}
|
|
69
73
|
transform(xml, context) {
|
|
70
74
|
if (!this.cache || this.cache.xml !== xml) {
|
|
@@ -2,43 +2,96 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
button.toggle-note {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
font-size: 1em;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
margin-bottom: 0;
|
|
6
10
|
text-decoration: none;
|
|
11
|
+
touch-action: manipulation;
|
|
12
|
+
text-align: left;
|
|
13
|
+
user-select: none;
|
|
14
|
+
vertical-align: middle;
|
|
15
|
+
border: 0;
|
|
16
|
+
color: #39870c;
|
|
17
|
+
line-height: 1;
|
|
18
|
+
padding: 0;
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
button.toggle-note:focus, button.toggle-note:focus-visible {
|
|
22
|
+
outline-offset: 2px;
|
|
23
|
+
}
|
|
24
|
+
button.toggle-note:active {
|
|
25
|
+
outline: 0;
|
|
26
|
+
}
|
|
27
|
+
button.toggle-note.extern::after, button.toggle-note.download::after {
|
|
28
|
+
content: "";
|
|
29
|
+
display: inline-block;
|
|
30
|
+
height: 1.5em;
|
|
31
|
+
margin-left: 8px;
|
|
32
|
+
vertical-align: top;
|
|
33
|
+
width: 1.5em;
|
|
7
34
|
}
|
|
8
|
-
.
|
|
9
|
-
|
|
35
|
+
button.toggle-note[disabled] {
|
|
36
|
+
color: #afcf9d;
|
|
10
37
|
}
|
|
11
|
-
.
|
|
12
|
-
|
|
38
|
+
button.toggle-note:not([disabled]):hover {
|
|
39
|
+
color: #676cb0;
|
|
40
|
+
text-decoration: underline;
|
|
41
|
+
}
|
|
42
|
+
button.toggle-note:not([disabled]):active {
|
|
43
|
+
color: #676cb0;
|
|
13
44
|
}
|
|
14
|
-
.
|
|
15
|
-
|
|
16
|
-
padding:
|
|
45
|
+
button.toggle-note.btn-align {
|
|
46
|
+
line-height: calc(1.5em - 1px);
|
|
47
|
+
padding: 11px 0;
|
|
17
48
|
position: relative;
|
|
18
49
|
}
|
|
19
|
-
.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
top: 0;
|
|
26
|
-
width: 24px;
|
|
27
|
-
}
|
|
28
|
-
.noot + * > a::before {
|
|
29
|
-
background: var(--dso-icon, var(--di-times-zwart)) no-repeat;
|
|
50
|
+
button.toggle-note.extern::after, button.toggle-note.download::after {
|
|
51
|
+
position: relative;
|
|
52
|
+
top: -2px;
|
|
53
|
+
}
|
|
54
|
+
button.toggle-note.download::after {
|
|
55
|
+
background: var(--dso-icon, var(--di-download)) no-repeat;
|
|
30
56
|
background-position: center;
|
|
31
57
|
background-size: cover;
|
|
32
58
|
height: 1.5em;
|
|
33
59
|
vertical-align: top;
|
|
34
60
|
width: 1.5em;
|
|
35
|
-
content: "";
|
|
36
|
-
display: block;
|
|
37
61
|
}
|
|
38
|
-
.
|
|
39
|
-
|
|
62
|
+
button.toggle-note.download[disabled]::after {
|
|
63
|
+
--dso-icon: var(--di-download-grasgroen-40);
|
|
64
|
+
}
|
|
65
|
+
button.toggle-note.download:not([disabled]):hover::after, button.toggle-note.download:not([disabled]):active::after {
|
|
66
|
+
--dso-icon: var(--di-download-scampi);
|
|
67
|
+
}
|
|
68
|
+
button.toggle-note.extern::after {
|
|
69
|
+
background: var(--dso-icon, var(--di-external-link)) no-repeat;
|
|
70
|
+
background-position: center;
|
|
71
|
+
background-size: cover;
|
|
72
|
+
height: 1.5em;
|
|
73
|
+
vertical-align: top;
|
|
74
|
+
width: 1.5em;
|
|
75
|
+
}
|
|
76
|
+
button.toggle-note.extern[disabled]::after {
|
|
77
|
+
--dso-icon: var(--di-external-link-grasgroen-40);
|
|
78
|
+
}
|
|
79
|
+
button.toggle-note.extern:not([disabled]):hover::after, button.toggle-note.extern:not([disabled]):active::after {
|
|
80
|
+
--dso-icon: var(--di-external-link-scampi);
|
|
81
|
+
}
|
|
82
|
+
button.toggle-note dso-icon + span:not(.sr-only),
|
|
83
|
+
button.toggle-note svg.di + span:not(.sr-only),
|
|
84
|
+
button.toggle-note span:not(.sr-only) + dso-icon,
|
|
85
|
+
button.toggle-note span:not(.sr-only) + svg.di {
|
|
86
|
+
margin-left: 8px;
|
|
87
|
+
}
|
|
88
|
+
button.toggle-note dso-icon,
|
|
89
|
+
button.toggle-note svg.di,
|
|
90
|
+
button.toggle-note span {
|
|
91
|
+
vertical-align: middle;
|
|
40
92
|
}
|
|
41
93
|
|
|
94
|
+
span[role=section],
|
|
42
95
|
span[role=paragraph] {
|
|
43
96
|
display: block;
|
|
44
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function progressBarTemplate({ progress, label, min, max }) {
|
|
4
4
|
return html `
|
|
5
5
|
<dso-progress-bar
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function progressIndicatorTemplate({ label, block, size }) {
|
|
4
4
|
return html `
|
|
5
5
|
<dso-progress-indicator
|
|
@@ -32,9 +32,15 @@
|
|
|
32
32
|
position: absolute;
|
|
33
33
|
top: 0;
|
|
34
34
|
width: 24px;
|
|
35
|
-
z-index:
|
|
35
|
+
z-index: 100;
|
|
36
36
|
zoom: 1;
|
|
37
37
|
}
|
|
38
|
+
@media (prefers-contrast: more) {
|
|
39
|
+
:host input[type=checkbox],
|
|
40
|
+
:host input[type=radio] {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
38
44
|
:host input[type=checkbox]:not([disabled]),
|
|
39
45
|
:host input[type=radio]:not([disabled]) {
|
|
40
46
|
cursor: pointer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html, nothing } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function selectableTemplate({ type, id, name, label, value, required, invalid, describedById, checked, indeterminate, disabled, onChange, info }) {
|
|
4
4
|
var _a;
|
|
5
5
|
return html `
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { html } from "lit-html";
|
|
2
|
-
import { ifDefined } from "lit-html/directives/if-defined";
|
|
3
|
-
import { unsafeHTML } from "lit-html/directives/unsafe-html";
|
|
2
|
+
import { ifDefined } from "lit-html/directives/if-defined.js";
|
|
3
|
+
import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
|
|
4
4
|
export function toggletipTemplate({ children, label, position, small, secondary, }) {
|
|
5
5
|
return html `<dso-toggletip
|
|
6
6
|
label=${ifDefined(label)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit-html';
|
|
2
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
3
|
export function tooltipTemplate({ active, position, label, id }) {
|
|
4
4
|
return html `<dso-tooltip position=${position} for=${ifDefined(id)} ?active=${active}>
|
|
5
5
|
${label}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { h, Fragment } from '@stencil/core';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
export const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
|
|
4
|
-
var _a, _b, _c;
|
|
5
|
-
return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
|
|
4
|
+
var _a, _b, _c, _d;
|
|
5
|
+
return (h("li", { key: item.id, class: clsx('tree-item', { 'has-child': item.hasItems, 'is-expanded': (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) }), role: 'none' },
|
|
6
6
|
h("div", { class: "tree-branch-control" }, item.hasItems
|
|
7
7
|
?
|
|
8
8
|
h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
9
|
-
h("dso-icon", { icon: item.open ? '
|
|
9
|
+
h("dso-icon", { icon: item.open ? 'minus-square' : 'plus-square' }))
|
|
10
10
|
: h("dso-icon", null)),
|
|
11
|
-
h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((
|
|
11
|
+
h("p", { class: clsx('tree-content', { 'active': item.active }, { 'selected': item.selected }), tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_b = item.items) === null || _b === void 0 ? void 0 : _b.length)) : undefined, "aria-current": item.active ? 'true' : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
12
12
|
item.selected && h("span", { class: "sr-only" }, "Resultaat: "),
|
|
13
13
|
item.href
|
|
14
14
|
? h("a", { href: item.href, tabindex: "-1" }, item.label)
|
|
15
|
-
: h("span", null, item.label), (
|
|
16
|
-
|
|
15
|
+
: h("span", null, item.label), (_c = item.icons) === null || _c === void 0 ? void 0 :
|
|
16
|
+
_c.map((icon) => h("dso-icon", { icon: icon.icon, title: icon.label }))),
|
|
17
17
|
item.open &&
|
|
18
18
|
h(Fragment, null, item.hasItems && !item.items && item.loading
|
|
19
19
|
? h("dso-progress-indicator", { size: "small", label: "Resultaten laden: een moment geduld alstublieft." })
|
|
20
|
-
: h("ul", { role: "group" }, (
|
|
20
|
+
: h("ul", { role: "group" }, (_d = item.items) === null || _d === void 0 ? void 0 : _d.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
|
|
21
21
|
};
|