@alfresco/adf-process-services-cloud 9.2.0-35353847027 → 9.2.0-35585925590
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.
|
@@ -3,7 +3,7 @@ import { inject, Injectable, InjectionToken, EventEmitter, DestroyRef, Output, I
|
|
|
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
5
|
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,
|
|
6
|
+
import { map, take, switchMap, catchError, distinctUntilChanged, filter, tap, finalize, debounceTime, shareReplay, mergeMap, expand, reduce, mapTo, concatMap } from 'rxjs/operators';
|
|
7
7
|
import { AlfrescoApiService, NodeAction, ContentNodeSelectorComponent, NodesApiService, ContentService, ContentNodeSelectorPanelService, NewVersionUploaderService, NewVersionUploaderDataAction, ContentMetadataComponent, AlfrescoViewerComponent } from '@alfresco/adf-content-services';
|
|
8
8
|
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
|
9
9
|
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -1479,15 +1479,20 @@ class TaskListCloudComponent extends BaseTaskListCloudComponent {
|
|
|
1479
1479
|
this.rows = [];
|
|
1480
1480
|
this.isReloadingSubject$ = new BehaviorSubject(false);
|
|
1481
1481
|
this.isLoading$ = combineLatest([this.isLoadingPreferences$, this.isReloadingSubject$]).pipe(map(([isLoadingPreferences, isReloading]) => isLoadingPreferences || isReloading));
|
|
1482
|
+
// incremented on every explicit reload() so it always refetches, even when the computed request is unchanged
|
|
1483
|
+
this.reloadNonce = 0;
|
|
1482
1484
|
this.fetchProcessesTrigger$ = new Subject();
|
|
1483
|
-
combineLatest([this.isLoadingPreferences
|
|
1484
|
-
.pipe(
|
|
1485
|
+
combineLatest([this.isLoadingPreferences$.pipe(distinctUntilChanged()), this.isColumnSchemaCreated$, this.fetchProcessesTrigger$])
|
|
1486
|
+
.pipe(filter(([isLoadingPreferences, isColumnSchemaCreated]) => !isLoadingPreferences && !!isColumnSchemaCreated), map(([, , reloadNonce]) => {
|
|
1487
|
+
const requestNode = this.searchApiMethod === 'POST' ? this.createTaskListRequestNode() : this.createRequestNode();
|
|
1488
|
+
return { reloadNonce, requestNode, requestKey: JSON.stringify(requestNode) };
|
|
1489
|
+
}),
|
|
1490
|
+
// skip identical requests triggered by schema/preference re-emissions, but always refetch on an explicit reload()
|
|
1491
|
+
distinctUntilChanged((previous, current) => previous.reloadNonce === current.reloadNonce && previous.requestKey === current.requestKey), tap(() => this.isReloadingSubject$.next(true)), switchMap(({ requestNode }) => {
|
|
1485
1492
|
if (this.searchApiMethod === 'POST') {
|
|
1486
|
-
const requestNode = this.createTaskListRequestNode();
|
|
1487
1493
|
return this.taskListCloudService.fetchTaskList(requestNode).pipe(take(1));
|
|
1488
1494
|
}
|
|
1489
1495
|
else {
|
|
1490
|
-
const requestNode = this.createRequestNode();
|
|
1491
1496
|
this.requestNode = requestNode;
|
|
1492
1497
|
return this.taskListCloudService.getTaskByRequest(requestNode);
|
|
1493
1498
|
}
|
|
@@ -1513,7 +1518,7 @@ class TaskListCloudComponent extends BaseTaskListCloudComponent {
|
|
|
1513
1518
|
}
|
|
1514
1519
|
reload() {
|
|
1515
1520
|
this.isReloadingSubject$.next(true);
|
|
1516
|
-
this.fetchProcessesTrigger$.next();
|
|
1521
|
+
this.fetchProcessesTrigger$.next(++this.reloadNonce);
|
|
1517
1522
|
}
|
|
1518
1523
|
createTaskListRequestNode() {
|
|
1519
1524
|
const requestNode = {
|