@taiga-ui/cdk 3.42.1 → 3.43.0

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 (30) hide show
  1. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js +2 -5
  2. package/bundles/taiga-ui-cdk-components-dialog-host.umd.js.map +1 -1
  3. package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
  4. package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
  5. package/bundles/taiga-ui-cdk-tokens.umd.js +1 -1
  6. package/bundles/taiga-ui-cdk-tokens.umd.js.map +1 -1
  7. package/bundles/taiga-ui-cdk-utils-svg.umd.js +13 -3
  8. package/bundles/taiga-ui-cdk-utils-svg.umd.js.map +1 -1
  9. package/constants/version.d.ts +1 -1
  10. package/constants/version.js +1 -1
  11. package/esm2015/components/dialog-host/dialog-host.component.js +2 -2
  12. package/esm2015/constants/version.js +2 -2
  13. package/esm2015/tokens/window-height.js +2 -2
  14. package/esm2015/utils/svg/svg-linear-gradient-processor.js +12 -4
  15. package/fesm2015/taiga-ui-cdk-components-dialog-host.js +1 -1
  16. package/fesm2015/taiga-ui-cdk-components-dialog-host.js.map +1 -1
  17. package/fesm2015/taiga-ui-cdk-constants.js +1 -1
  18. package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
  19. package/fesm2015/taiga-ui-cdk-tokens.js +1 -1
  20. package/fesm2015/taiga-ui-cdk-tokens.js.map +1 -1
  21. package/fesm2015/taiga-ui-cdk-utils-svg.js +11 -3
  22. package/fesm2015/taiga-ui-cdk-utils-svg.js.map +1 -1
  23. package/package.json +1 -1
  24. package/schematics/ng-add/steps/add-taiga-icons.js +1 -3
  25. package/schematics/ng-update/steps/remove-module.js +3 -0
  26. package/schematics/ng-update/steps/rename-types.js +3 -0
  27. package/schematics/ng-update/steps/replace-enums.js +3 -0
  28. package/schematics/ng-update/steps/replace-services.js +3 -0
  29. package/schematics/utils/templates/elements.js +2 -4
  30. package/utils/svg/svg-linear-gradient-processor.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "3.42.1",
3
+ "version": "3.43.0",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -10,9 +10,7 @@ const ICON_ASSETS = {
10
10
  output: `assets/taiga-ui/icons`,
11
11
  };
12
12
  function addTaigaIcons(options) {
13
- return (_) => {
14
- return addTaigaAssetsToAngularJson(options);
15
- };
13
+ return (_) => addTaigaAssetsToAngularJson(options);
16
14
  }
17
15
  exports.addTaigaIcons = addTaigaIcons;
18
16
  function addTaigaAssetsToAngularJson(options) {
@@ -16,6 +16,9 @@ exports.removeModules = removeModules;
16
16
  function removeModule(name, moduleSpecifier) {
17
17
  const references = get_named_import_references_1.getNamedImportReferences(name, moduleSpecifier);
18
18
  references.forEach(ref => {
19
+ if (ref.wasForgotten()) {
20
+ return;
21
+ }
19
22
  const parent = ref.getParent();
20
23
  if (ng_morph_1.Node.isImportSpecifier(parent)) {
21
24
  import_manipulations_1.removeImport(parent);
@@ -16,6 +16,9 @@ exports.renameTypes = renameTypes;
16
16
  function renameType(from, to, moduleSpecifier, preserveGenerics = false) {
17
17
  const references = get_named_import_references_1.getNamedImportReferences(from, moduleSpecifier);
18
18
  references.forEach(ref => {
19
+ if (ref.wasForgotten()) {
20
+ return;
21
+ }
19
22
  const parent = ref.getParent();
20
23
  if (ng_morph_1.Node.isImportSpecifier(parent)) {
21
24
  processImport(parent, from, to);
@@ -17,6 +17,9 @@ function replaceEnumWithString(enumName, replaceValues, keepAsType = true) {
17
17
  var _a;
18
18
  const references = get_named_import_references_1.getNamedImportReferences(enumName);
19
19
  for (const ref of references) {
20
+ if (ref.wasForgotten()) {
21
+ continue;
22
+ }
20
23
  const parent = ref.getParent();
21
24
  if (ng_morph_1.Node.isImportSpecifier(parent) && !(keepAsType && containTypeRef(parent))) {
22
25
  import_manipulations_1.removeImport(parent);
@@ -19,6 +19,9 @@ function replaceService({ from, to, replaceMethods }, options) {
19
19
  colored_log_1.processLog(`${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.SMALL_TAB_SYMBOL}${colored_log_1.PROCESSING_SYMBOL}replacing ${from.name}...`);
20
20
  const references = get_named_import_references_1.getNamedImportReferences(from.name, from.moduleSpecifier);
21
21
  references.forEach(ref => {
22
+ if (ref.wasForgotten()) {
23
+ return;
24
+ }
22
25
  const parent = ref.getParent();
23
26
  if (ng_morph_1.Node.isImportSpecifier(parent)) {
24
27
  import_manipulations_1.removeImport(parent);
@@ -91,9 +91,7 @@ function hasElementAttribute(element, attributeName) {
91
91
  exports.hasElementAttribute = hasElementAttribute;
92
92
  /** Gets the start offset of the given attribute from a Parse5 element. */
93
93
  function getStartOffsetOfAttribute(element, attributeName) {
94
- var _a, _b;
95
- return ((((_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) &&
96
- ((_b = element.sourceCodeLocation.attrs[attributeName.toLowerCase()]) === null || _b === void 0 ? void 0 : _b.startOffset)) ||
97
- 0);
94
+ var _a, _b, _c;
95
+ return (((_c = (_b = (_a = element.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b[attributeName.toLowerCase()]) === null || _c === void 0 ? void 0 : _c.startOffset) || 0);
98
96
  }
99
97
  exports.getStartOffsetOfAttribute = getStartOffsetOfAttribute;
@@ -13,4 +13,4 @@ import { TuiSafeHtml } from '@taiga-ui/cdk/interfaces';
13
13
  * Documentation: https://www.w3.org/TR/SVG11/pservers.html
14
14
  *
15
15
  */
16
- export declare function tuiSvgLinearGradientProcessor(svg: TuiSafeHtml, salt?: number | string): TuiSafeHtml;
16
+ export declare function tuiSvgLinearGradientProcessor(svg: TuiSafeHtml, salt?: number | string, fallback?: string): TuiSafeHtml;