@taiga-ui/cdk 2.43.0 → 2.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/dialog.service.d.ts +2 -2
- package/abstract/taiga-ui-cdk-abstract.metadata.json +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.js +4 -2
- package/bundles/taiga-ui-cdk-classes.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.js +3 -1
- package/bundles/taiga-ui-cdk-coercion.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-alert-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +4 -4
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js +2 -2
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +40 -12
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +0 -2
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +132 -50
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js +2 -2
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +41 -22
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js +2 -2
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +3 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +1 -0
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.js +281 -0
- package/bundles/taiga-ui-cdk-directives-portal.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js +16 -0
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives.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-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-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +5 -7
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +2 -0
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.js +25 -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 +259 -0
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js +16 -0
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils.umd.js +20 -4
- package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.min.js +1 -1
- package/classes/assert.d.ts +1 -1
- package/classes/validation-error.d.ts +1 -1
- package/coercion/taiga-ui-cdk-coercion.metadata.json +1 -1
- package/components/alert-host/alert-host.component.d.ts +2 -2
- package/components/alert-host/taiga-ui-cdk-components-alert-host.metadata.json +1 -1
- package/components/dialog-host/dialog-host.component.d.ts +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/constants/always-false-handler.d.ts +1 -1
- package/constants/always-true-handler.d.ts +1 -1
- package/constants/empty.d.ts +1 -1
- package/constants/taiga-ui-cdk-constants.metadata.json +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 +4 -1
- package/date-time/month-range.d.ts +0 -1
- package/date-time/month.d.ts +1 -1
- package/date-time/taiga-ui-cdk-date-time.metadata.json +1 -1
- package/date-time/time.d.ts +7 -0
- package/date-time/year.d.ts +7 -0
- package/decorators/default-prop.d.ts +1 -3
- package/decorators/pure.d.ts +1 -1
- package/decorators/taiga-ui-cdk-decorators.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 +10 -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/focus-trap/taiga-ui-cdk-directives-focus-trap.metadata.json +1 -1
- package/directives/for/for.directive.d.ts +1 -1
- package/directives/high-dpi/high-dpi.directive.d.ts +1 -1
- package/directives/high-dpi/taiga-ui-cdk-directives-high-dpi.metadata.json +1 -1
- package/directives/index.d.ts +1 -0
- package/directives/item/item.directive.d.ts +1 -1
- package/directives/media/taiga-ui-cdk-directives-media.metadata.json +1 -1
- package/directives/portal/index.d.ts +2 -0
- package/directives/portal/package.json +13 -0
- package/directives/portal/portal.directive.d.ts +10 -0
- package/directives/portal/portal.module.d.ts +2 -0
- package/directives/portal/taiga-ui-cdk-directives-portal.d.ts +4 -0
- package/directives/portal/taiga-ui-cdk-directives-portal.metadata.json +1 -0
- package/directives/taiga-ui-cdk-directives.metadata.json +1 -1
- package/directives/validator/validator.directive.d.ts +1 -1
- package/esm2015/abstract/control.js +1 -1
- package/esm2015/abstract/controller.js +1 -1
- package/esm2015/abstract/dialog.service.js +1 -1
- package/esm2015/abstract/interactive.js +2 -2
- package/esm2015/abstract/multiple-control.js +1 -1
- package/esm2015/abstract/portal-service.js +1 -1
- package/esm2015/abstract/theme-switcher.js +1 -1
- package/esm2015/classes/assert.js +5 -3
- package/esm2015/classes/validation-error.js +1 -1
- package/esm2015/coercion/coerce-boolean-property.js +4 -2
- package/esm2015/components/alert-host/alert-host.component.js +1 -1
- package/esm2015/components/dialog-host/dialog-host.component.js +5 -5
- package/esm2015/components/portal-host/portal.service.js +2 -2
- package/esm2015/constants/always-false-handler.js +1 -1
- package/esm2015/constants/always-true-handler.js +1 -1
- package/esm2015/constants/empty.js +1 -1
- package/esm2015/constants/matcher.js +1 -1
- package/esm2015/date-time/date-fillers.js +1 -3
- package/esm2015/date-time/date-separator.js +1 -1
- package/esm2015/date-time/day-range.js +2 -2
- package/esm2015/date-time/day.js +12 -3
- package/esm2015/date-time/month-range.js +1 -2
- package/esm2015/date-time/month.js +5 -3
- package/esm2015/date-time/time.js +12 -1
- package/esm2015/date-time/year.js +13 -2
- package/esm2015/decorators/default-prop.js +1 -3
- package/esm2015/decorators/pure.js +1 -1
- package/esm2015/decorators/required-setter.js +1 -1
- package/esm2015/directives/active-zone/active-zone.directive.js +1 -1
- package/esm2015/directives/auto-focus/autofocus.directive.js +11 -87
- package/esm2015/directives/auto-focus/autofocus.options.js +27 -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 +70 -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/checked/checked.directive.js +1 -1
- package/esm2015/directives/copy-processor/copy-processor.directive.js +1 -1
- package/esm2015/directives/focus-trap/focus-trap.directive.js +4 -2
- package/esm2015/directives/for/for.directive.js +1 -1
- package/esm2015/directives/high-dpi/high-dpi.directive.js +1 -1
- package/esm2015/directives/index.js +2 -1
- package/esm2015/directives/item/item.directive.js +2 -2
- package/esm2015/directives/media/media.directive.js +2 -1
- package/esm2015/directives/overscroll/overscroll.directive.js +1 -1
- package/esm2015/directives/portal/index.js +3 -0
- package/esm2015/directives/portal/portal.directive.js +36 -0
- package/esm2015/directives/portal/portal.module.js +13 -0
- package/esm2015/directives/portal/taiga-ui-cdk-directives-portal.js +5 -0
- package/esm2015/directives/repeat-times/repeat-times.directive.js +1 -1
- package/esm2015/directives/validator/validator.directive.js +1 -1
- package/esm2015/interfaces/alert-context.js +1 -0
- package/esm2015/interfaces/index.js +1 -1
- package/esm2015/observables/replay-control-value-changes.js +2 -2
- package/esm2015/services/destroy.service.js +1 -1
- package/esm2015/services/directive-styles.service.js +1 -1
- package/esm2015/services/parents-scroll.service.js +1 -1
- 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/tokens/is-mobile.js +2 -2
- package/esm2015/utils/browser/index.js +2 -2
- package/esm2015/utils/browser/{is-IE.js → is-ie.js} +1 -1
- package/esm2015/utils/focus/blur-native-focused.js +1 -1
- package/esm2015/utils/focus/move-focus.js +1 -1
- package/esm2015/utils/focus/set-native-focused.js +3 -1
- package/esm2015/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm2015/utils/index.js +3 -1
- package/esm2015/utils/miscellaneous/mark-control-as-touched-and-validate.js +1 -1
- package/esm2015/utils/os/index.js +3 -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/esm2015/utils/svg/index.js +2 -0
- package/esm2015/utils/svg/svg-linear-gradient-processor.js +26 -0
- package/esm2015/utils/svg/taiga-ui-cdk-utils-svg.js +5 -0
- package/esm5/abstract/control.js +1 -1
- package/esm5/abstract/controller.js +1 -1
- package/esm5/abstract/dialog.service.js +1 -1
- package/esm5/abstract/interactive.js +2 -2
- package/esm5/abstract/multiple-control.js +1 -1
- package/esm5/abstract/portal-service.js +1 -1
- package/esm5/abstract/theme-switcher.js +1 -1
- package/esm5/classes/assert.js +5 -3
- package/esm5/classes/validation-error.js +1 -1
- package/esm5/coercion/coerce-boolean-property.js +4 -2
- package/esm5/components/alert-host/alert-host.component.js +1 -1
- package/esm5/components/dialog-host/dialog-host.component.js +5 -5
- package/esm5/components/portal-host/portal.service.js +2 -2
- package/esm5/constants/always-false-handler.js +1 -1
- package/esm5/constants/always-true-handler.js +1 -1
- package/esm5/constants/empty.js +1 -1
- package/esm5/constants/matcher.js +1 -1
- package/esm5/date-time/date-fillers.js +1 -3
- package/esm5/date-time/date-separator.js +2 -4
- package/esm5/date-time/day-range.js +2 -2
- package/esm5/date-time/day.js +12 -3
- package/esm5/date-time/month-range.js +1 -2
- package/esm5/date-time/month.js +5 -3
- package/esm5/date-time/time.js +12 -1
- package/esm5/date-time/year.js +13 -2
- package/esm5/decorators/default-prop.js +1 -3
- package/esm5/decorators/pure.js +1 -1
- package/esm5/decorators/required-setter.js +1 -1
- package/esm5/directives/active-zone/active-zone.directive.js +1 -1
- package/esm5/directives/auto-focus/autofocus.directive.js +11 -97
- package/esm5/directives/auto-focus/autofocus.options.js +27 -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 +75 -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/checked/checked.directive.js +1 -1
- package/esm5/directives/copy-processor/copy-processor.directive.js +1 -1
- package/esm5/directives/focus-trap/focus-trap.directive.js +4 -2
- package/esm5/directives/for/for.directive.js +1 -1
- package/esm5/directives/high-dpi/high-dpi.directive.js +1 -1
- package/esm5/directives/index.js +2 -1
- package/esm5/directives/item/item.directive.js +2 -2
- package/esm5/directives/media/media.directive.js +2 -1
- package/esm5/directives/overscroll/overscroll.directive.js +1 -1
- package/esm5/directives/portal/index.js +3 -0
- package/esm5/directives/portal/portal.directive.js +41 -0
- package/esm5/directives/portal/portal.module.js +16 -0
- package/esm5/directives/portal/taiga-ui-cdk-directives-portal.js +5 -0
- package/esm5/directives/repeat-times/repeat-times.directive.js +1 -1
- package/esm5/directives/validator/validator.directive.js +1 -1
- package/esm5/interfaces/alert-context.js +1 -0
- package/esm5/interfaces/index.js +1 -1
- package/esm5/observables/replay-control-value-changes.js +2 -2
- package/esm5/services/destroy.service.js +1 -1
- package/esm5/services/directive-styles.service.js +1 -1
- package/esm5/services/parents-scroll.service.js +1 -1
- 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/tokens/is-mobile.js +2 -2
- package/esm5/utils/browser/index.js +2 -2
- package/esm5/utils/browser/{is-IE.js → is-ie.js} +1 -1
- package/esm5/utils/focus/blur-native-focused.js +1 -1
- package/esm5/utils/focus/move-focus.js +1 -1
- package/esm5/utils/focus/set-native-focused.js +3 -1
- package/esm5/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm5/utils/index.js +3 -1
- package/esm5/utils/miscellaneous/mark-control-as-touched-and-validate.js +1 -1
- package/esm5/utils/os/index.js +3 -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/esm5/utils/svg/index.js +2 -0
- package/esm5/utils/svg/svg-linear-gradient-processor.js +29 -0
- package/esm5/utils/svg/taiga-ui-cdk-utils-svg.js +5 -0
- package/fesm2015/taiga-ui-cdk-abstract.js +1 -1
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-classes.js +4 -2
- package/fesm2015/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-coercion.js +3 -1
- package/fesm2015/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +4 -4
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-portal-host.js +1 -1
- package/fesm2015/taiga-ui-cdk-components-portal-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +39 -9
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-decorators.js +0 -2
- package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +113 -46
- 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-checked.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +3 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-item.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-item.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-media.js +1 -0
- package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-portal.js +51 -0
- package/fesm2015/taiga-ui-cdk-directives-portal.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-validator.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-observables.js +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +7 -8
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +2 -0
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js +18 -0
- package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-utils-svg.js +32 -0
- package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js +2 -0
- package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm5/taiga-ui-cdk-classes.js +4 -2
- package/fesm5/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm5/taiga-ui-cdk-coercion.js +3 -1
- package/fesm5/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-alert-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-dialog-host.js +4 -4
- package/fesm5/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-portal-host.js +1 -1
- package/fesm5/taiga-ui-cdk-components-portal-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js +40 -12
- package/fesm5/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm5/taiga-ui-cdk-decorators.js +0 -2
- package/fesm5/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js +126 -51
- 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-checked.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focus-trap.js +3 -1
- package/fesm5/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-item.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-item.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-media.js +1 -0
- package/fesm5/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-portal.js +59 -0
- package/fesm5/taiga-ui-cdk-directives-portal.js.map +1 -0
- package/fesm5/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-validator.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-observables.js +1 -1
- package/fesm5/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm5/taiga-ui-cdk-services.js.map +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js +7 -10
- package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js +2 -0
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-os.js +18 -0
- package/fesm5/taiga-ui-cdk-utils-os.js.map +1 -0
- package/fesm5/taiga-ui-cdk-utils-svg.js +36 -0
- package/fesm5/taiga-ui-cdk-utils-svg.js.map +1 -0
- package/fesm5/taiga-ui-cdk-utils.js +2 -0
- package/fesm5/taiga-ui-cdk-utils.js.map +1 -1
- package/interfaces/alert-context.d.ts +2 -0
- package/interfaces/index.d.ts +1 -0
- package/interfaces/taiga-ui-cdk-interfaces.metadata.json +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/index.js +2 -10
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/schema.json +3 -3
- package/schematics/ng-add/steps/add-taiga-icons.js +2 -10
- package/schematics/ng-add/steps/add-taiga-modules.js +3 -11
- package/schematics/ng-add/steps/add-taiga-styles.js +2 -10
- package/schematics/ng-add/steps/wrap-with-tui-root.js +2 -10
- package/schematics/ng-update/index.js +2 -10
- 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 +2 -0
- package/utils/os/index.d.ts +2 -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/svg/index.d.ts +1 -0
- package/utils/svg/package.json +13 -0
- package/utils/svg/svg-linear-gradient-processor.d.ts +15 -0
- package/utils/svg/taiga-ui-cdk-utils-svg.d.ts +4 -0
- package/utils/svg/taiga-ui-cdk-utils-svg.metadata.json +1 -0
- package/utils/taiga-ui-cdk-utils.metadata.json +1 -1
|
@@ -1,43 +1,17 @@
|
|
|
1
|
-
import { __decorate, __param } from 'tslib';
|
|
2
|
-
import { Optional, Self, Inject, NgZone,
|
|
1
|
+
import { __decorate, __extends, __param } from 'tslib';
|
|
2
|
+
import { ElementRef, Directive, Optional, Self, Inject, Renderer2, NgZone, InjectionToken, inject, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { ANIMATION_FRAME } from '@ng-web-apis/common';
|
|
4
|
+
import { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_APPLE } from '@taiga-ui/cdk/tokens';
|
|
4
5
|
import { POLLING_TIME } from '@taiga-ui/cdk/constants';
|
|
5
|
-
import { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
|
|
6
|
-
import { setNativeFocused } from '@taiga-ui/cdk/utils/focus';
|
|
7
6
|
import { race, timer, Observable } from 'rxjs';
|
|
8
7
|
import { throttleTime, map, skipWhile, take } from 'rxjs/operators';
|
|
9
8
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
// TODO: in 3.0 change input name to tuiAutoFocus and handle empty string
|
|
13
|
-
// TODO: refactor on this whole thing in 3.0
|
|
14
|
-
var TuiAutoFocusDirective = /** @class */ (function () {
|
|
15
|
-
function TuiAutoFocusDirective(tuiFocusableComponent, isIos, animationFrame$, ngZone, elementRef, renderer) {
|
|
9
|
+
var AbstractTuiAutofocusHandler = /** @class */ (function () {
|
|
10
|
+
function AbstractTuiAutofocusHandler(tuiFocusableComponent, elementRef) {
|
|
16
11
|
this.tuiFocusableComponent = tuiFocusableComponent;
|
|
17
|
-
this.isIos = isIos;
|
|
18
|
-
this.animationFrame$ = animationFrame$;
|
|
19
|
-
this.ngZone = ngZone;
|
|
20
12
|
this.elementRef = elementRef;
|
|
21
|
-
this.renderer = renderer;
|
|
22
|
-
this.autoFocus = true;
|
|
23
13
|
}
|
|
24
|
-
|
|
25
|
-
var _this = this;
|
|
26
|
-
if (!this.autoFocus) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (this.isTextFieldElement) {
|
|
30
|
-
if (this.isIos) {
|
|
31
|
-
this.ngZone.runOutsideAngular(function () { return _this.iosWebkitAutofocus(); });
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
race(timer(TIMEOUT), this.animationFrame$.pipe(throttleTime(POLLING_TIME), map(function () { return _this.element.closest(NG_ANIMATION_SELECTOR); }), skipWhile(Boolean), take(1))).subscribe(function () { return setNativeFocused(_this.element); });
|
|
35
|
-
}
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
setNativeFocused(this.element);
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(TuiAutoFocusDirective.prototype, "element", {
|
|
14
|
+
Object.defineProperty(AbstractTuiAutofocusHandler.prototype, "element", {
|
|
41
15
|
get: function () {
|
|
42
16
|
var _a;
|
|
43
17
|
return (((_a = this.tuiFocusableComponent) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) ||
|
|
@@ -46,24 +20,85 @@ var TuiAutoFocusDirective = /** @class */ (function () {
|
|
|
46
20
|
enumerable: true,
|
|
47
21
|
configurable: true
|
|
48
22
|
});
|
|
49
|
-
Object.defineProperty(
|
|
23
|
+
Object.defineProperty(AbstractTuiAutofocusHandler.prototype, "isTextFieldElement", {
|
|
50
24
|
get: function () {
|
|
51
25
|
return this.element.matches('input, textarea');
|
|
52
26
|
},
|
|
53
27
|
enumerable: true,
|
|
54
28
|
configurable: true
|
|
55
29
|
});
|
|
56
|
-
|
|
30
|
+
AbstractTuiAutofocusHandler.ctorParameters = function () { return [
|
|
31
|
+
{ type: undefined },
|
|
32
|
+
{ type: ElementRef }
|
|
33
|
+
]; };
|
|
34
|
+
AbstractTuiAutofocusHandler = __decorate([
|
|
35
|
+
Directive()
|
|
36
|
+
], AbstractTuiAutofocusHandler);
|
|
37
|
+
return AbstractTuiAutofocusHandler;
|
|
38
|
+
}());
|
|
39
|
+
|
|
40
|
+
var TIMEOUT = 1000;
|
|
41
|
+
var NG_ANIMATION_SELECTOR = '.ng-animating';
|
|
42
|
+
var TuiDefaultAutofocusHandler = /** @class */ (function (_super) {
|
|
43
|
+
__extends(TuiDefaultAutofocusHandler, _super);
|
|
44
|
+
function TuiDefaultAutofocusHandler(tuiFocusableComponent, elementRef, animationFrame$) {
|
|
45
|
+
var _this = _super.call(this, tuiFocusableComponent, elementRef) || this;
|
|
46
|
+
_this.animationFrame$ = animationFrame$;
|
|
47
|
+
return _this;
|
|
48
|
+
}
|
|
49
|
+
TuiDefaultAutofocusHandler.prototype.setFocus = function () {
|
|
50
|
+
var _this = this;
|
|
51
|
+
if (this.isTextFieldElement) {
|
|
52
|
+
race(timer(TIMEOUT), this.animationFrame$.pipe(throttleTime(POLLING_TIME), map(function () { return _this.element.closest(NG_ANIMATION_SELECTOR); }), skipWhile(Boolean), take(1))).subscribe(function () { return _this.element.focus(); });
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.element.focus();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
TuiDefaultAutofocusHandler.ctorParameters = function () { return [
|
|
59
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] },
|
|
60
|
+
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
61
|
+
{ type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] }
|
|
62
|
+
]; };
|
|
63
|
+
TuiDefaultAutofocusHandler = __decorate([
|
|
64
|
+
Directive(),
|
|
65
|
+
__param(0, Optional()),
|
|
66
|
+
__param(0, Self()),
|
|
67
|
+
__param(0, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
68
|
+
__param(1, Inject(ElementRef)),
|
|
69
|
+
__param(2, Inject(ANIMATION_FRAME))
|
|
70
|
+
], TuiDefaultAutofocusHandler);
|
|
71
|
+
return TuiDefaultAutofocusHandler;
|
|
72
|
+
}(AbstractTuiAutofocusHandler));
|
|
73
|
+
|
|
74
|
+
var TuiIosAutofocusHandler = /** @class */ (function (_super) {
|
|
75
|
+
__extends(TuiIosAutofocusHandler, _super);
|
|
76
|
+
function TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone) {
|
|
77
|
+
var _this = _super.call(this, tuiFocusableComponent, elementRef) || this;
|
|
78
|
+
_this.renderer = renderer;
|
|
79
|
+
_this.ngZone = ngZone;
|
|
80
|
+
return _this;
|
|
81
|
+
}
|
|
82
|
+
TuiIosAutofocusHandler.prototype.setFocus = function () {
|
|
83
|
+
var _this = this;
|
|
84
|
+
if (this.isTextFieldElement) {
|
|
85
|
+
this.ngZone.runOutsideAngular(function () { return _this.iosWebkitAutofocus(); });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.element.focus();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
TuiIosAutofocusHandler.prototype.iosWebkitAutofocus = function () {
|
|
57
92
|
var _this = this;
|
|
58
93
|
var _a;
|
|
59
94
|
var fakeInput = this.renderer.createElement('input');
|
|
60
95
|
fakeInput.style.position = 'absolute';
|
|
61
96
|
fakeInput.style.opacity = '0';
|
|
62
97
|
fakeInput.style.height = '0';
|
|
63
|
-
var blurHandler = function () { return
|
|
98
|
+
var blurHandler = function () { return fakeInput.focus(); };
|
|
64
99
|
var focusHandler = function () {
|
|
65
100
|
setTimeout(function () {
|
|
66
|
-
|
|
101
|
+
_this.element.focus();
|
|
67
102
|
/**
|
|
68
103
|
* @note:
|
|
69
104
|
* We can't remove the element immediately, because it breaks flow
|
|
@@ -86,15 +121,61 @@ var TuiAutoFocusDirective = /** @class */ (function () {
|
|
|
86
121
|
fakeInput.addEventListener('blur', blurHandler, { once: true });
|
|
87
122
|
fakeInput.addEventListener('focus', focusHandler);
|
|
88
123
|
(_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);
|
|
89
|
-
|
|
124
|
+
fakeInput.focus();
|
|
90
125
|
};
|
|
91
|
-
|
|
126
|
+
TuiIosAutofocusHandler.ctorParameters = function () { return [
|
|
92
127
|
{ type: undefined, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [TUI_FOCUSABLE_ITEM_ACCESSOR,] }] },
|
|
93
|
-
{ type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
|
|
94
|
-
{ type: Observable, decorators: [{ type: Inject, args: [ANIMATION_FRAME,] }] },
|
|
95
|
-
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
|
|
96
128
|
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
97
|
-
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] }
|
|
129
|
+
{ type: Renderer2, decorators: [{ type: Inject, args: [Renderer2,] }] },
|
|
130
|
+
{ type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] }
|
|
131
|
+
]; };
|
|
132
|
+
TuiIosAutofocusHandler = __decorate([
|
|
133
|
+
Directive(),
|
|
134
|
+
__param(0, Optional()),
|
|
135
|
+
__param(0, Self()),
|
|
136
|
+
__param(0, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
137
|
+
__param(1, Inject(ElementRef)),
|
|
138
|
+
__param(2, Inject(Renderer2)),
|
|
139
|
+
__param(3, Inject(NgZone))
|
|
140
|
+
], TuiIosAutofocusHandler);
|
|
141
|
+
return TuiIosAutofocusHandler;
|
|
142
|
+
}(AbstractTuiAutofocusHandler));
|
|
143
|
+
|
|
144
|
+
var TUI_AUTOFOCUS_HANDLER = new InjectionToken('Autofocusing handler');
|
|
145
|
+
// TODO: 3.0 remove in ivy compilation
|
|
146
|
+
function tuiAutofocusHandlerFactory(tuiFocusableComponent, elementRef, animationFrame$, renderer, ngZone) {
|
|
147
|
+
return inject(TUI_IS_APPLE)
|
|
148
|
+
? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone)
|
|
149
|
+
: new TuiDefaultAutofocusHandler(tuiFocusableComponent, elementRef, animationFrame$);
|
|
150
|
+
}
|
|
151
|
+
var TUI_AUTOFOCUS_PROVIDERS = [
|
|
152
|
+
{
|
|
153
|
+
provide: TUI_AUTOFOCUS_HANDLER,
|
|
154
|
+
// TODO: replace to useClass in v3.0
|
|
155
|
+
useFactory: tuiAutofocusHandlerFactory,
|
|
156
|
+
deps: [
|
|
157
|
+
[new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],
|
|
158
|
+
ElementRef,
|
|
159
|
+
ANIMATION_FRAME,
|
|
160
|
+
Renderer2,
|
|
161
|
+
NgZone,
|
|
162
|
+
],
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
|
|
166
|
+
// TODO: 3.0 change input name to tuiAutoFocus and handle empty string
|
|
167
|
+
var TuiAutoFocusDirective = /** @class */ (function () {
|
|
168
|
+
function TuiAutoFocusDirective(handler) {
|
|
169
|
+
this.handler = handler;
|
|
170
|
+
this.autoFocus = true;
|
|
171
|
+
}
|
|
172
|
+
TuiAutoFocusDirective.prototype.ngAfterViewInit = function () {
|
|
173
|
+
if (this.autoFocus) {
|
|
174
|
+
this.handler.setFocus();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
TuiAutoFocusDirective.ctorParameters = function () { return [
|
|
178
|
+
{ type: undefined, decorators: [{ type: Inject, args: [TUI_AUTOFOCUS_HANDLER,] }] }
|
|
98
179
|
]; };
|
|
99
180
|
__decorate([
|
|
100
181
|
Input()
|
|
@@ -102,15 +183,9 @@ var TuiAutoFocusDirective = /** @class */ (function () {
|
|
|
102
183
|
TuiAutoFocusDirective = __decorate([
|
|
103
184
|
Directive({
|
|
104
185
|
selector: '[tuiAutoFocus]',
|
|
186
|
+
providers: TUI_AUTOFOCUS_PROVIDERS,
|
|
105
187
|
}),
|
|
106
|
-
__param(0,
|
|
107
|
-
__param(0, Self()),
|
|
108
|
-
__param(0, Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)),
|
|
109
|
-
__param(1, Inject(TUI_IS_IOS)),
|
|
110
|
-
__param(2, Inject(ANIMATION_FRAME)),
|
|
111
|
-
__param(3, Inject(NgZone)),
|
|
112
|
-
__param(4, Inject(ElementRef)),
|
|
113
|
-
__param(5, Inject(Renderer2))
|
|
188
|
+
__param(0, Inject(TUI_AUTOFOCUS_HANDLER))
|
|
114
189
|
], TuiAutoFocusDirective);
|
|
115
190
|
return TuiAutoFocusDirective;
|
|
116
191
|
}());
|
|
@@ -131,5 +206,5 @@ var TuiAutoFocusModule = /** @class */ (function () {
|
|
|
131
206
|
* Generated bundle index. Do not edit.
|
|
132
207
|
*/
|
|
133
208
|
|
|
134
|
-
export { TuiAutoFocusDirective, TuiAutoFocusModule };
|
|
209
|
+
export { AbstractTuiAutofocusHandler, TUI_AUTOFOCUS_HANDLER, TUI_AUTOFOCUS_PROVIDERS, TuiAutoFocusDirective, TuiAutoFocusModule, TuiDefaultAutofocusHandler, TuiIosAutofocusHandler, tuiAutofocusHandlerFactory };
|
|
135
210
|
//# sourceMappingURL=taiga-ui-cdk-directives-auto-focus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["ng://@taiga-ui/cdk/directives/auto-focus/autofocus.directive.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.module.ts","ng://@taiga-ui/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {\n AfterViewInit,\n Directive,\n ElementRef,\n Inject,\n Input,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {setNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = '.ng-animating';\n\n// TODO: in 3.0 change input name to tuiAutoFocus and handle empty string\n// TODO: refactor on this whole thing in 3.0\n@Directive({\n selector: '[tuiAutoFocus]',\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input()\n autoFocus = true;\n\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n private readonly tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(TUI_IS_IOS) private readonly isIos: boolean,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n @Inject(NgZone)\n private readonly ngZone: NgZone,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n ) {}\n\n ngAfterViewInit() {\n if (!this.autoFocus) {\n return;\n }\n\n if (this.isTextFieldElement) {\n if (this.isIos) {\n this.ngZone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => setNativeFocused(this.element));\n }\n\n return;\n }\n\n setNativeFocused(this.element);\n }\n\n private get element(): TuiNativeFocusableElement {\n return (\n this.tuiFocusableComponent?.nativeFocusableElement ||\n this.elementRef.nativeElement\n );\n }\n\n private get isTextFieldElement(): boolean {\n return this.element.matches('input, textarea');\n }\n\n private iosWebkitAutofocus() {\n const fakeInput: HTMLElement = this.renderer.createElement('input');\n\n fakeInput.style.position = 'absolute';\n fakeInput.style.opacity = '0';\n fakeInput.style.height = '0';\n\n const blurHandler = () => setNativeFocused(fakeInput);\n const focusHandler = () => {\n setTimeout(() => {\n setNativeFocused(this.element);\n\n /**\n * @note:\n * We can't remove the element immediately, because it breaks flow\n */\n setTimeout(() => {\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n fakeInput.remove();\n });\n });\n };\n\n /**\n * @note: ping-pong eager strategy hack\n * After creating an element and bringing it into DOM,\n * the browser automatically focuses on the invisible element.\n * And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,\n * then we try to focus again on an invisible element, so that the keyboard slowly appears.\n * This ping pong allows the keyboard to not overlap the modal window.\n */\n fakeInput.addEventListener('blur', blurHandler, {once: true});\n fakeInput.addEventListener('focus', focusHandler);\n\n this.element.parentElement?.appendChild(fakeInput);\n\n setNativeFocused(fakeInput);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsBA,IAAM,OAAO,GAAG,IAAI,CAAC;AACrB,IAAM,qBAAqB,GAAG,eAAe,CAAC;AAE9C;AACA;;IAQI,+BAIqB,qBAAyD,EACrC,KAAc,EACT,eAAmC,EAE5D,MAAc,EAEd,UAAmC,EAEnC,QAAmB;QARnB,0BAAqB,GAArB,qBAAqB,CAAoC;QACrC,UAAK,GAAL,KAAK,CAAS;QACT,oBAAe,GAAf,eAAe,CAAoB;QAE5D,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E,CAAA;QACN,WAAA,MAAM,CAAC,2BAA2B,CAAC,CAAA;QAEnC,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAClB,WAAA,MAAM,CAAC,eAAe,CAAC,CAAA;QACvB,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QAEd,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;OAfb,qBAAqB,CA+FjC;IAAD,4BAAC;CA/FD;;;ICtBA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-auto-focus.js","sources":["ng://@taiga-ui/cdk/directives/auto-focus/handlers/abstract.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/default.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/handlers/ios.handler.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.options.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.directive.ts","ng://@taiga-ui/cdk/directives/auto-focus/autofocus.module.ts","ng://@taiga-ui/cdk/directives/auto-focus/taiga-ui-cdk-directives-auto-focus.ts"],"sourcesContent":["import {Directive, ElementRef} from '@angular/core';\nimport {\n TuiFocusableElementAccessor,\n TuiNativeFocusableElement,\n} from '@taiga-ui/cdk/interfaces';\n\nimport {TuiAutofocusHandler} from '../autofocus.options';\n\n@Directive()\nexport abstract class AbstractTuiAutofocusHandler implements TuiAutofocusHandler {\n protected constructor(\n protected readonly tuiFocusableComponent: TuiFocusableElementAccessor | null,\n protected readonly elementRef: ElementRef<HTMLElement>,\n ) {}\n\n protected get element(): TuiNativeFocusableElement {\n return (\n this.tuiFocusableComponent?.nativeFocusableElement ||\n this.elementRef.nativeElement\n );\n }\n\n protected get isTextFieldElement(): boolean {\n return this.element.matches('input, textarea');\n }\n\n abstract setFocus(): void;\n}\n","import {Directive, ElementRef, Inject, Optional, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\nimport {Observable, race, timer} from 'rxjs';\nimport {map, skipWhile, take, throttleTime} from 'rxjs/operators';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = '.ng-animating';\n\n@Directive()\nexport class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n race(\n timer(TIMEOUT),\n this.animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(() => this.element.closest(NG_ANIMATION_SELECTOR)),\n skipWhile(Boolean),\n take(1),\n ),\n ).subscribe(() => this.element.focus());\n } else {\n this.element.focus();\n }\n }\n}\n","import {\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR} from '@taiga-ui/cdk/tokens';\n\nimport {AbstractTuiAutofocusHandler} from './abstract.handler';\n\n@Directive()\nexport class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(\n @Optional()\n @Self()\n @Inject(TUI_FOCUSABLE_ITEM_ACCESSOR)\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n @Inject(ElementRef) elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2)\n private readonly renderer: Renderer2,\n @Inject(NgZone)\n private readonly ngZone: NgZone,\n ) {\n super(tuiFocusableComponent, elementRef);\n }\n\n setFocus(): void {\n if (this.isTextFieldElement) {\n this.ngZone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus();\n }\n }\n\n private iosWebkitAutofocus(): void {\n const fakeInput: HTMLElement = this.renderer.createElement('input');\n\n fakeInput.style.position = 'absolute';\n fakeInput.style.opacity = '0';\n fakeInput.style.height = '0';\n\n const blurHandler = (): void => fakeInput.focus();\n const focusHandler = (): void => {\n setTimeout(() => {\n this.element.focus();\n\n /**\n * @note:\n * We can't remove the element immediately, because it breaks flow\n */\n setTimeout(() => {\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n fakeInput.remove();\n });\n });\n };\n\n /**\n * @note: ping-pong eager strategy hack\n * After creating an element and bringing it into DOM,\n * the browser automatically focuses on the invisible element.\n * And then, after focus is triggered, we try to focus on target element, and if we managed to refocus,\n * then we try to focus again on an invisible element, so that the keyboard slowly appears.\n * This ping pong allows the keyboard to not overlap the modal window.\n */\n fakeInput.addEventListener('blur', blurHandler, {once: true});\n fakeInput.addEventListener('focus', focusHandler);\n\n this.element.parentElement?.appendChild(fakeInput);\n\n fakeInput.focus();\n }\n}\n","import {\n ElementRef,\n inject,\n InjectionToken,\n NgZone,\n Optional,\n Renderer2,\n Self,\n} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {TuiFocusableElementAccessor} from '@taiga-ui/cdk/interfaces';\nimport {TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_APPLE} from '@taiga-ui/cdk/tokens';\nimport {Observable} from 'rxjs';\n\nimport {TuiDefaultAutofocusHandler} from './handlers/default.handler';\nimport {TuiIosAutofocusHandler} from './handlers/ios.handler';\n\nexport interface TuiAutofocusHandler {\n setFocus(): void;\n}\n\nexport const TUI_AUTOFOCUS_HANDLER = new InjectionToken<TuiAutofocusHandler>(\n 'Autofocusing handler',\n);\n\n// TODO: 3.0 remove in ivy compilation\nexport function tuiAutofocusHandlerFactory(\n tuiFocusableComponent: TuiFocusableElementAccessor | null,\n elementRef: ElementRef<HTMLElement>,\n animationFrame$: Observable<number>,\n renderer: Renderer2,\n ngZone: NgZone,\n): TuiAutofocusHandler {\n return inject(TUI_IS_APPLE)\n ? new TuiIosAutofocusHandler(tuiFocusableComponent, elementRef, renderer, ngZone)\n : new TuiDefaultAutofocusHandler(\n tuiFocusableComponent,\n elementRef,\n animationFrame$,\n );\n}\n\nexport const TUI_AUTOFOCUS_PROVIDERS = [\n {\n provide: TUI_AUTOFOCUS_HANDLER,\n // TODO: replace to useClass in v3.0\n useFactory: tuiAutofocusHandlerFactory,\n deps: [\n [new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR],\n ElementRef,\n ANIMATION_FRAME,\n Renderer2,\n NgZone,\n ],\n },\n];\n","import {AfterViewInit, Directive, Inject, Input} from '@angular/core';\n\nimport {\n TUI_AUTOFOCUS_HANDLER,\n TUI_AUTOFOCUS_PROVIDERS,\n TuiAutofocusHandler,\n} from './autofocus.options';\n\n// TODO: 3.0 change input name to tuiAutoFocus and handle empty string\n@Directive({\n selector: '[tuiAutoFocus]',\n providers: TUI_AUTOFOCUS_PROVIDERS,\n})\nexport class TuiAutoFocusDirective implements AfterViewInit {\n @Input()\n autoFocus = true;\n\n constructor(\n @Inject(TUI_AUTOFOCUS_HANDLER) private readonly handler: TuiAutofocusHandler,\n ) {}\n\n ngAfterViewInit(): void {\n if (this.autoFocus) {\n this.handler.setFocus();\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutoFocusDirective} from './autofocus.directive';\n\n@NgModule({\n declarations: [TuiAutoFocusDirective],\n exports: [TuiAutoFocusDirective],\n})\nexport class TuiAutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;IAUI,qCACuB,qBAAyD,EACzD,UAAmC;QADnC,0BAAqB,GAArB,qBAAqB,CAAoC;QACzD,eAAU,GAAV,UAAU,CAAyB;KACtD;IAEJ,sBAAc,gDAAO;aAArB;;YACI,QACI,OAAA,IAAI,CAAC,qBAAqB,0CAAE,sBAAsB;gBAClD,IAAI,CAAC,UAAU,CAAC,aAAa,EAC/B;SACL;;;OAAA;IAED,sBAAc,2DAAkB;aAAhC;YACI,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;SAClD;;;OAAA;;;gBAZkC,UAAU;;IAH3B,2BAA2B;QADhD,SAAS,EAAE;OACU,2BAA2B,CAkBhD;IAAD,kCAAC;CAlBD;;ACCA,IAAM,OAAO,GAAG,IAAI,CAAC;AACrB,IAAM,qBAAqB,GAAG,eAAe,CAAC;;IAGE,8CAA2B;IACvE,oCAII,qBAAyD,EACrC,UAAmC,EACb,eAAmC;QANjF,YAQI,kBAAM,qBAAqB,EAAE,UAAU,CAAC,SAC3C;QAH6C,qBAAe,GAAf,eAAe,CAAoB;;KAGhF;IAED,6CAAQ,GAAR;QAAA,iBAcC;QAbG,IAAI,IAAI,CAAC,kBAAkB,EAAE;YACzB,IAAI,CACA,KAAK,CAAC,OAAO,CAAC,EACd,IAAI,CAAC,eAAe,CAAC,IAAI,CACrB,YAAY,CAAC,YAAY,CAAC,EAC1B,GAAG,CAAC,cAAM,OAAA,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,GAAA,CAAC,EACtD,SAAS,CAAC,OAAO,CAAC,EAClB,IAAI,CAAC,CAAC,CAAC,CACV,CACJ,CAAC,SAAS,CAAC,cAAM,OAAA,KAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAA,CAAC,CAAC;SAC3C;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{
|
|
3
|
-
import { typedFromEvent } from '@taiga-ui/cdk/observables';
|
|
2
|
+
import { Component, ViewEncapsulation, EventEmitter, Inject, HostBinding, Output, HostListener, Directive, NgModule } from '@angular/core';
|
|
4
3
|
import { TuiDirectiveStylesService } from '@taiga-ui/cdk/services';
|
|
5
|
-
import { map, skip } from 'rxjs/operators';
|
|
6
4
|
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
var TuiAutofilledStyleComponent = /** @class */ (function () {
|
|
6
|
+
function TuiAutofilledStyleComponent() {
|
|
7
|
+
}
|
|
8
|
+
TuiAutofilledStyleComponent = __decorate([
|
|
9
|
+
Component({
|
|
10
|
+
template: '',
|
|
11
|
+
encapsulation: ViewEncapsulation.None,
|
|
12
|
+
styles: [".tui-autofill,.tui-autofill input{transition:box-shadow 10ms}.tui-autofill input::-webkit-credit-card-auto-fill-button,.tui-autofill::-webkit-credit-card-auto-fill-button{pointer-events:none;background-color:transparent!important;-webkit-mask-image:none!important}"]
|
|
13
|
+
})
|
|
14
|
+
], TuiAutofilledStyleComponent);
|
|
15
|
+
return TuiAutofilledStyleComponent;
|
|
16
|
+
}());
|
|
17
|
+
|
|
11
18
|
var TuiAutofilledDirective = /** @class */ (function () {
|
|
12
|
-
function TuiAutofilledDirective(
|
|
13
|
-
this.
|
|
14
|
-
this.tuiAutofilledChange =
|
|
15
|
-
|
|
16
|
-
return animationName === ON;
|
|
17
|
-
}), skip(1));
|
|
18
|
-
directiveStyles.addStyle(STYLE, 'TuiAutofilledDirective');
|
|
19
|
+
function TuiAutofilledDirective(directiveStyles) {
|
|
20
|
+
this.autofilled = false;
|
|
21
|
+
this.tuiAutofilledChange = new EventEmitter();
|
|
22
|
+
directiveStyles.addComponent(TuiAutofilledStyleComponent);
|
|
19
23
|
}
|
|
24
|
+
TuiAutofilledDirective.prototype.transitionStartHandler = function (_a) {
|
|
25
|
+
var propertyName = _a.propertyName, target = _a.target;
|
|
26
|
+
var _b;
|
|
27
|
+
var matchedAutofill = propertyName.includes('box-shadow') && ((_b = target) === null || _b === void 0 ? void 0 : _b.matches('input'));
|
|
28
|
+
if (matchedAutofill) {
|
|
29
|
+
this.autofilled = !this.autofilled;
|
|
30
|
+
this.tuiAutofilledChange.emit(this.autofilled);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
20
33
|
TuiAutofilledDirective.ctorParameters = function () { return [
|
|
21
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
|
|
22
34
|
{ type: TuiDirectiveStylesService, decorators: [{ type: Inject, args: [TuiDirectiveStylesService,] }] }
|
|
23
35
|
]; };
|
|
36
|
+
__decorate([
|
|
37
|
+
HostBinding('class._autofilled')
|
|
38
|
+
], TuiAutofilledDirective.prototype, "autofilled", void 0);
|
|
24
39
|
__decorate([
|
|
25
40
|
Output()
|
|
26
41
|
], TuiAutofilledDirective.prototype, "tuiAutofilledChange", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
HostListener('transitionstart', ['$event'])
|
|
44
|
+
], TuiAutofilledDirective.prototype, "transitionStartHandler", null);
|
|
27
45
|
TuiAutofilledDirective = __decorate([
|
|
28
46
|
Directive({
|
|
29
47
|
selector: '[tuiAutofilledChange]',
|
|
30
|
-
host: {
|
|
31
|
-
class: 'tui-autofill',
|
|
32
|
-
},
|
|
48
|
+
host: { class: 'tui-autofill' },
|
|
33
49
|
}),
|
|
34
|
-
__param(0, Inject(
|
|
35
|
-
__param(1, Inject(TuiDirectiveStylesService))
|
|
50
|
+
__param(0, Inject(TuiDirectiveStylesService))
|
|
36
51
|
], TuiAutofilledDirective);
|
|
37
52
|
return TuiAutofilledDirective;
|
|
38
53
|
}());
|
|
@@ -42,8 +57,9 @@ var TuiAutofilledModule = /** @class */ (function () {
|
|
|
42
57
|
}
|
|
43
58
|
TuiAutofilledModule = __decorate([
|
|
44
59
|
NgModule({
|
|
45
|
-
declarations: [TuiAutofilledDirective],
|
|
46
60
|
exports: [TuiAutofilledDirective],
|
|
61
|
+
entryComponents: [TuiAutofilledStyleComponent],
|
|
62
|
+
declarations: [TuiAutofilledDirective, TuiAutofilledStyleComponent],
|
|
47
63
|
})
|
|
48
64
|
], TuiAutofilledModule);
|
|
49
65
|
return TuiAutofilledModule;
|
|
@@ -53,5 +69,5 @@ var TuiAutofilledModule = /** @class */ (function () {
|
|
|
53
69
|
* Generated bundle index. Do not edit.
|
|
54
70
|
*/
|
|
55
71
|
|
|
56
|
-
export { TuiAutofilledDirective, TuiAutofilledModule };
|
|
72
|
+
export { TuiAutofilledDirective, TuiAutofilledModule, TuiAutofilledStyleComponent };
|
|
57
73
|
//# sourceMappingURL=taiga-ui-cdk-directives-autofilled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-autofilled.js","sources":["ng://@taiga-ui/cdk/directives/autofilled/autofilled.directive.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.module.ts","ng://@taiga-ui/cdk/directives/autofilled/taiga-ui-cdk-directives-autofilled.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-autofilled.js","sources":["ng://@taiga-ui/cdk/directives/autofilled/autofilled-style.component.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.directive.ts","ng://@taiga-ui/cdk/directives/autofilled/autofilled.module.ts","ng://@taiga-ui/cdk/directives/autofilled/taiga-ui-cdk-directives-autofilled.ts"],"sourcesContent":["import {Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n template: '',\n styleUrls: ['./autofilled.style.less'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class TuiAutofilledStyleComponent {}\n","import {\n Directive,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Output,\n} from '@angular/core';\nimport {TuiDirectiveStylesService} from '@taiga-ui/cdk/services';\n\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@Directive({\n selector: '[tuiAutofilledChange]',\n host: {class: 'tui-autofill'},\n})\nexport class TuiAutofilledDirective {\n @HostBinding('class._autofilled')\n autofilled = false;\n\n @Output()\n readonly tuiAutofilledChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(TuiDirectiveStylesService) directiveStyles: TuiDirectiveStylesService,\n ) {\n directiveStyles.addComponent(TuiAutofilledStyleComponent);\n }\n\n @HostListener('transitionstart', ['$event'])\n transitionStartHandler({propertyName, target}: TransitionEvent): void {\n const matchedAutofill =\n propertyName.includes('box-shadow') && (target as Element)?.matches('input');\n\n if (matchedAutofill) {\n this.autofilled = !this.autofilled;\n this.tuiAutofilledChange.emit(this.autofilled);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiAutofilledDirective} from './autofilled.directive';\nimport {TuiAutofilledStyleComponent} from './autofilled-style.component';\n\n@NgModule({\n exports: [TuiAutofilledDirective],\n entryComponents: [TuiAutofilledStyleComponent],\n declarations: [TuiAutofilledDirective, TuiAutofilledStyleComponent],\n})\nexport class TuiAutofilledModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;IAOA;KAA2C;IAA9B,2BAA2B;QALvC,SAAS,CAAC;YACP,QAAQ,EAAE,EAAE;YAEZ,aAAa,EAAE,iBAAiB,CAAC,IAAI;;SACxC,CAAC;OACW,2BAA2B,CAAG;IAAD,kCAAC;CAA3C;;;ICgBI,gCACuC,eAA0C;QANjF,eAAU,GAAG,KAAK,CAAC;QAGV,wBAAmB,GAAG,IAAI,YAAY,EAAW,CAAC;QAKvD,eAAe,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC;KAC7D;IAGD,uDAAsB,GAAtB,UAAuB,EAAuC;YAAtC,8BAAY,EAAE,kBAAM;;QACxC,IAAM,eAAe,GACjB,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAK,MAAkB,0CAAE,OAAO,CAAC,OAAO,EAAC,CAAC;QAEjF,IAAI,eAAe,EAAE;YACjB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;YACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAClD;KACJ;;gBAduD,yBAAyB,uBAA5E,MAAM,SAAC,yBAAyB;;IANrC;QADC,WAAW,CAAC,mBAAmB,CAAC;8DACd;IAGnB;QADC,MAAM,EAAE;uEACkD;IAS3D;QADC,YAAY,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,CAAC;wEAS3C;IAtBQ,sBAAsB;QAJlC,SAAS,CAAC;YACP,QAAQ,EAAE,uBAAuB;YACjC,IAAI,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC;SAChC,CAAC;QASO,WAAA,MAAM,CAAC,yBAAyB,CAAC,CAAA;OAR7B,sBAAsB,CAuBlC;IAAD,6BAAC;CAvBD;;;ICNA;KAAmC;IAAtB,mBAAmB;QAL/B,QAAQ,CAAC;YACN,OAAO,EAAE,CAAC,sBAAsB,CAAC;YACjC,eAAe,EAAE,CAAC,2BAA2B,CAAC;YAC9C,YAAY,EAAE,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;SACtE,CAAC;OACW,mBAAmB,CAAG;IAAD,0BAAC;CAAnC;;ACVA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-checked.js","sources":["ng://@taiga-ui/cdk/directives/checked/checked.directive.ts","ng://@taiga-ui/cdk/directives/checked/checked.module.ts","ng://@taiga-ui/cdk/directives/checked/taiga-ui-cdk-directives-checked.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Output,\n Renderer2,\n} from '@angular/core';\n\n@Directive({\n selector: 'input[tuiChecked], input[tuiCheckedChange]',\n})\nexport class TuiCheckedDirective {\n @Input()\n set tuiChecked(checked: null | boolean) {\n this.updateProperty('checked', checked || false);\n this.updateProperty('indeterminate', checked === null);\n }\n\n @Output()\n readonly tuiCheckedChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(ElementRef)\n private readonly element: ElementRef<HTMLInputElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n this.updateProperty('checked', false);\n }\n\n @HostListener('change', ['$event.target'])\n onChange({checked}: HTMLInputElement) {\n this.updateProperty('indeterminate', false);\n this.tuiCheckedChange.emit(checked);\n }\n\n private updateProperty(property: 'checked' | 'indeterminate', value: boolean) {\n this.renderer.setProperty(this.element.nativeElement, property, value);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCheckedDirective} from './checked.directive';\n\n@NgModule({\n declarations: [TuiCheckedDirective],\n exports: [TuiCheckedDirective],\n})\nexport class TuiCheckedModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAwBI,6BAEqB,OAAqC,EAClB,QAAmB;QADtC,YAAO,GAAP,OAAO,CAA8B;QAClB,aAAQ,GAAR,QAAQ,CAAW;QALlD,qBAAgB,GAAG,IAAI,YAAY,EAAW,CAAC;QAOpD,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KACzC;IAdD,sBAAI,2CAAU;aAAd,UAAe,OAAuB;YAClC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,IAAI,KAAK,CAAC,CAAC;YACjD,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC;SAC1D;;;OAAA;IAcD,sCAAQ,GAAR,UAAS,EAA2B;YAA1B,oBAAO;QACb,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACvC;IAEO,4CAAc,GAAtB,UAAuB,QAAqC,EAAE,KAAc;QACxE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;KAC1E;;gBAd6B,UAAU,uBADnC,MAAM,SAAC,UAAU;gBAE4B,SAAS,uBAAtD,MAAM,SAAC,SAAS;;IAXrB;QADC,KAAK,EAAE;yDAIP;IAGD;QADC,MAAM,EAAE;iEAC+C;IAWxD;QADC,YAAY,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC;uDAIzC;IAtBQ,mBAAmB;QAH/B,SAAS,CAAC;YACP,QAAQ,EAAE,4CAA4C;SACzD,CAAC;QAYO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;OAbb,mBAAmB,CA2B/B;IAAD,0BAAC;CA3BD;;;ICNA;KAAgC;IAAnB,gBAAgB;QAJ5B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-checked.js","sources":["ng://@taiga-ui/cdk/directives/checked/checked.directive.ts","ng://@taiga-ui/cdk/directives/checked/checked.module.ts","ng://@taiga-ui/cdk/directives/checked/taiga-ui-cdk-directives-checked.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Inject,\n Input,\n Output,\n Renderer2,\n} from '@angular/core';\n\n@Directive({\n selector: 'input[tuiChecked], input[tuiCheckedChange]',\n})\nexport class TuiCheckedDirective {\n @Input()\n set tuiChecked(checked: null | boolean) {\n this.updateProperty('checked', checked || false);\n this.updateProperty('indeterminate', checked === null);\n }\n\n @Output()\n readonly tuiCheckedChange = new EventEmitter<boolean>();\n\n constructor(\n @Inject(ElementRef)\n private readonly element: ElementRef<HTMLInputElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n this.updateProperty('checked', false);\n }\n\n @HostListener('change', ['$event.target'])\n onChange({checked}: HTMLInputElement): void {\n this.updateProperty('indeterminate', false);\n this.tuiCheckedChange.emit(checked);\n }\n\n private updateProperty(property: 'checked' | 'indeterminate', value: boolean): void {\n this.renderer.setProperty(this.element.nativeElement, property, value);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCheckedDirective} from './checked.directive';\n\n@NgModule({\n declarations: [TuiCheckedDirective],\n exports: [TuiCheckedDirective],\n})\nexport class TuiCheckedModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAwBI,6BAEqB,OAAqC,EAClB,QAAmB;QADtC,YAAO,GAAP,OAAO,CAA8B;QAClB,aAAQ,GAAR,QAAQ,CAAW;QALlD,qBAAgB,GAAG,IAAI,YAAY,EAAW,CAAC;QAOpD,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;KACzC;IAdD,sBAAI,2CAAU;aAAd,UAAe,OAAuB;YAClC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,IAAI,KAAK,CAAC,CAAC;YACjD,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC;SAC1D;;;OAAA;IAcD,sCAAQ,GAAR,UAAS,EAA2B;YAA1B,oBAAO;QACb,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KACvC;IAEO,4CAAc,GAAtB,UAAuB,QAAqC,EAAE,KAAc;QACxE,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;KAC1E;;gBAd6B,UAAU,uBADnC,MAAM,SAAC,UAAU;gBAE4B,SAAS,uBAAtD,MAAM,SAAC,SAAS;;IAXrB;QADC,KAAK,EAAE;yDAIP;IAGD;QADC,MAAM,EAAE;iEAC+C;IAWxD;QADC,YAAY,CAAC,QAAQ,EAAE,CAAC,eAAe,CAAC,CAAC;uDAIzC;IAtBQ,mBAAmB;QAH/B,SAAS,CAAC;YACP,QAAQ,EAAE,4CAA4C;SACzD,CAAC;QAYO,WAAA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;OAbb,mBAAmB,CA2B/B;IAAD,0BAAC;CA3BD;;;ICNA;KAAgC;IAAnB,gBAAgB;QAJ5B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-copy-processor.js","sources":["ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.directive.ts","ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.module.ts","ng://@taiga-ui/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, HostListener, Inject, Input} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\nimport {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {identity} from 'rxjs';\n\n// @dynamic\n@Directive({\n selector: '[tuiCopyProcessor]',\n})\nexport class TuiCopyProcessorDirective {\n @Input()\n @tuiDefaultProp()\n tuiCopyProcessor: TuiStringHandler<string> = identity;\n\n constructor(@Inject(WINDOW) private readonly windowRef: Window) {}\n\n @HostListener('copy.prevent', ['$event'])\n onCopy(event: ClipboardEvent) {\n const selection = this.windowRef.getSelection();\n\n if (selection) {\n event.clipboardData?.setData(\n 'text/plain',\n this.tuiCopyProcessor(String(selection)),\n );\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCopyProcessorDirective} from './copy-processor.directive';\n\n@NgModule({\n declarations: [TuiCopyProcessorDirective],\n exports: [TuiCopyProcessorDirective],\n})\nexport class TuiCopyProcessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;;IASI,mCAA6C,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QAF9D,qBAAgB,GAA6B,QAAQ,CAAC;KAEY;IAGlE,0CAAM,GAAN,UAAO,KAAqB;;QACxB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;QAEhD,IAAI,SAAS,EAAE;YACX,MAAA,KAAK,CAAC,aAAa,0CAAE,OAAO,CACxB,YAAY,EACZ,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAC1C;SACL;KACJ;;gBAZuD,MAAM,uBAAjD,MAAM,SAAC,MAAM;;IAF1B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;uEACqC;IAKtD;QADC,YAAY,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC;2DAUxC;IAjBQ,yBAAyB;QAHrC,SAAS,CAAC;YACP,QAAQ,EAAE,oBAAoB;SACjC,CAAC;QAMe,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;OALlB,yBAAyB,CAkBrC;IAAD,gCAAC;CAlBD;;;ICFA;KAAsC;IAAzB,sBAAsB;QAJlC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;YACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;OACW,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;ACRA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-copy-processor.js","sources":["ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.directive.ts","ng://@taiga-ui/cdk/directives/copy-processor/copy-processor.module.ts","ng://@taiga-ui/cdk/directives/copy-processor/taiga-ui-cdk-directives-copy-processor.ts"],"sourcesContent":["import {Directive, HostListener, Inject, Input} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiDefaultProp} from '@taiga-ui/cdk/decorators';\nimport {TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {identity} from 'rxjs';\n\n// @dynamic\n@Directive({\n selector: '[tuiCopyProcessor]',\n})\nexport class TuiCopyProcessorDirective {\n @Input()\n @tuiDefaultProp()\n tuiCopyProcessor: TuiStringHandler<string> = identity;\n\n constructor(@Inject(WINDOW) private readonly windowRef: Window) {}\n\n @HostListener('copy.prevent', ['$event'])\n onCopy(event: ClipboardEvent): void {\n const selection = this.windowRef.getSelection();\n\n if (selection) {\n event.clipboardData?.setData(\n 'text/plain',\n this.tuiCopyProcessor(String(selection)),\n );\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiCopyProcessorDirective} from './copy-processor.directive';\n\n@NgModule({\n declarations: [TuiCopyProcessorDirective],\n exports: [TuiCopyProcessorDirective],\n})\nexport class TuiCopyProcessorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;;IASI,mCAA6C,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QAF9D,qBAAgB,GAA6B,QAAQ,CAAC;KAEY;IAGlE,0CAAM,GAAN,UAAO,KAAqB;;QACxB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;QAEhD,IAAI,SAAS,EAAE;YACX,MAAA,KAAK,CAAC,aAAa,0CAAE,OAAO,CACxB,YAAY,EACZ,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAC1C;SACL;KACJ;;gBAZuD,MAAM,uBAAjD,MAAM,SAAC,MAAM;;IAF1B;QAFC,KAAK,EAAE;QACP,cAAc,EAAE;uEACqC;IAKtD;QADC,YAAY,CAAC,cAAc,EAAE,CAAC,QAAQ,CAAC,CAAC;2DAUxC;IAjBQ,yBAAyB;QAHrC,SAAS,CAAC;YACP,QAAQ,EAAE,oBAAoB;SACjC,CAAC;QAMe,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;OALlB,yBAAyB,CAkBrC;IAAD,gCAAC;CAlBD;;;ICFA;KAAsC;IAAzB,sBAAsB;QAJlC,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,yBAAyB,CAAC;YACzC,OAAO,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;OACW,sBAAsB,CAAG;IAAD,6BAAC;CAAtC;;ACRA;;;;;;"}
|
|
@@ -13,10 +13,11 @@ var TuiFocusTrapDirective = /** @class */ (function () {
|
|
|
13
13
|
this.renderer = renderer;
|
|
14
14
|
this.activeElement = getNativeFocused(this.documentRef);
|
|
15
15
|
/**
|
|
16
|
-
* This would cause currently focused element to lose focus
|
|
16
|
+
* This would cause currently focused element to lose focus,
|
|
17
17
|
* but it might cause ExpressionChanged error due to potential HostBinding.
|
|
18
18
|
* Microtask keeps it in the same frame but allows change detection to run
|
|
19
19
|
*/
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
20
21
|
Promise.resolve().then(function () {
|
|
21
22
|
setNativeFocused(_this.elementRef.nativeElement);
|
|
22
23
|
});
|
|
@@ -42,6 +43,7 @@ var TuiFocusTrapDirective = /** @class */ (function () {
|
|
|
42
43
|
* so we need to delay it but stay in the same sync cycle,
|
|
43
44
|
* therefore using Promise instead of setTimeout
|
|
44
45
|
*/
|
|
46
|
+
// eslint-disable-next-line
|
|
45
47
|
Promise.resolve().then(function () {
|
|
46
48
|
// TODO: iframe warning
|
|
47
49
|
if (_this.activeElement instanceof HTMLElement) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.js","sources":["ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.directive.ts","ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.module.ts","ng://@taiga-ui/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport {containsOrAfter} from '@taiga-ui/cdk/utils/dom';\nimport {\n blurNativeFocused,\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n} from '@taiga-ui/cdk/utils/focus';\n\n// @dynamic\n@Directive({\n selector: '[tuiFocusTrap]',\n host: {\n tabIndex: '0',\n },\n})\nexport class TuiFocusTrapDirective implements OnDestroy {\n private readonly activeElement = getNativeFocused(this.documentRef);\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n /**\n * This would cause currently focused element to lose focus
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-focus-trap.js","sources":["ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.directive.ts","ng://@taiga-ui/cdk/directives/focus-trap/focus-trap.module.ts","ng://@taiga-ui/cdk/directives/focus-trap/taiga-ui-cdk-directives-focus-trap.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n Directive,\n ElementRef,\n HostListener,\n Inject,\n OnDestroy,\n Renderer2,\n} from '@angular/core';\nimport {containsOrAfter} from '@taiga-ui/cdk/utils/dom';\nimport {\n blurNativeFocused,\n getClosestFocusable,\n getNativeFocused,\n setNativeFocused,\n} from '@taiga-ui/cdk/utils/focus';\n\n// @dynamic\n@Directive({\n selector: '[tuiFocusTrap]',\n host: {\n tabIndex: '0',\n },\n})\nexport class TuiFocusTrapDirective implements OnDestroy {\n private readonly activeElement = getNativeFocused(this.documentRef);\n\n constructor(\n @Inject(DOCUMENT) private readonly documentRef: Document,\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLElement>,\n @Inject(Renderer2) private readonly renderer: Renderer2,\n ) {\n /**\n * This would cause currently focused element to lose focus,\n * but it might cause ExpressionChanged error due to potential HostBinding.\n * Microtask keeps it in the same frame but allows change detection to run\n */\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.resolve().then(() => {\n setNativeFocused(this.elementRef.nativeElement);\n });\n }\n\n @HostListener('blur')\n onBlur(): void {\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'tabIndex');\n }\n\n @HostListener('window:focusin.silent', ['$event.target'])\n onFocusIn(node: Node): void {\n if (containsOrAfter(this.elementRef.nativeElement, node)) {\n return;\n }\n\n const focusable = getClosestFocusable(\n this.elementRef.nativeElement,\n false,\n this.elementRef.nativeElement,\n );\n\n if (focusable) {\n setNativeFocused(focusable);\n }\n }\n\n ngOnDestroy(): void {\n blurNativeFocused(this.documentRef);\n\n /**\n * HostListeners are triggered even after ngOnDestroy\n * {@link https://github.com/angular/angular/issues/38100}\n * so we need to delay it but stay in the same sync cycle,\n * therefore using Promise instead of setTimeout\n */\n // eslint-disable-next-line\n Promise.resolve().then(() => {\n // TODO: iframe warning\n if (this.activeElement instanceof HTMLElement) {\n setNativeFocused(this.activeElement);\n }\n });\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiFocusTrapDirective} from './focus-trap.directive';\n\n@NgModule({\n declarations: [TuiFocusTrapDirective],\n exports: [TuiFocusTrapDirective],\n})\nexport class TuiFocusTrapModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAiBA;;IAUI,+BACuC,WAAqB,EAEvC,UAAmC,EAChB,QAAmB;QAJ3D,iBAeC;QAdsC,gBAAW,GAAX,WAAW,CAAU;QAEvC,eAAU,GAAV,UAAU,CAAyB;QAChB,aAAQ,GAAR,QAAQ,CAAW;QAN1C,kBAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;;;;;;;QAchE,OAAO,CAAC,OAAO,EAAE,CAAC,IAA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AA,MAAM,CAAC,UAAU,CAAC,CAAA;QAElB,WAAA,MAAM,CAAC,SAAS,CAAC,CAAA;OAPb,qBAAqB,CA2DjC;IAAD,4BAAC;CA3DD;;;IChBA;KAAkC;IAArB,kBAAkB;QAJ9B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,qBAAqB,CAAC;YACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;SACnC,CAAC;OACW,kBAAkB,CAAG;IAAD,yBAAC;CAAlC;;ACRA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-for.js","sources":["ng://@taiga-ui/cdk/directives/for/for.directive.ts","ng://@taiga-ui/cdk/directives/for/for.module.ts","ng://@taiga-ui/cdk/directives/for/taiga-ui-cdk-directives-for.ts"],"sourcesContent":["import {\n Directive,\n EmbeddedViewRef,\n Inject,\n Input,\n OnChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n selector: '[ngFor][ngForOf][ngForElse],[ngFor][ngForOf][ngForEmpty]',\n})\nexport class TuiForDirective<T, K =
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-for.js","sources":["ng://@taiga-ui/cdk/directives/for/for.directive.ts","ng://@taiga-ui/cdk/directives/for/for.module.ts","ng://@taiga-ui/cdk/directives/for/taiga-ui-cdk-directives-for.ts"],"sourcesContent":["import {\n Directive,\n EmbeddedViewRef,\n Inject,\n Input,\n OnChanges,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\n\n@Directive({\n selector: '[ngFor][ngForOf][ngForElse],[ngFor][ngForOf][ngForEmpty]',\n})\nexport class TuiForDirective<T, K = unknown> implements OnChanges {\n private ref?: EmbeddedViewRef<unknown>;\n\n @Input()\n ngForOf: T[] | readonly T[] | null = [];\n\n @Input()\n ngForElse?: TemplateRef<K>;\n\n @Input()\n ngForEmpty?: TemplateRef<K>;\n\n constructor(@Inject(ViewContainerRef) private readonly vcr: ViewContainerRef) {}\n\n ngOnChanges(): void {\n this.ref?.destroy();\n\n if (this.ngForOf?.length === 0 && this.ngForEmpty) {\n this.ref = this.vcr.createEmbeddedView(this.ngForEmpty);\n } else if (!this.ngForOf && this.ngForElse) {\n this.ref = this.vcr.createEmbeddedView(this.ngForElse);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiForDirective} from './for.directive';\n\n@NgModule({\n declarations: [TuiForDirective],\n exports: [TuiForDirective],\n})\nexport class TuiForModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;IAyBI,yBAAuD,GAAqB;QAArB,QAAG,GAAH,GAAG,CAAkB;QAR5E,YAAO,GAA8B,EAAE,CAAC;KAQwC;IAEhF,qCAAW,GAAX;;QACI,MAAA,IAAI,CAAC,GAAG,0CAAE,OAAO,GAAG;QAEpB,IAAI,OAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,MAAK,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE;YAC/C,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3D;aAAM,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE;YACxC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC1D;KACJ;;gBAV2D,gBAAgB,uBAA/D,MAAM,SAAC,gBAAgB;;IARpC;QADC,KAAK,EAAE;oDACgC;IAGxC;QADC,KAAK,EAAE;sDACmB;IAG3B;QADC,KAAK,EAAE;uDACoB;IAVnB,eAAe;QAH3B,SAAS,CAAC;YACP,QAAQ,EAAE,0DAA0D;SACvE,CAAC;QAae,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;OAZ5B,eAAe,CAuB3B;IAAD,sBAAC;CAvBD;;;ICLA;KAA4B;IAAf,YAAY;QAJxB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,eAAe,CAAC;YAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;SAC7B,CAAC;OACW,YAAY,CAAG;IAAD,mBAAC;CAA5B;;ACRA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-high-dpi.js","sources":["ng://@taiga-ui/cdk/directives/high-dpi/high-dpi.directive.ts","ng://@taiga-ui/cdk/directives/high-dpi/high-dpi.module.ts","ng://@taiga-ui/cdk/directives/high-dpi/taiga-ui-cdk-directives-high-dpi.ts"],"sourcesContent":["import {Directive, Inject, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\n/**\n * Only adds current content if user has High DPI display\n * @dynamic\n */\n@Directive({\n selector: '[tuiHighDpi]',\n})\nexport class TuiHighDpiDirective {\n constructor(\n @Inject(WINDOW) {devicePixelRatio}: Window,\n @Inject(ViewContainerRef) viewContainer: ViewContainerRef,\n @Inject(TemplateRef) templateRef: TemplateRef<unknown
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-high-dpi.js","sources":["ng://@taiga-ui/cdk/directives/high-dpi/high-dpi.directive.ts","ng://@taiga-ui/cdk/directives/high-dpi/high-dpi.module.ts","ng://@taiga-ui/cdk/directives/high-dpi/taiga-ui-cdk-directives-high-dpi.ts"],"sourcesContent":["import {Directive, Inject, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\n\n/**\n * Only adds current content if user has High DPI display\n * @dynamic\n */\n@Directive({\n selector: '[tuiHighDpi]',\n})\nexport class TuiHighDpiDirective {\n constructor(\n @Inject(WINDOW) {devicePixelRatio}: Window,\n @Inject(ViewContainerRef) viewContainer: ViewContainerRef,\n @Inject(TemplateRef) templateRef: TemplateRef<Record<string, unknown>>,\n ) {\n if (devicePixelRatio > 1) {\n viewContainer.createEmbeddedView(templateRef);\n }\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiHighDpiDirective} from './high-dpi.directive';\n\n@NgModule({\n declarations: [TuiHighDpiDirective],\n exports: [TuiHighDpiDirective],\n})\nexport class TuiHighDpiModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;;;;IAQI,6BACoB,EAA0B,EAChB,aAA+B,EACpC,WAAiD;YAFrD,sCAAgB;QAIjC,IAAI,gBAAgB,GAAG,CAAC,EAAE;YACtB,aAAa,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;SACjD;KACJ;;gBAPuC,MAAM,uBAAzC,MAAM,SAAC,MAAM;gBAC2B,gBAAgB,uBAAxD,MAAM,SAAC,gBAAgB;gBACU,WAAW,uBAA5C,MAAM,SAAC,WAAW;;IAJd,mBAAmB;QAH/B,SAAS,CAAC;YACP,QAAQ,EAAE,cAAc;SAC3B,CAAC;QAGO,WAAA,MAAM,CAAC,MAAM,CAAC,CAAA;QACd,WAAA,MAAM,CAAC,gBAAgB,CAAC,CAAA;QACxB,WAAA,MAAM,CAAC,WAAW,CAAC,CAAA;OAJf,mBAAmB,CAU/B;IAAD,0BAAC;CAVD;;;ICFA;KAAgC;IAAnB,gBAAgB;QAJ5B,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,mBAAmB,CAAC;YACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;SACjC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;ACRA;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import { Directive, NgModule } from '@angular/core';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Blank directive to query for {@link TemplateRef}
|
|
6
|
-
* TODO: Migrate everything to this directive
|
|
6
|
+
* TODO: 3.0 Migrate everything to this directive
|
|
7
7
|
*/
|
|
8
8
|
var TuiItemDirective = /** @class */ (function () {
|
|
9
9
|
function TuiItemDirective() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-item.js","sources":["ng://@taiga-ui/cdk/directives/item/item.directive.ts","ng://@taiga-ui/cdk/directives/item/item.module.ts","ng://@taiga-ui/cdk/directives/item/taiga-ui-cdk-directives-item.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n/**\n * Blank directive to query for {@link TemplateRef}\n * TODO: Migrate everything to this directive\n */\n@Directive({\n selector: 'ng-template[tuiItem]',\n})\nexport class TuiItemDirective {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiItemDirective} from './item.directive';\n\n@NgModule({\n declarations: [TuiItemDirective],\n exports: [TuiItemDirective],\n})\nexport class TuiItemModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;IAOA;KAAgC;IAAnB,gBAAgB;QAH5B,SAAS,CAAC;YACP,QAAQ,EAAE,sBAAsB;SACnC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;;ICDA;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-item.js","sources":["ng://@taiga-ui/cdk/directives/item/item.directive.ts","ng://@taiga-ui/cdk/directives/item/item.module.ts","ng://@taiga-ui/cdk/directives/item/taiga-ui-cdk-directives-item.ts"],"sourcesContent":["import {Directive} from '@angular/core';\n\n/**\n * Blank directive to query for {@link TemplateRef}\n * TODO: 3.0 Migrate everything to this directive\n */\n@Directive({\n selector: 'ng-template[tuiItem]',\n})\nexport class TuiItemDirective {}\n","import {NgModule} from '@angular/core';\n\nimport {TuiItemDirective} from './item.directive';\n\n@NgModule({\n declarations: [TuiItemDirective],\n exports: [TuiItemDirective],\n})\nexport class TuiItemModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;IAOA;KAAgC;IAAnB,gBAAgB;QAH5B,SAAS,CAAC;YACP,QAAQ,EAAE,sBAAsB;SACnC,CAAC;OACW,gBAAgB,CAAG;IAAD,uBAAC;CAAhC;;;ICDA;KAA6B;IAAhB,aAAa;QAJzB,QAAQ,CAAC;YACN,YAAY,EAAE,CAAC,gBAAgB,CAAC;YAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;SAC9B,CAAC;OACW,aAAa,CAAG;IAAD,oBAAC;CAA7B;;ACRA;;;;;;"}
|
|
@@ -45,6 +45,7 @@ var TuiMediaDirective = /** @class */ (function () {
|
|
|
45
45
|
this.elementRef.nativeElement.pause();
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
48
49
|
this.elementRef.nativeElement.play();
|
|
49
50
|
this.updatePlaybackRate(this.playbackRate);
|
|
50
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-directives-media.js","sources":["ng://@taiga-ui/cdk/directives/media/media.directive.ts","ng://@taiga-ui/cdk/directives/media/media.module.ts","ng://@taiga-ui/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk/decorators';\n\nexport function nonNegativeFiniteAssertion(value: number): boolean {\n return isFinite(value) && value >= 0;\n}\n\nexport function volumeAssertion(volume: number): boolean {\n return isFinite(volume) && volume >= 0 && volume <= 1;\n}\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n})\nexport class TuiMediaDirective {\n private playbackRate = 1;\n\n @Input()\n @HostBinding('volume')\n @tuiDefaultProp(volumeAssertion)\n volume = 1;\n\n @Input('playbackRate')\n @tuiRequiredSetter(nonNegativeFiniteAssertion)\n set playbackRateSetter(playbackRate: number) {\n this.updatePlaybackRate(playbackRate);\n }\n\n @Input()\n @tuiRequiredSetter(nonNegativeFiniteAssertion)\n set currentTime(currentTime: number) {\n if (Math.abs(currentTime - this.currentTime) > 0.05) {\n this.elementRef.nativeElement.currentTime = currentTime;\n }\n }\n\n @Input()\n set paused(paused: boolean) {\n if (paused) {\n this.elementRef.nativeElement.pause();\n } else {\n this.elementRef.nativeElement.play();\n this.updatePlaybackRate(this.playbackRate);\n }\n }\n\n @Output()\n readonly currentTimeChange = new EventEmitter<number>();\n\n @Output()\n readonly pausedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly volumeChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLMediaElement>,\n ) {}\n\n get paused(): boolean {\n return this.elementRef.nativeElement.paused;\n }\n\n get currentTime(): number {\n return this.elementRef.nativeElement.currentTime;\n }\n\n // @bad TODO: Make sure no other events can affect this like network issues etc.\n @HostListener('ended', ['true'])\n @HostListener('pause', ['true'])\n @HostListener('play', ['false'])\n onPausedChange(paused: boolean) {\n this.pausedChange.emit(paused);\n this.updatePlaybackRate(this.playbackRate);\n }\n\n @HostListener('volumechange')\n onVolumeChange() {\n this.volume = this.elementRef.nativeElement.volume;\n this.volumeChange.emit(this.volume);\n }\n\n @HostListener('timeupdate')\n @HostListener('seeking')\n @HostListener('seeked')\n onCurrentTimeChange() {\n this.currentTimeChange.emit(this.currentTime);\n }\n\n @HostListener('durationchange')\n changeDetectionTrigger() {\n // @bad TODO: consider if other events need to trigger CD\n }\n\n private updatePlaybackRate(playbackRate: number) {\n this.playbackRate = playbackRate;\n this.elementRef.nativeElement.playbackRate = this.playbackRate;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMediaDirective} from './media.directive';\n\n@NgModule({\n declarations: [TuiMediaDirective],\n exports: [TuiMediaDirective],\n})\nexport class TuiMediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;SAYgB,0BAA0B,CAAC,KAAa;IACpD,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACzC,CAAC;SAEe,eAAe,CAAC,MAAc;IAC1C,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC;AAC1D,CAAC;;
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-directives-media.js","sources":["ng://@taiga-ui/cdk/directives/media/media.directive.ts","ng://@taiga-ui/cdk/directives/media/media.module.ts","ng://@taiga-ui/cdk/directives/media/taiga-ui-cdk-directives-media.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n Output,\n} from '@angular/core';\nimport {tuiDefaultProp, tuiRequiredSetter} from '@taiga-ui/cdk/decorators';\n\nexport function nonNegativeFiniteAssertion(value: number): boolean {\n return isFinite(value) && value >= 0;\n}\n\nexport function volumeAssertion(volume: number): boolean {\n return isFinite(volume) && volume >= 0 && volume <= 1;\n}\n\n@Directive({\n selector: 'video[tuiMedia], audio[tuiMedia]',\n exportAs: 'tuiMedia',\n})\nexport class TuiMediaDirective {\n private playbackRate = 1;\n\n @Input()\n @HostBinding('volume')\n @tuiDefaultProp(volumeAssertion)\n volume = 1;\n\n @Input('playbackRate')\n @tuiRequiredSetter(nonNegativeFiniteAssertion)\n set playbackRateSetter(playbackRate: number) {\n this.updatePlaybackRate(playbackRate);\n }\n\n @Input()\n @tuiRequiredSetter(nonNegativeFiniteAssertion)\n set currentTime(currentTime: number) {\n if (Math.abs(currentTime - this.currentTime) > 0.05) {\n this.elementRef.nativeElement.currentTime = currentTime;\n }\n }\n\n @Input()\n set paused(paused: boolean) {\n if (paused) {\n this.elementRef.nativeElement.pause();\n } else {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.elementRef.nativeElement.play();\n this.updatePlaybackRate(this.playbackRate);\n }\n }\n\n @Output()\n readonly currentTimeChange = new EventEmitter<number>();\n\n @Output()\n readonly pausedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly volumeChange = new EventEmitter<number>();\n\n constructor(\n @Inject(ElementRef)\n private readonly elementRef: ElementRef<HTMLMediaElement>,\n ) {}\n\n get paused(): boolean {\n return this.elementRef.nativeElement.paused;\n }\n\n get currentTime(): number {\n return this.elementRef.nativeElement.currentTime;\n }\n\n // @bad TODO: Make sure no other events can affect this like network issues etc.\n @HostListener('ended', ['true'])\n @HostListener('pause', ['true'])\n @HostListener('play', ['false'])\n onPausedChange(paused: boolean): void {\n this.pausedChange.emit(paused);\n this.updatePlaybackRate(this.playbackRate);\n }\n\n @HostListener('volumechange')\n onVolumeChange(): void {\n this.volume = this.elementRef.nativeElement.volume;\n this.volumeChange.emit(this.volume);\n }\n\n @HostListener('timeupdate')\n @HostListener('seeking')\n @HostListener('seeked')\n onCurrentTimeChange(): void {\n this.currentTimeChange.emit(this.currentTime);\n }\n\n @HostListener('durationchange')\n changeDetectionTrigger(): void {\n // @bad TODO: consider if other events need to trigger CD\n }\n\n private updatePlaybackRate(playbackRate: number): void {\n this.playbackRate = playbackRate;\n this.elementRef.nativeElement.playbackRate = this.playbackRate;\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiMediaDirective} from './media.directive';\n\n@NgModule({\n declarations: [TuiMediaDirective],\n exports: [TuiMediaDirective],\n})\nexport class TuiMediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;SAYgB,0BAA0B,CAAC,KAAa;IACpD,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACzC,CAAC;SAEe,eAAe,CAAC,MAAc;IAC1C,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,MAA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