Angular 18 upgrade (#4448)

This commit is contained in:
dominikiwanekhyland
2025-05-15 14:39:45 +02:00
committed by GitHub
parent 4357fe9c08
commit 74e82c85a4
19 changed files with 6445 additions and 8032 deletions

View File

@@ -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"],

1
.gitignore vendored
View File

@@ -61,3 +61,4 @@ Thumbs.db
/playwright/.cache/
.nx/cache
.nx/workspace-data

2
.nvmrc
View File

@@ -1 +1 @@
20.18.1
22.14.0

View File

@@ -4,3 +4,4 @@ src/assets/i18n
docs/**/*.md
/.nx/cache
/.nx/workspace-data

View File

@@ -1,6 +1,6 @@
# 1. Generate licenses
FROM node:20.18-alpine3.21 AS builder
FROM node:22.14.0-alpine AS builder
WORKDIR /usr/src/alfresco
COPY package.json package.json

View File

@@ -1,126 +0,0 @@
{
"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"
},
{
"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"
},
{
"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"
},
{
"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",
"package": "@nx/angular",
"name": "replace-nguniversal-engines"
},
{
"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",
"package": "@nx/angular",
"name": "update-zone-js-deep-import"
},
{
"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",
"package": "@nx/angular",
"name": "rename-webpack-dev-server-executor"
},
{
"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",
"package": "@nx/angular",
"name": "update-angular-cli-version-17-1-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",
"package": "@nx/angular",
"name": "add-browser-sync-dependency"
},
{
"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",
"package": "@nx/angular",
"name": "add-autoprefixer-dependency"
},
{
"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",
"package": "@angular/core",
"name": "block-template-entities"
},
{
"version": "17.0.0",
"description": "CompilerOption.useJit and CompilerOption.missingTranslation are unused under Ivy. This migration removes their usage",
"factory": "./migrations/compiler-options/bundle",
"package": "@angular/core",
"name": "migration-v17-compiler-options"
},
{
"version": "17.0.0",
"description": "Updates `TransferState`, `makeStateKey`, `StateKey` imports from `@angular/platform-browser` to `@angular/core`.",
"factory": "./migrations/transfer-state/bundle",
"package": "@angular/core",
"name": "migration-transfer-state"
},
{
"version": "17.0.0-0",
"description": "Updates Angular Material to v17",
"factory": "./ng-update/index_bundled#updateToV17",
"package": "@angular/material",
"name": "migration-v17"
},
{
"version": "17.0.0-0",
"description": "Updates the Angular CDK to v17",
"factory": "./ng-update/index#updateToV17",
"package": "@angular/cdk",
"name": "migration-v17"
},
{
"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"
}
]
}

13845
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,61 +30,62 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "8.1.0-14976464614",
"@alfresco/adf-core": "8.1.0-14976464614",
"@alfresco/adf-extensions": "8.1.0-14976464614",
"@alfresco/eslint-plugin-eslint-angular": "8.1.0-14976464614",
"@alfresco/js-api": "9.1.0-14976464614",
"@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": "8.1.0-15043883503",
"@alfresco/adf-core": "8.1.0-15043883503",
"@alfresco/adf-extensions": "8.1.0-15043883503",
"@alfresco/eslint-plugin-eslint-angular": "8.1.0-15043883503",
"@alfresco/js-api": "9.1.0-15043883503",
"@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.1.1",
"@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",
"material-icons": "^1.13.12",
"mermaid": "^11.5.0",
"minimatch-browser": "^1.0.0",
"ngx-markdown": "^17.2.1",
"ngx-markdown": "18.1.0",
"pdfjs-dist": "^5.1.91",
"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-14976464614",
"@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": "8.1.0-15043883503",
"@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.15",
"@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": "3.5.3",
"stylelint": "^15.11.0",
"stylelint-config-standard-scss": "^7.0.1",
"ts-node": "^10.9.2",
"typescript": "5.3.3"
"typescript": "5.5.4"
}
}

View File

@@ -18,8 +18,8 @@
"zone.js": ">=0.11.8"
},
"dependencies": {
"tslib": "^2.3.0",
"ngx-markdown": "^17.2.1"
"tslib": ">=2.3.0",
"ngx-markdown": ">=17.2.1"
},
"publishConfig": {
"access": "public"

View File

@@ -29,7 +29,7 @@ import { ActivatedRoute } from '@angular/router';
import { BehaviorSubject, of, Subject } from 'rxjs';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppHookService, ContentApiService } from '@alfresco/aca-shared';
import { AppExtensionService, AppHookService, ContentApiService } from '@alfresco/aca-shared';
import { NavigateToFolder, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
import { Node, NodeEntry, PathElement } from '@alfresco/js-api';
import { RouterTestingModule } from '@angular/router/testing';
@@ -57,14 +57,7 @@ describe('DetailsComponent', () => {
select: () => mockStream
};
const extensionsServiceMock = {
getAllowedSidebarActions: jasmine.createSpy('getAllowedSidebarActions')
};
const mockAspectActions: ContentActionRef[] = [];
const mockAspectActionsSubject$ = new BehaviorSubject(mockAspectActions);
extensionsServiceMock.getAllowedSidebarActions.and.returnValue(mockAspectActionsSubject$.asObservable());
const mockAspectActionsSubject$ = new BehaviorSubject<Array<ContentActionRef>>([]);
const getBreadcrumb = (): BreadcrumbComponent => fixture.debugElement.query(By.directive(BreadcrumbComponent)).componentInstance;
@@ -99,6 +92,9 @@ describe('DetailsComponent', () => {
schemas: [NO_ERRORS_SCHEMA]
});
const appExtensionService = TestBed.inject(AppExtensionService);
spyOn(appExtensionService, 'getAllowedSidebarActions').and.returnValue(mockAspectActionsSubject$.asObservable());
fixture = TestBed.createComponent(DetailsComponent);
component = fixture.componentInstance;
contentApiService = TestBed.inject(ContentApiService);
@@ -130,6 +126,33 @@ describe('DetailsComponent', () => {
fixture.destroy();
});
it('should set aspectActions from extension mock', () => {
const extensionMock = [
{
id: 'app.sidebar.close',
order: 100,
title: 'close',
icon: 'highlight_off'
} as ContentActionRef
];
mockAspectActionsSubject$.next(extensionMock);
fixture.detectChanges();
expect(component.aspectActions).toEqual([
{
id: 'app.sidebar.close',
order: 100,
title: 'close',
icon: 'highlight_off'
} as ContentActionRef
]);
});
describe('', () => {
beforeEach(() => {
mockAspectActionsSubject$.next([]);
});
it('should get node id from router', () => {
fixture.detectChanges();
expect(component.nodeId).toBe('someId');
@@ -175,10 +198,9 @@ describe('DetailsComponent', () => {
});
it('should set aspectActions from extensions', async () => {
extensionsServiceMock.getAllowedSidebarActions.and.returnValue(of(mockAspectActions));
fixture.detectChanges();
await fixture.whenStable().then(() => {
expect(component.aspectActions).toEqual(mockAspectActions);
expect(component.aspectActions).toEqual([]);
});
});
@@ -191,38 +213,6 @@ describe('DetailsComponent', () => {
expect(component.nodeIcon).toContain(expectedIcon);
});
it('should set aspectActions from extension mock', () => {
const extensionMock = {
getAllowedSidebarActions: () =>
of([
{
id: 'app.sidebar.close',
order: 100,
title: 'close',
icon: 'highlight_off'
}
])
};
extensionsServiceMock.getAllowedSidebarActions.and.returnValue(of(extensionMock));
fixture.detectChanges();
fixture
.whenStable()
.then(() => {
expect(component.aspectActions).toEqual([
{
id: 'app.sidebar.close',
order: 100,
title: 'close',
icon: 'highlight_off'
} as ContentActionRef
]);
})
.catch((error) => {
fail(`An error occurred: ${error}`);
});
});
it('should disable the permissions tab for smart folders based on aspects', () => {
node.entry.isFolder = true;
node.entry.aspectNames = ['smf:customConfigSmartFolder'];
@@ -263,6 +253,7 @@ describe('DetailsComponent', () => {
component.setActiveTab('permissions');
expect(component.activeTab).not.toBe(2);
});
});
it('should navigate back when nodesDeleted event is triggered', () => {
const locationSpy = spyOn(location, 'back');

View File

@@ -22,13 +22,13 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { TestBed, fakeAsync, tick } from '@angular/core/testing';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
import { AppTestingModule } from '../../testing/app-testing.module';
import { ViewerEffects } from './viewer.effects';
import { EffectsModule } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { Router } from '@angular/router';
import { ViewFileAction, ViewNodeAction, SetSelectedNodesAction, SetCurrentFolderAction } from '@alfresco/aca-shared/store';
import { SetCurrentFolderAction, SetSelectedNodesAction, ViewFileAction, ViewNodeAction } from '@alfresco/aca-shared/store';
import { MatDialogModule } from '@angular/material/dialog';
describe('ViewerEffects', () => {
@@ -58,6 +58,7 @@ describe('ViewerEffects', () => {
tick(100);
expect(router.navigateByUrl).toHaveBeenCalledWith('/folder1/preview/someId');
}));
it('should preview file from payload', fakeAsync(() => {
const node: any = { entry: { isFile: true, id: 'someId' } };
store.dispatch(new ViewFileAction(node));

View File

@@ -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 {

View File

@@ -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,

View File

@@ -117,12 +117,15 @@
}
.mat-mdc-slide-toggle .mdc-form-field {
.mdc-switch .mdc-switch__handle {
button.mdc-switch.mdc-switch--selected,
button.mdc-switch.mdc-switch--unselected {
.mdc-switch__handle {
width: 15px;
height: 15px;
transform: translate(20%, 50%);
background-color: #484a4d;
}
}
.mdc-switch .mdc-switch__track {
border-radius: 15px;

View File

@@ -11,6 +11,10 @@
--mdc-text-button-label-text-color: inherit;
--mat-toolbar-container-text-color: inherit;
--mat-form-field-container-height: unset;
--mdc-checkbox-selected-icon-color: var(--theme-blue-checkbox-color);
--mdc-checkbox-selected-hover-icon-color: var(--theme-blue-checkbox-color);
--mdc-checkbox-selected-focus-icon-color: var(--theme-blue-checkbox-color);
--mat-dialog-container-max-width: 100%;
}
mat-toolbar {
@@ -66,14 +70,6 @@ mat-toolbar {
height: 24px;
width: 24px;
}
#{ms.$mat-checkbox-box}:has(#{ms.$mat-checkbox-native-control}):hover,
#{ms.$mat-checkbox-box}:has(#{ms.$mat-checkbox-native-control}) {
#{ms.$mat-checkbox-native-control}:enabled ~ #{ms.$mat-checkbox-background}:is(div) {
border-color: var(--theme-blue-checkbox-color);
background-color: var(--theme-blue-checkbox-color);
}
}
}
#{ms.$mat-switch}:is(button)#{ms.$mat-switch-selected}#{ms.$mat-switch-checked} #{ms.$mat-switch-handle-track} #{ms.$mat-switch-handle}::after {
@@ -352,3 +348,10 @@ adf-dynamic-component {
#{ms.$mat-form-field-infix} {
min-height: unset;
}
#{ms.$mat-mdc-submenu-icon} {
position: absolute;
top: 50%;
right: 6px;
transform: translateY(-50%);
}

View File

@@ -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,

View File

@@ -22,20 +22,20 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { Router, ActivatedRoute } from '@angular/router';
import { TestBed, ComponentFixture, fakeAsync, tick } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { AuthenticationService } from '@alfresco/adf-core';
import { UploadService, NodesApiService, DiscoveryApiService, DocumentListService } from '@alfresco/adf-content-services';
import { DiscoveryApiService, DocumentListService, NodesApiService, UploadService } from '@alfresco/adf-content-services';
import { ClosePreviewAction, RefreshPreviewAction, ViewNodeAction } from '@alfresco/aca-shared/store';
import { AcaViewerComponent } from './viewer.component';
import { of } from 'rxjs';
import {
ContentApiService,
AppHookService,
DocumentBasePageService,
LibTestingModule,
ContentApiService,
discoveryApiServiceMockValue,
DocumentBasePageServiceMock
DocumentBasePageService,
DocumentBasePageServiceMock,
LibTestingModule
} from '@alfresco/aca-shared';
import { Store } from '@ngrx/store';
import { Node } from '@alfresco/js-api';
@@ -69,7 +69,7 @@ describe('AcaViewerComponent', () => {
TestBed.configureTestingModule({
imports: [LibTestingModule, AcaViewerComponent],
providers: [
{ provide: DocumentBasePageService, useValue: DocumentBasePageServiceMock },
{ provide: DocumentBasePageService, useClass: DocumentBasePageServiceMock },
{ provide: DiscoveryApiService, useValue: discoveryApiServiceMockValue },
{ provide: AuthenticationService, useValue: {} }
]

View File

@@ -71,7 +71,7 @@ export class AdfInfoDrawerComponent extends BaseComponent {
public tagsAccordionPenButton = this.tagsAccordion.locator('[data-automation-id="showing-tag-input-button"]');
public categoriesAccordionPenButton = this.categoriesAccordion.locator('[data-automation-id="meta-data-categories-edit"]');
public tagsInput = this.tagsCreator.locator('input');
public createTagButton = this.tagsCreator.locator('[role="button"]');
public createTagButton = this.tagsCreator.locator('.adf-create-tag-label');
public tagsChips = this.tagsCreator.locator('mat-chip');
public tagsChipsXButton = this.tagsChips.locator('.adf-dynamic-chip-list-delete-icon');
public tagsAccordionCancelButton = this.getChild('[data-automation-id="reset-tags-metadata"]');
@@ -79,7 +79,7 @@ export class AdfInfoDrawerComponent extends BaseComponent {
public categoriesAccordionCancelButton = this.getChild('[data-automation-id="reset-metadata"]');
public categoriesAccordionConfirmButton = this.getChild('[data-automation-id="save-categories-metadata"]');
public categoriesInput = this.categoriesManagement.locator('input');
public categoriesListItems = this.categoriesManagement.locator('mat-list-item');
public categoriesListItems = this.categoriesManagement.locator('.adf-category');
public categoriesItemRemoveButton = this.categoriesManagement.locator('[data-automation-id="categories-remove-category-button"]');
public categoriesCreatedList = this.getChild('.adf-metadata-categories');

View File

@@ -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"]
}
},