@taiga-ui/cdk 4.4.1 → 4.5.0-canary.50decb3

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.
Files changed (60) hide show
  1. package/constants/used-icons.d.ts +1 -1
  2. package/constants/version.d.ts +1 -1
  3. package/constants/version.js +1 -1
  4. package/directives/auto-focus/handlers/default.handler.d.ts +3 -2
  5. package/esm2022/constants/used-icons.mjs +3 -1
  6. package/esm2022/constants/version.mjs +2 -2
  7. package/esm2022/directives/auto-focus/autofocus.options.mjs +2 -2
  8. package/esm2022/directives/auto-focus/handlers/default.handler.mjs +5 -3
  9. package/esm2022/directives/obscured/obscured.service.mjs +3 -3
  10. package/esm2022/directives/pan/pan.service.mjs +3 -3
  11. package/esm2022/directives/swipe/swipe.service.mjs +7 -7
  12. package/esm2022/directives/zoom/zoom.service.mjs +5 -5
  13. package/esm2022/observables/zone.mjs +24 -4
  14. package/esm2022/services/id.service.mjs +6 -7
  15. package/esm2022/utils/color/hex-to-rgba.mjs +2 -2
  16. package/esm2022/utils/color/parse-gradient.mjs +3 -3
  17. package/esm2022/utils/color/rgba-to-hex.mjs +6 -8
  18. package/esm2022/utils/focus/move-focus.mjs +2 -2
  19. package/esm2022/utils/miscellaneous/distance-between-touches.mjs +2 -2
  20. package/fesm2022/taiga-ui-cdk-constants.mjs +3 -1
  21. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +5 -3
  23. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +2 -2
  25. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-cdk-directives-pan.mjs +2 -2
  27. package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +6 -6
  29. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +4 -4
  31. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-cdk-observables.mjs +24 -5
  33. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-cdk-services.mjs +5 -6
  35. package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-cdk-utils-color.mjs +8 -10
  37. package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-cdk-utils-focus.mjs +1 -1
  39. package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +1 -1
  41. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  42. package/observables/zone.d.ts +7 -5
  43. package/package.json +356 -356
  44. package/schematics/ng-add/steps/add-taiga-modules.js +8 -1
  45. package/schematics/ng-add/steps/wrap-with-tui-root.js +7 -2
  46. package/schematics/ng-update/v4/migrate-addon-doc/replace-symbols.js +4 -0
  47. package/schematics/ng-update/v4/steps/migrate-legacy-mask.js +2 -2
  48. package/schematics/ng-update/v4/steps/migrate-number-format-settings.js +1 -1
  49. package/schematics/ng-update/v4/steps/migrate-root.js +28 -8
  50. package/schematics/ng-update/v4/steps/restore-tui-mapper.js +1 -1
  51. package/schematics/ng-update/v4/steps/restore-tui-matcher.js +1 -1
  52. package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +4 -1
  53. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.js +5 -1
  54. package/schematics/ng-update/v4/steps/templates/migrate-prevent-default.js +3 -3
  55. package/schematics/ng-update/v4/steps/templates/migrate-progress-segmented.js +2 -2
  56. package/schematics/utils/add-unique-import.js +4 -3
  57. package/schematics/utils/get-component-from-identifier.js +1 -1
  58. package/schematics/utils/templates/get-component-templates.js +2 -2
  59. package/schematics/utils/templates/ng-component-input-manipulations.js +3 -3
  60. package/services/id.service.d.ts +1 -3
@@ -23,8 +23,14 @@ function addTuiModules({ mainClass, context, }) {
23
23
  }
24
24
  function addTuiEntitiesToStandalone({ bootstrapFunction, options, context, }) {
25
25
  const [rootComponentIdentifier, bootstrapOptions = bootstrapFunction.addArgument('{providers}: []'),] = bootstrapFunction.getArguments();
26
+ if (!rootComponentIdentifier) {
27
+ return;
28
+ }
26
29
  const mainClass = (0, get_component_from_identifier_1.getComponentFromIdentifier)(rootComponentIdentifier);
27
30
  const optionsObject = getOptionsObject(bootstrapOptions);
31
+ if (!optionsObject) {
32
+ return;
33
+ }
28
34
  if (mainClass) {
29
35
  addMainModuleToRootComponent({ mainClass, options, context });
30
36
  addRootTuiProvidersToBootstrapFn(optionsObject);
@@ -66,11 +72,12 @@ function getModules(extraModules) {
66
72
  return [...(extraModules || []), modules_1.MAIN_MODULE];
67
73
  }
68
74
  function getOptionsObject(options) {
75
+ var _a;
69
76
  if (ng_morph_1.Node.isObjectLiteralExpression(options)) {
70
77
  return options;
71
78
  }
72
79
  const definition = options.getDefinitionNodes()[0];
73
- return definition.getChildrenOfKind(ng_morph_1.SyntaxKind.ObjectLiteralExpression)[0];
80
+ return (_a = definition === null || definition === void 0 ? void 0 : definition.getChildrenOfKind(ng_morph_1.SyntaxKind.ObjectLiteralExpression)[0]) !== null && _a !== void 0 ? _a : null;
74
81
  }
75
82
  function addTaigaModules(options) {
76
83
  return (tree, context) => tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -32,8 +32,13 @@ function getAppTemplatePath(mainPath) {
32
32
  const standaloneBootstrapFunction = (0, get_standalone_bootstrap_function_1.getStandaloneBootstrapFunction)(mainPath);
33
33
  if (standaloneBootstrapFunction) {
34
34
  const [componentIdentifier] = standaloneBootstrapFunction.getArguments();
35
- const component = (0, get_component_from_identifier_1.getComponentFromIdentifier)(componentIdentifier);
36
- return (component && getTemplatePathFromComponent(component)) || '';
35
+ if (componentIdentifier) {
36
+ const component = (0, get_component_from_identifier_1.getComponentFromIdentifier)(componentIdentifier);
37
+ if (component) {
38
+ return getTemplatePathFromComponent(component);
39
+ }
40
+ }
41
+ return '';
37
42
  }
38
43
  const mainModule = (0, ng_morph_1.getMainModule)(mainPath);
39
44
  if (!mainModule) {
@@ -99,6 +99,10 @@ exports.DOC_SYMBOLS_TO_REPLACE = [
99
99
  name: 'TuiAddonDocModule',
100
100
  moduleSpecifier: '@taiga-ui/addon-doc',
101
101
  },
102
+ {
103
+ name: 'TuiDocExampleModule',
104
+ moduleSpecifier: '@taiga-ui/addon-doc',
105
+ },
102
106
  ],
103
107
  to: {
104
108
  name: 'TuiAddonDoc',
@@ -29,7 +29,7 @@ function migrateTuiMaskedMoneyValueIsEmpty(options) {
29
29
  }
30
30
  else if (ng_morph_1.Node.isCallExpression(parent)) {
31
31
  const [value] = parent.getArguments();
32
- parent.replaceWithText(`Number.isNaN(maskitoParseNumber(${value.getText()}, ','))`);
32
+ parent.replaceWithText(`Number.isNaN(maskitoParseNumber(${value === null || value === void 0 ? void 0 : value.getText()}, ','))`);
33
33
  }
34
34
  });
35
35
  }
@@ -48,7 +48,7 @@ function migrateTuiMaskedNumberStringToNumber(options) {
48
48
  }
49
49
  else if (ng_morph_1.Node.isCallExpression(parent)) {
50
50
  const [value, decimalSeparator] = parent.getArguments();
51
- parent.replaceWithText(`maskitoParseNumber(${value.getText()}, ${decimalSeparator.getText()})`);
51
+ parent.replaceWithText(`maskitoParseNumber(${value === null || value === void 0 ? void 0 : value.getText()}, ${decimalSeparator === null || decimalSeparator === void 0 ? void 0 : decimalSeparator.getText()})`);
52
52
  }
53
53
  });
54
54
  }
@@ -8,7 +8,7 @@ const OPTIONS_MIGRATIONS = {
8
8
  decimalLimit: (property) => property.replaceWithText(property.getText().replace('decimalLimit', 'precision')),
9
9
  decimal: (property) => {
10
10
  const [, propertyValue] = property.getText().split(/\s?:\s?/);
11
- property.replaceWithText(propertyValue.match(/^['"`]never['"`]$/)
11
+ property.replaceWithText((propertyValue === null || propertyValue === void 0 ? void 0 : propertyValue.match(/^['"`]never['"`]$/))
12
12
  ? 'precision: 0'
13
13
  : property.getText().replace('decimal', 'decimalMode'));
14
14
  },
@@ -38,25 +38,45 @@ function replaceRootIdentifier(ref, fileSystem) {
38
38
  .find((arg) => arg.getText() === ref.getText());
39
39
  if (node) {
40
40
  callExpression.removeArgument(node);
41
- addProviders(callExpression, fileSystem);
41
+ addProviders({ callExpression, fileSystem });
42
42
  }
43
43
  }
44
44
  else {
45
45
  ref.replaceWithText('TuiRoot');
46
+ addProviders({ fileSystem, modulePath: ref.getSourceFile().getFilePath() });
46
47
  }
47
48
  }
48
- function addProviders(callExpression, fileSystem) {
49
- const array = callExpression.getParentWhile(ng_morph_1.Node.isArrayLiteralExpression);
50
- if (!array) {
49
+ function addProviders({ callExpression, fileSystem, modulePath, }) {
50
+ var _a;
51
+ const providersArray = callExpression === null || callExpression === void 0 ? void 0 : callExpression.getParentWhile(ng_morph_1.Node.isArrayLiteralExpression);
52
+ const module = modulePath && ((_a = (0, ng_morph_1.getNgModules)(modulePath)) === null || _a === void 0 ? void 0 : _a[0]);
53
+ if (!providersArray && !modulePath) {
51
54
  return;
52
55
  }
53
- array.addElement('NG_EVENT_PLUGINS');
54
- (0, add_unique_import_1.addUniqueImport)(array.getSourceFile().getFilePath(), 'NG_EVENT_PLUGINS', '@taiga-ui/event-plugins');
56
+ const path = providersArray
57
+ ? providersArray.getSourceFile().getFilePath()
58
+ : modulePath || '';
59
+ if (providersArray) {
60
+ providersArray.addElement('NG_EVENT_PLUGINS');
61
+ }
62
+ else if (module) {
63
+ (0, ng_morph_1.addProviderToNgModule)(module, 'NG_EVENT_PLUGINS', { unique: true });
64
+ }
65
+ if (providersArray || module) {
66
+ (0, add_unique_import_1.addUniqueImport)(path, 'NG_EVENT_PLUGINS', '@taiga-ui/event-plugins');
67
+ }
55
68
  (0, ng_morph_1.getActiveProject)();
56
69
  const proprietary = (0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary-core') ||
57
70
  (0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary');
58
71
  if (proprietary) {
59
- array.addElement('TBANK_PROVIDERS');
60
- (0, add_unique_import_1.addUniqueImport)(array.getSourceFile().getFilePath(), 'TBANK_PROVIDERS', '@taiga-ui/proprietary');
72
+ if (providersArray) {
73
+ providersArray.addElement('TBANK_PROVIDERS');
74
+ }
75
+ else if (module) {
76
+ (0, ng_morph_1.addProviderToNgModule)(module, 'TBANK_PROVIDERS', { unique: true });
77
+ }
78
+ if (providersArray || module) {
79
+ (0, add_unique_import_1.addUniqueImport)(path, 'TBANK_PROVIDERS', '@taiga-ui/proprietary');
80
+ }
61
81
  }
62
82
  }
@@ -20,7 +20,7 @@ function updateTuiMapper(options) {
20
20
  return;
21
21
  }
22
22
  const [inputType] = typeArguments;
23
- inputType.replaceWithText(`[${inputType.getText()}, ...any]`);
23
+ inputType === null || inputType === void 0 ? void 0 : inputType.replaceWithText(`[${inputType.getText()}, ...any]`);
24
24
  }
25
25
  }
26
26
  }
@@ -20,7 +20,7 @@ function updateTuiMatcher(options) {
20
20
  return;
21
21
  }
22
22
  const [inputType] = typeArguments;
23
- inputType.replaceWithText(`[${inputType.getText()}, ...any]`);
23
+ inputType === null || inputType === void 0 ? void 0 : inputType.replaceWithText(`[${inputType.getText()}, ...any]`);
24
24
  }
25
25
  }
26
26
  }
@@ -30,7 +30,10 @@ function migrateAvatar({ resource, recorder, fileSystem, }) {
30
30
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
31
31
  const avatarElements = (0, elements_1.findElementsByTagName)(template, 'tui-avatar');
32
32
  const markerIconElements = (0, elements_1.findElementsByTagName)(template, 'tui-marker-icon');
33
- [...avatarElements, ...markerIconElements].forEach(({ attrs, sourceCodeLocation }) => {
33
+ [
34
+ ...avatarElements.filter(({ attrs }) => (0, inputs_1.findAttr)(attrs, 'avatarurl') || (0, inputs_1.findAttr)(attrs, 'text')),
35
+ ...markerIconElements,
36
+ ].forEach(({ attrs, sourceCodeLocation }) => {
34
37
  if (!sourceCodeLocation) {
35
38
  return;
36
39
  }
@@ -7,6 +7,7 @@ const template_resource_1 = require("../../../../utils/templates/template-resour
7
7
  const remove_attrs_1 = require("../utils/remove-attrs");
8
8
  const overscrollAttrName = 'tuiOverscroll';
9
9
  function migrateOverscroll({ resource, recorder, fileSystem, }) {
10
+ var _a;
10
11
  const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
11
12
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
12
13
  const elements = (0, elements_1.findElementsWithDirective)(template, overscrollAttrName).filter(({ sourceCodeLocation }) => !!sourceCodeLocation);
@@ -18,7 +19,10 @@ function migrateOverscroll({ resource, recorder, fileSystem, }) {
18
19
  attrToRemove &&
19
20
  (0, remove_attrs_1.removeAttrs)([attrToRemove], sourceCodeLocation, recorder, templateOffset);
20
21
  });
21
- addTodo(recorder, elements[0].sourceCodeLocation, templateOffset);
22
+ const element = (_a = elements[0]) === null || _a === void 0 ? void 0 : _a.sourceCodeLocation;
23
+ if (element) {
24
+ addTodo(recorder, element, templateOffset);
25
+ }
22
26
  }
23
27
  exports.migrateOverscroll = migrateOverscroll;
24
28
  function addTodo(recorder, sourceCodeLocation, templateOffset) {
@@ -9,7 +9,7 @@ function migratePreventDefault({ resource, recorder, fileSystem, }) {
9
9
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
10
10
  const elements = (0, elements_1.findElementsWithAttribute)(template, 'tuiPreventDefault');
11
11
  elements.forEach(({ attrs, sourceCodeLocation }) => {
12
- var _a, _b;
12
+ var _a, _b, _c, _d;
13
13
  if (!sourceCodeLocation) {
14
14
  return;
15
15
  }
@@ -18,8 +18,8 @@ function migratePreventDefault({ resource, recorder, fileSystem, }) {
18
18
  return;
19
19
  }
20
20
  const event = preventDefaultAttr.value;
21
- const preventDefaultStart = ((_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[preventDefaultAttr.name].startOffset) || 0;
22
- const preventDefaultEnd = ((_b = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _b === void 0 ? void 0 : _b[preventDefaultAttr.name].endOffset) || 0;
21
+ const preventDefaultStart = ((_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[preventDefaultAttr.name]) === null || _b === void 0 ? void 0 : _b.startOffset) || 0;
22
+ const preventDefaultEnd = ((_d = (_c = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _c === void 0 ? void 0 : _c[preventDefaultAttr.name]) === null || _d === void 0 ? void 0 : _d.endOffset) || 0;
23
23
  recorder.insertLeft(templateOffset + preventDefaultStart, `(${event}.prevent.silent)="0"`);
24
24
  recorder.remove(templateOffset + preventDefaultStart, preventDefaultEnd - preventDefaultStart);
25
25
  });
@@ -9,7 +9,7 @@ function migrateProgressSegmented({ resource, recorder, fileSystem, }) {
9
9
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
10
10
  const elements = (0, elements_1.findElementsByTagName)(template, 'tui-progress-segmented');
11
11
  elements.forEach(({ attrs, sourceCodeLocation }) => {
12
- var _a;
12
+ var _a, _b;
13
13
  if (!sourceCodeLocation) {
14
14
  return;
15
15
  }
@@ -18,7 +18,7 @@ function migrateProgressSegmented({ resource, recorder, fileSystem, }) {
18
18
  return;
19
19
  }
20
20
  const max = maxAttr.value;
21
- const insertTo = ((_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[maxAttr.name].endOffset) || 0;
21
+ const insertTo = ((_b = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[maxAttr.name]) === null || _b === void 0 ? void 0 : _b.endOffset) || 0;
22
22
  recorder.insertRight(insertTo + templateOffset, ` [segments]="${max}"`);
23
23
  });
24
24
  }
@@ -13,11 +13,12 @@ function addUniqueImport(filePath, namedImport, moduleSpecifier) {
13
13
  const existingDeclaration = (0, ng_morph_1.getImports)(filePath, {
14
14
  moduleSpecifier,
15
15
  });
16
- if (existingDeclaration.length) {
17
- const modules = existingDeclaration[0]
16
+ const imports = existingDeclaration === null || existingDeclaration === void 0 ? void 0 : existingDeclaration[0];
17
+ if (imports) {
18
+ const modules = imports
18
19
  .getNamedImports()
19
20
  .map((namedImport) => namedImport.getText());
20
- (0, ng_morph_1.editImports)(existingDeclaration[0], () => ({
21
+ (0, ng_morph_1.editImports)(imports, () => ({
21
22
  namedImports: [...modules, namedImport],
22
23
  isTypeOnly: false,
23
24
  }));
@@ -7,7 +7,7 @@ function getComponentFromIdentifier(identifier) {
7
7
  const rootImportDeclaration = (0, ng_morph_1.getImports)(identifier.getSourceFile().getFilePath(), {
8
8
  namedImports: [identifier.getText()],
9
9
  })[0];
10
- const rootComponentPath = ((_a = rootImportDeclaration.getModuleSpecifierSourceFile()) === null || _a === void 0 ? void 0 : _a.getFilePath()) || '';
10
+ const rootComponentPath = ((_a = rootImportDeclaration === null || rootImportDeclaration === void 0 ? void 0 : rootImportDeclaration.getModuleSpecifierSourceFile()) === null || _a === void 0 ? void 0 : _a.getFilePath()) || '';
11
11
  return (0, ng_morph_1.getNgComponents)(rootComponentPath, { name: identifier.getText() })[0];
12
12
  }
13
13
  exports.getComponentFromIdentifier = getComponentFromIdentifier;
@@ -7,8 +7,8 @@ const ng_morph_1 = require("ng-morph");
7
7
  function decoratorToTemplateResource(decorator) {
8
8
  var _a, _b, _c;
9
9
  const [metadata] = decorator.getArguments();
10
- const templateUrl = metadata.getProperty('templateUrl');
11
- const template = metadata.getProperty('template');
10
+ const templateUrl = metadata === null || metadata === void 0 ? void 0 : metadata.getProperty('templateUrl');
11
+ const template = metadata === null || metadata === void 0 ? void 0 : metadata.getProperty('template');
12
12
  const componentPath = decorator.getSourceFile().getFilePath();
13
13
  if (templateUrl) {
14
14
  const templatePath = path.parse(((_a = templateUrl === null || templateUrl === void 0 ? void 0 : templateUrl.getInitializer()) === null || _a === void 0 ? void 0 : _a.getText().replaceAll(/['"`]/g, '')) || '');
@@ -62,8 +62,8 @@ function replaceInputProperty({ templateResource, fileSystem, componentSelector,
62
62
  recorder.insertRight(offset, to.startsWith('[') ? to : `[${to}]`);
63
63
  });
64
64
  propertyValues.forEach(([startOffset, endOffset]) => {
65
- recorder.remove(startOffset, endOffset - startOffset);
66
- recorder.insertRight(startOffset, newValue);
65
+ recorder.remove(startOffset !== null && startOffset !== void 0 ? startOffset : 0, (endOffset !== null && endOffset !== void 0 ? endOffset : 0) - (startOffset !== null && startOffset !== void 0 ? startOffset : 0));
66
+ recorder.insertRight(startOffset !== null && startOffset !== void 0 ? startOffset : 0, newValue);
67
67
  });
68
68
  return true;
69
69
  }
@@ -130,7 +130,7 @@ function removeInputProperty({ templateResource, fileSystem, componentSelector,
130
130
  ...getInputPropertyOffsets(template, `[${inputProperty}]`, [componentSelector], filterFn),
131
131
  ].map(([start, end]) => [templateOffset + start, templateOffset + end]);
132
132
  propertyOffsets.forEach(([start, end]) => {
133
- recorder.remove(start, end - start);
133
+ recorder.remove(start !== null && start !== void 0 ? start : 0, (end !== null && end !== void 0 ? end : 0) - (start !== null && start !== void 0 ? start : 0));
134
134
  });
135
135
  }
136
136
  exports.removeInputProperty = removeInputProperty;
@@ -1,10 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
- /**
3
- * Generates unique ids
4
- */
5
2
  export declare class TuiIdService {
6
3
  private static autoId;
7
4
  generate(): string;
8
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiIdService, never>;
9
6
  static ɵprov: i0.ɵɵInjectableDeclaration<TuiIdService>;
10
7
  }
8
+ export declare function tuiInjectId(): string;