@taiga-ui/cdk 2.45.0 → 2.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/controller.d.ts +6 -0
- package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +63 -21
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js +50 -20
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +54 -24
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +50 -20
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js +51 -21
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +54 -29
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +50 -20
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-decorators.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +265 -92
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +91 -42
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-checked.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-checked.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-drag.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-drag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-droppable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-element.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-element.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focusable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-focused.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js +324 -0
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-for-async.umd.min.js +2 -0
- package/bundles/taiga-ui-cdk-directives-for-async.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-for.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-for.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-for.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.js +51 -21
- package/bundles/taiga-ui-cdk-directives-item.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-item.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-let.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-let.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-obscured.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-pan.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-pan.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-portal.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-pressed.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-swipe.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-validator.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-validator.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js +50 -20
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-directives-zoom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives.umd.js +12 -4
- package/bundles/taiga-ui-cdk-directives.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.js +12 -0
- package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js +50 -20
- package/bundles/taiga-ui-cdk-exceptions.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-exceptions.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js +50 -20
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-pipes-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +50 -20
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +50 -20
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +54 -26
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.js +2 -2
- package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +3 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.js +39 -0
- package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-os.umd.min.js +2 -0
- package/bundles/taiga-ui-cdk-utils-os.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +50 -20
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js +1 -15
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.js +12 -4
- package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.min.js +1 -1
- package/components/dialog-host/taiga-ui-cdk-components-dialog-host.metadata.json +1 -1
- package/components/portal-host/portal.service.d.ts +1 -1
- package/date-time/date-fillers.d.ts +0 -2
- package/date-time/day-range.d.ts +1 -2
- package/date-time/day.d.ts +0 -1
- package/date-time/month-range.d.ts +0 -1
- package/date-time/month.d.ts +0 -1
- package/date-time/taiga-ui-cdk-date-time.metadata.json +1 -1
- package/directives/auto-focus/autofocus.directive.d.ts +4 -13
- package/directives/auto-focus/autofocus.options.d.ts +13 -0
- package/directives/auto-focus/handlers/abstract.handler.d.ts +11 -0
- package/directives/auto-focus/handlers/default.handler.d.ts +9 -0
- package/directives/auto-focus/handlers/ios.handler.d.ts +35 -0
- package/directives/auto-focus/index.d.ts +4 -0
- package/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.metadata.json +1 -1
- package/directives/autofilled/autofilled-style.component.d.ts +2 -0
- package/directives/autofilled/autofilled.directive.d.ts +5 -4
- package/directives/autofilled/index.d.ts +1 -0
- package/directives/autofilled/taiga-ui-cdk-directives-autofilled.metadata.json +1 -1
- package/directives/for-async/for-async.directive.d.ts +13 -0
- package/directives/for-async/for-async.module.d.ts +5 -0
- package/directives/for-async/index.d.ts +2 -0
- package/directives/for-async/package.json +13 -0
- package/directives/for-async/taiga-ui-cdk-directives-for-async.d.ts +4 -0
- package/directives/for-async/taiga-ui-cdk-directives-for-async.metadata.json +1 -0
- package/directives/index.d.ts +1 -0
- package/directives/item/item.directive.d.ts +1 -1
- package/directives/taiga-ui-cdk-directives.metadata.json +1 -1
- package/enums/autocomplete.d.ts +10 -0
- package/enums/taiga-ui-cdk-enums.metadata.json +1 -1
- package/esm2015/abstract/controller.js +7 -1
- package/esm2015/abstract/interactive.js +2 -2
- package/esm2015/components/dialog-host/dialog-host.component.js +5 -5
- package/esm2015/components/portal-host/portal.service.js +2 -2
- package/esm2015/date-time/date-fillers.js +1 -3
- package/esm2015/date-time/day-range.js +2 -2
- package/esm2015/date-time/day.js +2 -3
- package/esm2015/date-time/month-range.js +1 -2
- package/esm2015/date-time/month.js +2 -3
- package/esm2015/date-time/year.js +2 -2
- package/esm2015/directives/auto-focus/autofocus.directive.js +11 -87
- package/esm2015/directives/auto-focus/autofocus.options.js +28 -0
- package/esm2015/directives/auto-focus/handlers/abstract.handler.js +25 -0
- package/esm2015/directives/auto-focus/handlers/default.handler.js +39 -0
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +121 -0
- package/esm2015/directives/auto-focus/index.js +5 -1
- package/esm2015/directives/autofilled/autofilled-style.component.js +13 -0
- package/esm2015/directives/autofilled/autofilled.directive.js +23 -37
- package/esm2015/directives/autofilled/autofilled.module.js +4 -2
- package/esm2015/directives/autofilled/index.js +2 -1
- package/esm2015/directives/for-async/for-async.directive.js +48 -0
- package/esm2015/directives/for-async/for-async.module.js +16 -0
- package/esm2015/directives/for-async/index.js +3 -0
- package/esm2015/directives/for-async/taiga-ui-cdk-directives-for-async.js +5 -0
- package/esm2015/directives/index.js +2 -1
- package/esm2015/directives/item/item.directive.js +2 -2
- package/esm2015/enums/autocomplete.js +12 -1
- package/esm2015/observables/replay-control-value-changes.js +2 -2
- package/esm2015/tokens/index.js +2 -1
- package/esm2015/tokens/is-apple.js +5 -0
- package/esm2015/tokens/is-ios.js +4 -6
- package/esm2015/utils/browser/index.js +2 -2
- package/esm2015/utils/browser/is-edge-older-than.js +2 -2
- package/esm2015/utils/browser/{is-IE.js → is-ie.js} +1 -1
- package/esm2015/utils/browser/is-safari.js +2 -2
- package/esm2015/utils/focus/get-native-focused.js +2 -2
- package/esm2015/utils/focus/set-native-focused.js +3 -1
- package/esm2015/utils/index.js +2 -1
- package/esm2015/utils/os/index.js +4 -0
- package/esm2015/utils/os/is-apple-platform.js +14 -0
- package/esm2015/utils/os/is-apple.js +6 -0
- package/esm2015/utils/os/is-ios.js +7 -0
- package/esm2015/utils/os/taiga-ui-cdk-utils-os.js +5 -0
- package/esm5/abstract/controller.js +14 -1
- package/esm5/abstract/interactive.js +2 -2
- package/esm5/components/dialog-host/dialog-host.component.js +5 -5
- package/esm5/components/portal-host/portal.service.js +2 -2
- package/esm5/date-time/date-fillers.js +1 -3
- package/esm5/date-time/day-range.js +2 -2
- package/esm5/date-time/day.js +2 -3
- package/esm5/date-time/month-range.js +1 -2
- package/esm5/date-time/month.js +2 -3
- package/esm5/date-time/year.js +2 -2
- package/esm5/directives/auto-focus/autofocus.directive.js +11 -97
- package/esm5/directives/auto-focus/autofocus.options.js +28 -0
- package/esm5/directives/auto-focus/handlers/abstract.handler.js +34 -0
- package/esm5/directives/auto-focus/handlers/default.handler.js +43 -0
- package/esm5/directives/auto-focus/handlers/ios.handler.js +137 -0
- package/esm5/directives/auto-focus/index.js +5 -1
- package/esm5/directives/autofilled/autofilled-style.component.js +16 -0
- package/esm5/directives/autofilled/autofilled.directive.js +24 -21
- package/esm5/directives/autofilled/autofilled.module.js +4 -2
- package/esm5/directives/autofilled/index.js +2 -1
- package/esm5/directives/for-async/for-async.directive.js +52 -0
- package/esm5/directives/for-async/for-async.module.js +19 -0
- package/esm5/directives/for-async/index.js +3 -0
- package/esm5/directives/for-async/taiga-ui-cdk-directives-for-async.js +5 -0
- package/esm5/directives/index.js +2 -1
- package/esm5/directives/item/item.directive.js +2 -2
- package/esm5/enums/autocomplete.js +12 -1
- package/esm5/observables/replay-control-value-changes.js +2 -2
- package/esm5/tokens/index.js +2 -1
- package/esm5/tokens/is-apple.js +5 -0
- package/esm5/tokens/is-ios.js +4 -8
- package/esm5/utils/browser/index.js +2 -2
- package/esm5/utils/browser/is-edge-older-than.js +2 -2
- package/esm5/utils/browser/{is-IE.js → is-ie.js} +1 -1
- package/esm5/utils/browser/is-safari.js +2 -2
- package/esm5/utils/focus/get-native-focused.js +2 -2
- package/esm5/utils/focus/set-native-focused.js +3 -1
- package/esm5/utils/index.js +2 -1
- package/esm5/utils/os/index.js +4 -0
- package/esm5/utils/os/is-apple-platform.js +14 -0
- package/esm5/utils/os/is-apple.js +6 -0
- package/esm5/utils/os/is-ios.js +7 -0
- package/esm5/utils/os/taiga-ui-cdk-utils-os.js +5 -0
- package/fesm2015/taiga-ui-cdk-abstract.js +8 -2
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +4 -4
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-portal-host.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-portal-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +4 -9
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +187 -69
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js +33 -37
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.js +66 -0
- package/fesm2015/taiga-ui-cdk-directives-for-async.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-directives-item.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-item.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives.js +1 -0
- package/fesm2015/taiga-ui-cdk-directives.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-enums.js +11 -0
- package/fesm2015/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +6 -7
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-browser.js +2 -2
- package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +3 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js +31 -0
- package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js +13 -2
- package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-dialog-host.js +4 -4
- package/fesm5/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-portal-host.js +1 -1
- package/fesm5/taiga-ui-cdk-components-portal-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js +4 -9
- package/fesm5/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js +211 -74
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-autofilled.js +38 -22
- package/fesm5/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js +73 -0
- package/fesm5/taiga-ui-cdk-directives-for-async.js.map +1 -0
- package/fesm5/taiga-ui-cdk-directives-item.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-item.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives.js +1 -0
- package/fesm5/taiga-ui-cdk-directives.js.map +1 -1
- package/fesm5/taiga-ui-cdk-enums.js +11 -0
- package/fesm5/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm5/taiga-ui-cdk-observables.js +1 -1
- package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js +6 -9
- package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-browser.js +2 -2
- package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js +3 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-os.js +31 -0
- package/fesm5/taiga-ui-cdk-utils-os.js.map +1 -0
- package/fesm5/taiga-ui-cdk-utils.js +1 -0
- package/fesm5/taiga-ui-cdk-utils.js.map +1 -1
- package/observables/replay-control-value-changes.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/ng-add/constants/modules.d.ts +1 -1
- package/schematics/ng-add/constants/modules.js +2 -2
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/schema.json +3 -3
- package/schematics/ng-add/steps/add-taiga-modules.js +1 -1
- package/schematics/ng-update/constants/consts.d.ts +7 -7
- package/schematics/ng-update/constants/consts.js +28 -0
- package/schematics/ng-update/constants/enums.d.ts +3 -3
- package/schematics/ng-update/constants/enums.js +22 -0
- package/schematics/ng-update/constants/services.d.ts +8 -0
- package/schematics/ng-update/constants/services.js +43 -0
- package/schematics/ng-update/constants/types.d.ts +4 -3
- package/schematics/ng-update/constants/types.js +55 -0
- package/schematics/ng-update/constants/warnings.d.ts +6 -0
- package/schematics/ng-update/constants/warnings.js +30 -0
- package/schematics/ng-update/index.js +4 -0
- package/schematics/ng-update/steps/rename-types.js +27 -11
- package/schematics/ng-update/steps/replace-const.js +2 -2
- package/schematics/ng-update/steps/replace-enums.js +2 -2
- package/schematics/ng-update/steps/replace-services.d.ts +1 -0
- package/schematics/ng-update/steps/replace-services.js +51 -0
- package/schematics/ng-update/steps/show-warnings.d.ts +2 -0
- package/schematics/ng-update/steps/show-warnings.js +35 -0
- package/schematics/utils/{remove-import.d.ts → import-manipulations.d.ts} +1 -0
- package/schematics/utils/import-manipulations.js +19 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/is-apple.d.ts +2 -0
- package/tokens/taiga-ui-cdk-tokens.metadata.json +1 -1
- package/utils/browser/index.d.ts +1 -1
- package/utils/browser/{is-IE.d.ts → is-ie.d.ts} +0 -0
- package/utils/browser/taiga-ui-cdk-utils-browser.metadata.json +1 -1
- package/utils/focus/set-native-focused.d.ts +2 -0
- package/utils/index.d.ts +1 -0
- package/utils/os/index.d.ts +3 -0
- package/utils/os/is-apple-platform.d.ts +11 -0
- package/utils/os/is-apple.d.ts +1 -0
- package/utils/os/is-ios.d.ts +1 -0
- package/utils/os/package.json +13 -0
- package/utils/os/taiga-ui-cdk-utils-os.d.ts +4 -0
- package/utils/os/taiga-ui-cdk-utils-os.metadata.json +1 -0
- package/utils/taiga-ui-cdk-utils.metadata.json +1 -1
- package/schematics/utils/remove-import.js +0 -11
|
@@ -1,10 +1,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,mBAAmB,QAMpC;IAEiB;AAAlB,WAAkB,sBAAsB;IACpC,qCAAW,CAAA;IACX,+CAAqB,CAAA;IACrB,sDAA4B,CAAA;IAC5B,8DAAoC,CAAA;AACxC,CAAC,EALiB,sBAAsB,KAAtB,sBAAsB,QAKvC;IAEiB;AAAlB,WAAkB,oBAAoB;IAClC,mCAAW,CAAA;IACX,uCAAe,CAA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DAAQ,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;;;;;;"}
|
|
@@ -105,7 +105,7 @@ function preventDefault() {
|
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
107
|
* Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)
|
|
108
|
-
* TODO:
|
|
108
|
+
* TODO: 3.0 name should be shorter.
|
|
109
109
|
*/
|
|
110
110
|
function tuiReplayedValueChangesFrom(control) {
|
|
111
111
|
return new Observable(function (subscriber) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-observables.js","sources":["ng://@taiga-ui/cdk/observables/typed-from-event.ts","ng://@taiga-ui/cdk/observables/mouse-drag-finish-from.ts","ng://@taiga-ui/cdk/observables/drag-and-drop-from.ts","ng://@taiga-ui/cdk/observables/is-alive.ts","ng://@taiga-ui/cdk/observables/focus-visible-observable.ts","ng://@taiga-ui/cdk/observables/items-query-list-observable.ts","ng://@taiga-ui/cdk/observables/must-be-present.ts","ng://@taiga-ui/cdk/observables/pressed-observable.ts","ng://@taiga-ui/cdk/observables/prevent-default.ts","ng://@taiga-ui/cdk/observables/replay-control-value-changes.ts","ng://@taiga-ui/cdk/observables/stop-propagation.ts","ng://@taiga-ui/cdk/observables/watch.ts","ng://@taiga-ui/cdk/observables/zone-free.ts","ng://@taiga-ui/cdk/observables/taiga-ui-cdk-observables.ts"],"sourcesContent":["import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {fromEvent, Observable} from 'rxjs';\n\nexport function typedFromEvent<E extends keyof WindowEventMap>(\n target: Window,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;\nexport function typedFromEvent<E extends keyof DocumentEventMap>(\n target: Document,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;\nexport function typedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(\n target: T,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;\nexport function typedFromEvent<\n E extends Event,\n T extends TuiTypedEventTarget<TuiEventWith<E, T>>,\n>(\n target: T,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<E, T>>;\nexport function typedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<E>;\nexport function typedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options: AddEventListenerOptions = {},\n): Observable<E> {\n return fromEvent(target, event, options);\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {merge, Observable} from 'rxjs';\n\nimport {typedFromEvent} from './typed-from-event';\n\n/**\n * Letting go of the mouse after it was pressed\n * @param target\n */\nexport function mouseDragFinishFrom<\n T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>,\n>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>> {\n return merge(typedFromEvent(target, 'mouseup'), typedFromEvent(target, 'dragend'));\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {isPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {concat, merge, Observable} from 'rxjs';\nimport {endWith, map, repeat, take, takeWhile} from 'rxjs/operators';\n\nimport {mouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {typedFromEvent} from './typed-from-event';\n\nexport const enum TuiDragStage {\n Start,\n Continues,\n End,\n}\n\nexport class TuiDragState {\n constructor(readonly stage: TuiDragStage, readonly event: MouseEvent) {}\n}\n\nexport function dragAndDropFrom(element: Element): Observable<TuiDragState> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return concat(\n typedFromEvent(element, 'mousedown').pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.Start, event)),\n ),\n merge(\n typedFromEvent(ownerDocument, 'mousemove').pipe(\n map(event => new TuiDragState(TuiDragStage.Continues, event)),\n ),\n mouseDragFinishFrom(ownerDocument).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.End, event)),\n endWith(null),\n ),\n ).pipe(takeWhile(isPresent)),\n ).pipe(repeat());\n}\n","import {OperatorFunction, pipe, timer} from 'rxjs';\nimport {distinctUntilChanged, mapTo, startWith, switchMapTo} from 'rxjs/operators';\n\n/**\n * Operator to set lifespan after which current value is considered obsolete\n */\nexport function tuiIsAlive(lifespan: number = 0): OperatorFunction<any, boolean> {\n return pipe(\n switchMapTo(timer(lifespan).pipe(mapTo(false), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {isNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {concat, merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n ignoreElements,\n mapTo,\n repeat,\n shareReplay,\n startWith,\n switchMapTo,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {tuiIsAlive} from './is-alive';\nimport {typedFromEvent} from './typed-from-event';\n\nlet documentMouseUpIsAlive$: Observable<boolean>;\nlet documentMouseDownIsAlive$: Observable<boolean>;\n\nexport function focusVisibleObservable(element: Element): Observable<boolean> {\n const elementBlur$ = typedFromEvent(element, 'blur');\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n if (!documentMouseDownIsAlive$ || !documentMouseUpIsAlive$) {\n documentMouseUpIsAlive$ = typedFromEvent(ownerDocument, 'mouseup', {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n documentMouseDownIsAlive$ = typedFromEvent(ownerDocument, 'mousedown', {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n return merge(\n // focus events excluding ones that came right after mouse action\n concat(\n typedFromEvent(element, 'focus').pipe(take(1)),\n // filtering out blur events when element remains focused so that we ignore browser tab focus loss\n elementBlur$.pipe(\n filter(() => !isNativeFocused(element)),\n take(1),\n ignoreElements(),\n ),\n ).pipe(\n repeat(),\n withLatestFrom(\n documentMouseDownIsAlive$,\n documentMouseUpIsAlive$,\n (_event, elementActual, documentActual) =>\n elementActual || documentActual,\n ),\n filter(isUserFocus => !isUserFocus),\n ),\n ).pipe(\n switchMapTo(elementBlur$.pipe(mapTo(false), take(1), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {QueryList} from '@angular/core';\nimport {getOriginalArrayFromQueryList} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * Converts changes observable of a QueryList to an Observable of arrays\n */\nexport function itemsQueryListObservable<T>(\n queryList: QueryList<T>,\n): Observable<readonly T[]> {\n return queryList.changes.pipe(\n map(() => getOriginalArrayFromQueryList(queryList)),\n startWith(getOriginalArrayFromQueryList(queryList)),\n );\n}\n","import {TuiValuePresentException} from '@taiga-ui/cdk/exceptions';\nimport {isPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {OperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function mustBePresent<T>(): OperatorFunction<T | undefined | null, T> {\n return map(value => {\n if (!isPresent(value)) {\n throw new TuiValuePresentException();\n }\n\n return value;\n });\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {filter, mapTo, startWith, switchMapTo, take} from 'rxjs/operators';\n\nimport {mouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {typedFromEvent} from './typed-from-event';\n\nexport interface TuiPressedObservableOptions {\n onlyTrusted: boolean;\n}\n\nexport function pressedObservable(\n element: Element,\n {onlyTrusted}: TuiPressedObservableOptions = {onlyTrusted: true},\n): Observable<boolean> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return typedFromEvent(element, 'mousedown').pipe(\n filter(({isTrusted}) => isTrusted || !onlyTrusted),\n switchMapTo(\n mouseDragFinishFrom(ownerDocument).pipe(\n mapTo(false),\n take(1),\n startWith(true),\n ),\n ),\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function preventDefault<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(event => event.preventDefault());\n}\n","import {AbstractControl, AbstractControlDirective} from '@angular/forms';\nimport {TuiValueChangesException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\n/**\n * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)\n * TODO: rename function in 3.0. The name should be shorter.\n */\nexport function tuiReplayedValueChangesFrom<T>(\n control: AbstractControl | AbstractControlDirective,\n): Observable<T> {\n return new Observable(subscriber => {\n if (!control.valueChanges) {\n throw new TuiValueChangesException();\n }\n\n control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);\n });\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function stopPropagation<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(e => {\n e.stopPropagation();\n });\n}\n","import {ChangeDetectorRef} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function watch<T>(\n changeDetectorRef: ChangeDetectorRef,\n): MonoTypeOperatorFunction<T> {\n return tap(() => {\n changeDetectorRef.markForCheck();\n });\n}\n","import {NgZone} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, pipe} from 'rxjs';\n\nexport function tuiZonefull<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: (error: unknown) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n }),\n );\n}\n\nexport function tuiZonefree<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n ngZone.runOutsideAngular(() => source.subscribe(subscriber)),\n );\n}\n\nexport function tuiZoneOptimized<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return pipe(tuiZonefree(ngZone), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;SA+BgB,cAAc,CAC1B,MAA8B,EAC9B,KAAa,EACb,OAAqC;IAArC,wBAAA,EAAA,YAAqC;IAErC,OAAO,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAC7C;;AChCA;;;;SAIgB,mBAAmB,CAEjC,MAAwB;IACtB,OAAO,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AACvF;;ICLkB;AAAlB,WAAkB,YAAY;IAC1B,iDAAK,CAAA;IACL,yDAAS,CAAA;IACT,6CAAG,CAAA;AACP,CAAC,EAJiB,YAAY,KAAZ,YAAY,QAI7B;;IAGG,sBAAqB,KAAmB,EAAW,KAAiB;QAA/C,UAAK,GAAL,KAAK,CAAc;QAAW,UAAK,GAAL,KAAK,CAAY;KAAI;IAC5E,mBAAC;AAAD,CAAC,IA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MAAM,CAAC,CAAC,CAAC;AAC1D;;ACvBA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-observables.js","sources":["ng://@taiga-ui/cdk/observables/typed-from-event.ts","ng://@taiga-ui/cdk/observables/mouse-drag-finish-from.ts","ng://@taiga-ui/cdk/observables/drag-and-drop-from.ts","ng://@taiga-ui/cdk/observables/is-alive.ts","ng://@taiga-ui/cdk/observables/focus-visible-observable.ts","ng://@taiga-ui/cdk/observables/items-query-list-observable.ts","ng://@taiga-ui/cdk/observables/must-be-present.ts","ng://@taiga-ui/cdk/observables/pressed-observable.ts","ng://@taiga-ui/cdk/observables/prevent-default.ts","ng://@taiga-ui/cdk/observables/replay-control-value-changes.ts","ng://@taiga-ui/cdk/observables/stop-propagation.ts","ng://@taiga-ui/cdk/observables/watch.ts","ng://@taiga-ui/cdk/observables/zone-free.ts","ng://@taiga-ui/cdk/observables/taiga-ui-cdk-observables.ts"],"sourcesContent":["import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {fromEvent, Observable} from 'rxjs';\n\nexport function typedFromEvent<E extends keyof WindowEventMap>(\n target: Window,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;\nexport function typedFromEvent<E extends keyof DocumentEventMap>(\n target: Document,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;\nexport function typedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(\n target: T,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;\nexport function typedFromEvent<\n E extends Event,\n T extends TuiTypedEventTarget<TuiEventWith<E, T>>,\n>(\n target: T,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<E, T>>;\nexport function typedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<E>;\nexport function typedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options: AddEventListenerOptions = {},\n): Observable<E> {\n return fromEvent(target, event, options);\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {merge, Observable} from 'rxjs';\n\nimport {typedFromEvent} from './typed-from-event';\n\n/**\n * Letting go of the mouse after it was pressed\n * @param target\n */\nexport function mouseDragFinishFrom<\n T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>,\n>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>> {\n return merge(typedFromEvent(target, 'mouseup'), typedFromEvent(target, 'dragend'));\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {isPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {concat, merge, Observable} from 'rxjs';\nimport {endWith, map, repeat, take, takeWhile} from 'rxjs/operators';\n\nimport {mouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {typedFromEvent} from './typed-from-event';\n\nexport const enum TuiDragStage {\n Start,\n Continues,\n End,\n}\n\nexport class TuiDragState {\n constructor(readonly stage: TuiDragStage, readonly event: MouseEvent) {}\n}\n\nexport function dragAndDropFrom(element: Element): Observable<TuiDragState> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return concat(\n typedFromEvent(element, 'mousedown').pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.Start, event)),\n ),\n merge(\n typedFromEvent(ownerDocument, 'mousemove').pipe(\n map(event => new TuiDragState(TuiDragStage.Continues, event)),\n ),\n mouseDragFinishFrom(ownerDocument).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.End, event)),\n endWith(null),\n ),\n ).pipe(takeWhile(isPresent)),\n ).pipe(repeat());\n}\n","import {OperatorFunction, pipe, timer} from 'rxjs';\nimport {distinctUntilChanged, mapTo, startWith, switchMapTo} from 'rxjs/operators';\n\n/**\n * Operator to set lifespan after which current value is considered obsolete\n */\nexport function tuiIsAlive(lifespan: number = 0): OperatorFunction<any, boolean> {\n return pipe(\n switchMapTo(timer(lifespan).pipe(mapTo(false), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {isNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {concat, merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n ignoreElements,\n mapTo,\n repeat,\n shareReplay,\n startWith,\n switchMapTo,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {tuiIsAlive} from './is-alive';\nimport {typedFromEvent} from './typed-from-event';\n\nlet documentMouseUpIsAlive$: Observable<boolean>;\nlet documentMouseDownIsAlive$: Observable<boolean>;\n\nexport function focusVisibleObservable(element: Element): Observable<boolean> {\n const elementBlur$ = typedFromEvent(element, 'blur');\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n if (!documentMouseDownIsAlive$ || !documentMouseUpIsAlive$) {\n documentMouseUpIsAlive$ = typedFromEvent(ownerDocument, 'mouseup', {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n documentMouseDownIsAlive$ = typedFromEvent(ownerDocument, 'mousedown', {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n return merge(\n // focus events excluding ones that came right after mouse action\n concat(\n typedFromEvent(element, 'focus').pipe(take(1)),\n // filtering out blur events when element remains focused so that we ignore browser tab focus loss\n elementBlur$.pipe(\n filter(() => !isNativeFocused(element)),\n take(1),\n ignoreElements(),\n ),\n ).pipe(\n repeat(),\n withLatestFrom(\n documentMouseDownIsAlive$,\n documentMouseUpIsAlive$,\n (_event, elementActual, documentActual) =>\n elementActual || documentActual,\n ),\n filter(isUserFocus => !isUserFocus),\n ),\n ).pipe(\n switchMapTo(elementBlur$.pipe(mapTo(false), take(1), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {QueryList} from '@angular/core';\nimport {getOriginalArrayFromQueryList} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * Converts changes observable of a QueryList to an Observable of arrays\n */\nexport function itemsQueryListObservable<T>(\n queryList: QueryList<T>,\n): Observable<readonly T[]> {\n return queryList.changes.pipe(\n map(() => getOriginalArrayFromQueryList(queryList)),\n startWith(getOriginalArrayFromQueryList(queryList)),\n );\n}\n","import {TuiValuePresentException} from '@taiga-ui/cdk/exceptions';\nimport {isPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {OperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function mustBePresent<T>(): OperatorFunction<T | undefined | null, T> {\n return map(value => {\n if (!isPresent(value)) {\n throw new TuiValuePresentException();\n }\n\n return value;\n });\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {filter, mapTo, startWith, switchMapTo, take} from 'rxjs/operators';\n\nimport {mouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {typedFromEvent} from './typed-from-event';\n\nexport interface TuiPressedObservableOptions {\n onlyTrusted: boolean;\n}\n\nexport function pressedObservable(\n element: Element,\n {onlyTrusted}: TuiPressedObservableOptions = {onlyTrusted: true},\n): Observable<boolean> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return typedFromEvent(element, 'mousedown').pipe(\n filter(({isTrusted}) => isTrusted || !onlyTrusted),\n switchMapTo(\n mouseDragFinishFrom(ownerDocument).pipe(\n mapTo(false),\n take(1),\n startWith(true),\n ),\n ),\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function preventDefault<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(event => event.preventDefault());\n}\n","import {AbstractControl, AbstractControlDirective} from '@angular/forms';\nimport {TuiValueChangesException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\n/**\n * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)\n * TODO: 3.0 name should be shorter.\n */\nexport function tuiReplayedValueChangesFrom<T>(\n control: AbstractControl | AbstractControlDirective,\n): Observable<T> {\n return new Observable(subscriber => {\n if (!control.valueChanges) {\n throw new TuiValueChangesException();\n }\n\n control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);\n });\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function stopPropagation<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(e => {\n e.stopPropagation();\n });\n}\n","import {ChangeDetectorRef} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function watch<T>(\n changeDetectorRef: ChangeDetectorRef,\n): MonoTypeOperatorFunction<T> {\n return tap(() => {\n changeDetectorRef.markForCheck();\n });\n}\n","import {NgZone} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, pipe} from 'rxjs';\n\nexport function tuiZonefull<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: (error: unknown) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n }),\n );\n}\n\nexport function tuiZonefree<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n ngZone.runOutsideAngular(() => source.subscribe(subscriber)),\n );\n}\n\nexport function tuiZoneOptimized<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return pipe(tuiZonefree(ngZone), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":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E,UAAC,KAAc,IAAK,OAAA,MAAM,CAAC,GAAG,CAAC,cAAM,OAAA,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,GAAA,CAAC,GAAA;gBACpE,QAAQ,EAAE,cAAM,OAAA,MAAM,CAAC,GAAG,CAAC,cAAM,OAAA,UAAU,CAAC,QAAQ,EAAE,GAAA,CAAC,GAAA;aAC1D,CAAC;SAAA,CACL;KAAA,CAAC;AACV,CAAC;SAEe,WAAW,CAAI,MAAc;IACzC,OAAO,UAAA,MAAM;QACT,OAAA,IAAI,UAAU,CAAC,UAAA,UAAU;YACrB,OAAA,MAAM,CAAC,iBAAiB,CAAC,cAAM,OAAA,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,GAAA,CAAC;SAAA,CAC/D;KAAA,CAAC;AACV,CAAC;SAEe,gBAAgB,CAAI,MAAc;IAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D;;ACvBA;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __read } from 'tslib';
|
|
2
2
|
import { DOCUMENT } from '@angular/common';
|
|
3
3
|
import { InjectionToken, inject, InjectFlags, RendererFactory2 } from '@angular/core';
|
|
4
|
-
import { WINDOW,
|
|
4
|
+
import { WINDOW, NAVIGATOR, USER_AGENT } from '@ng-web-apis/common';
|
|
5
5
|
import { typedFromEvent } from '@taiga-ui/cdk/observables';
|
|
6
|
-
import { getActualTarget, getDocumentOrShadowRoot } from '@taiga-ui/cdk/utils';
|
|
6
|
+
import { getActualTarget, getDocumentOrShadowRoot, isIos, isApple } from '@taiga-ui/cdk/utils';
|
|
7
7
|
import { BehaviorSubject, timer, merge, of } from 'rxjs';
|
|
8
8
|
import { switchMap, mapTo, startWith, share, takeUntil, repeatWhen, withLatestFrom, filter, map, take, distinctUntilChanged, shareReplay } from 'rxjs/operators';
|
|
9
9
|
import { ɵAnimationEngine } from '@angular/animations/browser';
|
|
@@ -97,13 +97,8 @@ var TUI_DIALOGS = new InjectionToken('A stream of dialogs', {
|
|
|
97
97
|
|
|
98
98
|
var TUI_FOCUSABLE_ITEM_ACCESSOR = new InjectionToken('A component that can be focused');
|
|
99
99
|
|
|
100
|
-
var IOS_REG_EXP = /ipad|iphone|ipod/;
|
|
101
100
|
var TUI_IS_IOS = new InjectionToken('iOS browser detection', {
|
|
102
|
-
factory: function () {
|
|
103
|
-
return IOS_REG_EXP.test(inject(USER_AGENT).toLowerCase()) ||
|
|
104
|
-
(inject(USER_AGENT).toLowerCase().includes('apple') &&
|
|
105
|
-
inject(NAVIGATOR).maxTouchPoints > 1);
|
|
106
|
-
},
|
|
101
|
+
factory: function () { return isIos(inject(NAVIGATOR)); },
|
|
107
102
|
});
|
|
108
103
|
|
|
109
104
|
// https://stackoverflow.com/a/11381730/2706426 http://detectmobilebrowsers.com/
|
|
@@ -120,6 +115,8 @@ var TUI_IS_ANDROID = new InjectionToken('Mobile browser that is not iOS (technic
|
|
|
120
115
|
factory: function () { return inject(TUI_IS_MOBILE) && !inject(TUI_IS_IOS); },
|
|
121
116
|
});
|
|
122
117
|
|
|
118
|
+
var TUI_IS_APPLE = new InjectionToken('Apple(safari/webkit) detection', { factory: function () { return isApple(inject(NAVIGATOR)); } });
|
|
119
|
+
|
|
123
120
|
/**
|
|
124
121
|
* {@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}
|
|
125
122
|
*/
|
|
@@ -165,5 +162,5 @@ var TUI_ZOOM_OPTIONS = new InjectionToken('Zoom options', {
|
|
|
165
162
|
* Generated bundle index. Do not edit.
|
|
166
163
|
*/
|
|
167
164
|
|
|
168
|
-
export { TUI_ACTIVE_ELEMENT, TUI_ALERTS, TUI_DEFAULT_RENDERER, TUI_DIALOGS, TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_ANDROID, 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 };
|
|
165
|
+
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 };
|
|
169
166
|
//# 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-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, USER_AGENT} from '@ng-web-apis/common';\n\nconst IOS_REG_EXP = /ipad|iphone|ipod/;\n\nexport const TUI_IS_IOS = new InjectionToken<boolean>('iOS browser detection', {\n factory: () =>\n IOS_REG_EXP.test(inject(USER_AGENT).toLowerCase()) ||\n (inject(USER_AGENT).toLowerCase().includes('apple') &&\n inject(NAVIGATOR).maxTouchPoints > 1),\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 {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":";;;;;;;;;;IAKa,mBAAmB,GAAG,IAAI,cAAc,CACjD,oDAAoD,EACpD;IACI,OAAO,EAAE;;QACL,IAAM,IAAI,GAAG,EAAC,iBAAiB,EAAE,eAAQ,EAAC,CAAC;QAC3C,IAAM,QAAQ,GAAG,IAAI,eAAe,CAAiB,IAAI,CAAC,CAAC;QAC3D,IAAM,MAAM,SAAG,MA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O,EAAE,cAAM,OAAA,IAAI,GAAA;CACtB;;ICVI,mBAAmB,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;IAC7E,OAAO,EAAE,cAAM,OAAA,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,OAAO,GAAA;CAC5E;;ICCY,iBAAiB,GAAG,IAAI,cAAc,CAC/C,uDAAuD,EACvD;IACI,OAAO,EAAE;QACL,IAAM,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,cAAM,OAAA,SAAS,CAAC,WAAW,GAAA,CAAC,EAChC,WAAW,CAAC,EAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAC/C,CAAC;KACL;CACJ;;ICfQ,gBAAgB,GAAG,IAAI,cAAc,CAAiB,cAAc,EAAE;IAC/E,OAAO,EAAE,cAAM,QAAC;QACZ,gBAAgB,EAAE,IAAI;KACzB,IAAC;CACL;;ACPD;;;;;;"}
|
|
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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AG,IAAI,cAAc,CAAkB,eAAe,EAAE;IAClF,OAAO,EAAE,cAAM,QAAC,EAAC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAC,IAAC;CACjD;;ACHD;;;;;;IAMa,4BAA4B,GACrC,IAAI,cAAc,CACd,wEAAwE,EACxE;IACI,OAAO,EAAE,cAAM,OAAA,IAAI,GAAA;CACtB;;ICVI,mBAAmB,GAAG,IAAI,cAAc,CAAC,yBAAyB,EAAE;IAC7E,OAAO,EAAE,cAAM,OAAA,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,OAAO,GAAA;CAC5E;;ICCY,iBAAiB,GAAG,IAAI,cAAc,CAC/C,uDAAuD,EACvD;IACI,OAAO,EAAE;QACL,IAAM,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,cAAM,OAAA,SAAS,CAAC,WAAW,GAAA,CAAC,EAChC,WAAW,CAAC,EAAC,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAC/C,CAAC;KACL;CACJ;;ICfQ,gBAAgB,GAAG,IAAI,cAAc,CAAiB,cAAc,EAAE;IAC/E,OAAO,EAAE,cAAM,QAAC;QACZ,gBAAgB,EAAE,IAAI;KACzB,IAAC;CACL;;ACPD;;;;;;"}
|
|
@@ -2,8 +2,8 @@ function isEdge(userAgent) {
|
|
|
2
2
|
return userAgent.toLowerCase().includes('edge');
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
var EDGE = 'edge/';
|
|
5
6
|
function isEdgeOlderThan(version, userAgent) {
|
|
6
|
-
var EDGE = 'edge/';
|
|
7
7
|
var 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
|
var documentRef = element.ownerDocument;
|
|
21
|
-
var windowRef = documentRef
|
|
21
|
+
var 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-
|
|
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,IAAM,IAAI,GAAG,OAAO,CAAC;SAEL,eAAe,CAAC,OAAe,EAAE,SAAiB;IAC9D,IAAM,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,IAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAC1C,IAAM,SAAS,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,CAAC;IAE3C,OAAO,CAAC,CAAC,SAAS,IAAI,QAAQ,IAAI,SAAS,CAAC;AAChD;;ACLA;;;;;;"}
|
|
@@ -10,13 +10,15 @@ function getNativeFocused(documentRef) {
|
|
|
10
10
|
return documentRef.activeElement;
|
|
11
11
|
}
|
|
12
12
|
var 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;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
+
* @deprecated: use native element.focus()
|
|
21
|
+
* TODO: remove in v3.0
|
|
20
22
|
* Focuses or blurs and element
|
|
21
23
|
*
|
|
22
24
|
* @param element native element
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts","ng://@taiga-ui/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element && element.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document): void {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;SAKgB,gBAAgB,CAAC,WAAqB;IAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;QACrE,OAAO,WAAW,CAAC,aAAa,CAAC;KACpC;IAED,IAAI,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;IAEjE,OAAO,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE;QAClC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;KAC9C;IAED,OAAO,OAAO,CAAC;AACnB;;ACjBA;;;;;;;SAOgB,gBAAgB,CAC5B,OAAyB,EACzB,OAAuB,EACvB,aAA8B;IAD9B,wBAAA,EAAA,cAAuB;IACvB,8BAAA,EAAA,qBAA8B;IAE9B,IAAI,OAAO,EAAE;QACT,OAAO,CAAC,KAAK,CAAC,EAAC,aAAa,eAAA,EAAC,CAAC,CAAC;KAClC;SAAM;QACH,OAAO,CAAC,IAAI,EAAE,CAAC;KAClB;AACL;;ACdA;;;SAGgB,iBAAiB,CAAC,WAAqB;IACnD,IAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;;IAGpD,IAAI,aAAa,YAAY,WAAW,EAAE;QACtC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;KAC1C;AACL;;ACbA;;;;;;SAMgB,yBAAyB,CAAC,OAAgB;IACtD,IAAI,OAAO,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC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OAAmC,EACnC,OAAuB,EACvB,aAA8B;IAD9B,wBAAA,EAAA,cAAuB;IACvB,8BAAA,EAAA,qBAA8B;IAE9B,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;QACxB,OAAO;KACV;IAED,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE;QAC7B,OAAO,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;KACpF;SAAM;QACH,IAAM,OAAK,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAK,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,OAAO,CAAC,aAAa,CAAC,OAAK,CAAC,CAAC;KAChC;IAED,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACtD;;AC5BA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils-focus.js","sources":["ng://@taiga-ui/cdk/utils/focus/get-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/set-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/blur-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-mouse-focusable.ts","ng://@taiga-ui/cdk/utils/focus/get-closest-keyboard-focusable.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused.ts","ng://@taiga-ui/cdk/utils/focus/is-native-focused-in.ts","ng://@taiga-ui/cdk/utils/focus/move-focus.ts","ng://@taiga-ui/cdk/utils/focus/set-native-mouse-focused.ts","ng://@taiga-ui/cdk/utils/focus/taiga-ui-cdk-utils-focus.ts"],"sourcesContent":["/**\n * Returns current active element, including shadow dom\n *\n * @return element or null\n */\nexport function getNativeFocused(documentRef: Document): Element | null {\n if (!documentRef.activeElement || !documentRef.activeElement.shadowRoot) {\n return documentRef.activeElement;\n }\n\n let element = documentRef.activeElement.shadowRoot.activeElement;\n\n while (element?.shadowRoot) {\n element = element.shadowRoot.activeElement;\n }\n\n return element;\n}\n","/**\n * @deprecated: use native element.focus()\n * TODO: remove in v3.0\n * Focuses or blurs and element\n *\n * @param element native element\n * @param focused boolean focused state\n * @param preventScroll optional flag to prevent native scroll to the element\n */\nexport function setNativeFocused(\n element: HTMLOrSVGElement,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (focused) {\n element.focus({preventScroll});\n } else {\n element.blur();\n }\n}\n","import {getNativeFocused} from './get-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Finds and blurs current active element, including shadow DOM\n */\nexport function blurNativeFocused(documentRef: Document): void {\n const activeElement = getNativeFocused(documentRef);\n\n // TODO: iframe warning\n if (activeElement instanceof HTMLElement) {\n setNativeFocused(activeElement, false);\n }\n}\n","/**\n * Checks for signs that element can be focused with keyboard. tabIndex above 0 is ignored to\n * only target natural focus order. Not checking the possibility of an element to\n * be focused, for example element can have display: none applied to it or any other\n * circumstances could prevent actual focus.\n */\nexport function isNativeKeyboardFocusable(element: Element): boolean {\n if (element.hasAttribute('disabled') || element.getAttribute('tabIndex') === '-1') {\n return false;\n }\n\n // TODO: iframe warning\n if (\n (element instanceof HTMLElement && element.isContentEditable) ||\n element.getAttribute('tabIndex') === '0'\n ) {\n return true;\n }\n\n switch (element.tagName) {\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA':\n return true;\n case 'VIDEO':\n case 'AUDIO':\n return element.hasAttribute('controls');\n case 'INPUT':\n return element.getAttribute('type') !== 'hidden';\n case 'A':\n case 'LINK':\n return element.hasAttribute('href');\n default:\n return false;\n }\n}\n","import {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\n\nexport function isNativeMouseFocusable(element: Element): boolean {\n return (\n !element.hasAttribute('disabled') &&\n (element.getAttribute('tabIndex') === '-1' || isNativeKeyboardFocusable(element))\n );\n}\n","import {svgNodeFilter} from '@taiga-ui/cdk/constants';\n\nimport {isNativeKeyboardFocusable} from './is-native-keyboard-focusable';\nimport {isNativeMouseFocusable} from './is-native-mouse-focusable';\n\n/**\n * Finds the closest element that can be focused with a keyboard or mouse in theory\n *\n * @param initial current HTML element\n * @param prev should it look backwards instead (find item that will be focused with Shift + Tab)\n * @param root top Node limiting the search area\n * @param keyboard determine if only keyboard focus is of interest\n *\n */\nexport function getClosestFocusable(\n initial: HTMLElement,\n prev: boolean = false,\n root: Node,\n keyboard: boolean = true,\n): HTMLElement | null {\n if (!root.ownerDocument) {\n return null;\n }\n\n const check = keyboard ? isNativeKeyboardFocusable : isNativeMouseFocusable;\n\n // Deprecated but ony this overload works in IE\n // Filter must be a function in IE, other modern browsers are compliant to this format\n const treeWalker = root.ownerDocument.createTreeWalker(\n root,\n NodeFilter.SHOW_ELEMENT,\n svgNodeFilter,\n false,\n );\n\n treeWalker.currentNode = initial;\n\n while (prev ? treeWalker.previousNode() : treeWalker.nextNode()) {\n // TODO: iframe warning\n if (treeWalker.currentNode instanceof HTMLElement) {\n initial = treeWalker.currentNode;\n }\n\n if (check(initial)) {\n return initial;\n }\n }\n\n return null;\n}\n\n/** @deprecated use getClosestFocusable */\nexport const getClosestKeyboardFocusable = getClosestFocusable;\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if element is focused.\n *\n * Could return true even after blur since element remains focused if you switch away from a browser tab.\n *\n * @param node or null (as a common return value of DOM nodes walking)\n * @return true if focused\n */\nexport function isNativeFocused(node: Node | null): boolean {\n return (\n !!node && !!node.ownerDocument && getNativeFocused(node.ownerDocument) === node\n );\n}\n","import {getNativeFocused} from './get-native-focused';\n\n/**\n * Checks if focused element is within given element.\n *\n * @param node\n * @return true if focused node is contained within element\n */\nexport function isNativeFocusedIn(node: Node): boolean {\n // !node.contains - check for IE11\n if (!node.ownerDocument || !node.contains) {\n return false;\n }\n\n const nativeFocused = getNativeFocused(node.ownerDocument);\n\n return nativeFocused !== null && node.contains(nativeFocused);\n}\n","import {isNativeFocused} from './is-native-focused';\nimport {setNativeFocused} from './set-native-focused';\n\n/**\n * Utility method for moving focus in a list of elements\n *\n * @param currentIndex currently focused index\n * @param elements array of focusable elements\n * @param step a step to move focus by, typically -1 or 1\n */\nexport function moveFocus(\n currentIndex: number,\n elements: readonly HTMLElement[],\n step: number,\n): void {\n currentIndex += step;\n\n while (currentIndex >= 0 && currentIndex < elements.length) {\n setNativeFocused(elements[currentIndex]);\n\n if (isNativeFocused(elements[currentIndex])) {\n return;\n }\n\n currentIndex += step;\n }\n}\n","import {setNativeFocused} from './set-native-focused';\n\n/**\n * Focuses or blurs element with mouse action imitation (to spoof {@link TuiFocusVisibleService})\n *\n * @param element\n * @param focused desired focused state\n * @param preventScroll optionally prevent native browser scroll after focus\n */\nexport function setNativeMouseFocused(\n element: HTMLOrSVGElement & Element,\n focused: boolean = true,\n preventScroll: boolean = false,\n): void {\n if (!element.ownerDocument) {\n return;\n }\n\n if (typeof Event === 'function') {\n element.dispatchEvent(new Event('mousedown', {bubbles: true, cancelable: true}));\n } else {\n const event = element.ownerDocument.createEvent('Event');\n\n event.initEvent('mousedown', true, true);\n element.dispatchEvent(event);\n }\n\n setNativeFocused(element, focused, preventScroll);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;;;;SAKgB,gBAAgB,CAAC,WAAqB;IAClD,IAAI,CAAC,WAAW,CAAC,aAAa,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,EAAE;QACrE,OAAO,WAAW,CAAC,aAAa,CAAC;KACpC;IAED,IAAI,OAAO,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,CAAC;IAEjE,OAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,EAAE;QACxB,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;KAC9C;IAED,OAAO,OAAO,CA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@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @note:
|
|
3
|
+
* All Chrome / Chromium-based browsers will return MacIntel on macOS,
|
|
4
|
+
* no matter what the hardware architecture is. See the source code here:
|
|
5
|
+
* https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/navigator_id.cc;l=64;drc=703d3c472cf27470dad21a3f2c8972aca3732cd6
|
|
6
|
+
* But maybe in future years, it will be changed to MacM1
|
|
7
|
+
*
|
|
8
|
+
* Documentation:
|
|
9
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
|
|
10
|
+
*/
|
|
11
|
+
function isApplePlatform(navigator) {
|
|
12
|
+
return navigator.platform.indexOf('Mac') === 0 || navigator.platform === 'iPhone';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
var IOS_REG_EXP = /ipad|iphone|ipod/;
|
|
16
|
+
function isIos(navigator) {
|
|
17
|
+
return (IOS_REG_EXP.test(navigator.userAgent.toLowerCase()) ||
|
|
18
|
+
(isApplePlatform(navigator) && navigator.maxTouchPoints > 1));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;
|
|
22
|
+
function isApple(navigator) {
|
|
23
|
+
return isIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Generated bundle index. Do not edit.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
export { isApple, isApplePlatform, isIos };
|
|
31
|
+
//# sourceMappingURL=taiga-ui-cdk-utils-os.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils-os.js","sources":["ng://@taiga-ui/cdk/utils/os/is-apple-platform.ts","ng://@taiga-ui/cdk/utils/os/is-ios.ts","ng://@taiga-ui/cdk/utils/os/is-apple.ts","ng://@taiga-ui/cdk/utils/os/taiga-ui-cdk-utils-os.ts"],"sourcesContent":["/**\n * @note:\n * All Chrome / Chromium-based browsers will return MacIntel on macOS,\n * no matter what the hardware architecture is. See the source code here:\n * https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/navigator_id.cc;l=64;drc=703d3c472cf27470dad21a3f2c8972aca3732cd6\n * But maybe in future years, it will be changed to MacM1\n *\n * Documentation:\n * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform\n */\nexport function isApplePlatform(navigator: Navigator): boolean {\n return navigator.platform.indexOf('Mac') === 0 || navigator.platform === 'iPhone';\n}\n","import {isApplePlatform} from './is-apple-platform';\n\nconst IOS_REG_EXP = /ipad|iphone|ipod/;\n\nexport function isIos(navigator: Navigator): boolean {\n return (\n IOS_REG_EXP.test(navigator.userAgent.toLowerCase()) ||\n (isApplePlatform(navigator) && navigator.maxTouchPoints > 1)\n );\n}\n","import {isIos} from './is-ios';\n\nconst SAFARI_REG_EXP = /^((?!chrome|android).)*safari/i;\n\nexport function isApple(navigator: Navigator): boolean {\n return isIos(navigator) || SAFARI_REG_EXP.test(navigator.userAgent.toLowerCase());\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;SAUgB,eAAe,CAAC,SAAoB;IAChD,OAAO,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACtF;;ACVA,IAAM,WAAW,GAAG,kBAAkB,CAAC;SAEvB,KAAK,CAAC,SAAoB;IACtC,QACI,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;SAClD,eAAe,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,EAC9D;AACN;;ACPA,IAAM,cAAc,GAAG,gCAAgC,CAAC;SAExC,OAAO,CAAC,SAAoB;IACxC,OAAO,KAAK,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;AACtF;;ACNA;;;;;;"}
|
|
@@ -4,6 +4,7 @@ export * from '@taiga-ui/cdk/utils/focus';
|
|
|
4
4
|
export * from '@taiga-ui/cdk/utils/format';
|
|
5
5
|
export * from '@taiga-ui/cdk/utils/math';
|
|
6
6
|
export * from '@taiga-ui/cdk/utils/miscellaneous';
|
|
7
|
+
export * from '@taiga-ui/cdk/utils/os';
|
|
7
8
|
export * from '@taiga-ui/cdk/utils/svg';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-utils.js","sources":["ng://@taiga-ui/cdk/utils/taiga-ui-cdk-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-utils.js","sources":["ng://@taiga-ui/cdk/utils/taiga-ui-cdk-utils.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;;"}
|
|
@@ -2,6 +2,6 @@ import { AbstractControl, AbstractControlDirective } from '@angular/forms';
|
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
/**
|
|
4
4
|
* Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)
|
|
5
|
-
* TODO:
|
|
5
|
+
* TODO: 3.0 name should be shorter.
|
|
6
6
|
*/
|
|
7
7
|
export declare function tuiReplayedValueChangesFrom<T>(control: AbstractControl | AbstractControlDirective): Observable<T>;
|
package/package.json
CHANGED
|
@@ -4,5 +4,5 @@ export interface ImportingModule {
|
|
|
4
4
|
}
|
|
5
5
|
export declare const MAIN_MODULES: ReadonlyArray<ImportingModule>;
|
|
6
6
|
export declare const DIALOG_MODULES: ReadonlyArray<ImportingModule>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const ALERT_MODULES: ReadonlyArray<ImportingModule>;
|
|
8
8
|
export declare const SANITIZER_MODULES: ReadonlyArray<ImportingModule>;
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"type": "confirmation"
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
"
|
|
33
|
-
"description": "Setting up
|
|
32
|
+
"addAlertModule": {
|
|
33
|
+
"description": "Setting up alerts module",
|
|
34
34
|
"type": "boolean",
|
|
35
35
|
"default": true,
|
|
36
36
|
"x-prompt": {
|
|
37
|
-
"message": "Do you want to use Taiga UI
|
|
37
|
+
"message": "Do you want to use Taiga UI alerts?",
|
|
38
38
|
"type": "confirmation"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
@@ -24,7 +24,7 @@ function addTuiModules(mainModule, options, context) {
|
|
|
24
24
|
const modules = [
|
|
25
25
|
...modules_1.MAIN_MODULES,
|
|
26
26
|
...(options.addDialogsModule ? modules_1.DIALOG_MODULES : []),
|
|
27
|
-
...(options.
|
|
27
|
+
...(options.addAlertModule ? modules_1.ALERT_MODULES : []),
|
|
28
28
|
];
|
|
29
29
|
const mainModulePath = mainModule.getSourceFile().getFilePath();
|
|
30
30
|
modules.forEach(module => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface ReplacementConst {
|
|
2
|
-
from: {
|
|
3
|
-
name: string;
|
|
4
|
-
moduleSpecifier?: string;
|
|
2
|
+
readonly from: {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly moduleSpecifier?: string;
|
|
5
5
|
};
|
|
6
|
-
to: {
|
|
7
|
-
name: string;
|
|
8
|
-
namedImport?: string;
|
|
9
|
-
moduleSpecifier: string;
|
|
6
|
+
readonly to: {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly namedImport?: string;
|
|
9
|
+
readonly moduleSpecifier: string;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
export declare const CONSTS_TO_REPLACE: ReplacementConst[];
|
|
@@ -42,4 +42,32 @@ exports.CONSTS_TO_REPLACE = [
|
|
|
42
42
|
moduleSpecifier: '@taiga-ui/cdk',
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
+
{
|
|
46
|
+
from: {
|
|
47
|
+
name: 'TuiNotificationsModule',
|
|
48
|
+
moduleSpecifier: '@taiga-ui/core',
|
|
49
|
+
},
|
|
50
|
+
to: {
|
|
51
|
+
name: 'TuiAlertModule',
|
|
52
|
+
moduleSpecifier: '@taiga-ui/core',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
from: { name: 'identity', moduleSpecifier: '@taiga-ui/cdk' },
|
|
57
|
+
to: { name: 'identity', moduleSpecifier: 'rxjs' },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
from: { name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/cdk' },
|
|
61
|
+
to: { name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/core' },
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
from: {
|
|
65
|
+
name: 'TuiCountryIsoCode',
|
|
66
|
+
moduleSpecifier: '@taiga-ui/kit',
|
|
67
|
+
},
|
|
68
|
+
to: {
|
|
69
|
+
name: 'TuiCountryIsoCode',
|
|
70
|
+
moduleSpecifier: '@taiga-ui/i18n',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
45
73
|
];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface ReplacementEnum {
|
|
2
|
-
name: string;
|
|
3
|
-
replaceValues: Record<string, string>;
|
|
4
|
-
keepAsType?: boolean;
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly replaceValues: Record<string, string>;
|
|
4
|
+
readonly keepAsType?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare const ENUMS_TO_REPLACE: ReplacementEnum[];
|
|
7
7
|
export {};
|