@taiga-ui/cdk 2.75.0 → 2.76.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/abstract/dialog.service.d.ts +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +46 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js +47 -2
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +50 -5
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +48 -3
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js +46 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +47 -2
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +46 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +52 -7
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.js +52 -7
- package/bundles/taiga-ui-cdk-directives-checked.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.js +50 -5
- package/bundles/taiga-ui-cdk-directives-drag.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js +51 -6
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-element.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +51 -6
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-for.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +50 -5
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js +56 -11
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-item.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-let.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +60 -15
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +57 -12
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-pan.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-portal.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-validator.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js +46 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js +46 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js +46 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +46 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +46 -1
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +47 -2
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +2 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.js +8 -8
- package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +2 -4
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +46 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -1
- package/classes/assert.d.ts +1 -1
- package/classes/validation-error.d.ts +1 -1
- package/coercion/coerce-boolean-property.d.ts +1 -1
- package/constants/taiga-ui-cdk-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/date-time/time.d.ts +1 -1
- package/date-time/year.d.ts +1 -1
- package/decorators/default-prop.d.ts +1 -1
- package/decorators/pure.d.ts +1 -1
- package/decorators/required-setter.d.ts +1 -1
- package/directives/active-zone/taiga-ui-cdk-directives-active-zone.metadata.json +1 -1
- package/directives/checked/checked.directive.d.ts +1 -1
- package/directives/for-async/for-async.directive.d.ts +1 -1
- package/directives/media/media.directive.d.ts +2 -2
- package/directives/media/taiga-ui-cdk-directives-media.metadata.json +1 -1
- package/enums/autocomplete.d.ts +1 -1
- package/esm2015/abstract/dialog.service.js +1 -1
- package/esm2015/classes/assert.js +1 -1
- package/esm2015/classes/validation-error.js +1 -1
- package/esm2015/coercion/coerce-boolean-property.js +1 -1
- package/esm2015/components/alert-host/alert-host.component.js +2 -2
- package/esm2015/components/dialog-host/dialog-host.component.js +5 -5
- package/esm2015/components/dropdown-host/dropdown-host.component.js +3 -3
- package/esm2015/constants/version.js +2 -2
- package/esm2015/date-time/day-range.js +1 -1
- package/esm2015/date-time/day.js +2 -2
- package/esm2015/date-time/time.js +1 -1
- package/esm2015/date-time/year.js +1 -1
- package/esm2015/decorators/default-prop.js +1 -1
- package/esm2015/decorators/pure.js +1 -1
- package/esm2015/decorators/required-setter.js +1 -1
- package/esm2015/directives/active-zone/active-zone.directive.js +4 -4
- package/esm2015/directives/auto-focus/autofocus.directive.js +2 -2
- package/esm2015/directives/autofilled/autofilled-style.component.js +2 -2
- package/esm2015/directives/autofilled/autofilled.directive.js +6 -6
- package/esm2015/directives/checked/checked.directive.js +7 -7
- package/esm2015/directives/copy-processor/copy-processor.directive.js +4 -4
- package/esm2015/directives/drag/drag.directive.js +5 -5
- package/esm2015/directives/droppable/droppable.directive.js +5 -5
- package/esm2015/directives/element/element.directive.js +3 -3
- package/esm2015/directives/focus-trap/focus-trap.directive.js +6 -6
- package/esm2015/directives/focus-visible/focus-visible.directive.js +3 -3
- package/esm2015/directives/focusable/focusable.directive.js +4 -4
- package/esm2015/directives/focused/focused.directive.js +3 -3
- package/esm2015/directives/for/for.directive.js +2 -2
- package/esm2015/directives/for-async/for-async.directive.js +2 -2
- package/esm2015/directives/high-dpi/high-dpi.directive.js +2 -2
- package/esm2015/directives/hovered/hovered.directive.js +5 -5
- package/esm2015/directives/input-mode/input-mode.directive.js +11 -11
- package/esm2015/directives/item/item.directive.js +2 -2
- package/esm2015/directives/let/let.directive.js +2 -2
- package/esm2015/directives/media/media.directive.js +18 -18
- package/esm2015/directives/obscured/obscured.directive.js +2 -2
- package/esm2015/directives/overscroll/overscroll.directive.js +12 -12
- package/esm2015/directives/pan/pan.directive.js +3 -3
- package/esm2015/directives/portal/portal.directive.js +2 -2
- package/esm2015/directives/pressed/pressed.directive.js +2 -2
- package/esm2015/directives/prevent-default/prevent-default.directive.js +4 -4
- package/esm2015/directives/repeat-times/repeat-times.directive.js +2 -2
- package/esm2015/directives/resize/resize.directive.js +3 -3
- package/esm2015/directives/swipe/swipe.directive.js +3 -3
- package/esm2015/directives/validator/validator.directive.js +2 -2
- package/esm2015/directives/zoom/zoom.directive.js +4 -4
- package/esm2015/enums/autocomplete.js +1 -1
- package/esm2015/interfaces/alert-context.js +1 -1
- package/esm2015/interfaces/swipe.js +1 -1
- package/esm2015/interfaces/zoom.js +1 -1
- package/esm2015/observables/must-be-present.js +1 -1
- package/esm2015/services/obscured.service.js +1 -1
- package/esm2015/tokens/active-element.js +2 -2
- package/esm2015/types/dialog.js +1 -1
- package/esm2015/types/event-with.js +1 -1
- package/esm2015/types/input-mode.js +1 -1
- package/esm2015/types/input-type.js +1 -1
- package/esm2015/types/overscroll-mode.js +1 -1
- package/esm2015/types/time-mode.js +1 -1
- package/esm2015/utils/dom/get-closest-element.js +1 -1
- package/esm2015/utils/dom/get-document-or-shadow-root.js +1 -1
- package/esm2015/utils/dom/get-element-obscurers.js +2 -2
- package/esm2015/utils/focus/get-native-focused.js +3 -2
- package/esm2015/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm2015/utils/math/clamp.js +4 -4
- package/esm2015/utils/math/in-range.js +4 -4
- package/esm2015/utils/math/normalize-to-int-number.js +2 -2
- package/esm2015/utils/math/round.js +2 -2
- package/esm2015/utils/math/to-int.js +1 -1
- package/esm2015/utils/miscellaneous/ease-in-out-quad.js +2 -2
- package/esm2015/utils/miscellaneous/get-swipe-direction.js +2 -4
- package/esm2015/utils/miscellaneous/uniq-by.js +1 -1
- package/esm5/abstract/dialog.service.js +1 -1
- package/esm5/classes/assert.js +1 -1
- package/esm5/classes/validation-error.js +1 -1
- package/esm5/coercion/coerce-boolean-property.js +1 -1
- package/esm5/components/alert-host/alert-host.component.js +2 -2
- package/esm5/components/dialog-host/dialog-host.component.js +5 -5
- package/esm5/components/dropdown-host/dropdown-host.component.js +3 -3
- package/esm5/constants/version.js +2 -2
- package/esm5/date-time/day-range.js +1 -1
- package/esm5/date-time/day.js +2 -2
- package/esm5/date-time/time.js +1 -1
- package/esm5/date-time/year.js +1 -1
- package/esm5/decorators/default-prop.js +1 -1
- package/esm5/decorators/pure.js +1 -1
- package/esm5/decorators/required-setter.js +1 -1
- package/esm5/directives/active-zone/active-zone.directive.js +4 -4
- package/esm5/directives/auto-focus/autofocus.directive.js +2 -2
- package/esm5/directives/autofilled/autofilled-style.component.js +2 -2
- package/esm5/directives/autofilled/autofilled.directive.js +6 -6
- package/esm5/directives/checked/checked.directive.js +7 -7
- package/esm5/directives/copy-processor/copy-processor.directive.js +4 -4
- package/esm5/directives/drag/drag.directive.js +5 -5
- package/esm5/directives/droppable/droppable.directive.js +6 -6
- package/esm5/directives/element/element.directive.js +3 -3
- package/esm5/directives/focus-trap/focus-trap.directive.js +6 -6
- package/esm5/directives/focus-visible/focus-visible.directive.js +3 -3
- package/esm5/directives/focusable/focusable.directive.js +4 -4
- package/esm5/directives/focused/focused.directive.js +3 -3
- package/esm5/directives/for/for.directive.js +2 -2
- package/esm5/directives/for-async/for-async.directive.js +2 -2
- package/esm5/directives/high-dpi/high-dpi.directive.js +2 -2
- package/esm5/directives/hovered/hovered.directive.js +5 -5
- package/esm5/directives/input-mode/input-mode.directive.js +11 -11
- package/esm5/directives/item/item.directive.js +2 -2
- package/esm5/directives/let/let.directive.js +2 -2
- package/esm5/directives/media/media.directive.js +15 -15
- package/esm5/directives/obscured/obscured.directive.js +2 -2
- package/esm5/directives/overscroll/overscroll.directive.js +12 -12
- package/esm5/directives/pan/pan.directive.js +3 -3
- package/esm5/directives/portal/portal.directive.js +2 -2
- package/esm5/directives/pressed/pressed.directive.js +2 -2
- package/esm5/directives/prevent-default/prevent-default.directive.js +4 -4
- package/esm5/directives/repeat-times/repeat-times.directive.js +2 -2
- package/esm5/directives/resize/resize.directive.js +3 -3
- package/esm5/directives/swipe/swipe.directive.js +3 -3
- package/esm5/directives/validator/validator.directive.js +2 -2
- package/esm5/directives/zoom/zoom.directive.js +4 -4
- package/esm5/enums/autocomplete.js +1 -1
- package/esm5/interfaces/alert-context.js +1 -1
- package/esm5/interfaces/swipe.js +1 -1
- package/esm5/interfaces/zoom.js +1 -1
- package/esm5/observables/must-be-present.js +1 -1
- package/esm5/services/obscured.service.js +1 -1
- package/esm5/tokens/active-element.js +2 -2
- package/esm5/types/dialog.js +1 -1
- package/esm5/types/event-with.js +1 -1
- package/esm5/types/input-mode.js +1 -1
- package/esm5/types/input-type.js +1 -1
- package/esm5/types/overscroll-mode.js +1 -1
- package/esm5/types/time-mode.js +1 -1
- package/esm5/utils/dom/get-closest-element.js +1 -1
- package/esm5/utils/dom/get-document-or-shadow-root.js +1 -1
- package/esm5/utils/dom/get-element-obscurers.js +2 -2
- package/esm5/utils/focus/get-native-focused.js +3 -2
- package/esm5/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm5/utils/math/clamp.js +4 -4
- package/esm5/utils/math/in-range.js +4 -4
- package/esm5/utils/math/normalize-to-int-number.js +2 -2
- package/esm5/utils/math/round.js +2 -2
- package/esm5/utils/math/to-int.js +1 -1
- package/esm5/utils/miscellaneous/ease-in-out-quad.js +2 -2
- package/esm5/utils/miscellaneous/get-swipe-direction.js +2 -4
- package/esm5/utils/miscellaneous/uniq-by.js +1 -1
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +4 -4
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js +2 -2
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js +6 -6
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-checked.js +6 -6
- package/fesm2015/taiga-ui-cdk-directives-checked.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-drag.js +4 -4
- package/fesm2015/taiga-ui-cdk-directives-drag.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-droppable.js +4 -4
- package/fesm2015/taiga-ui-cdk-directives-droppable.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-element.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-element.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +5 -5
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-visible.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-focus-visible.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focusable.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-focusable.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focused.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-focused.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-hovered.js +4 -4
- package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-input-mode.js +10 -10
- package/fesm2015/taiga-ui-cdk-directives-input-mode.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-item.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-item.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-let.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-let.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-media.js +17 -17
- package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-obscured.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-obscured.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js +11 -11
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pan.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-pan.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-portal.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-portal.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pressed.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pressed.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-resize.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-swipe.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-swipe.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-validator.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-validator.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-zoom.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-zoom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +2 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-math.js +8 -8
- package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +2 -4
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm5/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm5/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-alert-host.js +1 -1
- package/fesm5/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-dialog-host.js +4 -4
- package/fesm5/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-dropdown-host.js +2 -2
- package/fesm5/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-constants.js +1 -1
- package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm5/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-active-zone.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-autofilled.js +6 -6
- package/fesm5/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-checked.js +6 -6
- package/fesm5/taiga-ui-cdk-directives-checked.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-copy-processor.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-drag.js +4 -4
- package/fesm5/taiga-ui-cdk-directives-drag.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-droppable.js +5 -5
- package/fesm5/taiga-ui-cdk-directives-droppable.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-element.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-element.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focus-trap.js +5 -5
- package/fesm5/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focus-visible.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-focus-visible.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focusable.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-focusable.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focused.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-focused.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-for.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-high-dpi.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-hovered.js +4 -4
- package/fesm5/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-input-mode.js +10 -10
- package/fesm5/taiga-ui-cdk-directives-input-mode.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-item.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-item.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-let.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-let.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-media.js +14 -14
- package/fesm5/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-obscured.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-obscured.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-overscroll.js +11 -11
- package/fesm5/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-pan.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-pan.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-portal.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-portal.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-pressed.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-pressed.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-prevent-default.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-repeat-times.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-resize.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-swipe.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-swipe.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-validator.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-validator.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-zoom.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-zoom.js.map +1 -1
- package/fesm5/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm5/taiga-ui-cdk-services.js.map +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-dom.js +1 -1
- package/fesm5/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js +2 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-math.js +8 -8
- package/fesm5/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-miscellaneous.js +2 -4
- package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/interfaces/alert-context.d.ts +1 -1
- package/interfaces/swipe.d.ts +1 -1
- package/interfaces/zoom.d.ts +1 -1
- package/observables/must-be-present.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/constants/file-globs.js +2 -2
- package/schematics/ng-add/constants/modules.d.ts +4 -4
- package/schematics/ng-add/constants/modules.js +12 -12
- package/schematics/ng-add/constants/packages.js +1 -1
- package/schematics/ng-add/constants/versions.js +3 -3
- package/schematics/ng-add/index.js +7 -7
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/steps/add-taiga-icons.js +4 -4
- package/schematics/ng-add/steps/add-taiga-modules.js +4 -4
- package/schematics/ng-add/steps/add-taiga-styles.js +3 -3
- package/schematics/ng-add/steps/wrap-with-tui-root.js +12 -12
- package/schematics/ng-update/constants/consts.js +57 -57
- package/schematics/ng-update/constants/deprecated-functions.js +426 -426
- package/schematics/ng-update/constants/enums.js +109 -109
- package/schematics/ng-update/constants/modules.js +3 -3
- package/schematics/ng-update/constants/services.d.ts +2 -2
- package/schematics/ng-update/constants/services.js +16 -16
- package/schematics/ng-update/constants/templates.d.ts +1 -1
- package/schematics/ng-update/constants/templates.js +123 -123
- package/schematics/ng-update/constants/tui-interactive-selectors.js +50 -50
- package/schematics/ng-update/constants/types.d.ts +1 -1
- package/schematics/ng-update/constants/types.js +87 -87
- package/schematics/ng-update/constants/warnings.js +56 -56
- package/schematics/ng-update/index.js +14 -14
- package/schematics/ng-update/steps/migrate-date-time.js +38 -38
- package/schematics/ng-update/steps/migrate-progress.js +11 -9
- package/schematics/ng-update/steps/migrate-sliders/index.js +2 -2
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.js +28 -26
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +28 -27
- package/schematics/ng-update/steps/migrate-templates.js +24 -21
- package/schematics/ng-update/steps/miscellaneous.js +10 -10
- package/schematics/ng-update/steps/remove-module.js +1 -1
- package/schematics/ng-update/steps/rename-types.js +5 -5
- package/schematics/ng-update/steps/replace-const.js +3 -3
- package/schematics/ng-update/steps/replace-deep-import.js +2 -2
- package/schematics/ng-update/steps/replace-enums.js +3 -3
- package/schematics/ng-update/steps/replace-functions.js +8 -8
- package/schematics/ng-update/steps/replace-services.js +4 -5
- package/schematics/ng-update/steps/show-warnings.js +2 -2
- package/schematics/utils/add-unique-import.js +1 -1
- package/schematics/utils/angular/ng-component.js +1 -1
- package/schematics/utils/angular/ng-module.js +1 -1
- package/schematics/utils/colored-log.js +5 -5
- package/schematics/utils/get-named-import-references.d.ts +1 -1
- package/schematics/utils/get-named-import-references.js +2 -2
- package/schematics/utils/get-project-target-options.d.ts +1 -1
- package/schematics/utils/get-project-target-options.js +1 -1
- package/schematics/utils/get-project.js +1 -1
- package/schematics/utils/progress.js +1 -1
- package/schematics/utils/templates/elements.js +3 -3
- package/schematics/utils/templates/get-component-templates.js +9 -11
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +5 -5
- package/schematics/utils/templates/ng-component-input-manipulations.js +8 -8
- package/schematics/utils/templates/template-resource.d.ts +1 -1
- package/schematics/utils/templates/template-resource.js +3 -3
- package/services/obscured.service.d.ts +1 -1
- package/types/dialog.d.ts +2 -2
- package/types/event-with.d.ts +2 -2
- package/types/input-mode.d.ts +1 -1
- package/types/input-type.d.ts +1 -1
- package/types/overscroll-mode.d.ts +1 -1
- package/types/time-mode.d.ts +1 -1
- package/utils/dom/taiga-ui-cdk-utils-dom.metadata.json +1 -1
- package/utils/focus/set-native-mouse-focused.d.ts +1 -1
- package/utils/math/to-int.d.ts +1 -1
- package/utils/miscellaneous/uniq-by.d.ts +1 -1
- package/schematics/ng-update/constants/functions.d.ts +0 -0
- package/schematics/ng-update/constants/functions.js +0 -1
|
@@ -245,7 +245,7 @@ var TuiAutoFocusDirective = /** @class */ (function () {
|
|
|
245
245
|
], TuiAutoFocusDirective.prototype, "autoFocus", void 0);
|
|
246
246
|
TuiAutoFocusDirective = __decorate([
|
|
247
247
|
Directive({
|
|
248
|
-
selector:
|
|
248
|
+
selector: '[tuiAutoFocus]',
|
|
249
249
|
providers: TUI_AUTOFOCUS_PROVIDERS,
|
|
250
250
|
}),
|
|
251
251
|
__param(0, Inject(TUI_AUTOFOCUS_HANDLER))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["ng://@taiga-ui/cdk/directives/auto-focus/handlers/abstract.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/default.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/ios.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.options.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.directive.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.module.ts","ng://@taiga-ui/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly tuiFocusableComponent: TuiFocusableElementAccessor | null,\n protected readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return (\n this.tuiFocusableComponent?.nativeFocusableElement ||\n this.elementRef.nativeElement\n );\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches(`input, textarea`);\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = `.ng-animating`;\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus());\n } else {\n this.element.focus();\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {px} from '@taiga-ui/cdk/utils';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n// @dynamic\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(WINDOW) private readonly windowRef: Window,\n ) {\n super(tuiFocusableComponent, elementRef);\n this.patchCssStyles();\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.ngZone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus();\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLInputElement = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n\n const blurHandler = (): void => fakeInput.focus({preventScroll: true});\n const focusHandler = (): void => {\n clearTimeout(fakeFocusTimeoutId);\n\n fakeFocusTimeoutId = this.windowRef.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n\n fakeInput.removeEventListener(`blur`, blurHandler);\n fakeInput.removeEventListener(`focus`, focusHandler);\n\n elementFocusTimeoutId = this.windowRef.setTimeout(() => {\n this.element.focus({preventScroll: false});\n fakeInput.remove();\n }, duration);\n });\n };\n\n fakeInput.addEventListener(`blur`, blurHandler, {once: true});\n fakeInput.addEventListener(`focus`, focusHandler);\n\n if (this.insideDialog()) {\n this.windowRef.document.body.appendChild(fakeInput);\n } else {\n this.element.parentElement?.appendChild(fakeInput);\n }\n\n fakeInput.focus({preventScroll: true});\n }\n\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n */\n private makeFakeInput(): HTMLInputElement {\n const fakeInput: HTMLInputElement = this.renderer.createElement(`input`);\n const rect: DOMRect = this.element.getBoundingClientRect();\n\n fakeInput.style.height = px(rect.height);\n fakeInput.style.width = px(rect.width / 2);\n fakeInput.style.position = `fixed`;\n fakeInput.style.opacity = `0`;\n fakeInput.style.fontSize = px(16); // disable possible auto zoom\n fakeInput.readOnly = true; // prevent keyboard for fake input\n\n // @note: emulate position cursor before focus to real textfield element\n fakeInput.style.top = px(rect.top);\n fakeInput.style.left = px(rect.left);\n\n return fakeInput;\n }\n\n private getDurationTimeBeforeFocus(): number {\n return (\n parseFloat(\n this.windowRef\n .getComputedStyle(this.element)\n .getPropertyValue(`--tui-duration`),\n ) || 0\n );\n }\n\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n private insideDialog(): boolean {\n return !!this.element.closest(`tui-dialog`);\n }\n\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n private patchCssStyles(): void {\n const documentRef = this.windowRef.document;\n\n for (const element of [documentRef.documentElement, documentRef.body]) {\n element.style.setProperty(`overflow`, `auto`);\n element.style.setProperty(`height`, `100%`);\n }\n }\n}\n","import {\n ElementRef,\n InjectionToken,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n `Autofocusing handler`,\n);\n\n// TODO: 3.0 remove in ivy compilation\nexport function tuiAutofocusHandlerFactory(\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n elementRef: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n ngZone: NgZone,\n windowRef: Window,\n isIos: boolean,\n): TuiAutofocusHandler {\n return isIos\n ? new TuiIosAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n renderer,\n ngZone,\n windowRef,\n )\n : new TuiDefaultAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n animationFrame$,\n );\n}\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n // TODO: replace to useClass in v3.0\n useFactory: tuiAutofocusHandlerFactory,\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n WINDOW,\n TUI_IS_IOS,\n ],\n },\n];\n","import {AfterViewInit, Directive, Inject, Input} from '@angular/core';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n} from './autofocus.options';\n\n// TODO: 3.0 change input name to tuiAutoFocus and handle empty string\n@Directive({\n selector: `[tuiAutoFocus]`,\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input()\n autoFocus = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER) private readonly handler: TuiAutofocusHandler,\n ) {}\n\n ngAfterViewInit(): void {\n if (this.autoFocus) {\n this.handler.setFocus();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAUI,qCACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ,sBAAc,gDAAO;aAArB;;YACI,QACI,OAAA,IAAI,CAAC,qBAAqB,0CAAE,sBAAsB;gBAClD,IAAI,CAAC,UAAU,CAAC,aAAa,EAC/B;SACL;;;OAAA;IAED,sBAAc,2DAAkB;aAAhC;YACI,OAAO,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AS,EAAE,uBAAuB;SACrC,CAAC;QAMO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;OALzB,qBAAqB,CAajC;IAAD,4BAAC;CAbD;;;ICLA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["ng://@taiga-ui/cdk/directives/auto-focus/handlers/abstract.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/default.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/ios.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.options.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.directive.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.module.ts","ng://@taiga-ui/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly tuiFocusableComponent: TuiFocusableElementAccessor | null,\n protected readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return (\n this.tuiFocusableComponent?.nativeFocusableElement ||\n this.elementRef.nativeElement\n );\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches(`input, textarea`);\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = `.ng-animating`;\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus());\n } else {\n this.element.focus();\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {px} from '@taiga-ui/cdk/utils';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n// @dynamic\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n @Inject(NgZone) private readonly ngZone: NgZone,\n @Inject(WINDOW) private readonly windowRef: Window,\n ) {\n super(tuiFocusableComponent, elementRef);\n this.patchCssStyles();\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.ngZone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus();\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLInputElement = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n\n const blurHandler = (): void => fakeInput.focus({preventScroll: true});\n const focusHandler = (): void => {\n clearTimeout(fakeFocusTimeoutId);\n\n fakeFocusTimeoutId = this.windowRef.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n\n fakeInput.removeEventListener(`blur`, blurHandler);\n fakeInput.removeEventListener(`focus`, focusHandler);\n\n elementFocusTimeoutId = this.windowRef.setTimeout(() => {\n this.element.focus({preventScroll: false});\n fakeInput.remove();\n }, duration);\n });\n };\n\n fakeInput.addEventListener(`blur`, blurHandler, {once: true});\n fakeInput.addEventListener(`focus`, focusHandler);\n\n if (this.insideDialog()) {\n this.windowRef.document.body.appendChild(fakeInput);\n } else {\n this.element.parentElement?.appendChild(fakeInput);\n }\n\n fakeInput.focus({preventScroll: true});\n }\n\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n */\n private makeFakeInput(): HTMLInputElement {\n const fakeInput: HTMLInputElement = this.renderer.createElement(`input`);\n const rect: DOMRect = this.element.getBoundingClientRect();\n\n fakeInput.style.height = px(rect.height);\n fakeInput.style.width = px(rect.width / 2);\n fakeInput.style.position = `fixed`;\n fakeInput.style.opacity = `0`;\n fakeInput.style.fontSize = px(16); // disable possible auto zoom\n fakeInput.readOnly = true; // prevent keyboard for fake input\n\n // @note: emulate position cursor before focus to real textfield element\n fakeInput.style.top = px(rect.top);\n fakeInput.style.left = px(rect.left);\n\n return fakeInput;\n }\n\n private getDurationTimeBeforeFocus(): number {\n return (\n parseFloat(\n this.windowRef\n .getComputedStyle(this.element)\n .getPropertyValue(`--tui-duration`),\n ) || 0\n );\n }\n\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n private insideDialog(): boolean {\n return !!this.element.closest(`tui-dialog`);\n }\n\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n private patchCssStyles(): void {\n const documentRef = this.windowRef.document;\n\n for (const element of [documentRef.documentElement, documentRef.body]) {\n element.style.setProperty(`overflow`, `auto`);\n element.style.setProperty(`height`, `100%`);\n }\n }\n}\n","import {\n ElementRef,\n InjectionToken,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n `Autofocusing handler`,\n);\n\n// TODO: 3.0 remove in ivy compilation\nexport function tuiAutofocusHandlerFactory(\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n elementRef: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n ngZone: NgZone,\n windowRef: Window,\n isIos: boolean,\n): TuiAutofocusHandler {\n return isIos\n ? new TuiIosAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n renderer,\n ngZone,\n windowRef,\n )\n : new TuiDefaultAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n animationFrame$,\n );\n}\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n // TODO: replace to useClass in v3.0\n useFactory: tuiAutofocusHandlerFactory,\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n WINDOW,\n TUI_IS_IOS,\n ],\n },\n];\n","import {AfterViewInit, Directive, Inject, Input} from '@angular/core';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n} from './autofocus.options';\n\n// TODO: 3.0 change input name to tuiAutoFocus and handle empty string\n@Directive({\n selector: '[tuiAutoFocus]',\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input()\n autoFocus = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER) private readonly handler: TuiAutofocusHandler,\n ) {}\n\n ngAfterViewInit(): void {\n if (this.autoFocus) {\n this.handler.setFocus();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAUI,qCACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ,sBAAc,gDAAO;aAArB;;YACI,QACI,OAAA,IAAI,CAAC,qBAAqB,0CAAE,sBAAsB;gBAClD,IAAI,CAAC,UAAU,CAAC,aAAa,EAC/B;SACL;;;OAAA;IAED,sBAAc,2DAAkB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,gBAAgB;YAC1B,SAAS,EAAE,uBAAuB;SACrC,CAAC;QAMO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;OALzB,qBAAqB,CAajC;IAAD,4BAAC;CAbD;;;ICLA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
|
|
@@ -7,7 +7,7 @@ var TuiAutofilledStyleComponent = /** @class */ (function () {
|
|
|
7
7
|
}
|
|
8
8
|
TuiAutofilledStyleComponent = __decorate([
|
|
9
9
|
Component({
|
|
10
|
-
template:
|
|
10
|
+
template: '',
|
|
11
11
|
encapsulation: ViewEncapsulation.None,
|
|
12
12
|
styles: [".tui-autofill input,input.tui-autofill{transition:box-shadow 10ms}"]
|
|
13
13
|
})
|
|
@@ -24,7 +24,7 @@ var TuiAutofilledDirective = /** @class */ (function () {
|
|
|
24
24
|
TuiAutofilledDirective.prototype.transitionStartHandler = function (_a) {
|
|
25
25
|
var propertyName = _a.propertyName, target = _a.target;
|
|
26
26
|
var _b;
|
|
27
|
-
var matchedAutofill = propertyName.includes(
|
|
27
|
+
var matchedAutofill = propertyName.includes('box-shadow') && ((_b = target) === null || _b === void 0 ? void 0 : _b.matches('input'));
|
|
28
28
|
if (matchedAutofill) {
|
|
29
29
|
this.autofilled = !this.autofilled;
|
|
30
30
|
this.tuiAutofilledChange.emit(this.autofilled);
|
|
@@ -34,18 +34,18 @@ var TuiAutofilledDirective = /** @class */ (function () {
|
|
|
34
34
|
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] }
|
|
35
35
|
]; };
|
|
36
36
|
__decorate([
|
|
37
|
-
HostBinding(
|
|
37
|
+
HostBinding('class._autofilled')
|
|
38
38
|
], TuiAutofilledDirective.prototype, "autofilled", void 0);
|
|
39
39
|
__decorate([
|
|
40
40
|
Output()
|
|
41
41
|
], TuiAutofilledDirective.prototype, "tuiAutofilledChange", void 0);
|
|
42
42
|
__decorate([
|
|
43
|
-
HostListener(
|
|
43
|
+
HostListener('transitionstart', ['$event'])
|
|
44
44
|
], TuiAutofilledDirective.prototype, "transitionStartHandler", null);
|
|
45
45
|
TuiAutofilledDirective = __decorate([
|
|
46
46
|
Directive({
|
|
47
|
-
selector:
|
|
48
|
-
host: { class:
|
|
47
|
+
selector: '[tuiAutofilledChange]',
|
|
48
|
+
host: { class: 'tui-autofill' },
|
|
49
49
|
}),
|
|
50
50
|
__param(0, Inject(TuiDirectiveStylesService))
|
|
51
51
|
], TuiAutofilledDirective);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-autofilled.js","sources":["ng://@taiga-ui/cdk/directives/autofilled/autofilled-style.component.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.directive.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.module.ts","ng://@taiga-ui/cdk/directives/autofilled/taiga-ui-cdk-directives-autofilled.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-autofilled.js","sources":["ng://@taiga-ui/cdk/directives/autofilled/autofilled-style.component.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.directive.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.module.ts","ng://@taiga-ui/cdk/directives/autofilled/taiga-ui-cdk-directives-autofilled.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./autofilled.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiAutofilledStyleComponent {}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Output,\n} from '@angular/core';\nimport {TuiDirectiveStylesService} from '@taiga-ui/cdk/services';\n\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@Directive({\n selector: '[tuiAutofilledChange]',\n host: {class: 'tui-autofill'},\n})\nexport class TuiAutofilledDirective {\n @HostBinding('class._autofilled')\n autofilled = false;\n\n @Output()\n readonly tuiAutofilledChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiAutofilledStyleComponent);\n }\n\n @HostListener('transitionstart', ['$event'])\n transitionStartHandler({propertyName, target}: TransitionEvent): void {\n const matchedAutofill =\n propertyName.includes('box-shadow') && (target as Element)?.matches('input');\n\n if (matchedAutofill) {\n this.autofilled = !this.autofilled;\n this.tuiAutofilledChange.emit(this.autofilled);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutofilledDirective} from './autofilled.directive';\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@NgModule({\n exports: [TuiAutofilledDirective],\n entryComponents: [TuiAutofilledStyleComponent],\n declarations: [TuiAutofilledDirective, TuiAutofilledStyleComponent],\n})\nexport class TuiAutofilledModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAOA;KAA2C;IAA9B,2BAA2B;QALvC,SAAS,CAAC;YACP,QAAQ,EAAE,EAAE;YAEZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;;SACxC,CAAC;OACW,2BAA2B,CAAG;IAAD,kCAAC;CAA3C;;;ICgBI,gCACuC,eAA0C;QANjF,eAAU,GAAG,KAAK,CAAC;QAGV,wBAAmB,GAAG,IAAI,YAAY,EAAW,CAAC;QAKvD,eAAe,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;KAC7D;IAGD,uDAAsB,GAAtB,UAAuB,EAAuC;YAAtC,8BAAY,EAAE,kBAAM;;QACxC,IAAM,eAAe,GACjB,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAK,MAAkB,0CAAE,OAAO,CAAC,OAAO,EAAC,CAAC;QAEjF,IAAI,eAAe,EAAE;YACjB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;YACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAClD;KACJ;;gBAduD,yBAAyB,uBAA5E,MAAM,SAAC,yBAAyB;;IANrC;QADC,WAAW,CAAC,mBAAmB,CAAC;8DACd;IAGnB;QADC,MAAM,EAAE;uEACkD;IAS3D;QADC,YAAY,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAC;wEAS3C;IAtBQ,sBAAsB;QAJlC,SAAS,CAAC;YACP,QAAQ,EAAE,uBAAuB;YACjC,IAAI,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;SAChC,CAAC;QASO,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;OAR7B,sBAAsB,CAuBlC;IAAD,6BAAC;CAvBD;;;ICNA;KAAmC;IAAtB,mBAAmB;QAL/B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,eAAe,EAAE,CAAC,2BAA2B,CAAC;YAC9C,YAAY,EAAE,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;SACtE,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACVA;;;;;;"}
|
|
@@ -6,19 +6,19 @@ var TuiCheckedDirective = /** @class */ (function () {
|
|
|
6
6
|
this.element = element;
|
|
7
7
|
this.renderer = renderer;
|
|
8
8
|
this.tuiCheckedChange = new EventEmitter();
|
|
9
|
-
this.updateProperty(
|
|
9
|
+
this.updateProperty('checked', false);
|
|
10
10
|
}
|
|
11
11
|
Object.defineProperty(TuiCheckedDirective.prototype, "tuiChecked", {
|
|
12
12
|
set: function (checked) {
|
|
13
|
-
this.updateProperty(
|
|
14
|
-
this.updateProperty(
|
|
13
|
+
this.updateProperty('checked', checked || false);
|
|
14
|
+
this.updateProperty('indeterminate', checked === null);
|
|
15
15
|
},
|
|
16
16
|
enumerable: true,
|
|
17
17
|
configurable: true
|
|
18
18
|
});
|
|
19
19
|
TuiCheckedDirective.prototype.onChange = function (_a) {
|
|
20
20
|
var checked = _a.checked;
|
|
21
|
-
this.updateProperty(
|
|
21
|
+
this.updateProperty('indeterminate', false);
|
|
22
22
|
this.tuiCheckedChange.emit(checked);
|
|
23
23
|
};
|
|
24
24
|
TuiCheckedDirective.prototype.updateProperty = function (property, value) {
|
|
@@ -35,11 +35,11 @@ var TuiCheckedDirective = /** @class */ (function () {
|
|
|
35
35
|
Output()
|
|
36
36
|
], TuiCheckedDirective.prototype, "tuiCheckedChange", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
HostListener(
|
|
38
|
+
HostListener('change', ['$event.target'])
|
|
39
39
|
], TuiCheckedDirective.prototype, "onChange", null);
|
|
40
40
|
TuiCheckedDirective = __decorate([
|
|
41
41
|
Directive({
|
|
42
|
-
selector:
|
|
42
|
+
selector: 'input[tuiChecked], input[tuiCheckedChange]',
|
|
43
43
|
}),
|
|
44
44
|
__param(0, Inject(ElementRef)),
|
|
45
45
|
__param(1, Inject(Renderer2))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-checked.js","sources":["ng://@taiga-ui/cdk/directives/checked/checked.directive.ts","ng://@taiga-ui/cdk/directives/checked/checked.module.ts","ng://@taiga-ui/cdk/directives/checked/taiga-ui-cdk-directives-checked.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Output,\n Renderer2,\n} from '@angular/core';\n\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-checked.js","sources":["ng://@taiga-ui/cdk/directives/checked/checked.directive.ts","ng://@taiga-ui/cdk/directives/checked/checked.module.ts","ng://@taiga-ui/cdk/directives/checked/taiga-ui-cdk-directives-checked.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Output,\n Renderer2,\n} from '@angular/core';\n\n@Directive({\n selector: 'input[tuiChecked], input[tuiCheckedChange]',\n})\nexport class TuiCheckedDirective {\n @Input()\n set tuiChecked(checked: boolean | null) {\n this.updateProperty('checked', checked || false);\n this.updateProperty('indeterminate', checked === null);\n }\n\n @Output()\n readonly tuiCheckedChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(ElementRef)\n private readonly element: ElementRef<HTMLInputElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n this.updateProperty('checked', false);\n }\n\n @HostListener('change', ['$event.target'])\n onChange({checked}: HTMLInputElement): void {\n this.updateProperty('indeterminate', false);\n this.tuiCheckedChange.emit(checked);\n }\n\n private updateProperty(property: 'checked' | 'indeterminate', value: boolean): void {\n this.renderer.setProperty(this.element.nativeElement, property, value);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCheckedDirective} from './checked.directive';\n\n@NgModule({\n declarations: [TuiCheckedDirective],\n exports: [TuiCheckedDirective],\n})\nexport class TuiCheckedModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAwBI,6BAEqB,OAAqC,EAClB,QAAmB;QADtC,YAAO,GAAP,OAAO,CAA8B;QAClB,aAAQ,GAAR,QAAQ,CAAW;QALlD,qBAAgB,GAAG,IAAI,YAAY,EAAW,CAAC;QAOpD,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KACzC;IAdD,sBAAI,2CAAU;aAAd,UAAe,OAAuB;YAClC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,IAAI,KAAK,CAAC,CAAC;YACjD,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC;SAC1D;;;OAAA;IAcD,sCAAQ,GAAR,UAAS,EAA2B;YAA1B,oBAAO;QACb,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACvC;IAEO,4CAAc,GAAtB,UAAuB,QAAqC,EAAE,KAAc;QACxE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;KAC1E;;gBAd6B,UAAU,uBADnC,MAAM,SAAC,UAAU;gBAE4B,SAAS,uBAAtD,MAAM,SAAC,SAAS;;IAXrB;QADC,KAAK,EAAE;yDAIP;IAGD;QADC,MAAM,EAAE;iEAC+C;IAWxD;QADC,YAAY,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC;uDAIzC;IAtBQ,mBAAmB;QAH/B,SAAS,CAAC;YACP,QAAQ,EAAE,4CAA4C;SACzD,CAAC;QAYO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;OAbb,mBAAmB,CA2B/B;IAAD,0BAAC;CA3BD;;;ICNA;KAAgC;IAAnB,gBAAgB;QAJ5B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
|
|
@@ -15,7 +15,7 @@ var TuiCopyProcessorDirective = /** @class */ (function () {
|
|
|
15
15
|
var _a;
|
|
16
16
|
var text = tuiGetSelectedText(this.windowRef);
|
|
17
17
|
if (text) {
|
|
18
|
-
(_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.setData(
|
|
18
|
+
(_a = event.clipboardData) === null || _a === void 0 ? void 0 : _a.setData('text/plain', this.tuiCopyProcessor(text));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
TuiCopyProcessorDirective.ctorParameters = function () { return [
|
|
@@ -26,11 +26,11 @@ var TuiCopyProcessorDirective = /** @class */ (function () {
|
|
|
26
26
|
tuiDefaultProp()
|
|
27
27
|
], TuiCopyProcessorDirective.prototype, "tuiCopyProcessor", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
HostListener(
|
|
29
|
+
HostListener('copy.prevent', ['$event'])
|
|
30
30
|
], TuiCopyProcessorDirective.prototype, "onCopy", null);
|
|
31
31
|
TuiCopyProcessorDirective = __decorate([
|
|
32
32
|
Directive({
|
|
33
|
-
selector:
|
|
33
|
+
selector: '[tuiCopyProcessor]',
|
|
34
34
|
}),
|
|
35
35
|
__param(0, Inject(WINDOW))
|
|
36
36
|
], TuiCopyProcessorDirective);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-copy-processor.js","sources":["ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.directive.ts","ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.module.ts","ng://@taiga-ui/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, HostListener, Inject, Input} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\nimport {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiGetSelectedText} from '@taiga-ui/cdk/utils';\nimport {identity} from 'rxjs';\n\n// @dynamic\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-copy-processor.js","sources":["ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.directive.ts","ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.module.ts","ng://@taiga-ui/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, HostListener, Inject, Input} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\nimport {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiGetSelectedText} from '@taiga-ui/cdk/utils';\nimport {identity} from 'rxjs';\n\n// @dynamic\n@Directive({\n selector: '[tuiCopyProcessor]',\n})\nexport class TuiCopyProcessorDirective {\n @Input()\n @tuiDefaultProp()\n tuiCopyProcessor: TuiStringHandler<string> = identity;\n\n constructor(@Inject(WINDOW) private readonly windowRef: Window) {}\n\n @HostListener('copy.prevent', ['$event'])\n onCopy(event: ClipboardEvent): void {\n const text = tuiGetSelectedText(this.windowRef);\n\n if (text) {\n event.clipboardData?.setData('text/plain', this.tuiCopyProcessor(text));\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCopyProcessorDirective} from './copy-processor.directive';\n\n@NgModule({\n declarations: [TuiCopyProcessorDirective],\n exports: [TuiCopyProcessorDirective],\n})\nexport class TuiCopyProcessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAOA;;IASI,mCAA6C,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QAF9D,qBAAgB,GAA6B,QAAQ,CAAC;KAEY;IAGlE,0CAAM,GAAN,UAAO,KAAqB;;QACxB,IAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEhD,IAAI,IAAI,EAAE;YACN,MAAA,KAAK,CAAC,aAAa,0CAAE,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE;SAC3E;KACJ;;gBATuD,MAAM,uBAAjD,MAAM,SAAC,MAAM;;IAF1B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;uEACqC;IAKtD;QADC,YAAY,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC;2DAOxC;IAdQ,yBAAyB;QAHrC,SAAS,CAAC;YACP,QAAQ,EAAE,oBAAoB;SACjC,CAAC;QAMe,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;OALlB,yBAAyB,CAerC;IAAD,gCAAC;CAfD;;;ICHA;KAAsC;IAAzB,sBAAsB;QAJlC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;YACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;OACW,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;ACRA;;;;;;"}
|
|
@@ -33,17 +33,17 @@ var TuiDragDirective = /** @class */ (function () {
|
|
|
33
33
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
|
34
34
|
]; };
|
|
35
35
|
__decorate([
|
|
36
|
-
Output(
|
|
36
|
+
Output('tuiDragStart')
|
|
37
37
|
], TuiDragDirective.prototype, "start", void 0);
|
|
38
38
|
__decorate([
|
|
39
|
-
Output(
|
|
39
|
+
Output('tuiDragContinues')
|
|
40
40
|
], TuiDragDirective.prototype, "continues", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
Output(
|
|
42
|
+
Output('tuiDragEnd')
|
|
43
43
|
], TuiDragDirective.prototype, "end", void 0);
|
|
44
44
|
TuiDragDirective = __decorate([
|
|
45
45
|
Directive({
|
|
46
|
-
selector:
|
|
46
|
+
selector: '[tuiDragStart], [tuiDragContinues], [tuiDragEnd]',
|
|
47
47
|
}),
|
|
48
48
|
__param(0, Inject(ElementRef))
|
|
49
49
|
], TuiDragDirective);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-drag.js","sources":["ng://@taiga-ui/cdk/directives/drag/drag.directive.ts","ng://@taiga-ui/cdk/directives/drag/drag.module.ts","ng://@taiga-ui/cdk/directives/drag/taiga-ui-cdk-directives-drag.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {dragAndDropFrom, TuiDragStage} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\n\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-drag.js","sources":["ng://@taiga-ui/cdk/directives/drag/drag.directive.ts","ng://@taiga-ui/cdk/directives/drag/drag.module.ts","ng://@taiga-ui/cdk/directives/drag/taiga-ui-cdk-directives-drag.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {dragAndDropFrom, TuiDragStage} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {filter, map} from 'rxjs/operators';\n\n@Directive({\n selector: '[tuiDragStart], [tuiDragContinues], [tuiDragEnd]',\n})\nexport class TuiDragDirective {\n private readonly dragAndDropFrom$ = dragAndDropFrom(this.elementRef.nativeElement);\n\n @Output('tuiDragStart')\n readonly start: Observable<MouseEvent> = this.dragAndDropFrom$.pipe(\n filter(({stage}) => stage === TuiDragStage.Start),\n map(({event}) => event),\n );\n\n @Output('tuiDragContinues')\n readonly continues: Observable<MouseEvent> = this.dragAndDropFrom$.pipe(\n filter(({stage}) => stage === TuiDragStage.Continues),\n map(({event}) => event),\n );\n\n @Output('tuiDragEnd')\n readonly end: Observable<MouseEvent> = this.dragAndDropFrom$.pipe(\n filter(({stage}) => stage === TuiDragStage.End),\n map(({event}) => event),\n );\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<Element>,\n ) {}\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiDragDirective} from './drag.directive';\n\n@NgModule({\n declarations: [TuiDragDirective],\n exports: [TuiDragDirective],\n})\nexport class TuiDragModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;IA6BI,0BAEqB,UAA+B;QAA/B,eAAU,GAAV,UAAU,CAAqB;QAtBnC,qBAAgB,GAAG,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QAG1E,UAAK,GAA2B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAC/D,MAAM,CAAC,UAAC,EAAO;gBAAN,gBAAK;YAAM,OAAA,KAAK;SAAuB,CAAC,EACjD,GAAG,CAAC,UAAC,EAAO;gBAAN,gBAAK;YAAM,OAAA,KAAK;SAAA,CAAC,CAC1B,CAAC;QAGO,cAAS,GAA2B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CACnE,MAAM,CAAC,UAAC,EAAO;gBAAN,gBAAK;YAAM,OAAA,KAAK;SAA2B,CAAC,EACrD,GAAG,CAAC,UAAC,EAAO;gBAAN,gBAAK;YAAM,OAAA,KAAK;SAAA,CAAC,CAC1B,CAAC;QAGO,QAAG,GAA2B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAC7D,MAAM,CAAC,UAAC,EAAO;gBAAN,gBAAK;YAAM,OAAA,KAAK;SAAqB,CAAC,EAC/C,GAAG,CAAC,UAAC,EAAO;gBAAN,gBAAK;YAAM,OAAA,KAAK;SAAA,CAAC,CAC1B,CAAC;KAKE;;gBAD6B,UAAU,uBADtC,MAAM,SAAC,UAAU;;IAlBtB;QADC,MAAM,CAAC,cAAc,CAAC;mDAIrB;IAGF;QADC,MAAM,CAAC,kBAAkB,CAAC;uDAIzB;IAGF;QADC,MAAM,CAAC,YAAY,CAAC;iDAInB;IAnBO,gBAAgB;QAH5B,SAAS,CAAC;YACP,QAAQ,EAAE,kDAAkD;SAC/D,CAAC;QAuBO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;OAtBd,gBAAgB,CAyB5B;IAAD,uBAAC;CAzBD;;;ICAA;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
|
|
@@ -10,13 +10,13 @@ import { map, filter, switchMap, mapTo, startWith, distinctUntilChanged, takeUnt
|
|
|
10
10
|
var TuiDroppableDirective = /** @class */ (function () {
|
|
11
11
|
function TuiDroppableDirective(_a, destroy$) {
|
|
12
12
|
var nativeElement = _a.nativeElement;
|
|
13
|
-
this.tuiDroppableDropped = typedFromEvent(nativeElement,
|
|
14
|
-
this.tuiDroppableDragOverChange = typedFromEvent(nativeElement,
|
|
13
|
+
this.tuiDroppableDropped = typedFromEvent(nativeElement, 'drop').pipe(preventDefault(), map(function (event) { return event.dataTransfer; }), filter(isPresent));
|
|
14
|
+
this.tuiDroppableDragOverChange = typedFromEvent(nativeElement, 'dragenter').pipe(switchMap(function (_a) {
|
|
15
15
|
var target = _a.target, dataTransfer = _a.dataTransfer;
|
|
16
|
-
return merge(typedFromEvent(nativeElement,
|
|
16
|
+
return merge(typedFromEvent(nativeElement, 'dragleave').pipe(filter(function (event) { return event.target === target; })), typedFromEvent(nativeElement, 'drop')).pipe(mapTo(null), startWith(dataTransfer));
|
|
17
17
|
}), distinctUntilChanged(function (a, b) { return (!!a && !!b) || (!a && !b); }));
|
|
18
18
|
// Required by Drag and Drop API to stop redirecting
|
|
19
|
-
typedFromEvent(nativeElement,
|
|
19
|
+
typedFromEvent(nativeElement, 'dragover')
|
|
20
20
|
.pipe(preventDefault(), takeUntil(destroy$))
|
|
21
21
|
.subscribe();
|
|
22
22
|
}
|
|
@@ -32,7 +32,7 @@ var TuiDroppableDirective = /** @class */ (function () {
|
|
|
32
32
|
], TuiDroppableDirective.prototype, "tuiDroppableDragOverChange", void 0);
|
|
33
33
|
TuiDroppableDirective = __decorate([
|
|
34
34
|
Directive({
|
|
35
|
-
selector:
|
|
35
|
+
selector: '[tuiDroppableDropped], [tuiDroppableDragOverChange]',
|
|
36
36
|
providers: [TuiDestroyService],
|
|
37
37
|
}),
|
|
38
38
|
__param(0, Inject(ElementRef)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-droppable.js","sources":["ng://@taiga-ui/cdk/directives/droppable/droppable.directive.ts","ng://@taiga-ui/cdk/directives/droppable/droppable.module.ts","ng://@taiga-ui/cdk/directives/droppable/taiga-ui-cdk-directives-droppable.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {preventDefault, typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {isPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n mapTo,\n startWith,\n switchMap,\n takeUntil,\n} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-droppable.js","sources":["ng://@taiga-ui/cdk/directives/droppable/droppable.directive.ts","ng://@taiga-ui/cdk/directives/droppable/droppable.module.ts","ng://@taiga-ui/cdk/directives/droppable/taiga-ui-cdk-directives-droppable.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, Output} from '@angular/core';\nimport {preventDefault, typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TuiDestroyService} from '@taiga-ui/cdk/services';\nimport {isPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n mapTo,\n startWith,\n switchMap,\n takeUntil,\n} from 'rxjs/operators';\n\n// @dynamic\n@Directive({\n selector: '[tuiDroppableDropped], [tuiDroppableDragOverChange]',\n providers: [TuiDestroyService],\n})\nexport class TuiDroppableDirective {\n @Output()\n readonly tuiDroppableDropped: Observable<DataTransfer>;\n\n @Output()\n readonly tuiDroppableDragOverChange: Observable<DataTransfer | null>;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TuiDestroyService) destroy$: Observable<void>,\n ) {\n this.tuiDroppableDropped = typedFromEvent(nativeElement, 'drop').pipe(\n preventDefault(),\n map(event => event.dataTransfer),\n filter(isPresent),\n );\n\n this.tuiDroppableDragOverChange = typedFromEvent(nativeElement, 'dragenter').pipe(\n switchMap(({target, dataTransfer}) =>\n merge(\n typedFromEvent(nativeElement, 'dragleave').pipe(\n filter(event => event.target === target),\n ),\n typedFromEvent(nativeElement, 'drop'),\n ).pipe(mapTo(null), startWith(dataTransfer)),\n ),\n distinctUntilChanged((a, b) => (!!a && !!b) || (!a && !b)),\n );\n\n // Required by Drag and Drop API to stop redirecting\n typedFromEvent(nativeElement, 'dragover')\n .pipe(preventDefault(), takeUntil(destroy$))\n .subscribe();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiDroppableDirective} from './droppable.directive';\n\n@NgModule({\n declarations: [TuiDroppableDirective],\n exports: [TuiDroppableDirective],\n})\nexport class TuiDroppableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAeA;;IAYI,+BACwB,EAAwC,EACjC,QAA0B;YADhC,gCAAa;QAGlC,IAAI,CAAC,mBAAmB,GAAG,cAAc,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,IAAI,CACjE,cAAc,EAAE,EAChB,GAAG,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,YAAY,GAAA,CAAC,EAChC,MAAM,CAAC,SAAS,CAAC,CACpB,CAAC;QAEF,IAAI,CAAC,0BAA0B,GAAG,cAAc,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,IAAI,CAC7E,SAAS,CAAC,UAAC,EAAsB;gBAArB,kBAAM,EAAE,8BAAY;YAC5B,OAAA,KAAK,CACD,cAAc,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,IAAI,CAC3C,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,MAAM,KAAK,MAAM,GAAA,CAAC,CAC3C,EACD,cAAc,CAAC,aAAa,EAAE,MAAM,CAAC,CACxC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;SAAA,CAC/C,EACD,oBAAoB,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAA,CAAC,CAC7D,CAAC;;QAGF,cAAc,CAAC,aAAa,EAAE,UAAU,CAAC;aACpC,IAAI,CAAC,cAAc,EAAE,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;aAC3C,SAAS,EAAE,CAAC;KACpB;;gBAzBwC,UAAU,uBAA9C,MAAM,SAAC,UAAU;gBACmB,UAAU,uBAA9C,MAAM,SAAC,iBAAiB;;IAP7B;QADC,MAAM,EAAE;sEAC8C;IAGvD;QADC,MAAM,EAAE;6EAC4D;IAL5D,qBAAqB;QAJjC,SAAS,CAAC;YACP,QAAQ,EAAE,qDAAqD;YAC/D,SAAS,EAAE,CAAC,iBAAiB,CAAC;SACjC,CAAC;QASO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;OATrB,qBAAqB,CAkCjC;IAAD,4BAAC;CAlCD;;;ICZA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
|
|
@@ -12,8 +12,8 @@ var TuiElementDirective = /** @class */ (function (_super) {
|
|
|
12
12
|
]; };
|
|
13
13
|
TuiElementDirective = __decorate([
|
|
14
14
|
Directive({
|
|
15
|
-
selector:
|
|
16
|
-
exportAs:
|
|
15
|
+
selector: '[tuiElement]',
|
|
16
|
+
exportAs: 'elementRef',
|
|
17
17
|
}),
|
|
18
18
|
__param(0, Inject(ElementRef))
|
|
19
19
|
], TuiElementDirective);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-element.js","sources":["ng://@taiga-ui/cdk/directives/element/element.directive.ts","ng://@taiga-ui/cdk/directives/element/element.module.ts","ng://@taiga-ui/cdk/directives/element/taiga-ui-cdk-directives-element.ts"],"sourcesContent":["import {Directive, ElementRef, Inject} from '@angular/core';\n\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-element.js","sources":["ng://@taiga-ui/cdk/directives/element/element.directive.ts","ng://@taiga-ui/cdk/directives/element/element.module.ts","ng://@taiga-ui/cdk/directives/element/taiga-ui-cdk-directives-element.ts"],"sourcesContent":["import {Directive, ElementRef, Inject} from '@angular/core';\n\n@Directive({\n selector: '[tuiElement]',\n exportAs: 'elementRef',\n})\nexport class TuiElementDirective<T extends Element = HTMLElement> extends ElementRef<T> {\n constructor(@Inject(ElementRef) {nativeElement}: ElementRef<T>) {\n super(nativeElement);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiElementDirective} from './element.directive';\n\n@NgModule({\n declarations: [TuiElementDirective],\n exports: [TuiElementDirective],\n})\nexport class TuiElementModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAM0E,uCAAa;IACnF,6BAAgC,EAA8B;YAA7B,gCAAa;eAC1C,kBAAM,aAAa,CAAC;KACvB;;gBAFgD,UAAU,uBAA9C,MAAM,SAAC,UAAU;;IADrB,mBAAmB;QAJ/B,SAAS,CAAC;YACP,QAAQ,EAAE,cAAc;YACxB,QAAQ,EAAE,YAAY;SACzB,CAAC;QAEe,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;OADtB,mBAAmB,CAI/B;IAAD,0BAAC;CAAA,CAJyE,UAAU;;;ICEpF;KAAgC;IAAnB,gBAAgB;QAJ5B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
|
|
@@ -23,7 +23,7 @@ var TuiFocusTrapDirective = /** @class */ (function () {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
TuiFocusTrapDirective.prototype.onBlur = function () {
|
|
26
|
-
this.renderer.removeAttribute(this.elementRef.nativeElement,
|
|
26
|
+
this.renderer.removeAttribute(this.elementRef.nativeElement, 'tabIndex');
|
|
27
27
|
};
|
|
28
28
|
TuiFocusTrapDirective.prototype.onFocusIn = function (node) {
|
|
29
29
|
if (containsOrAfter(this.elementRef.nativeElement, node)) {
|
|
@@ -57,16 +57,16 @@ var TuiFocusTrapDirective = /** @class */ (function () {
|
|
|
57
57
|
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] }
|
|
58
58
|
]; };
|
|
59
59
|
__decorate([
|
|
60
|
-
HostListener(
|
|
60
|
+
HostListener('blur')
|
|
61
61
|
], TuiFocusTrapDirective.prototype, "onBlur", null);
|
|
62
62
|
__decorate([
|
|
63
|
-
HostListener(
|
|
63
|
+
HostListener('window:focusin.silent', ['$event.target'])
|
|
64
64
|
], TuiFocusTrapDirective.prototype, "onFocusIn", null);
|
|
65
65
|
TuiFocusTrapDirective = __decorate([
|
|
66
66
|
Directive({
|
|
67
|
-
selector:
|
|
67
|
+
selector: '[tuiFocusTrap]',
|
|
68
68
|
host: {
|
|
69
|
-
tabIndex:
|
|
69
|
+
tabIndex: '0',
|
|
70
70
|
},
|
|
71
71
|
}),
|
|
72
72
|
__param(0, Inject(DOCUMENT)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.js","sources":["ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.directive.ts","ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.module.ts","ng://@taiga-ui/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport {containsOrAfter} from '@taiga-ui/cdk/utils/dom';\nimport {\n blurNativeFocused,\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n} from '@taiga-ui/cdk/utils/focus';\n\n// @dynamic\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.js","sources":["ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.directive.ts","ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.module.ts","ng://@taiga-ui/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport {containsOrAfter} from '@taiga-ui/cdk/utils/dom';\nimport {\n blurNativeFocused,\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n} from '@taiga-ui/cdk/utils/focus';\n\n// @dynamic\n@Directive({\n selector: '[tuiFocusTrap]',\n host: {\n tabIndex: '0',\n },\n})\nexport class TuiFocusTrapDirective implements OnDestroy {\n private readonly activeElement = getNativeFocused(this.documentRef);\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n /**\n * This would cause currently focused element to lose focus,\n * but it might cause ExpressionChanged error due to potential HostBinding.\n * Microtask keeps it in the same frame but allows change detection to run\n */\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.resolve().then(() => {\n setNativeFocused(this.elementRef.nativeElement);\n });\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'tabIndex');\n }\n\n @HostListener('window:focusin.silent', ['$event.target'])\n onFocusIn(node: Node): void {\n if (containsOrAfter(this.elementRef.nativeElement, node)) {\n return;\n }\n\n const focusable = getClosestFocusable(\n this.elementRef.nativeElement,\n false,\n this.elementRef.nativeElement,\n );\n\n if (focusable) {\n setNativeFocused(focusable);\n }\n }\n\n ngOnDestroy(): void {\n blurNativeFocused(this.documentRef);\n\n /**\n * HostListeners are triggered even after ngOnDestroy\n * {@link https://github.com/angular/angular/issues/38100}\n * so we need to delay it but stay in the same sync cycle,\n * therefore using Promise instead of setTimeout\n */\n // eslint-disable-next-line\n Promise.resolve().then(() => {\n // TODO: iframe warning\n if (this.activeElement instanceof HTMLElement) {\n setNativeFocused(this.activeElement);\n }\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFocusTrapDirective} from './focus-trap.directive';\n\n@NgModule({\n declarations: [TuiFocusTrapDirective],\n exports: [TuiFocusTrapDirective],\n})\nexport class TuiFocusTrapModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAiBA;;IAUI,+BACuC,WAAqB,EAEvC,UAAmC,EAChB,QAAmB;QAJ3D,iBAeC;QAdsC,gBAAW,GAAX,WAAW,CAAU;QAEvC,eAAU,GAAV,UAAU,CAAyB;QAChB,aAAQ,GAAR,QAAQ,CAAW;QAN1C,kBAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;;;;;;QAchE,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC;YACnB,gBAAgB,CAAC,KAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;SACnD,CAAC,CAAC;KACN;IAGD,sCAAM,GAAN;QACI,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;KAC5E;IAGD,yCAAS,GAAT,UAAU,IAAU;QAChB,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE;YACtD,OAAO;SACV;QAED,IAAM,SAAS,GAAG,mBAAmB,CACjC,IAAI,CAAC,UAAU,CAAC,aAAa,EAC7B,KAAK,EACL,IAAI,CAAC,UAAU,CAA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
|
-
selector:
|
|
22
|
-
outputs: [
|
|
21
|
+
selector: '[tuiFocusVisibleChange]',
|
|
22
|
+
outputs: ['tuiFocusVisibleChange'],
|
|
23
23
|
providers: [TuiDestroyService, TuiFocusVisibleService],
|
|
24
24
|
}),
|
|
25
25
|
__param(0, Inject(TuiFocusVisibleService))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focus-visible.js","sources":["ng://@taiga-ui/cdk/directives/focus-visible/focus-visible.directive.ts","ng://@taiga-ui/cdk/directives/focus-visible/focus-visible.module.ts","ng://@taiga-ui/cdk/directives/focus-visible/taiga-ui-cdk-directives-focus-visible.ts"],"sourcesContent":["import {Directive, Inject} from '@angular/core';\nimport {TuiDestroyService, TuiFocusVisibleService} from '@taiga-ui/cdk/services';\nimport {Observable} from 'rxjs';\n\n/**\n * Directive to imitate :focus-visible\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)\n * in browsers that do not support it\n * @dynamic\n */\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focus-visible.js","sources":["ng://@taiga-ui/cdk/directives/focus-visible/focus-visible.directive.ts","ng://@taiga-ui/cdk/directives/focus-visible/focus-visible.module.ts","ng://@taiga-ui/cdk/directives/focus-visible/taiga-ui-cdk-directives-focus-visible.ts"],"sourcesContent":["import {Directive, Inject} from '@angular/core';\nimport {TuiDestroyService, TuiFocusVisibleService} from '@taiga-ui/cdk/services';\nimport {Observable} from 'rxjs';\n\n/**\n * Directive to imitate :focus-visible\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)\n * in browsers that do not support it\n * @dynamic\n */\n@Directive({\n selector: '[tuiFocusVisibleChange]',\n outputs: ['tuiFocusVisibleChange'],\n providers: [TuiDestroyService, TuiFocusVisibleService],\n})\nexport class TuiFocusVisibleDirective {\n constructor(\n @Inject(TuiFocusVisibleService)\n readonly tuiFocusVisibleChange: Observable<boolean>,\n ) {}\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFocusVisibleDirective} from './focus-visible.directive';\n\n@NgModule({\n declarations: [TuiFocusVisibleDirective],\n exports: [TuiFocusVisibleDirective],\n})\nexport class TuiFocusVisibleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA;;;;;;;IAYI,kCAEa,qBAA0C;QAA1C,0BAAqB,GAArB,qBAAqB,CAAqB;KACnD;;gBADgC,UAAU,uBADzC,MAAM,SAAC,sBAAsB;;IAFzB,wBAAwB;QALpC,SAAS,CAAC;YACP,QAAQ,EAAE,yBAAyB;YACnC,OAAO,EAAE,CAAC,uBAAuB,CAAC;YAClC,SAAS,EAAE,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;SACzD,CAAC;QAGO,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;OAF1B,wBAAwB,CAKpC;IAAD,+BAAC;CALD;;;ICPA;KAAqC;IAAxB,qBAAqB;QAJjC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,wBAAwB,CAAC;YACxC,OAAO,EAAE,CAAC,wBAAwB,CAAC;SACtC,CAAC;OACW,qBAAqB,CAAG;IAAD,4BAAC;CAArC;;ACRA;;;;;;"}
|
|
@@ -19,14 +19,14 @@ var TuiFocusableDirective = /** @class */ (function () {
|
|
|
19
19
|
configurable: true
|
|
20
20
|
});
|
|
21
21
|
__decorate([
|
|
22
|
-
Input(
|
|
22
|
+
Input('tuiFocusable')
|
|
23
23
|
], TuiFocusableDirective.prototype, "focusable", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
HostBinding(
|
|
25
|
+
HostBinding('tabIndex')
|
|
26
26
|
], TuiFocusableDirective.prototype, "tabIndex", null);
|
|
27
27
|
TuiFocusableDirective = __decorate([
|
|
28
28
|
Directive({
|
|
29
|
-
selector:
|
|
29
|
+
selector: '[tuiFocusable]',
|
|
30
30
|
})
|
|
31
31
|
], TuiFocusableDirective);
|
|
32
32
|
return TuiFocusableDirective;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focusable.js","sources":["ng://@taiga-ui/cdk/directives/focusable/focusable.directive.ts","ng://@taiga-ui/cdk/directives/focusable/focusable.module.ts","ng://@taiga-ui/cdk/directives/focusable/taiga-ui-cdk-directives-focusable.ts"],"sourcesContent":["import {Directive, HostBinding, Input} from '@angular/core';\n\n/**\n * Abstraction over `tabindex`\n */\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focusable.js","sources":["ng://@taiga-ui/cdk/directives/focusable/focusable.directive.ts","ng://@taiga-ui/cdk/directives/focusable/focusable.module.ts","ng://@taiga-ui/cdk/directives/focusable/taiga-ui-cdk-directives-focusable.ts"],"sourcesContent":["import {Directive, HostBinding, Input} from '@angular/core';\n\n/**\n * Abstraction over `tabindex`\n */\n@Directive({\n selector: '[tuiFocusable]',\n})\nexport class TuiFocusableDirective {\n /**\n * Element can be focused with keyboard\n */\n @Input('tuiFocusable')\n focusable = true;\n\n @HostBinding('tabIndex')\n get tabIndex(): number {\n return this.focusable ? 0 : -1;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFocusableDirective} from './focusable.directive';\n\n@NgModule({\n declarations: [TuiFocusableDirective],\n exports: [TuiFocusableDirective],\n})\nexport class TuiFocusableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;IAMA;;;;QAKI,cAAS,GAAG,IAAI,CAAC;KAMpB;IAHG,sBAAI,2CAAQ;aAAZ;YACI,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SAClC;;;OAAA;IALD;QADC,KAAK,CAAC,cAAc,CAAC;4DACL;IAGjB;QADC,WAAW,CAAC,UAAU,CAAC;yDAGvB;IAVQ,qBAAqB;QAHjC,SAAS,CAAC;YACP,QAAQ,EAAE,gBAAgB;SAC7B,CAAC;OACW,qBAAqB,CAWjC;IAAD,4BAAC;CAXD;;;ICAA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
|
|
@@ -13,7 +13,7 @@ import { map, startWith, distinctUntilChanged, skip } from 'rxjs/operators';
|
|
|
13
13
|
var TuiFocusedDirective = /** @class */ (function () {
|
|
14
14
|
function TuiFocusedDirective(_a, ngZone) {
|
|
15
15
|
var nativeElement = _a.nativeElement;
|
|
16
|
-
this.tuiFocusedChange = merge(typedFromEvent(nativeElement,
|
|
16
|
+
this.tuiFocusedChange = merge(typedFromEvent(nativeElement, 'focusin'), typedFromEvent(nativeElement, 'focusout')).pipe(map(function () { return isNativeFocused(nativeElement); }), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized(ngZone));
|
|
17
17
|
}
|
|
18
18
|
TuiFocusedDirective.ctorParameters = function () { return [
|
|
19
19
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
@@ -24,7 +24,7 @@ var TuiFocusedDirective = /** @class */ (function () {
|
|
|
24
24
|
], TuiFocusedDirective.prototype, "tuiFocusedChange", void 0);
|
|
25
25
|
TuiFocusedDirective = __decorate([
|
|
26
26
|
Directive({
|
|
27
|
-
selector:
|
|
27
|
+
selector: '[tuiFocusedChange]',
|
|
28
28
|
}),
|
|
29
29
|
__param(0, Inject(ElementRef)),
|
|
30
30
|
__param(1, Inject(NgZone))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focused.js","sources":["ng://@taiga-ui/cdk/directives/focused/focused.directive.ts","ng://@taiga-ui/cdk/directives/focused/focused.module.ts","ng://@taiga-ui/cdk/directives/focused/taiga-ui-cdk-directives-focused.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, NgZone, Output} from '@angular/core';\nimport {tuiZoneOptimized, typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {isNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {merge, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, skip, startWith} from 'rxjs/operators';\n\n/**\n * Directive to monitor focus/blur status, works with focusIn/focus-out\n * instead of focus/blur to sync events order with Internet Explorer and\n * other focus related directives that require bubbling\n */\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focused.js","sources":["ng://@taiga-ui/cdk/directives/focused/focused.directive.ts","ng://@taiga-ui/cdk/directives/focused/focused.module.ts","ng://@taiga-ui/cdk/directives/focused/taiga-ui-cdk-directives-focused.ts"],"sourcesContent":["import {Directive, ElementRef, Inject, NgZone, Output} from '@angular/core';\nimport {tuiZoneOptimized, typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {isNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {merge, Observable} from 'rxjs';\nimport {distinctUntilChanged, map, skip, startWith} from 'rxjs/operators';\n\n/**\n * Directive to monitor focus/blur status, works with focusIn/focus-out\n * instead of focus/blur to sync events order with Internet Explorer and\n * other focus related directives that require bubbling\n */\n@Directive({\n selector: '[tuiFocusedChange]',\n})\nexport class TuiFocusedDirective {\n @Output()\n readonly tuiFocusedChange: Observable<boolean>;\n\n constructor(\n @Inject(ElementRef)\n {nativeElement}: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n ) {\n this.tuiFocusedChange = merge(\n typedFromEvent(nativeElement, 'focusin'),\n typedFromEvent(nativeElement, 'focusout'),\n ).pipe(\n map(() => isNativeFocused(nativeElement)),\n startWith(false),\n distinctUntilChanged(),\n skip(1),\n tuiZoneOptimized(ngZone),\n );\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFocusedDirective} from './focused.directive';\n\n@NgModule({\n declarations: [TuiFocusedDirective],\n exports: [TuiFocusedDirective],\n})\nexport class TuiFocusedModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAMA;;;;;;IAYI,6BAEI,EAAwC,EACxB,MAAc;YAD7B,gCAAa;QAGd,IAAI,CAAC,gBAAgB,GAAG,KAAK,CACzB,cAAc,CAAC,aAAa,EAAE,SAAS,CAAC,EACxC,cAAc,CAAC,aAAa,EAAE,UAAU,CAAC,CAC5C,CAAC,IAAI,CACF,GAAG,CAAC,cAAM,OAAA,eAAe,CAAC,aAAa,CAAC,GAAA,CAAC,EACzC,SAAS,CAAC,KAAK,CAAC,EAChB,oBAAoB,EAAE,EACtB,IAAI,CAAC,CAAC,CAAC,EACP,gBAAgB,CAAC,MAAM,CAAC,CAC3B,CAAC;KACL;;gBAboB,UAAU,uBAD1B,MAAM,SAAC,UAAU;gBAEM,MAAM,uBAA7B,MAAM,SAAC,MAAM;;IALlB;QADC,MAAM,EAAE;iEACsC;IAFtC,mBAAmB;QAH/B,SAAS,CAAC;YACP,QAAQ,EAAE,oBAAoB;SACjC,CAAC;QAMO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;OAPV,mBAAmB,CAoB/B;IAAD,0BAAC;CApBD;;;ICNA;KAAgC;IAAnB,gBAAgB;QAJ5B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
|
|
@@ -44,7 +44,7 @@ var TuiForAsyncDirective = /** @class */ (function () {
|
|
|
44
44
|
Input()
|
|
45
45
|
], TuiForAsyncDirective.prototype, "tuiForAsyncTimeout", void 0);
|
|
46
46
|
TuiForAsyncDirective = __decorate([
|
|
47
|
-
Directive({ selector:
|
|
47
|
+
Directive({ selector: '[tuiForAsync][tuiForAsyncOf]' }),
|
|
48
48
|
__param(0, Inject(ViewContainerRef)),
|
|
49
49
|
__param(1, Inject(TemplateRef))
|
|
50
50
|
], TuiForAsyncDirective);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-for-async.js","sources":["ng://@taiga-ui/cdk/directives/for-async/for-async.directive.ts","ng://@taiga-ui/cdk/directives/for-async/for-async.module.ts","ng://@taiga-ui/cdk/directives/for-async/taiga-ui-cdk-directives-for-async.ts"],"sourcesContent":["import {\n Directive,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {from, of, Subject} from 'rxjs';\nimport {concatMap, delay, takeUntil} from 'rxjs/operators';\n\n@Directive({selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-for-async.js","sources":["ng://@taiga-ui/cdk/directives/for-async/for-async.directive.ts","ng://@taiga-ui/cdk/directives/for-async/for-async.module.ts","ng://@taiga-ui/cdk/directives/for-async/taiga-ui-cdk-directives-for-async.ts"],"sourcesContent":["import {\n Directive,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport {from, of, Subject} from 'rxjs';\nimport {concatMap, delay, takeUntil} from 'rxjs/operators';\n\n@Directive({selector: '[tuiForAsync][tuiForAsyncOf]'})\nexport class TuiForAsyncDirective<T> implements OnChanges, OnDestroy {\n private readonly destroy$ = new Subject<void>();\n\n @Input()\n tuiForAsyncOf: readonly T[] | null | undefined;\n\n @Input()\n tuiForAsyncTimeout = 10;\n\n constructor(\n @Inject(ViewContainerRef) private readonly view: ViewContainerRef,\n @Inject(TemplateRef) private readonly template: TemplateRef<unknown>,\n ) {}\n\n ngOnChanges(): void {\n this.clearViewForOldNodes();\n this.createAsyncViewForNewNodes();\n }\n\n ngOnDestroy(): void {\n this.clearViewForOldNodes();\n this.destroy$.complete();\n }\n\n private createAsyncViewForNewNodes(): void {\n from((this.tuiForAsyncOf || []).entries())\n .pipe(\n concatMap(entry => of(entry).pipe(delay(this.tuiForAsyncTimeout))),\n takeUntil(this.destroy$),\n )\n .subscribe(([index, item]) =>\n this.view\n .createEmbeddedView(this.template, {$implicit: item, index}, index)\n .detectChanges(),\n );\n }\n\n private clearViewForOldNodes(): void {\n this.destroy$.next();\n this.view.clear();\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiForAsyncDirective} from './for-async.directive';\n\n/**\n * @experimental\n */\n@NgModule({\n declarations: [TuiForAsyncDirective],\n exports: [TuiForAsyncDirective],\n})\nexport class TuiForAsyncModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;IAsBI,8BAC+C,IAAsB,EAC3B,QAA8B;QADzB,SAAI,GAAJ,IAAI,CAAkB;QAC3B,aAAQ,GAAR,QAAQ,CAAsB;QAVvD,aAAQ,GAAG,IAAI,OAAO,EAAQ,CAAC;QAMhD,uBAAkB,GAAG,EAAE,CAAC;KAKpB;IAEJ,0CAAW,GAAX;QACI,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,0BAA0B,EAAE,CAAC;KACrC;IAED,0CAAW,GAAX;QACI,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;KAC5B;IAEO,yDAA0B,GAAlC;QAAA,iBAWC;QAVG,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC;aACrC,IAAI,CACD,SAAS,CAAC,UAAA,KAAK,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAI,CAAC,kBAAkB,CAAC,CAAC,GAAA,CAAC,EAClE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAC3B;aACA,SAAS,CAAC,UAAC,EAAa;gBAAb,kBAAa,EAAZ,aAAK,EAAE,YAAI;YACpB,OAAA,KAAI,CAAC,IAAI;iBACJ,kBAAkB,CAAC,KAAI,CAAC,QAAQ,EAAE,EAAC,SAAS,EAAE,IAAI,EAAE,KAAK,OAAA,EAAC,EAAE,KAAK,CAAC;iBAClE,aAAa,EAAE;SAAA,CACvB,CAAC;KACT;IAEO,mDAAoB,GAA5B;QACI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;KACrB;;gBA9BoD,gBAAgB,uBAAhE,MAAM,SAAC,gBAAgB;gBACwB,WAAW,uBAA1D,MAAM,SAAC,WAAW;;IAPvB;QADC,KAAK,EAAE;+DACuC;IAG/C;QADC,KAAK,EAAE;oEACgB;IAPf,oBAAoB;QADhC,SAAS,CAAC,EAAC,QAAQ,EAAE,8BAA8B,EAAC,CAAC;QAW7C,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACxB,WAAA,MAAM,CAAC,WAAW,CAAC,CAAA;OAXf,oBAAoB,CAyChC;IAAD,2BAAC;CAzCD;;ACTA;;;;IAOA;KAAiC;IAApB,iBAAiB;QAJ7B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,oBAAoB,CAAC;YACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;SAClC,CAAC;OACW,iBAAiB,CAAG;IAAD,wBAAC;CAAjC;;ACXA;;;;;;"}
|
|
@@ -30,7 +30,7 @@ var TuiForDirective = /** @class */ (function () {
|
|
|
30
30
|
], TuiForDirective.prototype, "ngForEmpty", void 0);
|
|
31
31
|
TuiForDirective = __decorate([
|
|
32
32
|
Directive({
|
|
33
|
-
selector:
|
|
33
|
+
selector: '[ngFor][ngForOf][ngForElse],[ngFor][ngForOf][ngForEmpty]',
|
|
34
34
|
}),
|
|
35
35
|
__param(0, Inject(ViewContainerRef))
|
|
36
36
|
], TuiForDirective);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-for.js","sources":["ng://@taiga-ui/cdk/directives/for/for.directive.ts","ng://@taiga-ui/cdk/directives/for/for.module.ts","ng://@taiga-ui/cdk/directives/for/taiga-ui-cdk-directives-for.ts"],"sourcesContent":["import {\n Directive,\n EmbeddedViewRef,\n Inject,\n Input,\n OnChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n selector:
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-for.js","sources":["ng://@taiga-ui/cdk/directives/for/for.directive.ts","ng://@taiga-ui/cdk/directives/for/for.module.ts","ng://@taiga-ui/cdk/directives/for/taiga-ui-cdk-directives-for.ts"],"sourcesContent":["import {\n Directive,\n EmbeddedViewRef,\n Inject,\n Input,\n OnChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n selector: '[ngFor][ngForOf][ngForElse],[ngFor][ngForOf][ngForEmpty]',\n})\nexport class TuiForDirective<T, K = unknown> implements OnChanges {\n private ref?: EmbeddedViewRef<unknown>;\n\n @Input()\n ngForOf: T[] | readonly T[] | null = [];\n\n @Input()\n ngForElse?: TemplateRef<K>;\n\n @Input()\n ngForEmpty?: TemplateRef<K>;\n\n constructor(@Inject(ViewContainerRef) private readonly vcr: ViewContainerRef) {}\n\n ngOnChanges(): void {\n this.ref?.destroy();\n\n if (this.ngForOf?.length === 0 && this.ngForEmpty) {\n this.ref = this.vcr.createEmbeddedView(this.ngForEmpty);\n } else if (!this.ngForOf && this.ngForElse) {\n this.ref = this.vcr.createEmbeddedView(this.ngForElse);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiForDirective} from './for.directive';\n\n@NgModule({\n declarations: [TuiForDirective],\n exports: [TuiForDirective],\n})\nexport class TuiForModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAyBI,yBAAuD,GAAqB;QAArB,QAAG,GAAH,GAAG,CAAkB;QAR5E,YAAO,GAA8B,EAAE,CAAC;KAQwC;IAEhF,qCAAW,GAAX;;QACI,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,GAAG;QAEpB,IAAI,OAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,MAAK,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE;YAC/C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3D;aAAM,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YACxC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC1D;KACJ;;gBAV2D,gBAAgB,uBAA/D,MAAM,SAAC,gBAAgB;;IARpC;QADC,KAAK,EAAE;oDACgC;IAGxC;QADC,KAAK,EAAE;sDACmB;IAG3B;QADC,KAAK,EAAE;uDACoB;IAVnB,eAAe;QAH3B,SAAS,CAAC;YACP,QAAQ,EAAE,0DAA0D;SACvE,CAAC;QAae,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OAZ5B,eAAe,CAuB3B;IAAD,sBAAC;CAvBD;;;ICLA;KAA4B;IAAf,YAAY;QAJxB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,eAAe,CAAC;YAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;SAC7B,CAAC;OACW,YAAY,CAAG;IAAD,mBAAC;CAA5B;;ACRA;;;;;;"}
|