@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-chip.mjs","sources":["../../../libs/watt/package/chip/watt-chip.component.ts","../../../libs/watt/package/chip/watt-action-chip.component.ts","../../../libs/watt/package/chip/watt-menu-chip.component.ts","../../../libs/watt/package/chip/watt-date-chip.component.ts","../../../libs/watt/package/chip/watt-date-range-chip.component.ts","../../../libs/watt/package/chip/watt-filter-chip.component.ts","../../../libs/watt/package/chip/watt-chip.directive.ts","../../../libs/watt/package/chip/index.ts","../../../libs/watt/package/chip/energinet-watt-chip.ts"],"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 { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n imports: [WattIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-chip',\n styleUrls: ['./watt-chip.component.scss'],\n template: `\n <label\n [class.selected]=\"selected()\"\n [class.disabled]=\"disabled()\"\n [class.read-only]=\"readonly()\"\n >\n @if (selected()) {\n <watt-icon class=\"selected-icon\" name=\"checkmark\" size=\"s\" [attr.aria-hidden]=\"true\" />\n }\n <ng-content />\n </label>\n `,\n})\nexport class WattChipComponent {\n selected = input(false);\n disabled = input(false);\n readonly = input(false);\n}\n","//#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 { Component, input, output } from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-action-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled()\">\n <button\n type=\"button\"\n class=\"cdk-visually-hidden\"\n (click)=\"$event.stopImmediatePropagation(); action.emit()\"\n [disabled]=\"disabled()\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n [name]=\"icon()\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.disabled]=\"disabled()\"\n />\n </watt-chip>\n `,\n})\nexport class WattActionChipComponent {\n disabled = input(false);\n icon = input.required<WattIcon>();\n action = output<void>();\n}\n","//#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 { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\nexport type WattMenuChipHasPopup = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-menu-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .menu-icon {\n margin-left: var(--watt-space-xs);\n transition: linear 0.2s all;\n color: var(--watt-color-primary);\n\n &.disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n }\n\n .opened {\n transform: rotate(180deg);\n }\n\n .selected {\n color: var(--watt-color-neutral-white);\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"selected\">\n <button\n class=\"cdk-visually-hidden\"\n [attr.aria-haspopup]=\"hasPopup\"\n [attr.aria-expanded]=\"opened\"\n [attr.aria-pressed]=\"selected\"\n (click)=\"toggle.emit()\"\n [disabled]=\"disabled\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n name=\"arrowDropDown\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.opened]=\"opened\"\n [class.selected]=\"selected\"\n [class.disabled]=\"disabled\"\n />\n </watt-chip>\n `,\n})\nexport class WattMenuChipComponent {\n @Input() opened = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: string;\n @Input() selected = false;\n @Input() hasPopup: WattMenuChipHasPopup = 'menu';\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() toggle = new EventEmitter<void>();\n}\n","//#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 { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { WattDatePipe } from '@energinet/watt/core/date';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { FormControl } from '@angular/forms';\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\n@Component({\n imports: [MatDatepickerModule, WattMenuChipComponent, WattFieldComponent, WattDatePipe],\n selector: 'watt-date-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-chip {\n input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-datepicker #picker />\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"!!value\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <input\n tabindex=\"-1\"\n class=\"cdk-visually-hidden\"\n type=\"text\"\n [value]=\"value\"\n [matDatepicker]=\"picker\"\n (dateChange)=\"value = $event.value\"\n (dateChange)=\"selectionChange.emit($event.value)\"\n />\n {{ placeholder }}\n <span>\n @if (value) {\n @if (placeholder) {\n :\n }\n {{ value | wattDate }}\n }\n </span>\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() placeholder?: string;\n @Input() value?: string;\n @Input({ required: true }) formControl!: FormControl;\n @Output() selectionChange = new EventEmitter<Date>();\n}\n","//#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 { FormControl } from '@angular/forms';\nimport {\n Component,\n EventEmitter,\n HostBinding,\n Injectable,\n Input,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport {\n DateRange,\n DefaultMatCalendarRangeStrategy,\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { dayjs, WattDatePipe, WattRange } from '@energinet/watt/core/date';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattDatepickerIntlService } from '@energinet/watt/picker/datepicker';\n\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\ntype customSelectionStrategy = (date: Date | null) => DateRange<Date>;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattDateRangeSelectionStrategy extends DefaultMatCalendarRangeStrategy<Date> {\n private customSelectionStrategy!: customSelectionStrategy;\n\n setCustomSelectionStrategy(strategy: customSelectionStrategy) {\n this.customSelectionStrategy = strategy;\n }\n\n override selectionFinished(date: Date, currentRange: DateRange<Date>): DateRange<Date> {\n let range: DateRange<Date> = super.selectionFinished(date, currentRange);\n\n if (this.customSelectionStrategy) {\n range = this.customSelectionStrategy(date);\n }\n\n return range.end ? new DateRange(range.start, dayjs(range.end).endOf('day').toDate()) : range;\n }\n\n override createPreview(activeDate: Date | null, currentRange: DateRange<Date>): DateRange<Date> {\n if (!this.customSelectionStrategy) {\n return super.createPreview(activeDate, currentRange);\n } else {\n return this.customSelectionStrategy(activeDate);\n }\n }\n}\n\n@Component({\n imports: [\n MatDatepickerModule,\n WattMenuChipComponent,\n WattDatePipe,\n WattFieldComponent,\n WattButtonComponent,\n ],\n providers: [\n {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n useFactory: (comp: WattDateRangeChipComponent) => comp.selectionStrategy(),\n deps: [WattDateRangeChipComponent],\n },\n ],\n selector: 'watt-date-range-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-range-chip {\n mat-date-range-input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n &.has-placeholder .value::before {\n content: ':';\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-date-range-picker #picker>\n @if (showActions) {\n <mat-date-range-picker-actions>\n <watt-button variant=\"text\" (click)=\"clearInput()\" icon=\"remove\">{{\n intl.clear\n }}</watt-button>\n <watt-button variant=\"primary\" matDateRangePickerApply>{{ intl.select }}</watt-button>\n </mat-date-range-picker-actions>\n }\n </mat-date-range-picker>\n\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"value?.start && value?.end ? true : false\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <mat-date-range-input\n #input\n class=\"cdk-visually-hidden\"\n separator=\"\"\n [rangePicker]=\"picker\"\n >\n <input\n type=\"text\"\n matStartDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.start\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"showActions && onSelectionChange($event.value ? input.value! : null)\"\n />\n <input\n type=\"text\"\n matEndDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.end\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"onSelectionChange($event.value ? input.value! : null)\"\n />\n </mat-date-range-input>\n <ng-content />\n @if (value?.start && value?.end) {\n <span class=\"value\">\n {{ value | wattDate }}\n </span>\n }\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateRangeChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() value?: WattRange<Date>;\n @Input({ required: true }) formControl!: FormControl;\n @Input() placeholder = true;\n @Input() showActions = false;\n @Input() customSelectionStrategy!: (date: Date | null) => DateRange<Date>;\n\n @HostBinding('class.has-placeholder')\n get hasPlaceholderClass(): boolean {\n return this.placeholder;\n }\n\n @Output() selectionChange = new EventEmitter<WattRange<Date> | null>();\n\n private _dateAdapter = inject(DateAdapter);\n protected intl = inject(WattDatepickerIntlService);\n\n selectionStrategy() {\n const strategy = new WattDateRangeSelectionStrategy(this._dateAdapter);\n strategy.setCustomSelectionStrategy(this.customSelectionStrategy);\n return strategy;\n }\n\n clearInput(): void {\n this.value = undefined;\n this.selectionChange.emit(null);\n }\n\n onSelectionChange(value: WattRange<Date> | null): void {\n this.selectionChange.emit(value);\n }\n}\n","//#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 { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattChipComponent } from './watt-chip.component';\n\nfunction isFirstRender() {\n let isFirstRender = true;\n return () => {\n if (!isFirstRender) return false;\n isFirstRender = false;\n return true;\n };\n}\n\n@Component({\n imports: [WattChipComponent],\n selector: 'watt-filter-chip',\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"isFirstRender() ? selected : input.checked\">\n <input\n #input\n class=\"cdk-visually-hidden\"\n [type]=\"choice === undefined ? 'checkbox' : 'radio'\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n (change)=\"onChange(input)\"\n />\n <ng-content />\n </watt-chip>\n `,\n})\nexport class WattFilterChipComponent<T = string> {\n @Input() selected = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: T;\n @Input() choice?: string;\n @Output() selectionChange = new EventEmitter<T>();\n isFirstRender = isFirstRender();\n\n onChange(input: HTMLInputElement): void {\n const value = this.choice !== undefined ? input.value : input.checked;\n this.selectionChange.emit(value as T);\n }\n}\n","//#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 { Directive, ElementRef, EventEmitter, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { WattFilterChipComponent } from './watt-filter-chip.component';\nimport { WattDateChipComponent } from './watt-date-chip.component';\nimport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface WattChip {\n value?: any;\n disabled: boolean;\n selectionChange: EventEmitter<any>;\n}\n\n@Directive({\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattFormChipDirective),\n multi: true,\n },\n ],\n // eslint-disable-next-line @angular-eslint/directive-selector\n 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 `,\n})\nexport class WattFormChipDirective implements ControlValueAccessor {\n private filterChip = inject(WattFilterChipComponent, { host: true, optional: true, self: true });\n private dateChip = inject(WattDateChipComponent, { host: true, optional: true, self: true });\n private dateRangeChip = inject(WattDateRangeChipComponent, {\n host: true,\n optional: true,\n self: true,\n });\n\n private element = inject(ElementRef);\n private component?: WattChip;\n\n constructor() {\n if (this.filterChip) {\n this.component = this.filterChip;\n } else if (this.dateChip) {\n this.component = this.dateChip;\n } else if (this.dateRangeChip) {\n this.component = this.dateRangeChip;\n }\n }\n\n writeValue(value?: any): void {\n if (this.component) {\n this.component.value = value;\n }\n }\n\n registerOnChange(fn: () => void) {\n this.component?.selectionChange.subscribe(fn);\n }\n\n registerOnTouched(fn: () => void) {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState(disabled: boolean) {\n if (this.component) {\n this.component.disabled = disabled;\n }\n }\n}\n","//#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 { WattActionChipComponent } from './watt-action-chip.component';\nexport { WattChipComponent } from './watt-chip.component';\nexport { WattDateChipComponent } from './watt-date-chip.component';\nexport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\nexport { WattFilterChipComponent } from './watt-filter-chip.component';\nexport { WattFormChipDirective } from './watt-chip.directive';\nexport { WattMenuChipComponent } from './watt-menu-chip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAuBa,iBAAiB,CAAA;AAC5B,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AACvB,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AACvB,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;uGAHZ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAblB;;;;;;;;;;;AAWT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yoCAAA,CAAA,EAAA,YAAA,EA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CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ;;;uGAtC3B,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8OAAA,EAAA,SAAA,EAjBrB;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;AACpD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAWU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;;AAED,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACF,iBAAA;;;ACjDD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, ElementRef, input, output, Directive } from '@angular/core';
|
|
3
|
-
import { Clipboard } from '@angular/cdk/clipboard';
|
|
4
|
-
import { WattToastService } from '@energinet/watt/toast';
|
|
5
|
-
|
|
6
|
-
//#region License
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License.
|
|
22
|
-
*/
|
|
23
|
-
//#endregion
|
|
24
|
-
class WattClipboardIntlService {
|
|
25
|
-
success = 'Copied to clipboard';
|
|
26
|
-
error = 'Failed to copy';
|
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattClipboardIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattClipboardIntlService, providedIn: 'root' });
|
|
29
|
-
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattClipboardIntlService, decorators: [{
|
|
31
|
-
type: Injectable,
|
|
32
|
-
args: [{ providedIn: 'root' }]
|
|
33
|
-
}] });
|
|
34
|
-
|
|
35
|
-
//#region License
|
|
36
|
-
/**
|
|
37
|
-
* @license
|
|
38
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
39
|
-
*
|
|
40
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
41
|
-
* you may not use this file except in compliance with the License.
|
|
42
|
-
* You may obtain a copy of the License at
|
|
43
|
-
*
|
|
44
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
45
|
-
*
|
|
46
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
47
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
48
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
49
|
-
* See the License for the specific language governing permissions and
|
|
50
|
-
* limitations under the License.
|
|
51
|
-
*/
|
|
52
|
-
//#endregion
|
|
53
|
-
class WattCopyToClipboardDirective {
|
|
54
|
-
element = inject(ElementRef);
|
|
55
|
-
clipboard = inject(Clipboard);
|
|
56
|
-
toast = inject(WattToastService);
|
|
57
|
-
intl = inject(WattClipboardIntlService);
|
|
58
|
-
text = input(undefined, { alias: 'wattCopyToClipboard' });
|
|
59
|
-
copySuccess = output();
|
|
60
|
-
handleHostClick() {
|
|
61
|
-
const text = this.text();
|
|
62
|
-
const success = text
|
|
63
|
-
? this.clipboard.copy(text)
|
|
64
|
-
: this.clipboard.copy(this.element.nativeElement.innerText);
|
|
65
|
-
if (success) {
|
|
66
|
-
this.toast.open({
|
|
67
|
-
type: 'success',
|
|
68
|
-
message: this.intl.success,
|
|
69
|
-
});
|
|
70
|
-
this.copySuccess.emit(true);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
this.toast.open({
|
|
74
|
-
type: 'danger',
|
|
75
|
-
message: this.intl.error,
|
|
76
|
-
});
|
|
77
|
-
this.copySuccess.emit(false);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCopyToClipboardDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
81
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: WattCopyToClipboardDirective, isStandalone: true, selector: "[wattCopyToClipboard]", inputs: { text: { classPropertyName: "text", publicName: "wattCopyToClipboard", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { copySuccess: "copySuccess" }, host: { listeners: { "click": "handleHostClick()" }, properties: { "style.cursor": "'pointer'" } }, ngImport: i0 });
|
|
82
|
-
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCopyToClipboardDirective, decorators: [{
|
|
84
|
-
type: Directive,
|
|
85
|
-
args: [{
|
|
86
|
-
selector: '[wattCopyToClipboard]',
|
|
87
|
-
host: {
|
|
88
|
-
'[style.cursor]': "'pointer'",
|
|
89
|
-
'(click)': 'handleHostClick()',
|
|
90
|
-
},
|
|
91
|
-
}]
|
|
92
|
-
}] });
|
|
93
|
-
|
|
94
|
-
//#region License
|
|
95
|
-
/**
|
|
96
|
-
* @license
|
|
97
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
98
|
-
*
|
|
99
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
100
|
-
* you may not use this file except in compliance with the License.
|
|
101
|
-
* You may obtain a copy of the License at
|
|
102
|
-
*
|
|
103
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
104
|
-
*
|
|
105
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
106
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
107
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
108
|
-
* See the License for the specific language governing permissions and
|
|
109
|
-
* limitations under the License.
|
|
110
|
-
*/
|
|
111
|
-
//#endregion
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Generated bundle index. Do not edit.
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
export { WattClipboardIntlService, WattCopyToClipboardDirective };
|
|
118
|
-
//# sourceMappingURL=energinet-watt-clipboard.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-clipboard.mjs","sources":["../../../libs/watt/package/clipboard/watt-clipboard-intl.service.ts","../../../libs/watt/package/clipboard/watt-copy-to-clipboard.directive.ts","../../../libs/watt/package/clipboard/index.ts","../../../libs/watt/package/clipboard/energinet-watt-clipboard.ts"],"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 WattClipboardIntlService {\n success = 'Copied to clipboard';\n error = 'Failed to copy';\n}\n","//#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 { input, output, inject, Directive, ElementRef } from '@angular/core';\nimport { Clipboard } from '@angular/cdk/clipboard';\n\nimport { WattToastService } from '@energinet/watt/toast';\nimport { WattClipboardIntlService } from './watt-clipboard-intl.service';\n\n@Directive({\n selector: '[wattCopyToClipboard]',\n host: {\n '[style.cursor]': \"'pointer'\",\n '(click)': 'handleHostClick()',\n },\n})\nexport class WattCopyToClipboardDirective {\n private element = inject(ElementRef);\n private clipboard = inject(Clipboard);\n private toast = inject(WattToastService);\n private intl = inject(WattClipboardIntlService);\n\n text = input<string>(undefined, { alias: 'wattCopyToClipboard' });\n\n copySuccess = output<boolean>();\n\n handleHostClick() {\n const text = this.text();\n const success = text\n ? this.clipboard.copy(text)\n : this.clipboard.copy(this.element.nativeElement.innerText);\n\n if (success) {\n this.toast.open({\n type: 'success',\n message: this.intl.success,\n });\n\n this.copySuccess.emit(true);\n } else {\n this.toast.open({\n type: 'danger',\n message: this.intl.error,\n });\n\n this.copySuccess.emit(false);\n }\n }\n}\n","//#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 { WattCopyToClipboardDirective } from './watt-copy-to-clipboard.directive';\nexport { WattClipboardIntlService } from './watt-clipboard-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAIa,wBAAwB,CAAA;IACnC,OAAO,GAAG,qBAAqB;IAC/B,KAAK,GAAG,gBAAgB;uGAFb,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA;;2FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAca,4BAA4B,CAAA;AAC/B,IAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;A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A,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAPxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,gBAAgB,EAAE,WAAW;AAC7B,wBAAA,SAAS,EAAE,mBAAmB;AAC/B,qBAAA;AACF,iBAAA;;;AC9BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, input, linkedSignal, signal, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { WattSpinnerComponent } from '@energinet/watt/spinner';
|
|
4
|
-
import { VaterStackComponent } from '@energinet/watt/vater';
|
|
5
|
-
|
|
6
|
-
//#region License
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License.
|
|
22
|
-
*/
|
|
23
|
-
//#endregion
|
|
24
|
-
const WATT_CODE_HIGHLIGHT_WORKER_FACTORY = new InjectionToken('WattCodeHighlightWorkerFactory', { factory: () => null });
|
|
25
|
-
|
|
26
|
-
//#region License
|
|
27
|
-
/**
|
|
28
|
-
* @license
|
|
29
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
30
|
-
*
|
|
31
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
32
|
-
* you may not use this file except in compliance with the License.
|
|
33
|
-
* You may obtain a copy of the License at
|
|
34
|
-
*
|
|
35
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
36
|
-
*
|
|
37
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
38
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
39
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
40
|
-
* See the License for the specific language governing permissions and
|
|
41
|
-
* limitations under the License.
|
|
42
|
-
*/
|
|
43
|
-
//#endregion
|
|
44
|
-
class WattCodeComponent {
|
|
45
|
-
highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);
|
|
46
|
-
worker = this.highlightWorkerFactory?.();
|
|
47
|
-
code = input.required();
|
|
48
|
-
/** @ignore */
|
|
49
|
-
formattedCode = linkedSignal(() => this.code() ?? '');
|
|
50
|
-
/** @ignore */
|
|
51
|
-
loading = signal(false);
|
|
52
|
-
/** @ignore */
|
|
53
|
-
ngOnDestroy() {
|
|
54
|
-
this.worker?.terminate();
|
|
55
|
-
}
|
|
56
|
-
constructor() {
|
|
57
|
-
effect(() => {
|
|
58
|
-
const code = this.code();
|
|
59
|
-
if (!code)
|
|
60
|
-
return;
|
|
61
|
-
if (!this.worker)
|
|
62
|
-
return;
|
|
63
|
-
this.loading.set(true);
|
|
64
|
-
this.worker.onmessage = (event) => {
|
|
65
|
-
this.formattedCode.set(event.data);
|
|
66
|
-
this.loading.set(false);
|
|
67
|
-
};
|
|
68
|
-
this.worker.postMessage(code);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattCodeComponent, isStandalone: true, selector: "watt-code", inputs: { code: { classPropertyName: "code", publicName: "code", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
73
|
-
@if (loading()) {
|
|
74
|
-
<vater-stack fill="horizontal" align="center"><watt-spinner /></vater-stack>
|
|
75
|
-
} @else {
|
|
76
|
-
<pre>
|
|
77
|
-
<code class="watt-code-content" [innerHTML]="formattedCode()"></code>
|
|
78
|
-
</pre>
|
|
79
|
-
}
|
|
80
|
-
`, isInline: true, styles: ["watt-tabs watt-code pre code.watt-code-content{padding:0}watt-code{display:block;overflow:auto}watt-code pre{display:flex;margin-top:0;margin-bottom:0;word-wrap:break-word}watt-code pre code{flex:1;line-height:1.8em;font-size:14px;min-height:100%;padding:1em 1.2em;text-wrap:balance}\n"], dependencies: [{ kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
81
|
-
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattCodeComponent, decorators: [{
|
|
83
|
-
type: Component,
|
|
84
|
-
args: [{ selector: 'watt-code', template: `
|
|
85
|
-
@if (loading()) {
|
|
86
|
-
<vater-stack fill="horizontal" align="center"><watt-spinner /></vater-stack>
|
|
87
|
-
} @else {
|
|
88
|
-
<pre>
|
|
89
|
-
<code class="watt-code-content" [innerHTML]="formattedCode()"></code>
|
|
90
|
-
</pre>
|
|
91
|
-
}
|
|
92
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [WattSpinnerComponent, VaterStackComponent], styles: ["watt-tabs watt-code pre code.watt-code-content{padding:0}watt-code{display:block;overflow:auto}watt-code pre{display:flex;margin-top:0;margin-bottom:0;word-wrap:break-word}watt-code pre code{flex:1;line-height:1.8em;font-size:14px;min-height:100%;padding:1em 1.2em;text-wrap:balance}\n"] }]
|
|
93
|
-
}], ctorParameters: () => [] });
|
|
94
|
-
|
|
95
|
-
//#region License
|
|
96
|
-
/**
|
|
97
|
-
* @license
|
|
98
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
99
|
-
*
|
|
100
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
101
|
-
* you may not use this file except in compliance with the License.
|
|
102
|
-
* You may obtain a copy of the License at
|
|
103
|
-
*
|
|
104
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
105
|
-
*
|
|
106
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
107
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
108
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
109
|
-
* See the License for the specific language governing permissions and
|
|
110
|
-
* limitations under the License.
|
|
111
|
-
*/
|
|
112
|
-
//#endregion
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Generated bundle index. Do not edit.
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
export { WATT_CODE_HIGHLIGHT_WORKER_FACTORY, WattCodeComponent };
|
|
119
|
-
//# sourceMappingURL=energinet-watt-code.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-code.mjs","sources":["../../../libs/watt/package/code/watt-code.worker.token.ts","../../../libs/watt/package/code/watt-code.component.ts","../../../libs/watt/package/code/index.ts","../../../libs/watt/package/code/energinet-watt-code.ts"],"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 { InjectionToken } from '@angular/core';\n\nexport const WATT_CODE_HIGHLIGHT_WORKER_FACTORY = new InjectionToken<(() => Worker) | null>(\n 'WattCodeHighlightWorkerFactory',\n { factory: () => null }\n);\n","//#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 Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n input,\n OnDestroy,\n inject,\n effect,\n linkedSignal,\n} from '@angular/core';\n\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\nimport { VaterStackComponent } from '@energinet/watt/vater';\n\nimport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n\n@Component({\n selector: 'watt-code',\n template: `\n @if (loading()) {\n <vater-stack fill=\"horizontal\" align=\"center\"><watt-spinner /></vater-stack>\n } @else {\n <pre>\n <code class=\"watt-code-content\" [innerHTML]=\"formattedCode()\"></code>\n </pre>\n }\n `,\n styleUrls: ['./watt-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WattSpinnerComponent, VaterStackComponent],\n})\nexport class WattCodeComponent implements OnDestroy {\n private highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);\n private worker = this.highlightWorkerFactory?.();\n\n code = input.required<string | null | undefined>();\n\n /** @ignore */\n formattedCode = linkedSignal(() => this.code() ?? '');\n\n /** @ignore */\n loading = signal(false);\n\n /** @ignore */\n ngOnDestroy(): void {\n this.worker?.terminate();\n }\n\n constructor() {\n effect(() => {\n const code = this.code();\n if (!code) return;\n if (!this.worker) return;\n this.loading.set(true);\n this.worker.onmessage = (event) => {\n this.formattedCode.set(event.data);\n this.loading.set(false);\n };\n this.worker.postMessage(code);\n });\n }\n}\n","//#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 { WattCodeComponent } from './watt-code.component';\nexport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAGO,MAAM,kCAAkC,GAAG,IAAI,cAAc,CAClE,gCAAgC,EAChC,EAAE,OAAO,EAAE,MAAM,IAAI,EAAE;;ACtBzB;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkCa,iBAAiB,CAAA;AACpB,IAAA,sBAAsB,GAAG,MAAM,CAAC,kCAAkC,CAAC;AACnE,IAAA,MAAM,GAAG,IAAI,CAAC,sBAAsB,IAAI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AAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAdlB;;;;;;;;GAQT,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+RAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAIS,oBAAoB,8FAAE,mBAAmB,EAAA,QAAA,EAAA,4BAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAExC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,QAAA,EACX;;;;;;;;AAQT,EAAA,CAAA,EAAA,eAAA,EAEgB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,EAAA,MAAA,EAAA,CAAA,+RAAA,CAAA,EAAA;;;ACjDtD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import * as i1 from '@angular/cdk/layout';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
//#region License
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
11
|
-
* you may not use this file except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/
|
|
22
|
-
//#endregion
|
|
23
|
-
/**
|
|
24
|
-
* NOTE: Keep in sync with ./_breakpoints.scss
|
|
25
|
-
* NOTE: We don't use CSS Custom Properties for our breakpoints,
|
|
26
|
-
* because they can't be used in media queries and we don't want those changed on the fly
|
|
27
|
-
*/
|
|
28
|
-
const WattBreakpoint = {
|
|
29
|
-
XSmall: '(max-width: 599.98px)',
|
|
30
|
-
Small: '(min-width: 600px) and (max-width: 959.98px)',
|
|
31
|
-
Medium: '(min-width: 960px) and (max-width: 1279.98px)',
|
|
32
|
-
Large: '(min-width: 1280px) and (max-width: 1919.98px)',
|
|
33
|
-
XLarge: '(min-width: 1920px)',
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
//#region License
|
|
37
|
-
/**
|
|
38
|
-
* @license
|
|
39
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
40
|
-
*
|
|
41
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
42
|
-
* you may not use this file except in compliance with the License.
|
|
43
|
-
* You may obtain a copy of the License at
|
|
44
|
-
*
|
|
45
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
-
*
|
|
47
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
48
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
49
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
50
|
-
* See the License for the specific language governing permissions and
|
|
51
|
-
* limitations under the License.
|
|
52
|
-
*/
|
|
53
|
-
//#endregion
|
|
54
|
-
class WattBreakpointsObserver {
|
|
55
|
-
breakpointObserver;
|
|
56
|
-
constructor(breakpointObserver) {
|
|
57
|
-
this.breakpointObserver = breakpointObserver;
|
|
58
|
-
}
|
|
59
|
-
observe(breakpoints) {
|
|
60
|
-
if (Array.isArray(breakpoints)) {
|
|
61
|
-
return this.breakpointObserver.observe(breakpoints.map((bp) => WattBreakpoint[bp]));
|
|
62
|
-
}
|
|
63
|
-
return this.breakpointObserver.observe(WattBreakpoint[breakpoints]);
|
|
64
|
-
}
|
|
65
|
-
isMatched(breakpoint) {
|
|
66
|
-
return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);
|
|
67
|
-
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattBreakpointsObserver, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
69
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattBreakpointsObserver, providedIn: 'root' });
|
|
70
|
-
}
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattBreakpointsObserver, decorators: [{
|
|
72
|
-
type: Injectable,
|
|
73
|
-
args: [{ providedIn: 'root' }]
|
|
74
|
-
}], ctorParameters: () => [{ type: i1.BreakpointObserver }] });
|
|
75
|
-
|
|
76
|
-
//#region License
|
|
77
|
-
/**
|
|
78
|
-
* @license
|
|
79
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
80
|
-
*
|
|
81
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
82
|
-
* you may not use this file except in compliance with the License.
|
|
83
|
-
* You may obtain a copy of the License at
|
|
84
|
-
*
|
|
85
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
86
|
-
*
|
|
87
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
88
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
89
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
90
|
-
* See the License for the specific language governing permissions and
|
|
91
|
-
* limitations under the License.
|
|
92
|
-
*/
|
|
93
|
-
//#endregion
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Generated bundle index. Do not edit.
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
export { WattBreakpoint, WattBreakpointsObserver };
|
|
100
|
-
//# sourceMappingURL=energinet-watt-core-breakpoints.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-core-breakpoints.mjs","sources":["../../../libs/watt/package/core/breakpoints/breakpoints.ts","../../../libs/watt/package/core/breakpoints/breakpoints-observer.ts","../../../libs/watt/package/core/breakpoints/index.ts","../../../libs/watt/package/core/breakpoints/energinet-watt-core-breakpoints.ts"],"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\n/**\n * NOTE: Keep in sync with ./_breakpoints.scss\n * NOTE: We don't use CSS Custom Properties for our breakpoints,\n * because they can't be used in media queries and we don't want those changed on the fly\n */\nexport const WattBreakpoint = {\n XSmall: '(max-width: 599.98px)' as const,\n Small: '(min-width: 600px) and (max-width: 959.98px)' as const,\n Medium: '(min-width: 960px) and (max-width: 1279.98px)' as const,\n Large: '(min-width: 1280px) and (max-width: 1919.98px)' as const,\n XLarge: '(min-width: 1920px)' as const,\n};\n\nexport type WattBreakpointType = keyof typeof WattBreakpoint;\n","//#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 { BreakpointObserver } from '@angular/cdk/layout';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { WattBreakpoint, WattBreakpointType } from './breakpoints';\n\nexport interface WattBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WattBreakpointsObserver {\n constructor(private breakpointObserver: BreakpointObserver) {}\n\n observe(breakpoints: WattBreakpointType | WattBreakpointType[]): Observable<WattBreakpointState> {\n if (Array.isArray(breakpoints)) {\n return this.breakpointObserver.observe(breakpoints.map((bp) => WattBreakpoint[bp]));\n }\n return this.breakpointObserver.observe(WattBreakpoint[breakpoints]);\n }\n\n isMatched(breakpoint: WattBreakpointType): boolean {\n return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);\n }\n}\n","//#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 { WattBreakpointsObserver, WattBreakpointState } from './breakpoints-observer';\nexport { WattBreakpoint } from './breakpoints';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AAC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C;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import * as i1 from '@energinet/watt/utils/css';
|
|
4
|
-
|
|
5
|
-
//#region License
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
9
|
-
*
|
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
11
|
-
* you may not use this file except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/
|
|
22
|
-
//#endregion
|
|
23
|
-
const WattColor = {
|
|
24
|
-
// Primary
|
|
25
|
-
primary: '--watt-color-primary',
|
|
26
|
-
primaryLight: '--watt-color-primary-light',
|
|
27
|
-
primaryDark: '--watt-color-primary-dark',
|
|
28
|
-
primaryDarker: '--watt-color-primary-darker',
|
|
29
|
-
primaryUltralight: '--watt-color-primary-ultralight',
|
|
30
|
-
// Secondary
|
|
31
|
-
secondary: '--watt-color-secondary',
|
|
32
|
-
secondaryLight: '--watt-color-secondary-light',
|
|
33
|
-
secondaryDark: '--watt-color-secondary-dark',
|
|
34
|
-
secondaryUltralight: '--watt-color-secondary-ultralight',
|
|
35
|
-
// Data Visualization
|
|
36
|
-
data1: '--watt-color-data-1',
|
|
37
|
-
data2: '--watt-color-data-2',
|
|
38
|
-
data3: '--watt-color-data-3',
|
|
39
|
-
// Neutrals
|
|
40
|
-
black: '--watt-color-neutral-black',
|
|
41
|
-
white: '--watt-color-neutral-white',
|
|
42
|
-
grey50: '--watt-color-neutral-grey-50',
|
|
43
|
-
grey100: '--watt-color-neutral-grey-100',
|
|
44
|
-
grey200: '--watt-color-neutral-grey-200',
|
|
45
|
-
grey300: '--watt-color-neutral-grey-300',
|
|
46
|
-
grey400: '--watt-color-neutral-grey-400',
|
|
47
|
-
grey500: '--watt-color-neutral-grey-500',
|
|
48
|
-
grey600: '--watt-color-neutral-grey-600',
|
|
49
|
-
grey700: '--watt-color-neutral-grey-700',
|
|
50
|
-
grey800: '--watt-color-neutral-grey-800',
|
|
51
|
-
grey900: '--watt-color-neutral-grey-900',
|
|
52
|
-
// States
|
|
53
|
-
danger: '--watt-color-state-danger',
|
|
54
|
-
dangerLight: '--watt-color-state-danger-light',
|
|
55
|
-
warning: '--watt-color-state-warning',
|
|
56
|
-
warningLight: '--watt-color-state-warning-light',
|
|
57
|
-
success: '--watt-color-state-success',
|
|
58
|
-
successLight: '--watt-color-state-success-light',
|
|
59
|
-
info: '--watt-color-state-info',
|
|
60
|
-
infoLight: '--watt-color-state-info-light',
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
//#region License
|
|
64
|
-
/**
|
|
65
|
-
* @license
|
|
66
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
67
|
-
*
|
|
68
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
69
|
-
* you may not use this file except in compliance with the License.
|
|
70
|
-
* You may obtain a copy of the License at
|
|
71
|
-
*
|
|
72
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
73
|
-
*
|
|
74
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
75
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
76
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
77
|
-
* See the License for the specific language governing permissions and
|
|
78
|
-
* limitations under the License.
|
|
79
|
-
*/
|
|
80
|
-
//#endregion
|
|
81
|
-
class WattColorHelperService {
|
|
82
|
-
cssCustomPropertiesService;
|
|
83
|
-
colorContrastSuffix = 'contrast';
|
|
84
|
-
constructor(cssCustomPropertiesService) {
|
|
85
|
-
this.cssCustomPropertiesService = cssCustomPropertiesService;
|
|
86
|
-
}
|
|
87
|
-
getColor(color) {
|
|
88
|
-
return this.cssCustomPropertiesService.getPropertyValue(WattColor[color]);
|
|
89
|
-
}
|
|
90
|
-
getColorContrast(color) {
|
|
91
|
-
return this.cssCustomPropertiesService.getPropertyValue(`${WattColor[color]}-${this.colorContrastSuffix}`);
|
|
92
|
-
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattColorHelperService, deps: [{ token: i1.WattCssCustomPropertiesService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
94
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattColorHelperService, providedIn: 'root' });
|
|
95
|
-
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattColorHelperService, decorators: [{
|
|
97
|
-
type: Injectable,
|
|
98
|
-
args: [{
|
|
99
|
-
providedIn: 'root',
|
|
100
|
-
}]
|
|
101
|
-
}], ctorParameters: () => [{ type: i1.WattCssCustomPropertiesService }] });
|
|
102
|
-
|
|
103
|
-
//#region License
|
|
104
|
-
/**
|
|
105
|
-
* @license
|
|
106
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
107
|
-
*
|
|
108
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
109
|
-
* you may not use this file except in compliance with the License.
|
|
110
|
-
* You may obtain a copy of the License at
|
|
111
|
-
*
|
|
112
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
113
|
-
*
|
|
114
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
115
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
116
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
117
|
-
* See the License for the specific language governing permissions and
|
|
118
|
-
* limitations under the License.
|
|
119
|
-
*/
|
|
120
|
-
//#endregion
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Generated bundle index. Do not edit.
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
export { WattColor, WattColorHelperService };
|
|
127
|
-
//# sourceMappingURL=energinet-watt-core-color.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-core-color.mjs","sources":["../../../libs/watt/package/core/color/colors.ts","../../../libs/watt/package/core/color/color-helper.service.ts","../../../libs/watt/package/core/color/index.ts","../../../libs/watt/package/core/color/energinet-watt-core-color.ts"],"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 const WattColor = {\n // Primary\n primary: '--watt-color-primary' as const,\n primaryLight: '--watt-color-primary-light' as const,\n primaryDark: '--watt-color-primary-dark' as const,\n primaryDarker: '--watt-color-primary-darker' as const,\n primaryUltralight: '--watt-color-primary-ultralight' as const,\n // Secondary\n secondary: '--watt-color-secondary' as const,\n secondaryLight: '--watt-color-secondary-light' as const,\n secondaryDark: '--watt-color-secondary-dark' as const,\n secondaryUltralight: '--watt-color-secondary-ultralight' as const,\n // Data Visualization\n data1: '--watt-color-data-1' as const,\n data2: '--watt-color-data-2' as const,\n data3: '--watt-color-data-3' as const,\n // Neutrals\n black: '--watt-color-neutral-black' as const,\n white: '--watt-color-neutral-white' as const,\n grey50: '--watt-color-neutral-grey-50' as const,\n grey100: '--watt-color-neutral-grey-100' as const,\n grey200: '--watt-color-neutral-grey-200' as const,\n grey300: '--watt-color-neutral-grey-300' as const,\n grey400: '--watt-color-neutral-grey-400' as const,\n grey500: '--watt-color-neutral-grey-500' as const,\n grey600: '--watt-color-neutral-grey-600' as const,\n grey700: '--watt-color-neutral-grey-700' as const,\n grey800: '--watt-color-neutral-grey-800' as const,\n grey900: '--watt-color-neutral-grey-900' as const,\n // States\n danger: '--watt-color-state-danger' as const,\n dangerLight: '--watt-color-state-danger-light' as const,\n warning: '--watt-color-state-warning' as const,\n warningLight: '--watt-color-state-warning-light' as const,\n success: '--watt-color-state-success' as const,\n successLight: '--watt-color-state-success-light' as const,\n info: '--watt-color-state-info' as const,\n infoLight: '--watt-color-state-info-light' as const,\n};\n\nexport type WattColorType = keyof typeof WattColor;\n","//#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\nimport { WattCssCustomPropertiesService } from '@energinet/watt/utils/css';\nimport { WattColor, WattColorType } from './colors';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattColorHelperService {\n private colorContrastSuffix = 'contrast';\n\n constructor(private cssCustomPropertiesService: WattCssCustomPropertiesService) {}\n\n public getColor(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(WattColor[color]);\n }\n\n public getColorContrast(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(\n `${WattColor[color]}-${this.colorContrastSuffix}`\n );\n }\n}\n","//#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 { WattColor } from './colors';\nexport { WattColorHelperService } from './color-helper.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACO,MAAM,SAAS,GAAG;;AAEvB,IAAA,OAAO,EAAE,sBAA+B;AACxC,IAAA,YAAY,EAAE,4BAAqC;AACnD,IAAA,WAAW,EAAE,2BAAoC;AACjD,IAAA,aAAa,EAAE,6BAAsC;AACrD,IAAA,iBAAiB,EAAE,iCAA0C;;AAE7D,IAAA,SAAS,EAAE,wBAAiC;AAC5C,IAAA,cAAc,EAAE,8BAAuC;AACvD,IAAA,aAAa,EAAE,6BAAsC;AACrD,IAAA,mBAAmB,EAAE,mCAA4C;;AAEjE,IAAA,KAAK,EAAE,qBAA8B;AACrC,IAAA,KAAK,EAAE,qBAA8B;AACrC,IAAA,KAAK,EAAE,qBAA8B;;AAErC,IAAA,KAAK,EAAE,4BAAqC;AAC5C,IAAA,KAAK,EAAE,4BAAqC;AAC5C,IAAA,MAAM,EAAE,8BAAuC;AAC/C,IAAA,OAAO,EAAE,+BAAwC;AACjD,IAAA,OAAO,EAAE,+BAAwC;AACjD,IAAA,OAAO,EAAE,+BAAwC;AACjD,IAAA,OAAO,EAAE,+BAAwC;AACjD,IAAA,OAAO,EAAE,+BAAwC;AACjD,IAAA,OAAO,EAAE,+BAAwC;AACjD,IAAA,OAAO,EAAE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