@taiga-ui/core 3.17.0 → 3.18.0-dev.main-05a0bf8
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-core-abstract.umd.js +11 -19
- 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 +203 -190
- 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 +13 -22
- 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 +21 -30
- 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 +109 -38
- 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 +39 -30
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +83 -72
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +95 -100
- 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 +35 -44
- 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-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-services.umd.js +22 -31
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +43 -14
- 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/dialog/dialog-close.service.d.ts +15 -0
- package/components/dialog/dialog.component.d.ts +5 -4
- package/components/dialog/dialog.tokens.d.ts +2 -0
- package/components/dialog/index.d.ts +1 -1
- package/components/notification/notification.component.d.ts +2 -2
- package/components/svg/deprecated-icons.d.ts +1 -0
- package/components/svg/index.d.ts +2 -0
- package/components/svg/svg-options.d.ts +14 -0
- package/components/svg/svg.component.d.ts +5 -7
- package/components/tooltip/tooltip.component.d.ts +2 -2
- package/components/tooltip/tooltip.module.d.ts +5 -4
- package/directives/dropdown/dropdown-hover-options.directive.d.ts +9 -0
- package/directives/dropdown/dropdown-hover.directive.d.ts +3 -1
- package/directives/dropdown/dropdown-position-sided.directive.d.ts +2 -2
- package/directives/dropdown/dropdown-position.directive.d.ts +2 -2
- package/directives/dropdown/index.d.ts +1 -0
- package/directives/hint/hint-hover.directive.d.ts +4 -2
- package/directives/hint/hint-position.directive.d.ts +2 -2
- package/esm2015/abstract/abstract-driver.directive.js +3 -3
- package/esm2015/abstract/abstract-textfield-host.js +3 -3
- package/esm2015/abstract/rect-accessor.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 +51 -0
- package/esm2015/components/dialog/dialog.component.js +27 -11
- 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/dialog/dialog.tokens.js +5 -1
- package/esm2015/components/dialog/index.js +2 -2
- 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 +6 -6
- 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 +5 -5
- 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/deprecated-icons.js +59 -0
- package/esm2015/components/svg/index.js +3 -1
- package/esm2015/components/svg/svg-options.js +29 -0
- package/esm2015/components/svg/svg.component.js +14 -19
- 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 +15 -15
- package/esm2015/components/tooltip/tooltip.module.js +23 -6
- package/esm2015/directives/dropdown/dropdown-context.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown-driver.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown-host.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown-hover-options.directive.js +14 -0
- package/esm2015/directives/dropdown/dropdown-hover.directive.js +12 -7
- package/esm2015/directives/dropdown/dropdown-manual.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown-options.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown-position-sided.directive.js +14 -14
- package/esm2015/directives/dropdown/dropdown-position.directive.js +13 -13
- package/esm2015/directives/dropdown/dropdown-selection.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown.component.js +3 -3
- package/esm2015/directives/dropdown/dropdown.directive.js +3 -3
- package/esm2015/directives/dropdown/dropdown.module.js +4 -4
- package/esm2015/directives/dropdown/index.js +2 -1
- package/esm2015/directives/hint/hint-describe.directive.js +3 -3
- package/esm2015/directives/hint/hint-driver.directive.js +3 -3
- package/esm2015/directives/hint/hint-host.directive.js +3 -3
- package/esm2015/directives/hint/hint-hover.directive.js +14 -11
- package/esm2015/directives/hint/hint-manual.directive.js +3 -3
- package/esm2015/directives/hint/hint-options.directive.js +5 -5
- package/esm2015/directives/hint/hint-pointer.directive.js +3 -3
- package/esm2015/directives/hint/hint-position.directive.js +14 -13
- package/esm2015/directives/hint/hint.component.js +6 -5
- package/esm2015/directives/hint/hint.directive.js +3 -3
- package/esm2015/directives/hint/hint.module.js +4 -4
- 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/textfield-cleaner.directive.js +3 -3
- package/esm2015/directives/textfield-controller/textfield-controller.module.js +4 -4
- 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/wrapper/wrapper.directive.js +3 -3
- package/esm2015/directives/wrapper/wrapper.module.js +4 -4
- package/esm2015/interfaces/dialog-options.js +1 -1
- 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/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/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/icon-place.js +5 -2
- package/esm2015/tokens/icons-path.js +4 -1
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/svg-content-processor.js +4 -1
- package/esm2015/tokens/svg-src-processor.js +4 -1
- package/esm2015/tokens/viewport.js +26 -0
- package/fesm2015/taiga-ui-core-abstract.js +7 -6
- 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 +96 -80
- package/fesm2015/taiga-ui-core-components-dialog.js.map +1 -1
- 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 +9 -9
- package/fesm2015/taiga-ui-core-components-notification.js.map +1 -1
- 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 +17 -17
- 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 +103 -26
- package/fesm2015/taiga-ui-core-components-svg.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-theme-night.js +7 -7
- package/fesm2015/taiga-ui-core-components-tooltip.js +36 -19
- package/fesm2015/taiga-ui-core-components-tooltip.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown.js +76 -59
- package/fesm2015/taiga-ui-core-directives-dropdown.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +61 -58
- 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 +31 -31
- 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-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-services.js +18 -18
- package/fesm2015/taiga-ui-core-tokens.js +38 -2
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/interfaces/dialog-options.d.ts +4 -3
- package/package.json +4 -4
- package/styles/mixins/textfield.less +4 -22
- package/styles/mixins/textfield.scss +3 -22
- package/styles/theme/wrapper/icon.less +17 -27
- package/tokens/icon-place.d.ts +3 -0
- package/tokens/icons-path.d.ts +3 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/svg-content-processor.d.ts +3 -0
- package/tokens/svg-src-processor.d.ts +3 -0
- package/tokens/viewport.d.ts +4 -0
- package/components/dialog/dialog.providers.d.ts +0 -5
- package/esm2015/components/dialog/dialog.providers.js +0 -51
|
@@ -2,28 +2,27 @@ import { __decorate } from 'tslib';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Component, ChangeDetectionStrategy, Self, Inject, ViewChild, Input, HostBinding, HostListener, NgModule } from '@angular/core';
|
|
4
4
|
import { TuiDestroyService, TUI_IS_MOBILE, tuiDefaultProp } from '@taiga-ui/cdk';
|
|
5
|
-
import {
|
|
6
|
-
import { TuiHintOptionsDirective, TUI_HINT_OPTIONS } from '@taiga-ui/core/directives';
|
|
5
|
+
import { TuiHintOptionsDirective, TUI_HINT_OPTIONS, TuiHintHoverDirective } from '@taiga-ui/core/directives';
|
|
7
6
|
import { MODE_PROVIDER } from '@taiga-ui/core/providers';
|
|
8
7
|
import { TUI_MODE } from '@taiga-ui/core/tokens';
|
|
9
|
-
import * as i5 from 'rxjs';
|
|
10
|
-
import { EMPTY } from 'rxjs';
|
|
11
8
|
import { takeUntil } from 'rxjs/operators';
|
|
12
9
|
import * as i1 from '@taiga-ui/core/components/svg';
|
|
13
10
|
import { TuiSvgModule } from '@taiga-ui/core/components/svg';
|
|
14
|
-
import * as i2 from '@taiga-ui/core/directives/
|
|
11
|
+
import * as i2 from '@taiga-ui/core/directives/wrapper';
|
|
12
|
+
import { TuiWrapperModule } from '@taiga-ui/core/directives/wrapper';
|
|
13
|
+
import * as i3 from '@taiga-ui/core/directives/hint';
|
|
15
14
|
import { TuiHintModule } from '@taiga-ui/core/directives/hint';
|
|
16
|
-
import * as
|
|
15
|
+
import * as i4 from '@tinkoff/ng-polymorpheus';
|
|
17
16
|
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
18
|
-
import * as
|
|
17
|
+
import * as i5 from '@angular/common';
|
|
19
18
|
import { CommonModule } from '@angular/common';
|
|
19
|
+
import * as i6 from 'rxjs';
|
|
20
20
|
|
|
21
21
|
class TuiTooltipComponent extends TuiHintOptionsDirective {
|
|
22
22
|
constructor(destroy$, mode$, options, isMobile) {
|
|
23
23
|
super(options);
|
|
24
24
|
this.isMobile = isMobile;
|
|
25
25
|
this.mode = null;
|
|
26
|
-
this.driver$ = EMPTY;
|
|
27
26
|
this.describeId = '';
|
|
28
27
|
mode$.pipe(takeUntil(destroy$)).subscribe(mode => {
|
|
29
28
|
this.mode = mode;
|
|
@@ -33,18 +32,20 @@ class TuiTooltipComponent extends TuiHintOptionsDirective {
|
|
|
33
32
|
return this.appearance || this.mode || '';
|
|
34
33
|
}
|
|
35
34
|
stopOnMobile(event) {
|
|
35
|
+
var _a;
|
|
36
36
|
if (this.isMobile) {
|
|
37
37
|
event.preventDefault();
|
|
38
38
|
event.stopPropagation();
|
|
39
39
|
}
|
|
40
|
+
(_a = this.driver$) === null || _a === void 0 ? void 0 : _a.toggle(true);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
TuiTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
43
|
-
TuiTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
43
|
+
TuiTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipComponent, deps: [{ token: TuiDestroyService, self: true }, { token: TUI_MODE }, { token: TUI_HINT_OPTIONS }, { token: TUI_IS_MOBILE }], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
+
TuiTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiTooltipComponent, selector: "tui-tooltip", inputs: { content: "content", direction: "direction", appearance: "appearance", showDelay: "showDelay", hideDelay: "hideDelay", describeId: "describeId" }, host: { listeners: { "mousedown": "stopOnMobile($event)", "click": "stopOnMobile($event)" }, properties: { "attr.data-appearance": "this.computedAppearance" } }, providers: [TuiDestroyService, MODE_PROVIDER], viewQueries: [{ propertyName: "driver$", first: true, predicate: TuiHintHoverDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<span\n #driver=\"tuiHintHover\"\n automation-id=\"tui-tooltip__icon\"\n tuiWrapper\n appearance=\"icon\"\n class=\"t-tooltip-icon\"\n [hover]=\"(driver | async) || null\"\n [tuiHint]=\"content\"\n [tuiHintDescribe]=\"describeId\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintAppearance]=\"computedAppearance\"\n>\n <tui-svg\n *polymorpheusOutlet=\"icon as src\"\n [src]=\"src\"\n ></tui-svg>\n</span>\n", styles: [":host{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;width:1.5rem;height:1.5rem;vertical-align:middle;font-size:0;line-height:0;cursor:pointer;color:var(--tui-text-01)}:host[data-appearance=error]{color:var(--tui-error-fill)}.t-tooltip-icon{display:inline-block;width:100%;height:100%;color:inherit}\n"], components: [{ type: i1.TuiSvgComponent, selector: "tui-svg", inputs: ["src"] }], directives: [{ type: i2.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i3.TuiHintDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHint", "tuiHintContext", "tuiHintAppearance"] }, { type: i3.TuiHintDriverDirective, selector: "[tuiHint]" }, { type: i3.TuiHintHoverDirective, selector: "[tuiHint]:not(ng-container)", inputs: ["tuiHintShowDelay", "tuiHintHideDelay"], exportAs: ["tuiHintHover"] }, { type: i3.TuiHintPositionDirective, selector: "[tuiHint]:not([tuiHintCustomPosition])", inputs: ["tuiHintDirection"] }, { type: i3.TuiHintDescribeDirective, selector: "[tuiHintDescribe]", inputs: ["tuiHintDescribe"] }, { type: i4.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
45
|
__decorate([
|
|
45
46
|
tuiDefaultProp()
|
|
46
47
|
], TuiTooltipComponent.prototype, "describeId", void 0);
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipComponent, decorators: [{
|
|
48
49
|
type: Component,
|
|
49
50
|
args: [{
|
|
50
51
|
selector: 'tui-tooltip',
|
|
@@ -54,12 +55,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
54
55
|
providers: [TuiDestroyService, MODE_PROVIDER],
|
|
55
56
|
inputs: ['content', 'direction', 'appearance', 'showDelay', 'hideDelay'],
|
|
56
57
|
}]
|
|
57
|
-
}], ctorParameters: function () { return [{ type:
|
|
58
|
+
}], ctorParameters: function () { return [{ type: i6.Observable, decorators: [{
|
|
58
59
|
type: Self
|
|
59
60
|
}, {
|
|
60
61
|
type: Inject,
|
|
61
62
|
args: [TuiDestroyService]
|
|
62
|
-
}] }, { type:
|
|
63
|
+
}] }, { type: i6.Observable, decorators: [{
|
|
63
64
|
type: Inject,
|
|
64
65
|
args: [TUI_MODE]
|
|
65
66
|
}] }, { type: undefined, decorators: [{
|
|
@@ -70,7 +71,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
70
71
|
args: [TUI_IS_MOBILE]
|
|
71
72
|
}] }]; }, propDecorators: { driver$: [{
|
|
72
73
|
type: ViewChild,
|
|
73
|
-
args: [
|
|
74
|
+
args: [TuiHintHoverDirective]
|
|
74
75
|
}], describeId: [{
|
|
75
76
|
type: Input
|
|
76
77
|
}], computedAppearance: [{
|
|
@@ -86,13 +87,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
86
87
|
|
|
87
88
|
class TuiTooltipModule {
|
|
88
89
|
}
|
|
89
|
-
TuiTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
90
|
-
TuiTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
TuiTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
91
|
+
TuiTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, declarations: [TuiTooltipComponent], imports: [CommonModule,
|
|
92
|
+
TuiWrapperModule,
|
|
93
|
+
TuiSvgModule,
|
|
94
|
+
TuiHintModule,
|
|
95
|
+
PolymorpheusModule], exports: [TuiTooltipComponent] });
|
|
96
|
+
TuiTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, imports: [[
|
|
97
|
+
CommonModule,
|
|
98
|
+
TuiWrapperModule,
|
|
99
|
+
TuiSvgModule,
|
|
100
|
+
TuiHintModule,
|
|
101
|
+
PolymorpheusModule,
|
|
102
|
+
]] });
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiTooltipModule, decorators: [{
|
|
93
104
|
type: NgModule,
|
|
94
105
|
args: [{
|
|
95
|
-
imports: [
|
|
106
|
+
imports: [
|
|
107
|
+
CommonModule,
|
|
108
|
+
TuiWrapperModule,
|
|
109
|
+
TuiSvgModule,
|
|
110
|
+
TuiHintModule,
|
|
111
|
+
PolymorpheusModule,
|
|
112
|
+
],
|
|
96
113
|
declarations: [TuiTooltipComponent],
|
|
97
114
|
exports: [TuiTooltipComponent],
|
|
98
115
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["../../../projects/core/components/tooltip/tooltip.component.ts","../../../projects/core/components/tooltip/tooltip.template.html","../../../projects/core/components/tooltip/tooltip.module.ts","../../../projects/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-tooltip.js","sources":["../../../projects/core/components/tooltip/tooltip.component.ts","../../../projects/core/components/tooltip/tooltip.template.html","../../../projects/core/components/tooltip/tooltip.module.ts","../../../projects/core/components/tooltip/taiga-ui-core-components-tooltip.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, tuiDefaultProp, TuiDestroyService} from '@taiga-ui/cdk';\nimport {\n TUI_HINT_OPTIONS,\n TuiHintHoverDirective,\n TuiHintOptions,\n TuiHintOptionsDirective,\n} from '@taiga-ui/core/directives';\nimport {MODE_PROVIDER} from '@taiga-ui/core/providers';\nimport {TUI_MODE} from '@taiga-ui/core/tokens';\nimport {TuiBrightness} from '@taiga-ui/core/types';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\n@Component({\n selector: 'tui-tooltip',\n templateUrl: './tooltip.template.html',\n styleUrls: ['./tooltip.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService, MODE_PROVIDER],\n inputs: ['content', 'direction', 'appearance', 'showDelay', 'hideDelay'],\n})\nexport class TuiTooltipComponent extends TuiHintOptionsDirective {\n private mode: TuiBrightness | null = null;\n\n @ViewChild(TuiHintHoverDirective)\n readonly driver$?: TuiHintHoverDirective;\n\n @Input()\n @tuiDefaultProp()\n describeId = '';\n\n constructor(\n @Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>,\n @Inject(TUI_MODE) mode$: Observable<TuiBrightness | null>,\n @Inject(TUI_HINT_OPTIONS) options: TuiHintOptions,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n ) {\n super(options);\n\n mode$.pipe(takeUntil(destroy$)).subscribe(mode => {\n this.mode = mode;\n });\n }\n\n @HostBinding('attr.data-appearance')\n get computedAppearance(): string {\n return this.appearance || this.mode || '';\n }\n\n @HostListener('mousedown', ['$event'])\n @HostListener('click', ['$event'])\n stopOnMobile(event: MouseEvent): void {\n if (this.isMobile) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n this.driver$?.toggle(true);\n }\n}\n","<span\n #driver=\"tuiHintHover\"\n automation-id=\"tui-tooltip__icon\"\n tuiWrapper\n appearance=\"icon\"\n class=\"t-tooltip-icon\"\n [hover]=\"(driver | async) || null\"\n [tuiHint]=\"content\"\n [tuiHintDescribe]=\"describeId\"\n [tuiHintDirection]=\"direction\"\n [tuiHintShowDelay]=\"showDelay\"\n [tuiHintHideDelay]=\"hideDelay\"\n [tuiHintAppearance]=\"computedAppearance\"\n>\n <tui-svg\n *polymorpheusOutlet=\"icon as src\"\n [src]=\"src\"\n ></tui-svg>\n</span>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiHintModule} from '@taiga-ui/core/directives/hint';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiTooltipComponent} from './tooltip.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiHintModule,\n PolymorpheusModule,\n ],\n declarations: [TuiTooltipComponent],\n exports: [TuiTooltipComponent],\n})\nexport class TuiTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -7,7 +7,7 @@ import * as i1$2 from '@taiga-ui/core/abstract';
|
|
|
7
7
|
import { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiRectAccessor, AbstractTuiDriverDirective, tuiAsPositionAccessor } from '@taiga-ui/core/abstract';
|
|
8
8
|
import { tuiDropdownAnimation } from '@taiga-ui/core/animations';
|
|
9
9
|
import { TuiPositionService } from '@taiga-ui/core/services';
|
|
10
|
-
import { TUI_ANIMATION_OPTIONS, TUI_SELECTION_STREAM } from '@taiga-ui/core/tokens';
|
|
10
|
+
import { TUI_ANIMATION_OPTIONS, TUI_VIEWPORT, TUI_SELECTION_STREAM } from '@taiga-ui/core/tokens';
|
|
11
11
|
import { switchMap, delay, tap, share, takeUntil, map, distinctUntilChanged } from 'rxjs/operators';
|
|
12
12
|
import { __decorate } from 'tslib';
|
|
13
13
|
import { tuiCheckFixedPosition, tuiOverrideOptions, tuiGetWordRange } from '@taiga-ui/core/utils';
|
|
@@ -65,8 +65,8 @@ class TuiDropdownDirective {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
TuiDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
69
|
-
TuiDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
68
|
+
TuiDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownDirective, deps: [{ token: ElementRef }, { token: PolymorpheusComponent }, { token: TuiDropdownPortalService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
69
|
+
TuiDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDirective, selector: "[tuiDropdown]:not(ng-container)", inputs: { content: ["tuiDropdown", "content"] }, providers: [
|
|
70
70
|
tuiAsRectAccessor(TuiDropdownDirective),
|
|
71
71
|
tuiAsVehicle(TuiDropdownDirective),
|
|
72
72
|
{
|
|
@@ -81,7 +81,7 @@ __decorate([
|
|
|
81
81
|
__decorate([
|
|
82
82
|
tuiPure
|
|
83
83
|
], TuiDropdownDirective.prototype, "position", null);
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownDirective, decorators: [{
|
|
85
85
|
type: Directive,
|
|
86
86
|
args: [{
|
|
87
87
|
selector: '[tuiDropdown]:not(ng-container)',
|
|
@@ -110,31 +110,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
110
110
|
args: ['tuiDropdown']
|
|
111
111
|
}], position: [] } });
|
|
112
112
|
|
|
113
|
+
/** Default values for hint options */
|
|
114
|
+
const TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS = {
|
|
115
|
+
showDelay: 200,
|
|
116
|
+
hideDelay: 500,
|
|
117
|
+
};
|
|
118
|
+
const TUI_DROPDOWN_HOVER_OPTIONS = new InjectionToken('[TUI_DROPDOWN_HOVER_OPTIONS] Default parameters for dropdown hover directive', {
|
|
119
|
+
factory: () => TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS,
|
|
120
|
+
});
|
|
121
|
+
const tuiDropdownHoverOptionsProvider = (options) => ({
|
|
122
|
+
provide: TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS,
|
|
123
|
+
useValue: Object.assign(Object.assign({}, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS), options),
|
|
124
|
+
});
|
|
125
|
+
|
|
113
126
|
class TuiDropdownHoverDirective extends TuiDriver {
|
|
114
|
-
constructor(hovered
|
|
127
|
+
constructor(hovered$, options) {
|
|
115
128
|
super(subscriber => this.stream$.subscribe(subscriber));
|
|
116
129
|
this.hovered$ = hovered$;
|
|
130
|
+
this.options = options;
|
|
117
131
|
this.toggle$ = new Subject();
|
|
118
132
|
this.stream$ = merge(this.toggle$, this.hovered$).pipe(switchMap(visible => of(visible).pipe(delay(visible ? this.showDelay : this.hideDelay))), tap(visible => {
|
|
119
133
|
this.hovered = visible;
|
|
120
134
|
}), share());
|
|
121
|
-
this.showDelay =
|
|
122
|
-
this.hideDelay =
|
|
135
|
+
this.showDelay = this.options.showDelay;
|
|
136
|
+
this.hideDelay = this.options.hideDelay;
|
|
123
137
|
this.hovered = false;
|
|
124
138
|
}
|
|
125
139
|
toggle(visible) {
|
|
126
140
|
this.toggle$.next(visible);
|
|
127
141
|
}
|
|
128
142
|
}
|
|
129
|
-
TuiDropdownHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
130
|
-
TuiDropdownHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
143
|
+
TuiDropdownHoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownHoverDirective, deps: [{ token: TuiHoveredService }, { token: TUI_DROPDOWN_HOVER_OPTIONS }], target: i0.ɵɵFactoryTarget.Directive });
|
|
144
|
+
TuiDropdownHoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHoverDirective, selector: "[tuiDropdownHover]:not(ng-container)", inputs: { showDelay: ["tuiDropdownShowDelay", "showDelay"], hideDelay: ["tuiDropdownHideDelay", "hideDelay"] }, providers: [tuiAsDriver(TuiDropdownHoverDirective), TuiHoveredService], usesInheritance: true, ngImport: i0 });
|
|
131
145
|
__decorate([
|
|
132
146
|
tuiDefaultProp()
|
|
133
147
|
], TuiDropdownHoverDirective.prototype, "showDelay", void 0);
|
|
134
148
|
__decorate([
|
|
135
149
|
tuiDefaultProp()
|
|
136
150
|
], TuiDropdownHoverDirective.prototype, "hideDelay", void 0);
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownHoverDirective, decorators: [{
|
|
138
152
|
type: Directive,
|
|
139
153
|
args: [{
|
|
140
154
|
selector: '[tuiDropdownHover]:not(ng-container)',
|
|
@@ -143,6 +157,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
143
157
|
}], ctorParameters: function () { return [{ type: i5.Observable, decorators: [{
|
|
144
158
|
type: Inject,
|
|
145
159
|
args: [TuiHoveredService]
|
|
160
|
+
}] }, { type: undefined, decorators: [{
|
|
161
|
+
type: Inject,
|
|
162
|
+
args: [TUI_DROPDOWN_HOVER_OPTIONS]
|
|
146
163
|
}] }]; }, propDecorators: { showDelay: [{
|
|
147
164
|
type: Input,
|
|
148
165
|
args: ['tuiDropdownShowDelay']
|
|
@@ -182,8 +199,8 @@ class TuiDropdownOptionsDirective {
|
|
|
182
199
|
this.offset = this.options.offset;
|
|
183
200
|
}
|
|
184
201
|
}
|
|
185
|
-
TuiDropdownOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
186
|
-
TuiDropdownOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
202
|
+
TuiDropdownOptionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownOptionsDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
203
|
+
TuiDropdownOptionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownOptionsDirective, selector: "[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]", inputs: { align: ["tuiDropdownAlign", "align"], direction: ["tuiDropdownDirection", "direction"], limitWidth: ["tuiDropdownLimitWidth", "limitWidth"], minHeight: ["tuiDropdownMinHeight", "minHeight"], maxHeight: ["tuiDropdownMaxHeight", "maxHeight"], offset: ["tuiDropdownOffset", "offset"] }, providers: [
|
|
187
204
|
{
|
|
188
205
|
provide: TUI_DROPDOWN_OPTIONS,
|
|
189
206
|
useExisting: forwardRef(() => TuiDropdownOptionsDirective),
|
|
@@ -207,7 +224,7 @@ __decorate([
|
|
|
207
224
|
__decorate([
|
|
208
225
|
tuiDefaultProp()
|
|
209
226
|
], TuiDropdownOptionsDirective.prototype, "offset", void 0);
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownOptionsDirective, decorators: [{
|
|
211
228
|
type: Directive,
|
|
212
229
|
args: [{
|
|
213
230
|
selector: '[tuiDropdownAlign], [tuiDropdownDirection], [tuiDropdownLimitWidth], [tuiDropdownMinHeight], [tuiDropdownMaxHeight], [tuiDropdownOffset]',
|
|
@@ -325,9 +342,9 @@ class TuiDropdownComponent {
|
|
|
325
342
|
focusable === null || focusable === void 0 ? void 0 : focusable.focus();
|
|
326
343
|
}
|
|
327
344
|
}
|
|
328
|
-
TuiDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
329
|
-
TuiDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
345
|
+
TuiDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownComponent, deps: [{ token: TuiPositionService }, { token: TuiDestroyService, self: true }, { token: TuiDropdownDirective }, { token: ElementRef }, { token: AbstractTuiPortalHostComponent }, { token: TuiRectAccessor }, { token: WINDOW }, { token: TUI_ANIMATION_OPTIONS }, { token: TUI_DROPDOWN_OPTIONS }, { token: TuiDropdownHoverDirective, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
346
|
+
TuiDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownComponent, selector: "tui-dropdown", host: { properties: { "@tuiDropdownAnimation": "this.dropdownAnimation" } }, providers: [TuiDestroyService, TuiPositionService], ngImport: i0, template: "<div\n #activeZone=\"tuiActiveZone\"\n tuiActiveZone\n tuiOverscroll=\"all\"\n class=\"t-wrapper\"\n [tuiMode]=\"null\"\n (tuiHoveredChange)=\"onHoveredChange($event)\"\n>\n <tui-scrollbar class=\"t-scroll\">\n <div\n tabindex=\"0\"\n (focus)=\"onTopFocus()\"\n ></div>\n <div\n *polymorpheusOutlet=\"directive.content as text; context: {$implicit: activeZone}\"\n class=\"t-primitive\"\n >\n {{ text }}\n </div>\n <div\n tabindex=\"0\"\n (focus)=\"onBottomFocus()\"\n ></div>\n </tui-scrollbar>\n</div>\n", styles: [":host{position:relative;z-index:0;box-shadow:0 1.5rem 1rem rgba(0,0,0,.03),0 .75rem .75rem rgba(0,0,0,.04),0 .25rem .375rem rgba(0,0,0,.05);position:absolute;display:flex;background-color:var(--tui-elevation-01);border-radius:var(--tui-radius-m);overflow:hidden;border:1px solid var(--tui-base-04);box-sizing:border-box;max-width:calc(100% - 8px)}:host.ng-animating{pointer-events:none}:host:not([style*=\"top\"]){visibility:hidden}.t-wrapper{flex-grow:1;max-width:100%;max-height:inherit;overflow:visible}.t-scroll{height:100%}.t-primitive{padding:1rem}\n"], components: [{ type: i1$1.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }], directives: [{ type: i2.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i2.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }, { type: i3.TuiModeDirective, selector: "[tuiMode]", inputs: ["tuiMode"] }, { type: i2.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i1.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], animations: [tuiDropdownAnimation], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownComponent, decorators: [{
|
|
331
348
|
type: Component,
|
|
332
349
|
args: [{
|
|
333
350
|
selector: 'tui-dropdown',
|
|
@@ -399,8 +416,8 @@ class TuiDropdownContextDirective extends TuiDriver {
|
|
|
399
416
|
return this.currentRect;
|
|
400
417
|
}
|
|
401
418
|
}
|
|
402
|
-
TuiDropdownContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
403
|
-
TuiDropdownContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
419
|
+
TuiDropdownContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownContextDirective, deps: [{ token: TuiActiveZoneDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
420
|
+
TuiDropdownContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownContextDirective, selector: "[tuiDropdown][tuiDropdownContext]", host: { listeners: { "contextmenu.prevent.stop": "onContextMenu($event.clientX,$event.clientY)", "document:click.silent": "closeDropdown($event.target)", "document:contextmenu.capture.silent": "closeDropdown($event.target)", "document:keydown.esc": "closeDropdown($event.currentTarget)" } }, providers: [
|
|
404
421
|
TuiActiveZoneDirective,
|
|
405
422
|
tuiAsDriver(TuiDropdownContextDirective),
|
|
406
423
|
tuiAsRectAccessor(TuiDropdownContextDirective),
|
|
@@ -408,7 +425,7 @@ TuiDropdownContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.
|
|
|
408
425
|
__decorate([
|
|
409
426
|
shouldCall(activeZoneFilter)
|
|
410
427
|
], TuiDropdownContextDirective.prototype, "closeDropdown", null);
|
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownContextDirective, decorators: [{
|
|
412
429
|
type: Directive,
|
|
413
430
|
args: [{
|
|
414
431
|
selector: '[tuiDropdown][tuiDropdownContext]',
|
|
@@ -437,9 +454,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
437
454
|
|
|
438
455
|
class TuiDropdownDriverDirective extends AbstractTuiDriverDirective {
|
|
439
456
|
}
|
|
440
|
-
TuiDropdownDriverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
441
|
-
TuiDropdownDriverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
457
|
+
TuiDropdownDriverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownDriverDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
458
|
+
TuiDropdownDriverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownDriverDirective, selector: "[tuiDropdown]", providers: [TuiDestroyService], usesInheritance: true, ngImport: i0 });
|
|
459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownDriverDirective, decorators: [{
|
|
443
460
|
type: Directive,
|
|
444
461
|
args: [{
|
|
445
462
|
selector: '[tuiDropdown]',
|
|
@@ -453,9 +470,9 @@ class TuiDropdownHostDirective extends TuiRectAccessor {
|
|
|
453
470
|
return ((_a = this.tuiDropdownHost) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || EMPTY_CLIENT_RECT;
|
|
454
471
|
}
|
|
455
472
|
}
|
|
456
|
-
TuiDropdownHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
457
|
-
TuiDropdownHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
473
|
+
TuiDropdownHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownHostDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
474
|
+
TuiDropdownHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownHostDirective, selector: "[tuiDropdown][tuiDropdownHost]", inputs: { tuiDropdownHost: "tuiDropdownHost" }, providers: [tuiAsRectAccessor(TuiDropdownHostDirective)], usesInheritance: true, ngImport: i0 });
|
|
475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownHostDirective, decorators: [{
|
|
459
476
|
type: Directive,
|
|
460
477
|
args: [{
|
|
461
478
|
selector: '[tuiDropdown][tuiDropdownHost]',
|
|
@@ -475,9 +492,9 @@ class TuiDropdownManualDirective extends TuiDriver {
|
|
|
475
492
|
this.stream$.next(this.tuiDropdownManual);
|
|
476
493
|
}
|
|
477
494
|
}
|
|
478
|
-
TuiDropdownManualDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
479
|
-
TuiDropdownManualDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
480
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
495
|
+
TuiDropdownManualDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownManualDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
496
|
+
TuiDropdownManualDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownManualDirective, selector: "[tuiDropdown][tuiDropdownManual]", inputs: { tuiDropdownManual: "tuiDropdownManual" }, providers: [tuiAsDriver(TuiDropdownManualDirective)], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownManualDirective, decorators: [{
|
|
481
498
|
type: Directive,
|
|
482
499
|
args: [{
|
|
483
500
|
selector: '[tuiDropdown][tuiDropdownManual]',
|
|
@@ -488,26 +505,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
488
505
|
}] } });
|
|
489
506
|
|
|
490
507
|
class TuiDropdownPositionDirective {
|
|
491
|
-
constructor(options,
|
|
508
|
+
constructor(options, viewport, accessor) {
|
|
492
509
|
this.options = options;
|
|
493
|
-
this.
|
|
510
|
+
this.viewport = viewport;
|
|
494
511
|
this.accessor = accessor;
|
|
495
512
|
}
|
|
496
513
|
getPosition({ width, height }) {
|
|
497
514
|
const hostRect = this.accessor.getClientRect();
|
|
498
|
-
const
|
|
515
|
+
const viewport = this.viewport.getClientRect();
|
|
499
516
|
const { minHeight, align, direction, offset } = this.options;
|
|
500
517
|
const previous = this.previous || direction || 'bottom';
|
|
501
518
|
const right = Math.max(hostRect.right - width, offset);
|
|
502
519
|
const available = {
|
|
503
|
-
top: hostRect.top - 2 * offset,
|
|
504
|
-
bottom:
|
|
520
|
+
top: hostRect.top - 2 * offset - viewport.top,
|
|
521
|
+
bottom: viewport.bottom - hostRect.bottom - 2 * offset,
|
|
505
522
|
};
|
|
506
523
|
const position = {
|
|
507
524
|
top: hostRect.top - offset - height,
|
|
508
525
|
bottom: hostRect.bottom + offset,
|
|
509
526
|
right,
|
|
510
|
-
left: hostRect.left + width <
|
|
527
|
+
left: hostRect.left + width < viewport.right - offset ? hostRect.left : right,
|
|
511
528
|
};
|
|
512
529
|
const better = available.top > available.bottom ? 'top' : 'bottom';
|
|
513
530
|
if ((available[previous] > minHeight && direction) ||
|
|
@@ -518,9 +535,9 @@ class TuiDropdownPositionDirective {
|
|
|
518
535
|
return [position[better], position[align]];
|
|
519
536
|
}
|
|
520
537
|
}
|
|
521
|
-
TuiDropdownPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
522
|
-
TuiDropdownPositionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
538
|
+
TuiDropdownPositionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownPositionDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: TUI_VIEWPORT }, { token: TuiRectAccessor }], target: i0.ɵɵFactoryTarget.Directive });
|
|
539
|
+
TuiDropdownPositionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionDirective, selector: "[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])", providers: [tuiAsPositionAccessor(TuiDropdownPositionDirective)], ngImport: i0 });
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownPositionDirective, decorators: [{
|
|
524
541
|
type: Directive,
|
|
525
542
|
args: [{
|
|
526
543
|
selector: '[tuiDropdown]:not([tuiDropdownCustomPosition]):not([tuiDropdownSided])',
|
|
@@ -529,18 +546,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
529
546
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
530
547
|
type: Inject,
|
|
531
548
|
args: [TUI_DROPDOWN_OPTIONS]
|
|
532
|
-
}] }, { type:
|
|
549
|
+
}] }, { type: i1$2.TuiRectAccessor, decorators: [{
|
|
533
550
|
type: Inject,
|
|
534
|
-
args: [
|
|
551
|
+
args: [TUI_VIEWPORT]
|
|
535
552
|
}] }, { type: i1$2.TuiRectAccessor, decorators: [{
|
|
536
553
|
type: Inject,
|
|
537
554
|
args: [TuiRectAccessor]
|
|
538
555
|
}] }]; } });
|
|
539
556
|
|
|
540
557
|
class TuiDropdownPositionSidedDirective {
|
|
541
|
-
constructor(options,
|
|
558
|
+
constructor(options, viewport, accessor, vertical) {
|
|
542
559
|
this.options = options;
|
|
543
|
-
this.
|
|
560
|
+
this.viewport = viewport;
|
|
544
561
|
this.accessor = accessor;
|
|
545
562
|
this.vertical = vertical;
|
|
546
563
|
this.previous = this.options.direction || 'bottom';
|
|
@@ -553,13 +570,13 @@ class TuiDropdownPositionSidedDirective {
|
|
|
553
570
|
}
|
|
554
571
|
const { height, width } = rect;
|
|
555
572
|
const hostRect = this.accessor.getClientRect();
|
|
556
|
-
const
|
|
573
|
+
const viewport = this.viewport.getClientRect();
|
|
557
574
|
const { align, direction, minHeight, offset } = this.options;
|
|
558
575
|
const available = {
|
|
559
|
-
top: hostRect.bottom,
|
|
560
|
-
left: hostRect.left - offset,
|
|
561
|
-
right:
|
|
562
|
-
bottom:
|
|
576
|
+
top: hostRect.bottom - viewport.top,
|
|
577
|
+
left: hostRect.left - offset - viewport.left,
|
|
578
|
+
right: viewport.right - hostRect.right - offset,
|
|
579
|
+
bottom: viewport.bottom - hostRect.top,
|
|
563
580
|
};
|
|
564
581
|
const position = {
|
|
565
582
|
top: hostRect.bottom - height + this.tuiDropdownSidedOffset + 1,
|
|
@@ -578,12 +595,12 @@ class TuiDropdownPositionSidedDirective {
|
|
|
578
595
|
return [position[better], left];
|
|
579
596
|
}
|
|
580
597
|
}
|
|
581
|
-
TuiDropdownPositionSidedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
582
|
-
TuiDropdownPositionSidedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
598
|
+
TuiDropdownPositionSidedDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownPositionSidedDirective, deps: [{ token: TUI_DROPDOWN_OPTIONS }, { token: TUI_VIEWPORT }, { token: TuiRectAccessor }, { token: TuiDropdownPositionDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
599
|
+
TuiDropdownPositionSidedDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownPositionSidedDirective, selector: "[tuiDropdownSided]", inputs: { tuiDropdownSided: "tuiDropdownSided", tuiDropdownSidedOffset: "tuiDropdownSidedOffset" }, providers: [
|
|
583
600
|
TuiDropdownPositionDirective,
|
|
584
601
|
tuiAsPositionAccessor(TuiDropdownPositionSidedDirective),
|
|
585
602
|
], ngImport: i0 });
|
|
586
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
603
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownPositionSidedDirective, decorators: [{
|
|
587
604
|
type: Directive,
|
|
588
605
|
args: [{
|
|
589
606
|
selector: '[tuiDropdownSided]',
|
|
@@ -595,9 +612,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
595
612
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
596
613
|
type: Inject,
|
|
597
614
|
args: [TUI_DROPDOWN_OPTIONS]
|
|
598
|
-
}] }, { type:
|
|
615
|
+
}] }, { type: i1$2.TuiRectAccessor, decorators: [{
|
|
599
616
|
type: Inject,
|
|
600
|
-
args: [
|
|
617
|
+
args: [TUI_VIEWPORT]
|
|
601
618
|
}] }, { type: i1$2.TuiRectAccessor, decorators: [{
|
|
602
619
|
type: Inject,
|
|
603
620
|
args: [TuiRectAccessor]
|
|
@@ -722,15 +739,15 @@ class TuiDropdownSelectionDirective extends TuiDriver {
|
|
|
722
739
|
return ghost;
|
|
723
740
|
}
|
|
724
741
|
}
|
|
725
|
-
TuiDropdownSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
726
|
-
TuiDropdownSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
742
|
+
TuiDropdownSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownSelectionDirective, deps: [{ token: TUI_RANGE }, { token: DOCUMENT }, { token: TUI_SELECTION_STREAM }, { token: ElementRef }, { token: ViewContainerRef }, { token: TuiDropdownDirective }], target: i0.ɵɵFactoryTarget.Directive });
|
|
743
|
+
TuiDropdownSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDropdownSelectionDirective, selector: "[tuiDropdown][tuiDropdownSelection]", inputs: { position: ["tuiDropdownSelectionPosition", "position"], tuiDropdownSelection: "tuiDropdownSelection" }, providers: [
|
|
727
744
|
tuiAsDriver(TuiDropdownSelectionDirective),
|
|
728
745
|
tuiAsRectAccessor(TuiDropdownSelectionDirective),
|
|
729
746
|
], usesInheritance: true, ngImport: i0 });
|
|
730
747
|
__decorate([
|
|
731
748
|
tuiDefaultProp()
|
|
732
749
|
], TuiDropdownSelectionDirective.prototype, "position", void 0);
|
|
733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownSelectionDirective, decorators: [{
|
|
734
751
|
type: Directive,
|
|
735
752
|
args: [{
|
|
736
753
|
selector: '[tuiDropdown][tuiDropdownSelection]',
|
|
@@ -766,8 +783,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
766
783
|
|
|
767
784
|
class TuiDropdownModule {
|
|
768
785
|
}
|
|
769
|
-
TuiDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
770
|
-
TuiDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
786
|
+
TuiDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
787
|
+
TuiDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownModule, declarations: [TuiDropdownDirective,
|
|
771
788
|
TuiDropdownComponent,
|
|
772
789
|
TuiDropdownOptionsDirective,
|
|
773
790
|
TuiDropdownHostDirective,
|
|
@@ -793,7 +810,7 @@ TuiDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
793
810
|
TuiDropdownPositionDirective,
|
|
794
811
|
TuiDropdownPositionSidedDirective,
|
|
795
812
|
TuiDropdownSelectionDirective] });
|
|
796
|
-
TuiDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
813
|
+
TuiDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownModule, imports: [[
|
|
797
814
|
PolymorpheusModule,
|
|
798
815
|
TuiActiveZoneModule,
|
|
799
816
|
TuiOverscrollModule,
|
|
@@ -801,7 +818,7 @@ TuiDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
|
|
|
801
818
|
TuiModeModule,
|
|
802
819
|
TuiHoveredModule,
|
|
803
820
|
]] });
|
|
804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDropdownModule, decorators: [{
|
|
805
822
|
type: NgModule,
|
|
806
823
|
args: [{
|
|
807
824
|
imports: [
|
|
@@ -845,5 +862,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
845
862
|
* Generated bundle index. Do not edit.
|
|
846
863
|
*/
|
|
847
864
|
|
|
848
|
-
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdownComponent, TuiDropdownContextDirective, TuiDropdownDirective, TuiDropdownDriverDirective, TuiDropdownHostDirective, TuiDropdownHoverDirective, TuiDropdownManualDirective, TuiDropdownModule, TuiDropdownOptionsDirective, TuiDropdownPositionDirective, TuiDropdownPositionSidedDirective, TuiDropdownSelectionDirective, tuiDropdownOptionsProvider };
|
|
865
|
+
export { TUI_DROPDOWN_COMPONENT, TUI_DROPDOWN_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_DEFAULT_OPTIONS, TUI_DROPDOWN_HOVER_OPTIONS, TUI_DROPDOWN_OPTIONS, TuiDropdownComponent, TuiDropdownContextDirective, TuiDropdownDirective, TuiDropdownDriverDirective, TuiDropdownHostDirective, TuiDropdownHoverDirective, TuiDropdownManualDirective, TuiDropdownModule, TuiDropdownOptionsDirective, TuiDropdownPositionDirective, TuiDropdownPositionSidedDirective, TuiDropdownSelectionDirective, tuiDropdownHoverOptionsProvider, tuiDropdownOptionsProvider };
|
|
849
866
|
//# sourceMappingURL=taiga-ui-core-directives-dropdown.js.map
|