@dso-toolkit/core 29.0.1 → 31.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dso-alert.cjs.entry.js +1 -1
- package/dist/cjs/dso-autosuggest.cjs.entry.js +105 -75
- 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 +10 -0
- package/dist/collection/components/autosuggest/autosuggest.js +128 -98
- package/dist/collection/components/autosuggest/autosuggest.template.js +6 -6
- 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.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 +472 -145
- 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 +105 -75
- 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/autosuggest/autosuggest.d.ts +19 -20
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +3 -2
- 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.template.d.ts +2 -0
- package/dist/types/components.d.ts +95 -12
- package/package.json +2 -1
- package/dist/dso-toolkit/p-05a853b9.entry.js +0 -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-a2357726.entry.js +0 -1
- package/dist/dso-toolkit/p-c5acf7e2.entry.js +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-fcdfdd38.js');
|
|
6
6
|
const clsx_m = require('./clsx.m-b00fa5e1.js');
|
|
7
7
|
|
|
8
|
-
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}";
|
|
8
|
+
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}";
|
|
9
9
|
|
|
10
10
|
let Alert = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -74,90 +74,77 @@ debounce.debounce = debounce;
|
|
|
74
74
|
|
|
75
75
|
var debounce_1 = debounce;
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
function escapeStringRegexp(string) {
|
|
78
|
+
if (typeof string !== 'string') {
|
|
79
|
+
throw new TypeError('Expected a string');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Escape characters with special meaning either inside or outside character sets.
|
|
83
|
+
// 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.
|
|
84
|
+
return string
|
|
85
|
+
.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
|
|
86
|
+
.replace(/-/g, '\\x2d');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
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}";
|
|
78
90
|
|
|
79
91
|
let Autosuggest = class {
|
|
80
92
|
constructor(hostRef) {
|
|
81
93
|
index.registerInstance(this, hostRef);
|
|
82
|
-
this.
|
|
94
|
+
this.selectEmitter = index.createEvent(this, "dsoSelect", 7);
|
|
95
|
+
this.changeEmitter = index.createEvent(this, "dsoChange", 7);
|
|
96
|
+
/**
|
|
97
|
+
* The suggestions for the value of the slotted input element
|
|
98
|
+
*/
|
|
99
|
+
this.suggestions = [];
|
|
83
100
|
/**
|
|
84
101
|
* Whether the previous suggestions will be presented when the input gets focus again.
|
|
85
102
|
*/
|
|
86
103
|
this.suggestOnFocus = false;
|
|
87
|
-
this.suggestions = [];
|
|
88
|
-
this.selectedIndex = -1;
|
|
89
|
-
this.terms = [];
|
|
90
104
|
this.showSuggestions = false;
|
|
91
105
|
this.listboxId = v4.v4();
|
|
92
106
|
this.inputId = v4.v4();
|
|
93
107
|
this.labelId = v4.v4();
|
|
94
|
-
this.
|
|
95
|
-
.then((result) => {
|
|
96
|
-
this.suggestions = result.map((suggestion, index) => ({
|
|
97
|
-
value: suggestion.value,
|
|
98
|
-
type: suggestion.type,
|
|
99
|
-
selected: false,
|
|
100
|
-
id: `${index}-${this.inputId}`,
|
|
101
|
-
}));
|
|
102
|
-
this.terms = terms;
|
|
103
|
-
this.openSuggestions();
|
|
104
|
-
})
|
|
105
|
-
.catch(() => {
|
|
106
|
-
this.closeSuggestions();
|
|
107
|
-
this.suggestions = [];
|
|
108
|
-
}), 200);
|
|
108
|
+
this.debouncedEmitValue = debounce_1((value) => this.changeEmitter.emit(value), 200);
|
|
109
109
|
this.onInput = (event) => {
|
|
110
|
-
var _a;
|
|
111
110
|
if (!(event.target instanceof HTMLInputElement)) {
|
|
112
|
-
throw new Error("event.target not
|
|
111
|
+
throw new Error("event.target is not instanceof HTMLInputElement");
|
|
113
112
|
}
|
|
114
|
-
this.
|
|
113
|
+
this.debouncedEmitValue(event.target.value.match(/(\S+)/g) ? event.target.value : '');
|
|
115
114
|
};
|
|
116
115
|
this.onFocusIn = () => {
|
|
117
116
|
if (this.suggestOnFocus) {
|
|
118
117
|
this.openSuggestions();
|
|
119
118
|
}
|
|
120
119
|
};
|
|
121
|
-
this.onMouseEnterOption = (event) => {
|
|
122
|
-
if (event.target instanceof HTMLElement) {
|
|
123
|
-
const id = event.target.id;
|
|
124
|
-
this.setSelectedSuggestion(this.suggestions.findIndex((s) => s.id == id));
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
this.onMouseLeaveOption = () => {
|
|
128
|
-
this.setSelectedSuggestion(-1);
|
|
129
|
-
};
|
|
130
|
-
this.onClickOption = () => {
|
|
131
|
-
this.pickSelectedValue();
|
|
132
|
-
};
|
|
133
120
|
this.onKeyDown = (event) => {
|
|
134
121
|
if (event.defaultPrevented) {
|
|
135
122
|
return;
|
|
136
123
|
}
|
|
137
124
|
switch (event.key) {
|
|
138
|
-
case
|
|
125
|
+
case 'ArrowDown':
|
|
139
126
|
if (!this.showSuggestions) {
|
|
140
|
-
this.openSuggestions();
|
|
127
|
+
this.openSuggestions('first');
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
this.selectNextSuggestion();
|
|
141
131
|
}
|
|
142
|
-
this.setSelectedSuggestion(this.selectedIndex >= this.suggestions.length - 1
|
|
143
|
-
? 0
|
|
144
|
-
: this.selectedIndex + 1);
|
|
145
132
|
break;
|
|
146
|
-
case
|
|
133
|
+
case 'ArrowUp':
|
|
147
134
|
if (!this.showSuggestions) {
|
|
148
|
-
this.openSuggestions();
|
|
135
|
+
this.openSuggestions('last');
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
this.selectPreviousSuggestion();
|
|
149
139
|
}
|
|
150
|
-
this.setSelectedSuggestion(this.selectedIndex <= 0
|
|
151
|
-
? this.suggestions.length - 1
|
|
152
|
-
: this.selectedIndex - 1);
|
|
153
140
|
break;
|
|
154
|
-
case
|
|
141
|
+
case 'Tab':
|
|
155
142
|
this.closeSuggestions();
|
|
156
143
|
return;
|
|
157
|
-
case
|
|
144
|
+
case 'Escape':
|
|
158
145
|
this.closeSuggestions();
|
|
159
146
|
break;
|
|
160
|
-
case
|
|
147
|
+
case 'Enter':
|
|
161
148
|
this.pickSelectedValue();
|
|
162
149
|
break;
|
|
163
150
|
default:
|
|
@@ -166,6 +153,15 @@ let Autosuggest = class {
|
|
|
166
153
|
event.preventDefault();
|
|
167
154
|
};
|
|
168
155
|
}
|
|
156
|
+
suggestionsWatcher() {
|
|
157
|
+
this.resetSelectedSuggestion();
|
|
158
|
+
if (!this.showSuggestions && this.suggestions.length > 0) {
|
|
159
|
+
this.openSuggestions();
|
|
160
|
+
}
|
|
161
|
+
else if (this.showSuggestions && this.suggestions.length === 0) {
|
|
162
|
+
this.closeSuggestions();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
169
165
|
onDocumentClick(event) {
|
|
170
166
|
if (this.showSuggestions &&
|
|
171
167
|
this.listbox &&
|
|
@@ -176,7 +172,7 @@ let Autosuggest = class {
|
|
|
176
172
|
}
|
|
177
173
|
}
|
|
178
174
|
connectedCallback() {
|
|
179
|
-
const input = this.host.
|
|
175
|
+
const input = this.host.querySelector('input[type="text"]');
|
|
180
176
|
if (!(input instanceof HTMLInputElement)) {
|
|
181
177
|
throw new ReferenceError("Mandatory text input not found");
|
|
182
178
|
}
|
|
@@ -214,61 +210,95 @@ let Autosuggest = class {
|
|
|
214
210
|
this.input.removeEventListener("focusin", this.onFocusIn);
|
|
215
211
|
}
|
|
216
212
|
markTerms(suggestionValue, terms) {
|
|
217
|
-
if (!suggestionValue || !terms || terms.length
|
|
218
|
-
return [
|
|
213
|
+
if (!suggestionValue || !terms || terms.length === 0) {
|
|
214
|
+
return [''];
|
|
219
215
|
}
|
|
220
|
-
const termRegex = new RegExp(`(${terms[0]})`,
|
|
216
|
+
const termRegex = new RegExp(`(${escapeStringRegexp(terms[0])})`, 'gi');
|
|
221
217
|
return suggestionValue.split(termRegex).map((valuePart) => {
|
|
222
218
|
if (!valuePart) {
|
|
223
|
-
return
|
|
219
|
+
return '';
|
|
224
220
|
}
|
|
225
221
|
if (termRegex.test(valuePart)) {
|
|
226
222
|
return index.h("mark", null, valuePart);
|
|
227
223
|
}
|
|
228
|
-
if (terms.length
|
|
224
|
+
if (terms.length === 1) {
|
|
229
225
|
return index.h("span", null, valuePart);
|
|
230
226
|
}
|
|
231
227
|
return this.markTerms(valuePart, terms.slice(1));
|
|
232
228
|
});
|
|
233
229
|
}
|
|
234
|
-
|
|
235
|
-
this.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
230
|
+
selectSuggestion(suggestion) {
|
|
231
|
+
this.selectedSuggestion = suggestion;
|
|
232
|
+
this.input.setAttribute("aria-activedescendant", this.listboxItemId(suggestion));
|
|
233
|
+
}
|
|
234
|
+
selectFirstSuggestion() {
|
|
235
|
+
this.selectedSuggestion = this.suggestions[0];
|
|
236
|
+
if (this.selectedSuggestion) {
|
|
237
|
+
this.input.setAttribute('aria-activedescendant', this.listboxItemId(this.selectedSuggestion));
|
|
239
238
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
239
|
+
}
|
|
240
|
+
selectLastSuggestion() {
|
|
241
|
+
this.selectedSuggestion = this.suggestions[this.suggestions.length - 1];
|
|
242
|
+
if (this.selectedSuggestion) {
|
|
243
|
+
this.input.setAttribute('aria-activedescendant', this.listboxItemId(this.selectedSuggestion));
|
|
244
244
|
}
|
|
245
|
-
this.suggestions = [...this.suggestions];
|
|
246
245
|
}
|
|
247
|
-
|
|
246
|
+
selectNextSuggestion() {
|
|
247
|
+
var _a;
|
|
248
|
+
const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : -1;
|
|
249
|
+
this.selectedSuggestion = (_a = this.suggestions[index + 1]) !== null && _a !== void 0 ? _a : this.suggestions[0];
|
|
250
|
+
if (this.selectedSuggestion) {
|
|
251
|
+
this.input.setAttribute('aria-activedescendant', this.listboxItemId(this.selectedSuggestion));
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
selectPreviousSuggestion() {
|
|
255
|
+
var _a;
|
|
256
|
+
const index = this.selectedSuggestion ? this.suggestions.indexOf(this.selectedSuggestion) : 0;
|
|
257
|
+
this.selectedSuggestion = (_a = this.suggestions[index - 1]) !== null && _a !== void 0 ? _a : this.suggestions[this.suggestions.length - 1];
|
|
258
|
+
if (this.selectedSuggestion) {
|
|
259
|
+
this.input.setAttribute('aria-activedescendant', this.listboxItemId(this.selectedSuggestion));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
resetSelectedSuggestion() {
|
|
263
|
+
this.selectedSuggestion = undefined;
|
|
264
|
+
this.input.setAttribute('aria-activedescendant', '');
|
|
265
|
+
}
|
|
266
|
+
openSuggestions(selectSuggestion) {
|
|
248
267
|
this.showSuggestions = this.suggestions.length > 0;
|
|
249
|
-
this.input.setAttribute("aria-expanded",
|
|
250
|
-
|
|
268
|
+
this.input.setAttribute("aria-expanded", this.showSuggestions.toString());
|
|
269
|
+
if (selectSuggestion === 'first') {
|
|
270
|
+
this.selectFirstSuggestion();
|
|
271
|
+
}
|
|
272
|
+
else if (selectSuggestion === 'last') {
|
|
273
|
+
this.selectLastSuggestion();
|
|
274
|
+
}
|
|
251
275
|
}
|
|
252
276
|
closeSuggestions() {
|
|
253
277
|
this.showSuggestions = false;
|
|
254
278
|
this.input.setAttribute("aria-expanded", "false");
|
|
255
|
-
this.
|
|
279
|
+
this.selectFirstSuggestion();
|
|
256
280
|
}
|
|
257
281
|
pickSelectedValue() {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
this.input.value = this.suggestions[this.selectedIndex].value;
|
|
261
|
-
(_a = this.selected) === null || _a === void 0 ? void 0 : _a.emit(this.input.value);
|
|
282
|
+
if (this.selectedSuggestion) {
|
|
283
|
+
this.selectEmitter.emit(this.selectedSuggestion);
|
|
262
284
|
}
|
|
263
|
-
this.suggestions = [];
|
|
264
285
|
this.closeSuggestions();
|
|
265
286
|
}
|
|
287
|
+
listboxItemId(suggestion) {
|
|
288
|
+
return `${this.inputId}-${this.suggestions.indexOf(suggestion) + 1}`;
|
|
289
|
+
}
|
|
266
290
|
render() {
|
|
267
|
-
|
|
268
|
-
|
|
291
|
+
const terms = this.input.value.split(' ').filter(t => t);
|
|
292
|
+
return (index.h(index.Fragment, null, index.h("slot", null), index.h("ul", { role: "listbox", id: this.listboxId, "aria-labelledby": this.labelId, ref: element => this.listbox = element, hidden: !this.showSuggestions }, this.showSuggestions
|
|
293
|
+
? this.suggestions.map((suggestion) => (index.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 }, index.h("span", { class: "value" }, this.markTerms(suggestion.value, terms)), suggestion.type
|
|
294
|
+
? (index.h("span", { class: "type" }, suggestion.type))
|
|
295
|
+
: undefined)))
|
|
269
296
|
: undefined)));
|
|
270
297
|
}
|
|
271
298
|
get host() { return index.getElement(this); }
|
|
299
|
+
static get watchers() { return {
|
|
300
|
+
"suggestions": ["suggestionsWatcher"]
|
|
301
|
+
}; }
|
|
272
302
|
};
|
|
273
303
|
Autosuggest.style = autosuggestCss;
|
|
274
304
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-fcdfdd38.js');
|
|
6
6
|
const clsx_m = require('./clsx.m-b00fa5e1.js');
|
|
7
7
|
|
|
8
|
-
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}";
|
|
8
|
+
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}";
|
|
9
9
|
|
|
10
10
|
let Banner = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -51,9 +51,9 @@ function printDutchDate(date) {
|
|
|
51
51
|
if (!date) {
|
|
52
52
|
return '';
|
|
53
53
|
}
|
|
54
|
-
var d = date.getDate().toString(10);
|
|
55
|
-
var m = (date.getMonth() + 1).toString(10);
|
|
56
|
-
var y = date.getFullYear().toString(10);
|
|
54
|
+
var d = date.getDate().toString(10).padStart(2, '0');
|
|
55
|
+
var m = (date.getMonth() + 1).toString(10).padStart(2, '0');
|
|
56
|
+
var y = date.getFullYear().toString(10).padStart(2, '0');
|
|
57
57
|
return `${d}-${m}-${y}`;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
@@ -202,7 +202,7 @@ const localization = {
|
|
|
202
202
|
nextMonthLabel: 'Volgende maand',
|
|
203
203
|
monthSelectLabel: 'Maand',
|
|
204
204
|
yearSelectLabel: 'Jaar',
|
|
205
|
-
closeLabel: '
|
|
205
|
+
closeLabel: 'Sluiten',
|
|
206
206
|
keyboardInstruction: 'Gebruik de pijltjestoetsen om een dag te kiezen',
|
|
207
207
|
calendarHeading: 'Kies een datum',
|
|
208
208
|
dayNames: [
|
|
@@ -273,6 +273,8 @@ let DsoDatePicker = class {
|
|
|
273
273
|
index.registerInstance(this, hostRef);
|
|
274
274
|
this.dateChange = index.createEvent(this, "dateChange", 7);
|
|
275
275
|
this.dsoBlur = index.createEvent(this, "dsoBlur", 7);
|
|
276
|
+
this.dsoKeyUp = index.createEvent(this, "dsoKeyUp", 7);
|
|
277
|
+
this.dsoKeyDown = index.createEvent(this, "dsoKeyDown", 7);
|
|
276
278
|
this.dsoFocus = index.createEvent(this, "dsoFocus", 7);
|
|
277
279
|
/**
|
|
278
280
|
* Own Properties
|
|
@@ -310,6 +312,10 @@ let DsoDatePicker = class {
|
|
|
310
312
|
* Should the input be marked as required?
|
|
311
313
|
*/
|
|
312
314
|
this.required = false;
|
|
315
|
+
/**
|
|
316
|
+
* Should the input be focused on load?
|
|
317
|
+
*/
|
|
318
|
+
this.dsoAutofocus = false;
|
|
313
319
|
/**
|
|
314
320
|
* Date value. Must be in Dutch date format: DD-MM-YYYY.
|
|
315
321
|
*/
|
|
@@ -338,6 +344,20 @@ let DsoDatePicker = class {
|
|
|
338
344
|
component: "dso-date-picker",
|
|
339
345
|
});
|
|
340
346
|
};
|
|
347
|
+
this.handleKeyUp = (event) => {
|
|
348
|
+
event.stopPropagation();
|
|
349
|
+
this.dsoKeyUp.emit({
|
|
350
|
+
component: "dso-date-picker",
|
|
351
|
+
originalEvent: event
|
|
352
|
+
});
|
|
353
|
+
};
|
|
354
|
+
this.handleKeyDown = (event) => {
|
|
355
|
+
event.stopPropagation();
|
|
356
|
+
this.dsoKeyDown.emit({
|
|
357
|
+
component: "dso-date-picker",
|
|
358
|
+
originalEvent: event
|
|
359
|
+
});
|
|
360
|
+
};
|
|
341
361
|
this.handleFocus = (event) => {
|
|
342
362
|
event.stopPropagation();
|
|
343
363
|
this.dsoFocus.emit({
|
|
@@ -458,12 +478,8 @@ let DsoDatePicker = class {
|
|
|
458
478
|
};
|
|
459
479
|
this.handleInputChange = (e) => {
|
|
460
480
|
const target = e.target;
|
|
461
|
-
// clean up any invalid characters
|
|
462
481
|
target.value = target.value.replace(DISALLOWED_CHARACTERS, "");
|
|
463
|
-
|
|
464
|
-
if (parsed || target.value === "") {
|
|
465
|
-
this.setValue(parsed);
|
|
466
|
-
}
|
|
482
|
+
this.setValue(target.value);
|
|
467
483
|
};
|
|
468
484
|
this.processFocusedDayNode = (element) => {
|
|
469
485
|
this.focusedDayNode = element;
|
|
@@ -555,13 +571,37 @@ let DsoDatePicker = class {
|
|
|
555
571
|
setFocusedDay(day) {
|
|
556
572
|
this.focusedDay = clamp(day, parseDutchDate(this.min), parseDutchDate(this.max));
|
|
557
573
|
}
|
|
558
|
-
setValue(
|
|
559
|
-
|
|
560
|
-
this.dateChange.emit({
|
|
574
|
+
setValue(value) {
|
|
575
|
+
var event = {
|
|
561
576
|
component: "dso-date-picker",
|
|
562
|
-
value:
|
|
563
|
-
valueAsDate:
|
|
564
|
-
}
|
|
577
|
+
value: "",
|
|
578
|
+
valueAsDate: undefined
|
|
579
|
+
};
|
|
580
|
+
if (value instanceof Date) {
|
|
581
|
+
event.valueAsDate = value;
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
event.value = value;
|
|
585
|
+
event.valueAsDate = parseDutchDate(value);
|
|
586
|
+
}
|
|
587
|
+
if (event.valueAsDate) {
|
|
588
|
+
event.value = this.value = printDutchDate(event.valueAsDate);
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
this.value = "";
|
|
592
|
+
}
|
|
593
|
+
if (!event.valueAsDate && this.required) {
|
|
594
|
+
event.error = "required";
|
|
595
|
+
}
|
|
596
|
+
if (event.value && !event.valueAsDate) {
|
|
597
|
+
event.error = "invalid";
|
|
598
|
+
}
|
|
599
|
+
this.dateChange.emit(event);
|
|
600
|
+
}
|
|
601
|
+
componentDidLoad() {
|
|
602
|
+
if (this.dsoAutofocus) {
|
|
603
|
+
this.setFocus();
|
|
604
|
+
}
|
|
565
605
|
}
|
|
566
606
|
/**
|
|
567
607
|
* render() function
|
|
@@ -585,7 +625,7 @@ let DsoDatePicker = class {
|
|
|
585
625
|
if (maxDate) {
|
|
586
626
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
587
627
|
}
|
|
588
|
-
return (index.h(index.Host, null, index.h("div", { class: "dso-date" }, index.h("div", { class: "dso-date__input-wrapper" }, index.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) }), index.h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, index.h("span", { class: "dso-date__toggle-icon" }, index.h("dso-icon", { icon: "calendar" })), index.h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (index.h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), index.h("div", { class: {
|
|
628
|
+
return (index.h(index.Host, null, index.h("div", { class: "dso-date" }, index.h("div", { class: "dso-date__input-wrapper" }, index.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) }), index.h("button", { type: "button", class: "dso-date__toggle", onClick: this.toggleOpen, disabled: this.disabled, ref: element => (this.datePickerButton = element) }, index.h("span", { class: "dso-date__toggle-icon" }, index.h("dso-icon", { icon: "calendar" })), index.h("span", { class: "dso-date__vhidden" }, this.localization.buttonLabel, formattedDate && (index.h("span", null, ", ", this.localization.selectedDateMessage, " ", formattedDate))))), index.h("div", { class: {
|
|
589
629
|
"dso-date__dialog": true,
|
|
590
630
|
"is-left": this.direction === "left",
|
|
591
631
|
"is-active": this.open,
|
|
@@ -562,11 +562,13 @@ let Icon = class {
|
|
|
562
562
|
index.registerInstance(this, hostRef);
|
|
563
563
|
}
|
|
564
564
|
render() {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
if (this.icon) {
|
|
566
|
+
const icon = icons.find(i => i.alias === this.icon);
|
|
567
|
+
if (!icon) {
|
|
568
|
+
throw new TypeError(`Unknown svg: ${this.icon}`);
|
|
569
|
+
}
|
|
570
|
+
return index.h("span", { class: "icon-container", innerHTML: icon.svg });
|
|
568
571
|
}
|
|
569
|
-
return index.h("span", { class: "icon-container", innerHTML: icon.svg });
|
|
570
572
|
}
|
|
571
573
|
};
|
|
572
574
|
Icon.style = iconCss;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-fcdfdd38.js');
|
|
6
|
+
const clsx_m = require('./clsx.m-b00fa5e1.js');
|
|
7
|
+
|
|
8
|
+
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)}";
|
|
9
|
+
|
|
10
|
+
let InfoButton = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.toggle = index.createEvent(this, "toggle", 7);
|
|
14
|
+
this.label = 'Toelichting bij optie';
|
|
15
|
+
}
|
|
16
|
+
handleToggle(e) {
|
|
17
|
+
this.active = !this.active;
|
|
18
|
+
this.toggle.emit({ originalEvent: e, active: this.active });
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
return (index.h("button", { type: "button", class: clsx_m.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) }, index.h("span", { class: "sr-only" }, this.label)));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
InfoButton.style = infoButtonCss;
|
|
25
|
+
|
|
26
|
+
exports.dso_info_button = InfoButton;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-fcdfdd38.js');
|
|
6
|
-
const clsx_m = require('./clsx.m-b00fa5e1.js');
|
|
7
6
|
const createIdentifier = require('./create-identifier-fa070b11.js');
|
|
8
7
|
|
|
9
8
|
const infoCss = ":host{--di-times-bosgroen:url(\"data:image/svg+xml,%3csvg id='times' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' style='color: %23275937%3b'%3e %3cpath fill='currentColor' d='M13.36%2c12l3.3-3.3A1%2c1%2c0%2c1%2c0%2c15.3%2c7.34L12%2c10.64%2c8.7%2c7.34A1%2c1%2c0%2c1%2c0%2c7.34%2c8.7l3.3%2c3.3-3.3%2c3.3A1%2c1%2c0%2c1%2c0%2c8.7%2c16.66l3.3-3.3%2c3.3%2c3.3a1%2c1%2c0%2c1%2c0%2c1.36-1.36Z'/%3e %3c/svg%3e\");display:block;background-color:#e5e5e5;padding:16px 32px 16px 16px;position:relative}:host>button{background-color:transparent;border-style:none;padding:0;position:absolute;right:0;top:0}:host>button::before{background:var(--dso-icon, var(--di-times-bosgroen)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:inline-block}:host(:not([active]):not([fixed])){display:none}*,*::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}";
|
|
@@ -19,24 +18,6 @@ let Info = class {
|
|
|
19
18
|
};
|
|
20
19
|
Info.style = infoCss;
|
|
21
20
|
|
|
22
|
-
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:1.5em;vertical-align:top;width:1.5em;border:1px solid transparent;margin-left:8px;min-width:16px;padding:0}button.dso-open,button:hover,button:active{--dso-icon:var(--di-info-active)}";
|
|
23
|
-
|
|
24
|
-
let InfoButton = class {
|
|
25
|
-
constructor(hostRef) {
|
|
26
|
-
index.registerInstance(this, hostRef);
|
|
27
|
-
this.toggle = index.createEvent(this, "toggle", 7);
|
|
28
|
-
this.label = 'Toelichting bij optie';
|
|
29
|
-
}
|
|
30
|
-
handleToggle(e) {
|
|
31
|
-
this.active = !this.active;
|
|
32
|
-
this.toggle.emit({ originalEvent: e, active: this.active });
|
|
33
|
-
}
|
|
34
|
-
render() {
|
|
35
|
-
return (index.h("button", { type: "button", class: clsx_m.clsx('btn', { 'dso-open': !!this.active }), "aria-expanded": typeof this.active === 'boolean' ? this.active.toString() : undefined, onClick: e => this.handleToggle(e) }, index.h("span", { class: "sr-only" }, this.label)));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
InfoButton.style = infoButtonCss;
|
|
39
|
-
|
|
40
21
|
const selectableCss = ":host{display:block;padding:0 0 0 32px;position:relative}:host .dso-selectable-options{list-style:none;margin-top:8px;padding-left:0}:host .dso-selectable-options li+li{margin-top:8px}:host label{font-weight:400;line-height:24px;margin:0}:host input[type=checkbox][disabled]+label::before,:host input[type=checkbox][disabled]:active+label::before,:host input[type=checkbox][disabled]:focus+label::before,:host input[type=radio][disabled]+label::before,:host input[type=radio][disabled]:active+label::before,:host input[type=radio][disabled]:focus+label::before{background-color:#fff;box-shadow:0 0 0 2px #e5e5e5}:host input[type=checkbox],:host input[type=radio]{height:24px;left:0;margin:0;opacity:0;position:absolute;top:0;width:24px;z-index:1;zoom:1}:host input[type=checkbox]:not([disabled]),:host input[type=radio]:not([disabled]){cursor:pointer}:host input[type=checkbox]+label,:host input[type=radio]+label{display:inline;font-style:normal;padding-left:0}:host input[type=checkbox]+label::before,:host input[type=radio]+label::before{background:#fff;border:0;box-shadow:0 0 0 2px var(--dso-selectable-color, #275937);content:\"\";height:20px;left:2px;position:absolute;top:2px;width:20px}:host input[type=checkbox]:focus,:host input[type=radio]:focus{outline:0}:host input[type=checkbox]:focus+label::before,:host input[type=radio]:focus+label::before{box-shadow:0 0 0 3px var(--dso-selectable-color, #275937);height:18px;left:3px;top:3px;width:18px}:host input[type=checkbox]:active+label::before,:host input[type=checkbox].active+label::before,:host input[type=radio]:active+label::before,:host input[type=radio].active+label::before{background-color:#ebf3e6;box-shadow:0 0 0 1px #275937;height:22px;left:1px;top:1px;width:22px}:host input[type=checkbox]+label::before{border-radius:4px}:host input[type=checkbox]+label::after{background:transparent;content:\"\";left:6px;opacity:0;position:absolute;top:6px;zoom:1}:host input[type=checkbox]:checked+label::after,:host input[type=checkbox]:indeterminate+label::after{opacity:1}:host input[type=checkbox]:checked+label::after{border:solid;border-color:var(--dso-selectable-color, #39870c);border-top-color:transparent;border-width:0 0 3px 3px;height:8px;transform:rotate(-45deg);width:13px}:host input[type=checkbox]:indeterminate+label::after{background-color:var(--dso-selectable-color, #39870c);height:12px;width:12px}:host input[type=radio]+label::before{border-radius:50%}:host input[type=radio]+label::after{background-color:transparent;border-radius:50%;content:\"\";height:12px;left:6px;opacity:0;position:absolute;top:6px;width:12px;zoom:1}:host input[type=radio]:checked+label::after{background-color:var(--dso-selectable-color, #39870c);opacity:1}:host>dso-info{float:none;margin:8px 16px 0 -32px;width:calc(100% + 32px)}:host(:not(:last-child)){margin-bottom:8px}*,*::after,*::before{box-sizing:border-box}";
|
|
41
22
|
|
|
42
23
|
let Selectable = class {
|
|
@@ -82,5 +63,4 @@ let Selectable = class {
|
|
|
82
63
|
Selectable.style = selectableCss;
|
|
83
64
|
|
|
84
65
|
exports.dso_info = Info;
|
|
85
|
-
exports.dso_info_button = InfoButton;
|
|
86
66
|
exports.dso_selectable = Selectable;
|
|
@@ -14,7 +14,7 @@ let Label = class {
|
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
16
|
const status = this.status && Label.statusMap.get(this.status);
|
|
17
|
-
return (index.h("span", { class: clsx_m.clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) }, status && (index.h("span", { class: "sr-only" }, status, ": ")), index.h("slot", null), this.removable && (index.h("button", { type: "button", onClick: e => this.removeClick.emit(e), title: "Verwijder", onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false }, index.h("dso-icon", { icon: "times" })))));
|
|
17
|
+
return (index.h("span", { class: clsx_m.clsx('dso-label', { [`dso-label-${this.status}`]: this.status, 'dso-compact': this.compact && !this.removable, 'dso-hover': this.hover }) }, index.h("slot", { name: "symbol" }), status && (index.h("span", { class: "sr-only" }, status, ": ")), index.h("slot", null), this.removable && (index.h("button", { type: "button", onClick: e => this.removeClick.emit(e), title: "Verwijder", onMouseEnter: () => this.hover = true, onMouseLeave: () => this.hover = false }, index.h("dso-icon", { icon: "times" })))));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
Label.statusMap = new Map([
|
|
@@ -318,21 +318,34 @@ function isURL(url, options) {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
function transformDescriptionNote(body) {
|
|
321
|
-
body.querySelectorAll('
|
|
322
|
-
const contentElement =
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
body.querySelectorAll('div.noot').forEach((nootElement, index) => {
|
|
322
|
+
const contentElement = nootElement.nextElementSibling;
|
|
323
|
+
if (!(contentElement instanceof HTMLDivElement && contentElement.classList.value === 'noot_popup')) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const nootAnchorElement = nootElement.querySelector('a');
|
|
327
|
+
if (!(nootAnchorElement instanceof HTMLAnchorElement)) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
const contentAlElement = contentElement.querySelector(':scope > .od-Al');
|
|
331
|
+
if (!(contentAlElement instanceof HTMLDivElement && contentAlElement.classList.value === 'od-Al')) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
nootElement.replaceWith(...Array.from(nootElement.childNodes));
|
|
335
|
+
const contentWrapper = document.createElement('div');
|
|
336
|
+
contentWrapper.replaceChildren(...Array.from(contentAlElement.childNodes));
|
|
337
|
+
contentAlElement.replaceChildren(contentWrapper);
|
|
338
|
+
contentElement.replaceWith(contentAlElement);
|
|
325
339
|
const supElement = document.createElement('sup');
|
|
326
|
-
supElement.replaceChildren(...Array.from(
|
|
327
|
-
|
|
328
|
-
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.after(contentElement);
|
|
329
|
-
ozonPopupElement === null || ozonPopupElement === void 0 ? void 0 : ozonPopupElement.remove();
|
|
340
|
+
supElement.replaceChildren(...Array.from(nootAnchorElement.childNodes));
|
|
341
|
+
nootAnchorElement.replaceChildren(supElement);
|
|
330
342
|
const id = (index + 1).toString(10);
|
|
331
343
|
const [termId, contentId] = [`dso-ozon-term-${id}`, `dso-ozon-content-${id}`];
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
344
|
+
nootAnchorElement.setAttribute('href', `#${termId}`);
|
|
345
|
+
nootAnchorElement.setAttribute('id', termId);
|
|
346
|
+
nootAnchorElement.setAttribute('aria-controls', contentId);
|
|
347
|
+
nootAnchorElement.setAttribute('aria-expanded', 'false');
|
|
348
|
+
contentAlElement === null || contentAlElement === void 0 ? void 0 : contentAlElement.setAttribute('id', contentId);
|
|
336
349
|
});
|
|
337
350
|
return body;
|
|
338
351
|
}
|
|
@@ -402,7 +415,7 @@ class OzonContentTransformer {
|
|
|
402
415
|
return false;
|
|
403
416
|
}
|
|
404
417
|
// require_tld: false is needed to allow http://localhost
|
|
405
|
-
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 }); });
|
|
418
|
+
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 }); });
|
|
406
419
|
}
|
|
407
420
|
isHostElement(value) {
|
|
408
421
|
return value instanceof HTMLElement && value.tagName === 'DSO-OZON-CONTENT';
|