@taiga-ui/cdk 4.0.0-alpha.0 → 4.0.0-rc.10

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 (199) hide show
  1. package/classes/index.d.ts +0 -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/esm2022/classes/index.mjs +1 -2
  6. package/esm2022/constants/used-icons.mjs +9 -1
  7. package/esm2022/constants/version.mjs +2 -2
  8. package/esm2022/directives/auto-focus/autofocus.options.mjs +3 -3
  9. package/esm2022/directives/copy-processor/copy-processor.directive.mjs +3 -3
  10. package/esm2022/directives/high-dpi/high-dpi.directive.mjs +3 -3
  11. package/esm2022/directives/obscured/obscured.service.mjs +3 -3
  12. package/esm2022/services/index.mjs +2 -2
  13. package/esm2022/services/scroll.service.mjs +4 -4
  14. package/esm2022/services/theme-color.service.mjs +30 -0
  15. package/esm2022/tokens/active-element.mjs +3 -3
  16. package/esm2022/tokens/environment.mjs +15 -7
  17. package/esm2022/tokens/removed-element.mjs +3 -3
  18. package/esm2022/tokens/window-size.mjs +3 -3
  19. package/esm2022/utils/focus/focused-in.mjs +7 -0
  20. package/esm2022/utils/focus/index.mjs +2 -1
  21. package/fesm2022/taiga-ui-cdk-classes.mjs +1 -15
  22. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-cdk-constants.mjs +9 -1
  24. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +2 -2
  26. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
  27. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +2 -2
  28. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +2 -2
  30. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +2 -2
  32. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-cdk-services.mjs +22 -25
  34. package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-cdk-tokens.mjs +19 -12
  36. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-cdk-utils-focus.mjs +8 -2
  38. package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
  39. package/package.json +356 -67
  40. package/schematics/ng-update/interfaces/html-comment.d.ts +3 -2
  41. package/schematics/ng-update/interfaces/replacement-attribute-value.d.ts +6 -2
  42. package/schematics/ng-update/interfaces/replacement-identifier.d.ts +4 -10
  43. package/schematics/ng-update/interfaces/replacement-type.d.ts +4 -0
  44. package/schematics/ng-update/steps/rename-types.js +6 -2
  45. package/schematics/ng-update/steps/replace-identifier.js +30 -8
  46. package/schematics/ng-update/steps/replace-package-name.js +4 -5
  47. package/schematics/ng-update/utils/templates/replace-attr-values.js +39 -10
  48. package/schematics/ng-update/utils/templates/template-comments.js +7 -1
  49. package/schematics/ng-update/v4/index.js +9 -1
  50. package/schematics/ng-update/v4/migrate-icons/index.js +2 -2
  51. package/schematics/ng-update/v4/migrate-icons/rename-icons.js +13 -5
  52. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.d.ts +2 -1
  53. package/schematics/ng-update/v4/migrate-icons/rename-proprietary-icons.js +19 -6
  54. package/schematics/ng-update/v4/steps/constants/attr-to-directive-replace.js +3 -2
  55. package/schematics/ng-update/v4/steps/constants/attr-with-values-to-replace.js +44 -3
  56. package/schematics/ng-update/v4/steps/constants/attrs-to-replace.js +107 -21
  57. package/schematics/ng-update/v4/steps/constants/html-comments.js +9 -0
  58. package/schematics/ng-update/v4/steps/constants/identifiers-to-replace.js +552 -213
  59. package/schematics/ng-update/v4/steps/constants/index.d.ts +1 -0
  60. package/schematics/ng-update/v4/steps/constants/index.js +1 -0
  61. package/schematics/ng-update/v4/steps/constants/inputs-to-remove.js +1 -0
  62. package/schematics/ng-update/v4/steps/constants/migration-warnings.js +20 -0
  63. package/schematics/ng-update/v4/steps/constants/modules-to-remove.js +20 -0
  64. package/schematics/ng-update/v4/steps/constants/modules-to-replace.d.ts +7 -6
  65. package/schematics/ng-update/v4/steps/constants/modules-to-replace.js +1 -0
  66. package/schematics/ng-update/v4/steps/constants/services.d.ts +2 -0
  67. package/schematics/ng-update/v4/steps/constants/services.js +15 -0
  68. package/schematics/ng-update/v4/steps/constants/tags-to-replace.js +14 -2
  69. package/schematics/ng-update/v4/steps/constants/types.js +33 -1
  70. package/schematics/ng-update/v4/steps/index.d.ts +4 -1
  71. package/schematics/ng-update/v4/steps/index.js +4 -1
  72. package/schematics/ng-update/v4/steps/migrate-alert-service.d.ts +2 -0
  73. package/schematics/ng-update/v4/steps/migrate-alert-service.js +110 -0
  74. package/schematics/ng-update/v4/steps/migrate-month-context.d.ts +2 -0
  75. package/schematics/ng-update/v4/steps/migrate-month-context.js +39 -0
  76. package/schematics/ng-update/v4/steps/migrate-number-format-settings.d.ts +2 -0
  77. package/schematics/ng-update/v4/steps/migrate-number-format-settings.js +64 -0
  78. package/schematics/ng-update/v4/steps/migrate-root.d.ts +3 -0
  79. package/schematics/ng-update/v4/steps/migrate-root.js +61 -0
  80. package/schematics/ng-update/v4/steps/migrate-templates.js +10 -2
  81. package/schematics/ng-update/v4/steps/styles/index.js +38 -0
  82. package/schematics/ng-update/v4/steps/styles/migrate-less-scss-constants.d.ts +1 -0
  83. package/schematics/ng-update/v4/steps/styles/migrate-less-scss-constants.js +13 -0
  84. package/schematics/ng-update/v4/steps/styles/migrate-scrollbar-behavior.d.ts +1 -0
  85. package/schematics/ng-update/v4/steps/styles/migrate-scrollbar-behavior.js +10 -0
  86. package/schematics/ng-update/v4/steps/styles/migrate-shadow-mixins.d.ts +1 -0
  87. package/schematics/ng-update/v4/steps/styles/migrate-shadow-mixins.js +23 -0
  88. package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.d.ts +1 -0
  89. package/schematics/ng-update/v4/steps/styles/migrate-space-mixins.js +20 -0
  90. package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.d.ts +1 -0
  91. package/schematics/ng-update/v4/steps/styles/migrate-text-mixins.js +54 -0
  92. package/schematics/ng-update/v4/steps/templates/index.d.ts +6 -0
  93. package/schematics/ng-update/v4/steps/templates/index.js +6 -0
  94. package/schematics/ng-update/v4/steps/templates/migrate-avatar.js +10 -5
  95. package/schematics/ng-update/{v3/steps/migrate-polymorpheus.d.ts → v4/steps/templates/migrate-axes.d.ts} +2 -2
  96. package/schematics/ng-update/v4/steps/templates/migrate-axes.js +26 -0
  97. package/schematics/ng-update/v4/steps/templates/migrate-badge.js +15 -6
  98. package/schematics/ng-update/v4/steps/templates/migrate-badged-content.js +1 -1
  99. package/schematics/ng-update/{v3/steps/migrate-textfield-controller.d.ts → v4/steps/templates/migrate-blocked.d.ts} +2 -2
  100. package/schematics/ng-update/v4/steps/templates/migrate-blocked.js +35 -0
  101. package/schematics/ng-update/v4/steps/templates/migrate-button-appearance.d.ts +8 -0
  102. package/schematics/ng-update/v4/steps/templates/migrate-button-appearance.js +41 -0
  103. package/schematics/ng-update/v4/steps/templates/migrate-expandable.js +3 -2
  104. package/schematics/ng-update/v4/steps/templates/migrate-focusable.js +7 -4
  105. package/schematics/ng-update/v4/steps/templates/migrate-label.d.ts +8 -0
  106. package/schematics/ng-update/v4/steps/templates/migrate-label.js +39 -0
  107. package/schematics/ng-update/v4/steps/templates/migrate-labeled.js +5 -7
  108. package/schematics/ng-update/v4/steps/templates/migrate-mobile-tabs.d.ts +8 -0
  109. package/schematics/ng-update/v4/steps/templates/migrate-mobile-tabs.js +45 -0
  110. package/schematics/ng-update/v4/steps/templates/migrate-notification.d.ts +8 -0
  111. package/schematics/ng-update/v4/steps/templates/migrate-notification.js +64 -0
  112. package/schematics/ng-update/v4/steps/templates/migrate-number-precision.d.ts +8 -0
  113. package/schematics/ng-update/v4/steps/templates/migrate-number-precision.js +36 -0
  114. package/schematics/ng-update/v4/steps/templates/migrate-overscroll.js +4 -6
  115. package/schematics/ng-update/v4/steps/templates/migrate-thumbnail-card.js +2 -1
  116. package/schematics/ng-update/v4/steps/templates/toggles/common.js +3 -2
  117. package/schematics/ng-update/v4/steps/templates/toggles/migrate-checkbox.js +36 -0
  118. package/schematics/ng-update/v4/steps/update-packages.js +21 -8
  119. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.d.ts +1 -11
  120. package/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.js +8 -4
  121. package/schematics/utils/get-named-import-references.js +4 -2
  122. package/schematics/utils/templates/elements.js +2 -1
  123. package/schematics/utils/templates/inputs.js +2 -1
  124. package/services/index.d.ts +1 -1
  125. package/services/theme-color.service.d.ts +16 -0
  126. package/tokens/environment.d.ts +1 -0
  127. package/utils/focus/focused-in.d.ts +2 -0
  128. package/utils/focus/index.d.ts +1 -0
  129. package/classes/controller.d.ts +0 -9
  130. package/esm2022/classes/controller.mjs +0 -18
  131. package/esm2022/services/static-request.service.mjs +0 -33
  132. package/schematics/ng-update/v3/constants/breakpoints.d.ts +0 -82
  133. package/schematics/ng-update/v3/constants/breakpoints.js +0 -34
  134. package/schematics/ng-update/v3/constants/constants.d.ts +0 -2
  135. package/schematics/ng-update/v3/constants/constants.js +0 -466
  136. package/schematics/ng-update/v3/constants/deprecated-functions.d.ts +0 -2
  137. package/schematics/ng-update/v3/constants/deprecated-functions.js +0 -680
  138. package/schematics/ng-update/v3/constants/enums.d.ts +0 -2
  139. package/schematics/ng-update/v3/constants/enums.js +0 -284
  140. package/schematics/ng-update/v3/constants/modules.d.ts +0 -2
  141. package/schematics/ng-update/v3/constants/modules.js +0 -9
  142. package/schematics/ng-update/v3/constants/services.d.ts +0 -2
  143. package/schematics/ng-update/v3/constants/services.js +0 -53
  144. package/schematics/ng-update/v3/constants/templates.d.ts +0 -57
  145. package/schematics/ng-update/v3/constants/templates.js +0 -744
  146. package/schematics/ng-update/v3/constants/tui-interactive-selectors.d.ts +0 -1
  147. package/schematics/ng-update/v3/constants/tui-interactive-selectors.js +0 -55
  148. package/schematics/ng-update/v3/constants/types.d.ts +0 -2
  149. package/schematics/ng-update/v3/constants/types.js +0 -156
  150. package/schematics/ng-update/v3/constants/warnings.d.ts +0 -2
  151. package/schematics/ng-update/v3/constants/warnings.js +0 -111
  152. package/schematics/ng-update/v3/index.d.ts +0 -3
  153. package/schematics/ng-update/v3/index.js +0 -105
  154. package/schematics/ng-update/v3/schema.json +0 -13
  155. package/schematics/ng-update/v3/steps/migrate-date-time.d.ts +0 -2
  156. package/schematics/ng-update/v3/steps/migrate-date-time.js +0 -207
  157. package/schematics/ng-update/v3/steps/migrate-polymorpheus.js +0 -78
  158. package/schematics/ng-update/v3/steps/migrate-progress.d.ts +0 -8
  159. package/schematics/ng-update/v3/steps/migrate-progress.js +0 -49
  160. package/schematics/ng-update/v3/steps/migrate-sliders/index.d.ts +0 -3
  161. package/schematics/ng-update/v3/steps/migrate-sliders/index.js +0 -19
  162. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.d.ts +0 -3
  163. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-range.js +0 -103
  164. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.d.ts +0 -3
  165. package/schematics/ng-update/v3/steps/migrate-sliders/migrate-input-slider.js +0 -90
  166. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.d.ts +0 -3
  167. package/schematics/ng-update/v3/steps/migrate-taiga-proprietary-icons.js +0 -70
  168. package/schematics/ng-update/v3/steps/migrate-templates.d.ts +0 -4
  169. package/schematics/ng-update/v3/steps/migrate-templates.js +0 -216
  170. package/schematics/ng-update/v3/steps/migrate-textfield-controller.js +0 -98
  171. package/schematics/ng-update/v3/steps/miscellaneous.d.ts +0 -2
  172. package/schematics/ng-update/v3/steps/miscellaneous.js +0 -81
  173. package/schematics/ng-update/v3/steps/replace-functions.d.ts +0 -2
  174. package/schematics/ng-update/v3/steps/replace-functions.js +0 -138
  175. package/schematics/ng-update/v3/steps/replace-styles.d.ts +0 -3
  176. package/schematics/ng-update/v3/steps/replace-styles.js +0 -33
  177. package/schematics/ng-update/v3-30/constants/constants.d.ts +0 -2
  178. package/schematics/ng-update/v3-30/constants/constants.js +0 -8
  179. package/schematics/ng-update/v3-30/constants/icons.d.ts +0 -4
  180. package/schematics/ng-update/v3-30/constants/icons.js +0 -993
  181. package/schematics/ng-update/v3-30/index.d.ts +0 -3
  182. package/schematics/ng-update/v3-30/index.js +0 -33
  183. package/schematics/ng-update/v3-35/constants/constants.d.ts +0 -2
  184. package/schematics/ng-update/v3-35/constants/constants.js +0 -8
  185. package/schematics/ng-update/v3-35/constants/icons.d.ts +0 -4
  186. package/schematics/ng-update/v3-35/constants/icons.js +0 -2537
  187. package/schematics/ng-update/v3-35/index.d.ts +0 -3
  188. package/schematics/ng-update/v3-35/index.js +0 -33
  189. package/schematics/ng-update/v3-36/index.d.ts +0 -3
  190. package/schematics/ng-update/v3-36/index.js +0 -23
  191. package/schematics/ng-update/v3-40/index.d.ts +0 -3
  192. package/schematics/ng-update/v3-40/index.js +0 -62
  193. package/schematics/ng-update/v3-5/index.d.ts +0 -3
  194. package/schematics/ng-update/v3-5/index.js +0 -20
  195. package/schematics/ng-update/v3-5/steps/migrate-expand-templates.d.ts +0 -3
  196. package/schematics/ng-update/v3-5/steps/migrate-expand-templates.js +0 -44
  197. package/schematics/ng-update/v4/steps/migrate-styles.js +0 -20
  198. package/services/static-request.service.d.ts +0 -8
  199. /package/schematics/ng-update/v4/steps/{migrate-styles.d.ts → styles/index.d.ts} +0 -0
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateNotification = void 0;
4
+ const ng_morph_1 = require("ng-morph");
5
+ const add_import_to_closest_module_1 = require("../../../../utils/add-import-to-closest-module");
6
+ const elements_1 = require("../../../../utils/templates/elements");
7
+ const inputs_1 = require("../../../../utils/templates/inputs");
8
+ const template_resource_1 = require("../../../../utils/templates/template-resource");
9
+ function migrateNotification({ resource, recorder, fileSystem, }) {
10
+ const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
11
+ const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
12
+ const elements = [
13
+ ...(0, elements_1.findElementsByTagNames)(template, ['tui-notification']),
14
+ ...(0, elements_1.findElementsWithAttributeOnTag)(template, ['tuiNotification'], ['button', 'a']),
15
+ ];
16
+ elements.forEach(({ attrs, sourceCodeLocation, tagName, childNodes }) => {
17
+ var _a, _b, _c, _d;
18
+ const sizeAttr = (0, inputs_1.findAttr)(attrs, 'size');
19
+ const hasIconAttr = (0, inputs_1.findAttr)(attrs, 'hasIcon');
20
+ const hideCloseAttr = (0, inputs_1.findAttr)(attrs, 'hideClose');
21
+ const closeListener = (0, inputs_1.findAttr)(attrs, '(close)');
22
+ const { startTag, endTag } = sourceCodeLocation || {};
23
+ const hideCloseAttrLocation = (_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[(hideCloseAttr === null || hideCloseAttr === void 0 ? void 0 : hideCloseAttr.name) || ''];
24
+ const hasIconAttrLocation = (_b = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.attrs) === null || _b === void 0 ? void 0 : _b[(hasIconAttr === null || hasIconAttr === void 0 ? void 0 : hasIconAttr.name) || ''];
25
+ if (!sizeAttr) {
26
+ recorder.insertRight(templateOffset + ((_c = startTag === null || startTag === void 0 ? void 0 : startTag.startOffset) !== null && _c !== void 0 ? _c : 0) + `<${tagName}`.length, ' size="m"');
27
+ }
28
+ if (closeListener) {
29
+ const hasProprietaryPackages = !!(0, ng_morph_1.getPackageJsonDependency)(fileSystem.tree, '@taiga-ui/proprietary-core');
30
+ (0, add_import_to_closest_module_1.addImportToClosestModule)(resource.componentPath, 'NgIf', '@angular/common');
31
+ const ifCondition = hideCloseAttr ? ` *ngIf="!${hideCloseAttr.value}"` : '';
32
+ const closeIconName = hasProprietaryPackages
33
+ ? '@tui.pragmatic.small.cross'
34
+ : '@tui.x';
35
+ const closeButtonTemplate = ` <button${ifCondition} tuiIconButton iconStart="${closeIconName}"></button>`;
36
+ recorder.insertRight(templateOffset + ((_d = endTag === null || endTag === void 0 ? void 0 : endTag.startOffset) !== null && _d !== void 0 ? _d : 0), closeButtonTemplate);
37
+ if (hideCloseAttrLocation) {
38
+ const { startOffset, endOffset } = hideCloseAttrLocation;
39
+ recorder.remove(templateOffset + startOffset, endOffset - startOffset);
40
+ }
41
+ }
42
+ if (hasIconAttr && hasIconAttrLocation) {
43
+ const { startOffset, endOffset } = hasIconAttrLocation;
44
+ const attrOffset = templateOffset + startOffset;
45
+ const attrLength = endOffset - startOffset;
46
+ switch (hasIconAttr.value) {
47
+ case 'false':
48
+ recorder.remove(attrOffset, attrLength);
49
+ recorder.insertRight(attrOffset, 'icon=""');
50
+ break;
51
+ case 'true':
52
+ recorder.remove(attrOffset, attrLength);
53
+ break;
54
+ default:
55
+ recorder.insertLeft(templateOffset + ((startTag === null || startTag === void 0 ? void 0 : startTag.startOffset) || 0), '<!-- TODO: (Taiga UI migration) "hasIcon" is deleted. Use icon="" to hide icon. Or pass TUI_NOTIFICATION_DEFAULT_OPTIONS["icon"] to show it again. Learn more: https://taiga-ui.dev/components/notification -->\n');
56
+ }
57
+ }
58
+ if (childNodes.length > 1 && startTag && endTag) {
59
+ recorder.insertRight(templateOffset + startTag.endOffset, '<div>');
60
+ recorder.insertLeft(templateOffset + endTag.startOffset, '</div>');
61
+ }
62
+ });
63
+ }
64
+ exports.migrateNotification = migrateNotification;
@@ -0,0 +1,8 @@
1
+ import type { UpdateRecorder } from '@angular-devkit/schematics';
2
+ import type { DevkitFileSystem } from 'ng-morph';
3
+ import type { TemplateResource } from '../../../../ng-update/interfaces';
4
+ export declare function migrateNumberPrecision({ resource, recorder, fileSystem, }: {
5
+ fileSystem: DevkitFileSystem;
6
+ recorder: UpdateRecorder;
7
+ resource: TemplateResource;
8
+ }): void;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrateNumberPrecision = void 0;
4
+ const remove_attrs_1 = require("../../../../ng-update/v4/steps/utils/remove-attrs");
5
+ const add_import_to_closest_module_1 = require("../../../../utils/add-import-to-closest-module");
6
+ const elements_1 = require("../../../../utils/templates/elements");
7
+ const inputs_1 = require("../../../../utils/templates/inputs");
8
+ const template_resource_1 = require("../../../../utils/templates/template-resource");
9
+ const clean_object_1 = require("../utils/clean-object");
10
+ function migrateNumberPrecision({ resource, recorder, fileSystem, }) {
11
+ const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
12
+ const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
13
+ const elements = (0, elements_1.findElementsByTagName)(template, 'tui-input-number');
14
+ elements.forEach(({ attrs, sourceCodeLocation }) => {
15
+ var _a;
16
+ if (!sourceCodeLocation) {
17
+ return;
18
+ }
19
+ const decimalAttr = (0, inputs_1.findAttr)(attrs, 'decimal');
20
+ const precisionAttr = (0, inputs_1.findAttr)(attrs, 'precision');
21
+ if (decimalAttr || precisionAttr) {
22
+ (0, add_import_to_closest_module_1.addImportToClosestModule)(resource.componentPath, 'TuiNumberFormat', '@taiga-ui/core');
23
+ const format = JSON.stringify((0, clean_object_1.cleanObject)({
24
+ decimalMode: decimalAttr === null || decimalAttr === void 0 ? void 0 : decimalAttr.value,
25
+ precision: precisionAttr === null || precisionAttr === void 0 ? void 0 : precisionAttr.value,
26
+ }));
27
+ const formatPart = `[tuiNumberFormat]='${format}'`;
28
+ const insertTo = (((_a = sourceCodeLocation === null || sourceCodeLocation === void 0 ? void 0 : sourceCodeLocation.startTag) === null || _a === void 0 ? void 0 : _a.startOffset) || 0) +
29
+ '<tui-input-number '.length;
30
+ recorder.insertRight(templateOffset + insertTo, formatPart);
31
+ }
32
+ const attrsToRemove = [decimalAttr, precisionAttr].filter((attr) => attr !== undefined);
33
+ (0, remove_attrs_1.removeAttrs)(attrsToRemove, sourceCodeLocation, recorder, templateOffset);
34
+ });
35
+ }
36
+ exports.migrateNumberPrecision = migrateNumberPrecision;
@@ -2,13 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateOverscroll = void 0;
4
4
  const elements_1 = require("../../../../utils/templates/elements");
5
+ const inputs_1 = require("../../../../utils/templates/inputs");
5
6
  const template_resource_1 = require("../../../../utils/templates/template-resource");
6
7
  const remove_attrs_1 = require("../utils/remove-attrs");
7
8
  const overscrollAttrName = 'tuiOverscroll';
8
- const overscrollAttrNameDict = {
9
- [overscrollAttrName.toLowerCase()]: true,
10
- [`[${overscrollAttrName.toLowerCase()}]`]: true,
11
- };
12
9
  function migrateOverscroll({ resource, recorder, fileSystem, }) {
13
10
  const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
14
11
  const templateOffset = (0, template_resource_1.getTemplateOffset)(resource);
@@ -17,8 +14,9 @@ function migrateOverscroll({ resource, recorder, fileSystem, }) {
17
14
  return;
18
15
  }
19
16
  elements.forEach(({ attrs, sourceCodeLocation }) => {
20
- const attrsToRemove = attrs.filter(({ name }) => overscrollAttrNameDict[name]);
21
- (0, remove_attrs_1.removeAttrs)(attrsToRemove, sourceCodeLocation, recorder, templateOffset);
17
+ const attrToRemove = (0, inputs_1.findAttr)(attrs, overscrollAttrName);
18
+ attrToRemove &&
19
+ (0, remove_attrs_1.removeAttrs)([attrToRemove], sourceCodeLocation, recorder, templateOffset);
22
20
  });
23
21
  addTodo(recorder, elements[0].sourceCodeLocation, templateOffset);
24
22
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateThumbnailCard = void 0;
4
4
  const elements_1 = require("../../../../utils/templates/elements");
5
+ const inputs_1 = require("../../../../utils/templates/inputs");
5
6
  const template_resource_1 = require("../../../../utils/templates/template-resource");
6
7
  function migrateThumbnailCard({ resource, recorder, fileSystem, }) {
7
8
  const template = (0, template_resource_1.getTemplateFromTemplateResource)(resource, fileSystem);
@@ -11,7 +12,7 @@ function migrateThumbnailCard({ resource, recorder, fileSystem, }) {
11
12
  if (!sourceCodeLocation) {
12
13
  return;
13
14
  }
14
- const valueAttr = attrs.find((attr) => attr.name === '[cardnumber]' || attr.name === 'cardnumber');
15
+ const valueAttr = (0, inputs_1.findAttr)(attrs, 'cardNumber');
15
16
  if (!valueAttr) {
16
17
  return;
17
18
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.closeStartTag = exports.removeClosingTag = exports.replaceSizeAttr = exports.replaceOpenTag = void 0;
4
+ const inputs_1 = require("../../../../../utils/templates/inputs");
4
5
  const sizeMap = {
5
6
  l: 'm',
6
7
  m: 's',
@@ -17,14 +18,14 @@ function replaceOpenTag(sourceCodeLocation, recorder, templateOffset, { tag, dir
17
18
  exports.replaceOpenTag = replaceOpenTag;
18
19
  function replaceSizeAttr(attrs, sourceCodeLocation, recorder, templateOffset, map = sizeMap) {
19
20
  var _a;
20
- const sizeAttr = attrs.find((attr) => attr.name === 'size');
21
+ const sizeAttr = (0, inputs_1.findAttr)(attrs, 'size');
21
22
  if (sizeAttr) {
22
23
  const { startOffset, endOffset } = ((_a = sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[sizeAttr.name]) || {
23
24
  startOffset: 0,
24
25
  endOffset: 0,
25
26
  };
26
27
  recorder.remove(templateOffset + startOffset, endOffset - startOffset);
27
- recorder.insertRight(templateOffset + startOffset, `size="${map[sizeAttr.value] || sizeAttr.value}"`);
28
+ recorder.insertRight(templateOffset + startOffset, `${sizeAttr.name}="${map[sizeAttr.value] || sizeAttr.value}"`);
28
29
  }
29
30
  }
30
31
  exports.replaceSizeAttr = replaceSizeAttr;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.migrateCheckbox = void 0;
4
4
  const elements_1 = require("../../../../../utils/templates/elements");
5
+ const inputs_1 = require("../../../../../utils/templates/inputs");
5
6
  const template_resource_1 = require("../../../../../utils/templates/template-resource");
6
7
  const common_1 = require("./common");
7
8
  function migrateCheckbox({ resource, recorder, fileSystem, }) {
@@ -21,5 +22,40 @@ function migrateCheckbox({ resource, recorder, fileSystem, }) {
21
22
  (0, common_1.closeStartTag)(sourceCodeLocation, recorder, templateOffset);
22
23
  (0, common_1.removeClosingTag)(sourceCodeLocation, recorder, templateOffset);
23
24
  });
25
+ (0, elements_1.findElementsByTagName)(template, 'tui-primitive-checkbox').forEach(({ attrs, sourceCodeLocation }) => {
26
+ if (!sourceCodeLocation) {
27
+ return;
28
+ }
29
+ (0, common_1.replaceSizeAttr)(attrs, sourceCodeLocation, recorder, templateOffset);
30
+ replaceValueAttr(attrs, sourceCodeLocation, recorder, templateOffset);
31
+ (0, common_1.replaceOpenTag)(sourceCodeLocation, recorder, templateOffset, {
32
+ tag: 'tui-primitive-checkbox',
33
+ directive: 'tuiCheckbox',
34
+ type: 'checkbox',
35
+ });
36
+ (0, common_1.closeStartTag)(sourceCodeLocation, recorder, templateOffset);
37
+ (0, common_1.removeClosingTag)(sourceCodeLocation, recorder, templateOffset);
38
+ });
24
39
  }
25
40
  exports.migrateCheckbox = migrateCheckbox;
41
+ function replaceValueAttr(attrs, sourceCodeLocation, recorder, templateOffset) {
42
+ var _a;
43
+ const valueAttr = (0, inputs_1.findAttr)(attrs, 'value');
44
+ if (valueAttr) {
45
+ const { startOffset, endOffset } = ((_a = sourceCodeLocation.attrs) === null || _a === void 0 ? void 0 : _a[valueAttr.name]) || {
46
+ startOffset: 0,
47
+ endOffset: 0,
48
+ };
49
+ recorder.remove(templateOffset + startOffset, endOffset - startOffset);
50
+ switch (valueAttr.value) {
51
+ case 'false':
52
+ case 'null':
53
+ return;
54
+ case 'true':
55
+ recorder.insertRight(templateOffset + startOffset, 'checked ');
56
+ return;
57
+ default:
58
+ recorder.insertRight(templateOffset + startOffset, `[checked]="${valueAttr.value}" `);
59
+ }
60
+ }
61
+ }
@@ -1,31 +1,44 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updatePackages = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const ng_morph_1 = require("ng-morph");
6
5
  const version_1 = require("../../../../constants/version");
7
- const package_json_1 = tslib_1.__importDefault(require("../../../../package.json"));
6
+ const constants_1 = require("../../../constants");
8
7
  const steps_1 = require("../../steps");
9
8
  function updatePackages({ tree }, _) {
10
9
  const packagesToRemove = ['@taiga-ui/addon-tablebars', '@taiga-ui/addon-preview'];
11
10
  packagesToRemove.forEach((pkg) => {
12
11
  (0, ng_morph_1.removePackageJsonDependency)(tree, pkg);
13
12
  });
14
- (0, ng_morph_1.addPackageJsonDependency)(tree, {
15
- name: '@taiga-ui/legacy',
16
- version: version_1.TUI_VERSION,
17
- });
18
13
  (0, steps_1.replacePackageName)('@tinkoff/ng-polymorpheus', {
19
14
  name: '@taiga-ui/polymorpheus',
20
- version: package_json_1.default.peerDependencies['@taiga-ui/polymorpheus'],
15
+ version: '^4.6.4',
21
16
  }, tree);
22
17
  (0, steps_1.replacePackageName)('@tinkoff/ng-event-plugins', {
23
18
  name: '@taiga-ui/event-plugins',
24
- version: package_json_1.default.peerDependencies['@taiga-ui/event-plugins'],
19
+ version: '^4.0.1',
25
20
  }, tree);
26
21
  (0, steps_1.replacePackageName)('@tinkoff/tui-editor', {
27
22
  name: '@taiga-ui/editor',
28
23
  version: '^2.0.0',
29
24
  }, tree);
25
+ if (!(0, ng_morph_1.getPackageJsonDependency)(tree, '@taiga-ui/event-plugins')) {
26
+ (0, ng_morph_1.addPackageJsonDependency)(tree, {
27
+ name: '@taiga-ui/event-plugins',
28
+ version: '^4.0.1',
29
+ });
30
+ }
31
+ if ((0, ng_morph_1.getImports)(constants_1.ALL_TS_FILES, { moduleSpecifier: '@taiga-ui/layout' }).length) {
32
+ (0, ng_morph_1.addPackageJsonDependency)(tree, {
33
+ name: '@taiga-ui/layout',
34
+ version: version_1.TUI_VERSION,
35
+ });
36
+ }
37
+ if ((0, ng_morph_1.getImports)(constants_1.ALL_TS_FILES, { moduleSpecifier: '@taiga-ui/legacy' }).length) {
38
+ (0, ng_morph_1.addPackageJsonDependency)(tree, {
39
+ name: '@taiga-ui/legacy',
40
+ version: version_1.TUI_VERSION,
41
+ });
42
+ }
30
43
  }
31
44
  exports.updatePackages = updatePackages;
@@ -1,13 +1,3 @@
1
1
  import type { TuiSchema } from '../../../../ng-add/schema';
2
- interface ModuleToReplace {
3
- from: {
4
- name: string;
5
- moduleSpecifier: string;
6
- };
7
- to: {
8
- name: string;
9
- providerSpecifier: string;
10
- };
11
- }
2
+ import type { ModuleToReplace } from '../constants/modules-to-replace';
12
3
  export declare const replaceModulesWithProviders: (options: TuiSchema, list: ModuleToReplace[]) => void;
13
- export {};
@@ -16,6 +16,7 @@ const replaceModulesWithProviders = (options, list) => {
16
16
  exports.replaceModulesWithProviders = replaceModulesWithProviders;
17
17
  function replaceModule({ from, to }) {
18
18
  const references = (0, get_named_import_references_1.getNamedImportReferences)(from.name, from.moduleSpecifier);
19
+ const toReplace = Array.isArray(to) ? to : [to];
19
20
  references.forEach((ref) => {
20
21
  if (ref.wasForgotten()) {
21
22
  return;
@@ -23,11 +24,14 @@ function replaceModule({ from, to }) {
23
24
  const parent = ref.getParent();
24
25
  if (ng_morph_1.Node.isImportSpecifier(parent)) {
25
26
  (0, import_manipulations_1.removeImport)(parent);
26
- addImport(to, parent.getSourceFile().getFilePath());
27
+ toReplace.forEach((provider) => addImport(provider, parent.getSourceFile().getFilePath()));
27
28
  }
28
29
  else if (ng_morph_1.Node.isArrayLiteralExpression(parent)) {
29
- parent.removeElement(ref.getChildIndex());
30
- addProvider(to, parent.getSourceFile().getFilePath());
30
+ const index = parent
31
+ .getElements()
32
+ .findIndex((el) => el.getText() === from.name);
33
+ parent.removeElement(index);
34
+ toReplace.forEach((provider) => addProvider(provider, parent.getSourceFile().getFilePath()));
31
35
  }
32
36
  });
33
37
  }
@@ -35,7 +39,7 @@ function addImport(identifier, filePath) {
35
39
  (0, add_unique_import_1.addUniqueImport)(filePath, identifier.name, identifier.providerSpecifier);
36
40
  }
37
41
  function addProvider(identifier, filePath) {
38
- const provider = `${identifier.name}()`;
42
+ const provider = `${identifier.name}${identifier.isFunction ? '()' : ''}`;
39
43
  const componentClass = (0, ng_morph_1.getNgComponents)(filePath)[0];
40
44
  if (componentClass) {
41
45
  (0, ng_morph_1.addProviderToComponent)(componentClass, provider);
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNamedImportReferences = void 0;
4
4
  const ng_morph_1 = require("ng-morph");
5
5
  const constants_1 = require("../constants");
6
- function getNamedImportReferences(namedImport, moduleSpecifier = '**/**', files = constants_1.ALL_TS_FILES) {
6
+ function getNamedImportReferences(namedImport, moduleSpecifier = ['**/**'], files = constants_1.ALL_TS_FILES) {
7
7
  const importDeclarations = (0, ng_morph_1.getImports)(files, {
8
8
  namedImports: [namedImport],
9
- moduleSpecifier,
9
+ moduleSpecifier: Array.isArray(moduleSpecifier)
10
+ ? moduleSpecifier
11
+ : [moduleSpecifier, `${moduleSpecifier}/**`],
10
12
  });
11
13
  const namedImports = importDeclarations.map((declaration) => {
12
14
  var _a;
@@ -104,7 +104,8 @@ exports.findAttributeOnElementWithAttrs = findAttributeOnElementWithAttrs;
104
104
  /** Shorthand function that checks if the specified element contains the given attribute. */
105
105
  function hasElementAttribute(element, attributeName) {
106
106
  var _a;
107
- return (_a = element.attrs) === null || _a === void 0 ? void 0 : _a.some((attr) => attr.name === attributeName.toLowerCase());
107
+ const lowercasedAttrName = attributeName.toLowerCase();
108
+ return (_a = element.attrs) === null || _a === void 0 ? void 0 : _a.some((attr) => attr.name === lowercasedAttrName || attr.name === `[${lowercasedAttrName}]`);
108
109
  }
109
110
  exports.hasElementAttribute = hasElementAttribute;
110
111
  /** Gets the start offset of the given attribute from a Parse5 element. */
@@ -2,7 +2,8 @@
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
+ const lowercasedName = name.toLowerCase();
6
+ return attrs.find((attr) => attr.name === lowercasedName || attr.name === `[${lowercasedName}]`);
6
7
  }
7
8
  exports.findAttr = findAttr;
8
9
  function isBinding(attr) {
@@ -1,4 +1,4 @@
1
1
  export * from './id.service';
2
2
  export * from './popover.service';
3
3
  export * from './scroll.service';
4
- export * from './static-request.service';
4
+ export * from './theme-color.service';
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare const TUI_THEME_COLOR: import("@angular/core").InjectionToken<string>;
3
+ interface TuiThemeColor {
4
+ get color(): string;
5
+ set color(value: string);
6
+ }
7
+ export declare class TuiThemeColorService implements TuiThemeColor {
8
+ private readonly current;
9
+ private readonly doc;
10
+ private readonly meta;
11
+ get color(): string;
12
+ set color(content: string);
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiThemeColorService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<TuiThemeColorService>;
15
+ }
16
+ export {};
@@ -3,6 +3,7 @@ export declare const TUI_IS_IOS: import("@angular/core").InjectionToken<boolean>
3
3
  export declare const TUI_IS_ANDROID: import("@angular/core").InjectionToken<boolean>;
4
4
  export declare const TUI_IS_WEBKIT: import("@angular/core").InjectionToken<boolean>;
5
5
  export declare const TUI_PLATFORM: import("@angular/core").InjectionToken<"android" | "ios" | "web">;
6
+ export declare const TUI_IS_TOUCH: import("@angular/core").InjectionToken<import("@angular/core").Signal<boolean>>;
6
7
  /**
7
8
  * Detect if app is running under Cypress
8
9
  * {@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}
@@ -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';
@@ -1,9 +0,0 @@
1
- import type { OnChanges } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export declare abstract class AbstractTuiController implements OnChanges {
5
- readonly change$: Subject<void>;
6
- ngOnChanges(): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<AbstractTuiController, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractTuiController, never, never, {}, {}, never, never, false, never>;
9
- }
@@ -1,18 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- class AbstractTuiController {
5
- constructor() {
6
- this.change$ = new Subject();
7
- }
8
- ngOnChanges() {
9
- this.change$.next();
10
- }
11
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractTuiController, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: AbstractTuiController, usesOnChanges: true, ngImport: i0 }); }
13
- }
14
- export { AbstractTuiController };
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AbstractTuiController, decorators: [{
16
- type: Directive
17
- }] });
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9jbGFzc2VzL2NvbnRyb2xsZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN4QyxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sTUFBTSxDQUFDOztBQUU3QixNQUNzQixxQkFBcUI7SUFEM0M7UUFFb0IsWUFBTyxHQUFHLElBQUksT0FBTyxFQUFRLENBQUM7S0FLakQ7SUFIVSxXQUFXO1FBQ2QsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUN4QixDQUFDOytHQUxpQixxQkFBcUI7bUdBQXJCLHFCQUFxQjs7U0FBckIscUJBQXFCOzRGQUFyQixxQkFBcUI7a0JBRDFDLFNBQVMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7T25DaGFuZ2VzfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7RGlyZWN0aXZlfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7U3ViamVjdH0gZnJvbSAncnhqcyc7XG5cbkBEaXJlY3RpdmUoKVxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIEFic3RyYWN0VHVpQ29udHJvbGxlciBpbXBsZW1lbnRzIE9uQ2hhbmdlcyB7XG4gICAgcHVibGljIHJlYWRvbmx5IGNoYW5nZSQgPSBuZXcgU3ViamVjdDx2b2lkPigpO1xuXG4gICAgcHVibGljIG5nT25DaGFuZ2VzKCk6IHZvaWQge1xuICAgICAgICB0aGlzLmNoYW5nZSQubmV4dCgpO1xuICAgIH1cbn1cbiJdfQ==
@@ -1,33 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { shareReplay, switchMap } from 'rxjs';
3
- import { fromFetch } from 'rxjs/fetch';
4
- import * as i0 from "@angular/core";
5
- class TuiStaticRequestService {
6
- constructor() {
7
- this.cache = new Map();
8
- }
9
- request(url) {
10
- const cache = this.cache.get(url);
11
- if (cache) {
12
- return cache;
13
- }
14
- const piped = fromFetch(url).pipe(switchMap(async (response) => {
15
- if (response.ok) {
16
- return response.text();
17
- }
18
- throw new Error(`Failed to load ${url} (${response.statusText})`);
19
- }), shareReplay({ bufferSize: 1, refCount: false }));
20
- this.cache.set(url, piped);
21
- return piped;
22
- }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStaticRequestService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
24
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStaticRequestService, providedIn: 'root' }); }
25
- }
26
- export { TuiStaticRequestService };
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiStaticRequestService, decorators: [{
28
- type: Injectable,
29
- args: [{
30
- providedIn: 'root',
31
- }]
32
- }] });
33
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGljLXJlcXVlc3Quc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2Nkay9zZXJ2aWNlcy9zdGF0aWMtcmVxdWVzdC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFFekMsT0FBTyxFQUFDLFdBQVcsRUFBRSxTQUFTLEVBQUMsTUFBTSxNQUFNLENBQUM7QUFDNUMsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLFlBQVksQ0FBQzs7QUFFckMsTUFHYSx1QkFBdUI7SUFIcEM7UUFJcUIsVUFBSyxHQUFHLElBQUksR0FBRyxFQUE4QixDQUFDO0tBd0JsRTtJQXRCVSxPQUFPLENBQUMsR0FBVztRQUN0QixNQUFNLEtBQUssR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUVsQyxJQUFJLEtBQUssRUFBRTtZQUNQLE9BQU8sS0FBSyxDQUFDO1NBQ2hCO1FBRUQsTUFBTSxLQUFLLEdBQUcsU0FBUyxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FDN0IsU0FBUyxDQUFDLEtBQUssRUFBRSxRQUFRLEVBQUUsRUFBRTtZQUN6QixJQUFJLFFBQVEsQ0FBQyxFQUFFLEVBQUU7Z0JBQ2IsT0FBTyxRQUFRLENBQUMsSUFBSSxFQUFFLENBQUM7YUFDMUI7WUFFRCxNQUFNLElBQUksS0FBSyxDQUFDLGtCQUFrQixHQUFHLEtBQUssUUFBUSxDQUFDLFVBQVUsR0FBRyxDQUFDLENBQUM7UUFDdEUsQ0FBQyxDQUFDLEVBQ0YsV0FBVyxDQUFDLEVBQUMsVUFBVSxFQUFFLENBQUMsRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFDLENBQUMsQ0FDaEQsQ0FBQztRQUVGLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQztRQUUzQixPQUFPLEtBQUssQ0FBQztJQUNqQixDQUFDOytHQXhCUSx1QkFBdUI7bUhBQXZCLHVCQUF1QixjQUZwQixNQUFNOztTQUVULHVCQUF1Qjs0RkFBdkIsdUJBQXVCO2tCQUhuQyxVQUFVO21CQUFDO29CQUNSLFVBQVUsRUFBRSxNQUFNO2lCQUNyQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7SW5qZWN0YWJsZX0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgdHlwZSB7T2JzZXJ2YWJsZX0gZnJvbSAncnhqcyc7XG5pbXBvcnQge3NoYXJlUmVwbGF5LCBzd2l0Y2hNYXB9IGZyb20gJ3J4anMnO1xuaW1wb3J0IHtmcm9tRmV0Y2h9IGZyb20gJ3J4anMvZmV0Y2gnO1xuXG5ASW5qZWN0YWJsZSh7XG4gICAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxufSlcbmV4cG9ydCBjbGFzcyBUdWlTdGF0aWNSZXF1ZXN0U2VydmljZSB7XG4gICAgcHJpdmF0ZSByZWFkb25seSBjYWNoZSA9IG5ldyBNYXA8c3RyaW5nLCBPYnNlcnZhYmxlPHN0cmluZz4+KCk7XG5cbiAgICBwdWJsaWMgcmVxdWVzdCh1cmw6IHN0cmluZyk6IE9ic2VydmFibGU8c3RyaW5nPiB7XG4gICAgICAgIGNvbnN0IGNhY2hlID0gdGhpcy5jYWNoZS5nZXQodXJsKTtcblxuICAgICAgICBpZiAoY2FjaGUpIHtcbiAgICAgICAgICAgIHJldHVybiBjYWNoZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHBpcGVkID0gZnJvbUZldGNoKHVybCkucGlwZShcbiAgICAgICAgICAgIHN3aXRjaE1hcChhc3luYyAocmVzcG9uc2UpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLnRleHQoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYEZhaWxlZCB0byBsb2FkICR7dXJsfSAoJHtyZXNwb25zZS5zdGF0dXNUZXh0fSlgKTtcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgc2hhcmVSZXBsYXkoe2J1ZmZlclNpemU6IDEsIHJlZkNvdW50OiBmYWxzZX0pLFxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuY2FjaGUuc2V0KHVybCwgcGlwZWQpO1xuXG4gICAgICAgIHJldHVybiBwaXBlZDtcbiAgICB9XG59XG4iXX0=
@@ -1,82 +0,0 @@
1
- export declare const DEPRECATED_BREAKPOINTS: readonly [{
2
- readonly from: "@media-retina";
3
- readonly to: "@tui-media-retina";
4
- }, {
5
- readonly from: "@media-retina-mobile";
6
- readonly to: "@tui-media-retina-mobile";
7
- }, {
8
- readonly from: "@media-retina-tablet";
9
- readonly to: "@tui-media-retina-tablet";
10
- }, {
11
- readonly from: "@media-retina-desktop";
12
- readonly to: "@tui-media-retina-desktop";
13
- }, {
14
- readonly from: "@mobile-m";
15
- readonly to: "@tui-mobile";
16
- }, {
17
- readonly from: "@mobile-m-min";
18
- readonly to: "@tui-mobile-min";
19
- }, {
20
- readonly from: "@mobile-m-interval";
21
- readonly to: "@tui-mobile-interval";
22
- }, {
23
- readonly from: "@tablet-lg";
24
- readonly to: "@tui-tablet";
25
- }, {
26
- readonly from: "@tablet-lg-min";
27
- readonly to: "@tui-tablet-min";
28
- }, {
29
- readonly from: "@tablet-lg-interval";
30
- readonly to: "@tui-tablet-interval";
31
- }, {
32
- readonly from: "@desktop-s";
33
- readonly to: "@tui-desktop";
34
- }, {
35
- readonly from: "@desktop-s-min";
36
- readonly to: "@tui-desktop-min";
37
- }, {
38
- readonly from: "@desktop-s-interval";
39
- readonly to: "@tui-desktop-interval";
40
- }, {
41
- readonly from: "@desktop-m-min";
42
- readonly to: "@tui-desktop-lg-min";
43
- }, {
44
- readonly from: "@mobile";
45
- readonly to: "@tui-mobile";
46
- }, {
47
- readonly from: "@mobile-min";
48
- readonly to: "@tui-mobile-min";
49
- }, {
50
- readonly from: "@mobile-interval";
51
- readonly to: "@tui-mobile-interval";
52
- }, {
53
- readonly from: "@tablet-s";
54
- readonly to: "@tui-mobile";
55
- }, {
56
- readonly from: "@tablet-s-min";
57
- readonly to: "@tui-mobile-min";
58
- }, {
59
- readonly from: "@tablet-s-interval";
60
- readonly to: "@tui-mobile-interval";
61
- }, {
62
- readonly from: "@tablet";
63
- readonly to: "@tui-tablet";
64
- }, {
65
- readonly from: "@tablet-min";
66
- readonly to: "@tui-tablet-min";
67
- }, {
68
- readonly from: "@tablet-interval";
69
- readonly to: "@tui-tablet-interval";
70
- }, {
71
- readonly from: "@desktop";
72
- readonly to: "@tui-desktop";
73
- }, {
74
- readonly from: "@desktop-min";
75
- readonly to: "@tui-desktop-min";
76
- }, {
77
- readonly from: "@desktop-interval";
78
- readonly to: "@tui-desktop-interval";
79
- }, {
80
- readonly from: "@desktop-lg-min";
81
- readonly to: "@tui-desktop-lg-min";
82
- }];
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEPRECATED_BREAKPOINTS = void 0;
4
- exports.DEPRECATED_BREAKPOINTS = [
5
- // all previously actual breakpoints
6
- { from: '@media-retina', to: '@tui-media-retina' },
7
- { from: '@media-retina-mobile', to: '@tui-media-retina-mobile' },
8
- { from: '@media-retina-tablet', to: '@tui-media-retina-tablet' },
9
- { from: '@media-retina-desktop', to: '@tui-media-retina-desktop' },
10
- { from: '@mobile-m', to: '@tui-mobile' },
11
- { from: '@mobile-m-min', to: '@tui-mobile-min' },
12
- { from: '@mobile-m-interval', to: '@tui-mobile-interval' },
13
- { from: '@tablet-lg', to: '@tui-tablet' },
14
- { from: '@tablet-lg-min', to: '@tui-tablet-min' },
15
- { from: '@tablet-lg-interval', to: '@tui-tablet-interval' },
16
- { from: '@desktop-s', to: '@tui-desktop' },
17
- { from: '@desktop-s-min', to: '@tui-desktop-min' },
18
- { from: '@desktop-s-interval', to: '@tui-desktop-interval' },
19
- { from: '@desktop-m-min', to: '@tui-desktop-lg-min' },
20
- // legacy breakpoints
21
- { from: '@mobile', to: '@tui-mobile' },
22
- { from: '@mobile-min', to: '@tui-mobile-min' },
23
- { from: '@mobile-interval', to: '@tui-mobile-interval' },
24
- { from: '@tablet-s', to: '@tui-mobile' },
25
- { from: '@tablet-s-min', to: '@tui-mobile-min' },
26
- { from: '@tablet-s-interval', to: '@tui-mobile-interval' },
27
- { from: '@tablet', to: '@tui-tablet' },
28
- { from: '@tablet-min', to: '@tui-tablet-min' },
29
- { from: '@tablet-interval', to: '@tui-tablet-interval' },
30
- { from: '@desktop', to: '@tui-desktop' },
31
- { from: '@desktop-min', to: '@tui-desktop-min' },
32
- { from: '@desktop-interval', to: '@tui-desktop-interval' },
33
- { from: '@desktop-lg-min', to: '@tui-desktop-lg-min' },
34
- ];
@@ -1,2 +0,0 @@
1
- import type { ReplacementIdentifier } from '../../interfaces/replacement-identifier';
2
- export declare const CONSTANTS_TO_REPLACE: ReplacementIdentifier[];