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",
null
],
"@typescript-eslint/naming-convention":[
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "enum",
"format": ["PascalCase"]
"format": [
"PascalCase"
]
}
],
"@typescript-eslint/type-annotation-spacing": "off",
@ -143,14 +145,15 @@
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-negated-async": "off",
"@angular-eslint/template/no-positive-tabindex": "error",
"@angular-eslint/template/accessibility-alt-text":"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-valid-aria":"error",
"@angular-eslint/template/click-events-have-key-events":"error",
"@angular-eslint/template/mouse-events-have-key-events":"error",
"@angular-eslint/template/no-distracting-elements":"error"
"@angular-eslint/template/accessibility-alt-text": "error",
"@angular-eslint/template/accessibility-elements-content": "error",
"@angular-eslint/template/accessibility-table-scope": "error",
"@angular-eslint/template/accessibility-valid-aria": "error",
"@angular-eslint/template/click-events-have-key-events": "error",
"@angular-eslint/template/mouse-events-have-key-events": "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
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,4 @@
@use '@angular/material' as mat;
@import '../colors';
@import './custom-palette-creator.scss';
@ -5,20 +6,20 @@
$mat-primary-palette: null;
@if $primary-color {
$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 {
$mat-primary-palette: mat-palette($aca-primary-blue, A100);
$mat-primary-palette: mat.define-palette($aca-primary-blue, A100);
}
$mat-accent-palette: null;
@if $accent-color {
$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 {
$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 (
primary: $mat-primary-palette,

View File

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

View File

@ -1,3 +1,4 @@
@use '@angular/material' as mat;
@import '../variables/font-family.scss';
@function get-mat-typography(
@ -8,21 +9,21 @@
$custom-typography: $default-typography;
@if $base-font-size {
$custom-typography: mat-typography-config(
$display-4: mat-typography-level(8rem, 8rem, 300),
$display-3: mat-typography-level(4rem, 4rem, 400),
$display-2: mat-typography-level(3.21rem, 3.21rem, 400),
$display-1: mat-typography-level(2.42rem, 2.85rem, 400),
$headline: mat-typography-level(1.71rem, 2.28rem, 400),
$title: mat-typography-level(1.42rem, 2.28rem, 500),
$subheading-2: mat-typography-level(1.14rem, 2rem, 400),
$subheading-1: mat-typography-level(1.07rem, 1.71rem, 400),
$body-2: mat-typography-level(1rem, 1.71rem, 500),
$body-1: mat-typography-level(1rem, 1.42rem, 400),
$caption: mat-typography-level(0.86rem, 1.42rem, 400),
$button: mat-typography-level(1rem, 1rem, 500),
$custom-typography: mat.define-typography-config(
$display-4: mat.define-typography-level(8rem, 8rem, 300),
$display-3: mat.define-typography-level(4rem, 4rem, 400),
$display-2: mat.define-typography-level(3.21rem, 3.21rem, 400),
$display-1: mat.define-typography-level(2.42rem, 2.85rem, 400),
$headline: mat.define-typography-level(1.71rem, 2.28rem, 400),
$title: mat.define-typography-level(1.42rem, 2.28rem, 500),
$subheading-2: mat.define-typography-level(1.14rem, 2rem, 400),
$subheading-1: mat.define-typography-level(1.07rem, 1.71rem, 400),
$body-2: mat.define-typography-level(1rem, 1.71rem, 500),
$body-1: mat.define-typography-level(1rem, 1.42rem, 400),
$caption: mat.define-typography-level(0.86rem, 1.42rem, 400),
$button: mat.define-typography-level(1rem, 1rem, 500),
$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';
@import '~@alfresco/adf-core/theming';
@use '@angular/material' as mat;
@import '@alfresco/adf-core/theming';
@import 'custom-theme';
@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-thumb,
.mat-slide-toggle-ripple .mat-ripple-element {
background-color: mat-color($primary);
background-color: mat.get-color-from-palette($primary);
}
.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);
$accent: map-get($custom-theme, accent);
$primary: map-get($custom-theme, primary);
@ -6,19 +7,19 @@ $foreground: map-get($custom-theme, foreground);
$background: map-get($custom-theme, background);
//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;
$data-table-dividers-wrapper-border: none;
$data-table-thumbnail-width: 35px;
$data-table-cell-min-width: 150px;
$data-table-cell-min-width--no-grow: 120px;
$data-table-cell-min-width--fileSize: 110px !important;
$data-table-cell-text-color: mat-color($foreground, text, 0.54);
$data-table-cell-link-color: mat-color($foreground, text);
$data-table-cell-text-color: mat.get-color-from-palette($foreground, text, 0.54);
$data-table-cell-link-color: mat.get-color-from-palette($foreground, text);
$data-table-hover-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-toolbar-single-row-height: 48px;
@ -33,23 +34,23 @@ $adf-upload-dragging-level1-border: none;
$adf-permission-list-width: 100%;
$defaults: (
--theme-primary-color: mat-color($primary),
--theme-primary-color-default-contrast: mat-color($primary, default-contrast),
--theme-warn-color: mat-color($warn),
--theme-accent-color: mat-color($accent),
--theme-background-color: mat-color($background, background),
--theme-text-color: mat-color($foreground, text, 0.54),
--theme-text-bold-color: mat-color($foreground, text, 0.87),
--theme-title-color: mat-color($foreground, text, 0.87),
--theme-text-disabled-color: mat-color($foreground, text, 0.38),
--theme-border-color: mat-color($foreground, text, 0.07),
--theme-primary-color: mat.get-color-from-palette($primary),
--theme-primary-color-default-contrast: mat.get-color-from-palette($primary, default-contrast),
--theme-warn-color: mat.get-color-from-palette($warn),
--theme-accent-color: mat.get-color-from-palette($accent),
--theme-background-color: mat.get-color-from-palette($background, background),
--theme-text-color: mat.get-color-from-palette($foreground, text, 0.54),
--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),
--header-background-image: url('/assets/images/mastHead-bg-shapesPattern.svg'),
--theme-card-background-color: mat-color($background, card),
--theme-foreground-text-color: mat-color($foreground, text, 0.72),
--theme-foreground-text-bold-color: mat-color($foreground, text, 0.87),
--theme-secondary-text-color: mat-color($foreground, secondary-text),
--theme-divider-color: mat-color($foreground, divider, 0.07),
--theme-dialog-background-color: mat-color($background, dialog),
--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),
--new-button-font-size: 0.9rem,
);

View File

@ -43,19 +43,9 @@
* 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. **/
// 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
* 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.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS

View File

@ -42,7 +42,9 @@ declare const require: any;
__karma__.loaded = function () {};
// 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

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

@ -23,7 +23,17 @@
* 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';
const moment = require('moment');
@ -140,7 +150,7 @@ describe('Search filters', () => {
it('[C279199] Filter by Small', async () => {
await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.clickApplyButton();
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 () => {
await sizeFilter.openDialog();
await sizeFilter.checkSizeHuge();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Huge).click();
await sizeFilter.clickApplyButton();
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 () => {
await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall();
await sizeFilter.checkSizeMedium();
await sizeFilter.checkSizeLarge();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Medium).click();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Large).click();
await sizeFilter.clickApplyButton();
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 () => {
await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall();
await sizeFilter.checkSizeMedium();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Medium).click();
await sizeFilter.clickApplyButton();
await sizeFilter.openDialog();
@ -600,7 +610,7 @@ describe('Search filters', () => {
it('[C280051] Multiple filters can be applied', async () => {
await sizeFilter.openDialog();
await sizeFilter.checkSizeSmall();
await sizeFilter.getSizeCheckboxOption(SizeOptions.Small).click();
await sizeFilter.clickApplyButton();
await fileTypeFilter.openDialog();

View File

@ -3,7 +3,7 @@
"compilerOptions": {
"noEmit": true,
"noUnusedLocals": true,
"noImplicitAny": true,
"noImplicitAny": false,
"esModuleInterop": true,
"allowJs": 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",
"version": "2.11.0",
"version": "3.0.0",
"commit": "",
"license": "LGPL-3.0",
"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",
"prestart": "mkdir -p ./app/.tmp && npm run assemble-app-config && npm run validate-app-config",
"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",
"build": "ng build",
"build.release": "npm run build -- --configuration=production,release",
@ -21,63 +21,62 @@
"e2e.typecheck": "tsc -p ./e2e/tsconfig.e2e.typecheck.json",
"e2e": "npm run update-webdriver && protractor $SUITE",
"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,
"dependencies": {
"@alfresco/adf-content-services": "4.12.0-35332",
"@alfresco/adf-core": "4.12.0-35332",
"@alfresco/adf-extensions": "4.12.0-35332",
"@alfresco/js-api": "4.12.0-191",
"@angular/animations": "10.0.4",
"@angular/cdk": "^10.0.2",
"@angular/common": "10.0.4",
"@angular/compiler": "10.0.4",
"@angular/core": "10.0.4",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "10.0.4",
"@angular/material": "^10.0.2",
"@angular/material-moment-adapter": "^10.2.5",
"@angular/platform-browser": "10.0.4",
"@angular/platform-browser-dynamic": "10.0.4",
"@angular/router": "10.0.4",
"@mat-datetimepicker/core": "5.1.1",
"@mat-datetimepicker/moment": "5.1.1",
"@ngrx/effects": "^10.1.2",
"@ngrx/router-store": "^10.1.2",
"@ngrx/store": "^10.1.2",
"@ngrx/store-devtools": "^10.1.2",
"@ngx-translate/core": "^13.0.0",
"@alfresco/adf-content-services": "5.0.0-angular.13.1",
"@alfresco/adf-core": "5.0.0-angular.13.1",
"@alfresco/adf-extensions": "5.0.0-angular.13.1",
"@alfresco/js-api": "4.12.0-245",
"@angular/animations": "13.3.1",
"@angular/cdk": "13.3.9",
"@angular/common": "13.3.11",
"@angular/compiler": "13.3.1",
"@angular/core": "13.3.11",
"@angular/flex-layout": "^13.0.0-beta.38",
"@angular/forms": "13.3.11",
"@angular/material": "13.3.9",
"@angular/material-moment-adapter": "13.3.9",
"@angular/platform-browser": "13.3.11",
"@angular/platform-browser-dynamic": "13.3.11",
"@angular/router": "13.3.11",
"@mat-datetimepicker/core": "^9.0.68",
"@mat-datetimepicker/moment": "^9.0.68",
"@ngrx/effects": "^13.1.0",
"@ngrx/router-store": "^13.1.0",
"@ngrx/store": "^13.1.0",
"@ngrx/store-devtools": "^13.1.0",
"@ngx-translate/core": "^14.0.0",
"minimatch-browser": "^1.0.0",
"moment": "^2.27.0",
"moment-es6": "1.0.0",
"pdfjs-dist": "2.5.207",
"rxjs": "^6.6.3",
"tslib": "^2.4.0",
"zone.js": "~0.10.2"
"rxjs": "6.6.6",
"tslib": "^2.0.0",
"zone.js": "0.11.7"
},
"devDependencies": {
"@alfresco/adf-cli": "4.12.0-35332",
"@alfresco/adf-testing": "4.12.0-35332",
"@alfresco/adf-cli": "5.0.0-angular.13.1",
"@alfresco/adf-testing": "5.0.0-angular.13.1",
"@angular-custom-builders/lite-serve": "^0.2.3",
"@angular-devkit/build-angular": "^0.1002.0",
"@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular-eslint/builder": "1.2.0",
"@angular-eslint/eslint-plugin": "1.2.0",
"@angular-eslint/eslint-plugin-template": "1.2.0",
"@angular-eslint/schematics": "1.2.0",
"@angular-eslint/template-parser": "1.2.0",
"@angular/cli": "^10.1.4",
"@angular/compiler-cli": "10.0.4",
"@angular/language-service": "11.0.8",
"@angular-devkit/build-angular": "13.3.9",
"@angular-eslint/builder": "^13.2.0",
"@angular-eslint/eslint-plugin": "^13.2.0",
"@angular-eslint/eslint-plugin-template": "^13.2.0",
"@angular-eslint/schematics": "13.2.0",
"@angular-eslint/template-parser": "^13.2.0",
"@angular/cli": "13.3.9",
"@angular/compiler-cli": "13.3.11",
"@angular/language-service": "13.3.11",
"@types/event-emitter": "^0.3.3",
"@types/jasmine": "3.6.3",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^14.14.12",
"@types/selenium-webdriver": "^4.0.9",
"@types/superagent": "^4.1.10",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.3.0",
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.18.0",
"ajv-cli": "^4.2.0",
"browser-sync": "^2.27.7",
"commander": "^6.1.0",
@ -86,9 +85,9 @@
"dotenv": "8.2.0",
"dotenv-expand": "^5.1.0",
"envsub": "^4.0.7",
"eslint": "^7.6.0",
"eslint": "^8.2.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-prefer-arrow": "1.2.3",
"eslint-plugin-prettier": "^4.0.0",
@ -96,18 +95,19 @@
"eslint-plugin-unicorn": "^40.1.0",
"http-server": "^14.1.1",
"husky": "^7.0.2",
"jasmine-core": "^4.0.0",
"inquirer": "^8.1.5",
"jasmine-core": "~3.6.0",
"jasmine-marbles": "0.8.3",
"jasmine-spec-reporter": "^7.0.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.17",
"karma-chrome-launcher": "^3.1.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"karma-mocha-reporter": "^2.2.5",
"lint-staged": "^12.3.1",
"lite-server": "^2.4.0",
"ng-packagr": "^10.1.2",
"ng-packagr": "^13.3.0",
"node-stream-zip": "^1.14.0",
"prettier": "2.5.1",
"protractor": "~7.0.0",
@ -117,8 +117,9 @@
"selenium-webdriver": "^4.1.1",
"ts-node": "^10.2.1",
"tsconfig-paths": "3.12.0",
"typescript": "3.9.8",
"webdriver-manager": "12.1.8"
"typescript": "4.6.3",
"webdriver-manager": "12.1.8",
"winston": "^3.4.0"
},
"lint-staged": {
"*.{ts,js,css,scss,html}": [

View File

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

@ -1,6 +1,6 @@
{
"name": "@alfresco/aca-about",
"version": "2.11.0",
"version": "3.0.0",
"peerDependencies": {
"@angular/common": "^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
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';
@ -42,7 +42,9 @@ declare const require: {
};
// 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

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

View File

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

View File

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

@ -1,6 +1,6 @@
{
"name": "@alfresco/aca-settings",
"version": "2.11.0",
"version": "3.0.0",
"peerDependencies": {
"@angular/common": "^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
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';
@ -42,7 +42,9 @@ declare const require: {
};
// 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

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

View File

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

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"
}
}

View File

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

View File

@ -25,8 +25,14 @@
import { by, ElementArrayFinder } from 'protractor';
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 {
constructor() {
super('Size');
@ -34,6 +40,8 @@ export class SizeFilter extends GenericFilter {
facets: ElementArrayFinder = this.filterDialogOpened.all(by.css('.mat-checkbox'));
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[]> {
return this.facets.map((option) => {
@ -56,24 +64,4 @@ export class SizeFilter extends GenericFilter {
}
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": {
"@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

@ -3,12 +3,6 @@
"dest": "../../dist/@alfresco/adf-office-services-ext",
"lib": {
"entryFile": "src/public-api.ts",
"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"
}
"flatModuleFile": "adf-office-services-ext"
}
}

View File

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

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"
}
}