diff --git a/.github/workflows/release-branch.yml b/.github/workflows/release-branch.yml index f4be76f60b3..26fbcc53006 100644 --- a/.github/workflows/release-branch.yml +++ b/.github/workflows/release-branch.yml @@ -123,12 +123,21 @@ jobs: with: dry-run-flag: ${{ inputs.dry-run-flag }} - uses: ./.github/actions/download-node-modules-and-artifacts - - name: build libraries + - name: Set libraries versions run: | set -u; ./scripts/update-version.sh -gnu || exit 1; + - name: Set migrations + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + const setMigrations = require('./scripts/github/release/set-migrations.js'); + setMigrations(); + - name: Build libraries + run: | npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache npx nx affected $NX_CALCULATION_FLAGS --target=pretheme + npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 name: release libraries GH registry with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09a598dadbe..b8e7a691441 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -182,12 +182,21 @@ jobs: with: dry-run-flag: ${{ inputs.dry-run-flag }} - uses: ./.github/actions/download-node-modules-and-artifacts - - name: build libraries + - name: Set libraries versions run: | set -u; ./scripts/github/build/bumpversion.sh + - name: Set migrations + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 + with: + script: | + const setMigrations = require('./scripts/github/release/set-migrations.js'); + setMigrations(); + - name: build libraries + run: | npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache npx nx affected $NX_CALCULATION_FLAGS --target=pretheme + npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 name: release libraries GH registry with: diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts index 0f1e8225a2a..66d1d0e3fc7 100644 --- a/demo-shell/src/app/app.module.ts +++ b/demo-shell/src/app/app.module.ts @@ -131,7 +131,8 @@ import { CoreAutomationService } from '../testing/automation.service'; SearchFilterChipsComponent ], providers: [ - { provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production + {provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production + CoreAutomationService, provideTranslations('app', 'resources') ], bootstrap: [AppComponent] diff --git a/demo-shell/src/app/components/app-layout/app-layout.component.ts b/demo-shell/src/app/components/app-layout/app-layout.component.ts index 6a0a041b50c..38402d384ba 100644 --- a/demo-shell/src/app/components/app-layout/app-layout.component.ts +++ b/demo-shell/src/app/components/app-layout/app-layout.component.ts @@ -16,7 +16,7 @@ */ import { Component, ViewEncapsulation } from '@angular/core'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; @Component({ templateUrl: './app-layout.component.html', diff --git a/demo-shell/src/app/components/file-view/file-view.module.ts b/demo-shell/src/app/components/file-view/file-view.module.ts index a5ab81a6647..a7a835cff31 100644 --- a/demo-shell/src/app/components/file-view/file-view.module.ts +++ b/demo-shell/src/app/components/file-view/file-view.module.ts @@ -36,7 +36,6 @@ const routes: Routes = [ CoreModule, ContentModule, InfoDrawerModule, - ContentModule, ContentDirectiveModule, ContentMetadataModule, VersionManagerModule diff --git a/demo-shell/src/app/components/process-service/process-service.component.ts b/demo-shell/src/app/components/process-service/process-service.component.ts index 531e8dee10b..491907d6443 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.ts +++ b/demo-shell/src/app/components/process-service/process-service.component.ts @@ -18,6 +18,7 @@ // eslint-disable-next-line import { AfterViewInit, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation, EventEmitter, Output } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Pagination, UserProcessInstanceFilterRepresentation, ScriptFilesApi, UserTaskFilterRepresentation } from '@alfresco/js-api'; import { FORM_FIELD_VALIDATORS, @@ -26,7 +27,6 @@ import { AppConfigService, PaginationComponent, UserPreferenceValues, - AlfrescoApiService, UserPreferencesService, NotificationService } from '@alfresco/adf-core'; diff --git a/demo-shell/src/app/components/settings/host-settings.component.ts b/demo-shell/src/app/components/settings/host-settings.component.ts index d5891f2c142..1b9d094c7d5 100644 --- a/demo-shell/src/app/components/settings/host-settings.component.ts +++ b/demo-shell/src/app/components/settings/host-settings.component.ts @@ -17,9 +17,10 @@ import { Component, EventEmitter, Output, ViewEncapsulation, OnInit, Input } from '@angular/core'; import { Validators, UntypedFormGroup, UntypedFormBuilder, UntypedFormControl } from '@angular/forms'; -import { AppConfigService, AppConfigValues, StorageService, AlfrescoApiService, AuthenticationService } from '@alfresco/adf-core'; +import { AppConfigService, AppConfigValues, StorageService, AuthenticationService } from '@alfresco/adf-core'; import { ENTER } from '@angular/cdk/keycodes'; import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; export const HOST_REGEX = '^(http|https)://.*[^/]$'; diff --git a/demo-shell/src/testing/automation.service.ts b/demo-shell/src/testing/automation.service.ts index b7471b27965..c6bb5597b87 100644 --- a/demo-shell/src/testing/automation.service.ts +++ b/demo-shell/src/testing/automation.service.ts @@ -15,9 +15,10 @@ * limitations under the License. */ +import { AppConfigService, UserPreferencesService, StorageService, AuthenticationService } from '@alfresco/adf-core'; import { Injectable } from '@angular/core'; -import { AppConfigService, AlfrescoApiService, StorageService, UserPreferencesService, AuthenticationService } from '@alfresco/adf-core'; import { DemoForm } from './demo-form.mock'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; @Injectable({ providedIn: 'root' diff --git a/docs/README.md b/docs/README.md index ad25423a9b5..79a832794bf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -194,7 +194,7 @@ A collection of Angular components for generic use. | Name | Description | Source link | | ---- | ----------- | -------- | | [APS Alfresco Content Service](core/services/activiti-alfresco.service.md) | Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS). | [Source](../lib/process-services/src/lib/form/services/activiti-alfresco.service.ts) | -| [Alfresco Api Service](core/services/alfresco-api.service.md) | Provides access to an initialized AlfrescoJSApi instance. | [Source](../lib/core/src/lib/services/alfresco-api.service.ts) | +| [Alfresco Api Service](core/services/alfresco-api.service.md) | Provides access to an initialized AlfrescoJSApi instance. | [Source](lib/content-services/src/lib/services/alfresco-api.service.ts) | | [App Config service](core/services/app-config.service.md) | Supports app configuration settings, stored server side. | [Source](../lib/core/src/lib/app-config/app-config.service.ts) | | [Apps Process service](core/services/apps-process.service.md) | Gets details of the Process Services apps that are deployed for the user. | [Source](../lib/process-services/src/lib/services/apps-process.service.ts) | | [Auth Guard Bpm service](core/services/auth-guard-bpm.service.md) | Adds authentication with Process Services to a route within the app. | [Source](../lib/core/src/lib/auth/guard/auth-guard-bpm.service.ts) | diff --git a/docs/breaking-changes/breaking-change-6.10.0-7.0.0.md b/docs/breaking-changes/breaking-change-6.10.0-7.0.0.md new file mode 100644 index 00000000000..c6a40363c69 --- /dev/null +++ b/docs/breaking-changes/breaking-change-6.10.0-7.0.0.md @@ -0,0 +1,24 @@ +--- +Title: Breaking changes, 6.10.0 -> 7.0.0 +--- + +# Breaking changes, 6.10.0 -> 7.0.0 + +This document lists all the deprecated ADF v2.x components that were removed for v3.0.0: + +- [PR-9317](https://github.com/Alfresco/alfresco-ng2-components/pull/9317) Move alfresco js-API and AlfrescoApi service out from the core + + Move `AlfrescoApiServiceMock` and `AlfrescoApiServiceMock` from `core` library to `content-services`, These libraries are content related therefore should not live in `core` + + To mitigate this change, we can run migration: + + ``` + npx nx migrate @alfresco/adf-core@7.0.0 + npx nx migrate --run-migrations + ``` + + Or for pure angular repository: + + ``` + npx ng update @alfresco/adf-core@7.0.0 + ``` diff --git a/docs/core/pipes/localized-date.pipe.md b/docs/core/pipes/localized-date.pipe.md index 1937b3e4851..1399bd9f203 100644 --- a/docs/core/pipes/localized-date.pipe.md +++ b/docs/core/pipes/localized-date.pipe.md @@ -25,7 +25,7 @@ Converts a date to a given format and locale. ## Details -The pipe takes a date and formats it and localizes it so the date is displayed in the proper format for the region. It uses the [Angular Date Pipe](https://angular.io/api/common/DatePipe#custom-format-options) so all the pre-defined and custom formats can be used. +The pipe takes a date and formats it and localizes it so the date is displayed in the proper format for the region. It uses the [Angular Date Pipe](https://angular.io/api/common/DatePipe#custom-format-options) so all the pre-defined and custom formats can be used. To localize the dates in your application, you will need to add the specific locale file for your region in order to use it. Read more about internationalization [here](https://angular.io/guide/i18n#i18n-pipes). @@ -58,4 +58,4 @@ You can overwrite the default values of this pipe by adding these properties to | defaultDateTimeFormat | string | The format to apply to date-time values | | defaultLocale | string | The locale id to apply | -This configuration overwrites the values in the [localized date pipe](../../core/pipes/localized-date.pipe.md) as well as other components to have more consistency across your app. However, you can still overwrite these values any time by using the pipe in your code. +This configuration overwrites the values in the [localized date pipe](../../core/pipes/localized-date.pipe.md) as well as other components to have more consistency across your app. However, you can still overwrite these values any time by using the pipe in your code. diff --git a/docs/core/services/alfresco-api.service.md b/docs/core/services/alfresco-api.service.md index f93d7bd0c07..36f0b26b0e3 100644 --- a/docs/core/services/alfresco-api.service.md +++ b/docs/core/services/alfresco-api.service.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2019-01-17 --- -# [Alfresco Api Service](../../../lib/core/src/lib/services/alfresco-api.service.ts "Defined in alfresco-api.service.ts") +# [Alfresco Api Service](lib/content-services/src/lib/services/alfresco-api.service.ts "Defined in alfresco-api.service.ts") Provides access to an initialized **AlfrescoJSApi** instance. diff --git a/lib/core/src/lib/api-factories/alfresco-api-no-auth.service.ts b/lib/content-services/src/lib/api-factories/alfresco-api-no-auth.service.ts similarity index 91% rename from lib/core/src/lib/api-factories/alfresco-api-no-auth.service.ts rename to lib/content-services/src/lib/api-factories/alfresco-api-no-auth.service.ts index 619935c03b9..1530ccbd47c 100644 --- a/lib/core/src/lib/api-factories/alfresco-api-no-auth.service.ts +++ b/lib/content-services/src/lib/api-factories/alfresco-api-no-auth.service.ts @@ -16,10 +16,9 @@ */ import { AdfHttpClient } from '@alfresco/adf-core/api'; -import { StorageService } from '../common/services/storage.service'; +import { StorageService, AppConfigService } from '@alfresco/adf-core'; import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api'; import { Injectable } from '@angular/core'; -import { AppConfigService } from '../app-config'; import { AlfrescoApiService } from '../services/alfresco-api.service'; @Injectable() diff --git a/lib/core/src/lib/api-factories/alfresco-api-v2-loader.service.ts b/lib/content-services/src/lib/api-factories/alfresco-api-v2-loader.service.ts similarity index 92% rename from lib/core/src/lib/api-factories/alfresco-api-v2-loader.service.ts rename to lib/content-services/src/lib/api-factories/alfresco-api-v2-loader.service.ts index faeca421208..353f62ce80d 100644 --- a/lib/core/src/lib/api-factories/alfresco-api-v2-loader.service.ts +++ b/lib/content-services/src/lib/api-factories/alfresco-api-v2-loader.service.ts @@ -17,9 +17,8 @@ import { AlfrescoApiConfig } from '@alfresco/js-api'; import { Injectable } from '@angular/core'; -import { AppConfigService, AppConfigValues } from '../app-config/app-config.service'; -import { AlfrescoApiService } from '../services/alfresco-api.service'; -import { StorageService } from '../common/services/storage.service'; +import { AppConfigService, AppConfigValues, StorageService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; /** * Create a factory to resolve an api service instance diff --git a/lib/content-services/src/lib/api-factories/alfresco-api.module.ts b/lib/content-services/src/lib/api-factories/alfresco-api.module.ts new file mode 100644 index 00000000000..06a7c59a3af --- /dev/null +++ b/lib/content-services/src/lib/api-factories/alfresco-api.module.ts @@ -0,0 +1,34 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { APP_INITIALIZER, NgModule } from '@angular/core'; +import { AlfrescoApiNoAuthService } from './alfresco-api-no-auth.service'; +import { AlfrescoApiLoaderService, createAlfrescoApiInstance } from '../api-factories/alfresco-api-v2-loader.service'; +import { AlfrescoApiService } from '../services'; + +@NgModule({ + providers :[ + { provide: AlfrescoApiService, useClass: AlfrescoApiNoAuthService }, + { + provide: APP_INITIALIZER, + useFactory: createAlfrescoApiInstance, + deps: [ AlfrescoApiLoaderService ], + multi: true + } + ] +}) +export class AlfrescoApiModule { } diff --git a/lib/core/src/lib/services/index.ts b/lib/content-services/src/lib/api-factories/index.ts similarity index 100% rename from lib/core/src/lib/services/index.ts rename to lib/content-services/src/lib/api-factories/index.ts diff --git a/lib/content-services/src/lib/api-factories/public-api.ts b/lib/content-services/src/lib/api-factories/public-api.ts new file mode 100644 index 00000000000..9e783226510 --- /dev/null +++ b/lib/content-services/src/lib/api-factories/public-api.ts @@ -0,0 +1,21 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './alfresco-api-no-auth.service'; +export * from './alfresco-api-v2-loader.service'; + +export * from './alfresco-api.module'; diff --git a/lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts index 6f4023c654d..17a947ca5ac 100644 --- a/lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts +++ b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.spec.ts @@ -16,10 +16,10 @@ */ import { TestBed } from '@angular/core/testing'; -import { AlfrescoApiService } from '@alfresco/adf-core'; import { AspectListService } from './aspect-list.service'; import { AspectPaging, AspectsApi, AspectEntry } from '@alfresco/js-api'; import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { AlfrescoApiService } from '../../services'; const stdAspect1: AspectEntry = { entry: { id: 'std:standardAspectOne', description: 'Standard Aspect One', title: 'StandardAspectOne' } }; const stdAspect2: AspectEntry = { entry: { id: 'std:standardAspectTwo', description: 'Standard Aspect Two', title: 'StandardAspectTwo' } }; diff --git a/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts index fd2e0a98e5b..e33b0c1395a 100644 --- a/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts +++ b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts @@ -16,7 +16,8 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { AppConfigService } from '@alfresco/adf-core'; import { from, Observable, of, zip } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; import { AspectEntry, AspectPaging, AspectsApi } from '@alfresco/js-api'; diff --git a/lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts b/lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts index 174f4177fec..98ca2827299 100644 --- a/lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts +++ b/lib/content-services/src/lib/aspect-list/services/node-aspect.service.spec.ts @@ -23,7 +23,7 @@ import { ContentTestingModule } from '../../testing/content.testing.module'; import { NodeAspectService } from './node-aspect.service'; import { DialogAspectListService } from './dialog-aspect-list.service'; import { CardViewContentUpdateService } from '../../common/services/card-view-content-update.service'; -import { TagService } from '@alfresco/adf-content-services'; +import { TagService } from '../../tag'; describe('NodeAspectService', () => { let dialogAspectListService: DialogAspectListService; diff --git a/lib/content-services/src/lib/category/services/category-tree-datasource.service.spec.ts b/lib/content-services/src/lib/category/services/category-tree-datasource.service.spec.ts index b318d337cc1..414eb5215a8 100644 --- a/lib/content-services/src/lib/category/services/category-tree-datasource.service.spec.ts +++ b/lib/content-services/src/lib/category/services/category-tree-datasource.service.spec.ts @@ -17,11 +17,12 @@ import { fakeAsync, TestBed } from '@angular/core/testing'; import { CategoryService } from '../services/category.service'; -import { CategoryNode, CategoryTreeDatasourceService } from '@alfresco/adf-content-services'; import { CategoryServiceMock } from '../mock/category-mock.service'; import { TreeNodeType, TreeResponse } from '../../tree'; import { EMPTY, of } from 'rxjs'; import { Pagination } from '@alfresco/js-api'; +import { CategoryTreeDatasourceService } from './category-tree-datasource.service'; +import { CategoryNode } from '../models/category-node.interface'; describe('CategoryTreeDatasourceService', () => { let categoryTreeDatasourceService: CategoryTreeDatasourceService; diff --git a/lib/content-services/src/lib/category/services/category.service.ts b/lib/content-services/src/lib/category/services/category.service.ts index ba9a8b8fffb..78f640c45fa 100644 --- a/lib/content-services/src/lib/category/services/category.service.ts +++ b/lib/content-services/src/lib/category/services/category.service.ts @@ -16,7 +16,8 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService, AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; import { CategoriesApi, CategoryBody, CategoryEntry, CategoryLinkBody, CategoryPaging, ResultSetPaging, SearchApi } from '@alfresco/js-api'; import { from, Observable } from 'rxjs'; diff --git a/lib/content-services/src/lib/common/services/content.service.ts b/lib/content-services/src/lib/common/services/content.service.ts index 9e5db1ec79a..7898099fab8 100644 --- a/lib/content-services/src/lib/common/services/content.service.ts +++ b/lib/content-services/src/lib/common/services/content.service.ts @@ -18,9 +18,10 @@ import { Injectable } from '@angular/core'; import { ContentApi, Node, NodeEntry } from '@alfresco/js-api'; import { Subject } from 'rxjs'; -import { AlfrescoApiService, AuthenticationService, ThumbnailService } from '@alfresco/adf-core'; +import { AuthenticationService, ThumbnailService } from '@alfresco/adf-core'; import { PermissionsEnum } from '../models/permissions.enum'; import { AllowableOperationsEnum } from '../models/allowable-operations.enum'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; export interface FolderCreatedEvent { name: string; diff --git a/lib/content-services/src/lib/common/services/discovery-api.service.ts b/lib/content-services/src/lib/common/services/discovery-api.service.ts index 99b97965ab0..3a8ab25974c 100644 --- a/lib/content-services/src/lib/common/services/discovery-api.service.ts +++ b/lib/content-services/src/lib/common/services/discovery-api.service.ts @@ -18,21 +18,15 @@ import { Injectable } from '@angular/core'; import { from, Observable, throwError, Subject } from 'rxjs'; import { catchError, map, switchMap, filter, take } from 'rxjs/operators'; -import { - RepositoryInfo, - SystemPropertiesRepresentation, - DiscoveryApi, - AboutApi, - SystemPropertiesApi -} from '@alfresco/js-api'; +import { RepositoryInfo, SystemPropertiesRepresentation, DiscoveryApi, AboutApi, SystemPropertiesApi } from '@alfresco/js-api'; -import { AlfrescoApiService, BpmProductVersionModel, AuthenticationService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { BpmProductVersionModel, AuthenticationService } from '@alfresco/adf-core'; @Injectable({ providedIn: 'root' }) export class DiscoveryApiService { - private _discoveryApi: DiscoveryApi; get discoveryApi(): DiscoveryApi { this._discoveryApi = this._discoveryApi ?? new DiscoveryApi(this.alfrescoApiService.getInstance()); @@ -44,34 +38,28 @@ export class DiscoveryApiService { */ ecmProductInfo$ = new Subject(); - constructor( - private authenticationService: AuthenticationService, - private alfrescoApiService: AlfrescoApiService - ) { + constructor(private authenticationService: AuthenticationService, private alfrescoApiService: AlfrescoApiService) { this.authenticationService.onLogin.subscribe(() => { - this.alfrescoApiService.alfrescoApiInitialized.pipe( - filter(() => this.authenticationService.isEcmLoggedIn()), - take(1), - switchMap(() => this.getEcmProductInfo()) - ) + this.alfrescoApiService.alfrescoApiInitialized + .pipe( + filter(() => this.authenticationService.isEcmLoggedIn()), + take(1), + switchMap(() => this.getEcmProductInfo()) + ) .subscribe((info) => this.ecmProductInfo$.next(info)); - }); } - /** * Gets product information for Content Services. * * @returns ProductVersionModel containing product details */ getEcmProductInfo(): Observable { - - return from(this.discoveryApi.getRepositoryInformation()) - .pipe( - map((res) => res.entry.repository), - catchError((err) => throwError(err)) - ); + return from(this.discoveryApi.getRepositoryInformation()).pipe( + map((res) => res.entry.repository), + catchError((err) => throwError(err)) + ); } /** @@ -82,25 +70,23 @@ export class DiscoveryApiService { getBpmProductInfo(): Observable { const aboutApi = new AboutApi(this.alfrescoApiService.getInstance()); - return from(aboutApi.getAppVersion()) - .pipe( - map((res) => new BpmProductVersionModel(res)), - catchError((err) => throwError(err)) - ); + return from(aboutApi.getAppVersion()).pipe( + map((res) => new BpmProductVersionModel(res)), + catchError((err) => throwError(err)) + ); } getBPMSystemProperties(): Observable { const systemPropertiesApi = new SystemPropertiesApi(this.alfrescoApiService.getInstance()); - return from(systemPropertiesApi.getProperties()) - .pipe( - map((res: any) => { - if ('string' === typeof (res)) { - throw new Error('Not valid response'); - } - return res; - }), - catchError((err) => throwError(err.error)) - ); + return from(systemPropertiesApi.getProperties()).pipe( + map((res: any) => { + if ('string' === typeof res) { + throw new Error('Not valid response'); + } + return res; + }), + catchError((err) => throwError(err.error)) + ); } } diff --git a/lib/content-services/src/lib/common/services/favorites-api.service.ts b/lib/content-services/src/lib/common/services/favorites-api.service.ts index 785ed0c08f7..4bd719652cd 100644 --- a/lib/content-services/src/lib/common/services/favorites-api.service.ts +++ b/lib/content-services/src/lib/common/services/favorites-api.service.ts @@ -18,7 +18,8 @@ import { Injectable } from '@angular/core'; import { FavoritesApi, NodePaging, FavoritePaging } from '@alfresco/js-api'; import { Observable, from, of } from 'rxjs'; -import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { UserPreferencesService } from '@alfresco/adf-core'; import { catchError } from 'rxjs/operators'; @Injectable({ diff --git a/lib/content-services/src/lib/common/services/nodes-api.service.ts b/lib/content-services/src/lib/common/services/nodes-api.service.ts index 14b05a5f552..5e2b670e6dd 100644 --- a/lib/content-services/src/lib/common/services/nodes-api.service.ts +++ b/lib/content-services/src/lib/common/services/nodes-api.service.ts @@ -18,9 +18,10 @@ import { Injectable } from '@angular/core'; import { NodeEntry, NodePaging, NodesApi, TrashcanApi, Node } from '@alfresco/js-api'; import { Subject, from, Observable, throwError } from 'rxjs'; -import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { UserPreferencesService } from '@alfresco/adf-core'; import { catchError, map } from 'rxjs/operators'; import { NodeMetadata } from '../models/node-metadata.model'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/common/services/people-content.service.spec.ts b/lib/content-services/src/lib/common/services/people-content.service.spec.ts index b34a3fea01b..811824a190b 100644 --- a/lib/content-services/src/lib/common/services/people-content.service.spec.ts +++ b/lib/content-services/src/lib/common/services/people-content.service.spec.ts @@ -16,12 +16,14 @@ */ import { fakeEcmUser } from '../mocks/ecm-user.service.mock'; -import { AlfrescoApiService, AlfrescoApiServiceMock, RedirectAuthService } from '@alfresco/adf-core'; +import { RedirectAuthService } from '@alfresco/adf-core'; import { PeopleContentQueryRequestModel, PeopleContentService } from './people-content.service'; import { TestBed } from '@angular/core/testing'; import { PersonPaging } from '@alfresco/js-api'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { EMPTY, of } from 'rxjs'; +import { AlfrescoApiService } from '../../services'; +import { AlfrescoApiServiceMock } from '../../mock'; export const fakeEcmUser2 = { id: 'another-fake-id', diff --git a/lib/content-services/src/lib/common/services/people-content.service.ts b/lib/content-services/src/lib/common/services/people-content.service.ts index d642fad4020..95a89294fc0 100644 --- a/lib/content-services/src/lib/common/services/people-content.service.ts +++ b/lib/content-services/src/lib/common/services/people-content.service.ts @@ -17,11 +17,12 @@ import { Injectable } from '@angular/core'; import { from, Observable, of } from 'rxjs'; -import { AlfrescoApiService, AuthenticationService } from '@alfresco/adf-core'; +import { AuthenticationService } from '@alfresco/adf-core'; import { map, tap } from 'rxjs/operators'; import { Pagination, PeopleApi, PersonBodyCreate, PersonBodyUpdate } from '@alfresco/js-api'; import { EcmUserModel } from '../models/ecm-user.model'; import { ContentService } from './content.service'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; export interface PeopleContentQueryResponse { pagination: Pagination; diff --git a/lib/content-services/src/lib/common/services/rendition.service.ts b/lib/content-services/src/lib/common/services/rendition.service.ts index e0fc85e1333..03d239dc50d 100644 --- a/lib/content-services/src/lib/common/services/rendition.service.ts +++ b/lib/content-services/src/lib/common/services/rendition.service.ts @@ -17,7 +17,8 @@ import { Injectable } from '@angular/core'; import { ContentApi, RenditionEntry, RenditionPaging, RenditionsApi, VersionsApi } from '@alfresco/js-api'; -import { AlfrescoApiService, Track, TranslationService, ViewUtilService } from '@alfresco/adf-core'; +import { Track, TranslationService, ViewUtilService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/common/services/rendition.services.spec.ts b/lib/content-services/src/lib/common/services/rendition.services.spec.ts index 4ce38870940..9bc3b44d98d 100644 --- a/lib/content-services/src/lib/common/services/rendition.services.spec.ts +++ b/lib/content-services/src/lib/common/services/rendition.services.spec.ts @@ -16,9 +16,10 @@ */ import { TestBed } from '@angular/core/testing'; -import { AlfrescoApiService, TranslationService, ViewUtilService } from '@alfresco/adf-core'; +import { TranslationService, ViewUtilService } from '@alfresco/adf-core'; import { Rendition, RenditionEntry, RenditionPaging, RenditionsApi } from '@alfresco/js-api'; -import { RenditionService } from '@alfresco/adf-content-services'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { RenditionService } from './rendition.service'; const getRenditionEntry = (status: Rendition.StatusEnum): RenditionEntry => ({ entry: { diff --git a/lib/content-services/src/lib/common/services/sites.service.ts b/lib/content-services/src/lib/common/services/sites.service.ts index a48a595bcac..058e24c993b 100644 --- a/lib/content-services/src/lib/common/services/sites.service.ts +++ b/lib/content-services/src/lib/common/services/sites.service.ts @@ -17,7 +17,6 @@ import { Injectable } from '@angular/core'; import { from, Observable } from 'rxjs'; -import { AlfrescoApiService } from '@alfresco/adf-core'; import { Node, SiteBodyCreate, @@ -32,6 +31,7 @@ import { SitePaging, SitesApi } from '@alfresco/js-api'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/common/services/upload.service.ts b/lib/content-services/src/lib/common/services/upload.service.ts index e31729568f0..600beac1026 100644 --- a/lib/content-services/src/lib/common/services/upload.service.ts +++ b/lib/content-services/src/lib/common/services/upload.service.ts @@ -20,10 +20,11 @@ import { Minimatch } from 'minimatch'; import { Subject } from 'rxjs'; import { FileUploadCompleteEvent, FileUploadDeleteEvent, FileUploadErrorEvent, FileUploadEvent } from '../events/file.event'; import { FileModel, FileUploadProgress, FileUploadStatus } from '../models/file.model'; -import { AppConfigService, AlfrescoApiService } from '@alfresco/adf-core'; +import { AppConfigService } from '@alfresco/adf-core'; import { filter } from 'rxjs/operators'; import { DiscoveryApiService } from '../../common/services/discovery-api.service'; import { NodeBodyCreate, NodesApi, UploadApi, VersionsApi } from '@alfresco/js-api'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; const MIN_CANCELLABLE_FILE_SIZE = 1000000; const MAX_CANCELLABLE_FILE_PERCENTAGE = 50; diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts index 886f34500d9..3c137c955e5 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.spec.ts @@ -38,14 +38,6 @@ import { TranslateModule } from '@ngx-translate/core'; import { CardViewContentUpdateService } from '../../../common/services/card-view-content-update.service'; import { PropertyGroup } from '../../interfaces/property-group.interface'; import { PropertyDescriptorsService } from '../../services/property-descriptors.service'; -import { - CategoriesManagementComponent, - CategoriesManagementMode, - CategoryService, - TagsCreatorComponent, - TagsCreatorMode, - TagService -} from '@alfresco/adf-content-services'; import { MatExpansionPanel } from '@angular/material/expansion'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { HttpClientModule } from '@angular/common/http'; @@ -55,6 +47,8 @@ import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatTooltipModule } from '@angular/material/tooltip'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatChipHarness } from '@angular/material/chips/testing'; +import { TagService } from '../../../tag/services/tag.service'; +import { CategoryService } from '../../../category/services/category.service'; describe('ContentMetadataComponent', () => { let component: ContentMetadataComponent; diff --git a/lib/content-services/src/lib/content-metadata/services/property-descriptors.service.ts b/lib/content-services/src/lib/content-metadata/services/property-descriptors.service.ts index e91310a598d..58be7372d33 100644 --- a/lib/content-services/src/lib/content-metadata/services/property-descriptors.service.ts +++ b/lib/content-services/src/lib/content-metadata/services/property-descriptors.service.ts @@ -16,7 +16,7 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { Observable, defer, forkJoin } from 'rxjs'; import { PropertyGroup, PropertyGroupContainer } from '../interfaces/content-metadata.interfaces'; import { map } from 'rxjs/operators'; diff --git a/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts b/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts index 15c3e375bbd..c438cc9b6a3 100644 --- a/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts +++ b/lib/content-services/src/lib/content-node-share/content-node-share.directive.ts @@ -21,7 +21,7 @@ import { NodeEntry, NodesApi } from '@alfresco/js-api'; import { ShareDialogComponent } from './content-node-share.dialog'; import { Observable, from, Subject } from 'rxjs'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { takeUntil } from 'rxjs/operators'; @Directive({ diff --git a/lib/content-services/src/lib/content-node-share/services/shared-links-api.service.ts b/lib/content-services/src/lib/content-node-share/services/shared-links-api.service.ts index 1eb7c42cbbe..2e515036c2c 100644 --- a/lib/content-services/src/lib/content-node-share/services/shared-links-api.service.ts +++ b/lib/content-services/src/lib/content-node-share/services/shared-links-api.service.ts @@ -18,8 +18,9 @@ import { Injectable } from '@angular/core'; import { NodePaging, SharedLinkBodyCreate, SharedLinkEntry, SharedlinksApi } from '@alfresco/js-api'; import { Observable, from, of, Subject } from 'rxjs'; -import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { UserPreferencesService } from '@alfresco/adf-core'; import { catchError } from 'rxjs/operators'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/content-type/content-type.service.ts b/lib/content-services/src/lib/content-type/content-type.service.ts index ac582c2f8ed..d209749bce2 100644 --- a/lib/content-services/src/lib/content-type/content-type.service.ts +++ b/lib/content-services/src/lib/content-type/content-type.service.ts @@ -17,9 +17,10 @@ import { TypeEntry, TypePaging, TypesApi } from '@alfresco/js-api'; import { Injectable } from '@angular/core'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { from, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; + @Injectable({ providedIn: 'root' }) diff --git a/lib/content-services/src/lib/content.module.ts b/lib/content-services/src/lib/content.module.ts index e4ab61c6f90..540732711d5 100644 --- a/lib/content-services/src/lib/content.module.ts +++ b/lib/content-services/src/lib/content.module.ts @@ -47,10 +47,12 @@ import { NewVersionUploaderDialogComponent } from './new-version-uploader'; import { VersionCompatibilityDirective } from './version-compatibility'; import { CONTENT_UPLOAD_DIRECTIVES } from './upload'; import { TreeViewComponent } from './tree-view'; +import { AlfrescoApiLoaderService, AlfrescoApiModule, createAlfrescoApiInstance } from './api-factories'; @NgModule({ imports: [ ...CONTENT_PIPES, + AlfrescoApiModule, CoreModule, ...CONTENT_TAG_DIRECTIVES, CommonModule, @@ -84,6 +86,7 @@ import { TreeViewComponent } from './tree-view'; exports: [ ...CONTENT_PIPES, ...CONTENT_TAG_DIRECTIVES, + AlfrescoApiModule, DocumentListModule, ...CONTENT_UPLOAD_DIRECTIVES, SearchModule, @@ -126,6 +129,12 @@ export class ContentModule { useFactory: contentAuthLoaderFactory, deps: [ContentAuthLoaderService], multi: true + }, + { + provide: APP_INITIALIZER, + useFactory: createAlfrescoApiInstance, + deps: [AlfrescoApiLoaderService], + multi: true } ] }; diff --git a/lib/content-services/src/lib/dialogs/download-zip/download-zip.dialog.stories.ts b/lib/content-services/src/lib/dialogs/download-zip/download-zip.dialog.stories.ts index 1de937e1ccb..ef2680ed8fb 100644 --- a/lib/content-services/src/lib/dialogs/download-zip/download-zip.dialog.stories.ts +++ b/lib/content-services/src/lib/dialogs/download-zip/download-zip.dialog.stories.ts @@ -16,7 +16,6 @@ */ import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular'; -import { AlfrescoApiService } from '@alfresco/adf-core'; import { MatButtonModule } from '@angular/material/button'; import { DownloadZipDialogStorybookComponent } from './download-zip.dialog.stories.component'; import { AlfrescoApiServiceMock, ContentApiMock, DownloadZipMockService, NodesApiMock } from './mock/download-zip-service.mock'; @@ -27,6 +26,7 @@ import { MatDialogModule } from '@angular/material/dialog'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { importProvidersFrom } from '@angular/core'; import { CoreStoryModule } from '../../../../../core/src/public-api'; +import { AlfrescoApiService } from '../../services'; export default { component: DownloadZipDialogStorybookComponent, diff --git a/lib/content-services/src/lib/dialogs/download-zip/services/download-zip.service.ts b/lib/content-services/src/lib/dialogs/download-zip/services/download-zip.service.ts index b0d1fe87589..4e1c972e1f1 100755 --- a/lib/content-services/src/lib/dialogs/download-zip/services/download-zip.service.ts +++ b/lib/content-services/src/lib/dialogs/download-zip/services/download-zip.service.ts @@ -18,7 +18,7 @@ import { DownloadEntry, DownloadBodyCreate, DownloadsApi } from '@alfresco/js-api'; import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/dialogs/library/library.dialog.ts b/lib/content-services/src/lib/dialogs/library/library.dialog.ts index e1bb853c8dd..ebae76c3194 100644 --- a/lib/content-services/src/lib/dialogs/library/library.dialog.ts +++ b/lib/content-services/src/lib/dialogs/library/library.dialog.ts @@ -28,7 +28,7 @@ import { } from '@angular/forms'; import { MatDialogModule, MatDialogRef } from '@angular/material/dialog'; import { QueriesApi, SiteBodyCreate, SiteEntry, SitePaging } from '@alfresco/js-api'; -import { AlfrescoApiService, NotificationService } from '@alfresco/adf-core'; +import { NotificationService } from '@alfresco/adf-core'; import { debounceTime, finalize, mergeMap, takeUntil } from 'rxjs/operators'; import { SitesService } from '../../common/services/sites.service'; import { CommonModule } from '@angular/common'; @@ -38,6 +38,7 @@ import { MatInputModule } from '@angular/material/input'; import { AutoFocusDirective } from '../../directives'; import { MatRadioModule } from '@angular/material/radio'; import { MatButtonModule } from '@angular/material/button'; +import { AlfrescoApiService } from '../../services'; @Component({ selector: 'adf-library-dialog', diff --git a/lib/content-services/src/lib/dialogs/node-lock/node-lock.dialog.ts b/lib/content-services/src/lib/dialogs/node-lock/node-lock.dialog.ts index 0c35fda4f52..9fb80e4e982 100644 --- a/lib/content-services/src/lib/dialogs/node-lock/node-lock.dialog.ts +++ b/lib/content-services/src/lib/dialogs/node-lock/node-lock.dialog.ts @@ -20,7 +20,6 @@ import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/materia import { ReactiveFormsModule, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { differenceInSeconds } from 'date-fns'; import { NodeBodyLock, Node, NodeEntry, NodesApi } from '@alfresco/js-api'; -import { AlfrescoApiService } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; import { TranslateModule } from '@ngx-translate/core'; import { MatCheckboxModule } from '@angular/material/checkbox'; @@ -28,6 +27,7 @@ import { MatFormFieldModule } from '@angular/material/form-field'; import { MatDatetimepickerModule } from '@mat-datetimepicker/core'; import { MatInputModule } from '@angular/material/input'; import { MatButtonModule } from '@angular/material/button'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Component({ selector: 'adf-node-lock', diff --git a/lib/content-services/src/lib/directives/library-favorite.directive.ts b/lib/content-services/src/lib/directives/library-favorite.directive.ts index 0e2c79fa93b..96b78dcefcd 100644 --- a/lib/content-services/src/lib/directives/library-favorite.directive.ts +++ b/lib/content-services/src/lib/directives/library-favorite.directive.ts @@ -17,7 +17,7 @@ import { Directive, HostListener, Input, OnChanges, Output, EventEmitter, SimpleChanges } from '@angular/core'; import { FavoriteBodyCreate, FavoritesApi } from '@alfresco/js-api'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { LibraryEntity } from '../interfaces/library-entity.interface'; @Directive({ diff --git a/lib/content-services/src/lib/directives/library-membership.directive.ts b/lib/content-services/src/lib/directives/library-membership.directive.ts index a78b8b83e24..86494626f62 100644 --- a/lib/content-services/src/lib/directives/library-membership.directive.ts +++ b/lib/content-services/src/lib/directives/library-membership.directive.ts @@ -18,7 +18,7 @@ import { Directive, EventEmitter, HostListener, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; import { SiteEntry, SiteMembershipRequestBodyCreate, SiteMembershipRequestEntry, SitesApi } from '@alfresco/js-api'; import { BehaviorSubject, from, Observable } from 'rxjs'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { LibraryMembershipToggleEvent } from '../interfaces/library-membership-toggle-event.interface'; import { LibraryMembershipErrorEvent } from '../interfaces/library-membership-error-event.interface'; import { VersionCompatibilityService } from '../version-compatibility/version-compatibility.service'; diff --git a/lib/content-services/src/lib/directives/node-delete.directive.ts b/lib/content-services/src/lib/directives/node-delete.directive.ts index 9aca4c96817..ad33ad1385f 100644 --- a/lib/content-services/src/lib/directives/node-delete.directive.ts +++ b/lib/content-services/src/lib/directives/node-delete.directive.ts @@ -20,8 +20,9 @@ import { Directive, ElementRef, EventEmitter, HostListener, Input, OnChanges, Output } from '@angular/core'; import { NodeEntry, Node, DeletedNodeEntry, DeletedNode, TrashcanApi, NodesApi } from '@alfresco/js-api'; import { Observable, forkJoin, from, of } from 'rxjs'; -import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core'; +import { TranslationService } from '@alfresco/adf-core'; import { map, catchError, retry } from 'rxjs/operators'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; interface ProcessedNodeData { entry: Node | DeletedNode; diff --git a/lib/content-services/src/lib/directives/node-download.directive.spec.ts b/lib/content-services/src/lib/directives/node-download.directive.spec.ts index bbc6bd3551e..e6d7fb8c648 100755 --- a/lib/content-services/src/lib/directives/node-download.directive.spec.ts +++ b/lib/content-services/src/lib/directives/node-download.directive.spec.ts @@ -19,11 +19,11 @@ import { TestBed, ComponentFixture } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; import { Component, DebugElement, ViewChild } from '@angular/core'; -import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core'; import { NodeDownloadDirective } from './node-download.directive'; import { ContentDirectiveModule } from '@alfresco/adf-content-services'; import { HttpClientTestingModule } from '@angular/common/http/testing'; - +import { AlfrescoApiService } from '../services'; +import { AlfrescoApiServiceMock } from '../mock'; @Component({ template: '
' }) diff --git a/lib/content-services/src/lib/directives/node-download.directive.ts b/lib/content-services/src/lib/directives/node-download.directive.ts index 23dc1cd7b6c..e083e5d7151 100755 --- a/lib/content-services/src/lib/directives/node-download.directive.ts +++ b/lib/content-services/src/lib/directives/node-download.directive.ts @@ -17,9 +17,10 @@ import { Directive, Input, HostListener } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; -import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core'; +import { DownloadService } from '@alfresco/adf-core'; import { DownloadZipDialogComponent } from '../dialogs/download-zip/download-zip.dialog'; import { ContentApi, NodeEntry, VersionEntry } from '@alfresco/js-api'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; /** * Directive selectors without adf- prefix will be deprecated on 3.0.0 diff --git a/lib/content-services/src/lib/directives/node-favorite.directive.spec.ts b/lib/content-services/src/lib/directives/node-favorite.directive.spec.ts index 921448e9b6e..ccdf375ff2b 100644 --- a/lib/content-services/src/lib/directives/node-favorite.directive.spec.ts +++ b/lib/content-services/src/lib/directives/node-favorite.directive.spec.ts @@ -18,8 +18,10 @@ import { SimpleChange } from '@angular/core'; import { fakeAsync, TestBed, tick } from '@angular/core/testing'; import { NodeFavoriteDirective } from './node-favorite.directive'; -import { AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core'; +import { AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core'; import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { AlfrescoApiService } from '../services'; +import { AlfrescoApiServiceMock } from '../mock'; describe('NodeFavoriteDirective', () => { let directive: NodeFavoriteDirective; diff --git a/lib/content-services/src/lib/directives/node-favorite.directive.ts b/lib/content-services/src/lib/directives/node-favorite.directive.ts index 8fad4044e78..daee2149f43 100644 --- a/lib/content-services/src/lib/directives/node-favorite.directive.ts +++ b/lib/content-services/src/lib/directives/node-favorite.directive.ts @@ -21,7 +21,7 @@ import { Directive, EventEmitter, HostListener, Input, OnChanges, Output, Simple import { FavoriteBodyCreate, NodeEntry, SharedLinkEntry, Node, SharedLink, FavoritesApi } from '@alfresco/js-api'; import { Observable, from, forkJoin, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; @Directive({ standalone: true, diff --git a/lib/content-services/src/lib/directives/node-restore.directive.ts b/lib/content-services/src/lib/directives/node-restore.directive.ts index fec1c82083b..25cb0ced3cb 100644 --- a/lib/content-services/src/lib/directives/node-restore.directive.ts +++ b/lib/content-services/src/lib/directives/node-restore.directive.ts @@ -21,8 +21,9 @@ import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/c import { TrashcanApi, DeletedNodeEntry, DeletedNodesPaging } from '@alfresco/js-api'; import { Observable, forkJoin, from, of } from 'rxjs'; import { tap, mergeMap, map, catchError } from 'rxjs/operators'; -import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core'; +import { TranslationService } from '@alfresco/adf-core'; import { RestoreMessageModel } from '../interfaces/restore-message-model.interface'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; @Directive({ standalone: true, diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.ts b/lib/content-services/src/lib/document-list/components/document-list.component.ts index 5c159cad415..95624f88010 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.ts @@ -19,7 +19,6 @@ /* eslint-disable @typescript-eslint/naming-convention */ import { - AlfrescoApiService, AppConfigService, CustomEmptyContentTemplateDirective, CustomLoadingContentTemplateDirective, @@ -75,6 +74,7 @@ import { LockService } from '../services/lock.service'; import { ADF_DOCUMENT_PARENT_COMPONENT } from './document-list.token'; import { FileAutoDownloadComponent } from './file-auto-download/file-auto-download.component'; import { NodeEntityEvent, NodeEntryEvent } from './node.event'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; const BYTES_TO_MB_CONVERSION_VALUE = 1048576; diff --git a/lib/content-services/src/lib/document-list/services/custom-resources.service.ts b/lib/content-services/src/lib/document-list/services/custom-resources.service.ts index 0cd4c9778e1..d9da08abb46 100644 --- a/lib/content-services/src/lib/document-list/services/custom-resources.service.ts +++ b/lib/content-services/src/lib/document-list/services/custom-resources.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, PaginationModel } from '@alfresco/adf-core'; +import { PaginationModel } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { DeletedNodesPaging, SearchRequest, diff --git a/lib/content-services/src/lib/document-list/services/document-list.service.ts b/lib/content-services/src/lib/document-list/services/document-list.service.ts index 1819c55f3df..6f42781f937 100644 --- a/lib/content-services/src/lib/document-list/services/document-list.service.ts +++ b/lib/content-services/src/lib/document-list/services/document-list.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService, PaginationModel } from '@alfresco/adf-core'; +import { PaginationModel } from '@alfresco/adf-core'; import { NodesApiService } from '../../common/services/nodes-api.service'; import { Injectable } from '@angular/core'; import { Node, NodeEntry, NodePaging, NodesApi } from '@alfresco/js-api'; @@ -24,6 +24,7 @@ import { Observable, from, forkJoin } from 'rxjs'; import { map } from 'rxjs/operators'; import { DocumentListLoader } from '../interfaces/document-list-loader.interface'; import { CustomResourcesService } from './custom-resources.service'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; const ROOT_ID = '-root-'; diff --git a/lib/content-services/src/lib/document-list/services/node-actions.service.ts b/lib/content-services/src/lib/document-list/services/node-actions.service.ts index d1af60ff5d0..4e0ceb6b1f5 100644 --- a/lib/content-services/src/lib/document-list/services/node-actions.service.ts +++ b/lib/content-services/src/lib/document-list/services/node-actions.service.ts @@ -18,10 +18,11 @@ import { Injectable, Output, EventEmitter } from '@angular/core'; import { Node, NodeEntry } from '@alfresco/js-api'; import { Subject } from 'rxjs'; -import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core'; +import { DownloadService } from '@alfresco/adf-core'; import { MatDialog } from '@angular/material/dialog'; import { ContentService } from '../../common/services/content.service'; import { NodeDownloadDirective } from '../../directives/node-download.directive'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { DocumentListService } from './document-list.service'; import { ContentNodeDialogService } from '../../content-node-selector/content-node-dialog.service'; diff --git a/lib/content-services/src/lib/group/services/group.service.spec.ts b/lib/content-services/src/lib/group/services/group.service.spec.ts index 7a76d003de9..70ad7ec1dfc 100644 --- a/lib/content-services/src/lib/group/services/group.service.spec.ts +++ b/lib/content-services/src/lib/group/services/group.service.spec.ts @@ -17,8 +17,8 @@ import { TestBed } from '@angular/core/testing'; import { ContentTestingModule } from '../../testing/content.testing.module'; -import { GroupService } from '@alfresco/adf-content-services'; import { ContentIncludeQuery, GroupEntry } from '@alfresco/js-api'; +import { GroupService } from './group.service'; describe('GroupService', () => { let service: GroupService; @@ -83,12 +83,16 @@ describe('GroupService', () => { service.updateGroup(group.entry, opts).subscribe((groupEntry) => { expect(groupEntry).toEqual(returnedGroup); - expect(service.groupsApi.updateGroup).toHaveBeenCalledWith(group.entry.id, { - displayName: group.entry.displayName, - description: group.entry.description - }, { - include: ['description'] - }); + expect(service.groupsApi.updateGroup).toHaveBeenCalledWith( + group.entry.id, + { + displayName: group.entry.displayName, + description: group.entry.description + }, + { + include: ['description'] + } + ); done(); }); }); @@ -105,12 +109,16 @@ describe('GroupService', () => { description: '' } }); - expect(service.groupsApi.updateGroup).toHaveBeenCalledWith(group.entry.id, { - displayName: group.entry.displayName, - description: group.entry.description - }, { - include: ['description'] - }); + expect(service.groupsApi.updateGroup).toHaveBeenCalledWith( + group.entry.id, + { + displayName: group.entry.displayName, + description: group.entry.description + }, + { + include: ['description'] + } + ); done(); }); }); @@ -121,12 +129,16 @@ describe('GroupService', () => { service.updateGroup(group.entry, opts).subscribe((groupEntry) => { expect(groupEntry).toEqual(returnedGroup); - expect(service.groupsApi.updateGroup).toHaveBeenCalledWith(group.entry.id, { - displayName: group.entry.displayName, - description: group.entry.description - }, { - include: ['description'] - }); + expect(service.groupsApi.updateGroup).toHaveBeenCalledWith( + group.entry.id, + { + displayName: group.entry.displayName, + description: group.entry.description + }, + { + include: ['description'] + } + ); done(); }); }); diff --git a/lib/content-services/src/lib/group/services/group.service.ts b/lib/content-services/src/lib/group/services/group.service.ts index a59fbf0e037..0cab9e5434b 100644 --- a/lib/content-services/src/lib/group/services/group.service.ts +++ b/lib/content-services/src/lib/group/services/group.service.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; import { ContentIncludeQuery, Group, GroupEntry, GroupsApi } from '@alfresco/js-api'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { from, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/lib/core/src/lib/mock/alfresco-api.service.mock.ts b/lib/content-services/src/lib/mock/alfresco-api.service.mock.ts similarity index 90% rename from lib/core/src/lib/mock/alfresco-api.service.mock.ts rename to lib/content-services/src/lib/mock/alfresco-api.service.mock.ts index d2f490c0277..043dff72952 100644 --- a/lib/core/src/lib/mock/alfresco-api.service.mock.ts +++ b/lib/content-services/src/lib/mock/alfresco-api.service.mock.ts @@ -16,9 +16,8 @@ */ import { Injectable } from '@angular/core'; -import { AppConfigService } from '../app-config/app-config.service'; import { AlfrescoApiService } from '../services/alfresco-api.service'; -import { StorageService } from '../common/services/storage.service'; +import { AppConfigService, StorageService } from '@alfresco/adf-core'; @Injectable() export class AlfrescoApiServiceMock extends AlfrescoApiService { diff --git a/lib/content-services/src/lib/mock/public-api.ts b/lib/content-services/src/lib/mock/public-api.ts index 741402f7984..03479ba0e00 100644 --- a/lib/content-services/src/lib/mock/public-api.ts +++ b/lib/content-services/src/lib/mock/public-api.ts @@ -24,3 +24,4 @@ export * from './sites-dropdown.component.mock'; export * from './search-query.mock'; export * from './new-version-uploader.service.mock'; export * from './date-range-search-filter.mock'; +export * from './alfresco-api.service.mock'; diff --git a/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts b/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts index aa5ebfedf0a..4be45afccb8 100644 --- a/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts +++ b/lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { NewVersionUploaderDialogComponent } from './new-version-uploader.dialog'; import { VersionPaging, VersionsApi } from '@alfresco/js-api'; diff --git a/lib/content-services/src/lib/node-comments/services/node-comments.service.ts b/lib/content-services/src/lib/node-comments/services/node-comments.service.ts index 3c2c6ac5df9..f2c7ea956f3 100644 --- a/lib/content-services/src/lib/node-comments/services/node-comments.service.ts +++ b/lib/content-services/src/lib/node-comments/services/node-comments.service.ts @@ -15,12 +15,13 @@ * limitations under the License. */ -import { AlfrescoApiService, CommentModel, CommentsService, User } from '@alfresco/adf-core'; +import { CommentModel, CommentsService, User } from '@alfresco/adf-core'; import { CommentEntry, CommentsApi, Comment } from '@alfresco/js-api'; import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import { map } from 'rxjs/operators'; import { ContentService } from '../../common/services/content.service'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/permission-manager/components/pop-over.directive.spec.ts b/lib/content-services/src/lib/permission-manager/components/pop-over.directive.spec.ts index 4518981b5b3..461ac54d958 100644 --- a/lib/content-services/src/lib/permission-manager/components/pop-over.directive.spec.ts +++ b/lib/content-services/src/lib/permission-manager/components/pop-over.directive.spec.ts @@ -17,9 +17,9 @@ import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { PopOverDirective } from '@alfresco/adf-content-services'; import { By } from '@angular/platform-browser'; import { OverlayModule } from '@angular/cdk/overlay'; +import { PopOverDirective } from './pop-over.directive'; @Component({ standalone: true, diff --git a/lib/content-services/src/lib/permission-manager/services/node-permission.service.ts b/lib/content-services/src/lib/permission-manager/services/node-permission.service.ts index 7cb3046ba64..4cf316bfa10 100644 --- a/lib/content-services/src/lib/permission-manager/services/node-permission.service.ts +++ b/lib/content-services/src/lib/permission-manager/services/node-permission.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { TranslationService } from '@alfresco/adf-core'; import { NodesApiService } from '../../common/services/nodes-api.service'; import { EcmUserModel } from '../../common/models/ecm-user.model'; import { Group, GroupMemberPaging, GroupsApi, Node, PathElement, PermissionElement, SearchRequest } from '@alfresco/js-api'; diff --git a/lib/content-services/src/lib/prediction/services/prediction.service.ts b/lib/content-services/src/lib/prediction/services/prediction.service.ts index 020749f8199..e0011d78b28 100644 --- a/lib/content-services/src/lib/prediction/services/prediction.service.ts +++ b/lib/content-services/src/lib/prediction/services/prediction.service.ts @@ -16,9 +16,9 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService } from '@alfresco/adf-core'; import { PredictionsApi, PredictionPaging, ReviewStatus } from '@alfresco/js-api'; import { from, Observable } from 'rxjs'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' }) export class PredictionService { diff --git a/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.spec.ts b/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.spec.ts index da6c71d9b15..cf5d8217fba 100644 --- a/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.spec.ts +++ b/lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.spec.ts @@ -19,9 +19,9 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { ContentTestingModule } from '../../../testing/content.testing.module'; import { SearchFilterAutocompleteChipsComponent } from './search-filter-autocomplete-chips.component'; -import { TagService } from '@alfresco/adf-content-services'; import { EMPTY, of } from 'rxjs'; import { AutocompleteField } from '../../models/autocomplete-option.interface'; +import { TagService } from '../../../tag/services/tag.service'; describe('SearchFilterAutocompleteChipsComponent', () => { let component: SearchFilterAutocompleteChipsComponent; diff --git a/lib/content-services/src/lib/search/components/search-properties/search-properties.component.spec.ts b/lib/content-services/src/lib/search/components/search-properties/search-properties.component.spec.ts index 923a1d46fdb..563e3e96efa 100644 --- a/lib/content-services/src/lib/search/components/search-properties/search-properties.component.spec.ts +++ b/lib/content-services/src/lib/search/components/search-properties/search-properties.component.spec.ts @@ -20,10 +20,11 @@ import { SearchPropertiesComponent } from './search-properties.component'; import { ContentTestingModule } from '../../../testing/content.testing.module'; import { By } from '@angular/platform-browser'; import { MatOption } from '@angular/material/core'; -import { SearchChipAutocompleteInputComponent, SearchQueryBuilderService } from '@alfresco/adf-content-services'; import { FileSizeUnit } from './file-size-unit.enum'; import { FileSizeOperator } from './file-size-operator.enum'; import { SearchProperties } from './search-properties'; +import { SearchChipAutocompleteInputComponent } from '../search-chip-autocomplete-input'; +import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; describe('SearchPropertiesComponent', () => { let component: SearchPropertiesComponent; diff --git a/lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.spec.ts b/lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.spec.ts index ccd71a827ac..3e53f167c29 100644 --- a/lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.spec.ts +++ b/lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.spec.ts @@ -17,10 +17,11 @@ import { SearchSortingPickerComponent } from './search-sorting-picker.component'; import { SearchQueryBuilderService } from '../../services/search-query-builder.service'; -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AppConfigService } from '@alfresco/adf-core'; import { SearchConfiguration } from '../../models/search-configuration.interface'; import { TestBed } from '@angular/core/testing'; import { ContentTestingModule } from '../../../testing/content.testing.module'; +import { AlfrescoApiService } from '../../../services/alfresco-api.service'; describe('SearchSortingPickerComponent', () => { let queryBuilder: SearchQueryBuilderService; 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 c312fe7b3c6..6e729c2e118 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 @@ -16,7 +16,7 @@ */ import { Subject, Observable, from, ReplaySubject } from 'rxjs'; -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AppConfigService } from '@alfresco/adf-core'; import { SearchRequest, RequestFacetFields, @@ -35,6 +35,7 @@ import { SearchSortingDefinition } from '../models/search-sorting-definition.int import { FacetField } from '../models/facet-field.interface'; import { FacetFieldBucket } from '../models/facet-field-bucket.interface'; import { SearchForm } from '../models/search-form.interface'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; export abstract class BaseQueryBuilderService { private _searchApi: SearchApi; diff --git a/lib/content-services/src/lib/search/services/search-facet-filters.service.spec.ts b/lib/content-services/src/lib/search/services/search-facet-filters.service.spec.ts index 1ed7240433a..f9174eb0cc9 100644 --- a/lib/content-services/src/lib/search/services/search-facet-filters.service.spec.ts +++ b/lib/content-services/src/lib/search/services/search-facet-filters.service.spec.ts @@ -20,8 +20,9 @@ import { TestBed } from '@angular/core/testing'; import { SearchFacetFiltersService } from './search-facet-filters.service'; import { ContentTestingModule } from '../../testing/content.testing.module'; import { SearchQueryBuilderService } from './search-query-builder.service'; -import { CategoryService, FacetBucketSortBy, FacetBucketSortDirection } from '@alfresco/adf-content-services'; import { EMPTY, of } from 'rxjs'; +import { CategoryService } from '../../category/services/category.service'; +import { FacetBucketSortBy, FacetBucketSortDirection } from '../models/facet-field.interface'; describe('SearchFacetFiltersService', () => { let searchFacetFiltersService: SearchFacetFiltersService; @@ -31,12 +32,14 @@ describe('SearchFacetFiltersService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [ContentTestingModule], - providers: [{ - provide: CategoryService, - useValue: { - getCategory: () => EMPTY + providers: [ + { + provide: CategoryService, + useValue: { + getCategory: () => EMPTY + } } - }] + ] }); categoryService = TestBed.inject(CategoryService); @@ -67,17 +70,19 @@ describe('SearchFacetFiltersService', () => { }; const queries = [ - { label: 'q1', filterQuery: 'query1', metrics: [{value: {count: 1}}] }, - { label: 'q2', filterQuery: 'query2', metrics: [{value: {count: 1}}] } + { label: 'q1', filterQuery: 'query1', metrics: [{ value: { count: 1 } }] }, + { label: 'q2', filterQuery: 'query2', metrics: [{ value: { count: 1 } }] } ]; const data = { list: { context: { - facets: [{ - type: 'query', - label: 'label1', - buckets: queries - }] + facets: [ + { + type: 'query', + label: 'label1', + buckets: queries + } + ] } } }; @@ -104,19 +109,20 @@ describe('SearchFacetFiltersService', () => { }; const queries = [ - { label: 'q2', filterQuery: 'query2', metrics: [{value: {count: 1}}] }, - { label: 'q1', filterQuery: 'query1', metrics: [{value: {count: 1}}] }, - { label: 'q3', filterQuery: 'query3', metrics: [{value: {count: 1}}] } - + { label: 'q2', filterQuery: 'query2', metrics: [{ value: { count: 1 } }] }, + { label: 'q1', filterQuery: 'query1', metrics: [{ value: { count: 1 } }] }, + { label: 'q3', filterQuery: 'query3', metrics: [{ value: { count: 1 } }] } ]; const data = { list: { context: { - facets: [{ - type: 'query', - label: 'label1', - buckets: queries - }] + facets: [ + { + type: 'query', + label: 'label1', + buckets: queries + } + ] } } }; @@ -158,10 +164,12 @@ describe('SearchFacetFiltersService', () => { queryBuilder.config = { categories: [], - facetFields: { fields: [ + facetFields: { + fields: [ { label: 'f1', field: 'f1', mincount: 0 }, { label: 'f2', field: 'f2', mincount: 0 } - ]}, + ] + }, facetQueries: { queries: [] } @@ -189,9 +197,7 @@ describe('SearchFacetFiltersService', () => { it('should filter response facet fields based on search filter config method', () => { queryBuilder.config = { categories: [], - facetFields: { fields: [ - { label: 'f1', field: 'f1' } - ]}, + facetFields: { fields: [{ label: 'f1', field: 'f1' }] }, facetQueries: { queries: [] }, @@ -199,10 +205,13 @@ describe('SearchFacetFiltersService', () => { }; const initialFields: any = [ - { type: 'field', label: 'f1', buckets: [ - { label: 'firstLabel', display: 'firstLabel', metrics: [{value: {count: 5}}] }, - { label: 'secondLabel', display: 'secondLabel', metrics: [{value: {count: 5}}] }, - { label: 'thirdLabel', display: 'thirdLabel', metrics: [{value: {count: 5}}] } + { + type: 'field', + label: 'f1', + buckets: [ + { label: 'firstLabel', display: 'firstLabel', metrics: [{ value: { count: 5 } }] }, + { label: 'secondLabel', display: 'secondLabel', metrics: [{ value: { count: 5 } }] }, + { label: 'thirdLabel', display: 'thirdLabel', metrics: [{ value: { count: 5 } }] } ] } ]; @@ -239,10 +248,12 @@ describe('SearchFacetFiltersService', () => { queryBuilder.config = { categories: [], - facetFields: { fields: [ + facetFields: { + fields: [ { label: 'f1', field: 'f1' }, { label: 'f2', field: 'f2' } - ]}, + ] + }, facetQueries: { queries: [] } @@ -253,8 +264,8 @@ describe('SearchFacetFiltersService', () => { type: 'field', label: 'f1', buckets: [ - { label: 'b1', metrics: [{value: {count: 10}}] }, - { label: 'b2', metrics: [{value: {count: 1}}] } + { label: 'b1', metrics: [{ value: { count: 10 } }] }, + { label: 'b2', metrics: [{ value: { count: 1 } }] } ] }, { type: 'field', label: 'f2', buckets: [] } @@ -276,17 +287,28 @@ describe('SearchFacetFiltersService', () => { it('should fetch facet fields from response payload and update the existing bucket values', () => { queryBuilder.config = { categories: [], - facetFields: { fields: [ + facetFields: { + fields: [ { label: 'f1', field: 'f1' }, { label: 'f2', field: 'f2' } - ]}, + ] + }, facetQueries: { queries: [] } }; const initialFields: any = [ - { type: 'field', label: 'f1', buckets: { items: [{ label: 'b1', count: 10, filterQuery: 'filter' }, { label: 'b2', count: 1 }]} }, + { + type: 'field', + label: 'f1', + buckets: { + items: [ + { label: 'b1', count: 10, filterQuery: 'filter' }, + { label: 'b2', count: 1 } + ] + } + }, { type: 'field', label: 'f2', buckets: [] } ]; searchFacetFiltersService.responseFacets = initialFields; @@ -294,9 +316,14 @@ describe('SearchFacetFiltersService', () => { expect(searchFacetFiltersService.responseFacets[0].buckets.items[1].count).toEqual(1); const serverResponseFields: any = [ - { type: 'field', label: 'f1', buckets: - [{ label: 'b1', metrics: [{value: {count: 6}}], filterQuery: 'filter' }, - { label: 'b2', metrics: [{value: {count: 0}}] }] }, + { + type: 'field', + label: 'f1', + buckets: [ + { label: 'b1', metrics: [{ value: { count: 6 } }], filterQuery: 'filter' }, + { label: 'b2', metrics: [{ value: { count: 0 } }] } + ] + }, { type: 'field', label: 'f2', buckets: [] } ]; const data = { @@ -321,21 +348,25 @@ describe('SearchFacetFiltersService', () => { facetQueries: { queries: [] } }; - const firstCallFields: any = [{ - type: 'field', - label: 'f1', - buckets: [{ label: 'b1', metrics: [{value: {count: 10}}] }] - }]; - const firstCallData = { list: { context: { facets: firstCallFields }}}; + const firstCallFields: any = [ + { + type: 'field', + label: 'f1', + buckets: [{ label: 'b1', metrics: [{ value: { count: 10 } }] }] + } + ]; + const firstCallData = { list: { context: { facets: firstCallFields } } }; searchFacetFiltersService.onDataLoaded(firstCallData); expect(searchFacetFiltersService.responseFacets[0].buckets.items[0].count).toEqual(10); - const secondCallFields: any = [{ - type: 'field', - label: 'f1', - buckets: [{ label: 'b1', metrics: [{value: {count: 6}}] }] - }]; - const secondCallData = { list: { context: { facets: secondCallFields}}}; + const secondCallFields: any = [ + { + type: 'field', + label: 'f1', + buckets: [{ label: 'b1', metrics: [{ value: { count: 6 } }] }] + } + ]; + const secondCallData = { list: { context: { facets: secondCallFields } } }; searchFacetFiltersService.onDataLoaded(secondCallData); expect(searchFacetFiltersService.responseFacets[0].buckets.items[0].count).toEqual(6); }); @@ -346,25 +377,33 @@ describe('SearchFacetFiltersService', () => { categories: [], facetIntervals: { intervals: [ - { label: 'test_intervals1', field: 'f1', sets: [ - { label: 'interval1', start: 's1', end: 'e1'}, - { label: 'interval2', start: 's2', end: 'e2'} - ]}, - { label: 'test_intervals2', field: 'f2', sets: [ - { label: 'interval3', start: 's3', end: 'e3'}, - { label: 'interval4', start: 's4', end: 'e4'} - ]} + { + label: 'test_intervals1', + field: 'f1', + sets: [ + { label: 'interval1', start: 's1', end: 'e1' }, + { label: 'interval2', start: 's2', end: 'e2' } + ] + }, + { + label: 'test_intervals2', + field: 'f2', + sets: [ + { label: 'interval3', start: 's3', end: 'e3' }, + { label: 'interval4', start: 's4', end: 'e4' } + ] + } ] } }; const response1 = [ - { label: 'interval1', filterQuery: 'query1', metrics: [{ value: { count: 1 }}]}, - { label: 'interval2', filterQuery: 'query2', metrics: [{ value: { count: 2 }}]} + { label: 'interval1', filterQuery: 'query1', metrics: [{ value: { count: 1 } }] }, + { label: 'interval2', filterQuery: 'query2', metrics: [{ value: { count: 2 } }] } ]; const response2 = [ - { label: 'interval3', filterQuery: 'query3', metrics: [{ value: { count: 3 }}]}, - { label: 'interval4', filterQuery: 'query4', metrics: [{ value: { count: 4 }}]} + { label: 'interval3', filterQuery: 'query3', metrics: [{ value: { count: 3 } }] }, + { label: 'interval4', filterQuery: 'query4', metrics: [{ value: { count: 4 } }] } ]; const data = { list: { @@ -390,25 +429,35 @@ describe('SearchFacetFiltersService', () => { categories: [], facetIntervals: { intervals: [ - { label: 'test_intervals1', field: 'f1', mincount: 2, sets: [ - { label: 'interval1', start: 's1', end: 'e1'}, - { label: 'interval2', start: 's2', end: 'e2'} - ]}, - { label: 'test_intervals2', field: 'f2', mincount: 5, sets: [ - { label: 'interval3', start: 's3', end: 'e3'}, - { label: 'interval4', start: 's4', end: 'e4'} - ]} + { + label: 'test_intervals1', + field: 'f1', + mincount: 2, + sets: [ + { label: 'interval1', start: 's1', end: 'e1' }, + { label: 'interval2', start: 's2', end: 'e2' } + ] + }, + { + label: 'test_intervals2', + field: 'f2', + mincount: 5, + sets: [ + { label: 'interval3', start: 's3', end: 'e3' }, + { label: 'interval4', start: 's4', end: 'e4' } + ] + } ] } }; const response1 = [ - { label: 'interval1', filterQuery: 'query1', metrics: [{ value: { count: 1 }}]}, - { label: 'interval2', filterQuery: 'query2', metrics: [{ value: { count: 2 }}]} + { label: 'interval1', filterQuery: 'query1', metrics: [{ value: { count: 1 } }] }, + { label: 'interval2', filterQuery: 'query2', metrics: [{ value: { count: 2 } }] } ]; const response2 = [ - { label: 'interval3', filterQuery: 'query3', metrics: [{ value: { count: 3 }}]}, - { label: 'interval4', filterQuery: 'query4', metrics: [{ value: { count: 4 }}]} + { label: 'interval3', filterQuery: 'query3', metrics: [{ value: { count: 3 } }] }, + { label: 'interval4', filterQuery: 'query4', metrics: [{ value: { count: 4 } }] } ]; const data = { list: { @@ -443,14 +492,14 @@ describe('SearchFacetFiltersService', () => { }, facetFields: { fields: [ - { field: 'field1', label: 'Field 1', settings: { facetOrder: 200 }}, - { field: 'field2', label: 'Field 2', settings: { facetOrder: 400 }}, - { field: 'field3', label: 'Field 3', settings: { facetOrder: 500 }}, - { field: 'field4', label: 'Field 4', settings: { facetOrder: 100 }} + { field: 'field1', label: 'Field 1', settings: { facetOrder: 200 } }, + { field: 'field2', label: 'Field 2', settings: { facetOrder: 400 } }, + { field: 'field3', label: 'Field 3', settings: { facetOrder: 500 } }, + { field: 'field4', label: 'Field 4', settings: { facetOrder: 100 } } ] } }; - const queryBucketsMock = [{ label: 'q1', filterQuery: 'query1', metrics: [{value: {count: 1} }] }]; + const queryBucketsMock = [{ label: 'q1', filterQuery: 'query1', metrics: [{ value: { count: 1 } }] }]; const fieldBucketsMock = [{ label: 'b1', metrics: [{ value: { count: 10 } }] }]; const data = { list: { @@ -467,20 +516,20 @@ describe('SearchFacetFiltersService', () => { }; searchFacetFiltersService.onDataLoaded(data); - expect(searchFacetFiltersService.responseFacets.map(f => f.field)).toEqual(['field4', 'field1', 'Query 1', 'field2', 'field3']); + expect(searchFacetFiltersService.responseFacets.map((f) => f.field)).toEqual(['field4', 'field1', 'Query 1', 'field2', 'field3']); }); it('should load category names for cm:categories facet', () => { - const entry = {id: 'test-id-test', name: 'name', path: '/categories/General/Test Category/Subcategory'}; + const entry = { id: 'test-id-test', name: 'name', path: '/categories/General/Test Category/Subcategory' }; searchFacetFiltersService.responseFacets = null; - spyOn(categoryService, 'getCategory').and.returnValue(of({entry})); + spyOn(categoryService, 'getCategory').and.returnValue(of({ entry })); queryBuilder.config = { categories: [], facetFields: { fields: [ - {label: 'f1', field: 'f1', mincount: 0}, - {label: 'categories', field: 'cm:categories', mincount: 0} + { label: 'f1', field: 'f1', mincount: 0 }, + { label: 'categories', field: 'cm:categories', mincount: 0 } ] }, facetQueries: { @@ -489,12 +538,16 @@ describe('SearchFacetFiltersService', () => { }; const fields: any = [ - {type: 'field', label: 'f1', buckets: [{label: 'a1'}, {label: 'a2'}]}, + { type: 'field', label: 'f1', buckets: [{ label: 'a1' }, { label: 'a2' }] }, { - type: 'field', label: 'categories', buckets: [{ - label: `workspace://SpacesStore/${entry.id}`, - filterQuery: `cm:categories:"workspace://SpacesStore/${entry.id}"` - }] + type: 'field', + label: 'categories', + buckets: [ + { + label: `workspace://SpacesStore/${entry.id}`, + filterQuery: `cm:categories:"workspace://SpacesStore/${entry.id}"` + } + ] } ]; const data = { @@ -507,7 +560,7 @@ describe('SearchFacetFiltersService', () => { searchFacetFiltersService.onDataLoaded(data); - expect(categoryService.getCategory).toHaveBeenCalledWith(entry.id, { include: [ 'path' ]}); + expect(categoryService.getCategory).toHaveBeenCalledWith(entry.id, { include: ['path'] }); expect(searchFacetFiltersService.responseFacets[1].buckets.items[0].display).toBe(`Test Category/Subcategory/${entry.name}`); expect(searchFacetFiltersService.responseFacets[1].buckets.length).toEqual(1); expect(searchFacetFiltersService.responseFacets.length).toEqual(2); @@ -517,10 +570,12 @@ describe('SearchFacetFiltersService', () => { searchFacetFiltersService.responseFacets = null; queryBuilder.config = { categories: [], - facetFields: { fields: [ + facetFields: { + fields: [ { label: 'creator', field: 'creator' }, { label: 'modifier', field: 'modifier' } - ]}, + ] + }, facetQueries: { queries: [] } @@ -531,16 +586,16 @@ describe('SearchFacetFiltersService', () => { type: 'field', label: 'creator', buckets: [ - { label: 'b1', metrics: [{value: {count: 10}}] }, - { label: 'b2', metrics: [{value: {count: 1}}] } + { label: 'b1', metrics: [{ value: { count: 10 } }] }, + { label: 'b2', metrics: [{ value: { count: 1 } }] } ] }, { type: 'field', label: 'modifier', buckets: [ - { label: 'c1', metrics: [{value: {count: 10}}] }, - { label: 'c2', metrics: [{value: {count: 1}}] } + { label: 'c1', metrics: [{ value: { count: 10 } }] }, + { label: 'c2', metrics: [{ value: { count: 1 } }] } ] } ]; @@ -594,13 +649,17 @@ describe('SearchFacetFiltersService', () => { facetQueries: { queries: [] }, facetFields: { fields: [ - { field: 'field', label: 'Field', settings: { bucketSortBy: FacetBucketSortBy.LABEL, bucketSortDirection: FacetBucketSortDirection.DESCENDING }} + { + field: 'field', + label: 'Field', + settings: { bucketSortBy: FacetBucketSortBy.LABEL, bucketSortDirection: FacetBucketSortDirection.DESCENDING } + } ] } }; searchFacetFiltersService.onDataLoaded(data); - expect(searchFacetFiltersService.responseFacets[0].buckets.items.map(b => b.label)).toEqual(['xyzzy', 'qux', 'foo', 'baz', 'bar']); + expect(searchFacetFiltersService.responseFacets[0].buckets.items.map((b) => b.label)).toEqual(['xyzzy', 'qux', 'foo', 'baz', 'bar']); }); it('should sort the buckets by count', () => { @@ -609,13 +668,17 @@ describe('SearchFacetFiltersService', () => { facetQueries: { queries: [] }, facetFields: { fields: [ - { field: 'field', label: 'Field', settings: { bucketSortBy: FacetBucketSortBy.COUNT, bucketSortDirection: FacetBucketSortDirection.ASCENDING }} + { + field: 'field', + label: 'Field', + settings: { bucketSortBy: FacetBucketSortBy.COUNT, bucketSortDirection: FacetBucketSortDirection.ASCENDING } + } ] } }; searchFacetFiltersService.onDataLoaded(data); - expect(searchFacetFiltersService.responseFacets[0].buckets.items.map(b => b.label)).toEqual(['baz', 'foo', 'xyzzy', 'qux', 'bar']); + expect(searchFacetFiltersService.responseFacets[0].buckets.items.map((b) => b.label)).toEqual(['baz', 'foo', 'xyzzy', 'qux', 'bar']); }); }); }); diff --git a/lib/content-services/src/lib/search/services/search-header-query-builder.service.spec.ts b/lib/content-services/src/lib/search/services/search-header-query-builder.service.spec.ts index bb6d996dfe3..bbc6622f9da 100644 --- a/lib/content-services/src/lib/search/services/search-header-query-builder.service.spec.ts +++ b/lib/content-services/src/lib/search/services/search-header-query-builder.service.spec.ts @@ -16,10 +16,11 @@ */ import { SearchConfiguration } from '../models/search-configuration.interface'; -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AppConfigService } from '@alfresco/adf-core'; import { SearchHeaderQueryBuilderService } from './search-header-query-builder.service'; import { TestBed } from '@angular/core/testing'; import { ContentTestingModule } from '../../testing/content.testing.module'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; describe('SearchHeaderQueryBuilderService', () => { diff --git a/lib/content-services/src/lib/search/services/search-header-query-builder.service.ts b/lib/content-services/src/lib/search/services/search-header-query-builder.service.ts index 550c78c7609..6bb681ef7f2 100644 --- a/lib/content-services/src/lib/search/services/search-header-query-builder.service.ts +++ b/lib/content-services/src/lib/search/services/search-header-query-builder.service.ts @@ -16,7 +16,7 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService, AppConfigService, DataSorting } from '@alfresco/adf-core'; +import { AppConfigService, DataSorting } from '@alfresco/adf-core'; import { SearchConfiguration } from '../models/search-configuration.interface'; import { BaseQueryBuilderService } from './base-query-builder.service'; import { SearchCategory } from '../models/search-category.interface'; @@ -26,6 +26,7 @@ import { Observable } from 'rxjs'; import { SearchSortingDefinition } from '../models/search-sorting-definition.interface'; import { FilterSearch } from '../models/filter-search.interface'; import { NodesApiService } from '../../common/services/nodes-api.service'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' diff --git a/lib/content-services/src/lib/search/services/search-query-builder.service.spec.ts b/lib/content-services/src/lib/search/services/search-query-builder.service.spec.ts index ff544b98668..d8a8027ab08 100644 --- a/lib/content-services/src/lib/search/services/search-query-builder.service.spec.ts +++ b/lib/content-services/src/lib/search/services/search-query-builder.service.spec.ts @@ -17,7 +17,8 @@ import { SearchQueryBuilderService } from './search-query-builder.service'; import { SearchConfiguration } from '../models/search-configuration.interface'; -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AppConfigService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { FacetField } from '../models/facet-field.interface'; import { TestBed } from '@angular/core/testing'; import { ContentTestingModule } from '../../testing/content.testing.module'; diff --git a/lib/content-services/src/lib/search/services/search-query-builder.service.ts b/lib/content-services/src/lib/search/services/search-query-builder.service.ts index 4f1dfd9407b..38566542a71 100644 --- a/lib/content-services/src/lib/search/services/search-query-builder.service.ts +++ b/lib/content-services/src/lib/search/services/search-query-builder.service.ts @@ -16,10 +16,11 @@ */ import { Inject, Injectable, Optional } from '@angular/core'; -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AppConfigService } from '@alfresco/adf-core'; import { SearchConfiguration } from '../models/search-configuration.interface'; import { BaseQueryBuilderService } from './base-query-builder.service'; import { ADF_SEARCH_CONFIGURATION } from '../search-configuration.token'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; @Injectable({ providedIn: 'root' }) export class SearchQueryBuilderService extends BaseQueryBuilderService { diff --git a/lib/content-services/src/lib/search/services/search.service.ts b/lib/content-services/src/lib/search/services/search.service.ts index 98bf6a001fb..bef7eb0faad 100644 --- a/lib/content-services/src/lib/search/services/search.service.ts +++ b/lib/content-services/src/lib/search/services/search.service.ts @@ -18,7 +18,7 @@ import { inject, Injectable } from '@angular/core'; import { NodePaging, QueriesApi, SearchRequest, ResultSetPaging, SearchApi } from '@alfresco/js-api'; import { Observable, Subject, from } from 'rxjs'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { SearchConfigurationService } from './search-configuration.service'; @Injectable({ diff --git a/lib/content-services/src/lib/security/services/security-controls-groups-marks-security.service.ts b/lib/content-services/src/lib/security/services/security-controls-groups-marks-security.service.ts index 03f92b22315..deaf4d6419a 100644 --- a/lib/content-services/src/lib/security/services/security-controls-groups-marks-security.service.ts +++ b/lib/content-services/src/lib/security/services/security-controls-groups-marks-security.service.ts @@ -32,8 +32,9 @@ import { NodeSecurityMarkBody, GsGroupInclude } from '@alfresco/js-api'; -import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core'; +import { UserPreferencesService } from '@alfresco/adf-core'; import { finalize } from 'rxjs/operators'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; const DEFAULT_SKIP_COUNT = 0; const DEFAULT_INCLUDE = 'inUse'; diff --git a/lib/core/src/lib/services/alfresco-api.interface.ts b/lib/content-services/src/lib/services/alfresco-api.interface.ts similarity index 100% rename from lib/core/src/lib/services/alfresco-api.interface.ts rename to lib/content-services/src/lib/services/alfresco-api.interface.ts diff --git a/lib/core/src/lib/services/alfresco-api.service.ts b/lib/content-services/src/lib/services/alfresco-api.service.ts similarity index 91% rename from lib/core/src/lib/services/alfresco-api.service.ts rename to lib/content-services/src/lib/services/alfresco-api.service.ts index a796b61ad2e..9909a3a571b 100644 --- a/lib/core/src/lib/services/alfresco-api.service.ts +++ b/lib/content-services/src/lib/services/alfresco-api.service.ts @@ -17,12 +17,9 @@ import { Inject, Injectable, InjectionToken, Optional } from '@angular/core'; import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api'; -import { AppConfigService, AppConfigValues } from '../app-config/app-config.service'; import { ReplaySubject } from 'rxjs'; -import { OauthConfigModel } from '../auth/models/oauth-config.model'; -import { StorageService } from '../common/services/storage.service'; -import { OpenidConfiguration } from '../auth/interfaces/openid-configuration.interface'; import { AlfrescoApiFactory } from './alfresco-api.interface'; +import { AppConfigService, AppConfigValues, OauthConfigModel, OpenidConfiguration, StorageService } from '@alfresco/adf-core'; export const ALFRESCO_API_FACTORY = new InjectionToken('ALFRESCO_API_FACTORY'); @@ -30,7 +27,6 @@ export const ALFRESCO_API_FACTORY = new InjectionToken('ALFRESCO_API_FACTORY'); providedIn: 'root' }) export class AlfrescoApiService { - alfrescoApiInitialized: ReplaySubject = new ReplaySubject(1); protected alfrescoApi: AlfrescoApi; @@ -50,14 +46,15 @@ export class AlfrescoApiService { protected appConfig: AppConfigService, protected storageService: StorageService, @Optional() - @Inject(ALFRESCO_API_FACTORY) private alfrescoApiFactory?: AlfrescoApiFactory + @Inject(ALFRESCO_API_FACTORY) + private alfrescoApiFactory?: AlfrescoApiFactory ) {} async load(config: AlfrescoApiConfig): Promise { this.currentAppConfig = config; if (config.authType === 'OAUTH') { - await this.mapAlfrescoApiOpenIdConfig(); + await this.mapAlfrescoApiOpenIdConfig(); } this.initAlfrescoApiWithConfig(); diff --git a/lib/content-services/src/lib/services/index.ts b/lib/content-services/src/lib/services/index.ts new file mode 100644 index 00000000000..54beb1a252f --- /dev/null +++ b/lib/content-services/src/lib/services/index.ts @@ -0,0 +1,18 @@ +/*! + * @license + * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './public-api'; diff --git a/lib/core/src/lib/services/public-api.ts b/lib/content-services/src/lib/services/public-api.ts similarity index 100% rename from lib/core/src/lib/services/public-api.ts rename to lib/content-services/src/lib/services/public-api.ts diff --git a/lib/content-services/src/lib/tag/services/tag.service.ts b/lib/content-services/src/lib/tag/services/tag.service.ts index 1584ea83cef..7216dc9cf3f 100644 --- a/lib/content-services/src/lib/tag/services/tag.service.ts +++ b/lib/content-services/src/lib/tag/services/tag.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { AppConfigService, UserPreferencesService } from '@alfresco/adf-core'; import { EventEmitter, Injectable, Output } from '@angular/core'; import { from, Observable } from 'rxjs'; import { map, tap } from 'rxjs/operators'; diff --git a/lib/content-services/src/lib/testing/content.testing.module.ts b/lib/content-services/src/lib/testing/content.testing.module.ts index 8be15282f16..ad0b1e055cc 100644 --- a/lib/content-services/src/lib/testing/content.testing.module.ts +++ b/lib/content-services/src/lib/testing/content.testing.module.ts @@ -20,7 +20,6 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { CoreModule, - AlfrescoApiService, AppConfigService, TranslationService, CookieService, @@ -33,6 +32,7 @@ import { import { ContentModule } from '../content.module'; import { TranslateModule } from '@ngx-translate/core'; import { versionCompatibilityFactory } from '../version-compatibility/version-compatibility-factory'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { VersionCompatibilityService } from '../version-compatibility/version-compatibility.service'; import { MatIconTestingModule } from '@angular/material/icon/testing'; diff --git a/lib/content-services/src/lib/version-manager/content-version.service.ts b/lib/content-services/src/lib/version-manager/content-version.service.ts index 11f58e16365..72ae3199996 100644 --- a/lib/content-services/src/lib/version-manager/content-version.service.ts +++ b/lib/content-services/src/lib/version-manager/content-version.service.ts @@ -16,7 +16,7 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { ContentApi } from '@alfresco/js-api'; import { Observable, of } from 'rxjs'; diff --git a/lib/content-services/src/lib/version-manager/version-list.component.ts b/lib/content-services/src/lib/version-manager/version-list.component.ts index 3801dd62231..70cef495586 100644 --- a/lib/content-services/src/lib/version-manager/version-list.component.ts +++ b/lib/content-services/src/lib/version-manager/version-list.component.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, ConfirmDialogComponent } from '@alfresco/adf-core'; +import { ConfirmDialogComponent } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../services/alfresco-api.service'; import { Component, Input, OnChanges, ViewEncapsulation, EventEmitter, Output, OnInit, OnDestroy, ViewChild } from '@angular/core'; import { VersionsApi, Node, VersionEntry, NodesApi, NodeEntry, ContentApi, ContentPagingQuery } from '@alfresco/js-api'; import { MatDialog } from '@angular/material/dialog'; diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts index b4ffba61619..67b664b2973 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.spec.ts @@ -25,8 +25,6 @@ import { MatIconModule } from '@angular/material/icon'; import { ContentInfo, Node, NodeEntry, VersionEntry } from '@alfresco/js-api'; import { AlfrescoViewerComponent, ContentService, NodeActionsService, RenditionService } from '@alfresco/adf-content-services'; import { - AlfrescoApiService, - AlfrescoApiServiceMock, AuthModule, CloseButtonPosition, EventMock, @@ -46,6 +44,8 @@ import { ESCAPE } from '@angular/cdk/keycodes'; import { By } from '@angular/platform-browser'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TranslateModule } from '@ngx-translate/core'; +import { AlfrescoApiService } from '../../services'; +import { AlfrescoApiServiceMock } from '../../mock'; @Component({ selector: 'adf-viewer-container-toolbar', diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts index ec9fd7c4159..96ae54bc8d6 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts @@ -30,7 +30,6 @@ import { ViewEncapsulation } from '@angular/core'; import { - AlfrescoApiService, CloseButtonPosition, Track, ViewerComponent, @@ -42,6 +41,7 @@ import { ViewerToolbarComponent, ViewUtilService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { Subject } from 'rxjs'; import { ContentApi, Node, NodeEntry, NodesApi, RenditionEntry, SharedlinksApi, Version, VersionEntry, VersionsApi } from '@alfresco/js-api'; import { RenditionService } from '../../common/services/rendition.service'; diff --git a/lib/content-services/src/public-api.ts b/lib/content-services/src/public-api.ts index 759af620dc9..612d2276ee5 100644 --- a/lib/content-services/src/public-api.ts +++ b/lib/content-services/src/public-api.ts @@ -41,8 +41,12 @@ export * from './lib/tree/index'; export * from './lib/category/index'; export * from './lib/viewer/index'; export * from './lib/security/index'; +export * from './lib/api-factories'; +export * from './lib/services/index'; export * from './lib/infinite-scroll-datasource'; export * from './lib/prediction/index'; +export * from './lib/api-factories'; +export * from './lib/mock/alfresco-api.service.mock'; export * from './lib/content.module'; export * from './lib/testing/content.testing.module'; diff --git a/lib/core/index.ts b/lib/core/index.ts index e357b2379e6..2cef37aee2b 100644 --- a/lib/core/index.ts +++ b/lib/core/index.ts @@ -16,3 +16,4 @@ */ export * from './src/public-api'; +export * from './api/src/index'; diff --git a/lib/core/package.json b/lib/core/package.json index 5adb6d79c04..917aa44c9f4 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -37,7 +37,8 @@ "@alfresco/adf-extensions": ">=6.9.0", "@ngx-translate/core": ">=14.0.0", "minimatch-browser": ">=1.0.0", - "pdfjs-dist": ">=3.3.122" + "pdfjs-dist": ">=3.3.122", + "ts-morph": "^20.0.0" }, "keywords": [ "core", @@ -45,5 +46,11 @@ "angular", "components" ], - "license": "Apache-2.0" + "license": "Apache-2.0", + "ng-update": { + "migrations": "./schematics/migrations/collection.json" + }, + "nx-migrations": { + "migrations": "./schematics/migrations/collection.json" + } } diff --git a/lib/core/project.json b/lib/core/project.json index ce4abdea063..ba239208a8b 100644 --- a/lib/core/project.json +++ b/lib/core/project.json @@ -23,6 +23,16 @@ }, "defaultConfiguration": "production" }, + "build-schematics": { + "executor": "nx:run-commands", + "options": { + "commands": [ + { + "command": "npx tsc -p lib/core/tsconfig.schematics.json && cp lib/core/schematics/migrations/collection.json dist/libs/core/schematics/migrations/collection.json" + } + ] + } + }, "test": { "executor": "@angular-devkit/build-angular:karma", "options": { diff --git a/lib/core/schematics/migrations/7_0_0/index.ts b/lib/core/schematics/migrations/7_0_0/index.ts new file mode 100644 index 00000000000..c8df3bca872 --- /dev/null +++ b/lib/core/schematics/migrations/7_0_0/index.ts @@ -0,0 +1,216 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Rule, SchematicContext, SchematicsException, Tree } from '@angular-devkit/schematics'; +import { Project, NamedImports, SourceFile, ImportSpecifier, ImportDeclaration } from 'ts-morph'; + +interface MigrationData { + change: { + importedValue: string; + importSource: string; + }; + to: { + importedValue: string; + importSource: string; + }; +} + +const alfrescoApiServiceMigration: MigrationData = { + change: { + importedValue: 'AlfrescoApiService', + importSource: '@alfresco/adf-core' + }, + to: { + importedValue: 'AlfrescoApiService', + importSource: '@alfresco/adf-content-services' + } +}; + +const alfrescoApiMockMigration: MigrationData = { + change: { + importedValue: 'AlfrescoApiServiceMock', + importSource: '@alfresco/adf-core' + }, + to: { + importedValue: 'AlfrescoApiServiceMock', + importSource: '@alfresco/adf-content-services' + } +}; + +const alfrescoApiFactoryMigration: MigrationData = { + change: { + importedValue: 'AlfrescoApiFactory', + importSource: '@alfresco/adf-core' + }, + to: { + importedValue: 'AlfrescoApiFactory', + importSource: '@alfresco/adf-content-services' + } +}; + +const migrations: MigrationData[] = [ + alfrescoApiServiceMigration, + alfrescoApiMockMigration, + alfrescoApiFactoryMigration +]; + +/** + * @returns Schematic rule for updating imports + */ +export function updateAlfrescoApiImports(): Rule { + const project = new Project(); + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + return (tree: Tree, _context: SchematicContext) => { + + tree.visit((filePath: string) => visitor(filePath, tree, project)); + + return tree; + }; +} + +export const visitor = (filePath: string, tree: Pick, project: Project) => { + if ( + !filePath.includes('/.git/') && + !filePath.includes('/node_modules/') && + !filePath.includes('/.angular/') && + !filePath.includes('/.nxcache/') && + /\.ts$/.test(filePath) + ) { + const bufferFileContent = tree.read(filePath); + + if (!bufferFileContent) { + throw new SchematicsException(`Could not read file: ${filePath}`); + } + + migrations.forEach((migrationData) => { + const fileWithUpdatedImport = moveImport( + filePath, + bufferFileContent, + project, + migrationData + ); + + if (fileWithUpdatedImport) { + tree.overwrite(filePath, fileWithUpdatedImport); + } + }); + } +}; + +const moveImport = ( + filePath: string, + bufferFileContent: Buffer, + project: Project, + migrationData: MigrationData +): string | undefined => { + const fileContent = bufferFileContent.toString(); + const predictImport = fileContent.includes(migrationData.change.importedValue); + + if (predictImport) { + const sourceFile = + project.getSourceFile(`migration-${filePath}`) ?? + project.createSourceFile( + `migration-${filePath}`, + fileContent + ); + + const alfrescoApiImportResult = getImportedValueFromSource( + sourceFile, + { + importedIdentifier: migrationData.change.importedValue, + from: migrationData.change.importSource + } + ); + + if (alfrescoApiImportResult?.importedValue) { + if (alfrescoApiImportResult.allImportedValuesCount === 1) { + // There is only one import e.g. import { A } from 'A'; + // Therefore, we need to remove whole import statement + alfrescoApiImportResult.importSource?.remove(); + } else { + alfrescoApiImportResult.importedValue?.remove(); + } + + const alfrescoContentServiceImport = getSourceImport( + sourceFile, + migrationData.to.importSource + ); + + if (alfrescoContentServiceImport) { + alfrescoContentServiceImport.addNamedImport(migrationData.to.importedValue); + } else { + sourceFile.insertStatements( + sourceFile.getImportDeclarations().length + 1, + `import { ${migrationData.to.importedValue} } from '${migrationData.to.importSource}';` + ); + } + + return sourceFile.getFullText(); + } + } + + return undefined; +}; + +const getSourceImport = (sourceFile: SourceFile, from: string): ImportDeclaration | undefined => { + const moduleImports = sourceFile.getImportDeclarations(); + + const importDeclaration = moduleImports.find((moduleImport) => { + const currentImportSource = moduleImport.getModuleSpecifierValue(); + return currentImportSource === from; + }); + + return importDeclaration; +}; + +const getImportedValueFromSource = ( + sourceFile: SourceFile, + searchedImport: { + importedIdentifier: string; + from: string; + } +): { + importedValue: ImportSpecifier | undefined; + importSource: ImportDeclaration | undefined; + allImportedValuesCount: number | undefined; +} => { + const importSource = getSourceImport(sourceFile, searchedImport.from); + + if (!importSource) { + return { + importedValue: undefined, + importSource: undefined, + allImportedValuesCount: undefined + }; + } + + const importedValues = importSource?.getImportClause(); + const namedImports = importedValues?.getNamedBindings() as NamedImports; + const namedImportsElements = namedImports?.getElements() ?? []; + + const importedValue = + namedImportsElements.find( + (binding) => binding.getName() === searchedImport.importedIdentifier + ); + + return { + importedValue, + importSource, + allImportedValuesCount: namedImportsElements.length + }; +}; diff --git a/lib/core/schematics/migrations/collection.json b/lib/core/schematics/migrations/collection.json new file mode 100644 index 00000000000..5bb220654ec --- /dev/null +++ b/lib/core/schematics/migrations/collection.json @@ -0,0 +1,41 @@ +{ + "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", + "schematics": { + "move-out-alfresco-api": { + "description": "Update alfresco-api imports", + "version": "7.0.0", + "factory": "./7_0_0/index#updateAlfrescoApiImports" + } + }, + "packageJsonUpdates": { + "move-out-alfresco-api": { + "version": "7.0.0", + "packages": { + "@alfresco/adf-content-services": { + "version": "7.0.0", + "alwaysAddToPackageJson": false + }, + "@alfresco/adf-extensions": { + "version": "7.0.0", + "alwaysAddToPackageJson": false + }, + "@alfresco/adf-process-services-cloud": { + "version": "7.0.0", + "alwaysAddToPackageJson": false + }, + "@alfresco/adf-process-services": { + "version": "7.0.0", + "alwaysAddToPackageJson": false + }, + "@alfresco/eslint-plugin-eslint-angular": { + "version": "7.0.0", + "alwaysAddToPackageJson": false + }, + "@alfresco/js-api": { + "version": "10.0.0", + "alwaysAddToPackageJson": false + } + } + } + } +} diff --git a/lib/core/src/lib/app-config/app-config.service.ts b/lib/core/src/lib/app-config/app-config.service.ts index 6dd58b4de9b..1efe6a50fa3 100644 --- a/lib/core/src/lib/app-config/app-config.service.ts +++ b/lib/core/src/lib/app-config/app-config.service.ts @@ -63,7 +63,6 @@ export enum Status { providedIn: 'root' }) export class AppConfigService { - config: any = { application: { name: 'Alfresco ADF Application' @@ -97,11 +96,10 @@ export class AppConfigService { * @returns Property value, when loaded */ select(property: string): Observable { - return this.onLoadSubject - .pipe( - map((config) => ObjectUtils.getValue(config, property)), - distinctUntilChanged() - ); + return this.onLoadSubject.pipe( + map((config) => ObjectUtils.getValue(config, property)), + distinctUntilChanged() + ); } /** @@ -170,9 +168,7 @@ export class AppConfigService { protected onDataLoaded() { this.onLoadSubject.next(this.config); - this.extensionService.setup$ - .pipe(take(1)) - .subscribe((config) => this.onExtensionsLoaded(config)); + this.extensionService.setup$.pipe(take(1)).subscribe((config) => this.onExtensionsLoaded(config)); } protected onExtensionsLoaded(config: ExtensionConfig) { @@ -227,20 +223,18 @@ export class AppConfigService { * @param hostIdp host address * @returns Discovery configuration */ - loadWellKnown(hostIdp: string): Promise { + loadWellKnown(hostIdp: string): Promise { return new Promise((resolve, reject) => { - this.http - .get(`${hostIdp}/.well-known/openid-configuration`) - .subscribe({ - next: (res: OpenidConfiguration) => { - resolve(res); - }, - error: (err: any) => { - // eslint-disable-next-line no-console - console.error('hostIdp not correctly configured or unreachable'); - reject(err); - } - }); + this.http.get(`${hostIdp}/.well-known/openid-configuration`).subscribe({ + next: (res: OpenidConfiguration) => { + resolve(res); + }, + error: (err: any) => { + // eslint-disable-next-line no-console + console.error('hostIdp not correctly configured or unreachable'); + reject(err); + } + }); }); } @@ -273,5 +267,4 @@ export class AppConfigService { return result; } - } diff --git a/lib/core/src/lib/auth/oidc/auth.module.ts b/lib/core/src/lib/auth/oidc/auth.module.ts index e63697dd5f3..a067960c223 100644 --- a/lib/core/src/lib/auth/oidc/auth.module.ts +++ b/lib/core/src/lib/auth/oidc/auth.module.ts @@ -17,8 +17,6 @@ import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core'; import { AUTH_CONFIG, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc'; -import { AlfrescoApiNoAuthService } from '../../api-factories/alfresco-api-no-auth.service'; -import { AlfrescoApiService } from '../../services/alfresco-api.service'; import { AuthenticationService } from '../services/authentication.service'; import { StorageService } from '../../common/services/storage.service'; import { AuthModuleConfig, AUTH_MODULE_CONFIG } from './auth-config'; @@ -44,7 +42,6 @@ export function loginFactory(redirectService: RedirectAuthService): () => Promis providers: [ { provide: OAuthStorage, useExisting: StorageService }, { provide: AuthenticationService}, - { provide: AlfrescoApiService, useClass: AlfrescoApiNoAuthService }, { provide: AUTH_CONFIG, useFactory: authConfigFactory, diff --git a/lib/core/src/lib/common/services/user-preferences.service.spec.ts b/lib/core/src/lib/common/services/user-preferences.service.spec.ts index ece3bf59420..599113b2b6d 100644 --- a/lib/core/src/lib/common/services/user-preferences.service.spec.ts +++ b/lib/core/src/lib/common/services/user-preferences.service.spec.ts @@ -21,8 +21,7 @@ import { AppConfigService } from '../../app-config/app-config.service'; import { StorageService } from '../../common/services/storage.service'; import { UserPreferencesService, UserPreferenceValues } from '../../common/services/user-preferences.service'; import { AppConfigServiceMock } from '../mock/app-config.service.mock'; -import { AlfrescoApiService } from '../../services/alfresco-api.service'; -import { AlfrescoApiServiceMock, TranslationMock } from '../../mock'; +import { TranslationMock } from '../../mock'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { TranslationService } from '../../translation'; @@ -31,7 +30,6 @@ describe('UserPreferencesService', () => { let preferences: UserPreferencesService; let storage: StorageService; let appConfig: AppConfigServiceMock; - let alfrescoApiService: AlfrescoApiServiceMock; let translate: TranslateService; beforeEach(() => { @@ -41,7 +39,6 @@ describe('UserPreferencesService', () => { UserPreferencesService, StorageService, { provide: TranslationService, useClass: TranslationMock }, - { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: AppConfigService, useClass: AppConfigServiceMock } ] }); @@ -57,7 +54,6 @@ describe('UserPreferencesService', () => { storage = TestBed.inject(StorageService); storage.clear(); translate = TestBed.inject(TranslateService); - alfrescoApiService = TestBed.inject(AlfrescoApiService) as AlfrescoApiServiceMock; }); afterEach(() => { @@ -107,7 +103,7 @@ describe('UserPreferencesService', () => { }); it('should null value return default prefix', () => { - storage.setItem('paginationSize', null); + storage.setItem('paginationSize', ''); const paginationSize = preferences.getPropertyKey('paginationSize'); expect(preferences.get(paginationSize, 'default')).toBe('default'); }); @@ -176,7 +172,6 @@ describe('UserPreferencesService', () => { } ]; appConfig.config.locale = 'fake-locale-config'; - alfrescoApiService.initialize(); const textOrientation = preferences.getPropertyKey('textOrientation'); expect(storage.getItem(textOrientation)).toBe('ltr'); }); @@ -189,7 +184,6 @@ describe('UserPreferencesService', () => { } ]; appConfig.config.locale = 'fake-locale-config'; - alfrescoApiService.initialize(); const textOrientation = preferences.getPropertyKey('textOrientation'); expect(storage.getItem(textOrientation)).toBe('rtl'); }); @@ -200,7 +194,6 @@ describe('UserPreferencesService', () => { key: 'fake-locale-browser' } ]; - alfrescoApiService.initialize(); const textOrientation = preferences.getPropertyKey('textOrientation'); expect(storage.getItem(textOrientation)).toBe(null); @@ -214,7 +207,6 @@ describe('UserPreferencesService', () => { } ]; spyOn(translate, 'getBrowserCultureLang').and.returnValue('fake-locale-browser'); - alfrescoApiService.initialize(); let lastValue; diff --git a/lib/core/src/lib/common/services/user-preferences.service.ts b/lib/core/src/lib/common/services/user-preferences.service.ts index 20b5654560a..b2bb5ccf5bf 100644 --- a/lib/core/src/lib/common/services/user-preferences.service.ts +++ b/lib/core/src/lib/common/services/user-preferences.service.ts @@ -20,8 +20,7 @@ import { TranslateService } from '@ngx-translate/core'; import { Observable, BehaviorSubject } from 'rxjs'; import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service'; import { StorageService } from './storage.service'; -import { distinctUntilChanged, map, filter } from 'rxjs/operators'; -import { AlfrescoApiService } from '../../services/alfresco-api.service'; +import { distinctUntilChanged, map } from 'rxjs/operators'; import { LanguageItem } from './language-item.interface'; // eslint-disable-next-line no-shadow @@ -48,13 +47,17 @@ export class UserPreferencesService { private onChangeSubject: BehaviorSubject; onChange: Observable; - constructor(public translate: TranslateService, + constructor( + public translate: TranslateService, private appConfig: AppConfigService, - private storage: StorageService, - private alfrescoApiService: AlfrescoApiService) { - this.alfrescoApiService.alfrescoApiInitialized.pipe(filter(status => status)).subscribe(this.initUserPreferenceStatus.bind(this)); + private storage: StorageService + ) { this.onChangeSubject = new BehaviorSubject(this.userPreferenceStatus); this.onChange = this.onChangeSubject.asObservable(); + + this.appConfig.onLoad.subscribe(() => { + this.initUserPreferenceStatus(); + }); } private initUserPreferenceStatus() { @@ -168,7 +171,7 @@ export class UserPreferencesService { * * @param value Name of the prefix */ - setStoragePrefix(value: string) { + setStoragePrefix(value: string | null) { this.storage.setItem('USER_PROFILE', value || 'GUEST'); this.initUserPreferenceStatus(); } diff --git a/lib/core/src/lib/core.module.ts b/lib/core/src/lib/core.module.ts index 8d6e1000fda..4e51b671086 100644 --- a/lib/core/src/lib/core.module.ts +++ b/lib/core/src/lib/core.module.ts @@ -58,7 +58,6 @@ import { IdentityUserInfoModule } from './identity-user-info/identity-user-info. import { loadAppConfig } from './app-config/app-config.loader'; import { AppConfigService } from './app-config/app-config.service'; import { StorageService } from './common/services/storage.service'; -import { AlfrescoApiLoaderService, createAlfrescoApiInstance } from './api-factories/alfresco-api-v2-loader.service'; import { AdfDateFnsAdapter } from './common/utils/date-fns-adapter'; import { MomentDateAdapter } from './common/utils/moment-date-adapter'; import { AdfDateTimeFnsAdapter } from './common/utils/datetime-fns-adapter'; @@ -173,12 +172,6 @@ export class CoreModule { useValue: { duration: 10000 } - }, - { - provide: APP_INITIALIZER, - useFactory: createAlfrescoApiInstance, - deps: [AlfrescoApiLoaderService], - multi: true } ] }; diff --git a/lib/core/src/lib/datatable/components/location-cell/location-cell.component.ts b/lib/core/src/lib/datatable/components/location-cell/location-cell.component.ts index 8afc921ca69..4bc1cf4ca75 100644 --- a/lib/core/src/lib/datatable/components/location-cell/location-cell.component.ts +++ b/lib/core/src/lib/datatable/components/location-cell/location-cell.component.ts @@ -19,7 +19,7 @@ import { ChangeDetectionStrategy, Component, Input, OnInit, ViewEncapsulation } import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component'; import { AsyncPipe } from '@angular/common'; import { RouterModule } from '@angular/router'; -import { PathInfo } from '@alfresco/js-api'; +import { PathInfo } from '../../../models/path.model'; @Component({ standalone: true, diff --git a/lib/core/src/lib/datatable/components/mocks/datatable.mock.ts b/lib/core/src/lib/datatable/components/mocks/datatable.mock.ts index 8f9c1d93251..aa9092df4cc 100644 --- a/lib/core/src/lib/datatable/components/mocks/datatable.mock.ts +++ b/lib/core/src/lib/datatable/components/mocks/datatable.mock.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { PathInfo } from '@alfresco/js-api'; +import { PathInfo } from '../../../models/path.model'; import { DataColumn } from '../../data/data-column.model'; export const mockCarsData: any = [ diff --git a/lib/core/src/lib/mock/public-api.ts b/lib/core/src/lib/mock/public-api.ts index bc8d4fec58a..8447e496186 100644 --- a/lib/core/src/lib/mock/public-api.ts +++ b/lib/core/src/lib/mock/public-api.ts @@ -18,7 +18,6 @@ export * from './cookie.service.mock'; export * from './event.mock'; export * from './translation.service.mock'; -export * from './alfresco-api.service.mock'; export * from './form/form.component.mock'; export * from './form/form-definition.mock'; diff --git a/lib/core/src/lib/models/authentication.ts b/lib/core/src/lib/models/authentication.ts new file mode 100644 index 00000000000..4dbf7ea9d9d --- /dev/null +++ b/lib/core/src/lib/models/authentication.ts @@ -0,0 +1,26 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BasicAuth } from './basicAuth'; +import { Oauth2 } from './oauth2'; + +export interface Authentication { + basicAuth?: BasicAuth; + oauth2?: Oauth2; + cookie?: string; + type?: string; +} diff --git a/lib/core/src/lib/models/basic-auth.ts b/lib/core/src/lib/models/basic-auth.ts new file mode 100644 index 00000000000..fcc7db0ee8f --- /dev/null +++ b/lib/core/src/lib/models/basic-auth.ts @@ -0,0 +1,22 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface BasicAuth { + username?: string; + password?: string; + ticket?: string; +} diff --git a/lib/core/src/lib/models/http-client.interface.ts b/lib/core/src/lib/models/http-client.interface.ts new file mode 100644 index 00000000000..46e81fab19b --- /dev/null +++ b/lib/core/src/lib/models/http-client.interface.ts @@ -0,0 +1,106 @@ +/*! + * @license + * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Authentication } from './authentication'; +import { Emitter } from 'event-emitter'; + +export interface RequestOptions { + path: string; + httpMethod?: string; + pathParams?: any; + queryParams?: any; + headerParams?: any; + formParams?: any; + bodyParam?: any; + contentTypes?: string[]; + accepts?: string[]; + returnType?: any; + contextRoot?: string; + responseType?: string; + url?: string; + readonly accept?: string; + readonly contentType?: string; +} + +export interface HttpClientConfig { + contextRoot?: string; + host?: string; // Should be mandatory but can't make it because of AlfrescoApiConfig incompatibility 😕 + servicePath?: string; // Should be mandatory but can't make it because of AlfrescoApiConfig incompatibility 😕 +} + +export interface LegacyHttpClient { + basePath: string; + config: HttpClientConfig; + + request(options: RequestOptions): Promise; + post(options: RequestOptions): Promise; + put(options: RequestOptions): Promise; + get(options: RequestOptions): Promise; + delete(options: RequestOptions): Promise; + /** @deprecated */ + callApi( + path: string, + httpMethod: string, + pathParams?: any, + queryParams?: any, + headerParams?: any, + formParams?: any, + bodyParam?: any, + contentTypes?: string[], + accepts?: string[], + returnType?: any, + contextRoot?: string, + responseType?: string, + url?: string + ): Promise; + /** @deprecated */ + callCustomApi( + path: string, + httpMethod: string, + pathParams?: any, + queryParams?: any, + headerParams?: any, + formParams?: any, + bodyParam?: any, + contentTypes?: string[], + accepts?: string[], + returnType?: any, + contextRoot?: string, + responseType?: string + ): Promise; +} + +export interface SecurityOptions { + readonly isBpmRequest: boolean; + readonly enableCsrf?: boolean; + readonly withCredentials?: boolean; + readonly authentications: Authentication; + readonly defaultHeaders: Record; +} + +export interface Emitters { + readonly eventEmitter: Emitter; + readonly apiClientEmitter: Emitter; +} + +export interface HttpClient { + request(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise; + post(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise; + put(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise; + get(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise; + delete(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise; +} diff --git a/lib/core/src/lib/models/oauth2.ts b/lib/core/src/lib/models/oauth2.ts new file mode 100644 index 00000000000..0e45411c18c --- /dev/null +++ b/lib/core/src/lib/models/oauth2.ts @@ -0,0 +1,21 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface Oauth2 { + refreshToken?: string; + accessToken?: string; +} diff --git a/lib/core/src/lib/models/path.model.ts b/lib/core/src/lib/models/path.model.ts new file mode 100644 index 00000000000..02807356ad8 --- /dev/null +++ b/lib/core/src/lib/models/path.model.ts @@ -0,0 +1,35 @@ +/*! + * @license + * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class PathInfo { + elements?: PathElement[]; + name?: string; + isComplete?: boolean; + + constructor(input?: Partial) { + if (input) { + Object.assign(this, input); + } + } +} + +export interface PathElement { + id?: string; + name?: string; + nodeType?: string; + aspectNames?: string[]; +} diff --git a/lib/core/src/lib/models/public-api.ts b/lib/core/src/lib/models/public-api.ts index 5315520b17c..1eb87254494 100644 --- a/lib/core/src/lib/models/public-api.ts +++ b/lib/core/src/lib/models/public-api.ts @@ -21,3 +21,4 @@ export * from './pagination.model'; export * from './request-pagination.model'; export * from './decimal-number.model'; export * from './general-user.model'; +export * from './path.model'; diff --git a/lib/core/src/lib/testing/core.testing.module.ts b/lib/core/src/lib/testing/core.testing.module.ts index b7dba3f9f75..3b102437eca 100644 --- a/lib/core/src/lib/testing/core.testing.module.ts +++ b/lib/core/src/lib/testing/core.testing.module.ts @@ -20,8 +20,6 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { RouterTestingModule } from '@angular/router/testing'; import { TranslateModule } from '@ngx-translate/core'; import { CoreModule } from '../core.module'; -import { AlfrescoApiService } from '../services/alfresco-api.service'; -import { AlfrescoApiServiceMock } from '../mock/alfresco-api.service.mock'; import { AppConfigService } from '../app-config/app-config.service'; import { AppConfigServiceMock } from '../common/mock/app-config.service.mock'; import { TranslationService } from '../translation/translation.service'; @@ -34,6 +32,7 @@ import { directionalityConfigFactory } from '../common/services/directionality-c import { DirectionalityConfigService } from '../common/services/directionality-config.service'; import { AuthModule, RedirectAuthService } from '../auth'; import { EMPTY, of } from 'rxjs'; +import { UserPreferencesService } from '../common/services/user-preferences.service'; @NgModule({ imports: [ @@ -46,7 +45,7 @@ import { EMPTY, of } from 'rxjs'; ], providers: [ DatePipe, - { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, + UserPreferencesService, { provide: AppConfigService, useClass: AppConfigServiceMock }, { provide: TranslationService, useClass: TranslationMock }, { provide: CookieService, useClass: CookieServiceMock }, diff --git a/lib/core/src/lib/translation/translation.service.spec.ts b/lib/core/src/lib/translation/translation.service.spec.ts index 2ff591ba506..d53dba5fa05 100644 --- a/lib/core/src/lib/translation/translation.service.spec.ts +++ b/lib/core/src/lib/translation/translation.service.spec.ts @@ -24,8 +24,6 @@ import { TranslateLoaderService } from './translate-loader.service'; import { provideTranslations, TranslationService } from './translation.service'; import { AppConfigService } from '../app-config/app-config.service'; import { AppConfigServiceMock } from '../common/mock/app-config.service.mock'; -import { AlfrescoApiService } from '../services/alfresco-api.service'; -import { AlfrescoApiServiceMock } from '../mock/alfresco-api.service.mock'; declare let jasmine: any; @@ -45,7 +43,6 @@ describe('TranslationService', () => { }) ], providers: [ - { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: AppConfigService, useClass: AppConfigServiceMock }, provideTranslations('@alfresco/adf-core', 'assets/ng2-alfresco-core') ] diff --git a/lib/core/src/public-api.ts b/lib/core/src/public-api.ts index 645edf1c464..124032cd725 100644 --- a/lib/core/src/public-api.ts +++ b/lib/core/src/public-api.ts @@ -38,7 +38,6 @@ export * from './lib/comments/index'; export * from './lib/sorting-picker/index'; export * from './lib/templates/index'; export * from './lib/pipes/index'; -export * from './lib/services/index'; export * from './lib/directives/index'; export * from './lib/dynamic-chip-list/index'; export * from './lib/clipboard/index'; @@ -49,7 +48,6 @@ export * from './lib/blank-page/index'; export * from './lib/search-text/index'; export * from './lib/snackbar-content/index'; export * from './lib/translation/index'; - export * from './lib/common/utils/index'; export * from './lib/interface/index'; export * from './lib/models/index'; diff --git a/lib/core/tsconfig.nx.migrations.json b/lib/core/tsconfig.nx.migrations.json new file mode 100644 index 00000000000..7b90cdf8eb4 --- /dev/null +++ b/lib/core/tsconfig.nx.migrations.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "lib": [ + "es2018", + "dom" + ], + "declaration": true, + "module": "commonjs", + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "rootDir": "./migrations", + "outDir": "../../dist/libs/core/migrations", + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "sourceMap": true, + "strictNullChecks": true, + "target": "es2015", + "types": [] + }, + "include": [ + "migrations/**/*" + ], + "files": ["schematics/migrations/7_0_0/index.ts"] + } + diff --git a/lib/core/tsconfig.schematics.json b/lib/core/tsconfig.schematics.json new file mode 100644 index 00000000000..8a010789640 --- /dev/null +++ b/lib/core/tsconfig.schematics.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "lib": [ + "es2018", + "dom" + ], + "declaration": true, + "module": "commonjs", + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "rootDir": "./schematics", + "outDir": "../../dist/libs/core/schematics", + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "sourceMap": true, + "strictNullChecks": true, + "target": "es2015", + "types": [] + }, + "include": [ + "schematics/**/*" + ] + } + diff --git a/lib/insights/package.json b/lib/insights/package.json index 7bb57f59a5b..3fe5050ed67 100644 --- a/lib/insights/package.json +++ b/lib/insights/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@alfresco/adf-core": ">=6.9.0", + "@alfresco/adf-content-services": ">=6.9.0", "@ngx-translate/core": ">=14.0.0", "chart.js": "^4.3.0", "ng2-charts": "^4.1.1", diff --git a/lib/insights/src/lib/analytics-process/services/analytics.service.ts b/lib/insights/src/lib/analytics-process/services/analytics.service.ts index dea3454818a..864de29df7e 100644 --- a/lib/insights/src/lib/analytics-process/services/analytics.service.ts +++ b/lib/insights/src/lib/analytics-process/services/analytics.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from, of } from 'rxjs'; import { ParameterValueModel } from '../../diagram/models/report/parameter-value.model'; diff --git a/lib/insights/src/lib/diagram/services/diagrams.service.ts b/lib/insights/src/lib/diagram/services/diagrams.service.ts index 990278488e5..1d75d29094d 100644 --- a/lib/insights/src/lib/diagram/services/diagrams.service.ts +++ b/lib/insights/src/lib/diagram/services/diagrams.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import { ModelJsonBpmnApi } from '@alfresco/js-api'; diff --git a/lib/insights/src/lib/testing/insights.testing.module.ts b/lib/insights/src/lib/testing/insights.testing.module.ts index e06356a971a..dd0c5a631cc 100644 --- a/lib/insights/src/lib/testing/insights.testing.module.ts +++ b/lib/insights/src/lib/testing/insights.testing.module.ts @@ -19,8 +19,8 @@ import { NgModule } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { TranslateModule } from '@ngx-translate/core'; import { InsightsModule } from '../insights.module'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { - AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, diff --git a/lib/insights/tsconfig.lib.json b/lib/insights/tsconfig.lib.json index 49f881d2fed..a26e6a261cc 100644 --- a/lib/insights/tsconfig.lib.json +++ b/lib/insights/tsconfig.lib.json @@ -7,6 +7,7 @@ "paths": { "@alfresco/adf-extensions": ["../../../dist/libs/extensions"], "@alfresco/adf-extensions/*": ["../../../dist/libs/extensions/*"], + "@alfresco/adf-content-services": ["../../../dist/libs/content-services"], "@alfresco/adf-core": ["../../../dist/libs/core"], "@alfresco/adf-core/*": ["../../../dist/libs/core/*"], "@alfresco/js-api": ["../../../dist/libs/js-api"], diff --git a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts index 40b14aa9ad8..799dfb72d1a 100644 --- a/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.spec.ts @@ -17,7 +17,7 @@ import { Component } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { of, throwError } from 'rxjs'; import { fakeApplicationInstance } from '../mock/app-model.mock'; import { AppListCloudComponent, LAYOUT_GRID, LAYOUT_LIST } from './app-list-cloud.component'; diff --git a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts index 866c0f3598b..4216b91a94a 100644 --- a/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.spec.ts @@ -17,7 +17,8 @@ import { TestBed } from '@angular/core/testing'; import { throwError } from 'rxjs'; -import { AppConfigService, AlfrescoApiService, CoreTestingModule } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { AppConfigService, CoreTestingModule } from '@alfresco/adf-core'; import { HttpErrorResponse } from '@angular/common/http'; import { AppsProcessCloudService } from './apps-process-cloud.service'; import { fakeApplicationInstance, fakeApplicationInstanceWithEnvironment } from '../mock/app-model.mock'; diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts index 42749907430..9e4ef8c10db 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts @@ -17,9 +17,8 @@ /* eslint-disable @typescript-eslint/naming-convention */ -import { VersionCompatibilityService } from '@alfresco/adf-content-services'; +import { VersionCompatibilityService, AlfrescoApiService } from '@alfresco/adf-content-services'; import { - AlfrescoApiService, ContentLinkModel, CoreModule, FormFieldModel, diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts index c27fe34a413..5561e585127 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/attach-file-cloud-widget.component.ts @@ -25,7 +25,6 @@ import { FormValues, ContentLinkModel, AppConfigService, - AlfrescoApiService, UploadWidgetContentLinkModel, DestinationFolderPath } from '@alfresco/adf-core'; @@ -35,6 +34,7 @@ import { ProcessCloudContentService } from '../../../services/process-cloud-cont import { UploadCloudWidgetComponent } from './upload-cloud.widget'; import { DestinationFolderPathModel, DestinationFolderPathType } from '../../../models/form-cloud-representation.model'; import { + AlfrescoApiService, ContentNodeSelectorPanelService, NewVersionUploaderDataAction, NewVersionUploaderDialogData, diff --git a/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.spec.ts b/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.spec.ts index 517eda360f8..1b9c2887157 100644 --- a/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.spec.ts +++ b/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.spec.ts @@ -16,7 +16,8 @@ */ import { TestBed } from '@angular/core/testing'; -import { AlfrescoApiService, AlfrescoApiServiceMock, NotificationService } from '@alfresco/adf-core'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; +import { NotificationService } from '@alfresco/adf-core'; import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; import { of, Subject } from 'rxjs'; diff --git a/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.ts b/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.ts index 40e96aa6d75..fe9f33122c6 100644 --- a/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.ts +++ b/lib/process-services-cloud/src/lib/form/services/content-cloud-node-selector.service.ts @@ -16,7 +16,8 @@ */ import { Injectable } from '@angular/core'; -import { AlfrescoApiService, NotificationService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { NotificationService } from '@alfresco/adf-core'; import { MatDialog } from '@angular/material/dialog'; import { ContentNodeSelectorComponent, ContentNodeSelectorComponentData, NodeAction } from '@alfresco/adf-content-services'; import { Node, NodeEntry, NodesApi } from '@alfresco/js-api'; diff --git a/lib/process-services-cloud/src/lib/form/services/process-cloud-content.service.ts b/lib/process-services-cloud/src/lib/form/services/process-cloud-content.service.ts index 5d280857be0..b9cd3ac4168 100644 --- a/lib/process-services-cloud/src/lib/form/services/process-cloud-content.service.ts +++ b/lib/process-services-cloud/src/lib/form/services/process-cloud-content.service.ts @@ -18,8 +18,8 @@ import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import { map } from 'rxjs/operators'; -import { AlfrescoApiService, DownloadService } from '@alfresco/adf-core'; -import { ContentService, NodesApiService } from '@alfresco/adf-content-services'; +import { DownloadService } from '@alfresco/adf-core'; +import { ContentService, NodesApiService, AlfrescoApiService } from '@alfresco/adf-content-services'; import { AuthenticationApi, Node, UploadApi } from '@alfresco/js-api'; @Injectable({ diff --git a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts index 30687a22481..89b76a88e70 100644 --- a/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter-cloud.component.spec.ts @@ -17,7 +17,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { SimpleChange } from '@angular/core'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module'; import { MatDialog } from '@angular/material/dialog'; import { of } from 'rxjs'; diff --git a/lib/process-services-cloud/src/lib/services/base-cloud.service.ts b/lib/process-services-cloud/src/lib/services/base-cloud.service.ts index 040822fc063..252889503ee 100644 --- a/lib/process-services-cloud/src/lib/services/base-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/services/base-cloud.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { AppConfigService } from '@alfresco/adf-core'; import { Injectable, inject } from '@angular/core'; import { from, Observable } from 'rxjs'; import { AdfHttpClient } from '@alfresco/adf-core/api'; diff --git a/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts b/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts index afb1cd3bbef..4e406e8bdde 100644 --- a/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts +++ b/lib/process-services-cloud/src/lib/services/notification-cloud.service.ts @@ -37,11 +37,12 @@ export class NotificationCloudService extends BaseCloudService { } private get webSocketHost() { - return this.contextRoot.split('://')[1]; + // return this.contextRoot.split('://')[1]; + return 'hxps-rc.studio.dev.experience.hyland.com'; } private get protocol() { - return this.contextRoot.split('://')[0] === 'https' ? 'wss' : 'ws'; + return 'wss'; } initNotificationsForApp(appName: string) { diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts index 678fba6c28c..8adea7b11b9 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.spec.ts @@ -16,7 +16,7 @@ */ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { StartTaskCloudComponent } from './start-task-cloud.component'; import { of, throwError } from 'rxjs'; import { taskDetailsMock } from '../mock/task-details.mock'; diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts index 1d586985aa0..cde511d7f5c 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.spec.ts @@ -17,7 +17,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { MatDialog } from '@angular/material/dialog'; import { of, Subject } from 'rxjs'; import { TASK_FILTERS_SERVICE_TOKEN } from '../../../../services/cloud-token.service'; diff --git a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts index c834899c062..1583c104955 100644 --- a/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-header/components/task-header-cloud.component.spec.ts @@ -19,7 +19,8 @@ import { TaskHeaderCloudComponent } from './task-header-cloud.component'; import { of, throwError } from 'rxjs'; import { By } from '@angular/platform-browser'; import { ComponentFixture, TestBed, fakeAsync, flush, discardPeriodicTasks } from '@angular/core/testing'; -import { AppConfigService, AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { AppConfigService } from '@alfresco/adf-core'; import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module'; import { TaskCloudService } from '../../services/task-cloud.service'; import { TaskHeaderCloudModule } from '../task-header-cloud.module'; diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts index a7c911c8129..eae52a9f983 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.ts @@ -158,13 +158,14 @@ export class TaskListCloudComponent extends BaseTaskListCloudComponent isLoadingPreferences || isReloading) ); - constructor(@Inject(TASK_LIST_CLOUD_TOKEN) public taskListCloudService: TaskListCloudServiceInterface, - appConfigService: AppConfigService, - taskCloudService: TaskCloudService, - userPreferences: UserPreferencesService, - @Inject(TASK_LIST_PREFERENCES_SERVICE_TOKEN) cloudPreferenceService: PreferenceCloudServiceInterface, - private viewModelCreator: VariableMapperService - ) { + constructor( + @Inject(TASK_LIST_CLOUD_TOKEN) public taskListCloudService: TaskListCloudServiceInterface, + appConfigService: AppConfigService, + taskCloudService: TaskCloudService, + userPreferences: UserPreferencesService, + @Inject(TASK_LIST_PREFERENCES_SERVICE_TOKEN) cloudPreferenceService: PreferenceCloudServiceInterface, + private viewModelCreator: VariableMapperService + ) { super(appConfigService, taskCloudService, userPreferences, PRESET_KEY, cloudPreferenceService); } diff --git a/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts b/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts index f102703a356..a91258f067a 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/testing/task-list.testing.module.ts @@ -19,8 +19,8 @@ import { NgModule } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { HttpClientModule } from '@angular/common/http'; import { TaskListCloudModule } from '../task-list-cloud.module'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { - AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, diff --git a/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts b/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts index 8be4061a2a6..8c72cbc8119 100644 --- a/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts +++ b/lib/process-services-cloud/src/lib/testing/process-service-cloud.testing.module.ts @@ -19,7 +19,6 @@ import { NgModule } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { HttpClientModule } from '@angular/common/http'; import { - AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, @@ -27,6 +26,7 @@ import { TranslationMock, CoreModule, AuthModule } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { TranslateModule } from '@ngx-translate/core'; import { ProcessServicesCloudModule } from '../process-services-cloud.module'; import { RouterTestingModule } from '@angular/router/testing'; diff --git a/lib/process-services/src/lib/form/services/activiti-alfresco.service.ts b/lib/process-services/src/lib/form/services/activiti-alfresco.service.ts index cefc4dcf813..918f8285af9 100644 --- a/lib/process-services/src/lib/form/services/activiti-alfresco.service.ts +++ b/lib/process-services/src/lib/form/services/activiti-alfresco.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, ExternalContent } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { ExternalContent } from '@alfresco/adf-core'; import { SitesService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { diff --git a/lib/process-services/src/lib/form/services/ecm-model.service.ts b/lib/process-services/src/lib/form/services/ecm-model.service.ts index 5b7e3c4ab96..efbc6443db9 100644 --- a/lib/process-services/src/lib/form/services/ecm-model.service.ts +++ b/lib/process-services/src/lib/form/services/ecm-model.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, FormModel } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { FormModel } from '@alfresco/adf-core'; import { EventEmitter, Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; import { map, catchError } from 'rxjs/operators'; diff --git a/lib/process-services/src/lib/form/services/editor.service.ts b/lib/process-services/src/lib/form/services/editor.service.ts index 5aea1642c33..18866d0dc8b 100644 --- a/lib/process-services/src/lib/form/services/editor.service.ts +++ b/lib/process-services/src/lib/form/services/editor.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from, throwError } from 'rxjs'; import { FormModelsApi, FormRepresentation } from '@alfresco/js-api'; diff --git a/lib/process-services/src/lib/form/services/external-alfresco-api.service.ts b/lib/process-services/src/lib/form/services/external-alfresco-api.service.ts index ff60dc83118..e3983317345 100644 --- a/lib/process-services/src/lib/form/services/external-alfresco-api.service.ts +++ b/lib/process-services/src/lib/form/services/external-alfresco-api.service.ts @@ -17,7 +17,7 @@ import { Injectable } from '@angular/core'; import { AlfrescoApi } from '@alfresco/js-api'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; @Injectable({ providedIn: 'root' }) export class ExternalAlfrescoApiService extends AlfrescoApiService { diff --git a/lib/process-services/src/lib/form/services/model.service.ts b/lib/process-services/src/lib/form/services/model.service.ts index d32f4fb98d2..312b6e1a00b 100644 --- a/lib/process-services/src/lib/form/services/model.service.ts +++ b/lib/process-services/src/lib/form/services/model.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from, throwError } from 'rxjs'; import { ModelsApi } from '@alfresco/js-api'; diff --git a/lib/process-services/src/lib/form/services/process-content.service.ts b/lib/process-services/src/lib/form/services/process-content.service.ts index fe9f49984b2..0c3785adfc9 100644 --- a/lib/process-services/src/lib/form/services/process-content.service.ts +++ b/lib/process-services/src/lib/form/services/process-content.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { ActivitiContentApi, diff --git a/lib/process-services/src/lib/form/services/process-definition.service.ts b/lib/process-services/src/lib/form/services/process-definition.service.ts index 627186dbf1a..3b2d0da588c 100644 --- a/lib/process-services/src/lib/form/services/process-definition.service.ts +++ b/lib/process-services/src/lib/form/services/process-definition.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, FormFieldOption } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { FormFieldOption } from '@alfresco/adf-core'; import { Injectable } from '@angular/core'; import { Observable, from, throwError } from 'rxjs'; import { ProcessDefinitionsApi } from '@alfresco/js-api'; diff --git a/lib/process-services/src/lib/form/services/task-form.service.ts b/lib/process-services/src/lib/form/services/task-form.service.ts index 886f7faeff7..a0c1c8acde1 100644 --- a/lib/process-services/src/lib/form/services/task-form.service.ts +++ b/lib/process-services/src/lib/form/services/task-form.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, FormFieldOption, FormValues, TaskProcessVariableModel } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { FormFieldOption, FormValues, TaskProcessVariableModel } from '@alfresco/adf-core'; import { Injectable } from '@angular/core'; import { from, Observable, throwError } from 'rxjs'; import { CompleteFormRepresentation, SaveFormRepresentation, TaskFormsApi } from '@alfresco/js-api'; diff --git a/lib/process-services/src/lib/form/services/task.service.ts b/lib/process-services/src/lib/form/services/task.service.ts index 31ea884fc8c..4c408e19796 100644 --- a/lib/process-services/src/lib/form/services/task.service.ts +++ b/lib/process-services/src/lib/form/services/task.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from, throwError } from 'rxjs'; import { TaskRepresentation, TasksApi } from '@alfresco/js-api'; diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts index 45761ae3805..269a837d3f8 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.spec.ts @@ -17,11 +17,11 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { ContentModule, ContentNodeSelectorPanelComponent, DocumentListService, SitesService, NodesApiService } from '@alfresco/adf-content-services'; +import { AlfrescoApiService, ContentModule, ContentNodeSelectorPanelComponent, DocumentListService, SitesService, NodesApiService } from '@alfresco/adf-content-services'; import { EventEmitter, NO_ERRORS_SCHEMA } from '@angular/core'; import { ProcessTestingModule } from '../../../testing/process.testing.module'; import { AttachFileWidgetDialogComponent } from './attach-file-widget-dialog.component'; -import { AlfrescoApiService, BasicAlfrescoAuthService, OidcAuthenticationService } from '@alfresco/adf-core'; +import { BasicAlfrescoAuthService, OidcAuthenticationService } from '@alfresco/adf-core'; import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface'; import { of, throwError } from 'rxjs'; import { By } from '@angular/platform-browser'; diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts index a108ca3c1e1..ed8bd87f209 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.component.ts @@ -17,9 +17,9 @@ import { Component, Inject, ViewEncapsulation, ViewChild } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog'; -import { AlfrescoApiService, LoginDialogPanelComponent, TranslationService, AuthenticationService } from '@alfresco/adf-core'; +import { LoginDialogPanelComponent, TranslationService, AuthenticationService } from '@alfresco/adf-core'; import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface'; -import { DocumentListService, SitesService, SearchService, ContentNodeSelectorModule } from '@alfresco/adf-content-services'; +import { DocumentListService, SitesService, SearchService, ContentNodeSelectorModule, AlfrescoApiService } from '@alfresco/adf-content-services'; import { ExternalAlfrescoApiService } from '../../services/external-alfresco-api.service'; import { Node } from '@alfresco/js-api'; import { CommonModule } from '@angular/common'; diff --git a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.service.ts b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.service.ts index d6563197ebb..0bcf16112ff 100644 --- a/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.service.ts +++ b/lib/process-services/src/lib/form/widgets/content-widget/attach-file-widget-dialog.service.ts @@ -15,9 +15,10 @@ * limitations under the License. */ +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { MatDialog } from '@angular/material/dialog'; import { EventEmitter, Injectable, Output } from '@angular/core'; -import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core'; +import { TranslationService } from '@alfresco/adf-core'; import { Observable, of, Subject } from 'rxjs'; import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface'; import { AlfrescoEndpointRepresentation, Node, ContentApi } from '@alfresco/js-api'; diff --git a/lib/process-services/src/lib/form/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts b/lib/process-services/src/lib/form/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts index e2d087607a8..44b74ae113a 100644 --- a/lib/process-services/src/lib/form/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts +++ b/lib/process-services/src/lib/form/widgets/dynamic-table/editors/dropdown/dropdown.editor.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { Observable, of } from 'rxjs'; import { FormFieldModel, FormModel, FormService } from '@alfresco/adf-core'; diff --git a/lib/process-services/src/lib/process-comments/services/comment-process.service.ts b/lib/process-services/src/lib/process-comments/services/comment-process.service.ts index 6e91270041d..e5bea56b1cf 100644 --- a/lib/process-services/src/lib/process-comments/services/comment-process.service.ts +++ b/lib/process-services/src/lib/process-comments/services/comment-process.service.ts @@ -15,9 +15,10 @@ * limitations under the License. */ +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; -import { CommentModel, AlfrescoApiService, CommentsService, User } from '@alfresco/adf-core'; +import { CommentModel, CommentsService, User } from '@alfresco/adf-core'; import { map } from 'rxjs/operators'; import { ActivitiCommentsApi } from '@alfresco/js-api'; import { PeopleProcessService } from '../../services/people-process.service'; diff --git a/lib/process-services/src/lib/process-list/services/process-filter.service.ts b/lib/process-services/src/lib/process-list/services/process-filter.service.ts index da0ef6c0027..03bb7bf4787 100644 --- a/lib/process-services/src/lib/process-list/services/process-filter.service.ts +++ b/lib/process-services/src/lib/process-list/services/process-filter.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { Injectable } from '@angular/core'; import { Observable, from, forkJoin } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/lib/process-services/src/lib/process-list/services/process.service.ts b/lib/process-services/src/lib/process-list/services/process.service.ts index 19641e54c3e..7cbd24721b4 100644 --- a/lib/process-services/src/lib/process-list/services/process.service.ts +++ b/lib/process-services/src/lib/process-list/services/process.service.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { AlfrescoApiService, DateFnsUtils, FormValues } from '@alfresco/adf-core'; +import { DateFnsUtils, FormValues } from '@alfresco/adf-core'; import { inject, Injectable } from '@angular/core'; import { FormDefinitionRepresentation, @@ -31,6 +31,7 @@ import { ProcessDefinitionRepresentation, TaskRepresentation } from '@alfresco/js-api'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { from, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { DatePipe } from '@angular/common'; diff --git a/lib/process-services/src/lib/services/apps-process.service.ts b/lib/process-services/src/lib/services/apps-process.service.ts index e6a55c094dc..42efe3f1a72 100644 --- a/lib/process-services/src/lib/services/apps-process.service.ts +++ b/lib/process-services/src/lib/services/apps-process.service.ts @@ -18,7 +18,7 @@ import { Injectable } from '@angular/core'; import { RuntimeAppDefinitionsApi, AppDefinitionRepresentation } from '@alfresco/js-api'; import { Observable, from } from 'rxjs'; -import { AlfrescoApiService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { map } from 'rxjs/operators'; @Injectable({ diff --git a/lib/process-services/src/lib/services/people-process.service.ts b/lib/process-services/src/lib/services/people-process.service.ts index 974948a25a3..1002ca0881b 100644 --- a/lib/process-services/src/lib/services/people-process.service.ts +++ b/lib/process-services/src/lib/services/people-process.service.ts @@ -17,8 +17,9 @@ import { Injectable } from '@angular/core'; import { Observable, from } from 'rxjs'; -import { AlfrescoApiService, GroupModel } from '@alfresco/adf-core'; +import { GroupModel } from '@alfresco/adf-core'; import { map } from 'rxjs/operators'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { TaskActionsApi, UsersApi, ActivitiGroupsApi, UserProfileApi, UserRepresentation, LightUserRepresentation } from '@alfresco/js-api'; @Injectable({ diff --git a/lib/process-services/src/lib/services/task-comments.service.ts b/lib/process-services/src/lib/services/task-comments.service.ts index 39779b80e95..e20ab9187de 100644 --- a/lib/process-services/src/lib/services/task-comments.service.ts +++ b/lib/process-services/src/lib/services/task-comments.service.ts @@ -15,7 +15,8 @@ * limitations under the License. */ -import { AlfrescoApiService, CommentModel, CommentsService } from '@alfresco/adf-core'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; +import { CommentModel, CommentsService } from '@alfresco/adf-core'; import { ActivitiCommentsApi } from '@alfresco/js-api'; import { inject, Injectable } from '@angular/core'; import { from, Observable } from 'rxjs'; diff --git a/lib/process-services/src/lib/task-list/services/task-filter.service.ts b/lib/process-services/src/lib/task-list/services/task-filter.service.ts index c7ac5f780aa..c418a3e43a8 100644 --- a/lib/process-services/src/lib/task-list/services/task-filter.service.ts +++ b/lib/process-services/src/lib/task-list/services/task-filter.service.ts @@ -15,11 +15,11 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; import { inject, Injectable } from '@angular/core'; import { Observable, forkJoin, from } from 'rxjs'; import { map } from 'rxjs/operators'; import { UserFiltersApi, UserTaskFilterRepresentation } from '@alfresco/js-api'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; @Injectable({ providedIn: 'root' diff --git a/lib/process-services/src/lib/task-list/services/tasklist.service.ts b/lib/process-services/src/lib/task-list/services/tasklist.service.ts index a0146f9d60b..4db6986f585 100644 --- a/lib/process-services/src/lib/task-list/services/tasklist.service.ts +++ b/lib/process-services/src/lib/task-list/services/tasklist.service.ts @@ -15,7 +15,6 @@ * limitations under the License. */ -import { AlfrescoApiService } from '@alfresco/adf-core'; import { inject, Injectable } from '@angular/core'; import { Observable, from, of } from 'rxjs'; import { map, catchError, flatMap, filter } from 'rxjs/operators'; @@ -31,6 +30,7 @@ import { UserTaskFilterRepresentation, TaskRepresentation } from '@alfresco/js-api'; +import { AlfrescoApiService } from '@alfresco/adf-content-services'; @Injectable({ providedIn: 'root' diff --git a/lib/process-services/src/lib/testing/process.testing.module.ts b/lib/process-services/src/lib/testing/process.testing.module.ts index dd9c4a24df4..27594595583 100644 --- a/lib/process-services/src/lib/testing/process.testing.module.ts +++ b/lib/process-services/src/lib/testing/process.testing.module.ts @@ -15,11 +15,11 @@ * limitations under the License. */ +import { AlfrescoApiService } from '@alfresco/adf-content-services'; import { NgModule } from '@angular/core'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { ProcessModule } from '../process.module'; import { - AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock, diff --git a/package-lock.json b/package-lock.json index 344f40aa40f..f75fa9eb2e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,6 +45,7 @@ "rxjs": "7.8.1", "subscriptions-transport-ws": "^0.11.0", "superagent": "^9.0.1", + "ts-morph": "^20.0.0", "tslib": "^2.6.2", "zone.js": "~0.11.4" }, @@ -148,7 +149,7 @@ "protractor-smartrunner": "^2.0.0-beta6", "rimraf": "^5.0.5", "sass-loader": "13.3.2", - "selenium-webdriver": "^4.14.0", + "selenium-webdriver": "4.1.0", "shelljs": "^0.8.5", "spdx-license-list": "^6.9.0", "stylelint": "^16.3.1", @@ -622,29 +623,23 @@ "webpack": "^5.0.0" } }, - "node_modules/@angular-devkit/build-angular/node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, - "node_modules/@angular-devkit/build-angular/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "node_modules/@angular-devkit/build-angular/node_modules/css-loader/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=8.0.0" + "node": ">=10" } }, - "node_modules/@angular-devkit/build-angular/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "node_modules/@angular-devkit/build-angular/node_modules/es-module-lexer": { + "version": "0.9.3", "dev": true, "engines": { "node": ">=4.0" @@ -759,6 +754,24 @@ } } }, + "node_modules/@angular-devkit/build-angular/node_modules/schema-utils": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/@angular-devkit/build-angular/node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", @@ -1602,21 +1615,21 @@ "dev": true }, "node_modules/@babel/code-frame": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", - "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.24.7", - "picocolors": "^1.0.0" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.2.tgz", - "integrity": "sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==", + "version": "7.21.7", + "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -1697,61 +1710,32 @@ } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.24.7.tgz", - "integrity": "sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", - "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.25.2", - "@babel/helper-validator-option": "^7.24.8", - "browserslist": "^4.23.1", + "@babel/compat-data": "^7.21.5", + "@babel/helper-validator-option": "^7.21.0", + "browserslist": "^4.21.3", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/browserslist": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", - "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.1.0" }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { @@ -1763,19 +1747,19 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.8.tgz", - "integrity": "sha512-4f6Oqnmyp2PP3olgUMmOwC3akxSm5aBYraQ6YDdKy7NcAMkDECHWG0DEnV6M2UAkERgIBhYt8S27rURPg7SxWA==", + "version": "7.21.8", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "semver": "^6.3.1" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-member-expression-to-functions": "^7.21.5", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.21.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/helper-split-export-declaration": "^7.18.6", + "semver": "^6.3.0" }, "engines": { "node": ">=6.9.0" @@ -1784,28 +1768,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -1815,11 +1777,11 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.25.2.tgz", - "integrity": "sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==", + "version": "7.21.8", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-annotate-as-pure": "^7.18.6", "regexpu-core": "^5.3.1", "semver": "^6.3.1" }, @@ -1830,17 +1792,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -1912,38 +1863,40 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", - "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8" + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", - "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "version": "7.21.4", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.21.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", - "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.24.7", - "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.2" + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-module-imports": "^7.21.4", + "@babel/helper-simple-access": "^7.21.5", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -1953,32 +1906,33 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", - "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", - "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.0.tgz", - "integrity": "sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==", + "version": "7.18.9", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-wrap-function": "^7.25.0", - "@babel/traverse": "^7.25.0" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -1987,25 +1941,30 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", + "node_modules/@babel/helper-replace-supers": { + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.24.7" + "@babel/helper-environment-visitor": "^7.21.5", + "@babel/helper-member-expression-to-functions": "^7.21.5", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", - "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", + "node_modules/@babel/helper-replace-supers/node_modules/@babel/template": { + "version": "7.20.7", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.24.8", - "@babel/helper-optimise-call-expression": "^7.24.7", - "@babel/traverse": "^7.25.0" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7" }, "engines": { "node": ">=6.9.0" @@ -2015,24 +1974,22 @@ } }, "node_modules/@babel/helper-simple-access": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", - "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", - "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", + "version": "7.20.0", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/types": "^7.20.0" }, "engines": { "node": ">=6.9.0" @@ -2067,68 +2024,70 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", - "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", + "version": "7.21.0", + "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.0.tgz", - "integrity": "sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==", + "version": "7.20.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.25.0", - "@babel/traverse": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function/node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.20.7", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", - "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/template": "^7.20.7", + "@babel/traverse": "^7.21.5", + "@babel/types": "^7.21.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers/node_modules/@babel/template": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", - "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", + "version": "7.20.7", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.25.0", - "@babel/types": "^7.25.0" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", - "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", @@ -2140,9 +2099,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.0.tgz", - "integrity": "sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -2182,11 +2141,11 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.0.tgz", - "integrity": "sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2196,13 +2155,13 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.24.7.tgz", - "integrity": "sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==", + "version": "7.20.7", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-transform-optional-chaining": "^7.24.7" + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", + "@babel/plugin-proposal-optional-chaining": "^7.20.7" }, "engines": { "node": ">=6.9.0" @@ -2282,14 +2241,14 @@ } }, "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.7.tgz", - "integrity": "sha512-RL9GR0pUG5Kc8BUWLNDm2T5OpYwSX15r98I0IkgmRQTXuELq/OynH8xtMTMvTJFjXbMWFVTKtYkTaYQsuAwQlQ==", + "version": "7.21.0", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-decorators": "^7.24.7" + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/plugin-syntax-decorators": "^7.21.0" }, "engines": { "node": ">=6.9.0" @@ -2557,12 +2516,10 @@ } }, "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.7.tgz", - "integrity": "sha512-Ui4uLJJrRV1lb38zg1yYTmRKmiZLiftDEvZN2iq3kd9kUFU+PttmzTbAFC2ucRk/XJmtek6G23gPsuZbhrT8fQ==", + "version": "7.21.0", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -2622,13 +2579,12 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.24.7.tgz", - "integrity": "sha512-hbX+lKKeUMGihnK8nvKqmXBInriT3GVjzXKFriV3YC6APGxMbP8RZNFwy91+hocLXq90Mta+HshoB31802bb8A==", - "peer": true, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.20.0", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.19.0" }, "engines": { "node": ">=6.9.0" @@ -2660,11 +2616,11 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", - "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "version": "7.21.4", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -2768,11 +2724,11 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "version": "7.21.4", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -2798,29 +2754,11 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.24.7.tgz", - "integrity": "sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.0.tgz", - "integrity": "sha512-uaIi2FdqzjpAMvVqvB51S42oC2JEVgh0LDsGfZVDysWE8LrJtQC2jvKmOqEYThKyB7bDEb7BP1GYWDm7tABA0Q==", - "peer": true, + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-remap-async-to-generator": "^7.25.0", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/traverse": "^7.25.0" + "@babel/helper-plugin-utils": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -2847,11 +2785,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.24.7.tgz", - "integrity": "sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2861,11 +2799,11 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.0.tgz", - "integrity": "sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==", + "version": "7.21.0", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -2908,15 +2846,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.0.tgz", - "integrity": "sha512-xyi6qjr/fYU304fiRwFbekzkqVJZ6A7hOjWZd+89FVcBqPV3S9Wuozz82xdpLspckeaafntbzglaW4pqpzvtSw==", + "version": "7.21.0", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-replace-supers": "^7.25.0", - "@babel/traverse": "^7.25.0", + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.21.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.20.7", + "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" }, "engines": { @@ -2926,24 +2867,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.24.7.tgz", - "integrity": "sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/template": "^7.24.7" + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/template": "^7.20.7" }, "engines": { "node": ">=6.9.0" @@ -2953,24 +2883,24 @@ } }, "node_modules/@babel/plugin-transform-computed-properties/node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "version": "7.20.7", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.24.8.tgz", - "integrity": "sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==", + "version": "7.21.3", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -2980,12 +2910,12 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.24.7.tgz", - "integrity": "sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2995,43 +2925,11 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.24.7.tgz", - "integrity": "sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.0.tgz", - "integrity": "sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g==", - "peer": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.25.0", - "@babel/helper-plugin-utils": "^7.24.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-dynamic-import": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.24.7.tgz", - "integrity": "sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==", - "peer": true, + "version": "7.18.9", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -3041,44 +2939,12 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.24.7.tgz", - "integrity": "sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==", - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-export-namespace-from": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.24.7.tgz", - "integrity": "sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==", - "peer": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-flow-strip-types": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.25.2.tgz", - "integrity": "sha512-InBZ0O8tew5V0K6cHcQ+wgxlrjOw1W4wDXLkOTjLRD8GYhTSkxTVBtdy3MMtvYBrbAWa1Qm3hNoTc1620Yj+Mg==", - "peer": true, + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/plugin-syntax-flow": "^7.24.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3088,12 +2954,11 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.24.7.tgz", - "integrity": "sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -3103,29 +2968,13 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.25.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.1.tgz", - "integrity": "sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==", - "dependencies": { - "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/traverse": "^7.25.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.24.7.tgz", - "integrity": "sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==", - "peer": true, + "version": "7.18.9", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -3135,27 +2984,11 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.25.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.2.tgz", - "integrity": "sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.24.7.tgz", - "integrity": "sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==", - "peer": true, + "version": "7.18.9", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -3165,11 +2998,11 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.24.7.tgz", - "integrity": "sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3179,12 +3012,12 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.24.7.tgz", - "integrity": "sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==", + "version": "7.20.11", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -3194,13 +3027,13 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz", - "integrity": "sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-simple-access": "^7.24.7" + "@babel/helper-module-transforms": "^7.21.5", + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/helper-simple-access": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -3210,14 +3043,14 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.25.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.0.tgz", - "integrity": "sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==", + "version": "7.20.11", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.25.0", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "@babel/traverse": "^7.25.0" + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.20.11", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-identifier": "^7.19.1" }, "engines": { "node": ">=6.9.0" @@ -3227,12 +3060,12 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.24.7.tgz", - "integrity": "sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3242,12 +3075,12 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.24.7.tgz", - "integrity": "sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==", + "version": "7.20.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -3257,61 +3090,11 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.24.7.tgz", - "integrity": "sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.24.7.tgz", - "integrity": "sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==", - "peer": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.24.7.tgz", - "integrity": "sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==", - "peer": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.24.7.tgz", - "integrity": "sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==", - "peer": true, + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3321,12 +3104,12 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.24.7.tgz", - "integrity": "sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-replace-supers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3335,14 +3118,12 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.24.7.tgz", - "integrity": "sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==", - "peer": true, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.21.3", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -3351,14 +3132,12 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.24.8.tgz", - "integrity": "sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw==", + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3442,12 +3221,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.24.7.tgz", - "integrity": "sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "regenerator-transform": "^0.15.2" + "@babel/helper-plugin-utils": "^7.21.5", + "regenerator-transform": "^0.15.1" }, "engines": { "node": ">=6.9.0" @@ -3457,11 +3236,11 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.24.7.tgz", - "integrity": "sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3500,11 +3279,11 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.24.7.tgz", - "integrity": "sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3514,12 +3293,12 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.24.7.tgz", - "integrity": "sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==", + "version": "7.20.7", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7" + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" }, "engines": { "node": ">=6.9.0" @@ -3529,11 +3308,11 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.24.7.tgz", - "integrity": "sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3543,11 +3322,11 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.24.7.tgz", - "integrity": "sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==", + "version": "7.18.9", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -3557,11 +3336,11 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.24.8.tgz", - "integrity": "sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw==", + "version": "7.18.9", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.8" + "@babel/helper-plugin-utils": "^7.18.9" }, "engines": { "node": ">=6.9.0" @@ -3571,14 +3350,14 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.8.tgz", - "integrity": "sha512-CgFgtN61BbdOGCP4fLaAMOPkzWUh6yQZNMr5YSt8uz2cZSSiQONCQFWqsE4NeVfOIhqDOlS9CR3WD91FzMeB2Q==", + "version": "7.21.3", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.24.7", - "@babel/helper-create-class-features-plugin": "^7.24.8", - "@babel/helper-plugin-utils": "^7.24.8", - "@babel/plugin-syntax-typescript": "^7.24.7" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.21.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-typescript": "^7.20.0" }, "engines": { "node": ">=6.9.0" @@ -3587,39 +3366,12 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-typescript/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", - "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.24.7.tgz", - "integrity": "sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==", - "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.24.7.tgz", - "integrity": "sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==", - "peer": true, + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.21.5" }, "engines": { "node": ">=6.9.0" @@ -3629,12 +3381,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.24.7.tgz", - "integrity": "sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==", + "version": "7.18.6", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.24.7", - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -3791,15 +3543,15 @@ } }, "node_modules/@babel/preset-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz", - "integrity": "sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==", + "version": "7.21.5", + "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "@babel/plugin-syntax-jsx": "^7.24.7", - "@babel/plugin-transform-modules-commonjs": "^7.24.7", - "@babel/plugin-transform-typescript": "^7.24.7" + "@babel/helper-plugin-utils": "^7.21.5", + "@babel/helper-validator-option": "^7.21.0", + "@babel/plugin-syntax-jsx": "^7.21.4", + "@babel/plugin-transform-modules-commonjs": "^7.21.5", + "@babel/plugin-transform-typescript": "^7.21.3" }, "engines": { "node": ">=6.9.0" @@ -3853,39 +3605,48 @@ "node": ">=6" } }, - "node_modules/@babel/register/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "peer": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "node_modules/@babel/traverse": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", + "debug": "^4.1.0", + "globals": "^11.1.0" }, "engines": { "node": ">=6" } }, - "node_modules/@babel/register/node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "peer": true, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" + "@babel/types": "^7.23.0", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6" } }, - "node_modules/@babel/register/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "peer": true, + "node_modules/@babel/traverse/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dependencies": { - "p-try": "^2.0.0" + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6" @@ -3894,11 +3655,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@babel/register/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "peer": true, + "node_modules/@babel/types": { + "version": "7.23.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", + "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", "dependencies": { "p-limit": "^2.0.0" }, @@ -11927,6 +11687,346 @@ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/client-logger": "6.5.10", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "regenerator-runtime": "^0.13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/types": { + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@storybook/types/-/types-7.6.5.tgz", + "integrity": "sha512-Q757v+fYZZSaEpks/zDL5YgXRozxkgKakXFc+BoQHK5q5sVhJ+0jvpLJiAQAniIIaMIkqY/G24Kd6Uo6UdKBCg==", + "dependencies": { + "@storybook/channels": "7.6.5", + "@types/babel__core": "^7.0.0", + "@types/express": "^4.7.0", + "file-system-cache": "2.3.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/types/node_modules/@storybook/channels": { + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-7.6.5.tgz", + "integrity": "sha512-FIlNkyfQy9uHoJfAFL2/wO3ASGJELFvBzURBE2rcEF/TS7GcUiqWnBfiDxAbwSEjSOm2F0eEq3UXhaZEjpJHDw==", + "dependencies": { + "@storybook/client-logger": "7.6.5", + "@storybook/core-events": "7.6.5", + "@storybook/global": "^5.0.0", + "qs": "^6.10.0", + "telejson": "^7.2.0", + "tiny-invariant": "^1.3.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/types/node_modules/@storybook/client-logger": { + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-7.6.5.tgz", + "integrity": "sha512-S5aROWgssqg7tcs9lgW5wmCAz4SxMAtioiyVj5oFecmPCbQtFVIAREYzeoxE4GfJL+plrfRkum4BzziANn8EhQ==", + "dependencies": { + "@storybook/global": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/types/node_modules/@storybook/core-events": { + "version": "7.6.5", + "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-7.6.5.tgz", + "integrity": "sha512-zk2q/qicYXAzHA4oV3GDbIql+Kd4TOHUgDE8e4jPCOPp856z2ScqEKUAbiJizs6eEJOH4nW9Db1kuzgrBVEykQ==", + "dependencies": { + "ts-dedent": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/types/node_modules/file-system-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/file-system-cache/-/file-system-cache-2.3.0.tgz", + "integrity": "sha512-l4DMNdsIPsVnKrgEXbJwDJsA5mB8rGwHYERMgqQx/xAUtChPJMre1bXBzDEqqVbWv9AIbFezXMxeEkZDSrXUOQ==", + "dependencies": { + "fs-extra": "11.1.1", + "ramda": "0.29.0" + } + }, + "node_modules/@storybook/types/node_modules/fs-extra": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@storybook/types/node_modules/ramda": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.29.0.tgz", + "integrity": "sha512-BBea6L67bYLtdbOqfp8f58fPMqEwx0doL+pAi8TZyp2YWz8R9G8z9x75CZI8W+ftqhFHCpEX2cRnUUXK130iKA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } + }, + "node_modules/@storybook/types/node_modules/telejson": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/telejson/-/telejson-7.2.0.tgz", + "integrity": "sha512-1QTEcJkJEhc8OnStBx/ILRu5J2p0GjvWsBx56bmZRqnrkdBMUe+nX92jxV+p3dB4CP6PZCdJMQJwCggkNBMzkQ==", + "dependencies": { + "memoizerific": "^1.11.3" + } + }, + "node_modules/@storybook/ui": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/addons": "6.5.16", + "@storybook/api": "6.5.16", + "@storybook/channels": "6.5.16", + "@storybook/client-logger": "6.5.16", + "@storybook/components": "6.5.16", + "@storybook/core-events": "6.5.16", + "@storybook/router": "6.5.16", + "@storybook/semver": "^7.3.2", + "@storybook/theming": "6.5.16", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "qs": "^6.10.0", + "regenerator-runtime": "^0.13.7", + "resolve-from": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/addons": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/api": "6.5.16", + "@storybook/channels": "6.5.16", + "@storybook/client-logger": "6.5.16", + "@storybook/core-events": "6.5.16", + "@storybook/csf": "0.0.2--canary.4566f4d.1", + "@storybook/router": "6.5.16", + "@storybook/theming": "6.5.16", + "@types/webpack-env": "^1.16.0", + "core-js": "^3.8.2", + "global": "^4.4.0", + "regenerator-runtime": "^0.13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/api": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/channels": "6.5.16", + "@storybook/client-logger": "6.5.16", + "@storybook/core-events": "6.5.16", + "@storybook/csf": "0.0.2--canary.4566f4d.1", + "@storybook/router": "6.5.16", + "@storybook/semver": "^7.3.2", + "@storybook/theming": "6.5.16", + "core-js": "^3.8.2", + "fast-deep-equal": "^3.1.3", + "global": "^4.4.0", + "lodash": "^4.17.21", + "memoizerific": "^1.11.3", + "regenerator-runtime": "^0.13.7", + "store2": "^2.12.0", + "telejson": "^6.0.8", + "ts-dedent": "^2.0.0", + "util-deprecate": "^1.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/channels": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "core-js": "^3.8.2", + "ts-dedent": "^2.0.0", + "util-deprecate": "^1.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/client-logger": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "core-js": "^3.8.2", + "global": "^4.4.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/components": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/client-logger": "6.5.16", + "@storybook/csf": "0.0.2--canary.4566f4d.1", + "@storybook/theming": "6.5.16", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "qs": "^6.10.0", + "regenerator-runtime": "^0.13.7", + "util-deprecate": "^1.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/core-events": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "core-js": "^3.8.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/router": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/client-logger": "6.5.16", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "qs": "^6.10.0", + "regenerator-runtime": "^0.13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@storybook/ui/node_modules/@storybook/theming": { + "version": "6.5.16", + "dev": true, + "license": "MIT", + "dependencies": { + "@storybook/client-logger": "6.5.16", + "core-js": "^3.8.2", + "memoizerific": "^1.11.3", + "regenerator-runtime": "^0.13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/babel__core": { + "version": "7.20.3", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz", + "integrity": "sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==", "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", @@ -13091,10 +13191,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" }, @@ -13102,6 +13205,12 @@ "node": ">=10" } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/@typescript-eslint/utils": { "version": "5.48.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.2.tgz", @@ -15902,6 +16011,11 @@ "node": ">= 0.12.0" } }, + "node_modules/code-block-writer": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", + "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==" + }, "node_modules/collapse-white-space": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", @@ -16411,32 +16525,12 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/core-js-compat/node_modules/browserslist": { - "version": "4.23.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", - "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "node_modules/core-js-compat": { + "version": "3.30.1", + "dev": true, + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001640", - "electron-to-chromium": "^1.4.820", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" + "browserslist": "^4.21.5" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" @@ -16866,11 +16960,25 @@ } } }, + "node_modules/css-loader/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/css-loader/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" }, @@ -16878,6 +16986,11 @@ "node": ">=10" } }, + "node_modules/css-loader/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, "node_modules/css-minimizer-webpack-plugin": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz", @@ -19101,11 +19214,46 @@ "node": ">=6" } }, + "node_modules/eslint-plugin-unicorn/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, "node_modules/eslint-plugin-unicorn/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" }, @@ -19113,6 +19261,11 @@ "node": ">=10" } }, + "node_modules/eslint-plugin-unicorn/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -28631,9 +28784,13 @@ }, "node_modules/path-browserify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/path-dirname": { + "version": "1.0.2", + "dev": true, + "license": "MIT" }, "node_modules/path-exists": { "version": "4.0.0", @@ -31127,9 +31284,9 @@ "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", - "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", + "version": "0.15.1", + "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.4" } @@ -32229,9 +32386,8 @@ } }, "node_modules/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "version": "7.3.7", + "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -32244,8 +32400,7 @@ }, "node_modules/semver/node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "license": "ISC", "dependencies": { "yallist": "^4.0.0" }, @@ -32255,8 +32410,7 @@ }, "node_modules/semver/node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "license": "ISC" }, "node_modules/send": { "version": "0.18.0", @@ -34396,6 +34550,30 @@ "node": ">=14.18.0" } }, + "node_modules/superagent/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/superagent/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/superagent/node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -35270,6 +35448,15 @@ "node": ">=8" } }, + "node_modules/ts-morph": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz", + "integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==", + "dependencies": { + "@ts-morph/common": "~0.21.0", + "code-block-writer": "^12.0.0" + } + }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", diff --git a/package.json b/package.json index 91ea5332620..09190733879 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "rxjs": "7.8.1", "subscriptions-transport-ws": "^0.11.0", "superagent": "^9.0.1", + "ts-morph": "^20.0.0", "tslib": "^2.6.2", "zone.js": "~0.11.4" }, diff --git a/scripts/github/release/set-migrations.js b/scripts/github/release/set-migrations.js new file mode 100644 index 00000000000..d997a415ac5 --- /dev/null +++ b/scripts/github/release/set-migrations.js @@ -0,0 +1,60 @@ +const fs = require('fs'); +const semver = require('semver'); + +const getFile = (path) => { + const rawFile = fs.readFileSync(path, 'utf8'); + const file = JSON.parse(rawFile); + + return file; +}; + +const setMigration = () => { + const corePackagePath = 'lib/core/package.json'; + const jaApiConfigPackagePath = 'lib/js-api/package.json'; + const coreMigrationConfigPath = 'lib/core/schematics/migrations/collection.json'; + + const corePackage = getFile(corePackagePath); + const coreMigration = getFile(coreMigrationConfigPath); + const jsApiPackage = getFile(jaApiConfigPackagePath); + + const coreVersion = corePackage.version; + + const coreMigrations = [ + { + name: 'move-out-alfresco-api', + allowedVersionScope: '<=7.0.0' + } + ]; + + console.log(`Core version is ${coreVersion}`); + + coreMigrations.forEach((migration) => { + const isCoreVersionValid = semver.satisfies(semver.coerce(coreVersion), migration.allowedVersionScope); + + console.log(`Allowed scope for '${migration.name}' is ${migration.allowedVersionScope}`); + console.log(`${coreVersion} is ${isCoreVersionValid ? 'VALID' : 'NOT VALID'} for ${migration.name}`); + + if (!isCoreVersionValid) { + console.log(`Skipping migration for ${migration.name}`); + return; + } + + coreMigration['schematics'][migration.name]['version'] = coreVersion; + coreMigration['packageJsonUpdates'][migration.name]['version'] = coreVersion; + const packagesToUpdate = coreMigration['packageJsonUpdates'][migration.name]['packages']; + + Object.keys(packagesToUpdate).forEach((packageName) => { + if (packageName === '@alfresco/js-api') { + packagesToUpdate[packageName]['version'] = jsApiPackage.version; + } else { + packagesToUpdate[packageName]['version'] = coreVersion; + } + }); + }); + + console.log('\nmigrations:', JSON.stringify(coreMigration, null, 2)); + + fs.writeFileSync(coreMigrationConfigPath, JSON.stringify(coreMigration, null, 2)); +}; + +module.exports = setMigration;