@energinet/watt 4.2.4 → 4.2.6
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/esm2022/badge/watt-badge.component.js +3 -3
- package/esm2022/badge/watt-badge.component.js.map +1 -1
- package/esm2022/breadcrumbs/watt-breadcrumbs.component.js +6 -6
- package/esm2022/breadcrumbs/watt-breadcrumbs.component.js.map +1 -1
- package/esm2022/button/watt-button.component.js +3 -3
- package/esm2022/button/watt-button.component.js.map +1 -1
- package/esm2022/card/watt-card-title.component.js +3 -3
- package/esm2022/card/watt-card-title.component.js.map +1 -1
- package/esm2022/card/watt-card.component.js +3 -3
- package/esm2022/card/watt-card.component.js.map +1 -1
- package/esm2022/checkbox/watt-checkbox.component.js +3 -3
- package/esm2022/checkbox/watt-checkbox.component.js.map +1 -1
- package/esm2022/chip/watt-action-chip.component.js +3 -3
- package/esm2022/chip/watt-action-chip.component.js.map +1 -1
- package/esm2022/chip/watt-chip.component.js +3 -3
- package/esm2022/chip/watt-chip.component.js.map +1 -1
- package/esm2022/chip/watt-chip.directive.js +3 -3
- package/esm2022/chip/watt-chip.directive.js.map +1 -1
- package/esm2022/chip/watt-date-chip.component.js +3 -3
- package/esm2022/chip/watt-date-chip.component.js.map +1 -1
- package/esm2022/chip/watt-date-range-chip.component.js +6 -6
- package/esm2022/chip/watt-date-range-chip.component.js.map +1 -1
- package/esm2022/chip/watt-filter-chip.component.js +3 -3
- package/esm2022/chip/watt-filter-chip.component.js.map +1 -1
- package/esm2022/chip/watt-menu-chip.component.js +3 -3
- package/esm2022/chip/watt-menu-chip.component.js.map +1 -1
- package/esm2022/clipboard/watt-clipboard-intl.service.js +3 -3
- package/esm2022/clipboard/watt-clipboard-intl.service.js.map +1 -1
- package/esm2022/clipboard/watt-copy-to-clipboard.directive.js +3 -3
- package/esm2022/clipboard/watt-copy-to-clipboard.directive.js.map +1 -1
- package/esm2022/code/watt-code-intl.service.js +3 -3
- package/esm2022/code/watt-code-intl.service.js.map +1 -1
- package/esm2022/code/watt-code.component.js +3 -3
- package/esm2022/code/watt-code.component.js.map +1 -1
- package/esm2022/core/breakpoints/breakpoints-observer.js +3 -3
- package/esm2022/core/breakpoints/breakpoints-observer.js.map +1 -1
- package/esm2022/core/color/color-helper.service.js +3 -3
- package/esm2022/core/color/color-helper.service.js.map +1 -1
- package/esm2022/core/date/watt-date.pipe.js +3 -3
- package/esm2022/core/date/watt-date.pipe.js.map +1 -1
- package/esm2022/core/date/watt-locale.service.js +3 -3
- package/esm2022/core/date/watt-locale.service.js.map +1 -1
- package/esm2022/data/watt-data-actions.component.js +3 -3
- package/esm2022/data/watt-data-actions.component.js.map +1 -1
- package/esm2022/data/watt-data-filters.component.js +3 -3
- package/esm2022/data/watt-data-filters.component.js.map +1 -1
- package/esm2022/data/watt-data-intl.service.js +3 -3
- package/esm2022/data/watt-data-intl.service.js.map +1 -1
- package/esm2022/data/watt-data-table.component.js +3 -3
- package/esm2022/data/watt-data-table.component.js.map +1 -1
- package/esm2022/datetime-field/watt-datetime-field.component.js +3 -3
- package/esm2022/datetime-field/watt-datetime-field.component.js.map +1 -1
- package/esm2022/description-list/watt-description-list-item.component.js +3 -3
- package/esm2022/description-list/watt-description-list-item.component.js.map +1 -1
- package/esm2022/description-list/watt-description-list.component.js +3 -3
- package/esm2022/description-list/watt-description-list.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-actions.component.js +3 -3
- package/esm2022/drawer/watt-drawer-actions.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-content.component.js +3 -3
- package/esm2022/drawer/watt-drawer-content.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-heading.component.js +3 -3
- package/esm2022/drawer/watt-drawer-heading.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-topbar.component.js +3 -3
- package/esm2022/drawer/watt-drawer-topbar.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer.component.js +3 -3
- package/esm2022/drawer/watt-drawer.component.js.map +1 -1
- package/esm2022/dropdown/watt-dropdown.component.js +3 -3
- package/esm2022/dropdown/watt-dropdown.component.js.map +1 -1
- package/esm2022/dropzone/watt-dropzone-intl.js +3 -3
- package/esm2022/dropzone/watt-dropzone-intl.js.map +1 -1
- package/esm2022/dropzone/watt-dropzone-validators.js +6 -6
- package/esm2022/dropzone/watt-dropzone-validators.js.map +1 -1
- package/esm2022/dropzone/watt-dropzone.js +3 -3
- package/esm2022/dropzone/watt-dropzone.js.map +1 -1
- package/esm2022/empty-state/icons/explore.js +3 -3
- package/esm2022/empty-state/icons/explore.js.map +1 -1
- package/esm2022/empty-state/icons/no-results.js +3 -3
- package/esm2022/empty-state/icons/no-results.js.map +1 -1
- package/esm2022/empty-state/icons/not-found.js +3 -3
- package/esm2022/empty-state/icons/not-found.js.map +1 -1
- package/esm2022/empty-state/icons/power.js +3 -3
- package/esm2022/empty-state/icons/power.js.map +1 -1
- package/esm2022/empty-state/watt-empty-state.component.js +3 -3
- package/esm2022/empty-state/watt-empty-state.component.js.map +1 -1
- package/esm2022/expandable-card/watt-expandable-card.component.js +9 -9
- package/esm2022/expandable-card/watt-expandable-card.component.js.map +1 -1
- package/esm2022/field/watt-field-error.component.js +3 -3
- package/esm2022/field/watt-field-error.component.js.map +1 -1
- package/esm2022/field/watt-field-hint.component.js +3 -3
- package/esm2022/field/watt-field-hint.component.js.map +1 -1
- package/esm2022/field/watt-field-intl.service.js +3 -3
- package/esm2022/field/watt-field-intl.service.js.map +1 -1
- package/esm2022/field/watt-field-warning.component.js +3 -3
- package/esm2022/field/watt-field-warning.component.js.map +1 -1
- package/esm2022/field/watt-field.component.js +3 -3
- package/esm2022/field/watt-field.component.js.map +1 -1
- package/esm2022/file-field/watt-file-field.component.js +3 -3
- package/esm2022/file-field/watt-file-field.component.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-ch.js +3 -3
- package/esm2022/icon/flags/watt-flag-ch.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-de.js +3 -3
- package/esm2022/icon/flags/watt-flag-de.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-dk.js +3 -3
- package/esm2022/icon/flags/watt-flag-dk.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-fi.js +3 -3
- package/esm2022/icon/flags/watt-flag-fi.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-gb.js +3 -3
- package/esm2022/icon/flags/watt-flag-gb.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-nl.js +3 -3
- package/esm2022/icon/flags/watt-flag-nl.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-no.js +3 -3
- package/esm2022/icon/flags/watt-flag-no.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-pl.js +3 -3
- package/esm2022/icon/flags/watt-flag-pl.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-se.js +3 -3
- package/esm2022/icon/flags/watt-flag-se.js.map +1 -1
- package/esm2022/icon/flags/watt-flag.js +3 -3
- package/esm2022/icon/flags/watt-flag.js.map +1 -1
- package/esm2022/icon/icon.component.js +3 -3
- package/esm2022/icon/icon.component.js.map +1 -1
- package/esm2022/menu/watt-menu-group.component.js +3 -3
- package/esm2022/menu/watt-menu-group.component.js.map +1 -1
- package/esm2022/menu/watt-menu-item.component.js +3 -3
- package/esm2022/menu/watt-menu-item.component.js.map +1 -1
- package/esm2022/menu/watt-menu-trigger.directive.js +3 -3
- package/esm2022/menu/watt-menu-trigger.directive.js.map +1 -1
- package/esm2022/menu/watt-menu.component.js +3 -3
- package/esm2022/menu/watt-menu.component.js.map +1 -1
- package/esm2022/modal/watt-modal.component.js +6 -6
- package/esm2022/modal/watt-modal.component.js.map +1 -1
- package/esm2022/modal/watt-modal.service.js +3 -3
- package/esm2022/modal/watt-modal.service.js.map +1 -1
- package/esm2022/paginator/watt-paginator-intl.service.js +3 -3
- package/esm2022/paginator/watt-paginator-intl.service.js.map +1 -1
- package/esm2022/paginator/watt-paginator.component.js +3 -3
- package/esm2022/paginator/watt-paginator.component.js.map +1 -1
- package/esm2022/phone-field/watt-phone-field-intl.service.js +3 -3
- package/esm2022/phone-field/watt-phone-field-intl.service.js.map +1 -1
- package/esm2022/phone-field/watt-phone-field.component.js +3 -3
- package/esm2022/phone-field/watt-phone-field.component.js.map +1 -1
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js +3 -3
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js.map +1 -1
- package/esm2022/picker/__shared/watt-picker-base.js +3 -3
- package/esm2022/picker/__shared/watt-picker-base.js.map +1 -1
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js +3 -3
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js.map +1 -1
- package/esm2022/picker/datepicker/watt-datepicker.component.js +3 -3
- package/esm2022/picker/datepicker/watt-datepicker.component.js.map +1 -1
- package/esm2022/picker/timepicker/watt-timepicker.component.js +3 -3
- package/esm2022/picker/timepicker/watt-timepicker.component.js.map +1 -1
- package/esm2022/progress-tracker/watt-progress-tracker-step.component.js +3 -3
- package/esm2022/progress-tracker/watt-progress-tracker-step.component.js.map +1 -1
- package/esm2022/progress-tracker/watt-progress-tracker.component.js +3 -3
- package/esm2022/progress-tracker/watt-progress-tracker.component.js.map +1 -1
- package/esm2022/query-params/watt-query-params.directive.js +3 -3
- package/esm2022/query-params/watt-query-params.directive.js.map +1 -1
- package/esm2022/radio/watt-radio-group.component.js +3 -3
- package/esm2022/radio/watt-radio-group.component.js.map +1 -1
- package/esm2022/radio/watt-radio.component.js +3 -3
- package/esm2022/radio/watt-radio.component.js.map +1 -1
- package/esm2022/search/watt-search.component.js +3 -3
- package/esm2022/search/watt-search.component.js.map +1 -1
- package/esm2022/segmented-buttons/watt-segmented-button.component.js +3 -3
- package/esm2022/segmented-buttons/watt-segmented-button.component.js.map +1 -1
- package/esm2022/segmented-buttons/watt-segmented-buttons.component.js +3 -3
- package/esm2022/segmented-buttons/watt-segmented-buttons.component.js.map +1 -1
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js +3 -3
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js.map +1 -1
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js +3 -3
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js.map +1 -1
- package/esm2022/shell/nav-list/watt-nav-list.component.js +3 -3
- package/esm2022/shell/nav-list/watt-nav-list.component.js.map +1 -1
- package/esm2022/shell/shell.component.js +3 -3
- package/esm2022/shell/shell.component.js.map +1 -1
- package/esm2022/slide-toggle/watt-slide-toggle.component.js +3 -3
- package/esm2022/slide-toggle/watt-slide-toggle.component.js.map +1 -1
- package/esm2022/slider/watt-slider.component.js +3 -3
- package/esm2022/slider/watt-slider.component.js.map +1 -1
- package/esm2022/spinner/watt-spinner.component.js +3 -3
- package/esm2022/spinner/watt-spinner.component.js.map +1 -1
- package/esm2022/stepper/watt-stepper-step.component.js +3 -3
- package/esm2022/stepper/watt-stepper-step.component.js.map +1 -1
- package/esm2022/stepper/watt-stepper.component.js +3 -3
- package/esm2022/stepper/watt-stepper.component.js.map +1 -1
- package/esm2022/table/watt-table.component.js +9 -9
- package/esm2022/table/watt-table.component.js.map +1 -1
- package/esm2022/tabs/watt-link-tab.component.js +3 -3
- package/esm2022/tabs/watt-link-tab.component.js.map +1 -1
- package/esm2022/tabs/watt-link-tabs.component.js +3 -3
- package/esm2022/tabs/watt-link-tabs.component.js.map +1 -1
- package/esm2022/tabs/watt-tab.component.js +3 -3
- package/esm2022/tabs/watt-tab.component.js.map +1 -1
- package/esm2022/tabs/watt-tabs-action.component.js +3 -3
- package/esm2022/tabs/watt-tabs-action.component.js.map +1 -1
- package/esm2022/tabs/watt-tabs.component.js +3 -3
- package/esm2022/tabs/watt-tabs.component.js.map +1 -1
- package/esm2022/text-field/watt-text-field.component.js +3 -3
- package/esm2022/text-field/watt-text-field.component.js.map +1 -1
- package/esm2022/textarea-field/watt-textarea-field.component.js +3 -3
- package/esm2022/textarea-field/watt-textarea-field.component.js.map +1 -1
- package/esm2022/toast/watt-toast.component.js +3 -3
- package/esm2022/toast/watt-toast.component.js.map +1 -1
- package/esm2022/toast/watt-toast.service.js +3 -3
- package/esm2022/toast/watt-toast.service.js.map +1 -1
- package/esm2022/tooltip/watt-tooltip.component.js +3 -3
- package/esm2022/tooltip/watt-tooltip.component.js.map +1 -1
- package/esm2022/tooltip/watt-tooltip.directive.js +3 -3
- package/esm2022/tooltip/watt-tooltip.directive.js.map +1 -1
- package/esm2022/utils/css/css-custom-properties.service.js +3 -3
- package/esm2022/utils/css/css-custom-properties.service.js.map +1 -1
- package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js +3 -3
- package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js.map +1 -1
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js +3 -3
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js.map +1 -1
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js +3 -3
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js.map +1 -1
- package/esm2022/validation-message/watt-validation-message.component.js +3 -3
- package/esm2022/validation-message/watt-validation-message.component.js.map +1 -1
- package/esm2022/vater/vater-flex.component.js +3 -3
- package/esm2022/vater/vater-flex.component.js.map +1 -1
- package/esm2022/vater/vater-layout.directive.js +3 -3
- package/esm2022/vater/vater-layout.directive.js.map +1 -1
- package/esm2022/vater/vater-spacer.component.js +3 -3
- package/esm2022/vater/vater-spacer.component.js.map +1 -1
- package/esm2022/vater/vater-stack.component.js +3 -3
- package/esm2022/vater/vater-stack.component.js.map +1 -1
- package/esm2022/vater/vater-utility.directive.js +3 -3
- package/esm2022/vater/vater-utility.directive.js.map +1 -1
- package/esm2022/year-field/watt-year-field.component.js +3 -3
- package/esm2022/year-field/watt-year-field.component.js.map +1 -1
- package/esm2022/yearmonth-field/watt-yearmonth-field.component.js +3 -3
- package/esm2022/yearmonth-field/watt-yearmonth-field.component.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-text-field.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/text-field/watt-text-field.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,UAAU,EAEV,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAY,MAAM,sBAAsB,CAAC;;;;AAoEnE,MAAM,OAAO,sBAAsB;IACjC,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC,CAAC;IAClB,IAAI,GAAG,KAAK,CAAiB,MAAM,gDAAC,CAAC;IACrC,WAAW,GAAG,KAAK,CAAC,EAAE,uDAAC,CAAC;IACxB,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC,CAAC;IAClB,OAAO,GAAG,KAAK,CAAC,EAAE,mDAAC,CAAC;IACpB,MAAM,GAAG,KAAK,4DAAY,CAAC;IAC3B,IAAI,GAAG,KAAK,CAAyB,IAAI,gDAAC,CAAC;IAC3C,SAAS,GAAG,KAAK,CAAyB,IAAI,qDAAC,CAAC;IAChD,WAAW,GAAG,KAAK,CAAC,QAAQ,sDAAe,CAAC;IAC5C,mBAAmB,GAAG,KAAK,CAAW,EAAE,+DAAC,CAAC;IAC1C,qBAAqB,GAAG,KAAK,2EAA8C,CAAC;IAC5E,UAAU,GAAG,KAAK,CAAC,IAAI,sDAAC,CAAC;IAEzB;;OAEG;IACH,SAAS,GAAG,KAAK,CAAC,KAAK,qDAAC,CAAC;IAEzB,cAAc;IACd,eAAe,GAAG,SAAS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I,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC;IAED,cAAc;IACd,gBAAgB,CAAC,UAAmB;QAClC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;uGApHU,sBAAsB;2FAAtB,sBAAsB,o/DAxDtB;YACT;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;gBACrD,KAAK,EAAE,IAAI;aACZ;SACF,2EAsEoC,eAAe,2KArE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CT,uTA7DS,qBAAqB,y9BAAE,mBAAmB,6uBAAE,kBAAkB,yLAAE,iBAAiB;;2FA+DhF,sBAAsB;kBAhElC,SAAS;8BACC,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,YAClF,iBAAiB,iBAEZ,iBAAiB,CAAC,IAAI,QAC/B;wBACJ,4BAA4B,EAAE,cAAc;qBAC7C,aACU;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,uBAAuB,CAAC;4BACrD,KAAK,EAAE,IAAI;yBACZ;qBACF,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CT;k2CAsBoC,eAAe,0TAqBU,YAAY","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n ElementRef,\n forwardRef,\n AfterViewInit,\n inject,\n input,\n output,\n viewChild,\n signal,\n linkedSignal,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattIconComponent, WattIcon } from '@energinet/watt/icon';\n\nexport type WattInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';\n\n@Component({\n imports: [MatAutocompleteModule, ReactiveFormsModule, WattFieldComponent, WattIconComponent],\n selector: 'watt-text-field',\n styleUrls: ['./watt-text-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.watt-field-disabled]': 'isDisabled()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattTextFieldComponent),\n multi: true,\n },\n ],\n template: `\n <watt-field\n #wattField\n [control]=\"formControl()\"\n [label]=\"label()\"\n [tooltip]=\"tooltip()\"\n [autoFocus]=\"autoFocus()\"\n matAutocompleteOrigin\n [showErrors]=\"showErrors()\"\n >\n @if (prefix()) {\n <watt-icon [name]=\"prefix()\" />\n }\n\n <input\n [attr.aria-label]=\"label()\"\n [attr.type]=\"type()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.size]=\"size()\"\n [value]=\"model()\"\n [formControl]=\"formControl()\"\n (blur)=\"onTouched()\"\n (input)=\"onChanged($event)\"\n [maxlength]=\"maxLength()\"\n [matAutocomplete]=\"auto\"\n [matAutocompleteDisabled]=\"!autocompleteOptions()\"\n [matAutocompleteConnectedTo]=\"{ elementRef: wattField.wrapper() ?? wattField.elementRef }\"\n #inputField\n />\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n class=\"watt-autocomplete-panel\"\n (optionSelected)=\"autocompleteOptionSelected.emit($event.option.value)\"\n >\n @for (option of autocompleteOptions(); track option) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-descriptor\" select=\".descriptor\" />\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 WattTextFieldComponent implements ControlValueAccessor, AfterViewInit {\n value = input('');\n type = input<WattInputTypes>('text');\n placeholder = input('');\n label = input('');\n tooltip = input('');\n prefix = input<WattIcon>();\n size = input<string | number | null>(null);\n maxLength = input<string | number | null>(null);\n formControl = input.required<FormControl>();\n autocompleteOptions = input<string[]>([]);\n autocompleteMatcherFn = input<(value: string, option: string) => boolean>();\n showErrors = input(true);\n\n /**\n * Whether the input should receive focus when the component is rendered.\n */\n autoFocus = input(false);\n\n /** @ignore */\n autocompleteRef = viewChild.required(MatAutocomplete);\n\n /**\n * Emits the value of the input field when it changes.\n */\n searchChanged = output<string>();\n\n /**\n * Emits the value of the input field when an autocomplete option is selected.\n */\n autocompleteOptionSelected = output<string>();\n\n /**\n * Emits the value of the input field when an autocomplete option is selected.\n */\n autocompleteOptionDeselected = output<void>();\n\n /** @ignore */\n private readonly element = inject(ElementRef);\n\n /** @ignore */\n inputField = viewChild.required<ElementRef<HTMLInputElement>>('inputField');\n model = linkedSignal(this.value);\n\n /** @ignore */\n isDisabled = signal(false);\n\n /** @ignore */\n onTouchedCallbacks: (() => void)[] = [];\n\n /** @ignore */\n ngAfterViewInit(): void {\n const attrName = 'data-testid';\n const testIdAttribute = this.element.nativeElement.getAttribute(attrName);\n this.element.nativeElement.removeAttribute(attrName);\n\n this.inputField().nativeElement.setAttribute(attrName, testIdAttribute);\n this.registerOnTouched(() => {\n const trimmedValue = this.inputField().nativeElement.value.trim();\n this.inputField().nativeElement.value = trimmedValue;\n this.formControl().setValue(trimmedValue);\n });\n }\n\n /** @ignore */\n onChanged(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n\n // Reset the autocomplete selection if the value is not matching anymore, and auto-select if the value has a match\n this.autocompleteRef().options.forEach((option) => {\n const matcherFn = this.autocompleteMatcherFn();\n const isMatchingOption = matcherFn ? matcherFn(value, option.value) : option.value === value;\n\n if (isMatchingOption) {\n option.select(false);\n this.autocompleteOptionSelected.emit(option.value);\n } else {\n option.deselect(false);\n this.autocompleteOptionDeselected.emit();\n }\n });\n\n this.searchChanged.emit(value);\n this.onChange(value);\n }\n\n /** @ignore */\n onChange: (value: string) => void = () => {\n /* noop function */\n };\n\n /** @ignore */\n onTouched: () => void = () => {\n for (const callback of this.onTouchedCallbacks) {\n callback();\n }\n };\n\n /** @ignore */\n writeValue(value: string): void {\n this.model.set(value);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouchedCallbacks.push(fn);\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"watt-text-field.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/text-field/watt-text-field.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,UAAU,EAEV,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAGL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAY,MAAM,sBAAsB,CAAC;;;;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;kBAhElC,SAAS;8BACC,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,YAClF,iBAAiB,iBAEZ,iBAAiB,CAAC,IAAI,QAC/B;wBACJ,4BAA4B,EAAE,cAAc;qBAC7C,aACU;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,uBAAuB,CAAC;4BACrD,KAAK,EAAE,IAAI;yBACZ;qBACF,YACS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CT;k2CAsBoC,eAAe,0TAqBU,YAAY","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n ElementRef,\n forwardRef,\n AfterViewInit,\n inject,\n input,\n output,\n viewChild,\n signal,\n linkedSignal,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MatAutocomplete, MatAutocompleteModule } from '@angular/material/autocomplete';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattIconComponent, WattIcon } from '@energinet/watt/icon';\n\nexport type WattInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';\n\n@Component({\n imports: [MatAutocompleteModule, ReactiveFormsModule, WattFieldComponent, WattIconComponent],\n selector: 'watt-text-field',\n styleUrls: ['./watt-text-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.watt-field-disabled]': 'isDisabled()',\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattTextFieldComponent),\n multi: true,\n },\n ],\n template: `\n <watt-field\n #wattField\n [control]=\"formControl()\"\n [label]=\"label()\"\n [tooltip]=\"tooltip()\"\n [autoFocus]=\"autoFocus()\"\n matAutocompleteOrigin\n [showErrors]=\"showErrors()\"\n >\n @if (prefix()) {\n <watt-icon [name]=\"prefix()\" />\n }\n\n <input\n [attr.aria-label]=\"label()\"\n [attr.type]=\"type()\"\n [attr.placeholder]=\"placeholder()\"\n [attr.size]=\"size()\"\n [value]=\"model()\"\n [formControl]=\"formControl()\"\n (blur)=\"onTouched()\"\n (input)=\"onChanged($event)\"\n [maxlength]=\"maxLength()\"\n [matAutocomplete]=\"auto\"\n [matAutocompleteDisabled]=\"!autocompleteOptions()\"\n [matAutocompleteConnectedTo]=\"{ elementRef: wattField.wrapper() ?? wattField.elementRef }\"\n #inputField\n />\n\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n class=\"watt-autocomplete-panel\"\n (optionSelected)=\"autocompleteOptionSelected.emit($event.option.value)\"\n >\n @for (option of autocompleteOptions(); track option) {\n <mat-option [value]=\"option\">\n {{ option }}\n </mat-option>\n }\n </mat-autocomplete>\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-descriptor\" select=\".descriptor\" />\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 WattTextFieldComponent implements ControlValueAccessor, AfterViewInit {\n value = input('');\n type = input<WattInputTypes>('text');\n placeholder = input('');\n label = input('');\n tooltip = input('');\n prefix = input<WattIcon>();\n size = input<string | number | null>(null);\n maxLength = input<string | number | null>(null);\n formControl = input.required<FormControl>();\n autocompleteOptions = input<string[]>([]);\n autocompleteMatcherFn = input<(value: string, option: string) => boolean>();\n showErrors = input(true);\n\n /**\n * Whether the input should receive focus when the component is rendered.\n */\n autoFocus = input(false);\n\n /** @ignore */\n autocompleteRef = viewChild.required(MatAutocomplete);\n\n /**\n * Emits the value of the input field when it changes.\n */\n searchChanged = output<string>();\n\n /**\n * Emits the value of the input field when an autocomplete option is selected.\n */\n autocompleteOptionSelected = output<string>();\n\n /**\n * Emits the value of the input field when an autocomplete option is selected.\n */\n autocompleteOptionDeselected = output<void>();\n\n /** @ignore */\n private readonly element = inject(ElementRef);\n\n /** @ignore */\n inputField = viewChild.required<ElementRef<HTMLInputElement>>('inputField');\n model = linkedSignal(this.value);\n\n /** @ignore */\n isDisabled = signal(false);\n\n /** @ignore */\n onTouchedCallbacks: (() => void)[] = [];\n\n /** @ignore */\n ngAfterViewInit(): void {\n const attrName = 'data-testid';\n const testIdAttribute = this.element.nativeElement.getAttribute(attrName);\n this.element.nativeElement.removeAttribute(attrName);\n\n this.inputField().nativeElement.setAttribute(attrName, testIdAttribute);\n this.registerOnTouched(() => {\n const trimmedValue = this.inputField().nativeElement.value.trim();\n this.inputField().nativeElement.value = trimmedValue;\n this.formControl().setValue(trimmedValue);\n });\n }\n\n /** @ignore */\n onChanged(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n\n // Reset the autocomplete selection if the value is not matching anymore, and auto-select if the value has a match\n this.autocompleteRef().options.forEach((option) => {\n const matcherFn = this.autocompleteMatcherFn();\n const isMatchingOption = matcherFn ? matcherFn(value, option.value) : option.value === value;\n\n if (isMatchingOption) {\n option.select(false);\n this.autocompleteOptionSelected.emit(option.value);\n } else {\n option.deselect(false);\n this.autocompleteOptionDeselected.emit();\n }\n });\n\n this.searchChanged.emit(value);\n this.onChange(value);\n }\n\n /** @ignore */\n onChange: (value: string) => void = () => {\n /* noop function */\n };\n\n /** @ignore */\n onTouched: () => void = () => {\n for (const callback of this.onTouchedCallbacks) {\n callback();\n }\n };\n\n /** @ignore */\n writeValue(value: string): void {\n this.model.set(value);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouchedCallbacks.push(fn);\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n}\n"]}
|
|
@@ -53,8 +53,8 @@ export class WattTextAreaFieldComponent {
|
|
|
53
53
|
setDisabledState(isDisabled) {
|
|
54
54
|
this.isDisabled.set(isDisabled);
|
|
55
55
|
}
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
57
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTextAreaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: WattTextAreaFieldComponent, isStandalone: true, selector: "watt-textarea-field", inputs: { formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, small: { classPropertyName: "small", publicName: "small", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.watt-field-disabled": "isDisabled()" } }, providers: [
|
|
58
58
|
{
|
|
59
59
|
provide: NG_VALUE_ACCESSOR,
|
|
60
60
|
useExisting: forwardRef(() => WattTextAreaFieldComponent),
|
|
@@ -73,7 +73,7 @@ export class WattTextAreaFieldComponent {
|
|
|
73
73
|
<ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
|
|
74
74
|
</watt-field>`, isInline: true, styles: ["watt-textarea-field{display:block;width:100%;--watt-textarea-min-height: 200px}watt-textarea-field[small]{--watt-textarea-min-height: 80px}watt-textarea-field textarea{border:none;width:100%;outline:none;padding:var(--watt-space-s);padding-left:0;background-color:transparent;min-height:var(--watt-textarea-min-height)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
75
75
|
}
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTextAreaFieldComponent, decorators: [{
|
|
77
77
|
type: Component,
|
|
78
78
|
args: [{ imports: [FormsModule, WattFieldComponent], providers: [
|
|
79
79
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-textarea-field.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/textarea-field/watt-textarea-field.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,UAAU,EACV,KAAK,EACL,KAAK,EACL,MAAM,EACN,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAqC,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnG,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;;AA8B3D,MAAM,OAAO,0BAA0B;IACrC,cAAc;IACN,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACrC,WAAW,GAAG,KAAK,CAAC,QAAQ,sDAAe,CAAC;IAC5C,WAAW,GAAG,KAAK,iEAAU,CAAC;IAC9B,QAAQ,GAAG,KAAK,CAAC,KAAK,oDAAC,CAAC;IACxB,SAAS,GAAG,KAAK,CAAyB,IAAI,qDAAC,CAAC;IAChD,KAAK,GAAG,KAAK,2DAAU,CAAC;IACxB,KAAK,GAAG,KAAK,CAAC,KAAK,yCAAI,SAAS,EAAE,gBAAgB,OAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC,CAAC;IAEtD,OAAO,CAAC,KAAY;QAClB,MAAM,MAAM,GAAG,KAAK,CAAC,MAA6B,CAAC;QACnD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,cAAc;IACd,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC,CAAC;IAE1B,cAAc;IACd,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC,CAAC;IAE3B,cAAc;IACd,UAAU,CAAC,KAAa;QACtB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED,cAAc;IACd,gBAAgB,CAAC,EAA2B;QAC1C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,cAAc;IACd,iBAAiB,CAAC,EAAc;QAC9B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,cAAc;IACd,gBAAgB,CAAC,UAAmB;QAClC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-textarea-field.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/textarea-field/watt-textarea-field.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;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c;IACd,iBAAiB,CAAC,EAAc;QAC9B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,cAAc;IACd,gBAAgB,CAAC,UAAmB;QAClC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;wGAvCU,0BAA0B;4FAA1B,0BAA0B,ujCA1B1B;YACT;gBACE,OAAO,EAAE,iBAAiB;gBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;gBACzD,KAAK,EAAE,IAAI;aACZ;SACF,0BAIS;;;;;;;;;;;gBAWI,0YAtBJ,WAAW,+BAAE,kBAAkB;;4FA2B9B,0BAA0B;kBA5BtC,SAAS;8BACC,CAAC,WAAW,EAAE,kBAAkB,CAAC,aAC/B;wBACT;4BACE,OAAO,EAAE,iBAAiB;4BAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,2BAA2B,CAAC;4BACzD,KAAK,EAAE,IAAI;yBACZ;qBACF,YACS,qBAAqB,iBAEhB,iBAAiB,CAAC,IAAI,YAC3B;;;;;;;;;;;gBAWI,QACR;wBACJ,4BAA4B,EAAE,cAAc;qBAC7C","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n forwardRef,\n ViewEncapsulation,\n inject,\n ElementRef,\n input,\n model,\n signal,\n booleanAttribute,\n} from '@angular/core';\nimport { ControlValueAccessor, FormControl, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\n\n@Component({\n imports: [FormsModule, WattFieldComponent],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattTextAreaFieldComponent),\n multi: true,\n },\n ],\n selector: 'watt-textarea-field',\n styleUrls: ['./watt-textarea-field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n template: `<watt-field [label]=\"label()\" [control]=\"formControl()\">\n <textarea\n [attr.placeholder]=\"placeholder()\"\n [value]=\"value()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.maxlength]=\"maxLength()\"\n (input)=\"onInput($event)\"\n ></textarea>\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 host: {\n '[attr.watt-field-disabled]': 'isDisabled()',\n },\n})\nexport class WattTextAreaFieldComponent implements ControlValueAccessor {\n /** @ignore */\n private element = inject(ElementRef);\n formControl = input.required<FormControl>();\n placeholder = input<string>();\n required = input(false);\n maxLength = input<string | number | null>(null);\n label = input<string>();\n small = input(false, { transform: booleanAttribute });\n\n onInput(event: Event) {\n const target = event.target as HTMLTextAreaElement;\n this.value.set(target.value);\n }\n\n /** @ignore */\n value = model<string>('');\n\n /** @ignore */\n isDisabled = signal(false);\n\n /** @ignore */\n writeValue(value: string): void {\n this.value.set(value);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string) => void): void {\n this.value.subscribe(fn);\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n}\n"]}
|
|
@@ -84,10 +84,10 @@ export class WattToastComponent {
|
|
|
84
84
|
.pipe(tap(() => this.onClose()), takeUntil(mouseEnter$), repeat({ delay: () => mouseLeave$ }))
|
|
85
85
|
.subscribe();
|
|
86
86
|
}
|
|
87
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
88
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
87
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
88
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattToastComponent, isStandalone: true, selector: "watt-toast", host: { properties: { "class": "this.class" } }, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<span>\n @if (config.type === \"loading\") {\n <watt-spinner [diameter]=\"24\" />\n }\n\n @if (config.type && config.type !== \"loading\") {\n <watt-icon [name]=\"config.type\" />\n }\n <p>{{ config.message }}</p>\n</span>\n<span class=\"toast__actions\">\n @if (config.action && config.actionLabel) {\n <watt-button variant=\"text\" (click)=\"config.action(matSnackBarRef)\">{{\n config.actionLabel\n }}</watt-button>\n }\n\n @if (config.type !== \"loading\") {\n <watt-button data-testid=\"dismiss\" variant=\"icon\" icon=\"close\" (click)=\"onClose()\" />\n }\n</span>\n", styles: [".watt-toast{display:flex;justify-content:space-between;align-items:center;background:var(--watt-color-neutral-white);border-left:6px solid transparent;box-shadow:0 var(--watt-space-m) var(--watt-space-m) #0003,0 32px 64px 3px #2e323433;border-radius:4px;padding:var(--watt-space-s) var(--watt-space-m);max-width:704px;min-height:4rem}.watt-toast--success{border-color:var(--watt-color-state-success)}.watt-toast--info{border-color:var(--watt-color-state-info)}.watt-toast--warning{border-color:var(--watt-color-state-warning)}.watt-toast--danger{border-color:var(--watt-color-state-danger)}.watt-toast span{display:flex;align-items:center}.watt-toast watt-icon,.watt-toast watt-spinner{margin-right:var(--watt-space-m)}.watt-toast watt-button .watt-button--text{text-transform:capitalize}.watt-toast p{margin:0 var(--watt-space-s) 0 0}\n"], dependencies: [{ kind: "ngmodule", type: MatSnackBarModule }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
89
89
|
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattToastComponent, decorators: [{
|
|
91
91
|
type: Component,
|
|
92
92
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, selector: 'watt-toast', imports: [MatSnackBarModule, WattButtonComponent, WattIconComponent, WattSpinnerComponent], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<span>\n @if (config.type === \"loading\") {\n <watt-spinner [diameter]=\"24\" />\n }\n\n @if (config.type && config.type !== \"loading\") {\n <watt-icon [name]=\"config.type\" />\n }\n <p>{{ config.message }}</p>\n</span>\n<span class=\"toast__actions\">\n @if (config.action && config.actionLabel) {\n <watt-button variant=\"text\" (click)=\"config.action(matSnackBarRef)\">{{\n config.actionLabel\n }}</watt-button>\n }\n\n @if (config.type !== \"loading\") {\n <watt-button data-testid=\"dismiss\" variant=\"icon\" icon=\"close\" (click)=\"onClose()\" />\n }\n</span>\n", styles: [".watt-toast{display:flex;justify-content:space-between;align-items:center;background:var(--watt-color-neutral-white);border-left:6px solid transparent;box-shadow:0 var(--watt-space-m) var(--watt-space-m) #0003,0 32px 64px 3px #2e323433;border-radius:4px;padding:var(--watt-space-s) var(--watt-space-m);max-width:704px;min-height:4rem}.watt-toast--success{border-color:var(--watt-color-state-success)}.watt-toast--info{border-color:var(--watt-color-state-info)}.watt-toast--warning{border-color:var(--watt-color-state-warning)}.watt-toast--danger{border-color:var(--watt-color-state-danger)}.watt-toast span{display:flex;align-items:center}.watt-toast watt-icon,.watt-toast watt-spinner{margin-right:var(--watt-space-m)}.watt-toast watt-button .watt-button--text{text-transform:capitalize}.watt-toast p{margin:0 var(--watt-space-s) 0 0}\n"] }]
|
|
93
93
|
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-toast.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/toast/watt-toast.component.ts","../../../../libs/watt/package/toast/watt-toast.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE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,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;QAC5C,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;YACnC,IAAI,CAAC,yBAAyB,CAAC,WAAW,EAAE,CAAC;QAC/C,CAAC;QACD,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACK,YAAY,CAAC,QAAQ,GAAG,IAAI;QAClC,4FAA4F;QAC5F,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO;QAE3C,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAC3E,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,QAAQ,CAAC;aAC7C,IAAI,CACH,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,EACzB,SAAS,CAAC,WAAW,CAAC,EACtB,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CACrC;aACA,SAAS,EAAE,CAAC;IACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-toast.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/toast/watt-toast.component.ts","../../../../libs/watt/package/toast/watt-toast.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,6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\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 ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { MatSnackBarModule, MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\nimport { fromEvent, repeat, Subscription, takeUntil, tap, timer } from 'rxjs';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nexport type WattToastType = 'success' | 'info' | 'warning' | 'danger' | 'loading';\n\nexport interface WattToastConfig {\n duration?: number;\n type?: WattToastType;\n message: string;\n action?: (wattToastRef: WattToastRef) => void;\n actionLabel?: string;\n}\n\nexport type WattToastRef = MatSnackBarRef<WattToastComponent>;\n\n/**\n * Usage:\n * `import { WattToastService } from '@energinet/watt/toast';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-toast',\n styleUrls: ['./watt-toast.component.scss'],\n templateUrl: './watt-toast.component.html',\n imports: [MatSnackBarModule, WattButtonComponent, WattIconComponent, WattSpinnerComponent],\n})\nexport class WattToastComponent {\n private _config = inject(MAT_SNACK_BAR_DATA);\n private cd = inject(ChangeDetectorRef);\n private _matSnackBarRef = inject<MatSnackBarRef<WattToastComponent>>(MatSnackBarRef);\n private elementRef = inject(ElementRef);\n\n @HostBinding('class')\n get class() {\n this.cd.detectChanges(); // Make sure changes to the config will be detected\n return this.config.type ? `watt-toast watt-toast--${this.config.type}` : 'watt-toast';\n }\n\n /**\n * @ignore\n */\n config: WattToastConfig;\n\n /**\n * @ignore\n */\n matSnackBarRef: WattToastRef;\n\n /**\n * @ignore\n */\n private dissmissToastSubscription?: Subscription;\n\n constructor() {\n this.config = this._config;\n this.matSnackBarRef = this._matSnackBarRef;\n this.initDuration(this.config.duration);\n }\n\n /**\n * @ignore\n */\n onClose(): void {\n if (!this.matSnackBarRef) return;\n this.matSnackBarRef.dismiss();\n this.dissmissToastSubscription?.unsubscribe();\n }\n\n update(config: Partial<WattToastConfig>) {\n this.config = { ...this.config, ...config };\n if (this.dissmissToastSubscription) {\n this.dissmissToastSubscription.unsubscribe();\n }\n this.initDuration();\n this.cd.detectChanges();\n }\n\n /**\n * @ignore\n * Ensure the toast won't get dismissed when the user hovers over it.\n */\n private initDuration(duration = 5000): void {\n // When the type is loading, the developer is responsible for dismissing the toast manually.\n if (this.config.type === 'loading') return;\n\n const mouseEnter$ = fromEvent(this.elementRef.nativeElement, 'mouseenter');\n const mouseLeave$ = fromEvent(this.elementRef.nativeElement, 'mouseleave');\n\n this.dissmissToastSubscription = timer(duration)\n .pipe(\n tap(() => this.onClose()),\n takeUntil(mouseEnter$),\n repeat({ delay: () => mouseLeave$ })\n )\n .subscribe();\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<span>\n @if (config.type === \"loading\") {\n <watt-spinner [diameter]=\"24\" />\n }\n\n @if (config.type && config.type !== \"loading\") {\n <watt-icon [name]=\"config.type\" />\n }\n <p>{{ config.message }}</p>\n</span>\n<span class=\"toast__actions\">\n @if (config.action && config.actionLabel) {\n <watt-button variant=\"text\" (click)=\"config.action(matSnackBarRef)\">{{\n config.actionLabel\n }}</watt-button>\n }\n\n @if (config.type !== \"loading\") {\n <watt-button data-testid=\"dismiss\" variant=\"icon\" icon=\"close\" (click)=\"onClose()\" />\n }\n</span>\n"]}
|
|
@@ -39,10 +39,10 @@ export class WattToastService {
|
|
|
39
39
|
return;
|
|
40
40
|
this.ref.dismiss();
|
|
41
41
|
}
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
43
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
43
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattToastService, providedIn: 'root' });
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattToastService, decorators: [{
|
|
46
46
|
type: Injectable,
|
|
47
47
|
args: [{
|
|
48
48
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-toast.service.js","sourceRoot":"","sources":["../../../../libs/watt/package/toast/watt-toast.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAkB,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAmB,MAAM,wBAAwB,CAAC;;AAK7E,MAAM,OAAO,gBAAgB;IACV,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IACzC,GAAG,CAAsC;IAEjD,IAAI,CAAC,MAAuB;QAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,kBAAkB,EAAE;YAC9D,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAgC;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-toast.service.js","sourceRoot":"","sources":["../../../../libs/watt/package/toast/watt-toast.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,WAAW,EAAkB,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAmB,MAAM,wBAAwB,CAAC;;AAK7E,MAAM,OAAO,gBAAgB;IACV,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IACzC,GAAG,CAAsC;IAEjD,IAAI,CAAC,MAAuB;QAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,kBAAkB,EAAE;YAC9D,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,MAAgC;QACrC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,OAAO;QACL,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,OAAO;QACtB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;wGAnBU,gBAAgB;4GAAhB,gBAAgB,cAFf,MAAM;;4FAEP,gBAAgB;kBAH5B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","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, inject } from '@angular/core';\nimport { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';\n\nimport { WattToastComponent, WattToastConfig } from './watt-toast.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattToastService {\n private readonly _snackBar = inject(MatSnackBar);\n private ref?: MatSnackBarRef<WattToastComponent>;\n\n open(config: WattToastConfig): MatSnackBarRef<WattToastComponent> {\n this.ref = this._snackBar.openFromComponent(WattToastComponent, {\n data: config,\n });\n return this.ref;\n }\n\n update(config: Partial<WattToastConfig>): void {\n if (!this.ref) return;\n this.ref.instance.update(config);\n }\n\n dismiss() {\n if (!this.ref) return;\n this.ref.dismiss();\n }\n}\n"]}
|
|
@@ -91,13 +91,13 @@ export class WattTooltipComponent {
|
|
|
91
91
|
platformSupportsMouseEvents() {
|
|
92
92
|
return !this.platform.IOS && !this.platform.ANDROID;
|
|
93
93
|
}
|
|
94
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
95
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: WattTooltipComponent, isStandalone: true, selector: "watt-tooltip", inputs: { text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "id": "id", "attr.role": "\"tooltip\"", "class": "hostClass()" } }, ngImport: i0, template: `
|
|
96
96
|
{{ text() }}
|
|
97
97
|
<div #arrow class="arrow"></div>
|
|
98
98
|
`, isInline: true, styles: [":host{position:absolute;left:0;pointer-events:none;z-index:1000;display:inline-block;line-height:18px;border-radius:6px;padding:var(--watt-space-xs) var(--watt-space-s);font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;white-space:pre-wrap;opacity:0;transition:opacity .3s ease-in-out}:host.tooltip-dark{background:var(--watt-color-primary-dark);color:var(--watt-color-primary-dark-contrast)}:host.tooltip-light{background:var(--watt-color-neutral-white);color:var(--watt-color-primary-light-contrast)}:host.show{opacity:1}:host[data-popper-placement^=top]{inset-block-end:6px!important}:host[data-popper-placement^=bottom]{inset-block-start:6px!important}:host[data-popper-placement^=bottom]>.arrow{top:-4px}:host[data-popper-placement^=left]{inset-inline-end:6px!important}:host[data-popper-placement^=left]>.arrow{right:-4px}:host[data-popper-placement^=right]{inset-inline-start:6px!important}:host[data-popper-placement^=right]>.arrow{left:-4px}:host[data-popper-placement=left]>.arrow,:host[data-popper-placement=right]>.arrow{top:calc(50% - 4px)}:host[data-popper-placement=top]>.arrow,:host[data-popper-placement=bottom]>.arrow{left:calc(50% - 4px)!important}:host[data-popper-placement=top-end]>.arrow,:host[data-popper-placement=bottom-end]>.arrow{left:10px!important}:host[data-popper-placement=top-start]>.arrow,:host[data-popper-placement=bottom-start]>.arrow{left:calc(100% - 18px)}.arrow,.arrow:before{position:absolute;width:8px;height:8px;background:inherit}.arrow{visibility:hidden}.arrow:before{visibility:visible;content:\"\";transform:rotate(45deg)}\n"] });
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipComponent, decorators: [{
|
|
101
101
|
type: Component,
|
|
102
102
|
args: [{ template: `
|
|
103
103
|
{{ text() }}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-tooltip.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tooltip/watt-tooltip.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAY,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;;AAiBhE,MAAM,OAAO,oBAAoB;IAC/B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAElB,IAAI,GAA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C,CAAC,CAAC;YACvF,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7F,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAEO,IAAI;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE;gBACtD,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE;aAC3B,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IAEO,IAAI;QACV,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;IAEO,2BAA2B;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IACtD,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-tooltip.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tooltip/watt-tooltip.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,SAAS,GACV,MAAM,eAAe,CAAC;AACv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CAAC;wGA5EU,oBAAoB;4FAApB,oBAAoB,ypBAZrB;;;GAGT;;4FASU,oBAAoB;kBAbhC,SAAS;+BACE;;;GAGT,YACS,cAAc,QAElB;wBACJ,MAAM,EAAE,IAAI;wBACZ,aAAa,EAAE,WAAW;wBAC1B,SAAS,EAAE,aAAa;qBACzB","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n inject,\n input,\n Renderer2,\n} from '@angular/core';\nimport { createPopper, Instance } from '@popperjs/core';\nimport { Platform } from '@angular/cdk/platform';\n\nimport { wattTooltipPosition, wattTooltipVariant } from './watt-tooltip.directive';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\ntype unlistenerFunction = () => void;\n\n@Component({\n template: `\n {{ text() }}\n <div #arrow class=\"arrow\"></div>\n `,\n selector: 'watt-tooltip',\n styleUrls: ['./watt-tooltip.component.scss'],\n host: {\n '[id]': 'id',\n '[attr.role]': '\"tooltip\"',\n '[class]': 'hostClass()',\n },\n})\nexport class WattTooltipComponent {\n static nextId = 0;\n\n text = input.required<string>();\n target = input.required<HTMLElement>();\n position = input.required<wattTooltipPosition>();\n variant = input.required<wattTooltipVariant>();\n\n readonly id = `watt-tooltip-${WattTooltipComponent.nextId++}`; // used by aria-describedby\n hostClass = computed(() => `tooltip-${this.variant()}`);\n\n private element: HTMLElement = inject(ElementRef).nativeElement;\n private platform = inject(Platform);\n private renderer: Renderer2 = inject(Renderer2);\n private focusMonitor: FocusMonitor = inject(FocusMonitor);\n private destroyRef = inject(DestroyRef);\n\n private listeners: unlistenerFunction[] = [];\n private showClass = 'show';\n private popper: Instance | null = null;\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n this.popper?.destroy();\n this.listeners.forEach((listener) => listener());\n });\n\n effect(() => {\n this.setupEventListeners();\n\n this.focusMonitor\n .monitor(this.target(), true)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((origin) => {\n if (!origin) {\n this.hide();\n } else if (origin === 'keyboard') {\n this.show();\n }\n });\n });\n }\n\n private setupEventListeners(): void {\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this.platformSupportsMouseEvents()) {\n const mouseEnter = this.renderer.listen(this.target(), 'mouseenter', this.show.bind(this));\n const mouseLeave = this.renderer.listen(this.target(), 'mouseleave', this.hide.bind(this));\n const wheel = this.renderer.listen(this.target(), 'wheel', this.hide.bind(this));\n this.listeners.push(mouseEnter, mouseLeave, wheel);\n } else {\n const touchStart = this.renderer.listen(this.target(), 'touchstart', this.show.bind(this));\n const touchEnd = this.renderer.listen(this.target(), 'touchend', this.hide.bind(this));\n const touchCancel = this.renderer.listen(this.target(), 'touchcancel', this.hide.bind(this));\n this.listeners.push(touchStart, touchEnd, touchCancel);\n }\n }\n\n private show(): void {\n if (!this.popper) {\n this.popper = createPopper(this.target(), this.element, {\n placement: this.position(),\n });\n } else {\n this.popper.forceUpdate();\n }\n this.renderer.addClass(this.element, this.showClass);\n }\n\n private hide(): void {\n this.renderer.removeClass(this.element, this.showClass);\n }\n\n private platformSupportsMouseEvents() {\n return !this.platform.IOS && !this.platform.ANDROID;\n }\n}\n"]}
|
|
@@ -54,10 +54,10 @@ export class WattTooltipDirective {
|
|
|
54
54
|
this.element.setAttribute('aria-describedby', instance.id);
|
|
55
55
|
return tooltipComponent;
|
|
56
56
|
}
|
|
57
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
58
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
57
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
58
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: WattTooltipDirective, isStandalone: true, selector: "[wattTooltip]", inputs: { text: { classPropertyName: "text", publicName: "wattTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "wattTooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "wattTooltipVariant", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["wattTooltip"], ngImport: i0 });
|
|
59
59
|
}
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTooltipDirective, decorators: [{
|
|
61
61
|
type: Directive,
|
|
62
62
|
args: [{
|
|
63
63
|
selector: '[wattTooltip]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-tooltip.directive.js","sourceRoot":"","sources":["../../../../libs/watt/package/tooltip/watt-tooltip.directive.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,MAAM,EACN,UAAU,EACV,MAAM,EACN,KAAK,EACL,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;;AAkBhE,MAAM,OAAO,oBAAoB;IACtB,IAAI,GAAG,KAAK,CAAS,EAAE,wCAAI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ApB,oBAAoB;;4FAApB,oBAAoB;kBAJhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;oBACzB,QAAQ,EAAE,aAAa;iBACxB","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { WattTooltipComponent } from './watt-tooltip.component';\n\nexport type wattTooltipPosition =\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right'\n | 'bottom-start'\n | 'bottom'\n | 'bottom-end'\n | 'left';\n\nexport type wattTooltipVariant = 'dark' | 'light';\n\n@Directive({\n selector: '[wattTooltip]',\n exportAs: 'wattTooltip',\n})\nexport class WattTooltipDirective {\n readonly text = input<string>('', { alias: 'wattTooltip' });\n readonly position = input<wattTooltipPosition>('top', { alias: 'wattTooltipPosition' });\n readonly variant = input<wattTooltipVariant>('dark', { alias: 'wattTooltipVariant' });\n\n private readonly element = inject(ElementRef).nativeElement;\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private tooltip = computed(() => this.createTooltipComponent());\n\n constructor() {\n // Setup effect to manage tooltip component lifecycle\n effect(() => {\n // Access the tooltip computed to create/update it when inputs change\n const tooltipComponent = this.tooltip();\n\n // Cleanup on destroy\n this.destroyRef.onDestroy(() => {\n tooltipComponent?.destroy();\n this.element.removeAttribute('aria-describedby');\n });\n });\n }\n\n private createTooltipComponent() {\n if (!this.text()) return null;\n\n // Create the component\n const tooltipComponent = this.viewContainerRef.createComponent(WattTooltipComponent);\n\n // Get the component instance\n const instance = tooltipComponent.instance;\n\n // Set up bindings\n tooltipComponent.setInput('text', this.text());\n tooltipComponent.setInput('target', this.element);\n tooltipComponent.setInput('position', this.position());\n tooltipComponent.setInput('variant', this.variant());\n\n this.element.setAttribute('aria-describedby', instance.id);\n\n return tooltipComponent;\n }\n}\n"]}
|
|
@@ -29,10 +29,10 @@ export class WattCssCustomPropertiesService {
|
|
|
29
29
|
setPropertyValue(name, value) {
|
|
30
30
|
this.rootElement.style.setProperty(name, value);
|
|
31
31
|
}
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
33
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCssCustomPropertiesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
33
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCssCustomPropertiesService, providedIn: 'root' });
|
|
34
34
|
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattCssCustomPropertiesService, decorators: [{
|
|
36
36
|
type: Injectable,
|
|
37
37
|
args: [{ providedIn: 'root' }]
|
|
38
38
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-custom-properties.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/css/css-custom-properties.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AAEZ,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;AAG7D,MAAM,OAAO,8BAA8B;IACxB,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC,CAAC;IAEvD,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;IACvC,CAAC;IAEM,gBAAgB,CAAC,IAAY;QAClC,OAAO,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACnE,CAAC;IAEM,gBAAgB,CAAC,IAAY,EAAE,KAAa;QACjD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;
|
|
1
|
+
{"version":3,"file":"css-custom-properties.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/css/css-custom-properties.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AAEZ,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;AAG7D,MAAM,OAAO,8BAA8B;IACxB,QAAQ,GAAG,MAAM,CAAW,QAAQ,CAAC,CAAC;IAEvD,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;IACvC,CAAC;IAEM,gBAAgB,CAAC,IAAY;QAClC,OAAO,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACnE,CAAC;IAEM,gBAAgB,CAAC,IAAY,EAAE,KAAa;QACjD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;wGAbU,8BAA8B;4GAA9B,8BAA8B,cADjB,MAAM;;4FACnB,8BAA8B;kBAD1C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\n\nimport { Injectable, DOCUMENT, inject } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattCssCustomPropertiesService {\n private readonly document = inject<Document>(DOCUMENT);\n\n private get rootElement() {\n return this.document.documentElement;\n }\n\n public getPropertyValue(name: string): string {\n return getComputedStyle(this.rootElement).getPropertyValue(name);\n }\n\n public setPropertyValue(name: string, value: string): void {\n this.rootElement.style.setProperty(name, value);\n }\n}\n"]}
|
|
@@ -47,10 +47,10 @@ export class WattIntersectionObserverService {
|
|
|
47
47
|
this.intersectionObserver?.observe(element);
|
|
48
48
|
return this.entrySubject.asObservable().pipe(filter((entry) => entry.target === element), finalize(() => this.intersectionObserver?.unobserve(element)));
|
|
49
49
|
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattIntersectionObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
51
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattIntersectionObserverService, providedIn: 'root' });
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattIntersectionObserverService, decorators: [{
|
|
54
54
|
type: Injectable,
|
|
55
55
|
args: [{ providedIn: 'root' }]
|
|
56
56
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-intersection-observer.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/intersection-observer/watt-intersection-observer.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;AAEjD;;;;;;GAMG;AAEH,MAAM,OAAO,+BAA+B;IAClC,oBAAoB,CAAwB;IAC5C,YAAY,GAAG,IAAI,OAAO,EAA6B,CAAC;IAEhE;QACE,IAAI,MAAM,CAAC,oBAAoB,EAAE,CAAC;YAChC,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC/D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;oBAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAgB;QACtB,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAC9D,CAAC;IACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-intersection-observer.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/intersection-observer/watt-intersection-observer.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;AAEjD;;;;;;GAMG;AAEH,MAAM,OAAO,+BAA+B;IAClC,oBAAoB,CAAwB;IAC5C,YAAY,GAAG,IAAI,OAAO,EAA6B,CAAC;IAEhE;QACE,IAAI,MAAM,CAAC,oBAAoB,EAAE,CAAC;YAChC,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC/D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;oBAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAgB;QACtB,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAC9D,CAAC;IACJ,CAAC;wGAzBU,+BAA+B;4GAA/B,+BAA+B,cADlB,MAAM;;4FACnB,+BAA+B;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes in the intersection of a target element with\n * the viewport.\n *\n * Usage:\n * `import { WattIntersectionObserverService } from '@energinet/watt/intersection-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattIntersectionObserverService {\n private intersectionObserver?: IntersectionObserver;\n private entrySubject = new Subject<IntersectionObserverEntry>();\n\n constructor() {\n if (window.IntersectionObserver) {\n this.intersectionObserver = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that emits\n * whenever that element enters or leaves the viewport. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.intersectionObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.intersectionObserver?.unobserve(element))\n );\n }\n}\n"]}
|
|
@@ -41,10 +41,10 @@ export class WattResizeObserverDirective {
|
|
|
41
41
|
ngOnDestroy() {
|
|
42
42
|
this.subscription.unsubscribe();
|
|
43
43
|
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
45
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: WattResizeObserverDirective, isStandalone: true, selector: "[wattResizeObserver]", outputs: { resize: "resize" }, ngImport: i0 });
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverDirective, decorators: [{
|
|
48
48
|
type: Directive,
|
|
49
49
|
args: [{ selector: '[wattResizeObserver]' }]
|
|
50
50
|
}], ctorParameters: () => [], propDecorators: { resize: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-resize-observer.directive.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/resize-observer/watt-resize-observer.directive.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAa,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;;AAE3E;;;;;;GAMG;AAEH,MAAM,OAAO,2BAA2B;IAC9B,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACxB,qBAAqB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAClE,uDAAuD;IACvD,4DAA4D;IAClD,MAAM,GAAsC,IAAI,YAAY,EAAE,CAAC;IAEjE,YAAY,CAAe;IAEnC;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,qBAAqB;aAC3C,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;aAC9B,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-resize-observer.directive.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/resize-observer/watt-resize-observer.directive.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAa,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;;AAE3E;;;;;;GAMG;AAEH,MAAM,OAAO,2BAA2B;IAC9B,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACxB,qBAAqB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAClE,uDAAuD;IACvD,4DAA4D;IAClD,MAAM,GAAsC,IAAI,YAAY,EAAE,CAAC;IAEjE,YAAY,CAAe;IAEnC;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,qBAAqB;aAC3C,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;aAC9B,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnD,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;wGAjBU,2BAA2B;4FAA3B,2BAA2B;;4FAA3B,2BAA2B;kBADvC,SAAS;mBAAC,EAAE,QAAQ,EAAE,sBAAsB,EAAE;;sBAM5C,MAAM","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 { Directive, ElementRef, EventEmitter, OnDestroy, Output, inject } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { WattResizeObserverService } from './watt-resize-observer.service';\n\n/**\n * A directive for subscribing to changes to the size of an element.\n * The `resize` event emits initially and then everytime the element is resized.\n *\n * Usage:\n * `import { WattResizeObserverDirective } from '@energinet/watt/resize-observer';`\n */\n@Directive({ selector: '[wattResizeObserver]' })\nexport class WattResizeObserverDirective implements OnDestroy {\n private el = inject(ElementRef);\n private resizeObserverService = inject(WattResizeObserverService);\n // The `resize` event only natively exists on `window`.\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() resize: EventEmitter<ResizeObserverEntry> = new EventEmitter();\n\n private subscription: Subscription;\n\n constructor() {\n this.subscription = this.resizeObserverService\n .observe(this.el.nativeElement)\n .subscribe((entry) => this.resize.emit(entry));\n }\n\n public ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n}\n"]}
|
|
@@ -57,10 +57,10 @@ export class WattResizeObserverService {
|
|
|
57
57
|
this.resizeObserver?.observe(element);
|
|
58
58
|
return this.entrySubject.asObservable().pipe(filter((entry) => entry.target === element), finalize(() => this.resizeObserver?.unobserve(element)));
|
|
59
59
|
}
|
|
60
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
61
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
61
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverService, providedIn: 'root' });
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverService, decorators: [{
|
|
64
64
|
type: Injectable,
|
|
65
65
|
args: [{ providedIn: 'root' }]
|
|
66
66
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-resize-observer.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/resize-observer/watt-resize-observer.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;AAEjD;;;;;;GAMG;AAEH,MAAM,OAAO,yBAAyB;IACnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAEjC,cAAc,CAAkB;IAChC,YAAY,GAAG,IAAI,OAAO,EAAuB,CAAC;IAE1D;QACE,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;gBACnD,qDAAqD;gBACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;oBACnB;;;uBAGG;oBACH,qBAAqB,CAAC,GAAG,EAAE;wBACzB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;4BAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBAChC,CAAC;oBACH,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAgB;QACtB,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CACxD,CAAC;IACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-resize-observer.service.js","sourceRoot":"","sources":["../../../../../libs/watt/package/utils/resize-observer/watt-resize-observer.service.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;;AAEjD;;;;;;GAMG;AAEH,MAAM,OAAO,yBAAyB;IACnB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAEjC,cAAc,CAAkB;IAChC,YAAY,GAAG,IAAI,OAAO,EAAuB,CAAC;IAE1D;QACE,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;gBACnD,qDAAqD;gBACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;oBACnB;;;uBAGG;oBACH,qBAAqB,CAAC,GAAG,EAAE;wBACzB,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;4BAC5B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBAChC,CAAC;oBACH,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,OAAO,CAAC,OAAgB;QACtB,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC,IAAI,CAC1C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,EAC3C,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CACxD,CAAC;IACJ,CAAC;wGApCU,yBAAyB;4GAAzB,yBAAyB,cADZ,MAAM;;4FACnB,yBAAyB;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable, NgZone, inject } from '@angular/core';\nimport { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes to an elements size. Typically used by\n * the `WattResizeObserverDirective`, but can also be imported directly.\n *\n * Usage:\n * `import { WattResizeObserverService } from '@energinet/watt/resize-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattResizeObserverService {\n private readonly ngZone = inject(NgZone);\n\n private resizeObserver?: ResizeObserver;\n private entrySubject = new Subject<ResizeObserverEntry>();\n\n constructor() {\n if (window.ResizeObserver) {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Resize callback is running outside of Angular zone\n this.ngZone.run(() => {\n /**\n * Ensure that the function is executed only once per frame, and avoid:\n * \"Error: ResizeObserver loop limit exceeded\"\n */\n requestAnimationFrame(() => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n });\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that\n * emits whenever that element changes size. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.resizeObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.resizeObserver?.unobserve(element))\n );\n }\n}\n"]}
|
|
@@ -53,8 +53,8 @@ export class WattValidationMessageComponent {
|
|
|
53
53
|
}, 100);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
57
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattValidationMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattValidationMessageComponent, isStandalone: true, selector: "watt-validation-message", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, autoScrollIntoView: { classPropertyName: "autoScrollIntoView", publicName: "autoScrollIntoView", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cssClass()", "attr.role": "ariaRole()" } }, ngImport: i0, template: `
|
|
58
58
|
@if (icon()) {
|
|
59
59
|
<watt-icon [name]="icon()" />
|
|
60
60
|
}
|
|
@@ -67,7 +67,7 @@ export class WattValidationMessageComponent {
|
|
|
67
67
|
</div>
|
|
68
68
|
`, isInline: true, styles: [":host{align-items:center;border-radius:4px;display:flex}:host.watt-validation-message-size--compact{padding:var(--watt-space-xs) var(--watt-space-s)}:host.watt-validation-message-size--compact watt-icon{margin-right:var(--watt-space-s)}:host.watt-validation-message-size--compact strong{color:var(--watt-typography-label-color);font-size:.875rem;line-height:1.25rem;font-weight:600}:host.watt-validation-message-size--compact strong:not(:empty):after{content:\":\"}:host.watt-validation-message-size--compact .watt-validation-message-text{font-size:.875rem;line-height:1.25rem}:host.watt-validation-message-size--normal{padding:1.5rem var(--watt-space-m)}:host.watt-validation-message-size--normal strong{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0;display:inline-block;width:100%;margin-bottom:var(--watt-space-s)}:host.watt-validation-message-size--normal watt-icon{margin-right:var(--watt-space-m)}:host watt-icon{align-self:flex-start}:host.watt-validation-message-type--info{background-color:var(--watt-color-state-info-light)}:host.watt-validation-message-type--warning{background-color:var(--watt-color-state-warning-light)}:host.watt-validation-message-type--success{background-color:var(--watt-color-state-success-light)}:host.watt-validation-message-type--danger{background-color:var(--watt-color-state-danger-light)}\n"], dependencies: [{ kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
69
69
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattValidationMessageComponent, decorators: [{
|
|
71
71
|
type: Component,
|
|
72
72
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'watt-validation-message', imports: [WattIconComponent], host: {
|
|
73
73
|
'[class]': `cssClass()`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-validation-message.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/validation-message/watt-validation-message.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAEL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAY,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;;AAKnE;;;GAGG;AAuBH,MAAM,OAAO,8BAA8B;IACzC;;OAEG;IACK,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAExC,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC,CAAC;IAClB,OAAO,GAAG,KAAK,CAAC,EAAE,mDAAC,CAAC;IACpB,IAAI,GAAG,KAAK,CAAuB,SAAS,gDAAC,CAAC;IAC9C,IAAI,GAAG,KAAK,CAA4B,MAAM,gDAAC,CAAC;IAChD,IAAI,GAAG,KAAK,CAA4B,SAAS,gDAAC,CAAC;IACnD,kBAAkB,GAAG,KAAK,CAAC,IAAI,8DAAC,CAAC;IAEjC;;OAEG;IACH,QAAQ,GAAG,QAAQ,CACjB,GAAG,EAAE,CACH,iCAAiC,IAAI,CAAC,IAAI,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,oDAC9F,CAAC;IAEF;;OAEG;IACH,QAAQ,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvB,IAAI,CAAC,IAAI,EAAE,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,oDAC3E,CAAC;IAEF;;OAEG;IACH,eAAe;QACb,IAAI,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC9B,mEAAmE;YACnE,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC;YACjD,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC;IACH,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-validation-message.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/validation-message/watt-validation-message.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAEL,uBAAuB,EACvB,SAAS,EACT,QAAQ,EACR,UAAU,EACV,MAAM,EACN,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAY,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;;AAKnE;;;GAGG;AAuBH,MAAM,OAAO,8BAA8B;IACzC;;OAEG;IACK,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAExC,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC,CAAC;IAClB,OAAO,GAAG,KAAK,CAAC,EAAE,mDAAC,CAAC;IACpB,IAAI,GAAG,KAAK,CAAuB,SAAS,gDAAC,CAAC;IAC9C,IAAI,GAAG,KAAK,CAA4B,MAAM,gDAAC,CAAC;IAChD,IAAI,GAAG,KAAK,CAA4B,SAAS,gDAAC,CAAC;IACnD,kBAAkB,GAAG,KAAK,CAAC,IAAI,8DAAC,CAAC;IAEjC;;OAEG;IACH,QAAQ,GAAG,QAAQ,CACjB,GAAG,EAAE,CACH,iCAAiC,IAAI,CAAC,IAAI,EAAE,kCAAkC,IAAI,CAAC,IAAI,EAAE,EAAE,oDAC9F,CAAC;IAEF;;OAEG;IACH,QAAQ,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvB,IAAI,CAAC,IAAI,EAAE,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,oDAC3E,CAAC;IAEF;;OAEG;IACH,eAAe;QACb,IAAI,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC9B,mEAAmE;YACnE,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,cAAc,EAAE,CAAC;YACjD,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC;IACH,CAAC;wGAtCU,8BAA8B;4FAA9B,8BAA8B,+5BAb/B;;;;;;;;;;;GAWT,k9CAhBS,iBAAiB;;4FAkBhB,8BAA8B;kBAtB1C,SAAS;sCACS,uBAAuB,CAAC,MAAM,YACrC,yBAAyB,WAE1B,CAAC,iBAAiB,CAAC,QACtB;wBACJ,SAAS,EAAE,YAAY;wBACvB,aAAa,EAAE,YAAY;qBAC5B,YACS;;;;;;;;;;;GAWT","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n} from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattValidationMessageType = 'info' | 'warning' | 'success' | 'danger';\nexport type WattValidationMessageSize = 'compact' | 'normal';\n\n/**\n * Usage:\n * `import { WattValidationMessageComponent } from '@energinet/watt/validation-message';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-validation-message',\n styleUrl: './watt-validation-message.component.scss',\n imports: [WattIconComponent],\n host: {\n '[class]': `cssClass()`,\n '[attr.role]': 'ariaRole()',\n },\n template: `\n @if (icon()) {\n <watt-icon [name]=\"icon()\" />\n }\n <div>\n @if (label()) {\n <strong>{{ label() }}</strong>\n }\n {{ message() }}\n <ng-content />\n </div>\n `,\n})\nexport class WattValidationMessageComponent implements AfterViewInit {\n /**\n * @ignore\n */\n private elementRef = inject(ElementRef);\n\n label = input('');\n message = input('');\n icon = input<WattIcon | undefined>(undefined);\n type = input<WattValidationMessageType>('info');\n size = input<WattValidationMessageSize>('compact');\n autoScrollIntoView = input(true);\n\n /**\n * @ignore\n */\n cssClass = computed(\n () =>\n `watt-validation-message-type--${this.type()} watt-validation-message-size--${this.size()}`\n );\n\n /**\n * @ignore\n */\n ariaRole = computed(() =>\n this.type() === 'warning' || this.type() === 'danger' ? 'alert' : 'status'\n );\n\n /**\n * @ignore\n */\n ngAfterViewInit() {\n if (this.autoScrollIntoView()) {\n // Try to win over other auto scrolling behavior such as auto focus\n setTimeout(() => {\n this.elementRef.nativeElement.scrollIntoView();\n }, 100);\n }\n }\n}\n"]}
|
|
@@ -30,10 +30,10 @@ export class VaterFlexComponent {
|
|
|
30
30
|
* Prefer setting `fill` on flex items over using `autoSize`.
|
|
31
31
|
*/
|
|
32
32
|
autoSize = input(false, ...(ngDevMode ? [{ debugName: "autoSize", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
34
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: VaterFlexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: VaterFlexComponent, isStandalone: true, selector: "vater-flex, [vater-flex]", inputs: { autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.vater-flex-auto": "autoSize()" } }, hostDirectives: [{ directive: i1.VaterLayoutDirective, inputs: ["align", "align", "direction", "direction", "justify", "justify", "wrap", "wrap", "gap", "gap", "offset", "offset"] }, { directive: i2.VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset", "scrollable", "scrollable"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: VaterFlexComponent, decorators: [{
|
|
37
37
|
type: Component,
|
|
38
38
|
args: [{ selector: 'vater-flex, [vater-flex]', encapsulation: ViewEncapsulation.None, hostDirectives: [
|
|
39
39
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vater-flex.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/vater/vater-flex.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;;;;AAyBhE,MAAM,OAAO,kBAAkB;IAC7B;;;;;OAKG;IACH,QAAQ,GAAG,KAAK,CAAC,KAAK,4CAAI,SAAS,EAAE,gBAAgB,OAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"vater-flex.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/vater/vater-flex.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;;;;AAyBhE,MAAM,OAAO,kBAAkB;IAC7B;;;;;OAKG;IACH,QAAQ,GAAG,KAAK,CAAC,KAAK,4CAAI,SAAS,EAAE,gBAAgB,OAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC,CAAC;wGAP9C,kBAAkB;4FAAlB,kBAAkB,+lBAFnB,gBAAgB;;4FAEf,kBAAkB;kBAvB9B,SAAS;+BACE,0BAA0B,iBACrB,iBAAiB,CAAC,IAAI,kBACrB;wBACd;4BACE,SAAS,EAAE,oBAAoB;4BAC/B,MAAM,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC;yBACnE;wBACD;4BACE,SAAS,EAAE,qBAAqB;4BAChC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC;yBAClD;qBACF,QACK,EAAE,yBAAyB,EAAE,YAAY,EAAE,YAQvC,gBAAgB","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { booleanAttribute, Component, input, ViewEncapsulation } from '@angular/core';\nimport { VaterUtilityDirective } from './vater-utility.directive';\nimport { VaterLayoutDirective } from './vater-layout.directive';\n\n@Component({\n selector: 'vater-flex, [vater-flex]',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [\n {\n directive: VaterLayoutDirective,\n inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],\n },\n {\n directive: VaterUtilityDirective,\n inputs: ['center', 'fill', 'inset', 'scrollable'],\n },\n ],\n host: { '[class.vater-flex-auto]': 'autoSize()' },\n styles: `\n vater-flex,\n [vater-flex] {\n display: flex;\n line-height: normal;\n }\n `,\n template: `<ng-content />`,\n})\nexport class VaterFlexComponent {\n /**\n * When set, sizes the flex items according to their width or height properties.\n * @see https://drafts.csswg.org/css-flexbox-1/#flex-common\n * @remarks\n * Prefer setting `fill` on flex items over using `autoSize`.\n */\n autoSize = input(false, { transform: booleanAttribute });\n}\n"]}
|