@sebgroup/green-angular 4.6.6 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/accordion/accordion-list-item.component.mjs +5 -5
- package/esm2022/lib/accordion/accordion.component.mjs +4 -4
- package/esm2022/lib/accordion/accordion.module.mjs +4 -4
- package/esm2022/lib/badge/badge.component.mjs +5 -5
- package/esm2022/lib/badge/badge.module.mjs +4 -4
- package/esm2022/lib/button/button.component.mjs +3 -3
- package/esm2022/lib/button/button.module.mjs +4 -4
- package/esm2022/lib/cell-table/cell-table-item.component.mjs +5 -5
- package/esm2022/lib/cell-table/cell-table.component.mjs +4 -4
- package/esm2022/lib/cell-table/cell-table.module.mjs +4 -4
- package/esm2022/lib/cell-table/cell-underline.directive.mjs +5 -5
- package/esm2022/lib/context-menu/context-menu.component.mjs +5 -12
- package/esm2022/lib/context-menu/context-menu.module.mjs +4 -4
- package/esm2022/lib/datepicker/datepicker.component.mjs +5 -5
- package/esm2022/lib/datepicker/datepicker.module.mjs +4 -4
- package/esm2022/lib/dropdown/dropdown-button.directive.mjs +4 -4
- package/esm2022/lib/dropdown/dropdown-option.directive.mjs +4 -4
- package/esm2022/lib/dropdown/dropdown.component.mjs +6 -11
- package/esm2022/lib/dropdown/dropdown.module.mjs +4 -4
- package/esm2022/lib/green-angular.module.mjs +4 -4
- package/esm2022/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +4 -4
- package/esm2022/lib/in-page-wizard/in-page-wizard.module.mjs +4 -4
- package/esm2022/lib/modal/modal-footer.directive.mjs +4 -4
- package/esm2022/lib/modal/modal-header.directive.mjs +4 -4
- package/esm2022/lib/modal/modal.component.mjs +14 -14
- package/esm2022/lib/modal/modal.module.mjs +4 -4
- package/esm2022/lib/pagination/pagination.component.mjs +4 -4
- package/esm2022/lib/pagination/pagination.module.mjs +4 -4
- package/esm2022/lib/progress-circle/progress-circle.component.mjs +4 -4
- package/esm2022/lib/progress-circle/progress-circle.module.mjs +4 -4
- package/esm2022/lib/segmented-control/segmented-control.component.mjs +4 -4
- package/esm2022/lib/segmented-control/segmented-control.module.mjs +4 -4
- package/esm2022/lib/shared/core-element/core-element.directive.mjs +3 -3
- package/esm2022/lib/shared/core-element/core-element.module.mjs +4 -4
- package/esm2022/lib/shared/on-scroll.directive.mjs +5 -5
- package/esm2022/lib/shared/shared.module.mjs +4 -4
- package/esm2022/lib/slider/slider.component.mjs +4 -4
- package/esm2022/lib/slider/slider.module.mjs +4 -4
- package/esm2022/lib/sortable-list/sortable-list.component.mjs +4 -4
- package/esm2022/lib/sortable-list/sortable-list.module.mjs +4 -4
- package/esm2022/src/lib/accordion/accordion-list-item.component.mjs +5 -5
- package/esm2022/src/lib/accordion/accordion.component.mjs +4 -4
- package/esm2022/src/lib/accordion/accordion.module.mjs +4 -4
- package/esm2022/src/lib/badge/badge.component.mjs +5 -5
- package/esm2022/src/lib/badge/badge.module.mjs +4 -4
- package/esm2022/src/lib/button/button.component.mjs +3 -3
- package/esm2022/src/lib/button/button.module.mjs +4 -4
- package/esm2022/src/lib/cell-table/cell-table-item.component.mjs +5 -5
- package/esm2022/src/lib/cell-table/cell-table.component.mjs +4 -4
- package/esm2022/src/lib/cell-table/cell-table.module.mjs +4 -4
- package/esm2022/src/lib/cell-table/cell-underline.directive.mjs +5 -5
- package/esm2022/src/lib/context-menu/context-menu.component.mjs +5 -12
- package/esm2022/src/lib/context-menu/context-menu.module.mjs +4 -4
- package/esm2022/src/lib/datepicker/datepicker.component.mjs +5 -5
- package/esm2022/src/lib/datepicker/datepicker.module.mjs +4 -4
- package/esm2022/src/lib/dropdown/dropdown-button.directive.mjs +4 -4
- package/esm2022/src/lib/dropdown/dropdown-option.directive.mjs +4 -4
- package/esm2022/src/lib/dropdown/dropdown.component.mjs +6 -11
- package/esm2022/src/lib/dropdown/dropdown.module.mjs +4 -4
- package/esm2022/src/lib/in-page-wizard/in-page-wizard-step-card.component.mjs +4 -4
- package/esm2022/src/lib/in-page-wizard/in-page-wizard.module.mjs +4 -4
- package/esm2022/src/lib/modal/modal-footer.directive.mjs +4 -4
- package/esm2022/src/lib/modal/modal-header.directive.mjs +4 -4
- package/esm2022/src/lib/modal/modal.component.mjs +14 -14
- package/esm2022/src/lib/modal/modal.module.mjs +4 -4
- package/esm2022/src/lib/pagination/pagination.component.mjs +4 -4
- package/esm2022/src/lib/pagination/pagination.module.mjs +4 -4
- package/esm2022/src/lib/progress-circle/progress-circle.component.mjs +4 -4
- package/esm2022/src/lib/progress-circle/progress-circle.module.mjs +4 -4
- package/esm2022/src/lib/segmented-control/segmented-control.component.mjs +4 -4
- package/esm2022/src/lib/segmented-control/segmented-control.module.mjs +4 -4
- package/esm2022/src/lib/shared/core-element/core-element.directive.mjs +3 -3
- package/esm2022/src/lib/shared/core-element/core-element.module.mjs +4 -4
- package/esm2022/src/lib/shared/on-scroll.directive.mjs +5 -5
- package/esm2022/src/lib/shared/shared.module.mjs +4 -4
- package/esm2022/src/lib/slider/slider.component.mjs +4 -4
- package/esm2022/src/lib/slider/slider.module.mjs +4 -4
- package/esm2022/src/lib/sortable-list/sortable-list.component.mjs +4 -4
- package/esm2022/src/lib/sortable-list/sortable-list.module.mjs +4 -4
- package/esm2022/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +8 -8
- package/esm2022/src/v-angular/base-control-value-accessor/base-control-value-accessor.module.mjs +4 -4
- package/esm2022/src/v-angular/breadcrumbs/breadcrumbs.component.mjs +3 -3
- package/esm2022/src/v-angular/breadcrumbs/breadcrumbs.module.mjs +4 -4
- package/esm2022/src/v-angular/button/button.component.mjs +7 -7
- package/esm2022/src/v-angular/button/button.module.mjs +4 -4
- package/esm2022/src/v-angular/card/card.component.mjs +3 -3
- package/esm2022/src/v-angular/card/card.module.mjs +4 -4
- package/esm2022/src/v-angular/character-countdown/character-countdown.directive.mjs +5 -5
- package/esm2022/src/v-angular/character-countdown/character-countdown.module.mjs +4 -4
- package/esm2022/src/v-angular/checkbox/checkbox.component.mjs +8 -8
- package/esm2022/src/v-angular/checkbox/checkbox.module.mjs +4 -4
- package/esm2022/src/v-angular/core/core.globals.mjs +1 -1
- package/esm2022/src/v-angular/core/core.utils.mjs +3 -3
- package/esm2022/src/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +8 -8
- package/esm2022/src/v-angular/dropdown/dropdown.component.mjs +8 -8
- package/esm2022/src/v-angular/dropdown/dropdown.module.mjs +4 -4
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +7 -7
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.mjs +4 -4
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.mjs +7 -7
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead.directive.mjs +6 -6
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead.module.mjs +4 -4
- package/esm2022/src/v-angular/external-link/external-link.directive.mjs +5 -5
- package/esm2022/src/v-angular/external-link/external-link.module.mjs +4 -4
- package/esm2022/src/v-angular/i18n/i18n.module.mjs +18 -12
- package/esm2022/src/v-angular/i18n/i18n.test.module.mjs +9 -9
- package/esm2022/src/v-angular/info-circle/info-circle.component.mjs +3 -3
- package/esm2022/src/v-angular/info-circle/info-circle.module.mjs +4 -4
- package/esm2022/src/v-angular/input/input.component.mjs +9 -9
- package/esm2022/src/v-angular/input/input.module.mjs +4 -4
- package/esm2022/src/v-angular/input-mask/input-mask-format.pipe.mjs +3 -3
- package/esm2022/src/v-angular/input-mask/input-mask.directive.mjs +6 -6
- package/esm2022/src/v-angular/input-mask/input-mask.module.mjs +4 -4
- package/esm2022/src/v-angular/modal/dialog/dialog.component.mjs +5 -5
- package/esm2022/src/v-angular/modal/fold-out/fold-out.component.mjs +6 -6
- package/esm2022/src/v-angular/modal/fold-out/fold-out.directive.mjs +3 -3
- package/esm2022/src/v-angular/modal/modal.globals.mjs +1 -1
- package/esm2022/src/v-angular/modal/modal.module.mjs +4 -4
- package/esm2022/src/v-angular/modal/slide-out/slide-out.component.mjs +6 -6
- package/esm2022/src/v-angular/radio/radio.component.mjs +11 -11
- package/esm2022/src/v-angular/radio/radio.module.mjs +4 -4
- package/esm2022/src/v-angular/slug/slug.module.mjs +4 -4
- package/esm2022/src/v-angular/slug/slug.pipe.mjs +4 -4
- package/esm2022/src/v-angular/textarea/textarea.component.mjs +9 -9
- package/esm2022/src/v-angular/textarea/textarea.module.mjs +4 -4
- package/esm2022/src/v-angular/tooltip/tooltip.directive.mjs +5 -5
- package/esm2022/src/v-angular/tooltip/tooltip.module.mjs +4 -4
- package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +8 -8
- package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.module.mjs +4 -4
- package/esm2022/v-angular/breadcrumbs/breadcrumbs.component.mjs +3 -3
- package/esm2022/v-angular/breadcrumbs/breadcrumbs.module.mjs +4 -4
- package/esm2022/v-angular/button/button.component.mjs +7 -7
- package/esm2022/v-angular/button/button.module.mjs +4 -4
- package/esm2022/v-angular/card/card.component.mjs +3 -3
- package/esm2022/v-angular/card/card.module.mjs +4 -4
- package/esm2022/v-angular/character-countdown/character-countdown.directive.mjs +5 -5
- package/esm2022/v-angular/character-countdown/character-countdown.module.mjs +4 -4
- package/esm2022/v-angular/checkbox/checkbox.component.mjs +8 -8
- package/esm2022/v-angular/checkbox/checkbox.module.mjs +4 -4
- package/esm2022/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +8 -8
- package/esm2022/v-angular/dropdown/dropdown.component.mjs +8 -8
- package/esm2022/v-angular/dropdown/dropdown.module.mjs +4 -4
- package/esm2022/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +7 -7
- package/esm2022/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.mjs +4 -4
- package/esm2022/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.mjs +7 -7
- package/esm2022/v-angular/dropdown/typeahead/typeahead.directive.mjs +6 -6
- package/esm2022/v-angular/dropdown/typeahead/typeahead.module.mjs +4 -4
- package/esm2022/v-angular/i18n/i18n.module.mjs +18 -12
- package/esm2022/v-angular/i18n/i18n.test.module.mjs +9 -9
- package/esm2022/v-angular/info-circle/info-circle.component.mjs +3 -3
- package/esm2022/v-angular/info-circle/info-circle.module.mjs +4 -4
- package/esm2022/v-angular/input/input.component.mjs +9 -9
- package/esm2022/v-angular/input/input.module.mjs +4 -4
- package/esm2022/v-angular/input-mask/input-mask-format.pipe.mjs +3 -3
- package/esm2022/v-angular/input-mask/input-mask.directive.mjs +6 -6
- package/esm2022/v-angular/input-mask/input-mask.module.mjs +4 -4
- package/esm2022/v-angular/modal/dialog/dialog.component.mjs +5 -5
- package/esm2022/v-angular/modal/fold-out/fold-out.component.mjs +6 -6
- package/esm2022/v-angular/modal/fold-out/fold-out.directive.mjs +3 -3
- package/esm2022/v-angular/modal/modal.globals.mjs +1 -1
- package/esm2022/v-angular/modal/modal.module.mjs +4 -4
- package/esm2022/v-angular/modal/slide-out/slide-out.component.mjs +6 -6
- package/esm2022/v-angular/radio/radio.component.mjs +11 -11
- package/esm2022/v-angular/radio/radio.module.mjs +4 -4
- package/esm2022/v-angular/textarea/textarea.component.mjs +9 -9
- package/esm2022/v-angular/textarea/textarea.module.mjs +4 -4
- package/esm2022/v-angular/tooltip/tooltip.directive.mjs +5 -5
- package/esm2022/v-angular/tooltip/tooltip.module.mjs +4 -4
- package/esm2022/v-angular/v-angular.module.mjs +4 -4
- package/fesm2022/sebgroup-green-angular-src-lib-accordion.mjs +11 -11
- package/fesm2022/sebgroup-green-angular-src-lib-accordion.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-badge.mjs +8 -8
- package/fesm2022/sebgroup-green-angular-src-lib-badge.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-button.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-lib-cell-table.mjs +15 -15
- package/fesm2022/sebgroup-green-angular-src-lib-cell-table.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-context-menu.mjs +8 -15
- package/fesm2022/sebgroup-green-angular-src-lib-context-menu.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-datepicker.mjs +8 -8
- package/fesm2022/sebgroup-green-angular-src-lib-datepicker.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-dropdown.mjs +17 -22
- package/fesm2022/sebgroup-green-angular-src-lib-dropdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-in-page-wizard.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-lib-in-page-wizard.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-modal.mjs +25 -25
- package/fesm2022/sebgroup-green-angular-src-lib-modal.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-pagination.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-lib-pagination.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-progress-circle.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-lib-progress-circle.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-segmented-control.mjs +8 -8
- package/fesm2022/sebgroup-green-angular-src-lib-segmented-control.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs +15 -15
- package/fesm2022/sebgroup-green-angular-src-lib-shared.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-slider.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-lib-slider.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-lib-sortable-list.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-lib-sortable-list.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs +11 -11
- package/fesm2022/sebgroup-green-angular-src-v-angular-base-control-value-accessor.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-breadcrumbs.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-v-angular-breadcrumbs.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-button.mjs +10 -10
- package/fesm2022/sebgroup-green-angular-src-v-angular-button.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-card.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-v-angular-character-countdown.mjs +8 -8
- package/fesm2022/sebgroup-green-angular-src-v-angular-character-countdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-checkbox.mjs +11 -11
- package/fesm2022/sebgroup-green-angular-src-v-angular-checkbox.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-core.mjs +3 -3
- package/fesm2022/sebgroup-green-angular-src-v-angular-core.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs +38 -38
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-external-link.mjs +8 -8
- package/fesm2022/sebgroup-green-angular-src-v-angular-external-link.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-i18n.mjs +24 -18
- package/fesm2022/sebgroup-green-angular-src-v-angular-i18n.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-info-circle.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-v-angular-input-mask.mjs +12 -12
- package/fesm2022/sebgroup-green-angular-src-v-angular-input-mask.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs +12 -12
- package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs +21 -21
- package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-radio.mjs +14 -14
- package/fesm2022/sebgroup-green-angular-src-v-angular-radio.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-slug.mjs +7 -7
- package/fesm2022/sebgroup-green-angular-src-v-angular-slug.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs +12 -12
- package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-tooltip.mjs +8 -8
- package/fesm2022/sebgroup-green-angular-src-v-angular-tooltip.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +195 -189
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular.mjs +161 -173
- package/fesm2022/sebgroup-green-angular.mjs.map +1 -1
- package/lib/context-menu/context-menu.component.d.ts +1 -6
- package/lib/datepicker/datepicker.component.d.ts +0 -7
- package/lib/dropdown/dropdown.component.d.ts +1 -6
- package/package.json +10 -10
- package/src/lib/context-menu/context-menu.component.d.ts +1 -6
- package/src/lib/datepicker/datepicker.component.d.ts +0 -7
- package/src/lib/dropdown/dropdown.component.d.ts +1 -6
- package/src/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +1 -1
- package/src/v-angular/button/button.component.d.ts +1 -1
- package/src/v-angular/checkbox/checkbox.component.d.ts +1 -1
- package/src/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +1 -1
- package/src/v-angular/dropdown/dropdown.component.d.ts +1 -1
- package/src/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.d.ts +1 -1
- package/src/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.d.ts +1 -1
- package/src/v-angular/i18n/i18n.module.d.ts +2 -2
- package/src/v-angular/i18n/i18n.test.module.d.ts +1 -1
- package/src/v-angular/input/input.component.d.ts +1 -1
- package/src/v-angular/radio/radio.component.d.ts +1 -1
- package/src/v-angular/textarea/textarea.component.d.ts +1 -1
- package/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +1 -1
- package/v-angular/button/button.component.d.ts +1 -1
- package/v-angular/checkbox/checkbox.component.d.ts +1 -1
- package/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +1 -1
- package/v-angular/dropdown/dropdown.component.d.ts +1 -1
- package/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.d.ts +1 -1
- package/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.d.ts +1 -1
- package/v-angular/i18n/i18n.module.d.ts +2 -2
- package/v-angular/i18n/i18n.test.module.d.ts +1 -1
- package/v-angular/input/input.component.d.ts +1 -1
- package/v-angular/radio/radio.component.d.ts +1 -1
- package/v-angular/textarea/textarea.component.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-v-angular-i18n.mjs","sources":["../../../../libs/angular/src/v-angular/i18n/i18n.module.ts","../../../../libs/angular/src/v-angular/i18n/i18n.test.module.ts","../../../../libs/angular/src/v-angular/i18n/sebgroup-green-angular-src-v-angular-i18n.ts"],"sourcesContent":["import { Inject, Injectable, isDevMode, NgModule } from '@angular/core'\nimport {\n HashMap,\n provideTransloco,\n provideTranslocoMissingHandler,\n TRANSLOCO_TRANSPILER,\n TranslocoLoader,\n TranslocoMissingHandler,\n TranslocoMissingHandlerData,\n TranslocoModule,\n TranslocoTranspiler,\n} from '@
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-v-angular-i18n.mjs","sources":["../../../../libs/angular/src/v-angular/i18n/i18n.module.ts","../../../../libs/angular/src/v-angular/i18n/i18n.test.module.ts","../../../../libs/angular/src/v-angular/i18n/sebgroup-green-angular-src-v-angular-i18n.ts"],"sourcesContent":["import { Inject, Injectable, isDevMode, NgModule } from '@angular/core'\nimport {\n HashMap,\n provideTransloco,\n provideTranslocoMissingHandler,\n TRANSLOCO_TRANSPILER,\n TranslocoLoader,\n TranslocoMissingHandler,\n TranslocoMissingHandlerData,\n TranslocoModule,\n TranslocoTranspiler,\n} from '@jsverse/transloco';\nimport { delay, lastValueFrom, of } from 'rxjs'\n\nimport defaultLang from './i18n.json'\n\n@Injectable()\nexport class NgvMissingHandler implements TranslocoMissingHandler {\n constructor(\n @Inject(TRANSLOCO_TRANSPILER) private transpiler: TranslocoTranspiler,\n ) {}\n handle(key: string, _: TranslocoMissingHandlerData, params: HashMap) {\n const keyWithoutLocale = key.charAt(2) === '.' ? key.substring(3) : key\n const withoutScope = keyWithoutLocale.replace(\n /^((?:\\w+)(?<!label|heading|button|alt|link|title|href|fieldhelp|error|text|image|list)(?:\\.))/,\n '',\n )\n const transpileParams = {\n value: defaultLang[keyWithoutLocale as keyof typeof defaultLang],\n params,\n translation: {},\n key: keyWithoutLocale,\n };\n const transpiledKey = this.transpiler.transpile(transpileParams);\n return transpiledKey || withoutScope\n }\n}\n\nconst en = {\n 'error.fieldinputmask': 'Invalid value pattern',\n 'error.fieldrequired': 'Field must have content',\n 'error.fieldmaxlength':\n 'Field content should not be longer than {{requiredLength}} characters',\n 'label.defaultlabel': 'Label',\n 'label.maxlength': 'characters left',\n 'label.optional': 'Optional',\n}\n\nconst sv = {\n 'error.fieldinputmask': 'Icke giltigt tecken mönster',\n 'error.fieldrequired': 'Fältet får inte lämnas tomt',\n 'error.fieldmaxlength':\n 'Fältinnehållet måste vara längre än {{requiredLength}} tecken',\n 'label.maxlength': 'tecken kvar',\n}\nclass TranslocoInlineLoader implements TranslocoLoader {\n getTranslation(lang: string) {\n if (lang === 'sv') {\n return lastValueFrom(of(sv).pipe(delay(1500)))\n }\n return lastValueFrom(of(en).pipe(delay(500)))\n }\n}\n\n@NgModule({\n providers: [\n provideTransloco({\n config: {\n availableLangs: ['en', 'sv'],\n defaultLang: 'en',\n // Remove this option if your application doesn't support changing language in runtime.\n reRenderOnLangChange: true,\n prodMode: !isDevMode(),\n },\n loader: TranslocoInlineLoader,\n }),\n provideTranslocoMissingHandler(NgvMissingHandler),\n ],\n exports: [TranslocoModule],\n})\nexport class NgvI18nModule {}\n","import { CommonModule } from '@angular/common'\nimport { NgModule, Pipe, PipeTransform } from '@angular/core'\nimport {\n HashMap,\n Translation,\n TRANSLOCO_FALLBACK_STRATEGY,\n TRANSLOCO_INTERCEPTOR,\n TRANSLOCO_MISSING_HANDLER,\n TRANSLOCO_TRANSPILER,\n TranslocoConfig,\n TranslocoFallbackStrategy,\n TranslocoInterceptor,\n TranslocoMissingHandler,\n TranslocoTranspilerFunction,\n} from '@jsverse/transloco'\n\n@Pipe({ name: 'transloco' })\nexport class TranslocoMockPipe implements PipeTransform {\n transform = (value: number): number => value\n}\n\nexport class TranslocoMockTranspiler implements TranslocoTranspilerFunction {\n transpile = (..._args: string[]) => ''\n}\n\nexport class TranslocoMockMissingHandler implements TranslocoMissingHandler {\n handle = (key: string, _: TranslocoConfig, _params: HashMap) => key\n}\n\nexport class TranslocoMockStrategy implements TranslocoFallbackStrategy {\n getNextLangs = (_failedLang: string): any => ''\n}\n\nexport class TranslocoMockInterceptor implements TranslocoInterceptor {\n preSaveTranslation(translation: Translation, _lang: string): Translation {\n return translation\n }\n\n preSaveTranslationKey(_key: string, value: string, _lang: string): string {\n return value\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n declarations: [TranslocoMockPipe],\n exports: [TranslocoMockPipe],\n providers: [\n {\n provide: TRANSLOCO_TRANSPILER,\n useClass: TranslocoMockTranspiler,\n },\n {\n provide: TRANSLOCO_INTERCEPTOR,\n useClass: TranslocoMockInterceptor,\n },\n {\n provide: TRANSLOCO_FALLBACK_STRATEGY,\n useClass: TranslocoMockStrategy,\n },\n {\n provide: TRANSLOCO_MISSING_HANDLER,\n useClass: TranslocoMockMissingHandler,\n deps: [TRANSLOCO_TRANSPILER],\n },\n ],\n})\nexport class NgvI18nTestModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAiBa,iBAAiB,CAAA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A;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,qBAAqB;AAC9B,gBAAA,QAAQ,EAAE,wBAAwB;AACnC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,2BAA2B;AACpC,gBAAA,QAAQ,EAAE,qBAAqB;AAChC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,yBAAyB;AAClC,gBAAA,QAAQ,EAAE,2BAA2B;gBACrC,IAAI,EAAE,CAAC,oBAAoB,CAAC;AAC7B,aAAA;AACF,SAAA,EAAA,OAAA,EAAA,CArBS,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAuBX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAxB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,CAAC,iBAAiB,CAAC;oBACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC5B,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,oBAAoB;AAC7B,4BAAA,QAAQ,EAAE,uBAAuB;AAClC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,qBAAqB;AAC9B,4BAAA,QAAQ,EAAE,wBAAwB;AACnC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,2BAA2B;AACpC,4BAAA,QAAQ,EAAE,qBAAqB;AAChC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,yBAAyB;AAClC,4BAAA,QAAQ,EAAE,2BAA2B;4BACrC,IAAI,EAAE,CAAC,oBAAoB,CAAC;AAC7B,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;AClED;;AAEG;;;;"}
|
|
@@ -15,10 +15,10 @@ class NgvInfoCircleComponent {
|
|
|
15
15
|
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
16
16
|
this.thook = 'info';
|
|
17
17
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInfoCircleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NgvInfoCircleComponent, selector: "nggv-info-circle", inputs: { thook: "thook", info: "info" }, host: { properties: { "attr.data-thook": "this.thook" } }, ngImport: i0, template: "<svg [nggvTooltip]=\"info\">\n <path\n d=\"M10.75 11H12L12 16.25M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill=\"none\"\n />\n <path\n d=\"M11.375 8C11.375 8.34518 11.6548 8.625 12 8.625C12.3452 8.625 12.625 8.34518 12.625 8C12.625 7.65482 12.3452 7.375 12 7.375C11.6548 7.375 11.375 7.65482 11.375 8Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"0.25\"\n />\n</svg>\n", styles: [":host{display:block}svg{display:block;width:1.5rem;height:1.5rem}.gds-tooltip{background-color:#1a1a1a;color:#fff;font-size:.875rem;font-weight:400;line-height:1.5;padding:.5rem;pointer-events:none}.gds-tooltip__arrow-top{position:absolute;width:0;height:0;border:.5rem solid transparent;bottom:-1rem;left:50%;transform:translate(-50%);border-color:#1a1a1a transparent transparent}.gds-tooltip__arrow-bottom{position:absolute;width:0;height:0;border:.5rem solid transparent;top:-1rem;left:50%;transform:translate(-50%);border-color:transparent transparent #1a1a1a}.gds-tooltip__arrow-left{position:absolute;width:0;height:0;border:.5rem solid transparent;right:-1rem;top:50%;transform:translateY(-50%);border-color:transparent transparent transparent #1a1a1a}.gds-tooltip__arrow-right{position:absolute;width:0;height:0;border:.5rem solid transparent;left:-1rem;top:50%;transform:translateY(-50%);border-color:transparent #1a1a1a transparent transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgvTooltipDirective, selector: "[nggvTooltip]", inputs: ["nggvTooltip", "thook", "placement", "shown", "offset", "resizeThrottle", "maxWidth"], outputs: ["nggvShow", "nggvHide"] }] }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInfoCircleComponent, decorators: [{
|
|
22
22
|
type: Component,
|
|
23
23
|
args: [{ selector: 'nggv-info-circle', template: "<svg [nggvTooltip]=\"info\">\n <path\n d=\"M10.75 11H12L12 16.25M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n fill=\"none\"\n />\n <path\n d=\"M11.375 8C11.375 8.34518 11.6548 8.625 12 8.625C12.3452 8.625 12.625 8.34518 12.625 8C12.625 7.65482 12.3452 7.375 12 7.375C11.6548 7.375 11.375 7.65482 11.375 8Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"0.25\"\n />\n</svg>\n", styles: [":host{display:block}svg{display:block;width:1.5rem;height:1.5rem}.gds-tooltip{background-color:#1a1a1a;color:#fff;font-size:.875rem;font-weight:400;line-height:1.5;padding:.5rem;pointer-events:none}.gds-tooltip__arrow-top{position:absolute;width:0;height:0;border:.5rem solid transparent;bottom:-1rem;left:50%;transform:translate(-50%);border-color:#1a1a1a transparent transparent}.gds-tooltip__arrow-bottom{position:absolute;width:0;height:0;border:.5rem solid transparent;top:-1rem;left:50%;transform:translate(-50%);border-color:transparent transparent #1a1a1a}.gds-tooltip__arrow-left{position:absolute;width:0;height:0;border:.5rem solid transparent;right:-1rem;top:50%;transform:translateY(-50%);border-color:transparent transparent transparent #1a1a1a}.gds-tooltip__arrow-right{position:absolute;width:0;height:0;border:.5rem solid transparent;left:-1rem;top:50%;transform:translateY(-50%);border-color:transparent #1a1a1a transparent transparent}\n"] }]
|
|
24
24
|
}], propDecorators: { thook: [{
|
|
@@ -31,11 +31,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
31
31
|
}] } });
|
|
32
32
|
|
|
33
33
|
class NgvInfoCircleModule {
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
35
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
36
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInfoCircleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
35
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NgvInfoCircleModule, declarations: [NgvInfoCircleComponent], imports: [CommonModule, NggCoreWrapperModule, NgvTooltipModule], exports: [NgvInfoCircleComponent] }); }
|
|
36
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInfoCircleModule, imports: [CommonModule, NggCoreWrapperModule, NgvTooltipModule] }); }
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInfoCircleModule, decorators: [{
|
|
39
39
|
type: NgModule,
|
|
40
40
|
args: [{
|
|
41
41
|
declarations: [NgvInfoCircleComponent],
|
|
@@ -12,10 +12,10 @@ class InputMaskFormatPipe {
|
|
|
12
12
|
return value;
|
|
13
13
|
return InputmaskStatic.format(value, options);
|
|
14
14
|
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
16
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputMaskFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
16
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: InputMaskFormatPipe, name: "nggvInputMaskFormat" }); }
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputMaskFormatPipe, decorators: [{
|
|
19
19
|
type: Pipe,
|
|
20
20
|
args: [{
|
|
21
21
|
name: 'nggvInputMaskFormat',
|
|
@@ -156,15 +156,15 @@ class NgvInputMaskDirective {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
160
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
159
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputMaskDirective, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: INPUT_MASK_CONFIG }, { token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
160
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NgvInputMaskDirective, selector: "[nggvInputMask]", inputs: { nggvInputMask: "nggvInputMask" }, host: { listeners: { "input": "onInput($event.target.value)", "blur": "onTouched($event.target.value)", "keyup": "onKeyUp($event)" } }, ngImport: i0 }); }
|
|
161
161
|
}
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputMaskDirective, decorators: [{
|
|
163
163
|
type: Directive,
|
|
164
164
|
args: [{
|
|
165
165
|
selector: '[nggvInputMask]',
|
|
166
166
|
}]
|
|
167
|
-
}], ctorParameters:
|
|
167
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
168
168
|
type: Optional
|
|
169
169
|
}, {
|
|
170
170
|
type: Self
|
|
@@ -174,7 +174,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
174
174
|
}] }, { type: undefined, decorators: [{
|
|
175
175
|
type: Inject,
|
|
176
176
|
args: [PLATFORM_ID]
|
|
177
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]
|
|
177
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { nggvInputMask: [{
|
|
178
178
|
type: Input
|
|
179
179
|
}], onInput: [{
|
|
180
180
|
type: HostListener,
|
|
@@ -194,16 +194,16 @@ class NgvInputMaskModule {
|
|
|
194
194
|
providers: [{ provide: INPUT_MASK_CONFIG, useValue: config }],
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
198
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
199
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputMaskModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
198
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NgvInputMaskModule, declarations: [NgvInputMaskDirective, InputMaskFormatPipe], exports: [NgvInputMaskDirective, InputMaskFormatPipe] }); }
|
|
199
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputMaskModule, providers: [
|
|
200
200
|
{
|
|
201
201
|
provide: INPUT_MASK_CONFIG,
|
|
202
202
|
useClass: InputMaskConfig,
|
|
203
203
|
},
|
|
204
204
|
] }); }
|
|
205
205
|
}
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputMaskModule, decorators: [{
|
|
207
207
|
type: NgModule,
|
|
208
208
|
args: [{
|
|
209
209
|
declarations: [NgvInputMaskDirective, InputMaskFormatPipe],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-v-angular-input-mask.mjs","sources":["../../../../libs/angular/src/v-angular/input-mask/input-mask-format.pipe.ts","../../../../libs/angular/src/v-angular/input-mask/config.ts","../../../../libs/angular/src/v-angular/input-mask/input-mask.directive.ts","../../../../libs/angular/src/v-angular/input-mask/input-mask.module.ts","../../../../libs/angular/src/v-angular/input-mask/constants.ts","../../../../libs/angular/src/v-angular/input-mask/sebgroup-green-angular-src-v-angular-input-mask.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core'\nimport _Inputmask from 'inputmask'\n\nimport type Inputmask from 'inputmask'\n\nimport type { InputmaskOptions } from './input-mask.types'\n\nconst InputmaskStatic =\n (_Inputmask as unknown as { default?: Inputmask.Static }).default ||\n _Inputmask\n\n@Pipe({\n name: 'nggvInputMaskFormat',\n})\nexport class InputMaskFormatPipe implements PipeTransform {\n transform<T = any>(value: any, options: InputmaskOptions<T>): any {\n if (!value) return value\n return InputmaskStatic.format(value, options)\n }\n}\n","import { InjectionToken } from '@angular/core'\n\nexport class InputMaskConfig {\n isAsync = false\n inputSelector = 'input'\n}\n\nexport const INPUT_MASK_CONFIG = new InjectionToken<InputMaskConfig>(\n 'InputMaskConfig',\n)\n","import { isPlatformServer } from '@angular/common'\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Optional,\n PLATFORM_ID,\n Renderer2,\n Self,\n} from '@angular/core'\nimport {\n AbstractControl,\n ControlValueAccessor,\n NgControl,\n Validator,\n} from '@angular/forms'\nimport _Inputmask from 'inputmask'\n\nimport type Inputmask from 'inputmask'\n\nimport { INPUT_MASK_CONFIG, InputMaskConfig } from './config'\n\nimport type { InputmaskOptions } from './input-mask.types'\n\nconst InputmaskConstructor =\n (_Inputmask as unknown as { default?: Inputmask.Static }).default ||\n _Inputmask\n\n@Directive({\n selector: '[nggvInputMask]',\n})\nexport class NgvInputMaskDirective<T = any>\n implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator\n{\n /** Input settings of directive */\n @Input() nggvInputMask: InputmaskOptions<T> = {}\n\n inputMaskPlugin: Inputmask.Instance | undefined\n nativeInputElement: HTMLInputElement | undefined\n defaultInputMaskConfig = new InputMaskConfig()\n\n private mutationObserver: MutationObserver | undefined\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n @Inject(INPUT_MASK_CONFIG) config: InputMaskConfig,\n @Inject(PLATFORM_ID) private platformId: string,\n private elementRef: ElementRef<HTMLInputElement | any>,\n private renderer: Renderer2,\n private ngZone: NgZone,\n ) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this\n }\n this.setNativeInputElement(config)\n }\n\n @HostListener('input', ['$event.target.value'])\n onInput = (_: any) => {\n // Empty method\n }\n\n @HostListener('blur', ['$event.target.value'])\n onTouched = (_: any) => {\n // Empty method\n }\n\n @HostListener('keyup', ['$event'])\n onKeyUp(event: KeyboardEvent) {\n // Trigger \"onInput\" when pressing delete or backspace, when input is focused\n if (['Delete', 'Backspace'].includes(event.key)) {\n this.elementRef.nativeElement.dispatchEvent(\n new Event('input', {\n bubbles: true,\n cancelable: true,\n }),\n )\n }\n }\n\n ngOnInit() {\n if (this.control) {\n this.control.setValidators(\n this.control.validator\n ? [this.control.validator, this.validate]\n : [this.validate],\n )\n\n this.control.updateValueAndValidity()\n }\n }\n\n ngOnDestroy(): void {\n this.inputMaskPlugin?.remove()\n this.mutationObserver?.disconnect()\n }\n\n initInputMask() {\n if (\n isPlatformServer(this.platformId) ||\n !this.nativeInputElement ||\n !Object.keys(this.nggvInputMask).length\n ) {\n return\n }\n\n this.inputMaskPlugin = this.ngZone.runOutsideAngular(() =>\n new InputmaskConstructor(this.inputMaskOptions).mask(\n this.nativeInputElement as HTMLInputElement,\n ),\n )\n\n if (this.control) {\n setTimeout(() => {\n this.control!.updateValueAndValidity()\n })\n }\n }\n\n ngAfterViewInit() {\n this.initInputMask()\n }\n\n get inputMaskOptions(): Inputmask.Options {\n const { parser, ...options } = this.nggvInputMask\n return options\n }\n\n writeValue(value: string): void {\n if (this.nativeInputElement) {\n this.renderer.setProperty(this.nativeInputElement, 'value', value ?? '')\n }\n }\n\n registerOnChange(fn: (_: T | null) => void): void {\n // Use injected parser from settings to modify value\n // of users desire\n this.onInput = (value) => {\n const parser = this.nggvInputMask?.parser\n const newValue = parser && value ? parser(value) : value\n fn(newValue)\n }\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n validate = (control: AbstractControl): { [key: string]: any } | null =>\n !control.value || !this.inputMaskPlugin || this.inputMaskPlugin.isValid()\n ? null\n : { invalidformat: true }\n\n setDisabledState(disabled: boolean): void {\n if (this.nativeInputElement) {\n this.renderer.setProperty(this.nativeInputElement, 'disabled', disabled)\n }\n }\n\n private get control(): AbstractControl | null | undefined {\n return this.ngControl?.control\n }\n\n private setNativeInputElement(config: InputMaskConfig) {\n if (this.elementRef.nativeElement.tagName === 'INPUT') {\n this.nativeInputElement = this.elementRef.nativeElement\n } else {\n this.defaultInputMaskConfig = {\n ...this.defaultInputMaskConfig,\n ...config,\n }\n if (this.defaultInputMaskConfig.isAsync) {\n // Create an observer instance linked to the callback function\n this.mutationObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n const nativeInputElement =\n this.elementRef.nativeElement.querySelector(\n this.defaultInputMaskConfig.inputSelector,\n )\n if (nativeInputElement) {\n this.nativeInputElement = nativeInputElement\n this.mutationObserver?.disconnect()\n this.initInputMask()\n }\n }\n }\n })\n\n // Start observing the target node for configured mutations\n this.mutationObserver.observe(this.elementRef.nativeElement, {\n childList: true,\n subtree: true,\n })\n } else {\n this.nativeInputElement = this.elementRef.nativeElement.querySelector(\n this.defaultInputMaskConfig.inputSelector,\n )\n }\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core'\n\nimport { INPUT_MASK_CONFIG, InputMaskConfig } from './config'\nimport { InputMaskFormatPipe } from './input-mask-format.pipe'\nimport { NgvInputMaskDirective } from './input-mask.directive'\n\n@NgModule({\n declarations: [NgvInputMaskDirective, InputMaskFormatPipe],\n exports: [NgvInputMaskDirective, InputMaskFormatPipe],\n providers: [\n {\n provide: INPUT_MASK_CONFIG,\n useClass: InputMaskConfig,\n },\n ],\n})\nexport class NgvInputMaskModule {\n static forRoot(\n config?: Partial<InputMaskConfig>,\n ): ModuleWithProviders<NgvInputMaskModule> {\n return {\n ngModule: NgvInputMaskModule,\n providers: [{ provide: INPUT_MASK_CONFIG, useValue: config }],\n }\n }\n}\n","import { InputmaskOptions } from './input-mask.types'\n\nexport const createMask = <T>(\n options: string | InputmaskOptions<T>,\n): InputmaskOptions<T> =>\n typeof options === 'string' ? { mask: options } : options\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,eAAe,GAClB,UAAwD,CAAC,OAAO;AACjE,IAAA,UAAU,CAAA;MAKC,mBAAmB,CAAA;IAC9B,SAAS,CAAU,KAAU,EAAE,OAA4B,EAAA;AACzD,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,KAAK,CAAA;QACxB,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;KAC9C;+GAJU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAnB,mBAAmB,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,CAAA,EAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,qBAAqB;AAC5B,iBAAA,CAAA;;;MCXY,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACE,IAAO,CAAA,OAAA,GAAG,KAAK,CAAA;QACf,IAAa,CAAA,aAAA,GAAG,OAAO,CAAA;KACxB;AAAA,CAAA;AAEM,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,iBAAiB,CAClB;;ACqBD,MAAM,oBAAoB,GACvB,UAAwD,CAAC,OAAO;AACjE,IAAA,UAAU,CAAA;MAKC,qBAAqB,CAAA;IAYhC,WAC6B,CAAA,SAAoB,EACpB,MAAuB,EACrB,UAAkB,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AAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,iBATd,qBAAqB,EAAE,mBAAmB,CAC/C,EAAA,OAAA,EAAA,CAAA,qBAAqB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;AAQzC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAPlB,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,QAAQ,EAAE,eAAe;AAC1B,aAAA;AACF,SAAA,EAAA,CAAA,CAAA,EAAA;;4FAEU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAV9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;AAC1D,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;AACrD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,eAAe;AAC1B,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACbY,MAAA,UAAU,GAAG,CACxB,OAAqC,KAErC,OAAO,OAAO,KAAK,QAAQ,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG;;ACLpD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-v-angular-input-mask.mjs","sources":["../../../../libs/angular/src/v-angular/input-mask/input-mask-format.pipe.ts","../../../../libs/angular/src/v-angular/input-mask/config.ts","../../../../libs/angular/src/v-angular/input-mask/input-mask.directive.ts","../../../../libs/angular/src/v-angular/input-mask/input-mask.module.ts","../../../../libs/angular/src/v-angular/input-mask/constants.ts","../../../../libs/angular/src/v-angular/input-mask/sebgroup-green-angular-src-v-angular-input-mask.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core'\nimport _Inputmask from 'inputmask'\n\nimport type Inputmask from 'inputmask'\n\nimport type { InputmaskOptions } from './input-mask.types'\n\nconst InputmaskStatic =\n (_Inputmask as unknown as { default?: Inputmask.Static }).default ||\n _Inputmask\n\n@Pipe({\n name: 'nggvInputMaskFormat',\n})\nexport class InputMaskFormatPipe implements PipeTransform {\n transform<T = any>(value: any, options: InputmaskOptions<T>): any {\n if (!value) return value\n return InputmaskStatic.format(value, options)\n }\n}\n","import { InjectionToken } from '@angular/core'\n\nexport class InputMaskConfig {\n isAsync = false\n inputSelector = 'input'\n}\n\nexport const INPUT_MASK_CONFIG = new InjectionToken<InputMaskConfig>(\n 'InputMaskConfig',\n)\n","import { isPlatformServer } from '@angular/common'\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Optional,\n PLATFORM_ID,\n Renderer2,\n Self,\n} from '@angular/core'\nimport {\n AbstractControl,\n ControlValueAccessor,\n NgControl,\n Validator,\n} from '@angular/forms'\nimport _Inputmask from 'inputmask'\n\nimport type Inputmask from 'inputmask'\n\nimport { INPUT_MASK_CONFIG, InputMaskConfig } from './config'\n\nimport type { InputmaskOptions } from './input-mask.types'\n\nconst InputmaskConstructor =\n (_Inputmask as unknown as { default?: Inputmask.Static }).default ||\n _Inputmask\n\n@Directive({\n selector: '[nggvInputMask]',\n})\nexport class NgvInputMaskDirective<T = any>\n implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator\n{\n /** Input settings of directive */\n @Input() nggvInputMask: InputmaskOptions<T> = {}\n\n inputMaskPlugin: Inputmask.Instance | undefined\n nativeInputElement: HTMLInputElement | undefined\n defaultInputMaskConfig = new InputMaskConfig()\n\n private mutationObserver: MutationObserver | undefined\n\n constructor(\n @Optional() @Self() public ngControl: NgControl,\n @Inject(INPUT_MASK_CONFIG) config: InputMaskConfig,\n @Inject(PLATFORM_ID) private platformId: string,\n private elementRef: ElementRef<HTMLInputElement | any>,\n private renderer: Renderer2,\n private ngZone: NgZone,\n ) {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this\n }\n this.setNativeInputElement(config)\n }\n\n @HostListener('input', ['$event.target.value'])\n onInput = (_: any) => {\n // Empty method\n }\n\n @HostListener('blur', ['$event.target.value'])\n onTouched = (_: any) => {\n // Empty method\n }\n\n @HostListener('keyup', ['$event'])\n onKeyUp(event: KeyboardEvent) {\n // Trigger \"onInput\" when pressing delete or backspace, when input is focused\n if (['Delete', 'Backspace'].includes(event.key)) {\n this.elementRef.nativeElement.dispatchEvent(\n new Event('input', {\n bubbles: true,\n cancelable: true,\n }),\n )\n }\n }\n\n ngOnInit() {\n if (this.control) {\n this.control.setValidators(\n this.control.validator\n ? [this.control.validator, this.validate]\n : [this.validate],\n )\n\n this.control.updateValueAndValidity()\n }\n }\n\n ngOnDestroy(): void {\n this.inputMaskPlugin?.remove()\n this.mutationObserver?.disconnect()\n }\n\n initInputMask() {\n if (\n isPlatformServer(this.platformId) ||\n !this.nativeInputElement ||\n !Object.keys(this.nggvInputMask).length\n ) {\n return\n }\n\n this.inputMaskPlugin = this.ngZone.runOutsideAngular(() =>\n new InputmaskConstructor(this.inputMaskOptions).mask(\n this.nativeInputElement as HTMLInputElement,\n ),\n )\n\n if (this.control) {\n setTimeout(() => {\n this.control!.updateValueAndValidity()\n })\n }\n }\n\n ngAfterViewInit() {\n this.initInputMask()\n }\n\n get inputMaskOptions(): Inputmask.Options {\n const { parser, ...options } = this.nggvInputMask\n return options\n }\n\n writeValue(value: string): void {\n if (this.nativeInputElement) {\n this.renderer.setProperty(this.nativeInputElement, 'value', value ?? '')\n }\n }\n\n registerOnChange(fn: (_: T | null) => void): void {\n // Use injected parser from settings to modify value\n // of users desire\n this.onInput = (value) => {\n const parser = this.nggvInputMask?.parser\n const newValue = parser && value ? parser(value) : value\n fn(newValue)\n }\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn\n }\n\n validate = (control: AbstractControl): { [key: string]: any } | null =>\n !control.value || !this.inputMaskPlugin || this.inputMaskPlugin.isValid()\n ? null\n : { invalidformat: true }\n\n setDisabledState(disabled: boolean): void {\n if (this.nativeInputElement) {\n this.renderer.setProperty(this.nativeInputElement, 'disabled', disabled)\n }\n }\n\n private get control(): AbstractControl | null | undefined {\n return this.ngControl?.control\n }\n\n private setNativeInputElement(config: InputMaskConfig) {\n if (this.elementRef.nativeElement.tagName === 'INPUT') {\n this.nativeInputElement = this.elementRef.nativeElement\n } else {\n this.defaultInputMaskConfig = {\n ...this.defaultInputMaskConfig,\n ...config,\n }\n if (this.defaultInputMaskConfig.isAsync) {\n // Create an observer instance linked to the callback function\n this.mutationObserver = new MutationObserver((mutationsList) => {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n const nativeInputElement =\n this.elementRef.nativeElement.querySelector(\n this.defaultInputMaskConfig.inputSelector,\n )\n if (nativeInputElement) {\n this.nativeInputElement = nativeInputElement\n this.mutationObserver?.disconnect()\n this.initInputMask()\n }\n }\n }\n })\n\n // Start observing the target node for configured mutations\n this.mutationObserver.observe(this.elementRef.nativeElement, {\n childList: true,\n subtree: true,\n })\n } else {\n this.nativeInputElement = this.elementRef.nativeElement.querySelector(\n this.defaultInputMaskConfig.inputSelector,\n )\n }\n }\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core'\n\nimport { INPUT_MASK_CONFIG, InputMaskConfig } from './config'\nimport { InputMaskFormatPipe } from './input-mask-format.pipe'\nimport { NgvInputMaskDirective } from './input-mask.directive'\n\n@NgModule({\n declarations: [NgvInputMaskDirective, InputMaskFormatPipe],\n exports: [NgvInputMaskDirective, InputMaskFormatPipe],\n providers: [\n {\n provide: INPUT_MASK_CONFIG,\n useClass: InputMaskConfig,\n },\n ],\n})\nexport class NgvInputMaskModule {\n static forRoot(\n config?: Partial<InputMaskConfig>,\n ): ModuleWithProviders<NgvInputMaskModule> {\n return {\n ngModule: NgvInputMaskModule,\n providers: [{ provide: INPUT_MASK_CONFIG, useValue: config }],\n }\n }\n}\n","import { InputmaskOptions } from './input-mask.types'\n\nexport const createMask = <T>(\n options: string | InputmaskOptions<T>,\n): InputmaskOptions<T> =>\n typeof options === 'string' ? { mask: options } : options\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,eAAe,GAClB,UAAwD,CAAC,OAAO;AACjE,IAAA,UAAU,CAAA;MAKC,mBAAmB,CAAA;IAC9B,SAAS,CAAU,KAAU,EAAE,OAA4B,EAAA;AACzD,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,KAAK,CAAA;QACxB,OAAO,eAAe,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;KAC9C;+GAJU,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;6GAAnB,mBAAmB,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,CAAA,EAAA;;4FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,qBAAqB;AAC5B,iBAAA,CAAA;;;MCXY,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;QACE,IAAO,CAAA,OAAA,GAAG,KAAK,CAAA;QACf,IAAa,CAAA,aAAA,GAAG,OAAO,CAAA;KACxB;AAAA,CAAA;AAEM,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,iBAAiB,CAClB;;ACqBD,MAAM,oBAAoB,GACvB,UAAwD,CAAC,OAAO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
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import * as i3 from '@
|
|
6
|
-
import { TRANSLOCO_SCOPE } from '@
|
|
5
|
+
import * as i3 from '@jsverse/transloco';
|
|
6
|
+
import { TRANSLOCO_SCOPE } from '@jsverse/transloco';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
import { takeUntil, debounceTime } from 'rxjs/operators';
|
|
9
9
|
import { NgvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor';
|
|
@@ -164,13 +164,13 @@ class NgvInputComponent extends NgvBaseControlValueAccessorComponent {
|
|
|
164
164
|
this.onChange(this.state);
|
|
165
165
|
this.inputChange$.next(this.state);
|
|
166
166
|
}
|
|
167
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
168
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NgvInputComponent, selector: "nggv-input", inputs: { thook: "thook", type: "type", placeholder: "placeholder", autocomplete: "autocomplete", readonly: "readonly", email: "email", min: "min", max: "max", step: "step", minLength: "minLength", minlength: "minlength", maxLength: "maxLength", maxlength: "maxlength", showCharacterCountdown: "showCharacterCountdown", pattern: "pattern", debounceTime: "debounceTime", badgeText: "badgeText", inputMask: "inputMask" }, outputs: { nggvInput: "nggvInput" }, host: { properties: { "class": "this.class", "attr.data-thook": "this.thook" } }, usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"sdv-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"sdv-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.id]=\"id + '-message'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span *ngIf=\"error; else errorsRef\">{{ error }}</span>\n <ng-template #errorsRef>\n <span *ngIf=\"firstError as error\">\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:1rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span{font-weight:500}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%}:host .gds-input-wrapper{display:flex;flex-direction:column;position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:-moz-fit-content;width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{color:var(--intent-danger-background, #9f000a)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NgvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.CharacterCountdownDirective, selector: "[nggvCharacterCountdown]", inputs: ["nggvCharacterCountdown", "nggvCharacterCountdownCurrentLength"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
|
|
167
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
168
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NgvInputComponent, selector: "nggv-input", inputs: { thook: "thook", type: "type", placeholder: "placeholder", autocomplete: "autocomplete", readonly: "readonly", email: "email", min: "min", max: "max", step: "step", minLength: "minLength", minlength: "minlength", maxLength: "maxLength", maxlength: "maxlength", showCharacterCountdown: "showCharacterCountdown", pattern: "pattern", debounceTime: "debounceTime", badgeText: "badgeText", inputMask: "inputMask" }, outputs: { nggvInput: "nggvInput" }, host: { properties: { "class": "this.class", "attr.data-thook": "this.thook" } }, usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"sdv-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"sdv-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.id]=\"id + '-message'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span *ngIf=\"error; else errorsRef\">{{ error }}</span>\n <ng-template #errorsRef>\n <span *ngIf=\"firstError as error\">\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:1rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span{font-weight:500}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%}:host .gds-input-wrapper{display:flex;flex-direction:column;position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{color:var(--intent-danger-background, #9f000a)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NgvInputMaskDirective, selector: "[nggvInputMask]", inputs: ["nggvInputMask"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.CharacterCountdownDirective, selector: "[nggvCharacterCountdown]", inputs: ["nggvCharacterCountdown", "nggvCharacterCountdownCurrentLength"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.InputMaskFormatPipe, name: "nggvInputMaskFormat" }] }); }
|
|
169
169
|
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputComponent, decorators: [{
|
|
171
171
|
type: Component,
|
|
172
|
-
args: [{ selector: 'nggv-input', template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"sdv-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"sdv-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.id]=\"id + '-message'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span *ngIf=\"error; else errorsRef\">{{ error }}</span>\n <ng-template #errorsRef>\n <span *ngIf=\"firstError as error\">\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:1rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span{font-weight:500}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%}:host .gds-input-wrapper{display:flex;flex-direction:column;position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:-moz-fit-content;width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{color:var(--intent-danger-background, #9f000a)}\n"] }]
|
|
173
|
-
}], ctorParameters:
|
|
172
|
+
args: [{ selector: 'nggv-input', template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"sdv-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"sdv-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.id]=\"id + '-message'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span *ngIf=\"error; else errorsRef\">{{ error }}</span>\n <ng-template #errorsRef>\n <span *ngIf=\"firstError as error\">\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n", styles: [":host.gds-form-item{display:flex;flex-direction:column;max-width:100%;position:relative;width:100%;z-index:0}:host.gds-form-item:not(:last-child){margin-bottom:1.5rem}:host.gds-form-item .gds-form-item__header{display:flex}:host.gds-form-item .gds-form-item__header .form-info{font-weight:400}:host.gds-form-item .gds-form-item__header button.icon.small{margin-top:-.5rem;margin-right:-.5rem}:host.gds-form-item .gds-form-item__labels{flex:1;margin-bottom:.5rem}:host.gds-form-item .gds-form-item__labels .form-info{margin-bottom:0}:host.gds-form-item .gds-form-item__labels .form-info a:link:not(.button,[aria-disabled]){color:#0062bc}:host.gds-form-item .gds-form-item__labels>*{width:100%;display:block}:host.gds-form-item .gds-form-item__expandable-info{overflow:hidden;font-size:.875rem;line-height:1.25rem;transition:height .3s cubic-bezier(.23,1,.32,1)}:host.gds-form-item .gds-form-item__expandable-info>div{padding-bottom:.5rem}:host.gds-form-item .gds-form-item__backdrop{position:absolute;inset:0;background:var(--gds-ref-pallet-base100);border-radius:2px;z-index:-1;margin:-1rem;opacity:0;transition:all .3s cubic-bezier(.23,1,.32,1);border:1px solid transparent}@media (prefers-reduced-motion: reduce){:host.gds-form-item .gds-form-item__backdrop{transition:none}}:host.gds-form-item:has([aria-expanded=true]) .gds-form-item__backdrop{opacity:1;border-radius:.25rem;border-color:var(--gds-ref-pallet-base600)}:host.gds-form-item .gds-form-item__footer:not(:empty){margin-top:.5rem;display:flex;column-gap:1rem}:host.gds-form-item .gds-form-item__footer:not(:empty)>span{font-weight:500}:host .hide-if-empty:empty{display:none}:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);background-color:var(--sg-form-control-bg);color:var(--sg-text-primary);min-height:2.75rem;display:flex;align-items:center;justify-content:center}:host input:not([type]):focus:not(:focus-visible),:host input[type=date]:focus:not(:focus-visible),:host input[type=datetime]:focus:not(:focus-visible),:host input[type=datetime-local]:focus:not(:focus-visible),:host input[type=email]:focus:not(:focus-visible),:host input[type=month]:focus:not(:focus-visible),:host input[type=number]:focus:not(:focus-visible),:host input[type=password]:focus:not(:focus-visible),:host input[type=search]:focus:not(:focus-visible),:host input[type=tel]:focus:not(:focus-visible),:host input[type=text]:focus:not(:focus-visible),:host input[type=time]:focus:not(:focus-visible),:host input[type=url]:focus:not(:focus-visible),:host input[type=week]:focus:not(:focus-visible){box-shadow:none;outline:0}:host input:not([type]):focus,:host input:not([type]):focus-visible,:host input[type=date]:focus,:host input[type=date]:focus-visible,:host input[type=datetime]:focus,:host input[type=datetime]:focus-visible,:host input[type=datetime-local]:focus,:host input[type=datetime-local]:focus-visible,:host input[type=email]:focus,:host input[type=email]:focus-visible,:host input[type=month]:focus,:host input[type=month]:focus-visible,:host input[type=number]:focus,:host input[type=number]:focus-visible,:host input[type=password]:focus,:host input[type=password]:focus-visible,:host input[type=search]:focus,:host input[type=search]:focus-visible,:host input[type=tel]:focus,:host input[type=tel]:focus-visible,:host input[type=text]:focus,:host input[type=text]:focus-visible,:host input[type=time]:focus,:host input[type=time]:focus-visible,:host input[type=url]:focus,:host input[type=url]:focus-visible,:host input[type=week]:focus,:host input[type=week]:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}:host input:not([type]).small,:host input[type=date].small,:host input[type=datetime].small,:host input[type=datetime-local].small,:host input[type=email].small,:host input[type=month].small,:host input[type=number].small,:host input[type=password].small,:host input[type=search].small,:host input[type=tel].small,:host input[type=text].small,:host input[type=time].small,:host input[type=url].small,:host input[type=week].small{min-height:2rem;padding:.25rem .75rem;line-height:1rem}@media screen and (-ms-high-contrast: active){:host input:not([type]),:host input[type=date],:host input[type=datetime],:host input[type=datetime-local],:host input[type=email],:host input[type=month],:host input[type=number],:host input[type=password],:host input[type=search],:host input[type=tel],:host input[type=text],:host input[type=time],:host input[type=url],:host input[type=week]{border:2px solid currentcolor}}:host input:not([type]):disabled,:host input:not([type]).disabled,:host input:not([type])[aria-disabled=true],:host input[type=date]:disabled,:host input[type=date].disabled,:host input[type=date][aria-disabled=true],:host input[type=datetime]:disabled,:host input[type=datetime].disabled,:host input[type=datetime][aria-disabled=true],:host input[type=datetime-local]:disabled,:host input[type=datetime-local].disabled,:host input[type=datetime-local][aria-disabled=true],:host input[type=email]:disabled,:host input[type=email].disabled,:host input[type=email][aria-disabled=true],:host input[type=month]:disabled,:host input[type=month].disabled,:host input[type=month][aria-disabled=true],:host input[type=number]:disabled,:host input[type=number].disabled,:host input[type=number][aria-disabled=true],:host input[type=password]:disabled,:host input[type=password].disabled,:host input[type=password][aria-disabled=true],:host input[type=search]:disabled,:host input[type=search].disabled,:host input[type=search][aria-disabled=true],:host input[type=tel]:disabled,:host input[type=tel].disabled,:host input[type=tel][aria-disabled=true],:host input[type=text]:disabled,:host input[type=text].disabled,:host input[type=text][aria-disabled=true],:host input[type=time]:disabled,:host input[type=time].disabled,:host input[type=time][aria-disabled=true],:host input[type=url]:disabled,:host input[type=url].disabled,:host input[type=url][aria-disabled=true],:host input[type=week]:disabled,:host input[type=week].disabled,:host input[type=week][aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host input:not([type]):disabled::placeholder,:host input:not([type]).disabled::placeholder,:host input:not([type])[aria-disabled=true]::placeholder,:host input[type=date]:disabled::placeholder,:host input[type=date].disabled::placeholder,:host input[type=date][aria-disabled=true]::placeholder,:host input[type=datetime]:disabled::placeholder,:host input[type=datetime].disabled::placeholder,:host input[type=datetime][aria-disabled=true]::placeholder,:host input[type=datetime-local]:disabled::placeholder,:host input[type=datetime-local].disabled::placeholder,:host input[type=datetime-local][aria-disabled=true]::placeholder,:host input[type=email]:disabled::placeholder,:host input[type=email].disabled::placeholder,:host input[type=email][aria-disabled=true]::placeholder,:host input[type=month]:disabled::placeholder,:host input[type=month].disabled::placeholder,:host input[type=month][aria-disabled=true]::placeholder,:host input[type=number]:disabled::placeholder,:host input[type=number].disabled::placeholder,:host input[type=number][aria-disabled=true]::placeholder,:host input[type=password]:disabled::placeholder,:host input[type=password].disabled::placeholder,:host input[type=password][aria-disabled=true]::placeholder,:host input[type=search]:disabled::placeholder,:host input[type=search].disabled::placeholder,:host input[type=search][aria-disabled=true]::placeholder,:host input[type=tel]:disabled::placeholder,:host input[type=tel].disabled::placeholder,:host input[type=tel][aria-disabled=true]::placeholder,:host input[type=text]:disabled::placeholder,:host input[type=text].disabled::placeholder,:host input[type=text][aria-disabled=true]::placeholder,:host input[type=time]:disabled::placeholder,:host input[type=time].disabled::placeholder,:host input[type=time][aria-disabled=true]::placeholder,:host input[type=url]:disabled::placeholder,:host input[type=url].disabled::placeholder,:host input[type=url][aria-disabled=true]::placeholder,:host input[type=week]:disabled::placeholder,:host input[type=week].disabled::placeholder,:host input[type=week][aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host input:not([type]):hover,:host input[type=date]:hover,:host input[type=datetime]:hover,:host input[type=datetime-local]:hover,:host input[type=email]:hover,:host input[type=month]:hover,:host input[type=number]:hover,:host input[type=password]:hover,:host input[type=search]:hover,:host input[type=tel]:hover,:host input[type=text]:hover,:host input[type=time]:hover,:host input[type=url]:hover,:host input[type=week]:hover{background-color:var(--gds-ref-pallet-base100)}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-outer-spin-button,:host input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}:host input{width:100%}:host .gds-input-wrapper{display:flex;flex-direction:column;position:relative;transition:all .2s ease-in-out,outline-offset 0s,outline-width 0s}:host .gds-input-wrapper:before{background:transparent;border-radius:0 0 4px 4px;clip-path:inset(4px 0 0 0);content:\"\";display:block;height:4px;position:absolute;transition:.3s ease-in-out;width:100%}:host .gds-input-wrapper:before{bottom:0}.is-invalid :host .gds-input-wrapper{color:var(--intent-danger-background);opacity:1}.is-invalid :host .gds-input-wrapper:before{background:var(--intent-danger-background);clip-path:inset(1px 0 0 0)}:host label:is(label),:host .label:is(label),:host legend:is(label){margin-bottom:0}:host label.form-control,:host .label.form-control,:host legend.form-control{width:fit-content}@supports (-moz-appearance: none){:host label.form-control:focus:not(:focus-visible),:host .label.form-control:focus:not(:focus-visible),:host legend.form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label.form-control:focus,:host label.form-control:focus-within,:host .label.form-control:focus,:host .label.form-control:focus-within,:host legend.form-control:focus,:host legend.form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.form-control),:host .label:not(.form-control),:host legend:not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label+input,:host label+textarea,fieldset :host label+div,:host label+button,:host label+.group-stepper,:host label+.stepper-wrapper,:host label+.group,:host .label+input,:host .label+textarea,fieldset :host .label+div,:host .label+button,:host .label+.group-stepper,:host .label+.stepper-wrapper,:host .label+.group,:host legend+input,:host legend+textarea,fieldset :host legend+div,:host legend+button,:host legend+.group-stepper,:host legend+.stepper-wrapper,:host legend+.group{margin-top:.5rem}:host label+.form-info,:host .label+.form-info,:host legend+.form-info{margin-bottom:.5rem}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{color:var(--intent-danger-background, #9f000a)}\n"] }]
|
|
173
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
174
174
|
type: Self
|
|
175
175
|
}, {
|
|
176
176
|
type: Optional
|
|
@@ -179,7 +179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
179
179
|
}, {
|
|
180
180
|
type: Inject,
|
|
181
181
|
args: [TRANSLOCO_SCOPE]
|
|
182
|
-
}] }, { type: i0.ChangeDetectorRef }]
|
|
182
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { class: [{
|
|
183
183
|
type: HostBinding,
|
|
184
184
|
args: ['class']
|
|
185
185
|
}], thook: [{
|
|
@@ -226,19 +226,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
226
226
|
}] } });
|
|
227
227
|
|
|
228
228
|
class NgvInputModule {
|
|
229
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
230
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
229
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
230
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: NgvInputModule, declarations: [NgvInputComponent], imports: [CommonModule,
|
|
231
231
|
NgvI18nModule,
|
|
232
232
|
NgvInputMaskModule,
|
|
233
233
|
ReactiveFormsModule,
|
|
234
234
|
NggCharacterCountdownDirectiveModule], exports: [NgvInputComponent] }); }
|
|
235
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
235
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputModule, imports: [CommonModule,
|
|
236
236
|
NgvI18nModule,
|
|
237
237
|
NgvInputMaskModule,
|
|
238
238
|
ReactiveFormsModule,
|
|
239
239
|
NggCharacterCountdownDirectiveModule] }); }
|
|
240
240
|
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgvInputModule, decorators: [{
|
|
242
242
|
type: NgModule,
|
|
243
243
|
args: [{
|
|
244
244
|
declarations: [NgvInputComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-v-angular-input.mjs","sources":["../../../../libs/angular/src/v-angular/input/input.component.ts","../../../../libs/angular/src/v-angular/input/input.component.html","../../../../libs/angular/src/v-angular/input/input.module.ts","../../../../libs/angular/src/v-angular/input/sebgroup-green-angular-src-v-angular-input.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core'\nimport { NgControl, UntypedFormControl } from '@angular/forms'\nimport { TRANSLOCO_SCOPE, TranslocoScope } from '@ngneat/transloco'\nimport { Subject } from 'rxjs'\nimport { debounceTime, takeUntil } from 'rxjs/operators'\n\nimport type { InputmaskOptions } from '@sebgroup/green-angular/src/v-angular/input-mask'\n\nimport { NgvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor'\n\n/**\n * Input fields allow users to add and edit text.\n * https://designlibrary.sebgroup.com/components/component-input\n */\n@Component({\n selector: 'nggv-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss'],\n})\nexport class NgvInputComponent\n extends NgvBaseControlValueAccessorComponent\n implements OnInit, OnDestroy\n{\n /** Adding .gds-form-item as a class to host element */\n @HostBinding('class') class = 'gds-form-item'\n /** Special property used for selecting DOM elements during automated UI testing. */\n @HostBinding('attr.data-thook') @Input() thook = 'input'\n /** Type of input field. Should avoid types that modify field too much such as range. */\n @Input() type = 'text'\n /** Text shown before input has a written value. */\n @Input() placeholder?: string\n /** If set to \"on\", hint for form autofill feature. */\n @Input() autocomplete = 'on'\n /** If set to true, the value will not be editable. */\n @Input() readonly = false\n /** If set to true, enables the Angular template-driven email validator. */\n @Input() email = false\n /** Minimum value required for numeric input types. */\n @Input() min = 0\n /** Maximum value required for numeric input types. */\n @Input() max = Number.MAX_SAFE_INTEGER\n /** Incremental values that are valid for numeric input types. */\n @Input() step = 1\n /** Minimum length (number of characters) of value. */\n @Input() set minLength(length: number) {\n this._minlength = length\n }\n /**\n * Minimum length (number of characters) of value.\n * @deprecated minlength triggers angular-template-validation. Use @Input() minLength instead.\n */\n @Input() set minlength(length: number) {\n this._minlength = length\n }\n get minlength(): number {\n return this._minlength\n }\n /** Maximum length (number of characters) of value. */\n @Input() set maxLength(length: number) {\n this._maxlength = length\n this.writeValue(this.state)\n }\n get maxlength(): number {\n return this._maxlength\n }\n /**\n * Maximum length (number of characters) of value.\n * @deprecated maxlength triggers angular-template-validation. Use @Input() maxLength instead.\n */\n @Input() set maxlength(length: number) {\n this._maxlength = length\n this.writeValue(this.state)\n }\n private _maxlength = Number.MAX_SAFE_INTEGER\n\n private _minlength = 0\n\n /** Wether to show label that tells how many characters are still left to be entered. Will only be set if maxLength is also set */\n private _showCharacterCountDown = true\n @Input() set showCharacterCountdown(option: boolean) {\n this._showCharacterCountDown = option\n }\n get showCharacterCountdown(): boolean {\n return this._showCharacterCountDown && this.hasMaxLength\n }\n\n /** Pattern the value must match to be valid. */\n @Input() pattern = ''\n /** Amount of time to wait until emitting (nggvINput) event */\n @Input() debounceTime = 500\n /**\n * @deprecated\n * Text to put in badge\n */\n @Input() badgeText = ''\n\n /** Settings for input mask if requested */\n private _inputMask!: InputmaskOptions<any>\n @Input() set inputMask(newInputMask: InputmaskOptions<any>) {\n // Hide input field\n this.hideInput$.next(true)\n this.cdr.detectChanges()\n this._inputMask = newInputMask\n\n // Show input field to reload input-mask settings upon update\n setTimeout(() => {\n this.hideInput$.next(false)\n this.cdr.detectChanges()\n }, 200)\n }\n get inputMask(): InputmaskOptions<any> {\n return this._inputMask\n }\n\n /** Emits every time the value of the inner input field changes, independantly of updates on the formcontroller */\n @Output() nggvInput = new EventEmitter<any>()\n\n private _formControl = new UntypedFormControl()\n get control(): UntypedFormControl {\n return (this.ngControl?.control as UntypedFormControl) ?? this._formControl\n }\n /** Returns if maxlength is used */\n get hasMaxLength(): boolean {\n return !!this.maxlength && this.maxlength !== Number.MAX_SAFE_INTEGER\n }\n\n /** Toggler for showing or hiding the input field */\n hideInput$ = new Subject<boolean>()\n\n protected inputChange$ = new Subject<any>()\n protected _destroy$ = new Subject<boolean>()\n\n constructor(\n @Self() @Optional() public ngControl: NgControl,\n @Optional()\n @Inject(TRANSLOCO_SCOPE)\n protected translocoScope: TranslocoScope,\n protected cdr: ChangeDetectorRef,\n ) {\n super(ngControl, translocoScope, cdr)\n }\n\n ngOnInit() {\n super.ngOnInit()\n this.inputChange$\n .pipe(takeUntil(this._destroy$), debounceTime(this.debounceTime))\n .subscribe((inputValue) => {\n this.nggvInput.emit(inputValue)\n })\n }\n\n ngOnDestroy(): void {\n this._destroy$.next(true)\n this._destroy$.complete()\n }\n\n writeValue(value: any) {\n // maxLength will only work with string values\n if (value?.length && value.length > this.maxlength) {\n // cut value to match max length\n this.state = this.cutTextAfterMaxLength(value)\n if (value.length !== this.state.length) {\n this.onChange(this.state)\n }\n // emit value\n } else {\n // update state\n this.state = value\n }\n this.cdr.detectChanges()\n }\n\n cutTextAfterMaxLength(value: any): any {\n if (typeof value === 'string') {\n return value.substring(0, this.maxlength)\n }\n return value\n }\n\n /** @internal */\n onInput(event: Event) {\n event.stopPropagation()\n if (this.disabled) return\n this.state = (event.target as HTMLInputElement).value\n this.onChange(this.state)\n this.inputChange$.next(this.state)\n }\n}\n","<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"sdv-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"sdv-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.id]=\"id + '-message'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span *ngIf=\"error; else errorsRef\">{{ error }}</span>\n <ng-template #errorsRef>\n <span *ngIf=\"firstError as error\">\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { NgvI18nModule } from '@sebgroup/green-angular/src/v-angular/i18n'\nimport { NgvInputMaskModule } from '@sebgroup/green-angular/src/v-angular/input-mask'\nimport { NggCharacterCountdownDirectiveModule } from '@sebgroup/green-angular/src/v-angular/character-countdown';\nimport { NgvInputComponent } from './input.component'\n\n@NgModule({\n declarations: [NgvInputComponent],\n imports: [\n CommonModule,\n NgvI18nModule,\n NgvInputMaskModule,\n ReactiveFormsModule,\n NggCharacterCountdownDirectiveModule,\n ],\n exports: [NgvInputComponent],\n})\nexport class NgvInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAsBA;;;AAGG;AAMG,MAAO,iBACX,SAAQ,oCAAoC,CAAA;;IAwB5C,IAAa,SAAS,CAAC,MAAc,EAAA;AACnC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;KACzB;AACD;;;AAGG;IACH,IAAa,SAAS,CAAC,MAAc,EAAA;AACnC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;KACzB;AACD,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;KACvB;;IAED,IAAa,SAAS,CAAC,MAAc,EAAA;AACnC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;AACxB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC5B;AACD,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;KACvB;AACD;;;AAGG;IACH,IAAa,SAAS,CAAC,MAAc,EAAA;AACnC,QAAA,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;AACxB,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;KAC5B;IAOD,IAAa,sBAAsB,CAAC,MAAe,EAAA;AACjD,QAAA,IAAI,CAAC,uBAAuB,GAAG,MAAM,CAAA;KACtC;AACD,IAAA,IAAI,sBAAsB,GAAA;AACxB,QAAA,OAAO,IAAI,CAAC,uBAAuB,IAAI,IAAI,CAAC,YAAY,CAAA;KACzD;IAcD,IAAa,SAAS,CAAC,YAAmC,EAAA;;AAExD,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;A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"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-v-angular-input.mjs","sources":["../../../../libs/angular/src/v-angular/input/input.component.ts","../../../../libs/angular/src/v-angular/input/input.component.html","../../../../libs/angular/src/v-angular/input/input.module.ts","../../../../libs/angular/src/v-angular/input/sebgroup-green-angular-src-v-angular-input.ts"],"sourcesContent":["import {\n ChangeDetectorRef,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n} from '@angular/core'\nimport { NgControl, UntypedFormControl } from '@angular/forms'\nimport { TRANSLOCO_SCOPE, TranslocoScope } from '@jsverse/transloco'\nimport { Subject } from 'rxjs'\nimport { debounceTime, takeUntil } from 'rxjs/operators'\n\nimport type { InputmaskOptions } from '@sebgroup/green-angular/src/v-angular/input-mask'\n\nimport { NgvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor'\n\n/**\n * Input fields allow users to add and edit text.\n * https://designlibrary.sebgroup.com/components/component-input\n */\n@Component({\n selector: 'nggv-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss'],\n})\nexport class NgvInputComponent\n extends NgvBaseControlValueAccessorComponent\n implements OnInit, OnDestroy\n{\n /** Adding .gds-form-item as a class to host element */\n @HostBinding('class') class = 'gds-form-item'\n /** Special property used for selecting DOM elements during automated UI testing. */\n @HostBinding('attr.data-thook') @Input() thook = 'input'\n /** Type of input field. Should avoid types that modify field too much such as range. */\n @Input() type = 'text'\n /** Text shown before input has a written value. */\n @Input() placeholder?: string\n /** If set to \"on\", hint for form autofill feature. */\n @Input() autocomplete = 'on'\n /** If set to true, the value will not be editable. */\n @Input() readonly = false\n /** If set to true, enables the Angular template-driven email validator. */\n @Input() email = false\n /** Minimum value required for numeric input types. */\n @Input() min = 0\n /** Maximum value required for numeric input types. */\n @Input() max = Number.MAX_SAFE_INTEGER\n /** Incremental values that are valid for numeric input types. */\n @Input() step = 1\n /** Minimum length (number of characters) of value. */\n @Input() set minLength(length: number) {\n this._minlength = length\n }\n /**\n * Minimum length (number of characters) of value.\n * @deprecated minlength triggers angular-template-validation. Use @Input() minLength instead.\n */\n @Input() set minlength(length: number) {\n this._minlength = length\n }\n get minlength(): number {\n return this._minlength\n }\n /** Maximum length (number of characters) of value. */\n @Input() set maxLength(length: number) {\n this._maxlength = length\n this.writeValue(this.state)\n }\n get maxlength(): number {\n return this._maxlength\n }\n /**\n * Maximum length (number of characters) of value.\n * @deprecated maxlength triggers angular-template-validation. Use @Input() maxLength instead.\n */\n @Input() set maxlength(length: number) {\n this._maxlength = length\n this.writeValue(this.state)\n }\n private _maxlength = Number.MAX_SAFE_INTEGER\n\n private _minlength = 0\n\n /** Wether to show label that tells how many characters are still left to be entered. Will only be set if maxLength is also set */\n private _showCharacterCountDown = true\n @Input() set showCharacterCountdown(option: boolean) {\n this._showCharacterCountDown = option\n }\n get showCharacterCountdown(): boolean {\n return this._showCharacterCountDown && this.hasMaxLength\n }\n\n /** Pattern the value must match to be valid. */\n @Input() pattern = ''\n /** Amount of time to wait until emitting (nggvINput) event */\n @Input() debounceTime = 500\n /**\n * @deprecated\n * Text to put in badge\n */\n @Input() badgeText = ''\n\n /** Settings for input mask if requested */\n private _inputMask!: InputmaskOptions<any>\n @Input() set inputMask(newInputMask: InputmaskOptions<any>) {\n // Hide input field\n this.hideInput$.next(true)\n this.cdr.detectChanges()\n this._inputMask = newInputMask\n\n // Show input field to reload input-mask settings upon update\n setTimeout(() => {\n this.hideInput$.next(false)\n this.cdr.detectChanges()\n }, 200)\n }\n get inputMask(): InputmaskOptions<any> {\n return this._inputMask\n }\n\n /** Emits every time the value of the inner input field changes, independantly of updates on the formcontroller */\n @Output() nggvInput = new EventEmitter<any>()\n\n private _formControl = new UntypedFormControl()\n get control(): UntypedFormControl {\n return (this.ngControl?.control as UntypedFormControl) ?? this._formControl\n }\n /** Returns if maxlength is used */\n get hasMaxLength(): boolean {\n return !!this.maxlength && this.maxlength !== Number.MAX_SAFE_INTEGER\n }\n\n /** Toggler for showing or hiding the input field */\n hideInput$ = new Subject<boolean>()\n\n protected inputChange$ = new Subject<any>()\n protected _destroy$ = new Subject<boolean>()\n\n constructor(\n @Self() @Optional() public ngControl: NgControl,\n @Optional()\n @Inject(TRANSLOCO_SCOPE)\n protected translocoScope: TranslocoScope,\n protected cdr: ChangeDetectorRef,\n ) {\n super(ngControl, translocoScope, cdr)\n }\n\n ngOnInit() {\n super.ngOnInit()\n this.inputChange$\n .pipe(takeUntil(this._destroy$), debounceTime(this.debounceTime))\n .subscribe((inputValue) => {\n this.nggvInput.emit(inputValue)\n })\n }\n\n ngOnDestroy(): void {\n this._destroy$.next(true)\n this._destroy$.complete()\n }\n\n writeValue(value: any) {\n // maxLength will only work with string values\n if (value?.length && value.length > this.maxlength) {\n // cut value to match max length\n this.state = this.cutTextAfterMaxLength(value)\n if (value.length !== this.state.length) {\n this.onChange(this.state)\n }\n // emit value\n } else {\n // update state\n this.state = value\n }\n this.cdr.detectChanges()\n }\n\n cutTextAfterMaxLength(value: any): any {\n if (typeof value === 'string') {\n return value.substring(0, this.maxlength)\n }\n return value\n }\n\n /** @internal */\n onInput(event: Event) {\n event.stopPropagation()\n if (this.disabled) return\n this.state = (event.target as HTMLInputElement).value\n this.onChange(this.state)\n this.inputChange$.next(this.state)\n }\n}\n","<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"sdv-field-label hide-if-empty\"\n [attr.for]=\"id + '-input'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"sdv-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <div\n [id]=\"id + '-input'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n <ng-container *ngIf=\"!inputMask\">\n {{ state }}\n </ng-container>\n <ng-container *ngIf=\"!!inputMask\">\n {{ state | nggvInputMaskFormat: inputMask }}\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n\n<!-- INPUT WRAPPER -->\n<ng-container *ngIf=\"!locked\">\n <div class=\"gds-input-wrapper\" [class.nggv-field--error]=\"invalid\">\n <div class=\"input-group-prefix hide-if-empty\">\n <ng-content select=\"[slot='prefix']\"></ng-content>\n </div>\n\n <!-- INPUT FIELD -->\n <div class=\"input-group\" *ngIf=\"!inputMask\">\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n [attr.type]=\"type\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [attr.email]=\"email\"\n [attr.aria-describedby]=\"id + '-message'\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [pattern]=\"pattern\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n </div>\n\n <!-- INPUT FIELD WITH MASK -->\n <div\n class=\"input-group\"\n *ngIf=\"!!inputMask && (hideInput$ | async) === false\"\n >\n <input\n #input\n [id]=\"id + '-input'\"\n class=\"sdv-field\"\n autocomplete=\"off\"\n [attr.name]=\"name\"\n [attr.required]=\"required\"\n [readOnly]=\"readonly\"\n [attr.role]=\"role\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [attr.aria-describedby]=\"id + '-message'\"\n [nggvInputMask]=\"inputMask\"\n [formControl]=\"control\"\n />\n </div>\n\n <div class=\"input-group-suffix hide-if-empty\">\n <ng-content select=\"[slot='suffix']\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.id]=\"id + '-message'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span *ngIf=\"error; else errorsRef\">{{ error }}</span>\n <ng-template #errorsRef>\n <span *ngIf=\"firstError as error\">\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"!inputMask && hasMaxLength && showCharacterCountdown\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n</ng-container>\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\n\nimport { NgvI18nModule } from '@sebgroup/green-angular/src/v-angular/i18n'\nimport { NgvInputMaskModule } from '@sebgroup/green-angular/src/v-angular/input-mask'\nimport { NggCharacterCountdownDirectiveModule } from '@sebgroup/green-angular/src/v-angular/character-countdown';\nimport { NgvInputComponent } from './input.component'\n\n@NgModule({\n declarations: [NgvInputComponent],\n imports: [\n CommonModule,\n NgvI18nModule,\n NgvInputMaskModule,\n ReactiveFormsModule,\n NggCharacterCountdownDirectiveModule,\n ],\n exports: [NgvInputComponent],\n})\nexport class NgvInputModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n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