@dso-toolkit/core 99.5.0 → 100.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/dso-advanced-select.js +3 -3
- package/dist/bundle/dso-document-component.js +1 -1
- package/dist/bundle/dso-dropdown-menu.js +51 -12
- package/dist/bundle/dso-header.js +51 -12
- package/dist/bundle/dso-highlight-box.js +1 -1
- package/dist/bundle/dso-info.js +1 -1
- package/dist/bundle/dso-list-button.js +2 -2
- package/dist/bundle/dso-map-base-layers.js +2 -2
- package/dist/bundle/dso-map-overlays.js +2 -2
- package/dist/bundle/dso-ozon-content.js +1 -1
- package/dist/bundle/dso-selectable.js +1 -1
- package/dist/bundle/dso-tree-view.js +1 -1
- package/dist/bundle/dso-viewer-grid.js +2 -2
- package/dist/bundle/dsot-document-component-demo.js +4 -4
- package/dist/bundle/index.js +0 -2
- package/dist/bundle/p-0mKOaHii.js +48 -0
- package/dist/bundle/{p-BHoewcI-.js → p-BSvOi0zH.js} +4 -4
- package/dist/bundle/{p-DtOWRu1L.js → p-ClW9x8PR.js} +1 -1
- package/dist/bundle/{p-ChjlyvQF.js → p-DoZnyoat.js} +39 -27
- package/dist/cjs/dso-advanced-select.cjs.entry.js +3 -3
- package/dist/cjs/dso-alert_7.cjs.entry.js +4 -4
- package/dist/cjs/dso-annotation-locatie_2.cjs.entry.js +37 -25
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +51 -12
- package/dist/cjs/dso-header.cjs.entry.js +51 -12
- package/dist/cjs/dso-highlight-box.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_3.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +2 -2
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/advanced-select/advanced-select.css +12 -11
- package/dist/collection/components/advanced-select/advanced-select.js +2 -2
- package/dist/collection/components/document-component/document-component-heading.js +28 -18
- package/dist/collection/components/document-component/document-component.js +16 -14
- package/dist/collection/components/document-component-demo/document-component.demo.js +2 -2
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +51 -12
- package/dist/collection/components/header/header.js +51 -12
- package/dist/collection/components/highlight-box/highlight-box.css +2 -4
- package/dist/collection/components/info/info.css +10 -17
- package/dist/collection/components/ozon-content/nodes/int-io-ref.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/int-ref.node.js +1 -1
- package/dist/collection/components/ozon-content/nodes/noot.node.js +1 -1
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +1 -1
- package/dist/collection/components/tree-view/tree-view.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +2 -2
- package/dist/components/document-component.js +1 -1
- package/dist/components/dso-advanced-select.js +1 -1
- package/dist/components/dso-dropdown-menu.js +1 -1
- package/dist/components/dso-header.js +1 -1
- package/dist/components/dso-highlight-box.js +1 -1
- package/dist/components/dso-tree-view.js +1 -1
- package/dist/components/dso-viewer-grid.js +1 -1
- package/dist/components/dsot-document-component-demo.js +1 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/ozon-content.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-7a852b15.entry.js → p-4a971ee1.entry.js} +1 -1
- package/dist/dso-toolkit/{p-441b88f3.entry.js → p-4dacadca.entry.js} +1 -1
- package/dist/dso-toolkit/{p-16a9d23c.entry.js → p-5455f456.entry.js} +1 -1
- package/dist/dso-toolkit/p-56f5668a.entry.js +1 -0
- package/dist/dso-toolkit/p-72c632b1.entry.js +1 -0
- package/dist/dso-toolkit/{p-0083183c.entry.js → p-84cda47a.entry.js} +1 -1
- package/dist/dso-toolkit/p-b35b9bf4.entry.js +1 -0
- package/dist/dso-toolkit/{p-e3826220.entry.js → p-b6d829b6.entry.js} +2 -2
- package/dist/dso-toolkit/p-dce72b97.entry.js +1 -0
- package/dist/dso-toolkit/p-e0a1e35a.entry.js +1 -0
- package/dist/esm/dso-advanced-select.entry.js +3 -3
- package/dist/esm/dso-alert_7.entry.js +4 -4
- package/dist/esm/dso-annotation-locatie_2.entry.js +37 -25
- package/dist/esm/dso-dropdown-menu.entry.js +51 -12
- package/dist/esm/dso-header.entry.js +51 -12
- package/dist/esm/dso-highlight-box.entry.js +1 -1
- package/dist/esm/dso-info_3.entry.js +1 -1
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +2 -2
- package/dist/esm/dsot-document-component-demo.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/document-component/document-component-heading.d.ts +1 -1
- package/dist/types/components/document-component/document-component.d.ts +5 -3
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +2 -0
- package/dist/types/components/header/header.d.ts +2 -0
- package/dist/types/components.d.ts +7 -105
- package/package.json +3 -5
- package/dist/bundle/dso-tooltip.d.ts +0 -11
- package/dist/bundle/dso-tooltip.js +0 -2119
- package/dist/bundle/p-CAqSxnd4.js +0 -48
- package/dist/cjs/dso-tooltip.cjs.entry.js +0 -2080
- package/dist/collection/components/tooltip/tooltip.css +0 -114
- package/dist/collection/components/tooltip/tooltip.js +0 -448
- package/dist/components/dso-tooltip.d.ts +0 -11
- package/dist/components/dso-tooltip.js +0 -1
- package/dist/dso-toolkit/p-2149be85.entry.js +0 -1
- package/dist/dso-toolkit/p-5cdda2dd.entry.js +0 -1
- package/dist/dso-toolkit/p-6e027a66.entry.js +0 -1
- package/dist/dso-toolkit/p-87a19b2e.entry.js +0 -1
- package/dist/dso-toolkit/p-cfb08b19.entry.js +0 -1
- package/dist/dso-toolkit/p-e3c1777e.entry.js +0 -1
- package/dist/esm/dso-tooltip.entry.js +0 -2078
- package/dist/types/components/tooltip/tooltip.d.ts +0 -61
|
@@ -35,10 +35,12 @@ const AantekenAlert = ({ gereserveerd, vervallen }) => {
|
|
|
35
35
|
export class DocumentComponent {
|
|
36
36
|
constructor() {
|
|
37
37
|
/**
|
|
38
|
-
* The heading
|
|
39
|
-
*
|
|
38
|
+
* The heading level to use (only in mode="document"). When the level is 6 or lower a native heading element
|
|
39
|
+
* (`<h2>` … `<h6>`) is rendered; deeper levels are rendered as `<div role="heading" aria-level="*">` because HTML
|
|
40
|
+
* has no native heading elements beyond `<h6>`. In mode="table-of-contents" the nested lists carry the structure
|
|
41
|
+
* and no heading is rendered.
|
|
40
42
|
*/
|
|
41
|
-
this.
|
|
43
|
+
this.headingLevel = 2;
|
|
42
44
|
/**
|
|
43
45
|
* This boolean attribute indicates whether the children are visible.
|
|
44
46
|
*/
|
|
@@ -183,17 +185,17 @@ export class DocumentComponent {
|
|
|
183
185
|
this.alternativeTitle ||
|
|
184
186
|
this.label ||
|
|
185
187
|
this.annotated);
|
|
186
|
-
return (h(Host, { key: '
|
|
187
|
-
(this.mark && this.alternativeTitle && (h(MarkText, { mark: this.mark && ((text) => this.mark?.(text, "alternativeTitle")), text: this.alternativeTitle, emitMarkItemHighlight: (text, elementRef) => this.dsoMarkItemHighlight.emit({ text, elementRef, source: "alternativeTitle" }) }))))), h(AantekenStatus, { key: '
|
|
188
|
+
return (h(Host, { key: 'f8988dc23744ac52a41583fcdcba34b4a8a676b8', "not-collapsible": !collapsible }, showHeading && (h("div", { key: 'ba2f55b584cc1104770e654fcbabdee87d707ce7', class: "heading-container", part: "_heading-container" }, this.wijzigactie && h("span", { key: 'd84dd54d504f7772adca92455925529ba9e99488', class: "editaction-label" }, this.wijzigactieLabel, ":"), h("div", { key: '296ae8cb10db9e0482375fa361096df2f7fbbdcf', class: "heading" }, h(Heading, { key: 'e7240a4f5da77b667b3c838aecee3c50a70c0886', headingLevel: this.headingLevel, class: "heading-element", onClick: this.alternativeTitle ? this.handleHeadingClick : undefined, mode: this.mode, href: this.href }, collapsible && this.mode === "document" && (h("dso-icon-button", { key: 'c835dab68028116f2679c1a6c4a9476b535471fd', label: this.open ? "Invouwen" : "Uitvouwen", class: "toggle-button", expanded: this.open, icon: this.open ? "chevron-down" : "chevron-right", variant: "tertiary", onDsoClick: (e) => this.handleHeadingClick(e.detail.originalEvent) })), h("div", { key: '48280777989cc704dd59c1637695cf49d276b5fd' }, this.notApplicable && h("span", { key: '39f8d041ae3a558b4283ab9ee915f17d2388ad9a', class: "sr-only" }, "Niet van toepassing:"), this._kop ? (h("dso-ozon-content", { class: "kop", content: this._kop, onDsoClick: this.handleOzonContentClick, mark: this.mark && ((text) => this.mark?.(text, "kop")), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit({ ...e.detail, source: "kop" }), inline: true, urlResolver: this.ozonContentUrlResolver, begripResolver: this.ozonContentBegripResolver, annotated: this.annotated })) : (h("span", { class: "alternative-title" }, (!this.mark && this.alternativeTitle) ||
|
|
189
|
+
(this.mark && this.alternativeTitle && (h(MarkText, { mark: this.mark && ((text) => this.mark?.(text, "alternativeTitle")), text: this.alternativeTitle, emitMarkItemHighlight: (text, elementRef) => this.dsoMarkItemHighlight.emit({ text, elementRef, source: "alternativeTitle" }) }))))), h(AantekenStatus, { key: 'a95d529b1948a25b64f71fac2b17d29ab593a0cb', gereserveerd: this._gereserveerd, vervallen: this._vervallen }))), this.recursiveToggle !== undefined && this.open && this.mode === "document" && (h("dso-icon-button", { key: '489cc7c39def4edabe9e1dd3414857feca3167b9', label: this.recursiveToggle === true ? "Verberg onderliggende artikelen" : "Toon onderliggende artikelen", class: "recursive-toggle", expanded: this.recursiveToggle === true, icon: this.recursiveToggle === true ? "eye" : "eye-slash", variant: "tertiary", onDsoClick: (e) => this.handleRecursiveToggleClick(e.detail.originalEvent) })), this.showBadge() && (h(Fragment, { key: 'cdb81b0cc410d703c8c9e21621f8c0bf5d97a276' }, h("dso-badge", { key: '8b6fd2528543889faaecf8f937fa0ac6cadc80ec', status: this.badgeStatus, label: this.badgeTooltip ? "Toon toelichting" : undefined }, this.badge, this.badgeTooltip && h("div", { key: '4967e1b13815576b5e166da3d6cbc06e3f22e2ba', slot: "toggletip" }, this.badgeTooltip)))), (this.label || this.annotated) && (h("div", { key: '276f44c01f6ec492c866bb0aeba72ee186cb447d', class: "addons" }, this.label && (h("dso-label", { key: '3ddfcfc595536cfea798c26413c13b51d82a3e2c', status: this.labelStatus, compact: true }, this.label)), this.annotated && this.mode === "document" && (h("dso-icon-button", { key: '9573e100ba6b4cad8be15b7b2a2e9aa817369793', label: `Kenmerken en kaartgegevens ${this.openAnnotation ? "verbergen" : "tonen"}`, icon: "label", expanded: this.openAnnotation, variant: "tertiary", onDsoClick: (e) => this.dsoAnnotationToggle.emit({
|
|
188
190
|
current: this.openAnnotation,
|
|
189
191
|
next: !this.openAnnotation,
|
|
190
192
|
scrollRef: this.host,
|
|
191
193
|
originalEvent: e.detail.originalEvent,
|
|
192
|
-
}) }))))))), this.openAnnotation && (h("div", { key: '
|
|
194
|
+
}) }))))))), this.openAnnotation && (h("div", { key: 'dd3eb5839739a04c8c716c51927d7a7c8a8606bf', class: "annotation-container", part: "_annotation-container", role: "dialog", "aria-labelledby": "annotations-heading" }, h("dso-panel", { key: '6c4d109c892ea8b8f095105667fc2fe4a55ea506', id: "annotations", onDsoCloseClick: (e) => this.dsoAnnotationToggle.emit({
|
|
193
195
|
current: true,
|
|
194
196
|
next: false,
|
|
195
197
|
originalEvent: e,
|
|
196
|
-
}), closeButtonLabel: "Kenmerken en kaartgegevens verbergen" }, h("h2", { key: '
|
|
198
|
+
}), closeButtonLabel: "Kenmerken en kaartgegevens verbergen" }, h("h2", { key: 'd173f5957242b8180fd67f07e5a0f2f71e68ca8e', id: "annotations-heading", slot: "heading" }, "Kenmerken en kaart"), h("slot", { key: 'f17a9b19fd23c5dcb5e914792011c3bcc336da86', name: "annotations" })))), this.open && (this._inhoud || this._gereserveerd || this._vervallen) && this.mode === "document" && (h("div", { key: 'e03b6b7d2db9e8cbc13f9105ab9aa3e2af8a5793', class: "content", part: "_content" }, h(AantekenAlert, { key: '1516df95cd7ffb3795cc71bff9a866892b47501b', gereserveerd: this._gereserveerd, vervallen: this._vervallen }), this._inhoud && (h("dso-ozon-content", { key: 'fee5f88d382231c11aff522eff75b82df5ee6afe', content: this._inhoud, onDsoClick: this.handleOzonContentClick, mark: this.mark && ((text) => this.mark?.(text, "inhoud")), onDsoOzonContentMarkItemHighlight: (e) => this.dsoMarkItemHighlight.emit({ ...e.detail, source: "inhoud" }), urlResolver: this.ozonContentUrlResolver, begripResolver: this.ozonContentBegripResolver, annotated: this.annotated })))), h("div", { key: '8888df264cefd314382d48505ff8641c20c5cc86', class: "children-container", part: "_children-container" }, h("slot", { key: '56e85d5200913609e0a03c929a2d889c75ae2d7e' }))));
|
|
197
199
|
}
|
|
198
200
|
static get is() { return "dso-document-component"; }
|
|
199
201
|
static get encapsulation() { return "shadow"; }
|
|
@@ -209,25 +211,25 @@ export class DocumentComponent {
|
|
|
209
211
|
}
|
|
210
212
|
static get properties() {
|
|
211
213
|
return {
|
|
212
|
-
"
|
|
213
|
-
"type": "
|
|
214
|
+
"headingLevel": {
|
|
215
|
+
"type": "number",
|
|
214
216
|
"mutable": false,
|
|
215
217
|
"complexType": {
|
|
216
|
-
"original": "
|
|
217
|
-
"resolved": "
|
|
218
|
+
"original": "number",
|
|
219
|
+
"resolved": "number",
|
|
218
220
|
"references": {}
|
|
219
221
|
},
|
|
220
222
|
"required": false,
|
|
221
223
|
"optional": false,
|
|
222
224
|
"docs": {
|
|
223
225
|
"tags": [],
|
|
224
|
-
"text": "The heading
|
|
226
|
+
"text": "The heading level to use (only in mode=\"document\"). When the level is 6 or lower a native heading element\r\n(`<h2>` \u2026 `<h6>`) is rendered; deeper levels are rendered as `<div role=\"heading\" aria-level=\"*\">` because HTML\r\nhas no native heading elements beyond `<h6>`. In mode=\"table-of-contents\" the nested lists carry the structure\r\nand no heading is rendered."
|
|
225
227
|
},
|
|
226
228
|
"getter": false,
|
|
227
229
|
"setter": false,
|
|
228
230
|
"reflect": true,
|
|
229
|
-
"attribute": "heading",
|
|
230
|
-
"defaultValue": "
|
|
231
|
+
"attribute": "heading-level",
|
|
232
|
+
"defaultValue": "2"
|
|
231
233
|
},
|
|
232
234
|
"kop": {
|
|
233
235
|
"type": "string",
|
|
@@ -70,7 +70,7 @@ export class DocumentComponentDemo {
|
|
|
70
70
|
}
|
|
71
71
|
return (h("dso-document-component", { annotated: this.isAnnotated(documentComponent), filtered: this.isOpen(documentComponent)
|
|
72
72
|
? this.isFiltered(documentComponent)
|
|
73
|
-
: this.hasFilteredChildren(documentComponent), gereserveerd: documentComponent.gereserveerd,
|
|
73
|
+
: this.hasFilteredChildren(documentComponent), gereserveerd: documentComponent.gereserveerd, headingLevel: 2, kop: documentComponent.kop, inhoud: documentComponent.inhoud, openAnnotation: this.isOpenedAnnotation(documentComponent), notApplicable: this.isNotApplicable(documentComponent) || path.some((p) => this.isNotApplicable(p)), onDsoAnnotationToggle: (e) => this.handleAnnotationToggle(documentComponent, e.detail), onDsoOpenToggle: () => this.handleOpenToggle(documentComponent), open: this.isOpen(documentComponent), type: documentComponent.type, vervallen: documentComponent.vervallen, wijzigactie: documentComponent.wijzigactie, recursiveToggle: this.recursiveToggleState(documentComponent), onDsoRecursiveToggle: (e) => this.handleRecursiveToggle(documentComponent, e.detail), mode: this.mode, href: this.mode === "table-of-contents" ? "/document/" + documentComponent.documentTechnischId : undefined, onDsoTableOfContentsClick: (e) => this.handleTableOfContentsClick(e), onDsoOzonContentClick: (e) => this.handleOzonContentClick(e), ozonContentUrlResolver: this.ozonContentUrlResolver, ozonContentBegripResolver: this.ozonContentBegripResolver, badge: badge, badgeStatus: badgeStatus, badgeTooltip: badgeTooltip, label: label, labelStatus: labelStatus }, this.isOpenedAnnotation(documentComponent) && (h("div", { slot: "annotations" }, h("dso-annotation-locatie", { active: this.isCheckedSlideToggle(documentComponent), "gewijzigde-locatie": true, locatieNoemer: "Winkelgebied", onDsoActiveChange: () => this.handleSelectableChange(documentComponent) }, h("span", { class: "symboolcode", slot: "symbool", "data-symboolcode": "vszt030" })))), this.showContent(documentComponent) && embeddedDocuments?.documentComponents.length && (h("ul", { class: "dso-document-component-list" }, embeddedDocuments.documentComponents.map((d) => (h("li", { key: d.documentTechnischId }, h(DocumentComponent, { path: [...path, d] }))))))));
|
|
74
74
|
};
|
|
75
75
|
this.MenuButton = ({ documentComponent }) => {
|
|
76
76
|
const { type } = documentComponent;
|
|
@@ -207,7 +207,7 @@ export class DocumentComponentDemo {
|
|
|
207
207
|
}
|
|
208
208
|
render() {
|
|
209
209
|
const { DocumentComponent, MenuButton } = this;
|
|
210
|
-
return (h("dso-responsive-element", { key: '
|
|
210
|
+
return (h("dso-responsive-element", { key: 'ab236260f9a6a0b08cce77c0ff84b9a03b51ce44', class: "dso-document-components" }, h("div", { key: 'bb00e379af2aec12362a4e5eee21b335559866a3', class: "dso-navbar" }, h("ul", { key: 'c35d80d6e616224696d974450bedc34a75abc66e', class: "dso-nav dso-nav-sub" }, this.getEmbeddedDocumentComponents(this.response)?.documentComponents?.map((d) => (h("li", { class: this.document === d ? "dso-active" : undefined }, h(MenuButton, { documentComponent: d })))))), this.document && h(DocumentComponent, { key: '63e65905336d74456fbd29bb97363bbae7411ec6', path: [this.document] })));
|
|
211
211
|
}
|
|
212
212
|
static get is() { return "dsot-document-component-demo"; }
|
|
213
213
|
static get encapsulation() { return "scoped"; }
|
|
@@ -82,10 +82,30 @@ export class DropdownMenu {
|
|
|
82
82
|
return withButton ? [this.host, ...menuItems] : menuItems;
|
|
83
83
|
}
|
|
84
84
|
componentDidRender() {
|
|
85
|
-
|
|
85
|
+
// Only position the popover while it is open. autoUpdate runs on its own ResizeObserver;
|
|
86
|
+
// keeping it active on a closed (hidden) popover computes bogus constraints that force a
|
|
87
|
+
// same-frame correction on the next open.
|
|
88
|
+
if (this.open && this.button && this.popoverElement && !this.cleanUp) {
|
|
86
89
|
const element = this.popoverElement;
|
|
87
90
|
const referenceElement = this.button;
|
|
88
|
-
|
|
91
|
+
let initialUpdate = true;
|
|
92
|
+
const applyPopoverStyles = (x, y) => {
|
|
93
|
+
if (!element.isConnected) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (this.pendingPopoverConstraints) {
|
|
97
|
+
const scrollElement = element.querySelector("dso-scrollable") ?? element;
|
|
98
|
+
Object.assign(scrollElement.style, {
|
|
99
|
+
maxHeight: `${this.pendingPopoverConstraints.availableHeight}px`,
|
|
100
|
+
maxInlineSize: `${this.pendingPopoverConstraints.availableWidth}px`,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
Object.assign(element.style, {
|
|
104
|
+
left: `${x}px`,
|
|
105
|
+
top: `${y}px`,
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const autoUpdateCleanUp = autoUpdate(referenceElement, element, () => {
|
|
89
109
|
computePosition(referenceElement, element, {
|
|
90
110
|
strategy: "fixed",
|
|
91
111
|
middleware: [
|
|
@@ -94,23 +114,42 @@ export class DropdownMenu {
|
|
|
94
114
|
padding: 2,
|
|
95
115
|
}),
|
|
96
116
|
size({
|
|
97
|
-
apply({ availableHeight, availableWidth
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
117
|
+
apply: ({ availableHeight, availableWidth }) => {
|
|
118
|
+
// No direct DOM writes here: this callback runs inside the autoUpdate
|
|
119
|
+
// ResizeObserver cycle and would trigger "ResizeObserver loop completed
|
|
120
|
+
// with undelivered notifications". The constraints are applied together
|
|
121
|
+
// with the position, see applyPopoverStyles.
|
|
122
|
+
this.pendingPopoverConstraints = { availableWidth, availableHeight };
|
|
103
123
|
},
|
|
104
124
|
}),
|
|
105
125
|
],
|
|
106
126
|
placement: "bottom-start",
|
|
107
127
|
}).then(({ x, y }) => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
128
|
+
if (initialUpdate) {
|
|
129
|
+
// The first update runs outside the ResizeObserver cycle and is applied
|
|
130
|
+
// directly so the popover does not show up unpositioned.
|
|
131
|
+
initialUpdate = false;
|
|
132
|
+
applyPopoverStyles(x, y);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
// Defer DOM writes until the next frame so ResizeObserver notifications can
|
|
136
|
+
// settle before the popover mutates its own layout again.
|
|
137
|
+
if (this.popoverFrameId !== undefined) {
|
|
138
|
+
cancelAnimationFrame(this.popoverFrameId);
|
|
139
|
+
}
|
|
140
|
+
this.popoverFrameId = requestAnimationFrame(() => {
|
|
141
|
+
this.popoverFrameId = undefined;
|
|
142
|
+
applyPopoverStyles(x, y);
|
|
111
143
|
});
|
|
112
144
|
});
|
|
113
145
|
});
|
|
146
|
+
this.cleanUp = () => {
|
|
147
|
+
if (this.popoverFrameId !== undefined) {
|
|
148
|
+
cancelAnimationFrame(this.popoverFrameId);
|
|
149
|
+
this.popoverFrameId = undefined;
|
|
150
|
+
}
|
|
151
|
+
autoUpdateCleanUp();
|
|
152
|
+
};
|
|
114
153
|
}
|
|
115
154
|
}
|
|
116
155
|
toggleOptions(force) {
|
|
@@ -161,7 +200,7 @@ export class DropdownMenu {
|
|
|
161
200
|
}
|
|
162
201
|
render() {
|
|
163
202
|
const buttonId = uuidv4();
|
|
164
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(Host, { key: '86c4a174ec1a4f8083f6e13728bef4d0fbf73d2b', onFocusout: this.focusOutListener, onKeyDown: this.keyDownHandler }, this.label && (h("button", { key: '6b93303a8ee2717870bc52147667485e9f56c0cb', id: buttonId, class: `dso-${this.variant}`, type: "button", onClick: () => this.toggleOptions(), "aria-expanded": this.open.toString(), "aria-haspopup": "menu", ref: (element) => (this.button = element) }, this.label, h("dso-icon", { key: '02d4af678a2de9e68c6c7983279e8a8af1b221d5', icon: this.open ? "chevron-up" : "chevron-down" }))), h("div", { key: '0653885c62d4e5f9e6567cd1a06ef1f60c31bd50', popover: "manual", class: "dso-dropdown-options", "aria-labelledby": buttonId, role: "menu", ref: (element) => (this.popoverElement = element) }, h("dso-scrollable", { key: '008a6527bce7398d5bf016431c90343011b62596' }, h("slot", { key: 'cbfdd95cd211485fc8672e9dff1f3bb3ed233d99' })))));
|
|
165
204
|
}
|
|
166
205
|
static get is() { return "dso-dropdown-menu"; }
|
|
167
206
|
static get encapsulation() { return "shadow"; }
|
|
@@ -199,9 +199,29 @@ export class Header {
|
|
|
199
199
|
if (typeof this.visibleMenuItemsCount === "undefined" && this.navElement) {
|
|
200
200
|
this.visibleMenuItemsCount = this.calculateOverflowMenuItemCount(this.navElement);
|
|
201
201
|
}
|
|
202
|
-
|
|
202
|
+
// Only position the popover while it is open. autoUpdate runs on its own ResizeObserver;
|
|
203
|
+
// keeping it active on a closed (hidden) popover computes bogus constraints that force a
|
|
204
|
+
// same-frame correction on the next open.
|
|
205
|
+
if (this.open && this.popoverElement && !this.cleanUp && this.dropdownButtonElement) {
|
|
203
206
|
const element = this.popoverElement;
|
|
204
|
-
|
|
207
|
+
let initialUpdate = true;
|
|
208
|
+
const applyPopoverStyles = (x, y) => {
|
|
209
|
+
if (!element.isConnected) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (this.pendingPopoverConstraints) {
|
|
213
|
+
const scrollElement = element.querySelector(".dropdown-menu-options") ?? element;
|
|
214
|
+
Object.assign(scrollElement.style, {
|
|
215
|
+
maxHeight: `${this.pendingPopoverConstraints.availableHeight}px`,
|
|
216
|
+
maxInlineSize: `${this.pendingPopoverConstraints.availableWidth}px`,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
Object.assign(element.style, {
|
|
220
|
+
left: `${x}px`,
|
|
221
|
+
top: `${y}px`,
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
const autoUpdateCleanUp = autoUpdate(this.dropdownButtonElement, element, () => {
|
|
205
225
|
if (this.dropdownButtonElement) {
|
|
206
226
|
computePosition(this.dropdownButtonElement, element, {
|
|
207
227
|
strategy: "fixed",
|
|
@@ -211,28 +231,47 @@ export class Header {
|
|
|
211
231
|
padding: this.dropdownOptionsOffset,
|
|
212
232
|
}),
|
|
213
233
|
size({
|
|
214
|
-
apply({ availableHeight, availableWidth
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
234
|
+
apply: ({ availableHeight, availableWidth }) => {
|
|
235
|
+
// No direct DOM writes here: this callback runs inside the autoUpdate
|
|
236
|
+
// ResizeObserver cycle and would trigger "ResizeObserver loop completed
|
|
237
|
+
// with undelivered notifications". The constraints are applied together
|
|
238
|
+
// with the position, see applyPopoverStyles.
|
|
239
|
+
this.pendingPopoverConstraints = { availableWidth, availableHeight };
|
|
220
240
|
},
|
|
221
241
|
}),
|
|
222
242
|
],
|
|
223
243
|
placement: this.isCompact ? "bottom-end" : "bottom-start",
|
|
224
244
|
}).then(({ x, y }) => {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
245
|
+
if (initialUpdate) {
|
|
246
|
+
// The first update runs outside the ResizeObserver cycle and is applied
|
|
247
|
+
// directly so the popover does not show up unpositioned.
|
|
248
|
+
initialUpdate = false;
|
|
249
|
+
applyPopoverStyles(x, y);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
// Defer DOM writes until the next frame so ResizeObserver notifications can
|
|
253
|
+
// settle before the popover mutates its own layout again.
|
|
254
|
+
if (this.popoverFrameId !== undefined) {
|
|
255
|
+
cancelAnimationFrame(this.popoverFrameId);
|
|
256
|
+
}
|
|
257
|
+
this.popoverFrameId = requestAnimationFrame(() => {
|
|
258
|
+
this.popoverFrameId = undefined;
|
|
259
|
+
applyPopoverStyles(x, y);
|
|
228
260
|
});
|
|
229
261
|
});
|
|
230
262
|
}
|
|
231
263
|
});
|
|
264
|
+
this.cleanUp = () => {
|
|
265
|
+
if (this.popoverFrameId !== undefined) {
|
|
266
|
+
cancelAnimationFrame(this.popoverFrameId);
|
|
267
|
+
this.popoverFrameId = undefined;
|
|
268
|
+
}
|
|
269
|
+
autoUpdateCleanUp();
|
|
270
|
+
};
|
|
232
271
|
}
|
|
233
272
|
}
|
|
234
273
|
render() {
|
|
235
|
-
return (h(Host, { key: '
|
|
274
|
+
return (h(Host, { key: '0ea04cc1432dd27da79f2fecaf342beb4486f99a', "is-compact": this.isCompact }, h("div", { key: '471e73275bf1d645fbcb83e35dc6bb5612a800ba', class: "dso-header" }, h("div", { key: '795356c3f82e93df6ff699db5b36540aaee7e832', class: "logo-container" }, h("slot", { key: '9dcdcdf2f5e6292fe31b25915d263e3505047312', name: "logo" })), this.isCompact ? this.renderCompact() : this.renderNormal())));
|
|
236
275
|
}
|
|
237
276
|
tabbables(withButton) {
|
|
238
277
|
const tabbables = this.dropdownElement ? tabbable(this.dropdownElement) : [];
|
|
@@ -214,11 +214,9 @@
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
::slotted(img.dso-highlight-box-banner) {
|
|
217
|
+
--_dso-image-margin-inline: -16px -16px;
|
|
218
|
+
--_dso-image-margin-block: -16px 8px;
|
|
217
219
|
aspect-ratio: 2.38/1;
|
|
218
|
-
margin-inline-start: -16px;
|
|
219
|
-
margin-inline-end: -16px;
|
|
220
|
-
margin-block-start: -16px;
|
|
221
|
-
margin-block-end: 8px;
|
|
222
220
|
object-fit: cover;
|
|
223
221
|
inline-size: calc(100% + 32px);
|
|
224
222
|
max-inline-size: unset !important;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::after,
|
|
3
|
+
*::before {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
:host {
|
|
2
8
|
display: block;
|
|
3
9
|
padding-block: 16px;
|
|
@@ -34,6 +40,10 @@
|
|
|
34
40
|
--_dso-button-tertiary-disabled-color: #999;
|
|
35
41
|
background-color: #f2f2f2;
|
|
36
42
|
color: #191919;
|
|
43
|
+
--_dso-image-display: block;
|
|
44
|
+
--_dso-image-margin-block: 8px;
|
|
45
|
+
--_dso-image-margin-inline: auto;
|
|
46
|
+
--_dso-rich-content-margin-block-start: 0;
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
:host(:not([active], [fixed])),
|
|
@@ -46,21 +56,4 @@ dso-icon-button {
|
|
|
46
56
|
position: absolute;
|
|
47
57
|
inset-inline-end: 8px;
|
|
48
58
|
inset-block-start: 8px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
*,
|
|
52
|
-
*::after,
|
|
53
|
-
*::before {
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.sr-only {
|
|
58
|
-
position: absolute;
|
|
59
|
-
inline-size: 1px;
|
|
60
|
-
block-size: 1px;
|
|
61
|
-
padding: 0;
|
|
62
|
-
margin: -1px;
|
|
63
|
-
border: 0;
|
|
64
|
-
overflow: hidden;
|
|
65
|
-
clip-path: rect(0 0 0 0);
|
|
66
59
|
}
|
|
@@ -16,6 +16,6 @@ export class OzonContentIntIoRefNode {
|
|
|
16
16
|
originalEvent: event,
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
|
-
return (h(Fragment, null, h("dso-ozon-content-toggletip", { icon: "map-location" }, h("span", { slot: "label" }, mapNodeToJsx(node.childNodes)), annotated && (h("span", { role: "paragraph" }, "Gebieden op de kaart tonen:", " ", h("button", { type: "button", class: "dso-tertiary", onClick: intIoRefOnClick }, h("span", null, "Kenmerken en kaart"), h("dso-icon", { icon: "label" })))), h("span", { role: "paragraph" }, "Offici\u00EBle publicaties:", " ", h("a", { target: "_blank", rel: "noopener noreferrer", href: href ?? undefined, title: "Opent andere website in nieuw tabblad" }, h("span", null, mapNodeToJsx(node.childNodes)), h("dso-icon", { icon: "external-link" }))))));
|
|
19
|
+
return (h(Fragment, null, h("dso-ozon-content-toggletip", { icon: "map-location" }, h("span", { slot: "label" }, mapNodeToJsx(node.childNodes)), annotated && (h("span", { role: "paragraph" }, "Gebieden op de kaart tonen:", " ", h("button", { type: "button", class: "dso-tertiary", onClick: intIoRefOnClick }, h("span", null, "Kenmerken en kaart"), h("dso-icon", { icon: "label" })))), h("span", { role: "paragraph" }, "Offici\u00EBle publicaties:", " ", h("a", { target: "_blank", rel: "noopener noreferrer", href: href ?? undefined, title: "Opent andere website in nieuw tabblad" }, h("span", null, mapNodeToJsx(node.childNodes, true)), h("dso-icon", { icon: "external-link" }))))));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -18,7 +18,7 @@ export class OzonContentIntRefNode {
|
|
|
18
18
|
!definitieXMLDocument.documentElement.hasChildNodes()) {
|
|
19
19
|
return mapNodeToJsx(node.childNodes);
|
|
20
20
|
}
|
|
21
|
-
return (h("dso-ozon-content-toggletip", null, h("span", { slot: "label" }, mapNodeToJsx(node.childNodes)), mapNodeToJsx(Array.from(definitieXMLDocument.documentElement.childNodes))));
|
|
21
|
+
return (h("dso-ozon-content-toggletip", null, h("span", { slot: "label" }, mapNodeToJsx(node.childNodes)), mapNodeToJsx(Array.from(definitieXMLDocument.documentElement.childNodes), true)));
|
|
22
22
|
}
|
|
23
23
|
const handleIntRefClick = (event) => {
|
|
24
24
|
emitClick({
|
|
@@ -16,6 +16,6 @@ export class OzonContentNootNode {
|
|
|
16
16
|
}
|
|
17
17
|
const childNodes = Array.from(node.childNodes);
|
|
18
18
|
const nootNummer = childNodes.find((n) => getNodeName(n) === "NootNummer")?.textContent ?? noteId;
|
|
19
|
-
return (h("sup", null, h("dso-ozon-content-toggletip", { class: "toggle-note" }, h("span", { slot: "label" }, nootNummer), h("span", { role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(":scope > Al")))))));
|
|
19
|
+
return (h("sup", null, h("dso-ozon-content-toggletip", { class: "toggle-note" }, h("span", { slot: "label" }, nootNummer), h("span", { role: "section" }, mapNodeToJsx(Array.from(node.querySelectorAll(":scope > Al")), true)))));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -83,7 +83,7 @@ export class Mapper {
|
|
|
83
83
|
return mapper.render(node, {
|
|
84
84
|
inline: context.inline,
|
|
85
85
|
mark: context.mark,
|
|
86
|
-
mapNodeToJsx: (n, m) => this.mapNodeToJsx(n, context, [...path, node], m),
|
|
86
|
+
mapNodeToJsx: (n, m = ignoreMark) => this.mapNodeToJsx(n, context, [...path, node], m),
|
|
87
87
|
emitClick: context.emitClick,
|
|
88
88
|
setState,
|
|
89
89
|
emitMarkItemHighlight: context.emitMarkItemHighlight,
|
|
@@ -170,7 +170,7 @@ export class TreeView {
|
|
|
170
170
|
return false;
|
|
171
171
|
}
|
|
172
172
|
render() {
|
|
173
|
-
return (h("div", { key: '
|
|
173
|
+
return (h("div", { key: '283e4d605869d7a654955ffb9bcc3621a477b3af', id: "tree", class: "dso-tree", onKeyDown: (e) => this.keyDownListener(e), ref: (element) => (this.tree = element) }, h("ul", { key: 'a664ea7dade4174cccc880169de9d49d8eeb57db', role: "tree", "aria-label": "Objectenboom" }, this.collection?.map((item, index) => (h(DsoTreeItem, { owner: this, ancestors: [], item: item, index: index, level: 1, setSize: this.collection.length }))))));
|
|
174
174
|
}
|
|
175
175
|
static get is() { return "dso-tree-view"; }
|
|
176
176
|
static get encapsulation() { return "shadow"; }
|
|
@@ -163,9 +163,9 @@ export class ViewerGrid {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
render() {
|
|
166
|
-
return (h(Fragment, { key: '
|
|
166
|
+
return (h(Fragment, { key: '69a7b9d6956d0238f57fc3a7b21a1ecae9aacf78' }, h("slot", { key: 'b5a9aa2c800972284aafe7667d57da10be909379', name: "top-bar" }), h("div", { key: '96695156177c261841c1ebb4dacb9a488e31624e', class: "viewer-grid-columns" }, this.tabView && (h("nav", { key: 'db4823b2fab2e27a5e13f6f5d4bb613b82977d16', class: "dso-navbar" }, h("ul", { key: '9cd931e9693c96516fd800be0eb5e7df993a4023', class: "dso-nav dso-nav-sub" }, viewerGridTabs.map((tab) => (h("li", { key: tab, class: clsx({ "dso-active": this.activeTab === tab }) }, h("button", { type: "button", class: "dso-tertiary", "aria-current": this.activeTab === tab ? "page" : undefined, onClick: () => this.switchActiveTab(tab) }, viewerGridTabLabelMap[tab]))))))), (!this.tabView || (this.tabView && this.activeTab === "search") || this.print) && (h(MainPanel, { key: '523b13cf9dd9c67b2930e9494c606af41b572888', tabView: this.tabView, mainSize: this.mainSize, documentPanelOpen: this.documentPanelOpen, mainPanelExpanded: this.mainPanelExpanded, mainPanelHidden: this.mainPanelHidden, toggleMainPanel: this.toggleMainPanel, dsoMainSizeChangeAnimationEnd: this.dsoMainSizeChangeAnimationEnd, printFilterPanel: !this.tabView && this.filterPanelOpen && this.print ? this.renderFilterPanel() : undefined })), (!this.tabView || (this.tabView && this.activeTab === "search")) && !this.print && this.renderFilterPanel(), (!this.tabView || (this.tabView && this.activeTab === "map") || this.print) && (h("div", { key: 'a6d1dba4230967f6e70f00ebe447d7e78bac5f78', class: "map-area" }, h("div", { key: '31c3d2288d1c61c9bc5d86d582f921dd9bf6bd74', class: "map", ref: (element) => (this.mapElement = element) }, h("slot", { key: 'aba536a452d4d59608564a95c6342c3b02af0ddb', name: "map" })), h("slot", { key: '5c486a1a2c691c917a63540ce7cff4e755e1d541', name: "legend" }))), ((!this.tabView && this.documentPanelOpen) ||
|
|
167
167
|
(this.tabView && this.activeTab === "document") ||
|
|
168
|
-
this.print) && (h(DocumentPanel, { key: '
|
|
168
|
+
this.print) && (h(DocumentPanel, { key: '42667326ab4c77b38c7bee479713349e5789d115', tabView: this.tabView, panelSize: this.documentPanelSize, shrinkDocumentPanel: this.shrinkDocumentPanel, expandDocumentPanel: this.expandDocumentPanel, dsoDocumentPanelSizeChangeAnimationEnd: this.dsoDocumentPanelSizeChangeAnimationEnd })), h(Overlay, { key: '87c1b94862cedda8980d5630c3fa9fdd90ac7eca', ref: (element) => (this.overlay = element), dsoCloseOverlay: (e) => this.dsoCloseOverlay.emit({ originalEvent: e }) }))));
|
|
169
169
|
}
|
|
170
170
|
static get is() { return "dso-viewer-grid"; }
|
|
171
171
|
static get encapsulation() { return "shadow"; }
|