bpm-core 0.0.129 → 0.0.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -4
- package/cli/deploy/build.js +1 -1
- package/cli/deploy/git-operations-handler.js +1 -1
- package/cli/deploy/index.js +1 -1
- package/cli/generate/index.js +2 -0
- package/cli/generate/mock/index.js +17 -15
- package/cli/generate/new/angular-template/.editorconfig +13 -0
- package/cli/generate/new/angular-template/README.md +7 -0
- package/cli/generate/new/angular-template/angular.json.ejs +167 -0
- package/cli/generate/new/angular-template/build.sh +6 -0
- package/cli/generate/new/angular-template/extra-webpack.config.js.ejs +5 -0
- package/cli/generate/new/angular-template/karma.conf.js +44 -0
- package/cli/generate/new/angular-template/package.json.ejs +67 -0
- package/cli/generate/new/angular-template/protractor.conf.js +28 -0
- package/cli/generate/new/angular-template/src/app/app.component.html +35 -0
- package/cli/generate/new/angular-template/src/app/app.component.scss +0 -0
- package/cli/generate/new/angular-template/src/app/app.component.ts +81 -0
- package/cli/generate/new/angular-template/src/app/config/segment-dynamic-loader.config.ts.ejs +8 -0
- package/cli/generate/new/angular-template/src/app/i18n/ar.ts.ejs +18 -0
- package/cli/generate/new/angular-template/src/app/i18n/en.ts.ejs +18 -0
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/@@.component.html.ejs +33 -0
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/@@.component.ts.ejs +128 -0
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_html-field.ejs +97 -0
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_html-table.ejs +27 -0
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_ts-field.ejs +3 -0
- package/cli/generate/new/angular-template/src/app/shared/pipes/translate.pipe.ts +32 -0
- package/cli/generate/new/angular-template/src/app/shared/services/i18n.service.ts +32 -0
- package/cli/generate/new/angular-template/src/app/shared/services/segment-dynamic-loader.service.ts.ejs +49 -0
- package/cli/generate/new/angular-template/src/app/shared/services/state-machine.service.ts +119 -0
- package/cli/generate/new/angular-template/src/app/shared/types/lov.enum.ts.ejs +7 -0
- package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.html +5 -0
- package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.scss +0 -0
- package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.ts.ejs +156 -0
- package/cli/generate/new/angular-template/src/app/templates/print.ts.ejs +392 -0
- package/cli/generate/new/angular-template/src/environments/environment.local.ts.ejs +40 -0
- package/cli/generate/new/angular-template/src/environments/environment.prod.ts +25 -0
- package/cli/generate/new/angular-template/src/environments/environment.ts +25 -0
- package/cli/generate/new/angular-template/src/favicon.ico +0 -0
- package/cli/generate/new/angular-template/src/index.html.ejs +14 -0
- package/cli/generate/new/angular-template/src/main.ts +49 -0
- package/cli/generate/new/angular-template/src/polyfills.ts +65 -0
- package/cli/generate/new/angular-template/src/styles.scss.ejs +121 -0
- package/cli/generate/new/angular-template/src/test.ts +26 -0
- package/cli/generate/new/angular-template/tsconfig.app.json +15 -0
- package/cli/generate/new/angular-template/tsconfig.json +50 -0
- package/cli/generate/new/angular-template/tsconfig.spec.json +18 -0
- package/cli/generate/new/angular-template/tslint.json +143 -0
- package/cli/generate/new/copy-and-generate.js +120 -0
- package/cli/generate/new/field.js +4 -0
- package/cli/generate/new/index.js +47 -0
- package/cli/generate/new/service-data.js +284 -0
- package/fesm2022/bpm-core.mjs +244 -252
- package/fesm2022/bpm-core.mjs.map +1 -1
- package/lib/components/shared-components/form-field/attachment-section/attachment-section.component.d.ts +1 -2
- package/lib/components/shared-components/form-field/control-value-accessor.directive.d.ts +4 -4
- package/lib/components/shared-components/form-field/index.d.ts +0 -1
- package/lib/components/shared-components/form-field/input/input.component.d.ts +3 -2
- package/lib/components/shared-components/form-field/input-number/input-number.component.d.ts +2 -0
- package/lib/components/shared-components/form-field/radio/radio.component.d.ts +39 -2
- package/lib/components/shared-components/form-field/search-employee/search-employee.component.d.ts +5 -5
- package/lib/components/shared-components/form-field/shared-imports.d.ts +1 -4
- package/lib/components/shared-components/form-field/textarea/textarea.component.d.ts +76 -1
- package/lib/components/shared-components/table/table.component.d.ts +3 -3
- package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/input-filters.d.ts +1 -0
- package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/input-map-filter.directive.d.ts +4 -1
- package/lib/testComponent/request-details-section/request-details-section.component.d.ts +8 -3
- package/package.json +7 -2
- package/public-api.d.ts +1 -0
- package/lib/directives/ar.directive.d.ts +0 -11
- package/lib/directives/en.directive.d.ts +0 -11
- package/lib/directives/number.directive.d.ts +0 -14
- /package/cli/{deploy → utilities}/utilities.js +0 -0
- /package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/index.d.ts +0 -0
- /package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/input-mappers.d.ts +0 -0
- /package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/types.d.ts +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<%
|
|
2
|
+
const enWmConfig = {
|
|
3
|
+
"inboxUri": "/group/i-gate/e-services/advanced-inbox",
|
|
4
|
+
"formPrefix": serviceCode,
|
|
5
|
+
"language": "en"
|
|
6
|
+
};
|
|
7
|
+
const encodedEnWmConfig = btoa(JSON.stringify(enWmConfig));
|
|
8
|
+
|
|
9
|
+
const arWmConfig = {
|
|
10
|
+
"inboxUri": "/group/i-gate/e-services/advanced-inbox",
|
|
11
|
+
"formPrefix": serviceCode,
|
|
12
|
+
"language": "ar"
|
|
13
|
+
}
|
|
14
|
+
const encodedArWmConfig = btoa(JSON.stringify(arWmConfig));
|
|
15
|
+
-%>
|
|
16
|
+
export const environment = {
|
|
17
|
+
production: false,
|
|
18
|
+
CONFIG_NAME: 'wmConfig',
|
|
19
|
+
proxyAddress: '',
|
|
20
|
+
proxyPort: '',
|
|
21
|
+
formConfigPerGov: '',
|
|
22
|
+
formConfigPerGovAr: '',
|
|
23
|
+
formConfigExecute: '',
|
|
24
|
+
formConfigPayroll: '',
|
|
25
|
+
formName: '<%=serviceCode%>',
|
|
26
|
+
formId: '',
|
|
27
|
+
authToken: '',
|
|
28
|
+
proxyServiceBaseUrl: 'http://localhost' + ':' + '3000/',
|
|
29
|
+
proxyFullAddress: '',
|
|
30
|
+
proxyServiceAuthorization: '/authenticate',
|
|
31
|
+
proxyServiceExecute: '/execute?debug=success',
|
|
32
|
+
proxyServiceAttachment: '/attachments/',
|
|
33
|
+
proxyServiceForms: '/forms/',
|
|
34
|
+
proxyServiceLanguageURLPart: '',
|
|
35
|
+
formConfigApproval: 'eyJpbmJveFVyaSI6IlwvZ3JvdXBcL2ktZ2F0ZVwvZS1zZXJ2aWNlc1wvYWR2YW5jZWQtaW5ib3giLCJmb3JtSWQiOiJuZXdfYXByb3ZhbCIsImZvcm1QcmVmaXgiOiJTQ1IiLCJsYW5ndWFnZSI6ImVuIn0=',
|
|
36
|
+
formConfigNew: '<%=encodedEnWmConfig%>',
|
|
37
|
+
formConfigNewAr: '<%=encodedArWmConfig%>',
|
|
38
|
+
formConfigSubmit: 'eyJpbmJveFVyaSI6IlwvZ3JvdXBcL2ktZ2F0ZVwvZS1zZXJ2aWNlc1wvYWR2YW5jZWQtaW5ib3giLCJmb3JtSWQiOiJuZXdfc3VibWl0IiwiaXNNb2JpbGUiOnRydWUsImZvcm1QcmVmaXgiOiJTQ1IiLCJsYW5ndWFnZSI6ImVuIn0=',
|
|
39
|
+
formConfigSubmitAr: 'eyJpbmJveFVyaSI6IlwvZ3JvdXBcL2ktZ2F0ZVwvZS1zZXJ2aWNlc1wvYWR2YW5jZWQtaW5ib3giLCJmb3JtSWQiOiJuZXdfc3VibWl0IiwiZm9ybVByZWZpeCI6IlNDUiIsImxhbmd1YWdlIjoiYXIifQ=='
|
|
40
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const environment = {
|
|
2
|
+
CONFIG_NAME: 'wmConfig',
|
|
3
|
+
formName: '',
|
|
4
|
+
formId: '',
|
|
5
|
+
authToken: '',
|
|
6
|
+
formConfigSubmit: '',
|
|
7
|
+
formConfigSubmitAr: '',
|
|
8
|
+
production: true,
|
|
9
|
+
proxyAddress: '',
|
|
10
|
+
proxyPort: '',
|
|
11
|
+
proxyServiceBaseUrl: '/',
|
|
12
|
+
proxyFullAddress: '/group/i-gate/wm-bpm/forms/-/proxy',
|
|
13
|
+
proxyServiceForms: '/forms/',
|
|
14
|
+
proxyServiceAuthorization: '/authenticate',
|
|
15
|
+
proxyServiceExecute: '/execute',
|
|
16
|
+
proxyServiceAttachment: '/attachments/',
|
|
17
|
+
proxyServiceLanguageURLPart: '',
|
|
18
|
+
formConfigNew: '',
|
|
19
|
+
formConfigNewAr: '',
|
|
20
|
+
formConfigApproval: '',
|
|
21
|
+
formConfigPerGov: '',
|
|
22
|
+
formConfigPerGovAr: '',
|
|
23
|
+
formConfigExecute: '',
|
|
24
|
+
formConfigPayroll: ''
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const environment = {
|
|
2
|
+
CONFIG_NAME: 'wmConfig',
|
|
3
|
+
formName: '',
|
|
4
|
+
formId: '',
|
|
5
|
+
authToken: '',
|
|
6
|
+
formConfigSubmit: '',
|
|
7
|
+
formConfigSubmitAr: '',
|
|
8
|
+
proxyServiceLanguageURLPart: '',
|
|
9
|
+
production: true,
|
|
10
|
+
proxyAddress: '',
|
|
11
|
+
proxyPort: '',
|
|
12
|
+
proxyServiceBaseUrl: '',
|
|
13
|
+
proxyFullAddress: '',
|
|
14
|
+
proxyServiceAuthorization: '',
|
|
15
|
+
proxyServiceExecute: '',
|
|
16
|
+
proxyServiceAttachment: '',
|
|
17
|
+
proxyServiceForms: '',
|
|
18
|
+
formConfigNew: '',
|
|
19
|
+
formConfigNewAr: '',
|
|
20
|
+
formConfigApproval: '',
|
|
21
|
+
formConfigPerGov: '',
|
|
22
|
+
formConfigPerGovAr: '',
|
|
23
|
+
formConfigExecute: '',
|
|
24
|
+
formConfigPayroll: ''
|
|
25
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title><%=serviceCode%></title>
|
|
6
|
+
<base href="/">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
|
+
<link rel="nofollow" href="styles.css" rel="stylesheet"/>
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<app-wm-root></app-wm-root>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {bootstrapApplication, BrowserModule} from '@angular/platform-browser';
|
|
2
|
+
import {defineCustomElements,} from 'basic-ui-components/loader';
|
|
3
|
+
import {provideHttpClient} from '@angular/common/http';
|
|
4
|
+
import {enableProdMode, importProvidersFrom} from '@angular/core';
|
|
5
|
+
import {ToastrModule} from 'ngx-toastr';
|
|
6
|
+
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
|
7
|
+
import {AppComponent} from './app/app.component';
|
|
8
|
+
import {MY_LIB_CONFIG_TOKEN} from 'bpm-core';
|
|
9
|
+
import {environment} from './environments/environment';
|
|
10
|
+
import {NgxIntlTelInputModule} from "ngx-intl-tel-input-gg";
|
|
11
|
+
|
|
12
|
+
if (environment.production) {
|
|
13
|
+
enableProdMode();
|
|
14
|
+
let at = atob((window as any).wmConfig);
|
|
15
|
+
(window as any).wmConfig = JSON.parse(at);
|
|
16
|
+
environment.formName = ((window as any).wmConfig)['formPrefix']
|
|
17
|
+
environment.formId = ((window as any).wmConfig).formId
|
|
18
|
+
} else {
|
|
19
|
+
(window as any).wmConfig = environment.formConfigNew;
|
|
20
|
+
(window as any).wmConfig = JSON.parse(atob((window as any).wmConfig));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
bootstrapApplication(
|
|
25
|
+
AppComponent,
|
|
26
|
+
{
|
|
27
|
+
providers: [
|
|
28
|
+
{
|
|
29
|
+
provide: MY_LIB_CONFIG_TOKEN,
|
|
30
|
+
useValue: environment
|
|
31
|
+
},
|
|
32
|
+
importProvidersFrom(
|
|
33
|
+
BrowserModule,
|
|
34
|
+
BrowserAnimationsModule,
|
|
35
|
+
NgxIntlTelInputModule,
|
|
36
|
+
ToastrModule.forRoot({
|
|
37
|
+
timeOut: 10000,
|
|
38
|
+
positionClass: 'toast-top-right',
|
|
39
|
+
preventDuplicates: true,
|
|
40
|
+
}),
|
|
41
|
+
),
|
|
42
|
+
provideHttpClient()
|
|
43
|
+
],
|
|
44
|
+
}).then((moduleRef: any) => {
|
|
45
|
+
|
|
46
|
+
})
|
|
47
|
+
.catch((err) => console.error(err));
|
|
48
|
+
|
|
49
|
+
defineCustomElements(window).then(r => {});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
import '@angular/localize/init';
|
|
21
|
+
|
|
22
|
+
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
23
|
+
/*import 'core-js/es/symbol';
|
|
24
|
+
import 'core-js/es/object';
|
|
25
|
+
import 'core-js/es/function';
|
|
26
|
+
import 'core-js/es/parse-int';
|
|
27
|
+
import 'core-js/es/parse-float';
|
|
28
|
+
import 'core-js/es/number';
|
|
29
|
+
import 'core-js/es/math';
|
|
30
|
+
import 'core-js/es/string';
|
|
31
|
+
import 'core-js/es/date';
|
|
32
|
+
import 'core-js/es/array';
|
|
33
|
+
import 'core-js/es/regexp';
|
|
34
|
+
import 'core-js/es/map';
|
|
35
|
+
import 'core-js/es/weak-map';
|
|
36
|
+
import 'core-js/es/set';*/
|
|
37
|
+
|
|
38
|
+
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
39
|
+
// import 'core-js/es/reflect';
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/** Evergreen browsers require these. **/
|
|
43
|
+
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/***************************************************************************************************
|
|
48
|
+
* Zone JS is required by default for Angular itself.
|
|
49
|
+
*/
|
|
50
|
+
import 'zone.js'; // Included with Angular CLI.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/***************************************************************************************************
|
|
55
|
+
* APPLICATION IMPORTS
|
|
56
|
+
*/
|
|
57
|
+
declare global {
|
|
58
|
+
interface Array<T> {
|
|
59
|
+
last() : T;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if(!Array.prototype.last) {
|
|
64
|
+
Array.prototype.last = function<T>(): T { return this[this.length - 1]; }
|
|
65
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
.mat-drawer,
|
|
2
|
+
.mat-drawer-backdrop {
|
|
3
|
+
min-width: auto !important;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.form-section-divide {
|
|
7
|
+
--form-section-columns: 1fr 1fr;
|
|
8
|
+
|
|
9
|
+
@media (max-width: 756px) {
|
|
10
|
+
--form-section-columns: 1fr;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.full {
|
|
14
|
+
grid-column: 1/-1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.head-title {
|
|
19
|
+
position: relative;
|
|
20
|
+
margin-bottom: 12px;
|
|
21
|
+
|
|
22
|
+
h3 {
|
|
23
|
+
display: inline-block;
|
|
24
|
+
color: #8e9aa0;
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
background-color: #fff;
|
|
28
|
+
padding-inline-end: 20px;
|
|
29
|
+
position: relative;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:after {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 1px;
|
|
39
|
+
background-color: #dee0e2;
|
|
40
|
+
top: 50%;
|
|
41
|
+
left: 0;
|
|
42
|
+
right: 0;
|
|
43
|
+
transform: translateY(-50%);
|
|
44
|
+
z-index: 1;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.chamber {
|
|
49
|
+
margin-bottom: 20px;
|
|
50
|
+
|
|
51
|
+
.chamber-content {
|
|
52
|
+
background-color: #f8f8f8;
|
|
53
|
+
padding: 20px 20px;
|
|
54
|
+
|
|
55
|
+
.chamber-select {
|
|
56
|
+
display: flex;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
mat-checkbox {
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
<% if(checkInAllFieldsStages(field => field.componentName === 'table')){ -%>
|
|
66
|
+
.gray-table-wrapper {
|
|
67
|
+
overflow-x: auto;
|
|
68
|
+
|
|
69
|
+
table {
|
|
70
|
+
table-layout: fixed;
|
|
71
|
+
min-width: 100%;
|
|
72
|
+
width: fit-content;
|
|
73
|
+
max-width: 100%;
|
|
74
|
+
border-collapse: collapse;
|
|
75
|
+
|
|
76
|
+
thead th {
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
font-weight: 500;
|
|
79
|
+
color: #8d999f !important;
|
|
80
|
+
background-color: #f6f6f6 !important;
|
|
81
|
+
border-bottom: 1px solid #d6d6d4 !important;
|
|
82
|
+
padding-top: 15px;
|
|
83
|
+
padding-bottom: 10px;
|
|
84
|
+
text-align: start;
|
|
85
|
+
& + th {
|
|
86
|
+
padding-inline-start: 15px;
|
|
87
|
+
}
|
|
88
|
+
&:first-of-type {
|
|
89
|
+
padding-inline-start: 15px;
|
|
90
|
+
}
|
|
91
|
+
&:last-of-type {
|
|
92
|
+
padding-inline-end: 15px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
tbody {
|
|
96
|
+
tr {
|
|
97
|
+
border-bottom: 1px solid #d6d6d4;
|
|
98
|
+
&:last-of-type {
|
|
99
|
+
border-bottom: none;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
td {
|
|
103
|
+
max-width: 300px;
|
|
104
|
+
padding-top: 15px;
|
|
105
|
+
padding-bottom: 15px;
|
|
106
|
+
background: #fff;
|
|
107
|
+
font-size: 14px;
|
|
108
|
+
& + td {
|
|
109
|
+
padding-inline-start: 15px;
|
|
110
|
+
}
|
|
111
|
+
&:first-of-type {
|
|
112
|
+
padding-inline-start: 15px;
|
|
113
|
+
}
|
|
114
|
+
&:last-of-type {
|
|
115
|
+
padding-inline-end: 15px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
<% } %>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|
2
|
+
|
|
3
|
+
import 'zone.js/testing';
|
|
4
|
+
import { getTestBed } from '@angular/core/testing';
|
|
5
|
+
import {
|
|
6
|
+
BrowserDynamicTestingModule,
|
|
7
|
+
platformBrowserDynamicTesting
|
|
8
|
+
} from '@angular/platform-browser-dynamic/testing';
|
|
9
|
+
|
|
10
|
+
declare const require: {
|
|
11
|
+
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
12
|
+
keys(): string[];
|
|
13
|
+
<T>(id: string): T;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// First, initialize the Angular testing environment.
|
|
18
|
+
getTestBed().initTestEnvironment(
|
|
19
|
+
BrowserDynamicTestingModule,
|
|
20
|
+
platformBrowserDynamicTesting(),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
// Then we find all the tests.
|
|
24
|
+
const context = require.context('./', true, /\.spec\.ts$/);
|
|
25
|
+
// And load the modules.
|
|
26
|
+
context.keys().map(context);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./out-tsc/app",
|
|
6
|
+
"types": [ "node" ]
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"src/main.ts",
|
|
10
|
+
"src/polyfills.ts"
|
|
11
|
+
],
|
|
12
|
+
"include": [
|
|
13
|
+
"src/**/*.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noUnusedLocals": false,
|
|
5
|
+
"outDir": "./dist/out-tsc",
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"strict": false,
|
|
8
|
+
"noImplicitOverride": true,
|
|
9
|
+
"noPropertyAccessFromIndexSignature": false,
|
|
10
|
+
"noImplicitReturns": true,
|
|
11
|
+
"noFallthroughCasesInSwitch": true,
|
|
12
|
+
"downlevelIteration": true,
|
|
13
|
+
"rootDir": ".",
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"declaration": false,
|
|
16
|
+
"moduleResolution": "node",
|
|
17
|
+
"emitDecoratorMetadata": true,
|
|
18
|
+
"experimentalDecorators": true,
|
|
19
|
+
"importHelpers": true,
|
|
20
|
+
"target": "ES2022",
|
|
21
|
+
"module": "ES2022",
|
|
22
|
+
"lib": [
|
|
23
|
+
"es2017",
|
|
24
|
+
"ES2022",
|
|
25
|
+
"dom",
|
|
26
|
+
"dom.iterable"
|
|
27
|
+
],
|
|
28
|
+
"skipLibCheck": true,
|
|
29
|
+
"skipDefaultLibCheck": true,
|
|
30
|
+
"baseUrl": ".",
|
|
31
|
+
"useDefineForClassFields": true,
|
|
32
|
+
"resolveJsonModule": true,
|
|
33
|
+
"isolatedModules": true,
|
|
34
|
+
"allowSyntheticDefaultImports": true,
|
|
35
|
+
"esModuleInterop": true,
|
|
36
|
+
},
|
|
37
|
+
"angularCompilerOptions": {
|
|
38
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
39
|
+
"strictInjectionParameters": true,
|
|
40
|
+
"strictInputAccessModifiers": true,
|
|
41
|
+
"strictTemplates": true,
|
|
42
|
+
"isolatedModules": true,
|
|
43
|
+
"emitDecoratorMetadata": true,
|
|
44
|
+
"extendedDiagnostics": {
|
|
45
|
+
"checks": {
|
|
46
|
+
"controlFlowPreventingContentProjection": "suppress"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "./out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"src/test.ts",
|
|
12
|
+
"src/polyfills.ts"
|
|
13
|
+
],
|
|
14
|
+
"include": [
|
|
15
|
+
"src/**/*.spec.ts",
|
|
16
|
+
"src/**/*.d.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rulesDirectory": [
|
|
3
|
+
"node_modules/codelyzer"
|
|
4
|
+
],
|
|
5
|
+
"rules": {
|
|
6
|
+
"arrow-return-shorthand": true,
|
|
7
|
+
"callable-types": true,
|
|
8
|
+
"class-name": true,
|
|
9
|
+
"comment-format": [
|
|
10
|
+
true,
|
|
11
|
+
"check-space"
|
|
12
|
+
],
|
|
13
|
+
"curly": true,
|
|
14
|
+
"deprecation": {
|
|
15
|
+
"severity": "warn"
|
|
16
|
+
},
|
|
17
|
+
"eofline": true,
|
|
18
|
+
"forin": true,
|
|
19
|
+
"import-blacklist": [
|
|
20
|
+
true,
|
|
21
|
+
"rxjs/Rx"
|
|
22
|
+
],
|
|
23
|
+
"import-spacing": true,
|
|
24
|
+
"indent": [
|
|
25
|
+
true,
|
|
26
|
+
"spaces"
|
|
27
|
+
],
|
|
28
|
+
"interface-over-type-literal": true,
|
|
29
|
+
"label-position": true,
|
|
30
|
+
"max-line-length": [
|
|
31
|
+
true,
|
|
32
|
+
140
|
|
33
|
+
],
|
|
34
|
+
"member-access": false,
|
|
35
|
+
"member-ordering": [
|
|
36
|
+
true,
|
|
37
|
+
{
|
|
38
|
+
"order": [
|
|
39
|
+
"static-field",
|
|
40
|
+
"instance-field",
|
|
41
|
+
"static-method",
|
|
42
|
+
"instance-method"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"no-arg": true,
|
|
47
|
+
"no-bitwise": true,
|
|
48
|
+
"no-console": [
|
|
49
|
+
true,
|
|
50
|
+
"debug",
|
|
51
|
+
"info",
|
|
52
|
+
"time",
|
|
53
|
+
"timeEnd",
|
|
54
|
+
"trace"
|
|
55
|
+
],
|
|
56
|
+
"no-construct": true,
|
|
57
|
+
"no-debugger": true,
|
|
58
|
+
"no-duplicate-super": true,
|
|
59
|
+
"no-empty": false,
|
|
60
|
+
"no-empty-interface": true,
|
|
61
|
+
"no-eval": true,
|
|
62
|
+
"no-inferrable-types": [
|
|
63
|
+
true,
|
|
64
|
+
"ignore-params"
|
|
65
|
+
],
|
|
66
|
+
"no-misused-new": true,
|
|
67
|
+
"no-non-null-assertion": true,
|
|
68
|
+
"no-shadowed-variable": true,
|
|
69
|
+
"no-string-literal": false,
|
|
70
|
+
"no-string-throw": true,
|
|
71
|
+
"no-switch-case-fall-through": true,
|
|
72
|
+
"no-trailing-whitespace": true,
|
|
73
|
+
"no-unnecessary-initializer": true,
|
|
74
|
+
"no-unused-expression": true,
|
|
75
|
+
"no-use-before-declare": true,
|
|
76
|
+
"no-var-keyword": true,
|
|
77
|
+
"object-literal-sort-keys": false,
|
|
78
|
+
"one-line": [
|
|
79
|
+
true,
|
|
80
|
+
"check-open-brace",
|
|
81
|
+
"check-catch",
|
|
82
|
+
"check-else",
|
|
83
|
+
"check-whitespace"
|
|
84
|
+
],
|
|
85
|
+
"prefer-const": true,
|
|
86
|
+
"quotemark": [
|
|
87
|
+
true,
|
|
88
|
+
"single"
|
|
89
|
+
],
|
|
90
|
+
"radix": true,
|
|
91
|
+
"semicolon": [
|
|
92
|
+
true,
|
|
93
|
+
"always"
|
|
94
|
+
],
|
|
95
|
+
"triple-equals": [
|
|
96
|
+
true,
|
|
97
|
+
"allow-null-check"
|
|
98
|
+
],
|
|
99
|
+
"typedef-whitespace": [
|
|
100
|
+
true,
|
|
101
|
+
{
|
|
102
|
+
"call-signature": "nospace",
|
|
103
|
+
"index-signature": "nospace",
|
|
104
|
+
"parameter": "nospace",
|
|
105
|
+
"property-declaration": "nospace",
|
|
106
|
+
"variable-declaration": "nospace"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"typeof-compare": true,
|
|
110
|
+
"unified-signatures": true,
|
|
111
|
+
"variable-name": false,
|
|
112
|
+
"whitespace": [
|
|
113
|
+
true,
|
|
114
|
+
"check-branch",
|
|
115
|
+
"check-decl",
|
|
116
|
+
"check-operator",
|
|
117
|
+
"check-separator",
|
|
118
|
+
"check-type"
|
|
119
|
+
],
|
|
120
|
+
"directive-selector": [
|
|
121
|
+
true,
|
|
122
|
+
"attribute",
|
|
123
|
+
"app",
|
|
124
|
+
"camelCase"
|
|
125
|
+
],
|
|
126
|
+
"component-selector": [
|
|
127
|
+
true,
|
|
128
|
+
"element",
|
|
129
|
+
"app",
|
|
130
|
+
"kebab-case"
|
|
131
|
+
],
|
|
132
|
+
"no-output-on-prefix": true,
|
|
133
|
+
"use-input-property-decorator": true,
|
|
134
|
+
"use-output-property-decorator": true,
|
|
135
|
+
"use-host-property-decorator": true,
|
|
136
|
+
"no-input-rename": true,
|
|
137
|
+
"no-output-rename": true,
|
|
138
|
+
"use-life-cycle-interface": true,
|
|
139
|
+
"use-pipe-transform-interface": true,
|
|
140
|
+
"component-class-suffix": true,
|
|
141
|
+
"directive-class-suffix": true
|
|
142
|
+
}
|
|
143
|
+
}
|