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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 8117 additions and 8430 deletions

View File

@ -91,11 +91,13 @@
"off", "off",
null null
], ],
"@typescript-eslint/naming-convention":[ "@typescript-eslint/naming-convention": [
"error", "error",
{ {
"selector": "enum", "selector": "enum",
"format": ["PascalCase"] "format": [
"PascalCase"
]
} }
], ],
"@typescript-eslint/type-annotation-spacing": "off", "@typescript-eslint/type-annotation-spacing": "off",
@ -143,14 +145,15 @@
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@angular-eslint/template/no-negated-async": "off",
"@angular-eslint/template/no-positive-tabindex": "error", "@angular-eslint/template/no-positive-tabindex": "error",
"@angular-eslint/template/accessibility-alt-text":"error", "@angular-eslint/template/accessibility-alt-text": "error",
"@angular-eslint/template/accessibility-elements-content":"error", "@angular-eslint/template/accessibility-elements-content": "error",
"@angular-eslint/template/accessibility-label-for":"error", "@angular-eslint/template/accessibility-table-scope": "error",
"@angular-eslint/template/accessibility-table-scope":"error", "@angular-eslint/template/accessibility-valid-aria": "error",
"@angular-eslint/template/accessibility-valid-aria":"error", "@angular-eslint/template/click-events-have-key-events": "error",
"@angular-eslint/template/click-events-have-key-events":"error", "@angular-eslint/template/mouse-events-have-key-events": "error",
"@angular-eslint/template/mouse-events-have-key-events":"error", "@angular-eslint/template/no-distracting-elements": "error",
"@angular-eslint/template/no-distracting-elements":"error" "@angular-eslint/template/accessibility-label-has-associated-control": "error",
"@angular-eslint/template/eqeqeq": "error"
} }
} }
] ]

1
.gitignore vendored
View File

@ -31,6 +31,7 @@
.history .history
# misc # misc
/.angular/cache
/.sass-cache /.sass-cache
/connect.lock /connect.lock
/coverage /coverage

View File

@ -10,7 +10,7 @@ addons:
chrome: stable chrome: stable
language: node_js language: node_js
node_js: node_js:
- '12.18.1' - '14'
cache: cache:
directories: directories:

View File

@ -11,7 +11,6 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"aot": true,
"outputPath": "dist/content-ce", "outputPath": "dist/content-ce",
"index": "app/src/index.html", "index": "app/src/index.html",
"main": "app/src/main.ts", "main": "app/src/main.ts",
@ -24,7 +23,8 @@
], ],
"stylePreprocessorOptions": { "stylePreprocessorOptions": {
"includePaths": [ "includePaths": [
"app/src/app/ui" "app/src/app/ui",
"node_modules"
] ]
}, },
"assets": [ "assets": [
@ -111,16 +111,20 @@
"node_modules/pdfjs-dist/build/pdf.js", "node_modules/pdfjs-dist/build/pdf.js",
"node_modules/pdfjs-dist/web/pdf_viewer.js", "node_modules/pdfjs-dist/web/pdf_viewer.js",
"node_modules/moment/min/moment.min.js" "node_modules/moment/min/moment.min.js"
] ],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
}, },
"configurations": { "configurations": {
"production": { "production": {
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
"extractCss": true,
"namedChunks": false, "namedChunks": false,
"aot": true,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"buildOptimizer": true, "buildOptimizer": true,
@ -167,9 +171,7 @@
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
"extractCss": true,
"namedChunks": false, "namedChunks": false,
"aot": true,
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"buildOptimizer": true, "buildOptimizer": true,
@ -180,7 +182,8 @@
} }
] ]
} }
} },
"defaultConfiguration": ""
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
@ -230,7 +233,8 @@
"polyfills": "app/src/polyfills.ts", "polyfills": "app/src/polyfills.ts",
"stylePreprocessorOptions": { "stylePreprocessorOptions": {
"includePaths": [ "includePaths": [
"app/src/app/ui" "app/src/app/ui",
"node_modules"
] ]
}, },
"tsConfig": "app/tsconfig.spec.json", "tsConfig": "app/tsconfig.spec.json",
@ -336,7 +340,7 @@
"prefix": "lib", "prefix": "lib",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-angular:ng-packagr",
"options": { "options": {
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json", "tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
"project": "projects/adf-office-services-ext/ng-package.json" "project": "projects/adf-office-services-ext/ng-package.json"
@ -376,7 +380,7 @@
"prefix": "lib", "prefix": "lib",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-angular:ng-packagr",
"options": { "options": {
"tsConfig": "projects/aca-shared/tsconfig.lib.json", "tsConfig": "projects/aca-shared/tsconfig.lib.json",
"project": "projects/aca-shared/ng-package.json" "project": "projects/aca-shared/ng-package.json"
@ -422,7 +426,7 @@
"prefix": "lib", "prefix": "lib",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-angular:ng-packagr",
"options": { "options": {
"tsConfig": "projects/aca-about/tsconfig.lib.json", "tsConfig": "projects/aca-about/tsconfig.lib.json",
"project": "projects/aca-about/ng-package.json" "project": "projects/aca-about/ng-package.json"
@ -462,7 +466,7 @@
"prefix": "lib", "prefix": "lib",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-ng-packagr:build", "builder": "@angular-devkit/build-angular:ng-packagr",
"options": { "options": {
"tsConfig": "projects/aca-settings/tsconfig.lib.json", "tsConfig": "projects/aca-settings/tsconfig.lib.json",
"project": "projects/aca-settings/ng-package.json" "project": "projects/aca-settings/ng-package.json"

View File

@ -107,7 +107,8 @@
"rules": { "rules": {
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@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

@ -110,7 +110,8 @@ registerLocaleData(localeSv);
ReactiveFormsModule, ReactiveFormsModule,
RouterModule.forRoot(APP_ROUTES, { RouterModule.forRoot(APP_ROUTES, {
useHash: true, useHash: true,
enableTracing: false // enable for debug only enableTracing: false, // enable for debug only
relativeLinkResolution: 'legacy'
}), }),
MaterialModule, MaterialModule,
CoreModule.forRoot(), CoreModule.forRoot(),

View File

@ -43,8 +43,8 @@ export class SearchInputControlComponent implements OnDestroy {
/** Emitted when the search is submitted pressing ENTER button. /** Emitted when the search is submitted pressing ENTER button.
* The search term is provided as value of the event. * The search term is provided as value of the event.
*/ */
// eslint-disable-next-line @angular-eslint/no-output-native
@Output() @Output()
// eslint-disable-next-line @angular-eslint/no-output-native
submit: EventEmitter<any> = new EventEmitter(); submit: EventEmitter<any> = new EventEmitter();
/** Emitted when the search term is changed. The search term is provided /** Emitted when the search term is changed. The search term is provided

View File

@ -26,7 +26,6 @@
import { Action } from '@ngrx/store'; import { Action } from '@ngrx/store';
import { import {
AppState, AppState,
AppActionTypes,
NodeActionTypes, NodeActionTypes,
SetUserProfileAction, SetUserProfileAction,
SetCurrentFolderAction, SetCurrentFolderAction,
@ -39,7 +38,8 @@ import {
SetHeaderColorAction, SetHeaderColorAction,
SetCurrentNodeVersionAction, SetCurrentNodeVersionAction,
SetFileUploadingDialogAction, SetFileUploadingDialogAction,
SetInfoDrawerPreviewStateAction SetInfoDrawerPreviewStateAction,
AppActionTypes
} from '@alfresco/aca-shared/store'; } from '@alfresco/aca-shared/store';
import { INITIAL_APP_STATE } from '../initial-state'; import { INITIAL_APP_STATE } from '../initial-state';

View File

@ -1,3 +1,4 @@
@use '@angular/material' as mat;
@import 'mixins'; @import 'mixins';
@import 'theme'; @import 'theme';
@import 'variables/font-family'; @import 'variables/font-family';
@ -9,7 +10,7 @@ body {
@include flex-column; @include flex-column;
font-size: 14px; font-size: 14px;
font-family: $default-font-family; font-family: $default-font-family;
color: mat-color($foreground, text, 0.87); color: mat.get-color-from-palette($foreground, text, 0.87);
margin: 0; margin: 0;
& > main { & > main {

View File

@ -1,21 +1,21 @@
@import '~@angular/material/theming'; @use '@angular/material' as mat;
@import './overrides/adf-style-fixes.theme'; @import './overrides/adf-style-fixes.theme';
@import './colors'; @import './colors';
$mat-primary-palette: mat-palette($aca-primary-blue, A100); $mat-primary-palette: mat.define-palette($aca-primary-blue, A100);
$mat-accent-palette: mat-palette($aca-accent-green, A200); $mat-accent-palette: mat.define-palette($aca-accent-green, A200);
$mat-warn-palette: mat-palette($aca-warn, A100); $mat-warn-palette: mat.define-palette($aca-warn, A100);
@include mat-core($alfresco-typography); @include mat.core($alfresco-typography);
$custom-theme: mat-light-theme( $custom-theme: mat.define-light-theme(
$mat-primary-palette, $mat-primary-palette,
$mat-accent-palette, $mat-accent-palette,
$mat-warn-palette $mat-warn-palette
); );
@mixin custom-theme($theme) { @mixin custom-theme($theme) {
@include angular-material-theme($theme); @include mat.all-component-themes($theme);
@include adf-core-theme($theme); @include adf-core-theme($theme);
@include adf-style-fixes($theme); @include adf-style-fixes($theme);
} }

View File

@ -1,3 +1,4 @@
@use '@angular/material' as mat;
@import '../colors'; @import '../colors';
@import './custom-palette-creator.scss'; @import './custom-palette-creator.scss';
@ -5,20 +6,20 @@
$mat-primary-palette: null; $mat-primary-palette: null;
@if $primary-color { @if $primary-color {
$custom-theme-primary-palette: createColorPalette($primary-color, 'primary'); $custom-theme-primary-palette: createColorPalette($primary-color, 'primary');
$mat-primary-palette: mat-palette($custom-theme-primary-palette, 500); $mat-primary-palette: mat.define-palette($custom-theme-primary-palette, 500);
} @else { } @else {
$mat-primary-palette: mat-palette($aca-primary-blue, A100); $mat-primary-palette: mat.define-palette($aca-primary-blue, A100);
} }
$mat-accent-palette: null; $mat-accent-palette: null;
@if $accent-color { @if $accent-color {
$custom-theme-accent-palette: createColorPalette($accent-color, 'accent'); $custom-theme-accent-palette: createColorPalette($accent-color, 'accent');
$mat-accent-palette: mat-palette($custom-theme-accent-palette, 500); $mat-accent-palette: mat.define-palette($custom-theme-accent-palette, 500);
} @else { } @else {
$mat-accent-palette: mat-palette($aca-accent-green, A200); $mat-accent-palette: mat.define-palette($aca-accent-green, A200);
} }
$mat-warn-palette: mat-palette($aca-warn, A100); $mat-warn-palette: mat.define-palette($aca-warn, A100);
@return ( @return (
primary: $mat-primary-palette, primary: $mat-primary-palette,

View File

@ -1,3 +1 @@
@use '~@angular/material/theming';
@import '../theme.scss'; @import '../theme.scss';

View File

@ -1,3 +1,4 @@
@use '@angular/material' as mat;
@import '../variables/font-family.scss'; @import '../variables/font-family.scss';
@function get-mat-typography( @function get-mat-typography(
@ -8,21 +9,21 @@
$custom-typography: $default-typography; $custom-typography: $default-typography;
@if $base-font-size { @if $base-font-size {
$custom-typography: mat-typography-config( $custom-typography: mat.define-typography-config(
$display-4: mat-typography-level(8rem, 8rem, 300), $display-4: mat.define-typography-level(8rem, 8rem, 300),
$display-3: mat-typography-level(4rem, 4rem, 400), $display-3: mat.define-typography-level(4rem, 4rem, 400),
$display-2: mat-typography-level(3.21rem, 3.21rem, 400), $display-2: mat.define-typography-level(3.21rem, 3.21rem, 400),
$display-1: mat-typography-level(2.42rem, 2.85rem, 400), $display-1: mat.define-typography-level(2.42rem, 2.85rem, 400),
$headline: mat-typography-level(1.71rem, 2.28rem, 400), $headline: mat.define-typography-level(1.71rem, 2.28rem, 400),
$title: mat-typography-level(1.42rem, 2.28rem, 500), $title: mat.define-typography-level(1.42rem, 2.28rem, 500),
$subheading-2: mat-typography-level(1.14rem, 2rem, 400), $subheading-2: mat.define-typography-level(1.14rem, 2rem, 400),
$subheading-1: mat-typography-level(1.07rem, 1.71rem, 400), $subheading-1: mat.define-typography-level(1.07rem, 1.71rem, 400),
$body-2: mat-typography-level(1rem, 1.71rem, 500), $body-2: mat.define-typography-level(1rem, 1.71rem, 500),
$body-1: mat-typography-level(1rem, 1.42rem, 400), $body-1: mat.define-typography-level(1rem, 1.42rem, 400),
$caption: mat-typography-level(0.86rem, 1.42rem, 400), $caption: mat.define-typography-level(0.86rem, 1.42rem, 400),
$button: mat-typography-level(1rem, 1rem, 500), $button: mat.define-typography-level(1rem, 1rem, 500),
$font-family: $default-font-family, $font-family: $default-font-family,
$input: mat-typography-level(1.14em, 1.25, 400) $input: mat.define-typography-level(1.14em, 1.25, 400)
); );
} }

View File

@ -1,5 +1,5 @@
@import '~@angular/material/theming'; @use '@angular/material' as mat;
@import '~@alfresco/adf-core/theming'; @import '@alfresco/adf-core/theming';
@import 'custom-theme'; @import 'custom-theme';
@import 'variables/variables'; @import 'variables/variables';
@ -11,10 +11,10 @@ $primary: map-get($custom-theme, primary);
.mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) { .mat-slide-toggle.mat-primary.mat-checked:not(.mat-disabled) {
.mat-slide-toggle-thumb, .mat-slide-toggle-thumb,
.mat-slide-toggle-ripple .mat-ripple-element { .mat-slide-toggle-ripple .mat-ripple-element {
background-color: mat-color($primary); background-color: mat.get-color-from-palette($primary);
} }
.mat-slide-toggle-bar { .mat-slide-toggle-bar {
background-color: mat-color($primary, 0.54); background-color: mat.get-color-from-palette($primary, 0.54);
} }
} }

View File

@ -1,3 +1,4 @@
@use '@angular/material' as mat;
$warn: map-get($custom-theme, warn); $warn: map-get($custom-theme, warn);
$accent: map-get($custom-theme, accent); $accent: map-get($custom-theme, accent);
$primary: map-get($custom-theme, primary); $primary: map-get($custom-theme, primary);
@ -6,19 +7,19 @@ $foreground: map-get($custom-theme, foreground);
$background: map-get($custom-theme, background); $background: map-get($custom-theme, background);
//Custom variables - ACA specific styling: //Custom variables - ACA specific styling:
$document-list-selection-color: mat-color($alfresco-ecm-blue, 500); $document-list-selection-color: mat.get-color-from-palette($alfresco-ecm-blue, 500);
$document-list-background: white; $document-list-background: white;
$data-table-dividers-wrapper-border: none; $data-table-dividers-wrapper-border: none;
$data-table-thumbnail-width: 35px; $data-table-thumbnail-width: 35px;
$data-table-cell-min-width: 150px; $data-table-cell-min-width: 150px;
$data-table-cell-min-width--no-grow: 120px; $data-table-cell-min-width--no-grow: 120px;
$data-table-cell-min-width--fileSize: 110px !important; $data-table-cell-min-width--fileSize: 110px !important;
$data-table-cell-text-color: mat-color($foreground, text, 0.54); $data-table-cell-text-color: mat.get-color-from-palette($foreground, text, 0.54);
$data-table-cell-link-color: mat-color($foreground, text); $data-table-cell-link-color: mat.get-color-from-palette($foreground, text);
$data-table-hover-color: #e3fafd; $data-table-hover-color: #e3fafd;
$data-table-selection-color: #e3fafd; $data-table-selection-color: #e3fafd;
$adf-pagination--border: 1px solid mat-color($foreground, text, 0.07); $adf-pagination--border: 1px solid mat.get-color-from-palette($foreground, text, 0.07);
$adf-pagination__empty--height: 0; $adf-pagination__empty--height: 0;
$adf-toolbar-single-row-height: 48px; $adf-toolbar-single-row-height: 48px;
@ -33,23 +34,23 @@ $adf-upload-dragging-level1-border: none;
$adf-permission-list-width: 100%; $adf-permission-list-width: 100%;
$defaults: ( $defaults: (
--theme-primary-color: mat-color($primary), --theme-primary-color: mat.get-color-from-palette($primary),
--theme-primary-color-default-contrast: mat-color($primary, default-contrast), --theme-primary-color-default-contrast: mat.get-color-from-palette($primary, default-contrast),
--theme-warn-color: mat-color($warn), --theme-warn-color: mat.get-color-from-palette($warn),
--theme-accent-color: mat-color($accent), --theme-accent-color: mat.get-color-from-palette($accent),
--theme-background-color: mat-color($background, background), --theme-background-color: mat.get-color-from-palette($background, background),
--theme-text-color: mat-color($foreground, text, 0.54), --theme-text-color: mat.get-color-from-palette($foreground, text, 0.54),
--theme-text-bold-color: mat-color($foreground, text, 0.87), --theme-text-bold-color: mat.get-color-from-palette($foreground, text, 0.87),
--theme-title-color: mat-color($foreground, text, 0.87), --theme-title-color: mat.get-color-from-palette($foreground, text, 0.87),
--theme-text-disabled-color: mat-color($foreground, text, 0.38), --theme-text-disabled-color: mat.get-color-from-palette($foreground, text, 0.38),
--theme-border-color: mat-color($foreground, text, 0.07), --theme-border-color: mat.get-color-from-palette($foreground, text, 0.07),
--header-background-image: url('/assets/images/mastHead-bg-shapesPattern.svg'), --header-background-image: url('/assets/images/mastHead-bg-shapesPattern.svg'),
--theme-card-background-color: mat-color($background, card), --theme-card-background-color: mat.get-color-from-palette($background, card),
--theme-foreground-text-color: mat-color($foreground, text, 0.72), --theme-foreground-text-color: mat.get-color-from-palette($foreground, text, 0.72),
--theme-foreground-text-bold-color: mat-color($foreground, text, 0.87), --theme-foreground-text-bold-color: mat.get-color-from-palette($foreground, text, 0.87),
--theme-secondary-text-color: mat-color($foreground, secondary-text), --theme-secondary-text-color: mat.get-color-from-palette($foreground, secondary-text),
--theme-divider-color: mat-color($foreground, divider, 0.07), --theme-divider-color: mat.get-color-from-palette($foreground, divider, 0.07),
--theme-dialog-background-color: mat-color($background, dialog), --theme-dialog-background-color: mat.get-color-from-palette($background, dialog),
--new-button-font-size: 0.9rem, --new-button-font-size: 0.9rem,
); );

View File

@ -43,19 +43,9 @@
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** Evergreen browsers require these. **/ /** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** /**
* By default, zone.js will patch all possible macroTask and DomEvents * By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags * user can disable parts of macroTask/DomEvents patch by setting following flags
@ -74,7 +64,7 @@
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js'; // Included with Angular CLI.
/*************************************************************************************************** /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS

View File

@ -42,7 +42,9 @@ declare const require: any;
__karma__.loaded = function () {}; __karma__.loaded = function () {};
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
});
// Then we find all the tests. // Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/); const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules. // And load the modules.

View File

@ -106,7 +106,8 @@
"rules": { "rules": {
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@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

@ -23,7 +23,17 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/ */
import { AdminActions, LoginPage, SearchResultsPage, RepoClient, Utils, FILES, SITE_VISIBILITY, SITE_ROLES } from '@alfresco/aca-testing-shared'; import {
AdminActions,
LoginPage,
SearchResultsPage,
RepoClient,
Utils,
FILES,
SITE_VISIBILITY,
SITE_ROLES,
SizeOptions
} from '@alfresco/aca-testing-shared';
import { BrowserActions } from '@alfresco/adf-testing'; import { BrowserActions } from '@alfresco/adf-testing';
const moment = require('moment'); const moment = require('moment');
@ -140,7 +150,7 @@ describe('Search filters', () => {
it('[C279199] Filter by Small', async () => { it('[C279199] Filter by Small', async () => {
await sizeFilter.openDialog(); await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.clickApplyButton(); await sizeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, `${fileJpgUser1.name} not in the list`); expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, `${fileJpgUser1.name} not in the list`);
@ -149,7 +159,7 @@ describe('Search filters', () => {
it('[C279202] Filter by Huge', async () => { it('[C279202] Filter by Huge', async () => {
await sizeFilter.openDialog(); await sizeFilter.openDialog();
await sizeFilter.checkSizeHuge(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Huge).click();
await sizeFilter.clickApplyButton(); await sizeFilter.clickApplyButton();
expect(await dataTable.isEmpty()).toBe(true, 'list is not empty'); expect(await dataTable.isEmpty()).toBe(true, 'list is not empty');
@ -157,9 +167,9 @@ describe('Search filters', () => {
it('[C279203] Filter by multiple size categories', async () => { it('[C279203] Filter by multiple size categories', async () => {
await sizeFilter.openDialog(); await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.checkSizeMedium(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Medium).click();
await sizeFilter.checkSizeLarge(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Large).click();
await sizeFilter.clickApplyButton(); await sizeFilter.clickApplyButton();
expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, `${fileJpgUser1.name} not in the list`); expect(await dataTable.isItemPresent(fileJpgUser1.name)).toBe(true, `${fileJpgUser1.name} not in the list`);
@ -168,8 +178,8 @@ describe('Search filters', () => {
it('[C279198] Clear the Size filter options', async () => { it('[C279198] Clear the Size filter options', async () => {
await sizeFilter.openDialog(); await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.checkSizeMedium(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Medium).click();
await sizeFilter.clickApplyButton(); await sizeFilter.clickApplyButton();
await sizeFilter.openDialog(); await sizeFilter.openDialog();
@ -600,7 +610,7 @@ describe('Search filters', () => {
it('[C280051] Multiple filters can be applied', async () => { it('[C280051] Multiple filters can be applied', async () => {
await sizeFilter.openDialog(); await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall(); await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.clickApplyButton(); await sizeFilter.clickApplyButton();
await fileTypeFilter.openDialog(); await fileTypeFilter.openDialog();

View File

@ -3,7 +3,7 @@
"compilerOptions": { "compilerOptions": {
"noEmit": true, "noEmit": true,
"noUnusedLocals": true, "noUnusedLocals": true,
"noImplicitAny": true, "noImplicitAny": false,
"esModuleInterop": true, "esModuleInterop": true,
"allowJs": true, "allowJs": true,
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true

15874
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "alfresco-content-app", "name": "alfresco-content-app",
"version": "2.11.0", "version": "3.0.0",
"commit": "", "commit": "",
"license": "LGPL-3.0", "license": "LGPL-3.0",
"scripts": { "scripts": {
@ -10,7 +10,7 @@
"assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --env APP_CONFIG_PROVIDER=ECM --env APP_CONFIG_AUTH_TYPE=BASIC --env APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco --env APP_CONFIG_OAUTH2_CLIENTID=alfresco --env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true --env APP_CONFIG_OAUTH2_SILENT_LOGIN=true --env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html --env APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/ --env APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/logout --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json", "assemble-app-config": "envsub --env-file ./.env --env APP_CONFIG_ECM_HOST={protocol}//{hostname}{:port} --env APP_CONFIG_PROVIDER=ECM --env APP_CONFIG_AUTH_TYPE=BASIC --env APP_CONFIG_OAUTH2_HOST=http://localhost:4200/auth/realms/alfresco --env APP_CONFIG_OAUTH2_CLIENTID=alfresco --env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true --env APP_CONFIG_OAUTH2_SILENT_LOGIN=true --env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI={protocol}//{hostname}{:port}/assets/silent-refresh.html --env APP_CONFIG_OAUTH2_REDIRECT_LOGIN=/ --env APP_CONFIG_OAUTH2_REDIRECT_LOGOUT=/logout --all ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config", "prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config",
"start": "ng serve", "start": "ng serve",
"start:prod": "npm run validate-app-config && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng serve --prod --open", "start:prod": "npm run validate-app-config && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng serve --configuration production --open",
"prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json", "prebuild": "mkdir -p ./app/.tmp && cp ./app/src/app.config.json.tpl ./app/.tmp/app.config.json",
"build": "ng build", "build": "ng build",
"build.release": "npm run build -- --configuration=production,release", "build.release": "npm run build -- --configuration=production,release",
@ -21,63 +21,62 @@
"e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json", "e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json",
"e2e": "npm run update-webdriver && protractor $SUITE", "e2e": "npm run update-webdriver && protractor $SUITE",
"spellcheck": "cspell '{src,e2e,projects}/**/*.ts'", "spellcheck": "cspell '{src,e2e,projects}/**/*.ts'",
"inspect.bundle": "ng build content-ce --prod --stats-json && npx webpack-bundle-analyzer dist/content-ce/stats.json" "inspect.bundle": "ng build content-ce --configuration production --stats-json && npx webpack-bundle-analyzer dist/content-ce/stats.json"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@alfresco/adf-content-services": "4.12.0-35332", "@alfresco/adf-content-services": "5.0.0-angular.13.1",
"@alfresco/adf-core": "4.12.0-35332", "@alfresco/adf-core": "5.0.0-angular.13.1",
"@alfresco/adf-extensions": "4.12.0-35332", "@alfresco/adf-extensions": "5.0.0-angular.13.1",
"@alfresco/js-api": "4.12.0-191", "@alfresco/js-api": "4.12.0-245",
"@angular/animations": "10.0.4", "@angular/animations": "13.3.1",
"@angular/cdk": "^10.0.2", "@angular/cdk": "13.3.9",
"@angular/common": "10.0.4", "@angular/common": "13.3.11",
"@angular/compiler": "10.0.4", "@angular/compiler": "13.3.1",
"@angular/core": "10.0.4", "@angular/core": "13.3.11",
"@angular/flex-layout": "^10.0.0-beta.32", "@angular/flex-layout": "^13.0.0-beta.38",
"@angular/forms": "10.0.4", "@angular/forms": "13.3.11",
"@angular/material": "^10.0.2", "@angular/material": "13.3.9",
"@angular/material-moment-adapter": "^10.2.5", "@angular/material-moment-adapter": "13.3.9",
"@angular/platform-browser": "10.0.4", "@angular/platform-browser": "13.3.11",
"@angular/platform-browser-dynamic": "10.0.4", "@angular/platform-browser-dynamic": "13.3.11",
"@angular/router": "10.0.4", "@angular/router": "13.3.11",
"@mat-datetimepicker/core": "5.1.1", "@mat-datetimepicker/core": "^9.0.68",
"@mat-datetimepicker/moment": "5.1.1", "@mat-datetimepicker/moment": "^9.0.68",
"@ngrx/effects": "^10.1.2", "@ngrx/effects": "^13.1.0",
"@ngrx/router-store": "^10.1.2", "@ngrx/router-store": "^13.1.0",
"@ngrx/store": "^10.1.2", "@ngrx/store": "^13.1.0",
"@ngrx/store-devtools": "^10.1.2", "@ngrx/store-devtools": "^13.1.0",
"@ngx-translate/core": "^13.0.0", "@ngx-translate/core": "^14.0.0",
"minimatch-browser": "^1.0.0", "minimatch-browser": "^1.0.0",
"moment": "^2.27.0", "moment": "^2.27.0",
"moment-es6": "1.0.0", "moment-es6": "1.0.0",
"pdfjs-dist": "2.5.207", "pdfjs-dist": "2.5.207",
"rxjs": "^6.6.3", "rxjs": "6.6.6",
"tslib": "^2.4.0", "tslib": "^2.0.0",
"zone.js": "~0.10.2" "zone.js": "0.11.7"
}, },
"devDependencies": { "devDependencies": {
"@alfresco/adf-cli": "4.12.0-35332", "@alfresco/adf-cli": "5.0.0-angular.13.1",
"@alfresco/adf-testing": "4.12.0-35332", "@alfresco/adf-testing": "5.0.0-angular.13.1",
"@angular-custom-builders/lite-serve": "^0.2.3", "@angular-custom-builders/lite-serve": "^0.2.3",
"@angular-devkit/build-angular": "^0.1002.0", "@angular-devkit/build-angular": "13.3.9",
"@angular-devkit/build-ng-packagr": "^0.1002.0", "@angular-eslint/builder": "^13.2.0",
"@angular-eslint/builder": "1.2.0", "@angular-eslint/eslint-plugin": "^13.2.0",
"@angular-eslint/eslint-plugin": "1.2.0", "@angular-eslint/eslint-plugin-template": "^13.2.0",
"@angular-eslint/eslint-plugin-template": "1.2.0", "@angular-eslint/schematics": "13.2.0",
"@angular-eslint/schematics": "1.2.0", "@angular-eslint/template-parser": "^13.2.0",
"@angular-eslint/template-parser": "1.2.0", "@angular/cli": "13.3.9",
"@angular/cli": "^10.1.4", "@angular/compiler-cli": "13.3.11",
"@angular/compiler-cli": "10.0.4", "@angular/language-service": "13.3.11",
"@angular/language-service": "11.0.8",
"@types/event-emitter": "^0.3.3", "@types/event-emitter": "^0.3.3",
"@types/jasmine": "3.6.3", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8", "@types/jasminewd2": "^2.0.8",
"@types/node": "^14.14.12", "@types/node": "^14.14.12",
"@types/selenium-webdriver": "^4.0.9", "@types/selenium-webdriver": "^4.0.9",
"@types/superagent": "^4.1.10", "@types/superagent": "^4.1.10",
"@typescript-eslint/eslint-plugin": "4.33.0", "@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "4.3.0", "@typescript-eslint/parser": "5.18.0",
"ajv-cli": "^4.2.0", "ajv-cli": "^4.2.0",
"browser-sync": "^2.27.7", "browser-sync": "^2.27.7",
"commander": "^6.1.0", "commander": "^6.1.0",
@ -86,9 +85,9 @@
"dotenv": "8.2.0", "dotenv": "8.2.0",
"dotenv-expand": "^5.1.0", "dotenv-expand": "^5.1.0",
"envsub": "^4.0.7", "envsub": "^4.0.7",
"eslint": "^7.6.0", "eslint": "^8.2.0",
"eslint-plugin-ban": "^1.6.0", "eslint-plugin-ban": "^1.6.0",
"eslint-plugin-import": "^2.26.0", "eslint-plugin-import": "2.25.2",
"eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.3", "eslint-plugin-prefer-arrow": "1.2.3",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
@ -96,18 +95,19 @@
"eslint-plugin-unicorn": "^40.1.0", "eslint-plugin-unicorn": "^40.1.0",
"http-server": "^14.1.1", "http-server": "^14.1.1",
"husky": "^7.0.2", "husky": "^7.0.2",
"jasmine-core": "^4.0.0", "inquirer": "^8.1.5",
"jasmine-core": "~3.6.0",
"jasmine-marbles": "0.8.3", "jasmine-marbles": "0.8.3",
"jasmine-spec-reporter": "^7.0.0", "jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.17", "karma": "^6.3.17",
"karma-chrome-launcher": "^3.1.1", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3", "karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^4.0.1", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.7.0", "karma-jasmine-html-reporter": "^1.5.0",
"karma-mocha-reporter": "^2.2.5", "karma-mocha-reporter": "^2.2.5",
"lint-staged": "^12.3.1", "lint-staged": "^12.3.1",
"lite-server": "^2.4.0", "lite-server": "^2.4.0",
"ng-packagr": "^10.1.2", "ng-packagr": "^13.3.0",
"node-stream-zip": "^1.14.0", "node-stream-zip": "^1.14.0",
"prettier": "2.5.1", "prettier": "2.5.1",
"protractor": "~7.0.0", "protractor": "~7.0.0",
@ -117,8 +117,9 @@
"selenium-webdriver": "^4.1.1", "selenium-webdriver": "^4.1.1",
"ts-node": "^10.2.1", "ts-node": "^10.2.1",
"tsconfig-paths": "3.12.0", "tsconfig-paths": "3.12.0",
"typescript": "3.9.8", "typescript": "4.6.3",
"webdriver-manager": "12.1.8" "webdriver-manager": "12.1.8",
"winston": "^3.4.0"
}, },
"lint-staged": { "lint-staged": {
"*.{ts,js,css,scss,html}": [ "*.{ts,js,css,scss,html}": [

View File

@ -113,7 +113,8 @@
"rules": { "rules": {
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@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

@ -1,6 +1,6 @@
{ {
"name": "@alfresco/aca-about", "name": "@alfresco/aca-about",
"version": "2.11.0", "version": "3.0.0",
"peerDependencies": { "peerDependencies": {
"@angular/common": "^10.0.14", "@angular/common": "^10.0.14",
"@angular/core": "^10.0.14" "@angular/core": "^10.0.14"

View File

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

View File

@ -3,6 +3,7 @@
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015", "target": "es2015",
"declaration": true, "declaration": true,
"inlineSources": true, "inlineSources": true,

View File

@ -1,7 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */ /* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": { "angularCompilerOptions": {
"enableIvy": false "compilationMode": "partial"
} }
} }

View File

@ -113,7 +113,8 @@
"rules": { "rules": {
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@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

@ -1,6 +1,6 @@
{ {
"name": "@alfresco/aca-settings", "name": "@alfresco/aca-settings",
"version": "2.11.0", "version": "3.0.0",
"peerDependencies": { "peerDependencies": {
"@angular/common": "^10.0.14", "@angular/common": "^10.0.14",
"@angular/core": "^10.0.14" "@angular/core": "^10.0.14"

View File

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

View File

@ -3,6 +3,7 @@
"extends": "../../tsconfig.json", "extends": "../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015", "target": "es2015",
"declaration": true, "declaration": true,
"inlineSources": true, "inlineSources": true,

View File

@ -1,7 +1,10 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */ /* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": { "angularCompilerOptions": {
"enableIvy": false "compilationMode": "partial"
} }
} }

View File

@ -24,7 +24,11 @@
"error", "error",
{ {
"type": "element", "type": "element",
"prefix": ["aca", "adf", "app"], "prefix": [
"aca",
"adf",
"app"
],
"style": "kebab-case" "style": "kebab-case"
} }
], ],
@ -32,7 +36,11 @@
"error", "error",
{ {
"type": "attribute", "type": "attribute",
"prefix": ["aca", "adf", "app"], "prefix": [
"aca",
"adf",
"app"
],
"style": "camelCase" "style": "camelCase"
} }
], ],
@ -103,7 +111,8 @@
"rules": { "rules": {
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@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", "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/@alfresco/aca-shared", "dest": "../../dist/@alfresco/aca-shared",
"lib": { "lib": {
"entryFile": "src/public-api.ts", "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"
}
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alfresco/aca-shared", "name": "@alfresco/aca-shared",
"version": "2.11.0", "version": "3.0.0",
"dependencies": { "dependencies": {
"tslib": "^2.0.0" "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 { Action } from '@ngrx/store';
import { Node, Person, Group, RepositoryInfo, VersionEntry } from '@alfresco/js-api'; import { Node, Person, Group, RepositoryInfo, VersionEntry } from '@alfresco/js-api';
import { AppState } from '../states/app.state'; import { AppState } from '../states/app.state';
import { AppActionTypes } from './app-action-types';
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'
}
export class SetSettingsParameterAction implements Action { export class SetSettingsParameterAction implements Action {
readonly type = AppActionTypes.SetSettingsParameter; 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'; import { Action } from '@ngrx/store';
import { ContextMenuActionTypes } from './context-menu-action-types';
export enum ContextMenuActionTypes {
ContextMenu = 'CONTEXT_MENU'
}
export class ContextMenu implements Action { export class ContextMenu implements Action {
readonly type = ContextMenuActionTypes.ContextMenu; 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 { Action } from '@ngrx/store';
import { MinimalNodeEntity } from '@alfresco/js-api'; import { MinimalNodeEntity } from '@alfresco/js-api';
import { RouterActionTypes } from './router-action-types';
export enum RouterActionTypes {
NavigateUrl = 'NAVIGATE_URL',
NavigateRoute = 'NAVIGATE_ROUTE',
NavigateFolder = 'NAVIGATE_FOLDER',
NavigateParentFolder = 'NAVIGATE_PARENT_FOLDER',
NavigateToPreviousPage = 'NAVIGATE_TO_PREVIOUS_PAGE'
}
export class NavigateUrlAction implements Action { export class NavigateUrlAction implements Action {
readonly type = RouterActionTypes.NavigateUrl; 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 { Action } from '@ngrx/store';
import { Node } from '@alfresco/js-api'; import { Node } from '@alfresco/js-api';
import { TemplateActionTypes } from './template-action-types';
export enum TemplateActionTypes {
FileFromTemplate = 'FILE_FROM_TEMPLATE',
FolderFromTemplate = 'FOLDER_FROM_TEMPLATE',
CreateFromTemplate = 'CREATE_FROM_TEMPLATE',
CreateFromTemplateSuccess = 'CREATE_FROM_TEMPLATE_SUCCESS'
}
export class FileFromTemplate implements Action { export class FileFromTemplate implements Action {
readonly type = TemplateActionTypes.FileFromTemplate; readonly type = TemplateActionTypes.FileFromTemplate;

View File

@ -27,7 +27,8 @@ import { Actions, ofType, createEffect } from '@ngrx/effects';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { MatDialog } from '@angular/material/dialog'; 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() @Injectable()
export class DialogEffects { export class DialogEffects {

View File

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

View File

@ -23,6 +23,10 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. * 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/app.actions';
export * from './actions/library.actions'; export * from './actions/library.actions';
export * from './actions/node.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 // 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';
import 'zone.js/dist/zone-testing'; import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing'; import { getTestBed } from '@angular/core/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
declare const require: any; declare const require: any;
// First, initialize the Angular testing environment. // First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting()); getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
});
// Then we find all the tests. // Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/); const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules. // And load the modules.

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "aca-testing-shared", "name": "aca-testing-shared",
"version": "2.11.0", "version": "3.0.0",
"main": "src/index.ts", "main": "src/index.ts",
"dependencies": { "dependencies": {
"tslib": "^2.0.0" "tslib": "^2.0.0"

View File

@ -25,8 +25,14 @@
import { by, ElementArrayFinder } from 'protractor'; import { by, ElementArrayFinder } from 'protractor';
import { GenericFilter } from './generic-filter'; import { GenericFilter } from './generic-filter';
import { BrowserActions } from '@alfresco/adf-testing'; import { BrowserActions, TestElement } from '@alfresco/adf-testing';
export enum SizeOptions {
Small = 'SMALL',
Medium = 'MEDIUM',
Large = 'LARGE',
Huge = 'HUGE'
}
export class SizeFilter extends GenericFilter { export class SizeFilter extends GenericFilter {
constructor() { constructor() {
super('Size'); super('Size');
@ -34,6 +40,8 @@ export class SizeFilter extends GenericFilter {
facets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox')); facets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox'));
selectedFacets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox.mat-checkbox-checked')); selectedFacets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox.mat-checkbox-checked'));
public getSizeCheckboxOption = (sizeOption: SizeOptions) =>
TestElement.byCss(`[data-automation-id="checkbox-SEARCH.CATEGORIES.SIZE_OPTIONS.${sizeOption}"] [type="checkbox"]`);
async getFiltersValues(): Promise<string[]> { async getFiltersValues(): Promise<string[]> {
return this.facets.map((option) => { return this.facets.map((option) => {
@ -56,24 +64,4 @@ export class SizeFilter extends GenericFilter {
} }
await this.closeDialog(); await this.closeDialog();
} }
async checkSizeSmall(): Promise<void> {
const small = this.facets.filter(async (elem) => (await elem.getText()) === 'Small').first();
await BrowserActions.click(small);
}
async checkSizeMedium(): Promise<void> {
const medium = this.facets.filter(async (elem) => (await elem.getText()) === 'Medium').first();
await BrowserActions.click(medium);
}
async checkSizeLarge(): Promise<void> {
const large = this.facets.filter(async (elem) => (await elem.getText()) === 'Large').first();
await BrowserActions.click(large);
}
async checkSizeHuge(): Promise<void> {
const huge = this.facets.filter(async (elem) => (await elem.getText()) === 'Huge').first();
await BrowserActions.click(huge);
}
} }

View File

@ -103,7 +103,8 @@
"rules": { "rules": {
"@angular-eslint/template/no-autofocus": "error", "@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off", "@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

@ -3,12 +3,6 @@
"dest": "../../dist/@alfresco/adf-office-services-ext", "dest": "../../dist/@alfresco/adf-office-services-ext",
"lib": { "lib": {
"entryFile": "src/public-api.ts", "entryFile": "src/public-api.ts",
"flatModuleFile": "adf-office-services-ext", "flatModuleFile": "adf-office-services-ext"
"umdModuleIds": {
"@alfresco/js-api": "@alfresco/js-api",
"@alfresco/adf-core": "@alfresco/adf-core",
"@alfresco/adf-extensions": "@alfresco/adf-extensions",
"@ngrx/effects": "@ngrx/effects"
}
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@alfresco/adf-office-services-ext", "name": "@alfresco/adf-office-services-ext",
"version": "2.11.0", "version": "3.0.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"homepage": "https://github.com/Alfresco/alfresco-content-app", "homepage": "https://github.com/Alfresco/alfresco-content-app",
"keywords": [ "keywords": [

View File

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

View File

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

View File

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