@dso-toolkit/core 30.0.0 → 31.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +15 -4
- package/dist/cjs/dso-banner.cjs.entry.js +1 -1
- package/dist/cjs/dso-date-picker.cjs.entry.js +56 -16
- package/dist/cjs/dso-icon.cjs.entry.js +6 -4
- package/dist/cjs/dso-info-button.cjs.entry.js +26 -0
- package/dist/cjs/{dso-info_3.cjs.entry.js → dso-info_2.cjs.entry.js} +0 -20
- package/dist/cjs/dso-label.cjs.entry.js +1 -1
- package/dist/cjs/dso-ozon-content.cjs.entry.js +26 -13
- package/dist/cjs/dso-toggletip.cjs.entry.js +62 -0
- package/dist/cjs/dso-toolkit.cjs.js +1 -1
- package/dist/cjs/dso-tooltip.cjs.entry.js +33 -26
- package/dist/cjs/dso-tree-view.cjs.entry.js +180 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/alert/alert.css +2 -0
- package/dist/collection/components/autosuggest/autosuggest.css +1 -0
- package/dist/collection/components/autosuggest/autosuggest.js +3 -3
- package/dist/collection/components/banner/banner.css +2 -0
- package/dist/collection/components/date-picker/date-localization.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +108 -14
- package/dist/collection/components/date-picker/date-picker.template.js +2 -1
- package/dist/collection/components/date-picker/date-utils.js +3 -3
- package/dist/collection/components/icon/icon.js +9 -7
- package/dist/collection/components/info-button/info-button.css +10 -3
- package/dist/collection/components/info-button/info-button.js +18 -1
- package/dist/collection/components/info-button/info-button.template.js +2 -1
- package/dist/collection/components/label/label.decorator.js +6 -0
- package/dist/collection/components/label/label.js +1 -0
- package/dist/collection/components/label/label.template.js +10 -2
- package/dist/collection/components/ozon-content/ozon-content.transformer.js +26 -13
- package/dist/collection/components/toggletip/toggletip.css +8 -0
- package/dist/collection/components/toggletip/toggletip.js +137 -0
- package/dist/collection/components/toggletip/toggletip.template.js +12 -0
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +49 -25
- package/dist/collection/components/tree-view/tree-item.js +20 -0
- package/dist/collection/components/tree-view/tree-view.css +43 -0
- package/dist/collection/components/tree-view/tree-view.interfaces.js +1 -0
- package/dist/collection/components/tree-view/tree-view.js +239 -0
- package/dist/collection/components/tree-view/tree-view.template.js +11 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +381 -73
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/{p-968d9e1d.entry.js → p-19de4cc7.entry.js} +1 -1
- package/dist/dso-toolkit/p-39dae284.entry.js +1 -0
- package/dist/dso-toolkit/p-5665f1ee.entry.js +1 -0
- package/dist/dso-toolkit/{p-eadba8c3.entry.js → p-5a67f3f7.entry.js} +1 -1
- package/dist/dso-toolkit/p-759920d0.entry.js +1 -0
- package/dist/dso-toolkit/{p-d748df48.entry.js → p-83f166b3.entry.js} +1 -1
- package/dist/dso-toolkit/p-9735f393.entry.js +1 -0
- package/dist/dso-toolkit/p-9e9f8bcf.entry.js +1 -0
- package/dist/dso-toolkit/p-a8a0e909.entry.js +1 -0
- package/dist/dso-toolkit/p-ad8f467f.entry.js +1 -0
- package/dist/dso-toolkit/p-e2dc97c4.entry.js +1 -0
- package/dist/dso-toolkit/p-faf19a1d.entry.js +1 -0
- package/dist/esm/dso-alert.entry.js +1 -1
- package/dist/esm/dso-autosuggest.entry.js +15 -4
- package/dist/esm/dso-banner.entry.js +1 -1
- package/dist/esm/dso-date-picker.entry.js +56 -16
- package/dist/esm/dso-icon.entry.js +6 -4
- package/dist/esm/dso-info-button.entry.js +22 -0
- package/dist/esm/{dso-info_3.entry.js → dso-info_2.entry.js} +1 -20
- package/dist/esm/dso-label.entry.js +1 -1
- package/dist/esm/dso-ozon-content.entry.js +26 -13
- package/dist/esm/dso-toggletip.entry.js +58 -0
- package/dist/esm/dso-toolkit.js +1 -1
- package/dist/esm/dso-tooltip.entry.js +33 -26
- package/dist/esm/dso-tree-view.entry.js +176 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +20 -0
- package/dist/types/components/date-picker/date-picker.template.d.ts +1 -1
- package/dist/types/components/icon/icon.d.ts +1 -1
- package/dist/types/components/info-button/info-button.d.ts +1 -0
- package/dist/types/components/info-button/info-button.template.d.ts +1 -1
- package/dist/types/components/label/label.decorator.d.ts +3 -0
- package/dist/types/components/label/label.template.d.ts +1 -1
- package/dist/types/components/toggletip/toggletip.d.ts +17 -0
- package/dist/types/components/toggletip/toggletip.template.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +6 -2
- package/dist/types/components/tree-view/tree-item.d.ts +13 -0
- package/dist/types/components/tree-view/tree-view.d.ts +36 -0
- package/dist/types/components/tree-view/tree-view.interfaces.d.ts +24 -0
- package/dist/types/components/tree-view/tree-view.template.d.ts +2 -0
- package/dist/types/components.d.ts +84 -3
- package/package.json +2 -1
- package/dist/dso-toolkit/p-2c6e9460.entry.js +0 -1
- package/dist/dso-toolkit/p-43772cee.entry.js +0 -1
- package/dist/dso-toolkit/p-94500196.entry.js +0 -1
- package/dist/dso-toolkit/p-9abac5e7.entry.js +0 -1
- package/dist/dso-toolkit/p-a2357726.entry.js +0 -1
- package/dist/dso-toolkit/p-c5acf7e2.entry.js +0 -1
|
@@ -42,7 +42,7 @@ function clsx () {
|
|
|
42
42
|
return str;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
const alertCss = "@media screen and (min-width: 481px){.alert{padding:19px 16px 19px 63px}}@media screen and (max-width: 480px){.alert{padding:63px 16px 16px}}:host{display:block;--di-status-success:url(\"data:image/svg+xml,%3csvg id='status-success' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' style='fill: %2339870c'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-danger:url(\"data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-warning:url(\"data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e\");--di-status-info:url(\"data:image/svg+xml,%3csvg id='status-info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' style='fill: %232b5780'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11%2c8a1%2c1%2c0%2c1%2c1%2c1%2c1A1%2c1%2c0%2c0%2c1%2c11%2c8Zm2%2c8.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' style='fill: white'/%3e %3c/svg%3e\")}:host(:not(:first-child)){margin-top:24px}*,*::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}.alert{border:1px solid transparent;line-height:24px;margin-bottom:24px;min-height:64px;position:relative}.alert:not(:first-child){margin-top:24px}.alert::before{content:\"\";left:15px;position:absolute;top:15px}.alert.alert-success{color:#191919;background-color:#e4f1d4;border-color:#e4f1d4}.alert.alert-success::before{background:var(--dso-icon, var(--di-status-success)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}.alert.alert-danger{color:#191919;background-color:#f5d8dc;border-color:#f5d8dc}.alert.alert-danger::before{background:var(--dso-icon, var(--di-status-danger)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}.alert.alert-warning{color:#191919;background-color:#f8f6cc;border-color:#f8f6cc}.alert.alert-warning::before{background:var(--dso-icon, var(--di-status-warning)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}.alert.alert-info{color:#191919;background-color:#e1ecf7;border-color:#e1ecf7}.alert.alert-info::before{background:var(--dso-icon, var(--di-status-info)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}";
|
|
45
|
+
const alertCss = "@media screen and (min-width: 481px){.alert{padding:19px 16px 19px 63px}}@media screen and (max-width: 480px){.alert{padding:63px 16px 16px}}:host{display:block;--di-status-success:url(\"data:image/svg+xml,%3csvg id='status-success' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' style='fill: %2339870c'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M10.11%2c18%2c5.29%2c13.31A.92.92%2c0%2c0%2c1%2c5.3%2c12a1%2c1%2c0%2c0%2c1%2c1.41%2c0l3.4%2c3.3%2c7.18-7a1%2c1%2c0%2c0%2c1%2c1.41%2c0%2c.92.92%2c0%2c0%2c1%2c0%2c1.35Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-danger:url(\"data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-warning:url(\"data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e\");--di-status-info:url(\"data:image/svg+xml,%3csvg id='status-info' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3ccircle cx='12' cy='12' r='11' style='fill: %232b5780'/%3e %3cpath d='M12%2c1A11%2c11%2c0%2c1%2c1%2c1%2c12%2c11%2c11%2c0%2c0%2c1%2c12%2c1m0-1A12%2c12%2c0%2c1%2c0%2c24%2c12%2c12%2c12%2c0%2c0%2c0%2c12%2c0Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11%2c8a1%2c1%2c0%2c1%2c1%2c1%2c1A1%2c1%2c0%2c0%2c1%2c11%2c8Zm2%2c8.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' style='fill: white'/%3e %3c/svg%3e\");--di-download-grijs90:url(\"data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e\");--di-external-link-grijs90:url(\"data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e\")}:host(:not(:first-child)){margin-top:24px}*,*::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}.alert{border:1px solid transparent;line-height:24px;margin-bottom:24px;min-height:64px;position:relative}.alert:not(:first-child){margin-top:24px}.alert::before{content:\"\";left:15px;position:absolute;top:15px}.alert.alert-success{color:#191919;background-color:#e4f1d4;border-color:#e4f1d4}.alert.alert-success::before{background:var(--dso-icon, var(--di-status-success)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}.alert.alert-danger{color:#191919;background-color:#f5d8dc;border-color:#f5d8dc}.alert.alert-danger::before{background:var(--dso-icon, var(--di-status-danger)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}.alert.alert-warning{color:#191919;background-color:#f8f6cc;border-color:#f8f6cc}.alert.alert-warning::before{background:var(--dso-icon, var(--di-status-warning)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}.alert.alert-info{color:#191919;background-color:#e1ecf7;border-color:#e1ecf7}.alert.alert-info::before{background:var(--dso-icon, var(--di-status-info)) no-repeat;background-position:center;background-size:cover;height:32px;vertical-align:top;width:32px}";
|
|
46
46
|
|
|
47
47
|
let Alert = class extends HTMLElement {
|
|
48
48
|
constructor() {
|
|
@@ -223,7 +223,19 @@ function v4(options, buf, offset) {
|
|
|
223
223
|
return stringify(rnds);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
function escapeStringRegexp(string) {
|
|
227
|
+
if (typeof string !== 'string') {
|
|
228
|
+
throw new TypeError('Expected a string');
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Escape characters with special meaning either inside or outside character sets.
|
|
232
|
+
// Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
|
|
233
|
+
return string
|
|
234
|
+
.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
|
|
235
|
+
.replace(/-/g, '\\x2d');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const autosuggestCss = ".sc-dso-autosuggest-h{display:block;position:relative}ul.sc-dso-autosuggest{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175);list-style-type:none;margin-top:2px;padding:4px 0;position:absolute;left:0;right:0;top:100%;z-index:10}ul.sc-dso-autosuggest li.sc-dso-autosuggest{display:flex;justify-content:space-between;padding:4px 18px}li[aria-selected=true].sc-dso-autosuggest{cursor:pointer;background-color:#39870c}li[aria-selected=true].sc-dso-autosuggest,li[aria-selected=true].sc-dso-autosuggest .type.sc-dso-autosuggest{color:#fff}mark.sc-dso-autosuggest{font-weight:700;background-color:inherit;color:inherit;padding:0}.type.sc-dso-autosuggest{color:#666}";
|
|
227
239
|
|
|
228
240
|
let Autosuggest = class extends HTMLElement {
|
|
229
241
|
constructor() {
|
|
@@ -351,7 +363,7 @@ let Autosuggest = class extends HTMLElement {
|
|
|
351
363
|
if (!suggestionValue || !terms || terms.length === 0) {
|
|
352
364
|
return [''];
|
|
353
365
|
}
|
|
354
|
-
const termRegex = new RegExp(`(${terms[0]})`, 'gi');
|
|
366
|
+
const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, 'gi');
|
|
355
367
|
return suggestionValue.split(termRegex).map((valuePart) => {
|
|
356
368
|
if (!valuePart) {
|
|
357
369
|
return '';
|
|
@@ -418,7 +430,6 @@ let Autosuggest = class extends HTMLElement {
|
|
|
418
430
|
}
|
|
419
431
|
pickSelectedValue() {
|
|
420
432
|
if (this.selectedSuggestion) {
|
|
421
|
-
this.input.value = this.selectedSuggestion.value;
|
|
422
433
|
this.selectEmitter.emit(this.selectedSuggestion);
|
|
423
434
|
}
|
|
424
435
|
this.closeSuggestions();
|
|
@@ -427,7 +438,7 @@ let Autosuggest = class extends HTMLElement {
|
|
|
427
438
|
return `${this.inputId}-${this.suggestions.indexOf(suggestion) + 1}`;
|
|
428
439
|
}
|
|
429
440
|
render() {
|
|
430
|
-
const terms = this.input.value.split(' ');
|
|
441
|
+
const terms = this.input.value.split(' ').filter(t => t);
|
|
431
442
|
return (h(Fragment, null, h("slot", null), h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions }, this.showSuggestions
|
|
432
443
|
? this.suggestions.map((suggestion) => (h("li", { role: "option", id: this.listboxItemId(suggestion), key: suggestion.value, onMouseEnter: () => this.selectSuggestion(suggestion), onMouseLeave: () => this.resetSelectedSuggestion(), onClick: () => this.pickSelectedValue(), "aria-selected": (suggestion === this.selectedSuggestion).toString(), "aria-label": suggestion.value }, h("span", { class: "value" }, this.markTerms(suggestion.value, terms)), suggestion.type
|
|
433
444
|
? (h("span", { class: "type" }, suggestion.type))
|
|
@@ -461,7 +472,7 @@ Badge.statusMap = new Map([
|
|
|
461
472
|
['danger', 'Fout']
|
|
462
473
|
]);
|
|
463
474
|
|
|
464
|
-
const bannerCss = ":host{display:block;--di-status-danger:url(\"data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-warning:url(\"data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.dso-banner{padding:16px 0;position:relative}";
|
|
475
|
+
const bannerCss = ":host{display:block;--di-status-danger:url(\"data:image/svg+xml,%3csvg id='status-danger-line' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23ce3f51'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M12%2c16a1%2c1%2c0%2c0%2c1-1-.91V8.91a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c12%2c16Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c12%2c17Z' style='fill: white'/%3e %3c/svg%3e\");--di-status-warning:url(\"data:image/svg+xml,%3csvg id='status-warning' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg%3e %3cpath d='M22.6%2c18.51c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4a1.7%2c1.7%2c0%2c0%2c1%2c3.12%2c0Z' style='fill: %23dcd400'/%3e %3cpath d='M12%2c3a1.9%2c1.9%2c0%2c0%2c1%2c1.56%2c1l9%2c14.48c.86%2c1.37.29%2c2.49-1.25%2c2.49H2.65C1.11%2c21%2c.54%2c19.88%2c1.4%2c18.51L10.44%2c4A1.9%2c1.9%2c0%2c0%2c1%2c12%2c3m0-1A2.89%2c2.89%2c0%2c0%2c0%2c9.6%2c3.5L.55%2c18a2.75%2c2.75%2c0%2c0%2c0-.28%2c2.81A2.59%2c2.59%2c0%2c0%2c0%2c2.65%2c22h18.7a2.59%2c2.59%2c0%2c0%2c0%2c2.38-1.21A2.75%2c2.75%2c0%2c0%2c0%2c23.45%2c18L14.4%2c3.5A2.89%2c2.89%2c0%2c0%2c0%2c12%2c2Z' style='fill: white'/%3e %3c/g%3e %3cpath d='M11.73%2c15.85a1%2c1%2c0%2c0%2c1-1-.91V8.76a1%2c1%2c0%2c0%2c1%2c2%2c0v6.18A1%2c1%2c0%2c0%2c1%2c11.73%2c15.85Zm0%2c1a1%2c1%2c0%2c1%2c0%2c1%2c1A1%2c1%2c0%2c0%2c0%2c11.73%2c16.85Z'/%3e %3c/svg%3e\");--di-download-grijs90:url(\"data:image/svg+xml,%3csvg id='download' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M18.72%2c10.44%2c12%2c17l-6.7-6.52C4.8%2c10%2c5%2c9.63%2c5.63%2c9.63H8.5V1.82A.8.8%2c0%2c0%2c1%2c9.28%2c1h5.44a.8.8%2c0%2c0%2c1%2c.78.82V9.61h2.87C19%2c9.6%2c19.2%2c10%2c18.72%2c10.44ZM1%2c17v6H23V17Zm16%2c3a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c17%2c20Zm5%2c0a2%2c2%2c0%2c1%2c1-2-2A2%2c2%2c0%2c0%2c1%2c22%2c20Z'/%3e %3c/svg%3e\");--di-external-link-grijs90:url(\"data:image/svg+xml,%3csvg id='external-link' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23191919%3b'%3e %3cpath fill='currentColor' d='M19%2c6V9.69c0%2c.33-.2.41-.43.17L17.06%2c8.35l-3.35%2c3.36a1%2c1%2c0%2c0%2c1-1.42%2c0%2c1%2c1%2c0%2c0%2c1%2c0-1.42l3.36-3.35L14.14%2c5.43C13.9%2c5.19%2c14%2c5%2c14.31%2c5H19V6ZM18%2c17V13a1%2c1%2c0%2c0%2c0-2%2c0v4a1%2c1%2c0%2c0%2c1-1%2c1H7a1%2c1%2c0%2c0%2c1-1-1V9A1%2c1%2c0%2c0%2c1%2c7%2c8h4a1%2c1%2c0%2c0%2c0%2c0-2H7A3%2c3%2c0%2c0%2c0%2c4%2c9v8a3%2c3%2c0%2c0%2c0%2c3%2c3h8A3%2c3%2c0%2c0%2c0%2c18%2c17Z'/%3e %3c/svg%3e\")}*,*::after,*::before{box-sizing:border-box}.dso-banner{padding:16px 0;position:relative}";
|
|
465
476
|
|
|
466
477
|
let Banner = class extends HTMLElement {
|
|
467
478
|
constructor() {
|
|
@@ -537,9 +548,9 @@ function printDutchDate(date) {
|
|
|
537
548
|
if (!date) {
|
|
538
549
|
return '';
|
|
539
550
|
}
|
|
540
|
-
var d = date.getDate().toString(10);
|
|
541
|
-
var m = (date.getMonth() + 1).toString(10);
|
|
542
|
-
var y = date.getFullYear().toString(10);
|
|
551
|
+
var d = date.getDate().toString(10).padStart(2, '0');
|
|
552
|
+
var m = (date.getMonth() + 1).toString(10).padStart(2, '0');
|
|
553
|
+
var y = date.getFullYear().toString(10).padStart(2, '0');
|
|
543
554
|
return `${d}-${m}-${y}`;
|
|
544
555
|
}
|
|
545
556
|
/**
|
|
@@ -688,7 +699,7 @@ const localization = {
|
|
|
688
699
|
nextMonthLabel: 'Volgende maand',
|
|
689
700
|
monthSelectLabel: 'Maand',
|
|
690
701
|
yearSelectLabel: 'Jaar',
|
|
691
|
-
closeLabel: '
|
|
702
|
+
closeLabel: 'Sluiten',
|
|
692
703
|
keyboardInstruction: 'Gebruik de pijltjestoetsen om een dag te kiezen',
|
|
693
704
|
calendarHeading: 'Kies een datum',
|
|
694
705
|
dayNames: [
|
|
@@ -761,6 +772,8 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
761
772
|
attachShadow(this);
|
|
762
773
|
this.dateChange = createEvent(this, "dateChange", 7);
|
|
763
774
|
this.dsoBlur = createEvent(this, "dsoBlur", 7);
|
|
775
|
+
this.dsoKeyUp = createEvent(this, "dsoKeyUp", 7);
|
|
776
|
+
this.dsoKeyDown = createEvent(this, "dsoKeyDown", 7);
|
|
764
777
|
this.dsoFocus = createEvent(this, "dsoFocus", 7);
|
|
765
778
|
/**
|
|
766
779
|
* Own Properties
|
|
@@ -798,6 +811,10 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
798
811
|
* Should the input be marked as required?
|
|
799
812
|
*/
|
|
800
813
|
this.required = false;
|
|
814
|
+
/**
|
|
815
|
+
* Should the input be focused on load?
|
|
816
|
+
*/
|
|
817
|
+
this.dsoAutofocus = false;
|
|
801
818
|
/**
|
|
802
819
|
* Date value. Must be in Dutch date format: DD-MM-YYYY.
|
|
803
820
|
*/
|
|
@@ -826,6 +843,20 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
826
843
|
component: "dso-date-picker",
|
|
827
844
|
});
|
|
828
845
|
};
|
|
846
|
+
this.handleKeyUp = (event) => {
|
|
847
|
+
event.stopPropagation();
|
|
848
|
+
this.dsoKeyUp.emit({
|
|
849
|
+
component: "dso-date-picker",
|
|
850
|
+
originalEvent: event
|
|
851
|
+
});
|
|
852
|
+
};
|
|
853
|
+
this.handleKeyDown = (event) => {
|
|
854
|
+
event.stopPropagation();
|
|
855
|
+
this.dsoKeyDown.emit({
|
|
856
|
+
component: "dso-date-picker",
|
|
857
|
+
originalEvent: event
|
|
858
|
+
});
|
|
859
|
+
};
|
|
829
860
|
this.handleFocus = (event) => {
|
|
830
861
|
event.stopPropagation();
|
|
831
862
|
this.dsoFocus.emit({
|
|
@@ -946,12 +977,8 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
946
977
|
};
|
|
947
978
|
this.handleInputChange = (e) => {
|
|
948
979
|
const target = e.target;
|
|
949
|
-
// clean up any invalid characters
|
|
950
980
|
target.value = target.value.replace(DISALLOWED_CHARACTERS, "");
|
|
951
|
-
|
|
952
|
-
if (parsed || target.value === "") {
|
|
953
|
-
this.setValue(parsed);
|
|
954
|
-
}
|
|
981
|
+
this.setValue(target.value);
|
|
955
982
|
};
|
|
956
983
|
this.processFocusedDayNode = (element) => {
|
|
957
984
|
this.focusedDayNode = element;
|
|
@@ -1043,13 +1070,37 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
1043
1070
|
setFocusedDay(day) {
|
|
1044
1071
|
this.focusedDay = clamp(day, parseDutchDate(this.min), parseDutchDate(this.max));
|
|
1045
1072
|
}
|
|
1046
|
-
setValue(
|
|
1047
|
-
|
|
1048
|
-
this.dateChange.emit({
|
|
1073
|
+
setValue(value) {
|
|
1074
|
+
var event = {
|
|
1049
1075
|
component: "dso-date-picker",
|
|
1050
|
-
value:
|
|
1051
|
-
valueAsDate:
|
|
1052
|
-
}
|
|
1076
|
+
value: "",
|
|
1077
|
+
valueAsDate: undefined
|
|
1078
|
+
};
|
|
1079
|
+
if (value instanceof Date) {
|
|
1080
|
+
event.valueAsDate = value;
|
|
1081
|
+
}
|
|
1082
|
+
else {
|
|
1083
|
+
event.value = value;
|
|
1084
|
+
event.valueAsDate = parseDutchDate(value);
|
|
1085
|
+
}
|
|
1086
|
+
if (event.valueAsDate) {
|
|
1087
|
+
event.value = this.value = printDutchDate(event.valueAsDate);
|
|
1088
|
+
}
|
|
1089
|
+
else {
|
|
1090
|
+
this.value = "";
|
|
1091
|
+
}
|
|
1092
|
+
if (!event.valueAsDate && this.required) {
|
|
1093
|
+
event.error = "required";
|
|
1094
|
+
}
|
|
1095
|
+
if (event.value && !event.valueAsDate) {
|
|
1096
|
+
event.error = "invalid";
|
|
1097
|
+
}
|
|
1098
|
+
this.dateChange.emit(event);
|
|
1099
|
+
}
|
|
1100
|
+
componentDidLoad() {
|
|
1101
|
+
if (this.dsoAutofocus) {
|
|
1102
|
+
this.setFocus();
|
|
1103
|
+
}
|
|
1053
1104
|
}
|
|
1054
1105
|
/**
|
|
1055
1106
|
* render() function
|
|
@@ -1073,7 +1124,7 @@ let DsoDatePicker$1 = class extends HTMLElement {
|
|
|
1073
1124
|
if (maxDate) {
|
|
1074
1125
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
1075
1126
|
}
|
|
1076
|
-
return (h(Host, null, h("div", { class: "dso-date" }, h("div", { class: "dso-date__input-wrapper" }, h("input", { class: "dso-date__input", value: formattedDate, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, autoComplete: "off", ref: element => (this.datePickerInput = element) }), h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, h("span", { class: "dso-date__toggle-icon" }, h("dso-icon", { icon: "calendar" })), h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), h("div", { class: {
|
|
1127
|
+
return (h(Host, null, h("div", { class: "dso-date" }, h("div", { class: "dso-date__input-wrapper" }, h("input", { class: "dso-date__input", value: formattedDate, placeholder: this.localization.placeholder, id: this.identifier, disabled: this.disabled, role: this.role, required: this.required ? true : undefined, "aria-autocomplete": "none", onInput: this.handleInputChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyUp: this.handleKeyUp, onKeyDown: this.handleKeyDown, autoComplete: "off", ref: element => (this.datePickerInput = element) }), h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, h("span", { class: "dso-date__toggle-icon" }, h("dso-icon", { icon: "calendar" })), h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), h("div", { class: {
|
|
1077
1128
|
"dso-date__dialog": true,
|
|
1078
1129
|
"is-left": this.direction === "left",
|
|
1079
1130
|
"is-active": this.open,
|
|
@@ -2036,11 +2087,13 @@ let Icon = class extends HTMLElement {
|
|
|
2036
2087
|
attachShadow(this);
|
|
2037
2088
|
}
|
|
2038
2089
|
render() {
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2090
|
+
if (this.icon) {
|
|
2091
|
+
const icon = icons.find(i => i.alias === this.icon);
|
|
2092
|
+
if (!icon) {
|
|
2093
|
+
throw new TypeError(`Unknown svg: ${this.icon}`);
|
|
2094
|
+
}
|
|
2095
|
+
return h("span", { class: "icon-container", innerHTML: icon.svg });
|
|
2042
2096
|
}
|
|
2043
|
-
return h("span", { class: "icon-container", innerHTML: icon.svg });
|
|
2044
2097
|
}
|
|
2045
2098
|
static get style() { return iconCss; }
|
|
2046
2099
|
};
|
|
@@ -2060,7 +2113,7 @@ let Info = class extends HTMLElement {
|
|
|
2060
2113
|
static get style() { return infoCss; }
|
|
2061
2114
|
};
|
|
2062
2115
|
|
|
2063
|
-
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\")}*,*::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:
|
|
2116
|
+
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)}";
|
|
2064
2117
|
|
|
2065
2118
|
let InfoButton = class extends HTMLElement {
|
|
2066
2119
|
constructor() {
|
|
@@ -2075,7 +2128,7 @@ let InfoButton = class extends HTMLElement {
|
|
|
2075
2128
|
this.toggle.emit({ originalEvent: e, active: this.active });
|
|
2076
2129
|
}
|
|
2077
2130
|
render() {
|
|
2078
|
-
return (h("button", { type: "button", class: clsx('btn', { 'dso-open': !!this.active }), "aria-expanded": typeof this.active === 'boolean' ? this.active.toString() : undefined, onClick: e => this.handleToggle(e) }, h("span", { class: "sr-only" }, this.label)));
|
|
2131
|
+
return (h("button", { type: "button", class: clsx('btn', { 'dso-open': !!this.active, 'dso-info-secondary': !!this.secondary }), "aria-expanded": typeof this.active === 'boolean' ? this.active.toString() : undefined, onClick: e => this.handleToggle(e) }, h("span", { class: "sr-only" }, this.label)));
|
|
2079
2132
|
}
|
|
2080
2133
|
static get style() { return infoButtonCss; }
|
|
2081
2134
|
};
|
|
@@ -2091,7 +2144,7 @@ let Label = class extends HTMLElement {
|
|
|
2091
2144
|
}
|
|
2092
2145
|
render() {
|
|
2093
2146
|
const status = this.status && Label.statusMap.get(this.status);
|
|
2094
|
-
return (h("span", { class: clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) }, status && (h("span", { class: "sr-only" }, status, ": ")), h("slot", null), this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), title: "Verwijder", onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false }, h("dso-icon", { icon: "times" })))));
|
|
2147
|
+
return (h("span", { class: clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) }, h("slot", { name: "symbol" }), status && (h("span", { class: "sr-only" }, status, ": ")), h("slot", null), this.removable && (h("button", { type: "button", onClick: e => this.removeClick.emit(e), title: "Verwijder", onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false }, h("dso-icon", { icon: "times" })))));
|
|
2095
2148
|
}
|
|
2096
2149
|
static get style() { return labelCss; }
|
|
2097
2150
|
};
|
|
@@ -2508,21 +2561,34 @@ function isURL(url, options) {
|
|
|
2508
2561
|
}
|
|
2509
2562
|
|
|
2510
2563
|
function transformDescriptionNote(body) {
|
|
2511
|
-
body.querySelectorAll('
|
|
2512
|
-
const contentElement =
|
|
2513
|
-
|
|
2514
|
-
|
|
2564
|
+
body.querySelectorAll('div.noot').forEach((nootElement, index) => {
|
|
2565
|
+
const contentElement = nootElement.nextElementSibling;
|
|
2566
|
+
if (!(contentElement instanceof HTMLDivElement && contentElement.classList.value === 'noot_popup')) {
|
|
2567
|
+
return;
|
|
2568
|
+
}
|
|
2569
|
+
const nootAnchorElement = nootElement.querySelector('a');
|
|
2570
|
+
if (!(nootAnchorElement instanceof HTMLAnchorElement)) {
|
|
2571
|
+
return;
|
|
2572
|
+
}
|
|
2573
|
+
const contentAlElement = contentElement.querySelector(':scope > .od-Al');
|
|
2574
|
+
if (!(contentAlElement instanceof HTMLDivElement && contentAlElement.classList.value === 'od-Al')) {
|
|
2575
|
+
return;
|
|
2576
|
+
}
|
|
2577
|
+
nootElement.replaceWith(...Array.from(nootElement.childNodes));
|
|
2578
|
+
const contentWrapper = document.createElement('div');
|
|
2579
|
+
contentWrapper.replaceChildren(...Array.from(contentAlElement.childNodes));
|
|
2580
|
+
contentAlElement.replaceChildren(contentWrapper);
|
|
2581
|
+
contentElement.replaceWith(contentAlElement);
|
|
2515
2582
|
const supElement = document.createElement('sup');
|
|
2516
|
-
supElement.replaceChildren(...Array.from(
|
|
2517
|
-
|
|
2518
|
-
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.after(contentElement);
|
|
2519
|
-
ozonPopupElement === null || ozonPopupElement === void 0 ? void 0 : ozonPopupElement.remove();
|
|
2583
|
+
supElement.replaceChildren(...Array.from(nootAnchorElement.childNodes));
|
|
2584
|
+
nootAnchorElement.replaceChildren(supElement);
|
|
2520
2585
|
const id = (index + 1).toString(10);
|
|
2521
2586
|
const [termId, contentId] = [`dso-ozon-term-${id}`, `dso-ozon-content-${id}`];
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2587
|
+
nootAnchorElement.setAttribute('href', `#${termId}`);
|
|
2588
|
+
nootAnchorElement.setAttribute('id', termId);
|
|
2589
|
+
nootAnchorElement.setAttribute('aria-controls', contentId);
|
|
2590
|
+
nootAnchorElement.setAttribute('aria-expanded', 'false');
|
|
2591
|
+
contentAlElement === null || contentAlElement === void 0 ? void 0 : contentAlElement.setAttribute('id', contentId);
|
|
2526
2592
|
});
|
|
2527
2593
|
return body;
|
|
2528
2594
|
}
|
|
@@ -2592,7 +2658,7 @@ class OzonContentTransformer {
|
|
|
2592
2658
|
return false;
|
|
2593
2659
|
}
|
|
2594
2660
|
// require_tld: false is needed to allow http://localhost
|
|
2595
|
-
return (_a = composedPath.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.some(e => { var _a; return e instanceof HTMLAnchorElement && isURL((_a = e.getAttribute('href')) !== null && _a !== void 0 ? _a : '', { require_tld: false }); });
|
|
2661
|
+
return (_a = composedPath.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.some(e => { var _a; return e instanceof HTMLAnchorElement && isURL((_a = e.getAttribute('href')) !== null && _a !== void 0 ? _a : '', { require_tld: false, require_protocol: true }); });
|
|
2596
2662
|
}
|
|
2597
2663
|
isHostElement(value) {
|
|
2598
2664
|
return value instanceof HTMLElement && value.tagName === 'DSO-OZON-CONTENT';
|
|
@@ -2717,6 +2783,63 @@ let Selectable = class extends HTMLElement {
|
|
|
2717
2783
|
static get style() { return selectableCss; }
|
|
2718
2784
|
};
|
|
2719
2785
|
|
|
2786
|
+
const toggletipCss = "*,*::after,*::before{box-sizing:border-box}";
|
|
2787
|
+
|
|
2788
|
+
let Toggletip = class extends HTMLElement {
|
|
2789
|
+
constructor() {
|
|
2790
|
+
super();
|
|
2791
|
+
this.__registerHost();
|
|
2792
|
+
attachShadow(this);
|
|
2793
|
+
this.active = false;
|
|
2794
|
+
this.label = "Toelichting";
|
|
2795
|
+
this.position = "right";
|
|
2796
|
+
this.click = () => {
|
|
2797
|
+
this.active ? this.close() : this.open();
|
|
2798
|
+
};
|
|
2799
|
+
this.open = () => {
|
|
2800
|
+
this.active = true;
|
|
2801
|
+
this.host.addEventListener("keydown", this.keyDownListener);
|
|
2802
|
+
this.host.addEventListener("focusout", this.focusOutListener);
|
|
2803
|
+
};
|
|
2804
|
+
this.close = () => {
|
|
2805
|
+
this.host.removeEventListener("focusout", this.focusOutListener);
|
|
2806
|
+
this.host.removeEventListener("keydown", this.keyDownListener);
|
|
2807
|
+
this.active = false;
|
|
2808
|
+
};
|
|
2809
|
+
this.focusOutListener = (event) => {
|
|
2810
|
+
if (!this.host.contains(event.relatedTarget)) {
|
|
2811
|
+
this.close();
|
|
2812
|
+
}
|
|
2813
|
+
};
|
|
2814
|
+
this.keyDownListener = (event) => {
|
|
2815
|
+
if (!event.defaultPrevented && event.key == "Escape") {
|
|
2816
|
+
this.close();
|
|
2817
|
+
this.button.focus();
|
|
2818
|
+
event.preventDefault();
|
|
2819
|
+
}
|
|
2820
|
+
return;
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2823
|
+
componentDidRender() {
|
|
2824
|
+
var _a, _b, _c;
|
|
2825
|
+
const infoButton = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("dso-info-button");
|
|
2826
|
+
if (!infoButton) {
|
|
2827
|
+
throw Error("dso-info-button not found");
|
|
2828
|
+
}
|
|
2829
|
+
this.infoButton = infoButton;
|
|
2830
|
+
const button = (_c = (_b = this.infoButton) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector("button");
|
|
2831
|
+
if (!button) {
|
|
2832
|
+
throw Error("button not found");
|
|
2833
|
+
}
|
|
2834
|
+
this.button = button;
|
|
2835
|
+
}
|
|
2836
|
+
render() {
|
|
2837
|
+
return (h(Fragment, null, h("dso-info-button", { id: "toggle", onClick: this.click, label: this.label, active: this.active, secondary: this.secondary }), h("dso-tooltip", { stateless: true, for: "toggle", active: this.active, position: this.position, small: this.small }, h("slot", null))));
|
|
2838
|
+
}
|
|
2839
|
+
get host() { return this; }
|
|
2840
|
+
static get style() { return toggletipCss; }
|
|
2841
|
+
};
|
|
2842
|
+
|
|
2720
2843
|
var top = 'top';
|
|
2721
2844
|
var bottom = 'bottom';
|
|
2722
2845
|
var right = 'right';
|
|
@@ -4455,7 +4578,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
|
|
|
4455
4578
|
defaultModifiers: defaultModifiers
|
|
4456
4579
|
}); // eslint-disable-next-line import/no-unused-modules
|
|
4457
4580
|
|
|
4458
|
-
const tooltipCss = ":host(:not([hidden])){display:block}*,*::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:0.9}.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;position:absolute;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;left:50%;margin-left:-6px}.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;margin-top:-6px;top:50%}.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;left:50%;margin-left:-6px;top:0}.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;margin-top:-6px;right:0;top:50%}";
|
|
4581
|
+
const tooltipCss = ":host(:not([hidden])){display:inline-block}*,*::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:0.9}.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;position:absolute;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;left:50%;margin-left:-6px}.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;margin-top:-6px;top:50%}.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;left:50%;margin-left:-6px;top:0}.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;margin-top:-6px;right:0;top:50%}";
|
|
4459
4582
|
|
|
4460
4583
|
// Keep const in sync with $tooltip-transition-duration in @dso-toolkit/sources/tooltip.scss tooltip_root() mixin
|
|
4461
4584
|
const transitionDuration = 150;
|
|
@@ -4499,8 +4622,25 @@ let Tooltip = class extends HTMLElement {
|
|
|
4499
4622
|
});
|
|
4500
4623
|
}
|
|
4501
4624
|
watchActive() {
|
|
4625
|
+
var _a;
|
|
4502
4626
|
if (this.active) {
|
|
4503
4627
|
this.hidden = false;
|
|
4628
|
+
if (!this.stateless) {
|
|
4629
|
+
setTimeout(() => {
|
|
4630
|
+
var _a;
|
|
4631
|
+
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions({
|
|
4632
|
+
modifiers: [{ name: 'eventListeners', enabled: true }]
|
|
4633
|
+
});
|
|
4634
|
+
});
|
|
4635
|
+
}
|
|
4636
|
+
}
|
|
4637
|
+
else {
|
|
4638
|
+
if (!this.stateless) {
|
|
4639
|
+
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions({
|
|
4640
|
+
modifiers: [{ name: 'eventListeners', enabled: false }]
|
|
4641
|
+
});
|
|
4642
|
+
}
|
|
4643
|
+
setTimeout(() => (this.hidden = true), transitionDuration);
|
|
4504
4644
|
}
|
|
4505
4645
|
}
|
|
4506
4646
|
listenClick(e) {
|
|
@@ -4520,34 +4660,20 @@ let Tooltip = class extends HTMLElement {
|
|
|
4520
4660
|
placement: this.position
|
|
4521
4661
|
});
|
|
4522
4662
|
this.callbacks = {
|
|
4523
|
-
activate: () =>
|
|
4524
|
-
|
|
4525
|
-
setTimeout(() => {
|
|
4526
|
-
var _a;
|
|
4527
|
-
this.active = true;
|
|
4528
|
-
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions({
|
|
4529
|
-
modifiers: [{ name: 'eventListeners', enabled: true }]
|
|
4530
|
-
});
|
|
4531
|
-
});
|
|
4532
|
-
},
|
|
4533
|
-
deactivate: () => {
|
|
4534
|
-
var _a;
|
|
4535
|
-
this.active = false;
|
|
4536
|
-
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions({
|
|
4537
|
-
modifiers: [{ name: 'eventListeners', enabled: false }]
|
|
4538
|
-
});
|
|
4539
|
-
setTimeout(() => this.hidden = true, transitionDuration);
|
|
4540
|
-
}
|
|
4663
|
+
activate: () => (this.active = true),
|
|
4664
|
+
deactivate: () => (this.active = false)
|
|
4541
4665
|
};
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4666
|
+
if (!this.stateless) {
|
|
4667
|
+
this.target.addEventListener('mouseenter', this.callbacks.activate);
|
|
4668
|
+
this.target.addEventListener('mouseleave', this.callbacks.deactivate);
|
|
4669
|
+
this.target.addEventListener('focus', this.callbacks.activate);
|
|
4670
|
+
this.target.addEventListener('blur', this.callbacks.deactivate);
|
|
4671
|
+
}
|
|
4546
4672
|
}
|
|
4547
4673
|
disconnectedCallback() {
|
|
4548
4674
|
var _a;
|
|
4549
4675
|
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
4550
|
-
if (this.target && this.callbacks) {
|
|
4676
|
+
if (!this.stateless && this.target && this.callbacks) {
|
|
4551
4677
|
this.target.removeEventListener('mouseenter', this.callbacks.activate);
|
|
4552
4678
|
this.target.removeEventListener('mouseleave', this.callbacks.deactivate);
|
|
4553
4679
|
this.target.removeEventListener('focus', this.callbacks.activate);
|
|
@@ -4563,14 +4689,18 @@ let Tooltip = class extends HTMLElement {
|
|
|
4563
4689
|
}
|
|
4564
4690
|
}
|
|
4565
4691
|
render() {
|
|
4566
|
-
return (h(Host, { hidden: this.hidden }, h("div", { class: clsx('tooltip', { in: this.active }), role: "tooltip" }, !this.noArrow &&
|
|
4692
|
+
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)))));
|
|
4567
4693
|
}
|
|
4568
4694
|
getTarget() {
|
|
4569
4695
|
if (this.for instanceof HTMLElement) {
|
|
4570
4696
|
return this.for;
|
|
4571
4697
|
}
|
|
4572
4698
|
if (typeof this.for === 'string') {
|
|
4573
|
-
const
|
|
4699
|
+
const rootNode = this.element.getRootNode();
|
|
4700
|
+
if (!(rootNode instanceof Document || rootNode instanceof ShadowRoot)) {
|
|
4701
|
+
throw new Error(`rootNode is not instance of Document or ShadowRoot`);
|
|
4702
|
+
}
|
|
4703
|
+
const reference = rootNode.getElementById(this.for);
|
|
4574
4704
|
if (!reference) {
|
|
4575
4705
|
throw new Error(`Unable to find reference with id ${this.for}`);
|
|
4576
4706
|
}
|
|
@@ -4590,17 +4720,191 @@ let Tooltip = class extends HTMLElement {
|
|
|
4590
4720
|
static get style() { return tooltipCss; }
|
|
4591
4721
|
};
|
|
4592
4722
|
|
|
4723
|
+
const DsoTreeItem = ({ owner, ancestors, item, index, level, setSize }) => {
|
|
4724
|
+
var _a, _b, _c;
|
|
4725
|
+
return (h("li", { key: item.reference, class: clsx('tree-item', { 'has-child': item.hasItems }), role: 'none' },
|
|
4726
|
+
h("div", { class: "tree-branch-control" }, item.hasItems
|
|
4727
|
+
?
|
|
4728
|
+
h("div", { onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
4729
|
+
h("dso-icon", { icon: item.open ? 'chevron-down' : 'chevron-right' }))
|
|
4730
|
+
: h("dso-icon", null)),
|
|
4731
|
+
h("p", { class: "tree-content", tabindex: level === 1 && index === 0 ? 0 : -1, role: "treeitem", "aria-expanded": item.hasItems ? '' + (!!item.open && !!((_a = item.items) === null || _a === void 0 ? void 0 : _a.length)) : undefined, "aria-level": level, "aria-setsize": setSize, "aria-posinset": index + 1, "aria-busy": item.loading ? 'true' : undefined, onClick: (e) => owner.itemClick(e, ancestors, item) },
|
|
4732
|
+
item.href
|
|
4733
|
+
? h("a", { href: item.href, tabindex: "-1" }, item.label)
|
|
4734
|
+
: h("span", null, item.label), (_b = item.icons) === null || _b === void 0 ? void 0 :
|
|
4735
|
+
_b.map((icon) => h("dso-icon", { icon: icon.icon, title: icon.label }))),
|
|
4736
|
+
item.open &&
|
|
4737
|
+
h(Fragment, null, item.hasItems && !item.items && item.loading
|
|
4738
|
+
? h("dso-progress-indicator", { size: "small", label: "Resultaten laden: een moment geduld alstublieft." })
|
|
4739
|
+
: h("ul", { role: "group" }, (_c = item.items) === null || _c === void 0 ? void 0 : _c.map((childItem, index, org) => h(DsoTreeItem, { owner: owner, ancestors: [...ancestors, item], item: childItem, index: index, level: level + 1, setSize: org.length }))))));
|
|
4740
|
+
};
|
|
4741
|
+
|
|
4742
|
+
const treeViewCss = ":host ul{list-style-type:none}:host ul[role=tree]{padding-left:0}:host li[role=treeitem]>ul{padding-left:1.5em}:host .tree-branch-control{cursor:pointer;display:inline-block}:host .tree-content{cursor:pointer;display:inline-block;margin:8px 0}:host .tree-content a,:host .tree-content a:visited{color:#39870c;text-decoration:none}:host .tree-content a:hover,:host .tree-content a:focus{color:#676cb0;text-decoration:underline}:host .tree-content a:active{text-decoration:none}:host .tree-content dso-icon{vertical-align:text-bottom;font-size:0.75em;margin-left:0.5em}*,*::after,*::before{box-sizing:border-box}";
|
|
4743
|
+
|
|
4744
|
+
let TreeView = class extends HTMLElement {
|
|
4745
|
+
constructor() {
|
|
4746
|
+
super();
|
|
4747
|
+
this.__registerHost();
|
|
4748
|
+
attachShadow(this);
|
|
4749
|
+
this.openItem = createEvent(this, "openItem", 7);
|
|
4750
|
+
this.closeItem = createEvent(this, "closeItem", 7);
|
|
4751
|
+
this.clickItem = createEvent(this, "clickItem", 7);
|
|
4752
|
+
this.keyDownListener = (event) => {
|
|
4753
|
+
if (event.defaultPrevented) {
|
|
4754
|
+
return;
|
|
4755
|
+
}
|
|
4756
|
+
const isIndexLetter = (str) => str.length === 1 && str.match(/\S/);
|
|
4757
|
+
const tree = event.composedPath().find(item => (item instanceof HTMLElement) ? item.className === 'dso-tree' : false);
|
|
4758
|
+
if (!(event.target instanceof HTMLParagraphElement) || !(tree instanceof HTMLElement)) {
|
|
4759
|
+
return;
|
|
4760
|
+
}
|
|
4761
|
+
switch (event.key) {
|
|
4762
|
+
case "ArrowDown":
|
|
4763
|
+
TreeView.moveFocus(tree, event.target, 'next');
|
|
4764
|
+
break;
|
|
4765
|
+
case "ArrowUp":
|
|
4766
|
+
TreeView.moveFocus(tree, event.target, 'previous');
|
|
4767
|
+
break;
|
|
4768
|
+
case "ArrowRight":
|
|
4769
|
+
TreeView.expandItemOrFocusChild(tree, event.target);
|
|
4770
|
+
break;
|
|
4771
|
+
case "ArrowLeft":
|
|
4772
|
+
TreeView.collapseItemOrFocusParent(tree, event.target);
|
|
4773
|
+
break;
|
|
4774
|
+
case "End":
|
|
4775
|
+
TreeView.moveFocus(tree, event.target, 'last');
|
|
4776
|
+
break;
|
|
4777
|
+
case "Home":
|
|
4778
|
+
TreeView.moveFocus(tree, event.target, 'first');
|
|
4779
|
+
break;
|
|
4780
|
+
case "Enter":
|
|
4781
|
+
case " ":
|
|
4782
|
+
event.target.click();
|
|
4783
|
+
break;
|
|
4784
|
+
default:
|
|
4785
|
+
if (isIndexLetter(event.key)) {
|
|
4786
|
+
if (TreeView.setFocusByFirstCharacter(tree, event.target, event.key, event.shiftKey)) {
|
|
4787
|
+
break;
|
|
4788
|
+
}
|
|
4789
|
+
}
|
|
4790
|
+
return;
|
|
4791
|
+
}
|
|
4792
|
+
event.preventDefault();
|
|
4793
|
+
};
|
|
4794
|
+
this.itemClick = (event, ancestors, item) => {
|
|
4795
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
4796
|
+
return;
|
|
4797
|
+
}
|
|
4798
|
+
const contentElement = event.target.closest('.tree-content');
|
|
4799
|
+
if (contentElement) {
|
|
4800
|
+
const tree = event.composedPath().find(item => (item instanceof HTMLElement) ? item.className === 'dso-tree' : false);
|
|
4801
|
+
if (!(contentElement instanceof HTMLParagraphElement) || !(tree instanceof HTMLElement)) {
|
|
4802
|
+
return;
|
|
4803
|
+
}
|
|
4804
|
+
TreeView.setFocus(tree, contentElement);
|
|
4805
|
+
this.clickItem.emit([...ancestors, item]);
|
|
4806
|
+
return;
|
|
4807
|
+
}
|
|
4808
|
+
if (item.open) {
|
|
4809
|
+
this.closeItem.emit([...ancestors, item]);
|
|
4810
|
+
}
|
|
4811
|
+
else {
|
|
4812
|
+
this.openItem.emit([...ancestors, item]);
|
|
4813
|
+
}
|
|
4814
|
+
};
|
|
4815
|
+
}
|
|
4816
|
+
static setFocus(tree, target) {
|
|
4817
|
+
if (target) {
|
|
4818
|
+
Array.from(tree.querySelectorAll('p'))
|
|
4819
|
+
.filter(item => item.tabIndex === 0)
|
|
4820
|
+
.forEach(item => item.tabIndex = -1);
|
|
4821
|
+
target.tabIndex = 0;
|
|
4822
|
+
target.focus();
|
|
4823
|
+
}
|
|
4824
|
+
}
|
|
4825
|
+
static moveFocus(tree, el, moveTo) {
|
|
4826
|
+
const focusableItems = Array.from(tree.querySelectorAll('p'))
|
|
4827
|
+
.filter(item => item.offsetWidth > 0 && item.offsetHeight > 0);
|
|
4828
|
+
let index = 0;
|
|
4829
|
+
switch (moveTo) {
|
|
4830
|
+
case 'first':
|
|
4831
|
+
index = 0;
|
|
4832
|
+
break;
|
|
4833
|
+
case 'previous':
|
|
4834
|
+
index = focusableItems.indexOf(el) - 1;
|
|
4835
|
+
break;
|
|
4836
|
+
case 'next':
|
|
4837
|
+
index = focusableItems.indexOf(el) + 1;
|
|
4838
|
+
break;
|
|
4839
|
+
case 'last':
|
|
4840
|
+
index = focusableItems.length - 1;
|
|
4841
|
+
break;
|
|
4842
|
+
}
|
|
4843
|
+
TreeView.setFocus(tree, focusableItems[index]);
|
|
4844
|
+
}
|
|
4845
|
+
static expandItemOrFocusChild(tree, target) {
|
|
4846
|
+
var _a;
|
|
4847
|
+
if ((target === null || target === void 0 ? void 0 : target.getAttribute('aria-expanded')) === 'true') {
|
|
4848
|
+
TreeView.moveFocus(tree, target, 'next');
|
|
4849
|
+
}
|
|
4850
|
+
else {
|
|
4851
|
+
const controlElement = (_a = target.previousElementSibling) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
4852
|
+
if (controlElement instanceof HTMLElement) {
|
|
4853
|
+
controlElement.click();
|
|
4854
|
+
}
|
|
4855
|
+
}
|
|
4856
|
+
}
|
|
4857
|
+
static collapseItemOrFocusParent(tree, target) {
|
|
4858
|
+
var _a, _b, _c;
|
|
4859
|
+
if ((target === null || target === void 0 ? void 0 : target.getAttribute('aria-expanded')) === 'true') {
|
|
4860
|
+
const controlElement = (_a = target.previousElementSibling) === null || _a === void 0 ? void 0 : _a.firstElementChild;
|
|
4861
|
+
if (controlElement instanceof HTMLElement) {
|
|
4862
|
+
controlElement.click();
|
|
4863
|
+
}
|
|
4864
|
+
}
|
|
4865
|
+
else {
|
|
4866
|
+
const parentTarget = (_c = (_b = target === null || target === void 0 ? void 0 : target.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.previousElementSibling;
|
|
4867
|
+
if (parentTarget instanceof HTMLElement) {
|
|
4868
|
+
TreeView.setFocus(tree, parentTarget);
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4871
|
+
}
|
|
4872
|
+
static setFocusByFirstCharacter(tree, el, char, backwards) {
|
|
4873
|
+
const focusableItems = Array.from(tree.querySelectorAll('p'))
|
|
4874
|
+
.filter(item => item.offsetWidth > 0 && item.offsetHeight > 0);
|
|
4875
|
+
if (backwards) {
|
|
4876
|
+
focusableItems.reverse();
|
|
4877
|
+
}
|
|
4878
|
+
const current = focusableItems.indexOf(el);
|
|
4879
|
+
char = char.toLowerCase();
|
|
4880
|
+
let nextItem = focusableItems.find((item, index) => { var _a; return index > current && ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith(char)); });
|
|
4881
|
+
if (!nextItem) {
|
|
4882
|
+
nextItem = focusableItems.find((item, index) => { var _a; return index < current && ((_a = item.textContent) === null || _a === void 0 ? void 0 : _a.toLowerCase().startsWith(char)); });
|
|
4883
|
+
}
|
|
4884
|
+
if (nextItem) {
|
|
4885
|
+
TreeView.setFocus(tree, nextItem);
|
|
4886
|
+
return true;
|
|
4887
|
+
}
|
|
4888
|
+
return false;
|
|
4889
|
+
}
|
|
4890
|
+
render() {
|
|
4891
|
+
var _a;
|
|
4892
|
+
return (h("div", { id: "tree", class: "dso-tree", onKeyDown: (e) => this.keyDownListener(e) }, h("ul", { role: "tree", "aria-label": "Objectenboom" }, (_a = this.collection) === null || _a === void 0 ? void 0 : _a.map((item, index) => h(DsoTreeItem, { owner: this, ancestors: [], item: item, index: index, level: 1, setSize: this.collection.length })))));
|
|
4893
|
+
}
|
|
4894
|
+
static get style() { return treeViewCss; }
|
|
4895
|
+
};
|
|
4896
|
+
|
|
4593
4897
|
const DsoAlert = /*@__PURE__*/proxyCustomElement(Alert, [1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]);
|
|
4594
4898
|
const DsoAttachmentsCounter = /*@__PURE__*/proxyCustomElement(AttachmentsCounter, [1,"dso-attachments-counter",{"count":[2]}]);
|
|
4595
4899
|
const DsoAutosuggest = /*@__PURE__*/proxyCustomElement(Autosuggest, [6,"dso-autosuggest",{"suggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"showSuggestions":[32],"selectedSuggestion":[32]},[[4,"click","onDocumentClick"]]]);
|
|
4596
4900
|
const DsoBadge = /*@__PURE__*/proxyCustomElement(Badge, [1,"dso-badge",{"status":[1]}]);
|
|
4597
4901
|
const DsoBanner = /*@__PURE__*/proxyCustomElement(Banner, [1,"dso-banner",{"status":[1]}]);
|
|
4598
|
-
const DsoDatePicker = /*@__PURE__*/proxyCustomElement(DsoDatePicker$1, [1,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"value":[
|
|
4902
|
+
const DsoDatePicker = /*@__PURE__*/proxyCustomElement(DsoDatePicker$1, [1,"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]},[[6,"click","handleDocumentClick"]]]);
|
|
4599
4903
|
const DsoDropdownMenu = /*@__PURE__*/proxyCustomElement(DropdownMenu, [1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]);
|
|
4600
4904
|
const DsoHighlightBox = /*@__PURE__*/proxyCustomElement(HighlightBox, [1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]);
|
|
4601
4905
|
const DsoIcon = /*@__PURE__*/proxyCustomElement(Icon, [1,"dso-icon",{"icon":[1]}]);
|
|
4602
4906
|
const DsoInfo = /*@__PURE__*/proxyCustomElement(Info, [1,"dso-info",{"fixed":[516],"active":[516]}]);
|
|
4603
|
-
const DsoInfoButton = /*@__PURE__*/proxyCustomElement(InfoButton, [1,"dso-info-button",{"active":[1540],"label":[1]}]);
|
|
4907
|
+
const DsoInfoButton = /*@__PURE__*/proxyCustomElement(InfoButton, [1,"dso-info-button",{"active":[1540],"secondary":[4],"label":[1]}]);
|
|
4604
4908
|
const DsoLabel = /*@__PURE__*/proxyCustomElement(Label, [1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]);
|
|
4605
4909
|
const DsoMapBaseLayers = /*@__PURE__*/proxyCustomElement(MapBaseLayers, [1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]);
|
|
4606
4910
|
const DsoMapControls = /*@__PURE__*/proxyCustomElement(MapControls, [1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]);
|
|
@@ -4609,7 +4913,9 @@ const DsoOzonContent = /*@__PURE__*/proxyCustomElement(OzonContent, [0,"dso-ozon
|
|
|
4609
4913
|
const DsoProgressBar = /*@__PURE__*/proxyCustomElement(ProgressBar, [1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]);
|
|
4610
4914
|
const DsoProgressIndicator = /*@__PURE__*/proxyCustomElement(Progressindicator, [1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]);
|
|
4611
4915
|
const DsoSelectable = /*@__PURE__*/proxyCustomElement(Selectable, [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]}]);
|
|
4612
|
-
const
|
|
4916
|
+
const DsoToggletip = /*@__PURE__*/proxyCustomElement(Toggletip, [1,"dso-toggletip",{"label":[1],"position":[1],"small":[4],"secondary":[4],"active":[32]}]);
|
|
4917
|
+
const DsoTooltip = /*@__PURE__*/proxyCustomElement(Tooltip, [1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"stateless":[4],"small":[4],"active":[1540],"hidden":[32]},[[0,"click","listenClick"]]]);
|
|
4918
|
+
const DsoTreeView = /*@__PURE__*/proxyCustomElement(TreeView, [1,"dso-tree-view",{"collection":[16]}]);
|
|
4613
4919
|
const defineCustomElements = (opts) => {
|
|
4614
4920
|
if (typeof customElements !== 'undefined') {
|
|
4615
4921
|
[
|
|
@@ -4632,7 +4938,9 @@ const defineCustomElements = (opts) => {
|
|
|
4632
4938
|
DsoProgressBar,
|
|
4633
4939
|
DsoProgressIndicator,
|
|
4634
4940
|
DsoSelectable,
|
|
4635
|
-
|
|
4941
|
+
DsoToggletip,
|
|
4942
|
+
DsoTooltip,
|
|
4943
|
+
DsoTreeView
|
|
4636
4944
|
].forEach(cmp => {
|
|
4637
4945
|
if (!customElements.get(cmp.is)) {
|
|
4638
4946
|
customElements.define(cmp.is, cmp, opts);
|
|
@@ -4641,4 +4949,4 @@ const defineCustomElements = (opts) => {
|
|
|
4641
4949
|
}
|
|
4642
4950
|
};
|
|
4643
4951
|
|
|
4644
|
-
export { DsoAlert, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoDatePicker, DsoDropdownMenu, DsoHighlightBox, DsoIcon, DsoInfo, DsoInfoButton, DsoLabel, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoOzonContent, DsoProgressBar, DsoProgressIndicator, DsoSelectable, DsoTooltip, defineCustomElements };
|
|
4952
|
+
export { DsoAlert, DsoAttachmentsCounter, DsoAutosuggest, DsoBadge, DsoBanner, DsoDatePicker, DsoDropdownMenu, DsoHighlightBox, DsoIcon, DsoInfo, DsoInfoButton, DsoLabel, DsoMapBaseLayers, DsoMapControls, DsoMapOverlays, DsoOzonContent, DsoProgressBar, DsoProgressIndicator, DsoSelectable, DsoToggletip, DsoTooltip, DsoTreeView, defineCustomElements };
|