@taiga-ui/cdk 2.46.0 → 2.49.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 +62 -20
- 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 +50 -20
- 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 +50 -20
- 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-constants.umd.js +28 -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 +50 -20
- 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 +146 -55
- 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 +50 -20
- 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 +325 -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 +50 -20
- 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-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 +68 -20
- 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 +1 -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 +17 -3
- package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.min.js.map +1 -1
- 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/constants/taiga-ui-cdk-constants.metadata.json +1 -1
- package/constants/unicode-chars.d.ts +25 -1
- package/directives/auto-focus/autofocus.options.d.ts +1 -1
- package/directives/auto-focus/handlers/ios.handler.d.ts +26 -1
- package/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.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/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/constants/unicode-chars.js +26 -2
- package/esm2015/directives/auto-focus/autofocus.options.js +7 -6
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +80 -29
- 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/enums/autocomplete.js +12 -1
- package/esm2015/tokens/index.js +4 -1
- package/esm2015/tokens/is-chromium.js +6 -0
- package/esm2015/tokens/is-firefox.js +9 -0
- package/esm2015/tokens/is-webkit.js +6 -0
- package/esm2015/utils/browser/is-edge-older-than.js +2 -2
- package/esm2015/utils/browser/is-safari.js +2 -2
- package/esm2015/utils/focus/get-native-focused.js +2 -2
- package/esm2015/utils/os/index.js +2 -1
- package/esm2015/utils/os/is-apple-platform.js +14 -0
- package/esm2015/utils/os/is-ios.js +4 -4
- package/esm5/abstract/controller.js +14 -1
- package/esm5/constants/unicode-chars.js +26 -2
- package/esm5/directives/auto-focus/autofocus.options.js +7 -6
- package/esm5/directives/auto-focus/handlers/ios.handler.js +92 -30
- package/esm5/directives/for-async/for-async.directive.js +53 -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/enums/autocomplete.js +12 -1
- package/esm5/tokens/index.js +4 -1
- package/esm5/tokens/is-chromium.js +6 -0
- package/esm5/tokens/is-firefox.js +9 -0
- package/esm5/tokens/is-webkit.js +6 -0
- package/esm5/utils/browser/is-edge-older-than.js +2 -2
- package/esm5/utils/browser/is-safari.js +2 -2
- package/esm5/utils/focus/get-native-focused.js +2 -2
- package/esm5/utils/os/index.js +2 -1
- package/esm5/utils/os/is-apple-platform.js +14 -0
- package/esm5/utils/os/is-ios.js +4 -4
- package/fesm2015/taiga-ui-cdk-abstract.js +7 -1
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +26 -2
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +84 -33
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.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.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-tokens.js +16 -1
- 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 +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js +17 -4
- package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js +12 -1
- package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm5/taiga-ui-cdk-constants.js +26 -2
- package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js +96 -34
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js +74 -0
- package/fesm5/taiga-ui-cdk-directives-for-async.js.map +1 -0
- 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-tokens.js +16 -1
- 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 +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-os.js +17 -4
- package/fesm5/taiga-ui-cdk-utils-os.js.map +1 -1
- package/package.json +4 -1
- package/schematics/ng-update/constants/consts.d.ts +7 -7
- package/schematics/ng-update/constants/consts.js +38 -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/templates.d.ts +17 -0
- package/schematics/ng-update/constants/templates.js +44 -0
- package/schematics/ng-update/constants/types.d.ts +4 -3
- package/schematics/ng-update/constants/types.js +60 -0
- package/schematics/ng-update/constants/warnings.d.ts +6 -0
- package/schematics/ng-update/constants/warnings.js +45 -0
- package/schematics/ng-update/index.js +8 -0
- package/schematics/ng-update/interfaces/template-resourse.d.ts +8 -0
- package/schematics/ng-update/interfaces/template-resourse.js +2 -0
- package/schematics/ng-update/steps/migrate-sliders/index.d.ts +2 -0
- package/schematics/ng-update/steps/migrate-sliders/index.js +7 -0
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.d.ts +2 -0
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +24 -0
- package/schematics/ng-update/steps/migrate-templates.d.ts +2 -0
- package/schematics/ng-update/steps/migrate-templates.js +57 -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/angular/ng-component.d.ts +3 -0
- package/schematics/utils/angular/ng-component.js +7 -0
- package/schematics/utils/angular/ng-module.d.ts +7 -0
- package/schematics/utils/angular/ng-module.js +21 -0
- package/schematics/utils/{remove-import.d.ts → import-manipulations.d.ts} +1 -0
- package/schematics/utils/import-manipulations.js +19 -0
- package/schematics/utils/templates/elements.d.ts +2 -0
- package/schematics/utils/templates/elements.js +21 -0
- package/schematics/utils/templates/get-component-templates.d.ts +4 -0
- package/schematics/utils/templates/get-component-templates.js +36 -0
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +45 -0
- package/schematics/utils/templates/ng-component-input-manipulations.js +78 -0
- package/schematics/utils/templates/template-resource.d.ts +5 -0
- package/schematics/utils/templates/template-resource.js +21 -0
- package/tokens/index.d.ts +3 -0
- package/tokens/is-chromium.d.ts +2 -0
- package/tokens/is-firefox.d.ts +2 -0
- package/tokens/is-webkit.d.ts +2 -0
- package/tokens/taiga-ui-cdk-tokens.metadata.json +1 -1
- package/utils/os/index.d.ts +1 -0
- package/utils/os/is-apple-platform.d.ts +11 -0
- package/utils/os/taiga-ui-cdk-utils-os.metadata.json +1 -1
- package/schematics/utils/remove-import.js +0 -11
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { ElementRef, Directive, Optional, Self, Inject, Renderer2, NgZone, InjectionToken, inject, Input, NgModule } from '@angular/core';
|
|
3
|
-
import { ANIMATION_FRAME } from '@ng-web-apis/common';
|
|
4
|
-
import { TUI_FOCUSABLE_ITEM_ACCESSOR,
|
|
3
|
+
import { ANIMATION_FRAME, WINDOW } from '@ng-web-apis/common';
|
|
4
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
|
|
5
5
|
import { POLLING_TIME } from '@taiga-ui/cdk/constants';
|
|
6
6
|
import { race, timer, Observable } from 'rxjs';
|
|
7
7
|
import { throttleTime, map, skipWhile, take } from 'rxjs/operators';
|
|
8
|
+
import { px } from '@taiga-ui/cdk/utils';
|
|
8
9
|
|
|
9
10
|
let AbstractTuiAutofocusHandler = class AbstractTuiAutofocusHandler {
|
|
10
11
|
constructor(tuiFocusableComponent, elementRef) {
|
|
@@ -58,11 +59,14 @@ TuiDefaultAutofocusHandler = __decorate([
|
|
|
58
59
|
__param(2, Inject(ANIMATION_FRAME))
|
|
59
60
|
], TuiDefaultAutofocusHandler);
|
|
60
61
|
|
|
62
|
+
// @dynamic
|
|
61
63
|
let TuiIosAutofocusHandler = class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {
|
|
62
|
-
constructor(tuiFocusableComponent, elementRef, renderer, ngZone) {
|
|
64
|
+
constructor(tuiFocusableComponent, elementRef, renderer, ngZone, windowRef) {
|
|
63
65
|
super(tuiFocusableComponent, elementRef);
|
|
64
66
|
this.renderer = renderer;
|
|
65
67
|
this.ngZone = ngZone;
|
|
68
|
+
this.windowRef = windowRef;
|
|
69
|
+
this.patchCssStyles();
|
|
66
70
|
}
|
|
67
71
|
setFocus() {
|
|
68
72
|
if (this.isTextFieldElement) {
|
|
@@ -74,44 +78,89 @@ let TuiIosAutofocusHandler = class TuiIosAutofocusHandler extends AbstractTuiAut
|
|
|
74
78
|
}
|
|
75
79
|
iosWebkitAutofocus() {
|
|
76
80
|
var _a;
|
|
77
|
-
const fakeInput = this.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const blurHandler = () => fakeInput.focus();
|
|
81
|
+
const fakeInput = this.makeFakeInput();
|
|
82
|
+
const duration = this.getDurationTimeBeforeFocus();
|
|
83
|
+
let fakeFocusTimeoutId = 0;
|
|
84
|
+
let elementFocusTimeoutId = 0;
|
|
85
|
+
const blurHandler = () => fakeInput.focus({ preventScroll: true });
|
|
82
86
|
const focusHandler = () => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
fakeInput.removeEventListener('blur', blurHandler);
|
|
91
|
-
fakeInput.removeEventListener('focus', focusHandler);
|
|
87
|
+
clearTimeout(fakeFocusTimeoutId);
|
|
88
|
+
fakeFocusTimeoutId = this.windowRef.setTimeout(() => {
|
|
89
|
+
clearTimeout(elementFocusTimeoutId);
|
|
90
|
+
fakeInput.removeEventListener('blur', blurHandler);
|
|
91
|
+
fakeInput.removeEventListener('focus', focusHandler);
|
|
92
|
+
elementFocusTimeoutId = this.windowRef.setTimeout(() => {
|
|
93
|
+
this.element.focus({ preventScroll: false });
|
|
92
94
|
fakeInput.remove();
|
|
93
|
-
});
|
|
95
|
+
}, duration);
|
|
94
96
|
});
|
|
95
97
|
};
|
|
96
|
-
/**
|
|
97
|
-
* @note: ping-pong eager strategy hack
|
|
98
|
-
* After creating an element and bringing it into DOM,
|
|
99
|
-
* the browser automatically focuses on the invisible element.
|
|
100
|
-
* And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,
|
|
101
|
-
* then we try to focus again on an invisible element, so that the keyboard slowly appears.
|
|
102
|
-
* This ping pong allows the keyboard to not overlap the modal window.
|
|
103
|
-
*/
|
|
104
98
|
fakeInput.addEventListener('blur', blurHandler, { once: true });
|
|
105
99
|
fakeInput.addEventListener('focus', focusHandler);
|
|
106
|
-
(
|
|
107
|
-
|
|
100
|
+
if (this.insideDialog()) {
|
|
101
|
+
this.windowRef.document.body.appendChild(fakeInput);
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
(_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);
|
|
105
|
+
}
|
|
106
|
+
fakeInput.focus({ preventScroll: true });
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @note:
|
|
110
|
+
* emulate textfield position in layout with cursor
|
|
111
|
+
* before focus to real textfield element
|
|
112
|
+
*/
|
|
113
|
+
makeFakeInput() {
|
|
114
|
+
const fakeInput = this.renderer.createElement('input');
|
|
115
|
+
const rect = this.element.getBoundingClientRect();
|
|
116
|
+
fakeInput.style.height = px(rect.height);
|
|
117
|
+
fakeInput.style.width = px(rect.width / 2);
|
|
118
|
+
fakeInput.style.position = 'fixed';
|
|
119
|
+
fakeInput.style.opacity = '0';
|
|
120
|
+
fakeInput.style.fontSize = px(16); // disable possible auto zoom
|
|
121
|
+
fakeInput.readOnly = true; // prevent keyboard for fake input
|
|
122
|
+
// @note: emulate position cursor before focus to real textfield element
|
|
123
|
+
fakeInput.style.top = px(rect.top);
|
|
124
|
+
fakeInput.style.left = px(rect.left);
|
|
125
|
+
return fakeInput;
|
|
126
|
+
}
|
|
127
|
+
getDurationTimeBeforeFocus() {
|
|
128
|
+
return (parseFloat(this.windowRef
|
|
129
|
+
.getComputedStyle(this.element)
|
|
130
|
+
.getPropertyValue('--tui-duration')) || 0);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @note:
|
|
134
|
+
* unfortunately, in older versions of iOS
|
|
135
|
+
* there is a bug that the fake input cursor
|
|
136
|
+
* will move along with the dialog animation
|
|
137
|
+
* and then that dialog will be shaking
|
|
138
|
+
*/
|
|
139
|
+
insideDialog() {
|
|
140
|
+
return !!this.element.closest('tui-dialog');
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* @note:
|
|
144
|
+
* This is necessary so that the viewport isn't recalculated
|
|
145
|
+
* and then the dialogs don't shake.
|
|
146
|
+
*
|
|
147
|
+
* Also, we need to fixed height viewport,
|
|
148
|
+
* so that when focusing the dialogs don't shake
|
|
149
|
+
*/
|
|
150
|
+
patchCssStyles() {
|
|
151
|
+
const documentRef = this.windowRef.document;
|
|
152
|
+
for (const element of [documentRef.documentElement, documentRef.body]) {
|
|
153
|
+
element.style.setProperty('overflow', 'auto');
|
|
154
|
+
element.style.setProperty('height', '100%');
|
|
155
|
+
}
|
|
108
156
|
}
|
|
109
157
|
};
|
|
110
158
|
TuiIosAutofocusHandler.ctorParameters = () => [
|
|
111
159
|
{ type: undefined, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] },
|
|
112
160
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
113
161
|
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
|
|
114
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] }
|
|
162
|
+
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
163
|
+
{ type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
|
|
115
164
|
];
|
|
116
165
|
TuiIosAutofocusHandler = __decorate([
|
|
117
166
|
Directive(),
|
|
@@ -120,14 +169,15 @@ TuiIosAutofocusHandler = __decorate([
|
|
|
120
169
|
__param(0, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
121
170
|
__param(1, Inject(ElementRef)),
|
|
122
171
|
__param(2, Inject(Renderer2)),
|
|
123
|
-
__param(3, Inject(NgZone))
|
|
172
|
+
__param(3, Inject(NgZone)),
|
|
173
|
+
__param(4, Inject(WINDOW))
|
|
124
174
|
], TuiIosAutofocusHandler);
|
|
125
175
|
|
|
126
176
|
const TUI_AUTOFOCUS_HANDLER = new InjectionToken('Autofocusing handler');
|
|
127
177
|
// TODO: 3.0 remove in ivy compilation
|
|
128
|
-
function tuiAutofocusHandlerFactory(tuiFocusableComponent, elementRef, animationFrame$, renderer, ngZone) {
|
|
129
|
-
return inject(
|
|
130
|
-
? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone)
|
|
178
|
+
function tuiAutofocusHandlerFactory(tuiFocusableComponent, elementRef, animationFrame$, renderer, ngZone, windowRef) {
|
|
179
|
+
return inject(TUI_IS_IOS)
|
|
180
|
+
? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone, windowRef)
|
|
131
181
|
: new TuiDefaultAutofocusHandler(tuiFocusableComponent, elementRef, animationFrame$);
|
|
132
182
|
}
|
|
133
183
|
const TUI_AUTOFOCUS_PROVIDERS = [
|
|
@@ -141,6 +191,7 @@ const TUI_AUTOFOCUS_PROVIDERS = [
|
|
|
141
191
|
ANIMATION_FRAME,
|
|
142
192
|
Renderer2,
|
|
143
193
|
NgZone,
|
|
194
|
+
WINDOW,
|
|
144
195
|
],
|
|
145
196
|
},
|
|
146
197
|
];
|
|
@@ -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 {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\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)\n private readonly renderer: Renderer2,\n @Inject(NgZone)\n private readonly ngZone: NgZone,\n ) {\n super(tuiFocusableComponent, elementRef);\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: HTMLElement = this.renderer.createElement('input');\n\n fakeInput.style.position = 'absolute';\n fakeInput.style.opacity = '0';\n fakeInput.style.height = '0';\n\n const blurHandler = (): void => fakeInput.focus();\n const focusHandler = (): void => {\n setTimeout(() => {\n this.element.focus();\n\n /**\n * @note:\n * We can't remove the element immediately, because it breaks flow\n */\n setTimeout(() => {\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n fakeInput.remove();\n });\n });\n };\n\n /**\n * @note: ping-pong eager strategy hack\n * After creating an element and bringing it into DOM,\n * the browser automatically focuses on the invisible element.\n * And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,\n * then we try to focus again on an invisible element, so that the keyboard slowly appears.\n * This ping pong allows the keyboard to not overlap the modal window.\n */\n fakeInput.addEventListener('blur', blurHandler, {once: true});\n fakeInput.addEventListener('focus', focusHandler);\n\n this.element.parentElement?.appendChild(fakeInput);\n\n fakeInput.focus();\n }\n}\n","import {\n ElementRef,\n inject,\n InjectionToken,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_APPLE} 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): TuiAutofocusHandler {\n return inject(TUI_IS_APPLE)\n ? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone)\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 ],\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":";;;;;;;;IASsB,2BAA2B,GAAjD,MAAsB,2BAA2B;IAC7C,YACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ,IAAc,OAAO;;QACjB,QACI,OAAA,IAAI,CAAC,qBAAqB,0CAAE,sBAAsB;YAClD,IAAI,CAAC,UAAU,CAAC,aAAa,EAC/B;KACL;IAED,IAAc,kBAAkB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;KAClD;EAGJ;;;YAfsC,UAAU;;AAH3B,2BAA2B;IADhD,SAAS,EAAE;GACU,2BAA2B,CAkBhD;;ACjBD,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,MAA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,EAAE,CAAC;SAC3B;KACJ;EACJ;;4CARQ,MAAM,SAAC,qBAAqB;;AAHjC;IADC,KAAK,EAAE;wDACS;AAFR,qBAAqB;IAJjC,SAAS,CAAC;QACP,QAAQ,EAAE,gBAAgB;QAC1B,SAAS,EAAE,uBAAuB;KACrC,CAAC;IAMO,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;GALzB,qBAAqB,CAajC;;IClBY,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAJ9B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACRlC;;;;;;"}
|
|
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 inject,\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): TuiAutofocusHandler {\n return inject(TUI_IS_IOS)\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 ],\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":";;;;;;;;;IASsB,2BAA2B,GAAjD,MAAsB,2BAA2B;IAC7C,YACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ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O,WAAA,MAAM,CAAC,qBAAqB,CAAC,CAAA;GALzB,qBAAqB,CAajC;;IClBY,kBAAkB,GAA/B,MAAa,kBAAkB;EAAG;AAArB,kBAAkB;IAJ9B,QAAQ,CAAC;QACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;QACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,kBAAkB,CAAG;;ACRlC;;;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { __decorate, __param } from 'tslib';
|
|
2
|
+
import { ViewContainerRef, Inject, TemplateRef, Input, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { Subject, from, of } from 'rxjs';
|
|
4
|
+
import { concatMap, delay, takeUntil } from 'rxjs/operators';
|
|
5
|
+
|
|
6
|
+
let TuiForAsyncDirective = class TuiForAsyncDirective {
|
|
7
|
+
constructor(view, template) {
|
|
8
|
+
this.view = view;
|
|
9
|
+
this.template = template;
|
|
10
|
+
this.destroy$ = new Subject();
|
|
11
|
+
this.tuiForAsyncTimeout = 10;
|
|
12
|
+
}
|
|
13
|
+
ngOnChanges() {
|
|
14
|
+
this.clearViewForOldNodes();
|
|
15
|
+
this.createAsyncViewForNewNodes();
|
|
16
|
+
}
|
|
17
|
+
ngOnDestroy() {
|
|
18
|
+
this.clearViewForOldNodes();
|
|
19
|
+
this.destroy$.complete();
|
|
20
|
+
}
|
|
21
|
+
createAsyncViewForNewNodes() {
|
|
22
|
+
from((this.tuiForAsyncOf || []).entries())
|
|
23
|
+
.pipe(concatMap(entry => of(entry).pipe(delay(this.tuiForAsyncTimeout))), takeUntil(this.destroy$))
|
|
24
|
+
.subscribe(([index, item]) => this.view
|
|
25
|
+
.createEmbeddedView(this.template, { $implicit: item, index }, index)
|
|
26
|
+
.detectChanges());
|
|
27
|
+
}
|
|
28
|
+
clearViewForOldNodes() {
|
|
29
|
+
this.destroy$.next();
|
|
30
|
+
this.view.clear();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
TuiForAsyncDirective.ctorParameters = () => [
|
|
34
|
+
{ type: ViewContainerRef, decorators: [{ type: Inject, args: [ViewContainerRef,] }] },
|
|
35
|
+
{ type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] }
|
|
36
|
+
];
|
|
37
|
+
__decorate([
|
|
38
|
+
Input()
|
|
39
|
+
], TuiForAsyncDirective.prototype, "tuiForAsyncOf", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
Input()
|
|
42
|
+
], TuiForAsyncDirective.prototype, "tuiForAsyncTimeout", void 0);
|
|
43
|
+
TuiForAsyncDirective = __decorate([
|
|
44
|
+
Directive({ selector: '[tuiForAsync][tuiForAsyncOf]' }),
|
|
45
|
+
__param(0, Inject(ViewContainerRef)),
|
|
46
|
+
__param(1, Inject(TemplateRef))
|
|
47
|
+
], TuiForAsyncDirective);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @experimental
|
|
51
|
+
*/
|
|
52
|
+
let TuiForAsyncModule = class TuiForAsyncModule {
|
|
53
|
+
};
|
|
54
|
+
TuiForAsyncModule = __decorate([
|
|
55
|
+
NgModule({
|
|
56
|
+
declarations: [TuiForAsyncDirective],
|
|
57
|
+
exports: [TuiForAsyncDirective],
|
|
58
|
+
})
|
|
59
|
+
], TuiForAsyncModule);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Generated bundle index. Do not edit.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
export { TuiForAsyncDirective, TuiForAsyncModule };
|
|
66
|
+
//# sourceMappingURL=taiga-ui-cdk-directives-for-async.js.map
|
|
@@ -0,0 +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: '[tuiForAsync][tuiForAsyncOf]'})\nexport class TuiForAsyncDirective<T> implements OnChanges, OnDestroy {\n private readonly destroy$ = new Subject<void>();\n\n @Input()\n tuiForAsyncOf: readonly T[] | undefined | null;\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":";;;;;IAaa,oBAAoB,GAAjC,MAAa,oBAAoB;IAS7B,YAC+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,WAAW;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,YAAY,EAAE,CAAC,oBAAoB,CAAC;QACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAClC,CAAC;GACW,iBAAiB,CAAG;;ACXjC;;;;;;"}
|
|
@@ -10,6 +10,7 @@ export * from '@taiga-ui/cdk/directives/focus-visible';
|
|
|
10
10
|
export * from '@taiga-ui/cdk/directives/focusable';
|
|
11
11
|
export * from '@taiga-ui/cdk/directives/focused';
|
|
12
12
|
export * from '@taiga-ui/cdk/directives/for';
|
|
13
|
+
export * from '@taiga-ui/cdk/directives/for-async';
|
|
13
14
|
export * from '@taiga-ui/cdk/directives/high-dpi';
|
|
14
15
|
export * from '@taiga-ui/cdk/directives/hovered';
|
|
15
16
|
export * from '@taiga-ui/cdk/directives/input-mode';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives.js","sources":["ng://@taiga-ui/cdk/directives/taiga-ui-cdk-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives.js","sources":["ng://@taiga-ui/cdk/directives/taiga-ui-cdk-directives.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
1
2
|
var TuiCreditCardAutofillName;
|
|
2
3
|
(function (TuiCreditCardAutofillName) {
|
|
3
4
|
TuiCreditCardAutofillName["Off"] = "off";
|
|
4
5
|
TuiCreditCardAutofillName["CcName"] = "cc-name";
|
|
5
6
|
TuiCreditCardAutofillName["CcNumber"] = "cc-number";
|
|
6
7
|
TuiCreditCardAutofillName["CcCsc"] = "cc-csc";
|
|
8
|
+
TuiCreditCardAutofillName["CcExpMonth"] = "cc-exp-month";
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
* TODO: 3.0 replace with {@link CcExpMonth}
|
|
12
|
+
*/
|
|
7
13
|
TuiCreditCardAutofillName["CcExp_mounth"] = "cc-exp-month";
|
|
14
|
+
TuiCreditCardAutofillName["CcExpYear"] = "cc-exp-year";
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated
|
|
17
|
+
* TODO: 3.0 replace with {@link CcExpYear}
|
|
18
|
+
*/
|
|
8
19
|
TuiCreditCardAutofillName["CcExp_year"] = "cc-exp-year";
|
|
9
20
|
TuiCreditCardAutofillName["CcExp"] = "cc-exp";
|
|
10
21
|
TuiCreditCardAutofillName["CcType"] = "cc-type";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-enums.js","sources":["ng://@taiga-ui/cdk/enums/autocomplete.ts","ng://@taiga-ui/cdk/enums/day-of-week.ts","ng://@taiga-ui/cdk/enums/input-mode.ts","ng://@taiga-ui/cdk/enums/input-type.ts","ng://@taiga-ui/cdk/enums/month-number.ts","ng://@taiga-ui/cdk/enums/overscroll-mode.ts","ng://@taiga-ui/cdk/enums/taiga-ui-cdk-enums.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-enums.js","sources":["ng://@taiga-ui/cdk/enums/autocomplete.ts","ng://@taiga-ui/cdk/enums/day-of-week.ts","ng://@taiga-ui/cdk/enums/input-mode.ts","ng://@taiga-ui/cdk/enums/input-type.ts","ng://@taiga-ui/cdk/enums/month-number.ts","ng://@taiga-ui/cdk/enums/overscroll-mode.ts","ng://@taiga-ui/cdk/enums/taiga-ui-cdk-enums.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nexport const enum TuiCreditCardAutofillName {\n Off = 'off',\n CcName = 'cc-name',\n CcNumber = 'cc-number',\n CcCsc = 'cc-csc',\n CcExpMonth = 'cc-exp-month',\n /**\n * @deprecated\n * TODO: 3.0 replace with {@link CcExpMonth}\n */\n CcExp_mounth = 'cc-exp-month',\n CcExpYear = 'cc-exp-year',\n /**\n * @deprecated\n * TODO: 3.0 replace with {@link CcExpYear}\n */\n CcExp_year = 'cc-exp-year',\n CcExp = 'cc-exp',\n CcType = 'cc-type',\n}\n\nexport const enum TuiNameAutofillName {\n Off = 'off',\n Name = 'name',\n GivenName = 'given-name',\n AdditionalName = 'additional-name',\n FamilyName = 'family-name',\n}\n\nexport const enum TuiAccountAutofillName {\n Off = 'off',\n Username = 'username',\n NewPassword = 'new-password',\n CurrentPassword = 'current-password',\n}\n\nexport const enum TuiEmailAutofillName {\n Off = 'off',\n Email = 'email',\n}\n\nexport const enum TuiAddressAutofillName {\n Off = 'off',\n StreetAddress = 'street-address',\n PostalCode = 'postal-code',\n CountryName = 'country-name',\n}\n\nexport const enum TuiPhoneAutofillName {\n Off = 'off',\n Tel = 'tel',\n}\n\nexport const enum TuiDateAutofillName {\n Off = 'off',\n Bday = 'bday',\n}\n\nexport const enum TuiTransactionAutofillName {\n Off = 'off',\n TransactionCurrency = 'transaction-currency',\n TransactionAmount = 'transaction-amount',\n}\n\nexport type TuiAutofillFieldNameT =\n | 'off'\n // TuiCreditCardAutofillName\n | 'cc-name'\n | 'cc-number'\n | 'cc-csc'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-exp'\n | 'cc-type'\n // TuiNameAutofillName\n | 'name'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n // TuiAccountAutofillName\n | 'username'\n | 'new-password'\n | 'current-password'\n // TuiEmailAutofillName\n | 'email'\n // TuiAddressAutofillName\n | 'street-address'\n | 'postal-code'\n | 'country-name'\n // TuiPhoneAutofillName\n | 'tel'\n // TuiDateAutofillName\n | 'bday'\n // TuiTransactionAutofillName\n | 'transaction-currency'\n | 'transaction-amount';\n\nexport type TuiAutofillFieldName =\n | TuiAutofillFieldNameT\n | TuiCreditCardAutofillName\n | TuiNameAutofillName\n | TuiAccountAutofillName\n | TuiEmailAutofillName\n | TuiAddressAutofillName\n | TuiPhoneAutofillName\n | TuiDateAutofillName\n | TuiTransactionAutofillName;\n","export const enum TuiDayOfWeek {\n Sunday,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday,\n}\n","/**\n * @deprecated use join type {@link TuiInputModeT}\n */\nexport const enum TuiInputMode {\n None = 'none',\n Text = 'text',\n Decimal = 'decimal',\n Numeric = 'numeric',\n Tel = 'tel',\n Email = 'email',\n Url = 'url',\n Search = 'search',\n}\n","/**\n * @deprecated use join type {@link TuiInputTypeT}\n */\nexport const enum TuiInputType {\n Text = 'text',\n Tel = 'tel',\n Email = 'email',\n Url = 'url',\n Password = 'password',\n}\n","export const enum TuiMonthNumber {\n January,\n February,\n March,\n April,\n May,\n June,\n July,\n August,\n September,\n October,\n November,\n December,\n}\n","/**\n * Modes for {@link TuiOverscrollDirective}:\n *\n * All — blocks all scroll actions\n * Scroll — blocks scroll actions only if content is scrollable (equivalent to overscroll-behavior: contain)\n * None — blocking is disabled\n * @deprecated use join type {@link TuiOverscrollModeT}\n */\nexport const enum TuiOverscrollMode {\n All = 'all',\n Scroll = 'scroll',\n None = 'none',\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;IACkB;AAAlB,WAAkB,yBAAyB;IACvC,wCAAW,CAAA;IACX,+CAAkB,CAAA;IAClB,mDAAsB,CAAA;IACtB,6CAAgB,CAAA;IAChB,wDAA2B,CAAA;;;;;IAK3B,0DAA6B,CAAA;IAC7B,sDAAyB,CAAA;;;;;IAKzB,uDAA0B,CAAA;IAC1B,6CAAgB,CAAA;IAChB,+CAAkB,CAAA;AACtB,CAAC,EAnBiB,yBAAyB,KAAzB,yBAAyB,QAmB1C;IAEiB;AAAlB,WAAkB,mBAAmB;IACjC,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,+CAAwB,CAAA;IACxB,yDAAkC,CAAA;IAClC,iDAA0B,CAAA;AAC9B,CAAC,EANiB,mBAAmB,KAAnB,mBA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AAZ,YAAY;;ACH9B;;;IAGkB;AAAlB,WAAkB,YAAY;IAC1B,6BAAa,CAAA;IACb,2BAAW,CAAA;IACX,+BAAe,CAAA;IACf,2BAAW,CAAA;IACX,qCAAqB,CAAA;AACzB,CAAC,EANiB,YAAY,KAAZ,YAAY;;ICHZ;AAAlB,WAAkB,cAAc;IAC5B,yDAAO,CAAA;IACP,2DAAQ,CAAA;IACR,qDAAK,CAAA;IACL,qDAAK,CAAA;IACL,iDAAG,CAAA;IACH,mDAAI,CAAA;IACJ,mDAAI,CAAA;IACJ,uDAAM,CAAA;IACN,6DAAS,CAAA;IACT,yDAAO,CAAA;IACP,4DAAQ,CAAA;IACR,4DAAQ,CAAA;AACZ,CAAC,EAbiB,cAAc,KAAd,cAAc;;ACAhC;;;;;;;;IAQkB;AAAlB,WAAkB,iBAAiB;IAC/B,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACjB,CAAC,EAJiB,iBAAiB,KAAjB,iBAAiB;;ACRnC;;;;;;"}
|
|
@@ -96,6 +96,10 @@ const TUI_IS_ANDROID = new InjectionToken('Mobile browser that is not iOS (techn
|
|
|
96
96
|
|
|
97
97
|
const TUI_IS_APPLE = new InjectionToken('Apple(safari/webkit) detection', { factory: () => isApple(inject(NAVIGATOR)) });
|
|
98
98
|
|
|
99
|
+
const TUI_IS_CHROMIUM = new InjectionToken('Chromium browser engine detection', {
|
|
100
|
+
factory: () => !!inject(WINDOW).chrome,
|
|
101
|
+
});
|
|
102
|
+
|
|
99
103
|
/**
|
|
100
104
|
* {@link https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-any-way-to-detect-if-my-app-is-running-under-Cypress Cypress docs}
|
|
101
105
|
*/
|
|
@@ -103,6 +107,17 @@ const TUI_IS_CYPRESS = new InjectionToken('Detect if app is running under Cypres
|
|
|
103
107
|
factory: () => !!inject(WINDOW).Cypress,
|
|
104
108
|
});
|
|
105
109
|
|
|
110
|
+
const TUI_IS_FIREFOX = new InjectionToken('Firefox browser engine detection', {
|
|
111
|
+
factory: () => {
|
|
112
|
+
var _a;
|
|
113
|
+
return typeof ((_a = inject(WINDOW)) === null || _a === void 0 ? void 0 : _a.InstallTrigger) !== 'undefined';
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const TUI_IS_WEBKIT = new InjectionToken('Webkit browser engine detection', {
|
|
118
|
+
factory: () => !!inject(WINDOW).webkitConvertPointFromNodeToPage,
|
|
119
|
+
});
|
|
120
|
+
|
|
106
121
|
/* @deprecated export token from @taiga-ui/core package **/
|
|
107
122
|
const TUI_SANITIZER = new InjectionToken('A custom Sanitizer to sanitize source before inlining');
|
|
108
123
|
|
|
@@ -141,5 +156,5 @@ const TUI_ZOOM_OPTIONS = new InjectionToken('Zoom options', {
|
|
|
141
156
|
* Generated bundle index. Do not edit.
|
|
142
157
|
*/
|
|
143
158
|
|
|
144
|
-
export { TUI_ACTIVE_ELEMENT, TUI_ALERTS, TUI_DEFAULT_RENDERER, TUI_DIALOGS, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_ANDROID, TUI_IS_APPLE, TUI_IS_CYPRESS, TUI_IS_IOS, TUI_IS_MOBILE, TUI_REMOVED_ELEMENT, TUI_SANITIZER, TUI_SWIPE_OPTIONS, TUI_TAKE_ONLY_TRUSTED_EVENTS, TUI_TOUCH_SUPPORTED, TUI_WINDOW_HEIGHT, TUI_ZOOM_OPTIONS };
|
|
159
|
+
export { TUI_ACTIVE_ELEMENT, TUI_ALERTS, TUI_DEFAULT_RENDERER, TUI_DIALOGS, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_ANDROID, TUI_IS_APPLE, TUI_IS_CHROMIUM, TUI_IS_CYPRESS, TUI_IS_FIREFOX, TUI_IS_IOS, TUI_IS_MOBILE, TUI_IS_WEBKIT, TUI_REMOVED_ELEMENT, TUI_SANITIZER, TUI_SWIPE_OPTIONS, TUI_TAKE_ONLY_TRUSTED_EVENTS, TUI_TOUCH_SUPPORTED, TUI_WINDOW_HEIGHT, TUI_ZOOM_OPTIONS };
|
|
145
160
|
//# sourceMappingURL=taiga-ui-cdk-tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-tokens.js","sources":["ng://@taiga-ui/cdk/tokens/removed-element.ts","ng://@taiga-ui/cdk/tokens/active-element.ts","ng://@taiga-ui/cdk/tokens/alerts.ts","ng://@taiga-ui/cdk/tokens/default-renderer.ts","ng://@taiga-ui/cdk/tokens/dialogs.ts","ng://@taiga-ui/cdk/tokens/focusable-item-accessor.ts","ng://@taiga-ui/cdk/tokens/is-ios.ts","ng://@taiga-ui/cdk/tokens/is-mobile.ts","ng://@taiga-ui/cdk/tokens/is-android.ts","ng://@taiga-ui/cdk/tokens/is-apple.ts","ng://@taiga-ui/cdk/tokens/is-cypress.ts","ng://@taiga-ui/cdk/tokens/sanitizer.ts","ng://@taiga-ui/cdk/tokens/swipe-options.ts","ng://@taiga-ui/cdk/tokens/take-only-trusted-events.ts","ng://@taiga-ui/cdk/tokens/touch-supported.ts","ng://@taiga-ui/cdk/tokens/window-height.ts","ng://@taiga-ui/cdk/tokens/zoom-options.ts","ng://@taiga-ui/cdk/tokens/taiga-ui-cdk-tokens.ts"],"sourcesContent":["import {ɵAnimationEngine} from '@angular/animations/browser';\nimport {inject, InjectFlags, InjectionToken} from '@angular/core';\nimport {BehaviorSubject, Observable, timer} from 'rxjs';\nimport {mapTo, share, startWith, switchMap} from 'rxjs/operators';\n\nexport const TUI_REMOVED_ELEMENT = new InjectionToken<Observable<Element | null>>(\n 'Element currently being removed by AnimationEngine',\n {\n factory: () => {\n const stub = {onRemovalComplete: () => {}};\n const element$ = new BehaviorSubject<Element | null>(null);\n const engine = inject(ɵAnimationEngine, InjectFlags.Optional) ?? stub;\n const {onRemovalComplete = stub.onRemovalComplete} = engine;\n\n engine.onRemovalComplete = (element, context) => {\n element$.next(element);\n onRemovalComplete(element, context);\n };\n\n return element$.pipe(\n switchMap(element => timer(0).pipe(mapTo(null), startWith(element))),\n share(),\n );\n },\n },\n);\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {getActualTarget, getDocumentOrShadowRoot} from '@taiga-ui/cdk/utils';\nimport {merge, Observable, of, timer} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n mapTo,\n repeatWhen,\n share,\n startWith,\n switchMap,\n take,\n takeUntil,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {TUI_REMOVED_ELEMENT} from './removed-element';\n\nexport const TUI_ACTIVE_ELEMENT = new InjectionToken<Observable<EventTarget | null>>(\n 'Active element on the document for ActiveZone',\n {\n factory: () => {\n const removedElement$ = inject(TUI_REMOVED_ELEMENT);\n const windowRef = inject(WINDOW);\n const documentRef = inject(DOCUMENT);\n const focusout$ = typedFromEvent(windowRef, 'focusout');\n const focusin$ = typedFromEvent(windowRef, 'focusin');\n const blur$ = typedFromEvent(windowRef, 'blur');\n const mousedown$ = typedFromEvent(windowRef, 'mousedown');\n const mouseup$ = typedFromEvent(windowRef, 'mouseup');\n\n return merge(\n focusout$.pipe(\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(mousedown$),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => mouseup$),\n withLatestFrom(removedElement$),\n filter(([event, removedElement]) =>\n isValidFocusout(getActualTarget(event), removedElement),\n ),\n map(([{relatedTarget}]) => relatedTarget),\n ),\n blur$.pipe(\n map(() => documentRef.activeElement),\n filter(element => !!element && element.matches('iframe')),\n ),\n focusin$.pipe(\n switchMap(event => {\n const target = getActualTarget(event);\n const root = getDocumentOrShadowRoot(target) as Document;\n\n return root === documentRef\n ? of(target)\n : shadowRootActiveElement(root).pipe(startWith(target));\n }),\n ),\n mousedown$.pipe(\n switchMap(event =>\n !documentRef.activeElement ||\n documentRef.activeElement === documentRef.body\n ? of(getActualTarget(event))\n : focusout$.pipe(\n take(1),\n mapTo(getActualTarget(event)),\n takeUntil(timer(0)),\n ),\n ),\n ),\n ).pipe(distinctUntilChanged(), share());\n },\n },\n);\n\n// Checks if focusout event should be considered leaving active zone\nfunction isValidFocusout(target: any, removedElement: Element | null = null): boolean {\n return (\n // Not due to switching tabs/going to DevTools\n getDocumentOrShadowRoot(target).activeElement !== target &&\n // Not due to button/input becoming disabled\n !target.disabled &&\n // Not due to element being removed from DOM\n (!removedElement || !removedElement.contains(target))\n );\n}\n\nfunction shadowRootActiveElement(root: Document): Observable<EventTarget | null> {\n return merge(\n typedFromEvent(root, 'focusin').pipe(map(({target}) => target)),\n typedFromEvent(root, 'focusout').pipe(\n filter(\n ({target, relatedTarget}) => !!relatedTarget && isValidFocusout(target),\n ),\n map(({relatedTarget}) => relatedTarget),\n ),\n );\n}\n","import {InjectionToken} from '@angular/core';\nimport {TuiAriaDialogContext} from '@taiga-ui/cdk/interfaces';\nimport {Observable} from 'rxjs';\n\nexport const TUI_ALERTS = new InjectionToken<\n ReadonlyArray<Observable<readonly TuiAriaDialogContext[]>>\n>('A stream of alerts', {\n factory: () => [],\n});\n","import {inject, InjectionToken, Renderer2, RendererFactory2} from '@angular/core';\n\n// https://github.com/angular/angular/issues/17824#issuecomment-353239017\nexport const TUI_DEFAULT_RENDERER = new InjectionToken<Renderer2>(\n 'A Renderer2 for global services',\n {\n // @ts-ignore\n factory: () => inject(RendererFactory2).createRenderer(null, null),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiAriaDialogContext} from '@taiga-ui/cdk/interfaces';\nimport {Observable} from 'rxjs';\n\nexport const TUI_DIALOGS = new InjectionToken<\n ReadonlyArray<Observable<readonly TuiAriaDialogContext[]>>\n>('A stream of dialogs', {\n factory: () => [],\n});\n","import {InjectionToken} from '@angular/core';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\n\nexport const TUI_FOCUSABLE_ITEM_ACCESSOR =\n new InjectionToken<TuiFocusableElementAccessor>('A component that can be focused');\n","import {inject, InjectionToken} from '@angular/core';\nimport {NAVIGATOR} from '@ng-web-apis/common';\nimport {isIos} from '@taiga-ui/cdk/utils';\n\nexport const TUI_IS_IOS = new InjectionToken<boolean>('iOS browser detection', {\n factory: () => isIos(inject(NAVIGATOR)),\n});\n","import {inject, InjectionToken} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\n\n// https://stackoverflow.com/a/11381730/2706426 http://detectmobilebrowsers.com/\nconst firstRegex =\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/;\nconst secondRegex =\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/;\n\nexport const TUI_IS_MOBILE = new InjectionToken<boolean>('Mobile browser detection', {\n factory: () =>\n firstRegex.test(inject(USER_AGENT).toLowerCase()) ||\n secondRegex.test(inject(USER_AGENT).slice(0, 4).toLowerCase()),\n});\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_IS_IOS} from './is-ios';\nimport {TUI_IS_MOBILE} from './is-mobile';\n\nexport const TUI_IS_ANDROID = new InjectionToken<boolean>(\n 'Mobile browser that is not iOS (technically includes Windows Phone, Blackberry etc.)',\n {\n factory: () => inject(TUI_IS_MOBILE) && !inject(TUI_IS_IOS),\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {NAVIGATOR} from '@ng-web-apis/common';\nimport {isApple} from '@taiga-ui/cdk/utils';\n\nexport const TUI_IS_APPLE = new InjectionToken<boolean>(\n 'Apple(safari/webkit) detection',\n {factory: () => isApple(inject(NAVIGATOR))},\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport interface WindowWithCypress extends Window {\n Cypress?: unknown;\n}\n\n/**\n * {@link https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-any-way-to-detect-if-my-app-is-running-under-Cypress Cypress docs}\n */\nexport const TUI_IS_CYPRESS = new InjectionToken<boolean>(\n 'Detect if app is running under Cypress',\n {\n factory: () => !!inject<WindowWithCypress>(WINDOW).Cypress,\n },\n);\n","import {InjectionToken, Sanitizer} from '@angular/core';\n\n/* @deprecated export token from @taiga-ui/core package **/\nexport const TUI_SANITIZER = new InjectionToken<Sanitizer>(\n 'A custom Sanitizer to sanitize source before inlining',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiSwipeOptions} from '@taiga-ui/cdk/interfaces';\n\nexport const TUI_SWIPE_OPTIONS = new InjectionToken<TuiSwipeOptions>('Swipe options', {\n factory: () => ({timeout: 500, threshold: 30}),\n});\n","import {InjectionToken} from '@angular/core';\n\n/**\n * @description:\n * The isTrusted read-only property of the Event interface is a boolean value that is true\n * when the event was generated by a user action, and false when the event was created or\n * modified by a script or dispatched via EventTarget.dispatchEvent().\n */\nexport const TUI_TAKE_ONLY_TRUSTED_EVENTS: InjectionToken<boolean> =\n new InjectionToken<boolean>(\n 'This token need for override behavior the `pressedObservable` function',\n {\n factory: () => true,\n },\n );\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport const TUI_TOUCH_SUPPORTED = new InjectionToken('Touch support detection', {\n factory: () => inject(WINDOW).matchMedia('(any-pointer: coarse)').matches,\n});\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {map, shareReplay, startWith} from 'rxjs/operators';\n\nexport const TUI_WINDOW_HEIGHT = new InjectionToken<Observable<number>>(\n 'Window height accounting for disappearing address bar',\n {\n factory: () => {\n const windowRef = inject(WINDOW);\n\n return typedFromEvent(windowRef, 'resize').pipe(\n startWith(null),\n map(() => windowRef.innerHeight),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiZoomOptions} from '@taiga-ui/cdk/interfaces';\n\nexport const TUI_ZOOM_OPTIONS = new InjectionToken<TuiZoomOptions>('Zoom options', {\n factory: () => ({\n wheelSensitivity: 0.01,\n }),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CACjD,oDAAoD,EACpD;IACI,OAAO,EAAE;;QACL,MAAM,IAAI,GAAG,EAAC,iBAAiB,EAAE,SAAQ,EAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAiB,IAAI,CAAC,CAAC;QAC3D,MAAM,MAAM,SAAG,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC;QACtE,MAAM,EAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,EAAC,GAAG,MAAM,CAAC;QAE5D,MAAM,CAAC,iBAAiB,GAAG,CAAC,OAAO,EAAE,OAAO;YACxC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SACvC,CAAC;QAEF,OAAO,QAAQ,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PD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-tokens.js","sources":["ng://@taiga-ui/cdk/tokens/removed-element.ts","ng://@taiga-ui/cdk/tokens/active-element.ts","ng://@taiga-ui/cdk/tokens/alerts.ts","ng://@taiga-ui/cdk/tokens/default-renderer.ts","ng://@taiga-ui/cdk/tokens/dialogs.ts","ng://@taiga-ui/cdk/tokens/focusable-item-accessor.ts","ng://@taiga-ui/cdk/tokens/is-ios.ts","ng://@taiga-ui/cdk/tokens/is-mobile.ts","ng://@taiga-ui/cdk/tokens/is-android.ts","ng://@taiga-ui/cdk/tokens/is-apple.ts","ng://@taiga-ui/cdk/tokens/is-chromium.ts","ng://@taiga-ui/cdk/tokens/is-cypress.ts","ng://@taiga-ui/cdk/tokens/is-firefox.ts","ng://@taiga-ui/cdk/tokens/is-webkit.ts","ng://@taiga-ui/cdk/tokens/sanitizer.ts","ng://@taiga-ui/cdk/tokens/swipe-options.ts","ng://@taiga-ui/cdk/tokens/take-only-trusted-events.ts","ng://@taiga-ui/cdk/tokens/touch-supported.ts","ng://@taiga-ui/cdk/tokens/window-height.ts","ng://@taiga-ui/cdk/tokens/zoom-options.ts","ng://@taiga-ui/cdk/tokens/taiga-ui-cdk-tokens.ts"],"sourcesContent":["import {ɵAnimationEngine} from '@angular/animations/browser';\nimport {inject, InjectFlags, InjectionToken} from '@angular/core';\nimport {BehaviorSubject, Observable, timer} from 'rxjs';\nimport {mapTo, share, startWith, switchMap} from 'rxjs/operators';\n\nexport const TUI_REMOVED_ELEMENT = new InjectionToken<Observable<Element | null>>(\n 'Element currently being removed by AnimationEngine',\n {\n factory: () => {\n const stub = {onRemovalComplete: () => {}};\n const element$ = new BehaviorSubject<Element | null>(null);\n const engine = inject(ɵAnimationEngine, InjectFlags.Optional) ?? stub;\n const {onRemovalComplete = stub.onRemovalComplete} = engine;\n\n engine.onRemovalComplete = (element, context) => {\n element$.next(element);\n onRemovalComplete(element, context);\n };\n\n return element$.pipe(\n switchMap(element => timer(0).pipe(mapTo(null), startWith(element))),\n share(),\n );\n },\n },\n);\n","import {DOCUMENT} from '@angular/common';\nimport {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {getActualTarget, getDocumentOrShadowRoot} from '@taiga-ui/cdk/utils';\nimport {merge, Observable, of, timer} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n map,\n mapTo,\n repeatWhen,\n share,\n startWith,\n switchMap,\n take,\n takeUntil,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {TUI_REMOVED_ELEMENT} from './removed-element';\n\nexport const TUI_ACTIVE_ELEMENT = new InjectionToken<Observable<EventTarget | null>>(\n 'Active element on the document for ActiveZone',\n {\n factory: () => {\n const removedElement$ = inject(TUI_REMOVED_ELEMENT);\n const windowRef = inject(WINDOW);\n const documentRef = inject(DOCUMENT);\n const focusout$ = typedFromEvent(windowRef, 'focusout');\n const focusin$ = typedFromEvent(windowRef, 'focusin');\n const blur$ = typedFromEvent(windowRef, 'blur');\n const mousedown$ = typedFromEvent(windowRef, 'mousedown');\n const mouseup$ = typedFromEvent(windowRef, 'mouseup');\n\n return merge(\n focusout$.pipe(\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(mousedown$),\n // eslint-disable-next-line rxjs/no-ignored-notifier\n repeatWhen(() => mouseup$),\n withLatestFrom(removedElement$),\n filter(([event, removedElement]) =>\n isValidFocusout(getActualTarget(event), removedElement),\n ),\n map(([{relatedTarget}]) => relatedTarget),\n ),\n blur$.pipe(\n map(() => documentRef.activeElement),\n filter(element => !!element && element.matches('iframe')),\n ),\n focusin$.pipe(\n switchMap(event => {\n const target = getActualTarget(event);\n const root = getDocumentOrShadowRoot(target) as Document;\n\n return root === documentRef\n ? of(target)\n : shadowRootActiveElement(root).pipe(startWith(target));\n }),\n ),\n mousedown$.pipe(\n switchMap(event =>\n !documentRef.activeElement ||\n documentRef.activeElement === documentRef.body\n ? of(getActualTarget(event))\n : focusout$.pipe(\n take(1),\n mapTo(getActualTarget(event)),\n takeUntil(timer(0)),\n ),\n ),\n ),\n ).pipe(distinctUntilChanged(), share());\n },\n },\n);\n\n// Checks if focusout event should be considered leaving active zone\nfunction isValidFocusout(target: any, removedElement: Element | null = null): boolean {\n return (\n // Not due to switching tabs/going to DevTools\n getDocumentOrShadowRoot(target).activeElement !== target &&\n // Not due to button/input becoming disabled\n !target.disabled &&\n // Not due to element being removed from DOM\n (!removedElement || !removedElement.contains(target))\n );\n}\n\nfunction shadowRootActiveElement(root: Document): Observable<EventTarget | null> {\n return merge(\n typedFromEvent(root, 'focusin').pipe(map(({target}) => target)),\n typedFromEvent(root, 'focusout').pipe(\n filter(\n ({target, relatedTarget}) => !!relatedTarget && isValidFocusout(target),\n ),\n map(({relatedTarget}) => relatedTarget),\n ),\n );\n}\n","import {InjectionToken} from '@angular/core';\nimport {TuiAriaDialogContext} from '@taiga-ui/cdk/interfaces';\nimport {Observable} from 'rxjs';\n\nexport const TUI_ALERTS = new InjectionToken<\n ReadonlyArray<Observable<readonly TuiAriaDialogContext[]>>\n>('A stream of alerts', {\n factory: () => [],\n});\n","import {inject, InjectionToken, Renderer2, RendererFactory2} from '@angular/core';\n\n// https://github.com/angular/angular/issues/17824#issuecomment-353239017\nexport const TUI_DEFAULT_RENDERER = new InjectionToken<Renderer2>(\n 'A Renderer2 for global services',\n {\n // @ts-ignore\n factory: () => inject(RendererFactory2).createRenderer(null, null),\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiAriaDialogContext} from '@taiga-ui/cdk/interfaces';\nimport {Observable} from 'rxjs';\n\nexport const TUI_DIALOGS = new InjectionToken<\n ReadonlyArray<Observable<readonly TuiAriaDialogContext[]>>\n>('A stream of dialogs', {\n factory: () => [],\n});\n","import {InjectionToken} from '@angular/core';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\n\nexport const TUI_FOCUSABLE_ITEM_ACCESSOR =\n new InjectionToken<TuiFocusableElementAccessor>('A component that can be focused');\n","import {inject, InjectionToken} from '@angular/core';\nimport {NAVIGATOR} from '@ng-web-apis/common';\nimport {isIos} from '@taiga-ui/cdk/utils';\n\nexport const TUI_IS_IOS = new InjectionToken<boolean>('iOS browser detection', {\n factory: () => isIos(inject(NAVIGATOR)),\n});\n","import {inject, InjectionToken} from '@angular/core';\nimport {USER_AGENT} from '@ng-web-apis/common';\n\n// https://stackoverflow.com/a/11381730/2706426 http://detectmobilebrowsers.com/\nconst firstRegex =\n /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/;\nconst secondRegex =\n /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/;\n\nexport const TUI_IS_MOBILE = new InjectionToken<boolean>('Mobile browser detection', {\n factory: () =>\n firstRegex.test(inject(USER_AGENT).toLowerCase()) ||\n secondRegex.test(inject(USER_AGENT).slice(0, 4).toLowerCase()),\n});\n","import {inject, InjectionToken} from '@angular/core';\n\nimport {TUI_IS_IOS} from './is-ios';\nimport {TUI_IS_MOBILE} from './is-mobile';\n\nexport const TUI_IS_ANDROID = new InjectionToken<boolean>(\n 'Mobile browser that is not iOS (technically includes Windows Phone, Blackberry etc.)',\n {\n factory: () => inject(TUI_IS_MOBILE) && !inject(TUI_IS_IOS),\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {NAVIGATOR} from '@ng-web-apis/common';\nimport {isApple} from '@taiga-ui/cdk/utils';\n\nexport const TUI_IS_APPLE = new InjectionToken<boolean>(\n 'Apple(safari/webkit) detection',\n {factory: () => isApple(inject(NAVIGATOR))},\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport const TUI_IS_CHROMIUM = new InjectionToken<boolean>(\n 'Chromium browser engine detection',\n {\n factory: () => !!(inject(WINDOW) as Window & {chrome: unknown}).chrome,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport interface WindowWithCypress extends Window {\n Cypress?: unknown;\n}\n\n/**\n * {@link https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-any-way-to-detect-if-my-app-is-running-under-Cypress Cypress docs}\n */\nexport const TUI_IS_CYPRESS = new InjectionToken<boolean>(\n 'Detect if app is running under Cypress',\n {\n factory: () => !!inject<WindowWithCypress>(WINDOW).Cypress,\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport const TUI_IS_FIREFOX = new InjectionToken<boolean>(\n 'Firefox browser engine detection',\n {\n factory: () =>\n typeof (inject(WINDOW) as Window & {InstallTrigger: unknown})\n ?.InstallTrigger !== 'undefined',\n },\n);\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport const TUI_IS_WEBKIT = new InjectionToken<boolean>(\n 'Webkit browser engine detection',\n {\n factory: () => !!inject(WINDOW).webkitConvertPointFromNodeToPage,\n },\n);\n","import {InjectionToken, Sanitizer} from '@angular/core';\n\n/* @deprecated export token from @taiga-ui/core package **/\nexport const TUI_SANITIZER = new InjectionToken<Sanitizer>(\n 'A custom Sanitizer to sanitize source before inlining',\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiSwipeOptions} from '@taiga-ui/cdk/interfaces';\n\nexport const TUI_SWIPE_OPTIONS = new InjectionToken<TuiSwipeOptions>('Swipe options', {\n factory: () => ({timeout: 500, threshold: 30}),\n});\n","import {InjectionToken} from '@angular/core';\n\n/**\n * @description:\n * The isTrusted read-only property of the Event interface is a boolean value that is true\n * when the event was generated by a user action, and false when the event was created or\n * modified by a script or dispatched via EventTarget.dispatchEvent().\n */\nexport const TUI_TAKE_ONLY_TRUSTED_EVENTS: InjectionToken<boolean> =\n new InjectionToken<boolean>(\n 'This token need for override behavior the `pressedObservable` function',\n {\n factory: () => true,\n },\n );\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\nexport const TUI_TOUCH_SUPPORTED = new InjectionToken('Touch support detection', {\n factory: () => inject(WINDOW).matchMedia('(any-pointer: coarse)').matches,\n});\n","import {inject, InjectionToken} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {typedFromEvent} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {map, shareReplay, startWith} from 'rxjs/operators';\n\nexport const TUI_WINDOW_HEIGHT = new InjectionToken<Observable<number>>(\n 'Window height accounting for disappearing address bar',\n {\n factory: () => {\n const windowRef = inject(WINDOW);\n\n return typedFromEvent(windowRef, 'resize').pipe(\n startWith(null),\n map(() => windowRef.innerHeight),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n },\n },\n);\n","import {InjectionToken} from '@angular/core';\nimport {TuiZoomOptions} from '@taiga-ui/cdk/interfaces';\n\nexport const TUI_ZOOM_OPTIONS = new InjectionToken<TuiZoomOptions>('Zoom options', {\n factory: () => ({\n wheelSensitivity: 0.01,\n }),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc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AAgC;CACnE;;ACLL;MACa,aAAa,GAAG,IAAI,cAAc,CAC3C,uDAAuD;;MCD9C,iBAAiB,GAAG,IAAI,cAAc,CAAkB,eAAe,EAAE;IAClF,OAAO,EAAE,OAAO,EAAC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAC,CAAC;CACjD;;ACHD;;;;;;MAMa,4BAA4B,GACrC,IAAI,cAAc,CACd,wEAAwE,EACxE;IACI,OAAO,EAAE,MAAM,IAAI;CACtB;;MCVI,mBAAmB,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;IAC7E,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,OAAO;CAC5E;;MCCY,iBAAiB,GAAG,IAAI,cAAc,CAC/C,uDAAuD,EACvD;IACI,OAAO,EAAE;QACL,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,cAAc,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,IAAI,CAC3C,SAAS,CAAC,IAAI,CAAC,EACf,GAAG,CAAC,MAAM,SAAS,CAAC,WAAW,CAAC,EAChC,WAAW,CAAC,EAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAC/C,CAAC;KACL;CACJ;;MCfQ,gBAAgB,GAAG,IAAI,cAAc,CAAiB,cAAc,EAAE;IAC/E,OAAO,EAAE,OAAO;QACZ,gBAAgB,EAAE,IAAI;KACzB,CAAC;CACL;;ACPD;;;;;;"}
|
|
@@ -2,8 +2,8 @@ function isEdge(userAgent) {
|
|
|
2
2
|
return userAgent.toLowerCase().includes('edge');
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
const EDGE = 'edge/';
|
|
5
6
|
function isEdgeOlderThan(version, userAgent) {
|
|
6
|
-
const EDGE = 'edge/';
|
|
7
7
|
const currentVersion = parseInt(userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length), 10);
|
|
8
8
|
return currentVersion < version;
|
|
9
9
|
}
|
|
@@ -18,7 +18,7 @@ function isIE(userAgent) {
|
|
|
18
18
|
|
|
19
19
|
function isSafari(element) {
|
|
20
20
|
const documentRef = element.ownerDocument;
|
|
21
|
-
const windowRef = documentRef
|
|
21
|
+
const windowRef = documentRef === null || documentRef === void 0 ? void 0 : documentRef.defaultView;
|
|
22
22
|
return !!windowRef && 'safari' in windowRef;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["export function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('edge');\n}\n","
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils-browser.js","sources":["ng://@taiga-ui/cdk/utils/browser/is-edge.ts","ng://@taiga-ui/cdk/utils/browser/is-edge-older-than.ts","ng://@taiga-ui/cdk/utils/browser/is-firefox.ts","ng://@taiga-ui/cdk/utils/browser/is-ie.ts","ng://@taiga-ui/cdk/utils/browser/is-safari.ts","ng://@taiga-ui/cdk/utils/browser/taiga-ui-cdk-utils-browser.ts"],"sourcesContent":["export function isEdge(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('edge');\n}\n","const EDGE = 'edge/';\n\nexport function isEdgeOlderThan(version: number, userAgent: string): boolean {\n const currentVersion = parseInt(\n userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length),\n 10,\n );\n\n return currentVersion < version;\n}\n","export function isFirefox(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('firefox');\n}\n","export function isIE(userAgent: string): boolean {\n return userAgent.toLowerCase().includes('trident');\n}\n","export function isSafari(element: Element): boolean {\n const documentRef = element.ownerDocument;\n const windowRef = documentRef?.defaultView;\n\n return !!windowRef && 'safari' in windowRef;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"SAAgB,MAAM,CAAC,SAAiB;IACpC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACpD;;ACFA,MAAM,IAAI,GAAG,OAAO,CAAC;SAEL,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,MAAM,cAAc,GAAG,QAAQ,CAC3B,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,EACpE,EAAE,CACL,CAAC;IAEF,OAAO,cAAc,GAAG,OAAO,CAAC;AACpC;;SCTgB,SAAS,CAAC,SAAiB;IACvC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,IAAI,CAAC,SAAiB;IAClC,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACvD;;SCFgB,QAAQ,CAAC,OAAgB;IACrC,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,MAAM,SAAS,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,CAAC;IAE3C,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD;;ACLA;;;;;;"}
|
|
@@ -10,7 +10,7 @@ function getNativeFocused(documentRef) {
|
|
|
10
10
|
return documentRef.activeElement;
|
|
11
11
|
}
|
|
12
12
|
let element = documentRef.activeElement.shadowRoot.activeElement;
|
|
13
|
-
while (element
|
|
13
|
+
while (element === null || element === void 0 ? void 0 : element.shadowRoot) {
|
|
14
14
|
element = element.shadowRoot.activeElement;
|
|
15
15
|
}
|
|
16
16
|
return element;
|