@taiga-ui/core 2.38.0 → 2.41.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-modules-notifications.umd.js → taiga-ui-core-components-alert.umd.js} +94 -136
- package/bundles/taiga-ui-core-components-alert.umd.js.map +1 -0
- package/bundles/taiga-ui-core-components-alert.umd.min.js +16 -0
- package/bundles/taiga-ui-core-components-alert.umd.min.js.map +1 -0
- package/bundles/taiga-ui-core-components-button.umd.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-button.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.js +2 -2
- package/bundles/taiga-ui-core-components-data-list.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-data-list.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-data-list.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-dialog.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.js +1 -1
- 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 -1
- package/bundles/taiga-ui-core-components-dropdown-box.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-expand.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.js +1 -0
- package/bundles/taiga-ui-core-components-group.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-group.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.js +18 -3
- package/bundles/taiga-ui-core-components-hints-host.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-hints-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.js +1 -1
- 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 -1
- package/bundles/taiga-ui-core-components-hosted-dropdown.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js +1 -1
- package/bundles/taiga-ui-core-components-label.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.js +1 -1
- 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 -1
- package/bundles/taiga-ui-core-components-primitive-calendar.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.js +1 -1
- 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 -1
- package/bundles/taiga-ui-core-components-primitive-checkbox.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.js +5 -5
- 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 -1
- package/bundles/taiga-ui-core-components-primitive-textfield.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.js +14 -18
- package/bundles/taiga-ui-core-components-root.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components-root.umd.min.js +2 -2
- package/bundles/taiga-ui-core-components-root.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.js +1 -1
- 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 -1
- package/bundles/taiga-ui-core-components-scroll-controls.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-components.umd.js +12 -4
- package/bundles/taiga-ui-core-components.umd.js.map +1 -1
- package/bundles/taiga-ui-core-components.umd.min.js +1 -1
- package/bundles/taiga-ui-core-constants.umd.js +3 -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-mask-accessor.umd.js.map +1 -1
- package/bundles/taiga-ui-core-directives-mask-accessor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-internal-svg-defs-host.umd.js +1 -1
- 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 -1
- 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.map +1 -1
- package/bundles/taiga-ui-core-pipes-calendar-sheet.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.js +4 -2
- 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 -1
- package/bundles/taiga-ui-core-pipes-format-number.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.js.map +1 -1
- package/bundles/taiga-ui-core-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-core-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.js +14 -8
- package/bundles/taiga-ui-core-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-format.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.js +3 -2
- package/bundles/taiga-ui-core-utils-mask.umd.js.map +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js +1 -1
- package/bundles/taiga-ui-core-utils-mask.umd.min.js.map +1 -1
- package/bundles/taiga-ui-core.umd.js +4 -12
- package/bundles/taiga-ui-core.umd.js.map +1 -1
- package/bundles/taiga-ui-core.umd.min.js +1 -1
- package/components/alert/alert.component.d.ts +35 -0
- package/components/alert/alert.module.d.ts +4 -0
- package/components/alert/alert.service.d.ts +18 -0
- package/components/alert/index.d.ts +3 -0
- package/components/alert/package.json +13 -0
- package/{modules/notifications/taiga-ui-core-modules-notifications.d.ts → components/alert/taiga-ui-core-components-alert.d.ts} +0 -0
- package/components/alert/taiga-ui-core-components-alert.metadata.json +1 -0
- package/components/button/taiga-ui-core-components-button.metadata.json +1 -1
- package/components/data-list/data-list.component.d.ts +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/taiga-ui-core-components-dropdown-box.metadata.json +1 -1
- package/components/expand/taiga-ui-core-components-expand.metadata.json +1 -1
- package/components/group/taiga-ui-core-components-group.metadata.json +1 -1
- package/components/hints-host/taiga-ui-core-components-hints-host.metadata.json +1 -1
- package/components/hosted-dropdown/taiga-ui-core-components-hosted-dropdown.metadata.json +1 -1
- package/components/index.d.ts +1 -0
- package/components/label/taiga-ui-core-components-label.metadata.json +1 -1
- package/components/primitive-calendar/taiga-ui-core-components-primitive-calendar.metadata.json +1 -1
- package/components/primitive-checkbox/taiga-ui-core-components-primitive-checkbox.metadata.json +1 -1
- package/components/primitive-textfield/taiga-ui-core-components-primitive-textfield.metadata.json +1 -1
- package/components/root/root.component.d.ts +3 -4
- package/components/root/taiga-ui-core-components-root.metadata.json +1 -1
- package/components/scroll-controls/taiga-ui-core-components-scroll-controls.metadata.json +1 -1
- package/components/taiga-ui-core-components.metadata.json +1 -1
- package/constants/decimal-symbols.d.ts +1 -1
- package/constants/regexp.d.ts +1 -0
- package/constants/taiga-ui-core-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/directives/mask-accessor/mask-accessor.directive.d.ts +1 -1
- package/esm2015/components/alert/alert.component.js +89 -0
- package/esm2015/components/alert/alert.module.js +29 -0
- package/esm2015/components/alert/alert.service.js +49 -0
- package/esm2015/components/alert/index.js +4 -0
- package/esm2015/components/alert/taiga-ui-core-components-alert.js +5 -0
- package/esm2015/components/button/button.component.js +2 -2
- package/esm2015/components/data-list/data-list-dropdown-manager.directive.js +1 -1
- package/esm2015/components/data-list/data-list.component.js +2 -2
- package/esm2015/components/data-list/option/option.component.js +2 -2
- package/esm2015/components/dialog/dialog.component.js +2 -2
- package/esm2015/components/dropdown-box/dropdown-box.component.js +2 -2
- package/esm2015/components/expand/expand.component.js +2 -2
- package/esm2015/components/group/group.module.js +2 -1
- package/esm2015/components/hints-host/hint-box/hint-box.component.js +18 -3
- package/esm2015/components/hints-host/hints-host.component.js +2 -2
- package/esm2015/components/hosted-dropdown/hosted-dropdown.component.js +2 -2
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/label/label.component.js +2 -2
- package/esm2015/components/primitive-calendar/primitive-calendar.component.js +2 -2
- package/esm2015/components/primitive-checkbox/primitive-checkbox.component.js +2 -2
- package/esm2015/components/primitive-textfield/primitive-textfield.component.js +3 -3
- package/esm2015/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm2015/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
- package/esm2015/components/root/root.component.js +11 -17
- package/esm2015/components/root/root.module.js +3 -2
- package/esm2015/components/scroll-controls/scroll-controls.component.js +2 -2
- package/esm2015/constants/decimal-symbols.js +1 -1
- package/esm2015/constants/regexp.js +2 -1
- package/esm2015/constants/version.js +2 -2
- package/esm2015/directives/mask-accessor/mask-accessor.directive.js +1 -1
- package/esm2015/index.js +1 -2
- package/esm2015/interfaces/alert-options.js +1 -0
- package/esm2015/interfaces/data-list-accessor.js +1 -1
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/interfaces/notification-options.js +1 -1
- package/esm2015/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm2015/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
- package/esm2015/pipes/format-number/format-number.pipe.js +4 -3
- package/esm2015/services/hint.service.js +1 -1
- package/esm2015/tokens/notification-options.js +1 -1
- package/esm2015/types/direction.js +1 -1
- package/esm2015/utils/format/capitalize-first-letter.js +4 -0
- package/esm2015/utils/format/format-number.js +10 -9
- package/esm2015/utils/format/index.js +2 -1
- package/esm2015/utils/mask/create-auto-corrected-money-pipe.js +3 -3
- package/esm2015/utils/mask/create-number-mask.js +1 -1
- package/esm5/components/alert/alert.component.js +96 -0
- package/esm5/components/alert/alert.module.js +32 -0
- package/esm5/components/alert/alert.service.js +54 -0
- package/esm5/components/alert/index.js +4 -0
- package/esm5/components/alert/taiga-ui-core-components-alert.js +5 -0
- package/esm5/components/button/button.component.js +2 -2
- package/esm5/components/data-list/data-list-dropdown-manager.directive.js +1 -1
- package/esm5/components/data-list/data-list.component.js +2 -2
- package/esm5/components/data-list/option/option.component.js +2 -2
- package/esm5/components/dialog/dialog.component.js +2 -2
- package/esm5/components/dropdown-box/dropdown-box.component.js +2 -2
- package/esm5/components/expand/expand.component.js +2 -2
- package/esm5/components/group/group.module.js +2 -1
- package/esm5/components/hints-host/hint-box/hint-box.component.js +18 -3
- package/esm5/components/hints-host/hints-host.component.js +2 -2
- package/esm5/components/hosted-dropdown/hosted-dropdown.component.js +2 -2
- package/esm5/components/index.js +2 -1
- package/esm5/components/label/label.component.js +2 -2
- package/esm5/components/primitive-calendar/primitive-calendar.component.js +2 -2
- package/esm5/components/primitive-checkbox/primitive-checkbox.component.js +2 -2
- package/esm5/components/primitive-textfield/primitive-textfield.component.js +3 -3
- package/esm5/components/primitive-textfield/textfield/textfield.component.js +1 -1
- package/esm5/components/primitive-textfield/value-decoration/value-decoration.component.js +3 -3
- package/esm5/components/root/root.component.js +11 -17
- package/esm5/components/root/root.module.js +3 -2
- package/esm5/components/scroll-controls/scroll-controls.component.js +2 -2
- package/esm5/constants/decimal-symbols.js +1 -1
- package/esm5/constants/regexp.js +2 -1
- package/esm5/constants/version.js +2 -2
- package/esm5/directives/mask-accessor/mask-accessor.directive.js +1 -1
- package/esm5/index.js +1 -2
- package/esm5/interfaces/alert-options.js +1 -0
- package/esm5/interfaces/data-list-accessor.js +1 -1
- package/esm5/interfaces/index.js +1 -1
- package/esm5/interfaces/notification-options.js +1 -1
- package/esm5/internal/svg-defs-host/svg-defs-host.component.js +2 -2
- package/esm5/pipes/calendar-sheet/calendar-sheet.pipe.js +1 -1
- package/esm5/pipes/format-number/format-number.pipe.js +5 -3
- package/esm5/services/hint.service.js +1 -1
- package/esm5/tokens/notification-options.js +1 -1
- package/esm5/types/direction.js +1 -1
- package/esm5/utils/format/capitalize-first-letter.js +4 -0
- package/esm5/utils/format/format-number.js +10 -9
- package/esm5/utils/format/index.js +2 -1
- package/esm5/utils/mask/create-auto-corrected-money-pipe.js +4 -3
- package/esm5/utils/mask/create-number-mask.js +1 -1
- package/fesm2015/taiga-ui-core-components-alert.js +156 -0
- package/fesm2015/taiga-ui-core-components-alert.js.map +1 -0
- package/fesm2015/taiga-ui-core-components-button.js +1 -1
- package/fesm2015/taiga-ui-core-components-button.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-data-list.js +2 -2
- 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-dialog.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm2015/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js +1 -1
- package/fesm2015/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-group.js +1 -0
- package/fesm2015/taiga-ui-core-components-group.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hints-host.js +18 -3
- package/fesm2015/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.js +1 -1
- package/fesm2015/taiga-ui-core-components-hosted-dropdown.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-primitive-calendar.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js +5 -5
- package/fesm2015/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-root.js +12 -17
- package/fesm2015/taiga-ui-core-components-root.js.map +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm2015/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm2015/taiga-ui-core-components.js +1 -0
- package/fesm2015/taiga-ui-core-components.js.map +1 -1
- package/fesm2015/taiga-ui-core-constants.js +3 -2
- package/fesm2015/taiga-ui-core-constants.js.map +1 -1
- package/fesm2015/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm2015/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm2015/taiga-ui-core-pipes-format-number.js +3 -2
- package/fesm2015/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm2015/taiga-ui-core-services.js.map +1 -1
- package/fesm2015/taiga-ui-core-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-format.js +14 -9
- package/fesm2015/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-core-utils-mask.js +2 -2
- package/fesm2015/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm2015/taiga-ui-core.js +0 -1
- package/fesm2015/taiga-ui-core.js.map +1 -1
- package/fesm5/taiga-ui-core-components-alert.js +171 -0
- package/fesm5/taiga-ui-core-components-alert.js.map +1 -0
- package/fesm5/taiga-ui-core-components-button.js +1 -1
- package/fesm5/taiga-ui-core-components-button.js.map +1 -1
- package/fesm5/taiga-ui-core-components-data-list.js +2 -2
- 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-dialog.js.map +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js +1 -1
- package/fesm5/taiga-ui-core-components-dropdown-box.js.map +1 -1
- package/fesm5/taiga-ui-core-components-expand.js +1 -1
- package/fesm5/taiga-ui-core-components-expand.js.map +1 -1
- package/fesm5/taiga-ui-core-components-group.js +1 -0
- package/fesm5/taiga-ui-core-components-group.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hints-host.js +18 -3
- package/fesm5/taiga-ui-core-components-hints-host.js.map +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.js +1 -1
- package/fesm5/taiga-ui-core-components-hosted-dropdown.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-primitive-calendar.js +1 -1
- package/fesm5/taiga-ui-core-components-primitive-calendar.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js +1 -1
- package/fesm5/taiga-ui-core-components-primitive-checkbox.js.map +1 -1
- package/fesm5/taiga-ui-core-components-primitive-textfield.js +5 -5
- package/fesm5/taiga-ui-core-components-primitive-textfield.js.map +1 -1
- package/fesm5/taiga-ui-core-components-root.js +12 -17
- package/fesm5/taiga-ui-core-components-root.js.map +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js +1 -1
- package/fesm5/taiga-ui-core-components-scroll-controls.js.map +1 -1
- package/fesm5/taiga-ui-core-components.js +1 -0
- package/fesm5/taiga-ui-core-components.js.map +1 -1
- package/fesm5/taiga-ui-core-constants.js +3 -2
- package/fesm5/taiga-ui-core-constants.js.map +1 -1
- package/fesm5/taiga-ui-core-directives-mask-accessor.js.map +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js +1 -1
- package/fesm5/taiga-ui-core-internal-svg-defs-host.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-calendar-sheet.js.map +1 -1
- package/fesm5/taiga-ui-core-pipes-format-number.js +4 -2
- package/fesm5/taiga-ui-core-pipes-format-number.js.map +1 -1
- package/fesm5/taiga-ui-core-services.js.map +1 -1
- package/fesm5/taiga-ui-core-tokens.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-format.js +14 -9
- package/fesm5/taiga-ui-core-utils-format.js.map +1 -1
- package/fesm5/taiga-ui-core-utils-mask.js +3 -2
- package/fesm5/taiga-ui-core-utils-mask.js.map +1 -1
- package/fesm5/taiga-ui-core.js +0 -1
- package/fesm5/taiga-ui-core.js.map +1 -1
- package/index.d.ts +0 -1
- package/interfaces/alert-options.d.ts +12 -0
- package/interfaces/data-list-accessor.d.ts +1 -1
- package/interfaces/index.d.ts +1 -0
- package/interfaces/notification-options.d.ts +3 -0
- package/interfaces/taiga-ui-core-interfaces.metadata.json +1 -1
- package/internal/svg-defs-host/taiga-ui-core-internal-svg-defs-host.metadata.json +1 -1
- package/package.json +4 -4
- package/pipes/calendar-sheet/calendar-sheet.pipe.d.ts +1 -1
- package/pipes/format-number/format-number.pipe.d.ts +2 -1
- package/services/hint.service.d.ts +1 -1
- package/styles/markup/tui-group.less +1 -1
- package/styles/mixins/mixins.less +1 -0
- package/styles/mixins/slider.less +17 -0
- package/styles/taiga-ui-global-old.less +18 -18
- package/styles/taiga-ui-global.less +18 -18
- package/styles/taiga-ui-local-old.less +5 -5
- package/styles/taiga-ui-local.less +7 -7
- package/styles/taiga-ui-local.scss +7 -7
- package/styles/taiga-ui-theme.less +4 -4
- package/styles/theme/dialog.less +1 -1
- package/styles/theme/wrapper/accent.less +1 -1
- package/styles/theme/wrapper/base.less +1 -1
- package/styles/theme/wrapper/icon.less +1 -1
- package/styles/theme/wrapper/none.less +6 -0
- package/styles/theme/wrapper/outline.less +1 -1
- package/styles/theme/wrapper/primary.less +1 -1
- package/styles/theme/wrapper/secondary.less +1 -1
- package/styles/theme/wrapper/table.less +1 -1
- package/styles/theme/wrapper/textfield.less +2 -2
- package/styles/theme/wrapper/whiteblock.less +2 -2
- package/styles/theme/wrapper.less +10 -10
- package/taiga-ui-core.metadata.json +1 -1
- package/tokens/notification-options.d.ts +2 -10
- package/tokens/taiga-ui-core-tokens.metadata.json +1 -1
- package/types/direction.d.ts +1 -1
- package/utils/format/capitalize-first-letter.d.ts +1 -0
- package/utils/format/index.d.ts +1 -0
- package/utils/format/taiga-ui-core-utils-format.metadata.json +1 -1
- package/utils/mask/create-auto-corrected-money-pipe.d.ts +1 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.js.map +0 -1
- package/bundles/taiga-ui-core-modules-notifications.umd.min.js +0 -16
- package/bundles/taiga-ui-core-modules-notifications.umd.min.js.map +0 -1
- package/bundles/taiga-ui-core-modules.umd.js +0 -23
- package/bundles/taiga-ui-core-modules.umd.js.map +0 -1
- package/bundles/taiga-ui-core-modules.umd.min.js +0 -2
- package/bundles/taiga-ui-core-modules.umd.min.js.map +0 -1
- package/esm2015/modules/index.js +0 -2
- package/esm2015/modules/notifications/index.js +0 -7
- package/esm2015/modules/notifications/notification-alert/Notification-alert.js +0 -22
- package/esm2015/modules/notifications/notification-alert/notification-alert.component.js +0 -74
- package/esm2015/modules/notifications/notification-alert/notification-alert.module.js +0 -17
- package/esm2015/modules/notifications/notification-content-context.js +0 -1
- package/esm2015/modules/notifications/notifications-host/notifications-host.component.js +0 -35
- package/esm2015/modules/notifications/notifications.module.js +0 -26
- package/esm2015/modules/notifications/notifications.service.js +0 -38
- package/esm2015/modules/notifications/taiga-ui-core-modules-notifications.js +0 -5
- package/esm2015/modules/taiga-ui-core-modules.js +0 -5
- package/esm5/modules/index.js +0 -2
- package/esm5/modules/notifications/index.js +0 -7
- package/esm5/modules/notifications/notification-alert/Notification-alert.js +0 -24
- package/esm5/modules/notifications/notification-alert/notification-alert.component.js +0 -81
- package/esm5/modules/notifications/notification-alert/notification-alert.module.js +0 -20
- package/esm5/modules/notifications/notification-content-context.js +0 -1
- package/esm5/modules/notifications/notifications-host/notifications-host.component.js +0 -36
- package/esm5/modules/notifications/notifications.module.js +0 -29
- package/esm5/modules/notifications/notifications.service.js +0 -41
- package/esm5/modules/notifications/taiga-ui-core-modules-notifications.js +0 -5
- package/esm5/modules/taiga-ui-core-modules.js +0 -5
- package/fesm2015/taiga-ui-core-modules-notifications.js +0 -192
- package/fesm2015/taiga-ui-core-modules-notifications.js.map +0 -1
- package/fesm2015/taiga-ui-core-modules.js +0 -6
- package/fesm2015/taiga-ui-core-modules.js.map +0 -1
- package/fesm5/taiga-ui-core-modules-notifications.js +0 -210
- package/fesm5/taiga-ui-core-modules-notifications.js.map +0 -1
- package/fesm5/taiga-ui-core-modules.js +0 -6
- package/fesm5/taiga-ui-core-modules.js.map +0 -1
- package/modules/index.d.ts +0 -1
- package/modules/notifications/index.d.ts +0 -7
- package/modules/notifications/notification-alert/Notification-alert.d.ts +0 -19
- package/modules/notifications/notification-alert/notification-alert.component.d.ts +0 -17
- package/modules/notifications/notification-alert/notification-alert.module.d.ts +0 -2
- package/modules/notifications/notification-content-context.d.ts +0 -10
- package/modules/notifications/notifications-host/notifications-host.component.d.ts +0 -9
- package/modules/notifications/notifications.module.d.ts +0 -4
- package/modules/notifications/notifications.service.d.ts +0 -15
- package/modules/notifications/package.json +0 -13
- package/modules/notifications/taiga-ui-core-modules-notifications.metadata.json +0 -1
- package/modules/package.json +0 -13
- package/modules/taiga-ui-core-modules.d.ts +0 -4
- package/modules/taiga-ui-core-modules.metadata.json +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { TuiLetModule } from '@taiga-ui/cdk';
|
|
5
|
-
import { TuiNotificationAlertModule } from './notification-alert/notification-alert.module';
|
|
6
|
-
import { TuiNotificationsHostComponent } from './notifications-host/notifications-host.component';
|
|
7
|
-
// TODO: remove in ivy compilation
|
|
8
|
-
export const NOTIFICATIONS_HOST = TuiNotificationsHostComponent;
|
|
9
|
-
let TuiNotificationsModule = class TuiNotificationsModule {
|
|
10
|
-
};
|
|
11
|
-
TuiNotificationsModule = __decorate([
|
|
12
|
-
NgModule({
|
|
13
|
-
imports: [CommonModule, TuiNotificationAlertModule, TuiLetModule],
|
|
14
|
-
declarations: [TuiNotificationsHostComponent],
|
|
15
|
-
exports: [TuiNotificationsHostComponent],
|
|
16
|
-
entryComponents: [TuiNotificationsHostComponent],
|
|
17
|
-
providers: [
|
|
18
|
-
{
|
|
19
|
-
provide: TuiNotificationsHostComponent,
|
|
20
|
-
useValue: NOTIFICATIONS_HOST,
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
})
|
|
24
|
-
], TuiNotificationsModule);
|
|
25
|
-
export { TuiNotificationsModule };
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9ucy5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS9tb2R1bGVzL25vdGlmaWNhdGlvbnMvIiwic291cmNlcyI6WyJub3RpZmljYXRpb25zLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzI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BvcnQge1R1aU5vdGlmaWNhdGlvbkFsZXJ0TW9kdWxlfSBmcm9tICcuL25vdGlmaWNhdGlvbi1hbGVydC9ub3RpZmljYXRpb24tYWxlcnQubW9kdWxlJztcbmltcG9ydCB7VHVpTm90aWZpY2F0aW9uc0hvc3RDb21wb25lbnR9IGZyb20gJy4vbm90aWZpY2F0aW9ucy1ob3N0L25vdGlmaWNhdGlvbnMtaG9zdC5jb21wb25lbnQnO1xuXG4vLyBUT0RPOiByZW1vdmUgaW4gaXZ5IGNvbXBpbGF0aW9uXG5leHBvcnQgY29uc3QgTk9USUZJQ0FUSU9OU19IT1NUID0gVHVpTm90aWZpY2F0aW9uc0hvc3RDb21wb25lbnQ7XG5cbkBOZ01vZHVsZSh7XG4gICAgaW1wb3J0czogW0NvbW1vbk1vZHVsZSwgVHVpTm90aWZpY2F0aW9uQWxlcnRNb2R1bGUsIFR1aUxldE1vZHVsZV0sXG4gICAgZGVjbGFyYXRpb25zOiBbVHVpTm90aWZpY2F0aW9uc0hvc3RDb21wb25lbnRdLFxuICAgIGV4cG9ydHM6IFtUdWlOb3RpZmljYXRpb25zSG9zdENvbXBvbmVudF0sXG4gICAgZW50cnlDb21wb25lbnRzOiBbVHVpTm90aWZpY2F0aW9uc0hvc3RDb21wb25lbnRdLFxuICAgIHByb3ZpZGVyczogW1xuICAgICAgICB7XG4gICAgICAgICAgICBwcm92aWRlOiBUdWlOb3RpZmljYXRpb25zSG9zdENvbXBvbmVudCxcbiAgICAgICAgICAgIHVzZVZhbHVlOiBOT1RJRklDQVRJT05TX0hPU1QsXG4gICAgICAgIH0sXG4gICAgXSxcbn0pXG5leHBvcnQgY2xhc3MgVHVpTm90aWZpY2F0aW9uc01vZHVsZSB7fVxuIl19
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from "tslib";
|
|
2
|
-
import { Inject, Injectable } from '@angular/core';
|
|
3
|
-
import { tuiAssert } from '@taiga-ui/cdk';
|
|
4
|
-
import { TUI_NOTIFICATION_OPTIONS, } from '@taiga-ui/core/tokens';
|
|
5
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
6
|
-
import { NotificationAlert } from './notification-alert/Notification-alert';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@taiga-ui/core/tokens";
|
|
9
|
-
const NO_HOST = 'Notifications are disabled, enable support by adding TuiNotificationsModule to your main app module';
|
|
10
|
-
let TuiNotificationsService = class TuiNotificationsService {
|
|
11
|
-
constructor(options) {
|
|
12
|
-
this.options = options;
|
|
13
|
-
/** @internal */
|
|
14
|
-
this.items$ = new BehaviorSubject([]);
|
|
15
|
-
}
|
|
16
|
-
show(content, options = {}) {
|
|
17
|
-
return new Observable((observer) => {
|
|
18
|
-
tuiAssert.assert(!!this.items$.observers.length, NO_HOST);
|
|
19
|
-
const notification = new NotificationAlert(observer, content, Object.assign(Object.assign({}, this.options), options));
|
|
20
|
-
this.items$.next([...this.items$.value, notification]);
|
|
21
|
-
return () => {
|
|
22
|
-
this.items$.next(this.items$.value.filter(item => item !== notification));
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
TuiNotificationsService.ctorParameters = () => [
|
|
28
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NOTIFICATION_OPTIONS,] }] }
|
|
29
|
-
];
|
|
30
|
-
TuiNotificationsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TuiNotificationsService_Factory() { return new TuiNotificationsService(i0.ɵɵinject(i1.TUI_NOTIFICATION_OPTIONS)); }, token: TuiNotificationsService, providedIn: "root" });
|
|
31
|
-
TuiNotificationsService = __decorate([
|
|
32
|
-
Injectable({
|
|
33
|
-
providedIn: 'root',
|
|
34
|
-
}),
|
|
35
|
-
__param(0, Inject(TUI_NOTIFICATION_OPTIONS))
|
|
36
|
-
], TuiNotificationsService);
|
|
37
|
-
export { TuiNotificationsService };
|
|
38
|
-
//# sourceMappingURL=data:application/json;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KG9ic2VydmVyLCBjb250ZW50LCB7XG4gICAgICAgICAgICAgICAgLi4udGhpcy5vcHRpb25zLFxuICAgICAgICAgICAgICAgIC4uLm9wdGlvbnMsXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgdGhpcy5pdGVtcyQubmV4dChbLi4udGhpcy5pdGVtcyQudmFsdWUsIG5vdGlmaWNhdGlvbl0pO1xuXG4gICAgICAgICAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuaXRlbXMkLm5leHQodGhpcy5pdGVtcyQudmFsdWUuZmlsdGVyKGl0ZW0gPT4gaXRlbSAhPT0gbm90aWZpY2F0aW9uKSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9KTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktY29yZS1tb2R1bGVzLW5vdGlmaWNhdGlvbnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS9tb2R1bGVzL25vdGlmaWNhdGlvbnMvIiwic291cmNlcyI6WyJ0YWlnYS11aS1jb3JlLW1vZHVsZXMtbm90aWZpY2F0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktY29yZS1tb2R1bGVzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2NvcmUvbW9kdWxlcy8iLCJzb3VyY2VzIjpbInRhaWdhLXVpLWNvcmUtbW9kdWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
package/esm5/modules/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from '@taiga-ui/core/modules/notifications';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS9tb2R1bGVzLyIsInNvdXJjZXMiOlsiaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxzQ0FBc0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJ0B0YWlnYS11aS9jb3JlL21vZHVsZXMvbm90aWZpY2F0aW9ucyc7XG4iXX0=
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './notification-alert/Notification-alert';
|
|
2
|
-
export * from './notification-alert/notification-alert.component';
|
|
3
|
-
export * from './notification-alert/notification-alert.module';
|
|
4
|
-
export * from './notifications.module';
|
|
5
|
-
export * from './notifications.service';
|
|
6
|
-
export * from './notifications-host/notifications-host.component';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS9tb2R1bGVzL25vdGlmaWNhdGlvbnMvIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsbURBQW1ELENBQUM7QUFDbEUsY0FBYyxnREFBZ0QsQ0FBQztBQUUvRCxjQUFjLHdCQUF3QixDQUFDO0FBQ3ZDLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyxtREFBbUQsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbm90aWZpY2F0aW9uLWFsZXJ0L05vdGlmaWNhdGlvbi1hbGVydCc7XG5leHBvcnQgKiBmcm9tICcuL25vdGlmaWNhdGlvbi1hbGVydC9ub3RpZmljYXRpb24tYWxlcnQuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbm90aWZpY2F0aW9uLWFsZXJ0L25vdGlmaWNhdGlvbi1hbGVydC5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9ub3RpZmljYXRpb24tY29udGVudC1jb250ZXh0JztcbmV4cG9ydCAqIGZyb20gJy4vbm90aWZpY2F0aW9ucy5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9ub3RpZmljYXRpb25zLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9ub3RpZmljYXRpb25zLWhvc3Qvbm90aWZpY2F0aW9ucy1ob3N0LmNvbXBvbmVudCc7XG4iXX0=
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var NotificationAlert = /** @class */ (function () {
|
|
2
|
-
function NotificationAlert(observer, content, options) {
|
|
3
|
-
this.observer = observer;
|
|
4
|
-
this.content = content;
|
|
5
|
-
this.options = options;
|
|
6
|
-
this.status = this.options.status;
|
|
7
|
-
this.hasIcon = this.options.hasIcon;
|
|
8
|
-
this.hasCloseButton = this.options.hasCloseButton;
|
|
9
|
-
this.label = this.options.label;
|
|
10
|
-
this.autoClose =
|
|
11
|
-
typeof this.options.autoClose === 'function'
|
|
12
|
-
? this.options.autoClose(this.options.status)
|
|
13
|
-
: this.options.autoClose;
|
|
14
|
-
if (options && this.withData(options)) {
|
|
15
|
-
this.data = options.data;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
NotificationAlert.prototype.withData = function (options) {
|
|
19
|
-
return 'data' in options;
|
|
20
|
-
};
|
|
21
|
-
return NotificationAlert;
|
|
22
|
-
}());
|
|
23
|
-
export { NotificationAlert };
|
|
24
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTm90aWZpY2F0aW9uLWFsZXJ0LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2NvcmUvbW9kdWxlcy9ub3RpZmljYXRpb25zLyIsInNvdXJjZXMiOlsibm90aWZpY2F0aW9uLWFsZXJ0L05vdGlmaWNhdGlvbi1hbGVydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXQTtJQWNJLDJCQUNhLFFBQXFCLEVBQ3JCLE9BQWlFLEVBQ3pELE9BRWhCO1FBSlEsYUFBUSxHQUFSLFFBQVEsQ0FBYTtRQUNyQixZQUFPLEdBQVAsT0FBTyxDQUEwRDtRQUN6RCxZQUFPLEdBQVAsT0FBTyxDQUV2QjtRQWxCSSxXQUFNLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUM7UUFFN0IsWUFBTyxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDO1FBSS9CLG1CQUFjLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxjQUFjLENBQUM7UUFFN0MsVUFBSyxHQUNWLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDO1FBV25CLElBQUksQ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Rpb25zLnN0YXR1cylcbiAgICAgICAgICAgICAgICA6IHRoaXMub3B0aW9ucy5hdXRvQ2xvc2U7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMgJiYgdGhpcy53aXRoRGF0YShvcHRpb25zKSkge1xuICAgICAgICAgICAgdGhpcy5kYXRhID0gb3B0aW9ucy5kYXRhO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJpdmF0ZSB3aXRoRGF0YShcbiAgICAgICAgb3B0aW9uczogVHVpTm90aWZpY2F0aW9uT3B0aW9ucyB8IFR1aU5vdGlmaWNhdGlvbk9wdGlvbnNXaXRoRGF0YTxJPixcbiAgICApOiBvcHRpb25zIGlzIFR1aU5vdGlmaWNhdGlvbk9wdGlvbnNXaXRoRGF0YTxJPiB7XG4gICAgICAgIHJldHVybiAnZGF0YScgaW4gb3B0aW9ucztcbiAgICB9XG59XG4iXX0=
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Inject, Input, OnInit, } from '@angular/core';
|
|
3
|
-
import { isNumber, TuiDestroyService, tuiPure } from '@taiga-ui/cdk';
|
|
4
|
-
import { TUI_NOTIFICATION_OPTIONS, } from '@taiga-ui/core/tokens';
|
|
5
|
-
import { fromEvent, timer } from 'rxjs';
|
|
6
|
-
import { repeatWhen, takeUntil } from 'rxjs/operators';
|
|
7
|
-
var TuiNotificationAlertComponent = /** @class */ (function () {
|
|
8
|
-
function TuiNotificationAlertComponent(elementRef, destroy$, options) {
|
|
9
|
-
this.elementRef = elementRef;
|
|
10
|
-
this.destroy$ = destroy$;
|
|
11
|
-
this.options = options;
|
|
12
|
-
}
|
|
13
|
-
TuiNotificationAlertComponent.prototype.ngOnInit = function () {
|
|
14
|
-
this.initAutoClose();
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(TuiNotificationAlertComponent.prototype, "context", {
|
|
17
|
-
get: function () {
|
|
18
|
-
return this.calculateContext(this.item);
|
|
19
|
-
},
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true
|
|
22
|
-
});
|
|
23
|
-
TuiNotificationAlertComponent.prototype.closeNotification = function () {
|
|
24
|
-
this.item.observer.complete();
|
|
25
|
-
};
|
|
26
|
-
TuiNotificationAlertComponent.prototype.calculateContext = function (_a) {
|
|
27
|
-
var status = _a.status, data = _a.data, label = _a.label, observer = _a.observer;
|
|
28
|
-
return {
|
|
29
|
-
$implicit: status,
|
|
30
|
-
data: data,
|
|
31
|
-
label: label,
|
|
32
|
-
closeHook: function () {
|
|
33
|
-
observer.complete();
|
|
34
|
-
},
|
|
35
|
-
emitHook: function (data) {
|
|
36
|
-
observer.next(data);
|
|
37
|
-
},
|
|
38
|
-
emitAndCloseHook: function (data) {
|
|
39
|
-
observer.next(data);
|
|
40
|
-
observer.complete();
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
TuiNotificationAlertComponent.prototype.initAutoClose = function () {
|
|
45
|
-
var _this = this;
|
|
46
|
-
if (!this.item.autoClose) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
timer(isNumber(this.item.autoClose)
|
|
50
|
-
? this.item.autoClose
|
|
51
|
-
: this.options.defaultAutoCloseTime)
|
|
52
|
-
.pipe(takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')), repeatWhen(function () { return fromEvent(_this.elementRef.nativeElement, 'mouseleave'); }), takeUntil(this.destroy$))
|
|
53
|
-
.subscribe(function () { return _this.closeNotification(); });
|
|
54
|
-
};
|
|
55
|
-
TuiNotificationAlertComponent.ctorParameters = function () { return [
|
|
56
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
57
|
-
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
58
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NOTIFICATION_OPTIONS,] }] }
|
|
59
|
-
]; };
|
|
60
|
-
__decorate([
|
|
61
|
-
Input()
|
|
62
|
-
], TuiNotificationAlertComponent.prototype, "item", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
tuiPure
|
|
65
|
-
], TuiNotificationAlertComponent.prototype, "calculateContext", null);
|
|
66
|
-
TuiNotificationAlertComponent = __decorate([
|
|
67
|
-
Component({
|
|
68
|
-
selector: 'tui-notification-alert',
|
|
69
|
-
template: "<tui-notification\n *ngIf=\"item.hasCloseButton; else noClose\"\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__heading\"\n class=\"heading\"\n [content]=\"item.label\"\n [context]=\"context\"\n ></label>\n <div\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__content\"\n class=\"content\"\n [content]=\"item.content\"\n [context]=\"context\"\n ></div>\n</tui-notification>\n<ng-template #noClose>\n <tui-notification [status]=\"item.status\" [hasIcon]=\"item.hasIcon\">\n <label\n *ngIf=\"item.label\"\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__heading\"\n class=\"heading\"\n [content]=\"item.label\"\n [context]=\"context\"\n ></label>\n <div\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__content\"\n class=\"content\"\n [content]=\"item.content\"\n [context]=\"context\"\n ></div>\n </tui-notification>\n</ng-template>\n",
|
|
70
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
71
|
-
providers: [TuiDestroyService],
|
|
72
|
-
styles: [":host{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);display:block;border-radius:var(--tui-radius-m)}.heading{font:var(--tui-font-text-m);line-height:1.25rem;font-weight:700;margin:0}.content{color:var(--tui-text-01);word-wrap:break-word}.content:empty{display:none}"]
|
|
73
|
-
}),
|
|
74
|
-
__param(0, Inject(ElementRef)),
|
|
75
|
-
__param(1, Inject(TuiDestroyService)),
|
|
76
|
-
__param(2, Inject(TUI_NOTIFICATION_OPTIONS))
|
|
77
|
-
], TuiNotificationAlertComponent);
|
|
78
|
-
return TuiNotificationAlertComponent;
|
|
79
|
-
}());
|
|
80
|
-
export { TuiNotificationAlertComponent };
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWFsZXJ0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jb3JlL21vZHVsZXMvbm90aWZpY2F0aW9ucy8iLCJzb3VyY2VzIjpbIm5vdGlmaWNhdGlvbi1hbGVydC9ub3RpZmljYXRpb24tYWxlcnQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQ0gsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsTUFBTSxFQUNOLEtBQUssRUFDTCxNQUFNLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFDLFFBQVEsRUFBRSxpQkFBaUIsRUFBRSxPQUFPLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDbkUsT0FBTyxFQUNILHdCQUF3QixHQUUzQixNQUFNLHVCQUF1QixDQUFDO0FBQy9CLE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sTUFBTSxDQUFDO0FBQ3RDLE9BQU8sRUFBQyxVQUFVLEVBQUUsU0FBUyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFZckQ7SUFJSSx1Q0FDeUMsVUFBbUMsRUFDNUIsUUFBMkIsRUFFOUQsT0FBc0M7UUFIVixlQUFVLEdBQVYsVUFBVSxDQUF5QjtRQUM1QixhQUFRLEdBQVIsUUFBUSxDQUFtQjtRQUU5RCxZQUFPLEdBQVAsT0FBTyxDQUErQjtJQUNoRCxDQUFDO0lBRUosZ0RBQVEsR0FBUjtRQUNJLElBQUksQ0FBQyxhQUFhLEVB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lcixcbiAgICB9OiBOb3RpZmljYXRpb25BbGVydDxPLCBJPik6IFR1aU5vdGlmaWNhdGlvbkNvbnRlbnRDb250ZXh0PE8sIEk+IHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRpbXBsaWNpdDogc3RhdHVzLFxuICAgICAgICAgICAgZGF0YTogZGF0YSxcbiAgICAgICAgICAgIGxhYmVsOiBsYWJlbCxcbiAgICAgICAgICAgIGNsb3NlSG9vazogKCkgPT4ge1xuICAgICAgICAgICAgICAgIG9ic2VydmVyLmNvbXBsZXRlKCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZW1pdEhvb2s6IChkYXRhOiBPKSA9PiB7XG4gICAgICAgICAgICAgICAgb2JzZXJ2ZXIubmV4dChkYXRhKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbWl0QW5kQ2xvc2VIb29rOiAoZGF0YTogTykgPT4ge1xuICAgICAgICAgICAgICAgIG9ic2VydmVyLm5leHQoZGF0YSk7XG4gICAgICAgICAgICAgICAgb2JzZXJ2ZXIuY29tcGxldGUoKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgcHJpdmF0ZSBpbml0QXV0b0Nsb3NlKCkge1xuICAgICAgICBpZiAoIXRoaXMuaXRlbS5hdXRvQ2xvc2UpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRpbWVyKFxuICAgICAgICAgICAgaXNOdW1iZXIodGhpcy5pdGVtLmF1dG9DbG9zZSlcbiAgICAgICAgICAgICAgICA/IHRoaXMuaXRlbS5hdXRvQ2xvc2VcbiAgICAgICAgICAgICAgICA6IHRoaXMub3B0aW9ucy5kZWZhdWx0QXV0b0Nsb3NlVGltZSxcbiAgICAgICAgKVxuICAgICAgICAgICAgLnBpcGUoXG4gICAgICAgICAgICAgICAgdGFrZVVudGlsKGZyb21FdmVudCh0aGlzLmVsZW1lbnRSZWYubmF0aXZlRWxlbWVudCwgJ21vdXNlZW50ZXInKSksXG4gICAgICAgICAgICAgICAgcmVwZWF0V2hlbigoKSA9PiBmcm9tRXZlbnQodGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsICdtb3VzZWxlYXZlJykpLFxuICAgICAgICAgICAgICAgIHRha2VVbnRpbCh0aGlzLmRlc3Ryb3kkKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC5zdWJzY3JpYmUoKCkgPT4gdGhpcy5jbG9zZU5vdGlmaWNhdGlvbigpKTtcbiAgICB9XG59XG4iXX0=
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { TuiNotificationModule } from '@taiga-ui/core/components/notification';
|
|
5
|
-
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
6
|
-
import { TuiNotificationAlertComponent } from './notification-alert.component';
|
|
7
|
-
var TuiNotificationAlertModule = /** @class */ (function () {
|
|
8
|
-
function TuiNotificationAlertModule() {
|
|
9
|
-
}
|
|
10
|
-
TuiNotificationAlertModule = __decorate([
|
|
11
|
-
NgModule({
|
|
12
|
-
imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],
|
|
13
|
-
declarations: [TuiNotificationAlertComponent],
|
|
14
|
-
exports: [TuiNotificationAlertComponent],
|
|
15
|
-
})
|
|
16
|
-
], TuiNotificationAlertModule);
|
|
17
|
-
return TuiNotificationAlertModule;
|
|
18
|
-
}());
|
|
19
|
-
export { TuiNotificationAlertModule };
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWFsZXJ0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jb3JlL21vZHVsZXMvbm90aWZpY2F0aW9ucy8iLCJzb3VyY2V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V4dGVuZHMgVHVpQ29udGV4dFdpdGhJbXBsaWNpdDxUdWlOb3RpZmljYXRpb24+IHtcbiAgICBsYWJlbDogUG9seW1vcnBoZXVzQ29udGVudDxUdWlDb250ZXh0V2l0aEltcGxpY2l0PFR1aU5vdGlmaWNhdGlvbj4+O1xuICAgIGRhdGE6IEk7XG4gICAgY2xvc2VIb29rOiAoKSA9PiB2b2lkO1xuICAgIGVtaXRIb29rOiAoZGF0YTogTykgPT4gdm9pZDtcbiAgICBlbWl0QW5kQ2xvc2VIb29rOiAoZGF0YTogTykgPT4gdm9pZDtcbn1cbiJdfQ==
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { __assign, __decorate, __param } from "tslib";
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
|
|
3
|
-
import { tuiPure } from '@taiga-ui/cdk';
|
|
4
|
-
import { tuiFadeInList, tuiHeightCollapseList, tuiSlideInRightList, } from '@taiga-ui/core/animations';
|
|
5
|
-
import { TUI_ANIMATION_OPTIONS } from '@taiga-ui/core/tokens';
|
|
6
|
-
import { TuiNotificationsService } from '../notifications.service';
|
|
7
|
-
var TuiNotificationsHostComponent = /** @class */ (function () {
|
|
8
|
-
function TuiNotificationsHostComponent(options, service) {
|
|
9
|
-
this.options = options;
|
|
10
|
-
this.service = service;
|
|
11
|
-
}
|
|
12
|
-
TuiNotificationsHostComponent.prototype.getAnimation = function (value) {
|
|
13
|
-
return __assign({ value: String(value) }, this.options);
|
|
14
|
-
};
|
|
15
|
-
TuiNotificationsHostComponent.ctorParameters = function () { return [
|
|
16
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
|
|
17
|
-
{ type: TuiNotificationsService, decorators: [{ type: Inject, args: [TuiNotificationsService,] }] }
|
|
18
|
-
]; };
|
|
19
|
-
__decorate([
|
|
20
|
-
tuiPure
|
|
21
|
-
], TuiNotificationsHostComponent.prototype, "getAnimation", null);
|
|
22
|
-
TuiNotificationsHostComponent = __decorate([
|
|
23
|
-
Component({
|
|
24
|
-
selector: 'tui-notifications-host',
|
|
25
|
-
template: "<ng-container *tuiLet=\"service.items$ | async as items\">\n <div\n *ngIf=\"items.length\"\n class=\"t-wrapper\"\n [@tuiFadeInList]=\"getAnimation(items.length)\"\n [@tuiHeightCollapseList]=\"getAnimation(items.length)\"\n [@tuiSlideInRightList]=\"getAnimation(items.length)\"\n >\n <tui-notification-alert\n *ngFor=\"let item of items\"\n role=\"alert\"\n class=\"t-alert\"\n [item]=\"item\"\n ></tui-notification-alert>\n </div>\n</ng-container>\n",
|
|
26
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
-
animations: [tuiFadeInList, tuiSlideInRightList, tuiHeightCollapseList],
|
|
28
|
-
styles: [":host{position:fixed;top:0;left:0;width:100%;height:0}.t-wrapper{width:18rem;margin-left:auto;padding:2rem 3rem 0 0;pointer-events:none}:host-context(tui-root._mobile) .t-wrapper{padding:1rem 1rem 0 0}@media screen and (min-width:80em){.t-wrapper{width:23rem}}.t-alert{pointer-events:auto}.t-alert:not(:first-child){margin-top:.75rem}"]
|
|
29
|
-
}),
|
|
30
|
-
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
31
|
-
__param(1, Inject(TuiNotificationsService))
|
|
32
|
-
], TuiNotificationsHostComponent);
|
|
33
|
-
return TuiNotificationsHostComponent;
|
|
34
|
-
}());
|
|
35
|
-
export { TuiNotificationsHostComponent };
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9ucy1ob3N0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0B0YWlnYS11aS9jb3JlL21vZHVsZXMvbm90aWZpY2F0aW9ucy8iLCJzb3VyY2VzIjpbIm5vdGlmaWNhdGlvbnMtaG9zdC9ub3RpZmljYXRpb25zLWhvc3QuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXS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XRlZ3kuT25QdXNoLFxuICAgIGFuaW1hdGlvbnM6IFt0dWlGYWRlSW5MaXN0LCB0dWlTbGlkZUluUmlnaHRMaXN0LCB0dWlIZWlnaHRDb2xsYXBzZUxpc3RdLFxufSlcbmV4cG9ydCBjbGFzcyBUdWlOb3RpZmljYXRpb25zSG9zdENvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IoXG4gICAgICAgIEBJbmplY3QoVFVJX0FOSU1BVElPTl9PUFRJT05TKSBwcml2YXRlIHJlYWRvbmx5IG9wdGlvbnM6IEFuaW1hdGlvbk9wdGlvbnMsXG4gICAgICAgIEBJbmplY3QoVHVpTm90aWZpY2F0aW9uc1NlcnZpY2UpIHJlYWRvbmx5IHNlcnZpY2U6IFR1aU5vdGlmaWNhdGlvbnNTZXJ2aWNlLFxuICAgICkge31cblxuICAgIEB0dWlQdXJlXG4gICAgZ2V0QW5pbWF0aW9uKHZhbHVlOiBudW1iZXIpOiBUdWlBbmltYXRpb25PcHRpb25zIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiBTdHJpbmcodmFsdWUpLFxuICAgICAgICAgICAgLi4udGhpcy5vcHRpb25zLFxuICAgICAgICB9O1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { TuiLetModule } from '@taiga-ui/cdk';
|
|
5
|
-
import { TuiNotificationAlertModule } from './notification-alert/notification-alert.module';
|
|
6
|
-
import { TuiNotificationsHostComponent } from './notifications-host/notifications-host.component';
|
|
7
|
-
// TODO: remove in ivy compilation
|
|
8
|
-
export var NOTIFICATIONS_HOST = TuiNotificationsHostComponent;
|
|
9
|
-
var TuiNotificationsModule = /** @class */ (function () {
|
|
10
|
-
function TuiNotificationsModule() {
|
|
11
|
-
}
|
|
12
|
-
TuiNotificationsModule = __decorate([
|
|
13
|
-
NgModule({
|
|
14
|
-
imports: [CommonModule, TuiNotificationAlertModule, TuiLetModule],
|
|
15
|
-
declarations: [TuiNotificationsHostComponent],
|
|
16
|
-
exports: [TuiNotificationsHostComponent],
|
|
17
|
-
entryComponents: [TuiNotificationsHostComponent],
|
|
18
|
-
providers: [
|
|
19
|
-
{
|
|
20
|
-
provide: TuiNotificationsHostComponent,
|
|
21
|
-
useValue: NOTIFICATIONS_HOST,
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
})
|
|
25
|
-
], TuiNotificationsModule);
|
|
26
|
-
return TuiNotificationsModule;
|
|
27
|
-
}());
|
|
28
|
-
export { TuiNotificationsModule };
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9ucy5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS9tb2R1bGVzL25vdGlmaWNhdGlvbnMvIiwic291cmNlcyI6WyJub3RpZmljYXRpb25zLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUMsMEJBQTBCLEVBQUMsTUFBTSxnREFBZ0QsQ0FBQztBQUMxRixPQUFPLEVBQUMsNkJBQTZCLEVBQUMsTUFBTSxtREFBbUQsQ0FBQztBQUVoRyxrQ0FBa0M7QUFDbEMsTUFBTSxDQUFDLElBQU0sa0JBQWtCLEdBQUcsNkJBQTZCLENBQUM7QUFjaEU7SUFBQTtJQUFxQyxDQUFDO0lBQXpCLHNCQUFzQjtRQVpsQyxRQUFRLENBQUM7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Tm90aWZpY2F0aW9uQWxlcnRNb2R1bGUsIFR1aUxldE1vZHVsZV0sXG4gICAgZGVjbGFyYXRpb25zOiBbVHVpTm90aWZpY2F0aW9uc0hvc3RDb21wb25lbnRdLFxuICAgIGV4cG9ydHM6IFtUdWlOb3RpZmljYXRpb25zSG9zdENvbXBvbmVudF0sXG4gICAgZW50cnlDb21wb25lbnRzOiBbVHVpTm90aWZpY2F0aW9uc0hvc3RDb21wb25lbnRdLFxuICAgIHByb3ZpZGVyczogW1xuICAgICAgICB7XG4gICAgICAgICAgICBwcm92aWRlOiBUdWlOb3RpZmljYXRpb25zSG9zdENvbXBvbmVudCxcbiAgICAgICAgICAgIHVzZVZhbHVlOiBOT1RJRklDQVRJT05TX0hPU1QsXG4gICAgICAgIH0sXG4gICAgXSxcbn0pXG5leHBvcnQgY2xhc3MgVHVpTm90aWZpY2F0aW9uc01vZHVsZSB7fVxuIl19
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { __assign, __decorate, __param, __read, __spread } from "tslib";
|
|
2
|
-
import { Inject, Injectable } from '@angular/core';
|
|
3
|
-
import { tuiAssert } from '@taiga-ui/cdk';
|
|
4
|
-
import { TUI_NOTIFICATION_OPTIONS, } from '@taiga-ui/core/tokens';
|
|
5
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
6
|
-
import { NotificationAlert } from './notification-alert/Notification-alert';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@taiga-ui/core/tokens";
|
|
9
|
-
var NO_HOST = 'Notifications are disabled, enable support by adding TuiNotificationsModule to your main app module';
|
|
10
|
-
var TuiNotificationsService = /** @class */ (function () {
|
|
11
|
-
function TuiNotificationsService(options) {
|
|
12
|
-
this.options = options;
|
|
13
|
-
/** @internal */
|
|
14
|
-
this.items$ = new BehaviorSubject([]);
|
|
15
|
-
}
|
|
16
|
-
TuiNotificationsService.prototype.show = function (content, options) {
|
|
17
|
-
var _this = this;
|
|
18
|
-
if (options === void 0) { options = {}; }
|
|
19
|
-
return new Observable(function (observer) {
|
|
20
|
-
tuiAssert.assert(!!_this.items$.observers.length, NO_HOST);
|
|
21
|
-
var notification = new NotificationAlert(observer, content, __assign(__assign({}, _this.options), options));
|
|
22
|
-
_this.items$.next(__spread(_this.items$.value, [notification]));
|
|
23
|
-
return function () {
|
|
24
|
-
_this.items$.next(_this.items$.value.filter(function (item) { return item !== notification; }));
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
TuiNotificationsService.ctorParameters = function () { return [
|
|
29
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NOTIFICATION_OPTIONS,] }] }
|
|
30
|
-
]; };
|
|
31
|
-
TuiNotificationsService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TuiNotificationsService_Factory() { return new TuiNotificationsService(i0.ɵɵinject(i1.TUI_NOTIFICATION_OPTIONS)); }, token: TuiNotificationsService, providedIn: "root" });
|
|
32
|
-
TuiNotificationsService = __decorate([
|
|
33
|
-
Injectable({
|
|
34
|
-
providedIn: 'root',
|
|
35
|
-
}),
|
|
36
|
-
__param(0, Inject(TUI_NOTIFICATION_OPTIONS))
|
|
37
|
-
], TuiNotificationsService);
|
|
38
|
-
return TuiNotificationsService;
|
|
39
|
-
}());
|
|
40
|
-
export { TuiNotificationsService };
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9ucy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2NvcmUvbW9kdWxlcy9ub3RpZmljYXRpb25zLyIsInNvdXJjZXMiOlsibm90aWZpY2F0aW9ucy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUMsTUFBTSxFQUFFLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNqRCxPQUFPLEVBQUMsU0FBU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A9PiBpdGVtICE9PSBub3RpZmljYXRpb24pKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH1cbn1cbiJdfQ==
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktY29yZS1tb2R1bGVzLW5vdGlmaWNhdGlvbnMuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AdGFpZ2EtdWkvY29yZS9tb2R1bGVzL25vdGlmaWNhdGlvbnMvIiwic291cmNlcyI6WyJ0YWlnYS11aS1jb3JlLW1vZHVsZXMtbm90aWZpY2F0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpZ2EtdWktY29yZS1tb2R1bGVzLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHRhaWdhLXVpL2NvcmUvbW9kdWxlcy8iLCJzb3VyY2VzIjpbInRhaWdhLXVpLWNvcmUtbW9kdWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { ElementRef, Inject, Input, Component, ChangeDetectionStrategy, NgModule, ɵɵdefineInjectable, ɵɵinject, Injectable } from '@angular/core';
|
|
3
|
-
import { isNumber, TuiDestroyService, tuiPure, tuiAssert, TuiLetModule } from '@taiga-ui/cdk';
|
|
4
|
-
import { TUI_NOTIFICATION_OPTIONS, TUI_ANIMATION_OPTIONS } from '@taiga-ui/core/tokens';
|
|
5
|
-
import { timer, fromEvent, BehaviorSubject, Observable } from 'rxjs';
|
|
6
|
-
import { takeUntil, repeatWhen } from 'rxjs/operators';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import { TuiNotificationModule } from '@taiga-ui/core/components/notification';
|
|
9
|
-
import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
|
|
10
|
-
import { tuiFadeInList, tuiSlideInRightList, tuiHeightCollapseList } from '@taiga-ui/core/animations';
|
|
11
|
-
|
|
12
|
-
class NotificationAlert {
|
|
13
|
-
constructor(observer, content, options) {
|
|
14
|
-
this.observer = observer;
|
|
15
|
-
this.content = content;
|
|
16
|
-
this.options = options;
|
|
17
|
-
this.status = this.options.status;
|
|
18
|
-
this.hasIcon = this.options.hasIcon;
|
|
19
|
-
this.hasCloseButton = this.options.hasCloseButton;
|
|
20
|
-
this.label = this.options.label;
|
|
21
|
-
this.autoClose =
|
|
22
|
-
typeof this.options.autoClose === 'function'
|
|
23
|
-
? this.options.autoClose(this.options.status)
|
|
24
|
-
: this.options.autoClose;
|
|
25
|
-
if (options && this.withData(options)) {
|
|
26
|
-
this.data = options.data;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
withData(options) {
|
|
30
|
-
return 'data' in options;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
let TuiNotificationAlertComponent = class TuiNotificationAlertComponent {
|
|
35
|
-
constructor(elementRef, destroy$, options) {
|
|
36
|
-
this.elementRef = elementRef;
|
|
37
|
-
this.destroy$ = destroy$;
|
|
38
|
-
this.options = options;
|
|
39
|
-
}
|
|
40
|
-
ngOnInit() {
|
|
41
|
-
this.initAutoClose();
|
|
42
|
-
}
|
|
43
|
-
get context() {
|
|
44
|
-
return this.calculateContext(this.item);
|
|
45
|
-
}
|
|
46
|
-
closeNotification() {
|
|
47
|
-
this.item.observer.complete();
|
|
48
|
-
}
|
|
49
|
-
calculateContext({ status, data, label, observer, }) {
|
|
50
|
-
return {
|
|
51
|
-
$implicit: status,
|
|
52
|
-
data: data,
|
|
53
|
-
label: label,
|
|
54
|
-
closeHook: () => {
|
|
55
|
-
observer.complete();
|
|
56
|
-
},
|
|
57
|
-
emitHook: (data) => {
|
|
58
|
-
observer.next(data);
|
|
59
|
-
},
|
|
60
|
-
emitAndCloseHook: (data) => {
|
|
61
|
-
observer.next(data);
|
|
62
|
-
observer.complete();
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
initAutoClose() {
|
|
67
|
-
if (!this.item.autoClose) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
timer(isNumber(this.item.autoClose)
|
|
71
|
-
? this.item.autoClose
|
|
72
|
-
: this.options.defaultAutoCloseTime)
|
|
73
|
-
.pipe(takeUntil(fromEvent(this.elementRef.nativeElement, 'mouseenter')), repeatWhen(() => fromEvent(this.elementRef.nativeElement, 'mouseleave')), takeUntil(this.destroy$))
|
|
74
|
-
.subscribe(() => this.closeNotification());
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
TuiNotificationAlertComponent.ctorParameters = () => [
|
|
78
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
79
|
-
{ type: TuiDestroyService, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
|
|
80
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NOTIFICATION_OPTIONS,] }] }
|
|
81
|
-
];
|
|
82
|
-
__decorate([
|
|
83
|
-
Input()
|
|
84
|
-
], TuiNotificationAlertComponent.prototype, "item", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
tuiPure
|
|
87
|
-
], TuiNotificationAlertComponent.prototype, "calculateContext", null);
|
|
88
|
-
TuiNotificationAlertComponent = __decorate([
|
|
89
|
-
Component({
|
|
90
|
-
selector: 'tui-notification-alert',
|
|
91
|
-
template: "<tui-notification\n *ngIf=\"item.hasCloseButton; else noClose\"\n [status]=\"item.status\"\n [hasIcon]=\"item.hasIcon\"\n (close)=\"closeNotification()\"\n>\n <label\n *ngIf=\"item.label\"\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__heading\"\n class=\"heading\"\n [content]=\"item.label\"\n [context]=\"context\"\n ></label>\n <div\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__content\"\n class=\"content\"\n [content]=\"item.content\"\n [context]=\"context\"\n ></div>\n</tui-notification>\n<ng-template #noClose>\n <tui-notification [status]=\"item.status\" [hasIcon]=\"item.hasIcon\">\n <label\n *ngIf=\"item.label\"\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__heading\"\n class=\"heading\"\n [content]=\"item.label\"\n [context]=\"context\"\n ></label>\n <div\n polymorpheus-outlet\n automation-id=\"tui-notification-alert__content\"\n class=\"content\"\n [content]=\"item.content\"\n [context]=\"context\"\n ></div>\n </tui-notification>\n</ng-template>\n",
|
|
92
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
93
|
-
providers: [TuiDestroyService],
|
|
94
|
-
styles: [":host{box-shadow:0 .5rem 1rem rgba(0,0,0,.16);display:block;border-radius:var(--tui-radius-m)}.heading{font:var(--tui-font-text-m);line-height:1.25rem;font-weight:700;margin:0}.content{color:var(--tui-text-01);word-wrap:break-word}.content:empty{display:none}"]
|
|
95
|
-
}),
|
|
96
|
-
__param(0, Inject(ElementRef)),
|
|
97
|
-
__param(1, Inject(TuiDestroyService)),
|
|
98
|
-
__param(2, Inject(TUI_NOTIFICATION_OPTIONS))
|
|
99
|
-
], TuiNotificationAlertComponent);
|
|
100
|
-
|
|
101
|
-
let TuiNotificationAlertModule = class TuiNotificationAlertModule {
|
|
102
|
-
};
|
|
103
|
-
TuiNotificationAlertModule = __decorate([
|
|
104
|
-
NgModule({
|
|
105
|
-
imports: [CommonModule, PolymorpheusModule, TuiNotificationModule],
|
|
106
|
-
declarations: [TuiNotificationAlertComponent],
|
|
107
|
-
exports: [TuiNotificationAlertComponent],
|
|
108
|
-
})
|
|
109
|
-
], TuiNotificationAlertModule);
|
|
110
|
-
|
|
111
|
-
const NO_HOST = 'Notifications are disabled, enable support by adding TuiNotificationsModule to your main app module';
|
|
112
|
-
let TuiNotificationsService = class TuiNotificationsService {
|
|
113
|
-
constructor(options) {
|
|
114
|
-
this.options = options;
|
|
115
|
-
/** @internal */
|
|
116
|
-
this.items$ = new BehaviorSubject([]);
|
|
117
|
-
}
|
|
118
|
-
show(content, options = {}) {
|
|
119
|
-
return new Observable((observer) => {
|
|
120
|
-
tuiAssert.assert(!!this.items$.observers.length, NO_HOST);
|
|
121
|
-
const notification = new NotificationAlert(observer, content, Object.assign(Object.assign({}, this.options), options));
|
|
122
|
-
this.items$.next([...this.items$.value, notification]);
|
|
123
|
-
return () => {
|
|
124
|
-
this.items$.next(this.items$.value.filter(item => item !== notification));
|
|
125
|
-
};
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
TuiNotificationsService.ctorParameters = () => [
|
|
130
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_NOTIFICATION_OPTIONS,] }] }
|
|
131
|
-
];
|
|
132
|
-
TuiNotificationsService.ɵprov = ɵɵdefineInjectable({ factory: function TuiNotificationsService_Factory() { return new TuiNotificationsService(ɵɵinject(TUI_NOTIFICATION_OPTIONS)); }, token: TuiNotificationsService, providedIn: "root" });
|
|
133
|
-
TuiNotificationsService = __decorate([
|
|
134
|
-
Injectable({
|
|
135
|
-
providedIn: 'root',
|
|
136
|
-
}),
|
|
137
|
-
__param(0, Inject(TUI_NOTIFICATION_OPTIONS))
|
|
138
|
-
], TuiNotificationsService);
|
|
139
|
-
|
|
140
|
-
let TuiNotificationsHostComponent = class TuiNotificationsHostComponent {
|
|
141
|
-
constructor(options, service) {
|
|
142
|
-
this.options = options;
|
|
143
|
-
this.service = service;
|
|
144
|
-
}
|
|
145
|
-
getAnimation(value) {
|
|
146
|
-
return Object.assign({ value: String(value) }, this.options);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
TuiNotificationsHostComponent.ctorParameters = () => [
|
|
150
|
-
{ type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
|
|
151
|
-
{ type: TuiNotificationsService, decorators: [{ type: Inject, args: [TuiNotificationsService,] }] }
|
|
152
|
-
];
|
|
153
|
-
__decorate([
|
|
154
|
-
tuiPure
|
|
155
|
-
], TuiNotificationsHostComponent.prototype, "getAnimation", null);
|
|
156
|
-
TuiNotificationsHostComponent = __decorate([
|
|
157
|
-
Component({
|
|
158
|
-
selector: 'tui-notifications-host',
|
|
159
|
-
template: "<ng-container *tuiLet=\"service.items$ | async as items\">\n <div\n *ngIf=\"items.length\"\n class=\"t-wrapper\"\n [@tuiFadeInList]=\"getAnimation(items.length)\"\n [@tuiHeightCollapseList]=\"getAnimation(items.length)\"\n [@tuiSlideInRightList]=\"getAnimation(items.length)\"\n >\n <tui-notification-alert\n *ngFor=\"let item of items\"\n role=\"alert\"\n class=\"t-alert\"\n [item]=\"item\"\n ></tui-notification-alert>\n </div>\n</ng-container>\n",
|
|
160
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
161
|
-
animations: [tuiFadeInList, tuiSlideInRightList, tuiHeightCollapseList],
|
|
162
|
-
styles: [":host{position:fixed;top:0;left:0;width:100%;height:0}.t-wrapper{width:18rem;margin-left:auto;padding:2rem 3rem 0 0;pointer-events:none}:host-context(tui-root._mobile) .t-wrapper{padding:1rem 1rem 0 0}@media screen and (min-width:80em){.t-wrapper{width:23rem}}.t-alert{pointer-events:auto}.t-alert:not(:first-child){margin-top:.75rem}"]
|
|
163
|
-
}),
|
|
164
|
-
__param(0, Inject(TUI_ANIMATION_OPTIONS)),
|
|
165
|
-
__param(1, Inject(TuiNotificationsService))
|
|
166
|
-
], TuiNotificationsHostComponent);
|
|
167
|
-
|
|
168
|
-
// TODO: remove in ivy compilation
|
|
169
|
-
const NOTIFICATIONS_HOST = TuiNotificationsHostComponent;
|
|
170
|
-
let TuiNotificationsModule = class TuiNotificationsModule {
|
|
171
|
-
};
|
|
172
|
-
TuiNotificationsModule = __decorate([
|
|
173
|
-
NgModule({
|
|
174
|
-
imports: [CommonModule, TuiNotificationAlertModule, TuiLetModule],
|
|
175
|
-
declarations: [TuiNotificationsHostComponent],
|
|
176
|
-
exports: [TuiNotificationsHostComponent],
|
|
177
|
-
entryComponents: [TuiNotificationsHostComponent],
|
|
178
|
-
providers: [
|
|
179
|
-
{
|
|
180
|
-
provide: TuiNotificationsHostComponent,
|
|
181
|
-
useValue: NOTIFICATIONS_HOST,
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
})
|
|
185
|
-
], TuiNotificationsModule);
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Generated bundle index. Do not edit.
|
|
189
|
-
*/
|
|
190
|
-
|
|
191
|
-
export { NOTIFICATIONS_HOST, NotificationAlert, TuiNotificationAlertComponent, TuiNotificationAlertModule, TuiNotificationsHostComponent, TuiNotificationsModule, TuiNotificationsService };
|
|
192
|
-
//# sourceMappingURL=taiga-ui-core-modules-notifications.js.map
|