igniteui-angular 22.1.0-beta.5 → 22.1.0-beta.7

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 (135) hide show
  1. package/fesm2022/igniteui-angular-accordion.mjs +4 -4
  2. package/fesm2022/igniteui-angular-accordion.mjs.map +1 -1
  3. package/fesm2022/igniteui-angular-action-strip.mjs +0 -1
  4. package/fesm2022/igniteui-angular-action-strip.mjs.map +1 -1
  5. package/fesm2022/igniteui-angular-avatar.mjs.map +1 -1
  6. package/fesm2022/igniteui-angular-badge.mjs +0 -1
  7. package/fesm2022/igniteui-angular-badge.mjs.map +1 -1
  8. package/fesm2022/igniteui-angular-banner.mjs +2 -2
  9. package/fesm2022/igniteui-angular-banner.mjs.map +1 -1
  10. package/fesm2022/igniteui-angular-button-group.mjs +2 -2
  11. package/fesm2022/igniteui-angular-button-group.mjs.map +1 -1
  12. package/fesm2022/igniteui-angular-calendar.mjs +4 -5
  13. package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
  14. package/fesm2022/igniteui-angular-card.mjs.map +1 -1
  15. package/fesm2022/igniteui-angular-carousel.mjs.map +1 -1
  16. package/fesm2022/igniteui-angular-chips.mjs.map +1 -1
  17. package/fesm2022/igniteui-angular-combo.mjs +17 -6
  18. package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
  19. package/fesm2022/igniteui-angular-core.mjs +16 -337
  20. package/fesm2022/igniteui-angular-core.mjs.map +1 -1
  21. package/fesm2022/igniteui-angular-date-picker.mjs +12 -14
  22. package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
  23. package/fesm2022/igniteui-angular-dialog.mjs +1 -1
  24. package/fesm2022/igniteui-angular-dialog.mjs.map +1 -1
  25. package/fesm2022/igniteui-angular-directives.mjs +50 -47
  26. package/fesm2022/igniteui-angular-directives.mjs.map +1 -1
  27. package/fesm2022/igniteui-angular-drop-down.mjs +3 -2
  28. package/fesm2022/igniteui-angular-drop-down.mjs.map +1 -1
  29. package/fesm2022/igniteui-angular-expansion-panel.mjs +23 -12
  30. package/fesm2022/igniteui-angular-expansion-panel.mjs.map +1 -1
  31. package/fesm2022/igniteui-angular-grids-core.mjs +501 -207
  32. package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
  33. package/fesm2022/igniteui-angular-grids-grid.mjs +116 -95
  34. package/fesm2022/igniteui-angular-grids-grid.mjs.map +1 -1
  35. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +15 -19
  36. package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs.map +1 -1
  37. package/fesm2022/igniteui-angular-grids-lite.mjs.map +1 -1
  38. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +75 -153
  39. package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
  40. package/fesm2022/igniteui-angular-grids-tree-grid.mjs +28 -35
  41. package/fesm2022/igniteui-angular-grids-tree-grid.mjs.map +1 -1
  42. package/fesm2022/igniteui-angular-icon.mjs.map +1 -1
  43. package/fesm2022/igniteui-angular-input-group.mjs +1 -1
  44. package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
  45. package/fesm2022/igniteui-angular-list.mjs.map +1 -1
  46. package/fesm2022/igniteui-angular-navbar.mjs.map +1 -1
  47. package/fesm2022/igniteui-angular-navigation-drawer.mjs +2 -3
  48. package/fesm2022/igniteui-angular-navigation-drawer.mjs.map +1 -1
  49. package/fesm2022/igniteui-angular-paginator.mjs.map +1 -1
  50. package/fesm2022/igniteui-angular-progressbar.mjs +5 -2
  51. package/fesm2022/igniteui-angular-progressbar.mjs.map +1 -1
  52. package/fesm2022/igniteui-angular-query-builder.mjs +18 -19
  53. package/fesm2022/igniteui-angular-query-builder.mjs.map +1 -1
  54. package/fesm2022/igniteui-angular-radio.mjs +1 -1
  55. package/fesm2022/igniteui-angular-radio.mjs.map +1 -1
  56. package/fesm2022/igniteui-angular-select.mjs.map +1 -1
  57. package/fesm2022/igniteui-angular-simple-combo.mjs +10 -7
  58. package/fesm2022/igniteui-angular-simple-combo.mjs.map +1 -1
  59. package/fesm2022/igniteui-angular-slider.mjs +3 -3
  60. package/fesm2022/igniteui-angular-slider.mjs.map +1 -1
  61. package/fesm2022/igniteui-angular-splitter.mjs +1 -1
  62. package/fesm2022/igniteui-angular-splitter.mjs.map +1 -1
  63. package/fesm2022/igniteui-angular-stepper.mjs +1 -1
  64. package/fesm2022/igniteui-angular-stepper.mjs.map +1 -1
  65. package/fesm2022/igniteui-angular-tabs.mjs.map +1 -1
  66. package/fesm2022/igniteui-angular-time-picker.mjs +3 -6
  67. package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
  68. package/fesm2022/igniteui-angular-tree.mjs +8 -10
  69. package/fesm2022/igniteui-angular-tree.mjs.map +1 -1
  70. package/lib/grids/core/src/filtering/excel-style/themes/_derived.scss +3 -2
  71. package/migrations/migration-collection.json +0 -7
  72. package/package.json +1 -1
  73. package/styles/igniteui-angular-dark.css +1 -1
  74. package/styles/igniteui-angular.css +1 -1
  75. package/styles/igniteui-bootstrap-dark.css +1 -1
  76. package/styles/igniteui-bootstrap-light.css +1 -1
  77. package/styles/igniteui-dark-green.css +1 -1
  78. package/styles/igniteui-fluent-dark-excel.css +1 -1
  79. package/styles/igniteui-fluent-dark-word.css +1 -1
  80. package/styles/igniteui-fluent-dark.css +1 -1
  81. package/styles/igniteui-fluent-light-excel.css +1 -1
  82. package/styles/igniteui-fluent-light-word.css +1 -1
  83. package/styles/igniteui-fluent-light.css +1 -1
  84. package/styles/igniteui-indigo-dark.css +1 -1
  85. package/styles/igniteui-indigo-light.css +1 -1
  86. package/styles/maps/igniteui-angular-dark.css.map +1 -1
  87. package/styles/maps/igniteui-angular.css.map +1 -1
  88. package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
  89. package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
  90. package/styles/maps/igniteui-dark-green.css.map +1 -1
  91. package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
  92. package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
  93. package/styles/maps/igniteui-fluent-dark.css.map +1 -1
  94. package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
  95. package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
  96. package/styles/maps/igniteui-fluent-light.css.map +1 -1
  97. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
  98. package/styles/maps/igniteui-indigo-light.css.map +1 -1
  99. package/types/igniteui-angular-avatar.d.ts +1 -1
  100. package/types/igniteui-angular-banner.d.ts +3 -3
  101. package/types/igniteui-angular-calendar.d.ts +9 -9
  102. package/types/igniteui-angular-card.d.ts +1 -1
  103. package/types/igniteui-angular-carousel.d.ts +9 -9
  104. package/types/igniteui-angular-chat.d.ts +1 -1
  105. package/types/igniteui-angular-chips.d.ts +5 -5
  106. package/types/igniteui-angular-combo.d.ts +17 -13
  107. package/types/igniteui-angular-core.d.ts +200 -495
  108. package/types/igniteui-angular-date-picker.d.ts +3 -3
  109. package/types/igniteui-angular-dialog.d.ts +4 -4
  110. package/types/igniteui-angular-directives.d.ts +60 -59
  111. package/types/igniteui-angular-drop-down.d.ts +16 -16
  112. package/types/igniteui-angular-expansion-panel.d.ts +6 -6
  113. package/types/igniteui-angular-grids-core.d.ts +1053 -791
  114. package/types/igniteui-angular-grids-grid.d.ts +104 -267
  115. package/types/igniteui-angular-grids-hierarchical-grid.d.ts +68 -547
  116. package/types/igniteui-angular-grids-lite.d.ts +7 -7
  117. package/types/igniteui-angular-grids-pivot-grid.d.ts +94 -129
  118. package/types/igniteui-angular-grids-tree-grid.d.ts +5 -51
  119. package/types/igniteui-angular-icon.d.ts +2 -2
  120. package/types/igniteui-angular-input-group.d.ts +4 -4
  121. package/types/igniteui-angular-list.d.ts +4 -4
  122. package/types/igniteui-angular-navigation-drawer.d.ts +3 -3
  123. package/types/igniteui-angular-progressbar.d.ts +1 -0
  124. package/types/igniteui-angular-query-builder.d.ts +9 -9
  125. package/types/igniteui-angular-radio.d.ts +1 -1
  126. package/types/igniteui-angular-select.d.ts +5 -5
  127. package/types/igniteui-angular-simple-combo.d.ts +2 -2
  128. package/types/igniteui-angular-slider.d.ts +4 -4
  129. package/types/igniteui-angular-splitter.d.ts +3 -3
  130. package/types/igniteui-angular-time-picker.d.ts +8 -8
  131. package/types/igniteui-angular-tree.d.ts +8 -8
  132. package/migrations/update-22_1_0_import-migration/index.d.ts +0 -2
  133. package/migrations/update-22_1_0_import-migration/index.js +0 -200
  134. package/migrations/update-22_1_0_import-migration/index.spec.d.ts +0 -1
  135. package/migrations/update-22_1_0_import-migration/index.spec.js +0 -132
@@ -1,200 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.default = migrate;
46
- const ts = __importStar(require("typescript"));
47
- const tsUtils_1 = require("../common/tsUtils");
48
- const version = '22.1.0';
49
- // Exports that moved to a different entry point in 22.1.0.
50
- // Keyed by exported symbol -> { from: source entry point, to: target entry point }.
51
- const EXPORT_MOVES = new Map([
52
- // IgxSummaryOperand definitions moved from grids/core to core
53
- ['IgxSummaryOperand', { from: 'grids/core', to: 'core' }],
54
- ['IgxNumberSummaryOperand', { from: 'grids/core', to: 'core' }],
55
- ['IgxDateSummaryOperand', { from: 'grids/core', to: 'core' }],
56
- ['IgxTimeSummaryOperand', { from: 'grids/core', to: 'core' }],
57
- // Selection/transaction types moved from grids/core to core
58
- ['GridSelectionRange', { from: 'grids/core', to: 'core' }],
59
- ['ISelectionNode', { from: 'grids/core', to: 'core' }],
60
- ['IMultiRowLayoutNode', { from: 'grids/core', to: 'core' }],
61
- ['ISelectionKeyboardState', { from: 'grids/core', to: 'core' }],
62
- ['ISelectionPointerState', { from: 'grids/core', to: 'core' }],
63
- ['IColumnSelectionState', { from: 'grids/core', to: 'core' }],
64
- ['SelectionState', { from: 'grids/core', to: 'core' }],
65
- ['IgxGridTransaction', { from: 'grids/core', to: 'core' }],
66
- // IGroupingDoneEventArgs moved from grids/grid to grids/core
67
- ['IGroupingDoneEventArgs', { from: 'grids/grid', to: 'grids/core' }]
68
- ]);
69
- // Distinct source entry points we need to inspect, e.g. 'grids/core', 'grids/grid'.
70
- const SOURCE_ENTRY_POINTS = [...new Set([...EXPORT_MOVES.values()].map(m => m.from))];
71
- /**
72
- * Resolves an import module specifier to its base package and entry point,
73
- * e.g. `igniteui-angular/grids/core` -> { basePackage: 'igniteui-angular', entry: 'grids/core' }.
74
- * Returns null for specifiers that are not an Ignite UI entry point.
75
- */
76
- function resolveEntryPoint(importPath) {
77
- for (const basePackage of [tsUtils_1.IG_PACKAGE_NAME, tsUtils_1.IG_LICENSED_PACKAGE_NAME]) {
78
- if (importPath.startsWith(`${basePackage}/`)) {
79
- return { basePackage, entry: importPath.substring(basePackage.length + 1) };
80
- }
81
- }
82
- return null;
83
- }
84
- function migrateImportDeclaration(node, sourceFile) {
85
- var _a;
86
- if (!(0, tsUtils_1.igNamedImportFilter)(node)) {
87
- return null;
88
- }
89
- const importPath = node.moduleSpecifier.text;
90
- const namedBindings = node.importClause.namedBindings;
91
- // Only process imports coming from a known source entry point for this migration
92
- const source = resolveEntryPoint(importPath);
93
- if (!source || !SOURCE_ENTRY_POINTS.includes(source.entry)) {
94
- return null;
95
- }
96
- // Group moved imports by target entry point; keep everything else where it is
97
- const entryPointGroups = new Map();
98
- const remaining = [];
99
- for (const element of namedBindings.elements) {
100
- const name = element.name.text;
101
- const alias = (_a = element.propertyName) === null || _a === void 0 ? void 0 : _a.text;
102
- const importName = alias || name;
103
- const fullImport = alias ? `${importName} as ${name}` : importName;
104
- // Check if this import moved out of the current source entry point
105
- const move = EXPORT_MOVES.get(importName);
106
- if (move && move.from === source.entry) {
107
- if (!entryPointGroups.has(move.to)) {
108
- entryPointGroups.set(move.to, []);
109
- }
110
- entryPointGroups.get(move.to).push(fullImport);
111
- }
112
- else {
113
- // Keep in the original entry point
114
- remaining.push(fullImport);
115
- }
116
- }
117
- // If nothing changed, return null
118
- if (entryPointGroups.size === 0) {
119
- return null;
120
- }
121
- // Generate new import statements
122
- const newImports = [];
123
- // Add remaining imports for the original entry point first
124
- if (remaining.length > 0) {
125
- const sortedImports = remaining.sort();
126
- newImports.push(`import { ${sortedImports.join(', ')} } from '${importPath}';`);
127
- }
128
- // Add moved imports
129
- for (const [entryPoint, imports] of entryPointGroups) {
130
- const sortedImports = imports.sort();
131
- newImports.push(`import { ${sortedImports.join(', ')} } from '${source.basePackage}/${entryPoint}';`);
132
- }
133
- return {
134
- start: node.getStart(sourceFile),
135
- end: node.getEnd(),
136
- replacement: newImports.join('\n')
137
- };
138
- }
139
- function migrateFile(filePath, content) {
140
- const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true);
141
- const changes = [];
142
- function visit(node) {
143
- if (ts.isImportDeclaration(node)) {
144
- const change = migrateImportDeclaration(node, sourceFile);
145
- if (change) {
146
- changes.push(change);
147
- }
148
- }
149
- ts.forEachChild(node, visit);
150
- }
151
- visit(sourceFile);
152
- // Apply changes in reverse order to maintain positions
153
- changes.sort((a, b) => b.start - a.start);
154
- let result = content;
155
- for (const change of changes) {
156
- result = result.substring(0, change.start) + change.replacement + result.substring(change.end);
157
- }
158
- return result;
159
- }
160
- /** Fast-path check: does the file import from any of the source entry points we migrate? */
161
- function hasRelevantImport(content) {
162
- return SOURCE_ENTRY_POINTS.some(entry => [tsUtils_1.IG_PACKAGE_NAME, tsUtils_1.IG_LICENSED_PACKAGE_NAME].some(basePackage => content.includes(`from '${basePackage}/${entry}'`) ||
163
- content.includes(`from "${basePackage}/${entry}"`)));
164
- }
165
- function migrate() {
166
- return (host, context) => __awaiter(this, void 0, void 0, function* () {
167
- context.logger.info(`Applying optional import migration for Ignite UI for Angular to version ${version}`);
168
- context.logger.info('Migrating imports to new entry points...');
169
- const visit = (filePath) => {
170
- // Only process TypeScript files
171
- if (!filePath.endsWith('.ts')) {
172
- return;
173
- }
174
- // Skip node_modules and dist
175
- if (filePath.includes('node_modules') || filePath.includes('dist')) {
176
- return;
177
- }
178
- const content = host.read(filePath);
179
- if (!content) {
180
- return;
181
- }
182
- const originalContent = content.toString();
183
- // Check if file imports from any migrated source entry point
184
- if (!hasRelevantImport(originalContent)) {
185
- return;
186
- }
187
- const migratedContent = migrateFile(filePath, originalContent);
188
- if (migratedContent !== originalContent) {
189
- host.overwrite(filePath, migratedContent);
190
- context.logger.info(` ✓ Migrated ${filePath}`);
191
- }
192
- };
193
- host.visit(visit);
194
- context.logger.info('Migration complete!');
195
- context.logger.info('Breaking changes:');
196
- for (const [symbol, move] of EXPORT_MOVES) {
197
- context.logger.info(` - ${symbol} moved from ${tsUtils_1.IG_PACKAGE_NAME}/${move.from} to ${tsUtils_1.IG_PACKAGE_NAME}/${move.to}`);
198
- }
199
- });
200
- }
@@ -1,132 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
- return new (P || (P = Promise))(function (resolve, reject) {
38
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
- step((generator = generator.apply(thisArg, _arguments || [])).next());
42
- });
43
- };
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- const path = __importStar(require("path"));
46
- const index_js_1 = require("@angular-devkit/schematics/testing/index.js");
47
- const setup_spec_1 = require("../common/setup.spec");
48
- const version = '22.1.0';
49
- describe(`Update to ${version}`, () => {
50
- let appTree;
51
- const schematicRunner = new index_js_1.SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
52
- beforeEach(() => {
53
- appTree = (0, setup_spec_1.setupTestTree)();
54
- });
55
- const migrationName = 'migration-58';
56
- const filePath = '/testSrc/appPrefix/component/test.component.ts';
57
- it('should move a single IgxSummaryOperand import from grids/core to core', () => __awaiter(void 0, void 0, void 0, function* () {
58
- appTree.create(filePath, `import { IgxSummaryOperand } from 'igniteui-angular/grids/core';`);
59
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
60
- expect(tree.readContent(filePath))
61
- .toEqual(`import { IgxSummaryOperand } from 'igniteui-angular/core';`);
62
- }));
63
- it('should move all summary operand imports from grids/core to core', () => __awaiter(void 0, void 0, void 0, function* () {
64
- appTree.create(filePath, `import { IgxSummaryOperand, IgxNumberSummaryOperand, IgxDateSummaryOperand, IgxTimeSummaryOperand } from 'igniteui-angular/grids/core';`);
65
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
66
- expect(tree.readContent(filePath))
67
- .toEqual(`import { IgxDateSummaryOperand, IgxNumberSummaryOperand, IgxSummaryOperand, IgxTimeSummaryOperand } from 'igniteui-angular/core';`);
68
- }));
69
- it('should split mixed imports, keeping non-operand exports in grids/core', () => __awaiter(void 0, void 0, void 0, function* () {
70
- appTree.create(filePath, `import { IgxGridComponent, IgxNumberSummaryOperand } from 'igniteui-angular/grids/core';`);
71
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
72
- expect(tree.readContent(filePath))
73
- .toEqual(`import { IgxGridComponent } from 'igniteui-angular/grids/core';\n` +
74
- `import { IgxNumberSummaryOperand } from 'igniteui-angular/core';`);
75
- }));
76
- it('should preserve aliased operand imports', () => __awaiter(void 0, void 0, void 0, function* () {
77
- appTree.create(filePath, `import { IgxSummaryOperand as SummaryOperand } from 'igniteui-angular/grids/core';`);
78
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
79
- expect(tree.readContent(filePath))
80
- .toEqual(`import { IgxSummaryOperand as SummaryOperand } from 'igniteui-angular/core';`);
81
- }));
82
- it('should migrate imports from the licensed package', () => __awaiter(void 0, void 0, void 0, function* () {
83
- appTree.create(filePath, `import { IgxTimeSummaryOperand } from '@infragistics/igniteui-angular/grids/core';`);
84
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
85
- expect(tree.readContent(filePath))
86
- .toEqual(`import { IgxTimeSummaryOperand } from '@infragistics/igniteui-angular/core';`);
87
- }));
88
- it('should NOT modify operand imports that already come from core', () => __awaiter(void 0, void 0, void 0, function* () {
89
- const content = `import { IgxSummaryOperand } from 'igniteui-angular/core';`;
90
- appTree.create(filePath, content);
91
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
92
- expect(tree.readContent(filePath)).toEqual(content);
93
- }));
94
- it('should NOT modify grids/core imports that are not moved operands', () => __awaiter(void 0, void 0, void 0, function* () {
95
- const content = `import { IgxGridComponent } from 'igniteui-angular/grids/core';`;
96
- appTree.create(filePath, content);
97
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
98
- expect(tree.readContent(filePath)).toEqual(content);
99
- }));
100
- it('should move selection and transaction types from grids/core to core', () => __awaiter(void 0, void 0, void 0, function* () {
101
- appTree.create(filePath, `import { GridSelectionRange, ISelectionNode, IMultiRowLayoutNode, ISelectionKeyboardState, ISelectionPointerState, IColumnSelectionState, SelectionState, IgxGridTransaction } from 'igniteui-angular/grids/core';`);
102
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
103
- expect(tree.readContent(filePath))
104
- .toEqual(`import { GridSelectionRange, IColumnSelectionState, IMultiRowLayoutNode, ISelectionKeyboardState, ISelectionNode, ISelectionPointerState, IgxGridTransaction, SelectionState } from 'igniteui-angular/core';`);
105
- }));
106
- it('should split a mixed grids/core import, keeping non-moved exports in place', () => __awaiter(void 0, void 0, void 0, function* () {
107
- appTree.create(filePath, `import { IgxGridComponent, SelectionState, IgxSummaryOperand } from 'igniteui-angular/grids/core';`);
108
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
109
- expect(tree.readContent(filePath))
110
- .toEqual(`import { IgxGridComponent } from 'igniteui-angular/grids/core';\n` +
111
- `import { IgxSummaryOperand, SelectionState } from 'igniteui-angular/core';`);
112
- }));
113
- it('should move IGroupingDoneEventArgs from grids/grid to grids/core', () => __awaiter(void 0, void 0, void 0, function* () {
114
- appTree.create(filePath, `import { IGroupingDoneEventArgs } from 'igniteui-angular/grids/grid';`);
115
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
116
- expect(tree.readContent(filePath))
117
- .toEqual(`import { IGroupingDoneEventArgs } from 'igniteui-angular/grids/core';`);
118
- }));
119
- it('should split IGroupingDoneEventArgs out of grids/grid, keeping other exports', () => __awaiter(void 0, void 0, void 0, function* () {
120
- appTree.create(filePath, `import { IgxGridComponent, IGroupingDoneEventArgs } from 'igniteui-angular/grids/grid';`);
121
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
122
- expect(tree.readContent(filePath))
123
- .toEqual(`import { IgxGridComponent } from 'igniteui-angular/grids/grid';\n` +
124
- `import { IGroupingDoneEventArgs } from 'igniteui-angular/grids/core';`);
125
- }));
126
- it('should NOT move IGroupingDoneEventArgs when imported from grids/core', () => __awaiter(void 0, void 0, void 0, function* () {
127
- const content = `import { IGroupingDoneEventArgs } from 'igniteui-angular/grids/core';`;
128
- appTree.create(filePath, content);
129
- const tree = yield schematicRunner.runSchematic(migrationName, {}, appTree);
130
- expect(tree.readContent(filePath)).toEqual(content);
131
- }));
132
- });