@energinet/watt 4.2.15-alpha.0 → 4.2.15
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/badge/energinet-watt-badge.d.ts +5 -0
- package/badge/index.d.ts +17 -0
- package/badge/watt-badge.component.d.ts +15 -0
- package/breadcrumbs/energinet-watt-breadcrumbs.d.ts +5 -0
- package/breadcrumbs/index.d.ts +17 -0
- package/{types/energinet-watt-breadcrumbs.d.ts → breadcrumbs/watt-breadcrumbs.component.d.ts} +7 -10
- package/button/energinet-watt-button.d.ts +5 -0
- package/button/index.d.ts +17 -0
- package/button/watt-button.component.d.ts +22 -0
- package/card/energinet-watt-card.d.ts +5 -0
- package/card/index.d.ts +18 -0
- package/card/watt-card-title.component.d.ts +6 -0
- package/card/watt-card.component.d.ts +15 -0
- package/checkbox/energinet-watt-checkbox.d.ts +5 -0
- package/checkbox/index.d.ts +17 -0
- package/checkbox/watt-checkbox.component.d.ts +17 -0
- package/chip/energinet-watt-chip.d.ts +5 -0
- package/chip/index.d.ts +23 -0
- package/chip/watt-action-chip.component.d.ts +8 -0
- package/chip/watt-chip.component.d.ts +8 -0
- package/chip/watt-chip.directive.d.ts +16 -0
- package/chip/watt-date-chip.component.d.ts +12 -0
- package/chip/watt-date-range-chip.component.d.ts +50 -0
- package/chip/watt-filter-chip.component.d.ts +13 -0
- package/chip/watt-menu-chip.component.d.ts +13 -0
- package/clipboard/energinet-watt-clipboard.d.ts +5 -0
- package/clipboard/index.d.ts +18 -0
- package/clipboard/watt-clipboard-intl.service.d.ts +7 -0
- package/clipboard/watt-copy-to-clipboard.directive.d.ts +12 -0
- package/code/energinet-watt-code.d.ts +5 -0
- package/code/index.d.ts +19 -0
- package/code/watt-code-intl.service.d.ts +6 -0
- package/code/watt-code.component.d.ts +45 -0
- package/code/watt-code.worker.token.d.ts +18 -0
- package/core/breakpoints/breakpoints-observer.d.ts +21 -0
- package/{types/energinet-watt-core-breakpoints.d.ts → core/breakpoints/breakpoints.d.ts} +2 -27
- package/core/breakpoints/energinet-watt-core-breakpoints.d.ts +5 -0
- package/core/breakpoints/index.d.ts +18 -0
- package/core/color/color-helper.service.d.ts +10 -0
- package/{types/energinet-watt-core-color.d.ts → core/color/colors.d.ts} +2 -15
- package/core/color/energinet-watt-core-color.d.ts +5 -0
- package/{types/energinet-watt.d.ts → core/color/index.d.ts} +2 -3
- package/core/date/dayjs.d.ts +22 -0
- package/core/date/energinet-watt-core-date.d.ts +5 -0
- package/core/date/index.d.ts +23 -0
- package/core/date/watt-danish-datetime.providers.d.ts +1 -0
- package/core/date/watt-date-adapter.d.ts +31 -0
- package/core/date/watt-date-range.d.ts +25 -0
- package/core/date/watt-date.pipe.d.ts +28 -0
- package/core/date/watt-format-date.d.ts +11 -0
- package/core/date/watt-locale.service.d.ts +11 -0
- package/data/energinet-watt-data.d.ts +5 -0
- package/data/index.d.ts +20 -0
- package/data/watt-data-actions.component.d.ts +5 -0
- package/data/watt-data-filters.component.d.ts +5 -0
- package/data/watt-data-intl.service.d.ts +15 -0
- package/data/watt-data-table.component.d.ts +34 -0
- package/datetime-field/energinet-watt-datetime-field.d.ts +5 -0
- package/datetime-field/index.d.ts +17 -0
- package/datetime-field/watt-datetime-field.component.d.ts +39 -0
- package/description-list/energinet-watt-description-list.d.ts +5 -0
- package/description-list/index.d.ts +17 -0
- package/description-list/watt-description-list-item.component.d.ts +27 -0
- package/description-list/watt-description-list.component.d.ts +20 -0
- package/drawer/energinet-watt-drawer.d.ts +5 -0
- package/drawer/index.d.ts +21 -0
- package/drawer/watt-drawer-actions.component.d.ts +5 -0
- package/drawer/watt-drawer-content.component.d.ts +5 -0
- package/drawer/watt-drawer-heading.component.d.ts +5 -0
- package/drawer/watt-drawer-topbar.component.d.ts +5 -0
- package/{types/energinet-watt-drawer.d.ts → drawer/watt-drawer.component.d.ts} +28 -35
- package/dropdown/energinet-watt-dropdown.d.ts +5 -0
- package/dropdown/index.d.ts +19 -0
- package/dropdown/watt-dropdown-option.d.ts +28 -0
- package/dropdown/watt-dropdown-value.d.ts +17 -0
- package/dropdown/watt-dropdown.component.d.ts +133 -0
- package/dropzone/energinet-watt-dropzone.d.ts +5 -0
- package/dropzone/index.d.ts +19 -0
- package/dropzone/watt-dropzone-intl.d.ts +11 -0
- package/dropzone/watt-dropzone-validators.d.ts +27 -0
- package/dropzone/watt-dropzone.d.ts +31 -0
- package/empty-state/energinet-watt-empty-state.d.ts +5 -0
- package/empty-state/icons/explore.d.ts +5 -0
- package/empty-state/icons/no-results.d.ts +5 -0
- package/empty-state/icons/not-found.d.ts +5 -0
- package/empty-state/icons/power.d.ts +5 -0
- package/empty-state/index.d.ts +21 -0
- package/empty-state/watt-empty-state.component.d.ts +16 -0
- package/energinet-watt.d.ts +5 -0
- package/esm2022/badge/energinet-watt-badge.js +5 -0
- package/esm2022/badge/energinet-watt-badge.js.map +1 -0
- package/esm2022/badge/index.js +20 -0
- package/esm2022/badge/index.js.map +1 -0
- package/{fesm2022/energinet-watt-badge.mjs → esm2022/badge/watt-badge.component.js} +4 -30
- package/esm2022/badge/watt-badge.component.js.map +1 -0
- package/esm2022/breadcrumbs/energinet-watt-breadcrumbs.js +5 -0
- package/esm2022/breadcrumbs/energinet-watt-breadcrumbs.js.map +1 -0
- package/esm2022/breadcrumbs/index.js +20 -0
- package/esm2022/breadcrumbs/index.js.map +1 -0
- package/{fesm2022/energinet-watt-breadcrumbs.mjs → esm2022/breadcrumbs/watt-breadcrumbs.component.js} +10 -36
- package/esm2022/breadcrumbs/watt-breadcrumbs.component.js.map +1 -0
- package/esm2022/button/energinet-watt-button.js +5 -0
- package/esm2022/button/energinet-watt-button.js.map +1 -0
- package/esm2022/button/index.js +20 -0
- package/esm2022/button/index.js.map +1 -0
- package/{fesm2022/energinet-watt-button.mjs → esm2022/button/watt-button.component.js} +9 -35
- package/esm2022/button/watt-button.component.js.map +1 -0
- package/esm2022/card/energinet-watt-card.js +5 -0
- package/esm2022/card/energinet-watt-card.js.map +1 -0
- package/esm2022/card/index.js +21 -0
- package/esm2022/card/index.js.map +1 -0
- package/esm2022/card/watt-card-title.component.js +33 -0
- package/esm2022/card/watt-card-title.component.js.map +1 -0
- package/{fesm2022/energinet-watt-card.mjs → esm2022/card/watt-card.component.js} +7 -63
- package/esm2022/card/watt-card.component.js.map +1 -0
- package/esm2022/checkbox/energinet-watt-checkbox.js +5 -0
- package/esm2022/checkbox/energinet-watt-checkbox.js.map +1 -0
- package/esm2022/checkbox/index.js +20 -0
- package/esm2022/checkbox/index.js.map +1 -0
- package/{fesm2022/energinet-watt-checkbox.mjs → esm2022/checkbox/watt-checkbox.component.js} +6 -32
- package/esm2022/checkbox/watt-checkbox.component.js.map +1 -0
- package/esm2022/chip/energinet-watt-chip.js +5 -0
- package/esm2022/chip/energinet-watt-chip.js.map +1 -0
- package/esm2022/chip/index.js +26 -0
- package/esm2022/chip/index.js.map +1 -0
- package/esm2022/chip/watt-action-chip.component.js +68 -0
- package/esm2022/chip/watt-action-chip.component.js.map +1 -0
- package/esm2022/chip/watt-chip.component.js +55 -0
- package/esm2022/chip/watt-chip.component.js.map +1 -0
- package/esm2022/chip/watt-chip.directive.js +92 -0
- package/esm2022/chip/watt-chip.directive.js.map +1 -0
- package/esm2022/chip/watt-date-chip.component.js +104 -0
- package/esm2022/chip/watt-date-chip.component.js.map +1 -0
- package/esm2022/chip/watt-date-range-chip.component.js +213 -0
- package/esm2022/chip/watt-date-range-chip.component.js.map +1 -0
- package/esm2022/chip/watt-filter-chip.component.js +82 -0
- package/esm2022/chip/watt-filter-chip.component.js.map +1 -0
- package/esm2022/chip/watt-menu-chip.component.js +80 -0
- package/esm2022/chip/watt-menu-chip.component.js.map +1 -0
- package/esm2022/clipboard/energinet-watt-clipboard.js +5 -0
- package/esm2022/clipboard/energinet-watt-clipboard.js.map +1 -0
- package/esm2022/clipboard/index.js +21 -0
- package/esm2022/clipboard/index.js.map +1 -0
- package/esm2022/clipboard/watt-clipboard-intl.service.js +31 -0
- package/esm2022/clipboard/watt-clipboard-intl.service.js.map +1 -0
- package/{fesm2022/energinet-watt-clipboard.mjs → esm2022/clipboard/watt-copy-to-clipboard.directive.js} +7 -61
- package/esm2022/clipboard/watt-copy-to-clipboard.directive.js.map +1 -0
- package/esm2022/code/energinet-watt-code.js +5 -0
- package/esm2022/code/energinet-watt-code.js.map +1 -0
- package/esm2022/code/index.js +22 -0
- package/esm2022/code/index.js.map +1 -0
- package/esm2022/code/watt-code-intl.service.js +30 -0
- package/esm2022/code/watt-code-intl.service.js.map +1 -0
- package/{fesm2022/energinet-watt-code.mjs → esm2022/code/watt-code.component.js} +11 -83
- package/esm2022/code/watt-code.component.js.map +1 -0
- package/esm2022/code/watt-code.worker.token.js +21 -0
- package/esm2022/code/watt-code.worker.token.js.map +1 -0
- package/esm2022/core/breakpoints/breakpoints-observer.js +41 -0
- package/esm2022/core/breakpoints/breakpoints-observer.js.map +1 -0
- package/esm2022/core/breakpoints/breakpoints.js +31 -0
- package/esm2022/core/breakpoints/breakpoints.js.map +1 -0
- package/esm2022/core/breakpoints/energinet-watt-core-breakpoints.js +5 -0
- package/esm2022/core/breakpoints/energinet-watt-core-breakpoints.js.map +1 -0
- package/esm2022/core/breakpoints/index.js +21 -0
- package/esm2022/core/breakpoints/index.js.map +1 -0
- package/esm2022/core/color/color-helper.service.js +41 -0
- package/esm2022/core/color/color-helper.service.js.map +1 -0
- package/esm2022/core/color/colors.js +58 -0
- package/esm2022/core/color/colors.js.map +1 -0
- package/esm2022/core/color/energinet-watt-core-color.js +5 -0
- package/esm2022/core/color/energinet-watt-core-color.js.map +1 -0
- package/esm2022/core/color/index.js +21 -0
- package/esm2022/core/color/index.js.map +1 -0
- package/esm2022/core/date/dayjs.js +34 -0
- package/esm2022/core/date/dayjs.js.map +1 -0
- package/esm2022/core/date/energinet-watt-core-date.js +5 -0
- package/esm2022/core/date/energinet-watt-core-date.js.map +1 -0
- package/esm2022/core/date/index.js +25 -0
- package/esm2022/core/date/index.js.map +1 -0
- package/esm2022/core/date/watt-danish-datetime.providers.js +31 -0
- package/esm2022/core/date/watt-danish-datetime.providers.js.map +1 -0
- package/esm2022/core/date/watt-date-adapter.js +43 -0
- package/esm2022/core/date/watt-date-adapter.js.map +1 -0
- package/esm2022/core/date/watt-date-range.js +2 -0
- package/esm2022/core/date/watt-date-range.js.map +1 -0
- package/esm2022/core/date/watt-date.pipe.js +38 -0
- package/esm2022/core/date/watt-date.pipe.js.map +1 -0
- package/esm2022/core/date/watt-format-date.js +50 -0
- package/esm2022/core/date/watt-format-date.js.map +1 -0
- package/esm2022/core/date/watt-locale.service.js +48 -0
- package/esm2022/core/date/watt-locale.service.js.map +1 -0
- package/esm2022/data/energinet-watt-data.js +5 -0
- package/esm2022/data/energinet-watt-data.js.map +1 -0
- package/esm2022/data/index.js +23 -0
- package/esm2022/data/index.js.map +1 -0
- package/esm2022/data/watt-data-actions.component.js +32 -0
- package/esm2022/data/watt-data-actions.component.js.map +1 -0
- package/esm2022/data/watt-data-filters.component.js +32 -0
- package/esm2022/data/watt-data-filters.component.js.map +1 -0
- package/esm2022/data/watt-data-intl.service.js +39 -0
- package/esm2022/data/watt-data-intl.service.js.map +1 -0
- package/{fesm2022/energinet-watt-data.mjs → esm2022/data/watt-data-table.component.js} +12 -134
- package/esm2022/data/watt-data-table.component.js.map +1 -0
- package/esm2022/datetime-field/energinet-watt-datetime-field.js +5 -0
- package/esm2022/datetime-field/energinet-watt-datetime-field.js.map +1 -0
- package/esm2022/datetime-field/index.js +20 -0
- package/esm2022/datetime-field/index.js.map +1 -0
- package/{fesm2022/energinet-watt-datetime-field.mjs → esm2022/datetime-field/watt-datetime-field.component.js} +14 -40
- package/esm2022/datetime-field/watt-datetime-field.component.js.map +1 -0
- package/esm2022/description-list/energinet-watt-description-list.js +5 -0
- package/esm2022/description-list/energinet-watt-description-list.js.map +1 -0
- package/esm2022/description-list/index.js +20 -0
- package/esm2022/description-list/index.js.map +1 -0
- package/esm2022/description-list/watt-description-list-item.component.js +49 -0
- package/esm2022/description-list/watt-description-list-item.component.js.map +1 -0
- package/{fesm2022/energinet-watt-description-list.mjs → esm2022/description-list/watt-description-list.component.js} +8 -77
- package/esm2022/description-list/watt-description-list.component.js.map +1 -0
- package/esm2022/drawer/energinet-watt-drawer.js +5 -0
- package/esm2022/drawer/energinet-watt-drawer.js.map +1 -0
- package/esm2022/drawer/index.js +24 -0
- package/esm2022/drawer/index.js.map +1 -0
- package/esm2022/drawer/watt-drawer-actions.component.js +29 -0
- package/esm2022/drawer/watt-drawer-actions.component.js.map +1 -0
- package/esm2022/drawer/watt-drawer-content.component.js +29 -0
- package/esm2022/drawer/watt-drawer-content.component.js.map +1 -0
- package/esm2022/drawer/watt-drawer-heading.component.js +29 -0
- package/esm2022/drawer/watt-drawer-heading.component.js.map +1 -0
- package/esm2022/drawer/watt-drawer-topbar.component.js +32 -0
- package/esm2022/drawer/watt-drawer-topbar.component.js.map +1 -0
- package/{fesm2022/energinet-watt-drawer.mjs → esm2022/drawer/watt-drawer.component.js} +17 -150
- package/esm2022/drawer/watt-drawer.component.js.map +1 -0
- package/esm2022/dropdown/energinet-watt-dropdown.js +5 -0
- package/esm2022/dropdown/energinet-watt-dropdown.js.map +1 -0
- package/esm2022/dropdown/index.js +20 -0
- package/esm2022/dropdown/index.js.map +1 -0
- package/esm2022/dropdown/watt-dropdown-option.js +2 -0
- package/esm2022/dropdown/watt-dropdown-option.js.map +1 -0
- package/esm2022/dropdown/watt-dropdown-value.js +2 -0
- package/esm2022/dropdown/watt-dropdown-value.js.map +1 -0
- package/{fesm2022/energinet-watt-dropdown.mjs → esm2022/dropdown/watt-dropdown.component.js} +18 -44
- package/esm2022/dropdown/watt-dropdown.component.js.map +1 -0
- package/esm2022/dropzone/energinet-watt-dropzone.js +5 -0
- package/esm2022/dropzone/energinet-watt-dropzone.js.map +1 -0
- package/esm2022/dropzone/index.js +22 -0
- package/esm2022/dropzone/index.js.map +1 -0
- package/esm2022/dropzone/watt-dropzone-intl.js +35 -0
- package/esm2022/dropzone/watt-dropzone-intl.js.map +1 -0
- package/esm2022/dropzone/watt-dropzone-validators.js +67 -0
- package/esm2022/dropzone/watt-dropzone-validators.js.map +1 -0
- package/{fesm2022/energinet-watt-dropzone.mjs → esm2022/dropzone/watt-dropzone.js} +14 -133
- package/esm2022/dropzone/watt-dropzone.js.map +1 -0
- package/esm2022/empty-state/energinet-watt-empty-state.js +5 -0
- package/esm2022/empty-state/energinet-watt-empty-state.js.map +1 -0
- package/esm2022/empty-state/icons/explore.js +54 -0
- package/esm2022/empty-state/icons/explore.js.map +1 -0
- package/esm2022/empty-state/icons/no-results.js +62 -0
- package/esm2022/empty-state/icons/no-results.js.map +1 -0
- package/{fesm2022/energinet-watt-empty-state.mjs → esm2022/empty-state/icons/not-found.js} +4 -301
- package/esm2022/empty-state/icons/not-found.js.map +1 -0
- package/esm2022/empty-state/icons/power.js +46 -0
- package/esm2022/empty-state/icons/power.js.map +1 -0
- package/esm2022/empty-state/index.js +24 -0
- package/esm2022/empty-state/index.js.map +1 -0
- package/esm2022/empty-state/watt-empty-state.component.js +120 -0
- package/esm2022/empty-state/watt-empty-state.component.js.map +1 -0
- package/esm2022/energinet-watt.js +5 -0
- package/esm2022/energinet-watt.js.map +1 -0
- package/esm2022/expandable-card/energinet-watt-expandable-card.js +5 -0
- package/esm2022/expandable-card/energinet-watt-expandable-card.js.map +1 -0
- package/esm2022/expandable-card/index.js +26 -0
- package/esm2022/expandable-card/index.js.map +1 -0
- package/{fesm2022/energinet-watt-expandable-card.mjs → esm2022/expandable-card/watt-expandable-card.component.js} +9 -40
- package/esm2022/expandable-card/watt-expandable-card.component.js.map +1 -0
- package/esm2022/field/energinet-watt-field.js +5 -0
- package/esm2022/field/energinet-watt-field.js.map +1 -0
- package/esm2022/field/index.js +24 -0
- package/esm2022/field/index.js.map +1 -0
- package/esm2022/field/watt-field-error.component.js +29 -0
- package/esm2022/field/watt-field-error.component.js.map +1 -0
- package/esm2022/field/watt-field-hint.component.js +29 -0
- package/esm2022/field/watt-field-hint.component.js.map +1 -0
- package/esm2022/field/watt-field-intl.service.js +32 -0
- package/esm2022/field/watt-field-intl.service.js.map +1 -0
- package/esm2022/field/watt-field-warning.component.js +29 -0
- package/esm2022/field/watt-field-warning.component.js.map +1 -0
- package/{fesm2022/energinet-watt-field.mjs → esm2022/field/watt-field.component.js} +14 -149
- package/esm2022/field/watt-field.component.js.map +1 -0
- package/esm2022/file-field/energinet-watt-file-field.js +5 -0
- package/esm2022/file-field/energinet-watt-file-field.js.map +1 -0
- package/esm2022/file-field/index.js +20 -0
- package/esm2022/file-field/index.js.map +1 -0
- package/{fesm2022/energinet-watt-file-field.mjs → esm2022/file-field/watt-file-field.component.js} +6 -32
- package/esm2022/file-field/watt-file-field.component.js.map +1 -0
- package/esm2022/icon/energinet-watt-icon.js +5 -0
- package/esm2022/icon/energinet-watt-icon.js.map +1 -0
- package/esm2022/icon/flags/energinet-watt-icon-flags.js +5 -0
- package/esm2022/icon/flags/energinet-watt-icon-flags.js.map +1 -0
- package/esm2022/icon/flags/index.js +29 -0
- package/esm2022/icon/flags/index.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-ch.js +52 -0
- package/esm2022/icon/flags/watt-flag-ch.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-de.js +44 -0
- package/esm2022/icon/flags/watt-flag-de.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-dk.js +44 -0
- package/esm2022/icon/flags/watt-flag-dk.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-fi.js +44 -0
- package/esm2022/icon/flags/watt-flag-fi.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-gb.js +60 -0
- package/esm2022/icon/flags/watt-flag-gb.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-nl.js +44 -0
- package/esm2022/icon/flags/watt-flag-nl.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-no.js +48 -0
- package/esm2022/icon/flags/watt-flag-no.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-pl.js +46 -0
- package/esm2022/icon/flags/watt-flag-pl.js.map +1 -0
- package/esm2022/icon/flags/watt-flag-se.js +42 -0
- package/esm2022/icon/flags/watt-flag-se.js.map +1 -0
- package/esm2022/icon/flags/watt-flag.js +124 -0
- package/esm2022/icon/flags/watt-flag.js.map +1 -0
- package/{fesm2022/energinet-watt-icon.mjs → esm2022/icon/icon.component.js} +6 -133
- package/esm2022/icon/icon.component.js.map +1 -0
- package/esm2022/icon/icons.js +104 -0
- package/esm2022/icon/icons.js.map +1 -0
- package/esm2022/icon/index.js +20 -0
- package/esm2022/icon/index.js.map +1 -0
- package/{fesm2022/energinet-watt.mjs → esm2022/index.js} +2 -8
- package/esm2022/index.js.map +1 -0
- package/esm2022/menu/energinet-watt-menu.js +5 -0
- package/esm2022/menu/energinet-watt-menu.js.map +1 -0
- package/esm2022/menu/index.js +36 -0
- package/esm2022/menu/index.js.map +1 -0
- package/esm2022/menu/watt-menu-group.component.js +45 -0
- package/esm2022/menu/watt-menu-group.component.js.map +1 -0
- package/esm2022/menu/watt-menu-item.component.js +50 -0
- package/esm2022/menu/watt-menu-item.component.js.map +1 -0
- package/esm2022/menu/watt-menu-trigger.directive.js +85 -0
- package/esm2022/menu/watt-menu-trigger.directive.js.map +1 -0
- package/esm2022/menu/watt-menu.component.js +77 -0
- package/esm2022/menu/watt-menu.component.js.map +1 -0
- package/esm2022/modal/energinet-watt-modal.js +5 -0
- package/esm2022/modal/energinet-watt-modal.js.map +1 -0
- package/esm2022/modal/index.js +21 -0
- package/esm2022/modal/index.js.map +1 -0
- package/{fesm2022/energinet-watt-modal.mjs → esm2022/modal/watt-modal.component.js} +13 -109
- package/esm2022/modal/watt-modal.component.js.map +1 -0
- package/esm2022/modal/watt-modal.service.js +74 -0
- package/esm2022/modal/watt-modal.service.js.map +1 -0
- package/esm2022/paginator/energinet-watt-paginator.js +5 -0
- package/esm2022/paginator/energinet-watt-paginator.js.map +1 -0
- package/esm2022/paginator/index.js +21 -0
- package/esm2022/paginator/index.js.map +1 -0
- package/esm2022/paginator/watt-paginator-intl.service.js +38 -0
- package/esm2022/paginator/watt-paginator-intl.service.js.map +1 -0
- package/{fesm2022/energinet-watt-paginator.mjs → esm2022/paginator/watt-paginator.component.js} +9 -69
- package/esm2022/paginator/watt-paginator.component.js.map +1 -0
- package/esm2022/phone-field/energinet-watt-phone-field.js +5 -0
- package/esm2022/phone-field/energinet-watt-phone-field.js.map +1 -0
- package/esm2022/phone-field/index.js +21 -0
- package/esm2022/phone-field/index.js.map +1 -0
- package/esm2022/phone-field/watt-phone-field-intl.service.js +41 -0
- package/esm2022/phone-field/watt-phone-field-intl.service.js.map +1 -0
- package/{fesm2022/energinet-watt-phone-field.mjs → esm2022/phone-field/watt-phone-field.component.js} +16 -80
- package/esm2022/phone-field/watt-phone-field.component.js.map +1 -0
- package/esm2022/picker/__shared/energinet-watt-picker-__shared.js +5 -0
- package/esm2022/picker/__shared/energinet-watt-picker-__shared.js.map +1 -0
- package/esm2022/picker/__shared/index.js +21 -0
- package/esm2022/picker/__shared/index.js.map +1 -0
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js +71 -0
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js.map +1 -0
- package/esm2022/picker/__shared/watt-picker-base.js +197 -0
- package/esm2022/picker/__shared/watt-picker-base.js.map +1 -0
- package/esm2022/picker/__shared/watt-picker-value.js +2 -0
- package/esm2022/picker/__shared/watt-picker-value.js.map +1 -0
- package/esm2022/picker/datepicker/energinet-watt-picker-datepicker.js +5 -0
- package/esm2022/picker/datepicker/energinet-watt-picker-datepicker.js.map +1 -0
- package/esm2022/picker/datepicker/index.js +22 -0
- package/esm2022/picker/datepicker/index.js.map +1 -0
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js +31 -0
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js.map +1 -0
- package/{fesm2022/energinet-watt-picker-datepicker.mjs → esm2022/picker/datepicker/watt-datepicker.component.js} +16 -71
- package/esm2022/picker/datepicker/watt-datepicker.component.js.map +1 -0
- package/esm2022/picker/timepicker/energinet-watt-picker-timepicker.js +5 -0
- package/esm2022/picker/timepicker/energinet-watt-picker-timepicker.js.map +1 -0
- package/esm2022/picker/timepicker/index.js +20 -0
- package/esm2022/picker/timepicker/index.js.map +1 -0
- package/esm2022/picker/timepicker/maskito-time-range-mask.js +81 -0
- package/esm2022/picker/timepicker/maskito-time-range-mask.js.map +1 -0
- package/{fesm2022/energinet-watt-picker-timepicker.mjs → esm2022/picker/timepicker/watt-timepicker.component.js} +20 -126
- package/esm2022/picker/timepicker/watt-timepicker.component.js.map +1 -0
- package/esm2022/progress-tracker/energinet-watt-progress-tracker.js +5 -0
- package/esm2022/progress-tracker/energinet-watt-progress-tracker.js.map +1 -0
- package/esm2022/progress-tracker/index.js +27 -0
- package/esm2022/progress-tracker/index.js.map +1 -0
- package/{fesm2022/energinet-watt-progress-tracker.mjs → esm2022/progress-tracker/watt-progress-tracker-step.component.js} +6 -64
- package/esm2022/progress-tracker/watt-progress-tracker-step.component.js.map +1 -0
- package/esm2022/progress-tracker/watt-progress-tracker.component.js +30 -0
- package/esm2022/progress-tracker/watt-progress-tracker.component.js.map +1 -0
- package/esm2022/query-params/energinet-watt-query-params.js +5 -0
- package/esm2022/query-params/energinet-watt-query-params.js.map +1 -0
- package/esm2022/query-params/index.js +20 -0
- package/esm2022/query-params/index.js.map +1 -0
- package/{fesm2022/energinet-watt-query-params.mjs → esm2022/query-params/watt-query-params.directive.js} +6 -32
- package/esm2022/query-params/watt-query-params.directive.js.map +1 -0
- package/esm2022/radio/energinet-watt-radio.js +5 -0
- package/esm2022/radio/energinet-watt-radio.js.map +1 -0
- package/esm2022/radio/index.js +21 -0
- package/esm2022/radio/index.js.map +1 -0
- package/esm2022/radio/watt-radio-group.component.js +119 -0
- package/esm2022/radio/watt-radio-group.component.js.map +1 -0
- package/{fesm2022/energinet-watt-radio.mjs → esm2022/radio/watt-radio.component.js} +5 -146
- package/esm2022/radio/watt-radio.component.js.map +1 -0
- package/esm2022/search/energinet-watt-search.js +5 -0
- package/esm2022/search/energinet-watt-search.js.map +1 -0
- package/esm2022/search/index.js +20 -0
- package/esm2022/search/index.js.map +1 -0
- package/{fesm2022/energinet-watt-search.mjs → esm2022/search/watt-search.component.js} +7 -33
- package/esm2022/search/watt-search.component.js.map +1 -0
- package/esm2022/segmented-buttons/energinet-watt-segmented-buttons.js +5 -0
- package/esm2022/segmented-buttons/energinet-watt-segmented-buttons.js.map +1 -0
- package/esm2022/segmented-buttons/index.js +27 -0
- package/esm2022/segmented-buttons/index.js.map +1 -0
- package/esm2022/segmented-buttons/watt-segmented-button.component.js +39 -0
- package/esm2022/segmented-buttons/watt-segmented-button.component.js.map +1 -0
- package/{fesm2022/energinet-watt-segmented-buttons.mjs → esm2022/segmented-buttons/watt-segmented-buttons.component.js} +11 -77
- package/esm2022/segmented-buttons/watt-segmented-buttons.component.js.map +1 -0
- package/esm2022/shell/energinet-watt-shell.js +5 -0
- package/esm2022/shell/energinet-watt-shell.js.map +1 -0
- package/esm2022/shell/index.js +21 -0
- package/esm2022/shell/index.js.map +1 -0
- package/esm2022/shell/nav-list/index.js +21 -0
- package/esm2022/shell/nav-list/index.js.map +1 -0
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js +47 -0
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js.map +1 -0
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js +83 -0
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js.map +1 -0
- package/esm2022/shell/nav-list/watt-nav-list.component.js +80 -0
- package/esm2022/shell/nav-list/watt-nav-list.component.js.map +1 -0
- package/esm2022/shell/shell.component.js +59 -0
- package/esm2022/shell/shell.component.js.map +1 -0
- package/esm2022/slide-toggle/energinet-watt-slide-toggle.js +5 -0
- package/esm2022/slide-toggle/energinet-watt-slide-toggle.js.map +1 -0
- package/esm2022/slide-toggle/index.js +20 -0
- package/esm2022/slide-toggle/index.js.map +1 -0
- package/{fesm2022/energinet-watt-slide-toggle.mjs → esm2022/slide-toggle/watt-slide-toggle.component.js} +8 -34
- package/esm2022/slide-toggle/watt-slide-toggle.component.js.map +1 -0
- package/esm2022/slider/energinet-watt-slider.js +5 -0
- package/esm2022/slider/energinet-watt-slider.js.map +1 -0
- package/esm2022/slider/index.js +20 -0
- package/esm2022/slider/index.js.map +1 -0
- package/{fesm2022/energinet-watt-slider.mjs → esm2022/slider/watt-slider.component.js} +7 -33
- package/esm2022/slider/watt-slider.component.js.map +1 -0
- package/esm2022/spinner/energinet-watt-spinner.js +5 -0
- package/esm2022/spinner/energinet-watt-spinner.js.map +1 -0
- package/esm2022/spinner/index.js +20 -0
- package/esm2022/spinner/index.js.map +1 -0
- package/{fesm2022/energinet-watt-spinner.mjs → esm2022/spinner/watt-spinner.component.js} +4 -30
- package/esm2022/spinner/watt-spinner.component.js.map +1 -0
- package/esm2022/stepper/energinet-watt-stepper.js +5 -0
- package/esm2022/stepper/energinet-watt-stepper.js.map +1 -0
- package/esm2022/stepper/index.js +21 -0
- package/esm2022/stepper/index.js.map +1 -0
- package/esm2022/stepper/watt-stepper-step.component.js +49 -0
- package/esm2022/stepper/watt-stepper-step.component.js.map +1 -0
- package/{fesm2022/energinet-watt-stepper.mjs → esm2022/stepper/watt-stepper.component.js} +15 -85
- package/esm2022/stepper/watt-stepper.component.js.map +1 -0
- package/esm2022/table/energinet-watt-table.js +5 -0
- package/esm2022/table/energinet-watt-table.js.map +1 -0
- package/esm2022/table/index.js +21 -0
- package/esm2022/table/index.js.map +1 -0
- package/esm2022/table/watt-table-data-source.js +27 -0
- package/esm2022/table/watt-table-data-source.js.map +1 -0
- package/esm2022/table/watt-table-expand-animation.js +65 -0
- package/esm2022/table/watt-table-expand-animation.js.map +1 -0
- package/{fesm2022/energinet-watt-table.mjs → esm2022/table/watt-table.component.js} +22 -134
- package/esm2022/table/watt-table.component.js.map +1 -0
- package/esm2022/tabs/energinet-watt-tabs.js +5 -0
- package/esm2022/tabs/energinet-watt-tabs.js.map +1 -0
- package/esm2022/tabs/index.js +31 -0
- package/esm2022/tabs/index.js.map +1 -0
- package/esm2022/tabs/watt-link-tab.component.js +34 -0
- package/esm2022/tabs/watt-link-tab.component.js.map +1 -0
- package/esm2022/tabs/watt-link-tabs.component.js +71 -0
- package/esm2022/tabs/watt-link-tabs.component.js.map +1 -0
- package/esm2022/tabs/watt-tab.component.js +42 -0
- package/esm2022/tabs/watt-tab.component.js.map +1 -0
- package/esm2022/tabs/watt-tabs-action.component.js +32 -0
- package/esm2022/tabs/watt-tabs-action.component.js.map +1 -0
- package/esm2022/tabs/watt-tabs.component.js +60 -0
- package/esm2022/tabs/watt-tabs.component.js.map +1 -0
- package/esm2022/text-field/energinet-watt-text-field.js +5 -0
- package/esm2022/text-field/energinet-watt-text-field.js.map +1 -0
- package/esm2022/text-field/index.js +20 -0
- package/esm2022/text-field/index.js.map +1 -0
- package/{fesm2022/energinet-watt-text-field.mjs → esm2022/text-field/watt-text-field.component.js} +10 -36
- package/esm2022/text-field/watt-text-field.component.js.map +1 -0
- package/esm2022/textarea-field/energinet-watt-textarea-field.js +5 -0
- package/esm2022/textarea-field/energinet-watt-textarea-field.js.map +1 -0
- package/esm2022/textarea-field/index.js +20 -0
- package/esm2022/textarea-field/index.js.map +1 -0
- package/{fesm2022/energinet-watt-textarea-field.mjs → esm2022/textarea-field/watt-textarea-field.component.js} +6 -32
- package/esm2022/textarea-field/watt-textarea-field.component.js.map +1 -0
- package/esm2022/toast/energinet-watt-toast.js +5 -0
- package/esm2022/toast/energinet-watt-toast.js.map +1 -0
- package/esm2022/toast/index.js +21 -0
- package/esm2022/toast/index.js.map +1 -0
- package/{fesm2022/energinet-watt-toast.mjs → esm2022/toast/watt-toast.component.js} +9 -82
- package/esm2022/toast/watt-toast.component.js.map +1 -0
- package/esm2022/toast/watt-toast.service.js +51 -0
- package/esm2022/toast/watt-toast.service.js.map +1 -0
- package/esm2022/tooltip/energinet-watt-tooltip.js +5 -0
- package/esm2022/tooltip/energinet-watt-tooltip.js.map +1 -0
- package/esm2022/tooltip/index.js +20 -0
- package/esm2022/tooltip/index.js.map +1 -0
- package/{fesm2022/energinet-watt-tooltip.mjs → esm2022/tooltip/watt-tooltip.component.js} +8 -98
- package/esm2022/tooltip/watt-tooltip.component.js.map +1 -0
- package/esm2022/tooltip/watt-tooltip.directive.js +67 -0
- package/esm2022/tooltip/watt-tooltip.directive.js.map +1 -0
- package/{fesm2022/energinet-watt-utils-css.mjs → esm2022/utils/css/css-custom-properties.service.js} +4 -30
- package/esm2022/utils/css/css-custom-properties.service.js.map +1 -0
- package/esm2022/utils/css/energinet-watt-utils-css.js +5 -0
- package/esm2022/utils/css/energinet-watt-utils-css.js.map +1 -0
- package/esm2022/utils/css/index.js +20 -0
- package/esm2022/utils/css/index.js.map +1 -0
- package/esm2022/utils/intersection-observer/energinet-watt-utils-intersection-observer.js +5 -0
- package/esm2022/utils/intersection-observer/energinet-watt-utils-intersection-observer.js.map +1 -0
- package/esm2022/utils/intersection-observer/index.js +20 -0
- package/esm2022/utils/intersection-observer/index.js.map +1 -0
- package/{fesm2022/energinet-watt-utils-intersection-observer.mjs → esm2022/utils/intersection-observer/watt-intersection-observer.service.js} +5 -31
- package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js.map +1 -0
- package/esm2022/utils/resize-observer/energinet-watt-utils-resize-observer.js +5 -0
- package/esm2022/utils/resize-observer/energinet-watt-utils-resize-observer.js.map +1 -0
- package/esm2022/utils/resize-observer/index.js +21 -0
- package/esm2022/utils/resize-observer/index.js.map +1 -0
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js +53 -0
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js.map +1 -0
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js +67 -0
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js.map +1 -0
- package/esm2022/validation-message/energinet-watt-validation-message.js +5 -0
- package/esm2022/validation-message/energinet-watt-validation-message.js.map +1 -0
- package/esm2022/validation-message/index.js +20 -0
- package/esm2022/validation-message/index.js.map +1 -0
- package/{fesm2022/energinet-watt-validation-message.mjs → esm2022/validation-message/watt-validation-message.component.js} +5 -31
- package/esm2022/validation-message/watt-validation-message.component.js.map +1 -0
- package/esm2022/validators/energinet-watt-validators.js +5 -0
- package/esm2022/validators/energinet-watt-validators.js.map +1 -0
- package/esm2022/validators/index.js +20 -0
- package/esm2022/validators/index.js.map +1 -0
- package/{fesm2022/energinet-watt-validators.mjs → esm2022/validators/watt-range.validators.js} +2 -28
- package/esm2022/validators/watt-range.validators.js.map +1 -0
- package/esm2022/vater/energinet-watt-vater.js +5 -0
- package/esm2022/vater/energinet-watt-vater.js.map +1 -0
- package/esm2022/vater/index.js +24 -0
- package/esm2022/vater/index.js.map +1 -0
- package/esm2022/vater/types.js +20 -0
- package/esm2022/vater/types.js.map +1 -0
- package/esm2022/vater/vater-flex.component.js +49 -0
- package/esm2022/vater/vater-flex.component.js.map +1 -0
- package/esm2022/vater/vater-layout.directive.js +65 -0
- package/esm2022/vater/vater-layout.directive.js.map +1 -0
- package/esm2022/vater/vater-spacer.component.js +29 -0
- package/esm2022/vater/vater-spacer.component.js.map +1 -0
- package/esm2022/vater/vater-stack.component.js +42 -0
- package/esm2022/vater/vater-stack.component.js.map +1 -0
- package/esm2022/vater/vater-utility.directive.js +53 -0
- package/esm2022/vater/vater-utility.directive.js.map +1 -0
- package/esm2022/year-field/energinet-watt-year-field.js +5 -0
- package/esm2022/year-field/energinet-watt-year-field.js.map +1 -0
- package/esm2022/year-field/index.js +20 -0
- package/esm2022/year-field/index.js.map +1 -0
- package/{fesm2022/energinet-watt-year-field.mjs → esm2022/year-field/watt-year-field.component.js} +13 -39
- package/esm2022/year-field/watt-year-field.component.js.map +1 -0
- package/esm2022/yearmonth-field/energinet-watt-yearmonth-field.js +5 -0
- package/esm2022/yearmonth-field/energinet-watt-yearmonth-field.js.map +1 -0
- package/esm2022/yearmonth-field/index.js +21 -0
- package/esm2022/yearmonth-field/index.js.map +1 -0
- package/{fesm2022/energinet-watt-yearmonth-field.mjs → esm2022/yearmonth-field/watt-yearmonth-field.component.js} +13 -79
- package/esm2022/yearmonth-field/watt-yearmonth-field.component.js.map +1 -0
- package/esm2022/yearmonth-field/year-month.js +42 -0
- package/esm2022/yearmonth-field/year-month.js.map +1 -0
- package/expandable-card/energinet-watt-expandable-card.d.ts +5 -0
- package/expandable-card/index.d.ts +19 -0
- package/{types/energinet-watt-expandable-card.d.ts → expandable-card/watt-expandable-card.component.d.ts} +9 -31
- package/field/energinet-watt-field.d.ts +5 -0
- package/field/index.d.ts +21 -0
- package/field/watt-field-error.component.d.ts +5 -0
- package/field/watt-field-hint.component.d.ts +5 -0
- package/field/watt-field-intl.service.d.ts +8 -0
- package/field/watt-field-warning.component.d.ts +5 -0
- package/field/watt-field.component.d.ts +53 -0
- package/file-field/energinet-watt-file-field.d.ts +5 -0
- package/file-field/index.d.ts +17 -0
- package/file-field/watt-file-field.component.d.ts +10 -0
- package/icon/energinet-watt-icon.d.ts +5 -0
- package/icon/flags/energinet-watt-icon-flags.d.ts +5 -0
- package/icon/flags/index.d.ts +26 -0
- package/icon/flags/watt-flag-ch.d.ts +5 -0
- package/icon/flags/watt-flag-de.d.ts +5 -0
- package/icon/flags/watt-flag-dk.d.ts +5 -0
- package/icon/flags/watt-flag-fi.d.ts +5 -0
- package/icon/flags/watt-flag-gb.d.ts +5 -0
- package/icon/flags/watt-flag-nl.d.ts +5 -0
- package/icon/flags/watt-flag-no.d.ts +5 -0
- package/icon/flags/watt-flag-pl.d.ts +5 -0
- package/icon/flags/watt-flag-se.d.ts +5 -0
- package/icon/flags/watt-flag.d.ts +13 -0
- package/icon/icon.component.d.ts +20 -0
- package/icon/icons.d.ts +97 -0
- package/icon/index.d.ts +17 -0
- package/index.d.ts +17 -0
- package/menu/energinet-watt-menu.d.ts +5 -0
- package/menu/index.d.ts +25 -0
- package/menu/watt-menu-group.component.d.ts +9 -0
- package/menu/watt-menu-item.component.d.ts +9 -0
- package/menu/watt-menu-trigger.directive.d.ts +36 -0
- package/menu/watt-menu.component.d.ts +44 -0
- package/modal/energinet-watt-modal.d.ts +5 -0
- package/modal/index.d.ts +18 -0
- package/modal/watt-modal.component.d.ts +84 -0
- package/modal/watt-modal.service.d.ts +56 -0
- package/package.json +92 -92
- package/paginator/energinet-watt-paginator.d.ts +5 -0
- package/paginator/index.d.ts +18 -0
- package/paginator/watt-paginator-intl.service.d.ts +14 -0
- package/paginator/watt-paginator.component.d.ts +53 -0
- package/phone-field/energinet-watt-phone-field.d.ts +5 -0
- package/phone-field/index.d.ts +18 -0
- package/phone-field/watt-phone-field-intl.service.d.ts +17 -0
- package/phone-field/watt-phone-field.component.d.ts +75 -0
- package/picker/__shared/energinet-watt-picker-__shared.d.ts +5 -0
- package/picker/__shared/index.d.ts +19 -0
- package/picker/__shared/placeholder-mask/watt-placeholder-mask.component.d.ts +34 -0
- package/{types/energinet-watt-picker-__shared.d.ts → picker/__shared/watt-picker-base.d.ts} +11 -34
- package/picker/__shared/watt-picker-value.d.ts +18 -0
- package/picker/datepicker/energinet-watt-picker-datepicker.d.ts +5 -0
- package/picker/datepicker/index.d.ts +19 -0
- package/picker/datepicker/watt-datepicker-intl.service.d.ts +7 -0
- package/picker/datepicker/watt-datepicker.component.d.ts +95 -0
- package/picker/timepicker/energinet-watt-picker-timepicker.d.ts +5 -0
- package/picker/timepicker/index.d.ts +17 -0
- package/picker/timepicker/maskito-time-range-mask.d.ts +18 -0
- package/{types/energinet-watt-picker-timepicker.d.ts → picker/timepicker/watt-timepicker.component.d.ts} +12 -16
- package/progress-tracker/energinet-watt-progress-tracker.d.ts +5 -0
- package/progress-tracker/index.d.ts +20 -0
- package/progress-tracker/watt-progress-tracker-step.component.d.ts +10 -0
- package/progress-tracker/watt-progress-tracker.component.d.ts +5 -0
- package/query-params/energinet-watt-query-params.d.ts +5 -0
- package/query-params/index.d.ts +17 -0
- package/{types/energinet-watt-query-params.d.ts → query-params/watt-query-params.directive.d.ts} +2 -5
- package/radio/energinet-watt-radio.d.ts +5 -0
- package/radio/index.d.ts +18 -0
- package/radio/watt-radio-group.component.d.ts +47 -0
- package/radio/watt-radio.component.d.ts +23 -0
- package/search/energinet-watt-search.d.ts +5 -0
- package/search/index.d.ts +17 -0
- package/search/watt-search.component.d.ts +44 -0
- package/segmented-buttons/energinet-watt-segmented-buttons.d.ts +5 -0
- package/segmented-buttons/index.d.ts +21 -0
- package/segmented-buttons/watt-segmented-button.component.d.ts +25 -0
- package/segmented-buttons/watt-segmented-buttons.component.d.ts +18 -0
- package/shell/energinet-watt-shell.d.ts +5 -0
- package/shell/index.d.ts +18 -0
- package/shell/nav-list/index.d.ts +18 -0
- package/shell/nav-list/watt-expand-on-active-link.directive.d.ts +9 -0
- package/shell/nav-list/watt-nav-list-item.component.d.ts +16 -0
- package/shell/nav-list/watt-nav-list.component.d.ts +12 -0
- package/shell/shell.component.d.ts +17 -0
- package/slide-toggle/energinet-watt-slide-toggle.d.ts +5 -0
- package/slide-toggle/index.d.ts +17 -0
- package/slide-toggle/watt-slide-toggle.component.d.ts +33 -0
- package/slider/energinet-watt-slider.d.ts +5 -0
- package/slider/index.d.ts +17 -0
- package/slider/watt-slider.component.d.ts +47 -0
- package/spinner/energinet-watt-spinner.d.ts +5 -0
- package/spinner/index.d.ts +17 -0
- package/spinner/watt-spinner.component.d.ts +15 -0
- package/stepper/energinet-watt-stepper.d.ts +5 -0
- package/stepper/index.d.ts +18 -0
- package/stepper/watt-stepper-step.component.d.ts +35 -0
- package/stepper/watt-stepper.component.d.ts +40 -0
- package/table/energinet-watt-table.d.ts +5 -0
- package/table/index.d.ts +18 -0
- package/table/watt-table-data-source.d.ts +39 -0
- package/table/watt-table-expand-animation.d.ts +18 -0
- package/{types/energinet-watt-table.d.ts → table/watt-table.component.d.ts} +49 -72
- package/tabs/energinet-watt-tabs.d.ts +5 -0
- package/tabs/index.d.ts +26 -0
- package/tabs/watt-link-tab.component.d.ts +7 -0
- package/tabs/watt-link-tabs.component.d.ts +7 -0
- package/tabs/watt-tab.component.d.ts +26 -0
- package/tabs/watt-tabs-action.component.d.ts +5 -0
- package/tabs/watt-tabs.component.d.ts +36 -0
- package/text-field/energinet-watt-text-field.d.ts +5 -0
- package/text-field/index.d.ts +17 -0
- package/text-field/watt-text-field.component.d.ts +80 -0
- package/textarea-field/energinet-watt-textarea-field.d.ts +5 -0
- package/textarea-field/index.d.ts +17 -0
- package/textarea-field/watt-textarea-field.component.d.ts +28 -0
- package/toast/energinet-watt-toast.d.ts +5 -0
- package/toast/index.d.ts +19 -0
- package/{types/energinet-watt-toast.d.ts → toast/watt-toast.component.d.ts} +5 -19
- package/toast/watt-toast.service.d.ts +12 -0
- package/tooltip/energinet-watt-tooltip.d.ts +5 -0
- package/tooltip/index.d.ts +17 -0
- package/tooltip/watt-tooltip.component.d.ts +26 -0
- package/tooltip/watt-tooltip.directive.d.ts +16 -0
- package/{types/energinet-watt-utils-css.d.ts → utils/css/css-custom-properties.service.d.ts} +2 -5
- package/utils/css/energinet-watt-utils-css.d.ts +5 -0
- package/utils/css/index.d.ts +17 -0
- package/utils/intersection-observer/energinet-watt-utils-intersection-observer.d.ts +5 -0
- package/utils/intersection-observer/index.d.ts +17 -0
- package/{types/energinet-watt-utils-intersection-observer.d.ts → utils/intersection-observer/watt-intersection-observer.service.d.ts} +3 -7
- package/utils/resize-observer/energinet-watt-utils-resize-observer.d.ts +5 -0
- package/utils/resize-observer/index.d.ts +18 -0
- package/{types/energinet-watt-utils-resize-observer.d.ts → utils/resize-observer/watt-resize-observer.directive.d.ts} +3 -30
- package/utils/resize-observer/watt-resize-observer.service.d.ts +22 -0
- package/validation-message/energinet-watt-validation-message.d.ts +5 -0
- package/validation-message/index.d.ts +17 -0
- package/validation-message/watt-validation-message.component.d.ts +50 -0
- package/validators/energinet-watt-validators.d.ts +5 -0
- package/validators/index.d.ts +17 -0
- package/{types/energinet-watt-validators.d.ts → validators/watt-range.validators.d.ts} +2 -6
- package/vater/energinet-watt-vater.d.ts +5 -0
- package/vater/index.d.ts +21 -0
- package/vater/types.d.ts +22 -0
- package/vater/vater-flex.component.d.ts +14 -0
- package/vater/vater-layout.directive.d.ts +24 -0
- package/vater/vater-spacer.component.d.ts +5 -0
- package/vater/vater-stack.component.d.ts +7 -0
- package/vater/vater-utility.directive.d.ts +17 -0
- package/year-field/energinet-watt-year-field.d.ts +5 -0
- package/year-field/index.d.ts +17 -0
- package/year-field/watt-year-field.component.d.ts +56 -0
- package/yearmonth-field/energinet-watt-yearmonth-field.d.ts +5 -0
- package/yearmonth-field/index.d.ts +18 -0
- package/yearmonth-field/watt-yearmonth-field.component.d.ts +58 -0
- package/yearmonth-field/year-month.d.ts +20 -0
- package/fesm2022/energinet-watt-badge.mjs.map +0 -1
- package/fesm2022/energinet-watt-breadcrumbs.mjs.map +0 -1
- package/fesm2022/energinet-watt-button.mjs.map +0 -1
- package/fesm2022/energinet-watt-card.mjs.map +0 -1
- package/fesm2022/energinet-watt-checkbox.mjs.map +0 -1
- package/fesm2022/energinet-watt-chip.mjs +0 -694
- package/fesm2022/energinet-watt-chip.mjs.map +0 -1
- package/fesm2022/energinet-watt-clipboard.mjs.map +0 -1
- package/fesm2022/energinet-watt-code.mjs.map +0 -1
- package/fesm2022/energinet-watt-core-breakpoints.mjs +0 -97
- package/fesm2022/energinet-watt-core-breakpoints.mjs.map +0 -1
- package/fesm2022/energinet-watt-core-color.mjs +0 -124
- package/fesm2022/energinet-watt-core-color.mjs.map +0 -1
- package/fesm2022/energinet-watt-core-date.mjs +0 -256
- package/fesm2022/energinet-watt-core-date.mjs.map +0 -1
- package/fesm2022/energinet-watt-data.mjs.map +0 -1
- package/fesm2022/energinet-watt-datetime-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-description-list.mjs.map +0 -1
- package/fesm2022/energinet-watt-drawer.mjs.map +0 -1
- package/fesm2022/energinet-watt-dropdown.mjs.map +0 -1
- package/fesm2022/energinet-watt-dropzone.mjs.map +0 -1
- package/fesm2022/energinet-watt-empty-state.mjs.map +0 -1
- package/fesm2022/energinet-watt-expandable-card.mjs.map +0 -1
- package/fesm2022/energinet-watt-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-file-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-icon-flags.mjs +0 -547
- package/fesm2022/energinet-watt-icon-flags.mjs.map +0 -1
- package/fesm2022/energinet-watt-icon.mjs.map +0 -1
- package/fesm2022/energinet-watt-menu.mjs +0 -282
- package/fesm2022/energinet-watt-menu.mjs.map +0 -1
- package/fesm2022/energinet-watt-modal.mjs.map +0 -1
- package/fesm2022/energinet-watt-paginator.mjs.map +0 -1
- package/fesm2022/energinet-watt-phone-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-picker-__shared.mjs +0 -292
- package/fesm2022/energinet-watt-picker-__shared.mjs.map +0 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +0 -1
- package/fesm2022/energinet-watt-picker-timepicker.mjs.map +0 -1
- package/fesm2022/energinet-watt-progress-tracker.mjs.map +0 -1
- package/fesm2022/energinet-watt-query-params.mjs.map +0 -1
- package/fesm2022/energinet-watt-radio.mjs.map +0 -1
- package/fesm2022/energinet-watt-search.mjs.map +0 -1
- package/fesm2022/energinet-watt-segmented-buttons.mjs.map +0 -1
- package/fesm2022/energinet-watt-shell.mjs +0 -303
- package/fesm2022/energinet-watt-shell.mjs.map +0 -1
- package/fesm2022/energinet-watt-slide-toggle.mjs.map +0 -1
- package/fesm2022/energinet-watt-slider.mjs.map +0 -1
- package/fesm2022/energinet-watt-spinner.mjs.map +0 -1
- package/fesm2022/energinet-watt-stepper.mjs.map +0 -1
- package/fesm2022/energinet-watt-table.mjs.map +0 -1
- package/fesm2022/energinet-watt-tabs.mjs +0 -254
- package/fesm2022/energinet-watt-tabs.mjs.map +0 -1
- package/fesm2022/energinet-watt-text-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-textarea-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-toast.mjs.map +0 -1
- package/fesm2022/energinet-watt-tooltip.mjs.map +0 -1
- package/fesm2022/energinet-watt-utils-css.mjs.map +0 -1
- package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +0 -1
- package/fesm2022/energinet-watt-utils-resize-observer.mjs +0 -143
- package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +0 -1
- package/fesm2022/energinet-watt-validation-message.mjs.map +0 -1
- package/fesm2022/energinet-watt-validators.mjs.map +0 -1
- package/fesm2022/energinet-watt-vater.mjs +0 -248
- package/fesm2022/energinet-watt-vater.mjs.map +0 -1
- package/fesm2022/energinet-watt-year-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-yearmonth-field.mjs.map +0 -1
- package/fesm2022/energinet-watt.mjs.map +0 -1
- package/types/energinet-watt-badge.d.ts +0 -19
- package/types/energinet-watt-button.d.ts +0 -23
- package/types/energinet-watt-card.d.ts +0 -24
- package/types/energinet-watt-checkbox.d.ts +0 -20
- package/types/energinet-watt-chip.d.ts +0 -104
- package/types/energinet-watt-clipboard.d.ts +0 -22
- package/types/energinet-watt-code.d.ts +0 -56
- package/types/energinet-watt-core-date.d.ts +0 -154
- package/types/energinet-watt-data.d.ts +0 -61
- package/types/energinet-watt-datetime-field.d.ts +0 -44
- package/types/energinet-watt-description-list.d.ts +0 -32
- package/types/energinet-watt-dropdown.d.ts +0 -167
- package/types/energinet-watt-dropzone.d.ts +0 -67
- package/types/energinet-watt-empty-state.d.ts +0 -39
- package/types/energinet-watt-field.d.ts +0 -62
- package/types/energinet-watt-file-field.d.ts +0 -13
- package/types/energinet-watt-icon-flags.d.ts +0 -61
- package/types/energinet-watt-icon.d.ts +0 -119
- package/types/energinet-watt-menu.d.ts +0 -119
- package/types/energinet-watt-modal.d.ts +0 -127
- package/types/energinet-watt-paginator.d.ts +0 -54
- package/types/energinet-watt-phone-field.d.ts +0 -79
- package/types/energinet-watt-picker-datepicker.d.ts +0 -90
- package/types/energinet-watt-progress-tracker.d.ts +0 -37
- package/types/energinet-watt-radio.d.ts +0 -71
- package/types/energinet-watt-search.d.ts +0 -47
- package/types/energinet-watt-segmented-buttons.d.ts +0 -48
- package/types/energinet-watt-shell.d.ts +0 -47
- package/types/energinet-watt-slide-toggle.d.ts +0 -20
- package/types/energinet-watt-slider.d.ts +0 -35
- package/types/energinet-watt-spinner.d.ts +0 -18
- package/types/energinet-watt-stepper.d.ts +0 -59
- package/types/energinet-watt-tabs.d.ts +0 -68
- package/types/energinet-watt-text-field.d.ts +0 -67
- package/types/energinet-watt-textarea-field.d.ts +0 -31
- package/types/energinet-watt-tooltip.d.ts +0 -20
- package/types/energinet-watt-validation-message.d.ts +0 -38
- package/types/energinet-watt-vater.d.ts +0 -87
- package/types/energinet-watt-year-field.d.ts +0 -60
- package/types/energinet-watt-yearmonth-field.d.ts +0 -64
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
//#region License
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
//#endregion
|
|
19
|
+
import { Input, inject, Directive, ElementRef, DestroyRef, HostBinding, ChangeDetectorRef, input, } from '@angular/core';
|
|
20
|
+
import { NgControl } from '@angular/forms';
|
|
21
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
22
|
+
import { Subject } from 'rxjs';
|
|
23
|
+
import * as i0 from "@angular/core";
|
|
24
|
+
export class WattPickerBase {
|
|
25
|
+
destroyRef = inject(DestroyRef);
|
|
26
|
+
changeDetectionRef = inject(ChangeDetectorRef);
|
|
27
|
+
ngControl = inject(NgControl, { optional: true });
|
|
28
|
+
elementRef = inject(ElementRef);
|
|
29
|
+
static nextId = 0;
|
|
30
|
+
id;
|
|
31
|
+
initialValue = null;
|
|
32
|
+
focused = false;
|
|
33
|
+
controlType = 'mat-date-range-input'; // We keep the controlType of Material Date Range Input as is, to keep some styling.
|
|
34
|
+
stateChanges = new Subject();
|
|
35
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
36
|
+
userAriaDescribedBy = input(undefined, ...(ngDevMode ? [{ debugName: "userAriaDescribedBy", alias: 'aria-describedby' }] : [{ alias: 'aria-describedby' }]));
|
|
37
|
+
get placeholder() {
|
|
38
|
+
return this._placeholder;
|
|
39
|
+
}
|
|
40
|
+
set placeholder(value) {
|
|
41
|
+
this._placeholder = value;
|
|
42
|
+
this.stateChanges.next();
|
|
43
|
+
}
|
|
44
|
+
get value() {
|
|
45
|
+
if (this.ngControl?.valid) {
|
|
46
|
+
const { value: { start, end }, } = this.ngControl;
|
|
47
|
+
return { start, end };
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
set value(value) {
|
|
52
|
+
const input = this.input();
|
|
53
|
+
const startInput = this.startInput();
|
|
54
|
+
const endInput = this.endInput();
|
|
55
|
+
const inputNotToBeInTheDocument = !this.range ? !input : !startInput;
|
|
56
|
+
if (inputNotToBeInTheDocument) {
|
|
57
|
+
this.initialValue = value;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (this.range) {
|
|
61
|
+
if (!startInput || !endInput)
|
|
62
|
+
return;
|
|
63
|
+
this.setRangeValue(value, startInput.nativeElement, endInput.nativeElement);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
if (!input)
|
|
67
|
+
return;
|
|
68
|
+
this.setSingleValue(value, input.nativeElement);
|
|
69
|
+
}
|
|
70
|
+
this.stateChanges.next();
|
|
71
|
+
}
|
|
72
|
+
set range(range) {
|
|
73
|
+
this._range = coerceBooleanProperty(range);
|
|
74
|
+
}
|
|
75
|
+
get range() {
|
|
76
|
+
return this._range;
|
|
77
|
+
}
|
|
78
|
+
_range = false;
|
|
79
|
+
get required() {
|
|
80
|
+
return this._required;
|
|
81
|
+
}
|
|
82
|
+
set required(value) {
|
|
83
|
+
this._required = coerceBooleanProperty(value);
|
|
84
|
+
this.stateChanges.next();
|
|
85
|
+
}
|
|
86
|
+
_required = false;
|
|
87
|
+
get disabled() {
|
|
88
|
+
return this._disabled;
|
|
89
|
+
}
|
|
90
|
+
set disabled(value) {
|
|
91
|
+
this._disabled = coerceBooleanProperty(value);
|
|
92
|
+
this.stateChanges.next();
|
|
93
|
+
}
|
|
94
|
+
_disabled = false;
|
|
95
|
+
get empty() {
|
|
96
|
+
if (this.range) {
|
|
97
|
+
return !this.ngControl?.value?.start && !this.ngControl?.value?.end;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return this.ngControl?.value?.length === 0;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
get errorState() {
|
|
104
|
+
return !!this.ngControl?.invalid && !!this.ngControl?.touched;
|
|
105
|
+
}
|
|
106
|
+
get shouldLabelFloat() {
|
|
107
|
+
return this.focused || !this.empty;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @ignore
|
|
112
|
+
*/
|
|
113
|
+
control = null;
|
|
114
|
+
constructor(id) {
|
|
115
|
+
this.id = id;
|
|
116
|
+
this.elementRef.nativeElement.setAttribute('id', id);
|
|
117
|
+
if (this.ngControl != null) {
|
|
118
|
+
this.ngControl.valueAccessor = this;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
ngOnInit() {
|
|
122
|
+
this.control = this.ngControl?.control;
|
|
123
|
+
}
|
|
124
|
+
ngAfterViewInit() {
|
|
125
|
+
if (this.initialValue) {
|
|
126
|
+
this.writeValue(this.initialValue);
|
|
127
|
+
}
|
|
128
|
+
if (this.range) {
|
|
129
|
+
this.initRangeInput();
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
this.initSingleInput();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
ngOnDestroy() {
|
|
136
|
+
this.stateChanges.complete();
|
|
137
|
+
}
|
|
138
|
+
setDescribedByIds(ids) {
|
|
139
|
+
this.elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));
|
|
140
|
+
}
|
|
141
|
+
onContainerClick() {
|
|
142
|
+
// Intentionally left empty
|
|
143
|
+
}
|
|
144
|
+
writeValue(value) {
|
|
145
|
+
this.value = value;
|
|
146
|
+
}
|
|
147
|
+
registerOnChange(onChangeFn) {
|
|
148
|
+
this.changeParentValue = onChangeFn;
|
|
149
|
+
}
|
|
150
|
+
registerOnTouched(onTouchFn) {
|
|
151
|
+
this.markParentControlAsTouched = onTouchFn;
|
|
152
|
+
}
|
|
153
|
+
setDisabledState(isDisabled) {
|
|
154
|
+
this.disabled = isDisabled;
|
|
155
|
+
this.changeDetectionRef.detectChanges();
|
|
156
|
+
}
|
|
157
|
+
onFocusIn() {
|
|
158
|
+
if (!this.focused) {
|
|
159
|
+
this.focused = true;
|
|
160
|
+
this.stateChanges.next();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
onFocusOut(event) {
|
|
164
|
+
const id = this.elementRef.nativeElement.attributes.getNamedItem('aria-owns');
|
|
165
|
+
const overlay = id ? document.getElementById(id.value) : null;
|
|
166
|
+
const isChild = overlay?.contains(event.relatedTarget);
|
|
167
|
+
if (!this.elementRef.nativeElement.contains(event.relatedTarget) && !isChild) {
|
|
168
|
+
this.focused = false;
|
|
169
|
+
this.markParentControlAsTouched();
|
|
170
|
+
this.stateChanges.next();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
174
|
+
changeParentValue = (value) => {
|
|
175
|
+
// Intentionally left empty
|
|
176
|
+
};
|
|
177
|
+
markParentControlAsTouched = () => {
|
|
178
|
+
// Intentionally left empty
|
|
179
|
+
};
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattPickerBase, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
181
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: WattPickerBase, isStandalone: true, inputs: { userAriaDescribedBy: { classPropertyName: "userAriaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, range: { classPropertyName: "range", publicName: "range", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.watt-field-disabled": "this.disabled" } }, ngImport: i0 });
|
|
182
|
+
}
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattPickerBase, decorators: [{
|
|
184
|
+
type: Directive
|
|
185
|
+
}], ctorParameters: () => [{ type: undefined }], propDecorators: { userAriaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], value: [{
|
|
186
|
+
type: Input
|
|
187
|
+
}], range: [{
|
|
188
|
+
type: Input
|
|
189
|
+
}], required: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}], disabled: [{
|
|
192
|
+
type: HostBinding,
|
|
193
|
+
args: ['attr.watt-field-disabled']
|
|
194
|
+
}, {
|
|
195
|
+
type: Input
|
|
196
|
+
}] } });
|
|
197
|
+
//# sourceMappingURL=watt-picker-base.js.map
|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AC;IAC1C,CAAC;IAED,SAAS;QACP,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,UAAU,CAAC,KAAiB;QAC1B,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;QAC9E,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,MAAM,OAAO,GAAG,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAwB,CAAC,CAAC;QAElE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAwB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACxF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,0BAA0B,EAAE,CAAC;YAClC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,6DAA6D;IACnD,iBAAiB,GAAG,CAAC,KAA6B,EAAQ,EAAE;QACpE,2BAA2B;IAC7B,CAAC,CAAC;IAEQ,0BAA0B,GAAG,GAAS,EAAE;QAChD,2BAA2B;IAC7B,CAAC,CAAC;wGAlOkB,cAAc;4FAAd,cAAc;;4FAAd,cAAc;kBADnC,SAAS;;sBAuCP,KAAK;;sBAoCL,KAAK;;sBAUL,KAAK;;sBAYL,WAAW;uBAAC,0BAA0B;;sBACtC,KAAK","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Input,\n OnInit,\n Signal,\n inject,\n Directive,\n OnDestroy,\n ElementRef,\n DestroyRef,\n HostBinding,\n AfterViewInit,\n ChangeDetectorRef,\n input,\n} from '@angular/core';\n\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\nimport { Subject } from 'rxjs';\n\nimport { WattDateRange } from '@energinet/watt/core/date';\n\nimport { WattPickerValue } from './watt-picker-value';\n@Directive()\nexport abstract class WattPickerBase\n implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor\n{\n protected destroyRef = inject(DestroyRef);\n protected changeDetectionRef = inject(ChangeDetectorRef);\n protected ngControl = inject(NgControl, { optional: true });\n protected elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n abstract input: Signal<ElementRef<HTMLInputElement> | undefined>;\n abstract endInput: Signal<ElementRef<HTMLInputElement> | undefined>;\n abstract startInput: Signal<ElementRef<HTMLInputElement> | undefined>;\n\n static nextId = 0;\n\n id: string;\n\n initialValue: WattPickerValue = null;\n\n focused = false;\n\n controlType = 'mat-date-range-input'; // We keep the controlType of Material Date Range Input as is, to keep some styling.\n\n stateChanges = new Subject<void>();\n\n // eslint-disable-next-line @angular-eslint/no-input-rename\n userAriaDescribedBy = input<string>(undefined, { alias: 'aria-describedby' });\n\n get placeholder(): string {\n return this._placeholder;\n }\n\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n\n protected abstract _placeholder: string;\n\n @Input()\n get value(): WattDateRange | null {\n if (this.ngControl?.valid) {\n const {\n value: { start, end },\n } = this.ngControl;\n\n return { start, end };\n }\n\n return null;\n }\n\n set value(value: WattPickerValue) {\n const input = this.input();\n const startInput = this.startInput();\n const endInput = this.endInput();\n\n const inputNotToBeInTheDocument = !this.range ? !input : !startInput;\n\n if (inputNotToBeInTheDocument) {\n this.initialValue = value;\n return;\n }\n\n if (this.range) {\n if (!startInput || !endInput) return;\n this.setRangeValue(value as WattDateRange, startInput.nativeElement, endInput.nativeElement);\n } else {\n if (!input) return;\n this.setSingleValue(value as Exclude<WattPickerValue, WattDateRange>, input.nativeElement);\n }\n\n this.stateChanges.next();\n }\n\n @Input()\n set range(range: boolean) {\n this._range = coerceBooleanProperty(range);\n }\n get range(): boolean {\n return this._range;\n }\n\n private _range = false;\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n\n set required(value: BooleanInput) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n private _required = false;\n\n @HostBinding('attr.watt-field-disabled')\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: BooleanInput) {\n this._disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n\n private _disabled = false;\n\n get empty() {\n if (this.range) {\n return !this.ngControl?.value?.start && !this.ngControl?.value?.end;\n } else {\n return this.ngControl?.value?.length === 0;\n }\n }\n\n get errorState(): boolean {\n return !!this.ngControl?.invalid && !!this.ngControl?.touched;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n\n /**\n *\n * @ignore\n */\n control: FormControl | null = null;\n\n constructor(id: string) {\n this.id = id;\n this.elementRef.nativeElement.setAttribute('id', id);\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit(): void {\n this.control = this.ngControl?.control as FormControl;\n }\n\n ngAfterViewInit() {\n if (this.initialValue) {\n this.writeValue(this.initialValue);\n }\n\n if (this.range) {\n this.initRangeInput();\n } else {\n this.initSingleInput();\n }\n }\n\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n protected abstract initRangeInput(): void;\n\n protected abstract initSingleInput(): void;\n\n protected abstract setSingleValue(\n value: Exclude<WattPickerValue, WattDateRange>,\n input: HTMLInputElement\n ): void;\n\n protected abstract setRangeValue(\n value: WattDateRange,\n startInput: HTMLInputElement,\n endInput: HTMLInputElement\n ): void;\n\n setDescribedByIds(ids: string[]) {\n this.elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n }\n\n onContainerClick() {\n // Intentionally left empty\n }\n\n writeValue(value: WattPickerValue): void {\n this.value = value;\n }\n\n registerOnChange(onChangeFn: (value: string | WattDateRange) => void): void {\n this.changeParentValue = onChangeFn;\n }\n\n registerOnTouched(onTouchFn: () => void) {\n this.markParentControlAsTouched = onTouchFn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectionRef.detectChanges();\n }\n\n onFocusIn() {\n if (!this.focused) {\n this.focused = true;\n this.stateChanges.next();\n }\n }\n\n onFocusOut(event: FocusEvent) {\n const id = this.elementRef.nativeElement.attributes.getNamedItem('aria-owns');\n const overlay = id ? document.getElementById(id.value) : null;\n const isChild = overlay?.contains(event.relatedTarget as Element);\n\n if (!this.elementRef.nativeElement.contains(event.relatedTarget as Element) && !isChild) {\n this.focused = false;\n this.markParentControlAsTouched();\n this.stateChanges.next();\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected changeParentValue = (value: string | WattDateRange): void => {\n // Intentionally left empty\n };\n\n protected markParentControlAsTouched = (): void => {\n // Intentionally left empty\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watt-picker-value.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/__shared/watt-picker-value.ts"],"names":[],"mappings":"","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { WattDateRange } from '@energinet/watt/core/date';\n\nexport type WattPickerValue = string | WattDateRange | null | undefined;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energinet-watt-picker-datepicker.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/datepicker/energinet-watt-picker-datepicker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region License
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
//#endregion
|
|
19
|
+
export { WattDatepickerComponent } from './watt-datepicker.component';
|
|
20
|
+
export { danishTimeZoneIdentifier } from './watt-datepicker.component';
|
|
21
|
+
export { WattDatepickerIntlService } from './watt-datepicker-intl.service';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/datepicker/index.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDatepickerComponent } from './watt-datepicker.component';\nexport { danishTimeZoneIdentifier } from './watt-datepicker.component';\nexport { WattDatepickerIntlService } from './watt-datepicker-intl.service';\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region License
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
//#endregion
|
|
19
|
+
import { Injectable } from '@angular/core';
|
|
20
|
+
import * as i0 from "@angular/core";
|
|
21
|
+
export class WattDatepickerIntlService {
|
|
22
|
+
clear = 'Clear';
|
|
23
|
+
select = 'OK';
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
25
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerIntlService, providedIn: 'root' });
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerIntlService, decorators: [{
|
|
28
|
+
type: Injectable,
|
|
29
|
+
args: [{ providedIn: 'root' }]
|
|
30
|
+
}] });
|
|
31
|
+
//# sourceMappingURL=watt-datepicker-intl.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watt-datepicker-intl.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/datepicker/watt-datepicker-intl.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;AAG3C,MAAM,OAAO,yBAAyB;IACpC,KAAK,GAAG,OAAO,CAAC;IAChB,MAAM,GAAG,IAAI,CAAC;wGAFH,yBAAyB;4GAAzB,yBAAyB,cADZ,MAAM;;4FACnB,yBAAyB;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDatepickerIntlService {\n clear = 'Clear';\n select = 'OK';\n}\n"]}
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, ChangeDetectorRef, LOCALE_ID, input, booleanAttribute, viewChild, computed, linkedSignal, effect, ViewEncapsulation, Component, Injectable } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/material/input';
|
|
4
|
-
import { MatInputModule } from '@angular/material/input';
|
|
5
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
-
import { NgControl } from '@angular/forms';
|
|
7
|
-
import * as i2 from '@angular/material/datepicker';
|
|
8
|
-
import { MatEndDate, MatStartDate, MatDateRangeInput, MatDatepickerInput, MatDateRangePicker, MatDatepickerModule } from '@angular/material/datepicker';
|
|
9
|
-
import { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';
|
|
10
|
-
import { WattLocaleService, dayjs } from '@energinet/watt/core/date';
|
|
11
|
-
import { WattFieldComponent } from '@energinet/watt/field';
|
|
12
|
-
import { WattButtonComponent } from '@energinet/watt/button';
|
|
13
|
-
import { WattPickerBase, WattPlaceholderMaskComponent } from '@energinet/watt/picker/__shared';
|
|
14
|
-
|
|
15
1
|
//#region License
|
|
16
2
|
/**
|
|
17
3
|
* @license
|
|
@@ -30,8 +16,21 @@ import { WattPickerBase, WattPlaceholderMaskComponent } from '@energinet/watt/pi
|
|
|
30
16
|
* limitations under the License.
|
|
31
17
|
*/
|
|
32
18
|
//#endregion
|
|
19
|
+
import { input, effect, inject, computed, Component, LOCALE_ID, viewChild, ElementRef, linkedSignal, booleanAttribute, ChangeDetectorRef, ViewEncapsulation, } from '@angular/core';
|
|
20
|
+
import { MatInputModule } from '@angular/material/input';
|
|
21
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
22
|
+
import { NgControl } from '@angular/forms';
|
|
23
|
+
import { MatEndDate, MatStartDate, MatDateRangeInput, MatDateRangePicker, MatDatepickerInput, MatDatepickerModule, } from '@angular/material/datepicker';
|
|
24
|
+
import { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';
|
|
25
|
+
import { dayjs, WattLocaleService, } from '@energinet/watt/core/date';
|
|
26
|
+
import { WattFieldComponent } from '@energinet/watt/field';
|
|
27
|
+
import { WattButtonComponent } from '@energinet/watt/button';
|
|
28
|
+
import { WattPickerBase, WattPlaceholderMaskComponent, } from '@energinet/watt/picker/__shared';
|
|
29
|
+
import * as i0 from "@angular/core";
|
|
30
|
+
import * as i1 from "@angular/material/input";
|
|
31
|
+
import * as i2 from "@angular/material/datepicker";
|
|
33
32
|
const dateShortFormat = 'DD-MM-YYYY';
|
|
34
|
-
const danishTimeZoneIdentifier = 'Europe/Copenhagen';
|
|
33
|
+
export const danishTimeZoneIdentifier = 'Europe/Copenhagen';
|
|
35
34
|
/**
|
|
36
35
|
* Usage:
|
|
37
36
|
* `import { WattDatepickerComponent } from '@energinet/watt/datepicker';`
|
|
@@ -39,7 +38,7 @@ const danishTimeZoneIdentifier = 'Europe/Copenhagen';
|
|
|
39
38
|
* IMPORTANT:
|
|
40
39
|
* The styling is calculated based on our monospaced font.
|
|
41
40
|
*/
|
|
42
|
-
class WattDatepickerComponent extends WattPickerBase {
|
|
41
|
+
export class WattDatepickerComponent extends WattPickerBase {
|
|
43
42
|
elementRef = inject(ElementRef);
|
|
44
43
|
changeDetectionRef = inject(ChangeDetectorRef);
|
|
45
44
|
ngControl = inject(NgControl, { optional: true, self: true });
|
|
@@ -302,58 +301,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
302
301
|
WattPlaceholderMaskComponent,
|
|
303
302
|
], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"] }]
|
|
304
303
|
}], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], rangeMonthOnlyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMonthOnlyMode", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], dateClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateClass", required: false }] }], canStepThroughDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "canStepThroughDays", required: false }] }], matEndDate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatEndDate), { isSignal: true }] }], matStartDate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatStartDate), { isSignal: true }] }], matDateRangeInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangeInput), { isSignal: true }] }], matDatepickerInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDatepickerInput), { isSignal: true }] }], matDateRangePicker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangePicker), { isSignal: true }] }], actualInput: [{ type: i0.ViewChild, args: ['actualInput', { isSignal: true }] }], input: [{ type: i0.ViewChild, args: ['dateInput', { isSignal: true }] }], endInput: [{ type: i0.ViewChild, args: ['endDateInput', { isSignal: true }] }], startInput: [{ type: i0.ViewChild, args: ['startDateInput', { isSignal: true }] }] } });
|
|
305
|
-
|
|
306
|
-
//#region License
|
|
307
|
-
/**
|
|
308
|
-
* @license
|
|
309
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
310
|
-
*
|
|
311
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
312
|
-
* you may not use this file except in compliance with the License.
|
|
313
|
-
* You may obtain a copy of the License at
|
|
314
|
-
*
|
|
315
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
316
|
-
*
|
|
317
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
318
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
319
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
320
|
-
* See the License for the specific language governing permissions and
|
|
321
|
-
* limitations under the License.
|
|
322
|
-
*/
|
|
323
|
-
//#endregion
|
|
324
|
-
class WattDatepickerIntlService {
|
|
325
|
-
clear = 'Clear';
|
|
326
|
-
select = 'OK';
|
|
327
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
328
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerIntlService, providedIn: 'root' });
|
|
329
|
-
}
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerIntlService, decorators: [{
|
|
331
|
-
type: Injectable,
|
|
332
|
-
args: [{ providedIn: 'root' }]
|
|
333
|
-
}] });
|
|
334
|
-
|
|
335
|
-
//#region License
|
|
336
|
-
/**
|
|
337
|
-
* @license
|
|
338
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
339
|
-
*
|
|
340
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
341
|
-
* you may not use this file except in compliance with the License.
|
|
342
|
-
* You may obtain a copy of the License at
|
|
343
|
-
*
|
|
344
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
345
|
-
*
|
|
346
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
347
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
348
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
349
|
-
* See the License for the specific language governing permissions and
|
|
350
|
-
* limitations under the License.
|
|
351
|
-
*/
|
|
352
|
-
//#endregion
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Generated bundle index. Do not edit.
|
|
356
|
-
*/
|
|
357
|
-
|
|
358
|
-
export { WattDatepickerComponent, WattDatepickerIntlService, danishTimeZoneIdentifier };
|
|
359
|
-
//# sourceMappingURL=energinet-watt-picker-datepicker.mjs.map
|
|
304
|
+
//# sourceMappingURL=watt-datepicker.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watt-datepicker.component.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/datepicker/watt-datepicker.component.ts","../../../../../libs/watt/package/picker/datepicker/watt-datepicker.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,UAAU,EACV,YAAY,EAEZ,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAmB,SAAS,EAAa,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,MAAM,cAAc,CAAC;AAE7F,OAAO,EACL,KAAK,EAGL,iBAAiB,GAElB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EACL,cAAc,EAEd,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;;;;AAEzC,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAE5D;;;;;;GAMG;AAgBH,MAAM,OAAO,uBAAwB,SAAQ,cAAc;IACtC,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC;IACzD,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CA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AK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5C,CAAC;IAEO,0BAA0B,CAAC,KAAa;QAC9C,MAAM,sBAAsB,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAEhE,IAAI,yBAAyB,GAAgB,IAAI,CAAC;QAElD,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YAC5C,yBAAyB,GAAG,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,yBAAyB,CAAC;IACnC,CAAC;wGA5UU,uBAAuB;4FAAvB,uBAAuB,s+BAXvB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC,sEA0BnC,UAAU,+FACN,YAAY,oGACF,iBAAiB,qGACf,kBAAkB,qGAClB,kBAAkB,mgBC/GpF,6oIA8IA,8kED1DI,cAAc,iYACd,mBAAmB,k5BAEnB,kBAAkB,yLAClB,mBAAmB,sIACnB,4BAA4B;;4FAGnB,uBAAuB;kBAfnC,SAAS;+BACE,iBAAiB,aAGhB,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,yBAAyB,EAAE,CAAC,iBACpE,iBAAiB,CAAC,IAAI,WAC5B;wBACP,cAAc;wBACd,mBAAmB;wBAEnB,kBAAkB;wBAClB,mBAAmB;wBACnB,4BAA4B;qBAC7B;oyBAiB+C,UAAU,2FACN,YAAY,gGACF,iBAAiB,iGACf,kBAAkB,iGAClB,kBAAkB,sEAE5B,aAAa,+DACV,WAAW,kEACR,cAAc,oEACZ,gBAAgB","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n effect,\n inject,\n computed,\n Component,\n LOCALE_ID,\n viewChild,\n ElementRef,\n linkedSignal,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { AbstractControl, NgControl, Validator } from '@angular/forms';\n\nimport {\n MatEndDate,\n MatStartDate,\n MatDateRangeInput,\n MatDateRangePicker,\n MatDatepickerInput,\n MatDatepickerModule,\n MatCalendarCellClassFunction,\n} from '@angular/material/datepicker';\n\nimport { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';\n\nimport {\n dayjs,\n WattRange,\n WattDateRange,\n WattLocaleService,\n WattSupportedLocales,\n} from '@energinet/watt/core/date';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattButtonComponent } from '@energinet/watt/button';\n\nimport {\n WattPickerBase,\n WattPickerValue,\n WattPlaceholderMaskComponent,\n} from '@energinet/watt/picker/__shared';\n\nconst dateShortFormat = 'DD-MM-YYYY';\nexport const danishTimeZoneIdentifier = 'Europe/Copenhagen';\n\n/**\n * Usage:\n * `import { WattDatepickerComponent } from '@energinet/watt/datepicker';`\n *\n * IMPORTANT:\n * The styling is calculated based on our monospaced font.\n */\n@Component({\n selector: 'watt-datepicker',\n templateUrl: './watt-datepicker.component.html',\n styleUrls: ['./watt-datepicker.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: WattDatepickerComponent }],\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatInputModule,\n MatDatepickerModule,\n\n WattFieldComponent,\n WattButtonComponent,\n WattPlaceholderMaskComponent,\n ],\n})\nexport class WattDatepickerComponent extends WattPickerBase implements Validator, AfterViewInit {\n protected override elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected override changeDetectionRef = inject(ChangeDetectorRef);\n protected override ngControl = inject(NgControl, { optional: true, self: true });\n private localeService = inject(WattLocaleService);\n private locale = inject<WattSupportedLocales>(LOCALE_ID);\n\n max = input<Date>();\n min = input<Date>();\n label = input<string>('');\n rangeMonthOnlyMode = input(false);\n startAt = input<Date | null>(null);\n dateClass = input<MatCalendarCellClassFunction<Date>>(() => '');\n canStepThroughDays = input(false, { transform: booleanAttribute });\n\n matEndDate = viewChild<MatEndDate<Date | null>>(MatEndDate);\n matStartDate = viewChild<MatStartDate<Date | null>>(MatStartDate);\n matDateRangeInput = viewChild<MatDateRangeInput<Date | null>>(MatDateRangeInput);\n matDatepickerInput = viewChild<MatDatepickerInput<Date | null>>(MatDatepickerInput);\n matDateRangePicker = viewChild<MatDateRangePicker<Date | null>>(MatDateRangePicker);\n\n actualInput = viewChild<ElementRef<HTMLInputElement>>('actualInput');\n override input = viewChild<ElementRef<HTMLInputElement>>('dateInput');\n override endInput = viewChild<ElementRef<HTMLInputElement>>('endDateInput');\n override startInput = viewChild<ElementRef<HTMLInputElement>>('startDateInput');\n\n protected _placeholder = this.getPlaceholderByLocale(this.locale);\n\n rangeSeparator = ' - ';\n\n rangePlaceholder = this.getRangePlaceholder();\n\n inputMask = computed(() =>\n maskitoDateOptionsGenerator({\n mode: 'dd/mm/yyyy',\n separator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n rangeInputMask = computed(() =>\n maskitoDateRangeOptionsGenerator({\n mode: 'dd/mm/yyyy',\n dateSeparator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n getPlaceholderByLocale(locale: WattSupportedLocales): string {\n return locale === 'da' ? 'dd-mm-åååå' : 'dd-mm-yyyy';\n }\n\n getRangePlaceholder(): string {\n return this.placeholder + this.rangeSeparator + this.placeholder;\n }\n\n isPrevDayButtonDisabled = linkedSignal(() => this.isPrevDayBeforeOrEqualToMinDate());\n isNextDayButtonDisabled = linkedSignal(() => this.isNextDayAfterOrEqualToMaxDate());\n\n constructor() {\n super(`watt-datepicker-${WattDatepickerComponent.nextId++}`);\n\n effect(() => {\n const locale = this.localeService.locale();\n this.placeholder = this.getPlaceholderByLocale(locale);\n this.rangePlaceholder = this.getRangePlaceholder();\n });\n\n effect(() => {\n this.rangeMonthOnlyMode();\n this.ngControl?.control?.updateValueAndValidity();\n });\n }\n\n override ngAfterViewInit() {\n super.ngAfterViewInit();\n\n this.ngControl?.control?.addValidators(this.validate);\n }\n\n validate = ({ value }: AbstractControl<WattRange<string>>) => {\n if (!value?.end || !value?.start) return null;\n if (!this.rangeMonthOnlyMode()) return null;\n const start = dayjs(value.start);\n const end = dayjs(value.end);\n return start.isSame(start.startOf('month')) && end.isSame(start.endOf('month'))\n ? null\n : { monthOnly: true };\n };\n\n protected initSingleInput() {\n const matDatepickerInput = this.matDatepickerInput();\n if (this.initialValue && matDatepickerInput) {\n matDatepickerInput.value = this.initialValue;\n this.datepickerClosed();\n }\n }\n\n inputChanged(value: string) {\n const dateString = value.slice(0, this.placeholder.length);\n\n if (dateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (dateString.length !== this.placeholder.length) {\n return;\n }\n\n const date = this.parseDateShortFormat(dateString);\n this.control?.setValue(this.formatDateFromViewToModel(date));\n }\n\n datepickerClosed() {\n const matDatepickerInput = this.matDatepickerInput();\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n if (matDatepickerInput && matDatepickerInput.value) {\n this.control?.setValue(matDatepickerInput.value);\n\n actualInput.nativeElement.value = this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDatepickerInput.value)\n );\n } else {\n actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n this.isPrevDayButtonDisabled.set(this.isPrevDayBeforeOrEqualToMinDate());\n this.isNextDayButtonDisabled.set(this.isNextDayAfterOrEqualToMaxDate());\n\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n onMonthSelected(date: Date) {\n const matDateRangePicker = this.matDateRangePicker();\n if (matDateRangePicker && this.rangeMonthOnlyMode() && date) {\n matDateRangePicker.select(dayjs(date).startOf('month').toDate());\n matDateRangePicker.select(dayjs(date).endOf('month').toDate());\n matDateRangePicker.close();\n }\n }\n\n protected initRangeInput() {\n const matStartDate = this.matStartDate();\n const matEndDate = this.matEndDate();\n\n if (this.initialValue && matStartDate && matEndDate) {\n matStartDate.value = (this.initialValue as WattDateRange).start;\n matEndDate.value = (this.initialValue as WattDateRange).end;\n this.rangePickerClosed();\n }\n }\n\n clearRangePicker() {\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n this.control?.setValue(null);\n actualInput.nativeElement.value = '';\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n rangeInputChanged(value: string) {\n const startDateString = value.slice(0, this.placeholder.length);\n\n if (startDateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (startDateString.length !== this.placeholder.length) {\n return;\n }\n\n const start = this.parseDateShortFormat(startDateString);\n const endDateString = value.slice(this.placeholder.length + this.rangeSeparator.length);\n let end = this.setEndDateToDanishTimeZone(endDateString);\n\n if (end !== null) {\n end = this.setToEndOfDay(end);\n this.control?.setValue({ start, end });\n }\n }\n\n rangePickerClosed() {\n const matDateRangeInput = this.matDateRangeInput();\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n if (matDateRangeInput?.value?.start && matDateRangeInput?.value?.end) {\n actualInput.nativeElement.value =\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDateRangeInput.value?.start)\n ) +\n '-' +\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDateRangeInput.value.end)\n );\n\n this.control?.setValue({\n start: this.formatDateFromViewToModel(matDateRangeInput.value.start),\n end: this.formatDateFromViewToModel(matDateRangeInput.value.end),\n });\n } else {\n actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n protected setSingleValue(\n value: Exclude<WattPickerValue, WattDateRange>,\n input: HTMLInputElement\n ) {\n const matDatepickerInput = this.matDatepickerInput();\n if (matDatepickerInput) {\n this.setValueToInput(value, input, matDatepickerInput);\n }\n }\n\n protected setRangeValue(\n value: WattDateRange | null,\n startInput: HTMLInputElement,\n endInput: HTMLInputElement\n ) {\n const { start, end } = value ?? {};\n\n const matStartDate = this.matStartDate();\n const matEndDate = this.matEndDate();\n\n if (!matStartDate || !matEndDate) return;\n\n this.setValueToInput(start, startInput, matStartDate);\n this.setValueToInput(end, endInput, matEndDate);\n }\n\n prevDay() {\n this.changeDay(-1);\n }\n\n nextDay() {\n this.changeDay(1);\n }\n\n private changeDay(value: number) {\n const currentDate = this.matDatepickerInput()?.value;\n\n if (currentDate) {\n const newDate = dayjs(currentDate).add(value, 'day').toISOString();\n const newDateFormatted = this.formatDateTimeFromModelToView(newDate);\n\n this.inputChanged(newDateFormatted);\n this.datepickerClosed();\n }\n }\n\n private isPrevDayBeforeOrEqualToMinDate() {\n const min = this.min();\n const selectedDate = this.matDatepickerInput()?.value;\n\n if (!min || !selectedDate) return false;\n\n const isBefore = dayjs(selectedDate).isBefore(min, 'day');\n const isSame = dayjs(selectedDate).isSame(min, 'day');\n\n return isSame || isBefore;\n }\n\n private isNextDayAfterOrEqualToMaxDate() {\n const max = this.max();\n const selectedDate = this.matDatepickerInput()?.value;\n\n if (!max || !selectedDate) return false;\n\n const isAfter = dayjs(selectedDate).isAfter(max, 'day');\n const isSame = dayjs(selectedDate).isSame(max, 'day');\n\n return isSame || isAfter;\n }\n\n private parseDateShortFormat(value: string): Date {\n return dayjs(value, dateShortFormat).toDate();\n }\n\n private setValueToInput<D extends { value: Date | null }>(\n value: string | null | undefined,\n nativeInput: HTMLInputElement,\n matDateInput: D\n ): void {\n nativeInput.value = value ? this.formatDateTimeFromModelToView(value) : '';\n matDateInput.value = value ? dayjs(value).utc().toDate() : null;\n }\n\n /**\n * @ignore\n * Formats Date to full ISO 8601 format (e.g. `2022-08-31T22:00:00.000Z`)\n */\n private formatDateFromViewToModel(value: Date): string {\n return dayjs(value).utc().toISOString();\n }\n\n private formatDateTimeFromModelToView(value: string): string {\n return dayjs(value).tz(danishTimeZoneIdentifier).format(dateShortFormat);\n }\n\n private toDanishTimeZone(value: Date): Date {\n return dayjs(value.toISOString()).tz(danishTimeZoneIdentifier).toDate();\n }\n\n private setToEndOfDay(value: Date): Date {\n return dayjs(value).endOf('day').toDate();\n }\n\n private setEndDateToDanishTimeZone(value: string): Date | null {\n const dateBasedOnShortFormat = this.parseDateShortFormat(value);\n\n let maybeDateInDanishTimeZone: Date | null = null;\n\n if (dayjs(dateBasedOnShortFormat).isValid()) {\n maybeDateInDanishTimeZone = this.toDanishTimeZone(dateBasedOnShortFormat);\n }\n\n return maybeDateInDanishTimeZone;\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range) {\n <mat-date-range-input\n [disabled]=\"disabled\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled || isNextDayButtonDisabled()\"\n />\n </span>\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energinet-watt-picker-timepicker.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/timepicker/energinet-watt-picker-timepicker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region License
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
//#endregion
|
|
19
|
+
export { WattTimepickerComponent } from './watt-timepicker.component';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/watt/package/picker/timepicker/index.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattTimepickerComponent } from './watt-timepicker.component';\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//#region License
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
//#endregion
|
|
19
|
+
import { MASKITO_DEFAULT_OPTIONS } from '@maskito/core';
|
|
20
|
+
const TIME_FIXED_CHARACTERS = [':', '.'];
|
|
21
|
+
const SEPARATOR = ' - ';
|
|
22
|
+
export function maskitoTimeRangeOptionsGenerator() {
|
|
23
|
+
return {
|
|
24
|
+
...MASKITO_DEFAULT_OPTIONS,
|
|
25
|
+
mask: [
|
|
26
|
+
...Array.from('HH:MM').map((char) => (TIME_FIXED_CHARACTERS.includes(char) ? char : /\d/)),
|
|
27
|
+
...Array.from(SEPARATOR),
|
|
28
|
+
...Array.from('HH:MM').map((char) => (TIME_FIXED_CHARACTERS.includes(char) ? char : /\d/)),
|
|
29
|
+
],
|
|
30
|
+
preprocessors: [
|
|
31
|
+
({ elementState, data }, actionType) => {
|
|
32
|
+
if (actionType !== 'insert' || data.length > 1) {
|
|
33
|
+
return {
|
|
34
|
+
elementState,
|
|
35
|
+
data,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (Number.parseInt(data) > 2 && isFirstHourSegment(elementState)) {
|
|
39
|
+
return {
|
|
40
|
+
elementState: {
|
|
41
|
+
selection: elementState.selection,
|
|
42
|
+
value: elementState.value + '0' + data,
|
|
43
|
+
},
|
|
44
|
+
data: '0' + data,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
if (Number.parseInt(data) > 5 &&
|
|
48
|
+
(elementState.value.length === 3 || elementState.value.length === 10)) {
|
|
49
|
+
return {
|
|
50
|
+
elementState: {
|
|
51
|
+
selection: elementState.selection,
|
|
52
|
+
value: elementState.value + '0' + data,
|
|
53
|
+
},
|
|
54
|
+
data: '0' + data,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
elementState,
|
|
59
|
+
data,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
overwriteMode: 'replace',
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function isFirstHourSegment(elementState) {
|
|
67
|
+
if (elementState.value.length === 0) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (elementState.value.endsWith(SEPARATOR)) {
|
|
71
|
+
return elementState.value.length === 8;
|
|
72
|
+
}
|
|
73
|
+
if (elementState.value.endsWith(' -')) {
|
|
74
|
+
return elementState.value.length === 7;
|
|
75
|
+
}
|
|
76
|
+
if (elementState.value.endsWith(' ')) {
|
|
77
|
+
return elementState.value.length === 6;
|
|
78
|
+
}
|
|
79
|
+
return elementState.value.length === 5;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=maskito-time-range-mask.js.map
|