From b988f09465cfa3b665f20b8d4222f35e26c51997 Mon Sep 17 00:00:00 2001 From: VitoAlbano Date: Thu, 14 Nov 2024 17:14:40 +0000 Subject: [PATCH] [MIGRATION] - fixed build and lint --- .../services/saved-searches.service.spec.ts | 1 - .../common/services/saved-searches.service.ts | 5 - .../content-metadata-header.component.ts | 2 +- .../components/document-list.component.html | 6 +- .../empty-search-result.component.html | 2 +- .../components/search-control.component.html | 3 +- .../search-filter-chips.component.html | 2 +- .../search-filter-menu-card.component.html | 6 +- .../search/components/search.component.html | 3 +- .../services/base-query-builder.service.ts | 17 ---- .../lib/tree/components/tree.component.html | 6 +- .../file-uploading-list.component.html | 3 +- .../upload-drag-area.component.html | 2 +- .../components/alfresco-viewer.component.html | 10 +- lib/core/src/lib/auth/oidc/auth.module.ts | 19 +++- lib/core/src/lib/testing/noop-auth.module.ts | 3 +- .../buttons-menu/buttons-menu.component.html | 8 +- .../components/app-details-cloud.component.ts | 3 - .../components/app-list-cloud.component.html | 3 +- .../components/app-list-cloud.component.ts | 3 - .../services/apps-process-cloud.service.ts | 1 - .../form-cloud-custom-outcomes.component.ts | 2 +- .../form/components/form-cloud.component.html | 5 +- .../components/form-cloud.component.spec.ts | 1 - .../form/components/form-cloud.component.ts | 1 - .../properties-viewer-wrapper.component.ts | 2 +- .../lib/form/services/form-cloud.service.ts | 7 -- .../form-definition-selector-cloud.service.ts | 2 - .../components/group-cloud.component.html | 2 +- .../components/group-cloud.component.spec.ts | 3 - .../components/people-cloud.component.html | 2 +- .../components/people-cloud.component.spec.ts | 4 - .../people/services/identity-user.service.ts | 2 - .../edit-process-filter-cloud.component.ts | 4 - .../process-filters-cloud.component.ts | 9 -- .../services/process-filter-cloud.service.ts | 18 ---- .../process-list-cloud.component.html | 4 +- .../process-list-cloud.component.spec.ts | 2 +- .../process-list-cloud.component.ts | 95 +++++++++---------- .../services/process-list-cloud.service.ts | 6 +- .../process-task-list-cloud.service.ts | 1 - .../process/services/process-cloud.service.ts | 4 - .../start-process-cloud.component.html | 3 +- .../start-process-cloud.component.spec.ts | 1 - .../services/start-process-cloud.service.ts | 6 -- .../local-preference-cloud.service.ts | 5 - .../task-list-cloud.service.interface.ts | 2 - .../services/user-preference-cloud.service.ts | 5 - .../lib/task/services/task-cloud.service.ts | 14 --- .../base-edit-task-filter-cloud.component.ts | 1 - .../edit-task-filter-cloud.component.spec.ts | 1 - .../service-task-filters-cloud.component.ts | 4 - .../task-assignment-filter.component.spec.ts | 1 - .../task-filters-cloud.component.ts | 4 - .../service-task-filter-cloud.service.ts | 15 --- .../services/task-filter-cloud.service.ts | 18 ---- .../components/task-form-cloud.component.html | 6 +- .../components/task-header-cloud.component.ts | 2 - .../base-task-list-cloud.component.html | 2 +- .../base-task-list-cloud.component.ts | 5 +- .../service-task-list-cloud.service.ts | 3 - .../services/task-list-cloud.service.ts | 2 - .../src/lib/app-list/apps-list.component.html | 3 +- .../src/lib/app-list/apps-list.component.ts | 5 - .../process-attachment-list.component.html | 2 +- .../task-attachment-list.component.html | 2 +- .../form/form-custom-outcomes.component.ts | 2 +- .../src/lib/form/form.component.html | 5 +- .../src/lib/form/form.component.ts | 2 - .../services/activiti-alfresco.service.ts | 3 - .../src/lib/form/services/editor.service.ts | 4 - .../src/lib/form/services/model.service.ts | 7 -- .../form/services/process-content.service.ts | 15 --- .../services/process-definition.service.ts | 4 - .../lib/form/services/task-form.service.ts | 7 -- .../src/lib/form/services/task.service.ts | 3 - .../form/start-form/start-form.component.html | 2 +- .../attach-file-widget-dialog.service.ts | 1 - .../form/widgets/document/content.widget.ts | 1 - .../models/dynamic-table.widget.model.ts | 2 +- .../people-search-field.component.spec.ts | 4 +- .../services/comment-process.service.ts | 2 - .../process-filters.component.ts | 8 -- .../process-list/process-list.component.html | 4 +- .../process-list/process-list.component.ts | 4 - .../start-process.component.spec.ts | 1 - .../services/process-filter.service.ts | 8 -- .../process-list/services/process.service.ts | 15 --- .../src/lib/services/apps-process.service.ts | 2 - .../lib/services/people-process.service.ts | 7 -- .../src/lib/services/task-comments.service.ts | 2 - .../task-filters/task-filters.component.ts | 9 -- .../task-form/task-form.component.html | 5 +- .../task-header/task-header.component.ts | 13 --- .../task-list/task-list.component.html | 4 +- .../task-list/task-list.component.ts | 5 - .../task-list/services/task-filter.service.ts | 11 --- .../task-list/services/tasklist.service.ts | 20 ---- 98 files changed, 120 insertions(+), 458 deletions(-) diff --git a/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts b/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts index e34e95cb6f5..97b4dd5bcd0 100644 --- a/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts +++ b/lib/content-services/src/lib/common/services/saved-searches.service.spec.ts @@ -39,7 +39,6 @@ describe('SavedSearchesService', () => { /** * Creates a stub with Promise returning a Blob - * * @returns Promise with Blob */ function createBlob() { diff --git a/lib/content-services/src/lib/common/services/saved-searches.service.ts b/lib/content-services/src/lib/common/services/saved-searches.service.ts index 9f82ec1f376..c3f0b590623 100644 --- a/lib/content-services/src/lib/common/services/saved-searches.service.ts +++ b/lib/content-services/src/lib/common/services/saved-searches.service.ts @@ -53,7 +53,6 @@ export class SavedSearchesService { /** * Gets a list of saved searches by user. - * * @returns SavedSearch list containing user saved searches */ getSavedSearches(): Observable { @@ -76,7 +75,6 @@ export class SavedSearchesService { /** * Saves a new search into state and updates state. If there are less than 5 searches, * it will be pushed on first place, if more it will be pushed to 6th place. - * * @param newSaveSearch object { name: string, description: string, encodedUrl: string } * @returns NodeEntry */ @@ -113,7 +111,6 @@ export class SavedSearchesService { /** * Replace Save Search with new one and also updates the state. - * * @param updatedSavedSearch - updated Save Search * @returns NodeEntry */ @@ -140,7 +137,6 @@ export class SavedSearchesService { /** * Deletes Save Search and update state. - * * @param deletedSavedSearch - Save Search to delete * @returns NodeEntry */ @@ -171,7 +167,6 @@ export class SavedSearchesService { /** * Reorders saved search place - * * @param previousIndex - previous index of saved search * @param currentIndex - new index of saved search */ diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata-header.component.ts b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata-header.component.ts index 9c92a76833b..58a7c0217d0 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata-header.component.ts +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata-header.component.ts @@ -48,7 +48,7 @@ import { TranslateModule } from '@ngx-translate/core'; {{ expanded ? 'expand_more' : 'chevron_right' }} - + ` }) diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.html b/lib/content-services/src/lib/document-list/components/document-list.component.html index f7f46b3f693..e63bdae3cfe 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.html +++ b/lib/content-services/src/lib/document-list/components/document-list.component.html @@ -48,7 +48,7 @@ - + @@ -58,7 +58,7 @@ error

{{ 'ADF-DOCUMENT-LIST.NO_PERMISSION' | translate }}

- + @@ -72,7 +72,7 @@ [color]="'primary'" [mode]="'indeterminate'" /> - + diff --git a/lib/content-services/src/lib/search/components/empty-search-result.component.html b/lib/content-services/src/lib/search/components/empty-search-result.component.html index 18b0bb114f1..40de9570cb4 100644 --- a/lib/content-services/src/lib/search/components/empty-search-result.component.html +++ b/lib/content-services/src/lib/search/components/empty-search-result.component.html @@ -1,3 +1,3 @@
- +
diff --git a/lib/content-services/src/lib/search/components/search-control.component.html b/lib/content-services/src/lib/search/components/search-control.component.html index b3f3317beb4..a3dbe33f865 100644 --- a/lib/content-services/src/lib/search/components/search-control.component.html +++ b/lib/content-services/src/lib/search/components/search-control.component.html @@ -50,8 +50,7 @@ *ngIf="data?.list?.entries.length === 0"> - + *ngIf="isNoSearchTemplatePresent() else defaultNoResult" />

{{ 'SEARCH.RESULTS.NONE' | translate:{searchTerm: searchTerm} }}

diff --git a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.html b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.html index aba89558cde..91e96430d0f 100644 --- a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.html +++ b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.html @@ -15,5 +15,5 @@ - + diff --git a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-menu-card/search-filter-menu-card.component.html b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-menu-card/search-filter-menu-card.component.html index 46d36869542..c44c824abdd 100644 --- a/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-menu-card/search-filter-menu-card.component.html +++ b/lib/content-services/src/lib/search/components/search-filter-chips/search-filter-menu-card/search-filter-menu-card.component.html @@ -1,6 +1,6 @@
- +
diff --git a/lib/content-services/src/lib/search/components/search.component.html b/lib/content-services/src/lib/search/components/search.component.html index d6e64b04ce4..13dc78e0232 100644 --- a/lib/content-services/src/lib/search/components/search.component.html +++ b/lib/content-services/src/lib/search/components/search.component.html @@ -2,6 +2,5 @@ [ngClass]="_classList" #panel> - + [ngTemplateOutletContext]="{ $implicit: results }" />
diff --git a/lib/content-services/src/lib/search/services/base-query-builder.service.ts b/lib/content-services/src/lib/search/services/base-query-builder.service.ts index 42ca177c295..e2719f5b093 100644 --- a/lib/content-services/src/lib/search/services/base-query-builder.service.ts +++ b/lib/content-services/src/lib/search/services/base-query-builder.service.ts @@ -199,7 +199,6 @@ export abstract class BaseQueryBuilderService { /** * Adds a facet bucket to a field. - * * @param field The target field * @param bucket Bucket to add */ @@ -216,7 +215,6 @@ export abstract class BaseQueryBuilderService { /** * Gets the buckets currently added to a field - * * @param field The target fields * @returns Bucket array */ @@ -226,7 +224,6 @@ export abstract class BaseQueryBuilderService { /** * Removes an existing bucket from a field. - * * @param field The target field * @param bucket Bucket to remove */ @@ -239,7 +236,6 @@ export abstract class BaseQueryBuilderService { /** * Adds a filter query to the current query. - * * @param query Query string to add */ addFilterQuery(query: string): void { @@ -253,7 +249,6 @@ export abstract class BaseQueryBuilderService { /** * Removes an existing filter query. - * * @param query The query to remove */ removeFilterQuery(query: string): void { @@ -264,7 +259,6 @@ export abstract class BaseQueryBuilderService { /** * Gets a facet query by label. - * * @param label Label of the query * @returns Facet query data */ @@ -280,7 +274,6 @@ export abstract class BaseQueryBuilderService { /** * Gets a facet field by label. - * * @param label Label of the facet field * @returns Facet field data */ @@ -306,7 +299,6 @@ export abstract class BaseQueryBuilderService { /** * Builds the current query and triggers the `updated` event. - * * @param queryBody query settings */ update(queryBody?: SearchRequest): void { @@ -316,7 +308,6 @@ export abstract class BaseQueryBuilderService { /** * Builds and executes the current query. - * * @param updateQueryParams whether query params should be updated with encoded query * @param queryBody query settings */ @@ -356,7 +347,6 @@ export abstract class BaseQueryBuilderService { /** * Builds the current query. - * * @returns The finished query */ buildQuery(): SearchRequest { @@ -397,7 +387,6 @@ export abstract class BaseQueryBuilderService { /** * Gets the primary sorting definition. - * * @returns The primary sorting definition */ getPrimarySorting(): SearchSortingDefinition { @@ -409,7 +398,6 @@ export abstract class BaseQueryBuilderService { /** * Gets all pre-configured sorting options that users can choose from. - * * @returns Pre-configured sorting options */ getSortingOptions(): SearchSortingDefinition[] { @@ -418,7 +406,6 @@ export abstract class BaseQueryBuilderService { /** * Gets the query group. - * * @param query Target query * @returns Query group */ @@ -428,7 +415,6 @@ export abstract class BaseQueryBuilderService { /** * Checks if FacetQueries has been defined - * * @returns True if defined, false otherwise */ get hasFacetQueries(): boolean { @@ -437,7 +423,6 @@ export abstract class BaseQueryBuilderService { /** * Checks if FacetIntervals has been defined - * * @returns True if defined, false otherwise */ get hasFacetIntervals(): boolean { @@ -558,7 +543,6 @@ export abstract class BaseQueryBuilderService { /** * Encloses a label name with double quotes if it contains whitespace characters. - * * @param configLabel Original label text * @returns Label, possibly with quotes if it contains spaces */ @@ -591,7 +575,6 @@ export abstract class BaseQueryBuilderService { /** * Builds search query with provided user query, executes query, encodes latest filter config and navigates to search. - * * @param query user query to search for * @param searchUrl search url to navigate to */ diff --git a/lib/content-services/src/lib/tree/components/tree.component.html b/lib/content-services/src/lib/tree/components/tree.component.html index 80914b510bf..bb38c407a71 100644 --- a/lib/content-services/src/lib/tree/components/tree.component.html +++ b/lib/content-services/src/lib/tree/components/tree.component.html @@ -99,8 +99,7 @@ - + [ngTemplateOutletContext]="{ node: node }" /> @@ -109,8 +108,7 @@ - - + diff --git a/lib/content-services/src/lib/upload/components/file-uploading-list.component.html b/lib/content-services/src/lib/upload/components/file-uploading-list.component.html index 91a4d358d88..0b0e0f821ec 100644 --- a/lib/content-services/src/lib/upload/components/file-uploading-list.component.html +++ b/lib/content-services/src/lib/upload/components/file-uploading-list.component.html @@ -2,6 +2,5 @@ - + [ngForTemplate]="template" /> diff --git a/lib/content-services/src/lib/upload/components/upload-drag-area.component.html b/lib/content-services/src/lib/upload/components/upload-drag-area.component.html index f3381efed44..aeec28ce4d7 100644 --- a/lib/content-services/src/lib/upload/components/upload-drag-area.component.html +++ b/lib/content-services/src/lib/upload/components/upload-drag-area.component.html @@ -3,5 +3,5 @@ (folderEntityDropped)="onFolderEntityDropped($event)" (upload-files)="onUploadFiles($any($event))" dropzone="" webkitdropzone="*" #droparea> - + diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html index 3dc32a94433..220061cbe10 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html @@ -33,23 +33,23 @@ (submitFile)="onSubmitFile($event)"> - + - + - + - + - + diff --git a/lib/core/src/lib/auth/oidc/auth.module.ts b/lib/core/src/lib/auth/oidc/auth.module.ts index a510faf669d..c21b9123565 100644 --- a/lib/core/src/lib/auth/oidc/auth.module.ts +++ b/lib/core/src/lib/auth/oidc/auth.module.ts @@ -15,10 +15,9 @@ * limitations under the License. */ -import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core'; +import { APP_INITIALIZER, inject, ModuleWithProviders, NgModule, InjectionToken } from '@angular/core'; import { AUTH_CONFIG, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc'; import { AuthenticationService } from '../services/authentication.service'; -import { StorageService } from '../../common/services/storage.service'; import { AuthModuleConfig, AUTH_MODULE_CONFIG } from './auth-config'; import { authConfigFactory, AuthConfigService } from './auth-config.service'; import { AuthRoutingModule } from './auth-routing.module'; @@ -27,9 +26,16 @@ import { RedirectAuthService } from './redirect-auth.service'; import { AuthenticationConfirmationComponent } from './view/authentication-confirmation/authentication-confirmation.component'; import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { TokenInterceptor } from './token.interceptor'; +import { StorageService } from '../../common/services/storage.service'; + +export const JWT_STORAGE_SERVICE = new InjectionToken('JWT_STORAGE_SERVICE', { + providedIn: 'root', + factory: () => inject(StorageService) +}); /** * Create a Login Factory function + * * @param redirectService auth redirect service * @returns a factory function */ @@ -37,11 +43,18 @@ export function loginFactory(redirectService: RedirectAuthService): () => Promis return () => redirectService.init(); } +/** + * @returns current instance of OAuthStorage + */ +export function oauthStorageFactory(): OAuthStorage { + return inject(JWT_STORAGE_SERVICE); +} + @NgModule({ declarations: [AuthenticationConfirmationComponent], imports: [AuthRoutingModule, OAuthModule.forRoot()], providers: [ - { provide: OAuthStorage, useExisting: StorageService }, + { provide: OAuthStorage, useFactory: oauthStorageFactory }, { provide: AuthenticationService }, { provide: AUTH_CONFIG, diff --git a/lib/core/src/lib/testing/noop-auth.module.ts b/lib/core/src/lib/testing/noop-auth.module.ts index ab94603b8d0..4bc4d8b8c06 100644 --- a/lib/core/src/lib/testing/noop-auth.module.ts +++ b/lib/core/src/lib/testing/noop-auth.module.ts @@ -16,7 +16,8 @@ */ import { APP_INITIALIZER, Injectable, NgModule } from '@angular/core'; -import { AuthModule, JWT_STORAGE_SERVICE, RedirectAuthService } from '../auth'; +import { AuthModule, JWT_STORAGE_SERVICE } from '../auth/oidc/auth.module'; +import { RedirectAuthService } from '../auth/oidc/redirect-auth.service'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { AppConfigService, StoragePrefixFactory } from '../app-config'; diff --git a/lib/insights/src/lib/analytics-process/components/buttons-menu/buttons-menu.component.html b/lib/insights/src/lib/analytics-process/components/buttons-menu/buttons-menu.component.html index 0a16cee0ee3..f095e09b80a 100644 --- a/lib/insights/src/lib/analytics-process/components/buttons-menu/buttons-menu.component.html +++ b/lib/insights/src/lib/analytics-process/components/buttons-menu/buttons-menu.component.html @@ -4,17 +4,15 @@ more_vert - - +
- - +
- + diff --git a/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.ts b/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.ts index 93493f96a47..82e6acd14d4 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-details-cloud.component.ts @@ -35,7 +35,6 @@ export class AppDetailsCloudComponent { /** * Pass the selected app as next - * * @param app application model */ onSelectApp(app: ApplicationInstanceModel): void { @@ -44,7 +43,6 @@ export class AppDetailsCloudComponent { /** * Get application instance theme - * * @returns the name of the theme */ getTheme(): string { @@ -53,7 +51,6 @@ export class AppDetailsCloudComponent { /** * Get application instance icon - * * @returns the name of the icon */ getIcon(): string { diff --git a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.html b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.html index 7c08f82b4d9..ded3c2eefcc 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.html +++ b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.html @@ -23,8 +23,7 @@
- + class="adf-custom-empty-template" /> ' + template: '' }) export class FormCustomOutcomesComponent {} diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html index 52af230b343..b78ed3aa691 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.html @@ -1,6 +1,5 @@
- - +
/> - +