@taiga-ui/kit 3.0.0-rc.0 → 3.0.0-rc.1
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/bundles/taiga-ui-kit-components-accordion.umd.js +5 -17
- package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-action.umd.js +3 -9
- package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-arrow.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-avatar.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badge.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-badge.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-badged-content.umd.js +3 -6
- package/bundles/taiga-ui-kit-components-badged-content.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js +0 -1
- package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js +12 -8
- package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-carousel.umd.js +4 -5
- package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +7 -10
- package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-checkbox.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-combo-box.umd.js +21 -41
- package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +5 -26
- package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-files.umd.js +1 -2
- package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-copy.umd.js +21 -36
- package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-count.umd.js +12 -35
- package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js +19 -42
- package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js +18 -42
- package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-date.umd.js +17 -41
- package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-files.umd.js +4 -17
- package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-inline.umd.js +2 -8
- package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js +19 -37
- package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-month.umd.js +19 -37
- package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-number.umd.js +14 -37
- package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-password.umd.js +29 -56
- package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +38 -51
- package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-phone.umd.js +30 -57
- package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-range.umd.js +17 -13
- package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-slider.umd.js +14 -12
- package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-tag.umd.js +33 -50
- package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input-time.umd.js +8 -15
- package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-input.umd.js +16 -33
- package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js +108 -18
- package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js +1 -1
- package/bundles/taiga-ui-kit-components-marker-icon.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +3 -3
- package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-multi-select.umd.js +34 -69
- package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pagination.umd.js +10 -23
- package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +2 -15
- package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-progress.umd.js +5 -15
- package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-block.umd.js +7 -10
- package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio-list.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-radio.umd.js +5 -10
- package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-range.umd.js +40 -86
- package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-rating.umd.js +4 -8
- package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select-option.umd.js +5 -5
- package/bundles/taiga-ui-kit-components-select-option.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-select.umd.js +20 -40
- package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-slider.umd.js +40 -38
- package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-stepper.umd.js +9 -7
- package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tabs.umd.js +40 -40
- package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tag.umd.js +6 -17
- package/bundles/taiga-ui-kit-components-tag.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-text-area.umd.js +18 -31
- package/bundles/taiga-ui-kit-components-text-area.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-toggle.umd.js +5 -9
- package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-components-tree.umd.js +2 -8
- package/bundles/taiga-ui-kit-components-tree.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-constants.umd.js +334 -3
- package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
- package/bundles/{taiga-ui-kit-directives-dropdown-context.umd.js → taiga-ui-kit-directives-data-list-dropdown-manager.umd.js} +117 -141
- package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -0
- package/bundles/taiga-ui-kit-directives-highlight.umd.js +0 -1
- package/bundles/taiga-ui-kit-directives-highlight.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-present.umd.js +2 -2
- package/bundles/taiga-ui-kit-directives-present.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives-project-class.umd.js +0 -3
- package/bundles/taiga-ui-kit-directives-project-class.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-directives.umd.js +6 -18
- package/bundles/taiga-ui-kit-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js +4 -4
- package/bundles/taiga-ui-kit-internal-primitive-calendar-range.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js +0 -2
- package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +3 -3
- package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-providers.umd.js +11 -42
- package/bundles/taiga-ui-kit-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-tokens.umd.js +17 -12
- package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-files.umd.js +3 -15
- package/bundles/taiga-ui-kit-utils-files.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-format.umd.js +1 -5
- package/bundles/taiga-ui-kit-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-mask.umd.js +3 -9
- package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js +1 -1
- package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +1 -5
- package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-kit-utils.umd.js +4 -10
- package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
- package/components/badge/badge.component.d.ts +2 -2
- package/components/badged-content/badged-content.component.d.ts +2 -2
- package/components/combo-box/index.d.ts +0 -1
- package/components/filter/filter.component.d.ts +1 -1
- package/components/input/index.d.ts +0 -1
- package/components/input-copy/index.d.ts +0 -1
- package/components/input-copy/input-copy.component.d.ts +4 -4
- package/components/input-date/index.d.ts +0 -1
- package/components/input-date-range/index.d.ts +0 -1
- package/components/input-date-time/index.d.ts +0 -1
- package/components/input-month/index.d.ts +0 -1
- package/components/input-month-range/index.d.ts +0 -1
- package/components/input-password/input-password.component.d.ts +2 -2
- package/components/input-password/input-password.module.d.ts +2 -3
- package/components/input-phone/index.d.ts +0 -1
- package/components/input-phone/input-phone.component.d.ts +2 -2
- package/components/input-phone-international/utils/extract-value-from-event.d.ts +1 -5
- package/components/input-range/input-range.component.d.ts +1 -0
- package/components/input-slider/input-slider.component.d.ts +1 -0
- package/components/input-tag/input-tag-options.d.ts +4 -1
- package/components/input-tag/input-tag.component.d.ts +3 -5
- package/components/line-clamp/index.d.ts +1 -0
- package/components/line-clamp/line-clamp-box.component.d.ts +7 -0
- package/components/line-clamp/line-clamp-position.directive.d.ts +9 -0
- package/components/line-clamp/line-clamp.module.d.ts +7 -5
- package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -3
- package/components/pagination/pagination.component.d.ts +0 -1
- package/components/progress/progress-segmented/progress-segmented.component.d.ts +0 -2
- package/components/range/range.component.d.ts +7 -23
- package/components/select/index.d.ts +0 -1
- package/components/slider/helpers/slider-key-steps.directive.d.ts +1 -3
- package/components/slider/slider.component.d.ts +5 -3
- package/components/stepper/step/step.component.d.ts +2 -2
- package/components/tabs/tab/tab.providers.d.ts +1 -4
- package/components/tabs/tabs-with-more/tabs-with-more.component.d.ts +2 -1
- package/components/tabs/tabs-with-more/tabs-with-more.providers.d.ts +3 -4
- package/components/tag/tag.component.d.ts +1 -3
- package/components/text-area/index.d.ts +0 -1
- package/components/tree/components/tree-item/tree-item.providers.d.ts +0 -1
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +15 -0
- package/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.d.ts +7 -0
- package/directives/data-list-dropdown-manager/index.d.ts +2 -0
- package/directives/data-list-dropdown-manager/package.json +10 -0
- package/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.d.ts +5 -0
- package/directives/index.d.ts +1 -3
- package/esm2015/components/accordion/accordion-item/accordion-item.component.js +5 -17
- package/esm2015/components/accordion/accordion.component.js +5 -5
- package/esm2015/components/action/action.component.js +6 -12
- package/esm2015/components/arrow/arrow.component.js +3 -3
- package/esm2015/components/avatar/avatar.component.js +6 -6
- package/esm2015/components/badge/badge.component.js +6 -6
- package/esm2015/components/badged-content/badged-content.component.js +4 -7
- package/esm2015/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/esm2015/components/calendar-month/calendar-month.component.js +1 -2
- package/esm2015/components/calendar-range/calendar-range.component.js +12 -11
- package/esm2015/components/carousel/carousel-scroll.directive.js +3 -3
- package/esm2015/components/carousel/carousel.component.js +4 -5
- package/esm2015/components/carousel/carousel.directive.js +3 -3
- package/esm2015/components/checkbox/checkbox.component.js +8 -12
- package/esm2015/components/checkbox-block/checkbox-block.component.js +10 -13
- package/esm2015/components/checkbox-labeled/checkbox-labeled.component.js +8 -12
- package/esm2015/components/combo-box/combo-box.component.js +20 -8
- package/esm2015/components/combo-box/combo-box.directive.js +5 -15
- package/esm2015/components/combo-box/index.js +1 -2
- package/esm2015/components/data-list-wrapper/data-list-group-wrapper.component.js +5 -15
- package/esm2015/components/data-list-wrapper/data-list-wrapper.component.js +5 -15
- package/esm2015/components/data-list-wrapper/data-list-wrapper.js +3 -4
- package/esm2015/components/files/file/file.component.js +3 -4
- package/esm2015/components/filter/filter.component.js +2 -2
- package/esm2015/components/input/index.js +1 -2
- package/esm2015/components/input/input.component.js +18 -7
- package/esm2015/components/input/input.directive.js +5 -15
- package/esm2015/components/input-copy/index.js +1 -2
- package/esm2015/components/input-copy/input-copy.component.js +18 -10
- package/esm2015/components/input-copy/input-copy.directive.js +5 -15
- package/esm2015/components/input-count/input-count.component.js +14 -27
- package/esm2015/components/input-count/input-count.directive.js +5 -15
- package/esm2015/components/input-date/index.js +1 -2
- package/esm2015/components/input-date/input-date.component.js +15 -9
- package/esm2015/components/input-date/input-date.directive.js +5 -15
- package/esm2015/components/input-date-range/index.js +1 -2
- package/esm2015/components/input-date-range/input-date-range.component.js +18 -11
- package/esm2015/components/input-date-range/input-date-range.directive.js +5 -15
- package/esm2015/components/input-date-time/index.js +1 -2
- package/esm2015/components/input-date-time/input-date-time.component.js +16 -10
- package/esm2015/components/input-date-time/input-date-time.directive.js +5 -15
- package/esm2015/components/input-files/input-files.component.js +8 -21
- package/esm2015/components/input-inline/input-inline.component.js +5 -11
- package/esm2015/components/input-month/index.js +1 -2
- package/esm2015/components/input-month/input-month.component.js +17 -8
- package/esm2015/components/input-month/input-month.directive.js +5 -17
- package/esm2015/components/input-month-range/index.js +1 -2
- package/esm2015/components/input-month-range/input-month-range.component.js +17 -8
- package/esm2015/components/input-month-range/input-month-range.directive.js +5 -17
- package/esm2015/components/input-number/input-number.component.js +16 -29
- package/esm2015/components/input-number/input-number.directive.js +5 -15
- package/esm2015/components/input-password/input-password.component.js +18 -32
- package/esm2015/components/input-password/input-password.directive.js +5 -15
- package/esm2015/components/input-password/input-password.module.js +1 -5
- package/esm2015/components/input-phone/index.js +1 -2
- package/esm2015/components/input-phone/input-phone.component.js +28 -14
- package/esm2015/components/input-phone/input-phone.directive.js +5 -15
- package/esm2015/components/input-phone-international/input-phone-international.component.js +16 -22
- package/esm2015/components/input-phone-international/utils/extract-value-from-event.js +5 -11
- package/esm2015/components/input-range/input-range.component.js +20 -16
- package/esm2015/components/input-slider/input-slider.component.js +13 -15
- package/esm2015/components/input-tag/input-tag-options.js +8 -1
- package/esm2015/components/input-tag/input-tag.component.js +24 -54
- package/esm2015/components/input-time/input-time.component.js +11 -18
- package/esm2015/components/line-clamp/index.js +2 -1
- package/esm2015/components/line-clamp/line-clamp-box.component.js +32 -0
- package/esm2015/components/line-clamp/line-clamp-position.directive.js +26 -0
- package/esm2015/components/line-clamp/line-clamp.component.js +22 -9
- package/esm2015/components/line-clamp/line-clamp.module.js +30 -6
- package/esm2015/components/marker-icon/marker-icon.component.js +2 -2
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.component.js +11 -21
- package/esm2015/components/multi-select/multi-select-group/multi-select-group.directive.js +17 -28
- package/esm2015/components/multi-select/multi-select.component.js +15 -30
- package/esm2015/components/multi-select-option/multi-select-option.component.js +6 -6
- package/esm2015/components/pagination/pagination.component.js +13 -25
- package/esm2015/components/pdf-viewer/pdf-viewer.module.js +4 -17
- package/esm2015/components/progress/progress-bar/progress-color-segments.directive.js +4 -4
- package/esm2015/components/progress/progress-circle/progress-circle.component.js +2 -2
- package/esm2015/components/progress/progress-segmented/progress-segmented.component.js +3 -11
- package/esm2015/components/radio/radio.component.js +8 -13
- package/esm2015/components/radio-block/radio-block.component.js +10 -13
- package/esm2015/components/radio-labeled/radio-labeled.component.js +8 -12
- package/esm2015/components/radio-list/radio-list.component.js +8 -12
- package/esm2015/components/range/range-change.directive.js +10 -9
- package/esm2015/components/range/range.component.js +27 -79
- package/esm2015/components/rating/rating.component.js +7 -11
- package/esm2015/components/select/index.js +1 -2
- package/esm2015/components/select/select.component.js +19 -7
- package/esm2015/components/select/select.directive.js +5 -15
- package/esm2015/components/select-option/select-option.component.js +7 -7
- package/esm2015/components/slider/helpers/slider-key-steps.directive.js +14 -22
- package/esm2015/components/slider/helpers/slider-readonly.directive.js +5 -6
- package/esm2015/components/slider/slider.component.js +21 -10
- package/esm2015/components/stepper/step/step.component.js +5 -5
- package/esm2015/components/stepper/stepper.component.js +7 -5
- package/esm2015/components/tabs/tab/tab.providers.js +10 -10
- package/esm2015/components/tabs/tabs/tabs.component.js +1 -2
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.component.js +18 -17
- package/esm2015/components/tabs/tabs-with-more/tabs-with-more.providers.js +9 -11
- package/esm2015/components/tag/tag.component.js +10 -20
- package/esm2015/components/text-area/index.js +1 -2
- package/esm2015/components/text-area/text-area.component.js +19 -8
- package/esm2015/components/text-area/text-area.directive.js +5 -15
- package/esm2015/components/toggle/toggle.component.js +8 -12
- package/esm2015/components/tree/components/tree-item/tree-item.providers.js +2 -6
- package/esm2015/components/tree/directives/tree-controller.directive.js +3 -3
- package/esm2015/components/tree/misc/tree.service.js +1 -2
- package/esm2015/constants/max-day-range-length-mapper.js +5 -4
- package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.js +100 -0
- package/esm2015/directives/data-list-dropdown-manager/data-list-dropdown-manager.module.js +16 -0
- package/esm2015/directives/data-list-dropdown-manager/index.js +3 -0
- package/esm2015/directives/data-list-dropdown-manager/taiga-ui-kit-directives-data-list-dropdown-manager.js +5 -0
- package/esm2015/directives/highlight/highlight.directive.js +1 -2
- package/esm2015/directives/index.js +2 -4
- package/esm2015/directives/lazy-loading/lazy-loading.directive.js +2 -2
- package/esm2015/directives/lazy-loading/lazy-loading.service.js +3 -3
- package/esm2015/directives/present/present.directive.js +4 -4
- package/esm2015/directives/project-class/project-class.directive.js +1 -4
- package/esm2015/interfaces/index.js +1 -2
- package/esm2015/internal/primitive-calendar-range/primitive-calendar-range.component.js +7 -7
- package/esm2015/pipes/field-error/field-error-content-pipe.js +1 -2
- package/esm2015/pipes/field-error/field-error-pipe.js +1 -2
- package/esm2015/pipes/filter-by-input/filter-by-input.base.js +5 -5
- package/esm2015/providers/month-formatter.provider.js +8 -13
- package/esm2015/providers/specific-dropdown-controllers.js +6 -29
- package/esm2015/tokens/calendar-date-stream.js +15 -0
- package/esm2015/tokens/index.js +2 -3
- package/esm2015/utils/files/format-size.js +4 -9
- package/esm2015/utils/files/get-accept-array.js +2 -7
- package/esm2015/utils/format/string-hash-to-hsl.js +2 -5
- package/esm2015/utils/index.js +1 -2
- package/esm2015/utils/mask/create-auto-corrected-date-pipe.js +3 -8
- package/esm2015/utils/mask/create-auto-corrected-date-time-pipe.js +3 -3
- package/esm2015/utils/math/key-steps.js +3 -3
- package/esm2015/utils/miscellaneous/get-precision.js +2 -5
- package/fesm2015/taiga-ui-kit-components-accordion.js +7 -19
- package/fesm2015/taiga-ui-kit-components-accordion.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-action.js +5 -11
- package/fesm2015/taiga-ui-kit-components-action.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-arrow.js +2 -2
- package/fesm2015/taiga-ui-kit-components-arrow.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-avatar.js +5 -5
- package/fesm2015/taiga-ui-kit-components-avatar.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badge.js +4 -4
- package/fesm2015/taiga-ui-kit-components-badge.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-badged-content.js +3 -6
- package/fesm2015/taiga-ui-kit-components-badged-content.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js +1 -1
- package/fesm2015/taiga-ui-kit-components-breadcrumbs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js +0 -1
- package/fesm2015/taiga-ui-kit-components-calendar-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-calendar-range.js +12 -11
- package/fesm2015/taiga-ui-kit-components-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-carousel.js +5 -6
- package/fesm2015/taiga-ui-kit-components-carousel.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js +9 -12
- package/fesm2015/taiga-ui-kit-components-checkbox-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js +7 -11
- package/fesm2015/taiga-ui-kit-components-checkbox-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-checkbox.js +7 -11
- package/fesm2015/taiga-ui-kit-components-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-combo-box.js +22 -41
- package/fesm2015/taiga-ui-kit-components-combo-box.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js +7 -28
- package/fesm2015/taiga-ui-kit-components-data-list-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-files.js +2 -3
- package/fesm2015/taiga-ui-kit-components-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js +1 -1
- package/fesm2015/taiga-ui-kit-components-filter.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-copy.js +22 -36
- package/fesm2015/taiga-ui-kit-components-input-copy.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-count.js +15 -38
- package/fesm2015/taiga-ui-kit-components-input-count.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-range.js +20 -44
- package/fesm2015/taiga-ui-kit-components-input-date-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date-time.js +19 -44
- package/fesm2015/taiga-ui-kit-components-input-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-date.js +18 -43
- package/fesm2015/taiga-ui-kit-components-input-date.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-files.js +7 -20
- package/fesm2015/taiga-ui-kit-components-input-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-inline.js +4 -10
- package/fesm2015/taiga-ui-kit-components-input-inline.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month-range.js +20 -37
- package/fesm2015/taiga-ui-kit-components-input-month-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-month.js +20 -37
- package/fesm2015/taiga-ui-kit-components-input-month.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-number.js +17 -40
- package/fesm2015/taiga-ui-kit-components-input-number.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-password.js +20 -47
- package/fesm2015/taiga-ui-kit-components-input-password.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js +18 -30
- package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-phone.js +31 -57
- package/fesm2015/taiga-ui-kit-components-input-phone.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-range.js +19 -15
- package/fesm2015/taiga-ui-kit-components-input-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-slider.js +12 -14
- package/fesm2015/taiga-ui-kit-components-input-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-tag.js +33 -55
- package/fesm2015/taiga-ui-kit-components-input-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input-time.js +10 -17
- package/fesm2015/taiga-ui-kit-components-input-time.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-input.js +20 -36
- package/fesm2015/taiga-ui-kit-components-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-line-clamp.js +96 -14
- package/fesm2015/taiga-ui-kit-components-line-clamp.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js +1 -1
- package/fesm2015/taiga-ui-kit-components-marker-icon.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js +5 -5
- package/fesm2015/taiga-ui-kit-components-multi-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-multi-select.js +37 -73
- package/fesm2015/taiga-ui-kit-components-multi-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pagination.js +13 -25
- package/fesm2015/taiga-ui-kit-components-pagination.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js +3 -16
- package/fesm2015/taiga-ui-kit-components-pdf-viewer.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-progress.js +7 -15
- package/fesm2015/taiga-ui-kit-components-progress.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-block.js +9 -12
- package/fesm2015/taiga-ui-kit-components-radio-block.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js +7 -11
- package/fesm2015/taiga-ui-kit-components-radio-labeled.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio-list.js +7 -11
- package/fesm2015/taiga-ui-kit-components-radio-list.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-radio.js +7 -12
- package/fesm2015/taiga-ui-kit-components-radio.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-range.js +38 -86
- package/fesm2015/taiga-ui-kit-components-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-rating.js +6 -10
- package/fesm2015/taiga-ui-kit-components-rating.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select-option.js +6 -6
- package/fesm2015/taiga-ui-kit-components-select-option.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-select.js +21 -40
- package/fesm2015/taiga-ui-kit-components-select.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-slider.js +34 -32
- package/fesm2015/taiga-ui-kit-components-slider.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-stepper.js +10 -8
- package/fesm2015/taiga-ui-kit-components-stepper.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tabs.js +33 -35
- package/fesm2015/taiga-ui-kit-components-tabs.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tag.js +10 -20
- package/fesm2015/taiga-ui-kit-components-tag.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-text-area.js +22 -34
- package/fesm2015/taiga-ui-kit-components-text-area.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-toggle.js +7 -11
- package/fesm2015/taiga-ui-kit-components-toggle.js.map +1 -1
- package/fesm2015/taiga-ui-kit-components-tree.js +4 -9
- package/fesm2015/taiga-ui-kit-components-tree.js.map +1 -1
- package/fesm2015/taiga-ui-kit-constants.js +4 -3
- package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js +120 -0
- package/fesm2015/taiga-ui-kit-directives-data-list-dropdown-manager.js.map +1 -0
- package/fesm2015/taiga-ui-kit-directives-highlight.js +0 -1
- package/fesm2015/taiga-ui-kit-directives-highlight.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js +3 -3
- package/fesm2015/taiga-ui-kit-directives-lazy-loading.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-present.js +3 -3
- package/fesm2015/taiga-ui-kit-directives-present.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives-project-class.js +0 -3
- package/fesm2015/taiga-ui-kit-directives-project-class.js.map +1 -1
- package/fesm2015/taiga-ui-kit-directives.js +1 -3
- package/fesm2015/taiga-ui-kit-directives.js.map +1 -1
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js +6 -6
- package/fesm2015/taiga-ui-kit-internal-primitive-calendar-range.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-field-error.js +0 -2
- package/fesm2015/taiga-ui-kit-pipes-field-error.js.map +1 -1
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js +4 -4
- package/fesm2015/taiga-ui-kit-pipes-filter-by-input.js.map +1 -1
- package/fesm2015/taiga-ui-kit-providers.js +13 -40
- package/fesm2015/taiga-ui-kit-providers.js.map +1 -1
- package/fesm2015/taiga-ui-kit-tokens.js +15 -8
- package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-files.js +5 -15
- package/fesm2015/taiga-ui-kit-utils-files.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-format.js +2 -5
- package/fesm2015/taiga-ui-kit-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-mask.js +4 -9
- package/fesm2015/taiga-ui-kit-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-math.js +2 -2
- package/fesm2015/taiga-ui-kit-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js +2 -5
- package/fesm2015/taiga-ui-kit-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-kit-utils.js +0 -1
- package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
- package/interfaces/index.d.ts +0 -1
- package/package.json +5 -5
- package/providers/month-formatter.provider.d.ts +0 -7
- package/providers/specific-dropdown-controllers.d.ts +1 -6
- package/tokens/calendar-date-stream.d.ts +5 -0
- package/tokens/index.d.ts +1 -2
- package/tokens/validation-errors.d.ts +1 -1
- package/utils/files/format-size.d.ts +1 -5
- package/utils/files/get-accept-array.d.ts +1 -5
- package/utils/format/string-hash-to-hsl.d.ts +1 -3
- package/utils/index.d.ts +0 -1
- package/utils/mask/create-auto-corrected-date-pipe.d.ts +1 -5
- package/utils/miscellaneous/get-precision.d.ts +1 -3
- package/abstract/index.d.ts +0 -1
- package/abstract/package.json +0 -10
- package/abstract/slider/slider.d.ts +0 -69
- package/abstract/taiga-ui-kit-abstract.d.ts +0 -5
- package/bundles/taiga-ui-kit-abstract.umd.js +0 -651
- package/bundles/taiga-ui-kit-abstract.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-context.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js +0 -107
- package/bundles/taiga-ui-kit-directives-dropdown-hover.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js +0 -643
- package/bundles/taiga-ui-kit-directives-dropdown-selection.umd.js.map +0 -1
- package/bundles/taiga-ui-kit-utils-dom.umd.js +0 -124
- package/bundles/taiga-ui-kit-utils-dom.umd.js.map +0 -1
- package/components/combo-box/combo-box.providers.d.ts +0 -1
- package/components/input/input.providers.d.ts +0 -1
- package/components/input-copy/input-copy.providers.d.ts +0 -2
- package/components/input-date/input-date.providers.d.ts +0 -1
- package/components/input-date-range/input-date-range.providers.d.ts +0 -1
- package/components/input-date-time/input-date-time.providers.d.ts +0 -1
- package/components/input-month/input-month.providers.d.ts +0 -2
- package/components/input-month-range/input-month-range.providers.d.ts +0 -2
- package/components/input-phone/input-phone.providers.d.ts +0 -5
- package/components/select/select.providers.d.ts +0 -1
- package/components/text-area/text-area.providers.d.ts +0 -2
- package/directives/dropdown-context/dropdown-context.directive.d.ts +0 -30
- package/directives/dropdown-context/dropdown-context.module.d.ts +0 -8
- package/directives/dropdown-context/index.d.ts +0 -2
- package/directives/dropdown-context/package.json +0 -10
- package/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.d.ts +0 -5
- package/directives/dropdown-hover/dropdown-hover.directive.d.ts +0 -11
- package/directives/dropdown-hover/dropdown-hover.module.d.ts +0 -7
- package/directives/dropdown-hover/index.d.ts +0 -2
- package/directives/dropdown-hover/package.json +0 -10
- package/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.d.ts +0 -5
- package/directives/dropdown-selection/dropdown-selection.directive.d.ts +0 -46
- package/directives/dropdown-selection/dropdown-selection.module.d.ts +0 -8
- package/directives/dropdown-selection/index.d.ts +0 -2
- package/directives/dropdown-selection/package.json +0 -10
- package/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.d.ts +0 -5
- package/esm2015/abstract/index.js +0 -2
- package/esm2015/abstract/slider/slider.js +0 -264
- package/esm2015/abstract/taiga-ui-kit-abstract.js +0 -5
- package/esm2015/components/combo-box/combo-box.providers.js +0 -26
- package/esm2015/components/input/input.providers.js +0 -22
- package/esm2015/components/input-copy/input-copy.providers.js +0 -16
- package/esm2015/components/input-date/input-date.providers.js +0 -27
- package/esm2015/components/input-date-range/input-date-range.providers.js +0 -27
- package/esm2015/components/input-date-time/input-date-time.providers.js +0 -27
- package/esm2015/components/input-month/input-month.providers.js +0 -19
- package/esm2015/components/input-month-range/input-month-range.providers.js +0 -19
- package/esm2015/components/input-phone/input-phone.providers.js +0 -35
- package/esm2015/components/select/select.providers.js +0 -26
- package/esm2015/components/text-area/text-area.providers.js +0 -18
- package/esm2015/directives/dropdown-context/dropdown-context.directive.js +0 -141
- package/esm2015/directives/dropdown-context/dropdown-context.module.js +0 -18
- package/esm2015/directives/dropdown-context/index.js +0 -3
- package/esm2015/directives/dropdown-context/taiga-ui-kit-directives-dropdown-context.js +0 -5
- package/esm2015/directives/dropdown-hover/dropdown-hover.directive.js +0 -56
- package/esm2015/directives/dropdown-hover/dropdown-hover.module.js +0 -16
- package/esm2015/directives/dropdown-hover/index.js +0 -3
- package/esm2015/directives/dropdown-hover/taiga-ui-kit-directives-dropdown-hover.js +0 -5
- package/esm2015/directives/dropdown-selection/dropdown-selection.directive.js +0 -252
- package/esm2015/directives/dropdown-selection/dropdown-selection.module.js +0 -18
- package/esm2015/directives/dropdown-selection/index.js +0 -3
- package/esm2015/directives/dropdown-selection/taiga-ui-kit-directives-dropdown-selection.js +0 -5
- package/esm2015/interfaces/bread-crumbs-item.js +0 -2
- package/esm2015/tokens/calendar-data-stream.js +0 -3
- package/esm2015/tokens/tag-status.js +0 -6
- package/esm2015/utils/dom/get-word-range.js +0 -53
- package/esm2015/utils/dom/index.js +0 -4
- package/esm2015/utils/dom/scroll-to-element.js +0 -23
- package/esm2015/utils/dom/set-range-offset.js +0 -29
- package/esm2015/utils/dom/taiga-ui-kit-utils-dom.js +0 -5
- package/fesm2015/taiga-ui-kit-abstract.js +0 -271
- package/fesm2015/taiga-ui-kit-abstract.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js +0 -162
- package/fesm2015/taiga-ui-kit-directives-dropdown-context.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js +0 -76
- package/fesm2015/taiga-ui-kit-directives-dropdown-hover.js.map +0 -1
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js +0 -273
- package/fesm2015/taiga-ui-kit-directives-dropdown-selection.js.map +0 -1
- package/fesm2015/taiga-ui-kit-utils-dom.js +0 -111
- package/fesm2015/taiga-ui-kit-utils-dom.js.map +0 -1
- package/interfaces/bread-crumbs-item.d.ts +0 -6
- package/tokens/calendar-data-stream.d.ts +0 -4
- package/tokens/tag-status.d.ts +0 -3
- package/utils/dom/get-word-range.d.ts +0 -9
- package/utils/dom/index.d.ts +0 -3
- package/utils/dom/package.json +0 -10
- package/utils/dom/scroll-to-element.d.ts +0 -5
- package/utils/dom/set-range-offset.d.ts +0 -6
- package/utils/dom/taiga-ui-kit-utils-dom.d.ts +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-utils-mask.js","sources":["../../../projects/kit/utils/mask/create-auto-corrected-date-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-range-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-time-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-time-pipe.ts","../../../projects/kit/utils/mask/create-date-mask.ts","../../../projects/kit/utils/mask/create-date-range-mask.ts","../../../projects/kit/utils/mask/create-time-mask.ts","../../../projects/kit/utils/mask/taiga-ui-kit-utils-mask.ts"],"sourcesContent":["import {DATE_FILLER_LENGTH, TuiDateMode, TuiDay} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\nexport interface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDay | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\n/**\n * @deprecated: use {@link tuiNormalizeDateValue} instead\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function normalizeDateValue(\n dateValue: string,\n {value, min, max, dateFormat, dateSeparator}: TuiAutoCorrectedDatePipeConfigs,\n): string {\n return value && value.toString(dateFormat, dateSeparator) === dateValue\n ? dateValue\n : TuiDay.normalizeParse(dateValue, dateFormat)\n .dayLimit(min, max)\n .toString(dateFormat, dateSeparator);\n}\n\nexport function tuiCreateAutoCorrectedDatePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => {\n if (value.length !== DATE_FILLER_LENGTH) {\n return {value};\n }\n\n return {\n value: normalizeDateValue(value, config),\n };\n };\n}\n\nexport const tuiNormalizeDateValue = normalizeDateValue;\n","import {\n DATE_FILLER_LENGTH,\n DATE_RANGE_FILLER_LENGTH,\n RANGE_SEPARATOR_CHAR,\n TuiDateMode,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\ninterface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDayRange | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\nfunction parseWithLimit(value: string, config: TuiAutoCorrectedDatePipeConfigs): TuiDay {\n return TuiDay.normalizeParse(\n value.slice(0, DATE_FILLER_LENGTH),\n config.dateFormat,\n ).dayLimit(config.min, config.max);\n}\n\nfunction processRawValue(value: string, config: TuiAutoCorrectedDatePipeConfigs): string {\n const {dateFormat, dateSeparator} = config;\n\n switch (value.length) {\n case DATE_FILLER_LENGTH:\n return parseWithLimit(value, config).toString(dateFormat, dateSeparator);\n case DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length:\n return (\n parseWithLimit(value, config).toString(dateFormat, dateSeparator) +\n RANGE_SEPARATOR_CHAR\n );\n case DATE_RANGE_FILLER_LENGTH:\n return config.value &&\n config.value.toString(dateFormat, dateSeparator) === value\n ? value\n : TuiDayRange.sort(\n parseWithLimit(value.slice(0, DATE_FILLER_LENGTH), config),\n parseWithLimit(\n value.slice(DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length),\n config,\n ),\n ).toString(dateFormat, dateSeparator);\n default:\n return value;\n }\n}\n\n/**\n * Normalizes date in formatted string\n *\n * Normalizes when:\n *\n * 1. It is a single date\n * 2. It is a single date and a separator\n * 3. It is two dates and a separator between them\n *\n * In **other** cases, the value does not change.\n *\n * @param config with min and max date\n * @return mask pipe handler that handles `min` and `max`\n */\nexport function tuiCreateAutoCorrectedDateRangePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => ({value: processRawValue(value, config)});\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\n/**\n * Adjusts the entered time by omitting only suitable values for hours and minutes\n * @returns time as a string\n */\nexport function tuiCreateAutoCorrectedTimePipe(\n timeMode: TuiTimeMode = `HH:MM`,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskPipeHandler {\n const timeFormatArray = [`HH`, `MM`, `SS`, `MS`] as const;\n const safeValues = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return conformedValue => {\n const indexesOfPipedChars: number[] = [];\n const conformedValueArr = conformedValue.split(``);\n\n timeFormatArray.forEach(format => {\n const position = timeMode.indexOf(format);\n const maxFirstDigit = parseInt(String(safeValues[format]).slice(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = `0`;\n indexesOfPipedChars.push(position);\n }\n });\n\n const isInvalid = timeFormatArray.some(\n format =>\n parseInt(conformedValue.slice(timeMode.indexOf(format), 2), 10) >\n safeValues[format],\n );\n\n return isInvalid\n ? false\n : {\n value: conformedValueArr.join(``),\n indexesOfPipedChars,\n };\n };\n}\n","import {DATE_FILLER_LENGTH, tuiIsString, TuiTimeMode} from '@taiga-ui/cdk';\nimport {\n TuiTextMaskConfig,\n TuiTextMaskOptions,\n TuiTextMaskPipeHandler,\n} from '@taiga-ui/core';\nimport {DATE_TIME_SEPARATOR} from '@taiga-ui/kit/constants';\n\nimport {\n normalizeDateValue,\n TuiAutoCorrectedDatePipeConfigs,\n} from './create-auto-corrected-date-pipe';\nimport {tuiCreateAutoCorrectedTimePipe} from './create-auto-corrected-time-pipe';\n\ninterface TuiAutoCorrectedDateTimePipeConfigs extends TuiAutoCorrectedDatePipeConfigs {\n timeMode: TuiTimeMode;\n}\n\nexport function tuiCreateAutoCorrectedDateTimePipe(\n configs: TuiAutoCorrectedDateTimePipeConfigs,\n): TuiTextMaskPipeHandler {\n const timePipe = tuiCreateAutoCorrectedTimePipe(configs.timeMode);\n\n return value => {\n if (value.length < DATE_FILLER_LENGTH) {\n return {value};\n }\n\n const [date, time] = value.split(DATE_TIME_SEPARATOR);\n\n const formattedDate = normalizeDateValue(date, configs);\n\n if (!time) {\n return {value: formattedDate};\n }\n\n const pipedTime = timePipe(\n time,\n {} as unknown as TuiTextMaskOptions & TuiTextMaskConfig,\n );\n\n if (!pipedTime || tuiIsString(pipedTime)) {\n return false;\n }\n\n return {\n value: `${formattedDate}${DATE_TIME_SEPARATOR}${pipedTime.value}`,\n indexesOfPipedChars: pipedTime.indexesOfPipedChars\n ? pipedTime.indexesOfPipedChars.map(i => i + date.length + 2)\n : undefined,\n };\n };\n}\n","import {tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\n\nconst TWO_DIGITS = new Array(2).fill(TUI_DIGIT_REGEXP);\nconst FOUR_DIGITS = new Array(4).fill(TUI_DIGIT_REGEXP);\n\nexport function tuiCreateDateMask(mode: TuiDateMode, separator: string): TuiTextMaskList {\n tuiAssert.assert(separator.length === 1, `Separator should consist of only 1 symbol`);\n\n switch (mode) {\n case `YMD`:\n return [...FOUR_DIGITS, separator, ...TWO_DIGITS, separator, ...TWO_DIGITS];\n case `MDY`:\n case `DMY`:\n default:\n return [...TWO_DIGITS, separator, ...TWO_DIGITS, separator, ...FOUR_DIGITS];\n }\n}\n","import {CHAR_EN_DASH, CHAR_NO_BREAK_SPACE, tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskList} from '@taiga-ui/core';\n\nimport {tuiCreateDateMask} from './create-date-mask';\n\nexport function tuiCreateDateRangeMask(\n dateMode: TuiDateMode,\n dateSeparator: string,\n): TuiTextMaskList {\n tuiAssert.assert(\n dateSeparator.length === 1,\n `Separator should consist of only 1 symbol`,\n );\n\n const dateMask = tuiCreateDateMask(dateMode, dateSeparator);\n\n return [\n ...dateMask,\n CHAR_NO_BREAK_SPACE,\n CHAR_EN_DASH,\n CHAR_NO_BREAK_SPACE,\n ...dateMask,\n ];\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\nfunction tuiCreateTimePartMask(\n maxPartValue: number,\n prefix?: string,\n): Array<string | RegExp> {\n const {length} = String(maxPartValue);\n const regExp = new Array(length).fill(TUI_DIGIT_REGEXP);\n\n if (prefix) {\n regExp.unshift(prefix);\n }\n\n return regExp;\n}\n\nexport function tuiCreateTimeMask(\n mode: TuiTimeMode,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskList {\n const {HH, MM, SS, MS} = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return [\n ...tuiCreateTimePartMask(HH),\n ...tuiCreateTimePartMask(MM, `:`),\n ...(mode.includes(`HH:MM:SS`) ? tuiCreateTimePartMask(SS, `:`) : []),\n ...(mode === `HH:MM:SS.MSS` ? tuiCreateTimePartMask(MS, `.`) : []),\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASA;;AAEG;AACH;AACgB,SAAA,kBAAkB,C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O;QACH,GAAG,qBAAqB,CAAC,EAAE,CAAC;AAC5B,QAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,GAAG,CAAC;QACjC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAU,QAAA,CAAA,CAAC,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;AACpE,QAAA,IAAI,IAAI,KAAK,CAAc,YAAA,CAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;KACrE,CAAC;AACN;;AClCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils-mask.js","sources":["../../../projects/kit/utils/mask/create-auto-corrected-date-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-range-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-time-pipe.ts","../../../projects/kit/utils/mask/create-auto-corrected-date-time-pipe.ts","../../../projects/kit/utils/mask/create-date-mask.ts","../../../projects/kit/utils/mask/create-date-range-mask.ts","../../../projects/kit/utils/mask/create-time-mask.ts","../../../projects/kit/utils/mask/taiga-ui-kit-utils-mask.ts"],"sourcesContent":["import {DATE_FILLER_LENGTH, TuiDateMode, TuiDay} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\nexport interface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDay | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\nexport function tuiNormalizeDateValue(\n dateValue: string,\n {value, min, max, dateFormat, dateSeparator}: TuiAutoCorrectedDatePipeConfigs,\n): string {\n return value && value.toString(dateFormat, dateSeparator) === dateValue\n ? dateValue\n : TuiDay.normalizeParse(dateValue, dateFormat)\n .dayLimit(min, max)\n .toString(dateFormat, dateSeparator);\n}\n\nexport function tuiCreateAutoCorrectedDatePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => {\n if (value.length !== DATE_FILLER_LENGTH) {\n return {value};\n }\n\n return {\n value: tuiNormalizeDateValue(value, config),\n };\n };\n}\n","import {\n DATE_FILLER_LENGTH,\n DATE_RANGE_FILLER_LENGTH,\n RANGE_SEPARATOR_CHAR,\n TuiDateMode,\n TuiDay,\n TuiDayRange,\n} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler, TuiWithOptionalMinMaxWithValue} from '@taiga-ui/core';\n\ninterface TuiAutoCorrectedDatePipeConfigs\n extends TuiWithOptionalMinMaxWithValue<TuiDayRange | null, TuiDay> {\n dateFormat: TuiDateMode;\n dateSeparator: string;\n}\n\nfunction parseWithLimit(value: string, config: TuiAutoCorrectedDatePipeConfigs): TuiDay {\n return TuiDay.normalizeParse(\n value.slice(0, DATE_FILLER_LENGTH),\n config.dateFormat,\n ).dayLimit(config.min, config.max);\n}\n\nfunction processRawValue(value: string, config: TuiAutoCorrectedDatePipeConfigs): string {\n const {dateFormat, dateSeparator} = config;\n\n switch (value.length) {\n case DATE_FILLER_LENGTH:\n return parseWithLimit(value, config).toString(dateFormat, dateSeparator);\n case DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length:\n return (\n parseWithLimit(value, config).toString(dateFormat, dateSeparator) +\n RANGE_SEPARATOR_CHAR\n );\n case DATE_RANGE_FILLER_LENGTH:\n return config.value &&\n config.value.toString(dateFormat, dateSeparator) === value\n ? value\n : TuiDayRange.sort(\n parseWithLimit(value.slice(0, DATE_FILLER_LENGTH), config),\n parseWithLimit(\n value.slice(DATE_FILLER_LENGTH + RANGE_SEPARATOR_CHAR.length),\n config,\n ),\n ).toString(dateFormat, dateSeparator);\n default:\n return value;\n }\n}\n\n/**\n * Normalizes date in formatted string\n *\n * Normalizes when:\n *\n * 1. It is a single date\n * 2. It is a single date and a separator\n * 3. It is two dates and a separator between them\n *\n * In **other** cases, the value does not change.\n *\n * @param config with min and max date\n * @return mask pipe handler that handles `min` and `max`\n */\nexport function tuiCreateAutoCorrectedDateRangePipe(\n config: TuiAutoCorrectedDatePipeConfigs,\n): TuiTextMaskPipeHandler {\n return value => ({value: processRawValue(value, config)});\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskPipeHandler} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\n/**\n * Adjusts the entered time by omitting only suitable values for hours and minutes\n * @returns time as a string\n */\nexport function tuiCreateAutoCorrectedTimePipe(\n timeMode: TuiTimeMode = `HH:MM`,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskPipeHandler {\n const timeFormatArray = [`HH`, `MM`, `SS`, `MS`] as const;\n const safeValues = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return conformedValue => {\n const indexesOfPipedChars: number[] = [];\n const conformedValueArr = conformedValue.split(``);\n\n timeFormatArray.forEach(format => {\n const position = timeMode.indexOf(format);\n const maxFirstDigit = parseInt(String(safeValues[format]).slice(0, 1), 10);\n\n if (parseInt(conformedValueArr[position], 10) > maxFirstDigit) {\n conformedValueArr[position + 1] = conformedValueArr[position];\n conformedValueArr[position] = `0`;\n indexesOfPipedChars.push(position);\n }\n });\n\n const isInvalid = timeFormatArray.some(\n format =>\n parseInt(conformedValue.slice(timeMode.indexOf(format), 2), 10) >\n safeValues[format],\n );\n\n return isInvalid\n ? false\n : {\n value: conformedValueArr.join(``),\n indexesOfPipedChars,\n };\n };\n}\n","import {DATE_FILLER_LENGTH, tuiIsString, TuiTimeMode} from '@taiga-ui/cdk';\nimport {\n TuiTextMaskConfig,\n TuiTextMaskOptions,\n TuiTextMaskPipeHandler,\n} from '@taiga-ui/core';\nimport {DATE_TIME_SEPARATOR} from '@taiga-ui/kit/constants';\n\nimport {\n TuiAutoCorrectedDatePipeConfigs,\n tuiNormalizeDateValue,\n} from './create-auto-corrected-date-pipe';\nimport {tuiCreateAutoCorrectedTimePipe} from './create-auto-corrected-time-pipe';\n\ninterface TuiAutoCorrectedDateTimePipeConfigs extends TuiAutoCorrectedDatePipeConfigs {\n timeMode: TuiTimeMode;\n}\n\nexport function tuiCreateAutoCorrectedDateTimePipe(\n configs: TuiAutoCorrectedDateTimePipeConfigs,\n): TuiTextMaskPipeHandler {\n const timePipe = tuiCreateAutoCorrectedTimePipe(configs.timeMode);\n\n return value => {\n if (value.length < DATE_FILLER_LENGTH) {\n return {value};\n }\n\n const [date, time] = value.split(DATE_TIME_SEPARATOR);\n\n const formattedDate = tuiNormalizeDateValue(date, configs);\n\n if (!time) {\n return {value: formattedDate};\n }\n\n const pipedTime = timePipe(\n time,\n {} as unknown as TuiTextMaskOptions & TuiTextMaskConfig,\n );\n\n if (!pipedTime || tuiIsString(pipedTime)) {\n return false;\n }\n\n return {\n value: `${formattedDate}${DATE_TIME_SEPARATOR}${pipedTime.value}`,\n indexesOfPipedChars: pipedTime.indexesOfPipedChars\n ? pipedTime.indexesOfPipedChars.map(i => i + date.length + 2)\n : undefined,\n };\n };\n}\n","import {tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\n\nconst TWO_DIGITS = new Array(2).fill(TUI_DIGIT_REGEXP);\nconst FOUR_DIGITS = new Array(4).fill(TUI_DIGIT_REGEXP);\n\nexport function tuiCreateDateMask(mode: TuiDateMode, separator: string): TuiTextMaskList {\n tuiAssert.assert(separator.length === 1, `Separator should consist of only 1 symbol`);\n\n switch (mode) {\n case `YMD`:\n return [...FOUR_DIGITS, separator, ...TWO_DIGITS, separator, ...TWO_DIGITS];\n case `MDY`:\n case `DMY`:\n default:\n return [...TWO_DIGITS, separator, ...TWO_DIGITS, separator, ...FOUR_DIGITS];\n }\n}\n","import {CHAR_EN_DASH, CHAR_NO_BREAK_SPACE, tuiAssert, TuiDateMode} from '@taiga-ui/cdk';\nimport {TuiTextMaskList} from '@taiga-ui/core';\n\nimport {tuiCreateDateMask} from './create-date-mask';\n\nexport function tuiCreateDateRangeMask(\n dateMode: TuiDateMode,\n dateSeparator: string,\n): TuiTextMaskList {\n tuiAssert.assert(\n dateSeparator.length === 1,\n `Separator should consist of only 1 symbol`,\n );\n\n const dateMask = tuiCreateDateMask(dateMode, dateSeparator);\n\n return [\n ...dateMask,\n CHAR_NO_BREAK_SPACE,\n CHAR_EN_DASH,\n CHAR_NO_BREAK_SPACE,\n ...dateMask,\n ];\n}\n","import {TuiTimeMode} from '@taiga-ui/cdk';\nimport {TUI_DIGIT_REGEXP, TuiTextMaskList} from '@taiga-ui/core';\nimport {MAX_TIME_VALUES} from '@taiga-ui/kit/constants';\nimport {TuiTimeFormatParts} from '@taiga-ui/kit/types';\n\nfunction tuiCreateTimePartMask(\n maxPartValue: number,\n prefix?: string,\n): Array<string | RegExp> {\n const {length} = String(maxPartValue);\n const regExp = new Array(length).fill(TUI_DIGIT_REGEXP);\n\n if (prefix) {\n regExp.unshift(prefix);\n }\n\n return regExp;\n}\n\nexport function tuiCreateTimeMask(\n mode: TuiTimeMode,\n maxValues: Partial<Record<TuiTimeFormatParts, number>> = {},\n): TuiTextMaskList {\n const {HH, MM, SS, MS} = {\n ...MAX_TIME_VALUES,\n ...maxValues,\n };\n\n return [\n ...tuiCreateTimePartMask(HH),\n ...tuiCreateTimePartMask(MM, `:`),\n ...(mode.includes(`HH:MM:SS`) ? tuiCreateTimePartMask(SS, `:`) : []),\n ...(mode === `HH:MM:SS.MSS` ? tuiCreateTimePartMask(MS, `.`) : []),\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AASgB,SAAA,qBAAqB,CACjC,SAAiB,EACjB,EAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAkC,EAAA;IAE7E,OAAO,KAAK,IAAI,KAAK,CAAC,QAAQ,CA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CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;AACpE,QAAA,IAAI,IAAI,KAAK,CAAc,YAAA,CAAA,GAAG,qBAAqB,CAAC,EAAE,EAAE,CAAG,CAAA,CAAA,CAAC,GAAG,EAAE,CAAC;KACrE,CAAC;AACN;;AClCA;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { tuiRound } from '@taiga-ui/cdk';
|
|
2
2
|
import { TUI_FLOATING_PRECISION } from '@taiga-ui/kit/constants';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -23,7 +23,7 @@ function tuiPercentageToKeyStepValue(valuePercentage, keySteps) {
|
|
|
23
23
|
const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage);
|
|
24
24
|
const ratio = (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);
|
|
25
25
|
const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;
|
|
26
|
-
return
|
|
26
|
+
return tuiRound(controlValue, TUI_FLOATING_PRECISION);
|
|
27
27
|
}
|
|
28
28
|
function tuiKeyStepValueToPercentage(value, keySteps) {
|
|
29
29
|
const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] = tuiFindKeyStepsBoundariesByFn(keySteps, ([_, keyStepValue]) => value <= keyStepValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-utils-math.js","sources":["../../../projects/kit/utils/math/horizontal-direction-to-number.ts","../../../projects/kit/utils/math/key-steps.ts","../../../projects/kit/utils/math/taiga-ui-kit-utils-math.ts"],"sourcesContent":["import {TuiHorizontalDirection} from '@taiga-ui/core';\n\n/**\n * @internal\n */\nexport function tuiHorizontalDirectionToNumber(\n direction: TuiHorizontalDirection,\n): -1 | 1 {\n switch (direction) {\n case `left`:\n return -1;\n case `right`:\n return 1;\n }\n}\n","import {
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils-math.js","sources":["../../../projects/kit/utils/math/horizontal-direction-to-number.ts","../../../projects/kit/utils/math/key-steps.ts","../../../projects/kit/utils/math/taiga-ui-kit-utils-math.ts"],"sourcesContent":["import {TuiHorizontalDirection} from '@taiga-ui/core';\n\n/**\n * @internal\n */\nexport function tuiHorizontalDirectionToNumber(\n direction: TuiHorizontalDirection,\n): -1 | 1 {\n switch (direction) {\n case `left`:\n return -1;\n case `right`:\n return 1;\n }\n}\n","import {tuiRound} from '@taiga-ui/cdk';\nimport {TUI_FLOATING_PRECISION} from '@taiga-ui/kit/constants';\nimport {TuiKeySteps} from '@taiga-ui/kit/types';\n\nfunction tuiFindKeyStepsBoundariesByFn(\n keySteps: TuiKeySteps,\n fn: ([keyStepPercent, keyStepValue]: [number, number]) => boolean,\n): [[number, number], [number, number]] {\n const keyStepUpperIndex = keySteps.findIndex((keyStep, i) => i && fn(keyStep));\n const lowerStep = keySteps[keyStepUpperIndex - 1];\n const upperStep = keySteps[keyStepUpperIndex];\n\n return [lowerStep, upperStep];\n}\n\nexport function tuiPercentageToKeyStepValue(\n valuePercentage: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([keyStepPercentage, _]) => valuePercentage <= keyStepPercentage,\n );\n const ratio =\n (valuePercentage - lowerStepPercent) / (upperStepPercent - lowerStepPercent);\n const controlValue = (upperStepValue - lowerStepValue) * ratio + lowerStepValue;\n\n return tuiRound(controlValue, TUI_FLOATING_PRECISION);\n}\n\nexport function tuiKeyStepValueToPercentage(\n value: number,\n keySteps: TuiKeySteps,\n): number {\n const [[lowerStepPercent, lowerStepValue], [upperStepPercent, upperStepValue]] =\n tuiFindKeyStepsBoundariesByFn(\n keySteps,\n ([_, keyStepValue]) => value <= keyStepValue,\n );\n const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;\n\n return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;AAEG;AACG,SAAU,8BAA8B,CAC1C,SAAiC,EAAA;AAEjC,IAAA,QAAQ,SAAS;AACb,QAAA,KAAK,CAAM,IAAA,CAAA;YACP,OAAO,CAAC,CAAC,CAAC;AACd,QAAA,KAAK,CAAO,KAAA,CAAA;AACR,YAAA,OAAO,CAAC,CAAC;AAChB,KAAA;AACL;;ACVA,SAAS,6BAA6B,CAClC,QAAqB,EACrB,EAAiE,EAAA;IAEjE,MAAM,iBAAiB,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/E,MAAM,SAAS,GAAG,QAAQ,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC;AAClD,IAAA,MAAM,SAAS,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAE9C,IAAA,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AAClC,CAAC;AAEe,SAAA,2BAA2B,CACvC,eAAuB,EACvB,QAAqB,EAAA;AAErB,IAAA,MAAM,CAAC,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,GAC1E,6BAA6B,CACzB,QAAQ,EACR,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,KAAK,eAAe,IAAI,iBAAiB,CACnE,CAAC;AACN,IAAA,MAAM,KAAK,GACP,CAAC,eAAe,GAAG,gBAAgB,KAAK,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;IACjF,MAAM,YAAY,GAAG,CAAC,cAAc,GAAG,cAAc,IAAI,KAAK,GAAG,cAAc,CAAC;AAEhF,IAAA,OAAO,QAAQ,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;AAC1D,CAAC;AAEe,SAAA,2BAA2B,CACvC,KAAa,EACb,QAAqB,EAAA;AAErB,IAAA,MAAM,CAAC,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,GAC1E,6BAA6B,CACzB,QAAQ,EACR,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,KAAK,KAAK,IAAI,YAAY,CAC/C,CAAC;AACN,IAAA,MAAM,KAAK,GAAG,CAAC,KAAK,GAAG,cAAc,KAAK,cAAc,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAEhF,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,IAAI,KAAK,GAAG,gBAAgB,CAAC;AAC5E;;AC3CA;;AAEG;;;;"}
|
|
@@ -40,15 +40,12 @@ function tuiCreateTimePeriods(minHour = 0, maxHour = HOURS_IN_DAY, minutes = [0,
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* @deprecated: use {@link tuiGetPrecision} instead
|
|
44
43
|
* @return fractional length
|
|
45
44
|
*/
|
|
46
|
-
|
|
47
|
-
function getPrecision(num) {
|
|
45
|
+
function tuiGetPrecision(num) {
|
|
48
46
|
const [, fractionPart = ``] = String(num).split(`.`);
|
|
49
47
|
return fractionPart.length;
|
|
50
48
|
}
|
|
51
|
-
const tuiGetPrecision = getPrecision;
|
|
52
49
|
|
|
53
50
|
function tuiIsFlat(items) {
|
|
54
51
|
return !Array.isArray(items[0]);
|
|
@@ -69,5 +66,5 @@ function tuiControlValueFactory(control, valueTransformer) {
|
|
|
69
66
|
* Generated bundle index. Do not edit.
|
|
70
67
|
*/
|
|
71
68
|
|
|
72
|
-
export {
|
|
69
|
+
export { tuiControlValueFactory, tuiCreateDefaultDayRangePeriods, tuiCreateTimePeriods, tuiGetPrecision, tuiIsFlat };
|
|
73
70
|
//# sourceMappingURL=taiga-ui-kit-utils-miscellaneous.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-utils-miscellaneous.js","sources":["../../../projects/kit/utils/miscellaneous/create-default-day-range-periods.ts","../../../projects/kit/utils/miscellaneous/create-time-periods.ts","../../../projects/kit/utils/miscellaneous/get-precision.ts","../../../projects/kit/utils/miscellaneous/is-flat.ts","../../../projects/kit/utils/miscellaneous/replay-control-value-changes-factory.ts","../../../projects/kit/utils/miscellaneous/taiga-ui-kit-utils-miscellaneous.ts"],"sourcesContent":["import {TUI_FIRST_DAY, TuiDay, TuiDayRange} from '@taiga-ui/cdk';\nimport {TuiDayRangePeriod} from '@taiga-ui/kit/classes';\n\nexport function tuiCreateDefaultDayRangePeriods(\n periodTitles: [string, string, string, string, string, string] = [\n `For all the time`,\n `Today`,\n `Yesterday`,\n `Current week`,\n `Current month`,\n `Previous month`,\n ],\n): readonly TuiDayRangePeriod[] {\n const today = TuiDay.currentLocal();\n const yesterday = today.append({day: -1});\n const startOfWeek = today.append({day: -today.dayOfWeek()});\n const endOfWeek = startOfWeek.append({day: 6});\n const startOfMonth = today.append({day: 1 - today.day});\n const endOfMonth = startOfMonth.append({month: 1, day: -1});\n const startOfLastMonth = startOfMonth.append({month: -1});\n\n return [\n new TuiDayRangePeriod(new TuiDayRange(TUI_FIRST_DAY, today), periodTitles[0]),\n new TuiDayRangePeriod(new TuiDayRange(today, today), periodTitles[1]),\n new TuiDayRangePeriod(new TuiDayRange(yesterday, yesterday), periodTitles[2]),\n new TuiDayRangePeriod(new TuiDayRange(startOfWeek, endOfWeek), periodTitles[3]),\n new TuiDayRangePeriod(new TuiDayRange(startOfMonth, endOfMonth), periodTitles[4]),\n new TuiDayRangePeriod(\n new TuiDayRange(startOfLastMonth, startOfMonth.append({day: -1})),\n periodTitles[5],\n ),\n ];\n}\n","import {HOURS_IN_DAY, TuiTime} from '@taiga-ui/cdk';\n\nexport function tuiCreateTimePeriods(\n minHour: number = 0,\n maxHour: number = HOURS_IN_DAY,\n minutes: readonly number[] = [0, 30],\n): readonly TuiTime[] {\n const timeArray: TuiTime[] = [];\n\n for (let i = minHour; i < maxHour; i++) {\n for (let j = 0; j < minutes.length; j++) {\n const time = new TuiTime(i, minutes[j]);\n\n timeArray.push(time);\n }\n }\n\n return timeArray;\n}\n","/**\n * @
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils-miscellaneous.js","sources":["../../../projects/kit/utils/miscellaneous/create-default-day-range-periods.ts","../../../projects/kit/utils/miscellaneous/create-time-periods.ts","../../../projects/kit/utils/miscellaneous/get-precision.ts","../../../projects/kit/utils/miscellaneous/is-flat.ts","../../../projects/kit/utils/miscellaneous/replay-control-value-changes-factory.ts","../../../projects/kit/utils/miscellaneous/taiga-ui-kit-utils-miscellaneous.ts"],"sourcesContent":["import {TUI_FIRST_DAY, TuiDay, TuiDayRange} from '@taiga-ui/cdk';\nimport {TuiDayRangePeriod} from '@taiga-ui/kit/classes';\n\nexport function tuiCreateDefaultDayRangePeriods(\n periodTitles: [string, string, string, string, string, string] = [\n `For all the time`,\n `Today`,\n `Yesterday`,\n `Current week`,\n `Current month`,\n `Previous month`,\n ],\n): readonly TuiDayRangePeriod[] {\n const today = TuiDay.currentLocal();\n const yesterday = today.append({day: -1});\n const startOfWeek = today.append({day: -today.dayOfWeek()});\n const endOfWeek = startOfWeek.append({day: 6});\n const startOfMonth = today.append({day: 1 - today.day});\n const endOfMonth = startOfMonth.append({month: 1, day: -1});\n const startOfLastMonth = startOfMonth.append({month: -1});\n\n return [\n new TuiDayRangePeriod(new TuiDayRange(TUI_FIRST_DAY, today), periodTitles[0]),\n new TuiDayRangePeriod(new TuiDayRange(today, today), periodTitles[1]),\n new TuiDayRangePeriod(new TuiDayRange(yesterday, yesterday), periodTitles[2]),\n new TuiDayRangePeriod(new TuiDayRange(startOfWeek, endOfWeek), periodTitles[3]),\n new TuiDayRangePeriod(new TuiDayRange(startOfMonth, endOfMonth), periodTitles[4]),\n new TuiDayRangePeriod(\n new TuiDayRange(startOfLastMonth, startOfMonth.append({day: -1})),\n periodTitles[5],\n ),\n ];\n}\n","import {HOURS_IN_DAY, TuiTime} from '@taiga-ui/cdk';\n\nexport function tuiCreateTimePeriods(\n minHour: number = 0,\n maxHour: number = HOURS_IN_DAY,\n minutes: readonly number[] = [0, 30],\n): readonly TuiTime[] {\n const timeArray: TuiTime[] = [];\n\n for (let i = minHour; i < maxHour; i++) {\n for (let j = 0; j < minutes.length; j++) {\n const time = new TuiTime(i, minutes[j]);\n\n timeArray.push(time);\n }\n }\n\n return timeArray;\n}\n","/**\n * @return fractional length\n */\nexport function tuiGetPrecision(num: number): number {\n const [, fractionPart = ``] = String(num).split(`.`);\n\n return fractionPart.length;\n}\n","export function tuiIsFlat<T>(\n items: readonly T[] | ReadonlyArray<readonly T[]>,\n): items is readonly T[] {\n return !Array.isArray(items[0]);\n}\n","import {NgControl} from '@angular/forms';\nimport {\n tuiControlValue,\n TuiControlValueTransformer,\n TuiDay,\n TuiDayRange,\n TuiTime,\n} from '@taiga-ui/cdk';\nimport {Observable, of} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\n/**\n * @internal\n */\nexport function tuiControlValueFactory<\n T extends TuiDayRange | TuiDay | [TuiDay | null, TuiTime | null],\n>(\n control: NgControl | null,\n valueTransformer?: TuiControlValueTransformer<T> | null,\n): Observable<T | null> | null {\n return control\n ? tuiControlValue(control).pipe(\n map(value =>\n valueTransformer\n ? valueTransformer.fromControlValue(value)\n : (value as T),\n ),\n )\n : of(null);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGM,SAAU,+BAA+B,CAC3C,YAAiE,GAAA;IAC7D,CAAkB,gBAAA,CAAA;IAClB,CAAO,KAAA,CAAA;IACP,CAAW,SAAA,CAAA;IACX,CAAc,YAAA,CAAA;IACd,CAAe,aAAA,CAAA;IACf,CAAgB,cAAA,CAAA;AACnB,CAAA,EAAA;AAED,IAAA,MAAM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AA,OAAO,OAAO;AACV,UAAE,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CACzB,GAAG,CAAC,KAAK,IACL,gBAAgB;AACZ,cAAE,gBAAgB,CAAC,gBAAgB,CAAC,KAAK,CAAC;cACvC,KAAW,CACrB,CACJ;AACH,UAAE,EAAE,CAAC,IAAI,CAAC,CAAC;AACnB;;AC7BA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-kit-utils.js","sources":["../../../projects/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-kit-utils.js","sources":["../../../projects/kit/utils/taiga-ui-kit-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG"}
|
package/interfaces/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/kit",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.1",
|
|
4
4
|
"description": "Taiga UI Angular main components kit",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"repository": "https://github.com/tinkoff/taiga-ui",
|
|
14
14
|
"license": "Apache-2.0",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ng-web-apis/intersection-observer": "3.0.0",
|
|
16
|
+
"@ng-web-apis/intersection-observer": "^3.0.0",
|
|
17
17
|
"angular2-text-mask": "^9.0.0",
|
|
18
18
|
"tslib": "^2.0.0"
|
|
19
19
|
},
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@angular/router": ">=9.0.0",
|
|
25
25
|
"@ng-web-apis/common": ">=2.0.0",
|
|
26
26
|
"@ng-web-apis/mutation-observer": ">=2.0.0",
|
|
27
|
-
"@taiga-ui/cdk": ">=3.0.0-rc.
|
|
28
|
-
"@taiga-ui/core": ">=3.0.0-rc.
|
|
29
|
-
"@taiga-ui/i18n": ">=3.0.0-rc.
|
|
27
|
+
"@taiga-ui/cdk": ">=3.0.0-rc.1",
|
|
28
|
+
"@taiga-ui/core": ">=3.0.0-rc.1",
|
|
29
|
+
"@taiga-ui/i18n": ">=3.0.0-rc.1",
|
|
30
30
|
"@tinkoff/ng-polymorpheus": ">=4.0.0",
|
|
31
31
|
"rxjs": ">=6.0.0"
|
|
32
32
|
},
|
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
import { FactoryProvider } from '@angular/core';
|
|
2
|
-
import { TuiHandler, TuiMonth } from '@taiga-ui/cdk';
|
|
3
|
-
import { TuiMonthPipe } from '@taiga-ui/core';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
2
|
export declare const TUI_MONTH_FORMATTER_PROVIDER: FactoryProvider;
|
|
6
|
-
/**
|
|
7
|
-
* Range.setStart/set-end, except it uses offset in characters only
|
|
8
|
-
*/
|
|
9
|
-
export declare function monthFormatterFactory(pipe: TuiMonthPipe): TuiHandler<TuiMonth | null, Observable<string>>;
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { TuiDropdownControllerDirective } from '@taiga-ui/core';
|
|
3
|
-
export declare function fixedDropdownControllerFactory(directive: TuiDropdownControllerDirective | null): TuiDropdownControllerDirective;
|
|
4
|
-
export declare const FIXED_DROPDOWN_CONTROLLER_PROVIDER: Provider;
|
|
5
|
-
export declare function leftAlignedDropdownControllerFactory(directive: TuiDropdownControllerDirective | null): TuiDropdownControllerDirective;
|
|
6
|
-
export declare const LEFT_ALIGNED_DROPDOWN_CONTROLLER_PROVIDER: Provider;
|
|
1
|
+
export declare const FIXED_DROPDOWN_CONTROLLER_PROVIDER: import("@angular/core").FactoryProvider;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import { TuiControlValueTransformer, TuiDay, TuiDayRange } from '@taiga-ui/cdk';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare const TUI_CALENDAR_DATE_STREAM: InjectionToken<Observable<TuiDay | TuiDayRange | null>>;
|
|
5
|
+
export declare function tuiDateStreamWithTransformer(transformer: InjectionToken<TuiControlValueTransformer<any>>): Provider;
|
package/tokens/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export * from './calendar-
|
|
1
|
+
export * from './calendar-date-stream';
|
|
2
2
|
export * from './date-inputs-value-transformers';
|
|
3
3
|
export * from './i18n';
|
|
4
4
|
export * from './items-handlers';
|
|
5
5
|
export * from './mobile-calendar';
|
|
6
6
|
export * from './month-formatter';
|
|
7
7
|
export * from './tab-margin';
|
|
8
|
-
export * from './tag-status';
|
|
9
8
|
export * from './validation-errors';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { PolymorpheusContent } from '@tinkoff/ng-polymorpheus';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent<
|
|
4
|
+
export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent<any> | Observable<PolymorpheusContent<any>>>>;
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @deprecated: use {@link tuiFormatSize} instead
|
|
3
|
-
*/
|
|
4
|
-
export declare function formatSize(units: [string, string, string], size?: number): string | null;
|
|
5
|
-
export declare const tuiFormatSize: typeof formatSize;
|
|
1
|
+
export declare function tuiFormatSize(units: [string, string, string], size?: number): string | null;
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @deprecated: use {@link tuiGetAcceptArray} instead
|
|
3
|
-
*/
|
|
4
|
-
export declare function getAcceptArray(accept: string): readonly string[];
|
|
5
|
-
export declare const tuiGetAcceptArray: typeof getAcceptArray;
|
|
1
|
+
export declare function tuiGetAcceptArray(accept: string): readonly string[];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated: use {@link tuiStringHashToHsl} instead
|
|
3
2
|
* Converts a string to an HSL color
|
|
4
3
|
* @param value string to convert
|
|
5
4
|
* @return HSL color string
|
|
6
5
|
*/
|
|
7
|
-
export declare function
|
|
8
|
-
export declare const tuiStringHashToHsl: typeof stringHashToHsl;
|
|
6
|
+
export declare function tuiStringHashToHsl(value: string): string;
|
package/utils/index.d.ts
CHANGED
|
@@ -4,9 +4,5 @@ export interface TuiAutoCorrectedDatePipeConfigs extends TuiWithOptionalMinMaxWi
|
|
|
4
4
|
dateFormat: TuiDateMode;
|
|
5
5
|
dateSeparator: string;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
* @deprecated: use {@link tuiNormalizeDateValue} instead
|
|
9
|
-
*/
|
|
10
|
-
export declare function normalizeDateValue(dateValue: string, { value, min, max, dateFormat, dateSeparator }: TuiAutoCorrectedDatePipeConfigs): string;
|
|
7
|
+
export declare function tuiNormalizeDateValue(dateValue: string, { value, min, max, dateFormat, dateSeparator }: TuiAutoCorrectedDatePipeConfigs): string;
|
|
11
8
|
export declare function tuiCreateAutoCorrectedDatePipe(config: TuiAutoCorrectedDatePipeConfigs): TuiTextMaskPipeHandler;
|
|
12
|
-
export declare const tuiNormalizeDateValue: typeof normalizeDateValue;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @deprecated: use {@link tuiGetPrecision} instead
|
|
3
2
|
* @return fractional length
|
|
4
3
|
*/
|
|
5
|
-
export declare function
|
|
6
|
-
export declare const tuiGetPrecision: typeof getPrecision;
|
|
4
|
+
export declare function tuiGetPrecision(num: number): number;
|
package/abstract/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './slider/slider';
|
package/abstract/package.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"main": "../bundles/taiga-ui-kit-abstract.umd.js",
|
|
3
|
-
"module": "../fesm2015/taiga-ui-kit-abstract.js",
|
|
4
|
-
"es2015": "../fesm2015/taiga-ui-kit-abstract.js",
|
|
5
|
-
"esm2015": "../esm2015/abstract/taiga-ui-kit-abstract.js",
|
|
6
|
-
"fesm2015": "../fesm2015/taiga-ui-kit-abstract.js",
|
|
7
|
-
"typings": "taiga-ui-kit-abstract.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"name": "@taiga-ui/kit/abstract"
|
|
10
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
2
|
-
import { NgControl } from '@angular/forms';
|
|
3
|
-
import { AbstractTuiControl, TuiNativeFocusableElement } from '@taiga-ui/cdk';
|
|
4
|
-
import { TuiSizeS, TuiWithOptionalMinMax } from '@taiga-ui/core';
|
|
5
|
-
import { TuiKeySteps } from '@taiga-ui/kit/types';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
export declare const SLIDER_KEYBOARD_STEP = 0.05;
|
|
9
|
-
export declare const DOT_WIDTH: {
|
|
10
|
-
[key: string]: number;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* @awful TODO: 3.0 remove
|
|
14
|
-
* @internal
|
|
15
|
-
* @dynamic
|
|
16
|
-
*/
|
|
17
|
-
export declare abstract class AbstractTuiSlider<T> extends AbstractTuiControl<T> implements TuiWithOptionalMinMax<number> {
|
|
18
|
-
private readonly documentRef;
|
|
19
|
-
readonly fromToTexts$: Observable<[string, string]>;
|
|
20
|
-
private readonly pointerDown$;
|
|
21
|
-
protected dotLeft?: ElementRef<TuiNativeFocusableElement>;
|
|
22
|
-
protected dotRight?: ElementRef<TuiNativeFocusableElement>;
|
|
23
|
-
min: number;
|
|
24
|
-
max: number;
|
|
25
|
-
segments: number;
|
|
26
|
-
steps: number;
|
|
27
|
-
quantum: number;
|
|
28
|
-
pluralize: Record<string, string> | null;
|
|
29
|
-
size: TuiSizeS;
|
|
30
|
-
keySteps: TuiKeySteps | null;
|
|
31
|
-
focusVisibleLeft: boolean;
|
|
32
|
-
focusVisibleRight: boolean;
|
|
33
|
-
protected constructor(ngControl: NgControl | null, changeDetectorRef: ChangeDetectorRef, documentRef: Document, fromToTexts$: Observable<[string, string]>);
|
|
34
|
-
get segmented(): boolean;
|
|
35
|
-
get discrete(): boolean;
|
|
36
|
-
get length(): number;
|
|
37
|
-
get computedStep(): number;
|
|
38
|
-
get isLeftFocusable(): boolean;
|
|
39
|
-
get isRightFocusable(): boolean;
|
|
40
|
-
abstract get left(): number;
|
|
41
|
-
abstract get right(): number;
|
|
42
|
-
abstract processValue(value: number, right?: boolean): void;
|
|
43
|
-
ngOnInit(): void;
|
|
44
|
-
ngOnDestroy(): void;
|
|
45
|
-
onMouseDown(event: MouseEvent): void;
|
|
46
|
-
onTouchStart(event: TouchEvent): void;
|
|
47
|
-
getSegmentLabel(segment: number): number;
|
|
48
|
-
getSegmentPrefix(segment: number, texts: [string, string]): string;
|
|
49
|
-
onActiveZone(active: boolean): void;
|
|
50
|
-
onLeftFocusVisible(focusVisible: boolean): void;
|
|
51
|
-
onRightFocusVisible(focusVisible: boolean): void;
|
|
52
|
-
getValueFromFraction(fraction: number): number;
|
|
53
|
-
fractionGuard(fraction: number): number;
|
|
54
|
-
protected getFractionFromValue(value: number): number;
|
|
55
|
-
protected getCalibratedFractionFromEvents(rect: ClientRect, clientX: number, _: boolean): number;
|
|
56
|
-
protected valueGuard(value: number): number;
|
|
57
|
-
private processFocus;
|
|
58
|
-
/**
|
|
59
|
-
* Function for converting the fullness of the slider to a value and vice versa
|
|
60
|
-
* taking into account the steps of linear dependence.
|
|
61
|
-
*
|
|
62
|
-
* @param value passed value
|
|
63
|
-
* @param isFraction translation is carried out from fullness to value
|
|
64
|
-
*/
|
|
65
|
-
private fractionValueKeyStepConverter;
|
|
66
|
-
private getFractionFromEvents;
|
|
67
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTuiSlider<any>, never>;
|
|
68
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractTuiSlider<any>, never, never, { "min": "min"; "max": "max"; "segments": "segments"; "steps": "steps"; "quantum": "quantum"; "pluralize": "pluralize"; "size": "size"; "keySteps": "keySteps"; }, {}, never>;
|
|
69
|
-
}
|