@dso-toolkit/core 45.2.0 → 46.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/clsx.m-b81c6b86.js +5 -0
- package/dist/cjs/{create-identifier-fa070b11.js → create-identifier-6ee2a08b.js} +1 -3
- package/dist/cjs/dso-accordion-section.cjs.entry.js +37 -33
- package/dist/cjs/dso-accordion.cjs.entry.js +17 -19
- package/dist/cjs/dso-alert.cjs.entry.js +10 -8
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +4 -3
- package/dist/cjs/dso-autosuggest.cjs.entry.js +36 -61
- package/dist/cjs/dso-badge.cjs.entry.js +5 -4
- package/dist/cjs/dso-banner.cjs.entry.js +5 -4
- package/dist/cjs/dso-date-picker.cjs.entry.js +88 -128
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +9 -21
- package/dist/cjs/dso-header.cjs.entry.js +23 -29
- package/dist/cjs/dso-helpcenter-panel.cjs.entry.js +22 -21
- package/dist/cjs/dso-highlight-box.cjs.entry.js +16 -11
- package/dist/cjs/dso-icon.cjs.entry.js +389 -385
- package/dist/cjs/dso-image-overlay.cjs.entry.js +13 -13
- package/dist/cjs/dso-info-button.cjs.entry.js +7 -5
- package/dist/cjs/dso-info_2.cjs.entry.js +22 -9
- package/dist/cjs/dso-label.cjs.entry.js +30 -18
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +7 -8
- package/dist/cjs/dso-map-controls.cjs.entry.js +10 -8
- package/dist/cjs/dso-map-overlays.cjs.entry.js +7 -8
- package/dist/cjs/dso-modal.cjs.entry.js +62 -0
- package/dist/cjs/dso-ozon-content.cjs.entry.js +110 -146
- package/dist/cjs/dso-pagination.cjs.entry.js +22 -28
- package/dist/cjs/dso-progress-bar.cjs.entry.js +3 -2
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +11 -8
- package/dist/cjs/dso-responsive-element.cjs.entry.js +13 -10
- package/dist/cjs/dso-table.cjs.entry.js +17 -17
- package/dist/cjs/dso-toggletip.cjs.entry.js +9 -7
- package/dist/cjs/dso-toolkit.cjs.js +3 -3
- package/dist/cjs/dso-tooltip.cjs.entry.js +103 -104
- package/dist/cjs/dso-tree-view.cjs.entry.js +39 -44
- package/dist/cjs/dso-viewer-grid.cjs.entry.js +31 -32
- package/dist/cjs/{focus-trap.esm-e2addb10.js → focus-trap.esm-d83fd673.js} +1 -1
- package/dist/cjs/{index-4066351a.js → index-ecec64a0.js} +486 -500
- package/dist/cjs/{index.esm-50325ea2.js → index.esm-03a9e0b4.js} +50 -112
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/v4-abb5dc0c.js +68 -0
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/accordion/accordion.js +183 -174
- package/dist/collection/components/accordion/components/accordion-section.css +19 -11
- package/dist/collection/components/accordion/components/accordion-section.js +211 -211
- package/dist/collection/components/alert/alert.js +58 -53
- package/dist/collection/components/attachments-counter/attachments-counter.js +36 -33
- package/dist/collection/components/autosuggest/autosuggest.js +223 -240
- package/dist/collection/components/badge/badge.js +37 -29
- package/dist/collection/components/banner/banner.js +37 -29
- package/dist/collection/components/date-picker/date-localization.js +24 -45
- package/dist/collection/components/date-picker/date-picker-day.js +3 -5
- package/dist/collection/components/date-picker/date-picker-month.js +2 -10
- package/dist/collection/components/date-picker/date-picker.js +386 -436
- package/dist/collection/components/date-picker/date-utils.js +15 -15
- package/dist/collection/components/dropdown-menu/dropdown-menu.js +73 -82
- package/dist/collection/components/header/header.js +210 -246
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.js +94 -90
- package/dist/collection/components/highlight-box/highlight-box.js +112 -101
- package/dist/collection/components/icon/icon.js +220 -209
- package/dist/collection/components/image-overlay/image-overlay.js +38 -44
- package/dist/collection/components/info/info.js +73 -65
- package/dist/collection/components/info-button/info-button.js +113 -102
- package/dist/collection/components/label/label.js +151 -140
- package/dist/collection/components/map-base-layers/map-base-layers.js +75 -74
- package/dist/collection/components/map-controls/map-controls.js +115 -116
- package/dist/collection/components/map-overlays/map-overlays.js +75 -74
- package/dist/collection/components/modal/modal.css +155 -0
- package/dist/collection/components/modal/modal.js +133 -0
- package/dist/collection/components/ozon-content/get-node-name.function.js +2 -2
- package/dist/collection/components/ozon-content/nodes/al.node.js +6 -8
- package/dist/collection/components/ozon-content/nodes/document.node.js +2 -2
- package/dist/collection/components/ozon-content/nodes/ext-ref.node.js +4 -9
- package/dist/collection/components/ozon-content/nodes/fallback.node.js +4 -4
- package/dist/collection/components/ozon-content/nodes/figuur.node.js +20 -32
- package/dist/collection/components/ozon-content/nodes/inhoud.node.js +2 -6
- package/dist/collection/components/ozon-content/nodes/inline-tekst-afbeelding.node.js +3 -6
- package/dist/collection/components/ozon-content/nodes/inline.nodes.js +3 -11
- package/dist/collection/components/ozon-content/nodes/int-io-ref.node.js +4 -4
- package/dist/collection/components/ozon-content/nodes/int-ref.node.js +4 -4
- package/dist/collection/components/ozon-content/nodes/lijst.node.js +12 -17
- package/dist/collection/components/ozon-content/nodes/noot.node.js +9 -13
- package/dist/collection/components/ozon-content/nodes/opschrift.node.js +2 -2
- package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec-mapper.js +11 -11
- package/dist/collection/components/ozon-content/nodes/table.node/colspec/colspec.interface.js +0 -1
- package/dist/collection/components/ozon-content/nodes/table.node/index.js +1 -1
- package/dist/collection/components/ozon-content/nodes/table.node/table-cell.js +8 -8
- package/dist/collection/components/ozon-content/nodes/table.node/table-colgroup.js +2 -4
- package/dist/collection/components/ozon-content/nodes/table.node/table-rows.js +3 -3
- package/dist/collection/components/ozon-content/nodes/table.node/table.node.js +13 -20
- package/dist/collection/components/ozon-content/nodes/text.node.js +2 -2
- package/dist/collection/components/ozon-content/ozon-content-mapper.js +27 -25
- package/dist/collection/components/ozon-content/ozon-content.interfaces.js +0 -1
- package/dist/collection/components/ozon-content/ozon-content.js +138 -151
- package/dist/collection/components/pagination/pagination.js +118 -125
- package/dist/collection/components/progress-bar/progress-bar.js +68 -65
- package/dist/collection/components/progress-indicator/progress-indicator.js +76 -70
- package/dist/collection/components/responsive-element/responsive-element.js +70 -58
- package/dist/collection/components/selectable/selectable.js +260 -243
- package/dist/collection/components/table/table.css +48 -61
- package/dist/collection/components/table/table.js +70 -81
- package/dist/collection/components/toggletip/toggletip.js +94 -87
- package/dist/collection/components/tooltip/tooltip.js +252 -254
- package/dist/collection/components/tree-view/tree-item.js +5 -19
- package/dist/collection/components/tree-view/tree-view.js +151 -139
- package/dist/collection/components/viewer-grid/viewer-grid-filterpanel-buttons.js +2 -7
- package/dist/collection/components/viewer-grid/viewer-grid.css +4 -4
- package/dist/collection/components/viewer-grid/viewer-grid.js +181 -198
- package/dist/collection/index.js +2 -2
- package/dist/collection/utils/create-identifier.js +1 -3
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +1200 -1335
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-0917f18a.entry.js +1 -0
- package/dist/dso-toolkit/p-0c8cd0d8.entry.js +1 -0
- package/dist/dso-toolkit/p-19323600.entry.js +1 -0
- package/dist/dso-toolkit/p-2b83a825.entry.js +1 -0
- package/dist/dso-toolkit/p-2fa96ac0.entry.js +1 -0
- package/dist/dso-toolkit/p-3635427a.js +5 -0
- package/dist/dso-toolkit/p-39a33b89.entry.js +1 -0
- package/dist/dso-toolkit/p-3ab4441a.entry.js +1 -0
- package/dist/dso-toolkit/p-3bd6cf49.entry.js +1 -0
- package/dist/dso-toolkit/p-3ebba0dc.entry.js +1 -0
- package/dist/dso-toolkit/p-427f6d90.entry.js +1 -0
- package/dist/dso-toolkit/p-44c0bb3e.entry.js +1 -0
- package/dist/dso-toolkit/p-4b994946.entry.js +1 -0
- package/dist/dso-toolkit/p-5d7f4ff2.js +1 -0
- package/dist/dso-toolkit/{p-4070c1e5.js → p-6a1980b4.js} +0 -0
- package/dist/dso-toolkit/{p-7b37bd52.js → p-6c543986.js} +0 -0
- package/dist/dso-toolkit/p-746dc38a.entry.js +1 -0
- package/dist/dso-toolkit/p-76a1428a.entry.js +1 -0
- package/dist/dso-toolkit/p-800e1267.entry.js +1 -0
- package/dist/dso-toolkit/p-85d516c5.entry.js +1 -0
- package/dist/dso-toolkit/{p-22c35db5.js → p-89d262b7.js} +2 -2
- package/dist/dso-toolkit/p-8c8286e6.entry.js +1 -0
- package/dist/dso-toolkit/p-8f35c8f8.js +2 -0
- package/dist/dso-toolkit/p-a4086aa3.entry.js +1 -0
- package/dist/dso-toolkit/p-a9baa631.entry.js +1 -0
- package/dist/dso-toolkit/p-c4cf2359.entry.js +1 -0
- package/dist/dso-toolkit/p-c7ec6e6e.entry.js +1 -0
- package/dist/dso-toolkit/p-c9ad94a6.entry.js +1 -0
- package/dist/dso-toolkit/p-daba2d98.entry.js +1 -0
- package/dist/dso-toolkit/p-dad32839.entry.js +1 -0
- package/dist/dso-toolkit/p-dcc74039.entry.js +1 -0
- package/dist/dso-toolkit/p-e0a37d82.entry.js +1 -0
- package/dist/dso-toolkit/p-e43e39cf.entry.js +1 -0
- package/dist/dso-toolkit/p-e8b22546.entry.js +1 -0
- package/dist/dso-toolkit/p-ec25868b.entry.js +1 -0
- package/dist/dso-toolkit/p-f93b7c7a.entry.js +1 -0
- package/dist/dso-toolkit/p-ff72ee4c.entry.js +1 -0
- package/dist/esm/clsx.m-25174a58.js +3 -0
- package/dist/esm/{create-identifier-22acd3a3.js → create-identifier-51ee50c4.js} +1 -3
- package/dist/esm/dso-accordion-section.entry.js +37 -33
- package/dist/esm/dso-accordion.entry.js +17 -19
- package/dist/esm/dso-alert.entry.js +10 -8
- package/dist/esm/dso-attachments-counter.entry.js +4 -3
- package/dist/esm/dso-autosuggest.entry.js +36 -61
- package/dist/esm/dso-badge.entry.js +5 -4
- package/dist/esm/dso-banner.entry.js +5 -4
- package/dist/esm/dso-date-picker.entry.js +88 -128
- package/dist/esm/dso-dropdown-menu.entry.js +9 -21
- package/dist/esm/dso-header.entry.js +23 -29
- package/dist/esm/dso-helpcenter-panel.entry.js +22 -21
- package/dist/esm/dso-highlight-box.entry.js +16 -11
- package/dist/esm/dso-icon.entry.js +389 -385
- package/dist/esm/dso-image-overlay.entry.js +13 -13
- package/dist/esm/dso-info-button.entry.js +7 -5
- package/dist/esm/dso-info_2.entry.js +22 -9
- package/dist/esm/dso-label.entry.js +30 -18
- package/dist/esm/dso-map-base-layers.entry.js +7 -8
- package/dist/esm/dso-map-controls.entry.js +10 -8
- package/dist/esm/dso-map-overlays.entry.js +7 -8
- package/dist/esm/dso-modal.entry.js +58 -0
- package/dist/esm/dso-ozon-content.entry.js +110 -146
- package/dist/esm/dso-pagination.entry.js +22 -28
- package/dist/esm/dso-progress-bar.entry.js +3 -2
- package/dist/esm/dso-progress-indicator.entry.js +11 -8
- package/dist/esm/dso-responsive-element.entry.js +13 -10
- package/dist/esm/dso-table.entry.js +17 -17
- package/dist/esm/dso-toggletip.entry.js +9 -7
- package/dist/esm/dso-toolkit.js +3 -3
- package/dist/esm/dso-tooltip.entry.js +103 -104
- package/dist/esm/dso-tree-view.entry.js +39 -44
- package/dist/esm/dso-viewer-grid.entry.js +31 -32
- package/dist/esm/{focus-trap.esm-e3b5bde3.js → focus-trap.esm-33203b60.js} +1 -1
- package/dist/esm/{index-771c1291.js → index-1a4dda48.js} +486 -500
- package/dist/esm/{index.esm-4510c39e.js → index.esm-8fc07ad8.js} +50 -112
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/v4-d398bde5.js +66 -0
- package/dist/types/components/accordion/accordion.d.ts +2 -2
- package/dist/types/components/accordion/accordion.interfaces.d.ts +3 -3
- package/dist/types/components/accordion/components/accordion-section.d.ts +2 -2
- package/dist/types/components/alert/alert.d.ts +1 -1
- package/dist/types/components/autosuggest/autosuggest.d.ts +3 -3
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/banner/banner.d.ts +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +1 -1
- package/dist/types/components/header/header.d.ts +2 -2
- package/dist/types/components/header/header.interfaces.d.ts +1 -1
- package/dist/types/components/helpcenter-panel/helpcenter-panel.d.ts +1 -1
- package/dist/types/components/image-overlay/image-overlay.d.ts +1 -1
- package/dist/types/components/info/info.d.ts +1 -1
- package/dist/types/components/info-button/info-button.d.ts +1 -1
- package/dist/types/components/label/label.d.ts +2 -2
- package/dist/types/components/map-base-layers/map-base-layers.d.ts +2 -2
- package/dist/types/components/map-controls/map-controls.d.ts +2 -2
- package/dist/types/components/map-overlays/map-overlays.d.ts +3 -3
- package/dist/types/components/modal/modal.d.ts +22 -0
- package/dist/types/components/ozon-content/nodes/al.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/document.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/ext-ref.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/fallback.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/figuur.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/inhoud.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/inline-tekst-afbeelding.node.d.ts +1 -1
- package/dist/types/components/ozon-content/nodes/inline.nodes.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/int-io-ref.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/int-ref.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/lijst.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/noot.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/opschrift.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/table.node/colspec/colspec-mapper.d.ts +1 -1
- package/dist/types/components/ozon-content/nodes/table.node/index.d.ts +1 -1
- package/dist/types/components/ozon-content/nodes/table.node/table-cell.d.ts +3 -3
- package/dist/types/components/ozon-content/nodes/table.node/table-colgroup.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/table.node/table-rows.d.ts +3 -3
- package/dist/types/components/ozon-content/nodes/table.node/table.node.d.ts +2 -2
- package/dist/types/components/ozon-content/nodes/text.node.d.ts +1 -1
- package/dist/types/components/ozon-content/ozon-content-context.interface.d.ts +4 -4
- package/dist/types/components/ozon-content/ozon-content-mapper.d.ts +2 -1
- package/dist/types/components/ozon-content/ozon-content-node-context.interface.d.ts +2 -1
- package/dist/types/components/ozon-content/ozon-content-node.interface.d.ts +2 -1
- package/dist/types/components/ozon-content/ozon-content.d.ts +5 -4
- package/dist/types/components/pagination/pagination.d.ts +3 -3
- package/dist/types/components/progress-indicator/progress-indicator.d.ts +1 -1
- package/dist/types/components/responsive-element/responsive-element.d.ts +2 -2
- package/dist/types/components/responsive-element/responsive-element.interfaces.d.ts +1 -1
- package/dist/types/components/selectable/selectable.d.ts +2 -2
- package/dist/types/components/table/table.d.ts +2 -2
- package/dist/types/components/tooltip/tooltip.d.ts +2 -2
- package/dist/types/components/tree-view/tree-item.d.ts +3 -3
- package/dist/types/components/tree-view/tree-view.d.ts +5 -5
- package/dist/types/components/viewer-grid/viewer-grid-filterpanel-buttons.d.ts +1 -1
- package/dist/types/components/viewer-grid/viewer-grid.d.ts +2 -1
- package/dist/types/components.d.ts +152 -58
- package/dist/types/globals.d.ts +16 -16
- package/dist/types/index.d.ts +3 -3
- package/dist/types/stencil-public-runtime.d.ts +26 -8
- package/loader/package.json +1 -0
- package/package.json +15 -16
- package/readme.md +3 -3
- package/dist/cjs/clsx.m-b00fa5e1.js +0 -44
- package/dist/cjs/v4-8e8d6fbc.js +0 -77
- package/dist/collection/components/accordion/accordion.template.js +0 -26
- package/dist/collection/components/alert/alert.template.js +0 -20
- package/dist/collection/components/attachments-counter/attachments-counter.template.js +0 -6
- package/dist/collection/components/autosuggest/autosuggest.template.js +0 -19
- package/dist/collection/components/badge/badge.template.js +0 -7
- package/dist/collection/components/banner/banner.template.js +0 -19
- package/dist/collection/components/date-picker/date-picker.template.js +0 -16
- package/dist/collection/components/dropdown-menu/dropdown-menu.template.js +0 -36
- package/dist/collection/components/header/header.template.js +0 -18
- package/dist/collection/components/helpcenter-panel/helpcenter-panel.template.js +0 -13
- package/dist/collection/components/highlight-box/highlight-box.template.js +0 -20
- package/dist/collection/components/icon/icon.template.js +0 -10
- package/dist/collection/components/image-overlay/image-overlay.template.js +0 -15
- package/dist/collection/components/info/info.template.js +0 -12
- package/dist/collection/components/info-button/info-button.template.js +0 -11
- package/dist/collection/components/label/label.template.js +0 -23
- package/dist/collection/components/map-controls/map-controls.template.js +0 -23
- package/dist/collection/components/ozon-content/ozon-content.template.js +0 -14
- package/dist/collection/components/pagination/pagination.template.js +0 -11
- package/dist/collection/components/progress-bar/progress-bar.template.js +0 -11
- package/dist/collection/components/progress-indicator/progress-indicator.template.js +0 -11
- package/dist/collection/components/responsive-element/responsive-element.template.js +0 -10
- package/dist/collection/components/selectable/selectable.template.js +0 -24
- package/dist/collection/components/table/table.template.js +0 -26
- package/dist/collection/components/toggletip/toggletip.template.js +0 -12
- package/dist/collection/components/tooltip/tooltip.template.js +0 -7
- package/dist/collection/components/tree-view/tree-view.template.js +0 -11
- package/dist/collection/components/viewer-grid/viewer-grid.template.js +0 -20
- package/dist/dso-toolkit/p-02b2e01c.entry.js +0 -1
- package/dist/dso-toolkit/p-05a9e206.entry.js +0 -1
- package/dist/dso-toolkit/p-19b890a3.js +0 -1
- package/dist/dso-toolkit/p-1a19ce42.entry.js +0 -1
- package/dist/dso-toolkit/p-2e74485e.entry.js +0 -1
- package/dist/dso-toolkit/p-2f6b1092.entry.js +0 -1
- package/dist/dso-toolkit/p-3381c859.entry.js +0 -1
- package/dist/dso-toolkit/p-37a34037.entry.js +0 -1
- package/dist/dso-toolkit/p-383227b9.entry.js +0 -1
- package/dist/dso-toolkit/p-42450cfe.js +0 -1
- package/dist/dso-toolkit/p-4c44d27c.entry.js +0 -1
- package/dist/dso-toolkit/p-4fd140e9.entry.js +0 -1
- package/dist/dso-toolkit/p-53c7bf4f.entry.js +0 -1
- package/dist/dso-toolkit/p-662b7663.entry.js +0 -1
- package/dist/dso-toolkit/p-67b11174.entry.js +0 -1
- package/dist/dso-toolkit/p-6a414479.entry.js +0 -1
- package/dist/dso-toolkit/p-6cac0292.entry.js +0 -1
- package/dist/dso-toolkit/p-7213783b.entry.js +0 -1
- package/dist/dso-toolkit/p-83de460b.entry.js +0 -1
- package/dist/dso-toolkit/p-9aaadf4f.entry.js +0 -1
- package/dist/dso-toolkit/p-a5a5b24b.entry.js +0 -1
- package/dist/dso-toolkit/p-a9b0a83e.entry.js +0 -1
- package/dist/dso-toolkit/p-ac0c0eee.entry.js +0 -1
- package/dist/dso-toolkit/p-b6afe104.entry.js +0 -1
- package/dist/dso-toolkit/p-b9531adb.entry.js +0 -1
- package/dist/dso-toolkit/p-d2255268.entry.js +0 -1
- package/dist/dso-toolkit/p-de50f5f1.entry.js +0 -1
- package/dist/dso-toolkit/p-e16b5d71.entry.js +0 -1
- package/dist/dso-toolkit/p-ea1d4c81.entry.js +0 -1
- package/dist/dso-toolkit/p-eb326df8.entry.js +0 -1
- package/dist/dso-toolkit/p-ec3b8800.entry.js +0 -1
- package/dist/dso-toolkit/p-f1b5baf9.entry.js +0 -1
- package/dist/dso-toolkit/p-f8b023c4.js +0 -5
- package/dist/esm/clsx.m-071989db.js +0 -42
- package/dist/esm/v4-fa4bb814.js +0 -75
- package/dist/types/components/accordion/accordion.template.d.ts +0 -2
- package/dist/types/components/alert/alert.template.d.ts +0 -3
- package/dist/types/components/attachments-counter/attachments-counter.template.d.ts +0 -2
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +0 -3
- package/dist/types/components/badge/badge.template.d.ts +0 -2
- package/dist/types/components/banner/banner.template.d.ts +0 -3
- package/dist/types/components/date-picker/date-picker.template.d.ts +0 -2
- package/dist/types/components/dropdown-menu/dropdown-menu.template.d.ts +0 -2
- package/dist/types/components/header/header.template.d.ts +0 -2
- package/dist/types/components/helpcenter-panel/helpcenter-panel.template.d.ts +0 -2
- package/dist/types/components/highlight-box/highlight-box.template.d.ts +0 -3
- package/dist/types/components/icon/icon.template.d.ts +0 -2
- package/dist/types/components/image-overlay/image-overlay.template.d.ts +0 -2
- package/dist/types/components/info/info.template.d.ts +0 -3
- package/dist/types/components/info-button/info-button.template.d.ts +0 -2
- package/dist/types/components/label/label.template.d.ts +0 -2
- package/dist/types/components/map-controls/map-controls.template.d.ts +0 -2
- package/dist/types/components/ozon-content/ozon-content.template.d.ts +0 -2
- package/dist/types/components/pagination/pagination.template.d.ts +0 -2
- package/dist/types/components/progress-bar/progress-bar.template.d.ts +0 -2
- package/dist/types/components/progress-indicator/progress-indicator.template.d.ts +0 -2
- package/dist/types/components/responsive-element/responsive-element.template.d.ts +0 -3
- package/dist/types/components/selectable/selectable.template.d.ts +0 -3
- package/dist/types/components/table/table.template.d.ts +0 -2
- package/dist/types/components/toggletip/toggletip.template.d.ts +0 -2
- package/dist/types/components/tooltip/tooltip.template.d.ts +0 -2
- package/dist/types/components/tree-view/tree-view.template.d.ts +0 -2
- package/dist/types/components/viewer-grid/viewer-grid.template.d.ts +0 -3
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const createIdentifier = require('./create-identifier-
|
|
5
|
+
const index = require('./index-ecec64a0.js');
|
|
6
|
+
const createIdentifier = require('./create-identifier-6ee2a08b.js');
|
|
7
7
|
|
|
8
8
|
var DaysOfWeek;
|
|
9
9
|
(function (DaysOfWeek) {
|
|
@@ -16,9 +16,9 @@ var DaysOfWeek;
|
|
|
16
16
|
DaysOfWeek[DaysOfWeek["Saturday"] = 6] = "Saturday";
|
|
17
17
|
})(DaysOfWeek || (DaysOfWeek = {}));
|
|
18
18
|
function createDate(year, month, day) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const dayInt = parseInt(day, 10);
|
|
20
|
+
const monthInt = parseInt(month, 10);
|
|
21
|
+
const yearInt = parseInt(year, 10);
|
|
22
22
|
const isValid = Number.isInteger(yearInt) && // all parts should be integers
|
|
23
23
|
Number.isInteger(monthInt) &&
|
|
24
24
|
Number.isInteger(dayInt) &&
|
|
@@ -38,7 +38,7 @@ function parseDutchDate(value) {
|
|
|
38
38
|
if (!value) {
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
const matches = value.split(
|
|
41
|
+
const matches = value.split("-");
|
|
42
42
|
if (matches.length === 3 && matches[2].length === 4) {
|
|
43
43
|
return createDate(matches[2], matches[1], matches[0]);
|
|
44
44
|
}
|
|
@@ -49,11 +49,11 @@ function parseDutchDate(value) {
|
|
|
49
49
|
*/
|
|
50
50
|
function printDutchDate(date) {
|
|
51
51
|
if (!date) {
|
|
52
|
-
return
|
|
52
|
+
return "";
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
const d = date.getDate().toString(10).padStart(2, "0");
|
|
55
|
+
const m = (date.getMonth() + 1).toString(10).padStart(2, "0");
|
|
56
|
+
const y = date.getFullYear().toString(10).padStart(2, "0");
|
|
57
57
|
return `${d}-${m}-${y}`;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
@@ -66,21 +66,21 @@ function isEqual(a, b) {
|
|
|
66
66
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
67
67
|
}
|
|
68
68
|
function addDays(date, days) {
|
|
69
|
-
|
|
69
|
+
const d = new Date(date);
|
|
70
70
|
d.setDate(d.getDate() + days);
|
|
71
71
|
return d;
|
|
72
72
|
}
|
|
73
73
|
function startOfWeek(date, firstDayOfWeek = DaysOfWeek.Monday) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
const d = new Date(date);
|
|
75
|
+
const day = d.getDay();
|
|
76
|
+
const diff = (day < firstDayOfWeek ? 7 : 0) + day - firstDayOfWeek;
|
|
77
77
|
d.setDate(d.getDate() - diff);
|
|
78
78
|
return d;
|
|
79
79
|
}
|
|
80
80
|
function endOfWeek(date, firstDayOfWeek = DaysOfWeek.Monday) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const d = new Date(date);
|
|
82
|
+
const day = d.getDay();
|
|
83
|
+
const diff = (day < firstDayOfWeek ? -7 : 0) + 6 - (day - firstDayOfWeek);
|
|
84
84
|
d.setDate(d.getDate() + diff);
|
|
85
85
|
return d;
|
|
86
86
|
}
|
|
@@ -145,7 +145,7 @@ function getViewOfMonth(date, firstDayOfWeek = DaysOfWeek.Monday) {
|
|
|
145
145
|
return getDaysInRange(start, end);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
const DatePickerDay = ({ focusedDay, today, day, onDaySelect, onKeyboardNavigation, focusedDayRef, inRange }) => {
|
|
148
|
+
const DatePickerDay = ({ focusedDay, today, day, onDaySelect, onKeyboardNavigation, focusedDayRef, inRange, }) => {
|
|
149
149
|
const isToday = isEqual(day, today);
|
|
150
150
|
const isFocused = isEqual(day, focusedDay);
|
|
151
151
|
const isDisabled = day.getMonth() !== focusedDay.getMonth();
|
|
@@ -158,7 +158,7 @@ const DatePickerDay = ({ focusedDay, today, day, onDaySelect, onKeyboardNavigati
|
|
|
158
158
|
"is-outside": isOutsideRange,
|
|
159
159
|
"is-disabled": isDisabled,
|
|
160
160
|
"is-today": isToday,
|
|
161
|
-
}, tabIndex: isFocused ? 0 : -1, onClick: handleClick, onKeyDown: onKeyboardNavigation, disabled: isOutsideRange || isDisabled, type: "button", ref: el => {
|
|
161
|
+
}, tabIndex: isFocused ? 0 : -1, onClick: handleClick, onKeyDown: onKeyboardNavigation, disabled: isOutsideRange || isDisabled, type: "button", ref: (el) => {
|
|
162
162
|
if (isFocused && el && focusedDayRef) {
|
|
163
163
|
focusedDayRef(el);
|
|
164
164
|
}
|
|
@@ -180,75 +180,52 @@ function mapWithOffset(array, startingOffset, mapFn) {
|
|
|
180
180
|
return mapFn(array[adjustedIndex]);
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, localization, firstDayOfWeek, min, max, onDateSelect, onKeyboardNavigation, focusedDayRef, onMouseDown, onFocusIn }) => {
|
|
183
|
+
const DatePickerMonth = ({ selectedDate, focusedDate, labelledById, localization, firstDayOfWeek, min, max, onDateSelect, onKeyboardNavigation, focusedDayRef, onMouseDown, onFocusIn, }) => {
|
|
184
184
|
const today = new Date();
|
|
185
185
|
const days = getViewOfMonth(focusedDate, firstDayOfWeek);
|
|
186
|
-
return (index.h("table", { class: "dso-date__table", role: "grid", "aria-labelledby": labelledById,
|
|
187
|
-
// @ts-ignore
|
|
188
|
-
onFocusin: onFocusIn, onMouseDown: onMouseDown },
|
|
186
|
+
return (index.h("table", { class: "dso-date__table", role: "grid", "aria-labelledby": labelledById, onFocusin: onFocusIn, onMouseDown: onMouseDown },
|
|
189
187
|
index.h("thead", null,
|
|
190
|
-
index.h("tr", null, mapWithOffset(localization.dayNames, firstDayOfWeek, dayName => (index.h("th", { class: "dso-date__table-header", scope: "col" },
|
|
188
|
+
index.h("tr", null, mapWithOffset(localization.dayNames, firstDayOfWeek, (dayName) => (index.h("th", { class: "dso-date__table-header", scope: "col" },
|
|
191
189
|
index.h("span", { "aria-hidden": "true" }, dayName.substr(0, 2)),
|
|
192
190
|
index.h("span", { class: "dso-date__vhidden" }, dayName)))))),
|
|
193
|
-
index.h("tbody", null, chunk(days, 7).map(week => (index.h("tr", { class: "dso-date__row" }, week.map(day => (index.h("td", { class: "dso-date__cell", role: "gridcell", "aria-selected": isEqual(day, selectedDate) ? "true" : undefined, "aria-current": isEqual(day, today) ? "date" : undefined },
|
|
191
|
+
index.h("tbody", null, chunk(days, 7).map((week) => (index.h("tr", { class: "dso-date__row" }, week.map((day) => (index.h("td", { class: "dso-date__cell", role: "gridcell", "aria-selected": isEqual(day, selectedDate) ? "true" : undefined, "aria-current": isEqual(day, today) ? "date" : undefined },
|
|
194
192
|
index.h(DatePickerDay, { day: day, today: today, focusedDay: focusedDate, inRange: inRange(day, min, max), onDaySelect: onDateSelect, onKeyboardNavigation: onKeyboardNavigation, focusedDayRef: focusedDayRef }))))))))));
|
|
195
193
|
};
|
|
196
194
|
|
|
197
195
|
const localization = {
|
|
198
|
-
buttonLabel:
|
|
199
|
-
placeholder:
|
|
200
|
-
selectedDateMessage:
|
|
201
|
-
prevMonthLabel:
|
|
202
|
-
nextMonthLabel:
|
|
203
|
-
monthSelectLabel:
|
|
204
|
-
yearSelectLabel:
|
|
205
|
-
closeLabel:
|
|
206
|
-
keyboardInstruction:
|
|
207
|
-
calendarHeading:
|
|
208
|
-
dayNames: [
|
|
209
|
-
'Zondag',
|
|
210
|
-
'Maandag',
|
|
211
|
-
'Dinsdag',
|
|
212
|
-
'Woensdag',
|
|
213
|
-
'Donderdag',
|
|
214
|
-
'Vrijdag',
|
|
215
|
-
'Zaterdag'
|
|
216
|
-
],
|
|
196
|
+
buttonLabel: "Kies datum",
|
|
197
|
+
placeholder: "dd-mm-jjjj",
|
|
198
|
+
selectedDateMessage: "Geselecteerde datum is",
|
|
199
|
+
prevMonthLabel: "Vorige maand",
|
|
200
|
+
nextMonthLabel: "Volgende maand",
|
|
201
|
+
monthSelectLabel: "Maand",
|
|
202
|
+
yearSelectLabel: "Jaar",
|
|
203
|
+
closeLabel: "Sluiten",
|
|
204
|
+
keyboardInstruction: "Gebruik de pijltjestoetsen om een dag te kiezen",
|
|
205
|
+
calendarHeading: "Kies een datum",
|
|
206
|
+
dayNames: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"],
|
|
217
207
|
monthNames: [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
208
|
+
"Januari",
|
|
209
|
+
"Februari",
|
|
210
|
+
"Maart",
|
|
211
|
+
"April",
|
|
212
|
+
"Mei",
|
|
213
|
+
"Juni",
|
|
214
|
+
"Juli",
|
|
215
|
+
"Augustus",
|
|
216
|
+
"September",
|
|
217
|
+
"Oktober",
|
|
218
|
+
"November",
|
|
219
|
+
"December",
|
|
230
220
|
],
|
|
231
|
-
monthNamesShort: [
|
|
232
|
-
'Jan',
|
|
233
|
-
'Feb',
|
|
234
|
-
'Mrt',
|
|
235
|
-
'Apr',
|
|
236
|
-
'Mei',
|
|
237
|
-
'Jun',
|
|
238
|
-
'Jul',
|
|
239
|
-
'Aug',
|
|
240
|
-
'Sep',
|
|
241
|
-
'Okt',
|
|
242
|
-
'Nov',
|
|
243
|
-
'Dec'
|
|
244
|
-
]
|
|
221
|
+
monthNamesShort: ["Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
|
|
245
222
|
};
|
|
246
223
|
|
|
247
224
|
const datePickerCss = ".sc-dso-date-picker-h{display:block}.dso-date.sc-dso-date-picker *.sc-dso-date-picker,.dso-date.sc-dso-date-picker *.sc-dso-date-picker::before,.dso-date.sc-dso-date-picker *.sc-dso-date-picker::after{box-sizing:border-box}.dso-date.sc-dso-date-picker{box-sizing:border-box;color:#191919;display:block;font-family:\"Asap\", sans-serif;margin:0;position:relative;text-align:left;width:100%}.dso-date.sc-dso-date-picker:not(.dso-visible) .dso-date__dialog.sc-dso-date-picker{display:none}.dso-date__input.sc-dso-date-picker{display:block;width:100%;height:40px;padding:6px 14px;font-size:1rem;line-height:1.5;color:#191919;background-color:#fff;background-image:none;border:1px solid #275937;border-radius:4px;transition:border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s}.dso-date__input.sc-dso-date-picker::-moz-placeholder{color:#666;opacity:1}.dso-date__input.sc-dso-date-picker:-ms-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-webkit-input-placeholder{color:#666}.dso-date__input.sc-dso-date-picker::-ms-expand{background-color:transparent;border:0}.dso-date__input.sc-dso-date-picker:focus{border-color:#275937;outline:0;box-shadow:inset 0 0 0 1px #275937}.dso-date__input[disabled].sc-dso-date-picker,.dso-date__input[readonly].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{background-color:#fff;opacity:1}.dso-date__input[disabled].sc-dso-date-picker,fieldset[disabled].sc-dso-date-picker .dso-date__input.sc-dso-date-picker{cursor:default}.dso-date__input[disabled].sc-dso-date-picker{border-color:#e5e5e5;color:#999}.dso-date__input[readonly].sc-dso-date-picker{border-width:1px}.dso-date__input[type=text].sc-dso-date-picker{line-height:40px}.dso-date__input[size].sc-dso-date-picker{width:auto}.dso-date__toggle.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;-webkit-user-select:none;align-items:center;appearance:none;background:transparent;border:0;border-radius:0;border-bottom-right-radius:4px;border-top-right-radius:4px;color:#39870c;cursor:pointer;display:flex;height:38px;justify-content:center;padding:0;position:absolute;right:0;transform:translateY(-50%);top:50%;user-select:none;width:38px;z-index:101}.dso-date__toggle.sc-dso-date-picker:disabled{color:#afcf9d;cursor:pointer}.dso-date__dialog.sc-dso-date-picker{border-width:1px;display:flex;right:0;min-width:320px;opacity:0;position:absolute;top:100%;transform:scale(0.96) translateZ(0) translateY(-20px);transform-origin:top right;transition:transform 300ms ease, opacity 300ms ease, visibility 300ms ease;visibility:hidden;will-change:transform, opacity, visibility;z-index:210}@media (max-width: 35.9375em){.dso-date__dialog.sc-dso-date-picker{background:rgba(25, 25, 25, 0.5);bottom:0;position:fixed;left:0;right:0;top:0;transform:translateZ(0);transform-origin:bottom center}}.dso-date__dialog.is-left.sc-dso-date-picker{left:-11px;right:auto;width:auto}.dso-date__dialog.is-active.sc-dso-date-picker{opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.dso-date__dialog-content.sc-dso-date-picker{background:#fff;border:1px solid rgba(0, 0, 0, 0.1);border-radius:4px;box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.4);margin-left:auto;margin-right:-1px;margin-top:8px;max-width:310px;min-width:290px;padding:16px;position:relative;transform:none;width:100%;z-index:210}@media (max-width: 35.9375em){.dso-date__dialog-content.sc-dso-date-picker{border:0;border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px;bottom:0;left:0;margin:0;max-width:none;min-height:26em;opacity:0;padding:0 8% 20px;position:absolute;transform:translateZ(0) translateY(100%);transition:transform 400ms ease, opacity 400ms ease, visibility 400ms ease;visibility:hidden;will-change:transform, opacity, visibility}.is-active.sc-dso-date-picker .dso-date__dialog-content.sc-dso-date-picker{opacity:1;transform:translateZ(0) translateY(0);visibility:visible}}.dso-date__table.sc-dso-date-picker{border-collapse:collapse;border-spacing:0;color:#191919;font-size:1rem;font-weight:400;line-height:1.25;min-width:280px;table-layout:fixed;text-align:center;width:100%}.dso-date__table-header.sc-dso-date-picker{font-size:0.875em;font-weight:600;height:36px;line-height:36px;text-decoration:none;text-transform:uppercase}.dso-date__cell.sc-dso-date-picker{height:40px;padding:1px;text-align:center;width:40px}.dso-date__day.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;box-shadow:0 0 0 1px transparent;color:#191919;cursor:pointer;display:inline-block;font-family:\"Asap\", sans-serif;font-variant-numeric:tabular-nums;font-weight:400;height:38px;line-height:0;padding:0;position:relative;text-align:center;vertical-align:middle;width:38px;z-index:100}.dso-date__day.is-today.sc-dso-date-picker{background:transparent;height:36px;box-shadow:0 0 0 1px #39870c;width:36px}.dso-date__day.sc-dso-date-picker:hover,.dso-date__day.sc-dso-date-picker:active{background:#39870c;color:#fff}.dso-date__day.sc-dso-date-picker:focus{background:transparent;box-shadow:0 0 0 2px #275937;color:#191919;height:34px;outline:0;width:34px}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker{background:#39870c;color:#fff}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker:focus{background:transparent}[aria-selected=true].sc-dso-date-picker .dso-date__day.sc-dso-date-picker:focus span[aria-hidden=true].sc-dso-date-picker{background:#39870c;border:1px solid #fff;line-height:32px}.dso-date__day.is-outside.sc-dso-date-picker{background:#f2f2f2;box-shadow:none;color:#666;cursor:default;pointer-events:none}.dso-date__day.is-disabled.sc-dso-date-picker{background:#fff;cursor:default}.dso-date__day.is-disabled.sc-dso-date-picker:hover{color:#666}.dso-date__day.sc-dso-date-picker span[aria-hidden=true].sc-dso-date-picker{border-radius:50%;display:inline-block;height:34px;line-height:34px;width:34px}.dso-date__header.sc-dso-date-picker{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px;width:100%}.dso-date__header.sc-dso-date-picker span.sc-dso-date-picker{font-size:0.875rem}.dso-date__nav.sc-dso-date-picker{white-space:nowrap}.dso-date__prev.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker{-moz-appearance:none;-webkit-appearance:none;align-items:center;appearance:none;background:transparent;border:1px solid #39870c;border-radius:4px;box-sizing:border-box;color:#39870c;cursor:pointer;display:inline-flex;font-size:1em;height:32px;justify-content:center;margin-left:8px;padding:0;width:32px}@media (max-width: 35.9375em){.dso-date__prev.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker{height:40px;width:40px}}.dso-date__prev.sc-dso-date-picker:hover,.dso-date__prev.sc-dso-date-picker:active,.dso-date__next.sc-dso-date-picker:hover,.dso-date__next.sc-dso-date-picker:active{background-color:#39870c;color:#fff}.dso-date__prev.sc-dso-date-picker:focus,.dso-date__next.sc-dso-date-picker:focus{background:transparent;color:#39870c}.dso-date__prev.sc-dso-date-picker:disabled,.dso-date__prev.sc-dso-date-picker:disabled:hover,.dso-date__next.sc-dso-date-picker:disabled,.dso-date__next.sc-dso-date-picker:disabled:hover{background-color:#fff;border-color:#afcf9d;color:#afcf9d;opacity:1}.dso-date__prev.sc-dso-date-picker svg.sc-dso-date-picker,.dso-date__next.sc-dso-date-picker svg.sc-dso-date-picker{margin:0 auto}.dso-date__select.sc-dso-date-picker{display:inline-flex;height:28px;line-height:28px;position:relative}.dso-date__select.sc-dso-date-picker span.sc-dso-date-picker{margin-right:4px}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker{color:#275937;cursor:pointer;font-size:1rem;height:100%;left:0;opacity:0;position:absolute;top:0;width:100%;z-index:101}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker:focus+.dso-date__select-label.sc-dso-date-picker{box-shadow:0 0 0 2px #275937}.dso-date__select.sc-dso-date-picker select.sc-dso-date-picker:disabled{color:#afcf9d}.dso-date__select-label.sc-dso-date-picker{align-items:center;border-radius:4px;color:#39870c;display:flex;padding:0 4px 0 8px;pointer-events:none;position:relative;width:100%;z-index:100}.dso-date__select-label.sc-dso-date-picker span.sc-dso-date-picker{font-size:1.25rem;font-weight:600;line-height:1.25}.dso-date__select-label.sc-dso-date-picker svg.sc-dso-date-picker{width:16px;height:16px}.dso-date__mobile.sc-dso-date-picker{align-items:center;border-bottom:1px solid rgba(0, 0, 0, 0.12);display:flex;font-size:1em;justify-content:space-between;margin-bottom:20px;margin-left:-10%;overflow:hidden;padding:12px 20px;position:relative;text-overflow:ellipsis;white-space:nowrap;width:120%}@media (min-width: 36em){.dso-date__mobile.sc-dso-date-picker{border:0;margin:0;overflow:visible;padding:0;position:absolute;right:-16px;top:-16px;width:auto}}.dso-date__mobile-heading.sc-dso-date-picker{display:inline-block;font-weight:600;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 36em){.dso-date__mobile-heading.sc-dso-date-picker{display:none}}.dso-date__close.sc-dso-date-picker{-webkit-appearance:none;align-items:center;appearance:none;background-color:#fff;border:0;border-radius:50%;color:#39870c;cursor:pointer;display:flex;font-size:1em;height:32px;justify-content:center;margin-right:-4px;padding:0;width:32px}@media (min-width: 36em){.dso-date__close.sc-dso-date-picker{margin-right:0;opacity:0}}.dso-date__close.sc-dso-date-picker:focus{box-shadow:0 0 0 2px #275937;outline:none}@media (min-width: 36em){.dso-date__close.sc-dso-date-picker:focus{opacity:1}}.dso-date__vhidden.sc-dso-date-picker{border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;top:0;width:1px}";
|
|
248
225
|
|
|
249
226
|
function range(from, to) {
|
|
250
|
-
|
|
251
|
-
for (
|
|
227
|
+
const result = [];
|
|
228
|
+
for (let i = from; i <= to; i++) {
|
|
252
229
|
result.push(i);
|
|
253
230
|
}
|
|
254
231
|
return result;
|
|
@@ -266,7 +243,7 @@ const keyCode = {
|
|
|
266
243
|
RIGHT: 39,
|
|
267
244
|
DOWN: 40,
|
|
268
245
|
};
|
|
269
|
-
const DISALLOWED_CHARACTERS = /[^0-9
|
|
246
|
+
const DISALLOWED_CHARACTERS = /[^0-9-]+/g;
|
|
270
247
|
const TRANSITION_MS = 300;
|
|
271
248
|
function cleanValue(input, regex) {
|
|
272
249
|
const value = input.value;
|
|
@@ -284,7 +261,7 @@ function cleanValue(input, regex) {
|
|
|
284
261
|
input.selectionStart = input.selectionEnd = newCursor;
|
|
285
262
|
return newValue;
|
|
286
263
|
}
|
|
287
|
-
|
|
264
|
+
const DsoDatePicker = class {
|
|
288
265
|
constructor(hostRef) {
|
|
289
266
|
index.registerInstance(this, hostRef);
|
|
290
267
|
this.dsoDateChange = index.createEvent(this, "dsoDateChange", 7);
|
|
@@ -300,43 +277,6 @@ let DsoDatePicker = class {
|
|
|
300
277
|
this.dialogLabelId = createIdentifier.createIdentifier("DsoDateLabel");
|
|
301
278
|
this.localization = localization;
|
|
302
279
|
this.firstDayOfWeek = DaysOfWeek.Monday;
|
|
303
|
-
/**
|
|
304
|
-
* State() variables
|
|
305
|
-
*/
|
|
306
|
-
this.activeFocus = false;
|
|
307
|
-
this.focusedDay = new Date();
|
|
308
|
-
this.open = false;
|
|
309
|
-
this.visible = false;
|
|
310
|
-
/**
|
|
311
|
-
* Public Property API
|
|
312
|
-
*/
|
|
313
|
-
/**
|
|
314
|
-
* Name of the date picker input.
|
|
315
|
-
*/
|
|
316
|
-
this.name = "date";
|
|
317
|
-
/**
|
|
318
|
-
* Makes the date picker input component disabled. This prevents users from being able to
|
|
319
|
-
* interact with the input, and conveys its inactive state to assistive technologies.
|
|
320
|
-
*/
|
|
321
|
-
this.disabled = false;
|
|
322
|
-
/**
|
|
323
|
-
* Forces the opening direction of the calendar modal to be always left or right.
|
|
324
|
-
* This setting can be useful when the input is smaller than the opening date picker
|
|
325
|
-
* would be as by default the picker always opens towards right.
|
|
326
|
-
*/
|
|
327
|
-
this.direction = "right";
|
|
328
|
-
/**
|
|
329
|
-
* Should the input be marked as required?
|
|
330
|
-
*/
|
|
331
|
-
this.required = false;
|
|
332
|
-
/**
|
|
333
|
-
* Should the input be focused on load?
|
|
334
|
-
*/
|
|
335
|
-
this.dsoAutofocus = false;
|
|
336
|
-
/**
|
|
337
|
-
* Date value. Must be in Dutch date format: DD-MM-YYYY.
|
|
338
|
-
*/
|
|
339
|
-
this.value = "";
|
|
340
280
|
/**
|
|
341
281
|
* Local methods.
|
|
342
282
|
*/
|
|
@@ -365,14 +305,14 @@ let DsoDatePicker = class {
|
|
|
365
305
|
event.stopPropagation();
|
|
366
306
|
this.dsoKeyUp.emit({
|
|
367
307
|
component: "dso-date-picker",
|
|
368
|
-
originalEvent: event
|
|
308
|
+
originalEvent: event,
|
|
369
309
|
});
|
|
370
310
|
};
|
|
371
311
|
this.handleKeyDown = (event) => {
|
|
372
312
|
event.stopPropagation();
|
|
373
313
|
this.dsoKeyDown.emit({
|
|
374
314
|
component: "dso-date-picker",
|
|
375
|
-
originalEvent: event
|
|
315
|
+
originalEvent: event,
|
|
376
316
|
});
|
|
377
317
|
};
|
|
378
318
|
this.handleFocus = (event) => {
|
|
@@ -390,9 +330,10 @@ let DsoDatePicker = class {
|
|
|
390
330
|
event.preventDefault();
|
|
391
331
|
};
|
|
392
332
|
this.handleTouchEnd = (event) => {
|
|
333
|
+
var _a, _b;
|
|
393
334
|
const touch = event.changedTouches[0];
|
|
394
|
-
const distX = touch.pageX - this.initialTouchX; // get horizontal dist traveled
|
|
395
|
-
const distY = touch.pageY - this.initialTouchY; // get vertical dist traveled
|
|
335
|
+
const distX = touch.pageX - ((_a = this.initialTouchX) !== null && _a !== void 0 ? _a : 0); // get horizontal dist traveled
|
|
336
|
+
const distY = touch.pageY - ((_b = this.initialTouchY) !== null && _b !== void 0 ? _b : 0); // get vertical dist traveled
|
|
396
337
|
const threshold = 70;
|
|
397
338
|
const isHorizontalSwipe = Math.abs(distX) >= threshold && Math.abs(distY) <= threshold;
|
|
398
339
|
const isDownwardsSwipe = Math.abs(distY) >= threshold && Math.abs(distX) <= threshold && distY > 0;
|
|
@@ -431,7 +372,7 @@ let DsoDatePicker = class {
|
|
|
431
372
|
(_a = this.firstFocusableElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
432
373
|
return;
|
|
433
374
|
}
|
|
434
|
-
|
|
375
|
+
let handled = true;
|
|
435
376
|
switch (event.keyCode) {
|
|
436
377
|
case keyCode.RIGHT:
|
|
437
378
|
this.addDays(1);
|
|
@@ -488,10 +429,15 @@ let DsoDatePicker = class {
|
|
|
488
429
|
}
|
|
489
430
|
};
|
|
490
431
|
this.handleMonthSelect = (e) => {
|
|
491
|
-
|
|
432
|
+
// Todo
|
|
433
|
+
if (e.target instanceof HTMLSelectElement) {
|
|
434
|
+
this.setMonth(parseInt(e.target.value, 10));
|
|
435
|
+
}
|
|
492
436
|
};
|
|
493
437
|
this.handleYearSelect = (e) => {
|
|
494
|
-
|
|
438
|
+
if (e.target instanceof HTMLSelectElement) {
|
|
439
|
+
this.setYear(parseInt(e.target.value, 10));
|
|
440
|
+
}
|
|
495
441
|
};
|
|
496
442
|
this.handleInputChange = (e) => {
|
|
497
443
|
const target = e.target;
|
|
@@ -499,10 +445,10 @@ let DsoDatePicker = class {
|
|
|
499
445
|
this.setValue(cleanedValue);
|
|
500
446
|
};
|
|
501
447
|
this.prepareEvent = (value) => {
|
|
502
|
-
|
|
448
|
+
const event = {
|
|
503
449
|
component: "dso-date-picker",
|
|
504
450
|
value: "",
|
|
505
|
-
valueAsDate: undefined
|
|
451
|
+
valueAsDate: undefined,
|
|
506
452
|
};
|
|
507
453
|
if (value instanceof Date) {
|
|
508
454
|
event.valueAsDate = value;
|
|
@@ -541,6 +487,20 @@ let DsoDatePicker = class {
|
|
|
541
487
|
setTimeout(() => element.focus(), 0);
|
|
542
488
|
}
|
|
543
489
|
};
|
|
490
|
+
this.activeFocus = false;
|
|
491
|
+
this.focusedDay = new Date();
|
|
492
|
+
this.open = false;
|
|
493
|
+
this.visible = false;
|
|
494
|
+
this.name = "date";
|
|
495
|
+
this.identifier = undefined;
|
|
496
|
+
this.disabled = false;
|
|
497
|
+
this.role = undefined;
|
|
498
|
+
this.direction = "right";
|
|
499
|
+
this.required = false;
|
|
500
|
+
this.dsoAutofocus = false;
|
|
501
|
+
this.value = "";
|
|
502
|
+
this.min = undefined;
|
|
503
|
+
this.max = undefined;
|
|
544
504
|
}
|
|
545
505
|
/**
|
|
546
506
|
* Component event handling.
|
|
@@ -571,14 +531,14 @@ let DsoDatePicker = class {
|
|
|
571
531
|
* Show the calendar modal, moving focus to the calendar inside.
|
|
572
532
|
*/
|
|
573
533
|
async show() {
|
|
574
|
-
if (typeof this.hideTimeoutId !==
|
|
534
|
+
if (typeof this.hideTimeoutId !== "undefined") {
|
|
575
535
|
clearTimeout(this.hideTimeoutId);
|
|
576
536
|
}
|
|
577
537
|
this.visible = true;
|
|
578
538
|
setTimeout(() => {
|
|
579
539
|
this.open = true;
|
|
580
540
|
this.setFocusedDay(parseDutchDate(this.value) || new Date());
|
|
581
|
-
if (typeof this.focusTimeoutId !==
|
|
541
|
+
if (typeof this.focusTimeoutId !== "undefined") {
|
|
582
542
|
clearTimeout(this.focusTimeoutId);
|
|
583
543
|
}
|
|
584
544
|
this.focusTimeoutId = setTimeout(() => { var _a; return (_a = this.monthSelectNode) === null || _a === void 0 ? void 0 : _a.focus(); }, TRANSITION_MS);
|
|
@@ -592,7 +552,7 @@ let DsoDatePicker = class {
|
|
|
592
552
|
this.open = false;
|
|
593
553
|
// in cases where calendar is quickly shown and hidden
|
|
594
554
|
// we should avoid moving focus to the button
|
|
595
|
-
if (typeof this.focusTimeoutId !==
|
|
555
|
+
if (typeof this.focusTimeoutId !== "undefined") {
|
|
596
556
|
clearTimeout(this.focusTimeoutId);
|
|
597
557
|
}
|
|
598
558
|
this.hideTimeoutId = setTimeout(() => {
|
|
@@ -634,7 +594,7 @@ let DsoDatePicker = class {
|
|
|
634
594
|
}
|
|
635
595
|
setValue(value) {
|
|
636
596
|
const event = this.prepareEvent(value);
|
|
637
|
-
this.value = typeof value ===
|
|
597
|
+
this.value = typeof value === "string" ? value : event.value;
|
|
638
598
|
if (this.value !== this.previousValue) {
|
|
639
599
|
this.dsoDateChange.emit(event);
|
|
640
600
|
this.previousValue = this.value;
|
|
@@ -661,8 +621,8 @@ let DsoDatePicker = class {
|
|
|
661
621
|
const focusedYear = this.focusedDay.getFullYear();
|
|
662
622
|
const minDate = parseDutchDate(this.min);
|
|
663
623
|
const maxDate = parseDutchDate(this.max);
|
|
664
|
-
const prevMonthDisabled = minDate
|
|
665
|
-
const nextMonthDisabled = maxDate
|
|
624
|
+
const prevMonthDisabled = minDate && minDate.getMonth() === focusedMonth && minDate.getFullYear() === focusedYear;
|
|
625
|
+
const nextMonthDisabled = maxDate && maxDate.getMonth() === focusedMonth && maxDate.getFullYear() === focusedYear;
|
|
666
626
|
let minYear = selectedYear - 10;
|
|
667
627
|
let maxYear = selectedYear + 10;
|
|
668
628
|
if (minDate) {
|
|
@@ -671,11 +631,11 @@ let DsoDatePicker = class {
|
|
|
671
631
|
if (maxDate) {
|
|
672
632
|
maxYear = Math.min(maxYear, maxDate.getFullYear());
|
|
673
633
|
}
|
|
674
|
-
return (index.h(index.Host, null, index.h("div", { class:
|
|
634
|
+
return (index.h(index.Host, null, index.h("div", { class: { "dso-date": true, "dso-visible": this.visible } }, index.h("div", { class: "dso-date__input-wrapper" }, index.h("input", { class: "dso-date__input", value: this.value, 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: {
|
|
675
635
|
"dso-date__dialog": true,
|
|
676
636
|
"is-left": this.direction === "left",
|
|
677
637
|
"is-active": this.open,
|
|
678
|
-
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, index.h("div", { class: "dso-date__dialog-content", onKeyDown: this.handleEscKey }, index.h("div", { class: "dso-date__vhidden dso-date__instructions", "aria-live": "polite" }, this.localization.keyboardInstruction), index.h("div", { class: "dso-date__mobile", onFocusin: this.disableActiveFocus }, index.h("label", { class: "dso-date__mobile-heading" }, this.localization.calendarHeading), index.h("button", { class: "dso-date__close", ref: element => (this.firstFocusableElement = element), onKeyDown: this.handleFirstFocusableKeydown, onClick: () => this.hide(), type: "button" }, index.h("dso-icon", { icon: "times" }), index.h("span", { class: "dso-date__vhidden" }, this.localization.closeLabel))), index.h("div", { class: "dso-date__header", onFocusin: this.disableActiveFocus }, index.h("div", null, index.h("h2", { id: this.dialogLabelId, class: "dso-date__vhidden", "aria-live": "polite" }, this.localization.monthNames[focusedMonth], " ", this.focusedDay.getFullYear()), index.h("label", { htmlFor: this.monthSelectId, class: "dso-date__vhidden" }, this.localization.monthSelectLabel), index.h("div", { class: "dso-date__select" }, index.h("select", { id: this.monthSelectId, class: "dso-date__select--month", ref: element => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, this.localization.monthNames.map((month, i) => (index.h("option", { key: month, value: i, selected: i === focusedMonth }, month)))), index.h("div", { class: "dso-date__select-label", "aria-hidden": "true" }, index.h("span", null, this.localization.monthNamesShort[focusedMonth]), index.h("dso-icon", { icon: "chevron-down" }))), index.h("label", { htmlFor: this.yearSelectId, class: "dso-date__vhidden" }, this.localization.yearSelectLabel), index.h("div", { class: "dso-date__select" }, index.h("select", { id: this.yearSelectId, class: "dso-date__select--year", onChange: this.handleYearSelect }, range(minYear, maxYear).map(year => (index.h("option", { key: year, selected: year === focusedYear }, year)))), index.h("div", { class: "dso-date__select-label", "aria-hidden": "true" }, index.h("span", null, this.focusedDay.getFullYear()), index.h("dso-icon", { icon: "chevron-down" })))), index.h("div", { class: "dso-date__nav" }, index.h("button", { class: "dso-date__prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: "button" }, index.h("dso-icon", { icon: "chevron-left" }), index.h("span", { class: "dso-date__vhidden" }, this.localization.prevMonthLabel)), index.h("button", { class: "dso-date__next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: "button" }, index.h("dso-icon", { icon: "chevron-right" }), index.h("span", { class: "dso-date__vhidden" }, this.localization.nextMonthLabel)))), index.h(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: minDate, max: maxDate }))))));
|
|
638
|
+
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchMove: this.handleTouchMove, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, index.h("div", { class: "dso-date__dialog-content", onKeyDown: this.handleEscKey }, index.h("div", { class: "dso-date__vhidden dso-date__instructions", "aria-live": "polite" }, this.localization.keyboardInstruction), index.h("div", { class: "dso-date__mobile", onFocusin: this.disableActiveFocus }, index.h("label", { class: "dso-date__mobile-heading" }, this.localization.calendarHeading), index.h("button", { class: "dso-date__close", ref: (element) => (this.firstFocusableElement = element), onKeyDown: this.handleFirstFocusableKeydown, onClick: () => this.hide(), type: "button" }, index.h("dso-icon", { icon: "times" }), index.h("span", { class: "dso-date__vhidden" }, this.localization.closeLabel))), index.h("div", { class: "dso-date__header", onFocusin: this.disableActiveFocus }, index.h("div", null, index.h("h2", { id: this.dialogLabelId, class: "dso-date__vhidden", "aria-live": "polite" }, this.localization.monthNames[focusedMonth], " ", this.focusedDay.getFullYear()), index.h("label", { htmlFor: this.monthSelectId, class: "dso-date__vhidden" }, this.localization.monthSelectLabel), index.h("div", { class: "dso-date__select" }, index.h("select", { id: this.monthSelectId, class: "dso-date__select--month", ref: (element) => (this.monthSelectNode = element), onChange: this.handleMonthSelect }, this.localization.monthNames.map((month, i) => (index.h("option", { key: month, value: i, selected: i === focusedMonth }, month)))), index.h("div", { class: "dso-date__select-label", "aria-hidden": "true" }, index.h("span", null, this.localization.monthNamesShort[focusedMonth]), index.h("dso-icon", { icon: "chevron-down" }))), index.h("label", { htmlFor: this.yearSelectId, class: "dso-date__vhidden" }, this.localization.yearSelectLabel), index.h("div", { class: "dso-date__select" }, index.h("select", { id: this.yearSelectId, class: "dso-date__select--year", onChange: this.handleYearSelect }, range(minYear, maxYear).map((year) => (index.h("option", { key: year, selected: year === focusedYear }, year)))), index.h("div", { class: "dso-date__select-label", "aria-hidden": "true" }, index.h("span", null, this.focusedDay.getFullYear()), index.h("dso-icon", { icon: "chevron-down" })))), index.h("div", { class: "dso-date__nav" }, index.h("button", { class: "dso-date__prev", onClick: this.handlePreviousMonthClick, disabled: prevMonthDisabled, type: "button" }, index.h("dso-icon", { icon: "chevron-left" }), index.h("span", { class: "dso-date__vhidden" }, this.localization.prevMonthLabel)), index.h("button", { class: "dso-date__next", onClick: this.handleNextMonthClick, disabled: nextMonthDisabled, type: "button" }, index.h("dso-icon", { icon: "chevron-right" }), index.h("span", { class: "dso-date__vhidden" }, this.localization.nextMonthLabel)))), index.h(DatePickerMonth, { selectedDate: valueAsDate, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: minDate, max: maxDate }))))));
|
|
679
639
|
}
|
|
680
640
|
get element() { return index.getElement(this); }
|
|
681
641
|
};
|
|
@@ -2,28 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const index_esm = require('./index.esm-
|
|
7
|
-
const v4 = require('./v4-
|
|
5
|
+
const index = require('./index-ecec64a0.js');
|
|
6
|
+
const index_esm = require('./index.esm-03a9e0b4.js');
|
|
7
|
+
const v4 = require('./v4-abb5dc0c.js');
|
|
8
8
|
|
|
9
9
|
const dropdownMenuCss = ":host(:focus){outline:none}:host{display:inline-block;position:relative}";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const DropdownMenu = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
|
-
/**
|
|
15
|
-
* Whether the menu is open or closed.
|
|
16
|
-
* This attribute is reflected and mutable.
|
|
17
|
-
*/
|
|
18
|
-
this.open = false;
|
|
19
|
-
/**
|
|
20
|
-
* Alignment of the dropdown
|
|
21
|
-
*/
|
|
22
|
-
this.dropdownAlign = "left";
|
|
23
|
-
/**
|
|
24
|
-
* Whether the menu is checkable.
|
|
25
|
-
*/
|
|
26
|
-
this.checkable = false;
|
|
27
14
|
this.focusOutListener = (event) => {
|
|
28
15
|
if (!this.tabbables.includes(event.relatedTarget)) {
|
|
29
16
|
this.open = false;
|
|
@@ -57,6 +44,9 @@ let DropdownMenu = class {
|
|
|
57
44
|
this.button.focus();
|
|
58
45
|
this.open = false;
|
|
59
46
|
};
|
|
47
|
+
this.open = false;
|
|
48
|
+
this.dropdownAlign = "left";
|
|
49
|
+
this.checkable = false;
|
|
60
50
|
}
|
|
61
51
|
get button() {
|
|
62
52
|
const button = this.host.querySelectorAll('button[slot="toggle"]')[0];
|
|
@@ -78,7 +68,7 @@ let DropdownMenu = class {
|
|
|
78
68
|
this.open = !this.open;
|
|
79
69
|
});
|
|
80
70
|
const options = this.host.querySelector(".dso-dropdown-options");
|
|
81
|
-
if (options
|
|
71
|
+
if (!options) {
|
|
82
72
|
throw new ReferenceError("Dropdown options not found");
|
|
83
73
|
}
|
|
84
74
|
options.setAttribute("role", "menu");
|
|
@@ -122,9 +112,7 @@ let DropdownMenu = class {
|
|
|
122
112
|
if (activeEl.shadowRoot) {
|
|
123
113
|
return this.getActiveElement(activeEl.shadowRoot);
|
|
124
114
|
}
|
|
125
|
-
|
|
126
|
-
return activeEl;
|
|
127
|
-
}
|
|
115
|
+
return activeEl;
|
|
128
116
|
}
|
|
129
117
|
tabInPopup(direction) {
|
|
130
118
|
const tabs = this.tabbables;
|
|
@@ -2,30 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const clsx_m = require('./clsx.m-
|
|
5
|
+
const index = require('./index-ecec64a0.js');
|
|
6
|
+
const clsx_m = require('./clsx.m-b81c6b86.js');
|
|
7
7
|
const index$1 = require('./index-794ad37a.js');
|
|
8
8
|
|
|
9
9
|
const headerCss = ".sc-dso-header-h{display:block}.dso-header.sc-dso-header{border-bottom:1px solid #ccc;display:flex;flex-wrap:wrap;position:relative}@media screen and (min-width: 768px){.dso-header.sc-dso-header{align-items:center}}@media screen and (max-width: 991px){.dso-header.use-drop-down.sc-dso-header{flex-wrap:nowrap}}.dso-header.sc-dso-header .dso-nav.sc-dso-header{border:0}.logo-container.sc-dso-header{display:flex;flex-wrap:wrap;padding-bottom:16px;padding-top:16px}@media screen and (max-width: 767px){.logo-container.sc-dso-header{max-height:40px}}@media screen and (min-width: 768px){.sub-logo.sc-dso-header{margin-left:24px}}@media screen and (max-width: 767px){.sub-logo.sc-dso-header{flex-basis:100%}}.login.sc-dso-header .dso-tertiary.sc-dso-header,.logout.sc-dso-header .dso-tertiary.sc-dso-header{cursor:pointer;font-family:Asap, sans-serif;font-weight:600;vertical-align:text-bottom}.profile.sc-dso-header a.sc-dso-header,.logout.sc-dso-header a.sc-dso-header,.login.sc-dso-header a.sc-dso-header{text-decoration:none;color:#39870c;font-weight:600}.profile.sc-dso-header a.sc-dso-header:hover,.profile.sc-dso-header a.sc-dso-header:focus,.logout.sc-dso-header a.sc-dso-header:hover,.logout.sc-dso-header a.sc-dso-header:focus,.login.sc-dso-header a.sc-dso-header:hover,.login.sc-dso-header a.sc-dso-header:focus{text-decoration:none}.profile.sc-dso-header a.sc-dso-header:active,.logout.sc-dso-header a.sc-dso-header:active,.login.sc-dso-header a.sc-dso-header:active{text-decoration:underline}.dso-header-session.sc-dso-header{display:flex;margin-left:auto}.dso-header-session.sc-dso-header .profile.sc-dso-header a.sc-dso-header{margin-left:8px}.dso-header-session.sc-dso-header .profile.sc-dso-header+.logout.sc-dso-header{border-left:3px solid #ccc;margin-left:16px;padding-left:16px}.dso-navbar.sc-dso-header{flex-basis:100%}.dso-navbar.sc-dso-header .dso-dropdown-options.sc-dso-header{border-top:1px solid #ccc}dso-dropdown-menu.sc-dso-header button.sc-dso-header{align-items:flex-end;background-color:transparent;border:0;display:flex;font-family:Asap, sans-serif;padding-right:32px}@media screen and (max-width: 767px){dso-dropdown-menu.sc-dso-header{top:12px}}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{border:0;border-radius:0}@media screen and (min-width: 768px){dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{width:375px}}@media screen and (max-width: 767px){dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{width:100%}}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header a.sc-dso-header{color:#275937;font-size:1.25rem;padding:16px;white-space:pre-wrap}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header a.sc-dso-header:focus{color:#fff}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header a.sc-dso-header:hover{background-color:#fff;color:#275937;text-decoration:underline}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.dso-active.sc-dso-header a.sc-dso-header{font-weight:600}dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header ul.sc-dso-header li.sc-dso-header+li.sc-dso-header{border-top:1px solid #ccc}.dropdown.sc-dso-header{margin-left:auto}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header{position:static}@media screen and (max-width: 767px){.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header{margin-top:28px}}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{right:0;top:100%}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header{color:#39870c;font-size:16px;font-weight:600;line-height:normal;position:relative}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header::after{margin-left:8px;position:absolute;right:0px;top:50%;transform:translateY(-50%)}.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:hover,.dropdown.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:active{cursor:pointer;text-decoration:underline}.dso-nav.sc-dso-header{align-items:end;column-gap:32px;display:flex;list-style:none;margin-bottom:0;margin-top:0;padding-left:0}.dso-nav.sc-dso-header>li.sc-dso-header{margin-bottom:4px}.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header{display:block}.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header,.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header:hover,.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header:focus,.dso-nav.sc-dso-header>li.sc-dso-header>a.sc-dso-header:visited{color:#275937}.dso-nav.sc-dso-header>li.dso-active.sc-dso-header,.dso-nav.sc-dso-header>li.is-active.sc-dso-header{margin-bottom:0}.dso-nav.sc-dso-header>li.dso-active.sc-dso-header>a.sc-dso-header,.dso-nav.sc-dso-header>li.is-active.sc-dso-header>a.sc-dso-header{border-bottom:4px solid #8b4a6a;font-weight:bold}.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header{text-decoration:none;font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;white-space:nowrap}.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header:hover,.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header:focus,.dso-nav.dso-nav-main.sc-dso-header>li.sc-dso-header>a.sc-dso-header:active{text-decoration:underline}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header .dso-dropdown-options.sc-dso-header{left:-1rem;top:calc(100% + 3px)}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header{font-size:1.25em;line-height:1;margin-top:8px;padding:16px 0;align-items:center;color:#275937;padding-right:32px}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:hover,.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header:active{cursor:pointer;text-decoration:underline}.dso-nav.dso-nav-main.sc-dso-header dso-dropdown-menu.sc-dso-header button.sc-dso-header::after{margin-left:8px;position:absolute;right:0px;top:auto;transform:none}.dso-nav.dso-nav-sub.sc-dso-header>li.sc-dso-header{display:inline-block}.dso-nav.dso-nav-sub.sc-dso-header>li.sc-dso-header>a.sc-dso-header{text-decoration:none;font-size:16px;margin-top:4px;padding:4px 8px 3px}.dso-nav.dso-nav-sub.sc-dso-header>li.sc-dso-header>a.sc-dso-header:hover,.dso-nav.dso-nav-sub.sc-dso-header>li.sc-dso-header>a.sc-dso-header:focus,.dso-nav.dso-nav-sub.sc-dso-header>li.sc-dso-header>a.sc-dso-header:active{text-decoration:underline}.dso-nav.sc-dso-header .menu-user-home.sc-dso-header{margin-left:auto}.dso-nav.sc-dso-header .menu-user-home.sc-dso-header dso-icon.sc-dso-header{height:1em;margin-right:8px;position:relative;top:-2px;width:1.2em}";
|
|
10
10
|
|
|
11
11
|
const minDesktopViewportWidth = 992;
|
|
12
|
-
|
|
12
|
+
const Header = class {
|
|
13
13
|
constructor(hostRef) {
|
|
14
14
|
index.registerInstance(this, hostRef);
|
|
15
15
|
this.dsoHeaderClick = index.createEvent(this, "dsoHeaderClick", 7);
|
|
16
|
-
this.mainMenu = [];
|
|
17
|
-
this.useDropDownMenu = "auto";
|
|
18
|
-
/** Used to show the login/logout option. 'none' renders nothing. */
|
|
19
|
-
this.authStatus = 'none';
|
|
20
|
-
this.hasSubLogo = false;
|
|
21
|
-
this.overflowMenuItems = 0;
|
|
22
16
|
this.onWindowResize = index$1.debounce_1(() => {
|
|
23
17
|
this.setDropDownMenu();
|
|
24
18
|
this.setOverflowMenu();
|
|
25
19
|
}, 100);
|
|
26
20
|
this.MenuItem = (item) => {
|
|
27
|
-
return (index.h("li", { class: item.active ? "dso-active" : undefined }, index.h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick: e => this.clickHandler(e,
|
|
21
|
+
return (index.h("li", { class: item.active ? "dso-active" : undefined }, index.h("a", { href: item.url, "aria-current": item.active ? "page" : undefined, onClick: (e) => this.clickHandler(e, "menuItem", { menuItem: item }) }, item.label)));
|
|
28
22
|
};
|
|
23
|
+
this.mainMenu = [];
|
|
24
|
+
this.useDropDownMenu = "auto";
|
|
25
|
+
this.authStatus = "none";
|
|
26
|
+
this.loginUrl = undefined;
|
|
27
|
+
this.logoutUrl = undefined;
|
|
28
|
+
this.userProfileName = undefined;
|
|
29
|
+
this.userProfileUrl = undefined;
|
|
30
|
+
this.userHomeUrl = undefined;
|
|
31
|
+
this.showDropDown = undefined;
|
|
32
|
+
this.hasSubLogo = false;
|
|
33
|
+
this.overflowMenuItems = 0;
|
|
29
34
|
}
|
|
30
35
|
clickHandler(e, type, options) {
|
|
31
36
|
var _a, _b;
|
|
@@ -37,7 +42,6 @@ let Header = class {
|
|
|
37
42
|
url: (_a = options === null || options === void 0 ? void 0 : options.url) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.menuItem) === null || _b === void 0 ? void 0 : _b.url,
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
|
-
;
|
|
41
45
|
setShowDropDown(value) {
|
|
42
46
|
if (value === "auto") {
|
|
43
47
|
this.setDropDownMenu();
|
|
@@ -73,7 +77,7 @@ let Header = class {
|
|
|
73
77
|
if (this.showDropDown) {
|
|
74
78
|
return;
|
|
75
79
|
}
|
|
76
|
-
if (this.overflowMenuItems
|
|
80
|
+
if (this.overflowMenuItems !== 0) {
|
|
77
81
|
this.overflowMenuItems = 0;
|
|
78
82
|
return;
|
|
79
83
|
}
|
|
@@ -99,23 +103,13 @@ let Header = class {
|
|
|
99
103
|
return (index.h(index.Fragment, null, index.h("div", { class: clsx_m.clsx("dso-header", {
|
|
100
104
|
["use-drop-down"]: this.showDropDown,
|
|
101
105
|
["has-sub-logo"]: this.hasSubLogo,
|
|
102
|
-
}), ref: (element) => (this.wrapper = element) }, index.h("div", { class: "logo-container" }, index.h("div", { class: "logo" }, index.h("slot", { name: "logo" })), index.h("div", { class: "sub-logo" }, index.h("slot", { name: "sub-logo" }))), this.showDropDown && this.mainMenu && this.mainMenu.length > 0 && (index.h("div", { class: "dropdown" }, index.h("dso-dropdown-menu", { "dropdown-align": "right" }, index.h("button", { type: "button", slot: "toggle" }, index.h("span", null, "Menu")), index.h("div", { class: "dso-dropdown-options" }, index.h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (index.h("li", null, index.h("a", { href: this.userHomeUrl, onClick: e => this.clickHandler(e,
|
|
103
|
-
this.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
this.userProfileName &&
|
|
110
|
-
this.authStatus === 'loggedIn' && (index.h("div", { class: "profile" }, index.h("span", { class: "profile-label" }, "Welkom:"), index.h("a", { href: this.userProfileUrl, onClick: e => this.clickHandler(e, 'profile', { url: this.userProfileUrl }) }, this.userProfileName))), this.authStatus === 'loggedOut' && (index.h("div", { class: "login" }, this.loginUrl
|
|
111
|
-
? index.h("a", { href: this.loginUrl, onClick: e => this.clickHandler(e, 'login', { url: this.loginUrl }) }, "Inloggen")
|
|
112
|
-
: index.h("button", { class: "dso-tertiary", type: "button", onClick: e => this.clickHandler(e, 'login') }, "Inloggen"))), this.authStatus === 'loggedIn' && (index.h("div", { class: "logout" }, this.logoutUrl
|
|
113
|
-
? index.h("a", { href: this.logoutUrl, onClick: e => this.clickHandler(e, 'logout', { url: this.logoutUrl }) }, "Uitloggen")
|
|
114
|
-
: index.h("button", { class: "dso-tertiary", type: "button", onClick: e => this.clickHandler(e, 'logout') }, "Uitloggen")))), ((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (index.h("nav", { class: "dso-navbar" }, index.h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) }, this.mainMenu && this.mainMenu
|
|
115
|
-
.filter((_, index) => index < this.mainMenu.length - this.overflowMenuItems)
|
|
116
|
-
.map(this.MenuItem), this.overflowMenuItems > 0 && (index.h("li", null, index.h("dso-dropdown-menu", { "dropdown-align": "left" }, index.h("button", { type: "button", slot: "toggle" }, index.h("span", null, "Meer")), index.h("div", { class: "dso-dropdown-options" }, index.h("ul", null, this.mainMenu && this.mainMenu
|
|
117
|
-
.filter((_, index) => index >= this.mainMenu.length - this.overflowMenuItems)
|
|
118
|
-
.map(this.MenuItem)))))), this.userHomeUrl && (index.h("li", { class: "menu-user-home" }, index.h("a", { href: this.userHomeUrl, onClick: e => this.clickHandler(e, 'userHome', { url: this.userHomeUrl }) }, index.h("dso-icon", { icon: "user-line" }), "Mijn Omgevingsloket")))))))))));
|
|
106
|
+
}), ref: (element) => (this.wrapper = element) }, index.h("div", { class: "logo-container" }, index.h("div", { class: "logo" }, index.h("slot", { name: "logo" })), index.h("div", { class: "sub-logo" }, index.h("slot", { name: "sub-logo" }))), this.showDropDown && this.mainMenu && this.mainMenu.length > 0 && (index.h("div", { class: "dropdown" }, index.h("dso-dropdown-menu", { "dropdown-align": "right" }, index.h("button", { type: "button", slot: "toggle" }, index.h("span", null, "Menu")), index.h("div", { class: "dso-dropdown-options" }, index.h("ul", null, this.mainMenu.map(this.MenuItem), this.userHomeUrl && (index.h("li", null, index.h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, "Mijn Omgevingsloket"))), this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (index.h("li", null, index.h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName, index.h("span", { class: "profile-label" }, " - Mijn profiel")))), this.authStatus === "loggedOut" && (index.h("li", null, this.loginUrl ? (index.h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (index.h("button", { type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (index.h("li", null, this.logoutUrl ? (index.h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (index.h("button", { type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen"))))))))), !this.showDropDown && (index.h(index.Fragment, null, index.h("div", { class: "dso-header-session" }, this.userProfileUrl && this.userProfileName && this.authStatus === "loggedIn" && (index.h("div", { class: "profile" }, index.h("span", { class: "profile-label" }, "Welkom:"), index.h("a", { href: this.userProfileUrl, onClick: (e) => this.clickHandler(e, "profile", { url: this.userProfileUrl }) }, this.userProfileName))), this.authStatus === "loggedOut" && (index.h("div", { class: "login" }, this.loginUrl ? (index.h("a", { href: this.loginUrl, onClick: (e) => this.clickHandler(e, "login", { url: this.loginUrl }) }, "Inloggen")) : (index.h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "login") }, "Inloggen")))), this.authStatus === "loggedIn" && (index.h("div", { class: "logout" }, this.logoutUrl ? (index.h("a", { href: this.logoutUrl, onClick: (e) => this.clickHandler(e, "logout", { url: this.logoutUrl }) }, "Uitloggen")) : (index.h("button", { class: "dso-tertiary", type: "button", onClick: (e) => this.clickHandler(e, "logout") }, "Uitloggen"))))), ((this.mainMenu && this.mainMenu.length > 0) || this.userHomeUrl) && (index.h("nav", { class: "dso-navbar" }, index.h("ul", { class: "dso-nav dso-nav-main", ref: (element) => (this.nav = element) }, this.mainMenu &&
|
|
107
|
+
this.mainMenu
|
|
108
|
+
.filter((_, index) => this.mainMenu && index < this.mainMenu.length - this.overflowMenuItems)
|
|
109
|
+
.map(this.MenuItem), this.overflowMenuItems > 0 && (index.h("li", null, index.h("dso-dropdown-menu", { "dropdown-align": "left" }, index.h("button", { type: "button", slot: "toggle" }, index.h("span", null, "Meer")), index.h("div", { class: "dso-dropdown-options" }, index.h("ul", null, this.mainMenu &&
|
|
110
|
+
this.mainMenu
|
|
111
|
+
.filter((_, index) => this.mainMenu && index >= this.mainMenu.length - this.overflowMenuItems)
|
|
112
|
+
.map(this.MenuItem)))))), this.userHomeUrl && (index.h("li", { class: "menu-user-home" }, index.h("a", { href: this.userHomeUrl, onClick: (e) => this.clickHandler(e, "userHome", { url: this.userHomeUrl }) }, index.h("dso-icon", { icon: "user-line" }), "Mijn Omgevingsloket")))))))))));
|
|
119
113
|
}
|
|
120
114
|
get host() { return index.getElement(this); }
|
|
121
115
|
static get watchers() { return {
|