igniteui-angular 18.2.0-beta.0 → 18.2.0-beta.2

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 (69) hide show
  1. package/esm2022/lib/badge/badge.component.mjs +19 -3
  2. package/esm2022/lib/core/i18n/query-builder-resources.mjs +4 -3
  3. package/esm2022/lib/data-operations/filtering-expression.interface.mjs +1 -1
  4. package/esm2022/lib/data-operations/filtering-expressions-tree.mjs +1 -1
  5. package/esm2022/lib/grids/filtering/base/grid-filtering-cell.component.mjs +2 -2
  6. package/esm2022/lib/grids/grid/groupby-row.component.mjs +2 -2
  7. package/esm2022/lib/grids/grouping/grid-group-by-area.component.mjs +3 -3
  8. package/esm2022/lib/grids/grouping/tree-grid-group-by-area.component.mjs +3 -3
  9. package/esm2022/lib/grids/pivot-grid/pivot-header-row.component.mjs +2 -2
  10. package/esm2022/lib/grids/selection/selection.service.mjs +9 -9
  11. package/esm2022/lib/icon/icon.references.mjs +6 -10
  12. package/esm2022/lib/query-builder/query-builder-header.component.mjs +3 -3
  13. package/esm2022/lib/query-builder/query-builder-tree.component.mjs +3 -3
  14. package/esm2022/lib/tabs/tabs/tabs.component.mjs +4 -3
  15. package/fesm2022/igniteui-angular.mjs +46 -33
  16. package/fesm2022/igniteui-angular.mjs.map +1 -1
  17. package/lib/badge/badge.component.d.ts +12 -1
  18. package/lib/core/i18n/query-builder-resources.d.ts +1 -0
  19. package/lib/core/styles/components/badge/_badge-component.scss +4 -0
  20. package/lib/core/styles/components/badge/_badge-theme.scss +6 -12
  21. package/lib/core/styles/components/banner/_banner-theme.scss +5 -1
  22. package/lib/core/styles/components/card/_card-theme.scss +18 -1
  23. package/lib/core/styles/components/chip/_chip-theme.scss +180 -154
  24. package/lib/core/styles/components/drop-down/_drop-down-theme.scss +5 -1
  25. package/lib/core/styles/components/navdrawer/_navdrawer-theme.scss +9 -7
  26. package/lib/core/styles/components/query-builder/_query-builder-component.scss +4 -0
  27. package/lib/core/styles/components/query-builder/_query-builder-theme.scss +39 -38
  28. package/lib/core/styles/components/tabs/_tabs-theme.scss +72 -18
  29. package/lib/core/styles/components/tree/_tree-theme.scss +1 -3
  30. package/lib/core/styles/typography/_indigo.scss +3 -1
  31. package/lib/data-operations/filtering-expression.interface.d.ts +2 -4
  32. package/lib/data-operations/filtering-expressions-tree.d.ts +24 -2
  33. package/migrations/common/ServerHost.d.ts +3 -1
  34. package/migrations/common/ServerHost.js +4 -1
  35. package/migrations/common/UpdateChanges.d.ts +7 -2
  36. package/migrations/common/UpdateChanges.js +39 -29
  37. package/migrations/common/project-service-container.d.ts +11 -0
  38. package/migrations/common/project-service-container.js +25 -0
  39. package/migrations/update-13_0_0/changes/members.json +1 -1
  40. package/migrations/update-18_2_0/changes/inputs.json +14 -0
  41. package/migrations/update-18_2_0/changes/theme-changes.json +6 -0
  42. package/migrations/update-18_2_0/index.js +36 -0
  43. package/package.json +2 -2
  44. package/styles/igniteui-angular-dark.css +1 -1
  45. package/styles/igniteui-angular.css +1 -1
  46. package/styles/igniteui-bootstrap-dark.css +1 -1
  47. package/styles/igniteui-bootstrap-light.css +1 -1
  48. package/styles/igniteui-dark-green.css +1 -1
  49. package/styles/igniteui-fluent-dark-excel.css +1 -1
  50. package/styles/igniteui-fluent-dark-word.css +1 -1
  51. package/styles/igniteui-fluent-dark.css +1 -1
  52. package/styles/igniteui-fluent-light-excel.css +1 -1
  53. package/styles/igniteui-fluent-light-word.css +1 -1
  54. package/styles/igniteui-fluent-light.css +1 -1
  55. package/styles/igniteui-indigo-dark.css +1 -1
  56. package/styles/igniteui-indigo-light.css +1 -1
  57. package/styles/maps/igniteui-angular-dark.css.map +1 -1
  58. package/styles/maps/igniteui-angular.css.map +1 -1
  59. package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
  60. package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
  61. package/styles/maps/igniteui-dark-green.css.map +1 -1
  62. package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
  63. package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
  64. package/styles/maps/igniteui-fluent-dark.css.map +1 -1
  65. package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
  66. package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
  67. package/styles/maps/igniteui-fluent-light.css.map +1 -1
  68. package/styles/maps/igniteui-indigo-dark.css.map +1 -1
  69. package/styles/maps/igniteui-indigo-light.css.map +1 -1
@@ -202,7 +202,7 @@
202
202
  }
203
203
 
204
204
  %navdrawer-display-mini-pinned {
205
- flex-basis: var(--igx-mini-nav-drawer-size, #{$item-mini-size});
205
+ flex-basis: calc(var(--igx-mini-nav-drawer-size, #{$item-mini-size}) + rem(1px));
206
206
  }
207
207
 
208
208
  %aside {
@@ -213,11 +213,11 @@
213
213
  background: var-get($theme, 'background');
214
214
  top: 0;
215
215
  bottom: 0;
216
- min-width: var(--igx-nav-drawer-size);
216
+ width: var(--igx-nav-drawer-size);
217
217
  inset-inline-start: 0;
218
218
  z-index: 999;
219
219
  transition: width, padding, transform;
220
- transition-timing-function: $in-out-quad, $in-out-quad;
220
+ transition-timing-function: $in-out-quad;
221
221
  box-shadow: var-get($theme, 'shadow');
222
222
  padding: $aside-padding;
223
223
 
@@ -279,11 +279,13 @@
279
279
  }
280
280
 
281
281
  %aside--mini {
282
- transition-duration: .2s, .2s;
283
- min-width: var(--igx-nav-drawer-size--mini);
282
+ transition-duration: .3s;
283
+ width: var(--igx-nav-drawer-size--mini);
284
+ min-width: fit-content;
284
285
 
285
286
  %item {
286
287
  justify-content: center;
288
+ min-width: fit-content;
287
289
 
288
290
  @if $variant == 'bootstrap' {
289
291
  width: rem(56px);
@@ -303,7 +305,7 @@
303
305
  }
304
306
 
305
307
  %aside--normal {
306
- transition-duration: .3s, .3s;
308
+ transition-duration: .3s;
307
309
  width: var(--igx-nav-drawer-size);
308
310
  }
309
311
 
@@ -311,7 +313,7 @@
311
313
  opacity: 1;
312
314
  background: color(null, 'gray', 500, .54);
313
315
  transition: opacity, visibility;
314
- transition-duration: .25s, .25s;
316
+ transition-duration: .3s, .3s;
315
317
  transition-timing-function: ease-in, step-start;
316
318
  transition-delay: 0s, 0s;
317
319
  position: absolute;
@@ -24,6 +24,10 @@
24
24
  @extend %advanced-filter__header !optional;
25
25
  }
26
26
 
27
+ @include e(title) {
28
+ @extend %advanced-filter__title !optional;
29
+ }
30
+
27
31
  @include e(main) {
28
32
  @extend %advanced-filter__main !optional;
29
33
  }
@@ -143,11 +143,8 @@
143
143
  }
144
144
 
145
145
  %advanced-filter__main {
146
- padding: pad-inline(
147
- map.get($vertical-space, 'compact'),
148
- map.get($vertical-space, 'cosy'),
149
- map.get($vertical-space, 'comfortable')
150
- );
146
+ padding-inline: pad-inline(rem(8px), rem(12px), rem(16px));
147
+ padding-block: pad-block(rem(16px));
151
148
  }
152
149
  }
153
150
  }
@@ -174,13 +171,10 @@
174
171
  }
175
172
 
176
173
  %advanced-filter__header {
177
- @if $variant != 'indigo' {
178
- @include type-style('h6');
179
- } @else {
180
- @include type-style('h5');
181
-
182
- border-top-left-radius: border-radius(rem(10px));
183
- border-top-right-radius: border-radius(rem(10px));
174
+ @if $variant == 'bootstrap' {
175
+ > * {
176
+ margin-bottom: rem(0) !important;
177
+ }
184
178
  }
185
179
 
186
180
  display: flex;
@@ -193,6 +187,10 @@
193
187
  border-block-end: rem(1px) solid var-get($theme, 'header-border');
194
188
  }
195
189
 
190
+ %advanced-filter__title {
191
+ @include type-style(if($variant != 'indigo', 'h6', 'h5'));
192
+ }
193
+
196
194
  %advanced-filter__main {
197
195
  display: flex;
198
196
  overflow: auto;
@@ -284,13 +282,10 @@
284
282
  display: flex;
285
283
  align-items: center;
286
284
  width: 100%;
287
- gap: $gap;
285
+ gap: if($variant != 'indigo', $gap, rem(8px));
288
286
  position: relative;
289
287
 
290
288
  > igx-chip {
291
- @container style(--ig-size: 1) {
292
- --ig-size: 2;
293
- }
294
289
 
295
290
  @if $variant != 'indigo' {
296
291
  .igx-chip__item {
@@ -298,10 +293,14 @@
298
293
  }
299
294
  }
300
295
 
301
- .igx-filter-tree__expression-column {
296
+ %filter-tree__expression-column {
302
297
  padding-inline: pad-inline(rem(3px), rem(6px), rem(8px));
303
298
  }
304
299
 
300
+ %filter-tree__expression-condition {
301
+ padding-inline-start: pad-inline(rem(3px), rem(6px), rem(8px));
302
+ }
303
+
305
304
  igx-prefix {
306
305
  display: flex;
307
306
  }
@@ -318,22 +317,19 @@
318
317
 
319
318
  %filter-tree__expression-actions {
320
319
  display: inline-flex;
321
- gap: $gap;
320
+ gap: if($variant != 'indigo', $gap, rem(8px));
322
321
 
323
- igx-icon {
324
- cursor: pointer;
325
- color: color(null, 'gray', 500);
326
- outline-style: none;
327
-
328
- &:hover,
329
- &:focus {
330
- color: color(null, 'gray', 800);
331
- }
322
+ span {
323
+ display: inline-flex;
332
324
  }
325
+
326
+ %igx-icon-button-display {
327
+ --size: #{sizable(rem(20px), rem(24px), if($variant != 'indigo', rem(32px), rem(28px)))}
328
+ };
333
329
  }
334
330
 
335
331
  %filter-tree__expression-condition {
336
- opacity: .7;
332
+ opacity: if($variant != 'indigo', .6, .8);
337
333
  }
338
334
 
339
335
  %filter-tree__buttons {
@@ -345,14 +341,19 @@
345
341
 
346
342
  %filter-tree__inputs {
347
343
  display: flex;
348
- justify-content: space-between;
349
- align-items: center;
344
+ align-items: flex-end;
350
345
  gap: rem(8px);
346
+ width: 100%;
351
347
 
352
348
  igx-input-group {
353
349
  --ig-size: 1;
354
350
  }
355
351
 
352
+ > * {
353
+ max-width: rem(300px);
354
+ width: 100%;
355
+ }
356
+
356
357
  &:empty {
357
358
  display: none !important;
358
359
  }
@@ -362,6 +363,7 @@
362
363
  display: flex;
363
364
  gap: $gap;
364
365
  align-items: center;
366
+ width: auto;
365
367
 
366
368
  [igxIconButton] {
367
369
  transition: none;
@@ -379,18 +381,16 @@
379
381
  display: inline-flex;
380
382
  align-items: center;
381
383
  font-size: rem(12px);
382
-
383
- @if $variant == 'indigo' {
384
- font-weight: 400;
385
- }
384
+ line-height: rem(16px);
385
+ font-weight: 400;
386
386
 
387
387
  &::before {
388
388
  content: '';
389
389
  width: rem(24px);
390
390
  height: rem(24px);
391
391
  background: white;
392
- border-radius: $border-radius;
393
392
  margin-inline-end: rem(8px);
393
+ border-radius: if($variant != 'indigo', $border-radius, #{rem(4px)});
394
394
  }
395
395
 
396
396
  + %filter-legend__item {
@@ -461,8 +461,9 @@
461
461
 
462
462
  %filter-con-menu__close-btn {
463
463
  position: absolute;
464
- top: rem(-18px);
465
- inset-inline-end: rem(-18px);
464
+ top: 0;
465
+ inset-inline-start: 100%;
466
+ transform: translate(-50%, -50%);
466
467
  background-color: var-get($theme, 'background');
467
468
  border: rem(1px) solid color(null, 'gray', 200);
468
469
 
@@ -493,7 +494,7 @@
493
494
  color: contrast-color(null, 'gray', 50, .6);
494
495
  }
495
496
  } @else {
496
- color: color(null, 'gray', 600);
497
+ color: color(null, 'gray', 500);
497
498
  }
498
499
  }
499
500
 
@@ -188,7 +188,8 @@
188
188
  border-color: $border-color,
189
189
  border-radius: $border-radius,
190
190
  _meta: map.merge(if($meta, $meta, ()), (
191
- variant: map.get($schema, '_meta', 'theme')
191
+ variant: map.get($schema, '_meta', 'theme'),
192
+ theme-variant: map.get($schema, '_meta', 'variant')
192
193
  )),
193
194
  ));
194
195
  }
@@ -205,6 +206,7 @@
205
206
  $not-bootstrap-theme: $variant != 'bootstrap';
206
207
  $bootstrap-theme: $variant == 'bootstrap';
207
208
  $indigo-theme: $variant == 'indigo';
209
+ $theme-variant: map.get($theme, '_meta', 'theme-variant');
208
210
 
209
211
  $item-min-width: rem(90px);
210
212
  $item-max-width: rem(360px);
@@ -228,9 +230,12 @@
228
230
  %tabs-header-item-inner,
229
231
  %tabs-header-content {
230
232
  display: flex;
233
+ align-items: center;
231
234
  }
232
235
 
233
236
  %tabs-display {
237
+ --nav-btn-border-color: #{var-get($theme, 'border-color')};
238
+
234
239
  display: flex;
235
240
  flex-direction: column;
236
241
  overflow: hidden;
@@ -240,8 +245,21 @@
240
245
  overflow: hidden;
241
246
  flex: 0 0 auto;
242
247
  background: var-get($theme, 'item-background');
243
- min-height: rem(42px);
244
248
  z-index: 1;
249
+
250
+ @if $indigo-theme {
251
+ [igxIconButton='flat'].igx-button--focused {
252
+ box-shadow: none;
253
+
254
+ &::after {
255
+ border: rem(3px) solid var(--nav-btn-border-color);
256
+
257
+ @if $theme-variant == 'dark' {
258
+ border-color: contrast-color($color: 'gray', $variant: 50, $opacity: .2);
259
+ }
260
+ }
261
+ }
262
+ }
245
263
  }
246
264
 
247
265
  %tabs-header-content {
@@ -286,6 +304,10 @@
286
304
  background: var-get($theme, 'button-background');
287
305
  color: var-get($theme, 'button-color');
288
306
  outline: 0;
307
+ align-self: stretch;
308
+ height: auto;
309
+ transition: none;
310
+ border-radius: border-radius(0);
289
311
 
290
312
  &:hover {
291
313
  background: var-get($theme, 'button-hover-background');
@@ -294,7 +316,10 @@
294
316
 
295
317
  &:focus {
296
318
  outline: 0;
297
- background: var-get($theme, 'button-hover-background');
319
+
320
+ @if $variant != 'indigo' {
321
+ background: var-get($theme, 'button-hover-background');
322
+ }
298
323
  }
299
324
 
300
325
  &::-moz-focus-inner {
@@ -304,12 +329,27 @@
304
329
 
305
330
  &:disabled {
306
331
  color: var-get($theme, 'button-disabled-color');
332
+ cursor: default;
333
+ pointer-events: none;
307
334
  }
308
335
 
309
336
  &--none {
310
337
  display: none;
311
338
  }
312
339
 
340
+ @if $indigo-theme {
341
+ min-width: rem(40px);
342
+ width: rem(40px);
343
+
344
+ &::after {
345
+ content: '';
346
+ position: absolute;
347
+ pointer-events: none;
348
+ width: 100%;
349
+ height: 100%;
350
+ border-bottom: rem(1px) solid var(--nav-btn-border-color);
351
+ }
352
+ }
313
353
 
314
354
  @include ripple($button-ripple-theme);
315
355
  @include css-vars($button-ripple-theme);
@@ -327,7 +367,7 @@
327
367
 
328
368
  %tabs-header-item {
329
369
  > * {
330
- margin-inline-start: rem(12px);
370
+ margin-inline-start: rem(if($variant != 'indigo', 12px, 8px));
331
371
 
332
372
  &:first-child {
333
373
  margin-inline-start: 0;
@@ -338,6 +378,7 @@
338
378
  align-items: center;
339
379
  min-width: $item-min-width;
340
380
  max-width: $item-max-width;
381
+ min-height: #{if($variant == 'indigo', rem(40px), rem(42px))};
341
382
  word-wrap: break-word;
342
383
  // Flex basis & shrink are Needed for IE11
343
384
  flex-basis: auto;
@@ -355,16 +396,6 @@
355
396
  color: var-get($theme, 'item-icon-color');
356
397
  }
357
398
 
358
- @if $bootstrap-theme {
359
- padding-block: rem(12px);
360
- border-start-start-radius: var-get($theme, 'border-radius');
361
- border-start-end-radius: var-get($theme, 'border-radius');
362
- }
363
-
364
- @if $indigo-theme {
365
- border-bottom: rem(1px) solid var-get($theme, 'border-color');
366
- }
367
-
368
399
  &::-moz-focus-inner {
369
400
  border: 0;
370
401
  }
@@ -392,6 +423,7 @@
392
423
  }
393
424
 
394
425
  @if $bootstrap-theme {
426
+ padding-block: rem(12px);
395
427
  border-start-start-radius: var-get($theme, 'border-radius');
396
428
  border-start-end-radius: var-get($theme, 'border-radius');
397
429
  }
@@ -407,13 +439,18 @@
407
439
  }
408
440
 
409
441
  @if $indigo-theme {
410
- border-top: transparent;
411
- border-inline: transparent;
442
+ border-top: rem(1px) solid transparent;
443
+ border-inline: none;
412
444
 
413
445
  &:hover,
414
446
  &:focus {
415
- border-top: transparent;
416
- border-inline: transparent;
447
+ border-top: rem(1px) solid transparent;
448
+ border-inline: none;
449
+ border-bottom: rem(1px) solid var-get($theme, 'border-color');
450
+ }
451
+
452
+ igx-icon {
453
+ --ig-size: 2;
417
454
  }
418
455
  }
419
456
 
@@ -459,6 +496,18 @@
459
496
  box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'border-color');
460
497
  }
461
498
  }
499
+
500
+ @if $indigo-theme {
501
+ &:hover,
502
+ &:focus-visible {
503
+ background: var-get($theme, 'item-hover-background');
504
+ color: var-get($theme, 'item-hover-color');
505
+
506
+ igx-icon {
507
+ color: var-get($theme, 'item-hover-icon-color');
508
+ }
509
+ }
510
+ }
462
511
  }
463
512
 
464
513
  %tabs-header-item:focus,
@@ -516,9 +565,14 @@
516
565
  min-width: $item-min-width;
517
566
  background: var-get($theme, 'indicator-color');
518
567
  transition: transform .3s $tabs-animation-function, width .2s $tabs-animation-function;
568
+
519
569
  @if $bootstrap-theme {
520
570
  display: none;
521
571
  }
572
+
573
+ @if $indigo-theme {
574
+ height: rem(3px);
575
+ }
522
576
  }
523
577
 
524
578
  %tabs-panels {
@@ -240,9 +240,7 @@
240
240
  }
241
241
 
242
242
  igx-icon {
243
- @if $variant == 'indigo' {
244
- --component-size: 2;
245
- }
243
+ --component-size: #{if($variant == 'indigo', 2, 3)};
246
244
  }
247
245
 
248
246
  [dir='rtl'] & {
@@ -102,7 +102,9 @@
102
102
  @include switch-typography($categories: (
103
103
  label: 'body-2'
104
104
  ));
105
- @include tabs-typography();
105
+ @include tabs-typography($categories: (
106
+ label: 'subtitle-2',
107
+ ));
106
108
  @include time-picker-typography($categories: (
107
109
  header-time-period: 'subtitle-1',
108
110
  header-hour: 'h5',
@@ -1,6 +1,4 @@
1
- /// <reference types="node" />
2
1
  import { IFilteringOperation } from './filtering-condition';
3
- import { Serializable } from 'node:child_process';
4
2
  import { IExpressionTree } from './filtering-expressions-tree';
5
3
  export declare enum FilteringLogic {
6
4
  And = 0,
@@ -12,8 +10,8 @@ export declare enum FilteringLogic {
12
10
  export declare interface IFilteringExpression {
13
11
  fieldName: string;
14
12
  condition?: IFilteringOperation;
15
- conditionName: string;
16
- searchVal?: Serializable;
13
+ conditionName?: string;
14
+ searchVal?: any;
17
15
  searchTree?: IExpressionTree;
18
16
  ignoreCase?: boolean;
19
17
  }
@@ -54,7 +54,7 @@ export declare class FilteringExpressionsTree implements IFilteringExpressionsTr
54
54
  /**
55
55
  * Sets/gets the field name of the column where the filtering expression is placed.
56
56
  * ```typescript
57
- * gridExpressionTree.fieldName = 'Column Field';
57
+ * gridExpressionTree.fieldName = 'Column Field';
58
58
  * ```
59
59
  * ```typescript
60
60
  * let columnField = expressionTree.fieldName;
@@ -66,7 +66,7 @@ export declare class FilteringExpressionsTree implements IFilteringExpressionsTr
66
66
  /**
67
67
  * Sets/gets the type of the filtering expressions tree.
68
68
  * ```typescript
69
- * gridExpressionTree.type = FilteringExpressionsTree.Advanced;
69
+ * gridExpressionTree.type = FilteringExpressionsTree.Advanced;
70
70
  * ```
71
71
  * ```typescript
72
72
  * let type = expressionTree.type;
@@ -75,7 +75,29 @@ export declare class FilteringExpressionsTree implements IFilteringExpressionsTr
75
75
  * @memberof FilteringExpressionsTree
76
76
  */
77
77
  type?: FilteringExpressionsTreeType;
78
+ /**
79
+ * Sets/gets the entity.
80
+ * ```typescript
81
+ * gridExpressionsTree.entity = 'Entity A';
82
+ * ```
83
+ * ```typescript
84
+ * let entity = gridExpressionsTree.entity;
85
+ * ```
86
+ *
87
+ * @memberof FilteringExpressionsTree
88
+ */
78
89
  entity?: string;
90
+ /**
91
+ * Sets/gets the return fields.
92
+ * ```typescript
93
+ * gridExpressionsTree.returnFields = ['Column Field 1', 'Column Field 2'];
94
+ * ```
95
+ * ```typescript
96
+ * let returnFields = gridExpressionsTree.returnFields;
97
+ * ```
98
+ *
99
+ * @memberof FilteringExpressionsTree
100
+ */
79
101
  returnFields?: string[];
80
102
  constructor(operator: FilteringLogic, fieldName?: string, entity?: string, returnFields?: string[]);
81
103
  /**
@@ -6,10 +6,12 @@ import * as ts from 'typescript/lib/tsserverlibrary';
6
6
  * Angular's Ivy LS sometimes bypasses these, calling path methods instead of tsLsHost operations
7
7
  */
8
8
  export declare class ServerHost implements ts.server.ServerHost {
9
- private host;
9
+ host: Tree;
10
10
  readonly args: string[];
11
11
  readonly newLine: string;
12
12
  readonly useCaseSensitiveFileNames: boolean;
13
+ /** Cached because Angular schematics encapsulation's customRequire doesn't provide `resolve` */
14
+ private nativeRequire;
13
15
  constructor(host: Tree);
14
16
  /**
15
17
  * Read a file's content from the Virtual Tree
@@ -4,6 +4,7 @@ exports.ServerHost = void 0;
4
4
  const pathFs = require("path");
5
5
  const ts = require("typescript/lib/tsserverlibrary");
6
6
  const tsUtils_1 = require("./tsUtils");
7
+ const module_1 = require("module");
7
8
  /**
8
9
  * Language server host is responsible for **most** of the FS operations / checks
9
10
  * Angular's Ivy LS sometimes bypasses these, calling path methods instead of tsLsHost operations
@@ -11,6 +12,8 @@ const tsUtils_1 = require("./tsUtils");
11
12
  class ServerHost {
12
13
  constructor(host) {
13
14
  this.host = host;
15
+ /** Cached because Angular schematics encapsulation's customRequire doesn't provide `resolve` */
16
+ this.nativeRequire = (0, module_1.createRequire)(__filename);
14
17
  this.args = ts.sys.args;
15
18
  this.newLine = ts.sys.newLine;
16
19
  this.useCaseSensitiveFileNames = ts.sys.useCaseSensitiveFileNames;
@@ -112,7 +115,7 @@ class ServerHost {
112
115
  moduleName = tsUtils_1.CUSTOM_TS_PLUGIN_PATH;
113
116
  paths.push(__dirname);
114
117
  }
115
- const modulePath = require.resolve(moduleName, { paths });
118
+ const modulePath = this.nativeRequire.resolve(moduleName, { paths });
116
119
  return {
117
120
  module: require(modulePath),
118
121
  error: undefined,
@@ -18,12 +18,11 @@ export declare class UpdateChanges {
18
18
  private host;
19
19
  private context?;
20
20
  protected tsconfigPath: string;
21
- protected _projectService: tss.server.ProjectService;
22
21
  _shouldInvokeLS: boolean;
23
22
  get shouldInvokeLS(): boolean;
24
23
  set shouldInvokeLS(val: boolean);
25
24
  get projectService(): tss.server.ProjectService;
26
- protected serverHost: ServerHost;
25
+ protected get serverHost(): ServerHost;
27
26
  protected workspace: WorkspaceSchema;
28
27
  protected sourcePaths: string[];
29
28
  protected classChanges: ClassChanges;
@@ -91,6 +90,12 @@ export declare class UpdateChanges {
91
90
  private updateTsFiles;
92
91
  private updateMembers;
93
92
  private getDefaultProjectForFile;
93
+ /**
94
+ * Force Angular service to compile project on initial load w/ configured project
95
+ * otherwise if the first compilation occurs on an HTML file the project won't have proper refs
96
+ * and no actual angular metadata will be resolved for the rest of the migration
97
+ */
98
+ private configureForAngularLS;
94
99
  private getWorkspaceProjectEntryPath;
95
100
  }
96
101
  export declare enum BindingType {