@taiga-ui/cdk 3.0.0-rc.0 → 3.0.0-rc.3
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/control.d.ts +2 -1
- package/abstract/dialog.service.d.ts +1 -1
- package/abstract/portal-host.d.ts +5 -3
- package/abstract/portal-service.d.ts +3 -2
- package/abstract/theme-switcher.d.ts +0 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +25 -16
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.js +0 -8
- package/bundles/taiga-ui-cdk-classes.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +0 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +3 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +18 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +3 -29
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +5 -6
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +8 -9
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-copy-processor.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js +5 -6
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +11 -9
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-high-dpi.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +7 -10
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +4 -11
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +10 -12
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +1 -2
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js +0 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +20 -76
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js +68 -0
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-pipes.umd.js +10 -4
- package/bundles/taiga-ui-cdk-pipes.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +37 -72
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +46 -20
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.js +3 -26
- package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-color.umd.js +81 -0
- package/bundles/taiga-ui-cdk-utils-color.umd.js.map +1 -0
- package/bundles/taiga-ui-cdk-utils-dom.umd.js +57 -87
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +24 -67
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-format.umd.js +0 -1
- package/bundles/taiga-ui-cdk-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.js +8 -48
- package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +349 -84
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.js +5 -21
- package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +1 -5
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils.umd.js +10 -4
- package/bundles/taiga-ui-cdk-utils.umd.js.map +1 -1
- package/classes/assert.d.ts +0 -3
- package/constants/browser.d.ts +4 -0
- package/constants/index.d.ts +1 -0
- package/constants/unicode-chars.d.ts +8 -0
- package/constants/version.d.ts +1 -0
- package/constants/version.js +4 -0
- package/date-time/day-range.d.ts +0 -5
- package/date-time/day.d.ts +1 -2
- package/date-time/month.d.ts +1 -2
- package/date-time/year.d.ts +1 -1
- package/directives/auto-focus/autofocus.directive.d.ts +2 -2
- package/directives/focus-visible/focus-visible.directive.d.ts +0 -1
- package/directives/high-dpi/high-dpi.directive.d.ts +0 -1
- package/directives/media/media.directive.d.ts +0 -2
- package/directives/overscroll/overscroll.directive.d.ts +0 -1
- package/directives/prevent-default/prevent-default.directive.d.ts +0 -1
- package/esm2015/abstract/control.js +7 -1
- package/esm2015/abstract/dialog.service.js +1 -1
- package/esm2015/abstract/portal-host.js +18 -15
- package/esm2015/abstract/portal-service.js +4 -4
- package/esm2015/abstract/theme-switcher.js +1 -2
- package/esm2015/classes/assert.js +1 -8
- package/esm2015/components/dialog-host/dialog-host.component.js +1 -2
- package/esm2015/components/dropdown-host/dropdown-host.component.js +4 -2
- package/esm2015/constants/browser.js +5 -1
- package/esm2015/constants/index.js +2 -1
- package/esm2015/constants/parent-animation.js +2 -2
- package/esm2015/constants/unicode-chars.js +9 -1
- package/esm2015/constants/version.js +2 -0
- package/esm2015/date-time/day-range.js +1 -6
- package/esm2015/date-time/day.js +2 -9
- package/esm2015/date-time/month.js +2 -8
- package/esm2015/date-time/year.js +2 -6
- package/esm2015/directives/active-zone/active-zone.directive.js +3 -6
- package/esm2015/directives/auto-focus/autofocus.directive.js +6 -5
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +1 -2
- package/esm2015/directives/autofilled/autofilled-style.component.js +1 -1
- package/esm2015/directives/copy-processor/copy-processor.directive.js +1 -2
- package/esm2015/directives/drag/drag.directive.js +3 -3
- package/esm2015/directives/droppable/droppable.directive.js +7 -8
- package/esm2015/directives/focus-trap/focus-trap.directive.js +14 -12
- package/esm2015/directives/focus-visible/focus-visible.directive.js +1 -2
- package/esm2015/directives/focused/focused.directive.js +3 -3
- package/esm2015/directives/high-dpi/high-dpi.directive.js +1 -2
- package/esm2015/directives/hovered/hovered.service.js +5 -8
- package/esm2015/directives/media/media.directive.js +5 -10
- package/esm2015/directives/overscroll/overscroll.directive.js +13 -15
- package/esm2015/directives/pan/pan.directive.js +1 -2
- package/esm2015/directives/pressed/pressed.directive.js +3 -3
- package/esm2015/directives/prevent-default/prevent-default.directive.js +3 -4
- package/esm2015/directives/repeat-times/repeat-times.directive.js +3 -3
- package/esm2015/directives/resize/resize.directive.js +1 -2
- package/esm2015/directives/swipe/swipe.directive.js +1 -2
- package/esm2015/directives/zoom/zoom.directive.js +1 -2
- package/esm2015/observables/drag-and-drop-from.js +6 -11
- package/esm2015/observables/focus-visible-observable.js +7 -12
- package/esm2015/observables/items-query-list-observable.js +4 -7
- package/esm2015/observables/mouse-drag-finish-from.js +4 -7
- package/esm2015/observables/must-be-present.js +4 -9
- package/esm2015/observables/pressed-observable.js +5 -10
- package/esm2015/observables/prevent-default.js +2 -7
- package/esm2015/observables/stop-propagation.js +2 -7
- package/esm2015/observables/typed-from-event.js +2 -7
- package/esm2015/observables/watch.js +2 -7
- package/esm2015/pipes/index.js +2 -1
- package/esm2015/pipes/keys/index.js +3 -0
- package/esm2015/pipes/keys/keys.module.js +16 -0
- package/esm2015/pipes/keys/keys.pipe.js +14 -0
- package/esm2015/pipes/keys/taiga-ui-cdk-pipes-keys.js +5 -0
- package/esm2015/services/directive-styles.service.js +3 -26
- package/esm2015/services/focus-visible.service.js +3 -4
- package/esm2015/services/obscured.service.js +3 -5
- package/esm2015/services/pan.service.js +6 -9
- package/esm2015/services/parents-scroll.service.js +3 -5
- package/esm2015/services/resize.service.js +1 -2
- package/esm2015/services/scroll.service.js +4 -5
- package/esm2015/services/swipe.service.js +6 -9
- package/esm2015/services/zoom.service.js +8 -9
- package/esm2015/tokens/active-element.js +16 -16
- package/esm2015/tokens/alerts.js +8 -1
- package/esm2015/tokens/dialogs.js +8 -1
- package/esm2015/tokens/focusable-item-accessor.js +7 -1
- package/esm2015/tokens/index.js +2 -2
- package/esm2015/tokens/is-apple.js +3 -3
- package/esm2015/tokens/is-cypress.js +1 -1
- package/esm2015/tokens/is-ios.js +3 -3
- package/esm2015/tokens/range.js +8 -0
- package/esm2015/tokens/window-height.js +3 -3
- package/esm2015/utils/browser/index.js +1 -2
- package/esm2015/utils/browser/is-edge.js +2 -7
- package/esm2015/utils/browser/is-firefox.js +2 -7
- package/esm2015/utils/browser/is-safari.js +2 -7
- package/esm2015/utils/color/hex-to-rgb.js +12 -0
- package/esm2015/utils/color/hsv-to-rgb.js +11 -0
- package/esm2015/utils/color/index.js +6 -0
- package/esm2015/utils/color/parse-color.js +27 -0
- package/esm2015/utils/color/rgb-to-hex.js +4 -0
- package/esm2015/utils/color/rgb-to-hsv.js +7 -0
- package/esm2015/utils/color/taiga-ui-cdk-utils-color.js +5 -0
- package/esm2015/utils/dom/can-scroll.js +2 -7
- package/esm2015/utils/dom/contains-or-after.js +2 -7
- package/esm2015/utils/dom/element-checks.js +21 -0
- package/esm2015/utils/dom/get-actual-target.js +2 -5
- package/esm2015/utils/dom/get-clipboard-data-text.js +2 -5
- package/esm2015/utils/dom/get-document-or-shadow-root.js +2 -7
- package/esm2015/utils/dom/get-element-obscurers.js +14 -17
- package/esm2015/utils/dom/get-element-offset.js +4 -7
- package/esm2015/utils/dom/get-scroll-parent.js +3 -6
- package/esm2015/utils/dom/get-selected-text.js +3 -3
- package/esm2015/utils/dom/index.js +3 -2
- package/esm2015/utils/dom/is-current-target.js +2 -7
- package/esm2015/utils/dom/is-element-editable.js +5 -0
- package/esm2015/utils/dom/is-inside-iframe.js +2 -5
- package/esm2015/utils/dom/is-node-in.js +5 -7
- package/esm2015/utils/focus/blur-native-focused.js +4 -7
- package/esm2015/utils/focus/get-closest-focusable.js +26 -0
- package/esm2015/utils/focus/get-native-focused.js +3 -3
- package/esm2015/utils/focus/index.js +2 -3
- package/esm2015/utils/focus/is-native-focused-in.js +1 -2
- package/esm2015/utils/focus/is-native-focused.js +1 -2
- package/esm2015/utils/focus/is-native-keyboard-focusable.js +3 -3
- package/esm2015/utils/focus/is-native-mouse-focusable.js +1 -4
- package/esm2015/utils/focus/move-focus.js +2 -4
- package/esm2015/utils/focus/set-native-mouse-focused.js +8 -7
- package/esm2015/utils/format/px.js +1 -2
- package/esm2015/utils/index.js +2 -1
- package/esm2015/utils/math/clamp.js +2 -5
- package/esm2015/utils/math/quantize.js +2 -5
- package/esm2015/utils/math/round.js +4 -19
- package/esm2015/utils/math/sum.js +2 -5
- package/esm2015/utils/math/to-int.js +2 -7
- package/esm2015/utils/math/to-radians.js +2 -5
- package/esm2015/utils/miscellaneous/array-remove.js +4 -0
- package/esm2015/utils/miscellaneous/array-toggle.js +6 -0
- package/esm2015/utils/miscellaneous/distance-between-touches.js +2 -7
- package/esm2015/utils/miscellaneous/ease-in-out-quad.js +2 -7
- package/esm2015/utils/miscellaneous/flat-length.js +2 -5
- package/esm2015/utils/miscellaneous/get-original-array-from-query-list.js +2 -5
- package/esm2015/utils/miscellaneous/get-swipe-direction.js +2 -7
- package/esm2015/utils/miscellaneous/index.js +3 -3
- package/esm2015/utils/miscellaneous/is-number.js +2 -7
- package/esm2015/utils/miscellaneous/is-present.js +2 -7
- package/esm2015/utils/miscellaneous/mark-control-as-touched-and-validate.js +4 -9
- package/esm2015/utils/miscellaneous/uniq-by.js +2 -7
- package/esm2015/utils/os/is-apple-platform.js +2 -5
- package/esm2015/utils/os/is-apple.js +4 -9
- package/esm2015/utils/os/is-ios.js +4 -9
- package/esm2015/utils/svg/svg-linear-gradient-processor.js +2 -5
- package/fesm2015/taiga-ui-cdk-abstract.js +26 -18
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-classes.js +1 -8
- package/fesm2015/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js +0 -1
- package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js +3 -1
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +16 -2
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +4 -26
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js +2 -5
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +5 -5
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-drag.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-drag.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-droppable.js +6 -7
- package/fesm2015/taiga-ui-cdk-directives-droppable.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +13 -11
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-visible.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-visible.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focused.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-focused.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-hovered.js +4 -7
- package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-media.js +5 -10
- package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js +12 -14
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pan.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-pan.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pressed.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-pressed.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js +2 -3
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-resize.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-swipe.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-swipe.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-zoom.js +0 -1
- package/fesm2015/taiga-ui-cdk-directives-zoom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +21 -67
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-keys.js +34 -0
- package/fesm2015/taiga-ui-cdk-pipes-keys.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-pipes.js +1 -0
- package/fesm2015/taiga-ui-cdk-pipes.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js +25 -60
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +46 -23
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-browser.js +4 -23
- package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-color.js +67 -0
- package/fesm2015/taiga-ui-cdk-utils-color.js.map +1 -0
- package/fesm2015/taiga-ui-cdk-utils-dom.js +53 -78
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +21 -57
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-format.js +0 -1
- package/fesm2015/taiga-ui-cdk-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-math.js +9 -41
- package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +21 -73
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js +6 -19
- package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-svg.js +2 -5
- package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils.js +1 -0
- package/fesm2015/taiga-ui-cdk-utils.js.map +1 -1
- package/observables/drag-and-drop-from.d.ts +1 -5
- package/observables/focus-visible-observable.d.ts +1 -5
- package/observables/items-query-list-observable.d.ts +1 -3
- package/observables/mouse-drag-finish-from.d.ts +1 -3
- package/observables/must-be-present.d.ts +1 -5
- package/observables/pressed-observable.d.ts +1 -5
- package/observables/prevent-default.d.ts +1 -5
- package/observables/stop-propagation.d.ts +1 -5
- package/observables/typed-from-event.d.ts +5 -21
- package/observables/watch.d.ts +1 -5
- package/package.json +7 -3
- package/pipes/index.d.ts +1 -0
- package/pipes/keys/index.d.ts +2 -0
- package/pipes/keys/keys.module.d.ts +7 -0
- package/pipes/keys/keys.pipe.d.ts +7 -0
- package/pipes/keys/package.json +10 -0
- package/pipes/keys/taiga-ui-cdk-pipes-keys.d.ts +5 -0
- package/schematics/collection.json +6 -0
- package/schematics/constants/file-globs.d.ts +2 -0
- package/schematics/constants/file-globs.js +11 -0
- package/schematics/constants/index.d.ts +1 -0
- package/schematics/constants/index.js +4 -0
- package/schematics/constants/taiga-styles.d.ts +2 -1
- package/schematics/constants/taiga-styles.js +3 -2
- package/schematics/ng-add/constants/versions.js +2 -2
- package/schematics/ng-add/index.js +6 -0
- package/schematics/ng-add/schema.d.ts +8 -0
- package/schematics/ng-add/schema.json +9 -0
- package/schematics/ng-add/steps/add-taiga-icons.js +5 -3
- package/schematics/ng-add/steps/add-taiga-modules.js +4 -0
- package/schematics/ng-add/steps/add-taiga-styles.js +6 -3
- package/schematics/ng-add/steps/wrap-with-tui-root.js +3 -0
- package/schematics/ng-update/constants/breakpoints.d.ts +82 -0
- package/schematics/ng-update/constants/breakpoints.js +34 -0
- package/schematics/ng-update/constants/consts.d.ts +1 -1
- package/schematics/ng-update/constants/consts.js +170 -0
- package/schematics/ng-update/constants/deprecated-functions.js +1 -36
- package/schematics/ng-update/constants/services.js +1 -1
- package/schematics/ng-update/constants/templates.d.ts +16 -0
- package/schematics/ng-update/constants/templates.js +261 -1
- package/schematics/ng-update/constants/warnings.js +10 -0
- package/schematics/ng-update/index.js +21 -10
- package/schematics/ng-update/schema.json +13 -0
- package/schematics/ng-update/steps/migrate-date-time.js +45 -1
- package/schematics/ng-update/steps/migrate-progress.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-progress.js +2 -1
- package/schematics/ng-update/steps/migrate-sliders/index.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-sliders/index.js +2 -0
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.js +4 -3
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +3 -2
- package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.d.ts +3 -0
- package/schematics/ng-update/steps/migrate-taiga-proprietary-icons.js +51 -0
- package/schematics/ng-update/steps/migrate-templates.d.ts +1 -1
- package/schematics/ng-update/steps/migrate-templates.js +77 -5
- package/schematics/ng-update/steps/replace-deep-import.js +2 -1
- package/schematics/ng-update/steps/replace-enums.js +2 -1
- package/schematics/ng-update/steps/replace-functions.js +42 -2
- package/schematics/ng-update/steps/replace-styles.d.ts +1 -0
- package/schematics/ng-update/steps/replace-styles.js +18 -0
- package/schematics/ng-update/steps/show-warnings.js +2 -1
- package/schematics/utils/add-import-to-closest-module.d.ts +1 -0
- package/schematics/utils/add-import-to-closest-module.js +18 -0
- package/schematics/utils/add-styles.d.ts +6 -2
- package/schematics/utils/add-styles.js +32 -4
- package/schematics/utils/angular/ng-component.d.ts +1 -2
- package/schematics/utils/angular/ng-module.d.ts +1 -2
- package/schematics/utils/angular/ng-module.js +2 -1
- package/schematics/utils/colored-log.d.ts +1 -0
- package/schematics/utils/colored-log.js +5 -1
- package/schematics/utils/get-execution-time.d.ts +1 -0
- package/schematics/utils/get-execution-time.js +8 -0
- package/schematics/utils/get-named-import-references.js +2 -1
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/get-project.js +0 -4
- package/schematics/utils/insert-todo.d.ts +1 -0
- package/schematics/utils/insert-todo.js +3 -2
- package/schematics/utils/progress.d.ts +1 -0
- package/schematics/utils/progress.js +13 -0
- package/schematics/utils/templates/get-component-templates.d.ts +1 -2
- package/schematics/utils/templates/get-component-templates.js +1 -1
- package/schematics/utils/templates/ng-component-input-manipulations.js +2 -12
- package/schematics/utils/templates/template-resource.d.ts +1 -1
- package/services/directive-styles.service.d.ts +2 -9
- package/services/focus-visible.service.d.ts +0 -1
- package/services/pan.service.d.ts +0 -3
- package/services/swipe.service.d.ts +0 -3
- package/tokens/alerts.d.ts +2 -1
- package/tokens/dialogs.d.ts +2 -1
- package/tokens/focusable-item-accessor.d.ts +2 -1
- package/tokens/index.d.ts +1 -1
- package/tokens/is-cypress.d.ts +0 -3
- package/tokens/range.d.ts +2 -0
- package/utils/browser/index.d.ts +0 -1
- package/utils/browser/is-edge.d.ts +1 -5
- package/utils/browser/is-firefox.d.ts +1 -5
- package/utils/browser/is-safari.d.ts +1 -5
- package/utils/color/hex-to-rgb.d.ts +1 -0
- package/utils/color/hsv-to-rgb.d.ts +4 -0
- package/utils/color/index.d.ts +5 -0
- package/utils/color/package.json +10 -0
- package/utils/color/parse-color.d.ts +1 -0
- package/utils/color/rgb-to-hex.d.ts +1 -0
- package/utils/color/rgb-to-hsv.d.ts +1 -0
- package/utils/color/taiga-ui-cdk-utils-color.d.ts +5 -0
- package/utils/dom/can-scroll.d.ts +1 -5
- package/utils/dom/contains-or-after.d.ts +1 -5
- package/utils/dom/element-checks.d.ts +6 -0
- package/utils/dom/get-actual-target.d.ts +1 -3
- package/utils/dom/get-clipboard-data-text.d.ts +1 -3
- package/utils/dom/get-document-or-shadow-root.d.ts +1 -5
- package/utils/dom/get-element-obscurers.d.ts +1 -3
- package/utils/dom/get-element-offset.d.ts +1 -3
- package/utils/dom/get-scroll-parent.d.ts +1 -3
- package/utils/dom/index.d.ts +2 -1
- package/utils/dom/is-current-target.d.ts +1 -5
- package/utils/dom/is-element-editable.d.ts +1 -0
- package/utils/dom/is-inside-iframe.d.ts +1 -3
- package/utils/dom/is-node-in.d.ts +1 -3
- package/utils/focus/blur-native-focused.d.ts +1 -3
- package/utils/focus/get-closest-focusable.d.ts +27 -0
- package/utils/focus/index.d.ts +1 -2
- package/utils/focus/is-native-mouse-focusable.d.ts +0 -2
- package/utils/focus/set-native-mouse-focused.d.ts +1 -3
- package/utils/index.d.ts +1 -0
- package/utils/math/clamp.d.ts +1 -3
- package/utils/math/quantize.d.ts +1 -3
- package/utils/math/round.d.ts +3 -15
- package/utils/math/sum.d.ts +1 -3
- package/utils/math/to-int.d.ts +1 -5
- package/utils/math/to-radians.d.ts +1 -3
- package/utils/miscellaneous/array-remove.d.ts +1 -0
- package/utils/miscellaneous/array-toggle.d.ts +1 -0
- package/utils/miscellaneous/distance-between-touches.d.ts +1 -5
- package/utils/miscellaneous/ease-in-out-quad.d.ts +1 -5
- package/utils/miscellaneous/flat-length.d.ts +1 -3
- package/utils/miscellaneous/get-original-array-from-query-list.d.ts +1 -3
- package/utils/miscellaneous/get-swipe-direction.d.ts +1 -5
- package/utils/miscellaneous/index.d.ts +2 -2
- package/utils/miscellaneous/is-number.d.ts +1 -5
- package/utils/miscellaneous/is-present.d.ts +1 -5
- package/utils/miscellaneous/mark-control-as-touched-and-validate.d.ts +1 -5
- package/utils/miscellaneous/uniq-by.d.ts +1 -5
- package/utils/os/is-apple-platform.d.ts +1 -3
- package/utils/os/is-apple.d.ts +1 -5
- package/utils/os/is-ios.d.ts +1 -5
- package/utils/svg/svg-linear-gradient-processor.d.ts +1 -3
- package/esm2015/tokens/sanitizer.js +0 -4
- package/esm2015/utils/browser/is-ie.js +0 -4
- package/esm2015/utils/dom/is-form-field.js +0 -8
- package/esm2015/utils/focus/get-closest-keyboard-focusable.js +0 -34
- package/esm2015/utils/focus/set-native-focused.js +0 -19
- package/esm2015/utils/miscellaneous/identity.js +0 -8
- package/esm2015/utils/miscellaneous/is-element-editable.js +0 -12
- package/tokens/sanitizer.d.ts +0 -2
- package/utils/browser/is-ie.d.ts +0 -1
- package/utils/dom/is-form-field.d.ts +0 -1
- package/utils/focus/get-closest-keyboard-focusable.d.ts +0 -10
- package/utils/focus/set-native-focused.d.ts +0 -10
- package/utils/miscellaneous/identity.d.ts +0 -4
- package/utils/miscellaneous/is-element-editable.d.ts +0 -5
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/pipes/keys', ['exports', '@angular/core'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.pipes = global["taiga-ui"].cdk.pipes || {}, global["taiga-ui"].cdk.pipes.keys = {}), global.ng.core));
|
|
5
|
+
})(this, (function (exports, i0) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
|
|
27
|
+
var TuiKeysPipe = /** @class */ (function () {
|
|
28
|
+
function TuiKeysPipe() {
|
|
29
|
+
}
|
|
30
|
+
TuiKeysPipe.prototype.transform = function (object) {
|
|
31
|
+
return Object.keys(object);
|
|
32
|
+
};
|
|
33
|
+
return TuiKeysPipe;
|
|
34
|
+
}());
|
|
35
|
+
TuiKeysPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
36
|
+
TuiKeysPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipe, name: "tuiKeys" });
|
|
37
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipe, decorators: [{
|
|
38
|
+
type: i0.Pipe,
|
|
39
|
+
args: [{ name: "tuiKeys" }]
|
|
40
|
+
}] });
|
|
41
|
+
|
|
42
|
+
var TuiKeysPipeModule = /** @class */ (function () {
|
|
43
|
+
function TuiKeysPipeModule() {
|
|
44
|
+
}
|
|
45
|
+
return TuiKeysPipeModule;
|
|
46
|
+
}());
|
|
47
|
+
TuiKeysPipeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
48
|
+
TuiKeysPipeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipeModule, declarations: [TuiKeysPipe], exports: [TuiKeysPipe] });
|
|
49
|
+
TuiKeysPipeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipeModule });
|
|
50
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiKeysPipeModule, decorators: [{
|
|
51
|
+
type: i0.NgModule,
|
|
52
|
+
args: [{
|
|
53
|
+
exports: [TuiKeysPipe],
|
|
54
|
+
declarations: [TuiKeysPipe],
|
|
55
|
+
}]
|
|
56
|
+
}] });
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Generated bundle index. Do not edit.
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
exports.TuiKeysPipe = TuiKeysPipe;
|
|
63
|
+
exports.TuiKeysPipeModule = TuiKeysPipeModule;
|
|
64
|
+
|
|
65
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
66
|
+
|
|
67
|
+
}));
|
|
68
|
+
//# sourceMappingURL=taiga-ui-cdk-pipes-keys.umd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-pipes-keys.umd.js","sources":["../../../projects/cdk/pipes/keys/keys.pipe.ts","../../../projects/cdk/pipes/keys/keys.module.ts","../../../projects/cdk/pipes/keys/taiga-ui-cdk-pipes-keys.ts"],"sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n@Pipe({name: `tuiKeys`})\nexport class TuiKeysPipe implements PipeTransform {\n transform(object: Record<any, any>): string[] {\n return Object.keys(object);\n }\n}\n","import {NgModule} from '@angular/core';\n\nimport {TuiKeysPipe} from './keys.pipe';\n\n@NgModule({\n exports: [TuiKeysPipe],\n declarations: [TuiKeysPipe],\n})\nexport class TuiKeysPipeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i0","Pipe","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,QAAA,WAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,WAAA,GAAA;;QACI,WAAS,CAAA,SAAA,CAAA,SAAA,GAAT,UAAU,MAAwB,EAAA;IAC9B,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B,CAAA;;;mIAHQ,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAA,aAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;iIAAX,WAAW,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;sHAAX,WAAW,EAAA,UAAA,EAAA,CAAA;sBADvBC,OAAI;uBAAC,EAAC,IAAI,EAAE,SAAS,EAAC,CAAA;;;ACMvB,QAAA,iBAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,iBAAA,GAAA;;;;yIAAa,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAD,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;0IAAjB,iBAAiB,EAAA,YAAA,EAAA,CAFX,WAAW,CAAA,EAAA,OAAA,EAAA,CADhB,WAAW,CAAA,EAAA,CAAA,CAAA;0IAGZ,iBAAiB,EAAA,CAAA,CAAA;sHAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;sBAJ7BE,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;wBACN,OAAO,EAAE,CAAC,WAAW,CAAC;wBACtB,YAAY,EAAE,CAAC,WAAW,CAAC;qBAC9B,CAAA;;;ICPD;;IAEG;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taiga-ui/cdk/pipes/filter'), require('@taiga-ui/cdk/pipes/mapper')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/pipes', ['exports', '@taiga-ui/cdk/pipes/filter', '@taiga-ui/cdk/pipes/mapper'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.pipes = {}), global["taiga-ui"].cdk.pipes.filter, global["taiga-ui"].cdk.pipes.mapper));
|
|
5
|
-
})(this, (function (exports, filter, mapper) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@taiga-ui/cdk/pipes/filter'), require('@taiga-ui/cdk/pipes/keys'), require('@taiga-ui/cdk/pipes/mapper')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/pipes', ['exports', '@taiga-ui/cdk/pipes/filter', '@taiga-ui/cdk/pipes/keys', '@taiga-ui/cdk/pipes/mapper'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.pipes = {}), global["taiga-ui"].cdk.pipes.filter, global["taiga-ui"].cdk.pipes.keys, global["taiga-ui"].cdk.pipes.mapper));
|
|
5
|
+
})(this, (function (exports, filter, keys, mapper) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Generated bundle index. Do not edit.
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
get: function () { return filter[k]; }
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
Object.keys(keys).forEach(function (k) {
|
|
18
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return keys[k]; }
|
|
21
|
+
});
|
|
22
|
+
});
|
|
17
23
|
Object.keys(mapper).forEach(function (k) {
|
|
18
24
|
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
|
|
19
25
|
enumerable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-pipes.umd.js","sources":["../../../projects/cdk/pipes/taiga-ui-cdk-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;CAAA;;CAEG
|
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-pipes.umd.js","sources":["../../../projects/cdk/pipes/taiga-ui-cdk-pipes.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;CAAA;;CAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/services', ['exports', '@angular/core', 'rxjs', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.services = {}), global.ng.core, global.rxjs, global
|
|
5
|
-
})(this, (function (exports, i0, i1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@taiga-ui/cdk/observables'), require('rxjs/operators'), require('@ng-web-apis/common'), require('@taiga-ui/cdk/constants'), require('@taiga-ui/cdk/utils/dom'), require('@angular/common'), require('@ng-web-apis/resize-observer'), require('@taiga-ui/cdk/classes'), require('@taiga-ui/cdk/utils/math'), require('@taiga-ui/cdk/utils/miscellaneous'), require('@taiga-ui/cdk/tokens'), require('@taiga-ui/cdk/utils')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@taiga-ui/cdk/services', ['exports', '@angular/core', 'rxjs', '@taiga-ui/cdk/observables', 'rxjs/operators', '@ng-web-apis/common', '@taiga-ui/cdk/constants', '@taiga-ui/cdk/utils/dom', '@angular/common', '@ng-web-apis/resize-observer', '@taiga-ui/cdk/classes', '@taiga-ui/cdk/utils/math', '@taiga-ui/cdk/utils/miscellaneous', '@taiga-ui/cdk/tokens', '@taiga-ui/cdk/utils'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].cdk = global["taiga-ui"].cdk || {}, global["taiga-ui"].cdk.services = {}), global.ng.core, global.rxjs, global["taiga-ui"].cdk.observables, global.rxjs.operators, global.common, global["taiga-ui"].cdk.constants, global["taiga-ui"].cdk.utils.dom, global.ng.common, global.resizeObserver, global["taiga-ui"].cdk.classes, global["taiga-ui"].cdk.utils.math, global["taiga-ui"].cdk.utils.miscellaneous, global["taiga-ui"].cdk.tokens, global["taiga-ui"].cdk.utils));
|
|
5
|
+
})(this, (function (exports, i0, i1, observables, operators, common, constants, dom, common$1, resizeObserver, classes, math, miscellaneous, tokens, utils) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -374,14 +374,11 @@
|
|
|
374
374
|
|
|
375
375
|
/**
|
|
376
376
|
* Service to use styles with directives
|
|
377
|
-
* @dynamic
|
|
378
377
|
*/
|
|
379
378
|
var TuiDirectiveStylesService = /** @class */ (function () {
|
|
380
|
-
function TuiDirectiveStylesService(resolver, injector
|
|
379
|
+
function TuiDirectiveStylesService(resolver, injector) {
|
|
381
380
|
this.resolver = resolver;
|
|
382
381
|
this.injector = injector;
|
|
383
|
-
this.documentRef = documentRef;
|
|
384
|
-
this.renderer = renderer;
|
|
385
382
|
this.map = new Map();
|
|
386
383
|
}
|
|
387
384
|
TuiDirectiveStylesService.prototype.addComponent = function (component) {
|
|
@@ -389,21 +386,9 @@
|
|
|
389
386
|
this.map.set(component, this.resolver.resolveComponentFactory(component).create(this.injector));
|
|
390
387
|
}
|
|
391
388
|
};
|
|
392
|
-
/** @deprecated use components approach
|
|
393
|
-
* TODO: delete in v3.0
|
|
394
|
-
*/
|
|
395
|
-
TuiDirectiveStylesService.prototype.addStyle = function (styles, attribute) {
|
|
396
|
-
if (this.documentRef.head.querySelector("style[" + attribute + "]")) {
|
|
397
|
-
return;
|
|
398
|
-
}
|
|
399
|
-
var style = this.renderer.createElement("style");
|
|
400
|
-
this.renderer.setProperty(style, "textContent", styles);
|
|
401
|
-
this.renderer.setAttribute(style, attribute, "");
|
|
402
|
-
this.documentRef.head.appendChild(style);
|
|
403
|
-
};
|
|
404
389
|
return TuiDirectiveStylesService;
|
|
405
390
|
}());
|
|
406
|
-
TuiDirectiveStylesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDirectiveStylesService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.INJECTOR }
|
|
391
|
+
TuiDirectiveStylesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDirectiveStylesService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.INJECTOR }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
407
392
|
TuiDirectiveStylesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDirectiveStylesService, providedIn: "root" });
|
|
408
393
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiDirectiveStylesService, decorators: [{
|
|
409
394
|
type: i0.Injectable,
|
|
@@ -417,12 +402,6 @@
|
|
|
417
402
|
}] }, { type: i0__namespace.Injector, decorators: [{
|
|
418
403
|
type: i0.Inject,
|
|
419
404
|
args: [i0.INJECTOR]
|
|
420
|
-
}] }, { type: Document, decorators: [{
|
|
421
|
-
type: i0.Inject,
|
|
422
|
-
args: [common.DOCUMENT]
|
|
423
|
-
}] }, { type: i0__namespace.Renderer2, decorators: [{
|
|
424
|
-
type: i0.Inject,
|
|
425
|
-
args: [tokens.TUI_DEFAULT_RENDERER]
|
|
426
405
|
}] }];
|
|
427
406
|
} });
|
|
428
407
|
|
|
@@ -430,14 +409,13 @@
|
|
|
430
409
|
* Service to imitate :focus-visible
|
|
431
410
|
* (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)
|
|
432
411
|
* in browsers that do not support it
|
|
433
|
-
* @dynamic
|
|
434
412
|
*/
|
|
435
413
|
var TuiFocusVisibleService = /** @class */ (function (_super) {
|
|
436
414
|
__extends(TuiFocusVisibleService, _super);
|
|
437
415
|
function TuiFocusVisibleService(_a, changeDetectorRef, destroy$) {
|
|
438
416
|
var nativeElement = _a.nativeElement;
|
|
439
417
|
var _this = _super.call(this, function (subscriber) { return _this.focusVisible$.subscribe(subscriber); }) || this;
|
|
440
|
-
_this.focusVisible$ = observables.
|
|
418
|
+
_this.focusVisible$ = observables.tuiFocusVisibleObservable(nativeElement).pipe(observables.tuiWatch(changeDetectorRef), operators.takeUntil(destroy$));
|
|
441
419
|
return _this;
|
|
442
420
|
}
|
|
443
421
|
return TuiFocusVisibleService;
|
|
@@ -484,8 +462,6 @@
|
|
|
484
462
|
/**
|
|
485
463
|
* Service that subscribes to scroll events of all parent elements
|
|
486
464
|
*/
|
|
487
|
-
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
488
|
-
// @dynamic
|
|
489
465
|
var TuiParentsScrollService = /** @class */ (function (_super) {
|
|
490
466
|
__extends(TuiParentsScrollService, _super);
|
|
491
467
|
function TuiParentsScrollService(elementRef, windowRef) {
|
|
@@ -497,13 +473,13 @@
|
|
|
497
473
|
nativeElement = nativeElement.parentElement;
|
|
498
474
|
eventTargets.push(nativeElement);
|
|
499
475
|
}
|
|
500
|
-
return i1.merge.apply(void 0, __spreadArray([], __read(eventTargets.map(function (element) { return observables.
|
|
476
|
+
return i1.merge.apply(void 0, __spreadArray([], __read(eventTargets.map(function (element) { return observables.tuiTypedFromEvent(element, "scroll"); }))));
|
|
501
477
|
});
|
|
502
478
|
return _this;
|
|
503
479
|
}
|
|
504
480
|
return TuiParentsScrollService;
|
|
505
481
|
}(i1.Observable));
|
|
506
|
-
TuiParentsScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiParentsScrollService, deps: [{ token: i0.ElementRef }, { token: common
|
|
482
|
+
TuiParentsScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiParentsScrollService, deps: [{ token: i0.ElementRef }, { token: common.WINDOW }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
507
483
|
TuiParentsScrollService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiParentsScrollService });
|
|
508
484
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiParentsScrollService, decorators: [{
|
|
509
485
|
type: i0.Injectable
|
|
@@ -513,7 +489,7 @@
|
|
|
513
489
|
args: [i0.ElementRef]
|
|
514
490
|
}] }, { type: Window, decorators: [{
|
|
515
491
|
type: i0.Inject,
|
|
516
|
-
args: [common
|
|
492
|
+
args: [common.WINDOW]
|
|
517
493
|
}] }];
|
|
518
494
|
} });
|
|
519
495
|
|
|
@@ -523,8 +499,6 @@
|
|
|
523
499
|
* and polling with set interval, returns either null or an array
|
|
524
500
|
* of elements that overlap given element edges
|
|
525
501
|
*/
|
|
526
|
-
// Ambient type cannot be used without dynamic https://github.com/angular/angular/issues/23395
|
|
527
|
-
// @dynamic
|
|
528
502
|
var TuiObscuredService = /** @class */ (function (_super) {
|
|
529
503
|
__extends(TuiObscuredService, _super);
|
|
530
504
|
function TuiObscuredService(parentsScroll$, _a, ngZone, windowRef, destroy$, animationFrame$) {
|
|
@@ -532,12 +506,12 @@
|
|
|
532
506
|
var _this = _super.call(this, function (subscriber) { return _this.obscured$.subscribe(subscriber); }) || this;
|
|
533
507
|
_this.obscured$ = i1.merge(
|
|
534
508
|
// delay is added so it will not interfere with other listeners
|
|
535
|
-
i1.merge(parentsScroll$, i1.fromEvent(windowRef, "resize")).pipe(operators.delay(0)), animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME))).pipe(operators.map(function () { return dom.
|
|
509
|
+
i1.merge(parentsScroll$, i1.fromEvent(windowRef, "resize")).pipe(operators.delay(0)), animationFrame$.pipe(operators.throttleTime(constants.POLLING_TIME))).pipe(operators.map(function () { return dom.tuiGetElementObscures(nativeElement); }), operators.startWith(null), operators.distinctUntilChanged(), observables.tuiZoneOptimized(ngZone), operators.takeUntil(destroy$));
|
|
536
510
|
return _this;
|
|
537
511
|
}
|
|
538
512
|
return TuiObscuredService;
|
|
539
513
|
}(i1.Observable));
|
|
540
|
-
TuiObscuredService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiObscuredService, deps: [{ token: TuiParentsScrollService, self: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: common
|
|
514
|
+
TuiObscuredService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiObscuredService, deps: [{ token: TuiParentsScrollService, self: true }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: common.WINDOW }, { token: TuiDestroyService }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
541
515
|
TuiObscuredService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiObscuredService });
|
|
542
516
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiObscuredService, decorators: [{
|
|
543
517
|
type: i0.Injectable
|
|
@@ -555,26 +529,23 @@
|
|
|
555
529
|
args: [i0.NgZone]
|
|
556
530
|
}] }, { type: Window, decorators: [{
|
|
557
531
|
type: i0.Inject,
|
|
558
|
-
args: [common
|
|
532
|
+
args: [common.WINDOW]
|
|
559
533
|
}] }, { type: i1__namespace.Observable, decorators: [{
|
|
560
534
|
type: i0.Inject,
|
|
561
535
|
args: [TuiDestroyService]
|
|
562
536
|
}] }, { type: i1__namespace.Observable, decorators: [{
|
|
563
537
|
type: i0.Inject,
|
|
564
|
-
args: [common
|
|
538
|
+
args: [common.ANIMATION_FRAME]
|
|
565
539
|
}] }];
|
|
566
540
|
} });
|
|
567
541
|
|
|
568
|
-
/**
|
|
569
|
-
* @dynamic
|
|
570
|
-
*/
|
|
571
542
|
var TuiPanService = /** @class */ (function (_super) {
|
|
572
543
|
__extends(TuiPanService, _super);
|
|
573
544
|
function TuiPanService(_a, documentRef) {
|
|
574
545
|
var nativeElement = _a.nativeElement;
|
|
575
546
|
return _super.call(this, function (subscriber) {
|
|
576
|
-
i1.merge(observables.
|
|
577
|
-
.pipe(operators.switchMapTo(i1.merge(observables.
|
|
547
|
+
i1.merge(observables.tuiTypedFromEvent(nativeElement, "touchstart", { passive: true }), observables.tuiTypedFromEvent(nativeElement, "mousedown"))
|
|
548
|
+
.pipe(operators.switchMapTo(i1.merge(observables.tuiTypedFromEvent(documentRef, "touchmove", {
|
|
578
549
|
passive: true,
|
|
579
550
|
}).pipe(operators.filter(function (_a) {
|
|
580
551
|
var touches = _a.touches;
|
|
@@ -582,20 +553,20 @@
|
|
|
582
553
|
}), operators.map(function (_a) {
|
|
583
554
|
var touches = _a.touches;
|
|
584
555
|
return touches[0];
|
|
585
|
-
})), observables.
|
|
556
|
+
})), observables.tuiTypedFromEvent(documentRef, "mousemove"))), operators.pairwise(), operators.map(function (_a) {
|
|
586
557
|
var _b = __read(_a, 2), first = _b[0], second = _b[1];
|
|
587
558
|
var deltaX = second.clientX - first.clientX;
|
|
588
559
|
var deltaY = second.clientY - first.clientY;
|
|
589
560
|
return [deltaX, deltaY];
|
|
590
561
|
}),
|
|
591
562
|
// eslint-disable-next-line rxjs/no-unsafe-takeuntil
|
|
592
|
-
operators.takeUntil(i1.merge(observables.
|
|
563
|
+
operators.takeUntil(i1.merge(observables.tuiTypedFromEvent(documentRef, "touchend"), observables.tuiTypedFromEvent(documentRef, "mouseup"))), operators.repeat())
|
|
593
564
|
.subscribe(subscriber);
|
|
594
565
|
}) || this;
|
|
595
566
|
}
|
|
596
567
|
return TuiPanService;
|
|
597
568
|
}(i1.Observable));
|
|
598
|
-
TuiPanService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiPanService, deps: [{ token: i0.ElementRef }, { token: common.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
569
|
+
TuiPanService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiPanService, deps: [{ token: i0.ElementRef }, { token: common$1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
599
570
|
TuiPanService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiPanService });
|
|
600
571
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiPanService, decorators: [{
|
|
601
572
|
type: i0.Injectable
|
|
@@ -605,11 +576,10 @@
|
|
|
605
576
|
args: [i0.ElementRef]
|
|
606
577
|
}] }, { type: Document, decorators: [{
|
|
607
578
|
type: i0.Inject,
|
|
608
|
-
args: [common.DOCUMENT]
|
|
579
|
+
args: [common$1.DOCUMENT]
|
|
609
580
|
}] }];
|
|
610
581
|
} });
|
|
611
582
|
|
|
612
|
-
// @dynamic
|
|
613
583
|
var TuiResizeService = /** @class */ (function (_super) {
|
|
614
584
|
__extends(TuiResizeService, _super);
|
|
615
585
|
function TuiResizeService(elementRef, ngZone, destroy$, support, box, animationFrame$) {
|
|
@@ -618,7 +588,7 @@
|
|
|
618
588
|
}
|
|
619
589
|
return TuiResizeService;
|
|
620
590
|
}(resizeObserver.ResizeObserverService));
|
|
621
|
-
TuiResizeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiResizeService, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TuiDestroyService }, { token: resizeObserver.RESIZE_OBSERVER_SUPPORT }, { token: resizeObserver.RESIZE_OPTION_BOX }, { token: common
|
|
591
|
+
TuiResizeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiResizeService, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TuiDestroyService }, { token: resizeObserver.RESIZE_OBSERVER_SUPPORT }, { token: resizeObserver.RESIZE_OPTION_BOX }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
622
592
|
TuiResizeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiResizeService });
|
|
623
593
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiResizeService, decorators: [{
|
|
624
594
|
type: i0.Injectable
|
|
@@ -640,12 +610,11 @@
|
|
|
640
610
|
args: [resizeObserver.RESIZE_OPTION_BOX]
|
|
641
611
|
}] }, { type: i1__namespace.Observable, decorators: [{
|
|
642
612
|
type: i0.Inject,
|
|
643
|
-
args: [common
|
|
613
|
+
args: [common.ANIMATION_FRAME]
|
|
644
614
|
}] }];
|
|
645
615
|
} });
|
|
646
616
|
|
|
647
617
|
var SCROLL_TIME = 300;
|
|
648
|
-
// @dynamic
|
|
649
618
|
var TuiScrollService = /** @class */ (function () {
|
|
650
619
|
function TuiScrollService(performanceRef, animationFrame$) {
|
|
651
620
|
this.performanceRef = performanceRef;
|
|
@@ -664,7 +633,7 @@
|
|
|
664
633
|
var deltaLeft = scrollLeft - initialLeft;
|
|
665
634
|
var observable = !duration
|
|
666
635
|
? i1.of([scrollTop, scrollLeft])
|
|
667
|
-
: i1.defer(function () { return i1.of(_this.performanceRef.now()); }).pipe(operators.switchMap(function (start) { return _this.animationFrame$.pipe(operators.map(function (now) { return now - start; })); }), operators.map(function (elapsed) { return miscellaneous.
|
|
636
|
+
: i1.defer(function () { return i1.of(_this.performanceRef.now()); }).pipe(operators.switchMap(function (start) { return _this.animationFrame$.pipe(operators.map(function (now) { return now - start; })); }), operators.map(function (elapsed) { return miscellaneous.tuiEaseInOutQuad(math.tuiClamp(elapsed / duration, 0, 1)); }), operators.map(function (percent) { return [
|
|
668
637
|
initialTop + deltaTop * percent,
|
|
669
638
|
initialLeft + deltaLeft * percent,
|
|
670
639
|
]; }), operators.takeUntil(i1.timer(duration)));
|
|
@@ -676,7 +645,7 @@
|
|
|
676
645
|
};
|
|
677
646
|
return TuiScrollService;
|
|
678
647
|
}());
|
|
679
|
-
TuiScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiScrollService, deps: [{ token: common
|
|
648
|
+
TuiScrollService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiScrollService, deps: [{ token: common.PERFORMANCE }, { token: common.ANIMATION_FRAME }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
680
649
|
TuiScrollService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiScrollService, providedIn: "root" });
|
|
681
650
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiScrollService, decorators: [{
|
|
682
651
|
type: i0.Injectable,
|
|
@@ -686,10 +655,10 @@
|
|
|
686
655
|
}], ctorParameters: function () {
|
|
687
656
|
return [{ type: Performance, decorators: [{
|
|
688
657
|
type: i0.Inject,
|
|
689
|
-
args: [common
|
|
658
|
+
args: [common.PERFORMANCE]
|
|
690
659
|
}] }, { type: i1__namespace.Observable, decorators: [{
|
|
691
660
|
type: i0.Inject,
|
|
692
|
-
args: [common
|
|
661
|
+
args: [common.ANIMATION_FRAME]
|
|
693
662
|
}] }];
|
|
694
663
|
} });
|
|
695
664
|
|
|
@@ -737,16 +706,13 @@
|
|
|
737
706
|
}]
|
|
738
707
|
}] });
|
|
739
708
|
|
|
740
|
-
/**
|
|
741
|
-
* @dynamic
|
|
742
|
-
*/
|
|
743
709
|
var TuiSwipeService = /** @class */ (function (_super) {
|
|
744
710
|
__extends(TuiSwipeService, _super);
|
|
745
711
|
function TuiSwipeService(_a, _b, documentRef) {
|
|
746
712
|
var nativeElement = _a.nativeElement;
|
|
747
713
|
var timeout = _b.timeout, threshold = _b.threshold;
|
|
748
714
|
return _super.call(this, function (subscriber) {
|
|
749
|
-
i1.merge(observables.
|
|
715
|
+
i1.merge(observables.tuiTypedFromEvent(nativeElement, "touchstart", { passive: true }), observables.tuiTypedFromEvent(documentRef, "touchend"))
|
|
750
716
|
.pipe(operators.pairwise(), operators.filter(function (_a) {
|
|
751
717
|
var _b = __read(_a, 2), first = _b[0], second = _b[1];
|
|
752
718
|
return !!first.touches.length &&
|
|
@@ -765,18 +731,18 @@
|
|
|
765
731
|
Math.abs(distanceY) > threshold) &&
|
|
766
732
|
duration < timeout) {
|
|
767
733
|
return {
|
|
768
|
-
direction: miscellaneous.
|
|
734
|
+
direction: miscellaneous.tuiGetSwipeDirection(distanceX, distanceY),
|
|
769
735
|
events: [start, end],
|
|
770
736
|
};
|
|
771
737
|
}
|
|
772
738
|
return null;
|
|
773
|
-
}), operators.filter(miscellaneous.
|
|
739
|
+
}), operators.filter(miscellaneous.tuiIsPresent))
|
|
774
740
|
.subscribe(subscriber);
|
|
775
741
|
}) || this;
|
|
776
742
|
}
|
|
777
743
|
return TuiSwipeService;
|
|
778
744
|
}(i1.Observable));
|
|
779
|
-
TuiSwipeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiSwipeService, deps: [{ token: i0.ElementRef }, { token: tokens.TUI_SWIPE_OPTIONS }, { token: common.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
745
|
+
TuiSwipeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiSwipeService, deps: [{ token: i0.ElementRef }, { token: tokens.TUI_SWIPE_OPTIONS }, { token: common$1.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
780
746
|
TuiSwipeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiSwipeService });
|
|
781
747
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiSwipeService, decorators: [{
|
|
782
748
|
type: i0.Injectable
|
|
@@ -789,25 +755,24 @@
|
|
|
789
755
|
args: [tokens.TUI_SWIPE_OPTIONS]
|
|
790
756
|
}] }, { type: Document, decorators: [{
|
|
791
757
|
type: i0.Inject,
|
|
792
|
-
args: [common.DOCUMENT]
|
|
758
|
+
args: [common$1.DOCUMENT]
|
|
793
759
|
}] }];
|
|
794
760
|
} });
|
|
795
761
|
|
|
796
762
|
var TOUCH_SENSITIVITY = 0.01;
|
|
797
|
-
// @dynamic
|
|
798
763
|
var TuiZoomService = /** @class */ (function (_super) {
|
|
799
764
|
__extends(TuiZoomService, _super);
|
|
800
765
|
function TuiZoomService(_a, _b) {
|
|
801
766
|
var nativeElement = _a.nativeElement;
|
|
802
767
|
var wheelSensitivity = _b.wheelSensitivity;
|
|
803
768
|
return _super.call(this, function (subscriber) {
|
|
804
|
-
i1.merge(observables.
|
|
769
|
+
i1.merge(observables.tuiTypedFromEvent(nativeElement, "touchstart", { passive: true }).pipe(operators.filter(function (_a) {
|
|
805
770
|
var touches = _a.touches;
|
|
806
771
|
return touches.length > 1;
|
|
807
|
-
}), operators.switchMap(function (startEvent) { return observables.
|
|
772
|
+
}), operators.switchMap(function (startEvent) { return observables.tuiTypedFromEvent(nativeElement, "touchmove", {
|
|
808
773
|
passive: true,
|
|
809
|
-
}).pipe(observables.
|
|
810
|
-
var distance = utils.
|
|
774
|
+
}).pipe(observables.tuiPreventDefault(), operators.scan(function (prev, event) {
|
|
775
|
+
var distance = utils.tuiDistanceBetweenTouches(event);
|
|
811
776
|
return {
|
|
812
777
|
event: event,
|
|
813
778
|
distance: distance,
|
|
@@ -816,7 +781,7 @@
|
|
|
816
781
|
};
|
|
817
782
|
}, {
|
|
818
783
|
event: startEvent,
|
|
819
|
-
distance: utils.
|
|
784
|
+
distance: utils.tuiDistanceBetweenTouches(startEvent),
|
|
820
785
|
delta: 0,
|
|
821
786
|
}), operators.map(function (_a) {
|
|
822
787
|
var event = _a.event, delta = _a.delta;
|
|
@@ -827,7 +792,7 @@
|
|
|
827
792
|
event.touches[1].clientY) /
|
|
828
793
|
2;
|
|
829
794
|
return { clientX: clientX, clientY: clientY, delta: delta, event: event };
|
|
830
|
-
}), operators.takeUntil(observables.
|
|
795
|
+
}), operators.takeUntil(observables.tuiTypedFromEvent(nativeElement, "touchend"))); })), observables.tuiTypedFromEvent(nativeElement, "wheel", { passive: false }).pipe(observables.tuiPreventDefault(), operators.map(function (wheel) { return ({
|
|
831
796
|
clientX: wheel.clientX,
|
|
832
797
|
clientY: wheel.clientY,
|
|
833
798
|
delta: -wheel.deltaY * wheelSensitivity,
|