@taiga-ui/core 3.18.0 → 3.19.0-dev.main-9e6bc23
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/abstract/abstract-driver.directive.d.ts +9 -2
- package/abstract/driver.d.ts +1 -0
- package/abstract/position-accessor.d.ts +3 -1
- package/abstract/rect-accessor.d.ts +4 -1
- package/abstract/vehicle.d.ts +1 -0
- package/bundles/taiga-ui-core-abstract.umd.js +59 -29
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +14 -23
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +11 -20
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +11 -20
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +20 -29
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +20 -29
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +11 -20
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +14 -23
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +14 -23
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +7 -7
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +14 -23
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +11 -20
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +12 -21
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +11 -20
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +11 -20
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +11 -20
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +11 -20
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +11 -20
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +28 -34
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +11 -20
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +11 -20
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +17 -26
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +17 -26
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +11 -20
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +11 -20
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +11 -20
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +186 -147
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +258 -212
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +7 -7
- package/bundles/taiga-ui-core-directives-mode.umd.js +11 -20
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +11 -20
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +100 -54
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +7 -7
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +11 -20
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +7 -7
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +7 -7
- package/bundles/taiga-ui-core-pipes-flag.umd.js +96 -0
- package/bundles/taiga-ui-core-pipes-flag.umd.js.map +1 -0
- package/bundles/taiga-ui-core-pipes-format-date.umd.js +7 -7
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +7 -7
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +7 -7
- package/bundles/taiga-ui-core-pipes-month.umd.js +7 -7
- package/bundles/taiga-ui-core-pipes-order-week-days.umd.js +11 -20
- package/bundles/taiga-ui-core-pipes-order-week-days.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes.umd.js +10 -4
- package/bundles/taiga-ui-core-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +22 -31
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +7 -13
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +4 -13
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +4 -13
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/components/primitive-textfield/primitive-textfield.component.d.ts +3 -3
- package/directives/dropdown/dropdown-context.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-driver.directive.d.ts +5 -2
- package/directives/dropdown/dropdown-host.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-hover.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-manual.directive.d.ts +1 -0
- package/directives/dropdown/dropdown-position-sided.directive.d.ts +4 -3
- package/directives/dropdown/dropdown-position.directive.d.ts +7 -3
- package/directives/dropdown/dropdown-selection.directive.d.ts +1 -0
- package/directives/dropdown/dropdown.directive.d.ts +7 -4
- package/directives/hint/hint-describe.directive.d.ts +3 -5
- package/directives/hint/hint-driver.directive.d.ts +5 -2
- package/directives/hint/hint-host.directive.d.ts +1 -0
- package/directives/hint/hint-hover.directive.d.ts +2 -0
- package/directives/hint/hint-manual.directive.d.ts +3 -1
- package/directives/hint/hint-position.directive.d.ts +6 -3
- package/directives/hint/hint.directive.d.ts +3 -2
- package/directives/textfield-controller/index.d.ts +1 -0
- package/directives/textfield-controller/textfield-appearance.directive.d.ts +9 -0
- package/directives/textfield-controller/textfield-controller.module.d.ts +11 -10
- package/directives/textfield-controller/textfield.controller.d.ts +5 -1
- package/esm2015/abstract/abstract-driver.directive.js +18 -10
- package/esm2015/abstract/abstract-textfield-host.js +3 -3
- package/esm2015/abstract/driver.js +2 -1
- package/esm2015/abstract/position-accessor.js +10 -1
- package/esm2015/abstract/rect-accessor.js +14 -1
- package/esm2015/abstract/vehicle.js +2 -1
- package/esm2015/components/alert/alert.component.js +3 -3
- package/esm2015/components/alert/alert.module.js +4 -4
- package/esm2015/components/alert/alert.service.js +3 -3
- package/esm2015/components/button/button.component.js +3 -3
- package/esm2015/components/button/button.module.js +4 -4
- package/esm2015/components/calendar/calendar.component.js +3 -3
- package/esm2015/components/calendar/calendar.module.js +4 -4
- package/esm2015/components/data-list/data-list.component.js +3 -3
- package/esm2015/components/data-list/data-list.directive.js +3 -3
- package/esm2015/components/data-list/data-list.module.js +4 -4
- package/esm2015/components/data-list/opt-group.directive.js +3 -3
- package/esm2015/components/data-list/option/option.component.js +3 -3
- package/esm2015/components/dialog/dialog-close.service.js +3 -3
- package/esm2015/components/dialog/dialog.component.js +3 -3
- package/esm2015/components/dialog/dialog.directive.js +3 -3
- package/esm2015/components/dialog/dialog.module.js +4 -4
- package/esm2015/components/dialog/dialog.service.js +3 -3
- package/esm2015/components/error/error.component.js +3 -3
- package/esm2015/components/error/error.module.js +4 -4
- package/esm2015/components/expand/expand-content.directive.js +3 -3
- package/esm2015/components/expand/expand.component.js +3 -3
- package/esm2015/components/expand/expand.module.js +4 -4
- package/esm2015/components/group/group-styles.component.js +3 -3
- package/esm2015/components/group/group.directive.js +3 -3
- package/esm2015/components/group/group.module.js +4 -4
- package/esm2015/components/hints-host/hints-host.component.js +3 -3
- package/esm2015/components/hints-host/hints-host.module.js +4 -4
- package/esm2015/components/hosted-dropdown/hosted-dropdown-connector.directive.js +3 -3
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +3 -3
- package/esm2015/components/hosted-dropdown/hosted-dropdown.module.js +4 -4
- package/esm2015/components/label/label.component.js +3 -3
- package/esm2015/components/label/label.module.js +4 -4
- package/esm2015/components/link/link.component.js +4 -4
- package/esm2015/components/link/link.module.js +4 -4
- package/esm2015/components/loader/loader.component.js +3 -3
- package/esm2015/components/loader/loader.module.js +4 -4
- package/esm2015/components/notification/notification.component.js +3 -3
- package/esm2015/components/notification/notification.module.js +4 -4
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +3 -3
- package/esm2015/components/primitive-calendar/primitive-calendar.module.js +4 -4
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +3 -3
- package/esm2015/components/primitive-checkbox/primitive-checkbox.module.js +4 -4
- package/esm2015/components/primitive-spin-button/primitive-spin-button.component.js +3 -3
- package/esm2015/components/primitive-spin-button/primitive-spin-button.module.js +4 -4
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +9 -10
- package/esm2015/components/primitive-textfield/primitive-textfield.directive.js +3 -3
- package/esm2015/components/primitive-textfield/primitive-textfield.module.js +4 -4
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +3 -3
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
- package/esm2015/components/primitive-year-picker/primitive-year-picker.component.js +3 -3
- package/esm2015/components/primitive-year-picker/primitive-year-picker.module.js +4 -4
- package/esm2015/components/root/root.component.js +3 -3
- package/esm2015/components/root/root.module.js +4 -4
- package/esm2015/components/scroll-controls/scroll-controls.component.js +3 -3
- package/esm2015/components/scroll-controls/scroll-controls.module.js +4 -4
- package/esm2015/components/scroll-controls/scrollbar-wrapper.directive.js +3 -3
- package/esm2015/components/scroll-controls/scrollbar.directive.js +3 -3
- package/esm2015/components/scrollbar/scroll-ref.directive.js +3 -3
- package/esm2015/components/scrollbar/scrollable.directive.js +3 -3
- package/esm2015/components/scrollbar/scrollbar.component.js +3 -3
- package/esm2015/components/scrollbar/scrollbar.module.js +4 -4
- package/esm2015/components/svg/svg.component.js +3 -3
- package/esm2015/components/svg/svg.module.js +4 -4
- package/esm2015/components/theme-night/theme-night.component.js +3 -3
- package/esm2015/components/theme-night/theme-night.module.js +4 -4
- package/esm2015/components/tooltip/tooltip.component.js +3 -3
- package/esm2015/components/tooltip/tooltip.module.js +4 -4
- package/esm2015/directives/dropdown/dropdown-context.directive.js +5 -4
- package/esm2015/directives/dropdown/dropdown-driver.directive.js +24 -7
- package/esm2015/directives/dropdown/dropdown-host.directive.js +8 -4
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +5 -4
- package/esm2015/directives/dropdown/dropdown-manual.directive.js +7 -6
- package/esm2015/directives/dropdown/dropdown-options.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +15 -14
- package/esm2015/directives/dropdown/dropdown-position.directive.js +28 -11
- package/esm2015/directives/dropdown/dropdown-selection.directive.js +5 -4
- package/esm2015/directives/dropdown/dropdown.component.js +21 -11
- package/esm2015/directives/dropdown/dropdown.directive.js +16 -21
- package/esm2015/directives/dropdown/dropdown.module.js +4 -4
- package/esm2015/directives/hint/hint-describe.directive.js +7 -13
- package/esm2015/directives/hint/hint-driver.directive.js +24 -7
- package/esm2015/directives/hint/hint-host.directive.js +8 -4
- package/esm2015/directives/hint/hint-hover.directive.js +8 -6
- package/esm2015/directives/hint/hint-manual.directive.js +14 -7
- package/esm2015/directives/hint/hint-options.directive.js +3 -3
- package/esm2015/directives/hint/hint-pointer.directive.js +3 -3
- package/esm2015/directives/hint/hint-position.directive.js +25 -11
- package/esm2015/directives/hint/hint.component.js +20 -6
- package/esm2015/directives/hint/hint.directive.js +6 -4
- package/esm2015/directives/hint/hint.module.js +4 -4
- package/esm2015/directives/hint/hint.providers.js +2 -1
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +3 -3
- package/esm2015/directives/mask-accessor/mask-accessor.module.js +4 -4
- package/esm2015/directives/mode/mode.directive.js +3 -3
- package/esm2015/directives/mode/mode.module.js +4 -4
- package/esm2015/directives/scroll-into-view/scroll-into-view.directive.js +3 -3
- package/esm2015/directives/scroll-into-view/scroll-into-view.module.js +4 -4
- package/esm2015/directives/textfield-controller/index.js +2 -1
- package/esm2015/directives/textfield-controller/textfield-appearance.directive.js +38 -0
- package/esm2015/directives/textfield-controller/textfield-cleaner.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-controller.module.js +11 -6
- package/esm2015/directives/textfield-controller/textfield-controller.provider.js +7 -3
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-filler.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-icon-left.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-icon.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-label-outside.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-postfix.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-prefix.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-size.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield.controller.js +7 -2
- package/esm2015/directives/wrapper/wrapper.directive.js +3 -3
- package/esm2015/directives/wrapper/wrapper.module.js +4 -4
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.component.js +3 -3
- package/esm2015/internal/primitive-year-month-pagination/primitive-year-month-pagination.module.js +4 -4
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +3 -3
- package/esm2015/internal/svg-defs-host/svg-defs-host.module.js +4 -4
- package/esm2015/pipes/calendar-sheet/calendar-sheet.module.js +4 -4
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +3 -3
- package/esm2015/pipes/flag/flag.module.js +16 -0
- package/esm2015/pipes/flag/flag.pipe.js +44 -0
- package/esm2015/pipes/flag/index.js +3 -0
- package/esm2015/pipes/flag/taiga-ui-core-pipes-flag.js +5 -0
- package/esm2015/pipes/format-date/format-date.module.js +4 -4
- package/esm2015/pipes/format-date/format-date.pipe.js +3 -3
- package/esm2015/pipes/format-number/format-number.module.js +4 -4
- package/esm2015/pipes/format-number/format-number.pipe.js +3 -3
- package/esm2015/pipes/format-phone/format-phone.module.js +4 -4
- package/esm2015/pipes/format-phone/format-phone.pipe.js +3 -3
- package/esm2015/pipes/index.js +2 -1
- package/esm2015/pipes/month/month.module.js +4 -4
- package/esm2015/pipes/month/month.pipe.js +3 -3
- package/esm2015/pipes/order-week-days/order-week-days.module.js +4 -4
- package/esm2015/pipes/order-week-days/order-week-days.pipe.js +3 -3
- package/esm2015/services/format-date.service.js +3 -3
- package/esm2015/services/hint.service.js +3 -3
- package/esm2015/services/night-theme.service.js +3 -3
- package/esm2015/services/position.service.js +3 -3
- package/esm2015/services/router-link-active.service.js +3 -3
- package/esm2015/services/svg.service.js +3 -3
- package/esm2015/tokens/textfield-appearance.js +3 -1
- package/esm2015/tokens/viewport.js +2 -1
- package/fesm2015/taiga-ui-core-abstract.js +45 -15
- package/fesm2015/taiga-ui-core-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +10 -10
- package/fesm2015/taiga-ui-core-components-button.js +7 -7
- package/fesm2015/taiga-ui-core-components-calendar.js +7 -7
- package/fesm2015/taiga-ui-core-components-data-list.js +16 -16
- package/fesm2015/taiga-ui-core-components-dialog.js +16 -16
- package/fesm2015/taiga-ui-core-components-error.js +7 -7
- package/fesm2015/taiga-ui-core-components-expand.js +10 -10
- package/fesm2015/taiga-ui-core-components-group.js +10 -10
- package/fesm2015/taiga-ui-core-components-hints-host.js +7 -7
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +10 -10
- package/fesm2015/taiga-ui-core-components-label.js +7 -7
- package/fesm2015/taiga-ui-core-components-link.js +8 -8
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +7 -7
- package/fesm2015/taiga-ui-core-components-notification.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-spin-button.js +7 -7
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +21 -22
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-year-picker.js +7 -7
- package/fesm2015/taiga-ui-core-components-root.js +7 -7
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +13 -13
- package/fesm2015/taiga-ui-core-components-scrollbar.js +13 -13
- package/fesm2015/taiga-ui-core-components-svg.js +7 -7
- package/fesm2015/taiga-ui-core-components-theme-night.js +7 -7
- package/fesm2015/taiga-ui-core-components-tooltip.js +7 -7
- package/fesm2015/taiga-ui-core-directives-dropdown.js +123 -81
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +205 -156
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js +7 -7
- package/fesm2015/taiga-ui-core-directives-mode.js +7 -7
- package/fesm2015/taiga-ui-core-directives-scroll-into-view.js +7 -7
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +83 -36
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +7 -7
- package/fesm2015/taiga-ui-core-internal-primitive-year-month-pagination.js +7 -7
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +7 -7
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +7 -7
- package/fesm2015/taiga-ui-core-pipes-flag.js +64 -0
- package/fesm2015/taiga-ui-core-pipes-flag.js.map +1 -0
- package/fesm2015/taiga-ui-core-pipes-format-date.js +7 -7
- package/fesm2015/taiga-ui-core-pipes-format-number.js +7 -7
- package/fesm2015/taiga-ui-core-pipes-format-phone.js +7 -7
- package/fesm2015/taiga-ui-core-pipes-month.js +7 -7
- package/fesm2015/taiga-ui-core-pipes-order-week-days.js +7 -7
- package/fesm2015/taiga-ui-core-pipes.js +1 -0
- package/fesm2015/taiga-ui-core-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +18 -18
- package/fesm2015/taiga-ui-core-tokens.js +3 -0
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/package.json +4 -4
- package/pipes/flag/flag.module.d.ts +7 -0
- package/pipes/flag/flag.pipe.d.ts +13 -0
- package/pipes/flag/index.d.ts +2 -0
- package/pipes/flag/package.json +10 -0
- package/pipes/flag/taiga-ui-core-pipes-flag.d.ts +5 -0
- package/pipes/index.d.ts +1 -0
- package/tokens/textfield-appearance.d.ts +1 -0
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, Optional, SkipSelf, forwardRef, Directive, Inject, Input, ElementRef, HostListener, Component, ChangeDetectionStrategy, Self, HostBinding,
|
|
3
|
+
import { InjectionToken, Optional, SkipSelf, forwardRef, Directive, Inject, Input, ElementRef, INJECTOR, HostListener, Component, ChangeDetectionStrategy, Self, HostBinding, NgZone, NgModule } from '@angular/core';
|
|
4
4
|
import * as i3 from '@taiga-ui/cdk';
|
|
5
|
-
import { AbstractTuiController, tuiDefaultProp, TuiHoveredService, EMPTY_CLIENT_RECT, tuiPointToClientRect, tuiPx, tuiClamp, TuiDestroyService, tuiPure,
|
|
5
|
+
import { AbstractTuiController, tuiDefaultProp, TuiActiveZoneDirective, TuiHoveredService, EMPTY_CLIENT_RECT, tuiPointToClientRect, tuiPx, tuiClamp, TuiDestroyService, tuiPure, tuiTypedFromEvent, tuiZoneOptimized, tuiIsNativeFocused } from '@taiga-ui/cdk';
|
|
6
6
|
import * as i1$1 from '@taiga-ui/core/abstract';
|
|
7
|
-
import { TuiDriver, tuiAsDriver,
|
|
7
|
+
import { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle, TuiPositionAccessor, tuiFallbackRectAccessor, tuiAsPositionAccessor } from '@taiga-ui/core/abstract';
|
|
8
8
|
import { tuiFadeIn } from '@taiga-ui/core/animations';
|
|
9
9
|
import * as i5 from '@taiga-ui/core/directives/mode';
|
|
10
10
|
import { TuiModeDirective } from '@taiga-ui/core/directives/mode';
|
|
11
|
-
import * as i2
|
|
12
|
-
import {
|
|
11
|
+
import * as i2 from '@taiga-ui/core/services';
|
|
12
|
+
import { TuiHintService, TuiPositionService } from '@taiga-ui/core/services';
|
|
13
13
|
import { TUI_ANIMATION_OPTIONS, TUI_VIEWPORT } from '@taiga-ui/core/tokens';
|
|
14
14
|
import * as i1 from '@tinkoff/ng-polymorpheus';
|
|
15
|
-
import {
|
|
16
|
-
import { switchMap, delay, takeUntil, repeat, map, debounce, startWith, distinctUntilChanged, skip } from 'rxjs/operators';
|
|
17
|
-
import * as i2 from 'rxjs';
|
|
18
|
-
import { Subject, merge, of, timer } from 'rxjs';
|
|
15
|
+
import { PolymorpheusComponent, POLYMORPHEUS_CONTEXT, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
16
|
+
import { switchMap, delay, takeUntil, repeat, filter, map, debounce, startWith, distinctUntilChanged, skip } from 'rxjs/operators';
|
|
19
17
|
import { tuiOverrideOptions } from '@taiga-ui/core/utils';
|
|
18
|
+
import * as i2$1 from 'rxjs';
|
|
19
|
+
import { Subject, merge, of, timer } from 'rxjs';
|
|
20
20
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
21
21
|
import { TUI_HINT_DIRECTIONS } from '@taiga-ui/core/constants';
|
|
22
22
|
|
|
23
|
+
const TUI_HINT_COMPONENT = new InjectionToken(`[TUI_HINT_COMPONENT] A component to display a hint`, {
|
|
24
|
+
factory: () => TuiHintComponent,
|
|
25
|
+
});
|
|
26
|
+
|
|
23
27
|
/** Default values for hint options */
|
|
24
28
|
const TUI_HINT_DEFAULT_OPTIONS = {
|
|
25
29
|
direction: 'bottom-left',
|
|
@@ -51,8 +55,8 @@ class TuiHintOptionsDirective extends AbstractTuiController {
|
|
|
51
55
|
this.icon = this.options.icon;
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
|
-
TuiHintOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
55
|
-
TuiHintOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
58
|
+
TuiHintOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintOptionsDirective, deps: [{ token: TUI_HINT_OPTIONS, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
+
TuiHintOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintOptionsDirective, selector: "[tuiHintContent]", inputs: { content: ["tuiHintContent", "content"], direction: ["tuiHintDirection", "direction"], appearance: ["tuiHintAppearance", "appearance"], showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [
|
|
56
60
|
{
|
|
57
61
|
provide: TUI_HINT_OPTIONS,
|
|
58
62
|
useExisting: forwardRef(() => TuiHintOptionsDirective),
|
|
@@ -73,7 +77,7 @@ __decorate([
|
|
|
73
77
|
__decorate([
|
|
74
78
|
tuiDefaultProp()
|
|
75
79
|
], TuiHintOptionsDirective.prototype, "hideDelay", void 0);
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintOptionsDirective, decorators: [{
|
|
77
81
|
type: Directive,
|
|
78
82
|
args: [{
|
|
79
83
|
selector: '[tuiHintContent]',
|
|
@@ -106,6 +110,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
106
110
|
args: ['tuiHintHideDelay']
|
|
107
111
|
}] } });
|
|
108
112
|
|
|
113
|
+
class TuiHintDirective {
|
|
114
|
+
constructor(elementRef, component, hintService, options, activeZone) {
|
|
115
|
+
this.elementRef = elementRef;
|
|
116
|
+
this.component = component;
|
|
117
|
+
this.hintService = hintService;
|
|
118
|
+
this.options = options;
|
|
119
|
+
this.activeZone = activeZone;
|
|
120
|
+
this.content = '';
|
|
121
|
+
this.tuiHintAppearance = null;
|
|
122
|
+
this.type = 'hint';
|
|
123
|
+
}
|
|
124
|
+
get appearance() {
|
|
125
|
+
var _a;
|
|
126
|
+
return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;
|
|
127
|
+
}
|
|
128
|
+
ngOnChanges() {
|
|
129
|
+
if (!this.content) {
|
|
130
|
+
this.toggle(false);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
ngOnDestroy() {
|
|
134
|
+
this.toggle(false);
|
|
135
|
+
}
|
|
136
|
+
getClientRect() {
|
|
137
|
+
return this.elementRef.nativeElement.getBoundingClientRect();
|
|
138
|
+
}
|
|
139
|
+
toggle(show) {
|
|
140
|
+
if (show && this.content) {
|
|
141
|
+
this.hintService.add(this);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.hintService.remove(this);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
TuiHintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintDirective, deps: [{ token: ElementRef }, { token: PolymorpheusComponent }, { token: TuiHintService }, { token: TUI_HINT_OPTIONS }, { token: TuiActiveZoneDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
149
|
+
TuiHintDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: { content: ["tuiHint", "content"], context: ["tuiHintContext", "context"], tuiHintAppearance: "tuiHintAppearance" }, providers: [
|
|
150
|
+
tuiAsRectAccessor(TuiHintDirective),
|
|
151
|
+
tuiAsVehicle(TuiHintDirective),
|
|
152
|
+
{
|
|
153
|
+
provide: PolymorpheusComponent,
|
|
154
|
+
deps: [TUI_HINT_COMPONENT, INJECTOR],
|
|
155
|
+
useClass: PolymorpheusComponent,
|
|
156
|
+
},
|
|
157
|
+
], usesOnChanges: true, ngImport: i0 });
|
|
158
|
+
__decorate([
|
|
159
|
+
tuiDefaultProp()
|
|
160
|
+
], TuiHintDirective.prototype, "content", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
tuiDefaultProp()
|
|
163
|
+
], TuiHintDirective.prototype, "tuiHintAppearance", void 0);
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintDirective, decorators: [{
|
|
165
|
+
type: Directive,
|
|
166
|
+
args: [{
|
|
167
|
+
selector: '[tuiHint]:not(ng-container)',
|
|
168
|
+
providers: [
|
|
169
|
+
tuiAsRectAccessor(TuiHintDirective),
|
|
170
|
+
tuiAsVehicle(TuiHintDirective),
|
|
171
|
+
{
|
|
172
|
+
provide: PolymorpheusComponent,
|
|
173
|
+
deps: [TUI_HINT_COMPONENT, INJECTOR],
|
|
174
|
+
useClass: PolymorpheusComponent,
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
}]
|
|
178
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
179
|
+
type: Inject,
|
|
180
|
+
args: [ElementRef]
|
|
181
|
+
}] }, { type: i1.PolymorpheusComponent, decorators: [{
|
|
182
|
+
type: Inject,
|
|
183
|
+
args: [PolymorpheusComponent]
|
|
184
|
+
}] }, { type: i2.TuiHintService, decorators: [{
|
|
185
|
+
type: Inject,
|
|
186
|
+
args: [TuiHintService]
|
|
187
|
+
}] }, { type: undefined, decorators: [{
|
|
188
|
+
type: Inject,
|
|
189
|
+
args: [TUI_HINT_OPTIONS]
|
|
190
|
+
}] }, { type: i3.TuiActiveZoneDirective, decorators: [{
|
|
191
|
+
type: Optional
|
|
192
|
+
}, {
|
|
193
|
+
type: Inject,
|
|
194
|
+
args: [TuiActiveZoneDirective]
|
|
195
|
+
}] }]; }, propDecorators: { content: [{
|
|
196
|
+
type: Input,
|
|
197
|
+
args: ['tuiHint']
|
|
198
|
+
}], context: [{
|
|
199
|
+
type: Input,
|
|
200
|
+
args: ['tuiHintContext']
|
|
201
|
+
}], tuiHintAppearance: [{
|
|
202
|
+
type: Input
|
|
203
|
+
}] } });
|
|
204
|
+
|
|
109
205
|
class TuiHintHoverDirective extends TuiDriver {
|
|
110
206
|
constructor(hovered$, options, elementRef) {
|
|
111
207
|
super(subscriber => this.stream$.subscribe(subscriber));
|
|
@@ -113,30 +209,32 @@ class TuiHintHoverDirective extends TuiDriver {
|
|
|
113
209
|
this.options = options;
|
|
114
210
|
this.elementRef = elementRef;
|
|
115
211
|
this.toggle$ = new Subject();
|
|
116
|
-
this.stream$ = merge(this.toggle$.pipe(switchMap(visible => of(visible).pipe(delay(visible ? 0 : this.hideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap(visible => of(visible).pipe(delay(visible ? this.showDelay : this.hideDelay))), takeUntil(this.toggle$), repeat()));
|
|
212
|
+
this.stream$ = merge(this.toggle$.pipe(switchMap(visible => of(visible).pipe(delay(visible ? 0 : this.hideDelay))), takeUntil(this.hovered$), repeat()), this.hovered$.pipe(switchMap(visible => of(visible).pipe(delay(visible ? this.showDelay : this.hideDelay))), takeUntil(this.toggle$), repeat())).pipe(filter(() => this.enabled));
|
|
117
213
|
this.showDelay = this.options.showDelay;
|
|
118
214
|
this.hideDelay = this.options.hideDelay;
|
|
215
|
+
this.type = 'hint';
|
|
216
|
+
this.enabled = true;
|
|
119
217
|
}
|
|
120
218
|
toggle(visible) {
|
|
121
219
|
this.toggle$.next(visible);
|
|
122
220
|
}
|
|
123
221
|
}
|
|
124
|
-
TuiHintHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
125
|
-
TuiHintHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
222
|
+
TuiHintHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintHoverDirective, deps: [{ token: TuiHoveredService }, { token: TUI_HINT_OPTIONS }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
223
|
+
TuiHintHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: { showDelay: ["tuiHintShowDelay", "showDelay"], hideDelay: ["tuiHintHideDelay", "hideDelay"] }, providers: [tuiAsDriver(TuiHintHoverDirective), TuiHoveredService], exportAs: ["tuiHintHover"], usesInheritance: true, ngImport: i0 });
|
|
126
224
|
__decorate([
|
|
127
225
|
tuiDefaultProp()
|
|
128
226
|
], TuiHintHoverDirective.prototype, "showDelay", void 0);
|
|
129
227
|
__decorate([
|
|
130
228
|
tuiDefaultProp()
|
|
131
229
|
], TuiHintHoverDirective.prototype, "hideDelay", void 0);
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintHoverDirective, decorators: [{
|
|
133
231
|
type: Directive,
|
|
134
232
|
args: [{
|
|
135
233
|
selector: '[tuiHint]:not(ng-container)',
|
|
136
234
|
exportAs: 'tuiHintHover',
|
|
137
235
|
providers: [tuiAsDriver(TuiHintHoverDirective), TuiHoveredService],
|
|
138
236
|
}]
|
|
139
|
-
}], ctorParameters: function () { return [{ type: i2.Observable, decorators: [{
|
|
237
|
+
}], ctorParameters: function () { return [{ type: i2$1.Observable, decorators: [{
|
|
140
238
|
type: Inject,
|
|
141
239
|
args: [TuiHoveredService]
|
|
142
240
|
}] }, { type: undefined, decorators: [{
|
|
@@ -165,12 +263,12 @@ class TuiHintPointerDirective extends TuiHintHoverDirective {
|
|
|
165
263
|
return this.currentRect;
|
|
166
264
|
}
|
|
167
265
|
}
|
|
168
|
-
TuiHintPointerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
169
|
-
TuiHintPointerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
266
|
+
TuiHintPointerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintPointerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
267
|
+
TuiHintPointerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintPointerDirective, selector: "[tuiHint][tuiHintPointer]", host: { listeners: { "mousemove.silent": "onMove($event)" } }, providers: [
|
|
170
268
|
tuiAsRectAccessor(TuiHintPointerDirective),
|
|
171
269
|
tuiAsDriver(TuiHintPointerDirective),
|
|
172
270
|
], usesInheritance: true, ngImport: i0 });
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintPointerDirective, decorators: [{
|
|
174
272
|
type: Directive,
|
|
175
273
|
args: [{
|
|
176
274
|
selector: '[tuiHint][tuiHintPointer]',
|
|
@@ -228,8 +326,14 @@ class TuiHintComponent {
|
|
|
228
326
|
style.setProperty('--left', tuiPx(tuiClamp(beakLeft, 0.5, width - 1)));
|
|
229
327
|
}
|
|
230
328
|
}
|
|
231
|
-
TuiHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
232
|
-
TuiHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
329
|
+
TuiHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintComponent, deps: [{ token: TuiHoveredService }, { token: TuiPositionService }, { token: TuiDestroyService, self: true }, { token: TuiRectAccessor }, { token: ElementRef }, { token: TUI_ANIMATION_OPTIONS }, { token: POLYMORPHEUS_CONTEXT }, { token: TuiHintHoverDirective }, { token: TuiHintPointerDirective, optional: true }, { token: TuiModeDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
330
|
+
TuiHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintComponent, selector: "tui-hint", host: { listeners: { "document:click": "onClick($event.target)" }, properties: { "@tuiFadeIn": "this.animation", "attr.data-appearance": "this.appearance", "class._untouchable": "this.untouchable" } }, providers: [
|
|
331
|
+
TuiDestroyService,
|
|
332
|
+
TuiPositionService,
|
|
333
|
+
TuiHoveredService,
|
|
334
|
+
tuiPositionAccessorFor('hint'),
|
|
335
|
+
tuiRectAccessorFor('hint', TuiHintDirective),
|
|
336
|
+
], ngImport: i0, template: `
|
|
233
337
|
<ng-container *polymorpheusOutlet="content as text; context: context">
|
|
234
338
|
{{ text }}
|
|
235
339
|
</ng-container>
|
|
@@ -237,7 +341,7 @@ TuiHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
237
341
|
__decorate([
|
|
238
342
|
tuiPure
|
|
239
343
|
], TuiHintComponent.prototype, "update", null);
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintComponent, decorators: [{
|
|
241
345
|
type: Component,
|
|
242
346
|
args: [{
|
|
243
347
|
selector: 'tui-hint',
|
|
@@ -248,16 +352,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
248
352
|
`,
|
|
249
353
|
styleUrls: ['./hint.style.less'],
|
|
250
354
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
251
|
-
providers: [
|
|
355
|
+
providers: [
|
|
356
|
+
TuiDestroyService,
|
|
357
|
+
TuiPositionService,
|
|
358
|
+
TuiHoveredService,
|
|
359
|
+
tuiPositionAccessorFor('hint'),
|
|
360
|
+
tuiRectAccessorFor('hint', TuiHintDirective),
|
|
361
|
+
],
|
|
252
362
|
animations: [tuiFadeIn],
|
|
253
363
|
}]
|
|
254
|
-
}], ctorParameters: function () { return [{ type: i2.Observable, decorators: [{
|
|
364
|
+
}], ctorParameters: function () { return [{ type: i2$1.Observable, decorators: [{
|
|
255
365
|
type: Inject,
|
|
256
366
|
args: [TuiHoveredService]
|
|
257
|
-
}] }, { type: i2.Observable, decorators: [{
|
|
367
|
+
}] }, { type: i2$1.Observable, decorators: [{
|
|
258
368
|
type: Inject,
|
|
259
369
|
args: [TuiPositionService]
|
|
260
|
-
}] }, { type: i2.Observable, decorators: [{
|
|
370
|
+
}] }, { type: i2$1.Observable, decorators: [{
|
|
261
371
|
type: Self
|
|
262
372
|
}, {
|
|
263
373
|
type: Inject,
|
|
@@ -301,115 +411,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
301
411
|
args: ['document:click', ['$event.target']]
|
|
302
412
|
}], update: [] } });
|
|
303
413
|
|
|
304
|
-
const TUI_HINT_COMPONENT = new InjectionToken(`[TUI_HINT_COMPONENT] A component to display a hint`, {
|
|
305
|
-
factory: () => TuiHintComponent,
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
class TuiHintDirective {
|
|
309
|
-
constructor(elementRef, component, hintService, options, activeZone) {
|
|
310
|
-
this.elementRef = elementRef;
|
|
311
|
-
this.component = component;
|
|
312
|
-
this.hintService = hintService;
|
|
313
|
-
this.options = options;
|
|
314
|
-
this.activeZone = activeZone;
|
|
315
|
-
this.content = '';
|
|
316
|
-
this.tuiHintAppearance = null;
|
|
317
|
-
}
|
|
318
|
-
get appearance() {
|
|
319
|
-
var _a;
|
|
320
|
-
return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;
|
|
321
|
-
}
|
|
322
|
-
ngOnChanges() {
|
|
323
|
-
if (!this.content) {
|
|
324
|
-
this.toggle(false);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
ngOnDestroy() {
|
|
328
|
-
this.toggle(false);
|
|
329
|
-
}
|
|
330
|
-
getClientRect() {
|
|
331
|
-
return this.elementRef.nativeElement.getBoundingClientRect();
|
|
332
|
-
}
|
|
333
|
-
toggle(show) {
|
|
334
|
-
if (show && this.content) {
|
|
335
|
-
this.hintService.add(this);
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
this.hintService.remove(this);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
TuiHintDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiHintDirective, deps: [{ token: ElementRef }, { token: PolymorpheusComponent }, { token: TuiHintService }, { token: TUI_HINT_OPTIONS }, { token: TuiActiveZoneDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
343
|
-
TuiHintDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: { content: ["tuiHint", "content"], context: ["tuiHintContext", "context"], tuiHintAppearance: "tuiHintAppearance" }, providers: [
|
|
344
|
-
tuiAsRectAccessor(TuiHintDirective),
|
|
345
|
-
tuiAsVehicle(TuiHintDirective),
|
|
346
|
-
{
|
|
347
|
-
provide: PolymorpheusComponent,
|
|
348
|
-
deps: [TUI_HINT_COMPONENT, INJECTOR],
|
|
349
|
-
useClass: PolymorpheusComponent,
|
|
350
|
-
},
|
|
351
|
-
], usesOnChanges: true, ngImport: i0 });
|
|
352
|
-
__decorate([
|
|
353
|
-
tuiDefaultProp()
|
|
354
|
-
], TuiHintDirective.prototype, "content", void 0);
|
|
355
|
-
__decorate([
|
|
356
|
-
tuiDefaultProp()
|
|
357
|
-
], TuiHintDirective.prototype, "tuiHintAppearance", void 0);
|
|
358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiHintDirective, decorators: [{
|
|
359
|
-
type: Directive,
|
|
360
|
-
args: [{
|
|
361
|
-
selector: '[tuiHint]:not(ng-container)',
|
|
362
|
-
providers: [
|
|
363
|
-
tuiAsRectAccessor(TuiHintDirective),
|
|
364
|
-
tuiAsVehicle(TuiHintDirective),
|
|
365
|
-
{
|
|
366
|
-
provide: PolymorpheusComponent,
|
|
367
|
-
deps: [TUI_HINT_COMPONENT, INJECTOR],
|
|
368
|
-
useClass: PolymorpheusComponent,
|
|
369
|
-
},
|
|
370
|
-
],
|
|
371
|
-
}]
|
|
372
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
|
|
373
|
-
type: Inject,
|
|
374
|
-
args: [ElementRef]
|
|
375
|
-
}] }, { type: i1.PolymorpheusComponent, decorators: [{
|
|
376
|
-
type: Inject,
|
|
377
|
-
args: [PolymorpheusComponent]
|
|
378
|
-
}] }, { type: i2$1.TuiHintService, decorators: [{
|
|
379
|
-
type: Inject,
|
|
380
|
-
args: [TuiHintService]
|
|
381
|
-
}] }, { type: undefined, decorators: [{
|
|
382
|
-
type: Inject,
|
|
383
|
-
args: [TUI_HINT_OPTIONS]
|
|
384
|
-
}] }, { type: i3.TuiActiveZoneDirective, decorators: [{
|
|
385
|
-
type: Optional
|
|
386
|
-
}, {
|
|
387
|
-
type: Inject,
|
|
388
|
-
args: [TuiActiveZoneDirective]
|
|
389
|
-
}] }]; }, propDecorators: { content: [{
|
|
390
|
-
type: Input,
|
|
391
|
-
args: ['tuiHint']
|
|
392
|
-
}], context: [{
|
|
393
|
-
type: Input,
|
|
394
|
-
args: ['tuiHintContext']
|
|
395
|
-
}], tuiHintAppearance: [{
|
|
396
|
-
type: Input
|
|
397
|
-
}] } });
|
|
398
|
-
|
|
399
414
|
class TuiHintDescribeDirective extends TuiDriver {
|
|
400
|
-
constructor(ngZone,
|
|
415
|
+
constructor(ngZone, documentRef, elementRef) {
|
|
401
416
|
super(subscriber => this.stream$.subscribe(subscriber));
|
|
402
417
|
this.ngZone = ngZone;
|
|
403
|
-
this.hover$ = hover$;
|
|
404
418
|
this.documentRef = documentRef;
|
|
405
419
|
this.elementRef = elementRef;
|
|
406
|
-
this.
|
|
420
|
+
this.stream$ = tuiTypedFromEvent(this.documentRef, 'keydown', {
|
|
407
421
|
capture: true,
|
|
408
422
|
}).pipe(switchMap(() => this.focused
|
|
409
423
|
? of(false)
|
|
410
424
|
: merge(tuiTypedFromEvent(this.documentRef, 'keyup'), tuiTypedFromEvent(this.element, 'blur')).pipe(map(() => this.focused))), debounce(visible => (visible ? timer(1000) : of(null))), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized(this.ngZone));
|
|
411
|
-
this.stream$ = merge(this.hover$, this.focus$);
|
|
412
425
|
this.tuiHintDescribe = '';
|
|
426
|
+
this.type = 'hint';
|
|
413
427
|
}
|
|
414
428
|
get focused() {
|
|
415
429
|
return tuiIsNativeFocused(this.element);
|
|
@@ -419,12 +433,12 @@ class TuiHintDescribeDirective extends TuiDriver {
|
|
|
419
433
|
this.elementRef.nativeElement);
|
|
420
434
|
}
|
|
421
435
|
}
|
|
422
|
-
TuiHintDescribeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
423
|
-
TuiHintDescribeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
436
|
+
TuiHintDescribeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintDescribeDirective, deps: [{ token: NgZone }, { token: DOCUMENT }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
437
|
+
TuiHintDescribeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: { tuiHintDescribe: "tuiHintDescribe" }, providers: [tuiAsDriver(TuiHintDescribeDirective)], usesInheritance: true, ngImport: i0 });
|
|
424
438
|
__decorate([
|
|
425
439
|
tuiPure
|
|
426
440
|
], TuiHintDescribeDirective.prototype, "element", null);
|
|
427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintDescribeDirective, decorators: [{
|
|
428
442
|
type: Directive,
|
|
429
443
|
args: [{
|
|
430
444
|
selector: '[tuiHintDescribe]',
|
|
@@ -433,9 +447,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
433
447
|
}], ctorParameters: function () { return [{ type: i0.NgZone, decorators: [{
|
|
434
448
|
type: Inject,
|
|
435
449
|
args: [NgZone]
|
|
436
|
-
}] }, { type: i2.Observable, decorators: [{
|
|
437
|
-
type: Inject,
|
|
438
|
-
args: [TuiHintHoverDirective]
|
|
439
450
|
}] }, { type: Document, decorators: [{
|
|
440
451
|
type: Inject,
|
|
441
452
|
args: [DOCUMENT]
|
|
@@ -447,26 +458,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
447
458
|
}], element: [] } });
|
|
448
459
|
|
|
449
460
|
class TuiHintDriverDirective extends AbstractTuiDriverDirective {
|
|
461
|
+
// TODO: Figure out why this is necessary under nx test runner
|
|
462
|
+
constructor(destroy$, drivers, vehicles) {
|
|
463
|
+
super(destroy$, drivers, vehicles);
|
|
464
|
+
this.type = 'hint';
|
|
465
|
+
}
|
|
450
466
|
}
|
|
451
|
-
TuiHintDriverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
452
|
-
TuiHintDriverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
467
|
+
TuiHintDriverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintDriverDirective, deps: [{ token: TuiDestroyService, self: true }, { token: TuiDriver }, { token: TuiVehicle }], target: i0.ɵɵFactoryTarget.Directive });
|
|
468
|
+
TuiHintDriverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintDriverDirective, selector: "[tuiHint]", providers: [TuiDestroyService], usesInheritance: true, ngImport: i0 });
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintDriverDirective, decorators: [{
|
|
454
470
|
type: Directive,
|
|
455
471
|
args: [{
|
|
456
472
|
selector: '[tuiHint]',
|
|
457
473
|
providers: [TuiDestroyService],
|
|
458
474
|
}]
|
|
459
|
-
}]
|
|
475
|
+
}], ctorParameters: function () { return [{ type: i2$1.Observable, decorators: [{
|
|
476
|
+
type: Self
|
|
477
|
+
}, {
|
|
478
|
+
type: Inject,
|
|
479
|
+
args: [TuiDestroyService]
|
|
480
|
+
}] }, { type: undefined, decorators: [{
|
|
481
|
+
type: Inject,
|
|
482
|
+
args: [TuiDriver]
|
|
483
|
+
}] }, { type: undefined, decorators: [{
|
|
484
|
+
type: Inject,
|
|
485
|
+
args: [TuiVehicle]
|
|
486
|
+
}] }]; } });
|
|
460
487
|
|
|
461
488
|
class TuiHintHostDirective extends TuiRectAccessor {
|
|
489
|
+
constructor() {
|
|
490
|
+
super(...arguments);
|
|
491
|
+
this.type = 'hint';
|
|
492
|
+
}
|
|
462
493
|
getClientRect() {
|
|
463
494
|
var _a;
|
|
464
495
|
return ((_a = this.tuiHintHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || EMPTY_CLIENT_RECT;
|
|
465
496
|
}
|
|
466
497
|
}
|
|
467
|
-
TuiHintHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
468
|
-
TuiHintHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
498
|
+
TuiHintHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
499
|
+
TuiHintHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintHostDirective, selector: "[tuiHint][tuiHintHost]", inputs: { tuiHintHost: "tuiHintHost" }, providers: [tuiAsRectAccessor(TuiHintHostDirective)], usesInheritance: true, ngImport: i0 });
|
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintHostDirective, decorators: [{
|
|
470
501
|
type: Directive,
|
|
471
502
|
args: [{
|
|
472
503
|
selector: '[tuiHint][tuiHintHost]',
|
|
@@ -477,24 +508,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
477
508
|
}] } });
|
|
478
509
|
|
|
479
510
|
class TuiHintManualDirective extends TuiDriver {
|
|
480
|
-
constructor() {
|
|
511
|
+
constructor(hover) {
|
|
481
512
|
super(subscriber => this.stream$.subscribe(subscriber));
|
|
482
513
|
this.stream$ = new Subject();
|
|
483
514
|
this.tuiHintManual = false;
|
|
515
|
+
this.type = 'hint';
|
|
516
|
+
hover.enabled = false;
|
|
484
517
|
}
|
|
485
518
|
ngOnChanges() {
|
|
486
519
|
this.stream$.next(this.tuiHintManual);
|
|
487
520
|
}
|
|
488
521
|
}
|
|
489
|
-
TuiHintManualDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
490
|
-
TuiHintManualDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
491
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
522
|
+
TuiHintManualDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintManualDirective, deps: [{ token: TuiHintHoverDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
523
|
+
TuiHintManualDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintManualDirective, selector: "[tuiHint][tuiHintManual]", inputs: { tuiHintManual: "tuiHintManual" }, providers: [tuiAsDriver(TuiHintManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintManualDirective, decorators: [{
|
|
492
525
|
type: Directive,
|
|
493
526
|
args: [{
|
|
494
527
|
selector: '[tuiHint][tuiHintManual]',
|
|
495
528
|
providers: [tuiAsDriver(TuiHintManualDirective)],
|
|
496
529
|
}]
|
|
497
|
-
}], ctorParameters: function () { return [
|
|
530
|
+
}], ctorParameters: function () { return [{ type: TuiHintHoverDirective, decorators: [{
|
|
531
|
+
type: Inject,
|
|
532
|
+
args: [TuiHintHoverDirective]
|
|
533
|
+
}] }]; }, propDecorators: { tuiHintManual: [{
|
|
498
534
|
type: Input
|
|
499
535
|
}] } });
|
|
500
536
|
|
|
@@ -502,17 +538,21 @@ const OFFSET = 8;
|
|
|
502
538
|
const ARROW_OFFSET = 22;
|
|
503
539
|
const TOP = 0;
|
|
504
540
|
const LEFT = 1;
|
|
505
|
-
class TuiHintPositionDirective {
|
|
506
|
-
constructor(options, viewport,
|
|
541
|
+
class TuiHintPositionDirective extends TuiPositionAccessor {
|
|
542
|
+
constructor(options, viewport, directive, accessors) {
|
|
543
|
+
super();
|
|
507
544
|
this.options = options;
|
|
508
545
|
this.viewport = viewport;
|
|
509
|
-
this.
|
|
546
|
+
this.directive = directive;
|
|
547
|
+
this.accessors = accessors;
|
|
510
548
|
this.points = TUI_HINT_DIRECTIONS.reduce((acc, direction) => (Object.assign(Object.assign({}, acc), { [direction]: [0, 0] })), {});
|
|
511
549
|
this.direction = this.options.direction;
|
|
550
|
+
this.type = 'hint';
|
|
512
551
|
}
|
|
513
552
|
// eslint-disable-next-line max-statements
|
|
514
553
|
getPosition({ width, height }) {
|
|
515
|
-
|
|
554
|
+
var _a, _b;
|
|
555
|
+
const hostRect = (_b = (_a = this.accessor) === null || _a === void 0 ? void 0 : _a.getClientRect()) !== null && _b !== void 0 ? _b : EMPTY_CLIENT_RECT;
|
|
516
556
|
const leftCenter = hostRect.left + hostRect.width / 2;
|
|
517
557
|
const topCenter = hostRect.top + hostRect.height / 2;
|
|
518
558
|
this.points['top-left'][TOP] = hostRect.top - height - OFFSET;
|
|
@@ -545,6 +585,9 @@ class TuiHintPositionDirective {
|
|
|
545
585
|
const direction = TUI_HINT_DIRECTIONS.find(direction => this.checkPosition(this.points[direction], width, height));
|
|
546
586
|
return this.points[direction || this.fallback];
|
|
547
587
|
}
|
|
588
|
+
get accessor() {
|
|
589
|
+
return tuiFallbackRectAccessor('hint')(this.accessors, this.directive);
|
|
590
|
+
}
|
|
548
591
|
get fallback() {
|
|
549
592
|
return this.points.top[TOP] >
|
|
550
593
|
this.viewport.getClientRect().bottom - this.points.bottom[TOP]
|
|
@@ -559,12 +602,15 @@ class TuiHintPositionDirective {
|
|
|
559
602
|
left + width < viewport.right - OFFSET);
|
|
560
603
|
}
|
|
561
604
|
}
|
|
562
|
-
TuiHintPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
563
|
-
TuiHintPositionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
605
|
+
TuiHintPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintPositionDirective, deps: [{ token: TUI_HINT_OPTIONS }, { token: TUI_VIEWPORT }, { token: TuiHintDirective }, { token: TuiRectAccessor }], target: i0.ɵɵFactoryTarget.Directive });
|
|
606
|
+
TuiHintPositionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: { direction: ["tuiHintDirection", "direction"] }, providers: [tuiAsPositionAccessor(TuiHintPositionDirective)], usesInheritance: true, ngImport: i0 });
|
|
564
607
|
__decorate([
|
|
565
608
|
tuiDefaultProp()
|
|
566
609
|
], TuiHintPositionDirective.prototype, "direction", void 0);
|
|
567
|
-
|
|
610
|
+
__decorate([
|
|
611
|
+
tuiPure
|
|
612
|
+
], TuiHintPositionDirective.prototype, "accessor", null);
|
|
613
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintPositionDirective, decorators: [{
|
|
568
614
|
type: Directive,
|
|
569
615
|
args: [{
|
|
570
616
|
selector: '[tuiHint]:not([tuiHintCustomPosition])',
|
|
@@ -577,17 +623,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
577
623
|
type: Inject,
|
|
578
624
|
args: [TUI_VIEWPORT]
|
|
579
625
|
}] }, { type: i1$1.TuiRectAccessor, decorators: [{
|
|
626
|
+
type: Inject,
|
|
627
|
+
args: [TuiHintDirective]
|
|
628
|
+
}] }, { type: undefined, decorators: [{
|
|
580
629
|
type: Inject,
|
|
581
630
|
args: [TuiRectAccessor]
|
|
582
631
|
}] }]; }, propDecorators: { direction: [{
|
|
583
632
|
type: Input,
|
|
584
633
|
args: ['tuiHintDirection']
|
|
585
|
-
}] } });
|
|
634
|
+
}], accessor: [] } });
|
|
586
635
|
|
|
587
636
|
class TuiHintModule {
|
|
588
637
|
}
|
|
589
|
-
TuiHintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
590
|
-
TuiHintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
638
|
+
TuiHintModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
639
|
+
TuiHintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintModule, declarations: [TuiHintComponent,
|
|
591
640
|
TuiHintDirective,
|
|
592
641
|
TuiHintDriverDirective,
|
|
593
642
|
TuiHintHostDirective,
|
|
@@ -606,8 +655,8 @@ TuiHintModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
606
655
|
TuiHintDescribeDirective,
|
|
607
656
|
TuiHintPositionDirective,
|
|
608
657
|
TuiHintOptionsDirective] });
|
|
609
|
-
TuiHintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
610
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
658
|
+
TuiHintModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintModule, imports: [[CommonModule, PolymorpheusModule]] });
|
|
659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiHintModule, decorators: [{
|
|
611
660
|
type: NgModule,
|
|
612
661
|
args: [{
|
|
613
662
|
imports: [CommonModule, PolymorpheusModule],
|