@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
|
@@ -1,67 +1,88 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, ElementRef, Component, ChangeDetectionStrategy,
|
|
2
|
+
import { InjectionToken, ElementRef, Injectable, Inject, Component, ChangeDetectionStrategy, Self, HostBinding, inject, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import * as i4 from '@taiga-ui/cdk';
|
|
4
|
-
import {
|
|
4
|
+
import { tuiTypedFromEvent, tuiIsCurrentTarget, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter, TUI_IS_MOBILE, TuiDestroyService, AbstractTuiDialogService, AbstractTuiDialogDirective, TuiPreventDefaultModule, tuiAsDialog } from '@taiga-ui/cdk';
|
|
5
5
|
import { tuiSlideInTop, tuiFadeIn } from '@taiga-ui/core/animations';
|
|
6
6
|
import { TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD } from '@taiga-ui/core/tokens';
|
|
7
7
|
import * as i3 from '@tinkoff/ng-polymorpheus';
|
|
8
8
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
9
|
+
import * as i5 from 'rxjs';
|
|
10
|
+
import { EMPTY, Observable, merge, Subject, isObservable, of } from 'rxjs';
|
|
11
|
+
import { filter, switchMap, take, map, takeUntil } from 'rxjs/operators';
|
|
9
12
|
import * as i2 from '@angular/common';
|
|
10
13
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
11
14
|
import { WINDOW } from '@ng-web-apis/common';
|
|
12
|
-
import { tuiGetViewportWidth } from '@taiga-ui/core/utils
|
|
13
|
-
import * as i5 from 'rxjs';
|
|
14
|
-
import { EMPTY, merge } from 'rxjs';
|
|
15
|
-
import { filter, switchMap, take, takeUntil } from 'rxjs/operators';
|
|
15
|
+
import { tuiGetViewportWidth } from '@taiga-ui/core/utils';
|
|
16
16
|
import * as i1 from '@taiga-ui/core/components/button';
|
|
17
17
|
import { TuiButtonModule } from '@taiga-ui/core/components/button';
|
|
18
18
|
|
|
19
|
+
const TUI_DIALOG_DEFAULT_OPTIONS = {
|
|
20
|
+
size: `m`,
|
|
21
|
+
required: false,
|
|
22
|
+
closeable: true,
|
|
23
|
+
dismissible: true,
|
|
24
|
+
label: ``,
|
|
25
|
+
header: ``,
|
|
26
|
+
};
|
|
19
27
|
const TUI_DIALOGS_CLOSE = new InjectionToken(`[TUI_DIALOGS_CLOSE]: A stream to close dialogs`, {
|
|
20
28
|
factory: () => EMPTY,
|
|
21
29
|
});
|
|
30
|
+
const TUI_DIALOG_OPTIONS = new InjectionToken(`[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`, {
|
|
31
|
+
factory: () => TUI_DIALOG_DEFAULT_OPTIONS,
|
|
32
|
+
});
|
|
33
|
+
function tuiDialogOptionsProvider(options) {
|
|
34
|
+
return {
|
|
35
|
+
provide: TUI_DIALOG_OPTIONS,
|
|
36
|
+
useValue: Object.assign(Object.assign({}, TUI_DIALOG_DEFAULT_OPTIONS), options),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
22
40
|
const SCROLLBAR_PLACEHOLDER = 17;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
]
|
|
41
|
+
class TuiDialogCloseService extends Observable {
|
|
42
|
+
constructor(windowRef, documentRef, elementRef) {
|
|
43
|
+
super(subscriber => merge(this.click$, this.esc$, this.mousedown$).subscribe(subscriber));
|
|
44
|
+
this.windowRef = windowRef;
|
|
45
|
+
this.documentRef = documentRef;
|
|
46
|
+
this.elementRef = elementRef;
|
|
47
|
+
this.click$ = tuiTypedFromEvent(this.element, `click`).pipe(filter(tuiIsCurrentTarget));
|
|
48
|
+
this.esc$ = tuiTypedFromEvent(this.documentRef, `keydown`).pipe(filter(event => {
|
|
49
|
+
const key = event.key;
|
|
50
|
+
const target = tuiGetActualTarget(event);
|
|
51
|
+
return (key === `Escape` &&
|
|
52
|
+
tuiIsElement(target) &&
|
|
53
|
+
(this.element.contains(target) ||
|
|
54
|
+
!tuiContainsOrAfter(this.element, target)));
|
|
55
|
+
}));
|
|
56
|
+
this.mousedown$ = tuiTypedFromEvent(this.documentRef, `mousedown`).pipe(filter(event => {
|
|
57
|
+
const target = tuiGetActualTarget(event);
|
|
58
|
+
const clientX = event.clientX;
|
|
59
|
+
return (tuiIsElement(target) &&
|
|
60
|
+
tuiGetViewportWidth(this.windowRef) - clientX > SCROLLBAR_PLACEHOLDER &&
|
|
61
|
+
!tuiContainsOrAfter(this.element, target));
|
|
62
|
+
}), switchMap(() => tuiTypedFromEvent(this.documentRef, `mouseup`).pipe(take(1), map(tuiGetActualTarget), filter(target => tuiIsElement(target) && !tuiContainsOrAfter(this.element, target)))));
|
|
63
|
+
}
|
|
64
|
+
get element() {
|
|
65
|
+
return this.elementRef.nativeElement;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
TuiDialogCloseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogCloseService, deps: [{ token: WINDOW }, { token: DOCUMENT }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
69
|
+
TuiDialogCloseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogCloseService });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogCloseService, decorators: [{
|
|
71
|
+
type: Injectable
|
|
72
|
+
}], ctorParameters: function () { return [{ type: Window, decorators: [{
|
|
73
|
+
type: Inject,
|
|
74
|
+
args: [WINDOW]
|
|
75
|
+
}] }, { type: Document, decorators: [{
|
|
76
|
+
type: Inject,
|
|
77
|
+
args: [DOCUMENT]
|
|
78
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
79
|
+
type: Inject,
|
|
80
|
+
args: [ElementRef]
|
|
81
|
+
}] }]; } });
|
|
61
82
|
|
|
62
83
|
const REQUIRED_ERROR = new Error('Required dialog was dismissed');
|
|
63
84
|
class TuiDialogComponent {
|
|
64
|
-
constructor(duration, isMobile, context, close$, closeWord$) {
|
|
85
|
+
constructor(duration, isMobile, context, destroy$, dialogClose$, close$, closeWord$) {
|
|
65
86
|
this.duration = duration;
|
|
66
87
|
this.isMobile = isMobile;
|
|
67
88
|
this.context = context;
|
|
@@ -80,7 +101,12 @@ class TuiDialogComponent {
|
|
|
80
101
|
duration: this.duration,
|
|
81
102
|
},
|
|
82
103
|
};
|
|
83
|
-
close
|
|
104
|
+
this.close$ = new Subject();
|
|
105
|
+
merge(merge(dialogClose$, this.close$).pipe(switchMap(() => isObservable(context.closeable)
|
|
106
|
+
? context.closeable
|
|
107
|
+
: of(context.closeable)), filter(Boolean)), close$)
|
|
108
|
+
.pipe(takeUntil(destroy$))
|
|
109
|
+
.subscribe(() => {
|
|
84
110
|
this.close();
|
|
85
111
|
});
|
|
86
112
|
}
|
|
@@ -104,9 +130,9 @@ class TuiDialogComponent {
|
|
|
104
130
|
}
|
|
105
131
|
}
|
|
106
132
|
}
|
|
107
|
-
TuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
108
|
-
TuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
133
|
+
TuiDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogComponent, deps: [{ token: TUI_ANIMATIONS_DURATION }, { token: TUI_IS_MOBILE }, { token: POLYMORPHEUS_CONTEXT }, { token: TuiDestroyService, self: true }, { token: TuiDialogCloseService }, { token: TUI_DIALOGS_CLOSE }, { token: TUI_CLOSE_WORD }], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
+
TuiDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiDialogComponent, selector: "tui-dialog", host: { properties: { "attr.data-size": "this.size", "class._centered": "this.header", "@tuiSlideInTop": "this.slideInTop", "@tuiFadeIn": "this.slideInTop" } }, providers: [TuiDestroyService, TuiDialogCloseService], ngImport: i0, template: "<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close$.next()\"\n ></button>\n</div>\n", styles: [":host{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}:host:after{position:absolute;top:0;left:0;width:100%;height:100%;box-shadow:0 1.125rem 1.875rem rgba(0,0,0,.48);content:\"\";border-radius:inherit;pointer-events:none}:host[data-size=auto]{width:auto}:host[data-size=s]{width:30rem}:host[data-size=s] .t-content{padding:1.5rem}:host[data-size=s] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}:host[data-size=m]{width:42.5rem}:host[data-size=m] .t-heading{margin-bottom:.75rem;font:var(--tui-font-heading-4)}:host[data-size=l]{width:55rem}:host[data-size=l] .t-heading{margin-bottom:1rem}:host[data-size=fullscreen],:host[data-size=page]{width:100%;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-elevation-01)}:host[data-size=fullscreen] .t-content,:host[data-size=page] .t-content{padding:3rem calc(50vw - (45rem / 2))}:host[data-size=fullscreen] .t-heading,:host[data-size=page] .t-heading{margin-bottom:1rem}:host[data-size=page] .t-content{padding:0}:host._centered{text-align:center}:host :host-context(tui-root._mobile)[data-size]{min-width:100%;width:100%;max-width:100%;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:1.5rem}:host :host-context(tui-root._mobile)[data-size] .t-heading{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading:empty{display:none}.t-header{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}:host[data-size=fullscreen] :host-context(tui-root._mobile) .t-header{flex:1}.t-content{border-radius:inherit;padding:2rem;background:var(--tui-base-01)}.t-content:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper{position:-webkit-sticky;position:sticky;top:0;order:-1}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;color:var(--tui-base-01);background:rgba(104,104,104,.96)}.t-close:hover{background:rgba(159,159,159,.86)}:host:not([data-size=\"fullscreen\"]) .t-close{animation:tuiFadeIn var(--tui-duration)}:host:not([data-size=\"fullscreen\"]).ng-animating .t-close{display:none}:host-context(tui-root._mobile) .t-close{position:absolute;top:0;right:0;background:transparent;color:var(--tui-base-06)}:host-context(tui-root._mobile) .t-close:hover{color:var(--tui-base-07)}.t-buttons{margin-top:1.25rem;text-align:right}\n"], components: [{ type: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i4.TuiPreventDefaultDirective, selector: "[tuiPreventDefault]", inputs: ["tuiPreventDefault"] }], pipes: { "async": i2.AsyncPipe }, animations: [tuiSlideInTop, tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogComponent, decorators: [{
|
|
110
136
|
type: Component,
|
|
111
137
|
args: [{
|
|
112
138
|
selector: 'tui-dialog',
|
|
@@ -115,7 +141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
115
141
|
// So we don't force OnPush on dialog content
|
|
116
142
|
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
|
117
143
|
changeDetection: ChangeDetectionStrategy.Default,
|
|
118
|
-
providers:
|
|
144
|
+
providers: [TuiDestroyService, TuiDialogCloseService],
|
|
119
145
|
animations: [tuiSlideInTop, tuiFadeIn],
|
|
120
146
|
}]
|
|
121
147
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -129,7 +155,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
129
155
|
args: [POLYMORPHEUS_CONTEXT]
|
|
130
156
|
}] }, { type: i5.Observable, decorators: [{
|
|
131
157
|
type: Inject,
|
|
132
|
-
args: [
|
|
158
|
+
args: [TuiDestroyService]
|
|
159
|
+
}, {
|
|
160
|
+
type: Self
|
|
161
|
+
}] }, { type: i5.Observable, decorators: [{
|
|
162
|
+
type: Inject,
|
|
163
|
+
args: [TuiDialogCloseService]
|
|
164
|
+
}] }, { type: i5.Observable, decorators: [{
|
|
165
|
+
type: Inject,
|
|
166
|
+
args: [TUI_DIALOGS_CLOSE]
|
|
133
167
|
}] }, { type: i5.Observable, decorators: [{
|
|
134
168
|
type: Inject,
|
|
135
169
|
args: [TUI_CLOSE_WORD]
|
|
@@ -147,24 +181,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
147
181
|
args: ['@tuiFadeIn']
|
|
148
182
|
}] } });
|
|
149
183
|
|
|
150
|
-
const TUI_DIALOG_DEFAULT_OPTIONS = {
|
|
151
|
-
size: `m`,
|
|
152
|
-
required: false,
|
|
153
|
-
closeable: true,
|
|
154
|
-
dismissible: true,
|
|
155
|
-
label: ``,
|
|
156
|
-
header: ``,
|
|
157
|
-
};
|
|
158
|
-
const TUI_DIALOG_OPTIONS = new InjectionToken(`[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`, {
|
|
159
|
-
factory: () => TUI_DIALOG_DEFAULT_OPTIONS,
|
|
160
|
-
});
|
|
161
|
-
function tuiDialogOptionsProvider(options) {
|
|
162
|
-
return {
|
|
163
|
-
provide: TUI_DIALOG_OPTIONS,
|
|
164
|
-
useValue: Object.assign(Object.assign({}, TUI_DIALOG_DEFAULT_OPTIONS), options),
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
184
|
const DIALOG = new PolymorpheusComponent(TuiDialogComponent);
|
|
169
185
|
class TuiDialogService extends AbstractTuiDialogService {
|
|
170
186
|
constructor() {
|
|
@@ -173,9 +189,9 @@ class TuiDialogService extends AbstractTuiDialogService {
|
|
|
173
189
|
this.defaultOptions = Object.assign(Object.assign({}, inject(TUI_DIALOG_OPTIONS)), { data: undefined });
|
|
174
190
|
}
|
|
175
191
|
}
|
|
176
|
-
TuiDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
177
|
-
TuiDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
192
|
+
TuiDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
193
|
+
TuiDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogService, providedIn: `root` });
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogService, decorators: [{
|
|
179
195
|
type: Injectable,
|
|
180
196
|
args: [{
|
|
181
197
|
providedIn: `root`,
|
|
@@ -184,14 +200,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
184
200
|
|
|
185
201
|
class TuiDialogDirective extends AbstractTuiDialogDirective {
|
|
186
202
|
}
|
|
187
|
-
TuiDialogDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
188
|
-
TuiDialogDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
203
|
+
TuiDialogDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
204
|
+
TuiDialogDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiDialogDirective, selector: "ng-template[tuiDialog]", inputs: { options: ["tuiDialogOptions", "options"], open: ["tuiDialog", "open"] }, outputs: { openChange: "tuiDialogChange" }, providers: [
|
|
189
205
|
{
|
|
190
206
|
provide: AbstractTuiDialogService,
|
|
191
207
|
useExisting: TuiDialogService,
|
|
192
208
|
},
|
|
193
209
|
], usesInheritance: true, ngImport: i0 });
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogDirective, decorators: [{
|
|
195
211
|
type: Directive,
|
|
196
212
|
args: [{
|
|
197
213
|
selector: 'ng-template[tuiDialog]',
|
|
@@ -208,10 +224,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
208
224
|
|
|
209
225
|
class TuiDialogModule {
|
|
210
226
|
}
|
|
211
|
-
TuiDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
212
|
-
TuiDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
213
|
-
TuiDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
214
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
227
|
+
TuiDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
228
|
+
TuiDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogModule, declarations: [TuiDialogComponent, TuiDialogDirective], imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule], exports: [TuiDialogComponent, TuiDialogDirective] });
|
|
229
|
+
TuiDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogModule, providers: [tuiAsDialog(TuiDialogService)], imports: [[PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule]] });
|
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiDialogModule, decorators: [{
|
|
215
231
|
type: NgModule,
|
|
216
232
|
args: [{
|
|
217
233
|
imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],
|
|
@@ -225,5 +241,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
225
241
|
* Generated bundle index. Do not edit.
|
|
226
242
|
*/
|
|
227
243
|
|
|
228
|
-
export { TUI_DIALOGS_CLOSE,
|
|
244
|
+
export { TUI_DIALOGS_CLOSE, TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialogCloseService, TuiDialogComponent, TuiDialogDirective, TuiDialogModule, TuiDialogService, tuiDialogOptionsProvider };
|
|
229
245
|
//# sourceMappingURL=taiga-ui-core-components-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["../../../projects/core/components/dialog/dialog.providers.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.tokens.ts","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.module.ts","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {ElementRef, InjectionToken, Provider} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n tuiContainsOrAfter,\n TuiDestroyService,\n TuiDialog,\n tuiGetActualTarget,\n tuiIsCurrentTarget,\n tuiIsElement,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils/dom';\nimport {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {filter, switchMap, take, takeUntil} from 'rxjs/operators';\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `[TUI_DIALOGS_CLOSE]: A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\nexport const TUI_DIALOG_CLOSE_STREAM = new InjectionToken<Observable<unknown>>(\n `[TUI_DIALOG_CLOSE_STREAM]: Dialogs closing stream`,\n);\nexport const TUI_DIALOG_PROVIDERS: Provider[] = [\n TuiDestroyService,\n {\n provide: TUI_DIALOG_CLOSE_STREAM,\n deps: [\n DOCUMENT,\n WINDOW,\n ElementRef,\n TUI_DIALOGS_CLOSE,\n TuiDestroyService,\n POLYMORPHEUS_CONTEXT,\n ],\n useFactory: (\n documentRef: Document,\n windowRef: Window,\n {nativeElement}: ElementRef<HTMLElement>,\n close$: Observable<void>,\n destroy$: Observable<void>,\n {dismissible}: TuiDialog<TuiDialogOptions<unknown>, unknown>,\n ): Observable<unknown> => {\n return dismissible\n ? merge(\n tuiTypedFromEvent(nativeElement, `click`).pipe(\n filter(tuiIsCurrentTarget),\n ),\n tuiTypedFromEvent(documentRef, `keydown`).pipe(\n filter(event => {\n const key = event.key;\n const target = tuiGetActualTarget(event);\n\n return (\n key === `Escape` &&\n tuiIsElement(target) &&\n (!tuiContainsOrAfter(nativeElement, target) ||\n nativeElement.contains(target))\n );\n }),\n ),\n tuiTypedFromEvent(documentRef, `mousedown`).pipe(\n filter(event => {\n const target = tuiGetActualTarget(event);\n const clientX = event.clientX;\n\n return (\n tuiIsElement(target) &&\n tuiGetViewportWidth(windowRef) - clientX >\n SCROLLBAR_PLACEHOLDER &&\n !tuiContainsOrAfter(nativeElement, target)\n );\n }),\n switchMap(() =>\n tuiTypedFromEvent(documentRef, `mouseup`).pipe(\n take(1),\n filter(event => {\n const target = tuiGetActualTarget(event);\n\n return (\n tuiIsElement(target) &&\n !tuiContainsOrAfter(nativeElement, target)\n );\n }),\n ),\n ),\n ),\n close$,\n ).pipe(takeUntil(destroy$))\n : close$;\n },\n },\n];\n","import {ChangeDetectionStrategy, Component, HostBinding, Inject} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TUI_DIALOG_CLOSE_STREAM, TUI_DIALOG_PROVIDERS} from './dialog.providers';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\n@Component({\n selector: 'tui-dialog',\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: TUI_DIALOG_PROVIDERS,\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT)\n readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TUI_DIALOG_CLOSE_STREAM)\n close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n close$.subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding('class._centered')\n get header(): PolymorpheusContent<TuiDialog<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n get slideInTop(): TuiAnimationOptions {\n return this.size === 'fullscreen' || this.size === 'page' || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close()\"\n ></button>\n</div>\n","import {InjectionToken, ValueProvider} from '@angular/core';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\ntype TuiDialogDefaultOptions = Omit<TuiDialogOptions<unknown>, 'data'>;\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogDefaultOptions = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n};\n\nexport const TUI_DIALOG_OPTIONS = new InjectionToken<TuiDialogDefaultOptions>(\n `[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`,\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_DIALOG_OPTIONS,\n useValue: {...TUI_DIALOG_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TUI_DIALOG_OPTIONS} from './dialog.tokens';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = {\n ...inject(TUI_DIALOG_OPTIONS),\n data: undefined,\n };\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsDialog, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n providers: [tuiAsDialog(TuiDialogService)],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAkBa,iBAAiB,GAAG,IAAI,cAAc,CAC/C,gDAAgD,EAChD;AACI,IAAA,OAAO,EAAE,MAAM,KAAK;AACvB,CAAA,EACH;AAEF,MAAM,qBAAqB,GAAG,EAAE,CAAC;MAEpB,uBAAuB,GAAG,IAAI,cAAc,CACrD,CAAmD,iDAAA,CAAA,EACrD;AACW,MAAA,oBAAoB,GAAe;IAC5C,iBAAiB;AACjB,IAAA;AACI,QAAA,OAAO,EAAE,uBAAuB;AAChC,QAAA,IAAI,EAAE;YACF,QAAQ;YACR,MAAM;YACN,UAAU;YACV,iBAAiB;YACjB,iBAAiB;YACjB,oBAAoB;AACvB,SAAA;AACD,QAAA,UAAU,EAAE,CACR,WAAqB,EACrB,SAAiB,EACjB,EAAC,aAAa,EAA0B,EACxC,MAAwB,EACxB,QAA0B,EAC1B,EAAC,WAAW,EAAgD,KACvC;AACrB,YAAA,OAAO,WAAW;AACd,kBAAE,KAAK,CACD,iBAAiB,CAAC,aAAa,EAAE,CAAA,KAAA,CAAO,CAAC,CAAC,IAAI,CAC1C,MAAM,CAAC,kBAAkB,CAAC,CAC7B,EACD,iBAAiB,CAAC,WAAW,EAAE,CAAS,OAAA,CAAA,CAAC,CAAC,IAAI,CAC1C,MAAM,CAAC,KAAK,IAAG;AACX,oBAAA,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;AACtB,oBAAA,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;oBAEzC,QACI,GAAG,KAAK,CAAQ,MAAA,CAAA;wBAChB,YAAY,CAAC,MAAM,CAAC;AACpB,yBAAC,CAAC,kBAAkB,CAAC,aAAa,EA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
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-dialog.js","sources":["../../../projects/core/components/dialog/dialog.tokens.ts","../../../projects/core/components/dialog/dialog-close.service.ts","../../../projects/core/components/dialog/dialog.component.ts","../../../projects/core/components/dialog/dialog.template.html","../../../projects/core/components/dialog/dialog.service.ts","../../../projects/core/components/dialog/dialog.directive.ts","../../../projects/core/components/dialog/dialog.module.ts","../../../projects/core/components/dialog/taiga-ui-core-components-dialog.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {EMPTY, Observable} from 'rxjs';\n\ntype TuiDialogDefaultOptions = Omit<TuiDialogOptions<unknown>, 'data'>;\n\nexport const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogDefaultOptions = {\n size: `m`,\n required: false,\n closeable: true,\n dismissible: true,\n label: ``,\n header: ``,\n};\n\nexport const TUI_DIALOGS_CLOSE = new InjectionToken<Observable<unknown>>(\n `[TUI_DIALOGS_CLOSE]: A stream to close dialogs`,\n {\n factory: () => EMPTY,\n },\n);\n\nexport const TUI_DIALOG_OPTIONS = new InjectionToken<TuiDialogDefaultOptions>(\n `[TUI_DIALOG_OPTIONS]: Default parameters for dialog component`,\n {\n factory: () => TUI_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiDialogOptionsProvider(\n options: Partial<TuiDialogDefaultOptions>,\n): ValueProvider {\n return {\n provide: TUI_DIALOG_OPTIONS,\n useValue: {...TUI_DIALOG_DEFAULT_OPTIONS, ...options},\n };\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, Inject, Injectable} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {\n tuiContainsOrAfter,\n tuiGetActualTarget,\n tuiIsCurrentTarget,\n tuiIsElement,\n tuiTypedFromEvent,\n} from '@taiga-ui/cdk';\nimport {tuiGetViewportWidth} from '@taiga-ui/core/utils';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, switchMap, take} from 'rxjs/operators';\n\nconst SCROLLBAR_PLACEHOLDER = 17;\n\n@Injectable()\nexport class TuiDialogCloseService extends Observable<unknown> {\n private readonly click$ = tuiTypedFromEvent(this.element, `click`).pipe(\n filter(tuiIsCurrentTarget),\n );\n\n private readonly esc$ = tuiTypedFromEvent(this.documentRef, `keydown`).pipe(\n filter(event => {\n const key = event.key;\n const target = tuiGetActualTarget(event);\n\n return (\n key === `Escape` &&\n tuiIsElement(target) &&\n (this.element.contains(target) ||\n !tuiContainsOrAfter(this.element, target))\n );\n }),\n );\n\n private readonly mousedown$ = tuiTypedFromEvent(this.documentRef, `mousedown`).pipe(\n filter(event => {\n const target = tuiGetActualTarget(event);\n const clientX = event.clientX;\n\n return (\n tuiIsElement(target) &&\n tuiGetViewportWidth(this.windowRef) - clientX > SCROLLBAR_PLACEHOLDER &&\n !tuiContainsOrAfter(this.element, target)\n );\n }),\n switchMap(() =>\n tuiTypedFromEvent(this.documentRef, `mouseup`).pipe(\n take(1),\n map(tuiGetActualTarget),\n filter(\n target =>\n tuiIsElement(target) && !tuiContainsOrAfter(this.element, target),\n ),\n ),\n ),\n );\n\n constructor(\n @Inject(WINDOW) private readonly windowRef: Window,\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n ) {\n super(subscriber =>\n merge(this.click$, this.esc$, this.mousedown$).subscribe(subscriber),\n );\n }\n\n private get element(): HTMLElement {\n return this.elementRef.nativeElement;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n Self,\n} from '@angular/core';\nimport {TUI_IS_MOBILE, TuiDestroyService, TuiDialog} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiSlideInTop} from '@taiga-ui/core/animations';\nimport {TuiAnimationOptions, TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD} from '@taiga-ui/core/tokens';\nimport {TuiDialogSize} from '@taiga-ui/core/types';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {isObservable, merge, Observable, of, Subject} from 'rxjs';\nimport {filter, switchMap, takeUntil} from 'rxjs/operators';\n\nimport {TUI_DIALOGS_CLOSE} from './dialog.tokens';\nimport {TuiDialogCloseService} from './dialog-close.service';\n\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\n\n@Component({\n selector: 'tui-dialog',\n templateUrl: './dialog.template.html',\n styleUrls: ['./dialog.style.less'],\n // So we don't force OnPush on dialog content\n // eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection\n changeDetection: ChangeDetectionStrategy.Default,\n providers: [TuiDestroyService, TuiDialogCloseService],\n animations: [tuiSlideInTop, tuiFadeIn],\n})\nexport class TuiDialogComponent<O, I> {\n private readonly animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration,\n },\n } as const;\n\n private readonly fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration,\n },\n } as const;\n\n readonly close$ = new Subject();\n\n constructor(\n @Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,\n @Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,\n @Inject(POLYMORPHEUS_CONTEXT) readonly context: TuiDialog<TuiDialogOptions<I>, O>,\n @Inject(TuiDestroyService) @Self() destroy$: Observable<void>,\n @Inject(TuiDialogCloseService) dialogClose$: Observable<unknown>,\n @Inject(TUI_DIALOGS_CLOSE) close$: Observable<unknown>,\n @Inject(TUI_CLOSE_WORD) readonly closeWord$: Observable<string>,\n ) {\n merge(\n merge(dialogClose$, this.close$).pipe(\n switchMap(() =>\n isObservable(context.closeable)\n ? context.closeable\n : of(context.closeable),\n ),\n filter(Boolean),\n ),\n close$,\n )\n .pipe(takeUntil(destroy$))\n .subscribe(() => {\n this.close();\n });\n }\n\n @HostBinding('attr.data-size')\n get size(): TuiDialogSize {\n return this.context.size;\n }\n\n @HostBinding('class._centered')\n get header(): PolymorpheusContent<TuiDialog<TuiDialogOptions<I>, O>> {\n return this.context.header;\n }\n\n @HostBinding('@tuiSlideInTop')\n @HostBinding('@tuiFadeIn')\n get slideInTop(): TuiAnimationOptions {\n return this.size === 'fullscreen' || this.size === 'page' || this.isMobile\n ? this.fullscreenAnimation\n : this.animation;\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<header\n *ngIf=\"header\"\n class=\"t-header\"\n>\n <ng-container *polymorpheusOutlet=\"header as text; context: context\">\n {{ text }}\n </ng-container>\n</header>\n<div class=\"t-content\">\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n [textContent]=\"context.label\"\n ></h2>\n <section>\n <!-- TODO: Polymorpheus fix type -->\n <ng-container *polymorpheusOutlet=\"$any(context.content) as text; context: context\">\n {{ text }}\n <div class=\"t-buttons\">\n <button\n type=\"button\"\n tuiButton\n size=\"m\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ $any(context.data)?.button || 'OK' }}\n </button>\n </div>\n </ng-container>\n </section>\n</div>\n<div\n *ngIf=\"context.closeable\"\n class=\"t-wrapper\"\n>\n <button\n type=\"button\"\n tuiIconButton\n tuiPreventDefault=\"mousedown\"\n automation-id=\"tui-dialog__close\"\n size=\"s\"\n appearance=\"\"\n icon=\"tuiIconCloseLarge\"\n shape=\"rounded\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"close$.next()\"\n ></button>\n</div>\n","import {inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport type {TuiDialogOptions} from '@taiga-ui/core/interfaces';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TUI_DIALOG_OPTIONS} from './dialog.tokens';\n\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDialogService extends AbstractTuiDialogService<TuiDialogOptions<any>> {\n protected readonly component = DIALOG;\n protected readonly defaultOptions: TuiDialogOptions<any> = {\n ...inject(TUI_DIALOG_OPTIONS),\n data: undefined,\n };\n}\n","import {Directive} from '@angular/core';\nimport {AbstractTuiDialogDirective, AbstractTuiDialogService} from '@taiga-ui/cdk';\nimport {TuiDialogOptions} from '@taiga-ui/core/interfaces';\n\nimport {TuiDialogService} from './dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiDialog]',\n providers: [\n {\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService,\n },\n ],\n inputs: ['options: tuiDialogOptions', 'open: tuiDialog'],\n outputs: ['openChange: tuiDialogChange'],\n})\nexport class TuiDialogDirective<T> extends AbstractTuiDialogDirective<\n TuiDialogOptions<T>\n> {}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {tuiAsDialog, TuiPreventDefaultModule} from '@taiga-ui/cdk';\nimport {TuiButtonModule} from '@taiga-ui/core/components/button';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDialogComponent} from './dialog.component';\nimport {TuiDialogDirective} from './dialog.directive';\nimport {TuiDialogService} from './dialog.service';\n\n@NgModule({\n imports: [PolymorpheusModule, TuiButtonModule, CommonModule, TuiPreventDefaultModule],\n declarations: [TuiDialogComponent, TuiDialogDirective],\n exports: [TuiDialogComponent, TuiDialogDirective],\n providers: [tuiAsDialog(TuiDialogService)],\n})\nexport class TuiDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAMa,MAAA,0BAA0B,GAA4B;AAC/D,IAAA,IAAI,EAAE,CAAG,CAAA,CAAA;AACT,IAAA,QAAQ,EAAE,KAAK;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,KAAK,EAAE,CAAE,CAAA;AACT,I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AA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,aAFb,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,EAAA,OAAA,EAAA,CAHjC,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC,CAAA,EAAA,CAAA,CAAA;4FAK5E,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,CAAC;AACrF,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;AACjD,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAC7C,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -23,12 +23,12 @@ class TuiErrorComponent {
|
|
|
23
23
|
this.error = tuiIsString(error) ? new TuiValidationError(error) : error;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
TuiErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
27
|
-
TuiErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
26
|
+
TuiErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiErrorComponent, deps: [{ token: TUI_ANIMATION_OPTIONS }, { token: TUI_MODE }, { token: TUI_DEFAULT_ERROR_MESSAGE }], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
TuiErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiErrorComponent, selector: "tui-error", inputs: { errorSetter: ["error", "errorSetter"] }, providers: [MODE_PROVIDER], ngImport: i0, template: "<div\n *ngIf=\"error\"\n automation-id=\"tui-error__text\"\n class=\"t-message-text\"\n [@tuiHeightCollapse]=\"animation\"\n [@tuiFadeIn]=\"animation\"\n [class.t-message-text_light]=\"(mode$ | async) === 'onDark'\"\n>\n <ng-container\n *polymorpheusOutlet=\"error.message || (defaultErrorMessage$ | async) as text; context: error.context || {}\"\n >\n {{ text }}\n </ng-container>\n</div>\n", styles: [":host{font:var(--tui-font-text-s);color:var(--tui-text-01);display:block;color:var(--tui-negative);word-wrap:break-word}.t-message-text{margin-top:.25rem;white-space:pre-wrap}.t-message-text_light{color:var(--tui-negative-night)}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], pipes: { "async": i1.AsyncPipe }, animations: [tuiHeightCollapse, tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28
28
|
__decorate([
|
|
29
29
|
tuiDefaultProp()
|
|
30
30
|
], TuiErrorComponent.prototype, "errorSetter", null);
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiErrorComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{
|
|
34
34
|
selector: 'tui-error',
|
|
@@ -54,10 +54,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
54
54
|
|
|
55
55
|
class TuiErrorModule {
|
|
56
56
|
}
|
|
57
|
-
TuiErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
58
|
-
TuiErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
59
|
-
TuiErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
57
|
+
TuiErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
58
|
+
TuiErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiErrorModule, declarations: [TuiErrorComponent], imports: [CommonModule, PolymorpheusModule], exports: [TuiErrorComponent] });
|
|
59
|
+
TuiErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiErrorModule, imports: [[CommonModule, PolymorpheusModule]] });
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiErrorModule, decorators: [{
|
|
61
61
|
type: NgModule,
|
|
62
62
|
args: [{
|
|
63
63
|
imports: [CommonModule, PolymorpheusModule],
|
|
@@ -10,9 +10,9 @@ import { CommonModule } from '@angular/common';
|
|
|
10
10
|
|
|
11
11
|
class TuiExpandContentDirective {
|
|
12
12
|
}
|
|
13
|
-
TuiExpandContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
14
|
-
TuiExpandContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
13
|
+
TuiExpandContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
TuiExpandContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiExpandContentDirective, selector: "[tuiExpandContent]", ngImport: i0 });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandContentDirective, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
18
18
|
selector: '[tuiExpandContent]',
|
|
@@ -96,15 +96,15 @@ class TuiExpandComponent {
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
TuiExpandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
100
|
-
TuiExpandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
99
|
+
TuiExpandComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandComponent, deps: [{ token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
100
|
+
TuiExpandComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiExpandComponent, selector: "tui-expand", inputs: { async: "async", expandedSetter: ["expanded", "expandedSetter"] }, host: { listeners: { "transitionend.self": "onTransitionEnd($event)", "tui-expand-loaded": "onExpandLoaded($event)" }, properties: { "class._expanded": "this.expanded", "attr.aria-expanded": "this.expanded", "class._overflow": "this.overflow", "class._loading": "this.loading", "style.height.px": "this.height" } }, queries: [{ propertyName: "content", first: true, predicate: TuiExpandContentDirective, descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "contentWrapper", first: true, predicate: ["wrapper"], descendants: true }], ngImport: i0, template: "<div\n #wrapper\n class=\"t-wrapper\"\n>\n <ng-container *ngIf=\"contentVisible\">\n <ng-content></ng-content>\n <tui-loader\n *ngIf=\"async; else content\"\n size=\"l\"\n [overlay]=\"true\"\n [showLoader]=\"loading\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </tui-loader>\n </ng-container>\n</div>\n", styles: [":host{display:block;transition-property:opacity,height,visibility;transition-duration:var(--tui-duration, .3s);opacity:0}:host._overflow{overflow:hidden}:host._expanded{opacity:1;transform:translate(0)}:host._loading{opacity:.99}.t-wrapper:before,.t-wrapper:after{content:\"\";display:table}\n"], components: [{ type: i1.TuiLoaderComponent, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "showLoader"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
101
101
|
__decorate([
|
|
102
102
|
tuiDefaultProp()
|
|
103
103
|
], TuiExpandComponent.prototype, "async", void 0);
|
|
104
104
|
__decorate([
|
|
105
105
|
tuiRequiredSetter()
|
|
106
106
|
], TuiExpandComponent.prototype, "expandedSetter", null);
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandComponent, decorators: [{
|
|
108
108
|
type: Component,
|
|
109
109
|
args: [{
|
|
110
110
|
selector: 'tui-expand',
|
|
@@ -151,10 +151,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
151
151
|
|
|
152
152
|
class TuiExpandModule {
|
|
153
153
|
}
|
|
154
|
-
TuiExpandModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
155
|
-
TuiExpandModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
156
|
-
TuiExpandModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
154
|
+
TuiExpandModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
155
|
+
TuiExpandModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandModule, declarations: [TuiExpandComponent, TuiExpandContentDirective], imports: [CommonModule, TuiLoaderModule], exports: [TuiExpandComponent, TuiExpandContentDirective] });
|
|
156
|
+
TuiExpandModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandModule, imports: [[CommonModule, TuiLoaderModule]] });
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiExpandModule, decorators: [{
|
|
158
158
|
type: NgModule,
|
|
159
159
|
args: [{
|
|
160
160
|
imports: [CommonModule, TuiLoaderModule],
|
|
@@ -7,9 +7,9 @@ import { CommonModule } from '@angular/common';
|
|
|
7
7
|
|
|
8
8
|
class TuiGroupStylesComponent {
|
|
9
9
|
}
|
|
10
|
-
TuiGroupStylesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
11
|
-
TuiGroupStylesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
10
|
+
TuiGroupStylesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupStylesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
+
TuiGroupStylesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiGroupStylesComponent, selector: "tui-group-style", ngImport: i0, template: '', isInline: true, styles: [".tui-group{position:relative;z-index:0;display:flex}.tui-group>*{flex:1 1 0;min-width:0}.tui-group>*:nth-child(n){border-radius:0}.tui-group>*:not(:last-child){margin-right:.125rem}.tui-group_collapsed>*{z-index:1}.tui-group_collapsed>*:not(:last-child){margin-right:-1px}.tui-group_collapsed>*._readonly,.tui-group_collapsed>*._disabled,.tui-group_collapsed>*._readonly:hover,.tui-group_collapsed>*._disabled:hover{z-index:0}.tui-group_collapsed>*:hover,.tui-group_collapsed>*._hovered,.tui-group_collapsed>*._pressed{z-index:3}.tui-group_collapsed>*._invalid{z-index:2}.tui-group_collapsed>*._invalid:hover,.tui-group_collapsed>*._invalid._hovered,.tui-group_collapsed>*._invalid._pressed{z-index:4}.tui-group_collapsed>*._hosted_dropdown_focused,.tui-group_collapsed>*._focus-visible,.tui-group_collapsed>*._focused.ng-touched,.tui-group_collapsed>*._focused.ng-untouched{z-index:5}.tui-group_collapsed>*._active,.tui-group_collapsed>*[data-appearance=whiteblock-active]{z-index:6}.tui-group_collapsed>*._focus-visible._focused,.tui-group_collapsed>*._focus-visible._active,.tui-group_collapsed>*._focus-visible[data-appearance=whiteblock-active]{z-index:7}.tui-group_orientation_vertical{display:inline-flex;flex-direction:column}.tui-group_orientation_vertical>*{min-height:auto;flex:0 0 auto}.tui-group_orientation_vertical>*:not(:last-child){margin-right:0;margin-bottom:.125rem}.tui-group_orientation_vertical.tui-group_collapsed>*:not(:last-child){margin-right:0;margin-bottom:-1px}.tui-group_rounded.tui-group_orientation_horizontal>*:first-child{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.tui-group_rounded.tui-group_orientation_horizontal>*:last-child{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.tui-group_rounded.tui-group_orientation_horizontal.tui-group_radius_large>*:first-child{border-top-left-radius:var(--tui-radius-l);border-bottom-left-radius:var(--tui-radius-l)}.tui-group_rounded.tui-group_orientation_horizontal.tui-group_radius_large>*:last-child{border-top-right-radius:var(--tui-radius-l);border-bottom-right-radius:var(--tui-radius-l)}.tui-group_rounded.tui-group_orientation_vertical>*:first-child{border-top-left-radius:var(--tui-radius-m);border-top-right-radius:var(--tui-radius-m)}.tui-group_rounded.tui-group_orientation_vertical>*:last-child{border-bottom-left-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.tui-group_rounded.tui-group_orientation_vertical.tui-group_radius_large>*:first-child{border-top-left-radius:var(--tui-radius-l);border-top-right-radius:var(--tui-radius-l)}.tui-group_rounded.tui-group_orientation_vertical.tui-group_radius_large>*:last-child{border-bottom-left-radius:var(--tui-radius-l);border-bottom-right-radius:var(--tui-radius-l)}@media screen and (max-width: 47.9625em){.tui-group_rounded.tui-group_adaptive.tui-group_orientation_vertical:not(.tui-group_collapsed)>*:first-child:not(:last-child),.tui-group_rounded.tui-group_adaptive.tui-group_orientation_horizontal>*:first-child:not(:last-child),.tui-group_rounded.tui-group_adaptive.tui-group_orientation_vertical:not(.tui-group_collapsed)>*:last-child:not(:first-child),.tui-group_rounded.tui-group_adaptive.tui-group_orientation_horizontal>*:last-child:not(:first-child){border-radius:var(--tui-radius-m)}}@media screen and (max-width: 47.9625em){.tui-group_rounded.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_vertical:not(.tui-group_collapsed)>*:first-child:not(:last-child),.tui-group_rounded.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_horizontal>*:first-child:not(:last-child),.tui-group_rounded.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_vertical:not(.tui-group_collapsed)>*:last-child:not(:first-child),.tui-group_rounded.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_horizontal>*:last-child:not(:first-child){border-radius:var(--tui-radius-l)}}@media screen and (max-width: 47.9625em){.tui-group_adaptive.tui-group_orientation_vertical{width:100%}.tui-group_adaptive.tui-group_orientation_vertical>*:nth-child(n):not(:only-child){border-radius:var(--tui-radius-m)}.tui-group_adaptive.tui-group_orientation_vertical>*:not(:last-child){margin-bottom:1rem}.tui-group_adaptive.tui-group_orientation_vertical.tui-group_collapsed>*:nth-child(n):not(:only-child){border-radius:0}.tui-group_adaptive.tui-group_orientation_vertical.tui-group_collapsed>*:first-child:not(:last-child){border-radius:var(--tui-radius-m) var(--tui-radius-m) 0 0}.tui-group_adaptive.tui-group_orientation_vertical.tui-group_collapsed>*:last-child:not(:first-child){border-radius:0 0 var(--tui-radius-m) var(--tui-radius-m)}.tui-group_adaptive.tui-group_orientation_vertical.tui-group_collapsed>*:not(:last-child){margin-bottom:-1px}}@media screen and (max-width: 47.9625em){.tui-group_adaptive.tui-group_orientation_horizontal{flex-direction:column;width:100%}.tui-group_adaptive.tui-group_orientation_horizontal>*:nth-child(n):not(:only-child){border-radius:var(--tui-radius-m)}.tui-group_adaptive.tui-group_orientation_horizontal>*:not(:last-child){margin-right:0;margin-bottom:1rem}.tui-group_adaptive.tui-group_orientation_horizontal.tui-group_collapsed>*:nth-child(n):not(:only-child){border-radius:0}.tui-group_adaptive.tui-group_orientation_horizontal.tui-group_collapsed>*:first-child:not(:last-child){border-radius:var(--tui-radius-m) var(--tui-radius-m) 0 0}.tui-group_adaptive.tui-group_orientation_horizontal.tui-group_collapsed>*:last-child:not(:first-child){border-radius:0 0 var(--tui-radius-m) var(--tui-radius-m)}.tui-group_adaptive.tui-group_orientation_horizontal.tui-group_collapsed>*:not(:last-child){margin-right:0;margin-bottom:-1px}}@media screen and (max-width: 47.9625em){.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_vertical>*:nth-child(n):not(:only-child){border-radius:var(--tui-radius-l)}.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_vertical.tui-group_collapsed>*:nth-child(n):not(:only-child){border-radius:0}.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_vertical.tui-group_collapsed>*:first-child:not(:last-child){border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_vertical.tui-group_collapsed>*:last-child:not(:first-child){border-radius:0 0 var(--tui-radius-l) var(--tui-radius-l)}}@media screen and (max-width: 47.9625em){.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_horizontal>*:nth-child(n):not(:only-child){border-radius:var(--tui-radius-l)}.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_horizontal.tui-group_collapsed>*:nth-child(n):not(:only-child){border-radius:0}.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_horizontal.tui-group_collapsed>*:first-child:not(:last-child){border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-group_adaptive.tui-group_radius_large.tui-group_orientation_horizontal.tui-group_collapsed>*:last-child:not(:first-child){border-radius:0 0 var(--tui-radius-l) var(--tui-radius-l)}}.tui-group__auto-width-item{min-width:auto;flex:0 0 auto}.tui-group .tui-group__inherit-item{border-radius:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupStylesComponent, decorators: [{
|
|
13
13
|
type: Component,
|
|
14
14
|
args: [{
|
|
15
15
|
selector: 'tui-group-style',
|
|
@@ -39,8 +39,8 @@ class TuiGroupDirective {
|
|
|
39
39
|
return this.size === 'l';
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
TuiGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
43
|
-
TuiGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
42
|
+
TuiGroupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupDirective, deps: [{ token: TuiDirectiveStylesService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
43
|
+
TuiGroupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: TuiGroupDirective, selector: "[tuiGroup]:not(ng-container)", inputs: { orientation: "orientation", adaptive: "adaptive", collapsed: "collapsed", rounded: "rounded", size: "size" }, host: { attributes: { "role": "group" }, properties: { "class.tui-group_adaptive": "this.adaptive", "class.tui-group_collapsed": "this.collapsed", "class.tui-group_rounded": "this.rounded", "class.tui-group_orientation_horizontal": "this.orientationHorizontal", "class.tui-group_orientation_vertical": "this.orientationVertical", "class.tui-group_radius_large": "this.sizeLarge" }, classAttribute: "tui-group" }, ngImport: i0 });
|
|
44
44
|
__decorate([
|
|
45
45
|
tuiDefaultProp()
|
|
46
46
|
], TuiGroupDirective.prototype, "orientation", void 0);
|
|
@@ -56,7 +56,7 @@ __decorate([
|
|
|
56
56
|
__decorate([
|
|
57
57
|
tuiDefaultProp()
|
|
58
58
|
], TuiGroupDirective.prototype, "size", void 0);
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupDirective, decorators: [{
|
|
60
60
|
type: Directive,
|
|
61
61
|
args: [{
|
|
62
62
|
selector: '[tuiGroup]:not(ng-container)',
|
|
@@ -100,10 +100,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
100
100
|
|
|
101
101
|
class TuiGroupModule {
|
|
102
102
|
}
|
|
103
|
-
TuiGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
104
|
-
TuiGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
105
|
-
TuiGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
103
|
+
TuiGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
104
|
+
TuiGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupModule, declarations: [TuiGroupDirective, TuiGroupStylesComponent], imports: [CommonModule], exports: [TuiGroupDirective, TuiGroupStylesComponent] });
|
|
105
|
+
TuiGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupModule, imports: [[CommonModule]] });
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TuiGroupModule, decorators: [{
|
|
107
107
|
type: NgModule,
|
|
108
108
|
args: [{
|
|
109
109
|
imports: [CommonModule],
|