@taiga-ui/core 2.45.0 → 2.48.0
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 +50 -20
- package/bundles/taiga-ui-core-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-core-abstract.umd.min.js +1 -15
- package/bundles/taiga-ui-core-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.js +51 -21
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-alert.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js +50 -20
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.js +50 -20
- package/bundles/taiga-ui-core-components-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-calendar.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +58 -29
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +51 -21
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +74 -27
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.js +50 -20
- package/bundles/taiga-ui-core-components-error.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-error.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-error.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +52 -22
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +50 -20
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +88 -46
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +50 -20
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +51 -21
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.js +52 -22
- package/bundles/taiga-ui-core-components-link.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-link.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-link.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.js +60 -95
- package/bundles/taiga-ui-core-components-loader.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-loader.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-loader.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.js +50 -20
- package/bundles/taiga-ui-core-components-notification.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-notification.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-notification.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +56 -30
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +50 -20
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js +50 -20
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-spin-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +64 -30
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js +50 -20
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-primitive-year-picker.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +51 -21
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +50 -20
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.js +52 -22
- package/bundles/taiga-ui-core-components-scrollbar.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-scrollbar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.js +50 -20
- package/bundles/taiga-ui-core-components-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-svg.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.js +50 -20
- package/bundles/taiga-ui-core-components-theme-night.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-theme-night.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.js +50 -20
- package/bundles/taiga-ui-core-components-tooltip.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js +1 -15
- package/bundles/taiga-ui-core-components-tooltip.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-color.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-color.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-color.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-described-by.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-described-by.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js +51 -21
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-dropdown-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-dropdown.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js +52 -22
- package/bundles/taiga-ui-core-directives-hint-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-hint-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.js +52 -22
- package/bundles/taiga-ui-core-directives-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-hint.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-manual-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-manual-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mode.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js +51 -21
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-pointer-hint.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js +50 -20
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-scroll-into-view.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.js +50 -22
- package/bundles/taiga-ui-core-directives-table-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-table-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js +52 -22
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-textfield-controller.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.js +53 -22
- package/bundles/taiga-ui-core-directives-wrapper.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js +1 -15
- package/bundles/taiga-ui-core-directives-wrapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.js +2 -2
- package/bundles/taiga-ui-core-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-core-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js +50 -20
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js +1 -15
- package/bundles/taiga-ui-core-internal-primitive-year-month-pagination.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +50 -20
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js +1 -15
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js +54 -23
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-format-number.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-format-phone.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-format-phone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-month.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-month.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-month.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js +50 -20
- package/bundles/taiga-ui-core-pipes-pluralize.umd.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js +1 -15
- package/bundles/taiga-ui-core-pipes-pluralize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.js +7 -9
- package/bundles/taiga-ui-core-providers.umd.js.map +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js +1 -1
- package/bundles/taiga-ui-core-providers.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js +51 -21
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js +1 -15
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js +63 -27
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js +1 -15
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +51 -21
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -15
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +50 -20
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -15
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-polyfills.umd.min.js.map +1 -1
- package/components/data-list/taiga-ui-core-components-data-list.metadata.json +1 -1
- package/components/dialog/taiga-ui-core-components-dialog.metadata.json +1 -1
- package/components/dropdown-box/dropdown-box.component.d.ts +1 -0
- package/components/dropdown-box/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
- package/components/hints-host/hint-box/hint-box.component.d.ts +13 -2
- package/components/hints-host/hints-host.component.d.ts +4 -10
- package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
- package/components/link/taiga-ui-core-components-link.metadata.json +1 -1
- package/components/loader/index.d.ts +0 -1
- package/components/loader/loader.component.d.ts +1 -3
- package/components/loader/taiga-ui-core-components-loader.metadata.json +1 -1
- package/components/primitive-textfield/primitive-textfield.component.d.ts +1 -1
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +4 -2
- package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
- package/components/scrollbar/scrollbar.component.d.ts +2 -2
- package/components/scrollbar/taiga-ui-core-components-scrollbar.metadata.json +1 -1
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/table-mode/table-mode.directive.d.ts +0 -1
- package/directives/table-mode/taiga-ui-core-directives-table-mode.metadata.json +1 -1
- package/directives/wrapper/taiga-ui-core-directives-wrapper.metadata.json +1 -1
- package/esm2015/components/alert/alert.component.js +2 -2
- package/esm2015/components/button/button-options.js +1 -1
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +4 -5
- package/esm2015/components/data-list/data-list.component.js +3 -3
- package/esm2015/components/data-list/option/option.component.js +4 -4
- package/esm2015/components/dialog/dialog.component.js +1 -1
- package/esm2015/components/dropdown-box/dropdown-box.component.js +22 -9
- package/esm2015/components/expand/expand-content.directive.js +2 -2
- package/esm2015/components/expand/expand.component.js +2 -2
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +27 -14
- package/esm2015/components/hints-host/hint-box/hint-box.module.js +4 -2
- package/esm2015/components/hints-host/hints-host.component.js +11 -13
- package/esm2015/components/hints-host/hints-host.module.js +1 -2
- package/esm2015/components/label/label.component.js +2 -2
- package/esm2015/components/link/link.component.js +3 -3
- package/esm2015/components/loader/index.js +1 -2
- package/esm2015/components/loader/loader.component.js +7 -15
- package/esm2015/components/loader/loader.module.js +2 -3
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +7 -11
- package/esm2015/components/primitive-textfield/primitive-textfield-options.js +2 -2
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +5 -5
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +11 -6
- package/esm2015/components/root/root.component.js +2 -2
- package/esm2015/components/scrollbar/scrollbar.component.js +3 -3
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm2015/directives/hint/hint-options.js +2 -2
- package/esm2015/directives/hint/hint.directive.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.directive.js +2 -2
- package/esm2015/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm2015/directives/pointer-hint/pointer-hint.directive.js +2 -2
- package/esm2015/directives/table-mode/table-mode.directive.js +1 -3
- package/esm2015/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
- package/esm2015/directives/wrapper/wrapper.directive.js +4 -3
- package/esm2015/enums/interactive-state.js +3 -3
- package/esm2015/interfaces/notification-options.js +1 -1
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +3 -2
- package/esm2015/pipes/calendar-sheet/utils.js +3 -3
- package/esm2015/providers/is-mobile-resolution.provider.js +5 -10
- package/esm2015/services/hint.service.js +2 -2
- package/esm2015/tokens/is-mobile-resolution.js +13 -3
- package/esm2015/tokens/ordered-short-week-days.js +2 -2
- package/esm2015/types/pluralize.js +1 -1
- package/esm2015/utils/dom/are-css-vars-supported.js +2 -2
- package/esm2015/utils/format/pluralize-to-icu.js +2 -2
- package/esm2015/utils/miscellaneous/index.js +2 -2
- package/esm2015/utils/miscellaneous/is-presumed-html-string.js +5 -0
- package/esm2015/utils/polyfills/index.js +2 -2
- package/esm2015/utils/polyfills/{inner-HTML.js → inner-html.js} +1 -1
- package/esm5/components/alert/alert.component.js +2 -2
- package/esm5/components/button/button-options.js +1 -1
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +4 -5
- package/esm5/components/data-list/data-list.component.js +3 -3
- package/esm5/components/data-list/option/option.component.js +4 -4
- package/esm5/components/dialog/dialog.component.js +1 -1
- package/esm5/components/dropdown-box/dropdown-box.component.js +26 -9
- package/esm5/components/expand/expand-content.directive.js +2 -2
- package/esm5/components/expand/expand.component.js +2 -2
- package/esm5/components/hints-host/hint-box/hint-box.component.js +32 -15
- package/esm5/components/hints-host/hint-box/hint-box.module.js +4 -2
- package/esm5/components/hints-host/hints-host.component.js +12 -14
- package/esm5/components/hints-host/hints-host.module.js +1 -2
- package/esm5/components/label/label.component.js +2 -2
- package/esm5/components/link/link.component.js +3 -3
- package/esm5/components/loader/index.js +1 -2
- package/esm5/components/loader/loader.component.js +7 -15
- package/esm5/components/loader/loader.module.js +2 -3
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +7 -11
- package/esm5/components/primitive-textfield/primitive-textfield-options.js +2 -2
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +5 -5
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +11 -6
- package/esm5/components/root/root.component.js +2 -2
- package/esm5/components/scrollbar/scrollbar.component.js +3 -3
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/dropdown-controller/dropdown-controller.provider.js +2 -2
- package/esm5/directives/hint/hint-options.js +2 -2
- package/esm5/directives/hint/hint.directive.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.directive.js +2 -2
- package/esm5/directives/hint-controller/hint-controller.provider.js +2 -2
- package/esm5/directives/pointer-hint/pointer-hint.directive.js +2 -2
- package/esm5/directives/table-mode/table-mode.directive.js +1 -3
- package/esm5/directives/textfield-controller/textfield-custom-content.directive.js +3 -3
- package/esm5/directives/wrapper/wrapper.directive.js +4 -3
- package/esm5/enums/interactive-state.js +3 -3
- package/esm5/interfaces/notification-options.js +1 -1
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +3 -2
- package/esm5/pipes/calendar-sheet/utils.js +3 -3
- package/esm5/providers/is-mobile-resolution.provider.js +6 -12
- package/esm5/services/hint.service.js +2 -2
- package/esm5/tokens/is-mobile-resolution.js +13 -3
- package/esm5/tokens/ordered-short-week-days.js +2 -2
- package/esm5/types/pluralize.js +1 -1
- package/esm5/utils/dom/are-css-vars-supported.js +2 -2
- package/esm5/utils/format/pluralize-to-icu.js +2 -2
- package/esm5/utils/miscellaneous/index.js +2 -2
- package/esm5/utils/miscellaneous/is-presumed-html-string.js +5 -0
- package/esm5/utils/polyfills/index.js +2 -2
- package/esm5/utils/polyfills/{inner-HTML.js → inner-html.js} +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +8 -9
- package/fesm2015/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dialog.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +21 -8
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +2 -2
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +34 -26
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-label.js +1 -1
- package/fesm2015/taiga-ui-core-components-label.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-link.js +2 -2
- package/fesm2015/taiga-ui-core-components-link.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-loader.js +9 -73
- package/fesm2015/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js +6 -10
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +16 -12
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +1 -1
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scrollbar.js +2 -2
- package/fesm2015/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +1 -1
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js +1 -1
- package/fesm2015/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint-controller.js +2 -2
- package/fesm2015/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-hint.js +2 -2
- package/fesm2015/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js +1 -1
- package/fesm2015/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-table-mode.js +0 -2
- package/fesm2015/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js +2 -2
- package/fesm2015/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-wrapper.js +3 -2
- package/fesm2015/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm2015/taiga-ui-core-enums.js +2 -2
- package/fesm2015/taiga-ui-core-enums.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js +4 -3
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-providers.js +7 -9
- package/fesm2015/taiga-ui-core-providers.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js +1 -1
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js +13 -6
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js +1 -1
- package/fesm2015/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +1 -1
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -1
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +8 -9
- package/fesm5/taiga-ui-core-components-data-list.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dialog.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +25 -8
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +2 -2
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +39 -27
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-label.js +1 -1
- package/fesm5/taiga-ui-core-components-label.js.map +1 -1
- package/fesm5/taiga-ui-core-components-link.js +2 -2
- package/fesm5/taiga-ui-core-components-link.js.map +1 -1
- package/fesm5/taiga-ui-core-components-loader.js +10 -77
- package/fesm5/taiga-ui-core-components-loader.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js +6 -10
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +16 -12
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +1 -1
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scrollbar.js +2 -2
- package/fesm5/taiga-ui-core-components-scrollbar.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +1 -1
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js +1 -1
- package/fesm5/taiga-ui-core-directives-dropdown-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint-controller.js +2 -2
- package/fesm5/taiga-ui-core-directives-hint-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-hint.js +2 -2
- package/fesm5/taiga-ui-core-directives-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js +1 -1
- package/fesm5/taiga-ui-core-directives-pointer-hint.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-table-mode.js +0 -2
- package/fesm5/taiga-ui-core-directives-table-mode.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-textfield-controller.js +2 -2
- package/fesm5/taiga-ui-core-directives-textfield-controller.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-wrapper.js +3 -2
- package/fesm5/taiga-ui-core-directives-wrapper.js.map +1 -1
- package/fesm5/taiga-ui-core-enums.js +2 -2
- package/fesm5/taiga-ui-core-enums.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js +4 -3
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-providers.js +8 -11
- package/fesm5/taiga-ui-core-providers.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js +1 -1
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js +13 -6
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js +1 -1
- package/fesm5/taiga-ui-core-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +1 -1
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-polyfills.js.map +1 -1
- package/interfaces/notification-options.d.ts +3 -3
- package/package.json +4 -4
- package/providers/is-mobile-resolution.provider.d.ts +2 -3
- package/providers/taiga-ui-core-providers.metadata.json +1 -1
- package/services/hint.service.d.ts +1 -1
- package/styles/basic/main.less +0 -1
- package/styles/markup/tui-palette.less +1 -1
- package/styles/mixins/mixins.less +3 -9
- package/styles/taiga-ui-global-old.less +0 -1
- package/styles/taiga-ui-global.less +0 -1
- package/styles/theme/variables.less +1 -1
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
- package/utils/dom/are-css-vars-supported.d.ts +1 -1
- package/utils/miscellaneous/index.d.ts +1 -1
- package/utils/miscellaneous/{is-presumed-hTMLString.d.ts → is-presumed-html-string.d.ts} +0 -0
- package/utils/miscellaneous/taiga-ui-core-utils-miscellaneous.metadata.json +1 -1
- package/utils/polyfills/index.d.ts +1 -1
- package/utils/polyfills/{inner-HTML.d.ts → inner-html.d.ts} +0 -0
- package/utils/polyfills/taiga-ui-core-utils-polyfills.metadata.json +1 -1
- package/components/loader/loader.directive.d.ts +0 -12
- package/esm2015/components/loader/loader.directive.js +0 -61
- package/esm2015/utils/miscellaneous/is-presumed-hTMLString.js +0 -5
- package/esm5/components/loader/loader.directive.js +0 -64
- package/esm5/utils/miscellaneous/is-presumed-hTMLString.js +0 -5
- package/styles/markup/tui-autofill.less +0 -19
|
@@ -10,7 +10,7 @@ var TuiHintService = /** @class */ (function (_super) {
|
|
|
10
10
|
function TuiHintService() {
|
|
11
11
|
var _this = _super.call(this, []) || this;
|
|
12
12
|
/**
|
|
13
|
-
* TODO:
|
|
13
|
+
* TODO:
|
|
14
14
|
* We need the following logic for desribedBy
|
|
15
15
|
* move it into another service that can register hints and
|
|
16
16
|
* manage it using TuiHintService inside
|
|
@@ -57,4 +57,4 @@ var TuiHintService = /** @class */ (function (_super) {
|
|
|
57
57
|
return TuiHintService;
|
|
58
58
|
}(BehaviorSubject));
|
|
59
59
|
export { TuiHintService };
|
|
60
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
60
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGludC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2NvcmUvc2VydmljZXMvIiwic291cmNlcyI6WyJoaW50LnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLE1BQU0sQ0FBQzs7QUFPckM7O0dBRUc7QUFJSDtJQUFvQyxrQ0FBMkM7SUFTM0U7UUFBQSxZQUNJLGtCQUFNLEVBQUUsQ0FBQyxTQUNaO1FBVkQ7Ozs7O1dBS0c7UUFDSyxnQkFBVSxHQUFnQyxFQUFFLENBQUM7O0lBSXJELENBQUM7SUFFRCw0QkFBRyxHQUFILFVBQUksU0FBMEI7UUFDMUIsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO0lBQzVDLENBQUM7SUFFRCwrQkFBTSxHQUFOLFVBQU8sU0FBMEI7UUFDN0IsSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsRUFBRTtZQUNoQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLFVBQUEsSUFBSSxJQUFJLE9BQUEsSUFBSSxLQUFLLFNBQVMsRUFBbEIsQ0FBa0IsQ0FBQyxDQUFDLENBQUM7U0FDNUQ7SUFDTCxDQUFDO0lBRUQsaUNBQVEsR0FBUixVQUFTLFNBQTJCO1FBQ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ZWN0aXZlV2l0aEhpbnRJZChpZCk7XG5cbiAgICAgICAgaWYgKGRpcmVjdGl2ZSkge1xuICAgICAgICAgICAgdGhpcy5yZW1vdmUoZGlyZWN0aXZlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgZmluZERpcmVjdGl2ZVdpdGhIaW50SWQoaWQ6IHN0cmluZyk6IFR1aUhpbnREaXJlY3RpdmUgfCB1bmRlZmluZWQge1xuICAgICAgICByZXR1cm4gdGhpcy5kaXJlY3RpdmVzLmZpbmQoZGlyZWN0aXZlID0+IGRpcmVjdGl2ZS50dWlIaW50SWQgPT09IGlkKTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { inject, InjectionToken, NgZone } from '@angular/core';
|
|
2
|
+
import { WINDOW } from '@ng-web-apis/common';
|
|
3
|
+
import { tuiZoneOptimized, typedFromEvent } from '@taiga-ui/cdk';
|
|
4
|
+
import { distinctUntilChanged, map, share, startWith } from 'rxjs/operators';
|
|
5
|
+
import { TUI_MEDIA } from './media';
|
|
6
|
+
export var TUI_IS_MOBILE_RES = new InjectionToken('Mobile resolution stream for private providers', {
|
|
7
|
+
factory: function () {
|
|
8
|
+
var windowRef = inject(WINDOW);
|
|
9
|
+
var mobile = inject(TUI_MEDIA).mobile;
|
|
10
|
+
return typedFromEvent(windowRef, 'resize').pipe(share(), startWith(null), map(function () { return windowRef.innerWidth < mobile; }), distinctUntilChanged(), tuiZoneOptimized(inject(NgZone)));
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtbW9iaWxlLXJlc29sdXRpb24uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS90b2tlbnMvIiwic291cmNlcyI6WyJpcy1tb2JpbGUtc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ICAgfSxcbiAgICB9LFxuKTtcbiJdfQ==
|
|
@@ -2,7 +2,7 @@ import { __read, __spread } from "tslib";
|
|
|
2
2
|
import { inject, InjectionToken } from '@angular/core';
|
|
3
3
|
import { map } from 'rxjs/operators';
|
|
4
4
|
import { TUI_FIRST_DAY_OF_WEEK, TUI_SHORT_WEEK_DAYS } from './index';
|
|
5
|
-
// TODO: Remove export in ivy compilation
|
|
5
|
+
// TODO: 3.0 Remove export in ivy compilation
|
|
6
6
|
export var convertToSundayFirstWeekFormat = function (weekDaysNames) {
|
|
7
7
|
var sundayIndex = weekDaysNames.length - 1;
|
|
8
8
|
return __spread([
|
|
@@ -17,4 +17,4 @@ export var TUI_ORDERED_SHORT_WEEK_DAYS = new InjectionToken('Ordered calendars i
|
|
|
17
17
|
}));
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JkZXJlZC1zaG9ydC13ZWVrLWRheXMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS90b2tlbnMvIiwic291cmNlcyI6WyJvcmRlcmVkLXNob3J0LXdlZWstZGF5cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFDLE1BQU0sRUFBRSxjQUFjLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFckQsT0FBTyxFQUFDLEdBQUcsRUFBQyxNQUFNLGdCQUFnQixDQUFDO0FBRW5DLE9BQU8sRUFBQyxxQkFBcUIsRUFBRSxtQkFBbUIsRUFBQyxNQUFNLFNBQVMsQ0FBQztBQUluRSw2Q0FBNkM7QUFDN0MsTUFBTSxDQUFDLElBQU0sOEJBQThCLEdBQUcsVUFDMUMsYUFBOEI7SUFFOUIsSUFBTSxXQUFXLEdBQUcsYUFBYSxDQUFDLE1BQU0sR0FBRyxDQUFDLEN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EYXlzLnNsaWNlKDAsIGZpcnN0RGF5T2ZXZWVrSW5kZXgpLFxuICAgICAgICAgICAgICAgICAgICBdIGFzIFdFRUtfREFZU19OQU1FUyxcbiAgICAgICAgICAgICksXG4gICAgICAgICk7XG4gICAgfSxcbn0pO1xuIl19
|
package/esm5/types/pluralize.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGx1cmFsaXplLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2NvcmUvdHlwZXMvIiwic291cmNlcyI6WyJwbHVyYWxpemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogTWFzc2l2ZSBvZiB0aHJlZSBwbHVyYWwgZm9ybXMgKG9uZSwgZmV3LCBtYW55KVxuICovXG4vLyBAYmFkIFRPRE86IDMuMCBVc2UgQW5ndWxhciBwbHVyYWxpemUgaW5zdGVhZCB0byBjb3ZlciBmb3IgbG9jYWxlc1xuZXhwb3J0IHR5cGUgVHVpUGx1cmFsaXplID0gW3N0cmluZywgc3RyaW5nLCBzdHJpbmddO1xuIl19
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isEdgeOlderThan } from '@taiga-ui/cdk';
|
|
2
2
|
/**
|
|
3
|
-
* TODO: remove
|
|
3
|
+
* TODO: 3.0 remove this function
|
|
4
4
|
*/
|
|
5
5
|
export function areCssVarsSupported(cssRef, userAgent) {
|
|
6
6
|
return cssRef.supports('(--a: 0)') && !isEdgeOlderThan(17, userAgent);
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJlLWNzcy12YXJzLXN1cHBvcnRlZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jb3JlL3V0aWxzL2RvbS8iLCJzb3VyY2VzIjpbImFyZS1jc3MtdmFycy1zdXBwb3J0ZWQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUU5Qzs7R0FFRztBQUNILE1BQU0sVUFBVSxtQkFBbUIsQ0FBQyxNQUFXLEVBQUUsU0FBaUI7SUFDOUQsT0FBTyxNQUFNLENBQUMsUUFBUSxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsZUFBZSxDQUFDLEVBQUUsRUFBRSxTQUFTLENBQUMsQ0FBQztBQUMxRSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtpc0VkZ2VPbGRlclRoYW59IGZyb20gJ0B0YWlnYS11aS9jZGsnO1xuXG4vKipcbiAqIFRPRE86IDMuMCByZW1vdmUgdGhpcyBmdW5jdGlvblxuICovXG5leHBvcnQgZnVuY3Rpb24gYXJlQ3NzVmFyc1N1cHBvcnRlZChjc3NSZWY6IGFueSwgdXNlckFnZW50OiBzdHJpbmcpOiBib29sZWFuIHtcbiAgICByZXR1cm4gY3NzUmVmLnN1cHBvcnRzKCcoLS1hOiAwKScpICYmICFpc0VkZ2VPbGRlclRoYW4oMTcsIHVzZXJBZ2VudCk7XG59XG4iXX0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// TODO: remove in 3.0
|
|
1
|
+
// TODO: 3.0 remove in 3.0
|
|
2
2
|
/**
|
|
3
3
|
* Temporary util for mapping TuiPluralize array to ICU format
|
|
4
4
|
*/
|
|
@@ -10,4 +10,4 @@ export function tuiPluralizeToICU(pluralize) {
|
|
|
10
10
|
other: pluralize[2],
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJ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
|
2
2
|
export * from './get-border';
|
|
3
3
|
export * from './icons-path-factory';
|
|
4
4
|
export * from './is-editing-key';
|
|
5
|
-
export * from './is-presumed-
|
|
5
|
+
export * from './is-presumed-html-string';
|
|
6
6
|
export * from './size-bigger';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS91dGlscy9taXNjZWxsYW5lb3VzLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLGVBQWUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29sb3ItZmFsbGJhY2snO1xuZXhwb3J0ICogZnJvbSAnLi9nZXQtYm9yZGVyJztcbmV4cG9ydCAqIGZyb20gJy4vaWNvbnMtcGF0aC1mYWN0b3J5JztcbmV4cG9ydCAqIGZyb20gJy4vaXMtZWRpdGluZy1rZXknO1xuZXhwb3J0ICogZnJvbSAnLi9pcy1wcmVzdW1lZC1odG1sLXN0cmluZyc7XG5leHBvcnQgKiBmcm9tICcuL3NpemUtYmlnZ2VyJztcbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function isPresumedHTMLString(candidate) {
|
|
2
|
+
var trimmed = candidate.trim();
|
|
3
|
+
return trimmed.startsWith('<') && trimmed.endsWith('>');
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtcHJlc3VtZWQtaHRtbC1zdHJpbmcuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS91dGlscy9taXNjZWxsYW5lb3VzLyIsInNvdXJjZXMiOlsiaXMtcHJlc3VtZWQtaHRtbC1zdHJpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLG9CQUFvQixDQUFDLFNBQWlCO0lBQ2xELElBQU0sT0FBTyxHQUFHLFNBQVMsQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUVqQyxPQUFPLE9BQU8sQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLElBQUksT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUM1RCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIGlzUHJlc3VtZWRIVE1MU3RyaW5nKGNhbmRpZGF0ZTogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgY29uc3QgdHJpbW1lZCA9IGNhbmRpZGF0ZS50cmltKCk7XG5cbiAgICByZXR1cm4gdHJpbW1lZC5zdGFydHNXaXRoKCc8JykgJiYgdHJpbW1lZC5lbmRzV2l0aCgnPicpO1xufVxuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './inner-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './inner-html';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS91dGlscy9wb2x5ZmlsbHMvIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vaW5uZXItaHRtbCc7XG4iXX0=
|
|
@@ -35,4 +35,4 @@ export function innerHTML(documentRef) {
|
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5uZXItaHRtbC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jb3JlL3V0aWxzL3BvbHlmaWxscy8iLCJzb3VyY2VzIjpbImlubmVyLWh0bWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLHNCQUFzQixFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRXJEOztHQUVHO0FBQ0gsTUFBTSxVQUFVLFNBQVMsQ0FBQyxXQUFxQjtJQUMzQyxJQUFNLEdBQUcsR0FBRyxXQUFXLENBQUMsZUFBZSxDQUFDLDRCQUE0QixFQUFFLEtBQUssQ0FBQyxDQUFDO0lBRTdFLElBQUksR0FBRyxDQUFDLFNBQVMsS0FBSyxTQUFTLEVBQUU7UUFDN0IsT0FBTztLQUNWO0lBRUQsSUFBTSxVQUFVLEdBQUcsSUFBSSxhQUFhLEVBQUUsQ0FBQztJQUN2QyxJQUFNLE1BQU0sR0FBRyxJQUFJLFNBQVMsRUFBRSxDQUFDO0lBRS9CLE1BQU0sQ0FBQyxjQUFjLENBQUMsVUFBVSxDQUFDLFNBQVMsRUFBRSxXQUFXLEVBQUU7UUFDckQsR0FBRyxFQUFFO1lBQ0QsSUFBTSxNQUFNLEdBQWEsRUFBRSxDQUFDO1lBQzVCLElBQUksU0FBUyxHQUFRLElBQUksQ0FBQyxVQUFVLENBQUM7WUFFckMsT0FBTyxTQUFTLEVBQUU7Z0JBQ2QsTUFBTSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsaUJBQWlCLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztnQkFDckQsU0FBU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ZCkge1xuICAgICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgY29uc3Qgc2VyaWFsaXplciA9IG5ldyBYTUxTZXJpYWxpemVyKCk7XG4gICAgY29uc3QgcGFyc2VyID0gbmV3IERPTVBhcnNlcigpO1xuXG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFNWR0VsZW1lbnQucHJvdG90eXBlLCAnaW5uZXJIVE1MJywge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICh0aGlzOiBTVkdFbGVtZW50KTogc3RyaW5nIHtcbiAgICAgICAgICAgIGNvbnN0IHJlc3VsdDogc3RyaW5nW10gPSBbXTtcbiAgICAgICAgICAgIGxldCBjaGlsZE5vZGU6IGFueSA9IHRoaXMuZmlyc3RDaGlsZDtcblxuICAgICAgICAgICAgd2hpbGUgKGNoaWxkTm9kZSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHNlcmlhbGl6ZXIuc2VyaWFsaXplVG9TdHJpbmcoY2hpbGROb2RlKSk7XG4gICAgICAgICAgICAgICAgY2hpbGROb2RlID0gY2hpbGROb2RlLm5leHRTaWJsaW5nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0LmpvaW4oJycpO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uICh0aGlzOiBTVkdFbGVtZW50LCB0ZXh0OiBzdHJpbmcpIHtcbiAgICAgICAgICAgIHdoaWxlICh0aGlzLmZpcnN0Q2hpbGQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnJlbW92ZUNoaWxkKHRoaXMuZmlyc3RDaGlsZCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3ZnRG9jRWxlbWVudCA9IHBhcnNlci5wYXJzZUZyb21TdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgIHRleHQsXG4gICAgICAgICAgICAgICAgICAgICdpbWFnZS9zdmcreG1sJyxcbiAgICAgICAgICAgICAgICApLmRvY3VtZW50RWxlbWVudDtcblxuICAgICAgICAgICAgICAgIGlmICh0aGlzLm93bmVyRG9jdW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcHBlbmRDaGlsZCh0aGlzLm93bmVyRG9jdW1lbnQuaW1wb3J0Tm9kZShzdmdEb2NFbGVtZW50LCB0cnVlKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUdWlYbWxQYXJzaW5nRXhjZXB0aW9uKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgfSk7XG59XG4iXX0=
|
|
@@ -10,7 +10,7 @@ import { CommonModule } from '@angular/common';
|
|
|
10
10
|
import { TuiNotificationModule } from '@taiga-ui/core/components/notification';
|
|
11
11
|
import { TuiIdService as TuiIdService$1 } from '@taiga-ui/cdk/services';
|
|
12
12
|
|
|
13
|
-
// TODO: Refactor according to new context by 3.0 and get rid of $any in template
|
|
13
|
+
// TODO: 3.0 Refactor according to new context by 3.0 and get rid of $any in template
|
|
14
14
|
let TuiAlertComponent = class TuiAlertComponent {
|
|
15
15
|
constructor(elementRef, destroy$, options, animationOptions, item) {
|
|
16
16
|
this.elementRef = elementRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-alert.js","sources":["ng://@taiga-ui/core/components/alert/alert.component.ts","ng://@taiga-ui/core/components/alert/alert.service.ts","ng://@taiga-ui/core/components/alert/alert.module.ts","ng://@taiga-ui/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n OnInit,\n} from '@angular/core';\nimport {\n isNumber,\n TuiContextWithImplicit,\n TuiDestroyService,\n TuiDialog,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: Remove and start using TuiDialog<TuiAlertOptions<I>, O>\nexport interface TuiNotificationContentContext<O = void, I = undefined>\n extends TuiContextWithImplicit<TuiNotification> {\n label: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>;\n data: I;\n closeHook: () => void;\n emitHook: (data: O) => void;\n emitAndCloseHook: (data: O) => void;\n}\n\n// TODO: Refactor according to new context by 3.0 and get rid of $any in template\n@Component({\n selector: 'tui-alert',\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n @HostBinding('@tuiFadeIn')\n @HostBinding('@tuiSlideInRight')\n @HostBinding('@tuiHeightCollapse')\n readonly animation = {value: '', ...this.animationOptions} as const;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n get context(): TuiNotificationContentContext<O, I> {\n return this.calculateContext(this.item);\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n @tuiPure\n private calculateContext({\n $implicit,\n status,\n data,\n label,\n }: TuiDialog<TuiAlertOptions<I>, O>): TuiNotificationContentContext<O, I> {\n return {\n $implicit: status,\n data,\n label,\n closeHook: () => {\n $implicit.complete();\n },\n emitHook: (data: O) => {\n $implicit.next(data);\n },\n emitAndCloseHook: (data: O) => {\n $implicit.next(data);\n $implicit.complete();\n },\n };\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n isNumber(this.autoClose) ? this.autoClose : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.elementRef.nativeElement, 'mouseleave')),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {\n TuiAlertOptions,\n TuiNotificationOptions,\n TuiNotificationOptionsWithData,\n} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiAlertComponent, TuiNotificationContentContext} from './alert.component';\n\n@Injectable({providedIn: 'root'})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n\n/** @deprecated use {@link TuiAlertService} */\n@Injectable({providedIn: 'root'})\nexport class TuiNotificationsService {\n constructor(@Inject(TuiAlertService) private readonly alert: TuiAlertService) {}\n\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n ): Observable<O>;\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n options: TuiNotificationOptions,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptionsWithData<I>,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptions | TuiNotificationOptionsWithData<I> = {},\n ): Observable<O> {\n // @ts-ignore\n return this.alert.open(content, options);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_ALERTS} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent],\n exports: [TuiAlertComponent],\n entryComponents: [TuiAlertComponent],\n providers: [\n {\n provide: TUI_ALERTS,\n useExisting: TuiAlertService,\n multi: true,\n },\n ],\n})\nexport class TuiAlertModule {}\n\n/** @deprecated use {@link TuiAlertModule} */\n@NgModule({imports: [TuiAlertModule]})\nexport class TuiNotificationsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsCA;IAUa,iBAAiB,GAA9B,MAAa,iBAAiB;IAW1B,YACyC,UAAmC,EAC5B,QAA2B,EAEtD,OAAsC,EAEtC,gBAAkC,EACZ,IAAsC;QANxC,eAAU,GAAV,UAAU,CAAyB;QAC5B,aAAQ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B,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IADlC,QAAQ,CAAC,EAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAC,CAAC;GACzB,sBAAsB,CAAG;;AC1BtC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-alert.js","sources":["ng://@taiga-ui/core/components/alert/alert.component.ts","ng://@taiga-ui/core/components/alert/alert.service.ts","ng://@taiga-ui/core/components/alert/alert.module.ts","ng://@taiga-ui/core/components/alert/taiga-ui-core-components-alert.ts"],"sourcesContent":["import {AnimationOptions} from '@angular/animations';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Inject,\n OnInit,\n} from '@angular/core';\nimport {\n isNumber,\n TuiContextWithImplicit,\n TuiDestroyService,\n TuiDialog,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {tuiFadeIn, tuiHeightCollapse, tuiSlideInRight} from '@taiga-ui/core/animations';\nimport {TuiNotification} from '@taiga-ui/core/enums';\nimport {TuiAlertOptions} from '@taiga-ui/core/interfaces';\nimport {\n TUI_ANIMATION_OPTIONS,\n TUI_NOTIFICATION_OPTIONS,\n TuiNotificationDefaultOptions,\n} from '@taiga-ui/core/tokens';\nimport {POLYMORPHEUS_CONTEXT, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {fromEvent, timer} from 'rxjs';\nimport {repeatWhen, takeUntil} from 'rxjs/operators';\n\n// TODO: 3.0 Remove and start using TuiDialog<TuiAlertOptions<I>, O>\nexport interface TuiNotificationContentContext<O = void, I = undefined>\n extends TuiContextWithImplicit<TuiNotification> {\n label: PolymorpheusContent<TuiContextWithImplicit<TuiNotification>>;\n data: I;\n closeHook: () => void;\n emitHook: (data: O) => void;\n emitAndCloseHook: (data: O) => void;\n}\n\n// TODO: 3.0 Refactor according to new context by 3.0 and get rid of $any in template\n@Component({\n selector: 'tui-alert',\n templateUrl: './alert.template.html',\n styleUrls: ['./alert.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiDestroyService],\n animations: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse],\n host: {role: 'alert'},\n})\nexport class TuiAlertComponent<O, I> implements OnInit {\n private readonly autoClose =\n typeof this.item.autoClose === 'function'\n ? this.item.autoClose(this.item.status)\n : this.item.autoClose;\n\n @HostBinding('@tuiFadeIn')\n @HostBinding('@tuiSlideInRight')\n @HostBinding('@tuiHeightCollapse')\n readonly animation = {value: '', ...this.animationOptions} as const;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiDestroyService) private readonly destroy$: TuiDestroyService,\n @Inject(TUI_NOTIFICATION_OPTIONS)\n private readonly options: TuiNotificationDefaultOptions,\n @Inject(TUI_ANIMATION_OPTIONS)\n private readonly animationOptions: AnimationOptions,\n @Inject(POLYMORPHEUS_CONTEXT) readonly item: TuiDialog<TuiAlertOptions<I>, O>,\n ) {}\n\n ngOnInit(): void {\n this.initAutoClose();\n }\n\n get context(): TuiNotificationContentContext<O, I> {\n return this.calculateContext(this.item);\n }\n\n closeNotification(): void {\n this.item.$implicit.complete();\n }\n\n @tuiPure\n private calculateContext({\n $implicit,\n status,\n data,\n label,\n }: TuiDialog<TuiAlertOptions<I>, O>): TuiNotificationContentContext<O, I> {\n return {\n $implicit: status,\n data,\n label,\n closeHook: () => {\n $implicit.complete();\n },\n emitHook: (data: O) => {\n $implicit.next(data);\n },\n emitAndCloseHook: (data: O) => {\n $implicit.next(data);\n $implicit.complete();\n },\n };\n }\n\n private initAutoClose(): void {\n if (!this.autoClose) {\n return;\n }\n\n timer(\n isNumber(this.autoClose) ? this.autoClose : this.options.defaultAutoCloseTime,\n )\n .pipe(\n takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => fromEvent(this.elementRef.nativeElement, 'mouseleave')),\n takeUntil(this.destroy$),\n )\n .subscribe(() => this.closeNotification());\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {AbstractTuiDialogService, TuiIdService} from '@taiga-ui/cdk';\nimport {\n TuiAlertOptions,\n TuiNotificationOptions,\n TuiNotificationOptionsWithData,\n} from '@taiga-ui/core/interfaces';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/tokens';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\n\nimport {TuiAlertComponent, TuiNotificationContentContext} from './alert.component';\n\n@Injectable({providedIn: 'root'})\nexport class TuiAlertService extends AbstractTuiDialogService<TuiAlertOptions<any>> {\n protected readonly component = new PolymorpheusComponent(TuiAlertComponent);\n\n constructor(\n @Inject(TUI_NOTIFICATION_OPTIONS)\n protected readonly defaultOptions: TuiAlertOptions<any>,\n @Inject(TuiIdService) idService: TuiIdService,\n ) {\n super(idService);\n }\n}\n\n/** @deprecated use {@link TuiAlertService} */\n@Injectable({providedIn: 'root'})\nexport class TuiNotificationsService {\n constructor(@Inject(TuiAlertService) private readonly alert: TuiAlertService) {}\n\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n ): Observable<O>;\n show<O = void>(\n content: PolymorpheusContent<TuiNotificationContentContext<O>>,\n options: TuiNotificationOptions,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptionsWithData<I>,\n ): Observable<O>;\n show<O, I>(\n content: PolymorpheusContent<TuiNotificationContentContext<O, I>>,\n options: TuiNotificationOptions | TuiNotificationOptionsWithData<I> = {},\n ): Observable<O> {\n // @ts-ignore\n return this.alert.open(content, options);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TUI_ALERTS} from '@taiga-ui/cdk';\nimport {TuiNotificationModule} from '@taiga-ui/core/components/notification';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiAlertComponent} from './alert.component';\nimport {TuiAlertService} from './alert.service';\n\n@NgModule({\n imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],\n declarations: [TuiAlertComponent],\n exports: [TuiAlertComponent],\n entryComponents: [TuiAlertComponent],\n providers: [\n {\n provide: TUI_ALERTS,\n useExisting: TuiAlertService,\n multi: true,\n },\n ],\n})\nexport class TuiAlertModule {}\n\n/** @deprecated use {@link TuiAlertModule} */\n@NgModule({imports: [TuiAlertModule]})\nexport class TuiNotificationsModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAsCA;IAUa,iBAAiB,GAA9B,MAAa,iBAAiB;IAW1B,YACyC,UAAmC,EAC5B,QAA2B,EAEtD,OAAsC,EAEtC,gBAAkC,EACZ,IAAsC;QANxC,eAAU,GAAV,UAAU,CAAyB;QAC5B,aAAQ,GAAR,QAAQ,CAAmB;QAEtD,YAAO,GAAP,OAAO,CAA+B;QAEtC,qBAAgB,GAAhB,gBAAgB,CAAkB;QACZ,SAAI,GAAJ,IAAI,CAAkC;QAjBhE,cAAS,GACtB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,KAAK,UAAU;cACnC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;cACrC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QAKrB,cAAS,GAAG,gBAAC,KAAK,EAAE,EAAE,IAAK,IAAI,CAAC,gBAAgB,CAAU,CAAC;KAUhE;IAEJ,QAAQ;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAED,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,iBAAiB;QACb,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;KAClC;IAGO,gBAAgB,CAAC,EACrB,SAAS,EACT,MAAM,EACN,IAAI,EACJ,K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AuB;IADnC,UAAU,CAAC,EAAC,UAAU,EAAE,MAAM,EAAC,CAAC;IAEhB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;GAD3B,uBAAuB,CAqBnC;;IC3BY,cAAc,GAA3B,MAAa,cAAc;EAAG;AAAjB,cAAc;IAb1B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;QAClE,YAAY,EAAE,CAAC,iBAAiB,CAAC;QACjC,OAAO,EAAE,CAAC,iBAAiB,CAAC;QAC5B,eAAe,EAAE,CAAC,iBAAiB,CAAC;QACpC,SAAS,EAAE;YACP;gBACI,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,eAAe;gBAC5B,KAAK,EAAE,IAAI;aACd;SACJ;KACJ,CAAC;GACW,cAAc,CAAG;AAE9B;IAEa,sBAAsB,GAAnC,MAAa,sBAAsB;EAAG;AAAzB,sBAAsB;IADlC,QAAQ,CAAC,EAAC,OAAO,EAAE,CAAC,cAAc,CAAC,EAAC,CAAC;GACzB,sBAAsB,CAAG;;AC1BtC;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-button.js","sources":["ng://@taiga-ui/core/components/button/button-options.ts","ng://@taiga-ui/core/components/button/button.component.ts","ng://@taiga-ui/core/components/button/button.module.ts","ng://@taiga-ui/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXS | TuiSizeXL;\n readonly appearance:\n | keyof Record<TuiAppearance, string>\n | TuiAppearance\n | string\n | null; // TODO: need remove `null
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-button.js","sources":["ng://@taiga-ui/core/components/button/button-options.ts","ng://@taiga-ui/core/components/button/button.component.ts","ng://@taiga-ui/core/components/button/button.module.ts","ng://@taiga-ui/core/components/button/taiga-ui-core-components-button.ts"],"sourcesContent":["import {InjectionToken, ValueProvider} from '@angular/core';\nimport {TuiAppearance} from '@taiga-ui/core/enums';\nimport {TuiSizeXL, TuiSizeXS} from '@taiga-ui/core/types';\n\nexport interface TuiButtonOptions {\n readonly size: TuiSizeXS | TuiSizeXL;\n readonly appearance:\n | keyof Record<TuiAppearance, string>\n | TuiAppearance\n | string\n | null; // TODO: 3.0 need remove `null`\n readonly shape: 'square' | 'rounded' | null; // TODO: 3.0 need remove `null`\n}\n\n/**\n * @deprecated: use TuiButtonOptions instead\n * todo: remove in 3.0\n */\nexport type ButtonOptions = TuiButtonOptions;\n\nexport const TUI_BUTTON_DEFAULT_OPTIONS: TuiButtonOptions = {\n size: 'l',\n shape: null,\n appearance: TuiAppearance.Primary,\n};\n\nexport const TUI_BUTTON_OPTIONS = new InjectionToken<TuiButtonOptions>(\n 'Default parameters for button component',\n {\n factory: () => TUI_BUTTON_DEFAULT_OPTIONS,\n },\n);\n\nexport const tuiButtonOptionsProvider: (\n options: Partial<TuiButtonOptions>,\n) => ValueProvider = (options: Partial<TuiButtonOptions>) => ({\n provide: TUI_BUTTON_OPTIONS,\n useValue: {...TUI_BUTTON_DEFAULT_OPTIONS, ...options},\n});\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n} from '@angular/core';\nimport {\n AbstractTuiInteractive,\n isNativeFocused,\n pressedObservable,\n TUI_FOCUSABLE_ITEM_ACCESSOR,\n TUI_TAKE_ONLY_TRUSTED_EVENTS,\n tuiDefaultProp,\n TuiDestroyService,\n TuiFocusableElementAccessor,\n TuiFocusVisibleService,\n TuiHoveredService,\n watch,\n} from '@taiga-ui/cdk';\nimport {TuiSizeS} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TUI_BUTTON_OPTIONS, TuiButtonOptions} from './button-options';\n\n@Component({\n selector: 'button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]',\n templateUrl: './button.template.html',\n styleUrls: ['./button.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TUI_FOCUSABLE_ITEM_ACCESSOR,\n useExisting: forwardRef(() => TuiButtonComponent),\n },\n TuiDestroyService,\n TuiFocusVisibleService,\n ],\n})\nexport class TuiButtonComponent\n extends AbstractTuiInteractive\n implements TuiFocusableElementAccessor, TuiButtonOptions\n{\n @Input()\n @HostBinding('attr.data-appearance')\n @tuiDefaultProp()\n appearance = this.options.appearance || '';\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n @tuiDefaultProp()\n icon: PolymorpheusContent = '';\n\n @Input()\n @tuiDefaultProp()\n iconRight: PolymorpheusContent = '';\n\n @Input()\n @HostBinding('attr.data-shape')\n @tuiDefaultProp()\n shape = this.options.shape;\n\n @Input()\n @HostBinding('class._loading')\n @tuiDefaultProp()\n showLoader = false;\n\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size = this.options.size;\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TuiFocusVisibleService) focusVisible$: TuiFocusVisibleService,\n @Inject(TuiHoveredService) hoveredService: TuiHoveredService,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ChangeDetectorRef) changeDetectorRef: ChangeDetectorRef,\n @Inject(TUI_TAKE_ONLY_TRUSTED_EVENTS)\n private readonly takeOnlyTrustedEvents: boolean,\n @Inject(TUI_BUTTON_OPTIONS) private readonly options: TuiButtonOptions,\n ) {\n super();\n\n hoveredService\n .createHovered$(elementRef.nativeElement)\n .pipe(watch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(hovered => {\n this.updateHovered(hovered);\n });\n pressedObservable(elementRef.nativeElement, {\n onlyTrusted: this.takeOnlyTrustedEvents,\n })\n .pipe(watch(changeDetectorRef), takeUntil(destroy$))\n .subscribe(pressed => {\n this.updatePressed(pressed);\n });\n focusVisible$.subscribe(focusVisible => {\n this.updateFocusVisible(focusVisible);\n });\n }\n\n get nativeFocusableElement(): HTMLElement | null {\n return this.nativeDisabled ? null : this.elementRef.nativeElement;\n }\n\n get focused(): boolean {\n return !this.showLoader && isNativeFocused(this.elementRef.nativeElement);\n }\n\n get loaderSize(): TuiSizeS {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n\n @HostBinding('attr.disabled')\n get nativeDisabled(): '' | null {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n\n @HostListener('focusin', ['true'])\n @HostListener('focusout', ['false'])\n onFocused(focused: boolean): void {\n this.updateFocused(focused);\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiLoaderModule} from '@taiga-ui/core/components/loader';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {TuiWrapperModule} from '@taiga-ui/core/directives/wrapper';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiButtonComponent} from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n PolymorpheusModule,\n TuiWrapperModule,\n TuiSvgModule,\n TuiLoaderModule,\n ],\n declarations: [TuiButtonComponent],\n exports: [TuiButtonComponent],\n})\nexport class TuiButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAoBa,0BAA0B,GAAqB;IACxD,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,IAAI;IACX,UAAU;EACZ;MAEW,kBAAkB,GAAG,IAAI,cAAc,CAChD,yCAAyC,EACzC;IACI,OAAO,EAAE,MAAM,0BAA0B;CAC5C,EACH;MAEW,wBAA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BAAkB,CAAC;QAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;KAChC,CAAC;GACW,eAAe,CAAG;;ACpB/B;;;;;;"}
|
|
@@ -15,7 +15,7 @@ function shouldFocus({ currentTarget, }) {
|
|
|
15
15
|
}
|
|
16
16
|
// TODO: Consider all use cases for aria roles
|
|
17
17
|
let TuiOptionComponent = class TuiOptionComponent {
|
|
18
|
-
// TODO: Fix dataList type when updated to Ivy and compilation drops metadata
|
|
18
|
+
// TODO: 3.0 Fix dataList type when updated to Ivy and compilation drops metadata
|
|
19
19
|
constructor(content, dataList, elementRef, host, dropdown) {
|
|
20
20
|
this.content = content;
|
|
21
21
|
this.dataList = dataList;
|
|
@@ -81,14 +81,14 @@ __decorate([
|
|
|
81
81
|
TuiOptionComponent = __decorate([
|
|
82
82
|
Component({
|
|
83
83
|
selector: `button[tuiOption], a[tuiOption]`,
|
|
84
|
-
template: "<span\n *ngIf=\"content; else base\"\n polymorpheus-outlet\n class=\"content\"\n [content]=\"content\"\n [context]=\"{$implicit: base}\"\n></span>\n<ng-template #base>\n <ng-content></ng-content>\n <tui-svg\n *ngIf=\"dropdown\"\n src=\"tuiIconChevronRight\"\n class=\"arrow\"\n ></tui-svg>\n</ng-template>\n",
|
|
84
|
+
template: "<span\n *ngIf=\"content; else base\"\n polymorpheus-outlet\n class=\"t-content\"\n [content]=\"content\"\n [context]=\"{$implicit: base}\"\n></span>\n<ng-template #base>\n <ng-content></ng-content>\n <tui-svg\n *ngIf=\"dropdown\"\n src=\"tuiIconChevronRight\"\n class=\"t-arrow\"\n ></tui-svg>\n</ng-template>\n",
|
|
85
85
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
86
86
|
host: {
|
|
87
87
|
tabIndex: '-1',
|
|
88
88
|
type: 'button',
|
|
89
89
|
'[attr.disabled]': 'disabled || null',
|
|
90
90
|
},
|
|
91
|
-
styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0
|
|
91
|
+
styles: [":host{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:padding-box;font-size:inherit;line-height:inherit;transition-property:background;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;font:var(--tui-font-text-m);width:100%;align-items:center;justify-content:space-between;text-align:left;box-sizing:border-box;color:var(--tui-text-01);outline:0;text-decoration:none;cursor:pointer}:host:disabled{opacity:var(--tui-disabled-opacity);cursor:default}:host._with-dropdown,:host:focus{background-color:var(--tui-base-02)}:host[data-size=xs]{font:var(--tui-font-text-s);min-height:2rem;padding:.3125rem .75rem}:host[data-size='s']{min-height:2rem;padding:.3125rem .75rem}:host[data-size='m']{min-height:2.75rem;padding:.375rem 1rem}:host[data-size='l']{min-height:3.5rem;padding:.75rem 1rem}.t-content{display:flex;flex:1;max-width:100%}.t-arrow{margin:0 -.5rem 0 .75rem}"]
|
|
92
92
|
}),
|
|
93
93
|
__param(0, Optional()),
|
|
94
94
|
__param(0, Inject(TUI_OPTION_CONTENT)),
|
|
@@ -184,7 +184,7 @@ __decorate([
|
|
|
184
184
|
TuiDataListComponent = TuiDataListComponent_1 = __decorate([
|
|
185
185
|
Component({
|
|
186
186
|
selector: 'tui-data-list',
|
|
187
|
-
template: "<div\n tabindex=\"0\"\n class=\"trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n polymorpheus-outlet\n class=\"empty\"\n [content]=\"emptyContent || (defaultEmptyContent$ | async)\"\n></div>\n<div\n tabindex=\"0\"\n class=\"trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n",
|
|
187
|
+
template: "<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, true)\"\n></div>\n<ng-content></ng-content>\n<div\n *ngIf=\"empty$ | async\"\n polymorpheus-outlet\n class=\"t-empty\"\n [content]=\"emptyContent || (defaultEmptyContent$ | async)\"\n></div>\n<div\n tabindex=\"0\"\n class=\"t-trap\"\n (focusin)=\"onFocus($event, false)\"\n></div>\n",
|
|
188
188
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
189
189
|
encapsulation: ViewEncapsulation.None,
|
|
190
190
|
providers: [
|
|
@@ -193,7 +193,7 @@ TuiDataListComponent = TuiDataListComponent_1 = __decorate([
|
|
|
193
193
|
useExisting: forwardRef(() => TuiDataListComponent_1),
|
|
194
194
|
},
|
|
195
195
|
],
|
|
196
|
-
styles: ["tui-data-list{display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:.5rem 0;color:var(--tui-text-03)}tui-data-list:focus-within .trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list>.empty{margin:.75rem 1rem}tui-opt-group{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;font:var(--tui-font-text-xs);flex-direction:column;line-height:2rem
|
|
196
|
+
styles: ["tui-data-list{display:flex;font:var(--tui-font-text-m);flex-direction:column;padding:.5rem 0;color:var(--tui-text-03)}tui-data-list:focus-within .t-trap{display:none}tui-data-list:focus-within [tuiOption]._with-dropdown:not(:focus){background-color:transparent}tui-data-list>.t-empty{margin:.75rem 1rem}tui-opt-group{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;font:var(--tui-font-text-xs);flex-direction:column;line-height:2rem}tui-opt-group:empty:after,tui-opt-group:empty:before{display:none}tui-opt-group:before{content:attr(data-label);padding:0 1rem;color:var(--tui-text-02)}tui-opt-group:not(:empty)~tui-opt-group:before{padding-top:1rem}tui-opt-group:not(:empty)~tui-opt-group:after{content:'';position:absolute;left:0;right:0;top:.5rem;height:1px;background:var(--tui-base-03)}"]
|
|
197
197
|
}),
|
|
198
198
|
__param(0, Inject(ElementRef)),
|
|
199
199
|
__param(1, Inject(TUI_NOTHING_FOUND_MESSAGE))
|
|
@@ -207,7 +207,7 @@ TuiDataListDirective = __decorate([
|
|
|
207
207
|
})
|
|
208
208
|
], TuiDataListDirective);
|
|
209
209
|
|
|
210
|
-
// TODO: Move into separate module
|
|
210
|
+
// TODO: 3.0 Move into separate module
|
|
211
211
|
let TuiDataListDropdownManagerDirective = class TuiDataListDropdownManagerDirective {
|
|
212
212
|
constructor() {
|
|
213
213
|
this.dropdowns = EMPTY_QUERY;
|
|
@@ -260,10 +260,9 @@ let TuiDataListDropdownManagerDirective = class TuiDataListDropdownManagerDirect
|
|
|
260
260
|
!dropdown.dropdownBoxRef.location.nativeElement.contains(element));
|
|
261
261
|
}
|
|
262
262
|
tryToFocus(index) {
|
|
263
|
+
var _a;
|
|
263
264
|
const dropdown = this.dropdowns.toArray()[index];
|
|
264
|
-
const content = dropdown
|
|
265
|
-
dropdown.dropdownBoxRef &&
|
|
266
|
-
dropdown.dropdownBoxRef.instance.contentElementRef;
|
|
265
|
+
const content = (_a = dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdownBoxRef) === null || _a === void 0 ? void 0 : _a.instance.contentElementRef;
|
|
267
266
|
if (!content) {
|
|
268
267
|
return;
|
|
269
268
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-core-components-data-list.js","sources":["ng://@taiga-ui/core/components/data-list/option/option.component.ts","ng://@taiga-ui/core/components/data-list/data-list.component.ts","ng://@taiga-ui/core/components/data-list/data-list.directive.ts","ng://@taiga-ui/core/components/data-list/data-list-dropdown-manager.directive.ts","ng://@taiga-ui/core/components/data-list/opt-group.directive.ts","ng://@taiga-ui/core/components/data-list/data-list.module.ts","ng://@taiga-ui/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Self,\n TemplateRef,\n} from '@angular/core';\nimport {\n isNativeFocused,\n setNativeFocused,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiEventWith,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core/tokens';\nimport {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\n\nexport function shouldFocus({\n currentTarget,\n}: TuiEventWith<MouseEvent, HTMLElement>): boolean {\n return !isNativeFocused(currentTarget);\n}\n\n// TODO: Consider all use cases for aria roles\n@Component({\n selector: `button[tuiOption], a[tuiOption]`,\n templateUrl: './option.template.html',\n styleUrls: ['./option.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tabIndex: '-1',\n type: 'button',\n '[attr.disabled]': 'disabled || null',\n },\n})\nexport class TuiOptionComponent<T = unknown> implements OnDestroy {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = 'm';\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiOptionRole = 'option';\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n value?: T;\n\n // TODO: Fix dataList type when updated to Ivy and compilation drops metadata\n constructor(\n @Optional()\n @Inject(TUI_OPTION_CONTENT)\n readonly content: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n > | null,\n @Inject(forwardRef(() => TuiDataListComponent))\n private readonly dataList: any,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DATA_LIST_HOST)\n private readonly host: TuiDataListHost<T> | null,\n @Optional()\n @Self()\n @Inject(TuiDropdownDirective)\n readonly dropdown: TuiDropdownDirective | null,\n ) {}\n\n @HostBinding('class._with-dropdown')\n get active(): boolean {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n @shouldCall(shouldFocus)\n @HostListener('mousemove.init', ['$event'])\n @HostListener('mousemove.silent', ['$event'])\n onMouseMove({currentTarget}: TuiEventWith<MouseEvent, HTMLElement>): void {\n setNativeFocused(currentTarget, true, true);\n }\n\n // Preventing focus loss upon focused option removal\n ngOnDestroy(): void {\n this.dataList.handleFocusLossIfNecessary(this.elementRef.nativeElement);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n isNativeFocusedIn,\n isPresent,\n itemsQueryListObservable,\n moveFocus,\n setNativeMouseFocused,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_ACCESSOR, TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TuiDataListRole} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiOptionComponent} from './option/option.component';\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n// @dynamic\n@Component({\n selector: 'tui-data-list',\n templateUrl: './data-list.template.html',\n styleUrls: ['./data-list.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListComponent),\n },\n ],\n})\nexport class TuiDataListComponent<T> implements TuiDataListAccessor<T> {\n @ContentChildren(forwardRef(() => TuiOptionComponent), {descendants: true})\n private readonly options: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiDataListRole = 'listbox';\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = '';\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_NOTHING_FOUND_MESSAGE)\n readonly defaultEmptyContent$: Observable<string>,\n ) {}\n\n @tuiPure\n get empty$(): Observable<boolean> {\n return itemsQueryListObservable(this.options).pipe(map(({length}) => !length));\n }\n\n @HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])\n onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n @HostListener('mousedown.prevent')\n noop(): void {}\n\n @HostListener('keydown.arrowDown.prevent', ['$event.target', '1'])\n @HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])\n onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n moveFocus(elements.indexOf(current), elements, step);\n }\n\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n @HostListener('wheel.silent.passive', ['$event.currentTarget'])\n @HostListener('mouseleave', ['$event.target'])\n handleFocusLossIfNecessary(element: HTMLElement): void {\n if (this.origin && isNativeFocusedIn(element)) {\n setNativeMouseFocused(this.origin, true, true);\n }\n }\n\n getOptions(includeDisabled: boolean = false): readonly T[] {\n return this.options\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n\n onFocus({target}: Event, top: boolean): void {\n tuiAssertIsHTMLElement(target);\n\n const {elements} = this;\n\n moveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));\n }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n","import {\n AfterViewInit,\n ContentChildren,\n Directive,\n ElementRef,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getClosestKeyboardFocusable,\n itemsQueryListObservable,\n preventDefault,\n setNativeFocused,\n tuiPure,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n mapTo,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs/operators';\n\n// TODO: Move into separate module in 3.0\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManagerDirective implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n ngAfterViewInit(): void {\n this.right$.subscribe(index => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap(active => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.open = index === active;\n });\n\n const element = this.elements.toArray()[active];\n const dropdown = this.dropdowns.toArray()[active];\n\n if (!element || !dropdown || !dropdown.dropdownBoxRef) {\n return EMPTY;\n }\n\n const {nativeElement} = dropdown.dropdownBoxRef.location;\n const mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(\n take(1),\n );\n const esc$ = merge(\n typedFromEvent(element.nativeElement, 'keydown'),\n typedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({keyCode}) => keyCode === 27));\n\n return merge(mouseEnter$, esc$).pipe(\n tap(event => {\n if (dropdown.dropdownBoxRef) {\n event.stopPropagation();\n }\n\n setNativeFocused(element.nativeElement);\n // TODO: iframe warning\n dropdown.open = event instanceof MouseEvent;\n }),\n );\n }),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return itemsQueryListObservable(this.elements).pipe(\n map(array => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'keydown').pipe(\n filter(({keyCode}) => keyCode === 39),\n preventDefault(),\n mapTo(index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'click').pipe(mapTo(index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n merge(\n typedFromEvent(element, 'focus'),\n typedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n const dropdown = this.dropdowns.toArray()[index];\n\n return (\n !dropdown ||\n !dropdown.dropdownBoxRef ||\n !dropdown.dropdownBoxRef.location.nativeElement.contains(element)\n );\n }\n\n private tryToFocus(index: number): void {\n const dropdown = this.dropdowns.toArray()[index];\n const content =\n dropdown &&\n dropdown.dropdownBoxRef &&\n dropdown.dropdownBoxRef.instance.contentElementRef;\n\n if (!content) {\n return;\n }\n\n const item = getClosestKeyboardFocusable(\n content.nativeElement,\n false,\n content.nativeElement,\n );\n\n if (item) {\n setNativeFocused(item);\n }\n }\n}\n","import {Directive, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n },\n})\nexport class TuiOptGroupDirective {\n @Input()\n @HostBinding('attr.data-label')\n @tuiDefaultProp()\n label = '';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';\nimport {TuiOptGroupDirective} from './opt-group.directive';\nimport {TuiOptionComponent} from './option/option.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, PolymorpheusModule],\n declarations: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n exports: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n})\nexport class TuiDataListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;SA8BgB,WAAW,CAAC,EACxB,aAAa,GACuB;IACpC,OAAO,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;AAC3C,CAAC;AAED;IAYa,kBAAkB,GAA/B,MAAa,kBAAkB;;IAmB3B,YAGa,OAED,EAES,QAAa,EACO,UAAmC,EAGvD,IAA+B,EAIvC,QAAqC;QAZrC,YAAO,GAAP,OAAO,CAER;QAES,aAAQ,GAAR,QAAQ,CAAK;QACO,eAAU,GAAV,UAAU,CAAyB;QAGvD,SAAI,GAAJ,IAAI,CAA2B;QAIvC,aAAQ,GAAR,QAAQ,CAA6B;QA9BlD,SAAI,GAAyB,GAAG,CAAC;QAKjC,SAAI,GAAkB,QAAQ,CAAC;QAI/B,aAAQ,GAA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AAC,IAAI,CAAC,CAAC;SAC1B;KACJ;EACJ;AA5IG;IADC,eAAe,CAAC,oBAAoB,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;sEACe;AAG1E;IADC,eAAe,CAAC,oBAAoB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC,CAAC;qEACD;AA+C5E;IADC,OAAO;oEAMP;AAGD;IADC,OAAO;iEAeP;AAGD;IADC,OAAO;qEAWP;AAGD;IADC,OAAO;oEAoBP;AA7GQ,mCAAmC;IAH/C,SAAS,CAAC;QACP,QAAQ,EAAE,2CAA2C;KACxD,CAAC;GACW,mCAAmC,CA8I/C;;ICtKY,oBAAoB,GAAjC,MAAa,oBAAoB;IAAjC;QAII,UAAK,GAAG,EAAE,CAAC;KACd;EAAA;AADG;IAHC,KAAK,EAAE;IACP,WAAW,CAAC,iBAAiB,CAAC;IAC9B,cAAc,EAAE;mDACN;AAJF,oBAAoB;IANhC,SAAS,CAAC;QACP,QAAQ,EAAE,eAAe;QACzB,IAAI,EAAE;YACF,IAAI,EAAE,OAAO;SAChB;KACJ,CAAC;GACW,oBAAoB,CAKhC;;ICcY,iBAAiB,GAA9B,MAAa,iBAAiB;EAAG;AAApB,iBAAiB;IAjB7B,QAAQ,CAAC;QACN,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACzD,YAAY,EAAE;YACV,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;KACJ,CAAC;GACW,iBAAiB,CAAG;;AC5BjC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-core-components-data-list.js","sources":["ng://@taiga-ui/core/components/data-list/option/option.component.ts","ng://@taiga-ui/core/components/data-list/data-list.component.ts","ng://@taiga-ui/core/components/data-list/data-list.directive.ts","ng://@taiga-ui/core/components/data-list/data-list-dropdown-manager.directive.ts","ng://@taiga-ui/core/components/data-list/opt-group.directive.ts","ng://@taiga-ui/core/components/data-list/data-list.module.ts","ng://@taiga-ui/core/components/data-list/taiga-ui-core-components-data-list.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n OnDestroy,\n Optional,\n Self,\n TemplateRef,\n} from '@angular/core';\nimport {\n isNativeFocused,\n setNativeFocused,\n TuiContextWithImplicit,\n tuiDefaultProp,\n TuiEventWith,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {TuiDataListHost} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_HOST, TUI_OPTION_CONTENT} from '@taiga-ui/core/tokens';\nimport {TuiOptionRole, TuiSizeL, TuiSizeXS} from '@taiga-ui/core/types';\nimport {shouldCall} from '@tinkoff/ng-event-plugins';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from '../data-list.component';\n\nexport function shouldFocus({\n currentTarget,\n}: TuiEventWith<MouseEvent, HTMLElement>): boolean {\n return !isNativeFocused(currentTarget);\n}\n\n// TODO: Consider all use cases for aria roles\n@Component({\n selector: `button[tuiOption], a[tuiOption]`,\n templateUrl: './option.template.html',\n styleUrls: ['./option.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n tabIndex: '-1',\n type: 'button',\n '[attr.disabled]': 'disabled || null',\n },\n})\nexport class TuiOptionComponent<T = unknown> implements OnDestroy {\n @Input()\n @HostBinding('attr.data-size')\n @tuiDefaultProp()\n size: TuiSizeXS | TuiSizeL = 'm';\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiOptionRole = 'option';\n\n @Input()\n @tuiDefaultProp()\n disabled = false;\n\n @Input()\n value?: T;\n\n // TODO: 3.0 Fix dataList type when updated to Ivy and compilation drops metadata\n constructor(\n @Optional()\n @Inject(TUI_OPTION_CONTENT)\n readonly content: PolymorpheusContent<\n TuiContextWithImplicit<TemplateRef<Record<string, unknown>>>\n > | null,\n @Inject(forwardRef(() => TuiDataListComponent))\n private readonly dataList: any,\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Optional()\n @Inject(TUI_DATA_LIST_HOST)\n private readonly host: TuiDataListHost<T> | null,\n @Optional()\n @Self()\n @Inject(TuiDropdownDirective)\n readonly dropdown: TuiDropdownDirective | null,\n ) {}\n\n @HostBinding('class._with-dropdown')\n get active(): boolean {\n return !!this.dropdown && !!this.dropdown.dropdownBoxRef;\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.host && this.value !== undefined) {\n this.host.handleOption(this.value);\n }\n }\n\n // @bad TODO: Consider aria-activedescendant for proper accessibility implementation\n @shouldCall(shouldFocus)\n @HostListener('mousemove.init', ['$event'])\n @HostListener('mousemove.silent', ['$event'])\n onMouseMove({currentTarget}: TuiEventWith<MouseEvent, HTMLElement>): void {\n setNativeFocused(currentTarget, true, true);\n }\n\n // Preventing focus loss upon focused option removal\n ngOnDestroy(): void {\n this.dataList.handleFocusLossIfNecessary(this.elementRef.nativeElement);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n forwardRef,\n HostBinding,\n HostListener,\n Inject,\n Input,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n isNativeFocusedIn,\n isPresent,\n itemsQueryListObservable,\n moveFocus,\n setNativeMouseFocused,\n tuiAssertIsHTMLElement,\n tuiDefaultProp,\n tuiPure,\n} from '@taiga-ui/cdk';\nimport {TuiDataListAccessor} from '@taiga-ui/core/interfaces';\nimport {TUI_DATA_LIST_ACCESSOR, TUI_NOTHING_FOUND_MESSAGE} from '@taiga-ui/core/tokens';\nimport {TuiDataListRole} from '@taiga-ui/core/types';\nimport {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {TuiOptionComponent} from './option/option.component';\n\n// TODO: Consider aria-activedescendant for proper accessibility implementation\n// @dynamic\n@Component({\n selector: 'tui-data-list',\n templateUrl: './data-list.template.html',\n styleUrls: ['./data-list.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting: forwardRef(() => TuiDataListComponent),\n },\n ],\n})\nexport class TuiDataListComponent<T> implements TuiDataListAccessor<T> {\n @ContentChildren(forwardRef(() => TuiOptionComponent), {descendants: true})\n private readonly options: QueryList<TuiOptionComponent<T>> = EMPTY_QUERY;\n\n private origin?: HTMLElement;\n\n @Input()\n @HostBinding('attr.role')\n @tuiDefaultProp()\n role: TuiDataListRole = 'listbox';\n\n @Input()\n @tuiDefaultProp()\n emptyContent: PolymorpheusContent = '';\n\n constructor(\n @Inject(ElementRef) private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(TUI_NOTHING_FOUND_MESSAGE)\n readonly defaultEmptyContent$: Observable<string>,\n ) {}\n\n @tuiPure\n get empty$(): Observable<boolean> {\n return itemsQueryListObservable(this.options).pipe(map(({length}) => !length));\n }\n\n @HostListener('focusin', ['$event.relatedTarget', '$event.currentTarget'])\n onFocusIn(relatedTarget: HTMLElement, currentTarget: HTMLElement): void {\n if (!currentTarget.contains(relatedTarget) && !this.origin) {\n this.origin = relatedTarget;\n }\n }\n\n @HostListener('mousedown.prevent')\n noop(): void {}\n\n @HostListener('keydown.arrowDown.prevent', ['$event.target', '1'])\n @HostListener('keydown.arrowUp.prevent', ['$event.target', '-1'])\n onKeyDownArrow(current: HTMLElement, step: number): void {\n const {elements} = this;\n\n moveFocus(elements.indexOf(current), elements, step);\n }\n\n // TODO: Consider aria-activedescendant for proper accessibility implementation\n @HostListener('wheel.silent.passive', ['$event.currentTarget'])\n @HostListener('mouseleave', ['$event.target'])\n handleFocusLossIfNecessary(element: HTMLElement): void {\n if (this.origin && isNativeFocusedIn(element)) {\n setNativeMouseFocused(this.origin, true, true);\n }\n }\n\n getOptions(includeDisabled: boolean = false): readonly T[] {\n return this.options\n .toArray()\n .filter(({disabled}) => includeDisabled || !disabled)\n .map(({value}) => value)\n .filter(isPresent);\n }\n\n onFocus({target}: Event, top: boolean): void {\n tuiAssertIsHTMLElement(target);\n\n const {elements} = this;\n\n moveFocus(top ? -1 : elements.length, elements, top ? 1 : -1);\n this.handleFocusLossIfNecessary(target);\n }\n\n private get elements(): readonly HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll('[tuiOption]'));\n }\n}\n","import {Directive} from '@angular/core';\n\n@Directive({\n selector: 'ng-template[tuiDataList]',\n})\nexport class TuiDataListDirective {}\n","import {\n AfterViewInit,\n ContentChildren,\n Directive,\n ElementRef,\n QueryList,\n} from '@angular/core';\nimport {\n EMPTY_QUERY,\n getClosestKeyboardFocusable,\n itemsQueryListObservable,\n preventDefault,\n setNativeFocused,\n tuiPure,\n typedFromEvent,\n} from '@taiga-ui/cdk';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {EMPTY, merge, Observable} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n mapTo,\n shareReplay,\n switchMap,\n take,\n tap,\n} from 'rxjs/operators';\n\n// TODO: 3.0 Move into separate module\n@Directive({\n selector: 'tui-data-list[tuiDataListDropdownManager]',\n})\nexport class TuiDataListDropdownManagerDirective implements AfterViewInit {\n @ContentChildren(TuiDropdownDirective, {descendants: true})\n private readonly dropdowns: QueryList<TuiDropdownDirective> = EMPTY_QUERY;\n\n @ContentChildren(TuiDropdownDirective, {read: ElementRef, descendants: true})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n ngAfterViewInit(): void {\n this.right$.subscribe(index => {\n this.tryToFocus(index);\n });\n\n merge(this.immediate$, this.debounce$)\n .pipe(\n switchMap(active => {\n this.dropdowns.forEach((dropdown, index) => {\n dropdown.open = index === active;\n });\n\n const element = this.elements.toArray()[active];\n const dropdown = this.dropdowns.toArray()[active];\n\n if (!element || !dropdown || !dropdown.dropdownBoxRef) {\n return EMPTY;\n }\n\n const {nativeElement} = dropdown.dropdownBoxRef.location;\n const mouseEnter$ = typedFromEvent(nativeElement, 'mouseenter').pipe(\n take(1),\n );\n const esc$ = merge(\n typedFromEvent(element.nativeElement, 'keydown'),\n typedFromEvent(nativeElement, 'keydown'),\n ).pipe(filter(({keyCode}) => keyCode === 27));\n\n return merge(mouseEnter$, esc$).pipe(\n tap(event => {\n if (dropdown.dropdownBoxRef) {\n event.stopPropagation();\n }\n\n setNativeFocused(element.nativeElement);\n // TODO: iframe warning\n dropdown.open = event instanceof MouseEvent;\n }),\n );\n }),\n )\n .subscribe();\n }\n\n @tuiPure\n private get elements$(): Observable<readonly HTMLElement[]> {\n return itemsQueryListObservable(this.elements).pipe(\n map(array => array.map(({nativeElement}) => nativeElement)),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n @tuiPure\n private get right$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'keydown').pipe(\n filter(({keyCode}) => keyCode === 39),\n preventDefault(),\n mapTo(index),\n ),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get immediate$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n typedFromEvent(element, 'click').pipe(mapTo(index)),\n ),\n ),\n ),\n );\n }\n\n @tuiPure\n private get debounce$(): Observable<number> {\n return this.elements$.pipe(\n switchMap(elements =>\n merge(\n ...elements.map((element, index) =>\n merge(\n typedFromEvent(element, 'focus'),\n typedFromEvent(element, 'blur'),\n ).pipe(\n filter(({relatedTarget}) =>\n this.notInDropdown(relatedTarget, index),\n ),\n map(({type}) => (type === 'focus' ? index : NaN)),\n ),\n ),\n ),\n ),\n debounceTime(300),\n );\n }\n\n private notInDropdown(element: EventTarget | null, index: number): boolean {\n const dropdown = this.dropdowns.toArray()[index];\n\n return (\n !dropdown ||\n !dropdown.dropdownBoxRef ||\n !dropdown.dropdownBoxRef.location.nativeElement.contains(element)\n );\n }\n\n private tryToFocus(index: number): void {\n const dropdown = this.dropdowns.toArray()[index];\n const content = dropdown?.dropdownBoxRef?.instance.contentElementRef;\n\n if (!content) {\n return;\n }\n\n const item = getClosestKeyboardFocusable(\n content.nativeElement,\n false,\n content.nativeElement,\n );\n\n if (item) {\n setNativeFocused(item);\n }\n }\n}\n","import {Directive, HostBinding, Input} from '@angular/core';\nimport {tuiDefaultProp} from '@taiga-ui/cdk';\n\n@Directive({\n selector: 'tui-opt-group',\n host: {\n role: 'group',\n },\n})\nexport class TuiOptGroupDirective {\n @Input()\n @HostBinding('attr.data-label')\n @tuiDefaultProp()\n label = '';\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {TuiSvgModule} from '@taiga-ui/core/components/svg';\nimport {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';\n\nimport {TuiDataListComponent} from './data-list.component';\nimport {TuiDataListDirective} from './data-list.directive';\nimport {TuiDataListDropdownManagerDirective} from './data-list-dropdown-manager.directive';\nimport {TuiOptGroupDirective} from './opt-group.directive';\nimport {TuiOptionComponent} from './option/option.component';\n\n@NgModule({\n imports: [CommonModule, TuiSvgModule, PolymorpheusModule],\n declarations: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n exports: [\n TuiDataListComponent,\n TuiOptionComponent,\n TuiOptGroupDirective,\n TuiDataListDirective,\n TuiDataListDropdownManagerDirective,\n ],\n})\nexport class TuiDataListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;SA8BgB,WAAW,CAAC,EACxB,a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AAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,CAAC;QACzD,YAAY,EAAE;YACV,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;QACD,OAAO,EAAE;YACL,oBAAoB;YACpB,kBAAkB;YAClB,oBAAoB;YACpB,oBAAoB;YACpB,mCAAmC;SACtC;KACJ,CAAC;GACW,iBAAiB,CAAG;;AC5BjC;;;;;;"}
|
|
@@ -119,7 +119,7 @@ TuiDialogComponent = __decorate([
|
|
|
119
119
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
120
|
providers: TUI_DIALOG_PROVIDERS,
|
|
121
121
|
animations: [tuiSlideInTop, tuiFadeIn],
|
|
122
|
-
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:
|
|
122
|
+
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='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:100vw;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-base-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:100vw;width:100vw;max-width:100vw;border-radius:0;border:none;margin:auto 0 0}:host :host-context(tui-root._mobile)[data-size] .t-content{padding:2rem 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,300ms);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{-webkit-animation:tuiFadeIn var(--tui-duration);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:0 0;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}"]
|
|
123
123
|
}),
|
|
124
124
|
__param(0, Inject(TUI_ANIMATIONS_DURATION)),
|
|
125
125
|
__param(1, Inject(TUI_IS_MOBILE)),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { Inject, NgZone, ElementRef, HostBinding, ViewChild, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
3
|
import { WINDOW, ANIMATION_FRAME } from '@ng-web-apis/common';
|
|
4
|
-
import { POLLING_TIME, tuiZonefree,
|
|
4
|
+
import { POLLING_TIME, tuiZonefree, inRange, px, tuiAssertIsHTMLElement, getClosestFocusable, TuiDestroyService, TuiDropdownHostComponent, AbstractTuiPortalHostComponent, tuiPure, TuiActiveZoneModule, TuiOverscrollModule } from '@taiga-ui/cdk';
|
|
5
5
|
import { tuiDropdownAnimation } from '@taiga-ui/core/animations';
|
|
6
6
|
import { DEFAULT_MARGIN, DEFAULT_MAX_WIDTH } from '@taiga-ui/core/constants';
|
|
7
7
|
import { TUI_DROPDOWN_DIRECTIVE, TUI_ANIMATION_OPTIONS } from '@taiga-ui/core/tokens';
|
|
@@ -54,7 +54,11 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
|
|
|
54
54
|
}
|
|
55
55
|
get inModal() {
|
|
56
56
|
// @awful TODO: get rid of component tag name dependency
|
|
57
|
-
return !!
|
|
57
|
+
return !!this.directive.host.closest('tui-dialog-host');
|
|
58
|
+
}
|
|
59
|
+
get inOption() {
|
|
60
|
+
// @awful TODO: get rid of component tag name dependency
|
|
61
|
+
return !!this.directive.host.closest('[tuiOption]');
|
|
58
62
|
}
|
|
59
63
|
calculatePositionAndSize() {
|
|
60
64
|
const { clientRect } = this.directive;
|
|
@@ -151,17 +155,26 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
|
|
|
151
155
|
const topAvailableHeight = directiveRect.top - offset;
|
|
152
156
|
const bottomAvailableHeight = windowHeight - directiveRect.bottom - offset;
|
|
153
157
|
const finalDirection = this.getFinalDirection(directiveRect);
|
|
158
|
+
const optionOffset = this.inOption ? DEFAULT_MARGIN * 2 : 0;
|
|
154
159
|
this.prevDirectionIsTop = finalDirection === 'top';
|
|
155
160
|
if (finalDirection === 'top') {
|
|
156
161
|
this.dropdownAnimation = this.animationBottom;
|
|
157
162
|
style.maxHeight = px(Math.min(boxHeightLimit, topAvailableHeight));
|
|
158
163
|
style.top = 'auto';
|
|
159
|
-
style.bottom = px(hostRect.bottom -
|
|
164
|
+
style.bottom = px(hostRect.bottom -
|
|
165
|
+
directiveRect.top -
|
|
166
|
+
DEFAULT_MARGIN +
|
|
167
|
+
offset -
|
|
168
|
+
optionOffset);
|
|
160
169
|
}
|
|
161
170
|
else {
|
|
162
171
|
this.dropdownAnimation = this.animationTop;
|
|
163
172
|
style.maxHeight = px(Math.min(boxHeightLimit, bottomAvailableHeight));
|
|
164
|
-
style.top = px(directiveRect.bottom -
|
|
173
|
+
style.top = px(directiveRect.bottom -
|
|
174
|
+
hostRect.top -
|
|
175
|
+
DEFAULT_MARGIN +
|
|
176
|
+
offset -
|
|
177
|
+
optionOffset);
|
|
165
178
|
style.bottom = 'auto';
|
|
166
179
|
}
|
|
167
180
|
}
|
|
@@ -239,10 +252,7 @@ let TuiDropdownBoxComponent = class TuiDropdownBoxComponent {
|
|
|
239
252
|
while (focusable !== null && host.contains(focusable)) {
|
|
240
253
|
focusable = getClosestFocusable(focusable, previous, root);
|
|
241
254
|
}
|
|
242
|
-
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
setNativeFocused(focusable);
|
|
255
|
+
focusable === null || focusable === void 0 ? void 0 : focusable.focus();
|
|
246
256
|
}
|
|
247
257
|
};
|
|
248
258
|
TuiDropdownBoxComponent.ctorParameters = () => [
|
|
@@ -267,6 +277,9 @@ __decorate([
|
|
|
267
277
|
__decorate([
|
|
268
278
|
tuiPure
|
|
269
279
|
], TuiDropdownBoxComponent.prototype, "inModal", null);
|
|
280
|
+
__decorate([
|
|
281
|
+
tuiPure
|
|
282
|
+
], TuiDropdownBoxComponent.prototype, "inOption", null);
|
|
270
283
|
TuiDropdownBoxComponent = __decorate([
|
|
271
284
|
Component({
|
|
272
285
|
selector: 'tui-dropdown-box',
|