@taiga-ui/cdk 4.0.0-rc.2 → 4.0.0-rc.4

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 (192) hide show
  1. package/classes/control.d.ts +1 -1
  2. package/constants/used-icons.d.ts +1 -1
  3. package/constants/version.d.ts +1 -1
  4. package/constants/version.js +1 -1
  5. package/directives/auto-focus/autofocus.options.d.ts +1 -1
  6. package/directives/for/for.directive.d.ts +3 -3
  7. package/directives/platform/platform.directive.d.ts +1 -1
  8. package/directives/value-changes/value-changes.directive.d.ts +3 -3
  9. package/esm2022/classes/control.mjs +2 -2
  10. package/esm2022/constants/used-icons.mjs +5 -5
  11. package/esm2022/constants/version.mjs +2 -2
  12. package/esm2022/directives/active-zone/active-zone.directive.mjs +2 -2
  13. package/esm2022/directives/auto-focus/handlers/ios.handler.mjs +3 -3
  14. package/esm2022/directives/click-outside/click-outside.directive.mjs +2 -2
  15. package/esm2022/directives/droppable/droppable.directive.mjs +3 -3
  16. package/esm2022/directives/for/for.directive.mjs +6 -6
  17. package/esm2022/directives/hovered/hovered.service.mjs +2 -2
  18. package/esm2022/directives/obscured/obscured.directive.mjs +2 -2
  19. package/esm2022/directives/obscured/obscured.service.mjs +2 -2
  20. package/esm2022/directives/pan/pan.service.mjs +2 -2
  21. package/esm2022/directives/platform/platform.directive.mjs +6 -6
  22. package/esm2022/directives/swipe/swipe.service.mjs +2 -2
  23. package/esm2022/directives/value-changes/value-changes.directive.mjs +6 -6
  24. package/esm2022/directives/zoom/zoom.service.mjs +4 -4
  25. package/esm2022/observables/control-value.mjs +2 -2
  26. package/esm2022/observables/drag-and-drop-from.mjs +2 -2
  27. package/esm2022/observables/events.mjs +3 -3
  28. package/esm2022/observables/if-map.mjs +2 -2
  29. package/esm2022/observables/must-be-present.mjs +2 -2
  30. package/esm2022/observables/zone.mjs +4 -4
  31. package/esm2022/pipes/filter/filter.pipe.mjs +2 -2
  32. package/esm2022/services/popover.service.mjs +3 -3
  33. package/esm2022/services/scroll.service.mjs +2 -2
  34. package/esm2022/services/static-request.service.mjs +1 -1
  35. package/esm2022/tokens/active-element.mjs +3 -3
  36. package/esm2022/tokens/removed-element.mjs +2 -2
  37. package/esm2022/utils/color/get-gradient-data.mjs +6 -0
  38. package/esm2022/utils/color/hex-to-rgb.mjs +2 -2
  39. package/esm2022/utils/color/index.mjs +3 -1
  40. package/esm2022/utils/color/parse-color.mjs +3 -3
  41. package/esm2022/utils/color/parse-gradient.mjs +70 -0
  42. package/esm2022/utils/color/rgb-to-hex.mjs +2 -2
  43. package/esm2022/utils/dom/get-element-obscurers.mjs +2 -2
  44. package/esm2022/utils/dom/get-element-point.mjs +6 -0
  45. package/esm2022/utils/dom/index.mjs +2 -1
  46. package/esm2022/utils/focus/focused-in.mjs +7 -0
  47. package/esm2022/utils/focus/index.mjs +2 -1
  48. package/esm2022/utils/miscellaneous/mark-control-as-touched-and-validate.mjs +3 -3
  49. package/esm2022/utils/miscellaneous/with-styles.mjs +2 -2
  50. package/fesm2022/taiga-ui-cdk-classes.mjs +1 -1
  51. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-cdk-constants.mjs +5 -5
  53. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +1 -1
  55. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +2 -2
  57. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +1 -1
  59. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +2 -2
  61. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-cdk-directives-for.mjs +5 -5
  63. package/fesm2022/taiga-ui-cdk-directives-for.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +1 -1
  65. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +2 -2
  67. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-cdk-directives-pan.mjs +1 -1
  69. package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-cdk-directives-platform.mjs +5 -5
  71. package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +1 -1
  73. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +5 -5
  75. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +3 -3
  77. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-cdk-observables.mjs +9 -9
  79. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +1 -1
  81. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-cdk-services.mjs +3 -3
  83. package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-cdk-tokens.mjs +3 -3
  85. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-cdk-utils-color.mjs +80 -5
  87. package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +1 -1
  88. package/fesm2022/taiga-ui-cdk-utils-dom.mjs +7 -2
  89. package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
  90. package/fesm2022/taiga-ui-cdk-utils-focus.mjs +8 -2
  91. package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +3 -3
  93. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  94. package/package.json +6 -6
  95. package/schematics/ng-add/index.js +1 -1
  96. package/schematics/ng-add/steps/add-taiga-icons.js +1 -1
  97. package/schematics/ng-add/steps/add-taiga-modules.js +3 -3
  98. package/schematics/ng-update/steps/icons/replace-imports.js +5 -5
  99. package/schematics/ng-update/steps/index.d.ts +1 -0
  100. package/schematics/ng-update/steps/index.js +1 -0
  101. package/schematics/ng-update/steps/remove-module.js +2 -2
  102. package/schematics/ng-update/steps/rename-types.js +2 -2
  103. package/schematics/ng-update/steps/replace-deep-import.js +2 -2
  104. package/schematics/ng-update/steps/replace-enums.js +2 -2
  105. package/schematics/ng-update/steps/replace-identifier.js +1 -1
  106. package/schematics/ng-update/steps/replace-package-name.d.ts +5 -0
  107. package/schematics/ng-update/steps/replace-package-name.js +19 -0
  108. package/schematics/ng-update/steps/replace-services.js +5 -5
  109. package/schematics/ng-update/steps/show-warnings.js +4 -4
  110. package/schematics/ng-update/utils/replace-text.js +1 -1
  111. package/schematics/ng-update/utils/templates/replace-attr-values.js +3 -3
  112. package/schematics/ng-update/utils/templates/replace-attrs.js +1 -1
  113. package/schematics/ng-update/utils/templates/template-comments.js +4 -2
  114. package/schematics/ng-update/v3/constants/templates.js +9 -9
  115. package/schematics/ng-update/v3/index.js +1 -1
  116. package/schematics/ng-update/v3/steps/migrate-date-time.js +10 -10
  117. package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +8 -8
  118. package/schematics/ng-update/v3/steps/migrate-progress.js +4 -4
  119. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.js +3 -3
  120. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.js +4 -4
  121. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.js +2 -2
  122. package/schematics/ng-update/v3/steps/migrate-templates.js +16 -16
  123. package/schematics/ng-update/v3/steps/migrate-textfield-controller.js +8 -8
  124. package/schematics/ng-update/v3/steps/miscellaneous.js +5 -5
  125. package/schematics/ng-update/v3/steps/replace-functions.js +12 -12
  126. package/schematics/ng-update/v3/steps/replace-styles.js +2 -2
  127. package/schematics/ng-update/v3-36/index.js +7 -17
  128. package/schematics/ng-update/v3-40/index.js +1 -1
  129. package/schematics/ng-update/v3-5/steps/migrate-expand-templates.js +4 -4
  130. package/schematics/ng-update/v4/index.js +9 -6
  131. package/schematics/ng-update/v4/migrate-css-vars/palette.d.ts +11 -2
  132. package/schematics/ng-update/v4/migrate-css-vars/palette.js +18 -8
  133. package/schematics/ng-update/v4/migrate-css-vars/rename-css-vars.js +10 -2
  134. package/schematics/ng-update/v4/migrate-icons/index.js +8 -6
  135. package/schematics/ng-update/v4/migrate-icons/rename-icons.js +2 -2
  136. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.d.ts +2 -0
  137. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.js +66 -0
  138. package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +2 -2
  139. package/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.js +9 -1
  140. package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +10 -9
  141. package/schematics/ng-update/v4/steps/constants/enums.js +31 -0
  142. package/schematics/ng-update/v4/steps/constants/html-comments.js +10 -0
  143. package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +180 -118
  144. package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +1 -1
  145. package/schematics/ng-update/v4/steps/constants/migration-warnings.js +5 -0
  146. package/schematics/ng-update/v4/steps/constants/modules-to-remove.js +8 -0
  147. package/schematics/ng-update/v4/steps/constants/modules-to-replace.d.ts +12 -0
  148. package/schematics/ng-update/v4/steps/constants/modules-to-replace.js +15 -0
  149. package/schematics/ng-update/v4/steps/constants/tags-to-replace.js +5 -4
  150. package/schematics/ng-update/v4/steps/constants/types.js +6 -0
  151. package/schematics/ng-update/v4/steps/index.d.ts +4 -0
  152. package/schematics/ng-update/v4/steps/index.js +4 -0
  153. package/schematics/ng-update/v4/steps/migrate-all-country-iso-codes.js +1 -1
  154. package/schematics/ng-update/v4/steps/migrate-destroy-service.js +7 -4
  155. package/schematics/ng-update/v4/steps/migrate-legacy-mask.js +2 -2
  156. package/schematics/ng-update/v4/steps/migrate-option-providers.js +2 -2
  157. package/schematics/ng-update/v4/steps/migrate-proprietary.js +3 -3
  158. package/schematics/ng-update/v4/steps/migrate-styles.js +1 -1
  159. package/schematics/ng-update/v4/steps/migrate-templates.js +1 -1
  160. package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +24 -6
  161. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +4 -4
  162. package/schematics/ng-update/v4/steps/templates/migrate-expandable.js +2 -2
  163. package/schematics/ng-update/v4/steps/templates/migrate-focusable.js +1 -1
  164. package/schematics/ng-update/v4/steps/templates/migrate-labeled.js +1 -3
  165. package/schematics/ng-update/v4/steps/templates/migrate-money.js +1 -1
  166. package/schematics/ng-update/v4/steps/templates/migrate-thumbnail-card.js +1 -1
  167. package/schematics/ng-update/v4/steps/templates/toggles/common.d.ts +1 -1
  168. package/schematics/ng-update/v4/steps/templates/toggles/common.js +3 -3
  169. package/schematics/ng-update/v4/steps/update-packages.d.ts +4 -0
  170. package/schematics/ng-update/v4/steps/update-packages.js +29 -0
  171. package/schematics/ng-update/v4/steps/utils/remove-attrs.js +1 -1
  172. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.d.ts +13 -0
  173. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.js +47 -0
  174. package/schematics/ng-update/v4/steps/utils/replace-substrings.js +1 -1
  175. package/schematics/ng-update/v4/tests/migrate-destroy-service/utils.js +1 -0
  176. package/schematics/utils/add-unique-import.js +1 -1
  177. package/schematics/utils/angular-json-manipulations.js +4 -4
  178. package/schematics/utils/get-named-import-references.js +4 -4
  179. package/schematics/utils/get-standalone-bootstrap-function.js +2 -2
  180. package/schematics/utils/import-manipulations.js +1 -1
  181. package/schematics/utils/push-to-array-property.js +1 -1
  182. package/schematics/utils/templates/elements.js +16 -13
  183. package/schematics/utils/templates/get-component-templates.js +1 -1
  184. package/schematics/utils/templates/inputs.js +1 -1
  185. package/schematics/utils/templates/ng-component-input-manipulations.js +5 -5
  186. package/utils/color/get-gradient-data.d.ts +1 -0
  187. package/utils/color/index.d.ts +2 -0
  188. package/utils/color/parse-gradient.d.ts +10 -0
  189. package/utils/dom/get-element-point.d.ts +2 -0
  190. package/utils/dom/index.d.ts +1 -0
  191. package/utils/focus/focused-in.d.ts +2 -0
  192. package/utils/focus/index.d.ts +1 -0
@@ -8,18 +8,18 @@ function getNamedImportReferences(namedImport, moduleSpecifier = '**/**', files
8
8
  namedImports: [namedImport],
9
9
  moduleSpecifier,
10
10
  });
11
- const namedImports = importDeclarations.map(declaration => {
11
+ const namedImports = importDeclarations.map((declaration) => {
12
12
  var _a;
13
13
  return (_a = declaration
14
14
  .getNamedImports()
15
- .find(specifier => specifier.getName() === namedImport)) === null || _a === void 0 ? void 0 : _a.getNameNode();
15
+ .find((specifier) => specifier.getName() === namedImport)) === null || _a === void 0 ? void 0 : _a.getNameNode();
16
16
  });
17
- return (0, ng_morph_1.arrayFlat)(namedImports.map(specifier => (specifier === null || specifier === void 0 ? void 0 : specifier.findReferencesAsNodes().filter(
17
+ return (0, ng_morph_1.arrayFlat)(namedImports.map((specifier) => (specifier === null || specifier === void 0 ? void 0 : specifier.findReferencesAsNodes().filter(
18
18
  /**
19
19
  * Otherwise, each `findReferencesAsNodes` will return references across THE WHOLE project.
20
20
  * It will cause a lot of duplicates in the result and significantly slow down the process.
21
21
  */
22
- ref => ref.getSourceFile().getFilePath() ===
22
+ (ref) => ref.getSourceFile().getFilePath() ===
23
23
  (specifier === null || specifier === void 0 ? void 0 : specifier.getSourceFile().getFilePath()))) || []));
24
24
  }
25
25
  exports.getNamedImportReferences = getNamedImportReferences;
@@ -5,8 +5,8 @@ const ng_morph_1 = require("ng-morph");
5
5
  const get_named_import_references_1 = require("./get-named-import-references");
6
6
  function getStandaloneBootstrapFunction(path) {
7
7
  const standaloneBootstrapIdentifier = (0, get_named_import_references_1.getNamedImportReferences)('bootstrapApplication', '@angular/platform-browser', path)
8
- .map(ref => ref.getParent())
9
- .find(node => ng_morph_1.Node.isCallExpression(node));
8
+ .map((ref) => ref.getParent())
9
+ .find((node) => ng_morph_1.Node.isCallExpression(node));
10
10
  const standaloneBootstrapFunction = standaloneBootstrapIdentifier;
11
11
  return standaloneBootstrapFunction || null;
12
12
  }
@@ -14,7 +14,7 @@ function renameImport(specifier, to, from) {
14
14
  const namedImport = specifier
15
15
  .getImportDeclaration()
16
16
  .getNamedImports()
17
- .find(specifier => specifier.getName() === from);
17
+ .find((specifier) => specifier.getName() === from);
18
18
  namedImport === null || namedImport === void 0 ? void 0 : namedImport.replaceWithText(to);
19
19
  }
20
20
  exports.renameImport = renameImport;
@@ -18,7 +18,7 @@ function pushToObjectArrayProperty(objectExpression, propertyName, initializer,
18
18
  if (unique &&
19
19
  importsInitializer
20
20
  .getElements()
21
- .some(element => element.getText() === initializer)) {
21
+ .some((element) => element.getText() === initializer)) {
22
22
  return;
23
23
  }
24
24
  if (typeof index === 'number') {
@@ -5,7 +5,7 @@ const parse5_1 = require("parse5");
5
5
  function findElementsByFn(nodes, predicateFn) {
6
6
  const elements = [];
7
7
  const visitNodes = (nodes) => {
8
- nodes.forEach(n => {
8
+ nodes.forEach((n) => {
9
9
  const node = n;
10
10
  if (node.childNodes) {
11
11
  visitNodes(node.childNodes);
@@ -31,11 +31,11 @@ exports.findElementsInTemplateByFn = findElementsInTemplateByFn;
31
31
  function findElementsByTagName(html, tagName,
32
32
  // eslint-disable-next-line no-restricted-syntax
33
33
  filterFn = () => true) {
34
- return findElementsInTemplateByFn(html, el => el.tagName === tagName && filterFn(el));
34
+ return findElementsInTemplateByFn(html, (el) => el.tagName === tagName && filterFn(el));
35
35
  }
36
36
  exports.findElementsByTagName = findElementsByTagName;
37
37
  function findElementsByTagNames(html, tagNames) {
38
- return findElementsInTemplateByFn(html, el => tagNames.includes(el.tagName));
38
+ return findElementsInTemplateByFn(html, (el) => tagNames.includes(el.tagName));
39
39
  }
40
40
  exports.findElementsByTagNames = findElementsByTagNames;
41
41
  /**
@@ -45,7 +45,7 @@ exports.findElementsByTagNames = findElementsByTagNames;
45
45
  function findElementsWithDirective(html, attributeName) {
46
46
  const lowercasedAttrName = attributeName.toLowerCase();
47
47
  const inputName = `[${lowercasedAttrName}]`;
48
- return findElementsInTemplateByFn(html, el => { var _a; return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(({ name }) => name === lowercasedAttrName || name === inputName); });
48
+ return findElementsInTemplateByFn(html, (el) => { var _a; return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(({ name }) => name === lowercasedAttrName || name === inputName); });
49
49
  }
50
50
  exports.findElementsWithDirective = findElementsWithDirective;
51
51
  /**
@@ -53,7 +53,7 @@ exports.findElementsWithDirective = findElementsWithDirective;
53
53
  * include the specified attribute.
54
54
  */
55
55
  function findElementsWithAttribute(html, attributeName) {
56
- return findElementsInTemplateByFn(html, el => { var _a; return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attr.name === attributeName.toLowerCase()); });
56
+ return findElementsInTemplateByFn(html, (el) => { var _a; return (_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some((attr) => attr.name === attributeName.toLowerCase()); });
57
57
  }
58
58
  exports.findElementsWithAttribute = findElementsWithAttribute;
59
59
  /**
@@ -64,10 +64,13 @@ exports.findElementsWithAttribute = findElementsWithAttribute;
64
64
  function findElementsWithAttributeOnTag(html, attributeNames, tagNames = [],
65
65
  // eslint-disable-next-line no-restricted-syntax
66
66
  filterFn = () => true) {
67
- return findElementsInTemplateByFn(html, el => {
67
+ return findElementsInTemplateByFn(html, (el) => {
68
68
  var _a;
69
- return ((_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attributeNames.map(name => name.toLowerCase()).includes(attr.name))) &&
70
- (tagNames.includes(el.tagName) || !tagNames.length) &&
69
+ return (!attributeNames.length ||
70
+ ((_a = el.attrs) === null || _a === void 0 ? void 0 : _a.some((attr) => attributeNames.map((name) => name.toLowerCase()).includes(attr.name)))) &&
71
+ (tagNames.includes(el.tagName) ||
72
+ tagNames.includes('*') ||
73
+ !tagNames.length) &&
71
74
  filterFn(el);
72
75
  });
73
76
  }
@@ -80,9 +83,9 @@ function findAttributeOnElementWithTag(html, name, tagNames,
80
83
  // eslint-disable-next-line no-restricted-syntax
81
84
  filterFn = () => true) {
82
85
  return findElementsWithAttribute(html, name)
83
- .filter(element => (tagNames.includes(element.tagName) || tagNames.includes('*')) &&
86
+ .filter((element) => (tagNames.includes(element.tagName) || tagNames.includes('*')) &&
84
87
  filterFn(element))
85
- .map(element => getStartOffsetOfAttribute(element, name));
88
+ .map((element) => getStartOffsetOfAttribute(element, name));
86
89
  }
87
90
  exports.findAttributeOnElementWithTag = findAttributeOnElementWithTag;
88
91
  /**
@@ -93,15 +96,15 @@ function findAttributeOnElementWithAttrs(html, name, attrs,
93
96
  // eslint-disable-next-line no-restricted-syntax
94
97
  filterFn = () => true) {
95
98
  return findElementsWithAttribute(html, name)
96
- .filter(element => attrs.some(attr => hasElementAttribute(element, attr)) &&
99
+ .filter((element) => attrs.some((attr) => hasElementAttribute(element, attr)) &&
97
100
  filterFn(element))
98
- .map(element => getStartOffsetOfAttribute(element, name));
101
+ .map((element) => getStartOffsetOfAttribute(element, name));
99
102
  }
100
103
  exports.findAttributeOnElementWithAttrs = findAttributeOnElementWithAttrs;
101
104
  /** Shorthand function that checks if the specified element contains the given attribute. */
102
105
  function hasElementAttribute(element, attributeName) {
103
106
  var _a;
104
- return (_a = element.attrs) === null || _a === void 0 ? void 0 : _a.some(attr => attr.name === attributeName.toLowerCase());
107
+ return (_a = element.attrs) === null || _a === void 0 ? void 0 : _a.some((attr) => attr.name === attributeName.toLowerCase());
105
108
  }
106
109
  exports.hasElementAttribute = hasElementAttribute;
107
110
  /** Gets the start offset of the given attribute from a Parse5 element. */
@@ -31,7 +31,7 @@ function getFullTemplatePath(templatePath, componentPath) {
31
31
  }
32
32
  function getComponentTemplates(pattern, query) {
33
33
  return (0, ng_morph_1.getClasses)(pattern, query)
34
- .map(declaration => declaration.getDecorator('Component'))
34
+ .map((declaration) => declaration.getDecorator('Component'))
35
35
  .filter((decorator) => !!decorator)
36
36
  .map(decoratorToTemplateResource)
37
37
  .filter((x) => Boolean(x));
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isBinding = exports.findAttr = void 0;
4
4
  function findAttr(attrs, name) {
5
- return attrs.find(attr => attr.name === name || attr.name === `[${name}]`);
5
+ return attrs.find((attr) => attr.name === name || attr.name === `[${name}]`);
6
6
  }
7
7
  exports.findAttr = findAttr;
8
8
  function isBinding(attr) {
@@ -39,11 +39,11 @@ function replaceInputProperty({ templateResource, fileSystem, componentSelector,
39
39
  const stringProperties = [
40
40
  ...(0, elements_1.findAttributeOnElementWithTag)(template, from, selector, filterFn),
41
41
  ...(0, elements_1.findAttributeOnElementWithAttrs)(template, from, selector, filterFn),
42
- ].map(offset => templateOffset + offset);
42
+ ].map((offset) => templateOffset + offset);
43
43
  const propertyBindings = [
44
44
  ...(0, elements_1.findAttributeOnElementWithTag)(template, `[${from}]`, selector, filterFn),
45
45
  ...(0, elements_1.findAttributeOnElementWithAttrs)(template, `[${from}]`, selector, filterFn),
46
- ].map(offset => templateOffset + offset);
46
+ ].map((offset) => templateOffset + offset);
47
47
  const propertyValues = newValue
48
48
  ? getInputPropertyValueOffsets(template, from, selector).map(([start, end]) => [
49
49
  templateOffset + start,
@@ -53,11 +53,11 @@ function replaceInputProperty({ templateResource, fileSystem, componentSelector,
53
53
  if (!stringProperties.length && !propertyBindings.length) {
54
54
  return false;
55
55
  }
56
- stringProperties.forEach(offset => {
56
+ stringProperties.forEach((offset) => {
57
57
  recorder.remove(offset, from.length);
58
58
  recorder.insertRight(offset, to);
59
59
  });
60
- propertyBindings.forEach(offset => {
60
+ propertyBindings.forEach((offset) => {
61
61
  recorder.remove(offset, `[${from}]`.length);
62
62
  recorder.insertRight(offset, to.startsWith('[') ? to : `[${to}]`);
63
63
  });
@@ -79,7 +79,7 @@ function getInputPropertyOffsets(html, attrName, tags,
79
79
  // eslint-disable-next-line no-restricted-syntax
80
80
  filterFn = () => true) {
81
81
  return (0, elements_1.findElementsWithAttribute)(html, attrName)
82
- .filter(element => (tags.includes(element.tagName) || tags.includes('*')) &&
82
+ .filter((element) => (tags.includes(element.tagName) || tags.includes('*')) &&
83
83
  filterFn(element))
84
84
  .map((element) => {
85
85
  var _a, _b;
@@ -0,0 +1 @@
1
+ export declare function tuiGetGradientData(gradient: string): string;
@@ -1,7 +1,9 @@
1
+ export * from './get-gradient-data';
1
2
  export * from './hex-to-rgb';
2
3
  export * from './hex-to-rgba';
3
4
  export * from './hsv-to-rgb';
4
5
  export * from './parse-color';
6
+ export * from './parse-gradient';
5
7
  export * from './rgb-to-hex';
6
8
  export * from './rgb-to-hsv';
7
9
  export * from './rgba-to-hex';
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,2 @@
1
+ import type { TuiPoint } from '@taiga-ui/core/types';
2
+ export declare function tuiGetElementPoint(x: number, y: number, element: HTMLElement): TuiPoint;
@@ -6,6 +6,7 @@ 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';
9
10
  export * from './get-selected-text';
10
11
  export * from './inject-element';
11
12
  export * from './is-current-target';
@@ -0,0 +1,2 @@
1
+ import type { Signal } from '@angular/core';
2
+ export declare function tuiFocusedIn(node: Node): Signal<boolean>;
@@ -1,4 +1,5 @@
1
1
  export * from './blur-native-focused';
2
+ export * from './focused-in';
2
3
  export * from './get-closest-focusable';
3
4
  export * from './get-native-focused';
4
5
  export * from './is-native-focused';