@alfresco/adf-process-services-cloud 9.2.0-35324082474 → 9.2.0-35333750885

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.
@@ -2,11 +2,11 @@ import * as i0 from '@angular/core';
2
2
  import { inject, Injectable, InjectionToken, EventEmitter, DestroyRef, Output, Input, ContentChild, Directive, ViewEncapsulation, Component, Injector, NgModule, effect, ViewChild, ChangeDetectorRef, HostListener, ElementRef, Renderer2, signal, ViewContainerRef, ChangeDetectionStrategy, input, output, SecurityContext } from '@angular/core';
3
3
  import * as i3 from '@alfresco/adf-core';
4
4
  import { AppConfigService, JwtHelperService, OAuth2Service, TranslationService, DataTableSchema, UserPreferencesService, UserPreferenceValues, CustomEmptyContentTemplateDirective, ObjectDataTableAdapter, ColumnsSelectorComponent, MainMenuDataTableTemplateDirective, EmptyContentComponent, NoContentTemplateDirective, LoadingContentTemplateDirective, DataTableComponent, AdfDateFnsAdapter, MOMENT_DATE_FORMATS, AuthenticationService, StorageService, IconModule, DateFnsUtils, ADF_DATE_FORMATS, FullNamePipe, InitialUsernamePipe, FormService, FormModel, FormFieldTypes, ROW_ID_PREFIX, FormBaseComponent, ADF_DISPLAY_TEXT_SETTINGS, WidgetVisibilityService, FormExpressionService, UploadWidgetContentLinkModel, FormEvent, FormOutcomeModel, ConfirmDialogComponent, FormRulesEvent, FormOutcomeEvent, FormRendererComponent, ToolbarDividerComponent, ToolbarComponent, FormatSpacePipe, NotificationService, DownloadService, WidgetComponent, ThumbnailService, ErrorWidgetComponent, LocalizedDatePipe, UploadDirective, ContentLinkModel, ErrorMessageModel, DEFAULT_DATE_FORMAT, FormFieldValueFormatterService, ADF_TYPED_VALUE_FORMATTING_ENABLED, FormFieldEvent, SelectFilterInputComponent, FormRenderingService, DynamicComponentMapper, CardViewUpdateService, ClipboardService, CardViewTextItemModel, CardViewSelectItemModel, CardViewDatetimeItemModel, CardViewDateItemModel, CardViewArrayItemModel, CardViewComponent, CustomLoadingContentTemplateDirective, isOutcomeButtonVisible, InplaceFormInputComponent, BaseViewerWidgetComponent, BaseDisplayTextWidgetComponent, ObjectDataColumn, ObjectDataRow, FormBaseModule, provideTranslations } from '@alfresco/adf-core';
5
+ import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
5
6
  import { from, EMPTY, isObservable, of, Subject, throwError, BehaviorSubject, combineLatest, defer, merge, asapScheduler, firstValueFrom, forkJoin, catchError as catchError$1 } from 'rxjs';
6
- import { map, take, switchMap, catchError, tap, filter, finalize, debounceTime, shareReplay, mergeMap, distinctUntilChanged, expand, reduce, mapTo, concatMap } from 'rxjs/operators';
7
+ import { map, take, switchMap, catchError, distinctUntilChanged, tap, filter, finalize, debounceTime, shareReplay, mergeMap, expand, reduce, mapTo, concatMap } from 'rxjs/operators';
7
8
  import { AlfrescoApiService, NodeAction, ContentNodeSelectorComponent, NodesApiService, ContentService, ContentNodeSelectorPanelService, NewVersionUploaderService, NewVersionUploaderDataAction, ContentMetadataComponent, AlfrescoViewerComponent } from '@alfresco/adf-content-services';
8
9
  import { AdfHttpClient } from '@alfresco/adf-core/api';
9
- import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
10
10
  import * as i1 from '@angular/common';
11
11
  import { CommonModule, AsyncPipe, UpperCasePipe, NgIf, NgForOf } from '@angular/common';
12
12
  import { TranslatePipe, TranslateService } from '@ngx-translate/core';
@@ -992,6 +992,7 @@ class BaseTaskListCloudComponent extends DataTableSchema {
992
992
  this.appConfigService = inject(AppConfigService);
993
993
  this.taskCloudService = inject(TaskCloudService);
994
994
  this.userPreferences = inject(UserPreferencesService);
995
+ this.appNameSubject$ = new Subject();
995
996
  this.cloudPreferenceService = cloudPreferenceService;
996
997
  this.size = this.userPreferences.paginationSize;
997
998
  this.pagination = new BehaviorSubject({
@@ -999,6 +1000,9 @@ class BaseTaskListCloudComponent extends DataTableSchema {
999
1000
  skipCount: 0,
1000
1001
  totalItems: 0
1001
1002
  });
1003
+ this.appNameSubject$.pipe(takeUntilDestroyed(this.destroyRef), distinctUntilChanged()).subscribe((appName) => {
1004
+ this.retrieveTasksPreferences(appName);
1005
+ });
1002
1006
  this.boundReplacePriorityValues = this.replacePriorityValues.bind(this);
1003
1007
  }
1004
1008
  ngOnInit() {
@@ -1012,14 +1016,14 @@ class BaseTaskListCloudComponent extends DataTableSchema {
1012
1016
  this.formatSorting(changes['sorting'].currentValue);
1013
1017
  }
1014
1018
  if (changes['appName']) {
1015
- this.retrieveTasksPreferences();
1019
+ this.appNameSubject$.next(changes['appName'].currentValue);
1016
1020
  }
1017
1021
  this.reload();
1018
1022
  }
1019
- retrieveTasksPreferences() {
1023
+ retrieveTasksPreferences(appName) {
1020
1024
  this.isLoadingPreferences$.next(true);
1021
1025
  this.cloudPreferenceService
1022
- .getPreferences(this.appName)
1026
+ .getPreferences(appName)
1023
1027
  .pipe(take(1), map((preferences) => {
1024
1028
  const preferencesList = preferences?.list?.entries ?? [];
1025
1029
  const columnsOrder = preferencesList.find((preference) => preference.entry.key === TasksListCloudPreferences.columnOrder);
@@ -1050,7 +1054,7 @@ class BaseTaskListCloudComponent extends DataTableSchema {
1050
1054
  });
1051
1055
  }
1052
1056
  ngAfterContentInit() {
1053
- this.retrieveTasksPreferences();
1057
+ this.appNameSubject$.next(this.appName);
1054
1058
  }
1055
1059
  isListEmpty() {
1056
1060
  return !this.rows || this.rows.length === 0;