@taiga-ui/cdk 4.52.0-canary.a59c4d0 → 4.52.0-canary.abf3e8c
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/index.d.ts +0 -1
- 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/time.d.ts +2 -2
- package/date-time/types.d.ts +1 -12
- package/directives/active-zone/active-zone.directive.d.ts +0 -2
- 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/auto-focus/autofocus.options.d.ts +1 -1
- 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 +2 -2
- package/fesm2022/taiga-ui-cdk-classes.mjs +7 -19
- package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-constants.mjs +15 -8
- package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-date-time.mjs +22 -22
- package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +11 -16
- 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 +10 -13
- 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 +7 -10
- package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-element.mjs +3 -4
- 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 +10 -13
- 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 +32 -57
- package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +7 -10
- 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 +7 -14
- package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs +3 -4
- package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +8 -9
- package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +3 -4
- 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 +6 -7
- 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 +10 -28
- 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 +17 -17
- package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-tokens.mjs +13 -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 +3 -76
- 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 +1 -12
- package/fesm2022/taiga-ui-cdk-utils-math.mjs.map +1 -1
- package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +45 -120
- 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 +5 -55
- 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/collection.json +2 -1
- package/schematics/migrate-tui-let/index.js +4 -3
- package/schematics/migrate-tui-let/index.js.map +1 -1
- package/schematics/migrate-tui-let/schema.json +7 -0
- package/schematics/ng-add/constants/versions.d.ts +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/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/constants/migration-warnings.js +1 -1
- package/schematics/ng-update/v4/steps/constants/migration-warnings.js.map +1 -1
- package/schematics/ng-update/v4/steps/migrate-templates.d.ts +2 -2
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js +1 -1
- package/schematics/ng-update/v4/steps/restore-tui-mapper.js.map +1 -1
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js +1 -1
- package/schematics/ng-update/v4/steps/restore-tui-matcher.js.map +1 -1
- 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/v5/index.js +3 -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 +22 -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 +22 -0
- package/schematics/ng-update/v5/steps/constants/identifiers-to-replace.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 +6 -0
- package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -1
- 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/utils/angular-json-manipulations.js +0 -2
- package/schematics/utils/angular-json-manipulations.js.map +1 -1
- 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.js +4 -12
- package/schematics/utils/templates/elements.js.map +1 -1
- package/schematics/utils/templates/ng-component-input-manipulations.d.ts +3 -3
- package/schematics/utils/templates/ng-component-input-manipulations.js +1 -3
- package/schematics/utils/templates/ng-component-input-manipulations.js.map +1 -1
- 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 -2
- 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/index.d.ts +0 -2
- package/utils/miscellaneous/generate-id.d.ts +1 -0
- package/utils/miscellaneous/index.d.ts +2 -10
- package/utils/miscellaneous/sanitize-text.d.ts +23 -0
- package/constants/allow-signal-writes.d.ts +0 -2
- 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/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/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/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
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateInputYear = migrateInputYear;
|
|
4
|
+
const elements_1 = require("../../../../utils/templates/elements");
|
|
5
|
+
const template_resource_1 = require("../../../../utils/templates/template-resource");
|
|
6
|
+
const replace_tag_1 = require("../../../utils/templates/replace-tag");
|
|
7
|
+
function migrateInputYear({ resource, recorder, fileSystem, }) {
|
|
8
|
+
const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
|
|
9
|
+
const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
|
|
10
|
+
const elements = (0, elements_1.findElementsByTagName)(template, 'tui-input-year');
|
|
11
|
+
elements.forEach((element) => {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
13
|
+
const sourceCodeLocation = element.sourceCodeLocation;
|
|
14
|
+
(0, replace_tag_1.replaceTag)(recorder, sourceCodeLocation, 'tui-input-year', 'tui-textfield', templateOffset);
|
|
15
|
+
const attrs = [...element.attrs].filter((attr) => /formcontrol|ngmodel|min|max/.exec(attr.name.toLocaleLowerCase()));
|
|
16
|
+
for (const attr of attrs) {
|
|
17
|
+
const { startOffset = 0, endOffset = 0 } = (_c = (_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[attr.name]) !== null && _c !== void 0 ? _c : {};
|
|
18
|
+
recorder.remove(templateOffset + startOffset, endOffset - startOffset);
|
|
19
|
+
}
|
|
20
|
+
const labelIndex = element.childNodes.findIndex((node) => node.nodeName === '#text' && (node === null || node === void 0 ? void 0 : node.value.trim()));
|
|
21
|
+
if (labelIndex !== -1) {
|
|
22
|
+
const labelNode = element.childNodes[labelIndex];
|
|
23
|
+
const labelTextStart = ((_e = (_d = labelNode === null || labelNode === void 0 ? void 0 : labelNode.sourceCodeLocation) === null || _d === void 0 ? void 0 : _d.startOffset) !== null && _e !== void 0 ? _e : 0) + templateOffset;
|
|
24
|
+
const labelTextEnd = ((_g = (_f = labelNode === null || labelNode === void 0 ? void 0 : labelNode.sourceCodeLocation) === null || _f === void 0 ? void 0 : _f.endOffset) !== null && _g !== void 0 ? _g : 0) + templateOffset;
|
|
25
|
+
recorder.insertRight(labelTextStart, '\n<label tuiLabel>');
|
|
26
|
+
recorder.insertRight(labelTextEnd, '</label>\n');
|
|
27
|
+
}
|
|
28
|
+
const calendarInsertOffset = ((_j = (_h = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.endTag) === null || _h === void 0 ? void 0 : _h.startOffset) !== null && _j !== void 0 ? _j : 0) + templateOffset;
|
|
29
|
+
const inputs = element.childNodes.filter((node) => node.nodeName === 'input');
|
|
30
|
+
const migrationAttrs = attrs.reduce((result, attr) => {
|
|
31
|
+
const name = attr.name
|
|
32
|
+
.replace(/ngmodel/i, 'ngModel')
|
|
33
|
+
.replace(/formcontrol/i, 'formControl')
|
|
34
|
+
.replace(/formcontrolname/i, 'formControlName');
|
|
35
|
+
return `${result} ${name}="${attr.value}"`;
|
|
36
|
+
}, '');
|
|
37
|
+
recorder.insertRight(calendarInsertOffset, !inputs.length
|
|
38
|
+
? `\n<input tuiInputYear${migrationAttrs} />\n<tui-calendar-year *tuiDropdown />\n`
|
|
39
|
+
: '\n<tui-calendar-year *tuiDropdown />\n');
|
|
40
|
+
for (const input of inputs) {
|
|
41
|
+
input.attrs.forEach((attr) => {
|
|
42
|
+
var _a, _b, _c;
|
|
43
|
+
if (/^tuiTextfield$|^tuiTextfieldLegacy$/i.exec(attr.name)) {
|
|
44
|
+
const { startOffset = 0, endOffset = 0 } = (_c = (_b = (_a = input.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[attr.name]) !== null && _c !== void 0 ? _c : {};
|
|
45
|
+
recorder.remove(templateOffset + startOffset, endOffset - startOffset);
|
|
46
|
+
recorder.insertRight(templateOffset + startOffset, `tuiInputYear${migrationAttrs}`);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=migrate-input-year.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-input-year.js","sourceRoot":"","sources":["../../../../../../../projects/cdk/schematics/ng-update/v5/steps/templates/migrate-input-year.ts"],"names":[],"mappings":";;AAkBA,4CA6FC;AA3GD,mEAA2E;AAC3E,qFAGuD;AAEvD,sEAAgE;AAQhE,SAAgB,gBAAgB,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,UAAU,GAKb;IACG,MAAM,QAAQ,GAAG,IAAA,mDAA+B,EAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACvE,MAAM,cAAc,GAAG,IAAA,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AO,CAAC,CAAC,IAAI,EAAE,EAAE;;gBACzB,IAAI,sCAAsC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;oBACzD,MAAM,EAAC,WAAW,GAAG,CAAC,EAAE,SAAS,GAAG,CAAC,EAAC,GAClC,MAAA,MAAA,MAAA,KAAK,CAAC,kBAAkB,0CAAE,KAAK,0CAAG,IAAI,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;oBAEvD,QAAQ,CAAC,MAAM,CACX,cAAc,GAAG,WAAW,EAC5B,SAAS,GAAG,WAAW,CAC1B,CAAC;oBAEF,QAAQ,CAAC,WAAW,CAChB,cAAc,GAAG,WAAW,EAC5B,eAAe,cAAc,EAAE,CAClC,CAAC;gBACN,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -21,13 +21,11 @@ function hasTaigaIcons(assets) {
|
|
|
21
21
|
function isInvalidAngularJson(tree) {
|
|
22
22
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
return ((0, workspace_1.getWorkspace)(tree)
|
|
24
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
25
24
|
.then(() => false)
|
|
26
25
|
/**
|
|
27
26
|
* Possible error – "Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]"
|
|
28
27
|
* @see https://github.com/angular/angular-cli/blob/main/packages/angular_devkit/core/src/workspace/json/reader.ts#L67-L69
|
|
29
28
|
*/
|
|
30
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
31
29
|
.catch(() => true));
|
|
32
30
|
});
|
|
33
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-json-manipulations.js","sourceRoot":"","sources":["../../../../projects/cdk/schematics/utils/angular-json-manipulations.ts"],"names":[],"mappings":";;AAqBA,
|
|
1
|
+
{"version":3,"file":"angular-json-manipulations.js","sourceRoot":"","sources":["../../../../projects/cdk/schemat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AE,CAAC,CAAC,CAAC;gBAEtD,aAAa,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;YAC1D,CAAC;YAED,IAAI,IAAI,IAAI,eAAe,EAAE,CAAC;gBAC1B,IAAA,mCAAwB,EAAC,IAAI,EAAE;oBAC3B,IAAI,EAAE,kBAAkB;oBACxB,OAAO,EAAE,wBAAa;iBACzB,CAAC,CAAC;gBAEH,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;YAClD,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Input {
|
|
2
|
+
collection: string;
|
|
3
|
+
component?: string;
|
|
4
|
+
template?: string;
|
|
5
|
+
packageJson?: string;
|
|
6
|
+
schematicName?: string;
|
|
7
|
+
}
|
|
8
|
+
interface Output {
|
|
9
|
+
component: string;
|
|
10
|
+
template: string;
|
|
11
|
+
packageJson: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function runMigration(options: Input): Promise<Output>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runMigration = runMigration;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
7
|
+
const ng_morph_1 = require("ng-morph");
|
|
8
|
+
function runMigration(options) {
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
var _a, _b, _c;
|
|
11
|
+
const { collection, component = '', template = '', packageJson = '{}', schematicName = 'updateToV5', } = options;
|
|
12
|
+
const host = new testing_1.UnitTestTree(new schematics_1.HostTree());
|
|
13
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collection);
|
|
14
|
+
(0, ng_morph_1.setActiveProject)((0, ng_morph_1.createProject)(host));
|
|
15
|
+
host.create('test/app/test.ts', component);
|
|
16
|
+
host.create('test/app/test.html', template);
|
|
17
|
+
host.create('package.json', packageJson);
|
|
18
|
+
yield runner.runSchematic(schematicName, { 'skip-logs': true }, host);
|
|
19
|
+
(0, ng_morph_1.saveActiveProject)();
|
|
20
|
+
return {
|
|
21
|
+
component: (_a = host.readContent('test/app/test.ts')) !== null && _a !== void 0 ? _a : '',
|
|
22
|
+
template: (_b = host.readContent('test/app/test.html')) !== null && _b !== void 0 ? _b : '',
|
|
23
|
+
packageJson: (_c = host.readContent('package.json')) !== null && _c !== void 0 ? _c : '{}',
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=run-migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-migration.js","sourceRoot":"","sources":["../../../../projects/cdk/schematics/utils/run-migration.ts"],"names":[],"mappings":";;AAkBA,oCA2BC;;AA7CD,2DAAoD;AACpD,gEAAqF;AACrF,uCAA4E;AAgB5E,SAAsB,YAAY,CAAC,OAAc;;;QAC7C,MAAM,EACF,UAAU,EACV,SAAS,GAAG,EAAE,EACd,QAAQ,GAAG,EAAE,EACb,WAAW,GAAG,IAAI,EAClB,aAAa,GAAG,YAAY,GAC/B,GAAG,OAAO,CAAC;QAEZ,MAAM,IAAI,GAAG,IAAI,sBAAY,CAAC,IAAI,qBAAQ,EAAE,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAEjE,IAAA,2BAAgB,EAAC,IAAA,wBAAa,EAAC,IAAI,CAAC,CAAC,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QAEzC,MAAM,MAAM,CAAC,YAAY,CAAC,aAAa,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,EAAE,IAAI,CAAC,CAAC;QAEpE,IAAA,4BAAiB,GAAE,CAAC;QAEpB,OAAO;YACH,SAAS,EAAE,MAAA,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC,mCAAI,EAAE;YACrD,QAAQ,EAAE,MAAA,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,mCAAI,EAAE;YACtD,WAAW,EAAE,MAAA,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,mCAAI,IAAI;SACxD,CAAC;IACN,CAAC;CAAA"}
|
|
@@ -36,9 +36,7 @@ function findElementsInTemplateByFn(html, predicateFn) {
|
|
|
36
36
|
const document = (0, parse5_1.parseFragment)(html, { sourceCodeLocationInfo: true });
|
|
37
37
|
return findElementsByFn(document.childNodes, predicateFn);
|
|
38
38
|
}
|
|
39
|
-
function findElementsByTagName(html, tagName,
|
|
40
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
41
|
-
filterFn = () => true) {
|
|
39
|
+
function findElementsByTagName(html, tagName, filterFn = () => true) {
|
|
42
40
|
return findElementsInTemplateByFn(html, (el) => el.tagName === tagName && filterFn(el));
|
|
43
41
|
}
|
|
44
42
|
function findElementsByTagNames(html, tagNames) {
|
|
@@ -65,9 +63,7 @@ function findElementsWithAttribute(html, attributeName) {
|
|
|
65
63
|
* @param html
|
|
66
64
|
* @param attributeName
|
|
67
65
|
*/
|
|
68
|
-
function findElementsWithAttributeOnTag(html, attributeNames, tagNames = [],
|
|
69
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
70
|
-
filterFn = () => true) {
|
|
66
|
+
function findElementsWithAttributeOnTag(html, attributeNames, tagNames = [], filterFn = () => true) {
|
|
71
67
|
return findElementsInTemplateByFn(html, (el) => {
|
|
72
68
|
var _a;
|
|
73
69
|
return (!attributeNames.length ||
|
|
@@ -82,9 +78,7 @@ filterFn = () => true) {
|
|
|
82
78
|
* Finds elements with explicit tag names that also contain the specified attribute. Returns the
|
|
83
79
|
* attribute start offset based on the specified HTML.
|
|
84
80
|
*/
|
|
85
|
-
function findAttributeOnElementWithTag(html, name, tagNames,
|
|
86
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
87
|
-
filterFn = () => true) {
|
|
81
|
+
function findAttributeOnElementWithTag(html, name, tagNames, filterFn = () => true) {
|
|
88
82
|
return findElementsWithAttribute(html, name)
|
|
89
83
|
.filter((element) => (tagNames.includes(element.tagName) || tagNames.includes('*')) &&
|
|
90
84
|
filterFn(element))
|
|
@@ -94,9 +88,7 @@ filterFn = () => true) {
|
|
|
94
88
|
* Finds elements that contain the given attribute and contain at least one of the other
|
|
95
89
|
* specified attributes. Returns the primary attribute's start offset based on the specified HTML.
|
|
96
90
|
*/
|
|
97
|
-
function findAttributeOnElementWithAttrs(html, name, attrs,
|
|
98
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
99
|
-
filterFn = () => true) {
|
|
91
|
+
function findAttributeOnElementWithAttrs(html, name, attrs, filterFn = () => true) {
|
|
100
92
|
return findElementsWithAttribute(html, name)
|
|
101
93
|
.filter((element) => attrs.some((attr) => hasElementAttribute(element, attr)) &&
|
|
102
94
|
filterFn(element))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/utils/templates/elements.ts"],"names":[],"mappings":";;AAGA,4CAuBC;AAED,gEAYC;AAED,
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/utils/templates/elements.ts"],"names":[],"mappings":";;AAGA,4CAuBC;AAED,gEAYC;AAED,sDASC;AAED,wDAEC;AAMD,8DAUC;AAMD,8DAOC;AAOD,wEAkBC;AAMD,sEAaC;AAMD,0EAaC;AAGD,kDAOC;AAGD,8DAOC;AAvKD,mC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,CAAC,OAAgB,EAAE,aAAqB;;IACvE,MAAM,kBAAkB,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;IAEvD,OAAO,MAAA,OAAO,CAAC,KAAK,0CAAE,IAAI,CACtB,CAAC,IAAI,EAAE,EAAE,CACL,IAAI,CAAC,IAAI,KAAK,kBAAkB,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,kBAAkB,GAAG,CAClF,CAAC;AACN,CAAC;AAED,0EAA0E;AAC1E,SAAgB,yBAAyB,CACrC,OAAgB,EAChB,aAAqB;;IAErB,OAAO,CACH,CAAA,MAAA,MAAA,MAAA,OAAO,CAAC,kBAAkB,0CAAE,KAAK,0CAAG,aAAa,CAAC,WAAW,EAAE,CAAC,0CAAE,WAAW,KAAI,CAAC,CACrF,CAAC;AACN,CAAC"}
|
|
@@ -29,7 +29,7 @@ import { type TemplateResource } from '../../ng-update/interfaces/template-resou
|
|
|
29
29
|
export declare function replaceInputProperty({ templateResource, fileSystem, componentSelector, from, to, newValue, filterFn, }: {
|
|
30
30
|
componentSelector: string[] | string;
|
|
31
31
|
fileSystem: DevkitFileSystem;
|
|
32
|
-
filterFn
|
|
32
|
+
filterFn?(element: Element): boolean;
|
|
33
33
|
from: string;
|
|
34
34
|
newValue?: string;
|
|
35
35
|
templateResource: TemplateResource;
|
|
@@ -59,7 +59,7 @@ export declare function replaceInputPropertyByDirective({ templateResource, file
|
|
|
59
59
|
name: string;
|
|
60
60
|
};
|
|
61
61
|
fileSystem: DevkitFileSystem;
|
|
62
|
-
filterFn
|
|
62
|
+
filterFn?(element: Element): boolean;
|
|
63
63
|
inputProperty: string;
|
|
64
64
|
templateResource: TemplateResource;
|
|
65
65
|
}): void;
|
|
@@ -71,7 +71,7 @@ export declare function replaceInputPropertyByDirective({ templateResource, file
|
|
|
71
71
|
export declare function removeInputProperty({ templateResource, fileSystem, componentSelector, inputProperty, filterFn, }: {
|
|
72
72
|
componentSelector: string;
|
|
73
73
|
fileSystem: DevkitFileSystem;
|
|
74
|
-
filterFn
|
|
74
|
+
filterFn?(element: Element): boolean;
|
|
75
75
|
inputProperty: string;
|
|
76
76
|
templateResource: TemplateResource;
|
|
77
77
|
}): void;
|
|
@@ -78,9 +78,7 @@ function replaceInputProperty({ templateResource, fileSystem, componentSelector,
|
|
|
78
78
|
*
|
|
79
79
|
* getInputPropertyOffsets(template, 'size', ['tui-card']) // [[10, 18]]
|
|
80
80
|
*/
|
|
81
|
-
function getInputPropertyOffsets(html, attrName, tags,
|
|
82
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
83
|
-
filterFn = () => true) {
|
|
81
|
+
function getInputPropertyOffsets(html, attrName, tags, filterFn = () => true) {
|
|
84
82
|
return (0, elements_1.findElementsWithAttribute)(html, attrName)
|
|
85
83
|
.filter((element) => (tags.includes(element.tagName) || tags.includes('*')) &&
|
|
86
84
|
filterFn(element))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-component-input-manipulations.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/utils/templates/ng-component-input-manipulations.ts"],"names":[],"mappings":";;AAyCA,oDA0DC;AASD,
|
|
1
|
+
{"version":3,"file":"ng-component-input-manipulations.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/utils/templates/ng-component-input-manipulations.ts"],"names":[],"mappings":";;AAyCA,oDA0DC;AASD,0DAkBC;AASD,oEAiBC;AAED,0EAiCC;AAOD,kDAqCC;AAvOD,uCAA4D;AAI5D,kFAAyE;AACzE,yCAIoB;AACpB,2DAI6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,oBAAoB,CAAC,EACjC,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,IAAI,EACJ,EAAE,EACF,QAAQ,GAAG,EAAE,EACb,QAAQ,GASX;IACG,MAAM,QAAQ,GAAG,IAAA,mDAA+B,EAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAC/E,MAAM,IAAI,GAAG,UAAU,CAAC,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EAAE,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,CAAC,CAAC,GAAG,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/tokens/environment.d.ts
CHANGED
|
@@ -10,19 +10,6 @@ export declare const TUI_IS_ANDROID: InjectionToken<boolean>;
|
|
|
10
10
|
export declare const TUI_IS_WEBKIT: InjectionToken<boolean>;
|
|
11
11
|
export declare const TUI_PLATFORM: InjectionToken<"android" | "ios" | "web">;
|
|
12
12
|
export declare const TUI_IS_TOUCH: InjectionToken<import("@angular/core").Signal<boolean>>;
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated: use only {@link TUI_IS_E2E}
|
|
15
|
-
* Detect if app is running under Cypress
|
|
16
|
-
* {@link https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-any-way-to-detect-if-my-app-is-running-under-Cypress Cypress docs}
|
|
17
|
-
* TODO: remove in v5
|
|
18
|
-
*/
|
|
19
|
-
export declare const TUI_IS_CYPRESS: InjectionToken<boolean>;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated: use only {@link TUI_IS_E2E}
|
|
22
|
-
* Manually provide `true` when running tests in Playwright
|
|
23
|
-
* TODO: remove in v5
|
|
24
|
-
*/
|
|
25
|
-
export declare const TUI_IS_PLAYWRIGHT: InjectionToken<boolean>;
|
|
26
13
|
/**
|
|
27
14
|
* Detect if app is running under any of test frameworks
|
|
28
15
|
*/
|
package/tokens/index.d.ts
CHANGED
package/types/index.d.ts
CHANGED
package/utils/browser/index.d.ts
CHANGED
package/utils/di/index.d.ts
CHANGED
package/utils/dom/index.d.ts
CHANGED
|
@@ -6,14 +6,8 @@ export * from './get-clipboard-data-text';
|
|
|
6
6
|
export * from './get-document-or-shadow-root';
|
|
7
7
|
export * from './get-element-obscurers';
|
|
8
8
|
export * from './get-element-offset';
|
|
9
|
-
export * from './get-element-point';
|
|
10
9
|
export * from './get-selected-text';
|
|
11
10
|
export * from './inject-element';
|
|
12
|
-
export * from './is-current-target';
|
|
13
11
|
export * from './is-element-editable';
|
|
14
|
-
export * from './is-inside-iframe';
|
|
15
|
-
export * from './is-node-in';
|
|
16
12
|
export * from './point-to-client-rect';
|
|
17
|
-
export * from './retarget-boundary-crossing';
|
|
18
13
|
export * from './value';
|
|
19
|
-
export * from './value-binding';
|
|
@@ -4,11 +4,6 @@ export interface TuiGetClosestFocusableOptions {
|
|
|
4
4
|
* current HTML element
|
|
5
5
|
*/
|
|
6
6
|
initial: Element;
|
|
7
|
-
/**
|
|
8
|
-
* @description:
|
|
9
|
-
* determine if only keyboard focus is of interest
|
|
10
|
-
*/
|
|
11
|
-
keyboard?: boolean;
|
|
12
7
|
/**
|
|
13
8
|
* @description:
|
|
14
9
|
* should it look backwards instead (find item that will be focused with Shift + Tab)
|
|
@@ -24,4 +19,4 @@ export interface TuiGetClosestFocusableOptions {
|
|
|
24
19
|
* @description:
|
|
25
20
|
* Finds the closest element that can be focused with a keyboard or mouse in theory
|
|
26
21
|
*/
|
|
27
|
-
export declare function tuiGetClosestFocusable({ initial, root, previous,
|
|
22
|
+
export declare function tuiGetClosestFocusable({ initial, root, previous, }: TuiGetClosestFocusableOptions): HTMLElement | null;
|
package/utils/focus/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export * from './blur-native-focused';
|
|
2
1
|
export * from './focused-in';
|
|
3
2
|
export * from './get-closest-focusable';
|
|
4
|
-
export * from './get-
|
|
5
|
-
export * from './is-
|
|
6
|
-
export * from './is-
|
|
7
|
-
export * from './is-
|
|
8
|
-
export * from './is-native-mouse-focusable';
|
|
3
|
+
export * from './get-focused';
|
|
4
|
+
export * from './is-focusable';
|
|
5
|
+
export * from './is-focused';
|
|
6
|
+
export * from './is-focused-in';
|
|
9
7
|
export * from './move-focus';
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* be focused, for example element can have display: none applied to it or any other
|
|
5
5
|
* circumstances could prevent actual focus.
|
|
6
6
|
*/
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function tuiIsFocusable(element: Element): boolean;
|
package/utils/index.d.ts
CHANGED
package/utils/math/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function tuiGenerateId(): string;
|
|
@@ -1,30 +1,22 @@
|
|
|
1
1
|
export * from './array-remove';
|
|
2
2
|
export * from './array-shallow-equals';
|
|
3
3
|
export * from './array-toggle';
|
|
4
|
-
export * from './change-date-separator';
|
|
5
4
|
export * from './count-filled-controls';
|
|
6
|
-
export * from './create-token';
|
|
7
5
|
export * from './default-sort';
|
|
8
|
-
export * from './directive-binding';
|
|
9
6
|
export * from './distance-between-touches';
|
|
10
7
|
export * from './ease-in-out-quad';
|
|
11
|
-
export * from './flat-length';
|
|
12
8
|
export * from './font-size-watcher';
|
|
13
|
-
export * from './
|
|
9
|
+
export * from './generate-id';
|
|
14
10
|
export * from './is-control-empty';
|
|
15
|
-
export * from './is-falsy';
|
|
16
11
|
export * from './is-number';
|
|
17
12
|
export * from './is-object';
|
|
18
13
|
export * from './is-present';
|
|
19
14
|
export * from './is-string';
|
|
20
|
-
export * from './is-valid-url';
|
|
21
15
|
export * from './mark-control-as-touched-and-validate';
|
|
22
16
|
export * from './nullable-same';
|
|
23
17
|
export * from './obfuscate';
|
|
24
|
-
export * from './provide';
|
|
25
|
-
export * from './provide-options';
|
|
26
18
|
export * from './pure';
|
|
27
19
|
export * from './px';
|
|
20
|
+
export * from './sanitize-text';
|
|
28
21
|
export * from './set-signal';
|
|
29
|
-
export * from './uniq-by';
|
|
30
22
|
export * from './with-styles';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sanitizes pasted or dropped text by removing invisible and control characters
|
|
3
|
+
* that can appear in clipboard or drag-and-drop data.
|
|
4
|
+
*
|
|
5
|
+
* Removes:
|
|
6
|
+
* 1. ASCII control characters (0x00–0x1F) — non-printable characters like
|
|
7
|
+
* NULL, BEL, BS, CR, LF, TAB, ESC, etc.
|
|
8
|
+
* 2. Extended control characters (0x7F–0x9F) — C1 control codes from ISO-8859-1,
|
|
9
|
+
* often found in legacy or malformed text encodings.
|
|
10
|
+
* 3. Zero-width and special Unicode characters:
|
|
11
|
+
* - U+200B ZERO WIDTH SPACE
|
|
12
|
+
* - U+200C ZERO WIDTH NON-JOINER
|
|
13
|
+
* - U+200D ZERO WIDTH JOINER
|
|
14
|
+
* - U+FEFF BYTE ORDER MARK (BOM)
|
|
15
|
+
*
|
|
16
|
+
* @param {string} value - The input string from clipboard or drag event.
|
|
17
|
+
* @returns {string} - A cleaned string without control or invisible characters.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* tuiSanitizeText('Hello\u0000World\u200B!');
|
|
21
|
+
* // → "HelloWorld!"
|
|
22
|
+
*/
|
|
23
|
+
export declare function tuiSanitizeText(value: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./animated.directive";
|
|
3
|
-
import * as i2 from "@ng-web-apis/mutation-observer";
|
|
4
|
-
export declare class TuiAnimatedParent {
|
|
5
|
-
private readonly el;
|
|
6
|
-
private readonly renderer;
|
|
7
|
-
protected handle(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiAnimatedParent, never>;
|
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiAnimatedParent, "[tuiAnimatedParent]", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiAnimated; inputs: {}; outputs: {}; }, { directive: typeof i2.WaMutationObserver; inputs: {}; outputs: { "waMutationObserver": "waMutationObserver"; }; }]>;
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Observable } from 'rxjs';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated use {@link TuiActiveZone} instead
|
|
5
|
-
*/
|
|
6
|
-
export declare class TuiClickOutside {
|
|
7
|
-
private readonly zone;
|
|
8
|
-
private readonly doc;
|
|
9
|
-
private readonly el;
|
|
10
|
-
readonly tuiClickOutside: Observable<unknown>;
|
|
11
|
-
private isOutside;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiClickOutside, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiClickOutside, "[tuiClickOutside]", never, {}, { "tuiClickOutside": "tuiClickOutside"; }, never, never, true, never>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './click-outside.directive';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class TuiDroppable {
|
|
3
|
-
private readonly el;
|
|
4
|
-
readonly tuiDroppableDropped: import("rxjs").Observable<DataTransfer>;
|
|
5
|
-
readonly tuiDroppableDragOverChange: import("rxjs").Observable<DataTransfer | null>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiDroppable, never>;
|
|
7
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDroppable, "[tuiDroppableDropped], [tuiDroppableDragOverChange]", never, {}, { "tuiDroppableDropped": "tuiDroppableDropped"; "tuiDroppableDragOverChange": "tuiDroppableDragOverChange"; }, never, never, true, never>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './droppable.directive';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type TuiContext } from '@taiga-ui/cdk/types';
|
|
2
|
-
import { type TuiLet } from './let.directive';
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare class TuiLetContext<T> implements TuiContext<T> {
|
|
7
|
-
private readonly internalDirectiveInstance;
|
|
8
|
-
constructor(internalDirectiveInstance: TuiLet<T>);
|
|
9
|
-
get $implicit(): T;
|
|
10
|
-
get tuiLet(): T;
|
|
11
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TuiLetContext } from './let-context';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated use @let instead
|
|
5
|
-
*/
|
|
6
|
-
export declare class TuiLet<T> {
|
|
7
|
-
tuiLet: T;
|
|
8
|
-
constructor();
|
|
9
|
-
/**
|
|
10
|
-
* Asserts the correct type of the context for the template that `TuiLet` will render.
|
|
11
|
-
*
|
|
12
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
13
|
-
* `TuiLet` structural directive renders its template with a specific context type.
|
|
14
|
-
*/
|
|
15
|
-
static ngTemplateContextGuard<T>(_dir: TuiLet<T>, _ctx: unknown): _ctx is TuiLetContext<T>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiLet<any>, never>;
|
|
17
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiLet<any>, "[tuiLet]", never, { "tuiLet": { "alias": "tuiLet"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './popover.directive';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type OnChanges } from '@angular/core';
|
|
2
|
-
import { type TuiPopover } from '@taiga-ui/cdk/services';
|
|
3
|
-
import { PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare abstract class TuiPopoverDirective<T> extends PolymorpheusTemplate<TuiPopover<T, void>> implements OnChanges {
|
|
6
|
-
private readonly service;
|
|
7
|
-
private readonly open$;
|
|
8
|
-
options: Partial<T>;
|
|
9
|
-
open: boolean;
|
|
10
|
-
readonly openChange: import("rxjs").Observable<boolean>;
|
|
11
|
-
ngOnChanges(): void;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiPopoverDirective<any>, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiPopoverDirective<any>, never, never, {}, {}, never, never, true, never>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './repeat-times.directive';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type TuiContext } from '@taiga-ui/cdk/types';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class TuiRepeatTimesContext implements TuiContext<number> {
|
|
4
|
-
readonly $implicit: number;
|
|
5
|
-
constructor($implicit: number);
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Directive similar to ngFor but using a number of repetitions rather than an array
|
|
9
|
-
*
|
|
10
|
-
* {@link TuiRepeatTimes.tuiRepeatTimesOf requested number of times}.
|
|
11
|
-
* {@link TuiRepeatTimesContext context} for every instance of the template inherits outer context and stores
|
|
12
|
-
* {@link TuiRepeatTimesContext.$implicit index} of a template instance.
|
|
13
|
-
*/
|
|
14
|
-
export declare class TuiRepeatTimes {
|
|
15
|
-
private readonly vcr;
|
|
16
|
-
private readonly template;
|
|
17
|
-
set tuiRepeatTimesOf(count: number);
|
|
18
|
-
private addContainers;
|
|
19
|
-
private removeContainers;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TuiRepeatTimes, never>;
|
|
21
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TuiRepeatTimes, "[tuiRepeatTimes][tuiRepeatTimesOf]", never, { "tuiRepeatTimesOf": { "alias": "tuiRepeatTimesOf"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
-
}
|