@energycap/components 0.40.1 → 0.40.2-rxjs-7-upgrade.20241217-1226

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 (41) hide show
  1. package/esm2020/lib/controls/checkbox/checkbox.component.mjs +3 -3
  2. package/esm2020/lib/controls/date-input/date-input.component.mjs +3 -2
  3. package/esm2020/lib/controls/dropdown/dropdown.component.mjs +1 -1
  4. package/esm2020/lib/controls/file-upload/file-upload.component.mjs +3 -2
  5. package/esm2020/lib/controls/form-control-base.mjs +2 -2
  6. package/esm2020/lib/controls/form-control-label/form-control-label.component.mjs +1 -1
  7. package/esm2020/lib/controls/form-group/form-group.component.mjs +3 -3
  8. package/esm2020/lib/controls/popover/popover.component.mjs +1 -1
  9. package/esm2020/lib/core/validation-message.service.mjs +3 -3
  10. package/esm2020/lib/display/dialog/dialog.component.mjs +4 -4
  11. package/esm2020/lib/display/hierarchy/hierarchy-base.mjs +1 -1
  12. package/esm2020/lib/display/table/searchable-table.component.mjs +1 -1
  13. package/esm2020/lib/display/toast/toaster/toaster.component.mjs +1 -1
  14. package/esm2020/lib/display/tooltip-directive/tooltip.directive.mjs +2 -2
  15. package/esm2020/lib/display/tour/tour.component.mjs +3 -3
  16. package/esm2020/lib/shared/page/page-base/page-base.component.mjs +3 -3
  17. package/fesm2015/energycap-components.mjs +8 -8
  18. package/fesm2015/energycap-components.mjs.map +1 -1
  19. package/fesm2020/energycap-components.mjs +8 -8
  20. package/fesm2020/energycap-components.mjs.map +1 -1
  21. package/lib/controls/checkbox/checkbox.component.d.ts +2 -2
  22. package/lib/controls/form-control-base.d.ts +1 -1
  23. package/lib/controls/form-group/form-group.component.d.ts +1 -1
  24. package/lib/display/hierarchy/hierarchy-base.d.ts +1 -1
  25. package/lib/display/table/searchable-table.component.d.ts +1 -1
  26. package/lib/shared/page/page-base/page-base.component.d.ts +1 -1
  27. package/package.json +2 -1
  28. package/schematics/collection.json +10 -0
  29. package/schematics/rxjs-7-upgrade/index.d.ts +3 -0
  30. package/schematics/rxjs-7-upgrade/index.js +68 -0
  31. package/schematics/rxjs-7-upgrade/index.js.map +1 -0
  32. package/schematics/rxjs-7-upgrade/schema.d.ts +4 -0
  33. package/schematics/rxjs-7-upgrade/schema.js +3 -0
  34. package/schematics/rxjs-7-upgrade/schema.js.map +1 -0
  35. package/schematics/rxjs-7-upgrade/schema.json +14 -0
  36. package/schematics/utilities/typescript.d.ts +7 -0
  37. package/schematics/utilities/typescript.js +42 -0
  38. package/schematics/utilities/typescript.js.map +1 -0
  39. package/schematics/utilities/workspace.d.ts +8 -0
  40. package/schematics/utilities/workspace.js +72 -0
  41. package/schematics/utilities/workspace.js.map +1 -0
@@ -15,7 +15,7 @@ import { NavigationEnd, convertToParamMap, NavigationStart, Router, RouterModule
15
15
  import * as i3 from '@ngx-translate/core';
16
16
  import { TranslateModule, TranslateService } from '@ngx-translate/core';
17
17
  import { ClipboardService } from 'ngx-clipboard';
18
- import { Subject, of, forkJoin, merge, fromEvent, EMPTY, timer, race, ReplaySubject } from 'rxjs';
18
+ import { Subject, of, lastValueFrom, forkJoin, merge, fromEvent, EMPTY, timer, race, ReplaySubject } from 'rxjs';
19
19
  import { takeUntil, switchMap, delay, distinctUntilChanged, filter, take, debounceTime, skipUntil, tap, pluck, map, catchError, skipWhile } from 'rxjs/operators';
20
20
  import moment from 'moment';
21
21
  import { range, cloneDeep, isEqual, uniqueId, sortBy, orderBy, get, upperFirst } from 'lodash';
@@ -1106,7 +1106,7 @@ class ValidationMessageService {
1106
1106
  // @see https://www.learnrxjs.io/operators/combination/forkjoin.html
1107
1107
  // We convert this to a promise so the form controls can display the error messages
1108
1108
  // asynchronously.
1109
- return forkJoin(translationObservables).toPromise();
1109
+ return lastValueFrom(forkJoin(translationObservables));
1110
1110
  }
1111
1111
  }
1112
1112
  return Promise.resolve(new Array());
@@ -4201,7 +4201,7 @@ class DateInputComponent extends FormControlBase {
4201
4201
  * form until the user is loaded anyway.
4202
4202
  */
4203
4203
  async setDateFormats() {
4204
- const { preference } = await this.userPreferenceService.getPreferences().toPromise();
4204
+ const { preference } = await lastValueFrom(this.userPreferenceService.getPreferences());
4205
4205
  const dateFormat = preference?.dateFormat;
4206
4206
  this.placeholder = dateFormat ?? this.placeholder;
4207
4207
  this.parseFormats = DateTimeHelper.getMomentParseFormats(dateFormat);
@@ -4887,7 +4887,7 @@ class FileUploadComponent extends FormControlBase {
4887
4887
  this.formModel.patchValue({ base64FileString, file, name: file.name, uploadResult: null });
4888
4888
  // If we have any async validators pending we need to wait for them to complete before we know if the form is valid
4889
4889
  if (this.formModel.pending) {
4890
- await this.formModel.statusChanges.pipe(filter(status => status !== 'PENDING'), take(1), takeUntil(this.componentDestroyed)).toPromise();
4890
+ await lastValueFrom(this.formModel.statusChanges.pipe(filter(status => status !== 'PENDING'), take(1), takeUntil(this.componentDestroyed)));
4891
4891
  }
4892
4892
  // Mark the name control as touched so that any validation errors will show
4893
4893
  this.formModel.controls.name.markAsTouched();
@@ -8279,12 +8279,12 @@ class DialogComponent {
8279
8279
  this.openDialogComponent(context);
8280
8280
  // Once the animation is complete we can remove the animation class and
8281
8281
  // emit the opened event, both to the hosting component and via DialogService
8282
- await timer(this.displayAsPanel ? PanelOpenDuration : DialogOpenDuration).pipe(take(1), tap(() => {
8282
+ await lastValueFrom(timer(this.displayAsPanel ? PanelOpenDuration : DialogOpenDuration).pipe(take(1), tap(() => {
8283
8283
  const dialogId = this.getDialogId();
8284
8284
  this.fadeIn = false;
8285
8285
  this.opened.emit(dialogId);
8286
8286
  this.dialogService.triggerEvent(new DialogOpenEndEvent(this.dialogOpenStartEventId, dialogId));
8287
- })).toPromise();
8287
+ })));
8288
8288
  this.handleCloseOnResize();
8289
8289
  }
8290
8290
  }
@@ -9546,7 +9546,7 @@ class TourComponent {
9546
9546
  this.telemetryService.trackEvent('TourStarted', { tourId: this.currentTour.id });
9547
9547
  let continueTour = true;
9548
9548
  if (this.isAutoStart && this.currentTourIndex === 0 && this.currentTour?.introDialog) {
9549
- let result = await this.dialogService.openDialog(this.currentTour.introDialog.content, this.currentTour.introDialog.size ?? 'small', this.currentTour.introDialog.context ?? undefined, this.currentTour.introDialog.options ?? undefined).toPromise();
9549
+ let result = await lastValueFrom(this.dialogService.openDialog(this.currentTour.introDialog.content, this.currentTour.introDialog.size ?? 'small', this.currentTour.introDialog.context ?? undefined, this.currentTour.introDialog.options ?? undefined));
9550
9550
  if (!result.save) {
9551
9551
  continueTour = false;
9552
9552
  this.writeCompletionKeyForAllTours();
@@ -11356,7 +11356,7 @@ class PageBaseComponent {
11356
11356
  if (this.formGroup.pending) {
11357
11357
  // Show the saving overlay when the form has pending async validators
11358
11358
  this.showStatus(PageStatus.Saving);
11359
- await this.formGroup.statusChanges.pipe(filter(status => status !== 'PENDING'), take(1), takeUntil(this.destroyed)).toPromise();
11359
+ await lastValueFrom(this.formGroup.statusChanges.pipe(filter(status => status !== 'PENDING'), take(1), takeUntil(this.destroyed)));
11360
11360
  }
11361
11361
  if (this.formGroup.valid) {
11362
11362
  await this.save();