bpm-core 0.0.130 → 0.0.131
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/fesm2022/bpm-core.mjs +146 -88
- package/fesm2022/bpm-core.mjs.map +1 -1
- package/lib/components/shared-components/form-field/shared-imports.d.ts +3 -3
- package/lib/testComponent/request-details-section/request-details-section.component.d.ts +3 -11
- package/package.json +2 -2
- package/src/lib/assets/scss/_general.scss +0 -205
- package/src/lib/assets/scss/base.scss +0 -2
- package/cli/deploy/build.js +0 -62
- package/cli/deploy/git-operations-handler.js +0 -104
- package/cli/deploy/index.js +0 -61
- package/cli/deploy/jenkins-manager.js +0 -107
- package/cli/generate/index.js +0 -10
- package/cli/generate/mock/form-node.js +0 -77
- package/cli/generate/mock/index.js +0 -209
- package/cli/generate/mock/lov.js +0 -18
- package/cli/generate/new/angular-template/.editorconfig +0 -13
- package/cli/generate/new/angular-template/README.md +0 -7
- package/cli/generate/new/angular-template/angular.json.ejs +0 -167
- package/cli/generate/new/angular-template/build.sh +0 -6
- package/cli/generate/new/angular-template/extra-webpack.config.js.ejs +0 -5
- package/cli/generate/new/angular-template/karma.conf.js +0 -44
- package/cli/generate/new/angular-template/package.json.ejs +0 -67
- package/cli/generate/new/angular-template/protractor.conf.js +0 -28
- package/cli/generate/new/angular-template/src/app/app.component.html +0 -35
- package/cli/generate/new/angular-template/src/app/app.component.scss +0 -0
- package/cli/generate/new/angular-template/src/app/app.component.ts +0 -81
- package/cli/generate/new/angular-template/src/app/config/segment-dynamic-loader.config.ts.ejs +0 -8
- package/cli/generate/new/angular-template/src/app/i18n/ar.ts.ejs +0 -18
- package/cli/generate/new/angular-template/src/app/i18n/en.ts.ejs +0 -18
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/@@.component.html.ejs +0 -33
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/@@.component.ts.ejs +0 -128
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_html-field.ejs +0 -97
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_html-table.ejs +0 -27
- package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_ts-field.ejs +0 -3
- package/cli/generate/new/angular-template/src/app/shared/pipes/translate.pipe.ts +0 -32
- package/cli/generate/new/angular-template/src/app/shared/services/i18n.service.ts +0 -32
- package/cli/generate/new/angular-template/src/app/shared/services/segment-dynamic-loader.service.ts.ejs +0 -49
- package/cli/generate/new/angular-template/src/app/shared/services/state-machine.service.ts +0 -119
- package/cli/generate/new/angular-template/src/app/shared/types/lov.enum.ts.ejs +0 -7
- package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.html +0 -5
- 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 +0 -156
- package/cli/generate/new/angular-template/src/app/templates/print.ts.ejs +0 -392
- package/cli/generate/new/angular-template/src/environments/environment.local.ts.ejs +0 -40
- package/cli/generate/new/angular-template/src/environments/environment.prod.ts +0 -25
- package/cli/generate/new/angular-template/src/environments/environment.ts +0 -25
- package/cli/generate/new/angular-template/src/favicon.ico +0 -0
- package/cli/generate/new/angular-template/src/index.html.ejs +0 -14
- package/cli/generate/new/angular-template/src/main.ts +0 -49
- package/cli/generate/new/angular-template/src/polyfills.ts +0 -65
- package/cli/generate/new/angular-template/src/styles.scss.ejs +0 -121
- package/cli/generate/new/angular-template/src/test.ts +0 -26
- package/cli/generate/new/angular-template/tsconfig.app.json +0 -15
- package/cli/generate/new/angular-template/tsconfig.json +0 -50
- package/cli/generate/new/angular-template/tsconfig.spec.json +0 -18
- package/cli/generate/new/angular-template/tslint.json +0 -143
- package/cli/generate/new/copy-and-generate.js +0 -120
- package/cli/generate/new/field.js +0 -4
- package/cli/generate/new/index.js +0 -47
- package/cli/generate/new/service-data.js +0 -284
- package/cli/index.js +0 -14
- package/cli/utilities/utilities.js +0 -114
- package/src/lib/assets/scss/_charts.scss +0 -190
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ControlNode = exports.GroupNode = void 0;
|
|
4
|
-
const lov_1 = require("./lov");
|
|
5
|
-
const randomNumber = () => Math.floor(Math.random() * 100);
|
|
6
|
-
const CONTROL_MOCK_MAP = {
|
|
7
|
-
'app-input': () => `Sample text ${randomNumber()}`,
|
|
8
|
-
'app-textarea': () => `Multiline ${randomNumber()}\nText ${randomNumber()}\nHere ${randomNumber()}`,
|
|
9
|
-
'app-datepicker': () => new Date().toISOString(),
|
|
10
|
-
'app-input-number': () => randomNumber().toString(),
|
|
11
|
-
'app-custom-searchable': (control) => {
|
|
12
|
-
const lovName = control.options?.options?.match(/lov\??\.(?<lovName>\w+?)\??\.options/)?.groups?.lovName || control.name;
|
|
13
|
-
return (0, lov_1.getLOVFieldValue)(lovName);
|
|
14
|
-
},
|
|
15
|
-
'app-checkbox': () => "false",
|
|
16
|
-
'app-search-employee': () => ({
|
|
17
|
-
"personName": "Jehad Saleh A Alluhayd",
|
|
18
|
-
"personEmail": "jsalluhayd@stc.com.sa"
|
|
19
|
-
}),
|
|
20
|
-
'app-file-uploader': (control) => {
|
|
21
|
-
const attachment = () => ({
|
|
22
|
-
"fileName": `ajm_location_issue_${randomNumber()}.png`,
|
|
23
|
-
"attachmentId": `b7d2915d-930e-4e93-930e-3675a5959ba8${randomNumber()}`,
|
|
24
|
-
"mimeType": "image\/png"
|
|
25
|
-
});
|
|
26
|
-
control.options?.multiple === 'true' ? [attachment(), attachment()] : attachment();
|
|
27
|
-
},
|
|
28
|
-
'app-input-currency': () => '123' + randomNumber().toString(),
|
|
29
|
-
'app-attachment-section': () => {
|
|
30
|
-
const attachment = () => ({
|
|
31
|
-
"fileDescription": "desc " + randomNumber(),
|
|
32
|
-
"attachmentcomment": "comm " + randomNumber(),
|
|
33
|
-
"fileComments": "comm " + randomNumber(),
|
|
34
|
-
"fileName": `dummy_${randomNumber()}.pdf`,
|
|
35
|
-
"attachmentId": "idd_40910B7B-0000-CE16-BD92-EC800D2FDFC6" + randomNumber(),
|
|
36
|
-
"mimeType": "application/pdf"
|
|
37
|
-
});
|
|
38
|
-
return [attachment(), attachment()];
|
|
39
|
-
},
|
|
40
|
-
'app-radio': (control) => {
|
|
41
|
-
const lovName = control.options?.options?.match(/lov\??\.(?<lovName>\w+?)\??\.options/)?.groups?.lovName || control.name;
|
|
42
|
-
return (0, lov_1.getLOVFieldValue)(lovName);
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
class FormNode {
|
|
46
|
-
}
|
|
47
|
-
class GroupNode extends FormNode {
|
|
48
|
-
constructor(name, children = {}) {
|
|
49
|
-
super();
|
|
50
|
-
this.name = name;
|
|
51
|
-
this.children = children;
|
|
52
|
-
}
|
|
53
|
-
getValue() {
|
|
54
|
-
const output = {};
|
|
55
|
-
for (const key in this.children) {
|
|
56
|
-
output[key] = this.children[key].getValue();
|
|
57
|
-
}
|
|
58
|
-
return output;
|
|
59
|
-
}
|
|
60
|
-
addChild(child) {
|
|
61
|
-
this.children[child.name] = child;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.GroupNode = GroupNode;
|
|
65
|
-
class ControlNode extends FormNode {
|
|
66
|
-
constructor(name, tag, options) {
|
|
67
|
-
super();
|
|
68
|
-
this.name = name;
|
|
69
|
-
this.tag = tag;
|
|
70
|
-
this.options = options;
|
|
71
|
-
}
|
|
72
|
-
getValue() {
|
|
73
|
-
const generator = CONTROL_MOCK_MAP[this.tag] || (() => 'Unknown');
|
|
74
|
-
return generator(this);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.ControlNode = ControlNode;
|
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.generateMockDataCommand = void 0;
|
|
27
|
-
const fs = __importStar(require("fs"));
|
|
28
|
-
const path = __importStar(require("path"));
|
|
29
|
-
const cheerio = __importStar(require("cheerio"));
|
|
30
|
-
const commander_1 = require("commander");
|
|
31
|
-
const form_node_1 = require("./form-node");
|
|
32
|
-
const lov_1 = require("./lov");
|
|
33
|
-
exports.generateMockDataCommand = new commander_1.Command('mock');
|
|
34
|
-
exports.generateMockDataCommand.alias('m');
|
|
35
|
-
exports.generateMockDataCommand.action((options) => {
|
|
36
|
-
main();
|
|
37
|
-
});
|
|
38
|
-
const projectRoot = process.cwd();
|
|
39
|
-
const serviceName = path.basename(projectRoot);
|
|
40
|
-
const configDir = path.join(projectRoot, 'src', 'app', 'config');
|
|
41
|
-
const configFile = path.join(configDir, 'segment-dynamic-loader.config.ts');
|
|
42
|
-
function extractComponentPaths(configContent) {
|
|
43
|
-
const importRegex = /import\s*{\s*(?<name>\w+)\s*}\s+from\s+['"](?<path>.+?)['"]/g;
|
|
44
|
-
const imports = [...configContent.matchAll(importRegex)].reduce((prev, curr) => {
|
|
45
|
-
prev.push(curr.groups);
|
|
46
|
-
return prev;
|
|
47
|
-
}, []);
|
|
48
|
-
const exportRegex = /roleToApprovalSectionMapping\s*:\s*{([^}]+)}/s;
|
|
49
|
-
const exportMatch = configContent.match(exportRegex);
|
|
50
|
-
const body = exportMatch[1];
|
|
51
|
-
const usageRegex = /\s*(?<role>\w+)\s*:\s*(?<name>\w+)/g;
|
|
52
|
-
const roleToCompClassName = [...body.matchAll(usageRegex)].reduce((prev, curr) => {
|
|
53
|
-
prev.push(curr.groups);
|
|
54
|
-
return prev;
|
|
55
|
-
}, []);
|
|
56
|
-
const roleToRealCompPath = roleToCompClassName.reduce((prev, curr) => {
|
|
57
|
-
const importPathInConfigFile = imports.find((imp) => imp.name === curr.name).path;
|
|
58
|
-
const realPath = path.join(configDir, importPathInConfigFile + '.ts');
|
|
59
|
-
prev.push({ role: curr.role, path: realPath });
|
|
60
|
-
return prev;
|
|
61
|
-
}, []);
|
|
62
|
-
return roleToRealCompPath;
|
|
63
|
-
}
|
|
64
|
-
function getTemplatePath(componentTsPath) {
|
|
65
|
-
if (!fs.existsSync(componentTsPath))
|
|
66
|
-
return null;
|
|
67
|
-
const content = fs.readFileSync(componentTsPath, 'utf-8');
|
|
68
|
-
const match = content.match(/templateUrl\s*:\s*['"](.+?)['"]/);
|
|
69
|
-
if (!match)
|
|
70
|
-
return null;
|
|
71
|
-
return path.resolve(path.dirname(componentTsPath), match[1]);
|
|
72
|
-
}
|
|
73
|
-
function parseAttributesWithoutBinding(attributes) {
|
|
74
|
-
const attrAsString = JSON.stringify(attributes);
|
|
75
|
-
const output = [...attrAsString.matchAll(/"\[?(?<name>[^"]+?)\]?"\s*?:\s*?"(?<value>[^"]+?)"/g)].reduce((prev, curr) => {
|
|
76
|
-
prev[curr.groups.name] = curr.groups.value;
|
|
77
|
-
return prev;
|
|
78
|
-
}, {});
|
|
79
|
-
return output;
|
|
80
|
-
}
|
|
81
|
-
function parseFormControls($, $el, groupNode) {
|
|
82
|
-
$el.children().each((_, child) => {
|
|
83
|
-
const tagName = child.tagName.toLowerCase();
|
|
84
|
-
const formGroup = child.attribs?.formgroupname;
|
|
85
|
-
const formControl = child.attribs?.formcontrolname;
|
|
86
|
-
if (formGroup) {
|
|
87
|
-
const childGroup = new form_node_1.GroupNode(formGroup);
|
|
88
|
-
groupNode.addChild(childGroup);
|
|
89
|
-
parseFormControls($, $(child), childGroup);
|
|
90
|
-
}
|
|
91
|
-
if (formControl) {
|
|
92
|
-
const options = parseAttributesWithoutBinding(child.attribs);
|
|
93
|
-
groupNode.addChild(new form_node_1.ControlNode(formControl, tagName, options));
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
return groupNode;
|
|
97
|
-
}
|
|
98
|
-
function getTemplateMockData(templatePath) {
|
|
99
|
-
if (!fs.existsSync(templatePath)) {
|
|
100
|
-
throw new Error(`Template not found: ${templatePath}`);
|
|
101
|
-
}
|
|
102
|
-
const html = fs.readFileSync(templatePath, 'utf-8');
|
|
103
|
-
const $ = cheerio.load(html);
|
|
104
|
-
const $form = $('form');
|
|
105
|
-
const controlsTree = parseFormControls($, $form, new form_node_1.GroupNode(''));
|
|
106
|
-
return controlsTree.getValue();
|
|
107
|
-
}
|
|
108
|
-
function buildPayloadWithMockData(roleToStageMockMap, requestMock) {
|
|
109
|
-
const workflowSteps = Object.entries(roleToStageMockMap).map(([role, stageMock]) => {
|
|
110
|
-
return {
|
|
111
|
-
"actor": {
|
|
112
|
-
"delegate": null,
|
|
113
|
-
"recipient": {
|
|
114
|
-
"role": role.toUpperCase(),
|
|
115
|
-
"name": "Sami Sulaiman M Alfayez",
|
|
116
|
-
"shortName": null,
|
|
117
|
-
"email": "sfayez@stc.com.sa",
|
|
118
|
-
"employeeNumber": null
|
|
119
|
-
},
|
|
120
|
-
"email": "sfayez@stc.com.sa",
|
|
121
|
-
"status": "COMPLETED"
|
|
122
|
-
},
|
|
123
|
-
"date": "2025-07-31T13:11:28.584+03:00",
|
|
124
|
-
"details": {
|
|
125
|
-
...stageMock,
|
|
126
|
-
"decision": {
|
|
127
|
-
"value": "Pending",
|
|
128
|
-
"key": "PENDING"
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
});
|
|
133
|
-
const output = {
|
|
134
|
-
"data": {
|
|
135
|
-
"requester": {
|
|
136
|
-
"departmentName": "Enterprise HR Business Partner Section_Private",
|
|
137
|
-
"directManagerName": "Hissah Ibrahim M Bin Zuayr",
|
|
138
|
-
"generalDepartmentName": "",
|
|
139
|
-
"generalDepartmentCode": "",
|
|
140
|
-
"onBehalfAuthorized": "false",
|
|
141
|
-
"employeeEmail": "iimran@stc.com.sa",
|
|
142
|
-
"fullName": "Ibrahim A. Alimran",
|
|
143
|
-
"employeeId": "",
|
|
144
|
-
"sectorName": "",
|
|
145
|
-
"seniorSectorName": "",
|
|
146
|
-
"humanResourceLocation": "",
|
|
147
|
-
"jobPosition": "",
|
|
148
|
-
"nationality": "",
|
|
149
|
-
"businessPhone": "966555008873"
|
|
150
|
-
},
|
|
151
|
-
workflowSteps,
|
|
152
|
-
"request": {
|
|
153
|
-
"details": requestMock
|
|
154
|
-
},
|
|
155
|
-
"form": {
|
|
156
|
-
"formId": `${serviceName.toUpperCase()}5000015`,
|
|
157
|
-
"currentActor": {
|
|
158
|
-
"name": "Ibrahim Ahmed M Alimran",
|
|
159
|
-
"email": "iimran@stc.com.sa"
|
|
160
|
-
},
|
|
161
|
-
"formName": serviceName.toUpperCase(),
|
|
162
|
-
"formStatus": {
|
|
163
|
-
"value": "Pending",
|
|
164
|
-
"key": "PENDING"
|
|
165
|
-
},
|
|
166
|
-
"readOnly": "false",
|
|
167
|
-
"formStep": workflowSteps[workflowSteps.length - 1].actor.recipient.role,
|
|
168
|
-
"creationDate": "2025-07-28T20:13:11.650+03:00"
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"meta": {
|
|
172
|
-
"lovs": {
|
|
173
|
-
"decision": {
|
|
174
|
-
"options": [
|
|
175
|
-
{
|
|
176
|
-
"description": "Submit to Account manager",
|
|
177
|
-
"value": "SUBMIT_TO_ACCOUNT_MANAGER",
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
"description": "Send Back",
|
|
181
|
-
"value": "SENDBACK",
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"type": "button"
|
|
185
|
-
},
|
|
186
|
-
...(0, lov_1.getLOVs)()
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
return output;
|
|
191
|
-
}
|
|
192
|
-
function main() {
|
|
193
|
-
if (!fs.existsSync(configFile)) {
|
|
194
|
-
throw new Error(`Config file not found: ${configFile}`);
|
|
195
|
-
}
|
|
196
|
-
const configContent = fs.readFileSync(configFile, 'utf-8');
|
|
197
|
-
const componentPaths = extractComponentPaths(configContent);
|
|
198
|
-
const stageMocks = {};
|
|
199
|
-
for (const { role, path: tsPath } of componentPaths) {
|
|
200
|
-
const templatePath = getTemplatePath(tsPath);
|
|
201
|
-
stageMocks[role] = getTemplateMockData(templatePath);
|
|
202
|
-
}
|
|
203
|
-
const requestTemplatePath = path.join(projectRoot, '/src/app/page-components/request-details-section/request-details-section.component.html');
|
|
204
|
-
const requestMock = getTemplateMockData(requestTemplatePath);
|
|
205
|
-
const payload = buildPayloadWithMockData(stageMocks, requestMock);
|
|
206
|
-
const outputPath = path.join(projectRoot, '/mock-output.json');
|
|
207
|
-
fs.writeFileSync(outputPath, JSON.stringify(payload, null, 2), 'utf-8');
|
|
208
|
-
console.log(`Mock data written to: ${outputPath}`);
|
|
209
|
-
}
|
package/cli/generate/mock/lov.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLOVFieldValue = getLOVFieldValue;
|
|
4
|
-
exports.getLOVs = getLOVs;
|
|
5
|
-
const lovs = {};
|
|
6
|
-
function getLOVFieldValue(lovName) {
|
|
7
|
-
if (!lovs[lovName]) {
|
|
8
|
-
const randomNumber = () => Math.floor(Math.random() * 100);
|
|
9
|
-
lovs[lovName] = {
|
|
10
|
-
type: 'combo',
|
|
11
|
-
options: Array.from({ length: 5 }).map((_, index) => ({ description: `Op_${index + 1} ${randomNumber()}`, value: (index + 1).toString() }))
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
return { key: lovs[lovName].options[0].value, value: lovs[lovName].options[0].description };
|
|
15
|
-
}
|
|
16
|
-
function getLOVs() {
|
|
17
|
-
return lovs;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Editor configuration, see http://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.md]
|
|
12
|
-
max_line_length = off
|
|
13
|
-
trim_trailing_whitespace = false
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# BPM Core CLI
|
|
2
|
-
|
|
3
|
-
This project was generated with [BPM Core CLI](https://www.npmjs.com/package/bpm-core?activeTab=readme#bpm-core-cli).
|
|
4
|
-
|
|
5
|
-
## Development server
|
|
6
|
-
|
|
7
|
-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/` . The app will automatically reload if you change any of the source files.
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"newProjectRoot": "projects",
|
|
5
|
-
"projects": {
|
|
6
|
-
"<%=serviceCode%>": {
|
|
7
|
-
"projectType": "application",
|
|
8
|
-
"schematics": {},
|
|
9
|
-
"root": "",
|
|
10
|
-
"sourceRoot": "src",
|
|
11
|
-
"prefix": "app",
|
|
12
|
-
"architect": {
|
|
13
|
-
"build": {
|
|
14
|
-
"builder": "@angular-builders/custom-webpack:browser",
|
|
15
|
-
"options": {
|
|
16
|
-
"customWebpackConfig": {
|
|
17
|
-
"path": "extra-webpack.config.js",
|
|
18
|
-
"mergeStrategies": {
|
|
19
|
-
"externals": "replace"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"allowedCommonJsDependencies": [
|
|
23
|
-
"file-saver","handlebars","moment"
|
|
24
|
-
],
|
|
25
|
-
"outputPath": "dist",
|
|
26
|
-
"index": "src/index.html",
|
|
27
|
-
"main": "src/main.ts",
|
|
28
|
-
"tsConfig": "tsconfig.app.json",
|
|
29
|
-
"polyfills": "src/polyfills.ts",
|
|
30
|
-
"aot": true,
|
|
31
|
-
"assets": [
|
|
32
|
-
"src/favicon.ico",
|
|
33
|
-
"src/assets",
|
|
34
|
-
{
|
|
35
|
-
"glob": "**/*",
|
|
36
|
-
"input": "node_modules/bpm-core/src/lib/assets",
|
|
37
|
-
"output": "/assets/"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"styles": [
|
|
41
|
-
"node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
|
42
|
-
"node_modules/intl-tel-input/build/css/intlTelInput.css",
|
|
43
|
-
"node_modules/ngx-toastr/toastr.css",
|
|
44
|
-
"node_modules/basic-ui-components/dist/assets/scss/base.scss",
|
|
45
|
-
"node_modules/bpm-core/src/lib/assets/scss/base.scss",
|
|
46
|
-
"src/styles.scss"
|
|
47
|
-
],
|
|
48
|
-
"scripts": [
|
|
49
|
-
"./node_modules/intl-tel-input/build/js/intlTelInput.min.js"
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
"configurations": {
|
|
53
|
-
"production": {
|
|
54
|
-
"fileReplacements": [
|
|
55
|
-
{
|
|
56
|
-
"replace": "src/environments/environment.ts",
|
|
57
|
-
"with": "src/environments/environment.prod.ts"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"optimization": true,
|
|
61
|
-
"outputHashing": "none",
|
|
62
|
-
"sourceMap": false,
|
|
63
|
-
"namedChunks": false,
|
|
64
|
-
"extractLicenses": true,
|
|
65
|
-
"vendorChunk": false,
|
|
66
|
-
"buildOptimizer": true,
|
|
67
|
-
"budgets": [
|
|
68
|
-
{
|
|
69
|
-
"type": "initial",
|
|
70
|
-
"maximumWarning": "4mb",
|
|
71
|
-
"maximumError": "6mb"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"type": "anyComponentStyle",
|
|
75
|
-
"maximumWarning": "6mb",
|
|
76
|
-
"maximumError": "6mb"
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
"local": {
|
|
81
|
-
"fileReplacements": [
|
|
82
|
-
{
|
|
83
|
-
"replace": "src/environments/environment.ts",
|
|
84
|
-
"with": "src/environments/environment.local.ts"
|
|
85
|
-
}
|
|
86
|
-
]
|
|
87
|
-
},
|
|
88
|
-
"development": {
|
|
89
|
-
"buildOptimizer": false,
|
|
90
|
-
"optimization": false,
|
|
91
|
-
"vendorChunk": true,
|
|
92
|
-
"extractLicenses": false,
|
|
93
|
-
"sourceMap": true,
|
|
94
|
-
"namedChunks": true,
|
|
95
|
-
"fileReplacements": [
|
|
96
|
-
{
|
|
97
|
-
"replace": "src/environments/environment.ts",
|
|
98
|
-
"with": "src/environments/environment.local.ts"
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"serve": {
|
|
105
|
-
"builder": "@angular-devkit/build-angular:dev-server",
|
|
106
|
-
"options": {},
|
|
107
|
-
"configurations": {
|
|
108
|
-
"production": {
|
|
109
|
-
"buildTarget": "<%=serviceCode%>:build:production"
|
|
110
|
-
},
|
|
111
|
-
"local": {
|
|
112
|
-
"buildTarget": "<%=serviceCode%>:build:local"
|
|
113
|
-
},
|
|
114
|
-
"development": {
|
|
115
|
-
"buildTarget": "<%=serviceCode%>:build:development"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"defaultConfiguration": "development"
|
|
119
|
-
},
|
|
120
|
-
"extract-i18n": {
|
|
121
|
-
"builder": "@angular-devkit/build-angular:extract-i18n",
|
|
122
|
-
"options": {
|
|
123
|
-
"buildTarget": "<%=serviceCode%>:build"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"test": {
|
|
127
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
128
|
-
"options": {
|
|
129
|
-
"main": "src/test.ts",
|
|
130
|
-
"karmaConfig": "./karma.conf.js",
|
|
131
|
-
"polyfills": "src/polyfills.ts",
|
|
132
|
-
"tsConfig": "src/tsconfig.spec.json",
|
|
133
|
-
"assets": [
|
|
134
|
-
"src/favicon.ico",
|
|
135
|
-
"src/assets"
|
|
136
|
-
],
|
|
137
|
-
"styles": []
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"e2e": {
|
|
141
|
-
"builder": "@angular-devkit/build-angular:protractor",
|
|
142
|
-
"options": {
|
|
143
|
-
"protractorConfig": "e2e/protractor.conf.js"
|
|
144
|
-
},
|
|
145
|
-
"configurations": {
|
|
146
|
-
"production": {
|
|
147
|
-
"devServerTarget": "<%=serviceCode%>:serve:production"
|
|
148
|
-
},
|
|
149
|
-
"development": {
|
|
150
|
-
"devServerTarget": "<%=serviceCode%>:serve:development"
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"defaultConfiguration": "development"
|
|
154
|
-
},
|
|
155
|
-
"lint": {
|
|
156
|
-
"builder": "@angular-eslint/builder:lint",
|
|
157
|
-
"options": {
|
|
158
|
-
"lintFilePatterns": [
|
|
159
|
-
"src/**/*.ts",
|
|
160
|
-
"src/**/*.html"
|
|
161
|
-
]
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
npx ng build --aot -c production --output-hashing none
|
|
2
|
-
mv ./dist/main.js ./dist/wm-main.bundle.js
|
|
3
|
-
mv ./dist/styles.css ./dist/wm-styles.bundle.css
|
|
4
|
-
mv ./dist/polyfills.js ./dist/wm-polyfills.bundle.js
|
|
5
|
-
mv ./dist/scripts.js ./dist/wm-scripts.bundle.js
|
|
6
|
-
mv ./dist/runtime.js ./dist/wm-inline.bundle.js
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// Karma configuration file, see link for more information
|
|
2
|
-
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|
3
|
-
|
|
4
|
-
module.exports = function (config) {
|
|
5
|
-
config.set({
|
|
6
|
-
basePath: '',
|
|
7
|
-
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
|
8
|
-
plugins: [
|
|
9
|
-
require('karma-jasmine'),
|
|
10
|
-
require('karma-chrome-launcher'),
|
|
11
|
-
require('karma-jasmine-html-reporter'),
|
|
12
|
-
require('karma-coverage'),
|
|
13
|
-
require('@angular-devkit/build-angular/plugins/karma')
|
|
14
|
-
],
|
|
15
|
-
client: {
|
|
16
|
-
jasmine: {
|
|
17
|
-
// you can add configuration options for Jasmine here
|
|
18
|
-
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
|
19
|
-
// for example, you can disable the random execution with `random: false`
|
|
20
|
-
// or set a specific seed with `seed: 4321`
|
|
21
|
-
},
|
|
22
|
-
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|
23
|
-
},
|
|
24
|
-
jasmineHtmlReporter: {
|
|
25
|
-
suppressAll: true // removes the duplicated traces
|
|
26
|
-
},
|
|
27
|
-
coverageReporter: {
|
|
28
|
-
dir: require('path').join(__dirname, './coverage/contractor-service'),
|
|
29
|
-
subdir: '.',
|
|
30
|
-
reporters: [
|
|
31
|
-
{ type: 'html' },
|
|
32
|
-
{ type: 'text-summary' }
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
reporters: ['progress', 'kjhtml'],
|
|
36
|
-
port: 9876,
|
|
37
|
-
colors: true,
|
|
38
|
-
logLevel: config.LOG_INFO,
|
|
39
|
-
autoWatch: true,
|
|
40
|
-
browsers: ['Chrome'],
|
|
41
|
-
singleRun: false,
|
|
42
|
-
restartOnFileChange: true
|
|
43
|
-
});
|
|
44
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "<%=serviceCode%>",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"license": "MIT",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"ng": "ng",
|
|
7
|
-
"start": "ng serve",
|
|
8
|
-
"build": "ng build --configuration production",
|
|
9
|
-
"test": "ng test",
|
|
10
|
-
"lint": "ng lint",
|
|
11
|
-
"e2e": "ng e2e"
|
|
12
|
-
},
|
|
13
|
-
"private": true,
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@angular-builders/custom-webpack": "^19.0.0",
|
|
16
|
-
"@angular/animations": "^19.0.0",
|
|
17
|
-
"@angular/cdk": "^19.0.0",
|
|
18
|
-
"@angular/common": "^19.0.0",
|
|
19
|
-
"@angular/compiler": "^19.0.0",
|
|
20
|
-
"@angular/core": "^19.0.0",
|
|
21
|
-
"@angular/forms": "^19.0.0",
|
|
22
|
-
"@angular/localize": "^19.0.0",
|
|
23
|
-
"@angular/material": "^19.0.0",
|
|
24
|
-
"@angular/platform-browser": "^19.0.0",
|
|
25
|
-
"@angular/platform-browser-dynamic": "^19.0.0",
|
|
26
|
-
"@angular/platform-server": "^19.0.0",
|
|
27
|
-
"@angular/router": "^19.0.0",
|
|
28
|
-
"@ncstate/sat-popover": "^13.1.0",
|
|
29
|
-
"basic-ui-components": "^0.0.6992",
|
|
30
|
-
"bootstrap": "^5.3.3",
|
|
31
|
-
"bpm-core": "^0.0.124",
|
|
32
|
-
"date-fns": "^4.1.0",
|
|
33
|
-
"express": "^4.18.2",
|
|
34
|
-
"file-saver": "^2.0.5",
|
|
35
|
-
"google-libphonenumber": "^3.2.42",
|
|
36
|
-
"handlebars": "^4.7.7",
|
|
37
|
-
"handlebars-loader": "^1.7.2",
|
|
38
|
-
"intl-tel-input": "^24.5.0",
|
|
39
|
-
"moment": "^2.29.4",
|
|
40
|
-
"moment-hijri": "^2.30.0",
|
|
41
|
-
"ng-dynamic-component": "^10.7.0",
|
|
42
|
-
"ngx-bootstrap": "^19.0.2",
|
|
43
|
-
"ngx-intl-tel-input-gg": "^1.0.12",
|
|
44
|
-
"ngx-mask": "^18.0.0",
|
|
45
|
-
"ngx-scrollbar": "^15.1.3",
|
|
46
|
-
"ngx-toastr": "^19.0.0",
|
|
47
|
-
"rxjs": "~7.8.0",
|
|
48
|
-
"tslib": "^2.3.0",
|
|
49
|
-
"zone.js": "~0.14.10"
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@angular-devkit/build-angular": "^19.0.0",
|
|
53
|
-
"@angular/cli": "^19.0.0",
|
|
54
|
-
"@angular/compiler-cli": "^19.0.0",
|
|
55
|
-
"@types/express": "^4.17.17",
|
|
56
|
-
"@types/jasmine": "~5.1.0",
|
|
57
|
-
"@types/node": "^18.18.0",
|
|
58
|
-
"jasmine-core": "~5.2.0",
|
|
59
|
-
"karma": "~6.4.0",
|
|
60
|
-
"karma-chrome-launcher": "~3.2.0",
|
|
61
|
-
"karma-coverage": "~2.2.0",
|
|
62
|
-
"karma-jasmine": "~5.1.0",
|
|
63
|
-
"karma-jasmine-html-reporter": "~2.1.0",
|
|
64
|
-
"ng-packagr": "^18.2.1",
|
|
65
|
-
"typescript": "~5.5.2"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// Protractor configuration file, see link for more information
|
|
2
|
-
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
|
3
|
-
|
|
4
|
-
const { SpecReporter } = require('jasmine-spec-reporter');
|
|
5
|
-
|
|
6
|
-
exports.config = {
|
|
7
|
-
allScriptsTimeout: 11000,
|
|
8
|
-
specs: [
|
|
9
|
-
'./e2e/**/*.e2e-spec.ts'
|
|
10
|
-
],
|
|
11
|
-
capabilities: {
|
|
12
|
-
'browserName': 'chrome'
|
|
13
|
-
},
|
|
14
|
-
directConnect: true,
|
|
15
|
-
baseUrl: 'http://localhost:4200/',
|
|
16
|
-
framework: 'jasmine',
|
|
17
|
-
jasmineNodeOpts: {
|
|
18
|
-
showColors: true,
|
|
19
|
-
defaultTimeoutInterval: 30000,
|
|
20
|
-
print: function() {}
|
|
21
|
-
},
|
|
22
|
-
onPrepare() {
|
|
23
|
-
require('ts-node').register({
|
|
24
|
-
project: 'e2e/tsconfig.e2e.json'
|
|
25
|
-
});
|
|
26
|
-
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
|
27
|
-
}
|
|
28
|
-
};
|