@energinet/watt 2.0.13 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/energinet-watt-badge.d.ts +5 -0
- package/breadcrumbs/energinet-watt-breadcrumbs.d.ts +5 -0
- package/button/energinet-watt-button.d.ts +5 -0
- package/card/energinet-watt-card.d.ts +5 -0
- package/checkbox/energinet-watt-checkbox.d.ts +5 -0
- package/chip/energinet-watt-chip.d.ts +5 -0
- package/clipboard/energinet-watt-clipboard.d.ts +5 -0
- package/code/energinet-watt-code.d.ts +5 -0
- package/core/breakpoints/breakpoints-observer.d.ts +1 -19
- package/core/breakpoints/energinet-watt-core-breakpoints.d.ts +5 -0
- package/core/color/color-helper.service.d.ts +2 -4
- package/core/color/energinet-watt-core-color.d.ts +5 -0
- package/core/date/energinet-watt-core-date.d.ts +5 -0
- package/core/date/watt-locale.service.d.ts +1 -3
- package/data/energinet-watt-data.d.ts +5 -0
- package/datetime-field/energinet-watt-datetime-field.d.ts +5 -0
- package/description-list/energinet-watt-description-list.d.ts +5 -0
- package/drawer/energinet-watt-drawer.d.ts +5 -0
- package/dropdown/energinet-watt-dropdown.d.ts +5 -0
- package/dropzone/energinet-watt-dropzone.d.ts +5 -0
- package/empty-state/energinet-watt-empty-state.d.ts +5 -0
- package/energinet-watt.d.ts +5 -0
- package/esm2022/badge/energinet-watt-badge.js +5 -0
- package/esm2022/badge/index.js +20 -0
- package/{fesm2022/energinet-watt-badge.mjs → esm2022/badge/watt-badge.component.js} +7 -33
- package/esm2022/breadcrumbs/energinet-watt-breadcrumbs.js +5 -0
- package/esm2022/breadcrumbs/index.js +20 -0
- package/esm2022/breadcrumbs/watt-breadcrumbs.component.js +90 -0
- package/esm2022/button/energinet-watt-button.js +5 -0
- package/esm2022/button/index.js +20 -0
- package/{fesm2022/energinet-watt-button.mjs → esm2022/button/watt-button.component.js} +14 -40
- package/esm2022/card/energinet-watt-card.js +5 -0
- package/esm2022/card/index.js +21 -0
- package/esm2022/card/watt-card-title.component.js +33 -0
- package/esm2022/card/watt-card.component.js +61 -0
- package/esm2022/checkbox/energinet-watt-checkbox.js +5 -0
- package/esm2022/checkbox/index.js +20 -0
- package/{fesm2022/energinet-watt-checkbox.mjs → esm2022/checkbox/watt-checkbox.component.js} +9 -35
- package/esm2022/chip/energinet-watt-chip.js +5 -0
- package/esm2022/chip/index.js +26 -0
- package/esm2022/chip/watt-action-chip.component.js +68 -0
- package/esm2022/chip/watt-chip.component.js +55 -0
- package/esm2022/chip/watt-chip.directive.js +92 -0
- package/esm2022/chip/watt-date-chip.component.js +118 -0
- package/esm2022/chip/watt-date-range-chip.component.js +240 -0
- package/esm2022/chip/watt-filter-chip.component.js +94 -0
- package/esm2022/chip/watt-menu-chip.component.js +95 -0
- package/esm2022/clipboard/energinet-watt-clipboard.js +5 -0
- package/esm2022/clipboard/index.js +21 -0
- package/esm2022/clipboard/watt-clipboard-intl.service.js +31 -0
- package/esm2022/clipboard/watt-copy-to-clipboard.directive.js +64 -0
- package/esm2022/code/energinet-watt-code.js +5 -0
- package/esm2022/code/index.js +21 -0
- package/esm2022/code/watt-code.component.js +74 -0
- package/esm2022/code/watt-code.worker.token.js +21 -0
- package/esm2022/core/breakpoints/breakpoints-observer.js +41 -0
- package/esm2022/core/breakpoints/breakpoints.js +31 -0
- package/esm2022/core/breakpoints/energinet-watt-core-breakpoints.js +5 -0
- package/esm2022/core/breakpoints/index.js +21 -0
- package/esm2022/core/color/color-helper.service.js +41 -0
- package/esm2022/core/color/colors.js +58 -0
- package/esm2022/core/color/energinet-watt-core-color.js +5 -0
- package/esm2022/core/color/index.js +21 -0
- package/esm2022/core/date/dayjs.js +34 -0
- package/esm2022/core/date/energinet-watt-core-date.js +5 -0
- package/esm2022/core/date/index.js +25 -0
- package/esm2022/core/date/watt-danish-datetime.providers.js +31 -0
- package/esm2022/core/date/watt-date-adapter.js +43 -0
- package/esm2022/core/date/watt-date-range.js +2 -0
- package/esm2022/core/date/watt-date.pipe.js +38 -0
- package/esm2022/core/date/watt-format-date.js +50 -0
- package/esm2022/core/date/watt-locale.service.js +48 -0
- package/esm2022/data/energinet-watt-data.js +5 -0
- package/esm2022/data/index.js +23 -0
- package/esm2022/data/watt-data-actions.component.js +32 -0
- package/esm2022/data/watt-data-filters.component.js +32 -0
- package/esm2022/data/watt-data-intl.service.js +39 -0
- package/{fesm2022/energinet-watt-data.mjs → esm2022/data/watt-data-table.component.js} +15 -137
- package/esm2022/datetime-field/energinet-watt-datetime-field.js +5 -0
- package/esm2022/datetime-field/index.js +20 -0
- package/esm2022/datetime-field/watt-datetime-field.component.js +207 -0
- package/esm2022/description-list/energinet-watt-description-list.js +5 -0
- package/esm2022/description-list/index.js +20 -0
- package/esm2022/description-list/watt-description-list-item.component.js +49 -0
- package/{fesm2022/energinet-watt-description-list.mjs → esm2022/description-list/watt-description-list.component.js} +10 -79
- package/esm2022/drawer/energinet-watt-drawer.js +5 -0
- package/esm2022/drawer/index.js +24 -0
- package/esm2022/drawer/watt-drawer-actions.component.js +29 -0
- package/esm2022/drawer/watt-drawer-content.component.js +29 -0
- package/esm2022/drawer/watt-drawer-heading.component.js +29 -0
- package/esm2022/drawer/watt-drawer-topbar.component.js +29 -0
- package/esm2022/drawer/watt-drawer.component.js +177 -0
- package/esm2022/dropdown/energinet-watt-dropdown.js +5 -0
- package/esm2022/dropdown/index.js +20 -0
- package/esm2022/dropdown/watt-dropdown-option.js +2 -0
- package/esm2022/dropdown/watt-dropdown-value.js +2 -0
- package/esm2022/dropdown/watt-dropdown.component.js +396 -0
- package/esm2022/dropzone/energinet-watt-dropzone.js +5 -0
- package/esm2022/dropzone/index.js +22 -0
- package/esm2022/dropzone/watt-dropzone-intl.js +35 -0
- package/esm2022/dropzone/watt-dropzone-validators.js +67 -0
- package/esm2022/dropzone/watt-dropzone.js +179 -0
- package/esm2022/empty-state/energinet-watt-empty-state.js +5 -0
- package/esm2022/empty-state/icons/explore.js +54 -0
- package/esm2022/empty-state/icons/no-results.js +62 -0
- package/esm2022/empty-state/icons/power.js +46 -0
- package/esm2022/empty-state/index.js +23 -0
- package/esm2022/empty-state/watt-empty-state.component.js +120 -0
- package/esm2022/energinet-watt.js +5 -0
- package/esm2022/expandable-card/energinet-watt-expandable-card.js +5 -0
- package/esm2022/expandable-card/index.js +26 -0
- package/{fesm2022/energinet-watt-expandable-card.mjs → esm2022/expandable-card/watt-expandable-card.component.js} +18 -49
- package/esm2022/expansion/energinet-watt-expansion.js +5 -0
- package/{fesm2022/energinet-watt-expansion.mjs → esm2022/expansion/expansion.component.js} +10 -36
- package/esm2022/expansion/index.js +20 -0
- package/esm2022/field/energinet-watt-field.js +5 -0
- package/esm2022/field/index.js +23 -0
- package/esm2022/field/watt-field-error.component.js +29 -0
- package/esm2022/field/watt-field-hint.component.js +29 -0
- package/esm2022/field/watt-field-intl.service.js +32 -0
- package/{fesm2022/energinet-watt-field.mjs → esm2022/field/watt-field.component.js} +17 -125
- package/esm2022/icon/energinet-watt-icon.js +5 -0
- package/esm2022/icon/flags/energinet-watt-icon-flags.js +5 -0
- package/esm2022/icon/flags/index.js +26 -0
- package/esm2022/icon/flags/watt-flag-ch.js +52 -0
- package/esm2022/icon/flags/watt-flag-de.js +44 -0
- package/esm2022/icon/flags/watt-flag-dk.js +44 -0
- package/esm2022/icon/flags/watt-flag-fi.js +44 -0
- package/esm2022/icon/flags/watt-flag-nl.js +44 -0
- package/esm2022/icon/flags/watt-flag-no.js +48 -0
- package/esm2022/icon/flags/watt-flag-pl.js +46 -0
- package/esm2022/icon/flags/watt-flag-se.js +42 -0
- package/esm2022/icon/flags/watt-flag.js +116 -0
- package/{fesm2022/energinet-watt-icon.mjs → esm2022/icon/icon.component.js} +9 -131
- package/esm2022/icon/icons.js +97 -0
- package/esm2022/icon/index.js +20 -0
- package/esm2022/index.js +25 -0
- package/esm2022/modal/energinet-watt-modal.js +5 -0
- package/esm2022/modal/index.js +21 -0
- package/{fesm2022/energinet-watt-modal.mjs → esm2022/modal/watt-modal.component.js} +19 -127
- package/esm2022/modal/watt-modal.service.js +86 -0
- package/esm2022/paginator/energinet-watt-paginator.js +5 -0
- package/esm2022/paginator/index.js +21 -0
- package/esm2022/paginator/watt-paginator-intl.service.js +38 -0
- package/esm2022/paginator/watt-paginator.component.js +104 -0
- package/esm2022/phone-field/energinet-watt-phone-field.js +5 -0
- package/esm2022/phone-field/index.js +21 -0
- package/esm2022/phone-field/watt-phone-field-intl.service.js +40 -0
- package/esm2022/phone-field/watt-phone-field.component.js +262 -0
- package/esm2022/picker/__shared/energinet-watt-picker-__shared.js +5 -0
- package/esm2022/picker/__shared/index.js +21 -0
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js +71 -0
- package/esm2022/picker/__shared/watt-picker-base.js +292 -0
- package/esm2022/picker/__shared/watt-picker-value.js +2 -0
- package/esm2022/picker/datepicker/energinet-watt-picker-datepicker.js +5 -0
- package/esm2022/picker/datepicker/index.js +22 -0
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js +31 -0
- package/esm2022/picker/datepicker/watt-datepicker.component.js +422 -0
- package/esm2022/picker/timepicker/energinet-watt-picker-timepicker.js +5 -0
- package/esm2022/picker/timepicker/index.js +20 -0
- package/esm2022/picker/timepicker/maskito-time-range-mask.js +81 -0
- package/esm2022/picker/timepicker/watt-timepicker.component.js +288 -0
- package/esm2022/progress-tracker/energinet-watt-progress-tracker.js +5 -0
- package/esm2022/progress-tracker/index.js +27 -0
- package/{fesm2022/energinet-watt-progress-tracker.mjs → esm2022/progress-tracker/watt-progress-tracker-step.component.js} +9 -67
- package/esm2022/progress-tracker/watt-progress-tracker.component.js +30 -0
- package/esm2022/query-params/energinet-watt-query-params.js +5 -0
- package/esm2022/query-params/index.js +20 -0
- package/esm2022/query-params/watt-query-params.directive.js +91 -0
- package/esm2022/radio/energinet-watt-radio.js +5 -0
- package/esm2022/radio/index.js +20 -0
- package/{fesm2022/energinet-watt-radio.mjs → esm2022/radio/watt-radio.component.js} +9 -35
- package/esm2022/search/energinet-watt-search.js +5 -0
- package/esm2022/search/index.js +20 -0
- package/{fesm2022/energinet-watt-search.mjs → esm2022/search/watt-search.component.js} +10 -36
- package/esm2022/segmented-buttons/energinet-watt-segmented-buttons.js +5 -0
- package/esm2022/segmented-buttons/index.js +21 -0
- package/esm2022/segmented-buttons/watt-segmented-button.component.js +38 -0
- package/esm2022/segmented-buttons/watt-segmented-buttons.component.js +88 -0
- package/esm2022/shell/energinet-watt-shell.js +5 -0
- package/esm2022/shell/index.js +21 -0
- package/esm2022/shell/nav-list/index.js +21 -0
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js +45 -0
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js +84 -0
- package/esm2022/shell/nav-list/watt-nav-list.component.js +81 -0
- package/esm2022/shell/shell.component.js +75 -0
- package/esm2022/slide-toggle/energinet-watt-slide-toggle.js +5 -0
- package/esm2022/slide-toggle/index.js +20 -0
- package/esm2022/slide-toggle/watt-slide-toggle.component.js +78 -0
- package/esm2022/slider/energinet-watt-slider.js +5 -0
- package/esm2022/slider/index.js +20 -0
- package/esm2022/slider/watt-slider.component.js +133 -0
- package/esm2022/spinner/energinet-watt-spinner.js +5 -0
- package/esm2022/spinner/index.js +20 -0
- package/esm2022/spinner/watt-spinner.component.js +46 -0
- package/esm2022/stepper/energinet-watt-stepper.js +5 -0
- package/esm2022/stepper/index.js +21 -0
- package/esm2022/stepper/watt-stepper-step.component.js +52 -0
- package/{fesm2022/energinet-watt-stepper.mjs → esm2022/stepper/watt-stepper.component.js} +18 -91
- package/esm2022/table/energinet-watt-table.js +5 -0
- package/esm2022/table/index.js +21 -0
- package/esm2022/table/watt-table-data-source.js +17 -0
- package/esm2022/table/watt-table.component.js +400 -0
- package/esm2022/tabs/energinet-watt-tabs.js +5 -0
- package/esm2022/tabs/index.js +31 -0
- package/esm2022/tabs/watt-link-tab.component.js +34 -0
- package/esm2022/tabs/watt-link-tabs.component.js +71 -0
- package/esm2022/tabs/watt-tab.component.js +42 -0
- package/esm2022/tabs/watt-tabs-action.component.js +32 -0
- package/esm2022/tabs/watt-tabs.component.js +60 -0
- package/esm2022/text-field/energinet-watt-text-field.js +5 -0
- package/esm2022/text-field/index.js +20 -0
- package/esm2022/text-field/watt-text-field.component.js +289 -0
- package/esm2022/textarea-field/energinet-watt-textarea-field.js +5 -0
- package/esm2022/textarea-field/index.js +20 -0
- package/esm2022/textarea-field/watt-textarea-field.component.js +110 -0
- package/esm2022/toast/energinet-watt-toast.js +5 -0
- package/esm2022/toast/index.js +21 -0
- package/esm2022/toast/watt-toast.component.js +97 -0
- package/esm2022/toast/watt-toast.service.js +51 -0
- package/esm2022/tooltip/energinet-watt-tooltip.js +5 -0
- package/esm2022/tooltip/index.js +20 -0
- package/esm2022/tooltip/watt-tooltip.component.js +131 -0
- package/esm2022/tooltip/watt-tooltip.directive.js +60 -0
- package/esm2022/utils/css/css-custom-properties.service.js +39 -0
- package/esm2022/utils/css/energinet-watt-utils-css.js +5 -0
- package/esm2022/utils/css/index.js +20 -0
- package/esm2022/utils/intersection-observer/energinet-watt-utils-intersection-observer.js +5 -0
- package/esm2022/utils/intersection-observer/index.js +20 -0
- package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js +57 -0
- package/esm2022/utils/resize-observer/energinet-watt-utils-resize-observer.js +5 -0
- package/esm2022/utils/resize-observer/index.js +21 -0
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js +53 -0
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js +67 -0
- package/esm2022/validation-message/energinet-watt-validation-message.js +5 -0
- package/esm2022/validation-message/index.js +20 -0
- package/{fesm2022/energinet-watt-validation-message.mjs → esm2022/validation-message/watt-validation-message.component.js} +8 -34
- package/esm2022/validators/energinet-watt-validators.js +5 -0
- package/esm2022/validators/index.js +20 -0
- package/esm2022/validators/watt-range.validators.js +23 -0
- package/esm2022/vater/energinet-watt-vater.js +5 -0
- package/esm2022/vater/index.js +24 -0
- package/esm2022/vater/types.js +20 -0
- package/esm2022/vater/vater-flex.component.js +49 -0
- package/esm2022/vater/vater-layout.directive.js +65 -0
- package/esm2022/vater/vater-spacer.component.js +29 -0
- package/esm2022/vater/vater-stack.component.js +42 -0
- package/esm2022/vater/vater-utility.directive.js +53 -0
- package/esm2022/year-field/energinet-watt-year-field.js +5 -0
- package/esm2022/year-field/index.js +20 -0
- package/esm2022/year-field/watt-year-field.component.js +256 -0
- package/esm2022/yearmonth-field/energinet-watt-yearmonth-field.js +5 -0
- package/esm2022/yearmonth-field/index.js +21 -0
- package/esm2022/yearmonth-field/watt-yearmonth-field.component.js +258 -0
- package/esm2022/yearmonth-field/year-month.js +42 -0
- package/expandable-card/energinet-watt-expandable-card.d.ts +5 -0
- package/expansion/energinet-watt-expansion.d.ts +5 -0
- package/field/energinet-watt-field.d.ts +5 -0
- package/icon/energinet-watt-icon.d.ts +5 -0
- package/icon/flags/energinet-watt-icon-flags.d.ts +5 -0
- package/modal/energinet-watt-modal.d.ts +5 -0
- package/package.json +117 -117
- package/paginator/energinet-watt-paginator.d.ts +5 -0
- package/phone-field/energinet-watt-phone-field.d.ts +5 -0
- package/picker/__shared/energinet-watt-picker-__shared.d.ts +5 -0
- package/picker/__shared/watt-picker-base.d.ts +4 -1
- package/picker/datepicker/energinet-watt-picker-datepicker.d.ts +5 -0
- package/picker/timepicker/energinet-watt-picker-timepicker.d.ts +5 -0
- package/progress-tracker/energinet-watt-progress-tracker.d.ts +5 -0
- package/query-params/energinet-watt-query-params.d.ts +5 -0
- package/radio/energinet-watt-radio.d.ts +5 -0
- package/search/energinet-watt-search.d.ts +5 -0
- package/segmented-buttons/energinet-watt-segmented-buttons.d.ts +5 -0
- package/shell/energinet-watt-shell.d.ts +5 -0
- package/slide-toggle/energinet-watt-slide-toggle.d.ts +5 -0
- package/slider/energinet-watt-slider.d.ts +5 -0
- package/spinner/energinet-watt-spinner.d.ts +5 -0
- package/stepper/energinet-watt-stepper.d.ts +5 -0
- package/table/energinet-watt-table.d.ts +5 -0
- package/tabs/energinet-watt-tabs.d.ts +5 -0
- package/text-field/energinet-watt-text-field.d.ts +5 -0
- package/textarea-field/energinet-watt-textarea-field.d.ts +5 -0
- package/toast/energinet-watt-toast.d.ts +5 -0
- package/toast/watt-toast.service.d.ts +2 -3
- package/tooltip/energinet-watt-tooltip.d.ts +5 -0
- package/utils/css/css-custom-properties.service.d.ts +1 -2
- package/utils/css/energinet-watt-utils-css.d.ts +5 -0
- package/utils/intersection-observer/energinet-watt-utils-intersection-observer.d.ts +5 -0
- package/utils/resize-observer/energinet-watt-utils-resize-observer.d.ts +5 -0
- package/utils/resize-observer/watt-resize-observer.service.d.ts +2 -19
- package/validation-message/energinet-watt-validation-message.d.ts +5 -0
- package/validators/energinet-watt-validators.d.ts +5 -0
- package/vater/energinet-watt-vater.d.ts +5 -0
- package/year-field/energinet-watt-year-field.d.ts +5 -0
- package/yearmonth-field/energinet-watt-yearmonth-field.d.ts +5 -0
- package/fesm2022/energinet-watt-badge.mjs.map +0 -1
- package/fesm2022/energinet-watt-breadcrumbs.mjs +0 -116
- package/fesm2022/energinet-watt-breadcrumbs.mjs.map +0 -1
- package/fesm2022/energinet-watt-button.mjs.map +0 -1
- package/fesm2022/energinet-watt-card.mjs +0 -117
- 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 -760
- package/fesm2022/energinet-watt-chip.mjs.map +0 -1
- package/fesm2022/energinet-watt-clipboard.mjs +0 -118
- package/fesm2022/energinet-watt-clipboard.mjs.map +0 -1
- package/fesm2022/energinet-watt-code.mjs +0 -119
- package/fesm2022/energinet-watt-code.mjs.map +0 -1
- package/fesm2022/energinet-watt-core-breakpoints.mjs +0 -100
- package/fesm2022/energinet-watt-core-breakpoints.mjs.map +0 -1
- package/fesm2022/energinet-watt-core-color.mjs +0 -127
- package/fesm2022/energinet-watt-core-color.mjs.map +0 -1
- package/fesm2022/energinet-watt-core-date.mjs +0 -260
- 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 +0 -233
- 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 +0 -307
- package/fesm2022/energinet-watt-drawer.mjs.map +0 -1
- package/fesm2022/energinet-watt-dropdown.mjs +0 -423
- package/fesm2022/energinet-watt-dropdown.mjs.map +0 -1
- package/fesm2022/energinet-watt-dropzone.mjs +0 -298
- package/fesm2022/energinet-watt-dropzone.mjs.map +0 -1
- package/fesm2022/energinet-watt-empty-state.mjs +0 -299
- package/fesm2022/energinet-watt-empty-state.mjs.map +0 -1
- package/fesm2022/energinet-watt-expandable-card.mjs.map +0 -1
- package/fesm2022/energinet-watt-expansion.mjs.map +0 -1
- package/fesm2022/energinet-watt-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-icon-flags.mjs +0 -482
- package/fesm2022/energinet-watt-icon-flags.mjs.map +0 -1
- package/fesm2022/energinet-watt-icon.mjs.map +0 -1
- package/fesm2022/energinet-watt-modal.mjs.map +0 -1
- package/fesm2022/energinet-watt-paginator.mjs +0 -164
- package/fesm2022/energinet-watt-paginator.mjs.map +0 -1
- package/fesm2022/energinet-watt-phone-field.mjs +0 -326
- package/fesm2022/energinet-watt-phone-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-picker-__shared.mjs +0 -384
- package/fesm2022/energinet-watt-picker-__shared.mjs.map +0 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs +0 -477
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +0 -1
- package/fesm2022/energinet-watt-picker-timepicker.mjs +0 -394
- 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 +0 -117
- 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 +0 -149
- package/fesm2022/energinet-watt-segmented-buttons.mjs.map +0 -1
- package/fesm2022/energinet-watt-shell.mjs +0 -315
- package/fesm2022/energinet-watt-shell.mjs.map +0 -1
- package/fesm2022/energinet-watt-slide-toggle.mjs +0 -104
- package/fesm2022/energinet-watt-slide-toggle.mjs.map +0 -1
- package/fesm2022/energinet-watt-slider.mjs +0 -159
- package/fesm2022/energinet-watt-slider.mjs.map +0 -1
- package/fesm2022/energinet-watt-spinner.mjs +0 -72
- package/fesm2022/energinet-watt-spinner.mjs.map +0 -1
- package/fesm2022/energinet-watt-stepper.mjs.map +0 -1
- package/fesm2022/energinet-watt-table.mjs +0 -441
- 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 +0 -316
- package/fesm2022/energinet-watt-text-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-textarea-field.mjs +0 -136
- package/fesm2022/energinet-watt-textarea-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-toast.mjs +0 -174
- package/fesm2022/energinet-watt-toast.mjs.map +0 -1
- package/fesm2022/energinet-watt-tooltip.mjs +0 -214
- package/fesm2022/energinet-watt-tooltip.mjs.map +0 -1
- package/fesm2022/energinet-watt-utils-css.mjs +0 -72
- package/fesm2022/energinet-watt-utils-css.mjs.map +0 -1
- package/fesm2022/energinet-watt-utils-intersection-observer.mjs +0 -83
- package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +0 -1
- package/fesm2022/energinet-watt-utils-resize-observer.mjs +0 -144
- 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 +0 -49
- 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 +0 -282
- package/fesm2022/energinet-watt-year-field.mjs.map +0 -1
- package/fesm2022/energinet-watt-yearmonth-field.mjs +0 -324
- package/fesm2022/energinet-watt-yearmonth-field.mjs.map +0 -1
- package/fesm2022/energinet-watt.mjs +0 -31
- package/fesm2022/energinet-watt.mjs.map +0 -1
|
@@ -1,760 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, ChangeDetectionStrategy, Component, output, EventEmitter, Output, Input, ViewEncapsulation, Injectable, inject, HostBinding, ElementRef, forwardRef, Directive } from '@angular/core';
|
|
3
|
-
import { WattIconComponent } from '@energinet/watt/icon';
|
|
4
|
-
import * as i1 from '@angular/material/datepicker';
|
|
5
|
-
import { MatDatepickerModule, DefaultMatCalendarRangeStrategy, DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY } from '@angular/material/datepicker';
|
|
6
|
-
import { WattDatePipe, dayjs } from '@energinet/watt/core/date';
|
|
7
|
-
import { WattFieldComponent } from '@energinet/watt/field';
|
|
8
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
|
-
import { DateAdapter } from '@angular/material/core';
|
|
10
|
-
import { WattButtonComponent } from '@energinet/watt/button';
|
|
11
|
-
import { WattDatepickerIntlService } from '@energinet/watt/picker/datepicker';
|
|
12
|
-
|
|
13
|
-
//#region License
|
|
14
|
-
/**
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
17
|
-
*
|
|
18
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
19
|
-
* you may not use this file except in compliance with the License.
|
|
20
|
-
* You may obtain a copy of the License at
|
|
21
|
-
*
|
|
22
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
-
*
|
|
24
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
25
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
-
* See the License for the specific language governing permissions and
|
|
28
|
-
* limitations under the License.
|
|
29
|
-
*/
|
|
30
|
-
//#endregion
|
|
31
|
-
class WattChipComponent {
|
|
32
|
-
selected = input(false);
|
|
33
|
-
disabled = input(false);
|
|
34
|
-
readonly = input(false);
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattChipComponent, isStandalone: true, selector: "watt-chip", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
37
|
-
<label
|
|
38
|
-
[class.selected]="selected()"
|
|
39
|
-
[class.disabled]="disabled()"
|
|
40
|
-
[class.read-only]="readonly()"
|
|
41
|
-
>
|
|
42
|
-
@if (selected()) {
|
|
43
|
-
<watt-icon class="selected-icon" name="checkmark" size="s" [attr.aria-hidden]="true" />
|
|
44
|
-
}
|
|
45
|
-
<ng-content />
|
|
46
|
-
</label>
|
|
47
|
-
`, isInline: true, styles: ["label{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;position:relative;background:var(--input-background, var(--watt-color-neutral-white));border-radius:var(--watt-space-m);border:1px solid var(--input-border-color, var(--watt-on-light-low-emphasis));color:var(--watt-on-light-high-emphasis);cursor:pointer;display:inline-flex;align-items:center;padding:5px 12px;-webkit-user-select:none;user-select:none;white-space:nowrap;max-width:100%}label:hover{border:1px solid var(--watt-on-light-medium-emphasis)}label:active:not(.disabled),label:focus-within{background:var(--watt-color-primary-ultralight);border:1px solid var(--watt-on-light-medium-emphasis);outline:none}label.selected{background:var(--watt-color-primary);color:var(--watt-on-dark-high-emphasis);border-color:transparent}label.selected:hover,label.selected:focus-within{background:var(--watt-color-primary-dark);border-color:transparent}label.disabled{border:1px solid var(--watt-on-light-surface-overlay);color:var(--watt-on-light-low-emphasis);cursor:not-allowed}label.read-only{cursor:inherit}label .selected-icon{margin-right:var(--watt-space-s)}\n"], dependencies: [{ kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
48
|
-
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattChipComponent, decorators: [{
|
|
50
|
-
type: Component,
|
|
51
|
-
args: [{ imports: [WattIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, selector: 'watt-chip', template: `
|
|
52
|
-
<label
|
|
53
|
-
[class.selected]="selected()"
|
|
54
|
-
[class.disabled]="disabled()"
|
|
55
|
-
[class.read-only]="readonly()"
|
|
56
|
-
>
|
|
57
|
-
@if (selected()) {
|
|
58
|
-
<watt-icon class="selected-icon" name="checkmark" size="s" [attr.aria-hidden]="true" />
|
|
59
|
-
}
|
|
60
|
-
<ng-content />
|
|
61
|
-
</label>
|
|
62
|
-
`, styles: ["label{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;position:relative;background:var(--input-background, var(--watt-color-neutral-white));border-radius:var(--watt-space-m);border:1px solid var(--input-border-color, var(--watt-on-light-low-emphasis));color:var(--watt-on-light-high-emphasis);cursor:pointer;display:inline-flex;align-items:center;padding:5px 12px;-webkit-user-select:none;user-select:none;white-space:nowrap;max-width:100%}label:hover{border:1px solid var(--watt-on-light-medium-emphasis)}label:active:not(.disabled),label:focus-within{background:var(--watt-color-primary-ultralight);border:1px solid var(--watt-on-light-medium-emphasis);outline:none}label.selected{background:var(--watt-color-primary);color:var(--watt-on-dark-high-emphasis);border-color:transparent}label.selected:hover,label.selected:focus-within{background:var(--watt-color-primary-dark);border-color:transparent}label.disabled{border:1px solid var(--watt-on-light-surface-overlay);color:var(--watt-on-light-low-emphasis);cursor:not-allowed}label.read-only{cursor:inherit}label .selected-icon{margin-right:var(--watt-space-s)}\n"] }]
|
|
63
|
-
}] });
|
|
64
|
-
|
|
65
|
-
//#region License
|
|
66
|
-
/**
|
|
67
|
-
* @license
|
|
68
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
69
|
-
*
|
|
70
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
71
|
-
* you may not use this file except in compliance with the License.
|
|
72
|
-
* You may obtain a copy of the License at
|
|
73
|
-
*
|
|
74
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
75
|
-
*
|
|
76
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
77
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
78
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
79
|
-
* See the License for the specific language governing permissions and
|
|
80
|
-
* limitations under the License.
|
|
81
|
-
*/
|
|
82
|
-
//#endregion
|
|
83
|
-
class WattActionChipComponent {
|
|
84
|
-
disabled = input(false);
|
|
85
|
-
icon = input.required();
|
|
86
|
-
action = output();
|
|
87
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattActionChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: WattActionChipComponent, isStandalone: true, selector: "watt-action-chip", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { action: "action" }, ngImport: i0, template: `
|
|
89
|
-
<watt-chip [disabled]="disabled()">
|
|
90
|
-
<button
|
|
91
|
-
type="button"
|
|
92
|
-
class="cdk-visually-hidden"
|
|
93
|
-
(click)="$event.stopImmediatePropagation(); action.emit()"
|
|
94
|
-
[disabled]="disabled()"
|
|
95
|
-
></button>
|
|
96
|
-
<ng-content />
|
|
97
|
-
<watt-icon
|
|
98
|
-
size="s"
|
|
99
|
-
[name]="icon()"
|
|
100
|
-
class="menu-icon"
|
|
101
|
-
[attr.aria-hidden]="true"
|
|
102
|
-
[class.disabled]="disabled()"
|
|
103
|
-
/>
|
|
104
|
-
</watt-chip>
|
|
105
|
-
`, isInline: true, styles: [":host{display:block}.disabled{color:var(--watt-on-light-low-emphasis)}\n"], dependencies: [{ kind: "component", type: WattChipComponent, selector: "watt-chip", inputs: ["selected", "disabled", "readonly"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }] });
|
|
106
|
-
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattActionChipComponent, decorators: [{
|
|
108
|
-
type: Component,
|
|
109
|
-
args: [{ imports: [WattChipComponent, WattIconComponent], selector: 'watt-action-chip', template: `
|
|
110
|
-
<watt-chip [disabled]="disabled()">
|
|
111
|
-
<button
|
|
112
|
-
type="button"
|
|
113
|
-
class="cdk-visually-hidden"
|
|
114
|
-
(click)="$event.stopImmediatePropagation(); action.emit()"
|
|
115
|
-
[disabled]="disabled()"
|
|
116
|
-
></button>
|
|
117
|
-
<ng-content />
|
|
118
|
-
<watt-icon
|
|
119
|
-
size="s"
|
|
120
|
-
[name]="icon()"
|
|
121
|
-
class="menu-icon"
|
|
122
|
-
[attr.aria-hidden]="true"
|
|
123
|
-
[class.disabled]="disabled()"
|
|
124
|
-
/>
|
|
125
|
-
</watt-chip>
|
|
126
|
-
`, styles: [":host{display:block}.disabled{color:var(--watt-on-light-low-emphasis)}\n"] }]
|
|
127
|
-
}] });
|
|
128
|
-
|
|
129
|
-
//#region License
|
|
130
|
-
/**
|
|
131
|
-
* @license
|
|
132
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
133
|
-
*
|
|
134
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
135
|
-
* you may not use this file except in compliance with the License.
|
|
136
|
-
* You may obtain a copy of the License at
|
|
137
|
-
*
|
|
138
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
139
|
-
*
|
|
140
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
141
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
142
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
143
|
-
* See the License for the specific language governing permissions and
|
|
144
|
-
* limitations under the License.
|
|
145
|
-
*/
|
|
146
|
-
//#endregion
|
|
147
|
-
class WattMenuChipComponent {
|
|
148
|
-
opened = false;
|
|
149
|
-
disabled = false;
|
|
150
|
-
name;
|
|
151
|
-
value;
|
|
152
|
-
selected = false;
|
|
153
|
-
hasPopup = 'menu';
|
|
154
|
-
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
155
|
-
toggle = new EventEmitter();
|
|
156
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattMenuChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
157
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattMenuChipComponent, isStandalone: true, selector: "watt-menu-chip", inputs: { opened: "opened", disabled: "disabled", name: "name", value: "value", selected: "selected", hasPopup: "hasPopup" }, outputs: { toggle: "toggle" }, ngImport: i0, template: `
|
|
158
|
-
<watt-chip [disabled]="disabled" [selected]="selected">
|
|
159
|
-
<button
|
|
160
|
-
class="cdk-visually-hidden"
|
|
161
|
-
[attr.aria-haspopup]="hasPopup"
|
|
162
|
-
[attr.aria-expanded]="opened"
|
|
163
|
-
[attr.aria-pressed]="selected"
|
|
164
|
-
(click)="toggle.emit()"
|
|
165
|
-
[disabled]="disabled"
|
|
166
|
-
></button>
|
|
167
|
-
<ng-content />
|
|
168
|
-
<watt-icon
|
|
169
|
-
size="s"
|
|
170
|
-
name="arrowDropDown"
|
|
171
|
-
class="menu-icon"
|
|
172
|
-
[attr.aria-hidden]="true"
|
|
173
|
-
[class.opened]="opened"
|
|
174
|
-
[class.selected]="selected"
|
|
175
|
-
[class.disabled]="disabled"
|
|
176
|
-
/>
|
|
177
|
-
</watt-chip>
|
|
178
|
-
`, isInline: true, styles: [":host{display:block}.menu-icon{margin-left:var(--watt-space-xs);transition:linear .2s all;color:var(--watt-color-primary)}.menu-icon.disabled{color:var(--watt-on-light-low-emphasis)}.opened{transform:rotate(180deg)}.selected{color:var(--watt-color-neutral-white)}.disabled{color:var(--watt-on-light-low-emphasis)}\n"], dependencies: [{ kind: "component", type: WattChipComponent, selector: "watt-chip", inputs: ["selected", "disabled", "readonly"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }] });
|
|
179
|
-
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattMenuChipComponent, decorators: [{
|
|
181
|
-
type: Component,
|
|
182
|
-
args: [{ imports: [WattChipComponent, WattIconComponent], selector: 'watt-menu-chip', template: `
|
|
183
|
-
<watt-chip [disabled]="disabled" [selected]="selected">
|
|
184
|
-
<button
|
|
185
|
-
class="cdk-visually-hidden"
|
|
186
|
-
[attr.aria-haspopup]="hasPopup"
|
|
187
|
-
[attr.aria-expanded]="opened"
|
|
188
|
-
[attr.aria-pressed]="selected"
|
|
189
|
-
(click)="toggle.emit()"
|
|
190
|
-
[disabled]="disabled"
|
|
191
|
-
></button>
|
|
192
|
-
<ng-content />
|
|
193
|
-
<watt-icon
|
|
194
|
-
size="s"
|
|
195
|
-
name="arrowDropDown"
|
|
196
|
-
class="menu-icon"
|
|
197
|
-
[attr.aria-hidden]="true"
|
|
198
|
-
[class.opened]="opened"
|
|
199
|
-
[class.selected]="selected"
|
|
200
|
-
[class.disabled]="disabled"
|
|
201
|
-
/>
|
|
202
|
-
</watt-chip>
|
|
203
|
-
`, styles: [":host{display:block}.menu-icon{margin-left:var(--watt-space-xs);transition:linear .2s all;color:var(--watt-color-primary)}.menu-icon.disabled{color:var(--watt-on-light-low-emphasis)}.opened{transform:rotate(180deg)}.selected{color:var(--watt-color-neutral-white)}.disabled{color:var(--watt-on-light-low-emphasis)}\n"] }]
|
|
204
|
-
}], propDecorators: { opened: [{
|
|
205
|
-
type: Input
|
|
206
|
-
}], disabled: [{
|
|
207
|
-
type: Input
|
|
208
|
-
}], name: [{
|
|
209
|
-
type: Input
|
|
210
|
-
}], value: [{
|
|
211
|
-
type: Input
|
|
212
|
-
}], selected: [{
|
|
213
|
-
type: Input
|
|
214
|
-
}], hasPopup: [{
|
|
215
|
-
type: Input
|
|
216
|
-
}], toggle: [{
|
|
217
|
-
type: Output
|
|
218
|
-
}] } });
|
|
219
|
-
|
|
220
|
-
//#region License
|
|
221
|
-
/**
|
|
222
|
-
* @license
|
|
223
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
224
|
-
*
|
|
225
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
226
|
-
* you may not use this file except in compliance with the License.
|
|
227
|
-
* You may obtain a copy of the License at
|
|
228
|
-
*
|
|
229
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
230
|
-
*
|
|
231
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
232
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
233
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
234
|
-
* See the License for the specific language governing permissions and
|
|
235
|
-
* limitations under the License.
|
|
236
|
-
*/
|
|
237
|
-
//#endregion
|
|
238
|
-
class WattDateChipComponent {
|
|
239
|
-
disabled = false;
|
|
240
|
-
label;
|
|
241
|
-
placeholder;
|
|
242
|
-
value;
|
|
243
|
-
formControl;
|
|
244
|
-
selectionChange = new EventEmitter();
|
|
245
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
246
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDateChipComponent, isStandalone: true, selector: "watt-date-chip", inputs: { disabled: "disabled", label: "label", placeholder: "placeholder", value: "value", formControl: "formControl" }, outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: `
|
|
247
|
-
<mat-datepicker #picker />
|
|
248
|
-
<watt-field [control]="formControl" [chipMode]="true">
|
|
249
|
-
<watt-menu-chip
|
|
250
|
-
hasPopup="dialog"
|
|
251
|
-
[disabled]="disabled"
|
|
252
|
-
[selected]="!!value"
|
|
253
|
-
[opened]="picker.opened"
|
|
254
|
-
(toggle)="picker.open()"
|
|
255
|
-
>
|
|
256
|
-
<input
|
|
257
|
-
tabindex="-1"
|
|
258
|
-
class="cdk-visually-hidden"
|
|
259
|
-
type="text"
|
|
260
|
-
[value]="value"
|
|
261
|
-
[matDatepicker]="picker"
|
|
262
|
-
(dateChange)="value = $event.value"
|
|
263
|
-
(dateChange)="selectionChange.emit($event.value)"
|
|
264
|
-
/>
|
|
265
|
-
{{ placeholder }}
|
|
266
|
-
<span>
|
|
267
|
-
@if (value) {
|
|
268
|
-
@if (placeholder) {
|
|
269
|
-
:
|
|
270
|
-
}
|
|
271
|
-
{{ value | wattDate }}
|
|
272
|
-
}
|
|
273
|
-
</span>
|
|
274
|
-
</watt-menu-chip>
|
|
275
|
-
<ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
|
|
276
|
-
<ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
|
|
277
|
-
</watt-field>
|
|
278
|
-
`, isInline: true, styles: ["watt-date-chip input{top:0;bottom:0;height:auto;visibility:hidden}watt-date-chip watt-field label .watt-field-wrapper{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: WattMenuChipComponent, selector: "watt-menu-chip", inputs: ["opened", "disabled", "name", "value", "selected", "hasPopup"], outputs: ["toggle"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "pipe", type: WattDatePipe, name: "wattDate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
279
|
-
}
|
|
280
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateChipComponent, decorators: [{
|
|
281
|
-
type: Component,
|
|
282
|
-
args: [{ imports: [MatDatepickerModule, WattMenuChipComponent, WattFieldComponent, WattDatePipe], selector: 'watt-date-chip', encapsulation: ViewEncapsulation.None, template: `
|
|
283
|
-
<mat-datepicker #picker />
|
|
284
|
-
<watt-field [control]="formControl" [chipMode]="true">
|
|
285
|
-
<watt-menu-chip
|
|
286
|
-
hasPopup="dialog"
|
|
287
|
-
[disabled]="disabled"
|
|
288
|
-
[selected]="!!value"
|
|
289
|
-
[opened]="picker.opened"
|
|
290
|
-
(toggle)="picker.open()"
|
|
291
|
-
>
|
|
292
|
-
<input
|
|
293
|
-
tabindex="-1"
|
|
294
|
-
class="cdk-visually-hidden"
|
|
295
|
-
type="text"
|
|
296
|
-
[value]="value"
|
|
297
|
-
[matDatepicker]="picker"
|
|
298
|
-
(dateChange)="value = $event.value"
|
|
299
|
-
(dateChange)="selectionChange.emit($event.value)"
|
|
300
|
-
/>
|
|
301
|
-
{{ placeholder }}
|
|
302
|
-
<span>
|
|
303
|
-
@if (value) {
|
|
304
|
-
@if (placeholder) {
|
|
305
|
-
:
|
|
306
|
-
}
|
|
307
|
-
{{ value | wattDate }}
|
|
308
|
-
}
|
|
309
|
-
</span>
|
|
310
|
-
</watt-menu-chip>
|
|
311
|
-
<ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
|
|
312
|
-
<ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
|
|
313
|
-
</watt-field>
|
|
314
|
-
`, styles: ["watt-date-chip input{top:0;bottom:0;height:auto;visibility:hidden}watt-date-chip watt-field label .watt-field-wrapper{background-color:transparent}\n"] }]
|
|
315
|
-
}], propDecorators: { disabled: [{
|
|
316
|
-
type: Input
|
|
317
|
-
}], label: [{
|
|
318
|
-
type: Input
|
|
319
|
-
}], placeholder: [{
|
|
320
|
-
type: Input
|
|
321
|
-
}], value: [{
|
|
322
|
-
type: Input
|
|
323
|
-
}], formControl: [{
|
|
324
|
-
type: Input,
|
|
325
|
-
args: [{ required: true }]
|
|
326
|
-
}], selectionChange: [{
|
|
327
|
-
type: Output
|
|
328
|
-
}] } });
|
|
329
|
-
|
|
330
|
-
//#region License
|
|
331
|
-
/**
|
|
332
|
-
* @license
|
|
333
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
334
|
-
*
|
|
335
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
336
|
-
* you may not use this file except in compliance with the License.
|
|
337
|
-
* You may obtain a copy of the License at
|
|
338
|
-
*
|
|
339
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
340
|
-
*
|
|
341
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
342
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
343
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
344
|
-
* See the License for the specific language governing permissions and
|
|
345
|
-
* limitations under the License.
|
|
346
|
-
*/
|
|
347
|
-
//#endregion
|
|
348
|
-
class WattDateRangeSelectionStrategy extends DefaultMatCalendarRangeStrategy {
|
|
349
|
-
customSelectionStrategy;
|
|
350
|
-
setCustomSelectionStrategy(strategy) {
|
|
351
|
-
this.customSelectionStrategy = strategy;
|
|
352
|
-
}
|
|
353
|
-
selectionFinished(date, currentRange) {
|
|
354
|
-
let range = super.selectionFinished(date, currentRange);
|
|
355
|
-
if (this.customSelectionStrategy) {
|
|
356
|
-
range = this.customSelectionStrategy(date);
|
|
357
|
-
}
|
|
358
|
-
return range.end ? new DateRange(range.start, dayjs(range.end).endOf('day').toDate()) : range;
|
|
359
|
-
}
|
|
360
|
-
createPreview(activeDate, currentRange) {
|
|
361
|
-
if (!this.customSelectionStrategy) {
|
|
362
|
-
return super.createPreview(activeDate, currentRange);
|
|
363
|
-
}
|
|
364
|
-
else {
|
|
365
|
-
return this.customSelectionStrategy(activeDate);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateRangeSelectionStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
369
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateRangeSelectionStrategy, providedIn: 'root' });
|
|
370
|
-
}
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateRangeSelectionStrategy, decorators: [{
|
|
372
|
-
type: Injectable,
|
|
373
|
-
args: [{
|
|
374
|
-
providedIn: 'root',
|
|
375
|
-
}]
|
|
376
|
-
}] });
|
|
377
|
-
class WattDateRangeChipComponent {
|
|
378
|
-
disabled = false;
|
|
379
|
-
label;
|
|
380
|
-
value;
|
|
381
|
-
formControl;
|
|
382
|
-
placeholder = true;
|
|
383
|
-
showActions = false;
|
|
384
|
-
customSelectionStrategy;
|
|
385
|
-
get hasPlaceholderClass() {
|
|
386
|
-
return this.placeholder;
|
|
387
|
-
}
|
|
388
|
-
selectionChange = new EventEmitter();
|
|
389
|
-
_dateAdapter = inject(DateAdapter);
|
|
390
|
-
intl = inject(WattDatepickerIntlService);
|
|
391
|
-
selectionStrategy() {
|
|
392
|
-
const strategy = new WattDateRangeSelectionStrategy(this._dateAdapter);
|
|
393
|
-
strategy.setCustomSelectionStrategy(this.customSelectionStrategy);
|
|
394
|
-
return strategy;
|
|
395
|
-
}
|
|
396
|
-
clearInput() {
|
|
397
|
-
this.value = undefined;
|
|
398
|
-
this.selectionChange.emit(null);
|
|
399
|
-
}
|
|
400
|
-
onSelectionChange(value) {
|
|
401
|
-
this.selectionChange.emit(value);
|
|
402
|
-
}
|
|
403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateRangeChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
404
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDateRangeChipComponent, isStandalone: true, selector: "watt-date-range-chip", inputs: { disabled: "disabled", label: "label", value: "value", formControl: "formControl", placeholder: "placeholder", showActions: "showActions", customSelectionStrategy: "customSelectionStrategy" }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class.has-placeholder": "this.hasPlaceholderClass" } }, providers: [
|
|
405
|
-
{
|
|
406
|
-
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
407
|
-
useFactory: (comp) => comp.selectionStrategy(),
|
|
408
|
-
deps: [WattDateRangeChipComponent],
|
|
409
|
-
},
|
|
410
|
-
], ngImport: i0, template: `
|
|
411
|
-
<mat-date-range-picker #picker>
|
|
412
|
-
@if (showActions) {
|
|
413
|
-
<mat-date-range-picker-actions>
|
|
414
|
-
<watt-button variant="text" (click)="clearInput()" icon="remove">{{
|
|
415
|
-
intl.clear
|
|
416
|
-
}}</watt-button>
|
|
417
|
-
<watt-button variant="primary" matDateRangePickerApply>{{ intl.select }}</watt-button>
|
|
418
|
-
</mat-date-range-picker-actions>
|
|
419
|
-
}
|
|
420
|
-
</mat-date-range-picker>
|
|
421
|
-
|
|
422
|
-
<watt-field [control]="formControl" [chipMode]="true">
|
|
423
|
-
<watt-menu-chip
|
|
424
|
-
hasPopup="dialog"
|
|
425
|
-
[disabled]="disabled"
|
|
426
|
-
[selected]="value?.start && value?.end ? true : false"
|
|
427
|
-
[opened]="picker.opened"
|
|
428
|
-
(toggle)="picker.open()"
|
|
429
|
-
>
|
|
430
|
-
<mat-date-range-input
|
|
431
|
-
#input
|
|
432
|
-
class="cdk-visually-hidden"
|
|
433
|
-
separator=""
|
|
434
|
-
[rangePicker]="picker"
|
|
435
|
-
>
|
|
436
|
-
<input
|
|
437
|
-
type="text"
|
|
438
|
-
matStartDate
|
|
439
|
-
tabindex="-1"
|
|
440
|
-
role="none"
|
|
441
|
-
[value]="value?.start"
|
|
442
|
-
(dateChange)="value = input.value!"
|
|
443
|
-
(dateChange)="showActions && onSelectionChange($event.value ? input.value! : null)"
|
|
444
|
-
/>
|
|
445
|
-
<input
|
|
446
|
-
type="text"
|
|
447
|
-
matEndDate
|
|
448
|
-
tabindex="-1"
|
|
449
|
-
role="none"
|
|
450
|
-
[value]="value?.end"
|
|
451
|
-
(dateChange)="value = input.value!"
|
|
452
|
-
(dateChange)="onSelectionChange($event.value ? input.value! : null)"
|
|
453
|
-
/>
|
|
454
|
-
</mat-date-range-input>
|
|
455
|
-
<ng-content />
|
|
456
|
-
@if (value?.start && value?.end) {
|
|
457
|
-
<span class="value">
|
|
458
|
-
{{ value | wattDate }}
|
|
459
|
-
</span>
|
|
460
|
-
}
|
|
461
|
-
</watt-menu-chip>
|
|
462
|
-
<ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
|
|
463
|
-
<ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
|
|
464
|
-
</watt-field>
|
|
465
|
-
`, isInline: true, styles: ["watt-date-range-chip mat-date-range-input{top:0;bottom:0;height:auto;visibility:hidden}watt-date-range-chip.has-placeholder .value:before{content:\":\"}watt-date-range-chip watt-field label .watt-field-wrapper{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i1.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i1.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "component", type: WattMenuChipComponent, selector: "watt-menu-chip", inputs: ["opened", "disabled", "name", "value", "selected", "hasPopup"], outputs: ["toggle"] }, { kind: "pipe", type: WattDatePipe, name: "wattDate" }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
466
|
-
}
|
|
467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateRangeChipComponent, decorators: [{
|
|
468
|
-
type: Component,
|
|
469
|
-
args: [{ imports: [
|
|
470
|
-
MatDatepickerModule,
|
|
471
|
-
WattMenuChipComponent,
|
|
472
|
-
WattDatePipe,
|
|
473
|
-
WattFieldComponent,
|
|
474
|
-
WattButtonComponent,
|
|
475
|
-
], providers: [
|
|
476
|
-
{
|
|
477
|
-
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
478
|
-
useFactory: (comp) => comp.selectionStrategy(),
|
|
479
|
-
deps: [WattDateRangeChipComponent],
|
|
480
|
-
},
|
|
481
|
-
], selector: 'watt-date-range-chip', encapsulation: ViewEncapsulation.None, template: `
|
|
482
|
-
<mat-date-range-picker #picker>
|
|
483
|
-
@if (showActions) {
|
|
484
|
-
<mat-date-range-picker-actions>
|
|
485
|
-
<watt-button variant="text" (click)="clearInput()" icon="remove">{{
|
|
486
|
-
intl.clear
|
|
487
|
-
}}</watt-button>
|
|
488
|
-
<watt-button variant="primary" matDateRangePickerApply>{{ intl.select }}</watt-button>
|
|
489
|
-
</mat-date-range-picker-actions>
|
|
490
|
-
}
|
|
491
|
-
</mat-date-range-picker>
|
|
492
|
-
|
|
493
|
-
<watt-field [control]="formControl" [chipMode]="true">
|
|
494
|
-
<watt-menu-chip
|
|
495
|
-
hasPopup="dialog"
|
|
496
|
-
[disabled]="disabled"
|
|
497
|
-
[selected]="value?.start && value?.end ? true : false"
|
|
498
|
-
[opened]="picker.opened"
|
|
499
|
-
(toggle)="picker.open()"
|
|
500
|
-
>
|
|
501
|
-
<mat-date-range-input
|
|
502
|
-
#input
|
|
503
|
-
class="cdk-visually-hidden"
|
|
504
|
-
separator=""
|
|
505
|
-
[rangePicker]="picker"
|
|
506
|
-
>
|
|
507
|
-
<input
|
|
508
|
-
type="text"
|
|
509
|
-
matStartDate
|
|
510
|
-
tabindex="-1"
|
|
511
|
-
role="none"
|
|
512
|
-
[value]="value?.start"
|
|
513
|
-
(dateChange)="value = input.value!"
|
|
514
|
-
(dateChange)="showActions && onSelectionChange($event.value ? input.value! : null)"
|
|
515
|
-
/>
|
|
516
|
-
<input
|
|
517
|
-
type="text"
|
|
518
|
-
matEndDate
|
|
519
|
-
tabindex="-1"
|
|
520
|
-
role="none"
|
|
521
|
-
[value]="value?.end"
|
|
522
|
-
(dateChange)="value = input.value!"
|
|
523
|
-
(dateChange)="onSelectionChange($event.value ? input.value! : null)"
|
|
524
|
-
/>
|
|
525
|
-
</mat-date-range-input>
|
|
526
|
-
<ng-content />
|
|
527
|
-
@if (value?.start && value?.end) {
|
|
528
|
-
<span class="value">
|
|
529
|
-
{{ value | wattDate }}
|
|
530
|
-
</span>
|
|
531
|
-
}
|
|
532
|
-
</watt-menu-chip>
|
|
533
|
-
<ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
|
|
534
|
-
<ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
|
|
535
|
-
</watt-field>
|
|
536
|
-
`, styles: ["watt-date-range-chip mat-date-range-input{top:0;bottom:0;height:auto;visibility:hidden}watt-date-range-chip.has-placeholder .value:before{content:\":\"}watt-date-range-chip watt-field label .watt-field-wrapper{background-color:transparent}\n"] }]
|
|
537
|
-
}], propDecorators: { disabled: [{
|
|
538
|
-
type: Input
|
|
539
|
-
}], label: [{
|
|
540
|
-
type: Input
|
|
541
|
-
}], value: [{
|
|
542
|
-
type: Input
|
|
543
|
-
}], formControl: [{
|
|
544
|
-
type: Input,
|
|
545
|
-
args: [{ required: true }]
|
|
546
|
-
}], placeholder: [{
|
|
547
|
-
type: Input
|
|
548
|
-
}], showActions: [{
|
|
549
|
-
type: Input
|
|
550
|
-
}], customSelectionStrategy: [{
|
|
551
|
-
type: Input
|
|
552
|
-
}], hasPlaceholderClass: [{
|
|
553
|
-
type: HostBinding,
|
|
554
|
-
args: ['class.has-placeholder']
|
|
555
|
-
}], selectionChange: [{
|
|
556
|
-
type: Output
|
|
557
|
-
}] } });
|
|
558
|
-
|
|
559
|
-
//#region License
|
|
560
|
-
/**
|
|
561
|
-
* @license
|
|
562
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
563
|
-
*
|
|
564
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
565
|
-
* you may not use this file except in compliance with the License.
|
|
566
|
-
* You may obtain a copy of the License at
|
|
567
|
-
*
|
|
568
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
569
|
-
*
|
|
570
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
571
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
572
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
573
|
-
* See the License for the specific language governing permissions and
|
|
574
|
-
* limitations under the License.
|
|
575
|
-
*/
|
|
576
|
-
//#endregion
|
|
577
|
-
function isFirstRender() {
|
|
578
|
-
let isFirstRender = true;
|
|
579
|
-
return () => {
|
|
580
|
-
if (!isFirstRender)
|
|
581
|
-
return false;
|
|
582
|
-
isFirstRender = false;
|
|
583
|
-
return true;
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
class WattFilterChipComponent {
|
|
587
|
-
selected = false;
|
|
588
|
-
disabled = false;
|
|
589
|
-
name;
|
|
590
|
-
value;
|
|
591
|
-
choice;
|
|
592
|
-
selectionChange = new EventEmitter();
|
|
593
|
-
isFirstRender = isFirstRender();
|
|
594
|
-
onChange(input) {
|
|
595
|
-
const value = this.choice !== undefined ? input.value : input.checked;
|
|
596
|
-
this.selectionChange.emit(value);
|
|
597
|
-
}
|
|
598
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFilterChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
599
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattFilterChipComponent, isStandalone: true, selector: "watt-filter-chip", inputs: { selected: "selected", disabled: "disabled", name: "name", value: "value", choice: "choice" }, outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: `
|
|
600
|
-
<watt-chip [disabled]="disabled" [selected]="isFirstRender() ? selected : input.checked">
|
|
601
|
-
<input
|
|
602
|
-
#input
|
|
603
|
-
class="cdk-visually-hidden"
|
|
604
|
-
[type]="choice === undefined ? 'checkbox' : 'radio'"
|
|
605
|
-
[name]="name"
|
|
606
|
-
[value]="value"
|
|
607
|
-
[checked]="selected"
|
|
608
|
-
[disabled]="disabled"
|
|
609
|
-
(change)="onChange(input)"
|
|
610
|
-
/>
|
|
611
|
-
<ng-content />
|
|
612
|
-
</watt-chip>
|
|
613
|
-
`, isInline: true, dependencies: [{ kind: "component", type: WattChipComponent, selector: "watt-chip", inputs: ["selected", "disabled", "readonly"] }] });
|
|
614
|
-
}
|
|
615
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFilterChipComponent, decorators: [{
|
|
616
|
-
type: Component,
|
|
617
|
-
args: [{
|
|
618
|
-
imports: [WattChipComponent],
|
|
619
|
-
selector: 'watt-filter-chip',
|
|
620
|
-
template: `
|
|
621
|
-
<watt-chip [disabled]="disabled" [selected]="isFirstRender() ? selected : input.checked">
|
|
622
|
-
<input
|
|
623
|
-
#input
|
|
624
|
-
class="cdk-visually-hidden"
|
|
625
|
-
[type]="choice === undefined ? 'checkbox' : 'radio'"
|
|
626
|
-
[name]="name"
|
|
627
|
-
[value]="value"
|
|
628
|
-
[checked]="selected"
|
|
629
|
-
[disabled]="disabled"
|
|
630
|
-
(change)="onChange(input)"
|
|
631
|
-
/>
|
|
632
|
-
<ng-content />
|
|
633
|
-
</watt-chip>
|
|
634
|
-
`,
|
|
635
|
-
}]
|
|
636
|
-
}], propDecorators: { selected: [{
|
|
637
|
-
type: Input
|
|
638
|
-
}], disabled: [{
|
|
639
|
-
type: Input
|
|
640
|
-
}], name: [{
|
|
641
|
-
type: Input
|
|
642
|
-
}], value: [{
|
|
643
|
-
type: Input
|
|
644
|
-
}], choice: [{
|
|
645
|
-
type: Input
|
|
646
|
-
}], selectionChange: [{
|
|
647
|
-
type: Output
|
|
648
|
-
}] } });
|
|
649
|
-
|
|
650
|
-
//#region License
|
|
651
|
-
/**
|
|
652
|
-
* @license
|
|
653
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
654
|
-
*
|
|
655
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
656
|
-
* you may not use this file except in compliance with the License.
|
|
657
|
-
* You may obtain a copy of the License at
|
|
658
|
-
*
|
|
659
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
660
|
-
*
|
|
661
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
662
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
663
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
664
|
-
* See the License for the specific language governing permissions and
|
|
665
|
-
* limitations under the License.
|
|
666
|
-
*/
|
|
667
|
-
//#endregion
|
|
668
|
-
class WattFormChipDirective {
|
|
669
|
-
filterChip = inject(WattFilterChipComponent, { host: true, optional: true, self: true });
|
|
670
|
-
dateChip = inject(WattDateChipComponent, { host: true, optional: true, self: true });
|
|
671
|
-
dateRangeChip = inject(WattDateRangeChipComponent, {
|
|
672
|
-
host: true,
|
|
673
|
-
optional: true,
|
|
674
|
-
self: true,
|
|
675
|
-
});
|
|
676
|
-
element = inject(ElementRef);
|
|
677
|
-
component;
|
|
678
|
-
constructor() {
|
|
679
|
-
if (this.filterChip) {
|
|
680
|
-
this.component = this.filterChip;
|
|
681
|
-
}
|
|
682
|
-
else if (this.dateChip) {
|
|
683
|
-
this.component = this.dateChip;
|
|
684
|
-
}
|
|
685
|
-
else if (this.dateRangeChip) {
|
|
686
|
-
this.component = this.dateRangeChip;
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
writeValue(value) {
|
|
690
|
-
if (this.component) {
|
|
691
|
-
this.component.value = value;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
registerOnChange(fn) {
|
|
695
|
-
this.component?.selectionChange.subscribe(fn);
|
|
696
|
-
}
|
|
697
|
-
registerOnTouched(fn) {
|
|
698
|
-
this.element.nativeElement.addEventListener('focusout', fn);
|
|
699
|
-
}
|
|
700
|
-
setDisabledState(disabled) {
|
|
701
|
-
if (this.component) {
|
|
702
|
-
this.component.disabled = disabled;
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFormChipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
706
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: WattFormChipDirective, isStandalone: true, selector: "\n watt-filter-chip[formControl],\n watt-date-chip[formControl],\n watt-date-range-chip[formControl],\n watt-filter-chip[formControlName],\n watt-date-chip[formControlName],\n watt-date-range-chip[formControlName],\n ", providers: [
|
|
707
|
-
{
|
|
708
|
-
provide: NG_VALUE_ACCESSOR,
|
|
709
|
-
useExisting: forwardRef(() => WattFormChipDirective),
|
|
710
|
-
multi: true,
|
|
711
|
-
},
|
|
712
|
-
], ngImport: i0 });
|
|
713
|
-
}
|
|
714
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattFormChipDirective, decorators: [{
|
|
715
|
-
type: Directive,
|
|
716
|
-
args: [{
|
|
717
|
-
providers: [
|
|
718
|
-
{
|
|
719
|
-
provide: NG_VALUE_ACCESSOR,
|
|
720
|
-
useExisting: forwardRef(() => WattFormChipDirective),
|
|
721
|
-
multi: true,
|
|
722
|
-
},
|
|
723
|
-
],
|
|
724
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
725
|
-
selector: `
|
|
726
|
-
watt-filter-chip[formControl],
|
|
727
|
-
watt-date-chip[formControl],
|
|
728
|
-
watt-date-range-chip[formControl],
|
|
729
|
-
watt-filter-chip[formControlName],
|
|
730
|
-
watt-date-chip[formControlName],
|
|
731
|
-
watt-date-range-chip[formControlName],
|
|
732
|
-
`,
|
|
733
|
-
}]
|
|
734
|
-
}], ctorParameters: () => [] });
|
|
735
|
-
|
|
736
|
-
//#region License
|
|
737
|
-
/**
|
|
738
|
-
* @license
|
|
739
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
740
|
-
*
|
|
741
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
742
|
-
* you may not use this file except in compliance with the License.
|
|
743
|
-
* You may obtain a copy of the License at
|
|
744
|
-
*
|
|
745
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
746
|
-
*
|
|
747
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
748
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
749
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
750
|
-
* See the License for the specific language governing permissions and
|
|
751
|
-
* limitations under the License.
|
|
752
|
-
*/
|
|
753
|
-
//#endregion
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* Generated bundle index. Do not edit.
|
|
757
|
-
*/
|
|
758
|
-
|
|
759
|
-
export { WattActionChipComponent, WattChipComponent, WattDateChipComponent, WattDateRangeChipComponent, WattFilterChipComponent, WattFormChipDirective, WattMenuChipComponent };
|
|
760
|
-
//# sourceMappingURL=energinet-watt-chip.mjs.map
|