@taiga-ui/kit 4.52.0-canary.24b31eb → 4.52.0-canary.2d877cf
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/README.md +1 -1
- package/components/action-bar/action-bar.component.d.ts +5 -7
- package/components/action-bar/index.d.ts +0 -2
- package/components/badge/badge.options.d.ts +1 -3
- package/components/badge-notification/badge-notification.options.d.ts +1 -3
- package/components/block/block.options.d.ts +1 -3
- package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
- package/components/calendar-month/calendar-month.component.d.ts +1 -1
- package/components/calendar-range/calendar-range.component.d.ts +1 -2
- package/components/chip/chip.options.d.ts +1 -3
- package/components/combo-box/combo-box.d.ts +5 -0
- package/components/combo-box/combo-box.directive.d.ts +5 -5
- package/components/combo-box/index.d.ts +1 -0
- package/components/confirm/confirm.component.d.ts +5 -4
- package/components/confirm/confirm.service.d.ts +1 -1
- package/components/copy/copy.component.d.ts +2 -2
- package/components/copy/copy.directive.d.ts +3 -4
- package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +4 -2
- package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
- package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
- package/components/data-list-wrapper/index.d.ts +1 -1
- package/components/files/file/file.options.d.ts +1 -1
- package/components/files/files/files.component.d.ts +2 -2
- package/components/files/input-files/input-files.options.d.ts +1 -3
- package/components/index.d.ts +0 -4
- package/components/input-chip/input-chip.component.d.ts +9 -8
- package/components/input-chip/input-chip.d.ts +5 -1
- package/components/input-chip/input-chip.directive.d.ts +7 -12
- package/components/input-color/index.d.ts +1 -0
- package/components/input-color/input-color.component.d.ts +4 -4
- package/components/input-color/input-color.d.ts +5 -0
- package/components/input-date/input-date.d.ts +4 -1
- package/components/input-date/input-date.directive.d.ts +12 -14
- package/components/input-date/input-date.options.d.ts +3 -3
- package/components/input-date-multi/input-date-multi.d.ts +1 -2
- package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
- package/components/input-date-range/input-date-range.d.ts +4 -1
- package/components/input-date-range/input-date-range.directive.d.ts +5 -8
- package/components/input-date-range/input-date-range.options.d.ts +2 -2
- package/components/input-date-time/input-date-time.d.ts +4 -1
- package/components/input-date-time/input-date-time.directive.d.ts +6 -6
- package/components/input-date-time/input-date-time.options.d.ts +2 -2
- package/components/input-month/input-month.d.ts +4 -1
- package/components/input-month/input-month.directive.d.ts +6 -5
- package/components/input-month-range/input-month-range.d.ts +4 -1
- package/components/input-month-range/input-month-range.directive.d.ts +6 -5
- package/components/input-number/input-number.d.ts +4 -1
- package/components/input-number/input-number.directive.d.ts +7 -11
- package/components/input-number/step/input-number-step.component.d.ts +1 -1
- package/components/input-phone/index.d.ts +1 -0
- package/components/input-phone/input-phone.d.ts +5 -0
- package/components/input-phone/input-phone.directive.d.ts +7 -7
- package/components/input-phone-international/index.d.ts +1 -0
- package/components/input-phone-international/input-phone-international.component.d.ts +11 -11
- package/components/input-phone-international/input-phone-international.d.ts +5 -0
- package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
- package/components/input-pin/index.d.ts +1 -0
- package/components/input-pin/input-pin.component.d.ts +4 -4
- package/components/input-pin/input-pin.d.ts +5 -0
- package/components/input-range/input-range.component.d.ts +4 -7
- package/components/input-slider/input-slider.d.ts +4 -1
- package/components/input-slider/input-slider.directive.d.ts +1 -2
- package/components/input-time/input-time.component.d.ts +1 -3
- package/components/input-time/input-time.d.ts +4 -1
- package/components/input-time/input-time.directive.d.ts +8 -10
- package/components/input-year/input-year.d.ts +4 -1
- package/components/input-year/input-year.directive.d.ts +5 -5
- package/components/input-year/input-year.options.d.ts +2 -2
- package/components/like/like.options.d.ts +1 -1
- package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
- package/components/line-clamp/line-clamp.component.d.ts +8 -10
- package/components/line-clamp/line-clamp.options.d.ts +1 -3
- package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +5 -7
- package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
- package/components/notification-middle/notification-middle.component.d.ts +2 -2
- package/components/notification-middle/notification-middle.directive.d.ts +4 -3
- package/components/notification-middle/notification-middle.service.d.ts +7 -3
- package/components/pagination/index.d.ts +1 -0
- package/components/pagination/pagination.component.d.ts +25 -54
- package/components/pagination/pagination.options.d.ts +7 -0
- package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
- package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
- package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
- package/components/preview/index.d.ts +1 -0
- package/components/preview/pagination/preview-pagination.component.d.ts +3 -2
- package/components/preview/preview.component.d.ts +2 -2
- package/components/preview/preview.d.ts +2 -1
- package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +1 -3
- package/components/preview/zoom/preview-zoom.component.d.ts +4 -2
- package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
- package/components/progress/progress.options.d.ts +1 -3
- package/components/push/push-alert.component.d.ts +4 -3
- package/components/push/push.component.d.ts +1 -1
- package/components/push/push.directive.d.ts +4 -6
- package/components/push/push.options.d.ts +5 -8
- package/components/push/push.service.d.ts +6 -2
- package/components/radio/radio.component.d.ts +1 -1
- package/components/radio-list/radio-list.component.d.ts +5 -3
- package/components/range/range-change.directive.d.ts +1 -2
- package/components/range/range.component.d.ts +16 -24
- package/components/rating/rating.component.d.ts +1 -1
- package/components/rating/rating.options.d.ts +1 -3
- package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
- package/components/segmented/segmented.component.d.ts +4 -6
- package/components/segmented/segmented.directive.d.ts +6 -7
- package/components/select/native-select/native-select.component.d.ts +7 -8
- package/components/select/select.d.ts +4 -1
- package/components/select/select.directive.d.ts +4 -3
- package/components/slider/helpers/key-steps.d.ts +1 -2
- package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
- package/components/slider/slider.options.d.ts +1 -6
- package/components/stepper/step.component.d.ts +6 -8
- package/components/stepper/stepper.component.d.ts +6 -11
- package/components/switch/switch.component.d.ts +1 -0
- package/components/tabs/tabs-with-more.component.d.ts +1 -1
- package/components/tabs/tabs.options.d.ts +1 -6
- package/components/textarea/index.d.ts +2 -1
- package/components/textarea/textarea.component.d.ts +4 -4
- package/components/textarea/textarea.d.ts +6 -0
- package/components/textarea/textarea.directive.d.ts +13 -0
- package/components/toast/toast.component.d.ts +4 -3
- package/components/toast/toast.options.d.ts +9 -7
- package/components/toast/toast.service.d.ts +10 -9
- package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
- package/components/tree/misc/tree.constants.d.ts +0 -3
- package/components/tree/misc/tree.tokens.d.ts +1 -6
- package/directives/button-close/button-close.directive.d.ts +2 -1
- package/directives/button-select/button-select.directive.d.ts +4 -4
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
- package/directives/fade/fade.directive.d.ts +1 -2
- package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
- package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
- package/directives/index.d.ts +0 -1
- package/directives/password/password.directive.d.ts +1 -1
- package/directives/tooltip/tooltip.directive.d.ts +1 -1
- package/fesm2022/taiga-ui-kit-components-accordion.mjs +7 -8
- package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs +22 -38
- package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-avatar.mjs +20 -20
- package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +7 -12
- package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badge.mjs +11 -15
- package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -7
- package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-block.mjs +10 -14
- package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +12 -18
- package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +6 -17
- package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -8
- package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -23
- package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs +5 -6
- package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-chip.mjs +11 -15
- package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs +42 -32
- package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-comment.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-compass.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-confirm.mjs +11 -14
- package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -25
- package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +25 -78
- package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-drawer.mjs +5 -5
- package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-files.mjs +41 -48
- package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-filter.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +3 -3
- package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs +69 -74
- package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -13
- package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +36 -53
- package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +31 -36
- package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +34 -31
- package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-date.mjs +50 -53
- package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs +4 -5
- package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +30 -27
- package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-month.mjs +36 -27
- package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-number.mjs +54 -72
- package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +51 -43
- package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs +32 -23
- package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs +18 -9
- package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-range.mjs +9 -16
- package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs +24 -25
- package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-time.mjs +64 -70
- package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-input-year.mjs +29 -21
- package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +14 -16
- package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-like.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +36 -78
- package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-message.mjs +6 -7
- package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs +34 -46
- package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +36 -25
- package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -8
- package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pagination.mjs +67 -138
- package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
- package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-preview.mjs +72 -52
- package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-progress.mjs +64 -56
- package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-pulse.mjs +4 -4
- package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-push.mjs +49 -57
- package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
- package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-radio.mjs +8 -9
- package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-range.mjs +41 -85
- package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-rating.mjs +7 -12
- package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +11 -7
- package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-segmented.mjs +32 -59
- package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-select.mjs +82 -62
- package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-slider.mjs +73 -81
- package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
- package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-stepper.mjs +45 -79
- package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
- package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tabs.mjs +28 -36
- package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-textarea.mjs +54 -62
- package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tiles.mjs +14 -15
- package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-toast.mjs +51 -53
- package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components-tree.mjs +56 -60
- package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-components.mjs +0 -4
- package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs +15 -7
- package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs +20 -19
- package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs +9 -8
- package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -7
- package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -53
- package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fade.mjs +12 -11
- package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +14 -27
- package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs +3 -4
- package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-password.mjs +12 -14
- package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -4
- package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
- package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
- package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +11 -11
- package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +5 -6
- package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +4 -5
- package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
- package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
- package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -4
- package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -25
- package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
- package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -5
- package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
- package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
- package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -4
- package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -4
- package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
- package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-tokens.mjs +2 -98
- package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-kit-utils.mjs +2 -14
- package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
- package/package.json +50 -58
- package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
- package/pipes/auto-color/index.d.ts +1 -0
- package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
- package/pipes/flag/flag.pipe.d.ts +14 -0
- package/pipes/flag/index.d.ts +1 -0
- package/pipes/index.d.ts +3 -0
- package/pipes/initials/index.d.ts +1 -0
- package/pipes/initials/initials.pipe.d.ts +7 -0
- package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
- package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
- package/styles/components/badge.less +1 -0
- package/styles/components/chip.less +12 -1
- package/tokens/i18n.d.ts +25 -26
- package/tokens/index.d.ts +0 -6
- package/utils/index.d.ts +0 -2
- package/components/action-bar/action-bar.d.ts +0 -3
- package/components/action-bar/action-bar.directive.d.ts +0 -6
- package/components/elastic-container/elastic-container.component.d.ts +0 -8
- package/components/elastic-container/elastic-container.directive.d.ts +0 -7
- package/components/elastic-container/index.d.ts +0 -2
- package/components/floating-container/floating-container.directive.d.ts +0 -7
- package/components/floating-container/index.d.ts +0 -1
- package/components/pdf-viewer/index.d.ts +0 -4
- package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
- package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
- package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
- package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
- package/components/slides/index.d.ts +0 -1
- package/components/slides/slides.directive.d.ts +0 -11
- package/components/textarea/textarea-limit.directive.d.ts +0 -27
- package/directives/lazy-loading/index.d.ts +0 -2
- package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
- package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -78
- package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
- package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
- package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
- package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
- package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -81
- package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
- package/tokens/date-inputs-value-transformers.d.ts +0 -19
- package/tokens/input-date-options.d.ts +0 -15
- package/tokens/items-handlers.d.ts +0 -26
- package/tokens/mobile-calendar.d.ts +0 -6
- package/tokens/month-formatter.d.ts +0 -5
- package/utils/phone.d.ts +0 -3
- package/utils/toggle-day.d.ts +0 -2
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { TuiLabel } from '@taiga-ui/core/components/label';
|
|
2
|
+
import * as i5 from '@taiga-ui/core/components/textfield';
|
|
3
|
+
import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
|
|
4
|
+
import * as i6 from '@taiga-ui/core/portals';
|
|
5
|
+
import { TuiDropdownContent } from '@taiga-ui/core/portals';
|
|
1
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
2
7
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
8
|
+
import { inject, signal, effect, computed, ElementRef, Input, Output, ViewChildren, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
4
9
|
import { toSignal, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
5
10
|
import * as i3 from '@angular/forms';
|
|
6
11
|
import { FormsModule } from '@angular/forms';
|
|
@@ -9,27 +14,27 @@ import { MaskitoDirective } from '@maskito/angular';
|
|
|
9
14
|
import { maskitoTransform, MASKITO_DEFAULT_OPTIONS, maskitoInitialCalibrationPlugin } from '@maskito/core';
|
|
10
15
|
import { maskitoPhoneOptionsGenerator, maskitoGetCountryFromNumber } from '@maskito/phone';
|
|
11
16
|
import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
|
|
12
|
-
import { EMPTY_QUERY,
|
|
17
|
+
import { EMPTY_QUERY, TUI_DEFAULT_MATCHER, CHAR_PLUS } from '@taiga-ui/cdk/constants';
|
|
13
18
|
import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
|
|
14
19
|
import { TuiAutoFocus, tuiAutoFocusOptionsProvider } from '@taiga-ui/cdk/directives/auto-focus';
|
|
15
20
|
import { TUI_IS_IOS, tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
|
|
16
21
|
import { tuiInjectElement, tuiValue, tuiIsInputEvent } from '@taiga-ui/cdk/utils/dom';
|
|
17
|
-
import { tuiProvideOptions, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
18
22
|
import { TuiButton } from '@taiga-ui/core/components/button';
|
|
19
|
-
import { TuiCell } from '@taiga-ui/core/components/cell';
|
|
20
23
|
import * as i4 from '@taiga-ui/core/components/data-list';
|
|
21
|
-
import {
|
|
22
|
-
import * as i2 from '@taiga-ui/core/components/
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { TuiFlagPipe } from '@taiga-ui/core/pipes';
|
|
24
|
+
import { TuiOption, TuiDataList } from '@taiga-ui/core/components/data-list';
|
|
25
|
+
import * as i2 from '@taiga-ui/core/components/input';
|
|
26
|
+
import { TuiWithInput, TuiInput } from '@taiga-ui/core/components/input';
|
|
27
|
+
import { TuiTitle } from '@taiga-ui/core/components/title';
|
|
28
|
+
import { TuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/portals/dropdown';
|
|
27
29
|
import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
|
|
28
30
|
import { TuiChevron } from '@taiga-ui/kit/directives/chevron';
|
|
31
|
+
import { TuiFlagPipe } from '@taiga-ui/kit/pipes/flag';
|
|
29
32
|
import { TUI_INTERNATIONAL_SEARCH, TUI_COUNTRIES } from '@taiga-ui/kit/tokens';
|
|
30
|
-
import { tuiMaskito
|
|
33
|
+
import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
31
34
|
import { validatePhoneNumberLength } from 'libphonenumber-js';
|
|
35
|
+
import { getCountryCallingCode } from 'libphonenumber-js/core';
|
|
32
36
|
import { of, from, filter, skip } from 'rxjs';
|
|
37
|
+
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
33
38
|
|
|
34
39
|
const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS = {
|
|
35
40
|
countries: [],
|
|
@@ -40,15 +45,10 @@ const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS = {
|
|
|
40
45
|
/**
|
|
41
46
|
* Default parameters for input phone international component
|
|
42
47
|
*/
|
|
43
|
-
const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS =
|
|
44
|
-
factory: () => TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,
|
|
45
|
-
});
|
|
46
|
-
function tuiInputPhoneInternationalOptionsProvider(options) {
|
|
47
|
-
return tuiProvideOptions(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, options, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS);
|
|
48
|
-
}
|
|
48
|
+
const [TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, tuiInputPhoneInternationalOptionsProvider,] = tuiCreateOptions(TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS);
|
|
49
49
|
|
|
50
50
|
const NOT_FORM_CONTROL_SYMBOLS = /[^+\d]/g;
|
|
51
|
-
class
|
|
51
|
+
class TuiInputPhoneInternationalComponent extends TuiControl {
|
|
52
52
|
constructor() {
|
|
53
53
|
super(...arguments);
|
|
54
54
|
this.list = EMPTY_QUERY;
|
|
@@ -58,29 +58,27 @@ class TuiInputPhoneInternational extends TuiControl {
|
|
|
58
58
|
this.options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);
|
|
59
59
|
this.countries = signal(this.options.countries);
|
|
60
60
|
this.code = signal(this.options.countryIsoCode);
|
|
61
|
-
this.label =
|
|
61
|
+
this.label = inject(TUI_INTERNATIONAL_SEARCH);
|
|
62
62
|
this.metadata = toSignal(from(this.options.metadata));
|
|
63
|
-
this.names =
|
|
64
|
-
this.open =
|
|
63
|
+
this.names = inject(TUI_COUNTRIES);
|
|
64
|
+
this.open = inject(TuiDropdownOpen).open;
|
|
65
|
+
this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
|
|
66
|
+
this.change = effect(() => this.onChange(this.unmask(this.masked())));
|
|
65
67
|
this.search = signal('');
|
|
66
68
|
this.size = inject(TUI_TEXTFIELD_OPTIONS).size;
|
|
67
|
-
this.mask = tuiMaskito(computed(() => this.computeMask(this.code(), this.metadata())));
|
|
68
69
|
this.masked = tuiValue(this.el);
|
|
69
|
-
this.
|
|
70
|
-
this.onChange(this.unmask(this.masked()));
|
|
71
|
-
}, TUI_ALLOW_SIGNAL_WRITES);
|
|
70
|
+
this.mask = tuiMaskito(computed(() => this.computeMask(this.code(), this.metadata())));
|
|
72
71
|
this.filtered = computed(() => this.countries()
|
|
73
72
|
.map((iso) => ({
|
|
74
73
|
iso,
|
|
75
74
|
name: this.names()?.[iso] || '',
|
|
76
|
-
code:
|
|
75
|
+
code: getCallingCode(iso, this.metadata()),
|
|
77
76
|
}))
|
|
78
77
|
.filter(({ name, code }) => TUI_DEFAULT_MATCHER(name + code, this.search())));
|
|
79
|
-
this.enabled = tuiDirectiveBinding(TuiDropdownOpen, 'tuiDropdownEnabled', this.interactive, {});
|
|
80
78
|
this.$ = inject(TuiActiveZone)
|
|
81
79
|
.tuiActiveZoneChange.pipe(filter(() => !this.readOnly()), takeUntilDestroyed())
|
|
82
80
|
.subscribe((active) => {
|
|
83
|
-
const prefix = `${
|
|
81
|
+
const prefix = `${getCallingCode(this.code(), this.metadata())} `;
|
|
84
82
|
this.search.set('');
|
|
85
83
|
this.masked.update((value) => {
|
|
86
84
|
const fallback = active ? value || prefix : value;
|
|
@@ -120,7 +118,7 @@ class TuiInputPhoneInternational extends TuiControl {
|
|
|
120
118
|
this.open.set(false);
|
|
121
119
|
this.code.set(code);
|
|
122
120
|
this.search.set('');
|
|
123
|
-
this.masked.set(maskitoTransform(this.value() ||
|
|
121
|
+
this.masked.set(maskitoTransform(this.value() || getCallingCode(code, this.metadata()), this.mask() || MASKITO_DEFAULT_OPTIONS));
|
|
124
122
|
}
|
|
125
123
|
computeMask(countryIsoCode, metadata) {
|
|
126
124
|
if (!metadata) {
|
|
@@ -138,7 +136,7 @@ class TuiInputPhoneInternational extends TuiControl {
|
|
|
138
136
|
}
|
|
139
137
|
unmask(maskedValue) {
|
|
140
138
|
const value = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');
|
|
141
|
-
return value ===
|
|
139
|
+
return value === getCallingCode(this.code(), this.metadata()) ? '' : value;
|
|
142
140
|
}
|
|
143
141
|
getCountryCode(value) {
|
|
144
142
|
const metadata = this.metadata();
|
|
@@ -147,32 +145,31 @@ class TuiInputPhoneInternational extends TuiControl {
|
|
|
147
145
|
? (maskitoGetCountryFromNumber(phone, metadata) ?? null)
|
|
148
146
|
: null;
|
|
149
147
|
}
|
|
150
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
151
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.
|
|
152
|
-
tuiAsControl(
|
|
148
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneInternationalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
149
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiInputPhoneInternationalComponent, isStandalone: true, selector: "input[tuiInputPhoneInternational]", inputs: { countrySearch: "countrySearch", countriesValue: ["countries", "countriesValue"], isoCode: ["countryIsoCode", "isoCode"] }, outputs: { countryIsoCodeChange: "countryIsoCodeChange" }, host: { attributes: { "type": "tel", "ngSkipHydration": "true" }, listeners: { "input": "masked.set($event.target.value)", "click": "open.set(false)", "beforeinput.capture": "onPaste($event)" }, properties: { "attr.inputmode": "!ios && open() ? \"none\" : null", "disabled": "disabled()" } }, providers: [
|
|
150
|
+
tuiAsControl(TuiInputPhoneInternationalComponent),
|
|
153
151
|
tuiFallbackValueProvider(''),
|
|
154
152
|
tuiAutoFocusOptionsProvider({ preventScroll: true }),
|
|
155
|
-
], viewQueries: [{ propertyName: "list", predicate:
|
|
153
|
+
], viewQueries: [{ propertyName: "list", predicate: TuiOption, descendants: true, read: ElementRef }], usesInheritance: true, hostDirectives: [{ directive: i1.MaskitoDirective }, { directive: i2.TuiWithInput }], ngImport: i0, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-template #filter>\n <div class=\"t-ipi-search\">\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiInput\n type=\"text\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!ios\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n</ng-template>\n<ng-container *tuiDropdown>\n <!-- To keep it under local injector -->\n @if (countrySearch) {\n <ng-container *ngTemplateOutlet=\"filter\" />\n }\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track $index) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: ["[tuiInputPhoneInternational][tuiInputPhoneInternational]{left:var(--t-offset);border-top-left-radius:0;border-bottom-left-radius:0;inline-size:calc(100% - var(--t-offset))}[tuiInputPhoneInternational][tuiInputPhoneInternational]+label{padding-inline-start:var(--t-offset)}tui-textfield[data-size=s]{--t-offset: 4.125rem}tui-textfield[data-size=s] .t-ipi-flag{margin:0 .1875rem}tui-textfield[data-size=m]{--t-offset: 4.875rem}tui-textfield[data-size=m] .t-ipi-flag{margin:0 -.1875rem}tui-textfield[data-size=l]{--t-offset: 5.25rem}tui-textfield[data-size=l] .t-ipi-flag{margin:0 -.1875rem}tui-textfield .t-ipi-select{position:absolute;left:0;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}tui-textfield .t-ipi-select_readonly{pointer-events:none}.t-ipi-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-ipi-flag_small{inline-size:1.25rem;block-size:1.25rem}.t-ipi-code{color:var(--tui-text-secondary)}.t-ipi-search{position:sticky;top:0;z-index:1;background:var(--tui-background-elevation-3);padding:.375rem .375rem 0}@supports (-webkit-touch-callout: none){.t-ipi-search input:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}tui-dropdown-mobile .t-ipi-search,tui-sheet-dialog .t-ipi-search{background:var(--tui-background-elevation-1)}tui-dropdown-mobile .t-ipi-options:not(:first-child),tui-sheet-dialog .t-ipi-options:not(:first-child){min-block-size:calc(100 * var(--tui-viewport-vh) - 8.75rem)}tui-sheet-dialog .t-ipi-search{top:4.5rem;padding-inline-start:0;padding-inline-end:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TuiAutoFocus, selector: "[tuiAutoFocus]", inputs: ["tuiAutoFocus"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: TuiChevron, selector: "[tuiChevron]", inputs: ["tuiChevron"] }, { kind: "component", type: i4.TuiDataListComponent, selector: "tui-data-list", inputs: ["emptyContent", "size"] }, { kind: "directive", type: i4.TuiOption, selector: "button[tuiOption], a[tuiOption], label[tuiOption]", inputs: ["disabled"] }, { kind: "pipe", type: TuiFlagPipe, name: "tuiFlag" }, { kind: "component", type: i5.TuiTextfieldComponent, selector: "tui-textfield:not([multi])", inputs: ["content", "filler"] }, { kind: "directive", type: i5.TuiTextfieldOptionsDirective, selector: "[tuiTextfieldAppearance],[tuiTextfieldSize],[tuiTextfieldCleaner]", inputs: ["tuiTextfieldAppearance", "tuiTextfieldSize", "tuiTextfieldCleaner"] }, { kind: "directive", type: i6.TuiDropdownContent, selector: "ng-template[tuiDropdown]" }, { kind: "directive", type: i2.TuiInputDirective, selector: "input[tuiInput]", inputs: ["readOnly", "invalid", "focused", "state"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }, { kind: "directive", type: TuiTitle, selector: "[tuiTitle]", inputs: ["tuiTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
156
154
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneInternationalComponent, decorators: [{
|
|
158
156
|
type: Component,
|
|
159
157
|
args: [{ selector: 'input[tuiInputPhoneInternational]', imports: [
|
|
160
|
-
NgTemplateOutlet,
|
|
161
158
|
FormsModule,
|
|
159
|
+
NgTemplateOutlet,
|
|
162
160
|
TuiAutoFocus,
|
|
163
161
|
TuiButton,
|
|
164
|
-
TuiCell,
|
|
165
162
|
TuiChevron,
|
|
166
163
|
TuiDataList,
|
|
167
164
|
TuiFlagPipe,
|
|
168
|
-
|
|
165
|
+
TuiInput,
|
|
169
166
|
TuiTextfieldContent,
|
|
170
167
|
TuiTitle,
|
|
171
168
|
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
172
|
-
tuiAsControl(
|
|
169
|
+
tuiAsControl(TuiInputPhoneInternationalComponent),
|
|
173
170
|
tuiFallbackValueProvider(''),
|
|
174
171
|
tuiAutoFocusOptionsProvider({ preventScroll: true }),
|
|
175
|
-
], hostDirectives: [MaskitoDirective,
|
|
172
|
+
], hostDirectives: [MaskitoDirective, TuiWithInput], host: {
|
|
176
173
|
type: 'tel',
|
|
177
174
|
ngSkipHydration: 'true',
|
|
178
175
|
'[attr.inputmode]': '!ios && open() ? "none" : null',
|
|
@@ -180,10 +177,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
180
177
|
'(input)': 'masked.set($event.target.value)',
|
|
181
178
|
'(click)': 'open.set(false)',
|
|
182
179
|
'(beforeinput.capture)': 'onPaste($event)',
|
|
183
|
-
}, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()
|
|
180
|
+
}, template: "<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-template #filter>\n <div class=\"t-ipi-search\">\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiInput\n type=\"text\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!ios\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n</ng-template>\n<ng-container *tuiDropdown>\n <!-- To keep it under local injector -->\n @if (countrySearch) {\n <ng-container *ngTemplateOutlet=\"filter\" />\n }\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track $index) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n", styles: ["[tuiInputPhoneInternational][tuiInputPhoneInternational]{left:var(--t-offset);border-top-left-radius:0;border-bottom-left-radius:0;inline-size:calc(100% - var(--t-offset))}[tuiInputPhoneInternational][tuiInputPhoneInternational]+label{padding-inline-start:var(--t-offset)}tui-textfield[data-size=s]{--t-offset: 4.125rem}tui-textfield[data-size=s] .t-ipi-flag{margin:0 .1875rem}tui-textfield[data-size=m]{--t-offset: 4.875rem}tui-textfield[data-size=m] .t-ipi-flag{margin:0 -.1875rem}tui-textfield[data-size=l]{--t-offset: 5.25rem}tui-textfield[data-size=l] .t-ipi-flag{margin:0 -.1875rem}tui-textfield .t-ipi-select{position:absolute;left:0;border-radius:inherit;border-top-right-radius:0;border-bottom-right-radius:0}tui-textfield .t-ipi-select_readonly{pointer-events:none}.t-ipi-flag{inline-size:1.75rem;block-size:1.75rem;border-radius:100%}.t-ipi-flag_small{inline-size:1.25rem;block-size:1.25rem}.t-ipi-code{color:var(--tui-text-secondary)}.t-ipi-search{position:sticky;top:0;z-index:1;background:var(--tui-background-elevation-3);padding:.375rem .375rem 0}@supports (-webkit-touch-callout: none){.t-ipi-search input:focus{animation:tuiPreventIOSScroll 1ms}}@keyframes tuiPreventIOSScroll{0%{opacity:0}to{opacity:1}}tui-dropdown-mobile .t-ipi-search,tui-sheet-dialog .t-ipi-search{background:var(--tui-background-elevation-1)}tui-dropdown-mobile .t-ipi-options:not(:first-child),tui-sheet-dialog .t-ipi-options:not(:first-child){min-block-size:calc(100 * var(--tui-viewport-vh) - 8.75rem)}tui-sheet-dialog .t-ipi-search{top:4.5rem;padding-inline-start:0;padding-inline-end:0}\n"] }]
|
|
184
181
|
}], propDecorators: { list: [{
|
|
185
182
|
type: ViewChildren,
|
|
186
|
-
args: [
|
|
183
|
+
args: [TuiOption, { read: ElementRef }]
|
|
187
184
|
}], countrySearch: [{
|
|
188
185
|
type: Input
|
|
189
186
|
}], countryIsoCodeChange: [{
|
|
@@ -195,10 +192,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
195
192
|
type: Input,
|
|
196
193
|
args: ['countryIsoCode']
|
|
197
194
|
}] } });
|
|
195
|
+
function getCallingCode(iso, metadata) {
|
|
196
|
+
return metadata ? CHAR_PLUS + getCountryCallingCode(iso, metadata) : '';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
const TuiInputPhoneInternational = [
|
|
200
|
+
TuiInputPhoneInternationalComponent,
|
|
201
|
+
TuiLabel,
|
|
202
|
+
TuiTextfieldComponent,
|
|
203
|
+
TuiTextfieldOptionsDirective,
|
|
204
|
+
TuiDropdownContent,
|
|
205
|
+
];
|
|
198
206
|
|
|
199
207
|
/**
|
|
200
208
|
* Generated bundle index. Do not edit.
|
|
201
209
|
*/
|
|
202
210
|
|
|
203
|
-
export { TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternational, tuiInputPhoneInternationalOptionsProvider };
|
|
211
|
+
export { TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternational, TuiInputPhoneInternationalComponent, tuiInputPhoneInternationalOptionsProvider };
|
|
204
212
|
//# sourceMappingURL=taiga-ui-kit-components-input-phone-international.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-phone-international.mjs","sources":["../../../projects/kit/components/input-phone-international/input-phone-international.options.ts","../../../projects/kit/components/input-phone-international/input-phone-international.component.ts","../../../projects/kit/components/input-phone-international/input-phone-international.template.html","../../../projects/kit/components/input-phone-international/taiga-ui-kit-components-input-phone-international.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {type MetadataJson} from 'libphonenumber-js/core';\nimport {type Observable, of} from 'rxjs';\n\nexport interface TuiInputPhoneInternationalOptions {\n readonly countries: readonly TuiCountryIsoCode[];\n readonly countryIsoCode: TuiCountryIsoCode;\n readonly metadata: Observable<MetadataJson> | Promise<MetadataJson>;\n readonly separator: string;\n}\n\nexport const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS: TuiInputPhoneInternationalOptions =\n {\n countries: [],\n countryIsoCode: 'RU',\n metadata: of({countries: {}, country_calling_codes: {}}),\n separator: '-',\n };\n\n/**\n * Default parameters for input phone international component\n */\nexport const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS' : '',\n {\n factory: () => TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiInputPhoneInternationalOptionsProvider(\n options: Partial<TuiInputPhoneInternationalOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS,\n options,\n TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,\n );\n}\n","import {NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n Input,\n Output,\n type QueryList,\n signal,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {FormsModule} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n maskitoInitialCalibrationPlugin,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoGetCountryFromNumber, maskitoPhoneOptionsGenerator} from '@maskito/phone';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {\n CHAR_PLUS,\n EMPTY_QUERY,\n TUI_ALLOW_SIGNAL_WRITES,\n TUI_DEFAULT_MATCHER,\n} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {\n TuiAutoFocus,\n tuiAutoFocusOptionsProvider,\n} from '@taiga-ui/cdk/directives/auto-focus';\nimport {TUI_IS_IOS, tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement, tuiIsInputEvent, tuiValue} from '@taiga-ui/cdk/utils/dom';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiCell} from '@taiga-ui/core/components/cell';\nimport {TuiDataList, TuiOptionNew} from '@taiga-ui/core/components/data-list';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfield,\n TuiTextfieldContent,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownOpen, tuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {TuiTitle} from '@taiga-ui/core/directives/title';\nimport {TuiFlagPipe} from '@taiga-ui/core/pipes';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {TUI_COUNTRIES, TUI_INTERNATIONAL_SEARCH} from '@taiga-ui/kit/tokens';\nimport {tuiGetCallingCode, tuiMaskito} from '@taiga-ui/kit/utils';\nimport {validatePhoneNumberLength} from 'libphonenumber-js';\nimport {type MetadataJson} from 'libphonenumber-js/core';\nimport {filter, from, skip} from 'rxjs';\n\nimport {TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS} from './input-phone-international.options';\n\nconst NOT_FORM_CONTROL_SYMBOLS = /[^+\\d]/g;\n\n@Component({\n selector: 'input[tuiInputPhoneInternational]',\n imports: [\n NgTemplateOutlet,\n FormsModule,\n TuiAutoFocus,\n TuiButton,\n TuiCell,\n TuiChevron,\n TuiDataList,\n TuiFlagPipe,\n TuiTextfield,\n TuiTextfieldContent,\n TuiTitle,\n ],\n templateUrl: './input-phone-international.template.html',\n styleUrls: ['./input-phone-international.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsControl(TuiInputPhoneInternational),\n tuiFallbackValueProvider(''),\n tuiAutoFocusOptionsProvider({preventScroll: true}),\n ],\n hostDirectives: [MaskitoDirective, TuiWithTextfield],\n host: {\n type: 'tel',\n ngSkipHydration: 'true',\n '[attr.inputmode]': '!ios && open() ? \"none\" : null',\n '[disabled]': 'disabled()',\n '(input)': 'masked.set($event.target.value)',\n '(click)': 'open.set(false)',\n '(beforeinput.capture)': 'onPaste($event)',\n },\n})\nexport class TuiInputPhoneInternational extends TuiControl<string> {\n @ViewChildren(TuiOptionNew, {read: ElementRef})\n protected readonly list: QueryList<ElementRef<HTMLButtonElement>> = EMPTY_QUERY;\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly ios = inject(TUI_IS_IOS);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);\n protected readonly countries = signal(this.options.countries);\n protected readonly code = signal(this.options.countryIsoCode);\n protected readonly label = toSignal(inject(TUI_INTERNATIONAL_SEARCH));\n protected readonly metadata = toSignal(from(this.options.metadata));\n protected readonly names = toSignal(inject(TUI_COUNTRIES));\n protected readonly open = tuiDropdownOpen();\n protected readonly search = signal<string>('');\n protected readonly size = inject(TUI_TEXTFIELD_OPTIONS).size;\n\n protected readonly mask = tuiMaskito(\n computed(() => this.computeMask(this.code(), this.metadata())),\n );\n\n protected readonly masked = tuiValue(this.el);\n\n protected valueChangeEffect = effect(() => {\n this.onChange(this.unmask(this.masked()));\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly filtered = computed(() =>\n this.countries()\n .map((iso) => ({\n iso,\n name: this.names()?.[iso] || '',\n code: tuiGetCallingCode(iso, this.metadata()),\n }))\n .filter(({name, code}) => TUI_DEFAULT_MATCHER(name + code, this.search())),\n );\n\n protected readonly enabled = tuiDirectiveBinding(\n TuiDropdownOpen,\n 'tuiDropdownEnabled',\n this.interactive,\n {},\n );\n\n protected readonly $ = inject(TuiActiveZone)\n .tuiActiveZoneChange.pipe(\n filter(() => !this.readOnly()),\n takeUntilDestroyed(),\n )\n .subscribe((active) => {\n const prefix = `${tuiGetCallingCode(this.code(), this.metadata())} `;\n\n this.search.set('');\n this.masked.update((value) => {\n const fallback = active ? value || prefix : value;\n\n return value === prefix ? '' : fallback;\n });\n });\n\n @Input()\n public countrySearch = false;\n\n @Output()\n public readonly countryIsoCodeChange = toObservable(this.code).pipe(skip(1));\n\n @Input('countries')\n public set countriesValue(value: readonly TuiCountryIsoCode[]) {\n this.countries.set(value);\n }\n\n @Input('countryIsoCode')\n public set isoCode(code: TuiCountryIsoCode) {\n this.code.set(code);\n }\n\n public override writeValue(unmasked: string | null): void {\n const code = this.getCountryCode(unmasked ?? '');\n\n if (code) {\n this.code.set(code);\n }\n\n super.writeValue(unmasked);\n this.masked.set(\n maskitoTransform(this.value() ?? '', this.mask() || MASKITO_DEFAULT_OPTIONS),\n );\n }\n\n protected onPaste(event: Event): void {\n const data = tuiIsInputEvent(event) && event.data;\n\n if (\n !data ||\n (!event.inputType.includes('Drop') && !event.inputType.includes('Paste'))\n ) {\n return;\n }\n\n const code = this.getCountryCode(data);\n\n if (code) {\n this.code.set(code);\n }\n }\n\n protected onItemClick(code: TuiCountryIsoCode): void {\n this.el.focus();\n this.open.set(false);\n this.code.set(code);\n this.search.set('');\n this.masked.set(\n maskitoTransform(\n this.value() || tuiGetCallingCode(code, this.metadata()),\n this.mask() || MASKITO_DEFAULT_OPTIONS,\n ),\n );\n }\n\n private computeMask(\n countryIsoCode: TuiCountryIsoCode,\n metadata?: MetadataJson,\n ): MaskitoOptions | null {\n if (!metadata) {\n return null;\n }\n\n const {plugins, ...options} = maskitoPhoneOptionsGenerator({\n countryIsoCode,\n metadata,\n separator: this.options.separator,\n });\n\n return {\n ...options,\n plugins: [...plugins, maskitoInitialCalibrationPlugin()],\n };\n }\n\n private unmask(maskedValue: string): string {\n const value = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');\n\n return value === tuiGetCallingCode(this.code(), this.metadata()) ? '' : value;\n }\n\n private getCountryCode(value: string): TuiCountryIsoCode | null {\n const metadata = this.metadata();\n const phone = value.startsWith(CHAR_PLUS) ? value : CHAR_PLUS + value;\n\n return metadata && validatePhoneNumberLength(phone) !== 'TOO_SHORT'\n ? (maskitoGetCountryFromNumber(phone, metadata) ?? null)\n : null;\n }\n}\n","<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()?.[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-template #filter>\n <div class=\"t-ipi-search\">\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiTextfield\n type=\"text\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!ios\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n</ng-template>\n<ng-container *tuiTextfieldDropdown>\n <!-- To keep it under local injector -->\n @if (countrySearch) {\n <ng-container *ngTemplateOutlet=\"filter\" />\n }\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track $index) {\n <button\n new\n tuiOption\n type=\"button\"\n [tuiCell]=\"size()\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaa,MAAA,6CAA6C,GACtD;AACI,IAAA,SAAS,EAAE,EAAE;AACb,IAAA,cAAc,EAAE,IAAI;AACpB,IAAA,QAAQ,EAAE,EAAE,CAAC,EAAC,SAAS,EAAE,EAAE,EAAE,qBAAqB,EAAE,EAAE,EAAC,CAAC;AACxD,IAAA,SAAS,EAAE,GAAG;;AAGtB;;AAEG;AACU,MAAA,qCAAqC,GAAG,IAAI,cAAc,CACnE,SAAS,GAAG,uCAAuC,GAAG,EAAE,EACxD;AACI,IAAA,OAAO,EAAE,MAAM,6CAA6C;AAC/D,CAAA;AAGC,SAAU,yCAAyC,CACrD,OAAmD,EAAA;IAEnD,OAAO,iBAAiB,CACpB,qCAAqC,EACrC,OAAO,EACP,6CAA6C,CAChD;AACL;;ACwBA,MAAM,wBAAwB,GAAG,SAAS;AAqCpC,MAAO,0BAA2B,SAAQ,UAAkB,CAAA;AAnClE,IAAA,WAAA,GAAA;;QAqCuB,IAAI,CAAA,IAAA,GAA6C,WAAW;QAE5D,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,GAA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wBAAA,IAAI,EAAE,KAAK;AACX,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,kBAAkB,EAAE,gCAAgC;AACpD,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,SAAS,EAAE,iCAAiC;AAC5C,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,uBAAuB,EAAE,iBAAiB;AAC7C,qBAAA,EAAA,QAAA,EAAA,iyEAAA,EAAA,MAAA,EAAA,CAAA,ijDAAA,CAAA,EAAA;8BAIkB,IAAI,EAAA,CAAA;sBADtB,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,YAAY,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC;gBA4DvC,aAAa,EAAA,CAAA;sBADnB;gBAIe,oBAAoB,EAAA,CAAA;sBADnC;gBAIU,cAAc,EAAA,CAAA;sBADxB,KAAK;uBAAC,WAAW;gBAMP,OAAO,EAAA,CAAA;sBADjB,KAAK;uBAAC,gBAAgB;;;AE3K3B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-components-input-phone-international.mjs","sources":["../../../projects/kit/components/input-phone-international/input-phone-international.options.ts","../../../projects/kit/components/input-phone-international/input-phone-international.component.ts","../../../projects/kit/components/input-phone-international/input-phone-international.template.html","../../../projects/kit/components/input-phone-international/input-phone-international.ts","../../../projects/kit/components/input-phone-international/taiga-ui-kit-components-input-phone-international.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {type MetadataJson} from 'libphonenumber-js/core';\nimport {type Observable, of} from 'rxjs';\n\nexport interface TuiInputPhoneInternationalOptions {\n readonly countries: readonly TuiCountryIsoCode[];\n readonly countryIsoCode: TuiCountryIsoCode;\n readonly metadata: Observable<MetadataJson> | Promise<MetadataJson>;\n readonly separator: string;\n}\n\nexport const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS: TuiInputPhoneInternationalOptions =\n {\n countries: [],\n countryIsoCode: 'RU',\n metadata: of({countries: {}, country_calling_codes: {}}),\n separator: '-',\n };\n\n/**\n * Default parameters for input phone international component\n */\nexport const [\n TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS,\n tuiInputPhoneInternationalOptionsProvider,\n] = tuiCreateOptions(TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS);\n","import {NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n Input,\n Output,\n type QueryList,\n signal,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed, toObservable, toSignal} from '@angular/core/rxjs-interop';\nimport {FormsModule} from '@angular/forms';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n maskitoInitialCalibrationPlugin,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoGetCountryFromNumber, maskitoPhoneOptionsGenerator} from '@maskito/phone';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {CHAR_PLUS, EMPTY_QUERY, TUI_DEFAULT_MATCHER} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {\n TuiAutoFocus,\n tuiAutoFocusOptionsProvider,\n} from '@taiga-ui/cdk/directives/auto-focus';\nimport {TUI_IS_IOS, tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement, tuiIsInputEvent, tuiValue} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiDataList, TuiOption} from '@taiga-ui/core/components/data-list';\nimport {TuiInput, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldContent,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiTitle} from '@taiga-ui/core/components/title';\nimport {tuiDropdownEnabled, TuiDropdownOpen} from '@taiga-ui/core/portals/dropdown';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {type TuiCountryIsoCode} from '@taiga-ui/i18n/types';\nimport {TuiChevron} from '@taiga-ui/kit/directives/chevron';\nimport {TuiFlagPipe} from '@taiga-ui/kit/pipes/flag';\nimport {TUI_COUNTRIES, TUI_INTERNATIONAL_SEARCH} from '@taiga-ui/kit/tokens';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\nimport {validatePhoneNumberLength} from 'libphonenumber-js';\nimport {getCountryCallingCode, type MetadataJson} from 'libphonenumber-js/core';\nimport {filter, from, skip} from 'rxjs';\n\nimport {TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS} from './input-phone-international.options';\n\nconst NOT_FORM_CONTROL_SYMBOLS = /[^+\\d]/g;\n\n@Component({\n selector: 'input[tuiInputPhoneInternational]',\n imports: [\n FormsModule,\n NgTemplateOutlet,\n TuiAutoFocus,\n TuiButton,\n TuiChevron,\n TuiDataList,\n TuiFlagPipe,\n TuiInput,\n TuiTextfieldContent,\n TuiTitle,\n ],\n templateUrl: './input-phone-international.template.html',\n styleUrl: './input-phone-international.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n tuiAsControl(TuiInputPhoneInternationalComponent),\n tuiFallbackValueProvider(''),\n tuiAutoFocusOptionsProvider({preventScroll: true}),\n ],\n hostDirectives: [MaskitoDirective, TuiWithInput],\n host: {\n type: 'tel',\n ngSkipHydration: 'true',\n '[attr.inputmode]': '!ios && open() ? \"none\" : null',\n '[disabled]': 'disabled()',\n '(input)': 'masked.set($event.target.value)',\n '(click)': 'open.set(false)',\n '(beforeinput.capture)': 'onPaste($event)',\n },\n})\nexport class TuiInputPhoneInternationalComponent extends TuiControl<string> {\n @ViewChildren(TuiOption, {read: ElementRef})\n protected readonly list: QueryList<ElementRef<HTMLButtonElement>> = EMPTY_QUERY;\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly ios = inject(TUI_IS_IOS);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly options = inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS);\n protected readonly countries = signal(this.options.countries);\n protected readonly code = signal(this.options.countryIsoCode);\n protected readonly label = inject(TUI_INTERNATIONAL_SEARCH);\n protected readonly metadata = toSignal(from(this.options.metadata));\n protected readonly names = inject(TUI_COUNTRIES);\n protected readonly open = inject(TuiDropdownOpen).open;\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly change = effect(() => this.onChange(this.unmask(this.masked())));\n protected readonly search = signal<string>('');\n protected readonly size = inject(TUI_TEXTFIELD_OPTIONS).size;\n protected readonly masked = tuiValue(this.el);\n protected readonly mask = tuiMaskito(\n computed(() => this.computeMask(this.code(), this.metadata())),\n );\n\n protected readonly filtered = computed(() =>\n this.countries()\n .map((iso) => ({\n iso,\n name: this.names()?.[iso] || '',\n code: getCallingCode(iso, this.metadata()),\n }))\n .filter(({name, code}) => TUI_DEFAULT_MATCHER(name + code, this.search())),\n );\n\n protected readonly $ = inject(TuiActiveZone)\n .tuiActiveZoneChange.pipe(\n filter(() => !this.readOnly()),\n takeUntilDestroyed(),\n )\n .subscribe((active) => {\n const prefix = `${getCallingCode(this.code(), this.metadata())} `;\n\n this.search.set('');\n this.masked.update((value) => {\n const fallback = active ? value || prefix : value;\n\n return value === prefix ? '' : fallback;\n });\n });\n\n @Input()\n public countrySearch = false;\n\n @Output()\n public readonly countryIsoCodeChange = toObservable(this.code).pipe(skip(1));\n\n @Input('countries')\n public set countriesValue(value: readonly TuiCountryIsoCode[]) {\n this.countries.set(value);\n }\n\n @Input('countryIsoCode')\n public set isoCode(code: TuiCountryIsoCode) {\n this.code.set(code);\n }\n\n public override writeValue(unmasked: string | null): void {\n const code = this.getCountryCode(unmasked ?? '');\n\n if (code) {\n this.code.set(code);\n }\n\n super.writeValue(unmasked);\n this.masked.set(\n maskitoTransform(this.value() ?? '', this.mask() || MASKITO_DEFAULT_OPTIONS),\n );\n }\n\n protected onPaste(event: Event): void {\n const data = tuiIsInputEvent(event) && event.data;\n\n if (\n !data ||\n (!event.inputType.includes('Drop') && !event.inputType.includes('Paste'))\n ) {\n return;\n }\n\n const code = this.getCountryCode(data);\n\n if (code) {\n this.code.set(code);\n }\n }\n\n protected onItemClick(code: TuiCountryIsoCode): void {\n this.el.focus();\n this.open.set(false);\n this.code.set(code);\n this.search.set('');\n this.masked.set(\n maskitoTransform(\n this.value() || getCallingCode(code, this.metadata()),\n this.mask() || MASKITO_DEFAULT_OPTIONS,\n ),\n );\n }\n\n private computeMask(\n countryIsoCode: TuiCountryIsoCode,\n metadata?: MetadataJson,\n ): MaskitoOptions | null {\n if (!metadata) {\n return null;\n }\n\n const {plugins, ...options} = maskitoPhoneOptionsGenerator({\n countryIsoCode,\n metadata,\n separator: this.options.separator,\n });\n\n return {\n ...options,\n plugins: [...plugins, maskitoInitialCalibrationPlugin()],\n };\n }\n\n private unmask(maskedValue: string): string {\n const value = maskedValue.replaceAll(NOT_FORM_CONTROL_SYMBOLS, '');\n\n return value === getCallingCode(this.code(), this.metadata()) ? '' : value;\n }\n\n private getCountryCode(value: string): TuiCountryIsoCode | null {\n const metadata = this.metadata();\n const phone = value.startsWith(CHAR_PLUS) ? value : CHAR_PLUS + value;\n\n return metadata && validatePhoneNumberLength(phone) !== 'TOO_SHORT'\n ? (maskitoGetCountryFromNumber(phone, metadata) ?? null)\n : null;\n }\n}\n\nfunction getCallingCode(iso: TuiCountryIsoCode, metadata?: MetadataJson | null): string {\n return metadata ? CHAR_PLUS + getCountryCallingCode(iso, metadata) : '';\n}\n","<ng-container *tuiTextfieldContent>\n <button\n appearance=\"textfield\"\n tabindex=\"-1\"\n tuiButton\n tuiChevron\n type=\"button\"\n class=\"t-ipi-select\"\n [attr.data-mode]=\"mode()\"\n [class.t-ipi-select_readonly]=\"readOnly()\"\n [disabled]=\"disabled()\"\n [size]=\"size()\"\n [tuiAppearanceFocus]=\"open()\"\n (click.prevent)=\"interactive() && open.set(!open())\"\n (pointerdown.stop)=\"(0)\"\n >\n <img\n class=\"t-ipi-flag\"\n [alt]=\"names()[code()]\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"code() | tuiFlag\"\n />\n </button>\n</ng-container>\n<ng-template #filter>\n <div class=\"t-ipi-search\">\n <tui-textfield\n [iconStart]=\"icons.search\"\n [tuiTextfieldSize]=\"size() === 's' ? 's' : 'm'\"\n >\n <input\n autocomplete=\"off\"\n tuiInput\n type=\"text\"\n [ngModel]=\"search()\"\n [ngModelOptions]=\"{standalone: true}\"\n [placeholder]=\"label()\"\n [tuiAutoFocus]=\"!ios\"\n (keydown.arrowDown)=\"list.get(0)?.nativeElement?.focus()\"\n (ngModelChange)=\"search.set($event)\"\n />\n </tui-textfield>\n </div>\n</ng-template>\n<ng-container *tuiDropdown>\n <!-- To keep it under local injector -->\n @if (countrySearch) {\n <ng-container *ngTemplateOutlet=\"filter\" />\n }\n <tui-data-list class=\"t-ipi-options\">\n @for (item of filtered(); track $index) {\n <button\n tuiOption\n type=\"button\"\n (click)=\"onItemClick(item.iso)\"\n >\n <img\n alt=\"\"\n class=\"t-ipi-flag\"\n [class.t-ipi-flag_small]=\"size() === 's'\"\n [src]=\"item.iso | tuiFlag\"\n />\n <span tuiTitle>{{ item.name }}</span>\n <span class=\"t-ipi-code\">{{ item.code }}</span>\n </button>\n }\n </tui-data-list>\n</ng-container>\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals';\n\nimport {TuiInputPhoneInternationalComponent} from './input-phone-international.component';\n\nexport const TuiInputPhoneInternational = [\n TuiInputPhoneInternationalComponent,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,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;;;"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { TuiLabel } from '@taiga-ui/core/components/label';
|
|
2
|
+
import { TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
|
|
3
|
+
import { TuiDropdownContent } from '@taiga-ui/core/portals';
|
|
1
4
|
import * as i0 from '@angular/core';
|
|
2
5
|
import { inject, computed, effect, untracked, signal, Input, Directive } from '@angular/core';
|
|
3
6
|
import * as i2 from '@maskito/angular';
|
|
@@ -5,10 +8,9 @@ import { MaskitoDirective } from '@maskito/angular';
|
|
|
5
8
|
import { maskitoTransform, MASKITO_DEFAULT_OPTIONS } from '@maskito/core';
|
|
6
9
|
import { maskitoCaretGuard, maskitoPrefixPostprocessorGenerator } from '@maskito/kit';
|
|
7
10
|
import { TUI_IDENTITY_VALUE_TRANSFORMER, TuiControl, tuiAsControl, tuiValueTransformerFrom } from '@taiga-ui/cdk/classes';
|
|
8
|
-
import { TUI_ALLOW_SIGNAL_WRITES } from '@taiga-ui/cdk/constants';
|
|
9
11
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
10
|
-
import * as i1 from '@taiga-ui/core/components/
|
|
11
|
-
import {
|
|
12
|
+
import * as i1 from '@taiga-ui/core/components/input';
|
|
13
|
+
import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
|
|
12
14
|
import { tuiMaskito } from '@taiga-ui/kit/utils';
|
|
13
15
|
import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
|
|
14
16
|
|
|
@@ -31,7 +33,7 @@ function tuiCreateCompletePhoneInsertionPreprocessor(countryCode, phoneMaskAfter
|
|
|
31
33
|
const completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replaceAll(/[^#\d]+/g, '').length;
|
|
32
34
|
const trimCountryPrefix = (value) => countryCode === '+7'
|
|
33
35
|
? value.replace(/^(\+?\s*7?\s?8?)\s?/, '')
|
|
34
|
-
: value.replace(new RegExp(`^(
|
|
36
|
+
: value.replace(new RegExp(String.raw `^(\+?\s*${countryCode.replace('+', '')}?)\s?`), '');
|
|
35
37
|
return ({ elementState, data }) => {
|
|
36
38
|
const { value, selection } = elementState;
|
|
37
39
|
return {
|
|
@@ -81,30 +83,30 @@ const MASK_SYMBOLS = /[ \-_()]/g;
|
|
|
81
83
|
function isText(value) {
|
|
82
84
|
return Number.isNaN(parseInt(value.replaceAll(MASK_SYMBOLS, ''), 10));
|
|
83
85
|
}
|
|
84
|
-
class
|
|
86
|
+
class TuiInputPhoneDirective extends TuiControl {
|
|
85
87
|
constructor() {
|
|
86
88
|
super(...arguments);
|
|
87
|
-
this.
|
|
89
|
+
this.input = inject(TuiInputDirective);
|
|
88
90
|
this.host = inject(TuiTextfieldComponent);
|
|
91
|
+
this.options = inject(TUI_INPUT_PHONE_OPTIONS);
|
|
92
|
+
this.el = tuiInjectElement();
|
|
89
93
|
this.nonRemovablePrefix = computed(() => `${this.countryCode()} `);
|
|
90
94
|
this.inputMode = computed(() => (this.allowText() ? 'text' : 'numeric'));
|
|
91
95
|
this.valueEffect = effect(() => {
|
|
92
96
|
if (this.value()) {
|
|
93
|
-
this.
|
|
97
|
+
this.input.value.set(maskitoTransform(this.value() ?? '', this.mask()));
|
|
94
98
|
}
|
|
95
|
-
}
|
|
99
|
+
});
|
|
96
100
|
this.blurEffect = effect(() => {
|
|
97
101
|
const incomplete = untracked(() => !this.value());
|
|
98
102
|
const prefix = incomplete && this.interactive() && !this.allowText();
|
|
99
103
|
if (!this.host.focused() && incomplete) {
|
|
100
|
-
this.
|
|
104
|
+
this.input.value.set('');
|
|
101
105
|
}
|
|
102
106
|
else if (this.host.focused() && prefix) {
|
|
103
|
-
this.
|
|
107
|
+
this.input.value.set(this.nonRemovablePrefix());
|
|
104
108
|
}
|
|
105
|
-
}
|
|
106
|
-
this.options = inject(TUI_INPUT_PHONE_OPTIONS);
|
|
107
|
-
this.el = tuiInjectElement();
|
|
109
|
+
});
|
|
108
110
|
this.mask = computed(() => this.calculateMask(this.countryCode(), this.phoneMask(), this.nonRemovablePrefix(), this.allowText()));
|
|
109
111
|
this.maskito = tuiMaskito(computed(() => this.mask()));
|
|
110
112
|
this.countryCode = signal(extractCountryCode(this.options.mask));
|
|
@@ -122,7 +124,7 @@ class TuiInputPhone extends TuiControl {
|
|
|
122
124
|
}
|
|
123
125
|
onInput(value) {
|
|
124
126
|
if (!value && !this.allowText()) {
|
|
125
|
-
this.
|
|
127
|
+
this.input.value.set(this.nonRemovablePrefix());
|
|
126
128
|
}
|
|
127
129
|
const parsed = isText(value)
|
|
128
130
|
? value
|
|
@@ -158,22 +160,21 @@ class TuiInputPhone extends TuiControl {
|
|
|
158
160
|
],
|
|
159
161
|
};
|
|
160
162
|
}
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
162
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
|
163
|
-
tuiAsControl(
|
|
163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
164
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiInputPhoneDirective, isStandalone: true, selector: "input[tuiInputPhone]", inputs: { allowTextSetter: ["allowText", "allowTextSetter"], maskSetter: ["mask", "maskSetter"] }, host: { attributes: { "type": "tel" }, listeners: { "input": "onInput($event.target.value)" }, properties: { "inputMode": "inputMode()", "disabled": "disabled()" } }, providers: [
|
|
165
|
+
tuiAsControl(TuiInputPhoneDirective),
|
|
164
166
|
tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),
|
|
165
|
-
], usesInheritance: true, hostDirectives: [{ directive: i1.
|
|
167
|
+
], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.MaskitoDirective }], ngImport: i0 }); }
|
|
166
168
|
}
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputPhoneDirective, decorators: [{
|
|
168
170
|
type: Directive,
|
|
169
171
|
args: [{
|
|
170
|
-
standalone: true,
|
|
171
172
|
selector: 'input[tuiInputPhone]',
|
|
172
173
|
providers: [
|
|
173
|
-
tuiAsControl(
|
|
174
|
+
tuiAsControl(TuiInputPhoneDirective),
|
|
174
175
|
tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),
|
|
175
176
|
],
|
|
176
|
-
hostDirectives: [
|
|
177
|
+
hostDirectives: [TuiWithInput, MaskitoDirective],
|
|
177
178
|
host: {
|
|
178
179
|
type: 'tel',
|
|
179
180
|
'[inputMode]': 'inputMode()',
|
|
@@ -197,9 +198,17 @@ function extractMask(mask) {
|
|
|
197
198
|
return match?.[1]?.trim() || '';
|
|
198
199
|
}
|
|
199
200
|
|
|
201
|
+
const TuiInputPhone = [
|
|
202
|
+
TuiInputPhoneDirective,
|
|
203
|
+
TuiLabel,
|
|
204
|
+
TuiTextfieldComponent,
|
|
205
|
+
TuiTextfieldOptionsDirective,
|
|
206
|
+
TuiDropdownContent,
|
|
207
|
+
];
|
|
208
|
+
|
|
200
209
|
/**
|
|
201
210
|
* Generated bundle index. Do not edit.
|
|
202
211
|
*/
|
|
203
212
|
|
|
204
|
-
export { TUI_INPUT_PHONE_DEFAULT_OPTIONS, TUI_INPUT_PHONE_OPTIONS, TuiInputPhone, tuiInputPhoneOptionsProvider };
|
|
213
|
+
export { TUI_INPUT_PHONE_DEFAULT_OPTIONS, TUI_INPUT_PHONE_OPTIONS, TuiInputPhone, TuiInputPhoneDirective, tuiInputPhoneOptionsProvider };
|
|
205
214
|
//# sourceMappingURL=taiga-ui-kit-components-input-phone.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-components-input-phone.mjs","sources":["../../../projects/kit/components/input-phone/input-phone.options.ts","../../../projects/kit/components/input-phone/utils/complete-phone-insertion-preprocessor.ts","../../../projects/kit/components/input-phone/utils/create-phone-mask-expression.ts","../../../projects/kit/components/input-phone/input-phone.directive.ts","../../../projects/kit/components/input-phone/taiga-ui-kit-components-input-phone.ts"],"sourcesContent":["import {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiInputPhoneOptions {\n readonly allowText: boolean;\n readonly mask: string;\n readonly valueTransformer: TuiValueTransformer<string | null, any>;\n}\n\nexport const TUI_INPUT_PHONE_DEFAULT_OPTIONS: TuiInputPhoneOptions = {\n mask: '+1 ### ###-####',\n allowText: false,\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n};\n\nexport const [TUI_INPUT_PHONE_OPTIONS, tuiInputPhoneOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_PHONE_DEFAULT_OPTIONS,\n);\n","import {type MaskitoPreprocessor} from '@maskito/core';\n\nconst countDigits = (value: string): number => value.replaceAll(/\\D/g, '').length;\n\n/**\n * `InputPhone` component sets country code as non-removable prefix.\n * This prefix appears on focus and cannot be erased.\n * But users sometimes can copy complete phone number (from any different source)\n * and try to insert the whole string inside our `InputPhone` textfield.\n * This preprocessor helps to avoid country prefix duplication on paste/drop/autofill events.\n */\nexport function tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): MaskitoPreprocessor {\n const completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replaceAll(\n /[^#\\d]+/g,\n '',\n ).length;\n\n const trimCountryPrefix = (value: string): string =>\n countryCode === '+7'\n ? value.replace(/^(\\+?\\s*7?\\s?8?)\\s?/, '')\n : value.replace(\n new RegExp(`^(\\\\+?\\\\s*${countryCode.replace('+', '')}?)\\\\s?`),\n '',\n );\n\n return ({elementState, data}) => {\n const {value, selection} = elementState;\n\n return {\n elementState: {\n selection,\n value:\n /**\n * The only possible case when `value` includes digits more\n * than mask expression allows – browser autofill.\n * It means that we are inside `input`-event\n * and mask are ready to reject \"extra\" characters.\n * We should cut leading country prefix to save trailing characters!\n */\n countDigits(value) > completePhoneLength\n ? trimCountryPrefix(value)\n : value,\n },\n data:\n countDigits(data) >= completePhoneLength || data.startsWith(countryCode)\n ? /**\n * User tries to insert/drop the complete phone number (with country prefix).\n * We should drop already existing non-removable prefix.\n */\n trimCountryPrefix(data)\n : data,\n };\n };\n}\n","/**\n * Create {@link https://maskito.dev/core-concepts/mask-expression pattern mask expression} for phone number\n *\n * @example\n * tuiCreatePhoneMaskExpression('+1', '(###) ###-####');\n */\nexport function tuiCreatePhoneMaskExpression(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): Array<RegExp | string> {\n return [\n ...countryCode.split(''),\n ' ',\n ...phoneMaskAfterCountryCode\n .replaceAll(/[^#\\- ()]+/g, '')\n .split('')\n .map((item) => (item === '#' ? /\\d/ : item)),\n ];\n}\n","import {\n computed,\n Directive,\n effect,\n inject,\n Input,\n signal,\n untracked,\n} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoCaretGuard, maskitoPrefixPostprocessorGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldDirective,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_PHONE_OPTIONS} from './input-phone.options';\nimport {tuiCreateCompletePhoneInsertionPreprocessor} from './utils/complete-phone-insertion-preprocessor';\nimport {tuiCreatePhoneMaskExpression} from './utils/create-phone-mask-expression';\n\nconst MASK_SYMBOLS = /[ \\-_()]/g;\n\nfunction isText(value: string): boolean {\n return Number.isNaN(parseInt(value.replaceAll(MASK_SYMBOLS, ''), 10));\n}\n\n@Directive({\n standalone: true,\n selector: 'input[tuiInputPhone]',\n providers: [\n tuiAsControl(TuiInputPhone),\n tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),\n ],\n hostDirectives: [TuiWithTextfield, MaskitoDirective],\n host: {\n type: 'tel',\n '[inputMode]': 'inputMode()',\n '[disabled]': 'disabled()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputPhone extends TuiControl<string | null> {\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly host: TuiTextfieldComponent<string> = inject(TuiTextfieldComponent);\n\n protected readonly nonRemovablePrefix = computed(() => `${this.countryCode()} `);\n protected inputMode = computed(() => (this.allowText() ? 'text' : 'numeric'));\n\n protected readonly valueEffect = effect(() => {\n if (this.value()) {\n this.textfield.value.set(maskitoTransform(this.value() ?? '', this.mask()));\n }\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly blurEffect = effect(() => {\n const incomplete = untracked(() => !this.value());\n const prefix = incomplete && this.interactive() && !this.allowText();\n\n if (!this.host.focused() && incomplete) {\n this.textfield.value.set('');\n } else if (this.host.focused() && prefix) {\n this.textfield.value.set(this.nonRemovablePrefix());\n }\n }, TUI_ALLOW_SIGNAL_WRITES);\n\n protected readonly options = inject(TUI_INPUT_PHONE_OPTIONS);\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n\n protected readonly mask = computed(() =>\n this.calculateMask(\n this.countryCode(),\n this.phoneMask(),\n this.nonRemovablePrefix(),\n this.allowText(),\n ),\n );\n\n protected readonly maskito = tuiMaskito(computed(() => this.mask()));\n\n public readonly countryCode = signal(extractCountryCode(this.options.mask));\n public readonly allowText = signal(this.options.allowText);\n public readonly phoneMask = signal(extractMask(this.options.mask));\n\n // TODO(v5): replace with signal input\n @Input('allowText')\n public set allowTextSetter(allow: boolean) {\n this.allowText.set(allow);\n }\n\n // TODO(v5): replace with signal input\n @Input('mask')\n public set maskSetter(mask: string) {\n this.countryCode.set(extractCountryCode(mask));\n this.phoneMask.set(extractMask(mask));\n }\n\n protected onInput(value: string): void {\n if (!value && !this.allowText()) {\n this.textfield.value.set(this.nonRemovablePrefix());\n }\n\n const parsed = isText(value)\n ? value\n : value.replaceAll(MASK_SYMBOLS, '').slice(0, this.maxPhoneLength);\n\n this.onChange(parsed === this.countryCode() || isText(parsed) ? '' : parsed);\n }\n\n private get maxPhoneLength(): number {\n return (\n this.countryCode().length + this.phoneMask().replaceAll(/[^#]+/g, '').length\n );\n }\n\n private calculateMask(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n nonRemovablePrefix: string,\n allowText: boolean,\n ): MaskitoOptions {\n const mask = tuiCreatePhoneMaskExpression(countryCode, phoneMaskAfterCountryCode);\n const preprocessors = [\n tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode,\n phoneMaskAfterCountryCode,\n ),\n ];\n\n return allowText\n ? {\n mask: ({value}) =>\n isText(value) && value !== '+'\n ? (MASKITO_DEFAULT_OPTIONS.mask as RegExp)\n : mask,\n preprocessors,\n }\n : {\n mask,\n preprocessors,\n postprocessors: [\n maskitoPrefixPostprocessorGenerator(nonRemovablePrefix),\n ],\n plugins: [\n maskitoCaretGuard((value, [from, to]) => [\n from === to ? nonRemovablePrefix.length : 0,\n value.length,\n ]),\n ],\n };\n }\n}\n\nfunction extractCountryCode(mask: string): string {\n const match = /^(\\+\\d+)/.exec(mask);\n\n return match?.[1] || '';\n}\n\nfunction extractMask(mask: string): string {\n const match = /^\\+\\d+(.*)$/.exec(mask);\n\n return match?.[1]?.trim() || '';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names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-phone.mjs","sources":["../../../projects/kit/components/input-phone/input-phone.options.ts","../../../projects/kit/components/input-phone/utils/complete-phone-insertion-preprocessor.ts","../../../projects/kit/components/input-phone/utils/create-phone-mask-expression.ts","../../../projects/kit/components/input-phone/input-phone.directive.ts","../../../projects/kit/components/input-phone/input-phone.ts","../../../projects/kit/components/input-phone/taiga-ui-kit-components-input-phone.ts"],"sourcesContent":["import {\n TUI_IDENTITY_VALUE_TRANSFORMER,\n type TuiValueTransformer,\n} from '@taiga-ui/cdk/classes';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\n\nexport interface TuiInputPhoneOptions {\n readonly allowText: boolean;\n readonly mask: string;\n readonly valueTransformer: TuiValueTransformer<string | null, any>;\n}\n\nexport const TUI_INPUT_PHONE_DEFAULT_OPTIONS: TuiInputPhoneOptions = {\n mask: '+1 ### ###-####',\n allowText: false,\n valueTransformer: TUI_IDENTITY_VALUE_TRANSFORMER,\n};\n\nexport const [TUI_INPUT_PHONE_OPTIONS, tuiInputPhoneOptionsProvider] = tuiCreateOptions(\n TUI_INPUT_PHONE_DEFAULT_OPTIONS,\n);\n","import {type MaskitoPreprocessor} from '@maskito/core';\n\nconst countDigits = (value: string): number => value.replaceAll(/\\D/g, '').length;\n\n/**\n * `InputPhone` component sets country code as non-removable prefix.\n * This prefix appears on focus and cannot be erased.\n * But users sometimes can copy complete phone number (from any different source)\n * and try to insert the whole string inside our `InputPhone` textfield.\n * This preprocessor helps to avoid country prefix duplication on paste/drop/autofill events.\n */\nexport function tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): MaskitoPreprocessor {\n const completePhoneLength = (countryCode + phoneMaskAfterCountryCode).replaceAll(\n /[^#\\d]+/g,\n '',\n ).length;\n\n const trimCountryPrefix = (value: string): string =>\n countryCode === '+7'\n ? value.replace(/^(\\+?\\s*7?\\s?8?)\\s?/, '')\n : value.replace(\n new RegExp(String.raw`^(\\+?\\s*${countryCode.replace('+', '')}?)\\s?`),\n '',\n );\n\n return ({elementState, data}) => {\n const {value, selection} = elementState;\n\n return {\n elementState: {\n selection,\n value:\n /**\n * The only possible case when `value` includes digits more\n * than mask expression allows – browser autofill.\n * It means that we are inside `input`-event\n * and mask are ready to reject \"extra\" characters.\n * We should cut leading country prefix to save trailing characters!\n */\n countDigits(value) > completePhoneLength\n ? trimCountryPrefix(value)\n : value,\n },\n data:\n countDigits(data) >= completePhoneLength || data.startsWith(countryCode)\n ? /**\n * User tries to insert/drop the complete phone number (with country prefix).\n * We should drop already existing non-removable prefix.\n */\n trimCountryPrefix(data)\n : data,\n };\n };\n}\n","/**\n * Create {@link https://maskito.dev/core-concepts/mask-expression pattern mask expression} for phone number\n *\n * @example\n * tuiCreatePhoneMaskExpression('+1', '(###) ###-####');\n */\nexport function tuiCreatePhoneMaskExpression(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n): Array<RegExp | string> {\n return [\n ...countryCode.split(''),\n ' ',\n ...phoneMaskAfterCountryCode\n .replaceAll(/[^#\\- ()]+/g, '')\n .split('')\n .map((item) => (item === '#' ? /\\d/ : item)),\n ];\n}\n","import {\n computed,\n Directive,\n effect,\n inject,\n Input,\n signal,\n untracked,\n} from '@angular/core';\nimport {MaskitoDirective} from '@maskito/angular';\nimport {\n MASKITO_DEFAULT_OPTIONS,\n type MaskitoOptions,\n maskitoTransform,\n} from '@maskito/core';\nimport {maskitoCaretGuard, maskitoPrefixPostprocessorGenerator} from '@maskito/kit';\nimport {tuiAsControl, TuiControl, tuiValueTransformerFrom} from '@taiga-ui/cdk/classes';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {tuiMaskito} from '@taiga-ui/kit/utils';\n\nimport {TUI_INPUT_PHONE_OPTIONS} from './input-phone.options';\nimport {tuiCreateCompletePhoneInsertionPreprocessor} from './utils/complete-phone-insertion-preprocessor';\nimport {tuiCreatePhoneMaskExpression} from './utils/create-phone-mask-expression';\n\nconst MASK_SYMBOLS = /[ \\-_()]/g;\n\nfunction isText(value: string): boolean {\n return Number.isNaN(parseInt(value.replaceAll(MASK_SYMBOLS, ''), 10));\n}\n\n@Directive({\n selector: 'input[tuiInputPhone]',\n providers: [\n tuiAsControl(TuiInputPhoneDirective),\n tuiValueTransformerFrom(TUI_INPUT_PHONE_OPTIONS),\n ],\n hostDirectives: [TuiWithInput, MaskitoDirective],\n host: {\n type: 'tel',\n '[inputMode]': 'inputMode()',\n '[disabled]': 'disabled()',\n '(input)': 'onInput($event.target.value)',\n },\n})\nexport class TuiInputPhoneDirective extends TuiControl<string | null> {\n private readonly input = inject(TuiInputDirective);\n private readonly host: TuiTextfieldComponent<string> = inject(TuiTextfieldComponent);\n\n protected readonly options = inject(TUI_INPUT_PHONE_OPTIONS);\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly nonRemovablePrefix = computed(() => `${this.countryCode()} `);\n protected inputMode = computed(() => (this.allowText() ? 'text' : 'numeric'));\n protected readonly valueEffect = effect(() => {\n if (this.value()) {\n this.input.value.set(maskitoTransform(this.value() ?? '', this.mask()));\n }\n });\n\n protected readonly blurEffect = effect(() => {\n const incomplete = untracked(() => !this.value());\n const prefix = incomplete && this.interactive() && !this.allowText();\n\n if (!this.host.focused() && incomplete) {\n this.input.value.set('');\n } else if (this.host.focused() && prefix) {\n this.input.value.set(this.nonRemovablePrefix());\n }\n });\n\n protected readonly mask = computed(() =>\n this.calculateMask(\n this.countryCode(),\n this.phoneMask(),\n this.nonRemovablePrefix(),\n this.allowText(),\n ),\n );\n\n protected readonly maskito = tuiMaskito(computed(() => this.mask()));\n\n public readonly countryCode = signal(extractCountryCode(this.options.mask));\n public readonly allowText = signal(this.options.allowText);\n public readonly phoneMask = signal(extractMask(this.options.mask));\n\n // TODO(v5): replace with signal input\n @Input('allowText')\n public set allowTextSetter(allow: boolean) {\n this.allowText.set(allow);\n }\n\n // TODO(v5): replace with signal input\n @Input('mask')\n public set maskSetter(mask: string) {\n this.countryCode.set(extractCountryCode(mask));\n this.phoneMask.set(extractMask(mask));\n }\n\n protected onInput(value: string): void {\n if (!value && !this.allowText()) {\n this.input.value.set(this.nonRemovablePrefix());\n }\n\n const parsed = isText(value)\n ? value\n : value.replaceAll(MASK_SYMBOLS, '').slice(0, this.maxPhoneLength);\n\n this.onChange(parsed === this.countryCode() || isText(parsed) ? '' : parsed);\n }\n\n private get maxPhoneLength(): number {\n return (\n this.countryCode().length + this.phoneMask().replaceAll(/[^#]+/g, '').length\n );\n }\n\n private calculateMask(\n countryCode: string,\n phoneMaskAfterCountryCode: string,\n nonRemovablePrefix: string,\n allowText: boolean,\n ): MaskitoOptions {\n const mask = tuiCreatePhoneMaskExpression(countryCode, phoneMaskAfterCountryCode);\n const preprocessors = [\n tuiCreateCompletePhoneInsertionPreprocessor(\n countryCode,\n phoneMaskAfterCountryCode,\n ),\n ];\n\n return allowText\n ? {\n mask: ({value}) =>\n isText(value) && value !== '+'\n ? (MASKITO_DEFAULT_OPTIONS.mask as RegExp)\n : mask,\n preprocessors,\n }\n : {\n mask,\n preprocessors,\n postprocessors: [\n maskitoPrefixPostprocessorGenerator(nonRemovablePrefix),\n ],\n plugins: [\n maskitoCaretGuard((value, [from, to]) => [\n from === to ? nonRemovablePrefix.length : 0,\n value.length,\n ]),\n ],\n };\n }\n}\n\nfunction extractCountryCode(mask: string): string {\n const match = /^(\\+\\d+)/.exec(mask);\n\n return match?.[1] || '';\n}\n\nfunction extractMask(mask: string): string {\n const match = /^\\+\\d+(.*)$/.exec(mask);\n\n return match?.[1]?.trim() || '';\n}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals';\n\nimport {TuiInputPhoneDirective} from './input-phone.directive';\n\nexport const TuiInputPhone = [\n TuiInputPhoneDirective,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAYa,MAAA,+BAA+B,GAAyB;AACjE,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,gBAAgB,EAAE,8BAA8B;;AAG7C,MAAM,CAAC,uBAAuB,EAAE,4BAA4B,CAAC,GAAG,gBAAgB,CACnF,+BAA+B;;ACjBnC,MAAM,WAAW,GAAG,CAAC,KAAa,KAAa,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM;AAEjF;;;;;;AAMG;AACa,SAAA,2CAA2C,CACvD,WAAmB,EACnB,yBAAiC,EAAA;AAEjC,IAAA,MAAM,mBAAmB,GAAG,CAAC,WAAW,GAAG,yBAAyB,EAAE,UAAU,CAC5E,UAAU,EACV,EAAE,CACL,CAAC,MAAM;IAER,MAAM,iBAAiB,GAAG,CAAC,KAAa,KACpC,WAAW,KAAK;UACV,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE;UACvC,KAAK,CAAC,OAAO,CACT,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAA,CAAA,QAAA,EAAW,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA,KAAA,CAAO,CAAC,EACpE,EAAE,CACL;AAEX,IAAA,OAAO,CAAC,EAAC,YAAY,EAAE,IAAI,EAAC,KAAI;AAC5B,QAAA,MAAM,EAAC,KAAK,EAAE,SAAS,EAAC,GAAG,YAAY;QAEvC,OAAO;AACH,YAAA,YAAY,EAAE;gBACV,SAAS;gBACT,KAAK;AACD;;;;;;AAMG;AACH,gBAAA,WAAW,CAAC,KAAK,CAAC,GAAG;AACjB,sBAAE,iBAAiB,CAAC,KAAK;AACz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