mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
Ng16 migration (#10114)
* NG-16 - migration step 1 * NG16 - fixed the builds * [MIGRATION] - Switching off no empty functions rule * [MIGRATION] - Somehow the fix for the cli types got lost * [MIGRATION] - Something happened on the way to heaven * [MIGRATION] - Ok this is weird * [MIGRATION] - Ok this is really weird * [MIGRATION] - change selector for expanded expansion panel content * [MIGRATION] - storybook chips related e2e fails fix, unit alignments * [MIGRATION] - Ok this is really weird * [MIGRATION] - Updating outdated packages * [MIGRATION] - updated deps for process cloud * [MIGRATION] - Rebased to latest * [MIGRATION] - Fixed lint * [MIGRATION] - Fixed package version * Rebased with lastest changes * [MIGRATION] - check to update the script * [MIGRATION] - rebased after the move of AlfrescoApiService * [MIGRATION] - fixed schematics build * [MIGRATION] - the lesson is : do not change what is already working * Rebased to latestp * Fixes after CR (#10202) * Fixed white background issue in sidenav after ng16 upgrade (#10207) * [MIGRATION] fix header background color not being read from input prop * Fixed build * Rebased * Fix package version after release * Thanks apollo deps * custom theme missing sidenav color * fix filter subscript overlapping dropdown items * [ACS-8749] View More tags button no longer shows when all tags are removed from a node (#10285) * [ACS-8741] Sidenav text for Process and Task filters is now grey (#10284) * AAE-26037 Moved permissions role selector styles to a dedicated file (#10297) * Removed fallback and starting using simple token * Removed fallback and starting using simple token * Fixed related unit test * Fixed related unit test * Writing should use the same calss as reading * Fixed unit tests for insights * Fixed unit tests for insights * Added fallback for JWT token * Added fallback for JWT token * Auto import fix * Added fallback for injection * Added fallback for injection * Trying to fix JWT token issue * Fixed unit tests * Fixed unit tests * Fixed style for collaborators * fixed permission row height * AAE-26163 Fix infinite loop when authentication error event occured (#10272) * AAE-26163 Logout user after 3 login attempts failed, avoiding infinite loop when an authentication error occured, like when a user machine clock is significantly out of sync * AAE-26163 Wait to discovery document to be loaded and user not authenticated to perform a ssoLogin, logout user if login fails after 3 attempts * AAE-26163 Fix missed id_token_hint invoking logout when a login error occured due to a clock significantly out of sync * AAE-26163 Add fake observable to unit test * AAE-26163 Show oauth event logs if showDebugInformation is enabled, remove auth items if access token is not valid * AAE-26163 Improve tryLogin error message * AAE-26163 Check if token has expired to fix case when user access the application after the token is expired and with a clock significantly out of sync * AAE-26163 Test logout when clock is out of sync * AAE-26163 Create a service to check if local machine time is out of sync * AAE-26163 Update oauthErrorEvent$ and combinedOAuthErrorsStream$ to return errors * AAE-26163 Output error within combined oauth error event subscription * AAE-26163 Fix lint problems * AAE-26163 Logout user when token refresh error happens for the second time, if the token is not refreshed properly after first refresh error * AAE-26163 Logout user once an oauth error event occur due to clock out of sync * AAE-26163 Fix retry login error message if the OAuthErrorEvent doesn t return reason * AAE-26163 Fix the issue where the logout API call is canceled by the authorize call when login fails due to clock synchronization problems, causing an infinite loop. * remove console.log * AAE-26163 Fix retry login error message if the OAuthErrorEvent reason is an empty object * Updating dependencies * Fixed subject complete to avoid calling a reset event when complete --------- Co-authored-by: Wojciech Duda <69160975+wojd0@users.noreply.github.com> Co-authored-by: dominikiwanekhyland <141320833+dominikiwanekhyland@users.noreply.github.com> Co-authored-by: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com> Co-authored-by: Ehsan Rezaei <ehsan.rezaei@hyland.com> Co-authored-by: Amedeo Lepore <amedeo.lepore@hyland.com>
This commit is contained in:
parent
0a89d9be97
commit
41391a0bb9
@ -9,3 +9,4 @@ scripts
|
||||
/angular.json
|
||||
docs/**/*.md
|
||||
lib/js-api/docs/**/*.md
|
||||
.storybook
|
||||
|
10
.eslintrc.js
10
.eslintrc.js
@ -12,7 +12,7 @@ module.exports = {
|
||||
'**/docs'
|
||||
],
|
||||
|
||||
plugins: ['@nrwl/nx'],
|
||||
plugins: ['@nx'],
|
||||
|
||||
overrides: [
|
||||
{
|
||||
@ -22,11 +22,10 @@ module.exports = {
|
||||
createDefaultProgram: true
|
||||
},
|
||||
extends: [
|
||||
'plugin:@nrwl/nx/typescript',
|
||||
'plugin:@nrwl/nx/angular',
|
||||
'plugin:@nx/typescript',
|
||||
'plugin:@nx/angular',
|
||||
'plugin:@cspell/recommended',
|
||||
'plugin:@angular-eslint/ng-cli-compat',
|
||||
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
|
||||
'plugin:@angular-eslint/recommended',
|
||||
'plugin:@angular-eslint/template/process-inline-templates',
|
||||
'plugin:jsdoc/recommended-typescript-error'
|
||||
],
|
||||
@ -104,6 +103,7 @@ module.exports = {
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/member-ordering': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'prefer-arrow/prefer-arrow-functions': 'off',
|
||||
'prefer-promise-reject-errors': 'error',
|
||||
'brace-style': 'off',
|
||||
|
1
.github/workflows/pull-request.yml
vendored
1
.github/workflows/pull-request.yml
vendored
@ -171,7 +171,6 @@ jobs:
|
||||
npx nx run js-api:bundle
|
||||
npx nx run cli:bundle
|
||||
npx nx run testing:bundle
|
||||
- run: npx nx print-affected $NX_CALCULATION_FLAGS
|
||||
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
||||
|
||||
unit-tests:
|
||||
|
10
.github/workflows/release-branch.yml
vendored
10
.github/workflows/release-branch.yml
vendored
@ -98,16 +98,16 @@ jobs:
|
||||
setMigrations();
|
||||
- name: Build libraries
|
||||
run: |
|
||||
npx nx affected:build $NX_CALCULATION_FLAGS --prod --skip-nx-cache
|
||||
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
|
||||
npx nx affected $NX_CALCULATION_FLAGS --target=build-schematics
|
||||
npx nx run-many --target=build --prod --exclude="demoshell" --skip-nx-cache
|
||||
npx nx run-many --target=pretheme
|
||||
npx nx run-many --target=build-schematics
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
name: release libraries GH registry
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
scope: '@alfresco'
|
||||
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=branch|| exit 1
|
||||
- run: npx nx run-many --target=npm-publish --tag=branch|| exit 1
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
|
||||
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
|
||||
@ -116,7 +116,7 @@ jobs:
|
||||
node-version-file: '.nvmrc'
|
||||
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
|
||||
scope: '@alfresco'
|
||||
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=branch || exit 1
|
||||
- run: npx nx run-many --target=npm-publish --tag=branch || exit 1
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
|
||||
|
||||
|
@ -6,5 +6,5 @@ module.exports = {
|
||||
staticDirs: [],
|
||||
docs: {},
|
||||
stories: [],
|
||||
addons: []
|
||||
addons: ['@chromatic-com/storybook']
|
||||
};
|
||||
|
@ -2,4 +2,4 @@ export const parameters = {
|
||||
docs: { inlineStories: true },
|
||||
controls: { expanded: true }
|
||||
};
|
||||
export const tags = ['autodocs'];
|
||||
export const tags = ['autodocs', 'autodocs', 'autodocs'];
|
||||
|
@ -4,7 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/cli/tsconfig.json"],
|
||||
"createDefaultProgram": true
|
||||
@ -44,7 +44,7 @@
|
||||
"project": ["lib/cli/tsconfig.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
|
@ -19,7 +19,7 @@
|
||||
"target": "es2018",
|
||||
"lib": ["es2018", "dom"],
|
||||
"baseUrl": ".",
|
||||
"typeRoots": ["node_modules/@types"],
|
||||
"typeRoots": ["node_modules/@types", "../../node_modules/@types"],
|
||||
"types": ["node"],
|
||||
"paths": {
|
||||
"@alfresco/js-api": ["../../dist/libs/js-api"],
|
||||
|
@ -4,7 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/content-services/tsconfig.lib.json", "lib/content-services/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
@ -15,7 +15,12 @@
|
||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||
"@typescript-eslint/prefer-for-of": "warn",
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"no-shadow": "warn",
|
||||
"quote-props": "warn",
|
||||
"object-shorthand": "warn",
|
||||
@ -23,7 +28,6 @@
|
||||
"arrow-body-style": "warn",
|
||||
"@angular-eslint/no-output-native": "off",
|
||||
"space-before-function-paren": "warn",
|
||||
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
@ -80,7 +84,7 @@
|
||||
"project": ["lib/content-services/tsconfig.lib.json", "lib/content-services/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {
|
||||
"@angular-eslint/template/no-autofocus": "error",
|
||||
"@angular-eslint/template/no-positive-tabindex": "error"
|
||||
|
@ -17,11 +17,5 @@ module.exports = {
|
||||
options: {}
|
||||
},
|
||||
|
||||
docs: {
|
||||
autodocs: true
|
||||
},
|
||||
|
||||
core: {
|
||||
builder: '@storybook/builder-webpack5'
|
||||
}
|
||||
docs: {}
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
export const parameters = {
|
||||
docs: { inlineStories: true },
|
||||
controls: { expanded: true }
|
||||
docs: { inlineStories: true },
|
||||
controls: { expanded: true }
|
||||
};
|
||||
export const tags = ['autodocs', 'autodocs'];
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { ContentAuthLoaderService } from './content-auth-loader.service';
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
/**
|
||||
* Create a content auth factory
|
||||
*
|
||||
|
@ -115,7 +115,9 @@ export class RenditionService {
|
||||
try {
|
||||
await this.renditionsApi.createRendition(nodeId, { id: renditionId });
|
||||
rendition = await this.waitRendition(nodeId, renditionId, 0);
|
||||
} catch {}
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Promise<RenditionEntry>((resolve) => resolve(rendition));
|
||||
|
@ -238,7 +238,9 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
try {
|
||||
statusCode = JSON.parse(error.message).error.statusCode;
|
||||
} catch {}
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
let message = `METADATA.ERRORS.${statusCode}`;
|
||||
|
||||
|
@ -252,7 +252,9 @@ export class ShareDialogComponent implements OnInit, OnDestroy {
|
||||
|
||||
try {
|
||||
statusCode = JSON.parse(error.message).error.statusCode;
|
||||
} catch {}
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
|
||||
if (statusCode === 403) {
|
||||
message = 'SHARE.UNSHARE_PERMISSION_ERROR';
|
||||
|
@ -1049,7 +1049,9 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On
|
||||
if (JSON.parse(err.message).error.statusCode === 403) {
|
||||
this.noPermission = true;
|
||||
}
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
this.setLoadingState(false);
|
||||
this.error.emit(err);
|
||||
|
@ -0,0 +1,11 @@
|
||||
@import 'styles/mat-selectors';
|
||||
|
||||
.adf-role-selector-field#{$mat-form-field} {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
height: 40px;
|
||||
|
||||
#{$mat-form-field-infix}:not(:disabled) {
|
||||
padding-top: 8px;
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
|
||||
import { RoleModel } from '../../models/role.model';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
@ -32,7 +32,7 @@ export interface RoleModelOption {
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatFormFieldModule, MatSelectModule, TranslateModule],
|
||||
template: `
|
||||
<mat-form-field class="adf-role-selector-field" *ngIf="!readonly">
|
||||
<mat-form-field class="adf-role-selector-field" *ngIf="!readonly" subscriptSizing="dynamic">
|
||||
<mat-select
|
||||
class="adf-role-selector"
|
||||
(click)="$event.stopPropagation()"
|
||||
@ -52,24 +52,9 @@ export interface RoleModelOption {
|
||||
{{ i18nValue | translate }}
|
||||
</span>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-user-role-column adf-datatable-content-cell adf-expand-cell-4' },
|
||||
styles: [
|
||||
`
|
||||
.adf-role-selector-field.mat-mdc-form-field {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
max-width: 200px;
|
||||
|
||||
.mat-mdc-form-field-infix {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.mat-mdc-form-field-subscript-wrapper {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
`
|
||||
]
|
||||
styleUrls: ['./user-role-column.component.scss']
|
||||
})
|
||||
export class UserRoleColumnComponent implements OnChanges {
|
||||
@Input()
|
||||
|
@ -25,7 +25,6 @@ import { TreeViewService } from '../services/tree-view.service';
|
||||
|
||||
@Injectable()
|
||||
export class TreeViewDataSource {
|
||||
|
||||
treeNodes: TreeBaseNode[];
|
||||
dataChange = new BehaviorSubject<TreeBaseNode[]>([]);
|
||||
childrenSubscription = null;
|
||||
@ -40,15 +39,13 @@ export class TreeViewDataSource {
|
||||
this.dataChange.next(value);
|
||||
}
|
||||
|
||||
constructor(private treeControl: FlatTreeControl<TreeBaseNode>,
|
||||
private treeViewService: TreeViewService) {
|
||||
this.dataChange.subscribe((treeNodes) => this.treeNodes = treeNodes);
|
||||
constructor(private treeControl: FlatTreeControl<TreeBaseNode>, private treeViewService: TreeViewService) {
|
||||
this.dataChange.subscribe((treeNodes) => (this.treeNodes = treeNodes));
|
||||
}
|
||||
|
||||
connect(collectionViewer: CollectionViewer): Observable<TreeBaseNode[]> {
|
||||
this.changeSubscription = this.treeControl.expansionModel.changed.subscribe((change) => {
|
||||
if ((change as SelectionChange<TreeBaseNode>).added &&
|
||||
(change as SelectionChange<TreeBaseNode>).added.length > 0) {
|
||||
if ((change as SelectionChange<TreeBaseNode>).added && (change as SelectionChange<TreeBaseNode>).added.length > 0) {
|
||||
this.expandTreeNodes(change as SelectionChange<TreeBaseNode>);
|
||||
} else if ((change as SelectionChange<TreeBaseNode>).removed) {
|
||||
this.reduceTreeNodes(change as SelectionChange<TreeBaseNode>);
|
||||
@ -71,33 +68,35 @@ export class TreeViewDataSource {
|
||||
}
|
||||
|
||||
private reduceTreeNodes(change: SelectionChange<TreeBaseNode>) {
|
||||
change.removed.slice().reverse().forEach((node) => this.toggleNode(node));
|
||||
change.removed
|
||||
.slice()
|
||||
.reverse()
|
||||
.forEach((node) => this.toggleNode(node));
|
||||
}
|
||||
|
||||
private expandNode(node: TreeBaseNode) {
|
||||
this.childrenSubscription = this.treeViewService.getTreeNodes(node.nodeId)
|
||||
.subscribe((children) => {
|
||||
const index = this.data.indexOf(node);
|
||||
if (!children || index < 0) {
|
||||
node.expandable = false;
|
||||
return;
|
||||
}
|
||||
const nodes = children.map((actualNode) => {
|
||||
actualNode.level = node.level + 1;
|
||||
return actualNode;
|
||||
});
|
||||
this.data.splice(index + 1, 0, ...nodes);
|
||||
this.dataChange.next(this.data);
|
||||
this.childrenSubscription = this.treeViewService.getTreeNodes(node.nodeId).subscribe((children) => {
|
||||
const index = this.data.indexOf(node);
|
||||
if (!children || index < 0) {
|
||||
node.expandable = false;
|
||||
return;
|
||||
}
|
||||
const nodes = children.map((actualNode) => {
|
||||
actualNode.level = node.level + 1;
|
||||
return actualNode;
|
||||
});
|
||||
this.data.splice(index + 1, 0, ...nodes);
|
||||
this.dataChange.next(this.data);
|
||||
});
|
||||
}
|
||||
|
||||
toggleNode(node: TreeBaseNode) {
|
||||
const index = this.data.indexOf(node);
|
||||
let count = 0;
|
||||
for (let i = index + 1; i < this.data.length
|
||||
&& this.data[i].level > node.level; i++ , count++) { }
|
||||
for (let i = index + 1; i < this.data.length && this.data[i].level > node.level; i++, count++) {
|
||||
/* empty */
|
||||
}
|
||||
this.data.splice(index + 1, count);
|
||||
this.dataChange.next(this.data);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
import { VersionCompatibilityService } from './version-compatibility.service';
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
/**
|
||||
* Create a version compatibility factory
|
||||
*
|
||||
|
@ -4,7 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/core/tsconfig.lib.json", "lib/core/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
@ -15,7 +15,12 @@
|
||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||
"@typescript-eslint/prefer-for-of": "off",
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"no-shadow": "warn",
|
||||
"quote-props": "warn",
|
||||
"object-shorthand": "warn",
|
||||
@ -24,7 +29,6 @@
|
||||
"arrow-body-style": "warn",
|
||||
"@angular-eslint/no-output-native": "off",
|
||||
"space-before-function-paren": "warn",
|
||||
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
@ -77,11 +81,10 @@
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {
|
||||
"@angular-eslint/template/no-autofocus": "error",
|
||||
"@angular-eslint/template/no-positive-tabindex": "error",
|
||||
|
||||
"@angular-eslint/template/no-negated-async": "off"
|
||||
}
|
||||
}
|
||||
|
@ -4,14 +4,19 @@ module.exports = {
|
||||
...rootMain,
|
||||
core: { ...rootMain.core, builder: 'webpack5' },
|
||||
stories: [...rootMain.stories, '../**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
|
||||
framework: {
|
||||
name: "@storybook/angular",
|
||||
options: (()=>console.log('loaded config!'))()
|
||||
},
|
||||
|
||||
staticDirs: [
|
||||
...rootMain.staticDirs,
|
||||
{ from: __dirname + '/../src/lib/i18n', to: 'assets/adf-core/i18n' },
|
||||
{ from: __dirname + '/../src/lib/assets/images', to: 'assets/images' }
|
||||
],
|
||||
addons: ['@storybook/addon-essentials', ...rootMain.addons]
|
||||
|
||||
addons: ['@storybook/addon-essentials', ...rootMain.addons],
|
||||
|
||||
docs: {}
|
||||
};
|
||||
|
@ -3,3 +3,4 @@ const rootPreview = require('../../../.storybook/preview');
|
||||
export const parameters = {
|
||||
...rootPreview.preview
|
||||
};
|
||||
export const tags = ['autodocs', 'autodocs'];
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
import { Inject, Injectable, inject } from '@angular/core';
|
||||
import { FeaturesServiceToken, IFeaturesService } from '../interfaces/features.interface';
|
||||
import { CanMatch, Route } from '@angular/router';
|
||||
import { Route } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export const isFeatureOff = (flag: string) => () => inject(FeaturesServiceToken).isOff$(flag);
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class IsFeatureOff implements CanMatch {
|
||||
export class IsFeatureOff {
|
||||
constructor(@Inject(FeaturesServiceToken) private featuresServiceToken: IFeaturesService) {}
|
||||
|
||||
canMatch(route: Route): Observable<boolean> {
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
import { Inject, Injectable, inject } from '@angular/core';
|
||||
import { FeaturesServiceToken, IFeaturesService } from '../interfaces/features.interface';
|
||||
import { CanMatch, Route } from '@angular/router';
|
||||
import { Route } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export const isFeatureOn = (flag: string) => () => inject(FeaturesServiceToken).isOn$(flag);
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class IsFeatureOn implements CanMatch {
|
||||
export class IsFeatureOn {
|
||||
constructor(@Inject(FeaturesServiceToken) private featuresServiceToken: IFeaturesService) {}
|
||||
|
||||
canMatch(route: Route): Observable<boolean> {
|
||||
|
@ -17,12 +17,12 @@
|
||||
|
||||
import { Inject, Injectable, Optional, inject } from '@angular/core';
|
||||
import { FlagsOverrideToken } from '../interfaces/features.interface';
|
||||
import { CanMatch } from '@angular/router';
|
||||
|
||||
|
||||
export const isFlagsOverrideOn = () => () => inject(FlagsOverrideToken) ?? false;
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class IsFlagsOverrideOn implements CanMatch {
|
||||
export class IsFlagsOverrideOn {
|
||||
constructor(@Optional() @Inject(FlagsOverrideToken) private devToolsToken: boolean) {}
|
||||
|
||||
canMatch(): boolean {
|
||||
|
@ -24,13 +24,14 @@
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"build-schematics": {
|
||||
"executor": "nx:run-commands",
|
||||
"executor": "@nrwl/js:tsc",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"options": {
|
||||
"commands": [
|
||||
{
|
||||
"command": "npx tsc -p lib/core/tsconfig.schematics.json && cp lib/core/schematics/migrations/collection.json dist/libs/core/schematics/migrations/collection.json"
|
||||
}
|
||||
]
|
||||
"outputPath": "dist/libs/core/schematics/migrations",
|
||||
"main": "lib/core/schematics/migrations/index.ts",
|
||||
"tsConfig": "lib/core/tsconfig.schematics.json",
|
||||
"externalBuildTargets": ["build-schematics"],
|
||||
"assets": ["lib/core/schematics/migrations/collection.json"]
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
||||
"$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
||||
"schematics": {
|
||||
"move-out-alfresco-api": {
|
||||
"description": "Update alfresco-api imports",
|
||||
|
@ -28,6 +28,7 @@ import { EMPTY, of } from 'rxjs';
|
||||
import { OidcAuthenticationService } from '../oidc/oidc-authentication.service';
|
||||
import { NoopTranslateModule } from '../../testing/noop-translate.module';
|
||||
|
||||
|
||||
describe('AuthGuardService ECM', () => {
|
||||
let authGuard: Promise<boolean>;
|
||||
let authService: AuthenticationService;
|
||||
|
@ -21,6 +21,7 @@ import { AuthGuardSsoRoleService } from './auth-guard-sso-role.service';
|
||||
import { JwtHelperService } from '../services/jwt-helper.service';
|
||||
import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
||||
import { NoopTranslateModule } from '../../testing/noop-translate.module';
|
||||
import { AuthModule } from '../oidc/auth.module';
|
||||
|
||||
describe('Auth Guard SSO role service', () => {
|
||||
let jwtHelperService: JwtHelperService;
|
||||
@ -29,7 +30,7 @@ describe('Auth Guard SSO role service', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopTranslateModule, MatDialogModule]
|
||||
imports: [NoopTranslateModule, MatDialogModule, AuthModule.forRoot({ useHash: true })]
|
||||
});
|
||||
localStorage.clear();
|
||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||
|
@ -28,6 +28,7 @@ import { EMPTY, of } from 'rxjs';
|
||||
import { MatDialogModule } from '@angular/material/dialog';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { NoopTranslateModule } from '../../testing/noop-translate.module';
|
||||
import { NoopAuthModule } from '../../testing';
|
||||
|
||||
describe('AuthGuardService', () => {
|
||||
let state: RouterStateSnapshot;
|
||||
@ -42,11 +43,10 @@ describe('AuthGuardService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopTranslateModule, MatDialogModule, RouterTestingModule],
|
||||
imports: [NoopTranslateModule, MatDialogModule, RouterTestingModule, NoopAuthModule],
|
||||
providers: [
|
||||
AppConfigService,
|
||||
StorageService,
|
||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of(), init: () => {} } },
|
||||
{
|
||||
provide: OidcAuthenticationService,
|
||||
useValue: {
|
||||
|
@ -15,10 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { APP_INITIALIZER, inject, ModuleWithProviders, NgModule, InjectionToken } from '@angular/core';
|
||||
import { AUTH_CONFIG, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { AuthenticationService } from '../services/authentication.service';
|
||||
import { StorageService } from '../../common/services/storage.service';
|
||||
import { AuthModuleConfig, AUTH_MODULE_CONFIG } from './auth-config';
|
||||
import { authConfigFactory, AuthConfigService } from './auth-config.service';
|
||||
import { AuthRoutingModule } from './auth-routing.module';
|
||||
@ -27,6 +26,12 @@ import { RedirectAuthService } from './redirect-auth.service';
|
||||
import { AuthenticationConfirmationComponent } from './view/authentication-confirmation/authentication-confirmation.component';
|
||||
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { TokenInterceptor } from './token.interceptor';
|
||||
import { StorageService } from '../../common/services/storage.service';
|
||||
|
||||
export const JWT_STORAGE_SERVICE = new InjectionToken<OAuthStorage>('JWT_STORAGE_SERVICE', {
|
||||
providedIn: 'root',
|
||||
factory: () => inject(StorageService)
|
||||
});
|
||||
|
||||
/**
|
||||
* Create a Login Factory function
|
||||
@ -38,11 +43,18 @@ export function loginFactory(redirectService: RedirectAuthService): () => Promis
|
||||
return () => redirectService.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns current instance of OAuthStorage
|
||||
*/
|
||||
export function oauthStorageFactory(): OAuthStorage {
|
||||
return inject(JWT_STORAGE_SERVICE);
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [AuthenticationConfirmationComponent],
|
||||
imports: [AuthRoutingModule, OAuthModule.forRoot()],
|
||||
providers: [
|
||||
{ provide: OAuthStorage, useExisting: StorageService },
|
||||
{ provide: OAuthStorage, useFactory: oauthStorageFactory },
|
||||
{ provide: AuthenticationService },
|
||||
{
|
||||
provide: AUTH_CONFIG,
|
||||
|
@ -35,6 +35,7 @@ import { IdentityRoleModel } from '../models/identity-role.model';
|
||||
import { AdfHttpClient } from '../../../../api/src';
|
||||
import { StorageService } from '../../common/services/storage.service';
|
||||
import { NoopTranslateModule } from '../../testing/noop-translate.module';
|
||||
import { OAuthStorage } from 'angular-oauth2-oidc';
|
||||
|
||||
describe('IdentityUserService', () => {
|
||||
const mockRoles = [
|
||||
@ -53,7 +54,7 @@ describe('IdentityUserService', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopTranslateModule],
|
||||
providers: [StorageService, AdfHttpClient]
|
||||
providers: [AdfHttpClient, { provide: OAuthStorage, useClass: StorageService }]
|
||||
});
|
||||
storageService = TestBed.inject(StorageService);
|
||||
service = TestBed.inject(IdentityUserService);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { JWT_STORAGE_SERVICE, JwtHelperService } from './jwt-helper.service';
|
||||
import { JwtHelperService } from './jwt-helper.service';
|
||||
import { mockToken } from '../mock/jwt-helper.service.spec';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { StorageService } from '../../common';
|
||||
@ -42,7 +42,7 @@ describe('JwtHelperService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [JwtHelperService, { provide: StorageService, useValue: mockStorage }]
|
||||
providers: [JwtHelperService, { provide: OAuthStorage, useValue: mockStorage }]
|
||||
});
|
||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||
});
|
||||
@ -140,15 +140,11 @@ describe('JwtHelperService with custom storage service', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
JwtHelperService,
|
||||
{ provide: StorageService, useValue: mockStorage },
|
||||
{ provide: JWT_STORAGE_SERVICE, useValue: mockCustomStorage }
|
||||
]
|
||||
providers: [JwtHelperService, { provide: StorageService, useValue: mockStorage }, { provide: OAuthStorage, useValue: mockCustomStorage }]
|
||||
});
|
||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||
defaultStorage = TestBed.inject(StorageService);
|
||||
customStorage = TestBed.inject(JWT_STORAGE_SERVICE);
|
||||
customStorage = TestBed.inject(OAuthStorage);
|
||||
});
|
||||
|
||||
it('should use the custom storage service', () => {
|
||||
|
@ -15,14 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { inject, Injectable, InjectionToken } from '@angular/core';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { StorageService } from '../../common/services/storage.service';
|
||||
|
||||
export const JWT_STORAGE_SERVICE = new InjectionToken<OAuthStorage>('JWT_STORAGE_SERVICE', {
|
||||
providedIn: 'root',
|
||||
factory: () => inject(StorageService)
|
||||
});
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -39,7 +33,7 @@ export class JwtHelperService {
|
||||
static USER_PREFERRED_USERNAME = 'preferred_username';
|
||||
static HXP_AUTHORIZATION = 'hxp_authorization';
|
||||
|
||||
private storageService: OAuthStorage = inject(JWT_STORAGE_SERVICE);
|
||||
private storageService: OAuthStorage = inject(OAuthStorage)
|
||||
|
||||
/**
|
||||
* Decodes a JSON web token into a JS object.
|
||||
|
@ -20,6 +20,8 @@ import { UserAccessService } from './user-access.service';
|
||||
import { JwtHelperService } from './jwt-helper.service';
|
||||
import { AppConfigService } from '../../app-config';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { AuthModule, JWT_STORAGE_SERVICE } from '../oidc/auth.module';
|
||||
import { StorageService } from '../../common/services/storage.service';
|
||||
|
||||
describe('UserAccessService', () => {
|
||||
let userAccessService: UserAccessService;
|
||||
@ -28,8 +30,8 @@ describe('UserAccessService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [HttpClientTestingModule],
|
||||
providers: [UserAccessService]
|
||||
imports: [HttpClientTestingModule, AuthModule.forRoot({ useHash: true })],
|
||||
providers: [{ provide: JWT_STORAGE_SERVICE, useClass: StorageService }, UserAccessService]
|
||||
});
|
||||
userAccessService = TestBed.inject(UserAccessService);
|
||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
<div class="adf-select-filter-input-container">
|
||||
<mat-form-field>
|
||||
<mat-form-field subscriptSizing="dynamic">
|
||||
<input matInput
|
||||
autocomplete="off"
|
||||
(keydown)="handleKeydown($event)"
|
||||
|
@ -53,7 +53,9 @@ export class ClipboardService {
|
||||
this.document.execCommand('copy');
|
||||
}
|
||||
this.notify(message);
|
||||
} catch {}
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,7 +78,9 @@ export class ClipboardService {
|
||||
document.execCommand('copy');
|
||||
}
|
||||
this.notify(message);
|
||||
} catch {}
|
||||
} catch {
|
||||
/* empty */
|
||||
}
|
||||
}
|
||||
|
||||
private notify(message) {
|
||||
|
@ -29,7 +29,7 @@ import { Subject } from 'rxjs';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class LogService {
|
||||
get currentLogLevel() {
|
||||
get currentLogLevel(): number {
|
||||
const configLevel: string = this.appConfig.get<string>(AppConfigValues.LOG_LEVEL);
|
||||
|
||||
if (configLevel) {
|
||||
@ -171,7 +171,7 @@ export class LogService {
|
||||
* @param level Level name
|
||||
* @returns Numeric log level
|
||||
*/
|
||||
getLogLevel(level: string): LogLevelsEnum {
|
||||
getLogLevel(level: string): number {
|
||||
const referencedLevel = logLevels.find((currentLevel: any) => currentLevel.name.toLocaleLowerCase() === level.toLocaleLowerCase());
|
||||
|
||||
return referencedLevel ? referencedLevel.level : 5;
|
||||
|
@ -22,36 +22,38 @@ export interface FileInfo {
|
||||
}
|
||||
|
||||
export class FileUtils {
|
||||
|
||||
static flatten(folder: any): Promise<FileInfo[]> {
|
||||
const reader = folder.createReader();
|
||||
const files: FileInfo[] = [];
|
||||
return new Promise((resolve) => {
|
||||
const iterations = [];
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
(function traverse() {
|
||||
reader.readEntries((entries) => {
|
||||
if (!entries.length) {
|
||||
Promise.all(iterations).then(() => resolve(files));
|
||||
} else {
|
||||
iterations.push(Promise.all(entries.map((entry) => {
|
||||
if (entry.isFile) {
|
||||
return new Promise<void>((resolveFile) => {
|
||||
entry.file((file: File) => {
|
||||
files.push({
|
||||
entry,
|
||||
file,
|
||||
relativeFolder: entry.fullPath.replace(/\/[^/]*$/, '')
|
||||
iterations.push(
|
||||
Promise.all(
|
||||
entries.map((entry) => {
|
||||
if (entry.isFile) {
|
||||
return new Promise<void>((resolveFile) => {
|
||||
entry.file((file: File) => {
|
||||
files.push({
|
||||
entry,
|
||||
file,
|
||||
relativeFolder: entry.fullPath.replace(/\/[^/]*$/, '')
|
||||
});
|
||||
resolveFile();
|
||||
});
|
||||
});
|
||||
resolveFile();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return FileUtils.flatten(entry).then((result) => {
|
||||
files.push(...result);
|
||||
});
|
||||
}
|
||||
})));
|
||||
} else {
|
||||
return FileUtils.flatten(entry).then((result) => {
|
||||
files.push(...result);
|
||||
});
|
||||
}
|
||||
})
|
||||
)
|
||||
);
|
||||
// Try calling traverse() again for the same dir, according to spec
|
||||
traverse();
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
<button
|
||||
data-automation-id="adf-dynamic-chip-list-view-more-button"
|
||||
mat-button
|
||||
[hidden]="!limitChipsDisplayed"
|
||||
[hidden]="chipsToDisplay.length === 0 || !limitChipsDisplayed"
|
||||
[style.left.px]="viewMoreButtonLeftOffset"
|
||||
[style.top.px]="viewMoreButtonTop"
|
||||
class="adf-dynamic-chip-list-view-more-button"
|
||||
|
@ -182,7 +182,7 @@ describe('DynamicChipListComponent', () => {
|
||||
element.style.maxWidth = '309px';
|
||||
});
|
||||
|
||||
afterEach(() =>{
|
||||
afterEach(() => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
@ -317,5 +317,15 @@ describe('DynamicChipListComponent', () => {
|
||||
fixture.detectChanges();
|
||||
expect(viewMoreButton.hidden).toBeTrue();
|
||||
}));
|
||||
|
||||
it('should not render View more button if there are no chips', fakeAsync(() => {
|
||||
renderChips();
|
||||
component.chips = [];
|
||||
tick();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(component.chipsToDisplay).toEqual([]);
|
||||
expect(findViewMoreButton().hidden).toBeTrue();
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
adf-layout-header .adf-toolbar-container-row {
|
||||
color: var(--theme-header-text-color);
|
||||
background-color: var(--theme-primary-color);
|
||||
position: relative;
|
||||
padding: 0 24px;
|
||||
|
||||
|
@ -5,6 +5,13 @@ adf-layout-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
.adf-layout-container-sidenav {
|
||||
overflow: hidden;
|
||||
border-right: 1px solid var(--adf-theme-foreground-text-color-007);
|
||||
background-color: var(--theme-background-color);
|
||||
color: var(--adf-theme-foreground-text-color);
|
||||
}
|
||||
}
|
||||
|
||||
.adf-container-full-width {
|
||||
@ -26,13 +33,7 @@ adf-layout-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.adf-layout-container-sidenav {
|
||||
overflow: hidden;
|
||||
border-right: 1px solid var(--adf-theme-foreground-text-color-007);
|
||||
background-color: var(--theme-background-color);
|
||||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
/* stylelint-disable selector-class-pattern, declaration-no-important */
|
||||
#{$mat-sidenav-content},
|
||||
#{$mat-drawer-transition} #{$mat-drawer-content} {
|
||||
margin-left: 0 !important;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<div (keyup)="onKeyPress($event)" tabindex="-1" role="button" class="adf-notification-history-container">
|
||||
<button mat-button
|
||||
[matMenuTriggerFor]="menu"
|
||||
aria-hidden="false"
|
||||
[attr.aria-label]="'NOTIFICATIONS.OPEN_HISTORY' | translate"
|
||||
title="{{ 'NOTIFICATIONS.OPEN_HISTORY' | translate }}"
|
||||
class="adf-notification-history-menu_button"
|
||||
|
@ -166,9 +166,12 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
|
||||
private toggleSearch = new Subject<any>();
|
||||
private focusSubscription: Subscription;
|
||||
private valueChange = new Subject<string>();
|
||||
private toggleSubscription: Subscription;
|
||||
|
||||
toggle$ = this.toggleSearch.asObservable();
|
||||
|
||||
constructor(private userPreferencesService: UserPreferencesService) {
|
||||
this.toggleSearch.pipe(debounceTime(200), takeUntil(this.onDestroy$)).subscribe(() => {
|
||||
this.toggleSubscription = this.toggle$.pipe(debounceTime(200), takeUntil(this.onDestroy$)).subscribe(() => {
|
||||
if (this.expandable) {
|
||||
this.subscriptAnimationState = this.toggleAnimation();
|
||||
if (this.subscriptAnimationState.value === 'inactive') {
|
||||
@ -302,6 +305,7 @@ export class SearchTextInputComponent implements OnInit, OnDestroy {
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.toggleSearch) {
|
||||
this.toggleSubscription.unsubscribe();
|
||||
this.toggleSearch.complete();
|
||||
this.toggleSearch = null;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { APP_INITIALIZER, Injectable, NgModule } from '@angular/core';
|
||||
import { AuthModule, RedirectAuthService } from '../auth';
|
||||
import { AuthModule, JWT_STORAGE_SERVICE, RedirectAuthService } from '../auth';
|
||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppConfigService, StoragePrefixFactory } from '../app-config';
|
||||
@ -47,7 +47,8 @@ export class NoopRedirectAuthService extends RedirectAuthService {
|
||||
useFactory: loadAppConfig,
|
||||
deps: [AppConfigService, StorageService, AdfHttpClient, StoragePrefixFactory],
|
||||
multi: true
|
||||
}
|
||||
},
|
||||
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService }
|
||||
]
|
||||
})
|
||||
export class NoopAuthModule {}
|
||||
|
@ -20,7 +20,7 @@ import { TranslateLoaderService } from './translate-loader.service';
|
||||
import { TranslationService } from './translation.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { CoreModule } from '../core.module';
|
||||
import { AuthModule } from '../auth';
|
||||
import { AuthModule } from '../auth/oidc/auth.module';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@ -30,14 +30,8 @@ describe('TranslateLoader', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
AuthModule.forRoot({ useHash: true }),
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
providers: [
|
||||
TranslationService
|
||||
]
|
||||
imports: [AuthModule.forRoot({ useHash: true }), TranslateModule.forRoot(), CoreModule.forRoot()],
|
||||
providers: [TranslationService]
|
||||
});
|
||||
translationService = TestBed.inject(TranslationService);
|
||||
customLoader = translationService.translate.currentLoader as TranslateLoaderService;
|
||||
|
@ -21,7 +21,8 @@
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"target": "es2015",
|
||||
"types": []
|
||||
"typeRoots": ["node_modules/@types"],
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": [
|
||||
"migrations/**/*"
|
||||
|
@ -20,7 +20,7 @@
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"target": "es2015",
|
||||
"types": []
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": [
|
||||
"schematics/**/*"
|
||||
|
@ -4,14 +4,18 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/extensions/tsconfig.lib.json", "lib/extensions/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"rules": {
|
||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
@ -64,7 +68,7 @@
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {
|
||||
"@angular-eslint/template/no-autofocus": "error",
|
||||
"@angular-eslint/template/no-positive-tabindex": "error"
|
||||
|
@ -27,7 +27,6 @@ import { RuleService } from './rule.service';
|
||||
import { ExtensionElement } from '../config/extension-element';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
/**
|
||||
* The default extensions factory
|
||||
*
|
||||
@ -47,7 +46,6 @@ export const EXTENSION_JSON_VALUES = new InjectionToken<string[][]>('extension-j
|
||||
factory: extensionJsonsFactory
|
||||
});
|
||||
|
||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
||||
/**
|
||||
* Provides the extension json values for the angular modules
|
||||
*
|
||||
|
@ -4,39 +4,32 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular"
|
||||
],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/insights/tsconfig.lib.json", "lib/insights/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"rules": {
|
||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"@angular-eslint/no-output-native": "off",
|
||||
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "element",
|
||||
"prefix": [
|
||||
"adf",
|
||||
"app"
|
||||
],
|
||||
"prefix": ["adf", "app"],
|
||||
"style": "kebab-case"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": [
|
||||
"element",
|
||||
"attribute"
|
||||
],
|
||||
"prefix": [
|
||||
"adf",
|
||||
"app"
|
||||
],
|
||||
"type": ["element", "attribute"],
|
||||
"prefix": ["adf", "app"],
|
||||
"style": "kebab-case"
|
||||
}
|
||||
],
|
||||
@ -77,7 +70,7 @@
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/insights/tsconfig.lib.json", "lib/insights/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
|
@ -17,17 +17,13 @@
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import {
|
||||
AppConfigService,
|
||||
AppConfigServiceMock,
|
||||
AuthModule,
|
||||
NoopTranslateModule
|
||||
} from '@alfresco/adf-core';
|
||||
import { AppConfigService, AppConfigServiceMock, AuthModule, JWT_STORAGE_SERVICE, NoopTranslateModule, StorageService } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
@NgModule({
|
||||
imports: [AuthModule.forRoot({ useHash: true }), NoopAnimationsModule, NoopTranslateModule],
|
||||
providers: [
|
||||
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService },
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock }
|
||||
],
|
||||
|
@ -4,9 +4,14 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"rules": {
|
||||
"no-underscore-dangle": ["warn", { "allowAfterThis": true }],
|
||||
"no-underscore-dangle": [
|
||||
"warn",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
@ -30,7 +35,6 @@
|
||||
"no-duplicate-imports": "error",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"no-return-await": "error",
|
||||
|
||||
"unicorn/filename-case": "off",
|
||||
"@typescript-eslint/no-unused-expressions": "off",
|
||||
"@typescript-eslint/consistent-type-assertions": "off",
|
||||
|
@ -19,7 +19,6 @@
|
||||
"superagent": "^9.0.1",
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"main": "./index.js",
|
||||
"typings": "./typings/index.d.ts",
|
||||
"module": "./esm5/index.js",
|
||||
"es2015": "./esm2015/index.js"
|
||||
|
@ -4,9 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular"
|
||||
],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/process-services-cloud/tsconfig.lib.json", "lib/process-services-cloud/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
@ -17,7 +15,12 @@
|
||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||
"@typescript-eslint/prefer-for-of": "warn",
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"no-shadow": "warn",
|
||||
"quote-props": "warn",
|
||||
"object-shorthand": "warn",
|
||||
@ -25,7 +28,6 @@
|
||||
"arrow-body-style": "warn",
|
||||
"@angular-eslint/no-output-native": "off",
|
||||
"space-before-function-paren": "warn",
|
||||
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
@ -78,7 +80,7 @@
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/process-services-cloud/tsconfig.lib.json", "lib/process-services-cloud/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
|
@ -2,13 +2,9 @@ var rootPath = require('../../../.storybook/main');
|
||||
|
||||
module.exports = {
|
||||
rootMain: rootPath,
|
||||
stories: [...rootPath.stories, '../src/lib/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
stories: [...rootPath.stories, '../**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
|
||||
staticDirs: [
|
||||
...rootPath.staticDirs,
|
||||
{ from: '../../core/src/lib/i18n', to: 'assets/adf-core/i18n' },
|
||||
{ from: __dirname + '/../src/lib/i18n', to: 'assets/adf-process-services-cloud/i18n' }
|
||||
],
|
||||
staticDirs: [...rootPath.staticDirs, { from: __dirname + '/../src/lib/i18n', to: 'assets/adf-core/i18n' }],
|
||||
|
||||
addons: ['@storybook/addon-essentials', ...rootPath.addons],
|
||||
|
||||
@ -17,11 +13,5 @@ module.exports = {
|
||||
options: {}
|
||||
},
|
||||
|
||||
docs: {
|
||||
autodocs: true
|
||||
},
|
||||
|
||||
core: {
|
||||
builder: '@storybook/builder-webpack5'
|
||||
}
|
||||
docs: {}
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
export const parameters = {
|
||||
docs: { inlineStories: true },
|
||||
controls: { expanded: true }
|
||||
docs: { inlineStories: true },
|
||||
controls: { expanded: true }
|
||||
};
|
||||
export const tags = ['autodocs', 'autodocs'];
|
||||
|
2282
lib/process-services-cloud/package-lock.json
generated
2282
lib/process-services-cloud/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -39,9 +39,9 @@
|
||||
"@alfresco/js-api": ">=8.0.0-alpha.4-0",
|
||||
"@alfresco/adf-core": ">=7.0.0-alpha.4-0",
|
||||
"@alfresco/adf-content-services": ">=7.0.0-alpha.4-0",
|
||||
"@apollo/client": "^3.7.2",
|
||||
"@apollo/client": ">=3.7.2",
|
||||
"@ngx-translate/core": ">=14.0.0",
|
||||
"apollo-angular": "^4.0.1",
|
||||
"apollo-angular": ">=4.0.1",
|
||||
"subscriptions-transport-ws": "^0.11.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -60,12 +60,12 @@ import { FormCloudRepresentation } from '../models/form-cloud-representation.mod
|
||||
import { FormCloudService } from '../services/form-cloud.service';
|
||||
import { DisplayModeService } from '../services/display-mode.service';
|
||||
import { FormCloudComponent } from './form-cloud.component';
|
||||
import { ProcessServicesCloudModule } from '../../process-services-cloud.module';
|
||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
||||
import { FormCloudDisplayMode } from '../../services/form-fields.interfaces';
|
||||
import { CloudFormRenderingService } from './cloud-form-rendering.service';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||
import { ProcessServicesCloudModule } from '../../process-services-cloud.module';
|
||||
|
||||
const mockOauth2Auth: any = {
|
||||
oauth2Auth: {
|
||||
|
@ -23,7 +23,6 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatFormFieldHarness } from '@angular/material/form-field/testing';
|
||||
|
||||
describe('GroupCloudWidgetComponent', () => {
|
||||
let fixture: ComponentFixture<GroupCloudWidgetComponent>;
|
||||
@ -145,12 +144,6 @@ describe('GroupCloudWidgetComponent', () => {
|
||||
value: mockSpaghetti
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const formField = await loader.getHarness(MatFormFieldHarness);
|
||||
expect(await formField.isDisabled()).toBeTrue();
|
||||
|
||||
const groupChip = await loader.getHarness(MatChipHarness);
|
||||
expect(await groupChip.isDisabled()).toBeTrue();
|
||||
});
|
||||
@ -166,12 +159,6 @@ describe('GroupCloudWidgetComponent', () => {
|
||||
value: mockSpaghetti
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
const formField = await loader.getHarness(MatFormFieldHarness);
|
||||
expect(await formField.isDisabled()).toBeTrue();
|
||||
|
||||
const groupChips = await loader.getAllHarnesses(MatChipHarness);
|
||||
expect(await groupChips[0].isDisabled()).toBeTrue();
|
||||
expect(await groupChips[1].isDisabled()).toBeTrue();
|
||||
|
@ -24,8 +24,7 @@ import { IdentityUserService } from '../../../../people/services/identity-user.s
|
||||
import { mockShepherdsPie, mockYorkshirePudding } from '../../../../people/mock/people-cloud.mock';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatFormFieldHarness } from '@angular/material/form-field/testing';
|
||||
import { MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatChipRowHarness } from '@angular/material/chips/testing';
|
||||
|
||||
describe('PeopleCloudWidgetComponent', () => {
|
||||
let fixture: ComponentFixture<PeopleCloudWidgetComponent>;
|
||||
@ -174,12 +173,8 @@ describe('PeopleCloudWidgetComponent', () => {
|
||||
value: mockSpaghetti
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
const peopleChip = await loader.getHarness(MatChipRowHarness);
|
||||
|
||||
const formField = await loader.getHarness(MatFormFieldHarness);
|
||||
expect(await formField.isDisabled()).toBeTrue();
|
||||
|
||||
const peopleChip = await loader.getHarness(MatChipHarness);
|
||||
expect(await peopleChip.isDisabled()).toBeTrue();
|
||||
});
|
||||
|
||||
@ -194,11 +189,7 @@ describe('PeopleCloudWidgetComponent', () => {
|
||||
value: mockSpaghetti
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
const formField = await loader.getHarness(MatFormFieldHarness);
|
||||
expect(await formField.isDisabled()).toBeTrue();
|
||||
|
||||
const peopleChip = await loader.getAllHarnesses(MatChipHarness);
|
||||
const peopleChip = await loader.getAllHarnesses(MatChipRowHarness);
|
||||
expect(await peopleChip[0].isDisabled()).toBeTrue();
|
||||
expect(await peopleChip[1].isDisabled()).toBeTrue();
|
||||
});
|
||||
|
@ -66,7 +66,9 @@ export class ContentCloudNodeSelectorService {
|
||||
if (destinationFolderPath.alias && destinationFolderPath.path) {
|
||||
try {
|
||||
return await this.getNodeId(destinationFolderPath.alias, destinationFolderPath.path).toPromise();
|
||||
} catch {}
|
||||
} catch {
|
||||
/*empty*/
|
||||
}
|
||||
}
|
||||
|
||||
return this.getNodeId(destinationFolderPath.alias).toPromise();
|
||||
@ -82,7 +84,9 @@ export class ContentCloudNodeSelectorService {
|
||||
if (nodeId) {
|
||||
try {
|
||||
isExistingNode = await this.getNodeId(nodeId).pipe(mapTo(true)).toPromise();
|
||||
} catch {}
|
||||
} catch {
|
||||
/*empty*/
|
||||
}
|
||||
}
|
||||
return isExistingNode;
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
<form>
|
||||
<mat-form-field class="adf-cloud-group" [class.adf-invalid]="hasError() && isDirty()">
|
||||
<ng-content select="[label]"></ng-content>
|
||||
<mat-chip-grid #groupChipList [disabled]="isReadonly() || isValidationLoading()" data-automation-id="adf-cloud-group-chip-list">
|
||||
<mat-chip-grid #groupChipList data-automation-id="adf-cloud-group-chip-list">
|
||||
<mat-chip-row
|
||||
*ngFor="let group of selectedGroups"
|
||||
[removable]="!(group.readonly)"
|
||||
[attr.data-automation-id]="'adf-cloud-group-chip-' + group.name"
|
||||
(removed)="onRemove(group)"
|
||||
[disabled]="isReadonly() || isValidationLoading()"
|
||||
title="{{ (group.readonly ? 'ADF_CLOUD_GROUPS.MANDATORY' : '') | translate }}">
|
||||
{{group.name}}
|
||||
<mat-icon
|
||||
|
@ -26,7 +26,7 @@ import { IdentityGroupService } from '../services/identity-group.service';
|
||||
import { mockFoodGroups, mockMeatChicken, mockVegetableAubergine } from '../mock/group-cloud.mock';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatChipGridHarness, MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatIconHarness } from '@angular/material/icon/testing';
|
||||
import { MatInputHarness } from '@angular/material/input/testing';
|
||||
|
||||
@ -357,9 +357,7 @@ describe('GroupCloudComponent', () => {
|
||||
|
||||
const chips = await loader.getAllHarnesses(MatChipHarness);
|
||||
expect(chips.length).toBe(1);
|
||||
|
||||
const chipList = await loader.getHarness(MatChipGridHarness);
|
||||
expect(await chipList.isDisabled()).toBe(true);
|
||||
expect(await chips[0].isDisabled()).toBe(true);
|
||||
});
|
||||
|
||||
it('should chip list be disabled and show all the chips - multiple mode', async () => {
|
||||
@ -372,9 +370,8 @@ describe('GroupCloudComponent', () => {
|
||||
|
||||
const chips = await loader.getAllHarnesses(MatChipHarness);
|
||||
expect(chips.length).toBe(2);
|
||||
|
||||
const chipList = await loader.getHarness(MatChipGridHarness);
|
||||
expect(await chipList.isDisabled()).toBe(true);
|
||||
expect(await chips[0].isDisabled()).toBe(true);
|
||||
expect(await chips[1].isDisabled()).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -8,12 +8,13 @@
|
||||
>
|
||||
<ng-content *ngIf="!title" select="[label]"></ng-content>
|
||||
<mat-label *ngIf="title">{{ title | translate }}</mat-label>
|
||||
<mat-chip-grid #userMultipleChipList [disabled]="isReadonly() || isValidationLoading()" data-automation-id="adf-cloud-people-chip-list">
|
||||
<mat-chip-grid #userMultipleChipList data-automation-id="adf-cloud-people-chip-list">
|
||||
<mat-chip-row
|
||||
*ngFor="let user of selectedUsers"
|
||||
[removable]="!(user.readonly)"
|
||||
[attr.data-automation-id]="'adf-people-cloud-chip-' + user.username"
|
||||
(removed)="onRemove(user)"
|
||||
[disabled]="isReadonly() || isValidationLoading()"
|
||||
title="{{ (user.readonly ? 'ADF_CLOUD_GROUPS.MANDATORY' : '') | translate }}">
|
||||
{{user | fullName}}
|
||||
<mat-icon
|
||||
@ -38,7 +39,6 @@
|
||||
>
|
||||
</mat-chip-grid>
|
||||
|
||||
|
||||
<mat-autocomplete autoActiveFirstOption class="adf-people-cloud-list"
|
||||
#auto="matAutocomplete"
|
||||
(optionSelected)="onSelect($event.option.value)"
|
||||
|
@ -28,7 +28,7 @@ import { IDENTITY_USER_SERVICE_TOKEN } from '../services/identity-user-service.t
|
||||
import { mockFoodUsers, mockKielbasaSausage, mockShepherdsPie, mockYorkshirePudding, mockPreselectedFoodUsers } from '../mock/people-cloud.mock';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatChipGridHarness, MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatChipHarness } from '@angular/material/chips/testing';
|
||||
import { MatInputHarness } from '@angular/material/input/testing';
|
||||
import { MatFormFieldHarness } from '@angular/material/form-field/testing';
|
||||
|
||||
@ -406,9 +406,7 @@ describe('PeopleCloudComponent', () => {
|
||||
|
||||
const chips = await loader.getAllHarnesses(MatChipHarness);
|
||||
expect(chips.length).toBe(1);
|
||||
|
||||
const chipList = await loader.getHarness(MatChipGridHarness);
|
||||
expect(await chipList.isDisabled()).toBe(true);
|
||||
expect(await chips[0].isDisabled()).toBe(true);
|
||||
});
|
||||
|
||||
it('should chip list be disabled and show mat chips for all the preselected users - multiple mode', async () => {
|
||||
@ -421,9 +419,8 @@ describe('PeopleCloudComponent', () => {
|
||||
|
||||
const chips = await loader.getAllHarnesses(MatChipHarness);
|
||||
expect(chips.length).toBe(2);
|
||||
|
||||
const chipList = await loader.getHarness(MatChipGridHarness);
|
||||
expect(await chipList.isDisabled()).toBe(true);
|
||||
expect(await chips[0].isDisabled()).toBe(true);
|
||||
expect(await chips[1].isDisabled()).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { AlfrescoApiService } from '@alfresco/adf-content-services';
|
||||
import { ADF_DATE_FORMATS, FullNamePipe, NoopTranslateModule, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { ADF_DATE_FORMATS, FullNamePipe, NoopAuthModule, NoopTranslateModule, UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
@ -101,6 +101,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
NoopAuthModule,
|
||||
MatIconTestingModule,
|
||||
MatDialogModule,
|
||||
NoopTranslateModule,
|
||||
|
@ -24,7 +24,9 @@ import {
|
||||
TranslationService,
|
||||
TranslationMock,
|
||||
CoreModule,
|
||||
AuthModule
|
||||
AuthModule,
|
||||
JWT_STORAGE_SERVICE,
|
||||
StorageService
|
||||
} from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
@ -44,7 +46,8 @@ import { RouterTestingModule } from '@angular/router/testing';
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock }
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: JWT_STORAGE_SERVICE, useClass: StorageService }
|
||||
],
|
||||
exports: [NoopAnimationsModule, TranslateModule, CoreModule, ProcessServicesCloudModule]
|
||||
})
|
||||
|
@ -4,7 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/process-services/tsconfig.lib.json", "lib/process-services/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
@ -14,7 +14,12 @@
|
||||
"@typescript-eslint/naming-convention": "warn",
|
||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||
"@typescript-eslint/prefer-for-of": "warn",
|
||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||
"no-underscore-dangle": [
|
||||
"error",
|
||||
{
|
||||
"allowAfterThis": true
|
||||
}
|
||||
],
|
||||
"no-shadow": "warn",
|
||||
"quote-props": "warn",
|
||||
"object-shorthand": "warn",
|
||||
@ -22,7 +27,6 @@
|
||||
"arrow-body-style": "warn",
|
||||
"@angular-eslint/no-output-native": "off",
|
||||
"space-before-function-paren": "warn",
|
||||
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
@ -75,7 +79,7 @@
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/process-services/tsconfig.lib.json", "lib/process-services/tsconfig.spec.json"],
|
||||
"createDefaultProgram": true
|
||||
|
@ -20,6 +20,7 @@ adf-process-instance-filters {
|
||||
.adf-filter-action-button__label {
|
||||
padding-left: 20px;
|
||||
margin: 0 8px;
|
||||
color: var(--theme-action-button-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ adf-task-filters {
|
||||
.adf-filter-action-button__label {
|
||||
padding-left: 20px;
|
||||
margin: 0 8px;
|
||||
color: var(--theme-action-button-text-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,14 @@ module.exports = {
|
||||
...rootMain,
|
||||
framework: "@storybook/angular",
|
||||
core: { ...rootMain.core, builder: 'webpack5' },
|
||||
|
||||
stories: [
|
||||
...rootMain.stories,
|
||||
'../../core/**/*.stories.@(js|jsx|ts|tsx)',
|
||||
'../../content-services/**/*.stories.@(js|jsx|ts|tsx)',
|
||||
'../../process-services-cloud/**/*.stories.@(js|jsx|ts|tsx)'
|
||||
],
|
||||
|
||||
staticDirs: [
|
||||
...rootMain.staticDirs,
|
||||
{ from: '../../core/src/lib/i18n', to: 'assets/adf-core/i18n' },
|
||||
@ -17,5 +19,8 @@ module.exports = {
|
||||
{ from: '../../content-services/src/lib/i18n', to: 'assets/adf-content-services/i18n' },
|
||||
{ from: '../../process-services-cloud/src/lib/i18n', to: 'assets/adf-process-services-cloud/i18n' }
|
||||
],
|
||||
addons: ['@storybook/addon-essentials', ...rootMain.addons]
|
||||
|
||||
addons: ['@storybook/addon-essentials', ...rootMain.addons],
|
||||
|
||||
docs: {}
|
||||
};
|
||||
|
@ -2,3 +2,4 @@ export const parameters = {
|
||||
docs: { inlineStories: true },
|
||||
controls: { expanded: true }
|
||||
};
|
||||
export const tags = ['autodocs', 'autodocs'];
|
||||
|
@ -4,7 +4,7 @@
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": ["plugin:@nrwl/nx/angular"],
|
||||
"extends": ["plugin:@nx/angular"],
|
||||
"parserOptions": {
|
||||
"project": ["lib/testing/tsconfig.lib.json"],
|
||||
"createDefaultProgram": true
|
||||
@ -67,7 +67,7 @@
|
||||
"project": ["lib/testing/tsconfig.lib.json"],
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"extends": ["plugin:@nx/angular-template"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
|
@ -22,7 +22,6 @@ import { Logger } from '../../utils/logger';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
export class GroupIdentityService {
|
||||
|
||||
api: ApiService;
|
||||
|
||||
constructor(api: ApiService) {
|
||||
@ -75,9 +74,11 @@ export class GroupIdentityService {
|
||||
|
||||
Logger.log(`Data ${JSON.stringify(data)}`);
|
||||
|
||||
return data[0]; Logger.error('Group not found');
|
||||
|
||||
return data[0];
|
||||
Logger.error('Group not found');
|
||||
} catch (error) {
|
||||
Logger.error('Group not found');
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
@ -135,5 +136,4 @@ export class GroupIdentityService {
|
||||
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
|
||||
return data[0].id;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -388,7 +388,9 @@ export class DataTableComponentPage {
|
||||
this.rootElement.element(by.tagName(materialLocators.Progress.spinner.root)),
|
||||
MAX_LOADING_TIME
|
||||
);
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
Logger.error('Loading spinner is not present');
|
||||
}
|
||||
|
||||
if (await this.isEmpty()) {
|
||||
Logger.log('empty page');
|
||||
@ -414,7 +416,9 @@ export class DataTableComponentPage {
|
||||
try {
|
||||
Logger.log('wait datatable loading spinner is present');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.tagName(materialLocators.Progress.bar.root)));
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
Logger.error('Infinite pagination spinner is not present');
|
||||
}
|
||||
if (await this.isEmpty()) {
|
||||
Logger.log('empty page');
|
||||
} else {
|
||||
|
@ -43,6 +43,7 @@ export class LoginPage {
|
||||
try {
|
||||
currentUrl = await browser.getCurrentUrl();
|
||||
} catch (e) {
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
if (!currentUrl || currentUrl.indexOf(this.loginUrl) === -1) {
|
||||
@ -87,7 +88,7 @@ export class LoginPage {
|
||||
if (oauth2 && oauth2.silentLogin === false) {
|
||||
Logger.log(`Login SSO`);
|
||||
await this.clickOnSSOButton();
|
||||
}else{
|
||||
} else {
|
||||
Logger.log(`Login SSO silent login`);
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,8 @@ export const materialLocators = {
|
||||
class: '.mat-expansion-panel-header',
|
||||
root: 'mat-expansion-panel-header'
|
||||
},
|
||||
title: '.mat-expansion-panel-header-title'
|
||||
title: '.mat-expansion-panel-header-title',
|
||||
expanded: '.mat-expanded'
|
||||
},
|
||||
indicator: '.mat-expansion-indicator'
|
||||
},
|
||||
|
@ -75,7 +75,9 @@ export class ViewerPage {
|
||||
Logger.log('wait spinner is present');
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.tagName(materialLocators.Progress.spinner.root)));
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(element(by.tagName(materialLocators.Progress.spinner.root)), MAX_LOADING_TIME);
|
||||
} catch (error) {}
|
||||
} catch (error) {
|
||||
Logger.error('Spinner is not present');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ import { ApiService } from '../../../shared/api/api.service';
|
||||
import { ApiUtil } from '../../../shared/api/api.util';
|
||||
|
||||
export class Application {
|
||||
|
||||
requestApiHelper: E2eRequestApiHelper;
|
||||
endPoint = `/deployment-service/v1/applications/`;
|
||||
|
||||
@ -57,6 +56,7 @@ export class Application {
|
||||
return this.requestApiHelper.delete(`${this.endPoint}${applicationName}`);
|
||||
} catch (error) {
|
||||
Logger.error(`[Application] Undeploy application ${applicationName} failed with error: ${error.message}`);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
return ApiUtil.waitForApi(apiCall, isApplicationUndeployed, 10, 3000);
|
||||
|
@ -23,7 +23,6 @@ import { ApiUtil } from '../../../shared/api/api.util';
|
||||
import { ApiService } from '../../../shared/api/api.service';
|
||||
|
||||
export class Descriptor {
|
||||
|
||||
requestApiHelper: E2eRequestApiHelper;
|
||||
endPoint = `deployment-service/v1/descriptors/`;
|
||||
|
||||
@ -61,6 +60,7 @@ export class Descriptor {
|
||||
return this.requestApiHelper.delete(`${this.endPoint}${name}`);
|
||||
} catch (error) {
|
||||
Logger.error(`[Descriptor] Delete descriptor ${name} failed with error: ${error.message}`);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
return ApiUtil.waitForApi(apiCall, isDescriptorDeleted, 10, 15000);
|
||||
|
@ -36,7 +36,6 @@ export interface FilterProps {
|
||||
}
|
||||
|
||||
export class EditProcessFilterCloudComponentPage {
|
||||
|
||||
rootElement = $$('adf-cloud-edit-process-filter').first();
|
||||
customiseFilter = $('#adf-edit-process-filter-sub-title-id');
|
||||
saveButton = $('button[data-automation-id="adf-filter-action-save"]');
|
||||
@ -48,17 +47,29 @@ export class EditProcessFilterCloudComponentPage {
|
||||
statusDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-status']`));
|
||||
sortDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-sort']`));
|
||||
orderDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-order']`));
|
||||
processDefinitionNameDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-processDefinitionName']`));
|
||||
suspendedDateRangeDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-suspendedDateRange']`));
|
||||
startedDateRangeDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-startedDateRange']`));
|
||||
completedDateRangeDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-completedDateRange']`));
|
||||
suspendedDateRangeWithin = new DatePickerPage($(`${materialLocators.Datepicker.toggle.root}[data-automation-id='adf-cloud-edit-process-property-date-range-suspendedDateRange']`));
|
||||
processDefinitionNameDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-processDefinitionName']`)
|
||||
);
|
||||
suspendedDateRangeDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-suspendedDateRange']`)
|
||||
);
|
||||
startedDateRangeDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-startedDateRange']`)
|
||||
);
|
||||
completedDateRangeDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-completedDateRange']`)
|
||||
);
|
||||
suspendedDateRangeWithin = new DatePickerPage(
|
||||
$(`${materialLocators.Datepicker.toggle.root}[data-automation-id='adf-cloud-edit-process-property-date-range-suspendedDateRange']`)
|
||||
);
|
||||
|
||||
peopleCloudComponent = new PeopleCloudComponentPage();
|
||||
editProcessFilterDialogPage = new EditProcessFilterDialogPage();
|
||||
|
||||
private expansionPanelExtended = this.rootElement.$(`${materialLocators.Expansion.panel.header.root}${materialLocators.Expanded.class}`);
|
||||
private content = TestElement.byCss(`adf-cloud-edit-process-filter ${materialLocators.Expansion.panel.root} [style*="visible"]`);
|
||||
private content = TestElement.byCss(
|
||||
`adf-cloud-edit-process-filter ${materialLocators.Expansion.panel.root}${materialLocators.Expansion.panel.expanded} ${materialLocators.Expansion.panel.content.class}`
|
||||
);
|
||||
|
||||
editProcessFilterDialog(): EditProcessFilterDialogPage {
|
||||
return this.editProcessFilterDialogPage;
|
||||
|
@ -28,7 +28,6 @@ import { materialLocators } from '../../public-api';
|
||||
export type StatusType = 'All' | 'Created' | 'Assigned' | 'Cancelled' | 'Suspended' | 'Completed';
|
||||
|
||||
export class EditTaskFilterCloudComponentPage {
|
||||
|
||||
rootElement = $$('adf-cloud-edit-task-filter').first();
|
||||
customiseFilter = $('#adf-edit-task-filter-sub-title-id');
|
||||
assignee = $('input[data-automation-id="adf-cloud-edit-task-property-assignee"]');
|
||||
@ -51,21 +50,33 @@ export class EditTaskFilterCloudComponentPage {
|
||||
sortDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-task-property-sort']`));
|
||||
priorityDropdown = new DropdownPage(this.priority);
|
||||
orderDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-task-property-order']`));
|
||||
completedDateDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id="adf-cloud-edit-process-property-completedDateRange"]`));
|
||||
completedDateDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id="adf-cloud-edit-process-property-completedDateRange"]`)
|
||||
);
|
||||
assignmentDropdown = new DropdownPage($(`.adf-task-assignment-filter`));
|
||||
processDefinitionNameDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id="adf-cloud-edit-task-property-processDefinitionName"]`));
|
||||
createdDateRangeDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-createdDateRange']`));
|
||||
createdDateRangeWithin = new DatePickerPage($(`${materialLocators.Datepicker.toggle.root}[data-automation-id='adf-cloud-edit-process-property-date-range-createdDateRange']`));
|
||||
processDefinitionNameDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id="adf-cloud-edit-task-property-processDefinitionName"]`)
|
||||
);
|
||||
createdDateRangeDropdown = new DropdownPage(
|
||||
$(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-createdDateRange']`)
|
||||
);
|
||||
createdDateRangeWithin = new DatePickerPage(
|
||||
$(`${materialLocators.Datepicker.toggle.root}[data-automation-id='adf-cloud-edit-process-property-date-range-createdDateRange']`)
|
||||
);
|
||||
dueDateRangeDropdown = new DropdownPage($(`${materialLocators.Select.root}[data-automation-id='adf-cloud-edit-process-property-dueDateRange']`));
|
||||
dueDateRangeWithin = new DatePickerPage($(`${materialLocators.Datepicker.toggle.root}[data-automation-id='adf-cloud-edit-picker-date-range-dueDateRange']`));
|
||||
dueDateRangeWithin = new DatePickerPage(
|
||||
$(`${materialLocators.Datepicker.toggle.root}[data-automation-id='adf-cloud-edit-picker-date-range-dueDateRange']`)
|
||||
);
|
||||
|
||||
peopleCloudComponent = new PeopleCloudComponentPage();
|
||||
groupCloudComponent = new GroupCloudComponentPage();
|
||||
|
||||
dataTable = new DataTableComponentPage( $('adf-cloud-task-list'));
|
||||
dataTable = new DataTableComponentPage($('adf-cloud-task-list'));
|
||||
|
||||
private expansionPanelExtended = this.rootElement.$(`${materialLocators.Expansion.panel.header.root}${materialLocators.Expanded.class}`);
|
||||
private content = this.rootElement.$(`div${materialLocators.Expansion.panel.content.class}[style*="visible"]`);
|
||||
private content = this.rootElement.$(
|
||||
`${materialLocators.Expansion.panel.root}${materialLocators.Expansion.panel.expanded} ${materialLocators.Expansion.panel.content.class}`
|
||||
);
|
||||
|
||||
async isFilterDisplayed(): Promise<boolean> {
|
||||
return BrowserVisibility.waitUntilElementIsVisible(this.filter);
|
||||
@ -307,5 +318,4 @@ export class EditTaskFilterCloudComponentPage {
|
||||
async getProcessInstanceId(): Promise<string> {
|
||||
return BrowserActions.getInputValue(this.processInstanceId);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export class LogLevelsEnum extends Number {
|
||||
static SILENT: number = 0;
|
||||
}
|
||||
|
||||
export const logLevels: { level: LogLevelsEnum; name: LOG_LEVEL }[] = [
|
||||
export const logLevels: { level: number; name: LOG_LEVEL }[] = [
|
||||
{ level: LogLevelsEnum.TRACE, name: 'TRACE' },
|
||||
{ level: LogLevelsEnum.DEBUG, name: 'DEBUG' },
|
||||
{ level: LogLevelsEnum.INFO, name: 'INFO' },
|
||||
@ -51,11 +51,10 @@ export interface LoggerLike {
|
||||
|
||||
/* eslint-disable no-console */
|
||||
export class GenericLogger implements LoggerLike {
|
||||
|
||||
private level: LogLevelsEnum;
|
||||
private level: number;
|
||||
|
||||
constructor(logLevel: string) {
|
||||
this.level = logLevels.find(({name}) => name === logLevel)?.level || LogLevelsEnum.ERROR;
|
||||
this.level = logLevels.find(({ name }) => name === logLevel)?.level || LogLevelsEnum.ERROR;
|
||||
}
|
||||
|
||||
info(...messages: string[]): void {
|
||||
|
21
nx.json
21
nx.json
@ -1,5 +1,6 @@
|
||||
{
|
||||
"npmScope": "adf",
|
||||
"defaultProject": "demoshell",
|
||||
"affected": {
|
||||
"defaultBase": "develop"
|
||||
},
|
||||
@ -13,6 +14,14 @@
|
||||
"production",
|
||||
"^production"
|
||||
]
|
||||
},
|
||||
"build-storybook": {
|
||||
"inputs": [
|
||||
"default",
|
||||
"^production",
|
||||
"{projectRoot}/.storybook/**/*",
|
||||
"{projectRoot}/tsconfig.storybook.json"
|
||||
]
|
||||
}
|
||||
},
|
||||
"tasksRunnerOptions": {
|
||||
@ -34,7 +43,14 @@
|
||||
},
|
||||
"namedInputs": {
|
||||
"default": [
|
||||
"{projectRoot}/**/*"
|
||||
"{projectRoot}/**/*",
|
||||
"sharedGlobals"
|
||||
],
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/angular.json",
|
||||
"{workspaceRoot}/demo-shell/src/index.html",
|
||||
"{workspaceRoot}/e2e/protractor.excludes.json",
|
||||
"{workspaceRoot}/e2e/protractor.conf.js"
|
||||
],
|
||||
"production": [
|
||||
"default",
|
||||
@ -42,7 +58,8 @@
|
||||
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
|
||||
"!{projectRoot}/**/*.spec.[jt]s",
|
||||
"!{projectRoot}/tsconfig.spec.json",
|
||||
"!{projectRoot}/karma.conf.js"
|
||||
"!{projectRoot}/karma.conf.js",
|
||||
"!{projectRoot}/tsconfig.storybook.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
24097
package-lock.json
generated
24097
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
112
package.json
112
package.json
@ -29,28 +29,28 @@
|
||||
"process services-cloud"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/animations": "15.2.10",
|
||||
"@angular/cdk": "15.2.9",
|
||||
"@angular/common": "15.2.10",
|
||||
"@angular/compiler": "15.2.10",
|
||||
"@angular/core": "15.2.10",
|
||||
"@angular/forms": "15.2.10",
|
||||
"@angular/material": "15.2.9",
|
||||
"@angular/material-date-fns-adapter": "15.2.9",
|
||||
"@angular/platform-browser": "15.2.10",
|
||||
"@angular/platform-browser-dynamic": "15.2.10",
|
||||
"@angular/router": "15.2.10",
|
||||
"@apollo/client": "^3.10.2",
|
||||
"@angular/animations": "16.2.9",
|
||||
"@angular/cdk": "16.2.9",
|
||||
"@angular/common": "16.2.9",
|
||||
"@angular/compiler": "16.2.9",
|
||||
"@angular/core": "16.2.9",
|
||||
"@angular/forms": "16.2.9",
|
||||
"@angular/material": "16.2.9",
|
||||
"@angular/material-date-fns-adapter": "16.2.9",
|
||||
"@angular/platform-browser": "16.2.9",
|
||||
"@angular/platform-browser-dynamic": "16.2.9",
|
||||
"@angular/router": "16.2.9",
|
||||
"@apollo/client": "3.11.4",
|
||||
"@cspell/eslint-plugin": "^7.3.6",
|
||||
"@mat-datetimepicker/core": "11.0.3",
|
||||
"@mat-datetimepicker/core": "12.0.1",
|
||||
"@ngx-translate/core": "^14.0.0",
|
||||
"@storybook/core-server": "8.2.6",
|
||||
"@storybook/theming": "8.2.6",
|
||||
"angular-oauth2-oidc": "^15.0.1",
|
||||
"@storybook/addon-interactions": "^8.2.9",
|
||||
"@storybook/core-server": "^8.2.9",
|
||||
"@storybook/theming": "^8.2.9",
|
||||
"angular-oauth2-oidc": "16.0.0",
|
||||
"angular-oauth2-oidc-jwks": "^17.0.2",
|
||||
"apollo-angular": "^5.0.2",
|
||||
"axios": "^1.7.4",
|
||||
"chart.js": "^4.3.0",
|
||||
"chart.js": "4.4.4",
|
||||
"cropperjs": "1.6.2",
|
||||
"date-fns": "^2.30.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
@ -65,39 +65,42 @@
|
||||
"superagent": "^9.0.1",
|
||||
"ts-morph": "^20.0.0",
|
||||
"tslib": "^2.6.2",
|
||||
"zone.js": "~0.11.4"
|
||||
"zone.js": "0.13.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@alfresco/eslint-plugin-eslint-angular": "file:lib/eslint-angular",
|
||||
"@angular-devkit/architect": "^0.1502.10",
|
||||
"@angular-devkit/build-angular": "15.2.11",
|
||||
"@angular-devkit/core": "15.2.10",
|
||||
"@angular-devkit/schematics": "15.2.10",
|
||||
"@angular-eslint/eslint-plugin": "15.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "16.0.2",
|
||||
"@angular-eslint/template-parser": "16.2.0",
|
||||
"@angular/cli": "15.2.10",
|
||||
"@angular/compiler-cli": "15.2.10",
|
||||
"@angular-devkit/architect": "0.1602.9",
|
||||
"@angular-devkit/build-angular": "16.2.9",
|
||||
"@angular-devkit/core": "16.2.9",
|
||||
"@angular-devkit/schematics": "16.2.9",
|
||||
"@angular-eslint/eslint-plugin": "16.0.3",
|
||||
"@angular-eslint/eslint-plugin-template": "16.0.3",
|
||||
"@angular-eslint/template-parser": "16.0.3",
|
||||
"@angular/cli": "~16.2.0",
|
||||
"@angular/compiler-cli": "16.2.9",
|
||||
"@chromatic-com/storybook": "1.7.0",
|
||||
"@editorjs/code": "2.9.0",
|
||||
"@editorjs/editorjs": "^2.29.0",
|
||||
"@editorjs/editorjs": "2.30.5",
|
||||
"@editorjs/header": "2.8.1",
|
||||
"@editorjs/inline-code": "1.5.0",
|
||||
"@editorjs/list": "1.10.0",
|
||||
"@editorjs/marker": "1.4.0",
|
||||
"@editorjs/paragraph": "^2.11.6",
|
||||
"@editorjs/underline": "1.1.0",
|
||||
"@nrwl/angular": "15.9.3",
|
||||
"@nrwl/eslint-plugin-nx": "15.9.3",
|
||||
"@nrwl/js": "^15.9.7",
|
||||
"@nrwl/node": "15.9.3",
|
||||
"@nrwl/storybook": "15.9.3",
|
||||
"@nrwl/workspace": "15.9.3",
|
||||
"@nx/angular": "16.10.0",
|
||||
"@nx/eslint-plugin": "16.10.0",
|
||||
"@nx/js": "16.10.0",
|
||||
"@nx/node": "16.10.0",
|
||||
"@nx/storybook": "19.6.2",
|
||||
"@nx/workspace": "16.10.0",
|
||||
"@paperist/types-remark": "0.1.3",
|
||||
"@playwright/test": "1.46.1",
|
||||
"@quanzo/change-font-size": "1.0.0",
|
||||
"@schematics/angular": "15.2.10",
|
||||
"@storybook/addon-essentials": "8.2.6",
|
||||
"@storybook/angular": "8.2.6",
|
||||
"@storybook/core-server": "8.2.6",
|
||||
"@schematics/angular": "16.2.9",
|
||||
"@storybook/addon-essentials": "^8.2.9",
|
||||
"@storybook/angular": "^8.2.9",
|
||||
"@storybook/core-server": "^8.2.9",
|
||||
"@storybook/manager-api": "^8.2.9",
|
||||
"@types/ejs": "^3.1.5",
|
||||
"@types/event-emitter": "^0.3.3",
|
||||
"@types/jasmine": "4.0.3",
|
||||
@ -105,7 +108,7 @@
|
||||
"@types/jsdom": "^21.1.5",
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"@types/mocha": "^10.0.6",
|
||||
"@types/node": "^20.10.0",
|
||||
"@types/node": "20.16.1",
|
||||
"@types/pdfjs-dist": "^2.10.378",
|
||||
"@types/shelljs": "^0.8.15",
|
||||
"@types/superagent": "^4.1.22",
|
||||
@ -138,9 +141,10 @@
|
||||
"jasmine-core": "4.6.0",
|
||||
"jasmine-marbles": "^0.9.2",
|
||||
"jasmine-reporters": "^2.5.2",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
"js-yaml": "^4.0.0",
|
||||
"jsdom": "^24.0.0",
|
||||
"karma": "^6.4.1",
|
||||
"karma": "6.4.4",
|
||||
"karma-chrome-launcher": "~3.2.0",
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "5.0.1",
|
||||
@ -148,26 +152,30 @@
|
||||
"karma-jasmine-html-reporter": "^2.1.0",
|
||||
"karma-mocha-reporter": "2.2.5",
|
||||
"license-checker": "^25.0.1",
|
||||
"lint-staged": "^15.2.2",
|
||||
"mini-css-extract-plugin": "^2.7.6",
|
||||
"mocha": "^10.2.0",
|
||||
"lint-staged": "15.2.9",
|
||||
"mini-css-extract-plugin": "2.9.1",
|
||||
"mocha": "10.7.3",
|
||||
"moment": "^2.29.4",
|
||||
"ng-packagr": "15.2.2",
|
||||
"nock": "^13.3.8",
|
||||
"nx": "15.9.7",
|
||||
"postcss": "^8.4.31",
|
||||
"ng-packagr": "16.2.3",
|
||||
"nock": "13.5.5",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"nx": "16.10.0",
|
||||
"postcss": "8.4.41",
|
||||
"postcss-sass": "^0.5.0",
|
||||
"prettier": "2.8.8",
|
||||
"protractor": "^7.0.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"rimraf": "5.0.10",
|
||||
"sass-loader": "13.3.2",
|
||||
"shelljs": "^0.8.5",
|
||||
"spdx-license-list": "^6.9.0",
|
||||
"stylelint": "^16.3.1",
|
||||
"storybook": "^8.2.9",
|
||||
"stylelint": "16.8.2",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "4.9.5",
|
||||
"webpack": "^5.94.0",
|
||||
"tsconfig-paths": "^4.1.1",
|
||||
"typescript": "5.1.6",
|
||||
"webdriver-manager": "12.1.9",
|
||||
"webpack": "5.94.0",
|
||||
"webpack-cli": "^5.1.4"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
|
@ -11,7 +11,7 @@ if [ "${GITHUB_EVENT_NAME}" == "schedule" ]; then
|
||||
exit 0
|
||||
fi
|
||||
isAffected=false
|
||||
AFFECTED_LIBS=$(npx nx print-affected --type=lib --select=projects ${NX_CALCULATION_FLAGS} --plain)
|
||||
AFFECTED_LIBS=$(npx nx show projects --affected ${NX_CALCULATION_FLAGS} --plain)
|
||||
#echo "Verify if affected build contains $1"
|
||||
#echo "Affected libs:$AFFECTED_LIBS"
|
||||
if [[ $AFFECTED_LIBS =~ $verifyLib ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user