@taiga-ui/cdk 4.52.0-canary.bf9131e → 4.52.0-canary.c8448e0
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/README.md +1 -1
- package/classes/control.d.ts +4 -6
- package/constants/empty.d.ts +0 -9
- package/constants/handlers.d.ts +2 -0
- package/constants/used-icons.d.ts +2 -2
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/date-time/date-fillers.d.ts +5 -5
- package/date-time/day-range.d.ts +1 -1
- package/date-time/day.d.ts +3 -3
- package/date-time/types.d.ts +1 -7
- package/directives/active-zone/active-zone.directive.d.ts +0 -3
- package/directives/animated/animated.directive.d.ts +1 -3
- package/directives/animated/index.d.ts +0 -1
- package/directives/auto-focus/autofocus.directive.d.ts +2 -3
- package/directives/copy-processor/copy-processor.directive.d.ts +2 -2
- package/directives/hovered/hovered.directive.d.ts +1 -2
- package/directives/index.d.ts +0 -5
- package/directives/media/media.directive.d.ts +8 -12
- package/directives/native-validator/native-validator.directive.d.ts +2 -2
- package/directives/obscured/obscured.directive.d.ts +4 -4
- package/directives/pan/pan.directive.d.ts +1 -2
- package/directives/platform/platform.directive.d.ts +2 -2
- package/directives/resizer/resizer.directive.d.ts +3 -4
- package/directives/swipe/swipe.directive.d.ts +1 -2
- package/directives/transitioned/transitioned.directive.d.ts +1 -0
- package/directives/value-changes/value-changes.directive.d.ts +3 -3
- package/fesm2022/taiga-ui-cdk-classes.mjs +8 -20
- package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-constants.mjs +16 -14
- package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs +23 -24
- package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +16 -28
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs +23 -72
- package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +12 -14
- package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-control.mjs +3 -4
- package/fesm2022/taiga-ui-cdk-directives-control.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +8 -11
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs +4 -5
- package/fesm2022/taiga-ui-cdk-directives-element.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +5 -8
- package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs +4 -7
- package/fesm2022/taiga-ui-cdk-directives-font-size.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +3 -4
- package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +11 -14
- package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-item.mjs +3 -4
- package/fesm2022/taiga-ui-cdk-directives-item.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-media.mjs +33 -58
- package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +9 -11
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +14 -26
- package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs +10 -12
- package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs +9 -12
- package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +19 -23
- package/fesm2022/taiga-ui-cdk-directives-resizer.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +10 -12
- package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs +8 -15
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs +4 -5
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +12 -12
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +5 -5
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-with-styles.mjs +3 -3
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +8 -8
- package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives.mjs +0 -5
- package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-observables.mjs +2 -24
- package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +3 -4
- package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs +3 -4
- package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +5 -5
- package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-pipes.mjs +0 -6
- package/fesm2022/taiga-ui-cdk-pipes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-portals.mjs +16 -16
- package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-tokens.mjs +14 -47
- package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs +3 -26
- package/fesm2022/taiga-ui-cdk-utils-browser.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-di.mjs +45 -4
- package/fesm2022/taiga-ui-cdk-utils-di.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs +2 -74
- package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-focus.mjs +22 -38
- package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-math.mjs +13 -21
- package/fesm2022/taiga-ui-cdk-utils-math.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +45 -202
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils.mjs +0 -1
- package/fesm2022/taiga-ui-cdk-utils.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk.mjs +0 -1
- package/fesm2022/taiga-ui-cdk.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/observables/index.d.ts +0 -2
- package/package.json +11 -61
- package/pipes/index.d.ts +0 -6
- package/pipes/obfuscate/obfuscate.options.d.ts +1 -1
- package/portals/portal.d.ts +1 -2
- package/schematics/index.d.ts +5 -0
- package/schematics/index.js +4 -0
- package/schematics/index.js.map +1 -1
- package/schematics/ng-add/constants/versions.d.ts +1 -1
- package/schematics/ng-add/steps/add-taiga-modules.js +0 -15
- package/schematics/ng-add/steps/add-taiga-modules.js.map +1 -1
- package/schematics/ng-update/interfaces/html-comment.d.ts +1 -1
- package/schematics/ng-update/interfaces/removable-input.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute-to-directive.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute-value.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-attribute.d.ts +1 -1
- package/schematics/ng-update/interfaces/replacement-tag.d.ts +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/palette.d.ts +4 -4
- package/schematics/ng-update/v4/migrate-css-vars/palette.js +4 -4
- package/schematics/ng-update/v4/migrate-css-vars/palette.js.map +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +1 -1
- package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js.map +1 -1
- package/schematics/ng-update/v4/steps/migrate-templates.d.ts +2 -2
- package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js +1 -1
- package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js.map +1 -1
- package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.js +13 -13
- package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.js.map +1 -1
- package/schematics/ng-update/v5/index.js +7 -0
- package/schematics/ng-update/v5/index.js.map +1 -1
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.js +26 -0
- package/schematics/ng-update/v5/steps/constants/attrs-to-replace.js.map +1 -0
- package/schematics/ng-update/v5/steps/constants/functions.js +37 -6
- package/schematics/ng-update/v5/steps/constants/functions.js.map +1 -1
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.d.ts +2 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js +32 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.js.map +1 -0
- package/schematics/ng-update/v5/steps/migrate-css-variables.d.ts +3 -0
- package/schematics/ng-update/v5/steps/migrate-css-variables.js +30 -0
- package/schematics/ng-update/v5/steps/migrate-css-variables.js.map +1 -0
- package/schematics/ng-update/v5/steps/migrate-templates.d.ts +2 -2
- package/schematics/ng-update/v5/steps/migrate-templates.js +8 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -1
- package/schematics/ng-update/v5/steps/migrate-tui-let.d.ts +3 -0
- package/schematics/ng-update/v5/steps/migrate-tui-let.js +95 -0
- package/schematics/ng-update/v5/steps/migrate-tui-let.js.map +1 -0
- package/schematics/ng-update/v5/steps/templates/migrate-avatar.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-avatar.js +111 -0
- package/schematics/ng-update/v5/steps/templates/migrate-avatar.js.map +1 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.js +52 -0
- package/schematics/ng-update/v5/steps/templates/migrate-input-year.js.map +1 -0
- package/schematics/ng-update/v5/steps/templates/migrate-notification.d.ts +8 -0
- package/schematics/ng-update/v5/steps/templates/migrate-notification.js +45 -0
- package/schematics/ng-update/v5/steps/templates/migrate-notification.js.map +1 -0
- package/schematics/utils/run-migration.d.ts +14 -0
- package/schematics/utils/run-migration.js +27 -0
- package/schematics/utils/run-migration.js.map +1 -0
- package/schematics/utils/templates/elements.d.ts +4 -1
- package/schematics/utils/templates/elements.js.map +1 -1
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +3 -3
- package/tokens/environment.d.ts +0 -13
- package/tokens/index.d.ts +0 -2
- package/tokens/removed-element.d.ts +0 -3
- package/types/index.d.ts +0 -3
- package/utils/browser/index.d.ts +0 -2
- package/utils/di/index.d.ts +3 -0
- package/utils/dom/index.d.ts +0 -6
- package/utils/focus/get-closest-focusable.d.ts +1 -6
- package/utils/focus/index.d.ts +4 -6
- package/utils/focus/{is-native-keyboard-focusable.d.ts → is-focusable.d.ts} +1 -1
- package/utils/index.d.ts +0 -1
- package/utils/math/clamp.d.ts +1 -5
- package/utils/math/index.d.ts +0 -2
- package/utils/miscellaneous/generate-id.d.ts +1 -0
- package/utils/miscellaneous/index.d.ts +2 -11
- package/utils/miscellaneous/sanitize-text.d.ts +23 -0
- package/directives/animated/animated-parent.directive.d.ts +0 -10
- package/directives/click-outside/click-outside.directive.d.ts +0 -14
- package/directives/click-outside/index.d.ts +0 -1
- package/directives/droppable/droppable.directive.d.ts +0 -8
- package/directives/droppable/index.d.ts +0 -1
- package/directives/let/index.d.ts +0 -2
- package/directives/let/let-context.d.ts +0 -11
- package/directives/let/let.directive.d.ts +0 -18
- package/directives/popover/index.d.ts +0 -1
- package/directives/popover/popover.directive.d.ts +0 -14
- package/directives/repeat-times/index.d.ts +0 -1
- package/directives/repeat-times/repeat-times.directive.d.ts +0 -22
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +0 -39
- package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +0 -37
- package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-let.mjs +0 -53
- package/fesm2022/taiga-ui-cdk-directives-let.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-popover.mjs +0 -32
- package/fesm2022/taiga-ui-cdk-directives-popover.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +0 -61
- package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs +0 -33
- package/fesm2022/taiga-ui-cdk-pipes-animation.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs +0 -25
- package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs +0 -24
- package/fesm2022/taiga-ui-cdk-pipes-keys.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +0 -25
- package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs +0 -26
- package/fesm2022/taiga-ui-cdk-pipes-replace.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs +0 -24
- package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-services.mjs +0 -151
- package/fesm2022/taiga-ui-cdk-services.mjs.map +0 -1
- package/fesm2022/taiga-ui-cdk-utils-color.mjs +0 -195
- package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +0 -1
- package/observables/must-be-present.d.ts +0 -5
- package/observables/query-list-observable.d.ts +0 -6
- package/pipes/animation/animation.pipe.d.ts +0 -13
- package/pipes/animation/index.d.ts +0 -1
- package/pipes/is-present/index.d.ts +0 -1
- package/pipes/is-present/is-present.pipe.d.ts +0 -7
- package/pipes/keys/index.d.ts +0 -1
- package/pipes/keys/keys.pipe.d.ts +0 -7
- package/pipes/repeat-times/index.d.ts +0 -7
- package/pipes/replace/index.d.ts +0 -1
- package/pipes/replace/replace.pipe.d.ts +0 -7
- package/pipes/to-array/index.d.ts +0 -1
- package/pipes/to-array/to-array.pipe.d.ts +0 -7
- package/schematics/migrate-tui-let/index.d.ts +0 -3
- package/schematics/migrate-tui-let/index.js +0 -73
- package/schematics/migrate-tui-let/index.js.map +0 -1
- package/schematics/migrate-tui-let/schema.json +0 -7
- package/services/id.service.d.ts +0 -8
- package/services/index.d.ts +0 -4
- package/services/popover.service.d.ts +0 -25
- package/services/scroll.service.d.ts +0 -13
- package/services/theme-color.service.d.ts +0 -18
- package/tokens/base-href.d.ts +0 -2
- package/tokens/range.d.ts +0 -5
- package/types/loose-union.d.ts +0 -36
- package/types/safe-html.d.ts +0 -2
- package/types/values-of.d.ts +0 -1
- package/utils/browser/is-apple.d.ts +0 -11
- package/utils/browser/is-ios.d.ts +0 -6
- package/utils/color/get-gradient-data.d.ts +0 -1
- package/utils/color/hex-to-rgb.d.ts +0 -1
- package/utils/color/hex-to-rgba.d.ts +0 -3
- package/utils/color/hsv-to-rgb.d.ts +0 -4
- package/utils/color/index.d.ts +0 -9
- package/utils/color/parse-color.d.ts +0 -1
- package/utils/color/parse-gradient.d.ts +0 -10
- package/utils/color/rgb-to-hex.d.ts +0 -1
- package/utils/color/rgb-to-hsv.d.ts +0 -1
- package/utils/color/rgba-to-hex.d.ts +0 -2
- package/utils/dom/get-element-point.d.ts +0 -2
- package/utils/dom/is-current-target.d.ts +0 -1
- package/utils/dom/is-inside-iframe.d.ts +0 -4
- package/utils/dom/is-node-in.d.ts +0 -8
- package/utils/dom/retarget-boundary-crossing.d.ts +0 -1
- package/utils/dom/value-binding.d.ts +0 -3
- package/utils/focus/blur-native-focused.d.ts +0 -4
- package/utils/focus/is-native-mouse-focusable.d.ts +0 -1
- package/utils/math/to-integer.d.ts +0 -1
- package/utils/math/to-radians.d.ts +0 -4
- package/utils/miscellaneous/change-date-separator.d.ts +0 -1
- package/utils/miscellaneous/create-token.d.ts +0 -9
- package/utils/miscellaneous/flat-length.d.ts +0 -6
- package/utils/miscellaneous/get-original-array-from-query-list.d.ts +0 -8
- package/utils/miscellaneous/is-falsy.d.ts +0 -1
- package/utils/miscellaneous/is-valid-url.d.ts +0 -4
- package/utils/miscellaneous/pure.d.ts +0 -22
- package/utils/miscellaneous/uniq-by.d.ts +0 -1
- /package/utils/{miscellaneous → di}/directive-binding.d.ts +0 -0
- /package/utils/{miscellaneous → di}/provide-options.d.ts +0 -0
- /package/utils/{miscellaneous → di}/provide.d.ts +0 -0
- /package/utils/focus/{get-native-focused.d.ts → get-focused.d.ts} +0 -0
- /package/utils/focus/{is-native-focused-in.d.ts → is-focused-in.d.ts} +0 -0
- /package/utils/focus/{is-native-focused.d.ts → is-focused.d.ts} +0 -0
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = tuiLetMigrationGenerator;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
6
|
-
const ng_morph_1 = require("ng-morph");
|
|
7
|
-
const constants_1 = require("../constants");
|
|
8
|
-
const get_projects_1 = require("../utils/get-projects");
|
|
9
|
-
const remove_module_1 = require("../utils/remove-module");
|
|
10
|
-
const elements_1 = require("../utils/templates/elements");
|
|
11
|
-
const get_component_templates_1 = require("../utils/templates/get-component-templates");
|
|
12
|
-
const template_resource_1 = require("../utils/templates/template-resource");
|
|
13
|
-
// TODO: move to migration in v5
|
|
14
|
-
function tuiLetMigrationGenerator(options) {
|
|
15
|
-
return (tree) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
var _a;
|
|
17
|
-
const workspace = yield (0, workspace_1.getWorkspace)(tree);
|
|
18
|
-
const [project] = (0, get_projects_1.getProjects)(options, workspace);
|
|
19
|
-
const root = (_a = project === null || project === void 0 ? void 0 : project.root) !== null && _a !== void 0 ? _a : project === null || project === void 0 ? void 0 : project.sourceRoot;
|
|
20
|
-
if (root === undefined) {
|
|
21
|
-
!options['skip-logs'] &&
|
|
22
|
-
(0, ng_morph_1.errorLog)('[ERROR]: Target project not found in current workspace');
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const prj = (0, ng_morph_1.createProject)(tree, root, constants_1.ALL_FILES);
|
|
26
|
-
const fileSystem = prj.getFileSystem().fs;
|
|
27
|
-
(0, ng_morph_1.setActiveProject)(prj);
|
|
28
|
-
(0, remove_module_1.removeModule)('TuiLet', '@taiga-ui/cdk');
|
|
29
|
-
const resources = (0, get_component_templates_1.getComponentTemplates)(constants_1.ALL_FILES);
|
|
30
|
-
for (const resource of resources) {
|
|
31
|
-
const path = fileSystem.resolve((0, template_resource_1.getPathFromTemplateResource)(resource));
|
|
32
|
-
const recorder = fileSystem.edit(path);
|
|
33
|
-
const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
|
|
34
|
-
const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
|
|
35
|
-
const attributeName = '*tuiLet';
|
|
36
|
-
const elements = (0, elements_1.findElementsWithAttribute)(template, attributeName);
|
|
37
|
-
for (const { sourceCodeLocation, attrs, tagName, childNodes } of elements) {
|
|
38
|
-
const { name, value } = attrs.find((attr) => attr.name === attributeName.toLowerCase());
|
|
39
|
-
const indent = sourceCodeLocation.startOffset -
|
|
40
|
-
(template.lastIndexOf('\n', sourceCodeLocation.startOffset) + 1);
|
|
41
|
-
const indentStr = ' '.repeat(indent);
|
|
42
|
-
const [expr, key] = value.split(' as ').map((c) => c.trim());
|
|
43
|
-
if (new RegExp(`@let\\s+${key}\\s+=`).test(template)) {
|
|
44
|
-
!options['skip-logs'] &&
|
|
45
|
-
(0, ng_morph_1.errorLog)(`The @let with key ${key} is already defined`);
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
recorder.insertLeft(templateOffset + sourceCodeLocation.startOffset, `@let ${key} = ${expr};\n${indentStr}`);
|
|
49
|
-
if (tagName === 'ng-container' && attrs.length === 1) {
|
|
50
|
-
if (childNodes.length) {
|
|
51
|
-
const firstNode = childNodes[0];
|
|
52
|
-
const lastNode = childNodes[0];
|
|
53
|
-
recorder.remove(templateOffset + sourceCodeLocation.startOffset, firstNode.sourceCodeLocation.startOffset -
|
|
54
|
-
sourceCodeLocation.startOffset);
|
|
55
|
-
recorder.remove(templateOffset + lastNode.sourceCodeLocation.endOffset, sourceCodeLocation.endOffset -
|
|
56
|
-
lastNode.sourceCodeLocation.endOffset);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
recorder.remove(templateOffset + sourceCodeLocation.startOffset, sourceCodeLocation.endOffset -
|
|
60
|
-
sourceCodeLocation.startOffset);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
const { startOffset, endOffset } = sourceCodeLocation.attrs[name];
|
|
65
|
-
recorder.remove(templateOffset + startOffset - 1, endOffset - startOffset + 1);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
fileSystem.commitEdits();
|
|
70
|
-
(0, ng_morph_1.saveActiveProject)();
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/cdk/schematics/migrate-tui-let/index.ts"],"names":[],"mappings":";;AAiBA,2CA4FC;;AA5GD,qEAAmE;AACnE,uCAAsF;AAEtF,4CAAuC;AAEvC,wDAAkD;AAClD,0DAAoD;AACpD,0DAAsE;AACtE,wFAAiF;AACjF,4EAI8C;AAE9C,gCAAgC;AAChC,SAAwB,wBAAwB,CAAC,OAAkB;IAC/D,OAAO,CAAO,IAAU,EAAiB,EAAE;;QACvC,MAAM,SAAS,GAAG,MAAM,IAAA,wBAAY,EAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,CAAC,OAAO,CAAC,GAAG,IAAA,0BAAW,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAElD,MAAM,IAAI,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC;QAElD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,CAAC,OAAO,CAAC,WAAW,CAAC;gBACjB,IAAA,mBAAQ,EAAC,wDAAwD,CAAC,CAAC;YAEvE,OAAO;QACX,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,wBAAa,EAAC,IAAI,EAAE,IAAI,EAAE,qBAAS,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,GAAG,CAAC,aAAa,EAAE,CAAC,EAAE,CAAC;QAE1C,IAAA,2BAAgB,EAAC,GAAG,CAAC,CAAC;QAEtB,IAAA,4BAAY,EAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;QAExC,MAAM,SAAS,GAAG,IAAA,+CAAqB,EAAC,qBAAS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WAAW,EAAE,CAAC;QACzB,IAAA,4BAAiB,GAAE,CAAC;IACxB,CAAC,CAAA,CAAC;AACN,CAAC"}
|
package/services/id.service.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class TuiIdService {
|
|
3
|
-
private static autoId;
|
|
4
|
-
generate(): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiIdService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiIdService>;
|
|
7
|
-
}
|
|
8
|
-
export declare function tuiInjectId(): string;
|
package/services/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Provider, type ProviderToken, type Type } from '@angular/core';
|
|
2
|
-
import { type TuiContext } from '@taiga-ui/cdk/types';
|
|
3
|
-
import { PolymorpheusComponent, type PolymorpheusContent } from '@taiga-ui/polymorpheus';
|
|
4
|
-
import { type BehaviorSubject, Observable, type Observer } from 'rxjs';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export interface TuiPopoverContext<O> extends TuiContext<Observer<O>> {
|
|
7
|
-
readonly component: PolymorpheusComponent<any>;
|
|
8
|
-
readonly createdAt: number;
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly completeWith: (value: O) => void;
|
|
11
|
-
}
|
|
12
|
-
export type TuiPopover<T, O> = T & TuiPopoverContext<O> & {
|
|
13
|
-
content: PolymorpheusContent<T & TuiPopoverContext<O>>;
|
|
14
|
-
};
|
|
15
|
-
export declare abstract class TuiPopoverService<T, K = void> {
|
|
16
|
-
protected readonly options: T;
|
|
17
|
-
private readonly component;
|
|
18
|
-
private readonly id;
|
|
19
|
-
protected readonly items$: BehaviorSubject<ReadonlyArray<TuiPopover<T, any>>>;
|
|
20
|
-
constructor(items: ProviderToken<BehaviorSubject<ReadonlyArray<TuiPopover<T, any>>>>, component: Type<any>, options?: T);
|
|
21
|
-
open<G = void>(content: PolymorpheusContent<T & TuiPopoverContext<K extends void ? G : K>>, options?: Partial<T>): Observable<K extends void ? G : K>;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiPopoverService<any, any>, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiPopoverService<any, any>>;
|
|
24
|
-
}
|
|
25
|
-
export declare function tuiAsPopover(popover: Type<TuiPopoverService<any>>): Provider;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Observable } from 'rxjs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated: use native scroll
|
|
5
|
-
*/
|
|
6
|
-
export declare class TuiScrollService {
|
|
7
|
-
private readonly performanceRef;
|
|
8
|
-
private readonly animationFrame$;
|
|
9
|
-
private readonly zone;
|
|
10
|
-
scroll$(elementOrWindow: Element | Window, scrollTop: number, scrollLeft?: number, duration?: number): Observable<[number, number]>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiScrollService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiScrollService>;
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare const TUI_THEME_COLOR: InjectionToken<string>;
|
|
4
|
-
interface TuiThemeColor {
|
|
5
|
-
get color(): string;
|
|
6
|
-
set color(value: string);
|
|
7
|
-
}
|
|
8
|
-
export declare class TuiThemeColorService implements TuiThemeColor {
|
|
9
|
-
private current;
|
|
10
|
-
private readonly doc;
|
|
11
|
-
private readonly meta;
|
|
12
|
-
constructor();
|
|
13
|
-
get color(): string;
|
|
14
|
-
set color(content: string);
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiThemeColorService, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<TuiThemeColorService>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
package/tokens/base-href.d.ts
DELETED
package/tokens/range.d.ts
DELETED
package/types/loose-union.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* type Color = 'primary' | 'secondary' | string;
|
|
4
|
-
*
|
|
5
|
-
* Your brand has some known colors, like `primary` and `secondary`.
|
|
6
|
-
* But you also want to make sure that users can specify any color they want.
|
|
7
|
-
*
|
|
8
|
-
* @Input() color: Color = '';
|
|
9
|
-
*
|
|
10
|
-
* <my-icon color="red" />
|
|
11
|
-
*
|
|
12
|
-
* But there's an issue. We aren't getting `color`
|
|
13
|
-
* suggestions when we use the `MyIcon` component.
|
|
14
|
-
* If we try to autocomplete the `color` prop, we get no suggestions.
|
|
15
|
-
* Ideally, we want `primary` and `secondary` to be part of that list.
|
|
16
|
-
* How do we manage that?
|
|
17
|
-
*
|
|
18
|
-
* This works because of a quirk of the TypeScript compiler.
|
|
19
|
-
* When you create a union between a string literal type and `string`,
|
|
20
|
-
* TypeScript will eagerly widen the type to `string`.
|
|
21
|
-
*
|
|
22
|
-
* But if we change type to
|
|
23
|
-
* type Color = 'primary' | 'secondary' | (string & {});
|
|
24
|
-
*
|
|
25
|
-
* TypeScript has already forgotten that `"primary"` and `"secondary"`
|
|
26
|
-
* were ever part of the type. But by intersecting `string` with
|
|
27
|
-
* an empty object, we trick TypeScript into retaining the string
|
|
28
|
-
* literal types for a bit longer.
|
|
29
|
-
*
|
|
30
|
-
* This might feel pretty fragile to you. This doesn't seem like
|
|
31
|
-
* intended behavior from TypeScript. Well, the team actually
|
|
32
|
-
* know about this trick. They test against it. And someday, they may make
|
|
33
|
-
* it so that a plain `string` type will just work.
|
|
34
|
-
* But until then, keep this in mind.
|
|
35
|
-
*/
|
|
36
|
-
export type TuiLooseUnion<U> = U | (U extends string ? Record<never, never> & string : U extends number ? Record<never, never> & number : U extends symbol ? Record<never, never> & symbol : U extends bigint ? Record<never, never> & bigint : never);
|
package/types/safe-html.d.ts
DELETED
package/types/values-of.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type TuiValuesOf<T> = T[keyof T];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description:
|
|
3
|
-
* All Chrome / Chromium-based browsers will return MacIntel on macOS,
|
|
4
|
-
* no matter what the hardware architecture is. See the source code here:
|
|
5
|
-
* https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/navigator_id.cc;l=64;drc=703d3c472cf27470dad21a3f2c8972aca3732cd6
|
|
6
|
-
* But maybe in future years, it will be changed to MacM1
|
|
7
|
-
*
|
|
8
|
-
* Documentation:
|
|
9
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
|
|
10
|
-
*/
|
|
11
|
-
export declare function tuiIsApple(navigator: Navigator): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiGetGradientData(gradient: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiHexToRgb(hex: string): [number, number, number];
|
package/utils/color/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './get-gradient-data';
|
|
2
|
-
export * from './hex-to-rgb';
|
|
3
|
-
export * from './hex-to-rgba';
|
|
4
|
-
export * from './hsv-to-rgb';
|
|
5
|
-
export * from './parse-color';
|
|
6
|
-
export * from './parse-gradient';
|
|
7
|
-
export * from './rgb-to-hex';
|
|
8
|
-
export * from './rgb-to-hsv';
|
|
9
|
-
export * from './rgba-to-hex';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiParseColor(color: string): [number, number, number, number];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface TuiParsedGradient {
|
|
2
|
-
readonly side: TuiGradientDirection;
|
|
3
|
-
readonly stops: ReadonlyArray<{
|
|
4
|
-
readonly color: string;
|
|
5
|
-
readonly position: string;
|
|
6
|
-
}>;
|
|
7
|
-
}
|
|
8
|
-
export type TuiGradientDirection = 'to bottom left' | 'to bottom right' | 'to bottom' | 'to left' | 'to right' | 'to top left' | 'to top right' | 'to top';
|
|
9
|
-
export declare function tuiParseGradient(input: string): TuiParsedGradient;
|
|
10
|
-
export declare function tuiToGradient({ stops, side }: TuiParsedGradient): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiRgbToHex(r: number, g: number, b: number): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiRgbToHsv(r: number, g: number, b: number): [number, number, number];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiIsCurrentTarget({ target, currentTarget }: Event): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiRetargetedBoundaryCrossing(event: Event): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiIsMouseFocusable(element: Element): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiToInteger(value: number | string): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const changeDateSeparator: (dateString: string, newDateSeparator: string) => string;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated: drop in v5.0
|
|
4
|
-
*/
|
|
5
|
-
export declare function tuiCreateToken<T>(defaults?: T): InjectionToken<T>;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated: drop in v5.0
|
|
8
|
-
*/
|
|
9
|
-
export declare function tuiCreateTokenFromFactory<T>(factory?: () => T): InjectionToken<T>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type QueryList } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* Extracts original array from {@link QueryList} rather than
|
|
4
|
-
* creating a copy like {@link QueryList.toArray} does.
|
|
5
|
-
* @param queryList
|
|
6
|
-
* @returns original array from {@link QueryList}.
|
|
7
|
-
*/
|
|
8
|
-
export declare function tuiGetOriginalArrayFromQueryList<T>(queryList: QueryList<T>): readonly T[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiIsFalsy(value: unknown): boolean;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Implements lazy initialization for getter or memoization of a function call similar to pure {@link: Pipe}.
|
|
3
|
-
* Replaces getter with its calculated value upon first call or keeps track of last call arguments and returned
|
|
4
|
-
* value for function, skipping calculation when arguments are strictly the same.
|
|
5
|
-
*
|
|
6
|
-
* @throws error if used not on getter or function
|
|
7
|
-
*
|
|
8
|
-
* CAUTION: they must be pure.
|
|
9
|
-
* TODO(v5): drop compatibility for legacy "experimentalDecorators": true
|
|
10
|
-
*/
|
|
11
|
-
export declare function tuiPure<T>(target: object, propertyKey: string, { get, enumerable, value }: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T>;
|
|
12
|
-
/**
|
|
13
|
-
* Implements lazy initialization for getter or memoization of a function call similar to pure {@link: Pipe}.
|
|
14
|
-
* Replaces getter with its calculated value upon first call or keeps track of last call arguments and returned
|
|
15
|
-
* value for function, skipping calculation when arguments are strictly the same.
|
|
16
|
-
*
|
|
17
|
-
* CAUTION: they must be pure.
|
|
18
|
-
*/
|
|
19
|
-
export declare function tuiPure<A extends unknown[], R>(target: (...args: A) => R, context: ClassGetterDecoratorContext | ClassMethodDecoratorContext): (...args: A) => R;
|
|
20
|
-
export declare class TuiPureException extends Error {
|
|
21
|
-
constructor();
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tuiUniqBy<T extends Record<string, any>>(array: readonly T[], key: keyof T): readonly T[];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|