@ironcode/vas-lib 0.0.1
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 +24 -0
- package/cjs/lib/control-value/index.d.ts +2 -0
- package/cjs/lib/control-value/index.d.ts.map +1 -0
- package/cjs/lib/control-value/index.js +5 -0
- package/cjs/lib/control-value/index.js.map +1 -0
- package/cjs/lib/control-value/vas-camera-control-value.model.d.ts +7 -0
- package/cjs/lib/control-value/vas-camera-control-value.model.d.ts.map +1 -0
- package/cjs/lib/control-value/vas-camera-control-value.model.js +3 -0
- package/cjs/lib/control-value/vas-camera-control-value.model.js.map +1 -0
- package/cjs/lib/controls-config/index.d.ts +4 -0
- package/cjs/lib/controls-config/index.d.ts.map +1 -0
- package/cjs/lib/controls-config/index.js +7 -0
- package/cjs/lib/controls-config/index.js.map +1 -0
- package/cjs/lib/controls-config/vas-control-config-direction.enum.d.ts +5 -0
- package/cjs/lib/controls-config/vas-control-config-direction.enum.d.ts.map +1 -0
- package/cjs/lib/controls-config/vas-control-config-direction.enum.js +11 -0
- package/cjs/lib/controls-config/vas-control-config-direction.enum.js.map +1 -0
- package/cjs/lib/controls-config/vas-control-config.model.d.ts +8 -0
- package/cjs/lib/controls-config/vas-control-config.model.d.ts.map +1 -0
- package/cjs/lib/controls-config/vas-control-config.model.js +3 -0
- package/cjs/lib/controls-config/vas-control-config.model.js.map +1 -0
- package/cjs/lib/controls-config/vas-select-control-config.model.d.ts +10 -0
- package/cjs/lib/controls-config/vas-select-control-config.model.d.ts.map +1 -0
- package/cjs/lib/controls-config/vas-select-control-config.model.js +3 -0
- package/cjs/lib/controls-config/vas-select-control-config.model.js.map +1 -0
- package/cjs/lib/entity/index.d.ts +23 -0
- package/cjs/lib/entity/index.d.ts.map +1 -0
- package/cjs/lib/entity/index.js +26 -0
- package/cjs/lib/entity/index.js.map +1 -0
- package/cjs/lib/entity/vas-account-object.dto.d.ts +5 -0
- package/cjs/lib/entity/vas-account-object.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-account-object.dto.js +3 -0
- package/cjs/lib/entity/vas-account-object.dto.js.map +1 -0
- package/cjs/lib/entity/vas-base.dto.d.ts +13 -0
- package/cjs/lib/entity/vas-base.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-base.dto.js +3 -0
- package/cjs/lib/entity/vas-base.dto.js.map +1 -0
- package/cjs/lib/entity/vas-base.model.d.ts +24 -0
- package/cjs/lib/entity/vas-base.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-base.model.js +28 -0
- package/cjs/lib/entity/vas-base.model.js.map +1 -0
- package/cjs/lib/entity/vas-control-type.dto.d.ts +5 -0
- package/cjs/lib/entity/vas-control-type.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-control-type.dto.js +3 -0
- package/cjs/lib/entity/vas-control-type.dto.js.map +1 -0
- package/cjs/lib/entity/vas-control-type.model.d.ts +36 -0
- package/cjs/lib/entity/vas-control-type.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-control-type.model.js +57 -0
- package/cjs/lib/entity/vas-control-type.model.js.map +1 -0
- package/cjs/lib/entity/vas-control.dto.d.ts +14 -0
- package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-control.dto.js +3 -0
- package/cjs/lib/entity/vas-control.dto.js.map +1 -0
- package/cjs/lib/entity/vas-control.model.d.ts +92 -0
- package/cjs/lib/entity/vas-control.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-control.model.js +145 -0
- package/cjs/lib/entity/vas-control.model.js.map +1 -0
- package/cjs/lib/entity/vas-field.dto.d.ts +10 -0
- package/cjs/lib/entity/vas-field.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-field.dto.js +3 -0
- package/cjs/lib/entity/vas-field.dto.js.map +1 -0
- package/cjs/lib/entity/vas-file.dto.d.ts +14 -0
- package/cjs/lib/entity/vas-file.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-file.dto.js +3 -0
- package/cjs/lib/entity/vas-file.dto.js.map +1 -0
- package/cjs/lib/entity/vas-form.dto.d.ts +9 -0
- package/cjs/lib/entity/vas-form.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-form.dto.js +3 -0
- package/cjs/lib/entity/vas-form.dto.js.map +1 -0
- package/cjs/lib/entity/vas-form.model.d.ts +79 -0
- package/cjs/lib/entity/vas-form.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-form.model.js +148 -0
- package/cjs/lib/entity/vas-form.model.js.map +1 -0
- package/cjs/lib/entity/vas-group.dto.d.ts +15 -0
- package/cjs/lib/entity/vas-group.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-group.dto.js +3 -0
- package/cjs/lib/entity/vas-group.dto.js.map +1 -0
- package/cjs/lib/entity/vas-group.model.d.ts +68 -0
- package/cjs/lib/entity/vas-group.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-group.model.js +109 -0
- package/cjs/lib/entity/vas-group.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-data.dto.d.ts +5 -0
- package/cjs/lib/entity/vas-job-data.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-data.dto.js +3 -0
- package/cjs/lib/entity/vas-job-data.dto.js.map +1 -0
- package/cjs/lib/entity/vas-job.dto.d.ts +12 -0
- package/cjs/lib/entity/vas-job.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job.dto.js +3 -0
- package/cjs/lib/entity/vas-job.dto.js.map +1 -0
- package/cjs/lib/entity/vas-job.model.d.ts +124 -0
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job.model.js +209 -0
- package/cjs/lib/entity/vas-job.model.js.map +1 -0
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts +3 -0
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job.model.spec-data.js +63 -0
- package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -0
- package/cjs/lib/entity/vas-report-layout.dto.d.ts +8 -0
- package/cjs/lib/entity/vas-report-layout.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-report-layout.dto.js +3 -0
- package/cjs/lib/entity/vas-report-layout.dto.js.map +1 -0
- package/cjs/lib/entity/vas-report-request.dto.d.ts +8 -0
- package/cjs/lib/entity/vas-report-request.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-report-request.dto.js +3 -0
- package/cjs/lib/entity/vas-report-request.dto.js.map +1 -0
- package/cjs/lib/entity/vas-report-request.model.d.ts +19 -0
- package/cjs/lib/entity/vas-report-request.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-report-request.model.js +42 -0
- package/cjs/lib/entity/vas-report-request.model.js.map +1 -0
- package/cjs/lib/entity/vas-restricted-account-object.dto.d.ts +5 -0
- package/cjs/lib/entity/vas-restricted-account-object.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-restricted-account-object.dto.js +3 -0
- package/cjs/lib/entity/vas-restricted-account-object.dto.js.map +1 -0
- package/cjs/lib/entity/vas-user.dto.d.ts +6 -0
- package/cjs/lib/entity/vas-user.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-user.dto.js +3 -0
- package/cjs/lib/entity/vas-user.dto.js.map +1 -0
- package/cjs/lib/entity/vas-user.model.d.ts +18 -0
- package/cjs/lib/entity/vas-user.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-user.model.js +50 -0
- package/cjs/lib/entity/vas-user.model.js.map +1 -0
- package/cjs/lib/utils/find-form-control.d.ts +3 -0
- package/cjs/lib/utils/find-form-control.d.ts.map +1 -0
- package/cjs/lib/utils/find-form-control.js +25 -0
- package/cjs/lib/utils/find-form-control.js.map +1 -0
- package/cjs/package.json +47 -0
- package/cjs/public-api.d.ts +4 -0
- package/cjs/public-api.d.ts.map +1 -0
- package/cjs/public-api.js +7 -0
- package/cjs/public-api.js.map +1 -0
- package/esm2020/ironcode-vas-lib.mjs +5 -0
- package/esm2020/lib/control-value/index.mjs +2 -0
- package/esm2020/lib/control-value/vas-camera-control-value.model.mjs +2 -0
- package/esm2020/lib/controls-config/index.mjs +4 -0
- package/esm2020/lib/controls-config/vas-control-config-direction.enum.mjs +8 -0
- package/esm2020/lib/controls-config/vas-control-config.model.mjs +2 -0
- package/esm2020/lib/controls-config/vas-select-control-config.model.mjs +2 -0
- package/esm2020/lib/entity/index.mjs +23 -0
- package/esm2020/lib/entity/vas-account-object.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-base.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-base.model.mjs +24 -0
- package/esm2020/lib/entity/vas-control-type.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-control-type.model.mjs +53 -0
- package/esm2020/lib/entity/vas-control.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-control.model.mjs +141 -0
- package/esm2020/lib/entity/vas-field.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-file.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-form.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-form.model.mjs +143 -0
- package/esm2020/lib/entity/vas-group.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-group.model.mjs +105 -0
- package/esm2020/lib/entity/vas-job-data.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-job.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-job.model.mjs +205 -0
- package/esm2020/lib/entity/vas-report-layout.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-report-request.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-report-request.model.mjs +38 -0
- package/esm2020/lib/entity/vas-restricted-account-object.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-user.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-user.model.mjs +46 -0
- package/esm2020/public-api.mjs +4 -0
- package/fesm2015/ironcode-vas-lib.mjs +756 -0
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -0
- package/fesm2020/ironcode-vas-lib.mjs +755 -0
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -0
- package/ironcode-vas-lib.d.ts +5 -0
- package/lib/control-value/index.d.ts +1 -0
- package/lib/control-value/vas-camera-control-value.model.d.ts +6 -0
- package/lib/controls-config/index.d.ts +3 -0
- package/lib/controls-config/vas-control-config-direction.enum.d.ts +4 -0
- package/lib/controls-config/vas-control-config.model.d.ts +7 -0
- package/lib/controls-config/vas-select-control-config.model.d.ts +9 -0
- package/lib/entity/index.d.ts +22 -0
- package/lib/entity/vas-account-object.dto.d.ts +4 -0
- package/lib/entity/vas-base.dto.d.ts +12 -0
- package/lib/entity/vas-base.model.d.ts +23 -0
- package/lib/entity/vas-control-type.dto.d.ts +4 -0
- package/lib/entity/vas-control-type.model.d.ts +35 -0
- package/lib/entity/vas-control.dto.d.ts +13 -0
- package/lib/entity/vas-control.model.d.ts +91 -0
- package/lib/entity/vas-field.dto.d.ts +9 -0
- package/lib/entity/vas-file.dto.d.ts +13 -0
- package/lib/entity/vas-form.dto.d.ts +8 -0
- package/lib/entity/vas-form.model.d.ts +78 -0
- package/lib/entity/vas-group.dto.d.ts +14 -0
- package/lib/entity/vas-group.model.d.ts +67 -0
- package/lib/entity/vas-job-data.dto.d.ts +4 -0
- package/lib/entity/vas-job.dto.d.ts +11 -0
- package/lib/entity/vas-job.model.d.ts +123 -0
- package/lib/entity/vas-report-layout.dto.d.ts +7 -0
- package/lib/entity/vas-report-request.dto.d.ts +7 -0
- package/lib/entity/vas-report-request.model.d.ts +18 -0
- package/lib/entity/vas-restricted-account-object.dto.d.ts +4 -0
- package/lib/entity/vas-user.dto.d.ts +5 -0
- package/lib/entity/vas-user.model.d.ts +17 -0
- package/package.json +35 -0
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VasGroupModel = void 0;
|
|
4
|
+
const vas_base_model_1 = require("./vas-base.model");
|
|
5
|
+
const vas_control_model_1 = require("./vas-control.model");
|
|
6
|
+
const angular2_uuid_1 = require("angular2-uuid");
|
|
7
|
+
/**
|
|
8
|
+
* GroupModel
|
|
9
|
+
*/
|
|
10
|
+
class VasGroupModel extends vas_base_model_1.VasBaseModel {
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} id
|
|
13
|
+
* @param {string} created
|
|
14
|
+
* @param {string} serverCreated
|
|
15
|
+
* @param {string} createdBy
|
|
16
|
+
* @param {string} modified
|
|
17
|
+
* @param {string} serverModified
|
|
18
|
+
* @param {string} modifiedBy
|
|
19
|
+
* @param {string} account
|
|
20
|
+
* @param {string} accessGroup
|
|
21
|
+
* @param {string} name
|
|
22
|
+
* @param {string} title
|
|
23
|
+
* @param {string} description
|
|
24
|
+
* @param {number} sequence
|
|
25
|
+
* @param {boolean} includeInSummary
|
|
26
|
+
* @param {string[]} forms
|
|
27
|
+
* @param {string} visibilityControl
|
|
28
|
+
* @param {string} visibleIfEquals
|
|
29
|
+
* @param {VasControlModel[]} controls
|
|
30
|
+
* @param {number} scoreWeight
|
|
31
|
+
*/
|
|
32
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, name, title, description, sequence, includeInSummary, forms, visibilityControl, visibleIfEquals, controls, scoreWeight) {
|
|
33
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
34
|
+
this.id = id;
|
|
35
|
+
this.created = created;
|
|
36
|
+
this.serverCreated = serverCreated;
|
|
37
|
+
this.createdBy = createdBy;
|
|
38
|
+
this.modified = modified;
|
|
39
|
+
this.serverModified = serverModified;
|
|
40
|
+
this.modifiedBy = modifiedBy;
|
|
41
|
+
this.account = account;
|
|
42
|
+
this.accessGroup = accessGroup;
|
|
43
|
+
this.name = name;
|
|
44
|
+
this.title = title;
|
|
45
|
+
this.description = description;
|
|
46
|
+
this.sequence = sequence;
|
|
47
|
+
this.includeInSummary = includeInSummary;
|
|
48
|
+
this.forms = forms;
|
|
49
|
+
this.visibilityControl = visibilityControl;
|
|
50
|
+
this.visibleIfEquals = visibleIfEquals;
|
|
51
|
+
this.controls = controls;
|
|
52
|
+
this.scoreWeight = scoreWeight;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {VasGroupDto} dto
|
|
56
|
+
* @return {VasGroupModel}
|
|
57
|
+
*/
|
|
58
|
+
static fromDto(dto) {
|
|
59
|
+
return new VasGroupModel(
|
|
60
|
+
// eslint-disable-next-line new-cap
|
|
61
|
+
dto.id || angular2_uuid_1.UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.name || '', dto.title || '', dto.description || '', dto.sequence || 0, dto.includeInSummary || false, dto.forms || [], dto.visibilityControl || '', dto.visibleIfEquals || '', (dto.controls || [])
|
|
62
|
+
.sort((a, b) => a.sequence - b.sequence)
|
|
63
|
+
.map(c => vas_control_model_1.VasControlModel.fromDto(c)), dto.scoreWeight || 1);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @param {Array<VasControlModel>} valuesByControlId
|
|
67
|
+
* @return {boolean}
|
|
68
|
+
*/
|
|
69
|
+
isVisible(valuesByControlId) {
|
|
70
|
+
if (!this.visibilityControl || !this.visibleIfEquals) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
const control = valuesByControlId
|
|
74
|
+
.find(c => c.id === this.visibilityControl);
|
|
75
|
+
if (!control) {
|
|
76
|
+
console.warn(`control with id ${this.visibilityControl} not found`);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
return (control.value || '').toString() === this.visibleIfEquals;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @return {VasGroupDto}
|
|
83
|
+
*/
|
|
84
|
+
toDto() {
|
|
85
|
+
return {
|
|
86
|
+
id: this.id,
|
|
87
|
+
created: this.created,
|
|
88
|
+
serverCreated: this.serverCreated,
|
|
89
|
+
createdBy: this.createdBy,
|
|
90
|
+
modified: this.modified,
|
|
91
|
+
serverModified: this.serverModified,
|
|
92
|
+
modifiedBy: this.modifiedBy,
|
|
93
|
+
account: this.account,
|
|
94
|
+
accessGroup: this.accessGroup,
|
|
95
|
+
name: this.name,
|
|
96
|
+
title: this.title,
|
|
97
|
+
description: this.description,
|
|
98
|
+
sequence: this.sequence,
|
|
99
|
+
includeInSummary: this.includeInSummary,
|
|
100
|
+
forms: this.forms,
|
|
101
|
+
visibilityControl: this.visibilityControl,
|
|
102
|
+
visibleIfEquals: this.visibleIfEquals,
|
|
103
|
+
controls: this.controls.map(control => control.toDto()),
|
|
104
|
+
scoreWeight: this.scoreWeight
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.VasGroupModel = VasGroupModel;
|
|
109
|
+
//# sourceMappingURL=vas-group.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-group.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-group.model.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,2DAAsD;AAEtD,iDAAqC;AAGrC;;GAEG;AACH,MAAa,aAAc,SAAQ,6BAAY;IAC7C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAC3B,OAAe,EACf,WAAmB,EACnB,IAAY,EACZ,KAAa,EACb,WAAmB,EACnB,QAAgB,EAChB,gBAAyB,EACzB,KAAe,EACf,iBAAyB,EACzB,eAAuB,EACvB,QAA2B,EAC3B,WAAmB;QAE1B,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,CACX,CAAC;QA5Bc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,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AW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACvD,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC;CACF;AArID,sCAqIC","sourcesContent":["import { VasBaseModel } from './vas-base.model';\nimport { VasControlModel } from './vas-control.model';\nimport { VasGroupDto } from './vas-group.dto';\nimport { UUID } from 'angular2-uuid';\nimport { VasFieldDtoValue } from './vas-field.dto';\n\n/**\n * GroupModel\n */\nexport class VasGroupModel extends VasBaseModel {\n /**\n * @param {string} id\n * @param {string} created\n * @param {string} serverCreated\n * @param {string} createdBy\n * @param {string} modified\n * @param {string} serverModified\n * @param {string} modifiedBy\n * @param {string} account\n * @param {string} accessGroup\n * @param {string} name\n * @param {string} title\n * @param {string} description\n * @param {number} sequence\n * @param {boolean} includeInSummary\n * @param {string[]} forms\n * @param {string} visibilityControl\n * @param {string} visibleIfEquals\n * @param {VasControlModel[]} controls\n * @param {number} scoreWeight\n */\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public account: string,\n public accessGroup: string,\n public name: string,\n public title: string,\n public description: string,\n public sequence: number,\n public includeInSummary: boolean,\n public forms: string[],\n public visibilityControl: string,\n public visibleIfEquals: string,\n public controls: VasControlModel[],\n public scoreWeight: number\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy\n );\n }\n\n /**\n * @param {VasGroupDto} dto\n * @return {VasGroupModel}\n */\n public static fromDto(dto: Partial<VasGroupDto>): VasGroupModel {\n return new VasGroupModel(\n // eslint-disable-next-line new-cap\n dto.id || UUID.UUID(),\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.name || '',\n dto.title || '',\n dto.description || '',\n dto.sequence || 0,\n dto.includeInSummary || false,\n dto.forms || [],\n dto.visibilityControl || '',\n dto.visibleIfEquals || '',\n (dto.controls || [])\n .sort((a, b) => a.sequence - b.sequence)\n .map(c => VasControlModel.fromDto(c)),\n dto.scoreWeight || 1\n );\n }\n\n /**\n * @param {Array<VasControlModel>} valuesByControlId\n * @return {boolean}\n */\n isVisible(\n valuesByControlId: Array<{id: string, value: VasFieldDtoValue | undefined}>\n ): boolean {\n if (!this.visibilityControl || !this.visibleIfEquals) {\n return true;\n }\n\n const control = valuesByControlId\n .find(c => c.id === this.visibilityControl);\n\n if (!control) {\n console.warn(`control with id ${this.visibilityControl} not found`);\n return true;\n }\n\n return (control.value || '').toString() === this.visibleIfEquals;\n }\n\n /**\n * @return {VasGroupDto}\n */\n toDto(): VasGroupDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n account: this.account,\n accessGroup: this.accessGroup,\n name: this.name,\n title: this.title,\n description: this.description,\n sequence: this.sequence,\n includeInSummary: this.includeInSummary,\n forms: this.forms,\n visibilityControl: this.visibilityControl,\n visibleIfEquals: this.visibleIfEquals,\n controls: this.controls.map(control => control.toDto()),\n scoreWeight: this.scoreWeight\n };\n }\n}\n\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job-data.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-data.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACxD,GAAG,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job-data.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-data.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasAccountObjectDto } from './vas-account-object.dto';\n\nexport interface VasJobDataDto extends VasAccountObjectDto {\n job: string;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';
|
|
2
|
+
import { VasFieldDtoValue } from './vas-field.dto';
|
|
3
|
+
export interface VasJobStaticDto extends VasRestrictedAccountObjectDto {
|
|
4
|
+
reference: string;
|
|
5
|
+
jobDate: string;
|
|
6
|
+
jobStatus: string;
|
|
7
|
+
jobType: string;
|
|
8
|
+
assignee: string;
|
|
9
|
+
formId: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type VasJobDto = VasJobStaticDto & Record<string, VasFieldDtoValue>;
|
|
12
|
+
//# sourceMappingURL=vas-job.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,eAAgB,SAAQ,6BAA6B;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\nimport { VasFieldDtoValue } from './vas-field.dto';\n\nexport interface VasJobStaticDto extends VasRestrictedAccountObjectDto {\n reference: string;\n jobDate: string;\n jobStatus: string;\n jobType: string;\n assignee: string;\n formId: string;\n}\nexport declare type VasJobDto = VasJobStaticDto & Record<string, VasFieldDtoValue>;\n"]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { VasJobDto } from './vas-job.dto';
|
|
2
|
+
import { VasBaseModel } from './vas-base.model';
|
|
3
|
+
import { VasFieldDtoValue } from './vas-field.dto';
|
|
4
|
+
import { VasFormModel } from './vas-form.model';
|
|
5
|
+
declare type VasJobModelKeys = keyof typeof VasJobModel;
|
|
6
|
+
declare type VasJobModelTypeType = {
|
|
7
|
+
[key in VasJobModelKeys]: string;
|
|
8
|
+
};
|
|
9
|
+
interface VasJobModelDynamicInterface extends VasJobModelTypeType {
|
|
10
|
+
[key: string]: VasFieldDtoValue;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* JobModel
|
|
14
|
+
*/
|
|
15
|
+
export declare class VasJobModel extends VasBaseModel {
|
|
16
|
+
id: string;
|
|
17
|
+
created: string;
|
|
18
|
+
serverCreated: string;
|
|
19
|
+
createdBy: string;
|
|
20
|
+
modified: string;
|
|
21
|
+
serverModified: string;
|
|
22
|
+
modifiedBy: string;
|
|
23
|
+
account: string;
|
|
24
|
+
accessGroup: string;
|
|
25
|
+
reference: string;
|
|
26
|
+
jobDate: string;
|
|
27
|
+
jobStatus: string;
|
|
28
|
+
jobType: string;
|
|
29
|
+
assignee: string;
|
|
30
|
+
formId: string;
|
|
31
|
+
/**
|
|
32
|
+
* @param {string} id
|
|
33
|
+
* @param {string} created
|
|
34
|
+
* @param {string} serverCreated
|
|
35
|
+
* @param {string} createdBy
|
|
36
|
+
* @param {string} modified
|
|
37
|
+
* @param {string} serverModified
|
|
38
|
+
* @param {string} modifiedBy
|
|
39
|
+
* @param {string} account
|
|
40
|
+
* @param {string} accessGroup
|
|
41
|
+
* @param {string} reference
|
|
42
|
+
* @param {string} jobDate
|
|
43
|
+
* @param {string} jobStatus
|
|
44
|
+
* @param {string} jobType
|
|
45
|
+
* @param {string} assignee
|
|
46
|
+
* @param {string} formId
|
|
47
|
+
*/
|
|
48
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, account: string, accessGroup: string, reference: string, jobDate: string, jobStatus: string, jobType: string, assignee: string, formId: string);
|
|
49
|
+
/**
|
|
50
|
+
* Returns this with the dynamic interface
|
|
51
|
+
* @return {VasJobModelDynamicInterface}
|
|
52
|
+
*/
|
|
53
|
+
get $this(): VasJobModelDynamicInterface;
|
|
54
|
+
/**
|
|
55
|
+
* Returns a list of Job dynamic properties i.e. those that are added by the
|
|
56
|
+
* dynamic forms
|
|
57
|
+
*/
|
|
58
|
+
get dynamicProperties(): Array<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns a list of Job static properties i.e. those that are declared by
|
|
61
|
+
* the type
|
|
62
|
+
*/
|
|
63
|
+
get staticProperties(): Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
* @return {VasJobModel}
|
|
66
|
+
*/
|
|
67
|
+
static empty(): VasJobModel;
|
|
68
|
+
/**
|
|
69
|
+
* @param {VasJobDto} jobDto
|
|
70
|
+
* @return {VasJobModel}
|
|
71
|
+
*/
|
|
72
|
+
static fromDto(jobDto: Partial<VasJobDto>): VasJobModel;
|
|
73
|
+
/**
|
|
74
|
+
* @param {VasFormModel} formModel
|
|
75
|
+
* @return {Record<string, VasFieldDtoValue>}
|
|
76
|
+
*/
|
|
77
|
+
getFields(formModel: VasFormModel): Record<string, VasFieldDtoValue>;
|
|
78
|
+
/**
|
|
79
|
+
* A very non sophisticated way to get values from the job via paths
|
|
80
|
+
*
|
|
81
|
+
* For example:
|
|
82
|
+
*
|
|
83
|
+
* getValueByPath(['foo', 'bar']);
|
|
84
|
+
*
|
|
85
|
+
* if job is
|
|
86
|
+
* {
|
|
87
|
+
* foo: {
|
|
88
|
+
* bar: 'value'
|
|
89
|
+
* }
|
|
90
|
+
* }
|
|
91
|
+
*
|
|
92
|
+
* will return "value"
|
|
93
|
+
*
|
|
94
|
+
* @param {string[]} path path segments
|
|
95
|
+
* @return {void}
|
|
96
|
+
*/
|
|
97
|
+
getValueByPath<T extends VasFieldDtoValue>(path?: string[]): T | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* A very non sophisticated way to set values in the job via paths
|
|
100
|
+
*
|
|
101
|
+
* For example:
|
|
102
|
+
*
|
|
103
|
+
* setValueByPath('value', ['foo', 'bar']);
|
|
104
|
+
*
|
|
105
|
+
* will make results in job
|
|
106
|
+
* {
|
|
107
|
+
* foo: {
|
|
108
|
+
* bar: 'value'
|
|
109
|
+
* }
|
|
110
|
+
* }
|
|
111
|
+
*
|
|
112
|
+
* @param {any} value the value to set
|
|
113
|
+
* @param {string[]} path path segments
|
|
114
|
+
*/
|
|
115
|
+
setValueByPath(value: VasFieldDtoValue, path?: string[]): void;
|
|
116
|
+
/**
|
|
117
|
+
* @param {boolean} staticOnly if true, will only output values for the static
|
|
118
|
+
* properties in the dto
|
|
119
|
+
* @return {VasJobDto}
|
|
120
|
+
*/
|
|
121
|
+
toDto(staticOnly?: boolean): VasJobDto;
|
|
122
|
+
}
|
|
123
|
+
export {};
|
|
124
|
+
//# sourceMappingURL=vas-job.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,aAAK,eAAe,GAAG,MAAM,OAAO,WAAW,CAAC;AAEhD,OAAO,MAAM,mBAAmB,GAAG;KAChC,GAAG,IAAI,eAAe,GAAG,MAAM;CACjC,CAAA;AAED,UAAU,2BAA4B,SAAQ,mBAAmB;IAC/D,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACjC;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAmBzB,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAC3B,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,MAAM;IAhCvB;;;;;;;;;;;;;;;;OAgBG;gBAEe,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAC3B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM;IAavB;;;OAGG;IACH,IAAI,KAAK,IAAI,2BAA2B,CAIvC;IAED;;;OAGG;IACH,IAAI,iBAAiB,IAAI,KAAK,CAAC,MAAM,CAAC,CAKrC;IAED;;;OAGG;IACH,IAAI,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC,CAEpC;IAED;;OAEG;WACW,KAAK,IAAI,WAAW;IAqBlC;;;OAGG;WACW,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,WAAW;IA6B9D;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAYpE;;;;;;;;;;;;;;;;;;OAkBG;IACH,cAAc,CAAC,CAAC,SAAS,gBAAgB,EACvC,IAAI,GAAE,MAAM,EAAO,GAClB,CAAC,GAAG,SAAS;IAuBhB;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,IAAI;IAyBlE;;;;OAIG;IACI,KAAK,CAAC,UAAU,UAAQ,GAAG,SAAS;CAgB5C"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VasJobModel = void 0;
|
|
4
|
+
const angular2_uuid_1 = require("angular2-uuid");
|
|
5
|
+
const vas_base_model_1 = require("./vas-base.model");
|
|
6
|
+
/**
|
|
7
|
+
* JobModel
|
|
8
|
+
*/
|
|
9
|
+
class VasJobModel extends vas_base_model_1.VasBaseModel {
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} id
|
|
12
|
+
* @param {string} created
|
|
13
|
+
* @param {string} serverCreated
|
|
14
|
+
* @param {string} createdBy
|
|
15
|
+
* @param {string} modified
|
|
16
|
+
* @param {string} serverModified
|
|
17
|
+
* @param {string} modifiedBy
|
|
18
|
+
* @param {string} account
|
|
19
|
+
* @param {string} accessGroup
|
|
20
|
+
* @param {string} reference
|
|
21
|
+
* @param {string} jobDate
|
|
22
|
+
* @param {string} jobStatus
|
|
23
|
+
* @param {string} jobType
|
|
24
|
+
* @param {string} assignee
|
|
25
|
+
* @param {string} formId
|
|
26
|
+
*/
|
|
27
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, reference, jobDate, jobStatus, jobType, assignee, formId) {
|
|
28
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
29
|
+
this.id = id;
|
|
30
|
+
this.created = created;
|
|
31
|
+
this.serverCreated = serverCreated;
|
|
32
|
+
this.createdBy = createdBy;
|
|
33
|
+
this.modified = modified;
|
|
34
|
+
this.serverModified = serverModified;
|
|
35
|
+
this.modifiedBy = modifiedBy;
|
|
36
|
+
this.account = account;
|
|
37
|
+
this.accessGroup = accessGroup;
|
|
38
|
+
this.reference = reference;
|
|
39
|
+
this.jobDate = jobDate;
|
|
40
|
+
this.jobStatus = jobStatus;
|
|
41
|
+
this.jobType = jobType;
|
|
42
|
+
this.assignee = assignee;
|
|
43
|
+
this.formId = formId;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns this with the dynamic interface
|
|
47
|
+
* @return {VasJobModelDynamicInterface}
|
|
48
|
+
*/
|
|
49
|
+
get $this() {
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
51
|
+
const $this = this;
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns a list of Job dynamic properties i.e. those that are added by the
|
|
56
|
+
* dynamic forms
|
|
57
|
+
*/
|
|
58
|
+
get dynamicProperties() {
|
|
59
|
+
const nativeProps = this.staticProperties;
|
|
60
|
+
return Object
|
|
61
|
+
.getOwnPropertyNames(this)
|
|
62
|
+
.filter(prop => !nativeProps.includes(prop));
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Returns a list of Job static properties i.e. those that are declared by
|
|
66
|
+
* the type
|
|
67
|
+
*/
|
|
68
|
+
get staticProperties() {
|
|
69
|
+
return Object.getOwnPropertyNames(VasJobModel.empty());
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @return {VasJobModel}
|
|
73
|
+
*/
|
|
74
|
+
static empty() {
|
|
75
|
+
return new VasJobModel(
|
|
76
|
+
// eslint-disable-next-line new-cap
|
|
77
|
+
angular2_uuid_1.UUID.UUID(), '', '', '', '', '', '', '', '', '', '', '', '', '', '');
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @param {VasJobDto} jobDto
|
|
81
|
+
* @return {VasJobModel}
|
|
82
|
+
*/
|
|
83
|
+
static fromDto(jobDto) {
|
|
84
|
+
const model = new VasJobModel(
|
|
85
|
+
// eslint-disable-next-line new-cap
|
|
86
|
+
jobDto.id || angular2_uuid_1.UUID.UUID(), jobDto.created || '', jobDto.serverCreated || '', jobDto.createdBy || '', jobDto.modified || '', jobDto.serverModified || '', jobDto.modifiedBy || '', jobDto.account || '', jobDto.accessGroup || '', jobDto.reference || '', jobDto.jobDate || '', jobDto.jobStatus || '', jobDto.jobType || '', jobDto.assignee || '', jobDto.formId || '');
|
|
87
|
+
const emptyKeys = model.staticProperties;
|
|
88
|
+
Object
|
|
89
|
+
.keys(jobDto)
|
|
90
|
+
.filter(key => emptyKeys.indexOf(key) === -1)
|
|
91
|
+
.forEach((key) => model.$this[key] = jobDto[key]);
|
|
92
|
+
return model;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @param {VasFormModel} formModel
|
|
96
|
+
* @return {Record<string, VasFieldDtoValue>}
|
|
97
|
+
*/
|
|
98
|
+
getFields(formModel) {
|
|
99
|
+
const fields = {};
|
|
100
|
+
formModel.groups
|
|
101
|
+
.forEach(group => {
|
|
102
|
+
group.controls.forEach(control => {
|
|
103
|
+
(fields)[control.reportTemplateName] =
|
|
104
|
+
this.getValueByPath([group.name, control.name]);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
return fields;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* A very non sophisticated way to get values from the job via paths
|
|
111
|
+
*
|
|
112
|
+
* For example:
|
|
113
|
+
*
|
|
114
|
+
* getValueByPath(['foo', 'bar']);
|
|
115
|
+
*
|
|
116
|
+
* if job is
|
|
117
|
+
* {
|
|
118
|
+
* foo: {
|
|
119
|
+
* bar: 'value'
|
|
120
|
+
* }
|
|
121
|
+
* }
|
|
122
|
+
*
|
|
123
|
+
* will return "value"
|
|
124
|
+
*
|
|
125
|
+
* @param {string[]} path path segments
|
|
126
|
+
* @return {void}
|
|
127
|
+
*/
|
|
128
|
+
getValueByPath(path = []) {
|
|
129
|
+
switch (path.length) {
|
|
130
|
+
case 0: {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
case 1: {
|
|
134
|
+
return (this.$this)[path[0]];
|
|
135
|
+
}
|
|
136
|
+
case 2: {
|
|
137
|
+
const val0 = this.$this[path[0]];
|
|
138
|
+
return val0[path[1]];
|
|
139
|
+
}
|
|
140
|
+
case 3: {
|
|
141
|
+
const val0 = this.$this[path[0]];
|
|
142
|
+
const val1 = val0[path[1]];
|
|
143
|
+
return val1[path[2]];
|
|
144
|
+
}
|
|
145
|
+
default: {
|
|
146
|
+
throw Error('path has too many segments');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* A very non sophisticated way to set values in the job via paths
|
|
152
|
+
*
|
|
153
|
+
* For example:
|
|
154
|
+
*
|
|
155
|
+
* setValueByPath('value', ['foo', 'bar']);
|
|
156
|
+
*
|
|
157
|
+
* will make results in job
|
|
158
|
+
* {
|
|
159
|
+
* foo: {
|
|
160
|
+
* bar: 'value'
|
|
161
|
+
* }
|
|
162
|
+
* }
|
|
163
|
+
*
|
|
164
|
+
* @param {any} value the value to set
|
|
165
|
+
* @param {string[]} path path segments
|
|
166
|
+
*/
|
|
167
|
+
setValueByPath(value, path = []) {
|
|
168
|
+
switch (path.length) {
|
|
169
|
+
case 0: {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
case 1: {
|
|
173
|
+
(this.$this)[path[0]] = value;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
case 2: {
|
|
177
|
+
// eslint-disable-next-line max-len
|
|
178
|
+
this.$this[path[0]][path[1]] = value;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
case 3: {
|
|
182
|
+
// eslint-disable-next-line max-len
|
|
183
|
+
this.$this[path[0]][path[1]][path[2]] = value;
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
default: {
|
|
187
|
+
throw Error('path has too many segments');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @param {boolean} staticOnly if true, will only output values for the static
|
|
193
|
+
* properties in the dto
|
|
194
|
+
* @return {VasJobDto}
|
|
195
|
+
*/
|
|
196
|
+
toDto(staticOnly = false) {
|
|
197
|
+
const dto = {};
|
|
198
|
+
this.staticProperties
|
|
199
|
+
.forEach(prop => (dto)[prop] = this.$this[prop]);
|
|
200
|
+
if (staticOnly) {
|
|
201
|
+
return dto;
|
|
202
|
+
}
|
|
203
|
+
this.dynamicProperties
|
|
204
|
+
.forEach(prop => dto[prop] = this.$this[prop]);
|
|
205
|
+
return dto;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
exports.VasJobModel = VasJobModel;
|
|
209
|
+
//# sourceMappingURL=vas-job.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":";;;AAAA,iDAAqC;AAErC,qDAAgD;AAchD;;GAEG;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d,OAAO,GAAG,CAAC;SACZ;QAED,IAAI,CAAC,iBAAiB;aACnB,OAAO,CAAC,IAAI,CAAC,EAAE,CACd,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAElC,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA/PD,kCA+PC","sourcesContent":["import { UUID } from 'angular2-uuid';\nimport { VasJobDto } from './vas-job.dto';\nimport { VasBaseModel } from './vas-base.model';\nimport { VasFieldDtoValue } from './vas-field.dto';\nimport { VasFormModel } from './vas-form.model';\n\ntype VasJobModelKeys = keyof typeof VasJobModel;\n\ndeclare type VasJobModelTypeType = {\n [key in VasJobModelKeys]: string;\n}\n\ninterface VasJobModelDynamicInterface extends VasJobModelTypeType {\n [key: string]: VasFieldDtoValue;\n}\n\n/**\n * JobModel\n */\nexport class VasJobModel extends VasBaseModel {\n /**\n * @param {string} id\n * @param {string} created\n * @param {string} serverCreated\n * @param {string} createdBy\n * @param {string} modified\n * @param {string} serverModified\n * @param {string} modifiedBy\n * @param {string} account\n * @param {string} accessGroup\n * @param {string} reference\n * @param {string} jobDate\n * @param {string} jobStatus\n * @param {string} jobType\n * @param {string} assignee\n * @param {string} formId\n */\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public account: string,\n public accessGroup: string,\n public reference: string,\n public jobDate: string,\n public jobStatus: string,\n public jobType: string,\n public assignee: string,\n public formId: string\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy\n );\n }\n\n /**\n * Returns this with the dynamic interface\n * @return {VasJobModelDynamicInterface}\n */\n get $this(): VasJobModelDynamicInterface {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const $this = this;\n return this as typeof $this & VasJobModelDynamicInterface;\n }\n\n /**\n * Returns a list of Job dynamic properties i.e. those that are added by the\n * dynamic forms\n */\n get dynamicProperties(): Array<string> {\n const nativeProps = this.staticProperties;\n return Object\n .getOwnPropertyNames(this)\n .filter(prop => !nativeProps.includes(prop));\n }\n\n /**\n * Returns a list of Job static properties i.e. those that are declared by\n * the type\n */\n get staticProperties(): Array<string> {\n return Object.getOwnPropertyNames(VasJobModel.empty());\n }\n\n /**\n * @return {VasJobModel}\n */\n public static empty(): VasJobModel {\n return new VasJobModel(\n // eslint-disable-next-line new-cap\n UUID.UUID(),\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n ''\n );\n }\n\n /**\n * @param {VasJobDto} jobDto\n * @return {VasJobModel}\n */\n public static fromDto(jobDto: Partial<VasJobDto>): VasJobModel {\n const model = new VasJobModel(\n // eslint-disable-next-line new-cap\n jobDto.id || UUID.UUID(),\n jobDto.created || '',\n jobDto.serverCreated || '',\n jobDto.createdBy || '',\n jobDto.modified || '',\n jobDto.serverModified || '',\n jobDto.modifiedBy || '',\n jobDto.account || '',\n jobDto.accessGroup || '',\n jobDto.reference || '',\n jobDto.jobDate || '',\n jobDto.jobStatus || '',\n jobDto.jobType || '',\n jobDto.assignee || '',\n jobDto.formId || '',\n );\n const emptyKeys = model.staticProperties;\n Object\n .keys(jobDto)\n .filter(key => emptyKeys.indexOf(key) === -1)\n .forEach((key: string) =>\n model.$this[key] = (jobDto as VasJobModelDynamicInterface)[key]\n );\n return model;\n }\n\n /**\n * @param {VasFormModel} formModel\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields(formModel: VasFormModel): Record<string, VasFieldDtoValue> {\n const fields: {[key: string]: VasFieldDtoValue} = {};\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n (fields)[control.reportTemplateName] =\n this.getValueByPath([group.name, control.name]);\n });\n });\n return fields;\n }\n\n /**\n * A very non sophisticated way to get values from the job via paths\n *\n * For example:\n *\n * getValueByPath(['foo', 'bar']);\n *\n * if job is\n * {\n * foo: {\n * bar: 'value'\n * }\n * }\n *\n * will return \"value\"\n *\n * @param {string[]} path path segments\n * @return {void}\n */\n getValueByPath<T extends VasFieldDtoValue>(\n path: string[] = []\n ): T | undefined {\n switch (path.length) {\n case 0: {\n return;\n }\n case 1: {\n return (this.$this)[path[0]] as T;\n }\n case 2: {\n const val0 = this.$this[path[0]] as Record<string, object>;\n return val0[path[1]] as T;\n }\n case 3: {\n const val0 = this.$this[path[0]] as Record<string, object>;\n const val1 = val0[path[1]] as Record<string, object>;\n return val1[path[2]] as T;\n }\n default: {\n throw Error('path has too many segments');\n }\n }\n }\n\n /**\n * A very non sophisticated way to set values in the job via paths\n *\n * For example:\n *\n * setValueByPath('value', ['foo', 'bar']);\n *\n * will make results in job\n * {\n * foo: {\n * bar: 'value'\n * }\n * }\n *\n * @param {any} value the value to set\n * @param {string[]} path path segments\n */\n setValueByPath(value: VasFieldDtoValue, path: string[] = []): void {\n switch (path.length) {\n case 0: {\n return;\n }\n case 1: {\n (this.$this)[path[0]] = value;\n return;\n }\n case 2: {\n // eslint-disable-next-line max-len\n (this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] = value;\n return;\n }\n case 3: {\n // eslint-disable-next-line max-len\n ((this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] as Record<string, VasFieldDtoValue>)[path[2]] = value;\n return;\n }\n default: {\n throw Error('path has too many segments');\n }\n }\n }\n\n /**\n * @param {boolean} staticOnly if true, will only output values for the static\n * properties in the dto\n * @return {VasJobDto}\n */\n public toDto(staticOnly = false): VasJobDto {\n const dto = {} as VasJobDto & Record<string, VasFieldDtoValue>;\n this.staticProperties\n .forEach(prop =>\n (dto)[prop] = this.$this[prop]);\n\n if (staticOnly) {\n return dto;\n }\n\n this.dynamicProperties\n .forEach(prop =>\n dto[prop] = this.$this[prop]);\n\n return dto;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job.model.spec-data.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.spec-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,eAAO,MAAM,qBAAqB,YA0DnB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formDto1Group1Control = void 0;
|
|
4
|
+
exports.formDto1Group1Control = {
|
|
5
|
+
id: 'form',
|
|
6
|
+
created: '',
|
|
7
|
+
createdBy: '',
|
|
8
|
+
modified: '',
|
|
9
|
+
modifiedBy: '',
|
|
10
|
+
serverCreated: '',
|
|
11
|
+
serverModified: '',
|
|
12
|
+
account: '',
|
|
13
|
+
accessGroup: '',
|
|
14
|
+
jobType: '',
|
|
15
|
+
title: '',
|
|
16
|
+
description: '',
|
|
17
|
+
groups: [
|
|
18
|
+
{
|
|
19
|
+
id: 'group',
|
|
20
|
+
created: '',
|
|
21
|
+
createdBy: '',
|
|
22
|
+
modified: '',
|
|
23
|
+
modifiedBy: '',
|
|
24
|
+
serverCreated: '',
|
|
25
|
+
serverModified: '',
|
|
26
|
+
account: '',
|
|
27
|
+
accessGroup: '',
|
|
28
|
+
name: 'groupa',
|
|
29
|
+
title: 'Group A',
|
|
30
|
+
description: '',
|
|
31
|
+
sequence: 0,
|
|
32
|
+
includeInSummary: true,
|
|
33
|
+
forms: [],
|
|
34
|
+
visibilityControl: '',
|
|
35
|
+
visibleIfEquals: '',
|
|
36
|
+
controls: [
|
|
37
|
+
{
|
|
38
|
+
id: 'control',
|
|
39
|
+
created: '',
|
|
40
|
+
createdBy: '',
|
|
41
|
+
modified: '',
|
|
42
|
+
modifiedBy: '',
|
|
43
|
+
serverCreated: '',
|
|
44
|
+
serverModified: '',
|
|
45
|
+
account: '',
|
|
46
|
+
accessGroup: '',
|
|
47
|
+
controlType: 'text',
|
|
48
|
+
group: '',
|
|
49
|
+
validators: [],
|
|
50
|
+
name: 'fields.foo',
|
|
51
|
+
title: '',
|
|
52
|
+
linkable: false,
|
|
53
|
+
sequence: 0,
|
|
54
|
+
description: '',
|
|
55
|
+
defaultValue: '',
|
|
56
|
+
config: '',
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
scoreWeight: 1,
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=vas-job.model.spec-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job.model.spec-data.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.spec-data.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAG;IACnC,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,EAAE;IACd,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,EAAE;IACf,MAAM,EAAE;QACN;YACE,EAAE,EAAE,OAAO;YACX,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;YACb,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,EAAE;YACf,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,CAAC;YACX,gBAAgB,EAAE,IAAI;YACtB,KAAK,EAAE,EAAE;YACT,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,SAAS;oBACb,OAAO,EAAE,EAAE;oBACX,SAAS,EAAE,EAAE;oBACb,QAAQ,EAAE,EAAE;oBACZ,UAAU,EAAE,EAAE;oBACd,aAAa,EAAE,EAAE;oBACjB,cAAc,EAAE,EAAE;oBAClB,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,EAAE;oBACf,WAAW,EAAE,MAAM;oBACnB,KAAK,EAAE,EAAE;oBACT,UAAU,EAAE,EAAE;oBACd,IAAI,EAAE,YAAY;oBAClB,KAAK,EAAE,EAAE;oBACT,QAAQ,EAAE,KAAK;oBACf,QAAQ,EAAE,CAAC;oBACX,WAAW,EAAE,EAAE;oBACf,YAAY,EAAE,EAAE;oBAChB,MAAM,EAAE,EAAE;iBACX;aACF;YACD,WAAW,EAAE,CAAC;SACf;KACF;CACY,CAAC","sourcesContent":["import { VasFormDto } from './vas-form.dto';\n\nexport const formDto1Group1Control = {\n id: 'form',\n created: '',\n createdBy: '',\n modified: '',\n modifiedBy: '',\n serverCreated: '',\n serverModified: '',\n account: '',\n accessGroup: '',\n jobType: '',\n title: '',\n description: '',\n groups: [\n {\n id: 'group',\n created: '',\n createdBy: '',\n modified: '',\n modifiedBy: '',\n serverCreated: '',\n serverModified: '',\n account: '',\n accessGroup: '',\n name: 'groupa',\n title: 'Group A',\n description: '',\n sequence: 0,\n includeInSummary: true,\n forms: [],\n visibilityControl: '',\n visibleIfEquals: '',\n controls: [\n {\n id: 'control',\n created: '',\n createdBy: '',\n modified: '',\n modifiedBy: '',\n serverCreated: '',\n serverModified: '',\n account: '',\n accessGroup: '',\n controlType: 'text',\n group: '',\n validators: [],\n name: 'fields.foo',\n title: '',\n linkable: false,\n sequence: 0,\n description: '',\n defaultValue: '',\n config: '',\n }\n ],\n scoreWeight: 1,\n }\n ],\n} as VasFormDto;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';
|
|
2
|
+
export interface VasReportLayoutDto extends VasRestrictedAccountObjectDto {
|
|
3
|
+
jobType: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
entryPoint: string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=vas-report-layout.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-report-layout.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report-layout.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,MAAM,WAAW,kBAAmB,SAAQ,6BAA6B;IACvE,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-report-layout.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report-layout.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\n\nexport interface VasReportLayoutDto extends VasRestrictedAccountObjectDto {\n jobType: string;\n title: string;\n description: string;\n entryPoint: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-report-request.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-report-request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb"}
|