@taiga-ui/cdk 2.75.0 → 2.77.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 +1 -1
- package/bundles/taiga-ui-cdk-abstract.umd.js +46 -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.map +1 -1
- package/bundles/taiga-ui-cdk-classes.umd.min.js.map +1 -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 +47 -2
- 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 +50 -5
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +48 -3
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-portal-host.umd.js +46 -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 +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +47 -2
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +54 -2
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +49 -4
- 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 +47 -2
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js +52 -7
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-autofilled.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-checked.umd.js +52 -7
- 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 +49 -4
- 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-drag.umd.js +50 -5
- package/bundles/taiga-ui-cdk-directives-drag.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-drag.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js +51 -6
- package/bundles/taiga-ui-cdk-directives-droppable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-droppable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-element.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-element.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-trap.umd.js +51 -6
- 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-focus-visible.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focus-visible.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-focusable.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focusable.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-focused.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-focused.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for.umd.js +47 -2
- 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 +47 -2
- 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-hovered.umd.js +50 -5
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js +56 -11
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-input-mode.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-item.umd.js +47 -2
- 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-let.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-let.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-let.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.js +60 -15
- package/bundles/taiga-ui-cdk-directives-media.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-directives-media.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-obscured.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-obscured.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-overscroll.umd.js +57 -12
- 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-pan.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-pan.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pan.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-portal.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-portal.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js +47 -2
- package/bundles/taiga-ui-cdk-directives-pressed.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-pressed.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-prevent-default.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-repeat-times.umd.js +47 -2
- 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-resize.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-resize.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resize.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js +48 -3
- package/bundles/taiga-ui-cdk-directives-swipe.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-swipe.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-validator.umd.js +47 -2
- 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-zoom.umd.js +49 -4
- package/bundles/taiga-ui-cdk-directives-zoom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-zoom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js +46 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js +46 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js +46 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +46 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +46 -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 +47 -2
- 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-dom.umd.js +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +2 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.js +8 -8
- package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +2 -4
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.min.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +46 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.min.js.map +1 -1
- package/classes/assert.d.ts +1 -1
- package/classes/validation-error.d.ts +1 -1
- package/coercion/coerce-boolean-property.d.ts +1 -1
- package/constants/taiga-ui-cdk-constants.metadata.json +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/date-time/time.d.ts +1 -1
- package/date-time/year.d.ts +1 -1
- package/decorators/default-prop.d.ts +1 -1
- package/decorators/pure.d.ts +1 -1
- package/decorators/required-setter.d.ts +1 -1
- package/directives/active-zone/taiga-ui-cdk-directives-active-zone.metadata.json +1 -1
- package/directives/checked/checked.directive.d.ts +1 -1
- package/directives/for-async/for-async.directive.d.ts +1 -1
- package/directives/media/media.directive.d.ts +2 -2
- package/directives/media/taiga-ui-cdk-directives-media.metadata.json +1 -1
- package/enums/autocomplete.d.ts +1 -1
- package/esm2015/abstract/dialog.service.js +1 -1
- package/esm2015/classes/assert.js +1 -1
- package/esm2015/classes/validation-error.js +1 -1
- package/esm2015/coercion/coerce-boolean-property.js +1 -1
- package/esm2015/components/alert-host/alert-host.component.js +2 -2
- package/esm2015/components/dialog-host/dialog-host.component.js +5 -5
- package/esm2015/components/dropdown-host/dropdown-host.component.js +3 -3
- package/esm2015/constants/version.js +2 -2
- package/esm2015/date-time/day-range.js +1 -1
- package/esm2015/date-time/day.js +2 -2
- package/esm2015/date-time/time.js +1 -1
- package/esm2015/date-time/year.js +1 -1
- package/esm2015/decorators/default-prop.js +3 -1
- package/esm2015/decorators/pure.js +7 -2
- package/esm2015/decorators/required-setter.js +1 -1
- package/esm2015/directives/active-zone/active-zone.directive.js +4 -4
- package/esm2015/directives/auto-focus/autofocus.directive.js +2 -2
- package/esm2015/directives/autofilled/autofilled-style.component.js +2 -2
- package/esm2015/directives/autofilled/autofilled.directive.js +6 -6
- package/esm2015/directives/checked/checked.directive.js +7 -7
- package/esm2015/directives/copy-processor/copy-processor.directive.js +4 -4
- package/esm2015/directives/drag/drag.directive.js +5 -5
- package/esm2015/directives/droppable/droppable.directive.js +5 -5
- package/esm2015/directives/element/element.directive.js +3 -3
- package/esm2015/directives/focus-trap/focus-trap.directive.js +6 -6
- package/esm2015/directives/focus-visible/focus-visible.directive.js +3 -3
- package/esm2015/directives/focusable/focusable.directive.js +4 -4
- package/esm2015/directives/focused/focused.directive.js +3 -3
- package/esm2015/directives/for/for.directive.js +2 -2
- package/esm2015/directives/for-async/for-async.directive.js +2 -2
- package/esm2015/directives/high-dpi/high-dpi.directive.js +2 -2
- package/esm2015/directives/hovered/hovered.directive.js +5 -5
- package/esm2015/directives/input-mode/input-mode.directive.js +11 -11
- package/esm2015/directives/item/item.directive.js +2 -2
- package/esm2015/directives/let/let.directive.js +2 -2
- package/esm2015/directives/media/media.directive.js +18 -18
- package/esm2015/directives/obscured/obscured.directive.js +2 -2
- package/esm2015/directives/overscroll/overscroll.directive.js +12 -12
- package/esm2015/directives/pan/pan.directive.js +3 -3
- package/esm2015/directives/portal/portal.directive.js +2 -2
- package/esm2015/directives/pressed/pressed.directive.js +2 -2
- package/esm2015/directives/prevent-default/prevent-default.directive.js +4 -4
- package/esm2015/directives/repeat-times/repeat-times.directive.js +2 -2
- package/esm2015/directives/resize/resize.directive.js +3 -3
- package/esm2015/directives/swipe/swipe.directive.js +3 -3
- package/esm2015/directives/validator/validator.directive.js +2 -2
- package/esm2015/directives/zoom/zoom.directive.js +4 -4
- package/esm2015/enums/autocomplete.js +1 -1
- package/esm2015/interfaces/alert-context.js +1 -1
- package/esm2015/interfaces/swipe.js +1 -1
- package/esm2015/interfaces/zoom.js +1 -1
- package/esm2015/observables/must-be-present.js +1 -1
- package/esm2015/services/obscured.service.js +1 -1
- package/esm2015/tokens/active-element.js +2 -2
- package/esm2015/types/dialog.js +1 -1
- package/esm2015/types/event-with.js +1 -1
- package/esm2015/types/input-mode.js +1 -1
- package/esm2015/types/input-type.js +1 -1
- package/esm2015/types/overscroll-mode.js +1 -1
- package/esm2015/types/time-mode.js +1 -1
- package/esm2015/utils/dom/get-closest-element.js +1 -1
- package/esm2015/utils/dom/get-document-or-shadow-root.js +1 -1
- package/esm2015/utils/dom/get-element-obscurers.js +2 -2
- package/esm2015/utils/focus/get-native-focused.js +3 -2
- package/esm2015/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm2015/utils/math/clamp.js +4 -4
- package/esm2015/utils/math/in-range.js +4 -4
- package/esm2015/utils/math/normalize-to-int-number.js +2 -2
- package/esm2015/utils/math/round.js +2 -2
- package/esm2015/utils/math/to-int.js +1 -1
- package/esm2015/utils/miscellaneous/ease-in-out-quad.js +2 -2
- package/esm2015/utils/miscellaneous/get-swipe-direction.js +2 -4
- package/esm2015/utils/miscellaneous/uniq-by.js +1 -1
- package/esm5/abstract/dialog.service.js +1 -1
- package/esm5/classes/assert.js +1 -1
- package/esm5/classes/validation-error.js +1 -1
- package/esm5/coercion/coerce-boolean-property.js +1 -1
- package/esm5/components/alert-host/alert-host.component.js +2 -2
- package/esm5/components/dialog-host/dialog-host.component.js +5 -5
- package/esm5/components/dropdown-host/dropdown-host.component.js +3 -3
- package/esm5/constants/version.js +2 -2
- package/esm5/date-time/day-range.js +1 -1
- package/esm5/date-time/day.js +2 -2
- package/esm5/date-time/time.js +1 -1
- package/esm5/date-time/year.js +1 -1
- package/esm5/decorators/default-prop.js +3 -1
- package/esm5/decorators/pure.js +7 -2
- package/esm5/decorators/required-setter.js +1 -1
- package/esm5/directives/active-zone/active-zone.directive.js +4 -4
- package/esm5/directives/auto-focus/autofocus.directive.js +2 -2
- package/esm5/directives/autofilled/autofilled-style.component.js +2 -2
- package/esm5/directives/autofilled/autofilled.directive.js +6 -6
- package/esm5/directives/checked/checked.directive.js +7 -7
- package/esm5/directives/copy-processor/copy-processor.directive.js +4 -4
- package/esm5/directives/drag/drag.directive.js +5 -5
- package/esm5/directives/droppable/droppable.directive.js +6 -6
- package/esm5/directives/element/element.directive.js +3 -3
- package/esm5/directives/focus-trap/focus-trap.directive.js +6 -6
- package/esm5/directives/focus-visible/focus-visible.directive.js +3 -3
- package/esm5/directives/focusable/focusable.directive.js +4 -4
- package/esm5/directives/focused/focused.directive.js +3 -3
- package/esm5/directives/for/for.directive.js +2 -2
- package/esm5/directives/for-async/for-async.directive.js +2 -2
- package/esm5/directives/high-dpi/high-dpi.directive.js +2 -2
- package/esm5/directives/hovered/hovered.directive.js +5 -5
- package/esm5/directives/input-mode/input-mode.directive.js +11 -11
- package/esm5/directives/item/item.directive.js +2 -2
- package/esm5/directives/let/let.directive.js +2 -2
- package/esm5/directives/media/media.directive.js +15 -15
- package/esm5/directives/obscured/obscured.directive.js +2 -2
- package/esm5/directives/overscroll/overscroll.directive.js +12 -12
- package/esm5/directives/pan/pan.directive.js +3 -3
- package/esm5/directives/portal/portal.directive.js +2 -2
- package/esm5/directives/pressed/pressed.directive.js +2 -2
- package/esm5/directives/prevent-default/prevent-default.directive.js +4 -4
- package/esm5/directives/repeat-times/repeat-times.directive.js +2 -2
- package/esm5/directives/resize/resize.directive.js +3 -3
- package/esm5/directives/swipe/swipe.directive.js +3 -3
- package/esm5/directives/validator/validator.directive.js +2 -2
- package/esm5/directives/zoom/zoom.directive.js +4 -4
- package/esm5/enums/autocomplete.js +1 -1
- package/esm5/interfaces/alert-context.js +1 -1
- package/esm5/interfaces/swipe.js +1 -1
- package/esm5/interfaces/zoom.js +1 -1
- package/esm5/observables/must-be-present.js +1 -1
- package/esm5/services/obscured.service.js +1 -1
- package/esm5/tokens/active-element.js +2 -2
- package/esm5/types/dialog.js +1 -1
- package/esm5/types/event-with.js +1 -1
- package/esm5/types/input-mode.js +1 -1
- package/esm5/types/input-type.js +1 -1
- package/esm5/types/overscroll-mode.js +1 -1
- package/esm5/types/time-mode.js +1 -1
- package/esm5/utils/dom/get-closest-element.js +1 -1
- package/esm5/utils/dom/get-document-or-shadow-root.js +1 -1
- package/esm5/utils/dom/get-element-obscurers.js +2 -2
- package/esm5/utils/focus/get-native-focused.js +3 -2
- package/esm5/utils/focus/set-native-mouse-focused.js +1 -1
- package/esm5/utils/math/clamp.js +4 -4
- package/esm5/utils/math/in-range.js +4 -4
- package/esm5/utils/math/normalize-to-int-number.js +2 -2
- package/esm5/utils/math/round.js +2 -2
- package/esm5/utils/math/to-int.js +1 -1
- package/esm5/utils/miscellaneous/ease-in-out-quad.js +2 -2
- package/esm5/utils/miscellaneous/get-swipe-direction.js +2 -4
- package/esm5/utils/miscellaneous/uniq-by.js +1 -1
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-components-alert-host.js +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-dropdown-host.js +2 -2
- package/fesm2015/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-decorators.js +8 -1
- package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js +6 -6
- package/fesm2015/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-checked.js +6 -6
- package/fesm2015/taiga-ui-cdk-directives-checked.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-drag.js +4 -4
- package/fesm2015/taiga-ui-cdk-directives-drag.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-droppable.js +4 -4
- package/fesm2015/taiga-ui-cdk-directives-droppable.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-element.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-element.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js +5 -5
- package/fesm2015/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focus-visible.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-focus-visible.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-focusable.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-focusable.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-for-async.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for-async.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-for.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-hovered.js +4 -4
- package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-input-mode.js +10 -10
- package/fesm2015/taiga-ui-cdk-directives-input-mode.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-let.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-let.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-media.js +17 -17
- package/fesm2015/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-obscured.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-obscured.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js +11 -11
- package/fesm2015/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pan.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-pan.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-portal.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-portal.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pressed.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-pressed.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-resize.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-swipe.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-swipe.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-validator.js +1 -1
- package/fesm2015/taiga-ui-cdk-directives-validator.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-zoom.js +3 -3
- package/fesm2015/taiga-ui-cdk-directives-zoom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-enums.js.map +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 +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +2 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-math.js +8 -8
- package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +2 -4
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm5/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm5/taiga-ui-cdk-classes.js.map +1 -1
- package/fesm5/taiga-ui-cdk-coercion.js.map +1 -1
- package/fesm5/taiga-ui-cdk-components-alert-host.js +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-dropdown-host.js +2 -2
- package/fesm5/taiga-ui-cdk-components-dropdown-host.js.map +1 -1
- package/fesm5/taiga-ui-cdk-constants.js +1 -1
- package/fesm5/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js +1 -1
- package/fesm5/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm5/taiga-ui-cdk-decorators.js +8 -1
- package/fesm5/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-active-zone.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-active-zone.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-autofilled.js +6 -6
- package/fesm5/taiga-ui-cdk-directives-autofilled.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-checked.js +6 -6
- package/fesm5/taiga-ui-cdk-directives-checked.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-copy-processor.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-copy-processor.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-drag.js +4 -4
- package/fesm5/taiga-ui-cdk-directives-drag.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-droppable.js +5 -5
- package/fesm5/taiga-ui-cdk-directives-droppable.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-element.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-element.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focus-trap.js +5 -5
- package/fesm5/taiga-ui-cdk-directives-focus-trap.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focus-visible.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-focus-visible.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focusable.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-focusable.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-focused.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-focused.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-for-async.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-for.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-for.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-high-dpi.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-high-dpi.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-hovered.js +4 -4
- package/fesm5/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-input-mode.js +10 -10
- package/fesm5/taiga-ui-cdk-directives-input-mode.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-let.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-let.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-media.js +14 -14
- package/fesm5/taiga-ui-cdk-directives-media.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-obscured.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-obscured.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-overscroll.js +11 -11
- package/fesm5/taiga-ui-cdk-directives-overscroll.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-pan.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-pan.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-portal.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-portal.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-pressed.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-pressed.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-prevent-default.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-prevent-default.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-repeat-times.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-repeat-times.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-resize.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-resize.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-swipe.js +2 -2
- package/fesm5/taiga-ui-cdk-directives-swipe.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-validator.js +1 -1
- package/fesm5/taiga-ui-cdk-directives-validator.js.map +1 -1
- package/fesm5/taiga-ui-cdk-directives-zoom.js +3 -3
- package/fesm5/taiga-ui-cdk-directives-zoom.js.map +1 -1
- package/fesm5/taiga-ui-cdk-enums.js.map +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 +1 -1
- package/fesm5/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-dom.js +1 -1
- package/fesm5/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js +2 -1
- package/fesm5/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-math.js +8 -8
- package/fesm5/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm5/taiga-ui-cdk-utils-miscellaneous.js +2 -4
- package/fesm5/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/interfaces/alert-context.d.ts +1 -1
- package/interfaces/swipe.d.ts +1 -1
- package/interfaces/zoom.d.ts +1 -1
- package/observables/must-be-present.d.ts +1 -1
- package/package.json +1 -1
- package/schematics/constants/file-globs.js +2 -2
- package/schematics/ng-add/constants/modules.d.ts +4 -4
- package/schematics/ng-add/constants/modules.js +12 -12
- package/schematics/ng-add/constants/packages.js +1 -1
- package/schematics/ng-add/constants/versions.js +3 -3
- package/schematics/ng-add/index.js +7 -7
- package/schematics/ng-add/schema.d.ts +1 -1
- package/schematics/ng-add/steps/add-taiga-icons.js +4 -4
- package/schematics/ng-add/steps/add-taiga-modules.js +4 -4
- package/schematics/ng-add/steps/add-taiga-styles.js +3 -3
- package/schematics/ng-add/steps/wrap-with-tui-root.js +12 -12
- package/schematics/ng-update/constants/consts.js +57 -57
- package/schematics/ng-update/constants/deprecated-functions.js +426 -426
- package/schematics/ng-update/constants/enums.js +109 -109
- package/schematics/ng-update/constants/modules.js +3 -3
- package/schematics/ng-update/constants/services.d.ts +2 -2
- package/schematics/ng-update/constants/services.js +16 -16
- package/schematics/ng-update/constants/templates.d.ts +1 -1
- package/schematics/ng-update/constants/templates.js +123 -123
- package/schematics/ng-update/constants/tui-interactive-selectors.js +50 -50
- package/schematics/ng-update/constants/types.d.ts +1 -1
- package/schematics/ng-update/constants/types.js +87 -87
- package/schematics/ng-update/constants/warnings.js +56 -56
- package/schematics/ng-update/index.js +14 -14
- package/schematics/ng-update/steps/migrate-date-time.js +38 -38
- package/schematics/ng-update/steps/migrate-progress.js +11 -9
- package/schematics/ng-update/steps/migrate-sliders/index.js +2 -2
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-range.js +28 -26
- package/schematics/ng-update/steps/migrate-sliders/migrate-input-slider.js +28 -27
- package/schematics/ng-update/steps/migrate-templates.js +24 -21
- package/schematics/ng-update/steps/miscellaneous.js +10 -10
- package/schematics/ng-update/steps/remove-module.js +1 -1
- package/schematics/ng-update/steps/rename-types.js +5 -5
- package/schematics/ng-update/steps/replace-const.js +3 -3
- package/schematics/ng-update/steps/replace-deep-import.js +2 -2
- package/schematics/ng-update/steps/replace-enums.js +3 -3
- package/schematics/ng-update/steps/replace-functions.js +8 -8
- package/schematics/ng-update/steps/replace-services.js +4 -5
- package/schematics/ng-update/steps/show-warnings.js +2 -2
- package/schematics/utils/add-unique-import.js +1 -1
- package/schematics/utils/angular/ng-component.js +1 -1
- package/schematics/utils/angular/ng-module.js +1 -1
- package/schematics/utils/colored-log.js +5 -5
- package/schematics/utils/get-named-import-references.d.ts +1 -1
- package/schematics/utils/get-named-import-references.js +2 -2
- package/schematics/utils/get-project-target-options.d.ts +1 -1
- package/schematics/utils/get-project-target-options.js +1 -1
- package/schematics/utils/get-project.js +1 -1
- package/schematics/utils/progress.js +1 -1
- package/schematics/utils/templates/elements.js +3 -3
- package/schematics/utils/templates/get-component-templates.js +9 -11
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +5 -5
- package/schematics/utils/templates/ng-component-input-manipulations.js +8 -8
- package/schematics/utils/templates/template-resource.d.ts +1 -1
- package/schematics/utils/templates/template-resource.js +3 -3
- package/services/obscured.service.d.ts +1 -1
- package/types/dialog.d.ts +2 -2
- package/types/event-with.d.ts +2 -2
- package/types/input-mode.d.ts +1 -1
- package/types/input-type.d.ts +1 -1
- package/types/overscroll-mode.d.ts +1 -1
- package/types/time-mode.d.ts +1 -1
- package/utils/dom/taiga-ui-cdk-utils-dom.metadata.json +1 -1
- package/utils/focus/set-native-mouse-focused.d.ts +1 -1
- package/utils/math/to-int.d.ts +1 -1
- package/utils/miscellaneous/uniq-by.d.ts +1 -1
- package/schematics/ng-update/constants/functions.d.ts +0 -0
- package/schematics/ng-update/constants/functions.js +0 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
-
const
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
const colored_log_1 = require("../../utils/colored-log");
|
|
5
6
|
const elements_1 = require("../../utils/templates/elements");
|
|
7
|
+
const get_component_templates_1 = require("../../utils/templates/get-component-templates");
|
|
6
8
|
const template_resource_1 = require("../../utils/templates/template-resource");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const PROPERTY_FOR_DEPRECATED_PIPES =
|
|
9
|
+
exports.DEPRECATED_PROGRESS_PIPES_REG =
|
|
10
|
+
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
11
|
+
/\s*\|\s*tuiProgressColorSegments(Async\s*\|\s*async)?/gi;
|
|
12
|
+
const PROPERTY_FOR_DEPRECATED_PIPES = `[color]`;
|
|
11
13
|
function migrateProgress(fileSystem) {
|
|
12
14
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating progress bars...`);
|
|
13
15
|
const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
|
@@ -16,7 +18,7 @@ function migrateProgress(fileSystem) {
|
|
|
16
18
|
}
|
|
17
19
|
fileSystem.commitEdits();
|
|
18
20
|
ng_morph_1.saveActiveProject();
|
|
19
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree,
|
|
21
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, `/`, `**/**`));
|
|
20
22
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} progress bars migrated \n`);
|
|
21
23
|
}
|
|
22
24
|
exports.migrateProgress = migrateProgress;
|
|
@@ -28,8 +30,8 @@ function replaceProgressColorSegmentsPipe(templateResource, fileSystem) {
|
|
|
28
30
|
const recorder = fileSystem.edit(path);
|
|
29
31
|
const progressElements = elements_1.findElementsWithAttribute(template, PROPERTY_FOR_DEPRECATED_PIPES).filter(isProgressWithDeprecatedPipe);
|
|
30
32
|
for (const progressEl of progressElements) {
|
|
31
|
-
const oldValue = ((_a = progressEl.attrs.find(attr => attr.name === PROPERTY_FOR_DEPRECATED_PIPES)) === null || _a === void 0 ? void 0 : _a.value) ||
|
|
32
|
-
const newValue = oldValue.replace(exports.DEPRECATED_PROGRESS_PIPES_REG,
|
|
33
|
+
const oldValue = ((_a = progressEl.attrs.find(attr => attr.name === PROPERTY_FOR_DEPRECATED_PIPES)) === null || _a === void 0 ? void 0 : _a.value) || ``;
|
|
34
|
+
const newValue = oldValue.replace(exports.DEPRECATED_PROGRESS_PIPES_REG, ``);
|
|
33
35
|
const attrLocations = (_b = progressEl.sourceCodeLocation) === null || _b === void 0 ? void 0 : _b.attrs;
|
|
34
36
|
if (attrLocations) {
|
|
35
37
|
const { startOffset, endOffset } = attrLocations[PROPERTY_FOR_DEPRECATED_PIPES];
|
|
@@ -39,7 +41,7 @@ function replaceProgressColorSegmentsPipe(templateResource, fileSystem) {
|
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
function isProgressWithDeprecatedPipe(element) {
|
|
42
|
-
return (element.tagName ===
|
|
44
|
+
return (element.tagName === `progress` &&
|
|
43
45
|
element.attrs.some(attr => attr.name === PROPERTY_FOR_DEPRECATED_PIPES &&
|
|
44
46
|
attr.value.match(exports.DEPRECATED_PROGRESS_PIPES_REG)));
|
|
45
47
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const migrate_input_slider_1 = require("./migrate-input-slider");
|
|
4
|
-
const migrate_input_range_1 = require("./migrate-input-range");
|
|
5
3
|
const colored_log_1 = require("../../../utils/colored-log");
|
|
4
|
+
const migrate_input_range_1 = require("./migrate-input-range");
|
|
5
|
+
const migrate_input_slider_1 = require("./migrate-input-slider");
|
|
6
6
|
function migrateSliders(fileSystem) {
|
|
7
7
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating sliders...`);
|
|
8
8
|
colored_log_1.processLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.PROCESSING_SYMBOL}InputSlider...`);
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
|
4
|
-
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
|
5
3
|
const ng_morph_1 = require("ng-morph");
|
|
6
|
-
const ng_component_1 = require("../../../utils/angular/ng-component");
|
|
7
|
-
const add_unique_import_1 = require("../../../utils/add-unique-import");
|
|
8
4
|
const constants_1 = require("../../../constants");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
5
|
+
const add_unique_import_1 = require("../../../utils/add-unique-import");
|
|
6
|
+
const ng_component_1 = require("../../../utils/angular/ng-component");
|
|
7
|
+
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
|
8
|
+
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
|
9
|
+
const MIN_LABELS_MIGRATION_METHOD_NAME = `tuiMigrationInputRangeMinLabel`;
|
|
10
|
+
const MAX_LABELS_MIGRATION_METHOD_NAME = `tuiMigrationInputRangeMaxLabel`;
|
|
11
11
|
function migrateInputRange(fileSystem) {
|
|
12
12
|
const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13
14
|
const COMPONENTS_WITH_MIN_LABELS = new Set();
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14
16
|
const COMPONENTS_WITH_MAX_LABELS = new Set();
|
|
15
17
|
for (const templateResource of templateResources) {
|
|
16
18
|
replaceMinLabel(templateResource, fileSystem, COMPONENTS_WITH_MIN_LABELS);
|
|
@@ -19,20 +21,20 @@ function migrateInputRange(fileSystem) {
|
|
|
19
21
|
save(fileSystem);
|
|
20
22
|
for (const componentPath of Array.from(COMPONENTS_WITH_MIN_LABELS)) {
|
|
21
23
|
addMinMaxLabelMethod(componentPath, MIN_LABELS_MIGRATION_METHOD_NAME, [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
`const currentValue = context.$implicit;`,
|
|
25
|
+
`const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input-range`,
|
|
26
|
+
`const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label`,
|
|
27
|
+
`if (currentValue === minValue) return minLabelText;`,
|
|
28
|
+
`return String(currentValue);`,
|
|
27
29
|
]);
|
|
28
30
|
}
|
|
29
31
|
for (const componentPath of Array.from(COMPONENTS_WITH_MAX_LABELS)) {
|
|
30
32
|
addMinMaxLabelMethod(componentPath, MAX_LABELS_MIGRATION_METHOD_NAME, [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
`const currentValue = context.$implicit;`,
|
|
34
|
+
`const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input`,
|
|
35
|
+
`const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label`,
|
|
36
|
+
`if (currentValue === maxValue) return maxLabelText;`,
|
|
37
|
+
`return String(currentValue);`,
|
|
36
38
|
]);
|
|
37
39
|
}
|
|
38
40
|
}
|
|
@@ -41,9 +43,9 @@ function replaceMinLabel(templateResource, fileSystem, modifiedComponentStorage)
|
|
|
41
43
|
const wasModified = ng_component_input_manipulations_1.replaceInputProperty({
|
|
42
44
|
templateResource,
|
|
43
45
|
fileSystem,
|
|
44
|
-
componentSelector:
|
|
45
|
-
from:
|
|
46
|
-
to:
|
|
46
|
+
componentSelector: `tui-input-range`,
|
|
47
|
+
from: `minLabel`,
|
|
48
|
+
to: `[leftValueContent]`,
|
|
47
49
|
newValue: MIN_LABELS_MIGRATION_METHOD_NAME,
|
|
48
50
|
});
|
|
49
51
|
if (wasModified) {
|
|
@@ -54,9 +56,9 @@ function replaceMaxLabel(templateResource, fileSystem, modifiedComponentStorage)
|
|
|
54
56
|
const wasModified = ng_component_input_manipulations_1.replaceInputProperty({
|
|
55
57
|
templateResource,
|
|
56
58
|
fileSystem,
|
|
57
|
-
componentSelector:
|
|
58
|
-
from:
|
|
59
|
-
to:
|
|
59
|
+
componentSelector: `tui-input-range`,
|
|
60
|
+
from: `maxLabel`,
|
|
61
|
+
to: `[rightValueContent]`,
|
|
60
62
|
newValue: MAX_LABELS_MIGRATION_METHOD_NAME,
|
|
61
63
|
});
|
|
62
64
|
if (wasModified) {
|
|
@@ -66,11 +68,11 @@ function replaceMaxLabel(templateResource, fileSystem, modifiedComponentStorage)
|
|
|
66
68
|
function addMinMaxLabelMethod(componentPath, methodName, methodCode) {
|
|
67
69
|
const [ngComponent] = ng_component_1.getNgComponents(componentPath);
|
|
68
70
|
if (ngComponent) {
|
|
69
|
-
add_unique_import_1.addUniqueImport(ngComponent.getSourceFile().getFilePath(),
|
|
71
|
+
add_unique_import_1.addUniqueImport(ngComponent.getSourceFile().getFilePath(), `TuiContextWithImplicit`, `@taiga-ui/cdk`);
|
|
70
72
|
ng_morph_1.addMethods(ngComponent, {
|
|
71
73
|
name: methodName,
|
|
72
|
-
returnType:
|
|
73
|
-
parameters: [{ name:
|
|
74
|
+
returnType: `string`,
|
|
75
|
+
parameters: [{ name: `context`, type: `TuiContextWithImplicit<number>` }],
|
|
74
76
|
statements: methodCode,
|
|
75
77
|
});
|
|
76
78
|
}
|
|
@@ -82,5 +84,5 @@ function addMinMaxLabelMethod(componentPath, methodName, methodCode) {
|
|
|
82
84
|
function save(fileSystem) {
|
|
83
85
|
fileSystem.commitEdits();
|
|
84
86
|
ng_morph_1.saveActiveProject();
|
|
85
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree,
|
|
87
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, `/`, `**/**`));
|
|
86
88
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
-
const
|
|
5
|
-
const ng_component_1 = require("../../../utils/angular/ng-component");
|
|
4
|
+
const constants_1 = require("../../../constants");
|
|
6
5
|
const add_unique_import_1 = require("../../../utils/add-unique-import");
|
|
7
|
-
const
|
|
6
|
+
const ng_component_1 = require("../../../utils/angular/ng-component");
|
|
8
7
|
const elements_1 = require("../../../utils/templates/elements");
|
|
9
|
-
const
|
|
8
|
+
const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
|
|
9
|
+
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
|
10
10
|
function migrateInputSlider(fileSystem) {
|
|
11
11
|
const templateResources = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
13
|
const COMPONENTS_WITH_MIN_MAX_LABELS = new Set();
|
|
13
14
|
for (const templateResource of templateResources) {
|
|
14
15
|
replaceMinMaxLabels(templateResource, fileSystem, COMPONENTS_WITH_MIN_MAX_LABELS);
|
|
@@ -19,37 +20,37 @@ function migrateInputSlider(fileSystem) {
|
|
|
19
20
|
* */
|
|
20
21
|
fileSystem.commitEdits();
|
|
21
22
|
ng_morph_1.saveActiveProject();
|
|
22
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree,
|
|
23
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(fileSystem.tree, `/`, `**/**`));
|
|
23
24
|
for (const componentPath of Array.from(COMPONENTS_WITH_MIN_MAX_LABELS)) {
|
|
24
25
|
addMinMaxLabelMethod(componentPath);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
exports.migrateInputSlider = migrateInputSlider;
|
|
28
|
-
const MIN_MAX_LABELS_MIGRATION_METHOD_NAME =
|
|
29
|
+
const MIN_MAX_LABELS_MIGRATION_METHOD_NAME = `tuiMigrationMinMaxLabel`;
|
|
29
30
|
function replaceMinMaxLabels(templateResource, fileSystem, modifiedComponentStorage) {
|
|
30
31
|
const wasMaxLabelModified = ng_component_input_manipulations_1.replaceInputProperty({
|
|
31
32
|
templateResource,
|
|
32
33
|
fileSystem,
|
|
33
|
-
componentSelector:
|
|
34
|
-
from:
|
|
35
|
-
to:
|
|
34
|
+
componentSelector: `tui-input-slider`,
|
|
35
|
+
from: `maxLabel`,
|
|
36
|
+
to: `[valueContent]`,
|
|
36
37
|
newValue: MIN_MAX_LABELS_MIGRATION_METHOD_NAME,
|
|
37
38
|
});
|
|
38
39
|
const wasMinLabelModified = ng_component_input_manipulations_1.replaceInputProperty({
|
|
39
40
|
templateResource,
|
|
40
41
|
fileSystem,
|
|
41
|
-
componentSelector:
|
|
42
|
-
from:
|
|
43
|
-
to:
|
|
42
|
+
componentSelector: `tui-input-slider`,
|
|
43
|
+
from: `minLabel`,
|
|
44
|
+
to: `[valueContent]`,
|
|
44
45
|
newValue: MIN_MAX_LABELS_MIGRATION_METHOD_NAME,
|
|
45
|
-
filterFn: element => !elements_1.hasElementAttribute(element,
|
|
46
|
+
filterFn: element => !elements_1.hasElementAttribute(element, `maxLabel`),
|
|
46
47
|
});
|
|
47
48
|
ng_component_input_manipulations_1.removeInputProperty({
|
|
48
49
|
templateResource,
|
|
49
50
|
fileSystem,
|
|
50
|
-
componentSelector:
|
|
51
|
-
inputProperty:
|
|
52
|
-
filterFn: element => elements_1.hasElementAttribute(element,
|
|
51
|
+
componentSelector: `tui-input-slider`,
|
|
52
|
+
inputProperty: `minLabel`,
|
|
53
|
+
filterFn: element => elements_1.hasElementAttribute(element, `maxLabel`),
|
|
53
54
|
});
|
|
54
55
|
if (wasMaxLabelModified || wasMinLabelModified) {
|
|
55
56
|
modifiedComponentStorage.add(templateResource.componentPath);
|
|
@@ -58,20 +59,20 @@ function replaceMinMaxLabels(templateResource, fileSystem, modifiedComponentStor
|
|
|
58
59
|
function addMinMaxLabelMethod(componentPath) {
|
|
59
60
|
const [ngComponent] = ng_component_1.getNgComponents(componentPath);
|
|
60
61
|
if (ngComponent) {
|
|
61
|
-
add_unique_import_1.addUniqueImport(componentPath,
|
|
62
|
+
add_unique_import_1.addUniqueImport(componentPath, `TuiContextWithImplicit`, `@taiga-ui/cdk`);
|
|
62
63
|
ng_morph_1.addMethods(ngComponent, {
|
|
63
64
|
name: MIN_MAX_LABELS_MIGRATION_METHOD_NAME,
|
|
64
|
-
returnType:
|
|
65
|
-
parameters: [{ name:
|
|
65
|
+
returnType: `string`,
|
|
66
|
+
parameters: [{ name: `context`, type: `TuiContextWithImplicit<number>` }],
|
|
66
67
|
statements: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
`const currentValue = context.$implicit;`,
|
|
69
|
+
`const maxValue = 100; // TODO: (Taiga UI migration) replace with the MAX value of the input`,
|
|
70
|
+
`const maxLabelText = "Max"; // TODO: (Taiga UI migration) replace with the required label`,
|
|
71
|
+
`const minValue = 0; // TODO: (Taiga UI migration) replace with the MIN value of the input`,
|
|
72
|
+
`const minLabelText = "Min"; // TODO: (Taiga UI migration) replace with the required label`,
|
|
73
|
+
`if (currentValue === maxValue) return maxLabelText;`,
|
|
74
|
+
`if (currentValue === minValue) return minLabelText;`,
|
|
75
|
+
`return String(currentValue);`,
|
|
75
76
|
],
|
|
76
77
|
});
|
|
77
78
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const get_component_templates_1 = require("../../utils/templates/get-component-templates");
|
|
4
|
-
const templates_1 = require("../constants/templates");
|
|
5
|
-
const elements_1 = require("../../utils/templates/elements");
|
|
6
3
|
const ng_morph_1 = require("ng-morph");
|
|
7
|
-
const
|
|
8
|
-
const template_resource_1 = require("../../utils/templates/template-resource");
|
|
9
|
-
const ng_component_1 = require("../../utils/angular/ng-component");
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
10
5
|
const add_unique_import_1 = require("../../utils/add-unique-import");
|
|
6
|
+
const ng_component_1 = require("../../utils/angular/ng-component");
|
|
11
7
|
const colored_log_1 = require("../../utils/colored-log");
|
|
12
|
-
const constants_1 = require("../../constants");
|
|
13
8
|
const progress_1 = require("../../utils/progress");
|
|
9
|
+
const elements_1 = require("../../utils/templates/elements");
|
|
10
|
+
const get_component_templates_1 = require("../../utils/templates/get-component-templates");
|
|
11
|
+
const ng_component_input_manipulations_1 = require("../../utils/templates/ng-component-input-manipulations");
|
|
12
|
+
const template_resource_1 = require("../../utils/templates/template-resource");
|
|
13
|
+
const templates_1 = require("../constants/templates");
|
|
14
14
|
const START_TAG_OFFSET = 1;
|
|
15
15
|
const END_TAG_OFFSET = 2;
|
|
16
16
|
function migrateTemplates(fileSystem) {
|
|
@@ -98,10 +98,10 @@ function addHTMLCommentTags({ resource, recorder, fileSystem, }) {
|
|
|
98
98
|
function replaceBreadcrumbs({ resource, recorder, fileSystem, }) {
|
|
99
99
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
|
100
100
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
|
101
|
-
const elements = elements_1.findElementsByTagName(template,
|
|
101
|
+
const elements = elements_1.findElementsByTagName(template, `tui-breadcrumbs`);
|
|
102
102
|
elements.forEach(element => {
|
|
103
103
|
var _a, _b, _c;
|
|
104
|
-
const itemsAttr = element.attrs.find(attr => attr.name ===
|
|
104
|
+
const itemsAttr = element.attrs.find(attr => attr.name === `[items]`);
|
|
105
105
|
const itemsValue = itemsAttr === null || itemsAttr === void 0 ? void 0 : itemsAttr.value;
|
|
106
106
|
const insertTo = (_a = element === null || element === void 0 ? void 0 : element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.startTag.endOffset;
|
|
107
107
|
if (!itemsValue || !insertTo) {
|
|
@@ -117,24 +117,26 @@ function replaceBreadcrumbs({ resource, recorder, fileSystem, }) {
|
|
|
117
117
|
{{ item.caption }}
|
|
118
118
|
</a>
|
|
119
119
|
</ng-container>`);
|
|
120
|
-
const { startOffset = 0, endOffset = 0 } = ((_c = (_b = element.sourceCodeLocation) === null || _b === void 0 ? void 0 : _b.attrs) === null || _c === void 0 ? void 0 : _c[
|
|
120
|
+
const { startOffset = 0, endOffset = 0 } = ((_c = (_b = element.sourceCodeLocation) === null || _b === void 0 ? void 0 : _b.attrs) === null || _c === void 0 ? void 0 : _c[`[items]`]) || {};
|
|
121
121
|
recorder.remove(templateOffset + startOffset - 1, endOffset - startOffset + 1);
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
function replaceFieldError({ resource, recorder, fileSystem, }) {
|
|
125
125
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
|
126
126
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
|
127
|
-
const elements = elements_1.findElementsByTagName(template,
|
|
127
|
+
const elements = elements_1.findElementsByTagName(template, `tui-field-error`);
|
|
128
128
|
elements.forEach(element => {
|
|
129
129
|
var _a, _b;
|
|
130
|
-
const orderAttr = element.attrs.find(attr => attr.name ===
|
|
130
|
+
const orderAttr = element.attrs.find(attr => attr.name === `[order]`);
|
|
131
131
|
const orderVal = orderAttr === null || orderAttr === void 0 ? void 0 : orderAttr.value;
|
|
132
132
|
if (orderAttr) {
|
|
133
|
-
const { startOffset = 0, endOffset = 0 } = ((_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[
|
|
133
|
+
const { startOffset = 0, endOffset = 0 } = ((_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[`[order]`]) || {};
|
|
134
134
|
recorder.remove(templateOffset + startOffset - 1, endOffset - startOffset + 1);
|
|
135
135
|
}
|
|
136
|
-
const input = `[error]="${orderVal !== null && orderVal !== void 0 ? orderVal :
|
|
137
|
-
replaceTag(recorder,
|
|
136
|
+
const input = `[error]="${orderVal !== null && orderVal !== void 0 ? orderVal : `[]`} | tuiFieldError | async"`;
|
|
137
|
+
replaceTag(recorder,
|
|
138
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
139
|
+
element.sourceCodeLocation, `tui-field-error`, `tui-error`, templateOffset, [input]);
|
|
138
140
|
});
|
|
139
141
|
}
|
|
140
142
|
function replaceTag(recorder, sourceCodeLocation, from, to, templateOffset = 0, addAttributes = []) {
|
|
@@ -146,11 +148,11 @@ function replaceTag(recorder, sourceCodeLocation, from, to, templateOffset = 0,
|
|
|
146
148
|
recorder.insertRight(endTagOffset + templateOffset + END_TAG_OFFSET, to);
|
|
147
149
|
}
|
|
148
150
|
recorder.remove(startTagOffset + templateOffset + START_TAG_OFFSET, from.length);
|
|
149
|
-
recorder.insertRight(startTagOffset + templateOffset + START_TAG_OFFSET, `${to} ${addAttributes.join(
|
|
151
|
+
recorder.insertRight(startTagOffset + templateOffset + START_TAG_OFFSET, `${to} ${addAttributes.join(` `)}`);
|
|
150
152
|
}
|
|
151
153
|
function addEditorProviders({ resource, fileSystem, }) {
|
|
152
154
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
|
153
|
-
const elements = elements_1.findElementsByTagName(template,
|
|
155
|
+
const elements = elements_1.findElementsByTagName(template, `tui-editor`).filter(element => !elements_1.hasElementAttribute(element, `new`));
|
|
154
156
|
if (elements.length) {
|
|
155
157
|
const componentPath = resource.componentPath;
|
|
156
158
|
const componentClass = ng_component_1.getNgComponents(componentPath);
|
|
@@ -158,10 +160,11 @@ function addEditorProviders({ resource, fileSystem, }) {
|
|
|
158
160
|
provide: TUI_EDITOR_EXTENSIONS,
|
|
159
161
|
useValue: defaultEditorExtensions
|
|
160
162
|
}`, { unique: true });
|
|
161
|
-
add_unique_import_1.addUniqueImport(componentPath,
|
|
162
|
-
add_unique_import_1.addUniqueImport(componentPath,
|
|
163
|
+
add_unique_import_1.addUniqueImport(componentPath, `TUI_EDITOR_EXTENSIONS`, `@taiga-ui/addon-editor`);
|
|
164
|
+
add_unique_import_1.addUniqueImport(componentPath, `defaultEditorExtensions`, `@taiga-ui/addon-editor`);
|
|
163
165
|
}
|
|
164
166
|
}
|
|
167
|
+
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
165
168
|
const HIDE_SELECTED_PIPE_WITH_ARGS_REG = /\|\s*tuiHideSelected(\s*:\s*[^|'"]*)?/gi;
|
|
166
169
|
function migrateTuiHideSelectedPipe({ resource, fileSystem, recorder, }) {
|
|
167
170
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
|
@@ -175,9 +178,9 @@ function migrateTuiHideSelectedPipe({ resource, fileSystem, recorder, }) {
|
|
|
175
178
|
if (!name || !oldValue || !attrLocations) {
|
|
176
179
|
return;
|
|
177
180
|
}
|
|
178
|
-
const newValue = oldValue.replace(HIDE_SELECTED_PIPE_WITH_ARGS_REG,
|
|
181
|
+
const newValue = oldValue.replace(HIDE_SELECTED_PIPE_WITH_ARGS_REG, `| tuiHideSelected`);
|
|
179
182
|
const { startOffset } = attrLocations[name];
|
|
180
|
-
const valueOffset = templateOffset + startOffset + name.length +
|
|
183
|
+
const valueOffset = templateOffset + startOffset + name.length + `="`.length;
|
|
181
184
|
recorder.remove(valueOffset, oldValue.length);
|
|
182
185
|
recorder.insertRight(valueOffset, newValue);
|
|
183
186
|
});
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
4
3
|
const ng_morph_1 = require("ng-morph");
|
|
5
|
-
const insert_todo_1 = require("../../utils/insert-todo");
|
|
6
4
|
const colored_log_1 = require("../../utils/colored-log");
|
|
5
|
+
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
6
|
+
const insert_todo_1 = require("../../utils/insert-todo");
|
|
7
7
|
function miscellaneousMigrations() {
|
|
8
8
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} miscellaneous migrating...`);
|
|
9
9
|
replaceEnumProperty({
|
|
10
|
-
enumName:
|
|
11
|
-
from:
|
|
12
|
-
to:
|
|
10
|
+
enumName: `TuiCurrency`,
|
|
11
|
+
from: `HongKong_dollar`,
|
|
12
|
+
to: `HongKongDollar`,
|
|
13
13
|
});
|
|
14
14
|
replaceEnumProperty({
|
|
15
|
-
enumName:
|
|
16
|
-
from:
|
|
17
|
-
to:
|
|
15
|
+
enumName: `TuiCurrencyCode`,
|
|
16
|
+
from: `HongKong_dollar`,
|
|
17
|
+
to: `HongKongDollar`,
|
|
18
18
|
});
|
|
19
|
-
addWarningToMethod(
|
|
19
|
+
addWarningToMethod(`TuiDirectiveStylesService`, `addStyle`, `addStyle method has been removed. Use components approach`);
|
|
20
20
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} miscellaneous migrated \n`);
|
|
21
21
|
}
|
|
22
22
|
exports.miscellaneousMigrations = miscellaneousMigrations;
|
|
@@ -49,7 +49,7 @@ function checkMethod(node, method, message) {
|
|
|
49
49
|
identifier.findReferencesAsNodes().forEach(ref => {
|
|
50
50
|
let parent = ref.getParent();
|
|
51
51
|
if ((ng_morph_1.Node.isPropertyAccessExpression(parent) &&
|
|
52
|
-
parent.getText().startsWith(
|
|
52
|
+
parent.getText().startsWith(`this.`)) ||
|
|
53
53
|
ng_morph_1.Node.isCallExpression(parent)) {
|
|
54
54
|
parent = parent.getParentIfKind(ng_morph_1.SyntaxKind.PropertyAccessExpression);
|
|
55
55
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
+
const colored_log_1 = require("../../utils/colored-log");
|
|
4
5
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
5
6
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
6
7
|
const modules_1 = require("../constants/modules");
|
|
7
|
-
const colored_log_1 = require("../../utils/colored-log");
|
|
8
8
|
function removeModules() {
|
|
9
9
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} removing modules...`);
|
|
10
10
|
modules_1.REMOVED_MODULES.forEach(({ name, moduleSpecifier }) => removeModule(name, moduleSpecifier));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
+
const colored_log_1 = require("../../utils/colored-log");
|
|
4
5
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
5
|
-
const types_1 = require("../constants/types");
|
|
6
6
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
7
|
-
const
|
|
7
|
+
const types_1 = require("../constants/types");
|
|
8
8
|
function renameTypes() {
|
|
9
9
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming types...`);
|
|
10
10
|
types_1.TYPES_TO_RENAME.forEach(({ from, to, moduleSpecifier, preserveGenerics }) => renameType(from, to, moduleSpecifier, preserveGenerics));
|
|
@@ -20,7 +20,7 @@ function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
|
|
|
20
20
|
}
|
|
21
21
|
else if (ng_morph_1.Node.isTypeReferenceNode(parent)) {
|
|
22
22
|
const targetType = preserveGenerics && to ? addGeneric(to, parent.getTypeArguments()) : to;
|
|
23
|
-
parent.replaceWithText(targetType ||
|
|
23
|
+
parent.replaceWithText(targetType || `any`);
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
}
|
|
@@ -35,10 +35,10 @@ function processImport(node, from, to) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
function removeGeneric(type) {
|
|
38
|
-
return type.replace(/<.*>$/gi,
|
|
38
|
+
return type.replace(/<.*>$/gi, ``);
|
|
39
39
|
}
|
|
40
40
|
function addGeneric(typeName, generics) {
|
|
41
41
|
const typeArgs = generics.map(t => t.getType().getText());
|
|
42
|
-
const genericType = typeArgs.length ? `<${typeArgs.join(
|
|
42
|
+
const genericType = typeArgs.length ? `<${typeArgs.join(`, `)}>` : ``;
|
|
43
43
|
return typeName + genericType;
|
|
44
44
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
4
3
|
const ng_morph_1 = require("ng-morph");
|
|
5
|
-
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
6
4
|
const add_unique_import_1 = require("../../utils/add-unique-import");
|
|
7
|
-
const consts_1 = require("../constants/consts");
|
|
8
5
|
const colored_log_1 = require("../../utils/colored-log");
|
|
6
|
+
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
7
|
+
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
8
|
+
const consts_1 = require("../constants/consts");
|
|
9
9
|
function replaceConstants() {
|
|
10
10
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing constants...`);
|
|
11
11
|
consts_1.CONSTS_TO_REPLACE.forEach(constToReplace => replaceConst(constToReplace));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
-
const colored_log_1 = require("../../utils/colored-log");
|
|
5
4
|
const constants_1 = require("../../constants");
|
|
5
|
+
const colored_log_1 = require("../../utils/colored-log");
|
|
6
6
|
const DEEP_REGEX = /(@taiga-ui\/\w+)\/.*/;
|
|
7
7
|
function replaceDeepImports() {
|
|
8
8
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing deep imports...`);
|
|
9
9
|
const deepImports = ng_morph_1.getImports(constants_1.ALL_TS_FILES).filter(imp => DEEP_REGEX.test(imp.getModuleSpecifier().getLiteralValue()));
|
|
10
10
|
ng_morph_1.editImports(deepImports, deepImport => {
|
|
11
|
-
const specifier = deepImport.moduleSpecifier.replace(DEEP_REGEX,
|
|
11
|
+
const specifier = deepImport.moduleSpecifier.replace(DEEP_REGEX, `$1`);
|
|
12
12
|
return { moduleSpecifier: specifier };
|
|
13
13
|
});
|
|
14
14
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} deep imports replaced \n`);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
+
const colored_log_1 = require("../../utils/colored-log");
|
|
4
5
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
5
|
-
const enums_1 = require("../constants/enums");
|
|
6
6
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
7
|
-
const
|
|
7
|
+
const enums_1 = require("../constants/enums");
|
|
8
8
|
function replaceEnums() {
|
|
9
9
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing enums imports...`);
|
|
10
10
|
enums_1.ENUMS_TO_REPLACE.forEach(({ name, replaceValues, keepAsType }) => replaceEnumWithString(name, replaceValues, keepAsType));
|
|
@@ -14,7 +14,7 @@ exports.replaceEnums = replaceEnums;
|
|
|
14
14
|
function replaceEnumWithString(enumName, replaceValues, keepAsType = true) {
|
|
15
15
|
var _a;
|
|
16
16
|
const references = get_named_import_references_1.getNamedImportReferences(enumName);
|
|
17
|
-
for (
|
|
17
|
+
for (const ref of references) {
|
|
18
18
|
const parent = ref.getParent();
|
|
19
19
|
if (ng_morph_1.Node.isImportSpecifier(parent) && !(keepAsType && containTypeRef(parent))) {
|
|
20
20
|
import_manipulations_1.removeImport(parent);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
4
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
+
const colored_log_1 = require("../../utils/colored-log");
|
|
5
|
+
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
5
6
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
6
7
|
const deprecated_functions_1 = require("../constants/deprecated-functions");
|
|
7
|
-
const colored_log_1 = require("../../utils/colored-log");
|
|
8
8
|
function replaceFunctions() {
|
|
9
9
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} functions replacing...`);
|
|
10
|
-
replacePadStart(get_named_import_references_1.getNamedImportReferences(
|
|
11
|
-
replaceFallbackValue(get_named_import_references_1.getNamedImportReferences(
|
|
12
|
-
replaceCustomEvent(get_named_import_references_1.getNamedImportReferences(
|
|
13
|
-
replaceClosestElement(get_named_import_references_1.getNamedImportReferences(
|
|
10
|
+
replacePadStart(get_named_import_references_1.getNamedImportReferences(`padStart`, `@taiga-ui/cdk`));
|
|
11
|
+
replaceFallbackValue(get_named_import_references_1.getNamedImportReferences(`fallbackValue`, `@taiga-ui/cdk`));
|
|
12
|
+
replaceCustomEvent(get_named_import_references_1.getNamedImportReferences(`tuiCustomEvent`, `@taiga-ui/cdk`));
|
|
13
|
+
replaceClosestElement(get_named_import_references_1.getNamedImportReferences(`getClosestElement`, `@taiga-ui/cdk`));
|
|
14
14
|
replaceDeprecatedFunction();
|
|
15
15
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} functions replaced \n`);
|
|
16
16
|
}
|
|
@@ -34,7 +34,7 @@ function replacePadStart(references) {
|
|
|
34
34
|
}
|
|
35
35
|
else if (ng_morph_1.Node.isCallExpression(parent)) {
|
|
36
36
|
const [targetString, length, pad] = parent.getArguments();
|
|
37
|
-
parent.replaceWithText(`${targetString.getText()}.padStart(${length.getText()}, ${(_a = pad === null || pad === void 0 ? void 0 : pad.getText()) !== null && _a !== void 0 ? _a :
|
|
37
|
+
parent.replaceWithText(`${targetString.getText()}.padStart(${length.getText()}, ${(_a = pad === null || pad === void 0 ? void 0 : pad.getText()) !== null && _a !== void 0 ? _a : `" "`})`);
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
}
|
|
@@ -47,7 +47,7 @@ function replaceClosestElement(references) {
|
|
|
47
47
|
else if (ng_morph_1.Node.isCallExpression(parent)) {
|
|
48
48
|
const [firstArg, secondArg] = parent.getArguments();
|
|
49
49
|
const firstArgText = firstArg.getText();
|
|
50
|
-
const element = firstArgText.includes(
|
|
50
|
+
const element = firstArgText.includes(` as `) // e.g, `getClosestElement(el as Element, ...)`
|
|
51
51
|
? `(${firstArgText})`
|
|
52
52
|
: firstArgText;
|
|
53
53
|
parent.replaceWithText(`${element}.closest(${secondArg.getText()})`);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const services_1 = require("../constants/services");
|
|
4
|
-
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
5
3
|
const ng_morph_1 = require("ng-morph");
|
|
6
|
-
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
7
4
|
const add_unique_import_1 = require("../../utils/add-unique-import");
|
|
8
5
|
const colored_log_1 = require("../../utils/colored-log");
|
|
6
|
+
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
|
7
|
+
const import_manipulations_1 = require("../../utils/import-manipulations");
|
|
8
|
+
const services_1 = require("../constants/services");
|
|
9
9
|
function replaceServices() {
|
|
10
10
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing services...`);
|
|
11
11
|
services_1.SERVICES_TO_REPLACE.forEach(service => replaceService(service));
|
|
@@ -34,13 +34,12 @@ function replaceProperties(parent, replaceProperties) {
|
|
|
34
34
|
identifier.findReferencesAsNodes().forEach(ref => {
|
|
35
35
|
let parent = ref.getParent();
|
|
36
36
|
if ((ng_morph_1.Node.isPropertyAccessExpression(parent) &&
|
|
37
|
-
parent.getText().startsWith(
|
|
37
|
+
parent.getText().startsWith(`this.`)) ||
|
|
38
38
|
ng_morph_1.Node.isCallExpression(parent)) {
|
|
39
39
|
parent = parent.getParentIfKind(ng_morph_1.SyntaxKind.PropertyAccessExpression);
|
|
40
40
|
}
|
|
41
41
|
if (ng_morph_1.Node.isPropertyAccessExpression(parent)) {
|
|
42
42
|
replaceProperty(parent, replaceProperties);
|
|
43
|
-
return;
|
|
44
43
|
}
|
|
45
44
|
});
|
|
46
45
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ng_morph_1 = require("ng-morph");
|
|
4
|
-
const warnings_1 = require("../constants/warnings");
|
|
5
4
|
const constants_1 = require("../../constants");
|
|
5
|
+
const warnings_1 = require("../constants/warnings");
|
|
6
6
|
function showWarnings(context) {
|
|
7
7
|
warnings_1.MIGRATION_WARNINGS.forEach(warning => showWarning(warning, context));
|
|
8
8
|
}
|
|
9
9
|
exports.showWarnings = showWarnings;
|
|
10
|
-
function showWarning({ name, message, moduleSpecifier =
|
|
10
|
+
function showWarning({ name, message, moduleSpecifier = `**/**` }, { logger }) {
|
|
11
11
|
const references = ng_morph_1.getImports(constants_1.ALL_TS_FILES, {
|
|
12
12
|
moduleSpecifier,
|
|
13
13
|
namedImports: [name],
|