@dso-toolkit/core 57.0.0 → 58.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/dso-accordion.cjs.entry.js +1 -1
- package/dist/cjs/dso-action-list-item.cjs.entry.js +1 -1
- package/dist/cjs/dso-action-list.cjs.entry.js +1 -1
- package/dist/cjs/dso-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/dso-annotation-output_3.cjs.entry.js +1 -1
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +1 -1
- package/dist/cjs/dso-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-card-container.cjs.entry.js +1 -1
- package/dist/cjs/dso-card.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/dso-expandable.cjs.entry.js +1 -1
- package/dist/cjs/dso-header.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-info_2.cjs.entry.js +1 -1
- package/dist/cjs/dso-list-button.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 +1 -1
- package/dist/cjs/dso-map-overlays.cjs.entry.js +1 -1
- package/dist/cjs/dso-modal.cjs.entry.js +13 -45
- package/dist/cjs/dso-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-pagination.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +1 -1
- package/dist/cjs/dso-responsive-element.cjs.entry.js +1 -1
- package/dist/cjs/dso-scrollable.cjs.entry.js +1 -1
- package/dist/cjs/dso-table.cjs.entry.js +2 -2
- package/dist/cjs/dso-table.cjs.entry.js.map +1 -1
- package/dist/cjs/dso-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/dso-toolkit.cjs.js +2 -2
- package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/dso-tree-view.cjs.entry.js +1 -1
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +83 -62
- package/dist/cjs/dso-viewer-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/dsot-document-component-demo.cjs.entry.js +1 -1
- package/dist/cjs/{index-efc2222e.js → index-d4003ee3.js} +1 -4
- package/dist/cjs/index-d4003ee3.js.map +1 -0
- package/dist/cjs/index.cjs.js +0 -72
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/modal/modal.css +86 -57
- package/dist/collection/components/modal/modal.interfaces.js.map +1 -1
- package/dist/collection/components/modal/modal.js +33 -90
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/table/table.css +47 -46
- package/dist/collection/components/viewer-grid/components/filterpanel.js +7 -0
- package/dist/collection/components/viewer-grid/components/filterpanel.js.map +1 -0
- package/dist/collection/components/viewer-grid/components/index.js +4 -0
- package/dist/collection/components/viewer-grid/components/index.js.map +1 -0
- package/dist/collection/components/viewer-grid/components/main-panel.js +10 -0
- package/dist/collection/components/viewer-grid/components/main-panel.js.map +1 -0
- package/dist/collection/components/viewer-grid/components/overlay.js +6 -0
- package/dist/collection/components/viewer-grid/components/overlay.js.map +1 -0
- package/dist/collection/components/viewer-grid/components/viewer-grid-filterpanel-buttons.js.map +1 -0
- package/dist/collection/components/viewer-grid/viewer-grid.css +301 -86
- package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.interfaces.js.map +1 -1
- package/dist/collection/components/viewer-grid/viewer-grid.js +59 -73
- package/dist/collection/components/viewer-grid/viewer-grid.js.map +1 -1
- package/dist/collection/index.js +0 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/components/dso-modal.js +14 -46
- package/dist/components/dso-modal.js.map +1 -1
- package/dist/components/dso-table.js +1 -1
- package/dist/components/dso-table.js.map +1 -1
- package/dist/components/dso-viewer-grid.js +86 -68
- package/dist/components/dso-viewer-grid.js.map +1 -1
- package/dist/components/index.js +0 -71
- package/dist/components/index.js.map +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js.map +1 -1
- package/dist/dso-toolkit/index.esm.js +1 -1
- package/dist/dso-toolkit/index.esm.js.map +1 -1
- package/dist/dso-toolkit/{p-b608283b.entry.js → p-0dffb117.entry.js} +2 -2
- package/dist/dso-toolkit/{p-14453f73.entry.js → p-14aa091d.entry.js} +2 -2
- package/dist/dso-toolkit/p-1a1a43fd.js +3 -0
- package/dist/dso-toolkit/p-1a1a43fd.js.map +1 -0
- package/dist/dso-toolkit/{p-d8c137b5.entry.js → p-1c721290.entry.js} +2 -2
- package/dist/dso-toolkit/{p-56d87a53.entry.js → p-22baee8e.entry.js} +2 -2
- package/dist/dso-toolkit/{p-a616ab8a.entry.js → p-2ccbf58d.entry.js} +2 -2
- package/dist/dso-toolkit/{p-9f2bb98b.entry.js → p-3cbf8b97.entry.js} +2 -2
- package/dist/dso-toolkit/{p-29b741cb.entry.js → p-3d4308ba.entry.js} +2 -2
- package/dist/dso-toolkit/{p-c8165a50.entry.js → p-420e0d23.entry.js} +2 -2
- package/dist/dso-toolkit/{p-bf203ab8.entry.js → p-423fa057.entry.js} +2 -2
- package/dist/dso-toolkit/{p-debbe184.entry.js → p-440fc4ae.entry.js} +2 -2
- package/dist/dso-toolkit/{p-d3f69d06.entry.js → p-49bce8b2.entry.js} +2 -2
- package/dist/dso-toolkit/{p-f56c1b28.entry.js → p-4bc67e5c.entry.js} +2 -2
- package/dist/dso-toolkit/{p-9b587a94.entry.js → p-4da2fa8b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-0e5a93c3.entry.js → p-4e86089d.entry.js} +2 -2
- package/dist/dso-toolkit/{p-68e9f61b.entry.js → p-51f19c06.entry.js} +2 -2
- package/dist/dso-toolkit/{p-05ea1fba.entry.js → p-54c65314.entry.js} +2 -2
- package/dist/dso-toolkit/p-5e5302ef.entry.js +2 -0
- package/dist/dso-toolkit/p-5e5302ef.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-818d032e.entry.js → p-5ee79846.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e2cacb8b.entry.js → p-604eb60b.entry.js} +2 -2
- package/dist/dso-toolkit/{p-1c295ae2.entry.js → p-669c3743.entry.js} +2 -2
- package/dist/dso-toolkit/p-712fca2c.entry.js +2 -0
- package/dist/dso-toolkit/p-712fca2c.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-b67631ef.entry.js → p-745b6678.entry.js} +2 -2
- package/dist/dso-toolkit/{p-cfd6f4ef.entry.js → p-7a6be9c1.entry.js} +2 -2
- package/dist/dso-toolkit/{p-27dfadbf.entry.js → p-8b77b083.entry.js} +2 -2
- package/dist/dso-toolkit/{p-3fa7489e.entry.js → p-8f8dd254.entry.js} +2 -2
- package/dist/dso-toolkit/p-918bcdbe.entry.js +2 -0
- package/dist/dso-toolkit/p-918bcdbe.entry.js.map +1 -0
- package/dist/dso-toolkit/{p-e26974ee.entry.js → p-98f7ede6.entry.js} +2 -2
- package/dist/dso-toolkit/{p-fafa5ea1.entry.js → p-a00c4003.entry.js} +2 -2
- package/dist/dso-toolkit/p-a0798096.entry.js +2 -0
- package/dist/dso-toolkit/{p-42d3c595.entry.js.map → p-a0798096.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-9fee52e5.entry.js → p-a1060560.entry.js} +2 -2
- package/dist/dso-toolkit/{p-6050e8e6.entry.js → p-b34f24b4.entry.js} +2 -2
- package/dist/dso-toolkit/{p-168750a2.entry.js → p-b76768a5.entry.js} +2 -2
- package/dist/dso-toolkit/{p-e86e0fce.entry.js → p-b9d441d5.entry.js} +2 -2
- package/dist/dso-toolkit/{p-1fe715e4.entry.js → p-bc9e3037.entry.js} +2 -2
- package/dist/dso-toolkit/{p-bcae3f55.entry.js → p-bcecc743.entry.js} +2 -2
- package/dist/dso-toolkit/p-e69d7e62.entry.js +2 -0
- package/dist/dso-toolkit/{p-5265e22b.entry.js.map → p-e69d7e62.entry.js.map} +1 -1
- package/dist/dso-toolkit/{p-f3ed8688.entry.js → p-f21e4ccc.entry.js} +2 -2
- package/dist/esm/dso-accordion-section.entry.js +1 -1
- package/dist/esm/dso-accordion.entry.js +1 -1
- package/dist/esm/dso-action-list-item.entry.js +1 -1
- package/dist/esm/dso-action-list.entry.js +1 -1
- package/dist/esm/dso-alert_5.entry.js +1 -1
- package/dist/esm/dso-annotation-output_3.entry.js +1 -1
- package/dist/esm/dso-attachments-counter.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +1 -1
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-card-container.entry.js +1 -1
- package/dist/esm/dso-card.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +1 -1
- package/dist/esm/dso-dropdown-menu.entry.js +1 -1
- package/dist/esm/dso-expandable.entry.js +1 -1
- package/dist/esm/dso-header.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-info_2.entry.js +1 -1
- package/dist/esm/dso-list-button.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +1 -1
- package/dist/esm/dso-map-controls.entry.js +1 -1
- package/dist/esm/dso-map-overlays.entry.js +1 -1
- package/dist/esm/dso-modal.entry.js +13 -45
- package/dist/esm/dso-modal.entry.js.map +1 -1
- package/dist/esm/dso-pagination.entry.js +1 -1
- package/dist/esm/dso-progress-bar.entry.js +1 -1
- package/dist/esm/dso-progress-indicator.entry.js +1 -1
- package/dist/esm/dso-responsive-element.entry.js +1 -1
- package/dist/esm/dso-scrollable.entry.js +1 -1
- package/dist/esm/dso-table.entry.js +2 -2
- package/dist/esm/dso-table.entry.js.map +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 +1 -1
- package/dist/esm/dso-tree-view.entry.js +1 -1
- package/dist/esm/dso-viewer-grid.entry.js +83 -62
- package/dist/esm/dso-viewer-grid.entry.js.map +1 -1
- package/dist/esm/dsot-document-component-demo.entry.js +1 -1
- package/dist/esm/{index-367cff36.js → index-3e9ed0c5.js} +1 -4
- package/dist/esm/index-3e9ed0c5.js.map +1 -0
- package/dist/esm/index.js +0 -69
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/modal/modal.d.ts +9 -15
- package/dist/types/components/modal/modal.interfaces.d.ts +2 -13
- package/dist/types/components/viewer-grid/components/filterpanel.d.ts +7 -0
- package/dist/types/components/viewer-grid/components/index.d.ts +3 -0
- package/dist/types/components/viewer-grid/components/main-panel.d.ts +10 -0
- package/dist/types/components/viewer-grid/components/overlay.d.ts +6 -0
- package/dist/types/components/viewer-grid/components/viewer-grid-filterpanel-buttons.d.ts +6 -0
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +12 -11
- package/dist/types/components/viewer-grid/viewer-grid.interfaces.d.ts +13 -2
- package/dist/types/components.d.ts +14 -24
- package/dist/types/index.d.ts +0 -1
- package/package.json +2 -2
- package/dist/cjs/index-efc2222e.js.map +0 -1
- package/dist/collection/components/modal/modal-ref.js +0 -19
- package/dist/collection/components/modal/modal-ref.js.map +0 -1
- package/dist/collection/components/modal/modal.controller.js +0 -51
- package/dist/collection/components/modal/modal.controller.js.map +0 -1
- package/dist/collection/components/viewer-grid/viewer-grid-filterpanel-buttons.js.map +0 -1
- package/dist/dso-toolkit/p-04c97d7d.entry.js +0 -2
- package/dist/dso-toolkit/p-04c97d7d.entry.js.map +0 -1
- package/dist/dso-toolkit/p-42d3c595.entry.js +0 -2
- package/dist/dso-toolkit/p-5265e22b.entry.js +0 -2
- package/dist/dso-toolkit/p-70a28e3f.entry.js +0 -2
- package/dist/dso-toolkit/p-70a28e3f.entry.js.map +0 -1
- package/dist/dso-toolkit/p-ce928197.js +0 -3
- package/dist/dso-toolkit/p-ce928197.js.map +0 -1
- package/dist/dso-toolkit/p-e4553695.entry.js +0 -2
- package/dist/dso-toolkit/p-e4553695.entry.js.map +0 -1
- package/dist/esm/index-367cff36.js.map +0 -1
- package/dist/types/components/modal/modal-ref.d.ts +0 -8
- package/dist/types/components/modal/modal.controller.d.ts +0 -6
- package/dist/types/components/viewer-grid/viewer-grid-filterpanel-buttons.d.ts +0 -6
- /package/dist/collection/components/viewer-grid/{viewer-grid-filterpanel-buttons.js → components/viewer-grid-filterpanel-buttons.js} +0 -0
- /package/dist/dso-toolkit/{p-b608283b.entry.js.map → p-0dffb117.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-14453f73.entry.js.map → p-14aa091d.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-d8c137b5.entry.js.map → p-1c721290.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-56d87a53.entry.js.map → p-22baee8e.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-a616ab8a.entry.js.map → p-2ccbf58d.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9f2bb98b.entry.js.map → p-3cbf8b97.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-29b741cb.entry.js.map → p-3d4308ba.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-c8165a50.entry.js.map → p-420e0d23.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-bf203ab8.entry.js.map → p-423fa057.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-debbe184.entry.js.map → p-440fc4ae.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-d3f69d06.entry.js.map → p-49bce8b2.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-f56c1b28.entry.js.map → p-4bc67e5c.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9b587a94.entry.js.map → p-4da2fa8b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-0e5a93c3.entry.js.map → p-4e86089d.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-68e9f61b.entry.js.map → p-51f19c06.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-05ea1fba.entry.js.map → p-54c65314.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-818d032e.entry.js.map → p-5ee79846.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e2cacb8b.entry.js.map → p-604eb60b.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-1c295ae2.entry.js.map → p-669c3743.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-b67631ef.entry.js.map → p-745b6678.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-cfd6f4ef.entry.js.map → p-7a6be9c1.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-27dfadbf.entry.js.map → p-8b77b083.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-3fa7489e.entry.js.map → p-8f8dd254.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e26974ee.entry.js.map → p-98f7ede6.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-fafa5ea1.entry.js.map → p-a00c4003.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-9fee52e5.entry.js.map → p-a1060560.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-6050e8e6.entry.js.map → p-b34f24b4.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-168750a2.entry.js.map → p-b76768a5.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-e86e0fce.entry.js.map → p-b9d441d5.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-1fe715e4.entry.js.map → p-bc9e3037.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-bcae3f55.entry.js.map → p-bcecc743.entry.js.map} +0 -0
- /package/dist/dso-toolkit/{p-f3ed8688.entry.js.map → p-f21e4ccc.entry.js.map} +0 -0
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,76 +1,4 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
class DsoModalRef {
|
|
6
|
-
constructor(modalElement) {
|
|
7
|
-
this.modalElement = modalElement;
|
|
8
|
-
if (!modalElement) {
|
|
9
|
-
throw new Error("unable to add event listener. try opening the modal first");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
/** Removes the modal from the DOM. */
|
|
13
|
-
close() {
|
|
14
|
-
document.body.removeChild(this.modalElement);
|
|
15
|
-
}
|
|
16
|
-
addEventListener(eventName, fn) {
|
|
17
|
-
this.modalElement.addEventListener(eventName, fn);
|
|
18
|
-
}
|
|
19
|
-
removeEventListener(eventName, fn) {
|
|
20
|
-
this.modalElement.removeEventListener(eventName, fn);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
class DsoModalController {
|
|
25
|
-
open(modal, options) {
|
|
26
|
-
const dsoModalElement = this.createModal(modal, options);
|
|
27
|
-
document.body.appendChild(dsoModalElement);
|
|
28
|
-
return new DsoModalRef(dsoModalElement);
|
|
29
|
-
}
|
|
30
|
-
createModal({ title, body, footer }, options) {
|
|
31
|
-
const element = document.createElement(`dso-modal`);
|
|
32
|
-
if (title) {
|
|
33
|
-
element.setAttribute("modal-title", title);
|
|
34
|
-
}
|
|
35
|
-
if (options) {
|
|
36
|
-
const { role, showCloseButton, initialFocus, returnFocus } = options;
|
|
37
|
-
if (role) {
|
|
38
|
-
element.role = role;
|
|
39
|
-
}
|
|
40
|
-
if (showCloseButton) {
|
|
41
|
-
element.setAttribute("show-close-button", showCloseButton ? "true" : "false");
|
|
42
|
-
}
|
|
43
|
-
if (initialFocus) {
|
|
44
|
-
element.setAttribute("initial-focus", initialFocus);
|
|
45
|
-
}
|
|
46
|
-
if (returnFocus) {
|
|
47
|
-
element.returnFocus = returnFocus;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
const bodyDiv = document.createElement("div");
|
|
51
|
-
bodyDiv.setAttribute("slot", "body");
|
|
52
|
-
if (typeof body === "string") {
|
|
53
|
-
bodyDiv.innerHTML = body;
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
bodyDiv.appendChild(body);
|
|
57
|
-
}
|
|
58
|
-
element.appendChild(bodyDiv);
|
|
59
|
-
if (footer) {
|
|
60
|
-
const footerDiv = document.createElement("div");
|
|
61
|
-
footerDiv.setAttribute("slot", "footer");
|
|
62
|
-
if (typeof footer === "string") {
|
|
63
|
-
footerDiv.innerHTML = footer;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
footerDiv.appendChild(footer);
|
|
67
|
-
}
|
|
68
|
-
element.appendChild(footerDiv);
|
|
69
|
-
}
|
|
70
|
-
return element;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
exports.DsoModalController = DsoModalController;
|
|
75
3
|
|
|
76
4
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.cjs.js","mappings":"
|
|
1
|
+
{"file":"index.cjs.js","mappings":";;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d4003ee3.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
Stencil Client Patch Esm v3.4.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["
|
|
17
|
+
return index.bootstrapLazy([["dsot-document-component-demo.cjs",[[0,"dsot-document-component-demo",{"response":[32],"open":[32],"openedAnnotation":[32],"filtered":[32],"notApplicable":[32],"activeAnnotationSelectables":[32]}]]],["dso-map-base-layers.cjs",[[1,"dso-map-base-layers",{"group":[1],"baseLayers":[16]}]]],["dso-map-overlays.cjs",[[1,"dso-map-overlays",{"group":[1],"overlays":[16]}]]],["dso-toggletip.cjs",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-accordion-section.cjs",[[1,"dso-accordion-section",{"handleTitle":[1,"handle-title"],"heading":[1],"handleUrl":[1,"handle-url"],"status":[1],"attachmentCount":[2,"attachment-count"],"icon":[1],"statusDescription":[1,"status-description"],"open":[516],"hasNestedAccordion":[32],"hover":[32]}]]],["dso-header.cjs",[[6,"dso-header",{"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"authStatus":[1,"auth-status"],"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"userHomeActive":[4,"user-home-active"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32],"dropdownOptionsOffset":[32]}]]],["dso-map-controls.cjs",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32],"toggleVisibility":[64]}]]],["dso-modal.cjs",[[1,"dso-modal",{"fullscreen":[516],"modalTitle":[1,"modal-title"],"role":[1],"showCloseButton":[4,"show-close-button"],"ariaId":[32],"hasFooter":[32]}]]],["dso-pagination.cjs",[[1,"dso-pagination",{"totalPages":[2,"total-pages"],"currentPage":[2,"current-page"],"formatHref":[16],"availablePositions":[32]},[[0,"dsoSizeChange","sizeChangeHandler"]]]]],["dso-tree-view.cjs",[[1,"dso-tree-view",{"collection":[16],"focusItem":[64]}]]],["dso-action-list-item.cjs",[[1,"dso-action-list-item",{"step":[2],"itemTitle":[1,"item-title"],"flowLine":[4,"flow-line"],"warning":[4],"divider":[4]}]]],["dso-attachments-counter.cjs",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest.cjs",[[6,"dso-autosuggest",{"suggestions":[16],"loading":[4],"loadingLabel":[1,"loading-label"],"loadingDelayed":[2,"loading-delayed"],"notFoundLabel":[1,"not-found-label"],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32],"notFound":[32],"showLoading":[32]},[[4,"click","onDocumentClick"]]]]],["dso-date-picker.cjs",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"invalid":[516],"describedBy":[1,"described-by"],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"visible":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel.cjs",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]},[[8,"keydown","keyDownListener"]]]]],["dso-image-overlay.cjs",[[1,"dso-image-overlay",{"active":[32],"zoomable":[32]},[[2,"load","loadListener"]]]]],["dso-list-button.cjs",[[1,"dso-list-button",{"label":[1],"sublabel":[1],"count":[2],"min":[8],"max":[8],"checked":[516],"disabled":[516],"manual":[4],"manualInputWrapperElement":[32],"manualCount":[32]}]]],["dso-table.cjs",[[1,"dso-table",{"noModal":[516,"no-modal"],"isResponsive":[516,"is-responsive"],"modalActive":[32],"placeholderHeight":[32]}]]],["dso-accordion.cjs",[[1,"dso-accordion",{"variant":[513],"reverseAlign":[516,"reverse-align"],"_getState":[64]}]]],["dso-action-list.cjs",[[1,"dso-action-list",{"listTitle":[1,"list-title"]}]]],["dso-banner.cjs",[[1,"dso-banner",{"status":[513]}]]],["dso-card.cjs",[[1,"dso-card",{"isSelectable":[516,"is-selectable"],"hasImage":[516,"has-image"],"clickable":[4],"imageShape":[513,"image-shape"]}]]],["dso-card-container.cjs",[[1,"dso-card-container",{"mode":[513]}]]],["dso-highlight-box.cjs",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar.cjs",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-viewer-grid.cjs",[[1,"dso-viewer-grid",{"filterpanelOpen":[516,"filterpanel-open"],"overlayOpen":[516,"overlay-open"],"initialMainSize":[1,"initial-main-size"],"mainSize":[32],"tabView":[32],"activeTab":[32]}]]],["dso-dropdown-menu.cjs",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"dropdownOptionsOffset":[2,"dropdown-options-offset"],"checkable":[4],"boundary":[1],"strategy":[1]}]]],["dso-progress-indicator.cjs",[[1,"dso-progress-indicator",{"label":[1],"size":[513],"block":[4]}]]],["dso-scrollable.cjs",[[1,"dso-scrollable",{"scrollPosition":[32],"_setScrollState":[64]}]]],["dso-expandable.cjs",[[1,"dso-expandable",{"open":[516],"enableAnimation":[4,"enable-animation"],"minimumHeight":[2,"minimum-height"],"animationReady":[32]}]]],["dso-responsive-element.cjs",[[1,"dso-responsive-element",{"sizeAlias":[32],"sizeWidth":[32],"getSize":[64]}]]],["dso-info-button.cjs",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1],"hover":[32],"setFocus":[64]}]]],["dso-tooltip.cjs",[[1,"dso-tooltip",{"descriptive":[516],"position":[1],"strategy":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]}]]],["dso-icon.cjs",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_2.cjs",[[6,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"labelledById":[1,"labelled-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32],"keyboardFocus":[32],"toggleInfo":[64]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-alert_5.cjs",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"truncate":[4],"removeHover":[32],"removeFocus":[32],"textHover":[32],"textFocus":[32],"isTruncated":[32],"labelText":[32],"_truncateLabel":[64]},[[4,"keydown","keyDownListener"]]],[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}],[0,"dso-annotation-button",{"identifier":[1],"open":[4]}],[1,"dso-badge",{"status":[1]}],[1,"dso-ozon-content",{"content":[1],"inline":[516],"deleted":[516],"interactive":[520],"state":[32]}]]],["dso-annotation-output_3.cjs",[[1,"dso-document-component",{"heading":[1],"label":[1],"nummer":[1],"opschrift":[1],"inhoud":[1],"open":[516],"filtered":[516],"notApplicable":[516,"not-applicable"],"genesteOntwerpInformatie":[516,"geneste-ontwerp-informatie"],"bevatOntwerpInformatie":[516,"bevat-ontwerp-informatie"],"annotated":[516],"gereserveerd":[4],"vervallen":[4],"openAnnotation":[4,"open-annotation"],"alternativeTitle":[1,"alternative-title"],"type":[513],"wijzigactie":[513]}],[4,"dso-annotation-output",{"identifier":[513],"annotationPrefix":[513,"annotation-prefix"],"open":[516]}],[4,"dso-slide-toggle",{"checked":[4],"disabled":[4],"accessibleLabel":[1,"accessible-label"],"labelledbyId":[1,"labelledby-id"],"identifier":[1],"hasVisibleLabel":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -12,6 +12,47 @@
|
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
:host {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host([fullscreen]) dialog {
|
|
20
|
+
inline-size: 100dvi;
|
|
21
|
+
block-size: 100dvb;
|
|
22
|
+
}
|
|
23
|
+
:host([fullscreen]) dialog .dso-dialog {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
max-inline-size: 100%;
|
|
27
|
+
block-size: 100%;
|
|
28
|
+
}
|
|
29
|
+
:host([fullscreen]) dialog .dso-dialog > dso-scrollable {
|
|
30
|
+
flex-grow: 1;
|
|
31
|
+
max-block-size: unset;
|
|
32
|
+
}
|
|
33
|
+
:host([fullscreen]) dialog .dso-footer {
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media screen and (max-width: 480px) {
|
|
38
|
+
:host dialog {
|
|
39
|
+
inline-size: 100dvi;
|
|
40
|
+
block-size: 100dvb;
|
|
41
|
+
}
|
|
42
|
+
:host dialog .dso-dialog {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
max-inline-size: 100%;
|
|
46
|
+
block-size: 100%;
|
|
47
|
+
}
|
|
48
|
+
:host dialog .dso-dialog > dso-scrollable {
|
|
49
|
+
flex-grow: 1;
|
|
50
|
+
max-block-size: unset;
|
|
51
|
+
}
|
|
52
|
+
:host dialog .dso-footer {
|
|
53
|
+
flex-shrink: 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
15
56
|
.sr-only {
|
|
16
57
|
position: absolute;
|
|
17
58
|
width: 1px;
|
|
@@ -44,49 +85,45 @@ button::-moz-focus-inner {
|
|
|
44
85
|
}
|
|
45
86
|
|
|
46
87
|
.dso-modal {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
z-index: 530;
|
|
88
|
+
overflow: visible;
|
|
89
|
+
padding: 0;
|
|
90
|
+
border: 0;
|
|
91
|
+
}
|
|
92
|
+
.dso-modal::backdrop {
|
|
93
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
54
94
|
}
|
|
55
95
|
.dso-modal .dso-dialog {
|
|
56
|
-
|
|
96
|
+
max-inline-size: 640px;
|
|
57
97
|
background-color: #fff;
|
|
58
|
-
box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
|
|
59
|
-
margin-left: auto;
|
|
60
|
-
margin-right: auto;
|
|
61
|
-
margin-top: clamp(40px, 15vh, 15vh);
|
|
62
|
-
max-width: 640px;
|
|
63
98
|
opacity: 1;
|
|
99
|
+
box-shadow: 0 8px 24px 0 rgba(25, 25, 25, 0.4);
|
|
100
|
+
animation: 1s ease-out 0s 1 slideInFromTop;
|
|
64
101
|
}
|
|
65
102
|
.dso-modal .dso-header {
|
|
66
|
-
border-bottom: 1px solid #ccc;
|
|
67
|
-
padding: 16px;
|
|
68
103
|
position: relative;
|
|
104
|
+
padding: 16px;
|
|
105
|
+
border-block-end: 1px solid #ccc;
|
|
69
106
|
}
|
|
70
107
|
.dso-modal .dso-header h2 {
|
|
71
|
-
|
|
108
|
+
max-inline-size: calc(100% - 24px);
|
|
72
109
|
margin: 0;
|
|
73
|
-
|
|
110
|
+
color: #275937;
|
|
74
111
|
}
|
|
75
112
|
.dso-modal .dso-header .dso-close {
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset-block-start: 16px;
|
|
115
|
+
inset-inline-end: 13px;
|
|
116
|
+
block-size: 32px;
|
|
117
|
+
inline-size: 32px;
|
|
118
|
+
padding: 0;
|
|
76
119
|
background-color: transparent;
|
|
77
120
|
border: 0;
|
|
78
|
-
height: 32px;
|
|
79
|
-
padding: 0;
|
|
80
|
-
position: absolute;
|
|
81
|
-
right: 13px;
|
|
82
121
|
text-align: center;
|
|
83
|
-
top: 16px;
|
|
84
|
-
width: 32px;
|
|
85
122
|
}
|
|
86
123
|
.dso-modal > .dso-dialog > .dso-body {
|
|
87
|
-
|
|
88
|
-
max-
|
|
89
|
-
min-
|
|
124
|
+
block-size: calc(100% - 96px - 1.5rem);
|
|
125
|
+
max-block-size: calc(70vh - 144px - 1.5em);
|
|
126
|
+
min-block-size: 1.5rem;
|
|
90
127
|
overflow-x: auto;
|
|
91
128
|
padding: 32px;
|
|
92
129
|
}
|
|
@@ -116,9 +153,9 @@ button::-moz-focus-inner {
|
|
|
116
153
|
max-width: 100%;
|
|
117
154
|
}
|
|
118
155
|
.dso-modal > .dso-dialog > dso-scrollable {
|
|
119
|
-
|
|
120
|
-
max-
|
|
121
|
-
min-
|
|
156
|
+
block-size: calc(100% - 96px - 1.5rem);
|
|
157
|
+
max-block-size: calc(70vh - 144px - 1.5em);
|
|
158
|
+
min-block-size: 6.5rem;
|
|
122
159
|
}
|
|
123
160
|
.dso-modal > .dso-dialog > dso-scrollable .dso-body {
|
|
124
161
|
padding: 32px;
|
|
@@ -148,21 +185,24 @@ button::-moz-focus-inner {
|
|
|
148
185
|
height: auto;
|
|
149
186
|
max-width: 100%;
|
|
150
187
|
}
|
|
188
|
+
.dso-modal .dso-body:focus-visible {
|
|
189
|
+
outline: none;
|
|
190
|
+
}
|
|
151
191
|
.dso-modal .dso-footer {
|
|
152
|
-
min-
|
|
192
|
+
min-block-size: 80px;
|
|
153
193
|
padding: 16px 32px;
|
|
154
|
-
text-align:
|
|
194
|
+
text-align: end;
|
|
155
195
|
}
|
|
156
196
|
@media screen and (max-width: 767px) {
|
|
157
197
|
.dso-modal .dso-footer .dso-primary + .dso-primary, .dso-modal .dso-footer .dso-primary + .dso-secondary, .dso-modal .dso-footer .dso-primary + .dso-tertiary, .dso-modal .dso-footer .dso-secondary + .dso-primary, .dso-modal .dso-footer .dso-secondary + .dso-secondary, .dso-modal .dso-footer .dso-secondary + .dso-tertiary, .dso-modal .dso-footer .dso-tertiary + .dso-primary, .dso-modal .dso-footer .dso-tertiary + .dso-secondary, .dso-modal .dso-footer .dso-tertiary + .dso-tertiary {
|
|
158
|
-
margin-
|
|
198
|
+
margin-inline-start: 0;
|
|
159
199
|
}
|
|
160
200
|
.dso-modal .dso-footer button {
|
|
201
|
+
inline-size: 100%;
|
|
161
202
|
text-align: center;
|
|
162
|
-
width: 100%;
|
|
163
203
|
}
|
|
164
204
|
.dso-modal .dso-footer button + button {
|
|
165
|
-
margin-
|
|
205
|
+
margin-block-start: 8px;
|
|
166
206
|
}
|
|
167
207
|
.dso-modal .dso-footer button.dso-tertiary,
|
|
168
208
|
.dso-modal .dso-footer button.dso-tertiary span {
|
|
@@ -171,26 +211,26 @@ button::-moz-focus-inner {
|
|
|
171
211
|
}
|
|
172
212
|
@media screen and (min-width: 768px) {
|
|
173
213
|
.dso-modal .dso-footer .dso-primary + .dso-secondary, .dso-modal .dso-footer .dso-secondary + .dso-secondary, .dso-modal .dso-footer .dso-tertiary + .dso-secondary {
|
|
174
|
-
margin-
|
|
214
|
+
margin-inline-start: 16px;
|
|
175
215
|
}
|
|
176
216
|
.dso-modal .dso-footer .dso-primary + .dso-tertiary, .dso-modal .dso-footer .dso-secondary + .dso-tertiary, .dso-modal .dso-footer .dso-tertiary + .dso-tertiary {
|
|
177
|
-
margin-
|
|
217
|
+
margin-inline-start: 0;
|
|
178
218
|
}
|
|
179
219
|
}
|
|
180
220
|
@media screen and (max-width: 767px) {
|
|
181
221
|
.dso-modal .dso-dialog {
|
|
182
|
-
max-
|
|
183
|
-
margin-
|
|
222
|
+
max-inline-size: 100%;
|
|
223
|
+
margin-block-start: 0;
|
|
184
224
|
}
|
|
185
225
|
.dso-modal .dso-footer .dso-primary + .dso-primary, .dso-modal .dso-footer .dso-primary + .dso-secondary, .dso-modal .dso-footer .dso-primary + .dso-tertiary, .dso-modal .dso-footer .dso-secondary + .dso-primary, .dso-modal .dso-footer .dso-secondary + .dso-secondary, .dso-modal .dso-footer .dso-secondary + .dso-tertiary, .dso-modal .dso-footer .dso-tertiary + .dso-primary, .dso-modal .dso-footer .dso-tertiary + .dso-secondary, .dso-modal .dso-footer .dso-tertiary + .dso-tertiary {
|
|
186
|
-
margin-
|
|
226
|
+
margin-inline-start: 0;
|
|
187
227
|
}
|
|
188
228
|
.dso-modal .dso-footer button {
|
|
229
|
+
inline-size: 100%;
|
|
189
230
|
text-align: center;
|
|
190
|
-
width: 100%;
|
|
191
231
|
}
|
|
192
232
|
.dso-modal .dso-footer button + button {
|
|
193
|
-
margin-
|
|
233
|
+
margin-block-start: 8px;
|
|
194
234
|
}
|
|
195
235
|
.dso-modal .dso-footer button.dso-tertiary,
|
|
196
236
|
.dso-modal .dso-footer button.dso-tertiary span {
|
|
@@ -199,37 +239,26 @@ button::-moz-focus-inner {
|
|
|
199
239
|
}
|
|
200
240
|
@media screen and (max-height: 380px) {
|
|
201
241
|
.dso-modal .dso-dialog {
|
|
202
|
-
|
|
203
|
-
margin-
|
|
204
|
-
|
|
242
|
+
min-block-size: 216px;
|
|
243
|
+
margin-block-start: 8px;
|
|
244
|
+
margin-block-end: 8px;
|
|
205
245
|
}
|
|
206
246
|
.dso-modal .dso-header {
|
|
207
247
|
padding: 8px 16px;
|
|
208
248
|
}
|
|
209
249
|
.dso-modal .dso-header .dso-close {
|
|
210
|
-
|
|
250
|
+
inset-block-start: 8px;
|
|
211
251
|
}
|
|
212
252
|
.dso-modal .dso-body {
|
|
213
253
|
padding: 16px 24px;
|
|
214
254
|
}
|
|
215
255
|
.dso-modal .dso-footer {
|
|
216
|
-
min-
|
|
256
|
+
min-block-size: auto;
|
|
217
257
|
overflow: auto;
|
|
218
258
|
padding: 8px 32px;
|
|
219
259
|
}
|
|
220
260
|
}
|
|
221
261
|
|
|
222
|
-
.dso-modal-overlay {
|
|
223
|
-
background-color: rgba(255, 255, 255, 0.8);
|
|
224
|
-
bottom: 0;
|
|
225
|
-
display: block;
|
|
226
|
-
left: 0;
|
|
227
|
-
position: fixed;
|
|
228
|
-
right: 0;
|
|
229
|
-
top: 0;
|
|
230
|
-
z-index: 529;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
262
|
.dso-close dso-icon {
|
|
234
263
|
color: #39870c;
|
|
235
264
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.interfaces.js","sourceRoot":"","sources":["../../../src/components/modal/modal.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface
|
|
1
|
+
{"version":3,"file":"modal.interfaces.js","sourceRoot":"","sources":["../../../src/components/modal/modal.interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface ModalCloseEvent {\r\n originalEvent?: MouseEvent | Event;\r\n}\r\n\r\nexport type ModalRole = \"dialog\" | \"alert\" | \"alertdialog\";\r\n\r\nexport type AllowedModalContentTypes = HTMLElement | DocumentFragment | string;\r\n"]}
|
|
@@ -1,64 +1,33 @@
|
|
|
1
|
-
import { h
|
|
2
|
-
import { createFocusTrap } from "focus-trap";
|
|
1
|
+
import { h } from "@stencil/core";
|
|
3
2
|
import { v4 } from "uuid";
|
|
4
3
|
export class Modal {
|
|
5
4
|
constructor() {
|
|
6
5
|
this.ariaId = v4();
|
|
7
6
|
this.hasFooter = undefined;
|
|
7
|
+
this.fullscreen = undefined;
|
|
8
8
|
this.modalTitle = undefined;
|
|
9
9
|
this.role = "dialog";
|
|
10
10
|
this.showCloseButton = true;
|
|
11
|
-
this.initialFocus = undefined;
|
|
12
|
-
this.returnFocus = undefined;
|
|
13
11
|
}
|
|
14
12
|
componentWillLoad() {
|
|
15
|
-
this.hasFooter = this.host.querySelector("
|
|
13
|
+
this.hasFooter = this.host.querySelector("[slot='footer']") !== null;
|
|
16
14
|
}
|
|
17
15
|
componentDidLoad() {
|
|
18
|
-
|
|
16
|
+
var _a;
|
|
17
|
+
(_a = this.htmlDialogElement) === null || _a === void 0 ? void 0 : _a.showModal();
|
|
18
|
+
document.body.classList.add("dso-modal-open");
|
|
19
19
|
}
|
|
20
20
|
disconnectedCallback() {
|
|
21
21
|
var _a;
|
|
22
|
-
|
|
22
|
+
document.body.classList.remove("dso-modal-open");
|
|
23
|
+
(_a = this.htmlDialogElement) === null || _a === void 0 ? void 0 : _a.close();
|
|
23
24
|
}
|
|
24
25
|
render() {
|
|
25
26
|
var _a;
|
|
26
|
-
return (h(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.trap = createFocusTrap(this.dialogElement, {
|
|
31
|
-
initialFocus: () => {
|
|
32
|
-
var _a, _b, _c;
|
|
33
|
-
if (this.initialFocus) {
|
|
34
|
-
const initialFocusElement = this.host.querySelector(this.initialFocus);
|
|
35
|
-
if (!initialFocusElement) {
|
|
36
|
-
console.warn(`element '${this.initialFocus}' could not be found`);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return initialFocusElement;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return ((_c = (_a = this.host.querySelector("div[slot='footer'] .dso-primary")) !== null && _a !== void 0 ? _a : (_b = this.modalElement) === null || _b === void 0 ? void 0 : _b.querySelector(".dso-close")) !== null && _c !== void 0 ? _c : false);
|
|
43
|
-
},
|
|
44
|
-
allowOutsideClick: true,
|
|
45
|
-
setReturnFocus: (e) => { var _a, _b; return (_b = (_a = this.returnFocus) === null || _a === void 0 ? void 0 : _a.call(this, e)) !== null && _b !== void 0 ? _b : e; },
|
|
46
|
-
escapeDeactivates: true,
|
|
47
|
-
tabbableOptions: {
|
|
48
|
-
getShadowRoot: true,
|
|
49
|
-
},
|
|
50
|
-
clickOutsideDeactivates: (e) => {
|
|
51
|
-
if (e instanceof MouseEvent && e.composedPath()[0] === this.modalElement) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
return false;
|
|
55
|
-
},
|
|
56
|
-
onDeactivate: () => {
|
|
57
|
-
delete this.trap;
|
|
58
|
-
this.dsoClose.emit({ originalEvent: undefined });
|
|
59
|
-
},
|
|
60
|
-
}).activate();
|
|
61
|
-
}
|
|
27
|
+
return (h("dialog", { class: "dso-modal", role: (_a = this.role) !== null && _a !== void 0 ? _a : undefined, "aria-modal": "true", "aria-labelledby": this.ariaId, ref: (element) => (this.htmlDialogElement = element), onCancel: (e) => {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
this.dsoClose.emit({ originalEvent: e });
|
|
30
|
+
} }, h("div", { class: "dso-dialog", role: "document" }, this.modalTitle ? (h("div", { class: "dso-header" }, h("h2", { id: this.ariaId }, this.modalTitle), this.showCloseButton && (h("button", { type: "button", class: "dso-close", onClick: (e) => this.dsoClose.emit({ originalEvent: e }) }, h("dso-icon", { icon: "times" }), h("span", { class: "sr-only" }, "Sluiten"))))) : (h("span", { class: "sr-only", id: this.ariaId }, "Dialoog")), h("dso-scrollable", null, h("div", { class: "dso-body", tabIndex: 0 }, h("slot", { name: "body" }))), this.hasFooter && (h("div", { class: "dso-footer" }, h("slot", { name: "footer" }))))));
|
|
62
31
|
}
|
|
63
32
|
static get is() { return "dso-modal"; }
|
|
64
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -74,6 +43,23 @@ export class Modal {
|
|
|
74
43
|
}
|
|
75
44
|
static get properties() {
|
|
76
45
|
return {
|
|
46
|
+
"fullscreen": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "boolean",
|
|
51
|
+
"resolved": "boolean | undefined",
|
|
52
|
+
"references": {}
|
|
53
|
+
},
|
|
54
|
+
"required": false,
|
|
55
|
+
"optional": true,
|
|
56
|
+
"docs": {
|
|
57
|
+
"tags": [],
|
|
58
|
+
"text": "when set the modal will be shown in fullscreen."
|
|
59
|
+
},
|
|
60
|
+
"attribute": "fullscreen",
|
|
61
|
+
"reflect": true
|
|
62
|
+
},
|
|
77
63
|
"modalTitle": {
|
|
78
64
|
"type": "string",
|
|
79
65
|
"mutable": false,
|
|
@@ -121,54 +107,11 @@ export class Modal {
|
|
|
121
107
|
"optional": false,
|
|
122
108
|
"docs": {
|
|
123
109
|
"tags": [],
|
|
124
|
-
"text": "when `false` the close button in the header will not be rendered. Defaults to `true
|
|
110
|
+
"text": "when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n\r\nNeeds `modalTitle` to be set."
|
|
125
111
|
},
|
|
126
112
|
"attribute": "show-close-button",
|
|
127
113
|
"reflect": false,
|
|
128
114
|
"defaultValue": "true"
|
|
129
|
-
},
|
|
130
|
-
"initialFocus": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"mutable": false,
|
|
133
|
-
"complexType": {
|
|
134
|
-
"original": "string",
|
|
135
|
-
"resolved": "string | undefined",
|
|
136
|
-
"references": {}
|
|
137
|
-
},
|
|
138
|
-
"required": false,
|
|
139
|
-
"optional": true,
|
|
140
|
-
"docs": {
|
|
141
|
-
"tags": [],
|
|
142
|
-
"text": "Selector used to query the element which will be focused when the component instantiated. When undefined the modal focuses the first button.dso-primary in the modal footer. If no button can be found the close button is focused."
|
|
143
|
-
},
|
|
144
|
-
"attribute": "initial-focus",
|
|
145
|
-
"reflect": false
|
|
146
|
-
},
|
|
147
|
-
"returnFocus": {
|
|
148
|
-
"type": "unknown",
|
|
149
|
-
"mutable": false,
|
|
150
|
-
"complexType": {
|
|
151
|
-
"original": "(nodeFocusedBeforeActivation: HTMLElement | SVGElement) => FocusTargetValueOrFalse",
|
|
152
|
-
"resolved": "((nodeFocusedBeforeActivation: HTMLElement | SVGElement) => FocusTargetValueOrFalse) | undefined",
|
|
153
|
-
"references": {
|
|
154
|
-
"HTMLElement": {
|
|
155
|
-
"location": "global"
|
|
156
|
-
},
|
|
157
|
-
"SVGElement": {
|
|
158
|
-
"location": "global"
|
|
159
|
-
},
|
|
160
|
-
"FocusTargetValueOrFalse": {
|
|
161
|
-
"location": "import",
|
|
162
|
-
"path": "focus-trap"
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"required": false,
|
|
167
|
-
"optional": true,
|
|
168
|
-
"docs": {
|
|
169
|
-
"tags": [],
|
|
170
|
-
"text": "Function that returns the element to focus on Modal close. Return `false` for no focus restore."
|
|
171
|
-
}
|
|
172
115
|
}
|
|
173
116
|
};
|
|
174
117
|
}
|
|
@@ -190,10 +133,10 @@ export class Modal {
|
|
|
190
133
|
"text": "Emitted when the user wants to close the Modal."
|
|
191
134
|
},
|
|
192
135
|
"complexType": {
|
|
193
|
-
"original": "
|
|
194
|
-
"resolved": "
|
|
136
|
+
"original": "ModalCloseEvent",
|
|
137
|
+
"resolved": "ModalCloseEvent",
|
|
195
138
|
"references": {
|
|
196
|
-
"
|
|
139
|
+
"ModalCloseEvent": {
|
|
197
140
|
"location": "import",
|
|
198
141
|
"path": "./modal.interfaces"
|
|
199
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,
|
|
1
|
+
{"version":3,"file":"modal.js","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,SAAS,EAAsB,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAS1B,MAAM,OAAO,KAAK;;kBAOP,EAAE,EAAE;;;;gBAqBS,QAAQ;2BAQZ,IAAI;;EAQtB,iBAAiB;IACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;EACvE,CAAC;EAED,gBAAgB;;IACd,MAAA,IAAI,CAAC,iBAAiB,0CAAE,SAAS,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;EAChD,CAAC;EAED,oBAAoB;;IAClB,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IACjD,MAAA,IAAI,CAAC,iBAAiB,0CAAE,KAAK,EAAE,CAAC;EAClC,CAAC;EAED,MAAM;;IACJ,OAAO,CACL,cACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,SAAS,gBACjB,MAAM,qBACA,IAAI,CAAC,MAAM,EAC5B,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,EACpD,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;QACd,CAAC,CAAC,cAAc,EAAE,CAAC;QAEnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;MAC3C,CAAC;MAED,WAAK,KAAK,EAAC,YAAY,EAAC,IAAI,EAAC,UAAU;QACpC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CACjB,WAAK,KAAK,EAAC,YAAY;UACrB,UAAI,EAAE,EAAE,IAAI,CAAC,MAAM,IAAG,IAAI,CAAC,UAAU,CAAM;UAC1C,IAAI,CAAC,eAAe,IAAI,CACvB,cAAQ,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;YAC9F,gBAAU,IAAI,EAAC,OAAO,GAAY;YAClC,YAAM,KAAK,EAAC,SAAS,cAAe,CAC7B,CACV,CACG,CACP,CAAC,CAAC,CAAC,CACF,YAAM,KAAK,EAAC,SAAS,EAAC,EAAE,EAAE,IAAI,CAAC,MAAM,cAE9B,CACR;QAED;UACE,WAAK,KAAK,EAAC,UAAU,EAAC,QAAQ,EAAE,CAAC;YAC/B,YAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACS;QAEhB,IAAI,CAAC,SAAS,IAAI,CACjB,WAAK,KAAK,EAAC,YAAY;UACrB,YAAM,IAAI,EAAC,QAAQ,GAAG,CAClB,CACP,CACG,CACC,CACV,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { h, Component, ComponentInterface, Element, Event, EventEmitter, Prop, State } from \"@stencil/core\";\r\nimport { v4 } from \"uuid\";\r\n\r\nimport { ModalCloseEvent } from \"./modal.interfaces\";\r\n\r\n@Component({\r\n tag: \"dso-modal\",\r\n styleUrl: \"modal.scss\",\r\n shadow: true,\r\n})\r\nexport class Modal implements ComponentInterface {\r\n private htmlDialogElement?: HTMLDialogElement;\r\n\r\n @Element()\r\n host!: HTMLDsoModalElement;\r\n\r\n @State()\r\n ariaId = v4();\r\n\r\n @State()\r\n hasFooter?: boolean;\r\n\r\n /**\r\n * when set the modal will be shown in fullscreen.\r\n */\r\n @Prop({ reflect: true })\r\n fullscreen?: boolean;\r\n\r\n /**\r\n * The title of the Modal.\r\n */\r\n @Prop()\r\n modalTitle?: string;\r\n\r\n /**\r\n * the role for the modal `dialog` | `alert` | `alertdialog`.\r\n */\r\n @Prop()\r\n role: string | null = \"dialog\";\r\n\r\n /**\r\n * when `false` the close button in the header will not be rendered. Defaults to `true`.\r\n *\r\n * Needs `modalTitle` to be set.\r\n */\r\n @Prop()\r\n showCloseButton = true;\r\n\r\n /**\r\n * Emitted when the user wants to close the Modal.\r\n */\r\n @Event()\r\n dsoClose!: EventEmitter<ModalCloseEvent>;\r\n\r\n componentWillLoad(): void {\r\n this.hasFooter = this.host.querySelector(\"[slot='footer']\") !== null;\r\n }\r\n\r\n componentDidLoad(): void {\r\n this.htmlDialogElement?.showModal();\r\n document.body.classList.add(\"dso-modal-open\");\r\n }\r\n\r\n disconnectedCallback(): void {\r\n document.body.classList.remove(\"dso-modal-open\");\r\n this.htmlDialogElement?.close();\r\n }\r\n\r\n render() {\r\n return (\r\n <dialog\r\n class=\"dso-modal\"\r\n role={this.role ?? undefined}\r\n aria-modal=\"true\"\r\n aria-labelledby={this.ariaId}\r\n ref={(element) => (this.htmlDialogElement = element)}\r\n onCancel={(e) => {\r\n e.preventDefault();\r\n\r\n this.dsoClose.emit({ originalEvent: e });\r\n }}\r\n >\r\n <div class=\"dso-dialog\" role=\"document\">\r\n {this.modalTitle ? (\r\n <div class=\"dso-header\">\r\n <h2 id={this.ariaId}>{this.modalTitle}</h2>\r\n {this.showCloseButton && (\r\n <button type=\"button\" class=\"dso-close\" onClick={(e) => this.dsoClose.emit({ originalEvent: e })}>\r\n <dso-icon icon=\"times\"></dso-icon>\r\n <span class=\"sr-only\">Sluiten</span>\r\n </button>\r\n )}\r\n </div>\r\n ) : (\r\n <span class=\"sr-only\" id={this.ariaId}>\r\n Dialoog\r\n </span>\r\n )}\r\n\r\n <dso-scrollable>\r\n <div class=\"dso-body\" tabIndex={0}>\r\n <slot name=\"body\" />\r\n </div>\r\n </dso-scrollable>\r\n\r\n {this.hasFooter && (\r\n <div class=\"dso-footer\">\r\n <slot name=\"footer\" />\r\n </div>\r\n )}\r\n </div>\r\n </dialog>\r\n );\r\n }\r\n}\r\n"]}
|