Angular 13 upgrade (#2493)

* upgrade to Angular 13

* upgrade datetime picker libs

* upgrade to eslint 13

* fix eslint issues

* downgrade datetime picker

* fix scss builds

* use proper node version on travis

* fix e2e check

* fix test run

* upgrade ngrx to 13

* use latest ADF 5.x

* add missing ban plugin for eslint

* use latest ADF 5.x branch

* use latest ADF 5.x

* use latest ADF

* sync libs with adf and apps

* Updating to the right version of mat-datetime-picker

* Fix Test Suites: Search - AAE-10222

* Satisfy linter

* upgrade to adf 5.0.0-angular.13

* upgrade adf to 5.0.0-angular.13.1

Co-authored-by: Andras Popovics <popovics@ndras.hu>
Co-authored-by: MichalFidor <michal.fidor@hyland.com>
This commit is contained in:
Denys Vuika
2022-08-09 18:39:25 +01:00
committed by GitHub
parent 38cae75476
commit fa68c6fcf4
57 changed files with 8117 additions and 8430 deletions

View File

@@ -24,7 +24,11 @@
"error",
{
"type": "element",
"prefix": ["aca", "adf", "app"],
"prefix": [
"aca",
"adf",
"app"
],
"style": "kebab-case"
}
],
@@ -32,7 +36,11 @@
"error",
{
"type": "attribute",
"prefix": ["aca", "adf", "app"],
"prefix": [
"aca",
"adf",
"app"
],
"style": "camelCase"
}
],
@@ -103,7 +111,8 @@
"rules": {
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off",
"@angular-eslint/template/no-positive-tabindex": "error"
"@angular-eslint/template/no-positive-tabindex": "error",
"@angular-eslint/template/eqeqeq": "error"
}
}
]

View File

@@ -2,16 +2,6 @@
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/@alfresco/aca-shared",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"rxjs": "rxjs",
"@alfresco/js-api": "@alfresco/js-api",
"@alfresco/adf-core": "@alfresco/adf-core",
"@alfresco/adf-extensions": "@alfresco/adf-extensions",
"@ngrx/store": "@ngrx/store",
"@ngrx/effects": "@ngrx/effects",
"@angular/material": "@angular/material",
"@ngx-translate/core": "@ngx-translate/core"
}
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@alfresco/aca-shared",
"version": "2.11.0",
"version": "3.0.0",
"dependencies": {
"tslib": "^2.0.0"
},

View File

@@ -0,0 +1,46 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export enum AppActionTypes {
SetSettingsParameter = 'SET_SETTINGS_PARAMETER',
SetInitialState = 'SET_INITIAL_STATE',
SetHeaderColor = 'SET_HEADER_COLOR',
SetCurrentFolder = 'SET_CURRENT_FOLDER',
SetCurrentVersion = 'SET_CURRENT_VERSION',
SetCurrentUrl = 'SET_CURRENT_URL',
SetUserProfile = 'SET_USER_PROFILE',
SetRepositoryInfo = 'SET_REPOSITORY_INFO',
ToggleInfoDrawer = 'TOGGLE_INFO_DRAWER',
ToggleDocumentDisplayMode = 'TOGGLE_DOCUMENT_DISPLAY_MODE',
Logout = 'LOGOUT',
ReloadDocumentList = 'RELOAD_DOCUMENT_LIST',
ResetSelection = 'RESET_SELECTION',
SetInfoDrawerState = 'SET_INFO_DRAWER_STATE',
SetInfoDrawerMetadataAspect = 'SET_INFO_DRAWER_METADATA_ASPECT',
CloseModalDialogs = 'CLOSE_MODAL_DIALOGS',
SetFileUploadingDialog = 'SET_FILE_UPLOADING_DIALOG',
ShowInfoDrawerPreview = 'SHOW_INFO_DRAWER_PREVIEW',
SetInfoDrawerPreviewState = 'SET_INFO_DRAWER_PREVIEW_STATE'
}

View File

@@ -26,28 +26,7 @@
import { Action } from '@ngrx/store';
import { Node, Person, Group, RepositoryInfo, VersionEntry } from '@alfresco/js-api';
import { AppState } from '../states/app.state';
export enum AppActionTypes {
SetSettingsParameter = 'SET_SETTINGS_PARAMETER',
SetInitialState = 'SET_INITIAL_STATE',
SetHeaderColor = 'SET_HEADER_COLOR',
SetCurrentFolder = 'SET_CURRENT_FOLDER',
SetCurrentVersion = 'SET_CURRENT_VERSION',
SetCurrentUrl = 'SET_CURRENT_URL',
SetUserProfile = 'SET_USER_PROFILE',
SetRepositoryInfo = 'SET_REPOSITORY_INFO',
ToggleInfoDrawer = 'TOGGLE_INFO_DRAWER',
ToggleDocumentDisplayMode = 'TOGGLE_DOCUMENT_DISPLAY_MODE',
Logout = 'LOGOUT',
ReloadDocumentList = 'RELOAD_DOCUMENT_LIST',
ResetSelection = 'RESET_SELECTION',
SetInfoDrawerState = 'SET_INFO_DRAWER_STATE',
SetInfoDrawerMetadataAspect = 'SET_INFO_DRAWER_METADATA_ASPECT',
CloseModalDialogs = 'CLOSE_MODAL_DIALOGS',
SetFileUploadingDialog = 'SET_FILE_UPLOADING_DIALOG',
ShowInfoDrawerPreview = 'SHOW_INFO_DRAWER_PREVIEW',
SetInfoDrawerPreviewState = 'SET_INFO_DRAWER_PREVIEW_STATE'
}
import { AppActionTypes } from './app-action-types';
export class SetSettingsParameterAction implements Action {
readonly type = AppActionTypes.SetSettingsParameter;

View File

@@ -0,0 +1,28 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export enum ContextMenuActionTypes {
ContextMenu = 'CONTEXT_MENU'
}

View File

@@ -24,10 +24,7 @@
*/
import { Action } from '@ngrx/store';
export enum ContextMenuActionTypes {
ContextMenu = 'CONTEXT_MENU'
}
import { ContextMenuActionTypes } from './context-menu-action-types';
export class ContextMenu implements Action {
readonly type = ContextMenuActionTypes.ContextMenu;

View File

@@ -0,0 +1,32 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export enum RouterActionTypes {
NavigateUrl = 'NAVIGATE_URL',
NavigateRoute = 'NAVIGATE_ROUTE',
NavigateFolder = 'NAVIGATE_FOLDER',
NavigateParentFolder = 'NAVIGATE_PARENT_FOLDER',
NavigateToPreviousPage = 'NAVIGATE_TO_PREVIOUS_PAGE'
}

View File

@@ -25,14 +25,7 @@
import { Action } from '@ngrx/store';
import { MinimalNodeEntity } from '@alfresco/js-api';
export enum RouterActionTypes {
NavigateUrl = 'NAVIGATE_URL',
NavigateRoute = 'NAVIGATE_ROUTE',
NavigateFolder = 'NAVIGATE_FOLDER',
NavigateParentFolder = 'NAVIGATE_PARENT_FOLDER',
NavigateToPreviousPage = 'NAVIGATE_TO_PREVIOUS_PAGE'
}
import { RouterActionTypes } from './router-action-types';
export class NavigateUrlAction implements Action {
readonly type = RouterActionTypes.NavigateUrl;

View File

@@ -0,0 +1,31 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2020 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export enum TemplateActionTypes {
FileFromTemplate = 'FILE_FROM_TEMPLATE',
FolderFromTemplate = 'FOLDER_FROM_TEMPLATE',
CreateFromTemplate = 'CREATE_FROM_TEMPLATE',
CreateFromTemplateSuccess = 'CREATE_FROM_TEMPLATE_SUCCESS'
}

View File

@@ -25,13 +25,7 @@
import { Action } from '@ngrx/store';
import { Node } from '@alfresco/js-api';
export enum TemplateActionTypes {
FileFromTemplate = 'FILE_FROM_TEMPLATE',
FolderFromTemplate = 'FOLDER_FROM_TEMPLATE',
CreateFromTemplate = 'CREATE_FROM_TEMPLATE',
CreateFromTemplateSuccess = 'CREATE_FROM_TEMPLATE_SUCCESS'
}
import { TemplateActionTypes } from './template-action-types';
export class FileFromTemplate implements Action {
readonly type = TemplateActionTypes.FileFromTemplate;

View File

@@ -27,7 +27,8 @@ import { Actions, ofType, createEffect } from '@ngrx/effects';
import { Injectable } from '@angular/core';
import { map } from 'rxjs/operators';
import { MatDialog } from '@angular/material/dialog';
import { CloseModalDialogsAction, AppActionTypes } from '../actions/app.actions';
import { CloseModalDialogsAction } from '../actions/app.actions';
import { AppActionTypes } from '../actions/app-action-types';
@Injectable()
export class DialogEffects {

View File

@@ -31,15 +31,9 @@ import { map } from 'rxjs/operators';
import { Store } from '@ngrx/store';
import { AppStore } from '../states/app.state';
import { Location } from '@angular/common';
import {
NavigateUrlAction,
RouterActionTypes,
NavigateRouteAction,
NavigateToFolder,
NavigateToParentFolder,
NavigateToPreviousPage
} from '../actions/router.actions';
import { NavigateUrlAction, NavigateRouteAction, NavigateToFolder, NavigateToParentFolder, NavigateToPreviousPage } from '../actions/router.actions';
import { SnackbarErrorAction } from '../actions/snackbar.actions';
import { RouterActionTypes } from '../actions/router-action-types';
@Injectable()
export class RouterEffects {

View File

@@ -23,6 +23,10 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
export * from './actions/app-action-types';
export * from './actions/context-menu-action-types';
export * from './actions/router-action-types';
export * from './actions/template-action-types';
export * from './actions/app.actions';
export * from './actions/library.actions';
export * from './actions/node.actions';

View File

@@ -25,15 +25,17 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
});
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.

View File

@@ -2,6 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",

View File

@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
"compilationMode": "partial"
}
}