@taiga-ui/cdk 3.59.0 → 3.60.0-canary.799e7d6
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 +11 -11
- 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-dropdown-host.umd.js +2 -2
- package/bundles/taiga-ui-cdk-components-dropdown-host.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 +27 -27
- package/bundles/taiga-ui-cdk-date-time.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-decorators.umd.js +4 -4
- package/bundles/taiga-ui-cdk-decorators.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js +30 -30
- package/bundles/taiga-ui-cdk-directives-auto-focus.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js +2 -2
- package/bundles/taiga-ui-cdk-directives-hovered.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-exceptions.umd.js +13 -13
- 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 +1 -1
- 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 +1 -1
- 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 +28 -25
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-tokens.umd.js +24 -24
- 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 +20 -20
- 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 +15 -15
- 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 +3 -3
- 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 +23 -23
- 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 +69 -69
- 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
@@ -2,33 +2,33 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.ALL_FILES = exports.ALL_TS_FILES = void 0;
|
4
4
|
const EXCLUDE_DIRECTORIES = [
|
5
|
-
|
5
|
+
'e2e',
|
6
6
|
// compiled
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
'scripts',
|
8
|
+
'dist',
|
9
|
+
'node_modules',
|
10
|
+
'coverage',
|
11
|
+
'dll',
|
12
|
+
'tmp',
|
13
|
+
'__build__',
|
14
14
|
// hidden directories
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
].join(
|
15
|
+
'.rpt2_cache',
|
16
|
+
'.husky',
|
17
|
+
'.vscode',
|
18
|
+
'.idea',
|
19
|
+
'.github',
|
20
|
+
'.gitlab',
|
21
|
+
'.devplatform',
|
22
|
+
'.angular',
|
23
|
+
'.tmp',
|
24
|
+
'.nx',
|
25
|
+
].join('|');
|
26
26
|
const EXCLUDE_FILE_PATTERNS = [
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
].join(
|
27
|
+
'*__name@dasherize__*',
|
28
|
+
'*__name@camelize__*',
|
29
|
+
'*__name@underscore__*',
|
30
|
+
'*.d', // typings
|
31
|
+
].join('|');
|
32
32
|
exports.ALL_TS_FILES = [
|
33
33
|
`!(${EXCLUDE_FILE_PATTERNS}).ts`,
|
34
34
|
`!(${EXCLUDE_DIRECTORIES})/**/!(${EXCLUDE_FILE_PATTERNS}).ts`,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.TAIGA_THEME_FONTS = exports.TAIGA_THEME_STYLE = exports.TAIGA_GLOBAL_NEW_STYLE = exports.TAIGA_GLOBAL_OLD_STYLE = void 0;
|
4
|
-
exports.TAIGA_GLOBAL_OLD_STYLE =
|
5
|
-
exports.TAIGA_GLOBAL_NEW_STYLE =
|
6
|
-
exports.TAIGA_THEME_STYLE =
|
7
|
-
exports.TAIGA_THEME_FONTS =
|
4
|
+
exports.TAIGA_GLOBAL_OLD_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-global.less';
|
5
|
+
exports.TAIGA_GLOBAL_NEW_STYLE = 'node_modules/@taiga-ui/styles/taiga-ui-global.less';
|
6
|
+
exports.TAIGA_THEME_STYLE = 'node_modules/@taiga-ui/core/styles/taiga-ui-theme.less';
|
7
|
+
exports.TAIGA_THEME_FONTS = 'node_modules/@taiga-ui/core/styles/taiga-ui-fonts.less';
|
@@ -2,32 +2,32 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.SANITIZER_MODULES = exports.ALERT_MODULES = exports.DIALOG_MODULES = exports.BROWSER_ANIMATION_MODULE = exports.MAIN_MODULE = void 0;
|
4
4
|
exports.MAIN_MODULE = {
|
5
|
-
name:
|
6
|
-
packageName:
|
5
|
+
name: 'TuiRootModule',
|
6
|
+
packageName: '@taiga-ui/core',
|
7
7
|
};
|
8
8
|
exports.BROWSER_ANIMATION_MODULE = {
|
9
|
-
name:
|
10
|
-
packageName:
|
9
|
+
name: 'BrowserAnimationsModule',
|
10
|
+
packageName: '@angular/platform-browser/animations',
|
11
11
|
};
|
12
12
|
exports.DIALOG_MODULES = [
|
13
13
|
{
|
14
|
-
name:
|
15
|
-
packageName:
|
14
|
+
name: 'TuiDialogModule',
|
15
|
+
packageName: '@taiga-ui/core',
|
16
16
|
},
|
17
17
|
];
|
18
18
|
exports.ALERT_MODULES = [
|
19
19
|
{
|
20
|
-
name:
|
21
|
-
packageName:
|
20
|
+
name: 'TuiAlertModule',
|
21
|
+
packageName: '@taiga-ui/core',
|
22
22
|
},
|
23
23
|
];
|
24
24
|
exports.SANITIZER_MODULES = [
|
25
25
|
{
|
26
|
-
name:
|
27
|
-
packageName:
|
26
|
+
name: 'TUI_SANITIZER',
|
27
|
+
packageName: '@taiga-ui/core',
|
28
28
|
},
|
29
29
|
{
|
30
|
-
name:
|
31
|
-
packageName:
|
30
|
+
name: 'NgDompurifySanitizer',
|
31
|
+
packageName: '@tinkoff/ng-dompurify',
|
32
32
|
},
|
33
33
|
];
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DOMPURIFY_TYPES_VERSION = exports.DOMPURIFY_VERSION = exports.NG_DOMPURIFY_VERSION = exports.TAIGA_VERSION = void 0;
|
4
4
|
const version_1 = require("../../../constants/version");
|
5
5
|
exports.TAIGA_VERSION = `^${version_1.TUI_VERSION}`;
|
6
|
-
exports.NG_DOMPURIFY_VERSION =
|
7
|
-
exports.DOMPURIFY_VERSION =
|
8
|
-
exports.DOMPURIFY_TYPES_VERSION =
|
6
|
+
exports.NG_DOMPURIFY_VERSION = '3.0.0';
|
7
|
+
exports.DOMPURIFY_VERSION = '2.2.9';
|
8
|
+
exports.DOMPURIFY_TYPES_VERSION = '2.2.3';
|
@@ -16,39 +16,39 @@ function addDependencies(tree, options) {
|
|
16
16
|
removeTaigaSchematicsPackage(tree);
|
17
17
|
if (options.addGlobalStyles) {
|
18
18
|
ng_morph_1.addPackageJsonDependency(tree, {
|
19
|
-
name:
|
19
|
+
name: '@taiga-ui/styles',
|
20
20
|
version: versions_1.TAIGA_VERSION,
|
21
21
|
});
|
22
22
|
}
|
23
23
|
if (options.addSanitizer) {
|
24
24
|
ng_morph_1.addPackageJsonDependency(tree, {
|
25
|
-
name:
|
25
|
+
name: '@tinkoff/ng-dompurify',
|
26
26
|
version: versions_1.NG_DOMPURIFY_VERSION,
|
27
27
|
});
|
28
28
|
ng_morph_1.addPackageJsonDependency(tree, {
|
29
|
-
name:
|
29
|
+
name: 'dompurify',
|
30
30
|
version: versions_1.DOMPURIFY_VERSION,
|
31
31
|
});
|
32
32
|
ng_morph_1.addPackageJsonDependency(tree, {
|
33
|
-
name:
|
33
|
+
name: '@types/dompurify',
|
34
34
|
version: versions_1.DOMPURIFY_TYPES_VERSION,
|
35
35
|
type: ng_morph_1.NodeDependencyType.Dev,
|
36
36
|
});
|
37
37
|
}
|
38
|
-
if (packages.includes(
|
38
|
+
if (packages.includes('addon-table') || packages.includes('addon-mobile')) {
|
39
39
|
addAngularCdkDep(tree);
|
40
40
|
}
|
41
41
|
}
|
42
42
|
function addAngularCdkDep(tree) {
|
43
43
|
var _a;
|
44
|
-
const angularCore = (_a = ng_morph_1.getPackageJsonDependency(tree,
|
44
|
+
const angularCore = (_a = ng_morph_1.getPackageJsonDependency(tree, '@angular/core')) === null || _a === void 0 ? void 0 : _a.version;
|
45
45
|
if (!angularCore) {
|
46
46
|
return;
|
47
47
|
}
|
48
48
|
const majorVersionArr = angularCore.match(/[0-9]+/);
|
49
49
|
if (majorVersionArr) {
|
50
50
|
ng_morph_1.addPackageJsonDependency(tree, {
|
51
|
-
name:
|
51
|
+
name: '@angular/cdk',
|
52
52
|
version: `^${majorVersionArr[0]}.0.0`,
|
53
53
|
});
|
54
54
|
}
|
@@ -56,8 +56,8 @@ function addAngularCdkDep(tree) {
|
|
56
56
|
function removeTaigaSchematicsPackage(tree) {
|
57
57
|
var _a;
|
58
58
|
try {
|
59
|
-
if ((_a = ng_morph_1.getPackageJsonDependency(tree,
|
60
|
-
ng_morph_1.removePackageJsonDependency(tree,
|
59
|
+
if ((_a = ng_morph_1.getPackageJsonDependency(tree, 'taiga-ui')) === null || _a === void 0 ? void 0 : _a.version) {
|
60
|
+
ng_morph_1.removePackageJsonDependency(tree, 'taiga-ui');
|
61
61
|
}
|
62
62
|
}
|
63
63
|
catch (_b) {
|
@@ -69,7 +69,7 @@ function ngAdd(options) {
|
|
69
69
|
context.logger.info(`The main packages will be installed - ${packages_1.MAIN_PACKAGES}`);
|
70
70
|
addDependencies(tree, options);
|
71
71
|
context.addTask(new tasks_1.NodePackageInstallTask(), [
|
72
|
-
context.addTask(new tasks_1.RunSchematicTask(
|
72
|
+
context.addTask(new tasks_1.RunSchematicTask('ng-add-setup-project', options)),
|
73
73
|
]);
|
74
74
|
};
|
75
75
|
}
|
@@ -5,9 +5,9 @@ const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
5
5
|
const get_project_target_options_1 = require("../../utils/get-project-target-options");
|
6
6
|
const get_projects_1 = require("../../utils/get-projects");
|
7
7
|
const ICON_ASSETS = {
|
8
|
-
glob:
|
9
|
-
input:
|
10
|
-
output:
|
8
|
+
glob: '**/*',
|
9
|
+
input: 'node_modules/@taiga-ui/icons/src',
|
10
|
+
output: 'assets/taiga-ui/icons',
|
11
11
|
};
|
12
12
|
function addTaigaIcons(options) {
|
13
13
|
return (_) => addTaigaAssetsToAngularJson(options);
|
@@ -17,7 +17,7 @@ function addTaigaAssetsToAngularJson(options) {
|
|
17
17
|
return workspace_1.updateWorkspace(workspace => {
|
18
18
|
const project = get_projects_1.getProjects(options, workspace)[0];
|
19
19
|
if (project) {
|
20
|
-
const targetOptions = get_project_target_options_1.getProjectTargetOptions(project,
|
20
|
+
const targetOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
|
21
21
|
const assets = targetOptions.assets;
|
22
22
|
targetOptions.assets = assets ? [...assets, ICON_ASSETS] : [ICON_ASSETS];
|
23
23
|
}
|
@@ -26,7 +26,7 @@ function addExtraTuiProvidersToRootComponent({ mainClass, options, standalone =
|
|
26
26
|
if (!options.addSanitizer) {
|
27
27
|
return;
|
28
28
|
}
|
29
|
-
const provider =
|
29
|
+
const provider = '{provide: TUI_SANITIZER, useClass: NgDompurifySanitizer}';
|
30
30
|
if (standalone) {
|
31
31
|
ng_morph_1.addProviderToComponent(mainClass, provider, { unique: true });
|
32
32
|
}
|
@@ -38,7 +38,7 @@ function addExtraTuiProvidersToRootComponent({ mainClass, options, standalone =
|
|
38
38
|
});
|
39
39
|
}
|
40
40
|
function addTuiEntitiesToStandalone({ bootstrapFunction, options, context, }) {
|
41
|
-
const [rootComponentIdentifier, bootstrapOptions = bootstrapFunction.addArgument(
|
41
|
+
const [rootComponentIdentifier, bootstrapOptions = bootstrapFunction.addArgument('{providers}: []'),] = bootstrapFunction.getArguments();
|
42
42
|
const mainClass = get_component_from_identifier_1.getComponentFromIdentifier(rootComponentIdentifier);
|
43
43
|
const optionsObject = getOptionsObject(bootstrapOptions);
|
44
44
|
if (mainClass) {
|
@@ -48,16 +48,16 @@ function addTuiEntitiesToStandalone({ bootstrapFunction, options, context, }) {
|
|
48
48
|
}
|
49
49
|
}
|
50
50
|
function addRootTuiProvidersToBootstrapFn(bootstrapOptions) {
|
51
|
-
const property = bootstrapOptions.getProperty(
|
51
|
+
const property = bootstrapOptions.getProperty('providers');
|
52
52
|
const initializer = property.getInitializer();
|
53
53
|
const providerFrom = initializer
|
54
54
|
.getElements()
|
55
55
|
.find(el => ng_morph_1.Node.isCallExpression(el) &&
|
56
|
-
el.getExpression().getText() ===
|
56
|
+
el.getExpression().getText() === 'importProvidersFrom');
|
57
57
|
const provideAnimations = initializer
|
58
58
|
.getElements()
|
59
59
|
.find(el => ng_morph_1.Node.isCallExpression(el) &&
|
60
|
-
el.getExpression().getText() ===
|
60
|
+
el.getExpression().getText() === 'provideAnimations');
|
61
61
|
const modules = [modules_1.MAIN_MODULE];
|
62
62
|
if (ng_morph_1.Node.isCallExpression(providerFrom)) {
|
63
63
|
const existing = providerFrom.getArguments();
|
@@ -67,18 +67,18 @@ function addRootTuiProvidersToBootstrapFn(bootstrapOptions) {
|
|
67
67
|
providerFrom.addArguments(moduleNames);
|
68
68
|
}
|
69
69
|
else {
|
70
|
-
push_to_array_property_1.pushToObjectArrayProperty(bootstrapOptions,
|
70
|
+
push_to_array_property_1.pushToObjectArrayProperty(bootstrapOptions, 'providers', 'importProvidersFrom(TuiRootModule)');
|
71
71
|
}
|
72
72
|
if (!provideAnimations) {
|
73
73
|
modules.push({
|
74
|
-
name:
|
75
|
-
packageName:
|
74
|
+
name: 'provideAnimations',
|
75
|
+
packageName: '@angular/platform-browser/animations',
|
76
76
|
});
|
77
|
-
push_to_array_property_1.pushToObjectArrayProperty(bootstrapOptions,
|
77
|
+
push_to_array_property_1.pushToObjectArrayProperty(bootstrapOptions, 'providers', 'provideAnimations()', {
|
78
78
|
index: 0,
|
79
79
|
});
|
80
80
|
}
|
81
|
-
[...modules, { name:
|
81
|
+
[...modules, { name: 'importProvidersFrom', packageName: '@angular/core' }].forEach(({ name, packageName }) => {
|
82
82
|
add_unique_import_1.addUniqueImport(bootstrapOptions.getSourceFile().getFilePath(), name, packageName);
|
83
83
|
});
|
84
84
|
}
|
@@ -111,16 +111,16 @@ function addTaigaModules(options) {
|
|
111
111
|
const workspace = yield workspace_1.getWorkspace(tree);
|
112
112
|
const project = get_projects_1.getProjects(options, workspace)[0];
|
113
113
|
if (!project) {
|
114
|
-
context.logger.warn(
|
114
|
+
context.logger.warn('[WARNING]: Target project not found in current workspace');
|
115
115
|
return;
|
116
116
|
}
|
117
|
-
const buildOptions = get_project_target_options_1.getProjectTargetOptions(project,
|
117
|
+
const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
|
118
118
|
const mainFilePath = (buildOptions.main || buildOptions.browser);
|
119
119
|
if (!mainFilePath) {
|
120
|
-
context.logger.error(
|
120
|
+
context.logger.error('[ERROR]: Could not find the project main file');
|
121
121
|
return;
|
122
122
|
}
|
123
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(tree,
|
123
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(tree, '/', constants_1.ALL_FILES));
|
124
124
|
const bootstrapFunction = get_standalone_bootstrap_function_1.getStandaloneBootstrapFunction(mainFilePath);
|
125
125
|
if (bootstrapFunction) {
|
126
126
|
addTuiEntitiesToStandalone({
|
@@ -13,12 +13,12 @@ function addTuiRootComponent(filePath, context, tree) {
|
|
13
13
|
const buffer = tree.read(filePath);
|
14
14
|
if (!buffer) {
|
15
15
|
context.logger.error(`Could not read the default template file within the project ${filePath}`);
|
16
|
-
context.logger.info(
|
16
|
+
context.logger.info('Consider manually wrapping content of your app with tui-root');
|
17
17
|
return;
|
18
18
|
}
|
19
19
|
const htmlContent = buffer.toString();
|
20
|
-
const openTag =
|
21
|
-
const closeTag =
|
20
|
+
const openTag = '<tui-root>\n';
|
21
|
+
const closeTag = '\n</tui-root>';
|
22
22
|
if (htmlContent.includes(openTag)) {
|
23
23
|
return;
|
24
24
|
}
|
@@ -36,7 +36,7 @@ function getAppTemplatePath(mainPath) {
|
|
36
36
|
return component && getTemplatePathFromComponent(component);
|
37
37
|
}
|
38
38
|
const mainModule = ng_morph_1.getMainModule(mainPath);
|
39
|
-
const mainInitializer = getTemplateInitializer(mainModule,
|
39
|
+
const mainInitializer = getTemplateInitializer(mainModule, 'NgModule', 'declarations');
|
40
40
|
if (!ng_morph_1.Node.isArrayLiteralExpression(mainInitializer)) {
|
41
41
|
return;
|
42
42
|
}
|
@@ -45,11 +45,11 @@ function getAppTemplatePath(mainPath) {
|
|
45
45
|
return getTemplatePathFromComponent(appComponent);
|
46
46
|
}
|
47
47
|
function getTemplatePathFromComponent(component) {
|
48
|
-
const templateInitializer = getTemplateInitializer(component,
|
49
|
-
const appComponentPath = component.getSourceFile().getFilePath().split(
|
48
|
+
const templateInitializer = getTemplateInitializer(component, 'Component', 'templateUrl');
|
49
|
+
const appComponentPath = component.getSourceFile().getFilePath().split('/');
|
50
50
|
return `${appComponentPath
|
51
51
|
.splice(0, appComponentPath.length - 1)
|
52
|
-
.join(
|
52
|
+
.join('/')}/${templateInitializer === null || templateInitializer === void 0 ? void 0 : templateInitializer.getText().replace(/['"]/g, '')}`;
|
53
53
|
}
|
54
54
|
function getTemplateInitializer(classDeclaration, decoratorName, propertyName) {
|
55
55
|
const decorator = classDeclaration.getDecorator(decoratorName);
|
@@ -73,14 +73,14 @@ function wrapWithTuiRootComponent(options) {
|
|
73
73
|
if (!project) {
|
74
74
|
return;
|
75
75
|
}
|
76
|
-
const buildOptions = get_project_target_options_1.getProjectTargetOptions(project,
|
77
|
-
ng_morph_1.setActiveProject(ng_morph_1.createProject(tree,
|
76
|
+
const buildOptions = get_project_target_options_1.getProjectTargetOptions(project, 'build');
|
77
|
+
ng_morph_1.setActiveProject(ng_morph_1.createProject(tree, '/', constants_1.ALL_FILES));
|
78
78
|
const appTemplatePath = getAppTemplatePath(buildOptions.main);
|
79
79
|
ng_morph_1.saveActiveProject();
|
80
80
|
if (!appTemplatePath) {
|
81
|
-
context.logger.error(
|
82
|
-
context.logger.info(
|
83
|
-
context.logger.info(
|
81
|
+
context.logger.error('Could not find the default main template file for this project.');
|
82
|
+
context.logger.info('Consider manually wrapping content of your app with tui-root');
|
83
|
+
context.logger.info('More information at https://taiga-ui.dev/getting-started');
|
84
84
|
return;
|
85
85
|
}
|
86
86
|
addTuiRootComponent(appTemplatePath, context, tree);
|
@@ -27,9 +27,9 @@ function replaceImports(replaceable, options) {
|
|
27
27
|
add_unique_import_1.addUniqueImport(namedImport.getSourceFile().getFilePath(), to.namedImport || to.name, to.moduleSpecifier);
|
28
28
|
}
|
29
29
|
});
|
30
|
-
!options[
|
30
|
+
!options['skip-logs'] && progressLog('replacing imports...', true);
|
31
31
|
});
|
32
|
-
!options[
|
32
|
+
!options['skip-logs'] &&
|
33
33
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} imports replaced \n`);
|
34
34
|
}
|
35
35
|
exports.replaceImports = replaceImports;
|
@@ -6,10 +6,10 @@ const colored_log_1 = require("../../utils/colored-log");
|
|
6
6
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
7
7
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
8
8
|
function removeModules(options, modules) {
|
9
|
-
!options[
|
9
|
+
!options['skip-logs'] &&
|
10
10
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} removing modules...`);
|
11
11
|
modules.forEach(({ name, moduleSpecifier }) => removeModule(name, moduleSpecifier));
|
12
|
-
!options[
|
12
|
+
!options['skip-logs'] &&
|
13
13
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} modules removed \n`);
|
14
14
|
}
|
15
15
|
exports.removeModules = removeModules;
|
@@ -17,7 +17,7 @@ function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
|
|
17
17
|
}
|
18
18
|
else if (ng_morph_1.Node.isTypeReference(parent)) {
|
19
19
|
const targetType = preserveGenerics && to ? addGeneric(to, parent.getTypeArguments()) : to;
|
20
|
-
parent.replaceWithText(targetType ||
|
20
|
+
parent.replaceWithText(targetType || 'any');
|
21
21
|
}
|
22
22
|
});
|
23
23
|
}
|
@@ -32,18 +32,18 @@ function processImport(node, from, to) {
|
|
32
32
|
}
|
33
33
|
}
|
34
34
|
function removeGeneric(type) {
|
35
|
-
return type.replace(/<.*>$/gi,
|
35
|
+
return type.replace(/<.*>$/gi, '');
|
36
36
|
}
|
37
37
|
function addGeneric(typeName, generics) {
|
38
38
|
const typeArgs = generics.map(t => t.getType().getText());
|
39
|
-
const genericType = typeArgs.length ? `<${typeArgs.join(
|
39
|
+
const genericType = typeArgs.length ? `<${typeArgs.join(', ')}>` : '';
|
40
40
|
return typeName + genericType;
|
41
41
|
}
|
42
42
|
function renameTypes(options, types) {
|
43
|
-
!options[
|
43
|
+
!options['skip-logs'] &&
|
44
44
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} renaming types...`);
|
45
45
|
types.forEach(({ from, to, moduleSpecifier, preserveGenerics }) => renameType(from, to, moduleSpecifier, preserveGenerics));
|
46
|
-
!options[
|
46
|
+
!options['skip-logs'] &&
|
47
47
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} types renamed \n`);
|
48
48
|
}
|
49
49
|
exports.renameTypes = renameTypes;
|
@@ -6,17 +6,17 @@ const constants_1 = require("../../constants");
|
|
6
6
|
const colored_log_1 = require("../../utils/colored-log");
|
7
7
|
const DEEP_REGEX = /(@taiga-ui\/\w+)\/.*/;
|
8
8
|
function replaceDeepImports(options) {
|
9
|
-
if (options[
|
9
|
+
if (options['skip-deep-imports']) {
|
10
10
|
return;
|
11
11
|
}
|
12
|
-
!options[
|
12
|
+
!options['skip-logs'] &&
|
13
13
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing deep imports...`);
|
14
14
|
const deepImports = ng_morph_1.getImports(constants_1.ALL_TS_FILES).filter(imp => DEEP_REGEX.test(imp.getModuleSpecifier().getLiteralValue()));
|
15
15
|
ng_morph_1.editImports(deepImports, deepImport => {
|
16
|
-
const specifier = deepImport.moduleSpecifier.replace(DEEP_REGEX,
|
16
|
+
const specifier = deepImport.moduleSpecifier.replace(DEEP_REGEX, '$1');
|
17
17
|
return { moduleSpecifier: specifier };
|
18
18
|
});
|
19
|
-
!options[
|
19
|
+
!options['skip-logs'] &&
|
20
20
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} deep imports replaced \n`);
|
21
21
|
}
|
22
22
|
exports.replaceDeepImports = replaceDeepImports;
|
@@ -38,10 +38,10 @@ function containTypeRef(node) {
|
|
38
38
|
.some(ref => ng_morph_1.Node.isTypeReference(ref.getParent()));
|
39
39
|
}
|
40
40
|
function replaceEnums(options, enums) {
|
41
|
-
!options[
|
41
|
+
!options['skip-logs'] &&
|
42
42
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing enums imports...`);
|
43
43
|
enums.forEach(({ name, replaceValues, keepAsType }) => replaceEnumWithString(name, replaceValues, keepAsType));
|
44
|
-
!options[
|
44
|
+
!options['skip-logs'] &&
|
45
45
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} enums replaced \n`);
|
46
46
|
}
|
47
47
|
exports.replaceEnums = replaceEnums;
|
@@ -7,10 +7,10 @@ const colored_log_1 = require("../../utils/colored-log");
|
|
7
7
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
8
8
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
9
9
|
function replaceIdentifiers(options, constants) {
|
10
|
-
!options[
|
10
|
+
!options['skip-logs'] &&
|
11
11
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing identifiers...`);
|
12
12
|
constants.forEach(replaceIdentifier);
|
13
|
-
!options[
|
13
|
+
!options['skip-logs'] &&
|
14
14
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} identifiers replaced \n`);
|
15
15
|
}
|
16
16
|
exports.replaceIdentifiers = replaceIdentifiers;
|
@@ -7,7 +7,7 @@ const colored_log_1 = require("../../utils/colored-log");
|
|
7
7
|
const get_named_import_references_1 = require("../../utils/get-named-import-references");
|
8
8
|
const import_manipulations_1 = require("../../utils/import-manipulations");
|
9
9
|
function replaceService({ from, to, replaceMethods }, options) {
|
10
|
-
!options[
|
10
|
+
!options['skip-logs'] &&
|
11
11
|
colored_log_1.processLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.PROCESSING_SYMBOL}replacing ${from.name}...`);
|
12
12
|
const references = get_named_import_references_1.getNamedImportReferences(from.name, from.moduleSpecifier);
|
13
13
|
references.forEach(ref => {
|
@@ -32,7 +32,7 @@ function replaceProperties(parent, replaceProperties) {
|
|
32
32
|
identifier === null || identifier === void 0 ? void 0 : identifier.findReferencesAsNodes().forEach(ref => {
|
33
33
|
let parent = ref.getParent();
|
34
34
|
if ((ng_morph_1.Node.isPropertyAccessExpression(parent) &&
|
35
|
-
parent.getText().startsWith(
|
35
|
+
parent.getText().startsWith('this.')) ||
|
36
36
|
ng_morph_1.Node.isCallExpression(parent)) {
|
37
37
|
parent = parent.getParentIfKind(ng_morph_1.SyntaxKind.PropertyAccessExpression);
|
38
38
|
}
|
@@ -51,10 +51,10 @@ function replaceProperty(node, properties) {
|
|
51
51
|
});
|
52
52
|
}
|
53
53
|
function replaceServices(options, services) {
|
54
|
-
!options[
|
54
|
+
!options['skip-logs'] &&
|
55
55
|
colored_log_1.infoLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.REPLACE_SYMBOL} replacing services...`);
|
56
56
|
services.forEach(service => replaceService(service, options));
|
57
|
-
!options[
|
57
|
+
!options['skip-logs'] &&
|
58
58
|
colored_log_1.successLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SUCCESS_SYMBOL} services replaced \n`);
|
59
59
|
}
|
60
60
|
exports.replaceServices = replaceServices;
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.showWarnings = void 0;
|
4
4
|
const ng_morph_1 = require("ng-morph");
|
5
5
|
const constants_1 = require("../../constants");
|
6
|
-
function showWarning({ name, message, moduleSpecifier =
|
6
|
+
function showWarning({ name, message, moduleSpecifier = '**/**' }, { logger }) {
|
7
7
|
const references = ng_morph_1.getImports(constants_1.ALL_TS_FILES, {
|
8
8
|
moduleSpecifier,
|
9
9
|
namedImports: [name],
|
@@ -8,7 +8,7 @@ function replaceText(replaceable, pattern = constants_1.ALL_FILES) {
|
|
8
8
|
sourceFiles.forEach(file => {
|
9
9
|
let text = file.getFullText();
|
10
10
|
replaceable.forEach(({ from, to }) => {
|
11
|
-
const regexp = new RegExp(from,
|
11
|
+
const regexp = new RegExp(from, 'g');
|
12
12
|
if (text.match(regexp)) {
|
13
13
|
text = text.replace(regexp, to);
|
14
14
|
}
|
@@ -12,6 +12,6 @@ function replaceTag(recorder, sourceCodeLocation, from, to, templateOffset = 0,
|
|
12
12
|
recorder.insertRight(endTagOffset + templateOffset + END_TAG_OFFSET, to);
|
13
13
|
}
|
14
14
|
recorder.remove((startTagOffset !== null && startTagOffset !== void 0 ? startTagOffset : 0) + templateOffset + START_TAG_OFFSET, from.length);
|
15
|
-
recorder.insertRight((startTagOffset !== null && startTagOffset !== void 0 ? startTagOffset : 0) + templateOffset + START_TAG_OFFSET, `${to} ${addAttributes.join(
|
15
|
+
recorder.insertRight((startTagOffset !== null && startTagOffset !== void 0 ? startTagOffset : 0) + templateOffset + START_TAG_OFFSET, `${to} ${addAttributes.join(' ')}`);
|
16
16
|
}
|
17
17
|
exports.replaceTag = replaceTag;
|
@@ -3,32 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEPRECATED_BREAKPOINTS = void 0;
|
4
4
|
exports.DEPRECATED_BREAKPOINTS = [
|
5
5
|
// all previously actual breakpoints
|
6
|
-
{ from:
|
7
|
-
{ from:
|
8
|
-
{ from:
|
9
|
-
{ from:
|
10
|
-
{ from:
|
11
|
-
{ from:
|
12
|
-
{ from:
|
13
|
-
{ from:
|
14
|
-
{ from:
|
15
|
-
{ from:
|
16
|
-
{ from:
|
17
|
-
{ from:
|
18
|
-
{ from:
|
19
|
-
{ from:
|
6
|
+
{ from: '@media-retina', to: '@tui-media-retina' },
|
7
|
+
{ from: '@media-retina-mobile', to: '@tui-media-retina-mobile' },
|
8
|
+
{ from: '@media-retina-tablet', to: '@tui-media-retina-tablet' },
|
9
|
+
{ from: '@media-retina-desktop', to: '@tui-media-retina-desktop' },
|
10
|
+
{ from: '@mobile-m', to: '@tui-mobile' },
|
11
|
+
{ from: '@mobile-m-min', to: '@tui-mobile-min' },
|
12
|
+
{ from: '@mobile-m-interval', to: '@tui-mobile-interval' },
|
13
|
+
{ from: '@tablet-lg', to: '@tui-tablet' },
|
14
|
+
{ from: '@tablet-lg-min', to: '@tui-tablet-min' },
|
15
|
+
{ from: '@tablet-lg-interval', to: '@tui-tablet-interval' },
|
16
|
+
{ from: '@desktop-s', to: '@tui-desktop' },
|
17
|
+
{ from: '@desktop-s-min', to: '@tui-desktop-min' },
|
18
|
+
{ from: '@desktop-s-interval', to: '@tui-desktop-interval' },
|
19
|
+
{ from: '@desktop-m-min', to: '@tui-desktop-lg-min' },
|
20
20
|
// legacy breakpoints
|
21
|
-
{ from:
|
22
|
-
{ from:
|
23
|
-
{ from:
|
24
|
-
{ from:
|
25
|
-
{ from:
|
26
|
-
{ from:
|
27
|
-
{ from:
|
28
|
-
{ from:
|
29
|
-
{ from:
|
30
|
-
{ from:
|
31
|
-
{ from:
|
32
|
-
{ from:
|
33
|
-
{ from:
|
21
|
+
{ from: '@mobile', to: '@tui-mobile' },
|
22
|
+
{ from: '@mobile-min', to: '@tui-mobile-min' },
|
23
|
+
{ from: '@mobile-interval', to: '@tui-mobile-interval' },
|
24
|
+
{ from: '@tablet-s', to: '@tui-mobile' },
|
25
|
+
{ from: '@tablet-s-min', to: '@tui-mobile-min' },
|
26
|
+
{ from: '@tablet-s-interval', to: '@tui-mobile-interval' },
|
27
|
+
{ from: '@tablet', to: '@tui-tablet' },
|
28
|
+
{ from: '@tablet-min', to: '@tui-tablet-min' },
|
29
|
+
{ from: '@tablet-interval', to: '@tui-tablet-interval' },
|
30
|
+
{ from: '@desktop', to: '@tui-desktop' },
|
31
|
+
{ from: '@desktop-min', to: '@tui-desktop-min' },
|
32
|
+
{ from: '@desktop-interval', to: '@tui-desktop-interval' },
|
33
|
+
{ from: '@desktop-lg-min', to: '@tui-desktop-lg-min' },
|
34
34
|
];
|