mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Angular 18 upgrade
This commit is contained in:
parent
e7732d82dd
commit
709e65aae2
@ -299,13 +299,17 @@
|
||||
],
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": ["off", "never"],
|
||||
"unicorn/filename-case": "error"
|
||||
"unicorn/filename-case": "error",
|
||||
"@typescript-eslint/no-extra-semi": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.js"],
|
||||
"extends": ["plugin:@nx/javascript"],
|
||||
"rules": {}
|
||||
"rules": {
|
||||
"@typescript-eslint/no-extra-semi": "error",
|
||||
"no-extra-semi": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -60,4 +60,5 @@ Thumbs.db
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
|
||||
.nx/cache
|
||||
.nx/cache
|
||||
.nx/workspace-data
|
@ -3,4 +3,5 @@ src/assets/i18n
|
||||
/angular.json
|
||||
docs/**/*.md
|
||||
|
||||
/.nx/cache
|
||||
/.nx/cache
|
||||
/.nx/workspace-data
|
155
migrations.json
155
migrations.json
@ -2,125 +2,136 @@
|
||||
"migrations": [
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.1.0-beta.5",
|
||||
"requires": { "@angular/core": ">=17.0.0" },
|
||||
"description": "Update the @angular/cli package version to ~17.0.0.",
|
||||
"factory": "./src/migrations/update-17-1-0/update-angular-cli",
|
||||
"package": "@nx/angular",
|
||||
"name": "update-angular-cli-version-17-0-0"
|
||||
"version": "19.2.0-beta.2",
|
||||
"description": "Updates the default workspace data directory to .nx/workspace-data",
|
||||
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
|
||||
"package": "nx",
|
||||
"name": "19-2-0-move-graph-cache-directory"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.1.0-beta.5",
|
||||
"requires": { "@angular/core": ">=17.0.0" },
|
||||
"description": "Rename 'browserTarget' to 'buildTarget'.",
|
||||
"factory": "./src/migrations/update-17-1-0/browser-target-to-build-target",
|
||||
"package": "@nx/angular",
|
||||
"name": "rename-browser-target-to-build-target"
|
||||
"version": "19.2.2-beta.0",
|
||||
"description": "Updates the nx wrapper.",
|
||||
"implementation": "./src/migrations/update-17-3-0/update-nxw",
|
||||
"package": "nx",
|
||||
"name": "19-2-2-update-nx-wrapper"
|
||||
},
|
||||
{
|
||||
"version": "19.2.4-beta.0",
|
||||
"description": "Set project name in nx.json explicitly",
|
||||
"implementation": "./src/migrations/update-19-2-4/set-project-name",
|
||||
"x-repair-skip": true,
|
||||
"package": "nx",
|
||||
"name": "19-2-4-set-project-name"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.1.0-beta.5",
|
||||
"requires": { "@angular/core": ">=17.0.0" },
|
||||
"description": "Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'.",
|
||||
"factory": "./src/migrations/update-17-1-0/replace-nguniversal-builders",
|
||||
"package": "@nx/angular",
|
||||
"name": "replace-nguniversal-builders"
|
||||
"version": "19.1.0-beta.6",
|
||||
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
|
||||
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
|
||||
"package": "@nx/eslint-plugin",
|
||||
"name": "update-19-1-0-rename-no-extra-semi"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.1.0-beta.5",
|
||||
"requires": { "@angular/core": ">=17.0.0" },
|
||||
"description": "Replace usages of '@nguniversal/' packages with '@angular/ssr'.",
|
||||
"factory": "./src/migrations/update-17-1-0/replace-nguniversal-engines",
|
||||
"version": "19.1.0-beta.2",
|
||||
"requires": { "@angular/core": ">=18.0.0" },
|
||||
"description": "Update the @angular/cli package version to ~18.0.0.",
|
||||
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
|
||||
"package": "@nx/angular",
|
||||
"name": "replace-nguniversal-engines"
|
||||
"name": "update-angular-cli-version-18-0-0"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.1.0-beta.5",
|
||||
"requires": { "@angular/core": ">=17.0.0" },
|
||||
"description": "Replace the deep imports from 'zone.js/dist/zone' and 'zone.js/dist/zone-testing' with 'zone.js' and 'zone.js/testing'.",
|
||||
"factory": "./src/migrations/update-17-1-0/update-zone-js-deep-import",
|
||||
"version": "19.2.1-beta.0",
|
||||
"requires": { "@angular-eslint/eslint-plugin": ">=18.0.0" },
|
||||
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
|
||||
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
|
||||
"package": "@nx/angular",
|
||||
"name": "update-zone-js-deep-import"
|
||||
"name": "add-typescript-eslint-utils"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.2.0-beta.2",
|
||||
"description": "Rename '@nx/angular:webpack-dev-server' executor to '@nx/angular:dev-server'",
|
||||
"factory": "./src/migrations/update-17-2-0/rename-webpack-dev-server",
|
||||
"version": "19.5.0-beta.1",
|
||||
"requires": { "@angular/core": ">=18.1.0" },
|
||||
"description": "Update the @angular/cli package version to ~18.1.0.",
|
||||
"factory": "./src/migrations/update-19-5-0/update-angular-cli",
|
||||
"package": "@nx/angular",
|
||||
"name": "rename-webpack-dev-server-executor"
|
||||
"name": "update-angular-cli-version-18-1-0"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.3.0-beta.10",
|
||||
"requires": { "@angular/core": ">=17.1.0" },
|
||||
"description": "Update the @angular/cli package version to ~17.1.0.",
|
||||
"factory": "./src/migrations/update-17-3-0/update-angular-cli",
|
||||
"version": "19.6.0-beta.4",
|
||||
"description": "Ensure Module Federation DTS is turned off by default.",
|
||||
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default",
|
||||
"package": "@nx/angular",
|
||||
"name": "update-angular-cli-version-17-1-0"
|
||||
"name": "update-19-6-0"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.3.0-beta.10",
|
||||
"requires": { "@angular/core": ">=17.1.0" },
|
||||
"description": "Add 'browser-sync' as dev dependency when '@angular-devkit/build-angular:ssr-dev-server' or '@nx/angular:module-federation-dev-ssr' is used.",
|
||||
"factory": "./src/migrations/update-17-3-0/add-browser-sync-dependency",
|
||||
"version": "19.6.0-beta.7",
|
||||
"requires": { "@angular/core": ">=18.2.0" },
|
||||
"description": "Update the @angular/cli package version to ~18.2.0.",
|
||||
"factory": "./src/migrations/update-19-6-0/update-angular-cli",
|
||||
"package": "@nx/angular",
|
||||
"name": "add-browser-sync-dependency"
|
||||
"name": "update-angular-cli-version-18-2-0"
|
||||
},
|
||||
{
|
||||
"cli": "nx",
|
||||
"version": "17.3.0-beta.10",
|
||||
"requires": { "@angular/core": ">=17.1.0" },
|
||||
"description": "Add 'autoprefixer' as dev dependency when '@nx/angular:ng-packagr-lite' or '@nx/angular:package` is used.",
|
||||
"factory": "./src/migrations/update-17-3-0/add-autoprefixer-dependency",
|
||||
"version": "19.6.1-beta.0",
|
||||
"description": "Ensure Target Defaults are set correctly for Module Federation.",
|
||||
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf",
|
||||
"package": "@nx/angular",
|
||||
"name": "add-autoprefixer-dependency"
|
||||
"name": "update-19-6-1-ensure-module-federation-target-defaults"
|
||||
},
|
||||
{
|
||||
"version": "17.0.0",
|
||||
"description": "Angular v17 introduces a new control flow syntax that uses the @ and } characters. This migration replaces the existing usages with their corresponding HTML entities.",
|
||||
"factory": "./migrations/block-template-entities/bundle",
|
||||
"version": "18.0.0",
|
||||
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
|
||||
"factory": "./migrations/invalid-two-way-bindings/bundle",
|
||||
"package": "@angular/core",
|
||||
"name": "block-template-entities"
|
||||
"name": "invalid-two-way-bindings"
|
||||
},
|
||||
{
|
||||
"version": "17.0.0",
|
||||
"description": "CompilerOption.useJit and CompilerOption.missingTranslation are unused under Ivy. This migration removes their usage",
|
||||
"factory": "./migrations/compiler-options/bundle",
|
||||
"version": "18.0.0",
|
||||
"description": "Replace deprecated HTTP related modules with provider functions",
|
||||
"factory": "./migrations/http-providers/bundle",
|
||||
"package": "@angular/core",
|
||||
"name": "migration-v17-compiler-options"
|
||||
"name": "migration-http-providers"
|
||||
},
|
||||
{
|
||||
"version": "17.0.0",
|
||||
"description": "Updates `TransferState`, `makeStateKey`, `StateKey` imports from `@angular/platform-browser` to `@angular/core`.",
|
||||
"factory": "./migrations/transfer-state/bundle",
|
||||
"version": "18.1.0",
|
||||
"description": "Updates calls to afterRender with an explicit phase to the new API",
|
||||
"factory": "./migrations/after-render-phase/bundle",
|
||||
"package": "@angular/core",
|
||||
"name": "migration-transfer-state"
|
||||
"name": "migration-after-render-phase"
|
||||
},
|
||||
{
|
||||
"version": "17.0.0-0",
|
||||
"description": "Updates Angular Material to v17",
|
||||
"factory": "./ng-update/index_bundled#updateToV17",
|
||||
"version": "18.0.0-0",
|
||||
"description": "Updates Angular Material to v18",
|
||||
"factory": "./ng-update/index_bundled#updateToV18",
|
||||
"package": "@angular/material",
|
||||
"name": "migration-v17"
|
||||
"name": "migration-v18"
|
||||
},
|
||||
{
|
||||
"version": "17.0.0-0",
|
||||
"description": "Updates the Angular CDK to v17",
|
||||
"factory": "./ng-update/index#updateToV17",
|
||||
"version": "18.0.0-0",
|
||||
"description": "Updates the Angular CDK to v18",
|
||||
"factory": "./ng-update/index#updateToV18",
|
||||
"package": "@angular/cdk",
|
||||
"name": "migration-v17"
|
||||
"name": "migration-v18"
|
||||
},
|
||||
{
|
||||
"description": "The road to v17-beta.1",
|
||||
"version": "17.0.0-beta",
|
||||
"factory": "./17_0_0-beta/index",
|
||||
"package": "@ngrx/store-devtools",
|
||||
"name": "ngrx-store-devtools-migration-17-0-0-beta"
|
||||
"description": "As of NgRx v18, the `TypedAction` has been removed in favor of `Action`.",
|
||||
"version": "18-beta",
|
||||
"factory": "./18_0_0-beta/index",
|
||||
"package": "@ngrx/store",
|
||||
"name": "ngrx-store-migration-18-beta"
|
||||
},
|
||||
{
|
||||
"description": "As of NgRx v18, the `concatLatestFrom` import has been removed from `@ngrx/effects` in favor of the `@ngrx/operators` package.",
|
||||
"version": "18-beta",
|
||||
"factory": "./18_0_0-beta/index",
|
||||
"package": "@ngrx/effects",
|
||||
"name": "ngrx-effects-migration-18-beta"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
12555
package-lock.json
generated
12555
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
84
package.json
84
package.json
@ -30,28 +30,29 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "8.1.0-14664375052",
|
||||
"@alfresco/adf-core": "8.1.0-14664375052",
|
||||
"@alfresco/adf-extensions": "8.1.0-14664375052",
|
||||
"@alfresco/eslint-plugin-eslint-angular": "8.1.0-14664375052",
|
||||
"@alfresco/js-api": "9.1.0-14664375052",
|
||||
"@angular/animations": "17.1.3",
|
||||
"@angular/cdk": "17.1.2",
|
||||
"@angular/common": "17.1.3",
|
||||
"@angular/compiler": "17.1.3",
|
||||
"@angular/core": "17.1.3",
|
||||
"@angular/forms": "17.1.3",
|
||||
"@angular/material": "17.1.2",
|
||||
"@angular/material-date-fns-adapter": "17.1.2",
|
||||
"@angular/platform-browser": "17.1.3",
|
||||
"@angular/platform-browser-dynamic": "17.1.3",
|
||||
"@angular/router": "17.1.3",
|
||||
"@alfresco/adf-content-services": "7.0.0-alpha.9-13833690161",
|
||||
"@alfresco/adf-core": "7.0.0-alpha.9-13833690161",
|
||||
"@alfresco/adf-extensions": "7.0.0-alpha.9-13833690161",
|
||||
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.9-13833690161",
|
||||
"@alfresco/js-api": "8.0.0-alpha.9-13833690161",
|
||||
"@angular/animations": "18.2.9",
|
||||
"@angular/cdk": "18.2.9",
|
||||
"@angular/common": "18.2.9",
|
||||
"@angular/compiler": "18.2.9",
|
||||
"@angular/core": "18.2.9",
|
||||
"@angular/forms": "18.2.9",
|
||||
"@angular/material": "18.2.9",
|
||||
"@angular/material-date-fns-adapter": "18.2.9",
|
||||
"@angular/platform-browser": "18.2.9",
|
||||
"@angular/platform-browser-dynamic": "18.2.9",
|
||||
"@angular/router": "18.2.9",
|
||||
"@fontsource/open-sans": "^5.1.0",
|
||||
"@mat-datetimepicker/core": "13.0.2",
|
||||
"@ngrx/effects": "17.0.1",
|
||||
"@ngrx/router-store": "17.0.1",
|
||||
"@ngrx/store": "17.0.1",
|
||||
"@ngrx/store-devtools": "17.0.1",
|
||||
"@mat-datetimepicker/core": "14.0.0",
|
||||
"@ngrx/effects": "18.1.1",
|
||||
"@ngrx/operators": "^18.0.0",
|
||||
"@ngrx/router-store": "18.1.1",
|
||||
"@ngrx/store": "18.1.1",
|
||||
"@ngrx/store-devtools": "18.1.1",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"date-fns": "^2.30.0",
|
||||
"katex": "^0.16.21",
|
||||
@ -63,28 +64,28 @@
|
||||
"prismjs": "^1.30.0",
|
||||
"rxjs": "7.8.1",
|
||||
"tslib": "2.8.1",
|
||||
"zone.js": "0.14.8"
|
||||
"zone.js": "0.14.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alfresco/adf-cli": "8.1.0-14664375052",
|
||||
"@angular-devkit/build-angular": "17.3.16",
|
||||
"@angular-devkit/core": "17.1.4",
|
||||
"@angular-devkit/schematics": "17.1.4",
|
||||
"@angular-eslint/builder": "17.0.0",
|
||||
"@angular-eslint/eslint-plugin": "17.0.1",
|
||||
"@angular-eslint/eslint-plugin-template": "17.0.1",
|
||||
"@angular-eslint/schematics": "17.1.1",
|
||||
"@angular-eslint/template-parser": "17.0.1",
|
||||
"@angular/cli": "17.1.3",
|
||||
"@angular/compiler-cli": "17.1.3",
|
||||
"@angular/language-service": "17.1.3",
|
||||
"@alfresco/adf-cli": "7.0.0-alpha.9-13833690161",
|
||||
"@angular-devkit/build-angular": "18.2.9",
|
||||
"@angular-devkit/core": "18.2.9",
|
||||
"@angular-devkit/schematics": "18.2.9",
|
||||
"@angular-eslint/builder": "18.4.3",
|
||||
"@angular-eslint/eslint-plugin": "18.4.3",
|
||||
"@angular-eslint/eslint-plugin-template": "18.4.3",
|
||||
"@angular-eslint/schematics": "18.4.3",
|
||||
"@angular-eslint/template-parser": "18.4.3",
|
||||
"@angular/cli": "~18.2.0",
|
||||
"@angular/compiler-cli": "18.2.9",
|
||||
"@angular/language-service": "18.2.9",
|
||||
"@cspell/eslint-plugin": "^8.14.1",
|
||||
"@nx/angular": "17.3.2",
|
||||
"@nx/eslint-plugin": "17.3.2",
|
||||
"@nx/workspace": "17.3.2",
|
||||
"@nx/angular": "19.8.9",
|
||||
"@nx/eslint-plugin": "19.8.9",
|
||||
"@nx/workspace": "19.8.9",
|
||||
"@playwright/test": "^1.47.2",
|
||||
"@reportportal/agent-js-playwright": "^5.1.9",
|
||||
"@schematics/angular": "17.1.4",
|
||||
"@schematics/angular": "18.2.9",
|
||||
"@types/event-emitter": "^0.3.3",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "^2.0.8",
|
||||
@ -92,6 +93,7 @@
|
||||
"@types/superagent": "^4.1.10",
|
||||
"@typescript-eslint/eslint-plugin": "6.21.0",
|
||||
"@typescript-eslint/parser": "6.21.0",
|
||||
"@typescript-eslint/utils": "^7.16.0",
|
||||
"dotenv": "16.4.5",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"eslint": "^8.42.0",
|
||||
@ -114,13 +116,13 @@
|
||||
"karma-jasmine-html-reporter": "^2.0.0",
|
||||
"karma-mocha-reporter": "^2.2.5",
|
||||
"lint-staged": "^15.2.7",
|
||||
"ng-packagr": "17.1.2",
|
||||
"ng-packagr": "18.2.1",
|
||||
"node-stream-zip": "^1.14.0",
|
||||
"nx": "17.3.2",
|
||||
"nx": "19.8.9",
|
||||
"prettier": "2.8.8",
|
||||
"stylelint": "^15.11.0",
|
||||
"stylelint-config-standard-scss": "^7.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "5.3.3"
|
||||
"typescript": "5.5.4"
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ import { NodeEntry } from '@alfresco/js-api';
|
||||
import { of } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ContentActionType } from '@alfresco/adf-extensions';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
|
||||
const mockNode = {
|
||||
@ -59,7 +59,6 @@ describe('DatatableCellBadgesComponent', () => {
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
AuthModule.forRoot(),
|
||||
HttpClientModule,
|
||||
StoreModule.forRoot(
|
||||
{ app: (state) => state },
|
||||
{
|
||||
@ -76,7 +75,7 @@ describe('DatatableCellBadgesComponent', () => {
|
||||
}
|
||||
)
|
||||
],
|
||||
providers: [Actions]
|
||||
providers: [Actions, provideHttpClient(withInterceptorsFromDi())]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(DatatableCellBadgesComponent);
|
||||
|
@ -26,7 +26,7 @@ import { CustomNameColumnComponent } from './name-column.component';
|
||||
import { Actions } from '@ngrx/effects';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AuthModule } from '@alfresco/adf-core';
|
||||
@ -49,7 +49,6 @@ describe('CustomNameColumnComponent', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
HttpClientModule,
|
||||
TranslateModule.forRoot(),
|
||||
CustomNameColumnComponent,
|
||||
MockDatatableCellBadgesComponent,
|
||||
@ -70,7 +69,7 @@ describe('CustomNameColumnComponent', () => {
|
||||
}
|
||||
)
|
||||
],
|
||||
providers: [Actions]
|
||||
providers: [Actions, provideHttpClient(withInterceptorsFromDi())]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(CustomNameColumnComponent);
|
||||
|
@ -25,7 +25,7 @@
|
||||
import { HomeComponent } from './home.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Router } from '@angular/router';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppSettingsService } from '@alfresco/aca-shared';
|
||||
|
||||
@ -36,7 +36,8 @@ describe('HomeComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientModule, RouterTestingModule, HomeComponent]
|
||||
imports: [RouterTestingModule, HomeComponent],
|
||||
providers: [provideHttpClient(withInterceptorsFromDi())]
|
||||
});
|
||||
appSettings = TestBed.inject(AppSettingsService);
|
||||
spyOnProperty(appSettings, 'landingPage', 'get').and.returnValue('/my-mock-landing-page');
|
||||
|
@ -25,16 +25,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TranslationService, TranslationMock, AuthenticationService, PageTitleService } from '@alfresco/adf-core';
|
||||
import { AuthenticationService, PageTitleService, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock, DiscoveryApiService, SearchQueryBuilderService } from '@alfresco/adf-content-services';
|
||||
import { RepositoryInfo, VersionInfo } from '@alfresco/js-api';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
import { appReducer } from '../store/reducers/app.reducer';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { INITIAL_STATE } from '../store/initial-state';
|
||||
import { BehaviorSubject, Observable, Subject, of } from 'rxjs';
|
||||
import { BehaviorSubject, Observable, of, Subject } from 'rxjs';
|
||||
import { ContentManagementService } from '../services/content-management.service';
|
||||
import { DocumentBasePageService } from '@alfresco/aca-shared';
|
||||
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
@ -42,9 +42,9 @@ import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { MatIconTestingModule } from '@angular/material/icon/testing';
|
||||
|
||||
@NgModule({
|
||||
exports: [RouterTestingModule, TranslateModule],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
HttpClientModule,
|
||||
RouterTestingModule,
|
||||
TranslateModule.forRoot(),
|
||||
StoreModule.forRoot(
|
||||
@ -62,7 +62,6 @@ import { MatIconTestingModule } from '@angular/material/icon/testing';
|
||||
MatDialogModule,
|
||||
MatIconTestingModule
|
||||
],
|
||||
exports: [RouterTestingModule, TranslateModule],
|
||||
providers: [
|
||||
SearchQueryBuilderService,
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
@ -98,7 +97,8 @@ import { MatIconTestingModule } from '@angular/material/icon/testing';
|
||||
{
|
||||
provide: PageTitleService,
|
||||
useValue: {}
|
||||
}
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
})
|
||||
export class AppTestingModule {}
|
||||
|
@ -11,7 +11,7 @@ body {
|
||||
|
||||
font-size: 14px;
|
||||
font-family: 'Open Sans', serif;
|
||||
color: mat.get-color-from-palette($foreground, text, 0.87);
|
||||
color: mat.m2-get-color-from-palette($foreground, text, 0.87);
|
||||
margin: 0;
|
||||
|
||||
& > main {
|
||||
|
@ -6,25 +6,25 @@
|
||||
@import './overrides/adf-about.theme';
|
||||
@import './colors';
|
||||
|
||||
$mat-primary-palette: mat.define-palette($aca-primary-blue, A100);
|
||||
$mat-accent-palette: mat.define-palette($aca-accent-green, A200);
|
||||
$mat-warn-palette: mat.define-palette($aca-warn, A100);
|
||||
$app-typography: mat.define-typography-config(
|
||||
$mat-primary-palette: mat.m2-define-palette($aca-primary-blue, A100);
|
||||
$mat-accent-palette: mat.m2-define-palette($aca-accent-green, A200);
|
||||
$mat-warn-palette: mat.m2-define-palette($aca-warn, A100);
|
||||
$app-typography: mat.m2-define-typography-config(
|
||||
$font-family: 'Open Sans',
|
||||
$headline-1: mat.define-typography-level(112px, 112px, 300),
|
||||
$headline-2: mat.define-typography-level(56px, 56px, 400),
|
||||
$headline-3: mat.define-typography-level(45px, 48px, 400),
|
||||
$headline-4: mat.define-typography-level(34px, 40px, 400),
|
||||
$headline-5: mat.define-typography-level(24px, 32px, 400),
|
||||
$headline-6: mat.define-typography-level(20px, 32px, 400),
|
||||
$subtitle-1: mat.define-typography-level(16px, 28px, 400),
|
||||
$subtitle-2: mat.define-typography-level(14px, 24px, 500),
|
||||
$body-2: mat.define-typography-level(14px, 24px, 500),
|
||||
$body-1: mat.define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.define-typography-level(12px, 20px, 400),
|
||||
$button: mat.define-typography-level(14px, 14px, 500)
|
||||
$headline-1: mat.m2-define-typography-level(112px, 112px, 300),
|
||||
$headline-2: mat.m2-define-typography-level(56px, 56px, 400),
|
||||
$headline-3: mat.m2-define-typography-level(45px, 48px, 400),
|
||||
$headline-4: mat.m2-define-typography-level(34px, 40px, 400),
|
||||
$headline-5: mat.m2-define-typography-level(24px, 32px, 400),
|
||||
$headline-6: mat.m2-define-typography-level(20px, 32px, 400),
|
||||
$subtitle-1: mat.m2-define-typography-level(16px, 28px, 400),
|
||||
$subtitle-2: mat.m2-define-typography-level(14px, 24px, 500),
|
||||
$body-2: mat.m2-define-typography-level(14px, 24px, 500),
|
||||
$body-1: mat.m2-define-typography-level(14px, 20px, 400),
|
||||
$caption: mat.m2-define-typography-level(12px, 20px, 400),
|
||||
$button: mat.m2-define-typography-level(14px, 14px, 500)
|
||||
);
|
||||
$custom-theme: mat.define-light-theme(
|
||||
$custom-theme: mat.m2-define-light-theme(
|
||||
(
|
||||
color: (
|
||||
primary: $mat-primary-palette,
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
$foreground: map-get($custom-theme, foreground);
|
||||
$background: map-get($custom-theme, background);
|
||||
$background-color: mat.get-color-from-palette($background, background);
|
||||
$background-card-color: mat.get-color-from-palette($background, card);
|
||||
$text-color: mat.get-color-from-palette($foreground, text);
|
||||
$secondary-text: mat.get-color-from-palette($foreground, secondary-text);
|
||||
$background-color: mat.m2-get-color-from-palette($background, background);
|
||||
$background-card-color: mat.m2-get-color-from-palette($background, card);
|
||||
$text-color: mat.m2-get-color-from-palette($foreground, text);
|
||||
$secondary-text: mat.m2-get-color-from-palette($foreground, secondary-text);
|
||||
|
||||
// Custom variables - ACA specific styling:
|
||||
$data-table-thumbnail-width: 35px;
|
||||
@ -44,7 +44,7 @@ $action-button-text-color: lighten($text-color, 35%);
|
||||
$page-layout-header-background-color: $background-card-color;
|
||||
$search-chip-icon-color: #757575;
|
||||
$disabled-chip-background-color: #f5f5f5;
|
||||
$contrast-gray: mat.get-color-from-palette($foreground, 'secondary-tex');
|
||||
$contrast-gray: mat.m2-get-color-from-palette($foreground, 'secondary-tex');
|
||||
$search-highlight-background-color: #ffd180;
|
||||
$info-snackbar-background: #1f74db;
|
||||
$text-light-color: rgba(33, 35, 40, 0.7);
|
||||
@ -57,22 +57,22 @@ $light-grey-3: #dedede;
|
||||
$defaults: (
|
||||
--theme-background-color: $background-color,
|
||||
--theme-search-background-color: darken($background-color, 1),
|
||||
--theme-text-color: mat.get-color-from-palette($foreground, text, 0.54),
|
||||
--theme-sidenav-text-color: mat.get-color-from-palette($foreground, text),
|
||||
--theme-sidenav-hovered-text-color: mat.get-color-from-palette($foreground, text),
|
||||
--theme-sidenav-user-menu-color: mat.get-color-from-palette($foreground, text),
|
||||
--theme-tab-active-text-color: mat.get-color-from-palette($foreground, text),
|
||||
--theme-text-bold-color: mat.get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-title-color: mat.get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-text-disabled-color: mat.get-color-from-palette($foreground, text, 0.38),
|
||||
--theme-border-color: mat.get-color-from-palette($foreground, text, 0.07),
|
||||
--theme-card-background-color: mat.get-color-from-palette($background, card),
|
||||
--theme-foreground-text-color: mat.get-color-from-palette($foreground, text, 0.72),
|
||||
--theme-foreground-text-bold-color: mat.get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-secondary-text-color: mat.get-color-from-palette($foreground, secondary-text),
|
||||
--theme-divider-color: mat.get-color-from-palette($foreground, divider, 0.07),
|
||||
--theme-dialog-background-color: mat.get-color-from-palette($background, dialog),
|
||||
--theme-header-text-color: mat.get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-text-color: mat.m2-get-color-from-palette($foreground, text, 0.54),
|
||||
--theme-sidenav-text-color: mat.m2-get-color-from-palette($foreground, text),
|
||||
--theme-sidenav-hovered-text-color: mat.m2-get-color-from-palette($foreground, text),
|
||||
--theme-sidenav-user-menu-color: mat.m2-get-color-from-palette($foreground, text),
|
||||
--theme-tab-active-text-color: mat.m2-get-color-from-palette($foreground, text),
|
||||
--theme-text-bold-color: mat.m2-get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-title-color: mat.m2-get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-text-disabled-color: mat.m2-get-color-from-palette($foreground, text, 0.38),
|
||||
--theme-border-color: mat.m2-get-color-from-palette($foreground, text, 0.07),
|
||||
--theme-card-background-color: mat.m2-get-color-from-palette($background, card),
|
||||
--theme-foreground-text-color: mat.m2-get-color-from-palette($foreground, text, 0.72),
|
||||
--theme-foreground-text-bold-color: mat.m2-get-color-from-palette($foreground, text, 0.87),
|
||||
--theme-secondary-text-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||
--theme-divider-color: mat.m2-get-color-from-palette($foreground, divider, 0.07),
|
||||
--theme-dialog-background-color: mat.m2-get-color-from-palette($background, dialog),
|
||||
--theme-header-text-color: mat.m2-get-color-from-palette($foreground, text, 0.87),
|
||||
--new-button-font-size: 0.9rem,
|
||||
--theme-grey-text-background-color: $grey-text-background,
|
||||
--theme-grey-background-color: $grey-background,
|
||||
@ -86,10 +86,10 @@ $defaults: (
|
||||
--theme-dropdown-color: $theme-dropdown-background,
|
||||
--theme-dropdown-background-hover: $theme-dropdown-background-hover,
|
||||
--theme-grey-divider-color: $grey-divider,
|
||||
--theme-pagination-background-color: mat.get-color-from-palette($background, background),
|
||||
--theme-pagination-background-color: mat.m2-get-color-from-palette($background, background),
|
||||
--theme-about-panel-border-color: $grey-background,
|
||||
--theme-about-panel-background-color: mat.get-color-from-palette($background, card),
|
||||
--theme-about-panel-title-color: mat.get-color-from-palette($foreground, text),
|
||||
--theme-about-panel-background-color: mat.m2-get-color-from-palette($background, card),
|
||||
--theme-about-panel-title-color: mat.m2-get-color-from-palette($foreground, text),
|
||||
--theme-datetimepicker-font-color: $datetimepicker-font-color,
|
||||
--theme-datetimepicker-selected-date-background: $datetimepicker-selected-date-background,
|
||||
--theme-datetimepicker-cell-background: $datetimepicker-cell-background-color,
|
||||
|
@ -29,7 +29,7 @@ import { FavoritePaging, NodePaging, SharedLinkPaging } from '@alfresco/js-api';
|
||||
import { ViewerService } from './viewer.service';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
const list = {
|
||||
list: {
|
||||
@ -69,8 +69,14 @@ describe('ViewerService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [TranslateModule.forRoot(), HttpClientModule],
|
||||
providers: [{ provide: TranslationService, useClass: TranslationMock }, ViewerService, UserPreferencesService, ContentApiService]
|
||||
imports: [TranslateModule.forRoot()],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
ViewerService,
|
||||
UserPreferencesService,
|
||||
ContentApiService,
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
});
|
||||
|
||||
preferences = TestBed.inject(UserPreferencesService);
|
||||
|
@ -26,7 +26,8 @@ import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { PluginEnabledGuard } from './plugin-enabled.guard';
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from '@angular/router';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
|
||||
describe('PluginEnabledGuard', () => {
|
||||
let getSpy: jasmine.Spy<(key: string, defaultValue?: boolean) => boolean>;
|
||||
@ -34,7 +35,8 @@ describe('PluginEnabledGuard', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule]
|
||||
imports: [],
|
||||
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||
});
|
||||
getSpy = spyOn(TestBed.inject(AppConfigService), 'get');
|
||||
route = new ActivatedRouteSnapshot();
|
||||
|
@ -26,15 +26,15 @@ import { AppService } from './app.service';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import {
|
||||
AuthenticationService,
|
||||
NotificationService,
|
||||
PageTitleService,
|
||||
StorageService,
|
||||
TranslationMock,
|
||||
TranslationService,
|
||||
UserPreferencesService,
|
||||
NotificationService,
|
||||
StorageService
|
||||
UserPreferencesService
|
||||
} from '@alfresco/adf-core';
|
||||
import { BehaviorSubject, Observable, of, Subject } from 'rxjs';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import {
|
||||
AlfrescoApiService,
|
||||
AlfrescoApiServiceMock,
|
||||
@ -73,7 +73,7 @@ describe('AppService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CommonModule, HttpClientModule, TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), MatDialogModule, MatSnackBarModule],
|
||||
imports: [CommonModule, TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), MatDialogModule, MatSnackBarModule],
|
||||
providers: [
|
||||
SearchQueryBuilderService,
|
||||
provideMockStore({}),
|
||||
@ -121,7 +121,8 @@ describe('AppService', () => {
|
||||
setStoragePrefix: () => null,
|
||||
getPropertyKey: (property: string) => `prefix__${property}`
|
||||
}
|
||||
}
|
||||
},
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -27,7 +27,7 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TranslateLoaderService, TranslationMock, TranslationService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { StoreModule } from '@ngrx/store';
|
||||
@ -93,10 +93,10 @@ export class DocumentBasePageServiceMock extends DocumentBasePageService {
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
exports: [TranslateModule],
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
RouterTestingModule,
|
||||
MatIconTestingModule,
|
||||
StoreModule,
|
||||
@ -119,10 +119,10 @@ export class DocumentBasePageServiceMock extends DocumentBasePageService {
|
||||
}
|
||||
})
|
||||
],
|
||||
exports: [TranslateModule],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock }
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
})
|
||||
export class LibTestingModule {}
|
||||
|
@ -27,11 +27,11 @@
|
||||
"@alfresco/aca-content/ms-office": ["projects/aca-content/ms-office/src/public-api.ts"],
|
||||
"@alfresco/aca-content/preview": ["projects/aca-content/preview/src/public-api.ts"],
|
||||
"@alfresco/aca-content/viewer": ["projects/aca-content/viewer/src/public-api.ts"],
|
||||
"@alfresco/aca-playwright-shared": ["projects/aca-playwright-shared/src/public-api.ts"],
|
||||
"@alfresco/aca-playwright-shared/*": ["projects/aca-playwright-shared/src/*/index.ts"],
|
||||
"@alfresco/aca-shared": ["projects/aca-shared/src/public-api.ts"],
|
||||
"@alfresco/aca-shared/rules": ["projects/aca-shared/rules/src/public-api.ts"],
|
||||
"@alfresco/aca-shared/store": ["projects/aca-shared/store/src/public-api.ts"],
|
||||
"@alfresco/aca-playwright-shared": ["projects/aca-playwright-shared/src/public-api.ts"],
|
||||
"@alfresco/aca-playwright-shared/*": ["projects/aca-playwright-shared/src/*/index.ts"],
|
||||
"package.json": ["package.json"]
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user