@taiga-ui/cdk 2.45.0 → 2.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/controller.d.ts +6 -0
- package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +63 -21
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js +50 -20
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +54 -24
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +50 -20
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js +51 -21
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +54 -29
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +50 -20
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-decorators.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +265 -92
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +91 -42
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-checked.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-checked.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-drag.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-drag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-droppable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-element.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-element.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focusable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focused.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js +324 -0
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-for-async.umd.min.js +2 -0
- package/bundles/taiga-ui-cdk-directives-for-async.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-for.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-for.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-for.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.js +51 -21
- package/bundles/taiga-ui-cdk-directives-item.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-item.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-let.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-let.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-obscured.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-pan.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-pan.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-portal.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-pressed.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-swipe.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-validator.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-validator.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-zoom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives.umd.js +12 -4
- package/bundles/taiga-ui-cdk-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.js +12 -0
- package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js +50 -20
- package/bundles/taiga-ui-cdk-exceptions.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-exceptions.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +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 +50 -20
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-pipes-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +50 -20
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +50 -20
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +54 -26
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.js +2 -2
- package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +3 -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-os.umd.js +39 -0
- package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-os.umd.min.js +2 -0
- package/bundles/taiga-ui-cdk-utils-os.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +50 -20
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.js +12 -4
- package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.min.js +1 -1
- package/components/dialog-host/taiga-ui-cdk-components-dialog-host.metadata.json +1 -1
- package/components/portal-host/portal.service.d.ts +1 -1
- package/date-time/date-fillers.d.ts +0 -2
- package/date-time/day-range.d.ts +1 -2
- package/date-time/day.d.ts +0 -1
- package/date-time/month-range.d.ts +0 -1
- package/date-time/month.d.ts +0 -1
- package/date-time/taiga-ui-cdk-date-time.metadata.json +1 -1
- package/directives/auto-focus/autofocus.directive.d.ts +4 -13
- package/directives/auto-focus/autofocus.options.d.ts +13 -0
- package/directives/auto-focus/handlers/abstract.handler.d.ts +11 -0
- package/directives/auto-focus/handlers/default.handler.d.ts +9 -0
- package/directives/auto-focus/handlers/ios.handler.d.ts +35 -0
- package/directives/auto-focus/index.d.ts +4 -0
- package/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.metadata.json +1 -1
- package/directives/autofilled/autofilled-style.component.d.ts +2 -0
- package/directives/autofilled/autofilled.directive.d.ts +5 -4
- package/directives/autofilled/index.d.ts +1 -0
- package/directives/autofilled/taiga-ui-cdk-directives-autofilled.metadata.json +1 -1
- package/directives/for-async/for-async.directive.d.ts +13 -0
- package/directives/for-async/for-async.module.d.ts +5 -0
- package/directives/for-async/index.d.ts +2 -0
- package/directives/for-async/package.json +13 -0
- package/directives/for-async/taiga-ui-cdk-directives-for-async.d.ts +4 -0
- package/directives/for-async/taiga-ui-cdk-directives-for-async.metadata.json +1 -0
- package/directives/index.d.ts +1 -0
- package/directives/item/item.directive.d.ts +1 -1
- package/directives/taiga-ui-cdk-directives.metadata.json +1 -1
- package/enums/autocomplete.d.ts +10 -0
- package/enums/taiga-ui-cdk-enums.metadata.json +1 -1
- package/esm2015/abstract/controller.js +7 -1
- package/esm2015/abstract/interactive.js +2 -2
- package/esm2015/components/dialog-host/dialog-host.component.js +5 -5
- package/esm2015/components/portal-host/portal.service.js +2 -2
- package/esm2015/date-time/date-fillers.js +1 -3
- package/esm2015/date-time/day-range.js +2 -2
- package/esm2015/date-time/day.js +2 -3
- package/esm2015/date-time/month-range.js +1 -2
- package/esm2015/date-time/month.js +2 -3
- package/esm2015/date-time/year.js +2 -2
- package/esm2015/directives/auto-focus/autofocus.directive.js +11 -87
- package/esm2015/directives/auto-focus/autofocus.options.js +28 -0
- package/esm2015/directives/auto-focus/handlers/abstract.handler.js +25 -0
- package/esm2015/directives/auto-focus/handlers/default.handler.js +39 -0
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +121 -0
- package/esm2015/directives/auto-focus/index.js +5 -1
- package/esm2015/directives/autofilled/autofilled-style.component.js +13 -0
- package/esm2015/directives/autofilled/autofilled.directive.js +23 -37
- package/esm2015/directives/autofilled/autofilled.module.js +4 -2
- package/esm2015/directives/autofilled/index.js +2 -1
- package/esm2015/directives/for-async/for-async.directive.js +48 -0
- package/esm2015/directives/for-async/for-async.module.js +16 -0
- package/esm2015/directives/for-async/index.js +3 -0
- package/esm2015/directives/for-async/taiga-ui-cdk-directives-for-async.js +5 -0
- package/esm2015/directives/index.js +2 -1
- package/esm2015/directives/item/item.directive.js +2 -2
- package/esm2015/enums/autocomplete.js +12 -1
- package/esm2015/observables/replay-control-value-changes.js +2 -2
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/is-apple.js +5 -0
- package/esm2015/tokens/is-ios.js +4 -6
- package/esm2015/utils/browser/index.js +2 -2
- package/esm2015/utils/browser/is-edge-older-than.js +2 -2
- package/esm2015/utils/browser/{is-IE.js → is-ie.js} +1 -1
- package/esm2015/utils/browser/is-safari.js +2 -2
- package/esm2015/utils/focus/get-native-focused.js +2 -2
- package/esm2015/utils/focus/set-native-focused.js +3 -1
- package/esm2015/utils/index.js +2 -1
- package/esm2015/utils/os/index.js +4 -0
- package/esm2015/utils/os/is-apple-platform.js +14 -0
- package/esm2015/utils/os/is-apple.js +6 -0
- package/esm2015/utils/os/is-ios.js +7 -0
- package/esm2015/utils/os/taiga-ui-cdk-utils-os.js +5 -0
- package/esm5/abstract/controller.js +14 -1
- package/esm5/abstract/interactive.js +2 -2
- package/esm5/components/dialog-host/dialog-host.component.js +5 -5
- package/esm5/components/portal-host/portal.service.js +2 -2
- package/esm5/date-time/date-fillers.js +1 -3
- package/esm5/date-time/day-range.js +2 -2
- package/esm5/date-time/day.js +2 -3
- package/esm5/date-time/month-range.js +1 -2
- package/esm5/date-time/month.js +2 -3
- package/esm5/date-time/year.js +2 -2
- package/esm5/directives/auto-focus/autofocus.directive.js +11 -97
- package/esm5/directives/auto-focus/autofocus.options.js +28 -0
- package/esm5/directives/auto-focus/handlers/abstract.handler.js +34 -0
- package/esm5/directives/auto-focus/handlers/default.handler.js +43 -0
- package/esm5/directives/auto-focus/handlers/ios.handler.js +137 -0
- package/esm5/directives/auto-focus/index.js +5 -1
- package/esm5/directives/autofilled/autofilled-style.component.js +16 -0
- package/esm5/directives/autofilled/autofilled.directive.js +24 -21
- package/esm5/directives/autofilled/autofilled.module.js +4 -2
- package/esm5/directives/autofilled/index.js +2 -1
- package/esm5/directives/for-async/for-async.directive.js +52 -0
- package/esm5/directives/for-async/for-async.module.js +19 -0
- package/esm5/directives/for-async/index.js +3 -0
- package/esm5/directives/for-async/taiga-ui-cdk-directives-for-async.js +5 -0
- package/esm5/directives/index.js +2 -1
- package/esm5/directives/item/item.directive.js +2 -2
- package/esm5/enums/autocomplete.js +12 -1
- package/esm5/observables/replay-control-value-changes.js +2 -2
- package/esm5/tokens/index.js +2 -1
- package/esm5/tokens/is-apple.js +5 -0
- package/esm5/tokens/is-ios.js +4 -8
- package/esm5/utils/browser/index.js +2 -2
- package/esm5/utils/browser/is-edge-older-than.js +2 -2
- package/esm5/utils/browser/{is-IE.js → is-ie.js} +1 -1
- package/esm5/utils/browser/is-safari.js +2 -2
- package/esm5/utils/focus/get-native-focused.js +2 -2
- package/esm5/utils/focus/set-native-focused.js +3 -1
- package/esm5/utils/index.js +2 -1
- package/esm5/utils/os/index.js +4 -0
- package/esm5/utils/os/is-apple-platform.js +14 -0
- package/esm5/utils/os/is-apple.js +6 -0
- package/esm5/utils/os/is-ios.js +7 -0
- package/esm5/utils/os/taiga-ui-cdk-utils-os.js +5 -0
- package/fesm2015/taiga-ui-cdk-abstract.js +8 -2
- package/fesm2015/taiga-ui-cdk-abstract.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-portal-host.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-portal-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +4 -9
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +187 -69
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js +33 -37
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.js +66 -0
- package/fesm2015/taiga-ui-cdk-directives-for-async.js.map +1 -0
- 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.js +1 -0
- package/fesm2015/taiga-ui-cdk-directives.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-enums.js +11 -0
- package/fesm2015/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +6 -7
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-browser.js +2 -2
- package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +3 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js +31 -0
- package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js +13 -2
- package/fesm5/taiga-ui-cdk-abstract.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-portal-host.js +1 -1
- package/fesm5/taiga-ui-cdk-components-portal-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js +4 -9
- package/fesm5/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js +211 -74
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-autofilled.js +38 -22
- package/fesm5/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js +73 -0
- package/fesm5/taiga-ui-cdk-directives-for-async.js.map +1 -0
- 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.js +1 -0
- package/fesm5/taiga-ui-cdk-directives.js.map +1 -1
- package/fesm5/taiga-ui-cdk-enums.js +11 -0
- package/fesm5/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm5/taiga-ui-cdk-observables.js +1 -1
- package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js +6 -9
- package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-browser.js +2 -2
- package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js +3 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-os.js +31 -0
- package/fesm5/taiga-ui-cdk-utils-os.js.map +1 -0
- package/fesm5/taiga-ui-cdk-utils.js +1 -0
- package/fesm5/taiga-ui-cdk-utils.js.map +1 -1
- package/observables/replay-control-value-changes.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/constants/modules.d.ts +1 -1
- package/schematics/ng-add/constants/modules.js +2 -2
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/schema.json +3 -3
- package/schematics/ng-add/steps/add-taiga-modules.js +1 -1
- package/schematics/ng-update/constants/consts.d.ts +7 -7
- package/schematics/ng-update/constants/consts.js +28 -0
- package/schematics/ng-update/constants/enums.d.ts +3 -3
- package/schematics/ng-update/constants/enums.js +22 -0
- package/schematics/ng-update/constants/services.d.ts +8 -0
- package/schematics/ng-update/constants/services.js +43 -0
- package/schematics/ng-update/constants/types.d.ts +4 -3
- package/schematics/ng-update/constants/types.js +55 -0
- package/schematics/ng-update/constants/warnings.d.ts +6 -0
- package/schematics/ng-update/constants/warnings.js +30 -0
- package/schematics/ng-update/index.js +4 -0
- package/schematics/ng-update/steps/rename-types.js +27 -11
- package/schematics/ng-update/steps/replace-const.js +2 -2
- package/schematics/ng-update/steps/replace-enums.js +2 -2
- package/schematics/ng-update/steps/replace-services.d.ts +1 -0
- package/schematics/ng-update/steps/replace-services.js +51 -0
- package/schematics/ng-update/steps/show-warnings.d.ts +2 -0
- package/schematics/ng-update/steps/show-warnings.js +35 -0
- package/schematics/utils/{remove-import.d.ts → import-manipulations.d.ts} +1 -0
- package/schematics/utils/import-manipulations.js +19 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/is-apple.d.ts +2 -0
- package/tokens/taiga-ui-cdk-tokens.metadata.json +1 -1
- package/utils/browser/index.d.ts +1 -1
- package/utils/browser/{is-IE.d.ts → is-ie.d.ts} +0 -0
- package/utils/browser/taiga-ui-cdk-utils-browser.metadata.json +1 -1
- package/utils/focus/set-native-focused.d.ts +2 -0
- package/utils/index.d.ts +1 -0
- package/utils/os/index.d.ts +3 -0
- package/utils/os/is-apple-platform.d.ts +11 -0
- package/utils/os/is-apple.d.ts +1 -0
- package/utils/os/is-ios.d.ts +1 -0
- package/utils/os/package.json +13 -0
- package/utils/os/taiga-ui-cdk-utils-os.d.ts +4 -0
- package/utils/os/taiga-ui-cdk-utils-os.metadata.json +1 -0
- package/utils/taiga-ui-cdk-utils.metadata.json +1 -1
- package/schematics/utils/remove-import.js +0 -11
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/common'), require('@taiga-ui/cdk/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/directives/auto-focus', ['exports', '@angular/core', '@ng-web-apis/common', '@taiga-ui/cdk/
|
|
4
|
-
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].cdk = global['taiga-ui'].cdk || {}, global['taiga-ui'].cdk.directives = global['taiga-ui'].cdk.directives || {}, global['taiga-ui'].cdk.directives['auto-focus'] = {}), global.ng.core, global.common, global['taiga-ui'].cdk.
|
|
5
|
-
}(this, (function (exports, core, common,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ng-web-apis/common'), require('@taiga-ui/cdk/tokens'), require('@taiga-ui/cdk/constants'), require('rxjs'), require('rxjs/operators'), require('@taiga-ui/cdk/utils')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/directives/auto-focus', ['exports', '@angular/core', '@ng-web-apis/common', '@taiga-ui/cdk/tokens', '@taiga-ui/cdk/constants', 'rxjs', 'rxjs/operators', '@taiga-ui/cdk/utils'], factory) :
|
|
4
|
+
(global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].cdk = global['taiga-ui'].cdk || {}, global['taiga-ui'].cdk.directives = global['taiga-ui'].cdk.directives || {}, global['taiga-ui'].cdk.directives['auto-focus'] = {}), global.ng.core, global.common, global['taiga-ui'].cdk.tokens, global['taiga-ui'].cdk.constants, global.rxjs, global.rxjs.operators, global['taiga-ui'].cdk.utils));
|
|
5
|
+
}(this, (function (exports, core, common, tokens, constants, rxjs, operators, utils) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
9
9
|
|
|
10
10
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -23,11 +23,13 @@
|
|
|
23
23
|
var extendStatics = function(d, b) {
|
|
24
24
|
extendStatics = Object.setPrototypeOf ||
|
|
25
25
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (
|
|
26
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
27
27
|
return extendStatics(d, b);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
function __extends(d, b) {
|
|
31
|
+
if (typeof b !== "function" && b !== null)
|
|
32
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
31
33
|
extendStatics(d, b);
|
|
32
34
|
function __() { this.constructor = d; }
|
|
33
35
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -109,13 +111,20 @@
|
|
|
109
111
|
}
|
|
110
112
|
}
|
|
111
113
|
|
|
112
|
-
|
|
114
|
+
var __createBinding = Object.create ? (function(o, m, k, k2) {
|
|
115
|
+
if (k2 === undefined) k2 = k;
|
|
116
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
117
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
118
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
119
|
+
}
|
|
120
|
+
Object.defineProperty(o, k2, desc);
|
|
121
|
+
}) : (function(o, m, k, k2) {
|
|
113
122
|
if (k2 === undefined) k2 = k;
|
|
114
123
|
o[k2] = m[k];
|
|
115
|
-
}
|
|
124
|
+
});
|
|
116
125
|
|
|
117
|
-
function __exportStar(m,
|
|
118
|
-
for (var p in m) if (p !== "default" && !
|
|
126
|
+
function __exportStar(m, o) {
|
|
127
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
119
128
|
}
|
|
120
129
|
|
|
121
130
|
function __values(o) {
|
|
@@ -147,19 +156,31 @@
|
|
|
147
156
|
return ar;
|
|
148
157
|
}
|
|
149
158
|
|
|
159
|
+
/** @deprecated */
|
|
150
160
|
function __spread() {
|
|
151
161
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
152
162
|
ar = ar.concat(__read(arguments[i]));
|
|
153
163
|
return ar;
|
|
154
164
|
}
|
|
155
165
|
|
|
166
|
+
/** @deprecated */
|
|
156
167
|
function __spreadArrays() {
|
|
157
168
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
158
169
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
159
170
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
160
171
|
r[k] = a[j];
|
|
161
172
|
return r;
|
|
162
|
-
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function __spreadArray(to, from, pack) {
|
|
176
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
177
|
+
if (ar || !(i in from)) {
|
|
178
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
179
|
+
ar[i] = from[i];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
183
|
+
}
|
|
163
184
|
|
|
164
185
|
function __await(v) {
|
|
165
186
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -196,11 +217,17 @@
|
|
|
196
217
|
return cooked;
|
|
197
218
|
};
|
|
198
219
|
|
|
220
|
+
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
221
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
222
|
+
}) : function(o, v) {
|
|
223
|
+
o["default"] = v;
|
|
224
|
+
};
|
|
225
|
+
|
|
199
226
|
function __importStar(mod) {
|
|
200
227
|
if (mod && mod.__esModule) return mod;
|
|
201
228
|
var result = {};
|
|
202
|
-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result
|
|
203
|
-
result
|
|
229
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
230
|
+
__setModuleDefault(result, mod);
|
|
204
231
|
return result;
|
|
205
232
|
}
|
|
206
233
|
|
|
@@ -208,52 +235,30 @@
|
|
|
208
235
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
209
236
|
}
|
|
210
237
|
|
|
211
|
-
function __classPrivateFieldGet(receiver,
|
|
212
|
-
if (!
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
return privateMap.get(receiver);
|
|
238
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
239
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
240
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
241
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
216
242
|
}
|
|
217
243
|
|
|
218
|
-
function __classPrivateFieldSet(receiver,
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
244
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
245
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
246
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
247
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
248
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
252
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
|
253
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
224
254
|
}
|
|
225
255
|
|
|
226
|
-
var
|
|
227
|
-
|
|
228
|
-
// TODO: in 3.0 change input name to tuiAutoFocus and handle empty string
|
|
229
|
-
// TODO: refactor on this whole thing in 3.0
|
|
230
|
-
var TuiAutoFocusDirective = /** @class */ (function () {
|
|
231
|
-
function TuiAutoFocusDirective(tuiFocusableComponent, isIos, animationFrame$, ngZone, elementRef, renderer) {
|
|
256
|
+
var AbstractTuiAutofocusHandler = /** @class */ (function () {
|
|
257
|
+
function AbstractTuiAutofocusHandler(tuiFocusableComponent, elementRef) {
|
|
232
258
|
this.tuiFocusableComponent = tuiFocusableComponent;
|
|
233
|
-
this.isIos = isIos;
|
|
234
|
-
this.animationFrame$ = animationFrame$;
|
|
235
|
-
this.ngZone = ngZone;
|
|
236
259
|
this.elementRef = elementRef;
|
|
237
|
-
this.renderer = renderer;
|
|
238
|
-
this.autoFocus = true;
|
|
239
260
|
}
|
|
240
|
-
|
|
241
|
-
var _this = this;
|
|
242
|
-
if (!this.autoFocus) {
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (this.isTextFieldElement) {
|
|
246
|
-
if (this.isIos) {
|
|
247
|
-
this.ngZone.runOutsideAngular(function () { return _this.iosWebkitAutofocus(); });
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
rxjs.race(rxjs.timer(TIMEOUT), this.animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME), operators.map(function () { return _this.element.closest(NG_ANIMATION_SELECTOR); }), operators.skipWhile(Boolean), operators.take(1))).subscribe(function () { return focus.setNativeFocused(_this.element); });
|
|
251
|
-
}
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
focus.setNativeFocused(this.element);
|
|
255
|
-
};
|
|
256
|
-
Object.defineProperty(TuiAutoFocusDirective.prototype, "element", {
|
|
261
|
+
Object.defineProperty(AbstractTuiAutofocusHandler.prototype, "element", {
|
|
257
262
|
get: function () {
|
|
258
263
|
var _a;
|
|
259
264
|
return (((_a = this.tuiFocusableComponent) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) ||
|
|
@@ -262,55 +267,223 @@
|
|
|
262
267
|
enumerable: true,
|
|
263
268
|
configurable: true
|
|
264
269
|
});
|
|
265
|
-
Object.defineProperty(
|
|
270
|
+
Object.defineProperty(AbstractTuiAutofocusHandler.prototype, "isTextFieldElement", {
|
|
266
271
|
get: function () {
|
|
267
272
|
return this.element.matches('input, textarea');
|
|
268
273
|
},
|
|
269
274
|
enumerable: true,
|
|
270
275
|
configurable: true
|
|
271
276
|
});
|
|
272
|
-
|
|
277
|
+
AbstractTuiAutofocusHandler.ctorParameters = function () { return [
|
|
278
|
+
{ type: undefined },
|
|
279
|
+
{ type: core.ElementRef }
|
|
280
|
+
]; };
|
|
281
|
+
AbstractTuiAutofocusHandler = __decorate([
|
|
282
|
+
core.Directive()
|
|
283
|
+
], AbstractTuiAutofocusHandler);
|
|
284
|
+
return AbstractTuiAutofocusHandler;
|
|
285
|
+
}());
|
|
286
|
+
|
|
287
|
+
var TIMEOUT = 1000;
|
|
288
|
+
var NG_ANIMATION_SELECTOR = '.ng-animating';
|
|
289
|
+
var TuiDefaultAutofocusHandler = /** @class */ (function (_super) {
|
|
290
|
+
__extends(TuiDefaultAutofocusHandler, _super);
|
|
291
|
+
function TuiDefaultAutofocusHandler(tuiFocusableComponent, elementRef, animationFrame$) {
|
|
292
|
+
var _this = _super.call(this, tuiFocusableComponent, elementRef) || this;
|
|
293
|
+
_this.animationFrame$ = animationFrame$;
|
|
294
|
+
return _this;
|
|
295
|
+
}
|
|
296
|
+
TuiDefaultAutofocusHandler.prototype.setFocus = function () {
|
|
297
|
+
var _this = this;
|
|
298
|
+
if (this.isTextFieldElement) {
|
|
299
|
+
rxjs.race(rxjs.timer(TIMEOUT), this.animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME), operators.map(function () { return _this.element.closest(NG_ANIMATION_SELECTOR); }), operators.skipWhile(Boolean), operators.take(1))).subscribe(function () { return _this.element.focus(); });
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
this.element.focus();
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
TuiDefaultAutofocusHandler.ctorParameters = function () { return [
|
|
306
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Self }, { type: core.Inject, args: [tokens.TUI_FOCUSABLE_ITEM_ACCESSOR,] }] },
|
|
307
|
+
{ type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
|
|
308
|
+
{ type: rxjs.Observable, decorators: [{ type: core.Inject, args: [common.ANIMATION_FRAME,] }] }
|
|
309
|
+
]; };
|
|
310
|
+
TuiDefaultAutofocusHandler = __decorate([
|
|
311
|
+
core.Directive(),
|
|
312
|
+
__param(0, core.Optional()),
|
|
313
|
+
__param(0, core.Self()),
|
|
314
|
+
__param(0, core.Inject(tokens.TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
315
|
+
__param(1, core.Inject(core.ElementRef)),
|
|
316
|
+
__param(2, core.Inject(common.ANIMATION_FRAME))
|
|
317
|
+
], TuiDefaultAutofocusHandler);
|
|
318
|
+
return TuiDefaultAutofocusHandler;
|
|
319
|
+
}(AbstractTuiAutofocusHandler));
|
|
320
|
+
|
|
321
|
+
// @dynamic
|
|
322
|
+
var TuiIosAutofocusHandler = /** @class */ (function (_super) {
|
|
323
|
+
__extends(TuiIosAutofocusHandler, _super);
|
|
324
|
+
function TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone, windowRef) {
|
|
325
|
+
var _this = _super.call(this, tuiFocusableComponent, elementRef) || this;
|
|
326
|
+
_this.renderer = renderer;
|
|
327
|
+
_this.ngZone = ngZone;
|
|
328
|
+
_this.windowRef = windowRef;
|
|
329
|
+
_this.patchCssStyles();
|
|
330
|
+
return _this;
|
|
331
|
+
}
|
|
332
|
+
TuiIosAutofocusHandler.prototype.setFocus = function () {
|
|
333
|
+
var _this = this;
|
|
334
|
+
if (this.isTextFieldElement) {
|
|
335
|
+
this.ngZone.runOutsideAngular(function () { return _this.iosWebkitAutofocus(); });
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
this.element.focus();
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
TuiIosAutofocusHandler.prototype.iosWebkitAutofocus = function () {
|
|
273
342
|
var _this = this;
|
|
274
343
|
var _a;
|
|
275
|
-
var fakeInput = this.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
var blurHandler = function () { return focus
|
|
344
|
+
var fakeInput = this.makeFakeInput();
|
|
345
|
+
var duration = this.getDurationTimeBeforeFocus();
|
|
346
|
+
var fakeFocusTimeoutId = 0;
|
|
347
|
+
var elementFocusTimeoutId = 0;
|
|
348
|
+
var blurHandler = function () { return fakeInput.focus({ preventScroll: true }); };
|
|
280
349
|
var focusHandler = function () {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
fakeInput.removeEventListener('blur', blurHandler);
|
|
289
|
-
fakeInput.removeEventListener('focus', focusHandler);
|
|
350
|
+
clearTimeout(fakeFocusTimeoutId);
|
|
351
|
+
fakeFocusTimeoutId = _this.windowRef.setTimeout(function () {
|
|
352
|
+
clearTimeout(elementFocusTimeoutId);
|
|
353
|
+
fakeInput.removeEventListener('blur', blurHandler);
|
|
354
|
+
fakeInput.removeEventListener('focus', focusHandler);
|
|
355
|
+
elementFocusTimeoutId = _this.windowRef.setTimeout(function () {
|
|
356
|
+
_this.element.focus({ preventScroll: false });
|
|
290
357
|
fakeInput.remove();
|
|
291
|
-
});
|
|
358
|
+
}, duration);
|
|
292
359
|
});
|
|
293
360
|
};
|
|
294
|
-
/**
|
|
295
|
-
* @note: ping-pong eager strategy hack
|
|
296
|
-
* After creating an element and bringing it into DOM,
|
|
297
|
-
* the browser automatically focuses on the invisible element.
|
|
298
|
-
* And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,
|
|
299
|
-
* then we try to focus again on an invisible element, so that the keyboard slowly appears.
|
|
300
|
-
* This ping pong allows the keyboard to not overlap the modal window.
|
|
301
|
-
*/
|
|
302
361
|
fakeInput.addEventListener('blur', blurHandler, { once: true });
|
|
303
362
|
fakeInput.addEventListener('focus', focusHandler);
|
|
304
|
-
(
|
|
305
|
-
|
|
363
|
+
if (this.insideDialog()) {
|
|
364
|
+
this.windowRef.document.body.appendChild(fakeInput);
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
(_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);
|
|
368
|
+
}
|
|
369
|
+
fakeInput.focus({ preventScroll: true });
|
|
306
370
|
};
|
|
307
|
-
|
|
371
|
+
/**
|
|
372
|
+
* @note:
|
|
373
|
+
* emulate textfield position in layout with cursor
|
|
374
|
+
* before focus to real textfield element
|
|
375
|
+
*/
|
|
376
|
+
TuiIosAutofocusHandler.prototype.makeFakeInput = function () {
|
|
377
|
+
var fakeInput = this.renderer.createElement('input');
|
|
378
|
+
var rect = this.element.getBoundingClientRect();
|
|
379
|
+
fakeInput.style.height = utils.px(rect.height);
|
|
380
|
+
fakeInput.style.width = utils.px(rect.width / 2);
|
|
381
|
+
fakeInput.style.position = 'fixed';
|
|
382
|
+
fakeInput.style.opacity = '0';
|
|
383
|
+
fakeInput.style.fontSize = utils.px(16); // disable possible auto zoom
|
|
384
|
+
fakeInput.readOnly = true; // prevent keyboard for fake input
|
|
385
|
+
// @note: emulate position cursor before focus to real textfield element
|
|
386
|
+
fakeInput.style.top = utils.px(rect.top);
|
|
387
|
+
fakeInput.style.left = utils.px(rect.left);
|
|
388
|
+
return fakeInput;
|
|
389
|
+
};
|
|
390
|
+
TuiIosAutofocusHandler.prototype.getDurationTimeBeforeFocus = function () {
|
|
391
|
+
return (parseFloat(this.windowRef
|
|
392
|
+
.getComputedStyle(this.element)
|
|
393
|
+
.getPropertyValue('--tui-duration')) || 0);
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* @note:
|
|
397
|
+
* unfortunately, in older versions of iOS
|
|
398
|
+
* there is a bug that the fake input cursor
|
|
399
|
+
* will move along with the dialog animation
|
|
400
|
+
* and then that dialog will be shaking
|
|
401
|
+
*/
|
|
402
|
+
TuiIosAutofocusHandler.prototype.insideDialog = function () {
|
|
403
|
+
return !!this.element.closest('tui-dialog');
|
|
404
|
+
};
|
|
405
|
+
/**
|
|
406
|
+
* @note:
|
|
407
|
+
* This is necessary so that the viewport isn't recalculated
|
|
408
|
+
* and then the dialogs don't shake.
|
|
409
|
+
*
|
|
410
|
+
* Also, we need to fixed height viewport,
|
|
411
|
+
* so that when focusing the dialogs don't shake
|
|
412
|
+
*/
|
|
413
|
+
TuiIosAutofocusHandler.prototype.patchCssStyles = function () {
|
|
414
|
+
var e_1, _a;
|
|
415
|
+
var documentRef = this.windowRef.document;
|
|
416
|
+
try {
|
|
417
|
+
for (var _b = __values([documentRef.documentElement, documentRef.body]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
418
|
+
var element = _c.value;
|
|
419
|
+
element.style.setProperty('overflow', 'auto');
|
|
420
|
+
element.style.setProperty('height', '100%');
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
424
|
+
finally {
|
|
425
|
+
try {
|
|
426
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
427
|
+
}
|
|
428
|
+
finally { if (e_1) throw e_1.error; }
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
TuiIosAutofocusHandler.ctorParameters = function () { return [
|
|
308
432
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Self }, { type: core.Inject, args: [tokens.TUI_FOCUSABLE_ITEM_ACCESSOR,] }] },
|
|
309
|
-
{ type: Boolean, decorators: [{ type: core.Inject, args: [tokens.TUI_IS_IOS,] }] },
|
|
310
|
-
{ type: rxjs.Observable, decorators: [{ type: core.Inject, args: [common.ANIMATION_FRAME,] }] },
|
|
311
|
-
{ type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
|
|
312
433
|
{ type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
|
|
313
|
-
{ type: core.Renderer2, decorators: [{ type: core.Inject, args: [core.Renderer2,] }] }
|
|
434
|
+
{ type: core.Renderer2, decorators: [{ type: core.Inject, args: [core.Renderer2,] }] },
|
|
435
|
+
{ type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
|
|
436
|
+
{ type: Window, decorators: [{ type: core.Inject, args: [common.WINDOW,] }] }
|
|
437
|
+
]; };
|
|
438
|
+
TuiIosAutofocusHandler = __decorate([
|
|
439
|
+
core.Directive(),
|
|
440
|
+
__param(0, core.Optional()),
|
|
441
|
+
__param(0, core.Self()),
|
|
442
|
+
__param(0, core.Inject(tokens.TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
443
|
+
__param(1, core.Inject(core.ElementRef)),
|
|
444
|
+
__param(2, core.Inject(core.Renderer2)),
|
|
445
|
+
__param(3, core.Inject(core.NgZone)),
|
|
446
|
+
__param(4, core.Inject(common.WINDOW))
|
|
447
|
+
], TuiIosAutofocusHandler);
|
|
448
|
+
return TuiIosAutofocusHandler;
|
|
449
|
+
}(AbstractTuiAutofocusHandler));
|
|
450
|
+
|
|
451
|
+
var TUI_AUTOFOCUS_HANDLER = new core.InjectionToken('Autofocusing handler');
|
|
452
|
+
// TODO: 3.0 remove in ivy compilation
|
|
453
|
+
function tuiAutofocusHandlerFactory(tuiFocusableComponent, elementRef, animationFrame$, renderer, ngZone, windowRef) {
|
|
454
|
+
return core.inject(tokens.TUI_IS_IOS)
|
|
455
|
+
? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone, windowRef)
|
|
456
|
+
: new TuiDefaultAutofocusHandler(tuiFocusableComponent, elementRef, animationFrame$);
|
|
457
|
+
}
|
|
458
|
+
var TUI_AUTOFOCUS_PROVIDERS = [
|
|
459
|
+
{
|
|
460
|
+
provide: TUI_AUTOFOCUS_HANDLER,
|
|
461
|
+
// TODO: replace to useClass in v3.0
|
|
462
|
+
useFactory: tuiAutofocusHandlerFactory,
|
|
463
|
+
deps: [
|
|
464
|
+
[new core.Optional(), new core.Self(), tokens.TUI_FOCUSABLE_ITEM_ACCESSOR],
|
|
465
|
+
core.ElementRef,
|
|
466
|
+
common.ANIMATION_FRAME,
|
|
467
|
+
core.Renderer2,
|
|
468
|
+
core.NgZone,
|
|
469
|
+
common.WINDOW,
|
|
470
|
+
],
|
|
471
|
+
},
|
|
472
|
+
];
|
|
473
|
+
|
|
474
|
+
// TODO: 3.0 change input name to tuiAutoFocus and handle empty string
|
|
475
|
+
var TuiAutoFocusDirective = /** @class */ (function () {
|
|
476
|
+
function TuiAutoFocusDirective(handler) {
|
|
477
|
+
this.handler = handler;
|
|
478
|
+
this.autoFocus = true;
|
|
479
|
+
}
|
|
480
|
+
TuiAutoFocusDirective.prototype.ngAfterViewInit = function () {
|
|
481
|
+
if (this.autoFocus) {
|
|
482
|
+
this.handler.setFocus();
|
|
483
|
+
}
|
|
484
|
+
};
|
|
485
|
+
TuiAutoFocusDirective.ctorParameters = function () { return [
|
|
486
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [TUI_AUTOFOCUS_HANDLER,] }] }
|
|
314
487
|
]; };
|
|
315
488
|
__decorate([
|
|
316
489
|
core.Input()
|
|
@@ -318,15 +491,9 @@
|
|
|
318
491
|
TuiAutoFocusDirective = __decorate([
|
|
319
492
|
core.Directive({
|
|
320
493
|
selector: '[tuiAutoFocus]',
|
|
494
|
+
providers: TUI_AUTOFOCUS_PROVIDERS,
|
|
321
495
|
}),
|
|
322
|
-
__param(0, core.
|
|
323
|
-
__param(0, core.Self()),
|
|
324
|
-
__param(0, core.Inject(tokens.TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
325
|
-
__param(1, core.Inject(tokens.TUI_IS_IOS)),
|
|
326
|
-
__param(2, core.Inject(common.ANIMATION_FRAME)),
|
|
327
|
-
__param(3, core.Inject(core.NgZone)),
|
|
328
|
-
__param(4, core.Inject(core.ElementRef)),
|
|
329
|
-
__param(5, core.Inject(core.Renderer2))
|
|
496
|
+
__param(0, core.Inject(TUI_AUTOFOCUS_HANDLER))
|
|
330
497
|
], TuiAutoFocusDirective);
|
|
331
498
|
return TuiAutoFocusDirective;
|
|
332
499
|
}());
|
|
@@ -343,8 +510,14 @@
|
|
|
343
510
|
return TuiAutoFocusModule;
|
|
344
511
|
}());
|
|
345
512
|
|
|
513
|
+
exports.AbstractTuiAutofocusHandler = AbstractTuiAutofocusHandler;
|
|
514
|
+
exports.TUI_AUTOFOCUS_HANDLER = TUI_AUTOFOCUS_HANDLER;
|
|
515
|
+
exports.TUI_AUTOFOCUS_PROVIDERS = TUI_AUTOFOCUS_PROVIDERS;
|
|
346
516
|
exports.TuiAutoFocusDirective = TuiAutoFocusDirective;
|
|
347
517
|
exports.TuiAutoFocusModule = TuiAutoFocusModule;
|
|
518
|
+
exports.TuiDefaultAutofocusHandler = TuiDefaultAutofocusHandler;
|
|
519
|
+
exports.TuiIosAutofocusHandler = TuiIosAutofocusHandler;
|
|
520
|
+
exports.tuiAutofocusHandlerFactory = tuiAutofocusHandlerFactory;
|
|
348
521
|
|
|
349
522
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
350
523
|
|