@taiga-ui/cdk 3.60.0 → 3.61.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/bundles/taiga-ui-cdk-abstract.umd.js +971 -1117
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.js +1 -1
- package/bundles/taiga-ui-cdk-coercion.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +505 -651
- package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js +404 -550
- package/bundles/taiga-ui-cdk-components-dropdown-host.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-components-scroll-controls.umd.js +590 -736
- package/bundles/taiga-ui-cdk-components-scroll-controls.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +80 -80
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-date-time.umd.js +33 -179
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +10 -156
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js +434 -580
- package/bundles/taiga-ui-cdk-directives-active-zone.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +706 -852
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js +426 -572
- package/bundles/taiga-ui-cdk-directives-for-async.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +410 -556
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-resizer.umd.js +482 -628
- package/bundles/taiga-ui-cdk-directives-resizer.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js +426 -572
- package/bundles/taiga-ui-cdk-exceptions.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +9 -9
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js +373 -519
- package/bundles/taiga-ui-cdk-pipes-filter.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-is-present.umd.js +1 -1
- package/bundles/taiga-ui-cdk-pipes-is-present.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js +1 -1
- package/bundles/taiga-ui-cdk-pipes-keys.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js +373 -519
- package/bundles/taiga-ui-cdk-pipes-mapper.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-pipes-replace.umd.js +2 -2
- package/bundles/taiga-ui-cdk-pipes-replace.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +841 -984
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +650 -796
- package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-browser.umd.js +8 -8
- package/bundles/taiga-ui-cdk-utils-browser.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-color.umd.js +26 -172
- package/bundles/taiga-ui-cdk-utils-color.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-dom.umd.js +11 -11
- package/bundles/taiga-ui-cdk-utils-dom.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-focus.umd.js +19 -19
- package/bundles/taiga-ui-cdk-utils-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-format.umd.js +1 -1
- package/bundles/taiga-ui-cdk-utils-format.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-math.umd.js +7 -7
- package/bundles/taiga-ui-cdk-utils-math.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js +21 -167
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.js +1 -1
- package/bundles/taiga-ui-cdk-utils-os.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-svg.umd.js +11 -11
- package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/esm2015/abstract/control.js +4 -4
- package/esm2015/abstract/interactive.js +7 -7
- package/esm2015/abstract/portal-host.js +2 -2
- package/esm2015/abstract/theme-switcher.js +2 -2
- package/esm2015/coercion/coerce-boolean-property.js +2 -2
- package/esm2015/components/dropdown-host/dropdown-portal.service.js +3 -3
- package/esm2015/constants/parent-animation.js +4 -4
- package/esm2015/constants/svg-node-filter.js +2 -2
- package/esm2015/constants/unicode-chars.js +13 -13
- package/esm2015/constants/used-icons.js +64 -64
- package/esm2015/constants/version.js +2 -2
- package/esm2015/date-time/date-format.js +2 -2
- package/esm2015/date-time/date-separator.js +2 -2
- package/esm2015/date-time/day-range.js +3 -3
- package/esm2015/date-time/day.js +14 -14
- package/esm2015/date-time/month.js +2 -2
- package/esm2015/date-time/time.js +7 -7
- package/esm2015/date-time/year.js +2 -2
- package/esm2015/decorators/pure.js +5 -5
- package/esm2015/directives/auto-focus/autofocus.options.js +2 -2
- package/esm2015/directives/auto-focus/handlers/abstract.handler.js +2 -2
- package/esm2015/directives/auto-focus/handlers/default.handler.js +2 -2
- package/esm2015/directives/auto-focus/handlers/ios.handler.js +28 -28
- package/esm2015/directives/hovered/hovered.service.js +3 -3
- package/esm2015/exceptions/computed-document.exception.js +2 -2
- package/esm2015/exceptions/document-selection.exception.js +2 -2
- package/esm2015/exceptions/invalid-day.exception.js +2 -2
- package/esm2015/exceptions/invalid-month.exception.js +2 -2
- package/esm2015/exceptions/invalid-year.exception.js +2 -2
- package/esm2015/exceptions/no-host.exception.js +2 -2
- package/esm2015/exceptions/owner-document.exception.js +2 -2
- package/esm2015/exceptions/pure.exception.js +2 -2
- package/esm2015/exceptions/table-sort-key.exception.js +2 -2
- package/esm2015/exceptions/ts-parser.exception.js +2 -2
- package/esm2015/exceptions/value-changes.exception.js +2 -2
- package/esm2015/exceptions/value-present.exception.js +2 -2
- package/esm2015/exceptions/xml-parsing.exception.js +2 -2
- package/esm2015/observables/drag-and-drop-from.js +2 -2
- package/esm2015/observables/focus-visible-observable.js +5 -5
- package/esm2015/observables/is-observed.js +2 -2
- package/esm2015/observables/mouse-drag-finish-from.js +2 -2
- package/esm2015/observables/pressed-observable.js +2 -2
- package/esm2015/observables/scroll-from.js +2 -2
- package/esm2015/pipes/filter/filter.pipe.js +2 -2
- package/esm2015/pipes/is-present/is-present.pipe.js +2 -2
- package/esm2015/pipes/keys/keys.pipe.js +2 -2
- package/esm2015/pipes/mapper/mapper.pipe.js +2 -2
- package/esm2015/pipes/replace/replace.pipe.js +3 -3
- package/esm2015/services/directive-styles.service.js +6 -3
- package/esm2015/services/id.service.js +4 -4
- package/esm2015/services/obscured.service.js +2 -2
- package/esm2015/services/pan.service.js +5 -5
- package/esm2015/services/parents-scroll.service.js +2 -2
- package/esm2015/services/scroll.service.js +8 -8
- package/esm2015/services/static-request.service.js +4 -4
- package/esm2015/services/swipe.service.js +2 -2
- package/esm2015/services/zoom.service.js +3 -3
- package/esm2015/tokens/active-element.js +9 -9
- package/esm2015/tokens/base-href.js +2 -2
- package/esm2015/tokens/ensure-base-href.js +4 -4
- package/esm2015/tokens/focusable-item-accessor.js +2 -2
- package/esm2015/tokens/fonts-ready.js +2 -2
- package/esm2015/tokens/is-firefox.js +2 -2
- package/esm2015/tokens/is-stackblitz.js +2 -2
- package/esm2015/tokens/platform.js +5 -5
- package/esm2015/tokens/touch-supported.js +2 -2
- package/esm2015/tokens/window-size.js +5 -5
- package/esm2015/utils/browser/is-edge-older-than.js +2 -2
- package/esm2015/utils/browser/is-edge.js +2 -2
- package/esm2015/utils/browser/is-firefox.js +2 -2
- package/esm2015/utils/browser/is-safari.js +6 -6
- package/esm2015/utils/color/hex-to-rgb.js +4 -4
- package/esm2015/utils/color/hex-to-rgba.js +5 -5
- package/esm2015/utils/color/parse-color.js +7 -7
- package/esm2015/utils/color/rgb-to-hex.js +2 -2
- package/esm2015/utils/color/rgba-to-hex.js +7 -7
- package/esm2015/utils/dom/element-checks.js +4 -4
- package/esm2015/utils/dom/get-clipboard-data-text.js +4 -4
- package/esm2015/utils/dom/get-document-or-shadow-root.js +2 -2
- package/esm2015/utils/dom/get-element-offset.js +2 -2
- package/esm2015/utils/dom/retarget-boundary-crossing.js +4 -4
- package/esm2015/utils/focus/is-native-keyboard-focusable.js +14 -14
- package/esm2015/utils/focus/is-native-mouse-focusable.js +3 -3
- package/esm2015/utils/focus/set-native-mouse-focused.js +5 -5
- package/esm2015/utils/format/px.js +2 -2
- package/esm2015/utils/math/round-with.js +4 -4
- package/esm2015/utils/math/round.js +5 -5
- package/esm2015/utils/miscellaneous/clean-object.js +2 -2
- package/esm2015/utils/miscellaneous/create-token.js +2 -2
- package/esm2015/utils/miscellaneous/ease-in-out-quad.js +2 -2
- package/esm2015/utils/miscellaneous/get-swipe-direction.js +3 -3
- package/esm2015/utils/miscellaneous/is-number.js +2 -2
- package/esm2015/utils/miscellaneous/is-object.js +2 -2
- package/esm2015/utils/miscellaneous/is-string.js +2 -2
- package/esm2015/utils/miscellaneous/is-valid-url.js +8 -8
- package/esm2015/utils/os/is-apple-platform.js +2 -2
- package/esm2015/utils/svg/svg-linear-gradient-processor.js +12 -12
- package/fesm2015/taiga-ui-cdk-abstract.js +11 -11
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-coercion.js +1 -1
- package/fesm2015/taiga-ui-cdk-coercion.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 +80 -80
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-date-time.js +25 -25
- package/fesm2015/taiga-ui-cdk-date-time.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-decorators.js +4 -4
- package/fesm2015/taiga-ui-cdk-decorators.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js +30 -30
- package/fesm2015/taiga-ui-cdk-directives-auto-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-directives-hovered.js +2 -2
- package/fesm2015/taiga-ui-cdk-directives-hovered.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-exceptions.js +13 -13
- package/fesm2015/taiga-ui-cdk-exceptions.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +9 -9
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-filter.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-filter.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-is-present.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-is-present.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-keys.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-keys.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-mapper.js +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-mapper.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-pipes-replace.js +2 -2
- package/fesm2015/taiga-ui-cdk-pipes-replace.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js +27 -24
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-tokens.js +25 -25
- package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-browser.js +8 -8
- package/fesm2015/taiga-ui-cdk-utils-browser.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-color.js +20 -20
- package/fesm2015/taiga-ui-cdk-utils-color.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-dom.js +11 -11
- package/fesm2015/taiga-ui-cdk-utils-dom.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-focus.js +19 -19
- package/fesm2015/taiga-ui-cdk-utils-focus.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-format.js +1 -1
- package/fesm2015/taiga-ui-cdk-utils-format.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-math.js +7 -7
- package/fesm2015/taiga-ui-cdk-utils-math.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js +15 -15
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js +1 -1
- package/fesm2015/taiga-ui-cdk-utils-os.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-svg.js +11 -11
- package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
- package/package.json +1 -1
- package/schematics/constants/file-globs.js +24 -24
- package/schematics/constants/taiga-styles.js +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 +10 -10
- package/schematics/ng-add/steps/add-taiga-icons.js +4 -4
- package/schematics/ng-add/steps/add-taiga-modules.js +14 -14
- package/schematics/ng-add/steps/wrap-with-tui-root.js +12 -12
- package/schematics/ng-update/steps/icons/replace-imports.js +2 -2
- package/schematics/ng-update/steps/remove-module.js +2 -2
- package/schematics/ng-update/steps/rename-types.js +5 -5
- package/schematics/ng-update/steps/replace-deep-import.js +4 -4
- package/schematics/ng-update/steps/replace-enums.js +2 -2
- package/schematics/ng-update/steps/replace-identifier.js +2 -2
- package/schematics/ng-update/steps/replace-services.js +4 -4
- package/schematics/ng-update/steps/show-warnings.js +1 -1
- package/schematics/ng-update/utils/replace-text.js +1 -1
- package/schematics/ng-update/utils/templates/replace-tag.js +1 -1
- package/schematics/ng-update/v3/constants/breakpoints.js +27 -27
- package/schematics/ng-update/v3/constants/constants.js +187 -187
- package/schematics/ng-update/v3/constants/deprecated-functions.js +405 -405
- package/schematics/ng-update/v3/constants/enums.js +153 -153
- package/schematics/ng-update/v3/constants/modules.js +4 -4
- package/schematics/ng-update/v3/constants/services.js +16 -16
- package/schematics/ng-update/v3/constants/templates.js +295 -295
- package/schematics/ng-update/v3/constants/tui-interactive-selectors.js +50 -50
- package/schematics/ng-update/v3/constants/types.js +88 -88
- package/schematics/ng-update/v3/constants/warnings.js +62 -62
- package/schematics/ng-update/v3/index.js +7 -7
- package/schematics/ng-update/v3/steps/migrate-date-time.js +42 -42
- package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +14 -14
- package/schematics/ng-update/v3/steps/migrate-progress.js +6 -6
- package/schematics/ng-update/v3/steps/migrate-sliders/index.js +4 -4
- package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.js +27 -27
- package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.js +26 -26
- package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.js +7 -7
- package/schematics/ng-update/v3/steps/migrate-templates.js +18 -18
- package/schematics/ng-update/v3/steps/migrate-textfield-controller.js +33 -33
- package/schematics/ng-update/v3/steps/miscellaneous.js +16 -16
- package/schematics/ng-update/v3/steps/replace-functions.js +17 -17
- package/schematics/ng-update/v3/steps/replace-styles.js +12 -12
- package/schematics/ng-update/v3-30/constants/constants.js +2 -2
- package/schematics/ng-update/v3-30/constants/icons.js +494 -494
- package/schematics/ng-update/v3-30/index.js +4 -4
- package/schematics/ng-update/v3-35/constants/constants.js +2 -2
- package/schematics/ng-update/v3-35/constants/icons.js +1266 -1266
- package/schematics/ng-update/v3-35/index.js +5 -5
- package/schematics/ng-update/v3-36/index.js +6 -6
- package/schematics/ng-update/v3-40/index.js +11 -11
- package/schematics/ng-update/v3-5/index.js +1 -1
- package/schematics/ng-update/v3-5/steps/migrate-expand-templates.js +7 -7
- package/schematics/ng-update/v4/index.js +2 -2
- package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +19 -19
- package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +21 -21
- package/schematics/ng-update/v4/steps/constants/html-comments.js +9 -9
- package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +21 -21
- package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +4 -4
- package/schematics/ng-update/v4/steps/constants/tags-to-replace.js +2 -2
- package/schematics/ng-update/v4/steps/migrate-templates.js +3 -3
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js +6 -6
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js +6 -6
- package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +14 -14
- package/schematics/ng-update/v4/steps/templates/migrate-badge.js +3 -3
- package/schematics/ng-update/v4/steps/templates/toggles/common.js +5 -5
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-checkbox.js +4 -4
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-radio.js +4 -4
- package/schematics/ng-update/v4/steps/templates/toggles/migrate-toggle.js +4 -4
- package/schematics/utils/add-import-to-component.js +1 -1
- package/schematics/utils/angular/is-standalone-component.js +3 -3
- package/schematics/utils/angular/ng-component.js +1 -1
- package/schematics/utils/angular/ng-module.js +1 -1
- package/schematics/utils/angular-json-manipulations.js +5 -5
- package/schematics/utils/colored-log.js +11 -11
- package/schematics/utils/create-angular-json.js +3 -3
- package/schematics/utils/get-component-from-identifier.js +1 -1
- package/schematics/utils/get-named-import-references.js +1 -1
- package/schematics/utils/get-projects.js +2 -2
- package/schematics/utils/get-standalone-bootstrap-function.js +1 -1
- package/schematics/utils/insert-todo.js +1 -1
- package/schematics/utils/is-ci.js +1 -1
- package/schematics/utils/progress.js +2 -2
- package/schematics/utils/project-root.js +1 -1
- package/schematics/utils/push-to-array-property.js +1 -1
- package/schematics/utils/templates/elements.js +1 -1
- package/schematics/utils/templates/get-component-templates.js +5 -5
- package/schematics/utils/templates/ng-component-input-manipulations.js +5 -5
- package/schematics/utils/templates/template-resource.js +3 -3
- package/services/directive-styles.service.d.ts +3 -2
- package/utils/miscellaneous/is-string.js +1 -1
@@ -63,10 +63,10 @@ function addHTMLCommentTags({ resource, recorder, fileSystem, }) {
|
|
63
63
|
function replaceBreadcrumbs({ resource, recorder, fileSystem, }) {
|
64
64
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
65
65
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
66
|
-
const elements = elements_1.findElementsByTagName(template,
|
66
|
+
const elements = elements_1.findElementsByTagName(template, 'tui-breadcrumbs');
|
67
67
|
elements.forEach(element => {
|
68
68
|
var _a, _b, _c;
|
69
|
-
const itemsAttr = element.attrs.find(attr => attr.name ===
|
69
|
+
const itemsAttr = element.attrs.find(attr => attr.name === '[items]');
|
70
70
|
const itemsValue = itemsAttr === null || itemsAttr === void 0 ? void 0 : itemsAttr.value;
|
71
71
|
const insertTo = (_a = element === null || element === void 0 ? void 0 : element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.startTag.endOffset;
|
72
72
|
if (!itemsValue || !insertTo) {
|
@@ -83,32 +83,32 @@ function replaceBreadcrumbs({ resource, recorder, fileSystem, }) {
|
|
83
83
|
{{ item.caption }}
|
84
84
|
</a>
|
85
85
|
</ng-container>`);
|
86
|
-
const { startOffset = 0, endOffset = 0 } = ((_c = (_b = element.sourceCodeLocation) === null || _b === void 0 ? void 0 : _b.attrs) === null || _c === void 0 ? void 0 : _c[
|
86
|
+
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]']) || {};
|
87
87
|
recorder.remove(templateOffset + startOffset - 1, endOffset - startOffset + 1);
|
88
88
|
});
|
89
89
|
}
|
90
90
|
function replaceFieldError({ resource, recorder, fileSystem, }) {
|
91
91
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
92
92
|
const templateOffset = template_resource_1.getTemplateOffset(resource);
|
93
|
-
const elements = elements_1.findElementsByTagName(template,
|
93
|
+
const elements = elements_1.findElementsByTagName(template, 'tui-field-error');
|
94
94
|
elements.forEach(element => {
|
95
95
|
var _a, _b;
|
96
|
-
const orderAttr = element.attrs.find(attr => attr.name ===
|
96
|
+
const orderAttr = element.attrs.find(attr => attr.name === '[order]');
|
97
97
|
const orderVal = orderAttr === null || orderAttr === void 0 ? void 0 : orderAttr.value;
|
98
98
|
if (orderAttr) {
|
99
|
-
const { startOffset = 0, endOffset = 0 } = ((_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[
|
99
|
+
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]']) || {};
|
100
100
|
recorder.remove(templateOffset + startOffset - 1, endOffset - startOffset + 1);
|
101
101
|
}
|
102
|
-
const input = `[error]="${orderVal !== null && orderVal !== void 0 ? orderVal :
|
103
|
-
replace_tag_1.replaceTag(recorder, element.sourceCodeLocation,
|
102
|
+
const input = `[error]="${orderVal !== null && orderVal !== void 0 ? orderVal : '[]'} | tuiFieldError | async"`;
|
103
|
+
replace_tag_1.replaceTag(recorder, element.sourceCodeLocation, 'tui-field-error', 'tui-error', templateOffset, [input]);
|
104
104
|
});
|
105
105
|
if (elements.length) {
|
106
|
-
add_import_to_closest_module_1.addImportToClosestModule(resource.componentPath,
|
106
|
+
add_import_to_closest_module_1.addImportToClosestModule(resource.componentPath, 'TuiErrorModule', '@taiga-ui/core');
|
107
107
|
}
|
108
108
|
}
|
109
109
|
function addEditorProviders({ resource, fileSystem, }) {
|
110
110
|
const template = template_resource_1.getTemplateFromTemplateResource(resource, fileSystem);
|
111
|
-
const elements = elements_1.findElementsByTagName(template,
|
111
|
+
const elements = elements_1.findElementsByTagName(template, 'tui-editor').filter(element => !elements_1.hasElementAttribute(element, 'new'));
|
112
112
|
if (elements.length) {
|
113
113
|
const componentPath = resource.componentPath;
|
114
114
|
const componentClass = ng_component_1.getNgComponents(componentPath);
|
@@ -116,8 +116,8 @@ function addEditorProviders({ resource, fileSystem, }) {
|
|
116
116
|
provide: TUI_EDITOR_EXTENSIONS,
|
117
117
|
useValue: defaultEditorExtensions
|
118
118
|
}`, { unique: true });
|
119
|
-
add_unique_import_1.addUniqueImport(componentPath,
|
120
|
-
add_unique_import_1.addUniqueImport(componentPath,
|
119
|
+
add_unique_import_1.addUniqueImport(componentPath, 'TUI_EDITOR_EXTENSIONS', '@taiga-ui/addon-editor');
|
120
|
+
add_unique_import_1.addUniqueImport(componentPath, 'defaultEditorExtensions', '@taiga-ui/addon-editor');
|
121
121
|
}
|
122
122
|
}
|
123
123
|
// eslint-disable-next-line unicorn/no-unsafe-regex
|
@@ -134,9 +134,9 @@ function migrateTuiHideSelectedPipe({ resource, fileSystem, recorder, }) {
|
|
134
134
|
if (!name || !oldValue || !attrLocations) {
|
135
135
|
return;
|
136
136
|
}
|
137
|
-
const newValue = oldValue.replace(HIDE_SELECTED_PIPE_WITH_ARGS_REG,
|
137
|
+
const newValue = oldValue.replace(HIDE_SELECTED_PIPE_WITH_ARGS_REG, '| tuiHideSelected');
|
138
138
|
const { startOffset } = attrLocations[name];
|
139
|
-
const valueOffset = templateOffset + startOffset + name.length +
|
139
|
+
const valueOffset = templateOffset + startOffset + name.length + '="'.length;
|
140
140
|
recorder.remove(valueOffset, oldValue.length);
|
141
141
|
recorder.insertRight(valueOffset, newValue);
|
142
142
|
});
|
@@ -147,7 +147,7 @@ function migrateBinaryAttributes({ resource, fileSystem, recorder, }) {
|
|
147
147
|
templates_1.TRUTHY_BOOLEAN_INPUT_TO_HTML_BINARY_ATTRIBUTE.forEach(attrName => {
|
148
148
|
const elements = elements_1.findElementsInTemplateByFn(template, el => {
|
149
149
|
var _a;
|
150
|
-
return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attr.value ===
|
150
|
+
return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attr.value === 'true' &&
|
151
151
|
attr.name.includes(attrName.toLowerCase()));
|
152
152
|
});
|
153
153
|
elements.forEach(el => {
|
@@ -182,7 +182,7 @@ function removeV3Inputs({ resource, fileSystem, recorder, }) {
|
|
182
182
|
remove_inputs_1.removeInputs({ resource, recorder, fileSystem, data: templates_1.INPUTS_TO_REMOVE });
|
183
183
|
}
|
184
184
|
function migrateTemplates(fileSystem, options) {
|
185
|
-
!options[
|
185
|
+
!options['skip-logs'] &&
|
186
186
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} migrating templates...`);
|
187
187
|
const componentWithTemplatesPaths = get_component_templates_1.getComponentTemplates(constants_1.ALL_TS_FILES);
|
188
188
|
const actions = [
|
@@ -209,11 +209,11 @@ function migrateTemplates(fileSystem, options) {
|
|
209
209
|
const recorder = fileSystem.edit(path);
|
210
210
|
actions.forEach((action, actionIndex) => {
|
211
211
|
const isLastAction = actionIndex === actions.length - 1;
|
212
|
-
!options[
|
212
|
+
!options['skip-logs'] && progressLog(action.name, isLastAction);
|
213
213
|
action({ resource, fileSystem, recorder });
|
214
214
|
});
|
215
215
|
});
|
216
|
-
!options[
|
216
|
+
!options['skip-logs'] &&
|
217
217
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} templates migrated \n`);
|
218
218
|
}
|
219
219
|
exports.migrateTemplates = migrateTemplates;
|
@@ -6,41 +6,41 @@ const elements_1 = require("../../../utils/templates/elements");
|
|
6
6
|
const ng_component_input_manipulations_1 = require("../../../utils/templates/ng-component-input-manipulations");
|
7
7
|
const template_resource_1 = require("../../../utils/templates/template-resource");
|
8
8
|
const TEXTFIELDS = [
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
'tui-input',
|
10
|
+
'tui-primitive-textfield',
|
11
|
+
'tui-text-area',
|
12
|
+
'tui-combo-box',
|
13
|
+
'tui-input-copy',
|
14
|
+
'tui-input-date',
|
15
|
+
'tui-input-date-range',
|
16
|
+
'tui-input-date-time',
|
17
|
+
'tui-input-number',
|
18
|
+
'tui-input-password',
|
19
|
+
'tui-input-count',
|
20
|
+
'tui-input-number',
|
21
|
+
'tui-input-phone',
|
22
|
+
'tui-input-slider',
|
23
|
+
'tui-input-card',
|
24
24
|
];
|
25
25
|
const ATTRS_MAP = {
|
26
|
-
tuitextfieldautocomplete:
|
27
|
-
tuitextfieldinputmode:
|
28
|
-
tuitextfieldmaxlength:
|
29
|
-
tuitextfieldtype:
|
30
|
-
tuitextfieldexampletext:
|
31
|
-
'[tuitextfieldautocomplete]':
|
32
|
-
'[tuitextfieldinputmode]':
|
33
|
-
'[tuitextfieldmaxlength]':
|
34
|
-
'[tuitextfieldtype]':
|
35
|
-
'[tuitextfieldexampletext]':
|
26
|
+
tuitextfieldautocomplete: 'autocomplete',
|
27
|
+
tuitextfieldinputmode: 'inputmode',
|
28
|
+
tuitextfieldmaxlength: 'maxlength',
|
29
|
+
tuitextfieldtype: 'type',
|
30
|
+
tuitextfieldexampletext: 'placeholder',
|
31
|
+
'[tuitextfieldautocomplete]': '[attr.autocomplete]',
|
32
|
+
'[tuitextfieldinputmode]': '[attr.inputmode]',
|
33
|
+
'[tuitextfieldmaxlength]': '[attr.maxlength]',
|
34
|
+
'[tuitextfieldtype]': '[attr.type]',
|
35
|
+
'[tuitextfieldexampletext]': '[attr.placeholder]',
|
36
36
|
};
|
37
37
|
const CONTROLLER_ITEMS = Object.keys(ATTRS_MAP).map(attr => attr.toLowerCase());
|
38
38
|
function insertTuiTextfieldInput({ element, attrs, recorder, templateOffset, }) {
|
39
39
|
var _a, _b;
|
40
40
|
const newAttrs = attrs
|
41
41
|
.map(attr => `${ATTRS_MAP[attr.name]}="${attr.value}"`)
|
42
|
-
.join(
|
43
|
-
const content = element.tagName ===
|
42
|
+
.join('\n');
|
43
|
+
const content = element.tagName === 'tui-text-area'
|
44
44
|
? `<textarea tuiTextfield ${newAttrs}></textarea> `
|
45
45
|
: `<input tuiTextfield ${newAttrs}/> `;
|
46
46
|
const insertTo = (_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.endTag) === null || _b === void 0 ? void 0 : _b.startOffset;
|
@@ -51,7 +51,7 @@ function insertTuiTextfieldInput({ element, attrs, recorder, templateOffset, })
|
|
51
51
|
function addAttrToExistingInput({ existingInput, attrs, recorder, templateOffset, }) {
|
52
52
|
attrs.forEach(attr => {
|
53
53
|
var _a, _b, _c;
|
54
|
-
const insertTo = (_c = (_b = (_a = existingInput.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[
|
54
|
+
const insertTo = (_c = (_b = (_a = existingInput.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b['tuitextfield']) === null || _c === void 0 ? void 0 : _c.endOffset;
|
55
55
|
if (insertTo) {
|
56
56
|
recorder.insertLeft(insertTo + templateOffset, ` ${ATTRS_MAP[attr.name]}="${attr.value}"`);
|
57
57
|
}
|
@@ -64,12 +64,12 @@ function removeOldInputs(recorder, template, templateOffset) {
|
|
64
64
|
});
|
65
65
|
}
|
66
66
|
function getTagsToRemove(attrName) {
|
67
|
-
return [
|
68
|
-
? TEXTFIELDS.filter(tag => tag !==
|
67
|
+
return ['[tuitextfieldmaxlength]', 'tuitextfieldmaxlength'].includes(attrName)
|
68
|
+
? TEXTFIELDS.filter(tag => tag !== 'tui-text-area')
|
69
69
|
: TEXTFIELDS;
|
70
70
|
}
|
71
71
|
const excludedAttrs = {
|
72
|
-
'tui-text-area': [
|
72
|
+
'tui-text-area': ['[tuitextfieldmaxlength]', 'tuitextfieldmaxlength'],
|
73
73
|
};
|
74
74
|
function exclusion({ tagName }, attrName) {
|
75
75
|
var _a;
|
@@ -84,8 +84,8 @@ function migrateTextfieldController({ resource, fileSystem, recorder, }) {
|
|
84
84
|
if (!attrs.length) {
|
85
85
|
return;
|
86
86
|
}
|
87
|
-
const existingInput = elements_1.findElementsByFn(element.childNodes, el => (el.tagName ===
|
88
|
-
elements_1.hasElementAttribute(el,
|
87
|
+
const existingInput = elements_1.findElementsByFn(element.childNodes, el => (el.tagName === 'input' || el.tagName === 'textarea') &&
|
88
|
+
elements_1.hasElementAttribute(el, 'tuiTextfield'))[0];
|
89
89
|
if (existingInput) {
|
90
90
|
addAttrToExistingInput({ existingInput, attrs, recorder, templateOffset });
|
91
91
|
}
|
@@ -34,7 +34,7 @@ function checkMethod(node, method, message) {
|
|
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
|
}
|
@@ -48,34 +48,34 @@ function checkMethod(node, method, message) {
|
|
48
48
|
});
|
49
49
|
}
|
50
50
|
function miscellaneousMigrations(options) {
|
51
|
-
!options[
|
51
|
+
!options['skip-logs'] &&
|
52
52
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} miscellaneous migrating...`);
|
53
53
|
replaceEnumProperty({
|
54
|
-
enumName:
|
55
|
-
from:
|
56
|
-
to:
|
54
|
+
enumName: 'TuiCurrency',
|
55
|
+
from: 'HongKong_dollar',
|
56
|
+
to: 'HongKongDollar',
|
57
57
|
});
|
58
58
|
replaceEnumProperty({
|
59
|
-
enumName:
|
60
|
-
from:
|
61
|
-
to:
|
59
|
+
enumName: 'TuiCurrencyCode',
|
60
|
+
from: 'HongKong_dollar',
|
61
|
+
to: 'HongKongDollar',
|
62
62
|
});
|
63
63
|
replaceEnumProperty({
|
64
|
-
enumName:
|
64
|
+
enumName: 'TuiCreditCardAutofillName',
|
65
65
|
/**
|
66
66
|
* Do not mark `mounth` as incorrect.
|
67
67
|
* cspell:ignore mounth
|
68
68
|
*/
|
69
|
-
from:
|
70
|
-
to:
|
69
|
+
from: 'CcExp_mounth',
|
70
|
+
to: 'CcExpMonth',
|
71
71
|
});
|
72
72
|
replaceEnumProperty({
|
73
|
-
enumName:
|
74
|
-
from:
|
75
|
-
to:
|
73
|
+
enumName: 'TuiCreditCardAutofillName',
|
74
|
+
from: 'CcExp_year',
|
75
|
+
to: 'CcExpYear',
|
76
76
|
});
|
77
|
-
addWarningToMethod(
|
78
|
-
!options[
|
77
|
+
addWarningToMethod('TuiDirectiveStylesService', 'addStyle', 'addStyle method has been removed. Use components approach');
|
78
|
+
!options['skip-logs'] &&
|
79
79
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} miscellaneous migrated \n`);
|
80
80
|
}
|
81
81
|
exports.miscellaneousMigrations = miscellaneousMigrations;
|
@@ -28,7 +28,7 @@ function replacePadStart(references) {
|
|
28
28
|
}
|
29
29
|
else if (ng_morph_1.Node.isCallExpression(parent)) {
|
30
30
|
const [targetString, length, pad] = parent.getArguments();
|
31
|
-
parent.replaceWithText(`${targetString.getText()}.padStart(${length.getText()}, ${(_a = pad === null || pad === void 0 ? void 0 : pad.getText()) !== null && _a !== void 0 ? _a :
|
31
|
+
parent.replaceWithText(`${targetString.getText()}.padStart(${length.getText()}, ${(_a = pad === null || pad === void 0 ? void 0 : pad.getText()) !== null && _a !== void 0 ? _a : '" "'})`);
|
32
32
|
}
|
33
33
|
});
|
34
34
|
}
|
@@ -40,8 +40,8 @@ function replaceNativeFocused(references) {
|
|
40
40
|
}
|
41
41
|
else if (ng_morph_1.Node.isCallExpression(parent)) {
|
42
42
|
const [targetString, focusedArg, preventScroll] = parent.getArguments();
|
43
|
-
const setFocused = !focusedArg || focusedArg.getText() ===
|
44
|
-
const focus = `${targetString.getText()}.focus(${(preventScroll === null || preventScroll === void 0 ? void 0 : preventScroll.getText()) ?
|
43
|
+
const setFocused = !focusedArg || focusedArg.getText() === 'true';
|
44
|
+
const focus = `${targetString.getText()}.focus(${(preventScroll === null || preventScroll === void 0 ? void 0 : preventScroll.getText()) ? '{preventScroll: true}' : ''})`;
|
45
45
|
const blur = `${targetString.getText()}.blur()`;
|
46
46
|
parent.replaceWithText(setFocused ? focus : blur);
|
47
47
|
}
|
@@ -56,7 +56,7 @@ function replaceClosestElement(references) {
|
|
56
56
|
else if (ng_morph_1.Node.isCallExpression(parent)) {
|
57
57
|
const [firstArg, secondArg] = parent.getArguments();
|
58
58
|
const firstArgText = firstArg.getText();
|
59
|
-
const element = firstArgText.includes(
|
59
|
+
const element = firstArgText.includes(' as ') // e.g, `getClosestElement(el as Element, ...)`
|
60
60
|
? `(${firstArgText})`
|
61
61
|
: firstArgText;
|
62
62
|
parent.replaceWithText(`${element}.closest(${secondArg.getText()})`);
|
@@ -89,16 +89,16 @@ function replaceFallbackValue(references) {
|
|
89
89
|
}
|
90
90
|
function modifyFormatNumberArgs() {
|
91
91
|
[
|
92
|
-
...get_named_import_references_1.getNamedImportReferences(
|
93
|
-
...get_named_import_references_1.getNamedImportReferences(
|
92
|
+
...get_named_import_references_1.getNamedImportReferences('formatNumber', '@taiga-ui/core'),
|
93
|
+
...get_named_import_references_1.getNamedImportReferences('tuiFormatNumber', '@taiga-ui/core'),
|
94
94
|
]
|
95
95
|
.map(ref => ref.getParent())
|
96
96
|
.filter(ng_morph_1.Node.isCallExpression)
|
97
97
|
.forEach(fn => {
|
98
98
|
const args = fn.getArguments();
|
99
99
|
if (args.length > 1) {
|
100
|
-
const [value, decimalLimit =
|
101
|
-
const notNullDecimalLimit = decimalLimit ===
|
100
|
+
const [value, decimalLimit = 'Infinity', decimalSeparator = "','", thousandSeparator = "'\u00A0'", zeroPadding = true,] = args.map(arg => arg.getText());
|
101
|
+
const notNullDecimalLimit = decimalLimit === 'null' ? 'Infinity' : decimalLimit;
|
102
102
|
const conditionalDecimalLimit = !Number.isNaN(Number(notNullDecimalLimit))
|
103
103
|
? notNullDecimalLimit
|
104
104
|
: `${decimalLimit} === null ? Infinity : ${decimalLimit}`;
|
@@ -107,7 +107,7 @@ function modifyFormatNumberArgs() {
|
|
107
107
|
});
|
108
108
|
}
|
109
109
|
function modifyClosestFocusable() {
|
110
|
-
get_named_import_references_1.getNamedImportReferences(
|
110
|
+
get_named_import_references_1.getNamedImportReferences('tuiGetClosestFocusable', '@taiga-ui/cdk')
|
111
111
|
.map(ref => ref.getParent())
|
112
112
|
.filter(ng_morph_1.Node.isCallExpression)
|
113
113
|
.forEach(fn => {
|
@@ -119,20 +119,20 @@ function modifyClosestFocusable() {
|
|
119
119
|
});
|
120
120
|
}
|
121
121
|
function replaceFunctions(options) {
|
122
|
-
!options[
|
122
|
+
!options['skip-logs'] &&
|
123
123
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} functions replacing...`);
|
124
|
-
replacePadStart(get_named_import_references_1.getNamedImportReferences(
|
125
|
-
replaceFallbackValue(get_named_import_references_1.getNamedImportReferences(
|
126
|
-
replaceCustomEvent(get_named_import_references_1.getNamedImportReferences(
|
127
|
-
replaceClosestElement(get_named_import_references_1.getNamedImportReferences(
|
124
|
+
replacePadStart(get_named_import_references_1.getNamedImportReferences('padStart', '@taiga-ui/cdk'));
|
125
|
+
replaceFallbackValue(get_named_import_references_1.getNamedImportReferences('fallbackValue', '@taiga-ui/cdk'));
|
126
|
+
replaceCustomEvent(get_named_import_references_1.getNamedImportReferences('tuiCustomEvent', '@taiga-ui/cdk'));
|
127
|
+
replaceClosestElement(get_named_import_references_1.getNamedImportReferences('getClosestElement', '@taiga-ui/cdk'));
|
128
128
|
replaceNativeFocused([
|
129
|
-
...get_named_import_references_1.getNamedImportReferences(
|
130
|
-
...get_named_import_references_1.getNamedImportReferences(
|
129
|
+
...get_named_import_references_1.getNamedImportReferences('tuiSetNativeFocused', '@taiga-ui/cdk'),
|
130
|
+
...get_named_import_references_1.getNamedImportReferences('setNativeFocused', '@taiga-ui/cdk'),
|
131
131
|
]);
|
132
132
|
replaceDeprecatedFunction();
|
133
133
|
modifyFormatNumberArgs();
|
134
134
|
modifyClosestFocusable();
|
135
|
-
!options[
|
135
|
+
!options['skip-logs'] &&
|
136
136
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} functions replaced \n`);
|
137
137
|
}
|
138
138
|
exports.replaceFunctions = replaceFunctions;
|
@@ -7,26 +7,26 @@ exports.TUI_WARNING_NORMALIZE = `
|
|
7
7
|
// [WARNING]: In version 3.0 we drop to support normalize(v7) out-of-the-box
|
8
8
|
// You need to manually download css file from https://necolas.github.io/normalize.css/
|
9
9
|
// If you're looking to use reset styles or you can write your own reset.css`;
|
10
|
-
exports.TUI_WARNING_WRAPPER_MIXINS =
|
10
|
+
exports.TUI_WARNING_WRAPPER_MIXINS = '// TODO: (Taiga UI migration): use mixins to customize tuiWrapper. See https://taiga-ui.dev/wrapper';
|
11
11
|
function replaceStyles() {
|
12
12
|
var _a;
|
13
|
-
(_a = ng_morph_1.getActiveProject()) === null || _a === void 0 ? void 0 : _a.getSourceFiles(
|
13
|
+
(_a = ng_morph_1.getActiveProject()) === null || _a === void 0 ? void 0 : _a.getSourceFiles('**/**.less').forEach(sourceFile => {
|
14
14
|
let fullText = sourceFile.getFullText();
|
15
|
-
if (fullText.includes(
|
15
|
+
if (fullText.includes('taiga-ui')) {
|
16
16
|
breakpoints_1.DEPRECATED_BREAKPOINTS.forEach(({ from, to }) => {
|
17
|
-
fullText = fullText.replace(new RegExp(`(?<=@media.*)(${from})(?=[\\s,{])`,
|
17
|
+
fullText = fullText.replace(new RegExp(`(?<=@media.*)(${from})(?=[\\s,{])`, 'g'), to);
|
18
18
|
});
|
19
19
|
}
|
20
20
|
fullText = fullText
|
21
|
-
.replace(
|
22
|
-
.replace(
|
23
|
-
.replace(
|
24
|
-
.replace(
|
25
|
-
.replace(
|
26
|
-
.replace(
|
27
|
-
.replace(/@import '~@taiga-ui/g,
|
21
|
+
.replace('tui-wrapper', `${exports.TUI_WARNING_WRAPPER_MIXINS}\n[tuiWrapper]`)
|
22
|
+
.replace("&[data-state='hovered']", "&[data-state='hover']")
|
23
|
+
.replace("&[data-state='pressed']", "&[data-state='active']")
|
24
|
+
.replace('tui-portal-host', 'tui-dropdown-host')
|
25
|
+
.replace('tui-dropdown-box', 'tui-dropdown')
|
26
|
+
.replace('--tui-color-link', '--tui-link')
|
27
|
+
.replace(/@import '~@taiga-ui/g, "@import '@taiga-ui")
|
28
28
|
.replace(/@import '@taiga-ui\/core\/styles\/taiga-ui-global/g, `${exports.TUI_WARNING_NORMALIZE}\n@import '@taiga-ui/styles/taiga-ui-global`)
|
29
|
-
.replace(/@import '@taiga-ui\/.+(.less)?';/g, val => `${val.replace(
|
29
|
+
.replace(/@import '@taiga-ui\/.+(.less)?';/g, val => `${val.replace("';", '')}.less';`.replace('.less.less', '.less'));
|
30
30
|
sourceFile.replaceWithText(fullText);
|
31
31
|
});
|
32
32
|
}
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICONS_TS = void 0;
|
4
4
|
const icons_1 = require("./icons");
|
5
5
|
exports.ICONS_TS = icons_1.ICONS.map(({ from, to }) => ({
|
6
|
-
from: { name: from, moduleSpecifier:
|
7
|
-
to: { name: to, moduleSpecifier:
|
6
|
+
from: { name: from, moduleSpecifier: '@taiga-ui/proprietary-icons' },
|
7
|
+
to: { name: to, moduleSpecifier: '@taiga-ui/proprietary-tds-icons' },
|
8
8
|
}));
|