@dso-toolkit/core 33.2.0 → 33.3.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-autosuggest.cjs.entry.js +2 -70
- package/dist/cjs/dso-date-picker.cjs.entry.js +2 -3
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +15 -4
- package/dist/cjs/dso-header.cjs.entry.js +101 -0
- package/dist/cjs/dso-info-button.cjs.entry.js +1 -1
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +3 -4
- package/dist/cjs/dso-map-controls.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-overlays.cjs.entry.js +5 -8
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +168 -75
- package/dist/cjs/index-794ad37a.js +72 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/date-picker/date-picker.js +2 -3
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +15 -4
- package/dist/collection/components/header/header.css +439 -0
- package/dist/collection/components/header/header.js +294 -0
- package/dist/collection/components/header/header.template.js +32 -0
- package/dist/collection/components/info-button/info-button.css +1 -0
- package/dist/collection/components/map-base-layers/map-base-layers.js +6 -27
- package/dist/collection/components/map-controls/map-controls.css +18 -8
- package/dist/collection/components/map-controls/map-controls.js +10 -11
- package/dist/collection/components/map-controls/map-controls.template.js +5 -8
- package/dist/collection/components/map-overlays/map-overlays.js +9 -35
- package/dist/collection/components/tooltip/tooltip.css +34 -12
- package/dist/collection/components/tooltip/tooltip.js +19 -4
- package/dist/collection/components/tooltip/tooltip.template.js +3 -5
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +296 -102
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-1805f5b0.js +1 -0
- package/dist/dso-toolkit/p-22bc904d.entry.js +1 -0
- package/dist/dso-toolkit/{p-5665f1ee.entry.js → p-4a78a31b.entry.js} +1 -1
- package/dist/dso-toolkit/p-72e4484a.entry.js +1 -0
- package/dist/dso-toolkit/p-7a043467.entry.js +1 -0
- package/dist/dso-toolkit/p-99b93d2e.entry.js +5 -0
- package/dist/dso-toolkit/p-b3e6d377.entry.js +1 -0
- package/dist/dso-toolkit/p-da3be034.entry.js +1 -0
- package/dist/dso-toolkit/p-ec8b74f7.entry.js +1 -0
- package/dist/dso-toolkit/p-ff767c21.entry.js +1 -0
- package/dist/esm/dso-autosuggest.entry.js +1 -69
- package/dist/esm/dso-date-picker.entry.js +2 -3
- package/dist/esm/dso-dropdown-menu.entry.js +15 -4
- package/dist/esm/dso-header.entry.js +97 -0
- package/dist/esm/dso-info-button.entry.js +1 -1
- package/dist/esm/dso-map-base-layers.entry.js +3 -4
- package/dist/esm/dso-map-controls.entry.js +2 -2
- package/dist/esm/dso-map-overlays.entry.js +5 -8
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +168 -75
- package/dist/esm/index-f2bf58ce.js +70 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +36 -0
- package/dist/types/components/header/header.template.d.ts +2 -0
- package/dist/types/components/map-base-layers/map-base-layers.d.ts +3 -4
- package/dist/types/components/map-base-layers/map-base-layers.interfaces.d.ts +5 -1
- package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
- package/dist/types/components/map-overlays/map-overlays.d.ts +4 -4
- package/dist/types/components/map-overlays/map-overlays.interfaces.d.ts +6 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +34 -8
- package/package.json +3 -2
- package/dist/dso-toolkit/p-08427682.entry.js +0 -1
- package/dist/dso-toolkit/p-731a9631.entry.js +0 -1
- package/dist/dso-toolkit/p-741e96de.entry.js +0 -5
- package/dist/dso-toolkit/p-759920d0.entry.js +0 -1
- package/dist/dso-toolkit/p-e4269e02.entry.js +0 -1
- package/dist/dso-toolkit/p-e7700d9e.entry.js +0 -1
- package/dist/dso-toolkit/p-fd5e24c9.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-61410be2.js';
|
|
2
2
|
import { c as clsx } from './clsx.m-071989db.js';
|
|
3
3
|
|
|
4
|
-
const infoButtonCss = ":host{display:inline-block;--di-info:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-secondary:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active-secondary:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}button{background:var(--dso-icon, var(--di-info)) no-repeat;background-position:center;background-size:cover;height:24px;vertical-align:top;width:24px;border:1px solid transparent;margin-left:8px;padding:0}button.dso-open,button:hover,button:active{--dso-icon:var(--di-info-active)}button.dso-info-secondary{--dso-icon:var(--di-info-secondary)}button.dso-info-secondary.dso-open,button.dso-info-secondary:hover,button.dso-info-secondary:active{--dso-icon:var(--di-info-active-secondary)}";
|
|
4
|
+
const infoButtonCss = ":host{display:inline-block;--di-info:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %2339870c%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-secondary:url(\"data:image/svg+xml,%3csvg id='info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M12%2c3a9%2c9%2c0%2c1%2c1-9%2c9%2c9%2c9%2c0%2c0%2c1%2c9-9m0-2A11%2c11%2c0%2c1%2c0%2c23%2c12%2c11%2c11%2c0%2c0%2c0%2c12%2c1Zm0%2c8a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\");--di-info-active-secondary:url(\"data:image/svg+xml,%3csvg id='info-active' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23666%3b'%3e %3cpath fill='currentColor' d='M23%2c12A11%2c11%2c0%2c1%2c1%2c12%2c1%2c11%2c11%2c0%2c0%2c1%2c23%2c12ZM12%2c9a1%2c1%2c0%2c1%2c0-1-1A1%2c1%2c0%2c0%2c0%2c12%2c9Zm1%2c7.79V11.21A1.12%2c1.12%2c0%2c0%2c0%2c12%2c10a1.12%2c1.12%2c0%2c0%2c0-1%2c1.21v5.58A1.12%2c1.12%2c0%2c0%2c0%2c12%2c18%2c1.12%2c1.12%2c0%2c0%2c0%2c13%2c16.79Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}button{background:var(--dso-icon, var(--di-info)) no-repeat;background-position:center;background-size:cover;height:24px;vertical-align:top;width:24px;border:1px solid transparent;margin-left:8px;padding:0;cursor:pointer}button.dso-open,button:hover,button:active{--dso-icon:var(--di-info-active)}button.dso-info-secondary{--dso-icon:var(--di-info-secondary)}button.dso-info-secondary.dso-open,button.dso-info-secondary:hover,button.dso-info-secondary:active{--dso-icon:var(--di-info-active-secondary)}";
|
|
5
5
|
|
|
6
6
|
let InfoButton = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -7,12 +7,11 @@ let MapBaseLayers = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.baseLayerChange = createEvent(this, "baseLayerChange", 7);
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
this.
|
|
12
|
-
this.baseLayerChange.emit(baseLayer);
|
|
10
|
+
baseLayerChangeHandler(baseLayer) {
|
|
11
|
+
this.baseLayerChange.emit({ activeBaseLayer: baseLayer });
|
|
13
12
|
}
|
|
14
13
|
render() {
|
|
15
|
-
return (h("fieldset", { class: "form-group dso-radios" }, h("legend", { class: "sr-only" }, "Achtergrond"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Achtergrond")), h("div", { class: "dso-field-container" }, this.baseLayers.map(
|
|
14
|
+
return (h("fieldset", { class: "form-group dso-radios" }, h("legend", { class: "sr-only" }, "Achtergrond"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Achtergrond")), h("div", { class: "dso-field-container" }, this.baseLayers.map(baseLayer => (h("dso-selectable", { key: baseLayer.id, type: "radio", value: baseLayer.name, checked: baseLayer.checked, onDsoChange: () => this.baseLayerChangeHandler(baseLayer) }, baseLayer.name))))));
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
17
|
MapBaseLayers.style = mapBaseLayersCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-61410be2.js';
|
|
2
2
|
|
|
3
|
-
const mapControlsCss = "button{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}button[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}:host{background-color:#fff;border:1px solid #ccc;bottom:0;display:block;font-family:Asap, sans-serif;position:absolute;top:0;left:100%;transition:transform 300ms ease;width:300px}*,*::after,*::before{box-sizing:border-box}:host([open]){box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.3);transform:translateX(-100%)}:host([open]) #toggle-visibility-button{display:none}#
|
|
3
|
+
const mapControlsCss = "button{-webkit-appearance:button;color:inherit;cursor:pointer;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}button[disabled]{cursor:default}button::-moz-focus-inner{border:0;padding:0}:host{background-color:#fff;border:1px solid #ccc;bottom:0;display:block;font-family:Asap, sans-serif;position:absolute;top:0;left:100%;transition:transform 300ms ease;width:300px}*,*::after,*::before{box-sizing:border-box}:host([open]){box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.3);transform:translateX(-100%)}:host([open]) #toggle-visibility-button{display:none}#toggle-visibility-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.5);font-weight:600;margin-right:16px;padding:8px 16px;white-space:nowrap;position:absolute;right:calc(100% + 56px);top:16px}#toggle-visibility-button:focus,#toggle-visibility-button:focus-visible{outline-offset:2px}#toggle-visibility-button:active{outline:0}#toggle-visibility-button.extern::after,#toggle-visibility-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}#toggle-visibility-button:hover{background-color:#39870c;border-color:#39870c;color:#fff}#toggle-visibility-button:active{background-color:#275937;border-color:#275937;color:#fff}#toggle-visibility-button[disabled],#toggle-visibility-button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}#toggle-visibility-button.btn-sm{line-height:16px}#toggle-visibility-button.btn-sm dso-icon,#toggle-visibility-button.btn-sm svg.di,#toggle-visibility-button.btn-sm.extern::after,#toggle-visibility-button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}#toggle-visibility-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#toggle-visibility-button.download:hover::after{--dso-icon:var(--di-download-wit)}#toggle-visibility-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}#toggle-visibility-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#toggle-visibility-button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}#toggle-visibility-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}#toggle-visibility-button dso-icon,#toggle-visibility-button svg.di{margin-left:-8px;margin-right:8px}#toggle-visibility-button span+dso-icon,#toggle-visibility-button span+svg.di{margin-left:8px;margin-right:-8px}#toggle-visibility-button:focus-visible{background-color:#39870c;border-color:#39870c;color:#fff;outline:none}#zoom-buttons{border-radius:4px;box-shadow:0 1px 4px 0 rgba(0, 0, 0, 0.5);display:flex;flex-wrap:wrap;flex:0 0;position:absolute;right:calc(100% + 16px);top:16px}#zoom-buttons button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;background-color:#fff;border-color:#39870c;color:#39870c;border-width:1px;border-style:solid;border-radius:4px;line-height:1.5;min-width:56px;padding:11px 15px;border:0;padding:8px;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;flex:0 0 100%;height:40px;min-width:auto;width:40px}#zoom-buttons button:focus,#zoom-buttons button:focus-visible{outline-offset:2px}#zoom-buttons button:active{outline:0}#zoom-buttons button.extern::after,#zoom-buttons button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}#zoom-buttons button:hover{background-color:#39870c;border-color:#39870c;color:#fff}#zoom-buttons button:active{background-color:#275937;border-color:#275937;color:#fff}#zoom-buttons button[disabled],#zoom-buttons button[disabled]:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d}#zoom-buttons button.btn-sm{line-height:16px}#zoom-buttons button.btn-sm dso-icon,#zoom-buttons button.btn-sm svg.di,#zoom-buttons button.btn-sm.extern::after,#zoom-buttons button.btn-sm.download::after{margin-bottom:-4px;margin-top:-4px}#zoom-buttons button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#zoom-buttons button.download:hover::after{--dso-icon:var(--di-download-wit)}#zoom-buttons button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}#zoom-buttons button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#zoom-buttons button.extern:hover::after{--dso-icon:var(--di-external-link-wit)}#zoom-buttons button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}#zoom-buttons button>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}#zoom-buttons button:focus-visible{background-color:#39870c;border-color:#39870c;color:#fff;outline:none}#zoom-buttons button+button{border-radius:0;border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-top:1px solid #ccc}#close-button{display:inline-block;font-size:1em;font-weight:500;margin-bottom:0;text-decoration:none;touch-action:manipulation;text-align:left;user-select:none;vertical-align:middle;border:0;color:#39870c;line-height:1;padding:0;background-color:transparent;padding:0;position:absolute;right:16px;top:16px}#close-button:focus,#close-button:focus-visible{outline-offset:2px}#close-button:active{outline:0}#close-button.extern::after,#close-button.download::after{content:\"\";display:inline-block;height:1.5em;margin-left:8px;vertical-align:top;width:1.5em}#close-button[disabled]{color:#afcf9d}#close-button:not([disabled]):hover{color:#676cb0;text-decoration:underline}#close-button:not([disabled]):active{color:#676cb0}#close-button.btn-align{line-height:calc(1.5em - 1px);padding:11px 0;position:relative}#close-button.extern::after,#close-button.download::after{position:relative;top:-2px}#close-button.download::after{background:var(--dso-icon, var(--di-download)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#close-button.download[disabled]::after{--dso-icon:var(--di-download-grasgroen-40)}#close-button.download:not([disabled]):hover::after,#close-button.download:not([disabled]):active::after{--dso-icon:var(--di-download-scampi)}#close-button.extern::after{background:var(--dso-icon, var(--di-external-link)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em}#close-button.extern[disabled]::after{--dso-icon:var(--di-external-link-grasgroen-40)}#close-button.extern:not([disabled]):hover::after,#close-button.extern:not([disabled]):active::after{--dso-icon:var(--di-external-link-scampi)}#close-button>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}header,.content{padding:16px}header{border-bottom:1px solid #ccc;position:relative}header h2{color:#275937;font-family:\"Asap\", sans-serif;line-height:1;margin:0}";
|
|
4
4
|
|
|
5
5
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
6
6
|
if (!privateMap.has(receiver)) {
|
|
@@ -40,7 +40,7 @@ let MapControls = class {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h(Host, null, h("
|
|
43
|
+
return (h(Host, null, h("button", { type: "button", id: "toggle-visibility-button", onClick: () => this.open = !this.open, ref: element => __classPrivateFieldSet(this, _toggleButtonElement, element) }, h("dso-icon", { icon: "layers" }), h("span", null, "Kaartlagen")), h("div", { id: "zoom-buttons" }, h("button", { type: "button", onClick: e => this.zoomIn.emit(e), disabled: this.disableZoom === 'in' || this.disableZoom === 'both' }, h("span", null, "Zoom in"), h("dso-icon", { icon: "plus" })), h("button", { type: "button", onClick: e => this.zoomOut.emit(e), disabled: this.disableZoom === 'out' || this.disableZoom === 'both' }, h("span", null, "Zoom uit"), h("dso-icon", { icon: "minus" }))), h("section", { hidden: this.hideContent }, h("header", null, h("h2", null, "Kaartlagen"), h("button", { type: "button", id: "close-button", onClick: () => this.open = false, ref: element => __classPrivateFieldSet(this, _closeButtonElement, element) }, h("span", null, "Sluit dialoog"), h("dso-icon", { icon: "times" }))), h("div", { class: "content" }, h("slot", null)))));
|
|
44
44
|
}
|
|
45
45
|
static get watchers() { return {
|
|
46
46
|
"open": ["watchOpen"]
|
|
@@ -5,17 +5,14 @@ const mapOverlaysCss = ":host{display:block}*,*::after,*::before{box-sizing:bord
|
|
|
5
5
|
let MapOverlays = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
-
this.
|
|
9
|
-
this.checkedOverlays = [];
|
|
8
|
+
this.toggleOverlay = createEvent(this, "toggleOverlay", 7);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
: this.checkedOverlays.filter(o => o !== overlay);
|
|
15
|
-
this.checkedOverlaysChange.emit(this.checkedOverlays);
|
|
10
|
+
overlayChangeHandler(overlay, e) {
|
|
11
|
+
const checked = e.detail.target instanceof HTMLInputElement ? !!e.detail.target.checked : false;
|
|
12
|
+
this.toggleOverlay.emit({ overlay, checked });
|
|
16
13
|
}
|
|
17
14
|
render() {
|
|
18
|
-
return (h("fieldset", { class: "form-group dso-checkboxes" }, h("legend", { class: "sr-only" }, "Kaartlagen"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Kaartlagen")), h("div", { class: "dso-field-container" }, this.overlays.map(overlay => (h("dso-selectable", { type: "checkbox", value: overlay.name, checked:
|
|
15
|
+
return (h("fieldset", { class: "form-group dso-checkboxes" }, h("legend", { class: "sr-only" }, "Kaartlagen"), h("div", { class: "dso-label-container" }, h("span", { class: "control-label", "aria-hidden": "true" }, "Kaartlagen")), h("div", { class: "dso-field-container" }, this.overlays.map(overlay => (h("dso-selectable", { type: "checkbox", value: overlay.name, checked: overlay.checked, disabled: overlay.disabled, onDsoChange: e => this.overlayChangeHandler(overlay, e) }, overlay.name))))));
|
|
19
16
|
}
|
|
20
17
|
};
|
|
21
18
|
MapOverlays.style = mapOverlaysCss;
|
package/dist/esm/dso-toolkit.js
CHANGED
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16]
|
|
16
|
+
return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16]}]]],["dso-header",[[1,"dso-header",{"loginUrl":[1,"login-url"],"logoutUrl":[1,"logout-url"],"mainMenu":[16],"useDropDownMenu":[1,"use-drop-down-menu"],"isLoggedIn":[4,"is-logged-in"],"userProfileName":[1,"user-profile-name"],"userProfileUrl":[1,"user-profile-url"],"userHomeUrl":[1,"user-home-url"],"showDropDown":[32],"hasSubLogo":[32],"overflowMenuItems":[32]}]]],["dso-toggletip",[[1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]]],["dso-tree-view",[[1,"dso-tree-view",{"collection":[16]}]]],["dso-date-picker",[[2,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"dsoAutofocus":[4,"dso-autofocus"],"value":[1537],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-helpcenter-panel",[[1,"dso-helpcenter-panel",{"label":[1],"url":[1],"visibility":[32],"isOpen":[32],"slideState":[32],"loadIframe":[32]}]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-info-button",[[1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]]],["dso-info_2",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]]], options);
|
|
17
17
|
});
|
|
@@ -157,29 +157,32 @@ function getBasePlacement(placement) {
|
|
|
157
157
|
return placement.split('-')[0];
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
var max = Math.max;
|
|
161
|
+
var min = Math.min;
|
|
162
|
+
var round = Math.round;
|
|
163
|
+
|
|
164
|
+
function getBoundingClientRect(element, includeScale) {
|
|
165
|
+
if (includeScale === void 0) {
|
|
166
|
+
includeScale = false;
|
|
167
|
+
}
|
|
163
168
|
|
|
164
169
|
var rect = element.getBoundingClientRect();
|
|
165
170
|
var scaleX = 1;
|
|
166
|
-
var scaleY = 1;
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
// }
|
|
182
|
-
// }
|
|
171
|
+
var scaleY = 1;
|
|
172
|
+
|
|
173
|
+
if (isHTMLElement(element) && includeScale) {
|
|
174
|
+
var offsetHeight = element.offsetHeight;
|
|
175
|
+
var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
176
|
+
// Fallback to 1 in case both values are `0`
|
|
177
|
+
|
|
178
|
+
if (offsetWidth > 0) {
|
|
179
|
+
scaleX = round(rect.width) / offsetWidth || 1;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (offsetHeight > 0) {
|
|
183
|
+
scaleY = round(rect.height) / offsetHeight || 1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
183
186
|
|
|
184
187
|
return {
|
|
185
188
|
width: rect.width / scaleX,
|
|
@@ -334,13 +337,13 @@ function getMainAxisFromPlacement(placement) {
|
|
|
334
337
|
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
335
338
|
}
|
|
336
339
|
|
|
337
|
-
var max = Math.max;
|
|
338
|
-
var min = Math.min;
|
|
339
|
-
var round = Math.round;
|
|
340
|
-
|
|
341
340
|
function within(min$1, value, max$1) {
|
|
342
341
|
return max(min$1, min(value, max$1));
|
|
343
342
|
}
|
|
343
|
+
function withinMaxClamp(min, value, max) {
|
|
344
|
+
var v = within(min, value, max);
|
|
345
|
+
return v > max ? max : v;
|
|
346
|
+
}
|
|
344
347
|
|
|
345
348
|
function getFreshSideObject() {
|
|
346
349
|
return {
|
|
@@ -463,8 +466,8 @@ function roundOffsetsByDPR(_ref) {
|
|
|
463
466
|
var win = window;
|
|
464
467
|
var dpr = win.devicePixelRatio || 1;
|
|
465
468
|
return {
|
|
466
|
-
x: round(
|
|
467
|
-
y: round(
|
|
469
|
+
x: round(x * dpr) / dpr || 0,
|
|
470
|
+
y: round(y * dpr) / dpr || 0
|
|
468
471
|
};
|
|
469
472
|
}
|
|
470
473
|
|
|
@@ -479,14 +482,23 @@ function mapToStyles(_ref2) {
|
|
|
479
482
|
position = _ref2.position,
|
|
480
483
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
481
484
|
adaptive = _ref2.adaptive,
|
|
482
|
-
roundOffsets = _ref2.roundOffsets
|
|
483
|
-
|
|
484
|
-
var
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
485
|
+
roundOffsets = _ref2.roundOffsets,
|
|
486
|
+
isFixed = _ref2.isFixed;
|
|
487
|
+
var _offsets$x = offsets.x,
|
|
488
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
489
|
+
_offsets$y = offsets.y,
|
|
490
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
491
|
+
|
|
492
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
493
|
+
x: x,
|
|
494
|
+
y: y
|
|
495
|
+
}) : {
|
|
496
|
+
x: x,
|
|
497
|
+
y: y
|
|
498
|
+
};
|
|
489
499
|
|
|
500
|
+
x = _ref3.x;
|
|
501
|
+
y = _ref3.y;
|
|
490
502
|
var hasX = offsets.hasOwnProperty('x');
|
|
491
503
|
var hasY = offsets.hasOwnProperty('y');
|
|
492
504
|
var sideX = left;
|
|
@@ -511,16 +523,18 @@ function mapToStyles(_ref2) {
|
|
|
511
523
|
offsetParent = offsetParent;
|
|
512
524
|
|
|
513
525
|
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
514
|
-
sideY = bottom;
|
|
515
|
-
|
|
516
|
-
|
|
526
|
+
sideY = bottom;
|
|
527
|
+
var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
528
|
+
offsetParent[heightProp];
|
|
529
|
+
y -= offsetY - popperRect.height;
|
|
517
530
|
y *= gpuAcceleration ? 1 : -1;
|
|
518
531
|
}
|
|
519
532
|
|
|
520
533
|
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
521
|
-
sideX = right;
|
|
522
|
-
|
|
523
|
-
|
|
534
|
+
sideX = right;
|
|
535
|
+
var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
536
|
+
offsetParent[widthProp];
|
|
537
|
+
x -= offsetX - popperRect.width;
|
|
524
538
|
x *= gpuAcceleration ? 1 : -1;
|
|
525
539
|
}
|
|
526
540
|
}
|
|
@@ -529,6 +543,17 @@ function mapToStyles(_ref2) {
|
|
|
529
543
|
position: position
|
|
530
544
|
}, adaptive && unsetSides);
|
|
531
545
|
|
|
546
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
547
|
+
x: x,
|
|
548
|
+
y: y
|
|
549
|
+
}) : {
|
|
550
|
+
x: x,
|
|
551
|
+
y: y
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
x = _ref4.x;
|
|
555
|
+
y = _ref4.y;
|
|
556
|
+
|
|
532
557
|
if (gpuAcceleration) {
|
|
533
558
|
var _Object$assign;
|
|
534
559
|
|
|
@@ -538,9 +563,9 @@ function mapToStyles(_ref2) {
|
|
|
538
563
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
539
564
|
}
|
|
540
565
|
|
|
541
|
-
function computeStyles(
|
|
542
|
-
var state =
|
|
543
|
-
options =
|
|
566
|
+
function computeStyles(_ref5) {
|
|
567
|
+
var state = _ref5.state,
|
|
568
|
+
options = _ref5.options;
|
|
544
569
|
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
545
570
|
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
546
571
|
_options$adaptive = options.adaptive,
|
|
@@ -553,7 +578,8 @@ function computeStyles(_ref4) {
|
|
|
553
578
|
variation: getVariation(state.placement),
|
|
554
579
|
popper: state.elements.popper,
|
|
555
580
|
popperRect: state.rects.popper,
|
|
556
|
-
gpuAcceleration: gpuAcceleration
|
|
581
|
+
gpuAcceleration: gpuAcceleration,
|
|
582
|
+
isFixed: state.options.strategy === 'fixed'
|
|
557
583
|
};
|
|
558
584
|
|
|
559
585
|
if (state.modifiersData.popperOffsets != null) {
|
|
@@ -811,7 +837,7 @@ function getInnerBoundingClientRect(element) {
|
|
|
811
837
|
}
|
|
812
838
|
|
|
813
839
|
function getClientRectFromMixedType(element, clippingParent) {
|
|
814
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) :
|
|
840
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
815
841
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
816
842
|
// clipping (or hiding) overflowing elements with a position different from
|
|
817
843
|
// `initial`
|
|
@@ -1324,6 +1350,14 @@ function preventOverflow(_ref) {
|
|
|
1324
1350
|
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
1325
1351
|
placement: state.placement
|
|
1326
1352
|
})) : tetherOffset;
|
|
1353
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
1354
|
+
mainAxis: tetherOffsetValue,
|
|
1355
|
+
altAxis: tetherOffsetValue
|
|
1356
|
+
} : Object.assign({
|
|
1357
|
+
mainAxis: 0,
|
|
1358
|
+
altAxis: 0
|
|
1359
|
+
}, tetherOffsetValue);
|
|
1360
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
1327
1361
|
var data = {
|
|
1328
1362
|
x: 0,
|
|
1329
1363
|
y: 0
|
|
@@ -1333,13 +1367,15 @@ function preventOverflow(_ref) {
|
|
|
1333
1367
|
return;
|
|
1334
1368
|
}
|
|
1335
1369
|
|
|
1336
|
-
if (checkMainAxis
|
|
1370
|
+
if (checkMainAxis) {
|
|
1371
|
+
var _offsetModifierState$;
|
|
1372
|
+
|
|
1337
1373
|
var mainSide = mainAxis === 'y' ? top : left;
|
|
1338
1374
|
var altSide = mainAxis === 'y' ? bottom : right;
|
|
1339
1375
|
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
1340
1376
|
var offset = popperOffsets[mainAxis];
|
|
1341
|
-
var min$1 =
|
|
1342
|
-
var max$1 =
|
|
1377
|
+
var min$1 = offset + overflow[mainSide];
|
|
1378
|
+
var max$1 = offset - overflow[altSide];
|
|
1343
1379
|
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
1344
1380
|
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
1345
1381
|
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
@@ -1359,36 +1395,45 @@ function preventOverflow(_ref) {
|
|
|
1359
1395
|
// width or height)
|
|
1360
1396
|
|
|
1361
1397
|
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
1362
|
-
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin -
|
|
1363
|
-
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax +
|
|
1398
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
1399
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
1364
1400
|
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
1365
1401
|
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
1366
|
-
var offsetModifierValue =
|
|
1367
|
-
var tetherMin =
|
|
1368
|
-
var tetherMax =
|
|
1402
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
1403
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
1404
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
1405
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
1406
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
1407
|
+
data[mainAxis] = preventedOffset - offset;
|
|
1408
|
+
}
|
|
1369
1409
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
popperOffsets[mainAxis] = preventedOffset;
|
|
1373
|
-
data[mainAxis] = preventedOffset - offset;
|
|
1374
|
-
}
|
|
1410
|
+
if (checkAltAxis) {
|
|
1411
|
+
var _offsetModifierState$2;
|
|
1375
1412
|
|
|
1376
|
-
|
|
1377
|
-
var _mainSide = mainAxis === 'x' ? top : left;
|
|
1413
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
1378
1414
|
|
|
1379
|
-
|
|
1415
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
1380
1416
|
|
|
1381
|
-
|
|
1417
|
+
var _offset = popperOffsets[altAxis];
|
|
1382
1418
|
|
|
1383
|
-
|
|
1419
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
1384
1420
|
|
|
1385
|
-
|
|
1421
|
+
var _min = _offset + overflow[_mainSide];
|
|
1386
1422
|
|
|
1387
|
-
|
|
1423
|
+
var _max = _offset - overflow[_altSide];
|
|
1388
1424
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1425
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
1426
|
+
|
|
1427
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
1428
|
+
|
|
1429
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
1430
|
+
|
|
1431
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
1432
|
+
|
|
1433
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
1434
|
+
|
|
1435
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
1436
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
1392
1437
|
}
|
|
1393
1438
|
|
|
1394
1439
|
state.modifiersData[name] = data;
|
|
@@ -1420,8 +1465,8 @@ function getNodeScroll(node) {
|
|
|
1420
1465
|
|
|
1421
1466
|
function isElementScaled(element) {
|
|
1422
1467
|
var rect = element.getBoundingClientRect();
|
|
1423
|
-
var scaleX = rect.width / element.offsetWidth || 1;
|
|
1424
|
-
var scaleY = rect.height / element.offsetHeight || 1;
|
|
1468
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
1469
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
1425
1470
|
return scaleX !== 1 || scaleY !== 1;
|
|
1426
1471
|
} // Returns the composite rect of an element relative to its offsetParent.
|
|
1427
1472
|
// Composite means it takes into account transforms as well as layout.
|
|
@@ -1433,9 +1478,9 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
1433
1478
|
}
|
|
1434
1479
|
|
|
1435
1480
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1436
|
-
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
1481
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
1437
1482
|
var documentElement = getDocumentElement(offsetParent);
|
|
1438
|
-
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
1483
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
1439
1484
|
var scroll = {
|
|
1440
1485
|
scrollLeft: 0,
|
|
1441
1486
|
scrollTop: 0
|
|
@@ -1452,7 +1497,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
1452
1497
|
}
|
|
1453
1498
|
|
|
1454
1499
|
if (isHTMLElement(offsetParent)) {
|
|
1455
|
-
offsets = getBoundingClientRect(offsetParent);
|
|
1500
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
1456
1501
|
offsets.x += offsetParent.clientLeft;
|
|
1457
1502
|
offsets.y += offsetParent.clientTop;
|
|
1458
1503
|
} else if (documentElement) {
|
|
@@ -1739,7 +1784,41 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|
|
1739
1784
|
defaultModifiers: defaultModifiers
|
|
1740
1785
|
}); // eslint-disable-next-line import/no-unused-modules
|
|
1741
1786
|
|
|
1742
|
-
|
|
1787
|
+
var maxSize = {
|
|
1788
|
+
name: 'maxSize',
|
|
1789
|
+
enabled: true,
|
|
1790
|
+
phase: 'main',
|
|
1791
|
+
requiresIfExists: ['offset', 'preventOverflow', 'flip'],
|
|
1792
|
+
fn: function fn(_ref) {
|
|
1793
|
+
var state = _ref.state,
|
|
1794
|
+
name = _ref.name,
|
|
1795
|
+
options = _ref.options;
|
|
1796
|
+
var overflow = detectOverflow(state, options);
|
|
1797
|
+
|
|
1798
|
+
var _ref2 = state.modifiersData.preventOverflow || {
|
|
1799
|
+
x: 0,
|
|
1800
|
+
y: 0
|
|
1801
|
+
},
|
|
1802
|
+
x = _ref2.x,
|
|
1803
|
+
y = _ref2.y;
|
|
1804
|
+
|
|
1805
|
+
var _state$rects$popper = state.rects.popper,
|
|
1806
|
+
width = _state$rects$popper.width,
|
|
1807
|
+
height = _state$rects$popper.height;
|
|
1808
|
+
|
|
1809
|
+
var _state$placement$spli = state.placement.split('-'),
|
|
1810
|
+
basePlacement = _state$placement$spli[0];
|
|
1811
|
+
|
|
1812
|
+
var widthProp = basePlacement === 'left' ? 'left' : 'right';
|
|
1813
|
+
var heightProp = basePlacement === 'top' ? 'top' : 'bottom';
|
|
1814
|
+
state.modifiersData[name] = {
|
|
1815
|
+
width: width - overflow[widthProp] - x,
|
|
1816
|
+
height: height - overflow[heightProp] - y
|
|
1817
|
+
};
|
|
1818
|
+
}
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
const tooltipCss = ":host(.hidden){visibility:hidden}:host-context(dso-toggletip){color:red !important}:host-context(dso-toggletip) *[data-popper-placement=top] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=right] .tooltip-arrow{margin-top:0}:host-context(dso-toggletip) *[data-popper-placement=bottom] .tooltip-arrow{margin-left:3px}:host-context(dso-toggletip) *[data-popper-placement=left]{margin-right:-8px !important}:host-context(dso-toggletip) *[data-popper-placement=left] .tooltip-arrow{margin-top:0}*,*::after,*::before{box-sizing:border-box}.tooltip{font-family:Asap, sans-serif;font-style:normal;font-weight:400;line-height:1.5;line-break:auto;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;display:block;filter:drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));font-size:14px;opacity:0;position:absolute;transition:opacity 0.15s linear;z-index:1070}.tooltip.in{opacity:1}.tooltip .tooltip-inner{background-color:#fff;border-radius:4px;color:#191919;display:inline-block;font-size:16px;max-width:640px;padding:8px 16px;position:relative}.tooltip .tooltip-inner.dso-small{max-width:320px}.tooltip .tooltip-arrow{border-color:transparent;border-style:solid;height:0;width:0}.tooltip[data-popper-placement=top]{margin-top:-3px;padding:6px 0}.tooltip[data-popper-placement=top] .tooltip-arrow{border-top-color:#fff;border-width:6px 6px 0;bottom:0}.tooltip[data-popper-placement=top] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=right]{margin-left:3px;padding:0 6px}.tooltip[data-popper-placement=right] .tooltip-arrow{border-right-color:#fff;border-width:6px 6px 6px 0;left:0}.tooltip[data-popper-placement=right] .tooltip-arrow{margin-top:-3px}.tooltip[data-popper-placement=bottom]{margin-top:3px;padding:6px 0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{border-bottom-color:#fff;border-width:0 6px 6px;top:0}.tooltip[data-popper-placement=bottom] .tooltip-arrow{margin-left:-3px}.tooltip[data-popper-placement=left]{margin-left:-3px;padding:0 6px}.tooltip[data-popper-placement=left] .tooltip-arrow{border-left-color:#fff;border-width:6px 0 6px 6px;right:0}.tooltip[data-popper-placement=left] .tooltip-arrow{margin-top:-3px}";
|
|
1743
1822
|
|
|
1744
1823
|
// Keep const in sync with $tooltip-transition-duration in @dso-toolkit/sources/tooltip.scss tooltip_root() mixin
|
|
1745
1824
|
const transitionDuration = 150;
|
|
@@ -1759,6 +1838,19 @@ let Tooltip = class {
|
|
|
1759
1838
|
*/
|
|
1760
1839
|
this.active = false;
|
|
1761
1840
|
this.hidden = true;
|
|
1841
|
+
this.applyMaxSize = {
|
|
1842
|
+
name: 'applyMaxSize',
|
|
1843
|
+
enabled: true,
|
|
1844
|
+
phase: beforeWrite,
|
|
1845
|
+
requires: ['maxSize'],
|
|
1846
|
+
fn({ state }) {
|
|
1847
|
+
let { width } = state.modifiersData.maxSize;
|
|
1848
|
+
if (width < 160) {
|
|
1849
|
+
width = 160;
|
|
1850
|
+
}
|
|
1851
|
+
state.styles.popper = Object.assign(Object.assign({}, state.styles.popper), { maxWidth: `${width}px` });
|
|
1852
|
+
},
|
|
1853
|
+
};
|
|
1762
1854
|
}
|
|
1763
1855
|
/**
|
|
1764
1856
|
* Activate the tooltip (Sets the `active` attribute)
|
|
@@ -1816,7 +1908,8 @@ let Tooltip = class {
|
|
|
1816
1908
|
}
|
|
1817
1909
|
this.target = this.getTarget();
|
|
1818
1910
|
this.popper = createPopper(this.target, tooltip, {
|
|
1819
|
-
placement: this.position
|
|
1911
|
+
placement: this.position,
|
|
1912
|
+
modifiers: [maxSize, this.applyMaxSize],
|
|
1820
1913
|
});
|
|
1821
1914
|
this.callbacks = {
|
|
1822
1915
|
activate: () => (this.active = true),
|
|
@@ -1848,7 +1941,7 @@ let Tooltip = class {
|
|
|
1848
1941
|
}
|
|
1849
1942
|
}
|
|
1850
1943
|
render() {
|
|
1851
|
-
return (h(Host, { hidden: this.hidden }, h("div", { class: clsx('tooltip', { in: this.active }), role: "tooltip" }, !this.noArrow && h("div", { class: "tooltip-arrow" }), h("div", { class: clsx('tooltip-inner', { 'dso-small': this.small }) }, h("slot", null)))));
|
|
1944
|
+
return (h(Host, { class: { 'hidden': this.hidden } }, h("div", { class: clsx('tooltip', { in: this.active }), role: "tooltip" }, !this.noArrow && h("div", { "data-popper-arrow": true, class: "tooltip-arrow" }), h("div", { class: clsx('tooltip-inner', { 'dso-small': this.small }) }, h("slot", null)))));
|
|
1852
1945
|
}
|
|
1853
1946
|
getTarget() {
|
|
1854
1947
|
if (this.for instanceof HTMLElement) {
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a function, that, as long as it continues to be invoked, will not
|
|
3
|
+
* be triggered. The function will be called after it stops being called for
|
|
4
|
+
* N milliseconds. If `immediate` is passed, trigger the function on the
|
|
5
|
+
* leading edge, instead of the trailing. The function also has a property 'clear'
|
|
6
|
+
* that is a function which will clear the timer to prevent previously scheduled executions.
|
|
7
|
+
*
|
|
8
|
+
* @source underscore.js
|
|
9
|
+
* @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
|
|
10
|
+
* @param {Function} function to wrap
|
|
11
|
+
* @param {Number} timeout in ms (`100`)
|
|
12
|
+
* @param {Boolean} whether to execute at the beginning (`false`)
|
|
13
|
+
* @api public
|
|
14
|
+
*/
|
|
15
|
+
function debounce(func, wait, immediate){
|
|
16
|
+
var timeout, args, context, timestamp, result;
|
|
17
|
+
if (null == wait) wait = 100;
|
|
18
|
+
|
|
19
|
+
function later() {
|
|
20
|
+
var last = Date.now() - timestamp;
|
|
21
|
+
|
|
22
|
+
if (last < wait && last >= 0) {
|
|
23
|
+
timeout = setTimeout(later, wait - last);
|
|
24
|
+
} else {
|
|
25
|
+
timeout = null;
|
|
26
|
+
if (!immediate) {
|
|
27
|
+
result = func.apply(context, args);
|
|
28
|
+
context = args = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
var debounced = function(){
|
|
33
|
+
context = this;
|
|
34
|
+
args = arguments;
|
|
35
|
+
timestamp = Date.now();
|
|
36
|
+
var callNow = immediate && !timeout;
|
|
37
|
+
if (!timeout) timeout = setTimeout(later, wait);
|
|
38
|
+
if (callNow) {
|
|
39
|
+
result = func.apply(context, args);
|
|
40
|
+
context = args = null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
debounced.clear = function() {
|
|
47
|
+
if (timeout) {
|
|
48
|
+
clearTimeout(timeout);
|
|
49
|
+
timeout = null;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
debounced.flush = function() {
|
|
54
|
+
if (timeout) {
|
|
55
|
+
result = func.apply(context, args);
|
|
56
|
+
context = args = null;
|
|
57
|
+
|
|
58
|
+
clearTimeout(timeout);
|
|
59
|
+
timeout = null;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return debounced;
|
|
64
|
+
}
|
|
65
|
+
// Adds compatibility for ES modules
|
|
66
|
+
debounce.debounce = debounce;
|
|
67
|
+
|
|
68
|
+
var debounce_1 = debounce;
|
|
69
|
+
|
|
70
|
+
export { debounce_1 as d };
|