Merge remote-tracking branch 'origin/dev' into 367b-CallActivity

# Conflicts:
#	package-lock.json
#	package.json
This commit is contained in:
Dan 2021-08-10 13:11:30 -04:00
commit 983b1abf0a
43 changed files with 21720 additions and 18954 deletions

47
.eslintrc.json Normal file
View File

@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}

View File

@ -5,13 +5,15 @@ dist: bionic
language: node_js
node_js:
- 12
- 14
services:
- docker
- xvfb
before_install:
- dpkg --compare-versions `npm -v` ge 7.10 || npm i -g npm@^7.10
- npm --version
- |
if [[ $TRAVIS_BRANCH =~ ^(feature\/.*)$ ]]; then
export E2E_TAG="dev"

View File

@ -99,9 +99,6 @@
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"port": 5002,
"customWebpackConfig": {
"path": "./webpack.config.js"
},
"browserTarget": "cr-connect-bpmn:build"
},
"configurations": {
@ -144,14 +141,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
@ -175,11 +169,11 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"e2e//**/*.ts",
"e2e//**/*.html"
]
}
}
@ -193,6 +187,7 @@
}
},
"cli": {
"analytics": false
"analytics": false,
"defaultCollection": "@angular-eslint/schematics"
}
}

45
e2e/.eslintrc.json Normal file
View File

@ -0,0 +1,45 @@
{
"ignorePatterns": [
"!**/*"
], "overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}

40094
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,15 @@
{
"name": "cr-connect-bpmn",
"version": "0.0.0",
"engines": {
"npm": "7.20.3"
},
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build:prod": "ng build --configuration=production --prod --base-href=__REPLACE_ME_WITH_BASE_HREF__ --deploy-url=__REPLACE_ME_WITH_DEPLOY_URL__",
"build:staging": "ng build --configuration=staging --prod --base-href=__REPLACE_ME_WITH_BASE_HREF__ --deploy-url=__REPLACE_ME_WITH_DEPLOY_URL__",
"build:prod": "ng build --configuration=production --configuration production --base-href=__REPLACE_ME_WITH_BASE_HREF__ --deploy-url=__REPLACE_ME_WITH_DEPLOY_URL__",
"build:staging": "ng build --configuration=staging --configuration production --base-href=__REPLACE_ME_WITH_BASE_HREF__ --deploy-url=__REPLACE_ME_WITH_DEPLOY_URL__",
"build:test": "ng build --configuration=test",
"test": "ng test",
"test:coverage": "ng test --codeCoverage=true --watch=false --browsers=ChromeHeadless",
@ -22,75 +25,86 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^9.1.12",
"@angular/cdk": "^9.2.4",
"@angular/common": "^9.1.12",
"@angular/compiler": "^9.1.12",
"@angular/core": "^9.1.12",
"@angular/flex-layout": "^9.0.0-beta.31",
"@angular/forms": "^9.1.12",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "^9.1.12",
"@angular/platform-browser-dynamic": "^9.1.12",
"@angular/router": "^9.1.12",
"@ngx-formly/core": "^5.9.0",
"@ngx-formly/material": "^5.9.0",
"@sentry/browser": "^5.19.2",
"@yellowspot/ng-truncate": "^1.5.1",
"@angular/animations": "^12.1.3",
"@angular/cdk": "^12.1.3",
"@angular/common": "^12.1.3",
"@angular/compiler": "^12.1.3",
"@angular/core": "^12.1.3",
"@angular/flex-layout": "^12.0.0-beta.34",
"@angular/forms": "^12.1.3",
"@angular/material": "^12.1.3",
"@angular/platform-browser": "^12.1.3",
"@angular/platform-browser-dynamic": "^12.1.3",
"@angular/router": "^12.1.3",
"@ngx-formly/core": "^5.10.22",
"@ngx-formly/material": "^5.10.22",
"@sentry/browser": "^5.30.0",
"@yellowspot/ng-truncate": "^1.7.0",
"bpmn-js": "^6.5.1",
"bpmn-js-properties-panel": "^0.33.2",
"camunda-bpmn-moddle": "^4.4.0",
"camunda-dmn-moddle": "^1.0.0",
"diagram-js": "^6.6.1",
"diagram-js-code-editor": "^1.1.5",
"diagram-js-code-editor": "^1.1.8",
"diagram-js-minimap": "^2.0.3",
"dmn-js": "^7.5.1",
"dmn-js-properties-panel": "^0.3.5",
"dmn-moddle": "^6.0.0",
"file-saver": "^2.0.2",
"fs-extra": "^10.0.0",
"lodash.isequal": "^4.5.0",
"ngx-device-detector": "^1.4.5",
"ngx-file-drop": "^9.0.1",
"ngx-highlightjs": "^4.1.1",
"ngx-markdown": "^9.1.1",
"protractor": "^7.0.0",
"rxjs": "~6.5.4",
"sartography-workflow-lib": "0.0.534",
"tslib": "^1.13.0",
"ngx-device-detector": "^2.1.1",
"ngx-file-drop": "^11.1.0",
"ngx-highlightjs": "^4.1.4",
"ngx-markdown": "^12.0.1",
"protractor": "~7.0.0",
"rxjs": "^6.5.5",
"sartography-workflow-lib": "^0.0.538",
"tslib": "^2.0.0",
"uuid": "^7.0.2",
"zone.js": "^0.10.3"
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^9.2.0",
"@angular-devkit/build-angular": "^0.901.11",
"@angular/cli": "^9.1.11",
"@angular/compiler-cli": "^9.1.12",
"@angular/language-service": "^9.1.12",
"@angular-builders/custom-webpack": "^12.1.0",
"@angular-devkit/build-angular": "^12.1.3",
"@angular-eslint/builder": "12.3.1",
"@angular-eslint/eslint-plugin": "12.3.1",
"@angular-eslint/eslint-plugin-template": "12.3.1",
"@angular-eslint/schematics": "12.3.1",
"@angular-eslint/template-parser": "12.3.1",
"@angular/cli": "^12.1.3",
"@angular/compiler-cli": "^12.1.3",
"@angular/language-service": "^12.1.3",
"@babel/compat-data": "7.9.0",
"@babel/core": "^7.10.5",
"@babel/preset-env": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@types/jasmine": "^3.5.11",
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/preset-react": "^7.14.5",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^12.12.50",
"babel-loader": "^8.0.6",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.1.0",
"@typescript-eslint/eslint-plugin": "4.28.2",
"@typescript-eslint/parser": "4.28.2",
"babel-loader": "^8.2.2",
"eslint": "^7.26.0",
"eslint-plugin-import": "latest",
"eslint-plugin-jsdoc": "latest",
"eslint-plugin-prefer-arrow": "latest",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.4",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "~3.1.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"mockdate": "^2.0.5",
"postcss-loader": "^3.0.0",
"postcss-short": "^5.0.0",
"puppeteer": "^2.1.1",
"sonar-scanner": "^3.1.0",
"ts-node": "~8.6.2",
"tslint": "~6.0.0",
"typescript": "~3.7.5",
"webpack": "^4.43.0",
"webpack-dev-server": "^3.11.0",
"webpack-notifier": "^1.8.0"
"typescript": "~4.3.5",
"webpack": "^5.49.0",
"webpack-dev-server": "4.0.0-rc.0",
"webpack-notifier": "1.13.0"
}
}

View File

@ -1,25 +1,26 @@
@use '~@angular/material' as mat;
@import 'config';
@import '../node_modules/@angular/material/theming';
// Define a custom typography config that overrides the font-family
$custom-typography: mat-typography-config(
$custom-typography: mat.define-typography-config(
$font-family: $body-font-family,
$display-4: mat-typography-level(3.75rem, 1.0925, 700, $body-font-family),
$display-3: mat-typography-level(2.4917rem, 1.1037, 700, $body-font-family),
$display-2: mat-typography-level(2.2148rem, 1.1287, 700, $body-font-family),
$display-1: mat-typography-level(1.9688rem, 1.1429, 700, $body-font-family),
$headline: mat-typography-level(1.7500rem, 1.1429, 700, $body-font-family), // h1
$title: mat-typography-level(1.5625rem, 1.1200, 500, $body-font-family), // h2
$subheading-2: mat-typography-level(1.3750rem, 1.0000, 700, $heading-font-family), // h3
$subheading-1: mat-typography-level(1.2500rem, 1.1000, 700, $body-font-family), // h4
$body-2: mat-typography-level(1.1250rem, 1.1111, 500, $body-font-family), // h5
$body-1: mat-typography-level(1.0000rem, 1.1250, 500, $body-font-family), // p
$caption: mat-typography-level(0.8750rem, 0.7143, 500, $body-font-family), // small
$button: mat-typography-level(1.0000rem, 1.1250, 500, $body-font-family),
$input: mat-typography-level(1.0000rem, 1.1250, 500, $body-font-family)
$display-4: mat.define-typography-level(3.75rem, 1.0925, 700, $body-font-family),
$display-3: mat.define-typography-level(2.4917rem, 1.1037, 700, $body-font-family),
$display-2: mat.define-typography-level(2.2148rem, 1.1287, 700, $body-font-family),
$display-1: mat.define-typography-level(1.9688rem, 1.1429, 700, $body-font-family),
$headline: mat.define-typography-level(1.7500rem, 1.1429, 700, $body-font-family), // h1
$title: mat.define-typography-level(1.5625rem, 1.1200, 500, $body-font-family), // h2
$subheading-2: mat.define-typography-level(1.3750rem, 1.0000, 700, $heading-font-family), // h3
$subheading-1: mat.define-typography-level(1.2500rem, 1.1000, 700, $body-font-family), // h4
$body-2: mat.define-typography-level(1.1250rem, 1.1111, 500, $body-font-family), // h5
$body-1: mat.define-typography-level(1.0000rem, 1.1250, 500, $body-font-family), // p
$caption: mat.define-typography-level(0.8750rem, 0.7143, 500, $body-font-family), // small
$button: mat.define-typography-level(1.0000rem, 1.1250, 500, $body-font-family),
$input: mat.define-typography-level(1.0000rem, 1.1250, 500, $body-font-family)
);
$mat-blue: (
mat.$blue-palette: (
50: #f1f5f7,
100: #b3c1d3,
200: $brand-primary-tint-3,
@ -52,7 +53,7 @@ $mat-blue: (
)
);
$mat-orange: (
mat.$orange-palette: (
50: #fceee0,
100: $brand-accent-tint-3,
200: $brand-accent-tint-2,
@ -85,8 +86,8 @@ $mat-orange: (
)
);
$cr-connect-primary: mat-palette($mat-blue);
$cr-connect-accent: mat-palette($mat-orange);
$cr-connect-warn: mat-palette($mat-red);
$cr-connect-theme: mat-light-theme($cr-connect-primary, $cr-connect-accent, $cr-connect-warn);
$cr-connect-primary: mat.define-palette(mat.$blue-palette);
$cr-connect-accent: mat.define-palette(mat.$orange-palette);
$cr-connect-warn: mat.define-palette(mat.$red-palette);
$cr-connect-theme: mat.define-light-theme($cr-connect-primary, $cr-connect-accent, $cr-connect-warn);

View File

@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import { ConfirmDialogComponent } from './confirm-dialog.component';
@ -7,7 +7,7 @@ describe('ConfirmDialogComponent', () => {
let component: ConfirmDialogComponent;
let fixture: ComponentFixture<ConfirmDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ ConfirmDialogComponent ],
imports : [MatDialogModule],

View File

@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations';
@ -11,7 +11,7 @@ describe('DeleteFileDialogComponent', () => {
let component: DeleteFileDialogComponent;
let fixture: ComponentFixture<DeleteFileDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,4 +1,4 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations';
@ -11,7 +11,7 @@ describe('DeleteFileDialogComponent', () => {
let component: DeleteWorkflowSpecCategoryDialogComponent;
let fixture: ComponentFixture<DeleteWorkflowSpecCategoryDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations';
@ -11,7 +11,7 @@ describe('DeleteFileDialogComponent', () => {
let component: DeleteWorkflowSpecDialogComponent;
let fixture: ComponentFixture<DeleteWorkflowSpecDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,4 +1,4 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {MatFormFieldModule} from '@angular/material/form-field';
@ -6,16 +6,16 @@ import {MatInputModule} from '@angular/material/input';
import {BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations';
import {FormlyModule} from '@ngx-formly/core';
import {FormlyMaterialModule} from '@ngx-formly/material';
import createClone from 'rfdc';
import {FileType} from 'sartography-workflow-lib';
import {FileMetaDialogData} from '../../_interfaces/dialog-data';
import {FileMetaDialogComponent} from './file-meta-dialog.component';
import * as cloneDeep from "lodash/cloneDeep";
describe('EditFileMetaDialogComponent', () => {
let component: FileMetaDialogComponent;
let fixture: ComponentFixture<FileMetaDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [FileMetaDialogComponent],
imports: [
@ -86,7 +86,7 @@ describe('EditFileMetaDialogComponent', () => {
component.model = dataBefore;
component.onSubmit();
const expectedData: FileMetaDialogData = createClone()(dataBefore);
const expectedData: FileMetaDialogData = cloneDeep(dataBefore);
expectedData.fileName = 'green_eggs.v1-2020-01-01.XML.bpmn';
expect(closeSpy).toHaveBeenCalledWith(expectedData);
});

View File

@ -1,4 +1,4 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {BrowserAnimationsModule, NoopAnimationsModule} from '@angular/platform-browser/animations';
@ -12,7 +12,7 @@ describe('NewFileDialogComponent', () => {
let component: NewFileDialogComponent;
let fixture: ComponentFixture<NewFileDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,6 +1,6 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {MatFormFieldModule} from '@angular/material/form-field';
@ -20,7 +20,7 @@ describe('OpenFileDialogComponent', () => {
let fixture: ComponentFixture<OpenFileDialogComponent>;
const mockRouter = {navigate: jasmine.createSpy('navigate')};
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,4 +1,4 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import {MatFormFieldModule} from '@angular/material/form-field';
@ -15,7 +15,7 @@ describe('WorkflowSpecCategoryDialogComponent', () => {
let component: WorkflowSpecCategoryDialogComponent;
let fixture: ComponentFixture<WorkflowSpecCategoryDialogComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,6 +1,6 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import {MatFormFieldModule} from '@angular/material/form-field';
@ -22,7 +22,7 @@ describe('WorkflowSpecDialogComponent', () => {
let fixture: ComponentFixture<WorkflowSpecDialogComponent>;
const mockRouter = {navigate: jasmine.createSpy('navigate')};
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -60,10 +60,11 @@ const routes: Routes = [
declarations: [],
imports: [
RouterModule.forRoot(routes, {
scrollPositionRestoration: 'enabled',
anchorScrolling: 'enabled',
scrollOffset: [0, 84],
})
scrollPositionRestoration: 'enabled',
anchorScrolling: 'enabled',
scrollOffset: [0, 84],
relativeLinkResolution: 'legacy'
})
],
exports: [RouterModule],
providers: [

View File

@ -1,7 +1,7 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MatIconModule} from '@angular/material/icon';
import {FakeMatIconRegistry} from '@angular/material/icon/testing';
import {MatMenuModule} from '@angular/material/menu';
@ -17,7 +17,7 @@ describe('AppComponent', () => {
const mockEnvironment = new MockEnvironment();
const mockTitle = `'Once,' said the Mock Title at last, with a deep sigh, 'I was a real Title.'`;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent,

View File

@ -1,7 +1,7 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {DebugNode} from '@angular/core';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MatIconModule} from '@angular/material/icon';
import {Router} from '@angular/router';
import {RouterTestingModule} from '@angular/router/testing';
@ -21,7 +21,7 @@ describe('DiagramComponent', () => {
let component: DebugNode['componentInstance'];
const mockRouter = {navigate: jasmine.createSpy('navigate')};
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,

View File

@ -1,7 +1,7 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpHeaders} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {MatListModule} from '@angular/material/list';
@ -9,7 +9,7 @@ import {MatSnackBarModule} from '@angular/material/snack-bar';
import {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {RouterTestingModule} from '@angular/router/testing';
import createClone from 'rfdc';
import * as cloneDeep from "lodash/cloneDeep";
import {of} from 'rxjs';
import {
ApiService,
@ -34,7 +34,7 @@ describe('FileListComponent', () => {
const timeCode = new Date(timeString).getTime();
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
@ -147,7 +147,7 @@ describe('FileListComponent', () => {
expect(routerNavigateSpy).toHaveBeenCalledWith([`/modeler/${mockWorkflowSpec0.id}/${mockFileMeta0.id}`]);
routerNavigateSpy.calls.reset();
const mockDmnMeta = createClone()(mockFileMeta0);
const mockDmnMeta = cloneDeep(mockFileMeta0);
mockDmnMeta.type = FileType.DMN;
component.editFile(mockDmnMeta);
expect(routerNavigateSpy).toHaveBeenCalledWith([`/modeler/${mockWorkflowSpec0.id}/${mockDmnMeta.id}`]);
@ -157,7 +157,7 @@ describe('FileListComponent', () => {
const routerNavigateSpy = spyOn((component as any).router, 'navigate');
const editFileMetaSpy = spyOn(component, 'editFileMeta');
component.workflowSpec = mockWorkflowSpec0;
const mockDocMeta = createClone()(mockFileMeta0);
const mockDocMeta = cloneDeep(mockFileMeta0);
mockDocMeta.type = FileType.DOCX;
component.editFile(mockDocMeta);
expect(routerNavigateSpy).not.toHaveBeenCalled();
@ -173,7 +173,7 @@ describe('FileListComponent', () => {
it('should open file metadata dialog', () => {
const _openFileDialogSpy = spyOn((component as any), '_openFileDialog').and.stub();
component.workflowSpec = mockWorkflowSpec0;
const mockDocMeta: FileMeta = createClone()(mockFileMeta0);
const mockDocMeta: FileMeta = cloneDeep(mockFileMeta0);
mockDocMeta.type = FileType.DOCX;
component.editFileMeta(mockDocMeta);

View File

@ -1,5 +1,5 @@
import {APP_BASE_HREF} from '@angular/common';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MockEnvironment} from 'sartography-workflow-lib';
import {FooterComponent} from './footer.component';
@ -7,7 +7,7 @@ describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [FooterComponent],
providers: [

View File

@ -6,7 +6,7 @@ import {AppEnvironment} from 'sartography-workflow-lib';
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss']
})
export class FooterComponent implements OnInit {
export class FooterComponent {
title: string;
@ -14,7 +14,4 @@ export class FooterComponent implements OnInit {
this.title = environment.title;
}
ngOnInit() {
}
}

View File

@ -2,7 +2,7 @@ import {APP_BASE_HREF} from '@angular/common';
import {HttpClient} from '@angular/common/http';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {Component} from '@angular/core';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {Router} from '@angular/router';
import {RouterTestingModule} from '@angular/router/testing';
import {ApiService, MockEnvironment} from 'sartography-workflow-lib';
@ -29,7 +29,7 @@ describe('HomeComponent', () => {
let fixture: ComponentFixture<HomeComponent>;
const mockRouter = {navigate: jasmine.createSpy('navigate')};
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
HomeComponent,

View File

@ -27,8 +27,6 @@ describe('LibraryListComponent', () => {
],
providers: [
ApiService,
{
},
{provide: 'APP_ENVIRONMENT', useClass: MockEnvironment},
{provide: APP_BASE_HREF, useValue: ''},
],

View File

@ -2,7 +2,7 @@ import {APP_BASE_HREF, DatePipe} from '@angular/common';
import {HttpErrorResponse, HttpHeaders, HttpResponse} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {DebugNode} from '@angular/core';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {MAT_BOTTOM_SHEET_DATA, MatBottomSheetModule, MatBottomSheetRef} from '@angular/material/bottom-sheet';
import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
@ -46,7 +46,7 @@ describe('ModelerComponent', () => {
let component: DebugNode['componentInstance'];
let httpMock: HttpTestingController;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
DiagramComponent,

View File

@ -68,7 +68,7 @@ export class ModelerComponent implements AfterViewInit {
@ViewChild(DiagramComponent) private diagramComponent: DiagramComponent;
@ViewChild('fileInput', { static: true }) fileInput: ElementRef;
private diagramType: FileType;
validationState: boolean;
validationState: string;
validationData: Object = {};
private workflowSpecId: string;
private fileMetaId: number;

View File

@ -1,6 +1,6 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MatIconModule} from '@angular/material/icon';
import {MatMenuModule} from '@angular/material/menu';
import {Router} from '@angular/router';
@ -15,7 +15,7 @@ describe('NavbarComponent', () => {
let httpMock: HttpTestingController;
const mockRouter = {navigate: jasmine.createSpy('navigate')};
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
NavbarComponent

View File

@ -1,7 +1,7 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpHeaders} from '@angular/common/http';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
import {MatSnackBarModule} from '@angular/material/snack-bar';
@ -10,7 +10,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {Router} from '@angular/router';
import {RouterTestingModule} from '@angular/router/testing';
import * as FileSaver from 'file-saver';
import createClone from 'rfdc';
import * as cloneDeep from "lodash/cloneDeep";
import {of} from 'rxjs';
import {ApiService, FileMeta, FileType, MockEnvironment, mockFileMetaReference0, mockFileReference0} from 'sartography-workflow-lib';
import {OpenFileDialogComponent} from '../_dialogs/open-file-dialog/open-file-dialog.component';
@ -23,7 +23,7 @@ describe('ReferenceFilesComponent', () => {
const mockRouter = {navigate: jasmine.createSpy('navigate')};
// Mock file and response headers
const mockDocMeta: FileMeta = createClone()(mockFileMetaReference0);
const mockDocMeta: FileMeta = cloneDeep(mockFileMetaReference0);
mockDocMeta.type = FileType.XLSX;
const timeString = '2020-01-23T12:34:12.345Z';
@ -40,7 +40,7 @@ describe('ReferenceFilesComponent', () => {
const mockArrayBuffer = new ArrayBuffer(8);
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,

View File

@ -1,4 +1,4 @@
import {Component, OnInit} from '@angular/core';
import {Component} from '@angular/core';
import {MatDialog} from '@angular/material/dialog';
import {MatSnackBar} from '@angular/material/snack-bar';
import * as fileSaver from 'file-saver';
@ -11,7 +11,7 @@ import {OpenFileDialogData} from '../_interfaces/dialog-data';
templateUrl: './reference-files.component.html',
styleUrls: ['./reference-files.component.scss']
})
export class ReferenceFilesComponent implements OnInit {
export class ReferenceFilesComponent {
referenceFiles: FileMeta[];
constructor(
@ -22,9 +22,6 @@ export class ReferenceFilesComponent implements OnInit {
this._loadReferenceFiles();
}
ngOnInit(): void {
}
_loadReferenceFiles() {
this.apiService.listReferenceFiles().subscribe(f => this.referenceFiles = f);
}

View File

@ -1,4 +1,4 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { SettingsComponent } from './settings.component';
import {HttpClient} from '@angular/common/http';
@ -12,7 +12,7 @@ describe('SettingsComponent', () => {
let fixture: ComponentFixture<SettingsComponent>;
const mockEnvironment = new MockEnvironment();
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SettingsComponent ],
imports: [

View File

@ -1,6 +1,6 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import {MatCardModule} from '@angular/material/card';
import {MAT_DIALOG_DATA, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
import {MatIconModule} from '@angular/material/icon';
@ -16,7 +16,7 @@ describe('WorkflowSpecCardComponent', () => {
let component: WorkflowSpecCardComponent;
let fixture: ComponentFixture<WorkflowSpecCardComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [
WorkflowSpecCardComponent,

View File

@ -1,4 +1,4 @@
import {Component, EventEmitter, Input, OnInit, Output, TemplateRef} from '@angular/core';
import {Component, Input, TemplateRef} from '@angular/core';
import {ApiService, WorkflowSpec} from 'sartography-workflow-lib';
@Component({
@ -6,7 +6,7 @@ import {ApiService, WorkflowSpec} from 'sartography-workflow-lib';
templateUrl: './workflow-spec-card.component.html',
styleUrls: ['./workflow-spec-card.component.scss']
})
export class WorkflowSpecCardComponent implements OnInit {
export class WorkflowSpecCardComponent {
@Input() workflowSpec: WorkflowSpec;
@Input() actionButtons: TemplateRef<any>;
@ -14,7 +14,4 @@ export class WorkflowSpecCardComponent implements OnInit {
private api: ApiService
) {
}
ngOnInit(): void {
}
}

View File

@ -31,7 +31,7 @@
<h4>Libraries</h4>
<mat-list>
<mat-list-item *ngFor="let wfs of workflowLibraries" class="workflow-spec" fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="start center">
<a [ngClass]="{'spec_menu_item':true, 'spec-selected': selectedSpec && wfs.id == selectedSpec.id}" (click)="selectSpec(wfs)">{{wfs.display_name}}</a>
<a [ngClass]="{'spec_menu_item':true, 'spec-selected': selectedSpec && wfs.id === selectedSpec.id}" (click)="selectSpec(wfs)">{{wfs.display_name}}</a>
<span class="spec-actions" fxLayout="row" fxLayoutGap="10px">
<button
mat-icon-button
@ -85,7 +85,7 @@
</mat-expansion-panel-header>
<mat-list>
<mat-list-item *ngFor="let wfs of cat.workflow_specs" class="workflow-spec" fxLayout="row" fxLayoutGap="10px" fxLayoutAlign="start center">
<a [ngClass]="{'spec_menu_item':true, 'spec-selected': selectedSpec && wfs.id == selectedSpec.id}" (click)="selectSpec(wfs)">{{wfs.display_name}}</a>
<a [ngClass]="{'spec_menu_item':true, 'spec-selected': selectedSpec && wfs.id === selectedSpec.id}" (click)="selectSpec(wfs)">{{wfs.display_name}}</a>
<span class="spec-actions" fxLayout="row" fxLayoutGap="10px" *ngIf="cat && cat.id !== null">
<button
*ngIf="cat && cat.workflow_specs.length > 0 && wfs.display_order !== 0"

View File

@ -1,6 +1,6 @@
import {APP_BASE_HREF} from '@angular/common';
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {async, ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing';
import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing';
import {MAT_BOTTOM_SHEET_DATA, MatBottomSheetModule, MatBottomSheetRef} from '@angular/material/bottom-sheet';
import {MatCardModule} from '@angular/material/card';
import {MAT_DIALOG_DATA, MatDialog, MatDialogModule, MatDialogRef} from '@angular/material/dialog';
@ -10,8 +10,8 @@ import {MatSnackBarModule} from '@angular/material/snack-bar';
import {BrowserDynamicTestingModule} from '@angular/platform-browser-dynamic/testing';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {RouterTestingModule} from '@angular/router/testing';
import createClone from 'rfdc';
import {Observable, of} from 'rxjs';
import * as cloneDeep from "lodash/cloneDeep";
import {of} from 'rxjs';
import {
ApiErrorsComponent,
ApiService,
@ -68,7 +68,7 @@ describe('WorkflowSpecListComponent', () => {
let fixture: ComponentFixture<WorkflowSpecListComponent>;
let dialog: MatDialog;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
@ -190,7 +190,7 @@ describe('WorkflowSpecListComponent', () => {
_updateWorkflowSpecSpy.calls.reset();
component.selectedSpec = mockWorkflowSpec0;
const modifiedData: WorkflowSpecDialogData = createClone({circles: true})(mockWorkflowSpec0);
const modifiedData: WorkflowSpec = cloneDeep(mockWorkflowSpec0);
modifiedData.display_name = 'Modified';
(component as any)._upsertWorkflowSpecification(false, modifiedData);
expect(_addWorkflowSpecSpy).not.toHaveBeenCalled();
@ -291,7 +291,7 @@ describe('WorkflowSpecListComponent', () => {
_updateWorkflowSpecCategorySpy.calls.reset();
component.selectedCat = mockWorkflowSpecCategory0;
const modifiedData: WorkflowSpecCategoryDialogData = createClone({circles: true})(mockWorkflowSpecCategory0);
const modifiedData: WorkflowSpecCategoryDialogData = cloneDeep(mockWorkflowSpecCategory0);
modifiedData.display_name = 'Modified';
(component as any)._upsertWorkflowSpecCategory(modifiedData);
expect(_addWorkflowSpecCategorySpy).not.toHaveBeenCalled();
@ -506,7 +506,7 @@ describe('WorkflowSpecListComponent', () => {
category_id: null,
};
(component as any)._loadWorkflowSpecs();
const allSpecs = createClone({circles: true})(mockWorkflowSpecs);
const allSpecs = cloneDeep(mockWorkflowSpecs);
allSpecs.push(mockMasterSpec);
const req = httpMock.expectOne(`apiRoot/workflow-specification`);

View File

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { MatBottomSheet } from '@angular/material/bottom-sheet';
import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
import createClone from 'rfdc';
import * as cloneDeep from "lodash/cloneDeep";
import {
ApiService,
isNumberDefined,
@ -366,7 +366,7 @@ export class WorkflowSpecListComponent implements OnInit {
id: number | string, direction: number,
list: Array<WorkflowSpecCategoryGroup | WorkflowSpec>
): Array<WorkflowSpecCategoryGroup | WorkflowSpec> {
const listClone = createClone({ circles: true })(list);
const listClone = cloneDeep(list);
const reorderedList = listClone.filter(item => item.id !== null && item.id !== undefined);
const i = reorderedList.findIndex(spec => spec.id === id);
if (i !== -1) {
@ -387,7 +387,7 @@ export class WorkflowSpecListComponent implements OnInit {
let numUpdated = 0;
cats.forEach((cat, j) => {
if (isNumberDefined(cat.id)) {
const newCat: WorkflowSpecCategoryGroup = createClone({ circles: true })(cat);
const newCat: WorkflowSpecCategoryGroup = cloneDeep(cat);
delete newCat.workflow_specs;
newCat.display_order = j;
@ -409,7 +409,7 @@ export class WorkflowSpecListComponent implements OnInit {
}
let numUpdated = 0;
specs.forEach((spec, j) => {
const newSpec = createClone({ circles: true })(spec);
const newSpec = cloneDeep(spec);
newSpec.display_order = j;
this.api.updateWorkflowSpecification(newSpec.id, newSpec).subscribe(() => {
numUpdated++;

View File

@ -24,8 +24,8 @@
<link href="favicon.ico?v=1" rel="icon" type="image/x-icon">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://use.typekit.net/kwp6dli.css">
<link href="assets/css/diagram-js.css" rel="stylesheet">
<link href="assets/css/dmn-js-decision-table.css" rel="stylesheet">
<link href="assets/css/diagram-js.css" rel="stylesheet" type="text/css">
<link href="assets/css/dmn-js-decision-table.css" rel="stylesheet" type="text/css">
<link href="assets/css/dmn-js-decision-table-controls.css" rel="stylesheet">
<link href="assets/css/dmn-js-drd.css" rel="stylesheet">
<link href="assets/css/dmn-js-literal-expression.css" rel="stylesheet">

View File

@ -1,7 +1,8 @@
@use '~@angular/material' as mat;
@import "material";
@include mat-core($custom-typography);
@include angular-material-theme($cr-connect-theme);
@include mat.core($custom-typography);
@include mat.all-component-themes($cr-connect-theme);
@mixin cr-connect-theme($theme) {
$primary: map-get($theme, primary);

View File

@ -55,7 +55,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.
/***************************************************************************************************

View File

@ -1,6 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,

View File

@ -6,7 +6,7 @@
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "esnext",
"module": "es2020",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
@ -19,6 +19,11 @@
"es2018",
"dom"
],
"paths": {
"@angular/*": [
"./node_modules/@angular/*"
]
},
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true

View File

@ -1,130 +0,0 @@
{
"rulesDirectory": [
"codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}

View File

@ -15,9 +15,9 @@ module.exports = {
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: () => [
require('postcss-short')(),
]
plugins: () => [
require('postcss-short')(),
]
}
},
{