@ironcode/vas-lib 0.0.40 → 1.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/cjs/lib/entity/index.d.ts +10 -0
- package/cjs/lib/entity/index.d.ts.map +1 -1
- package/cjs/lib/entity/index.js +10 -0
- package/cjs/lib/entity/index.js.map +1 -1
- package/cjs/lib/entity/vas-account-object.model.d.ts +3 -1
- package/cjs/lib/entity/vas-account-object.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-account-object.model.js +4 -2
- package/cjs/lib/entity/vas-account-object.model.js.map +1 -1
- package/cjs/lib/entity/vas-base.dto.d.ts +2 -0
- package/cjs/lib/entity/vas-base.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-base.dto.js.map +1 -1
- package/cjs/lib/entity/vas-base.model.d.ts +3 -10
- package/cjs/lib/entity/vas-base.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-base.model.js +3 -10
- package/cjs/lib/entity/vas-base.model.js.map +1 -1
- package/cjs/lib/entity/vas-branch.model.d.ts +3 -1
- package/cjs/lib/entity/vas-branch.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-branch.model.js +7 -3
- package/cjs/lib/entity/vas-branch.model.js.map +1 -1
- package/cjs/lib/entity/vas-contact.dto.d.ts +7 -0
- package/cjs/lib/entity/vas-contact.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-contact.dto.js.map +1 -1
- package/cjs/lib/entity/vas-contact.model.d.ts +11 -1
- package/cjs/lib/entity/vas-contact.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-contact.model.js +24 -3
- package/cjs/lib/entity/vas-contact.model.js.map +1 -1
- package/cjs/lib/entity/vas-control-type.model.d.ts +5 -9
- package/cjs/lib/entity/vas-control-type.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control-type.model.js +13 -13
- package/cjs/lib/entity/vas-control-type.model.js.map +1 -1
- package/cjs/lib/entity/vas-control.dto.d.ts +3 -1
- package/cjs/lib/entity/vas-control.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.dto.js.map +1 -1
- package/cjs/lib/entity/vas-control.model.d.ts +11 -37
- package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.model.js +40 -50
- package/cjs/lib/entity/vas-control.model.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.d.ts +3 -1
- package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-field.model.js +7 -3
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-file.model.d.ts +4 -2
- package/cjs/lib/entity/vas-file.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-file.model.js +9 -5
- package/cjs/lib/entity/vas-file.model.js.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts +6 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.js +14 -4
- package/cjs/lib/entity/vas-fire-user.model.js.map +1 -1
- package/cjs/lib/entity/vas-form.dto.d.ts +1 -0
- package/cjs/lib/entity/vas-form.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form.dto.js.map +1 -1
- package/cjs/lib/entity/vas-form.model.d.ts +7 -22
- package/cjs/lib/entity/vas-form.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form.model.js +27 -42
- package/cjs/lib/entity/vas-form.model.js.map +1 -1
- package/cjs/lib/entity/vas-group.model.d.ts +3 -22
- package/cjs/lib/entity/vas-group.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-group.model.js +7 -24
- package/cjs/lib/entity/vas-group.model.js.map +1 -1
- package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts +6 -0
- package/cjs/lib/entity/vas-instruction-job-field.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job-field.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction-job-field.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.d.ts +23 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.js +46 -0
- package/cjs/lib/entity/vas-instruction-job-field.model.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.dto.d.ts +16 -0
- package/cjs/lib/entity/vas-instruction-job.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction-job.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.model.d.ts +58 -0
- package/cjs/lib/entity/vas-instruction-job.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-job.model.js +85 -0
- package/cjs/lib/entity/vas-instruction-job.model.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.d.ts +9 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.model.d.ts +34 -0
- package/cjs/lib/entity/vas-instruction-provider.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction-provider.model.js +62 -0
- package/cjs/lib/entity/vas-instruction-provider.model.js.map +1 -0
- package/cjs/lib/entity/vas-instruction.dto.d.ts +6 -0
- package/cjs/lib/entity/vas-instruction.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction.dto.js +3 -0
- package/cjs/lib/entity/vas-instruction.dto.js.map +1 -0
- package/cjs/lib/entity/vas-instruction.model.d.ts +30 -0
- package/cjs/lib/entity/vas-instruction.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-instruction.model.js +53 -0
- package/cjs/lib/entity/vas-instruction.model.js.map +1 -0
- package/cjs/lib/entity/vas-invitation.d.ts +36 -3
- package/cjs/lib/entity/vas-invitation.d.ts.map +1 -1
- package/cjs/lib/entity/vas-invitation.js +57 -4
- package/cjs/lib/entity/vas-invitation.js.map +1 -1
- package/cjs/lib/entity/vas-job-data.model.d.ts +3 -12
- package/cjs/lib/entity/vas-job-data.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job-data.model.js +4 -13
- package/cjs/lib/entity/vas-job-data.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.d.ts +8 -37
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +16 -48
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts +1 -2
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.js +15 -55
- package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -1
- package/cjs/lib/entity/vas-membership.model.d.ts +3 -1
- package/cjs/lib/entity/vas-membership.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-membership.model.js +7 -3
- package/cjs/lib/entity/vas-membership.model.js.map +1 -1
- package/cjs/lib/entity/vas-note.dto.d.ts +7 -0
- package/cjs/lib/entity/vas-note.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-note.dto.js +3 -0
- package/cjs/lib/entity/vas-note.dto.js.map +1 -0
- package/cjs/lib/entity/vas-note.model.d.ts +31 -0
- package/cjs/lib/entity/vas-note.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-note.model.js +54 -0
- package/cjs/lib/entity/vas-note.model.js.map +1 -0
- package/cjs/lib/entity/vas-report-layout.model.d.ts +3 -1
- package/cjs/lib/entity/vas-report-layout.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report-layout.model.js +4 -2
- package/cjs/lib/entity/vas-report-layout.model.js.map +1 -1
- package/cjs/lib/entity/vas-report-request.model.d.ts +3 -1
- package/cjs/lib/entity/vas-report-request.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report-request.model.js +7 -3
- package/cjs/lib/entity/vas-report-request.model.js.map +1 -1
- package/cjs/lib/entity/vas-report.model.d.ts +5 -3
- package/cjs/lib/entity/vas-report.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-report.model.js +10 -12
- package/cjs/lib/entity/vas-report.model.js.map +1 -1
- package/cjs/lib/entity/vas-restricted-account-object.model.d.ts +3 -1
- package/cjs/lib/entity/vas-restricted-account-object.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-restricted-account-object.model.js +4 -2
- package/cjs/lib/entity/vas-restricted-account-object.model.js.map +1 -1
- package/cjs/lib/entity/vas-user.dto.d.ts +3 -0
- package/cjs/lib/entity/vas-user.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-user.dto.js.map +1 -1
- package/cjs/lib/entity/vas-user.model.d.ts +6 -1
- package/cjs/lib/entity/vas-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-user.model.js +14 -4
- package/cjs/lib/entity/vas-user.model.js.map +1 -1
- package/cjs/package.json +12 -6
- package/esm2020/lib/entity/index.mjs +11 -1
- package/esm2020/lib/entity/vas-account-object.model.mjs +5 -3
- package/esm2020/lib/entity/vas-base.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-base.model.mjs +4 -11
- package/esm2020/lib/entity/vas-branch.model.mjs +8 -4
- package/esm2020/lib/entity/vas-contact.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-contact.model.mjs +44 -4
- package/esm2020/lib/entity/vas-control-type.model.mjs +14 -14
- package/esm2020/lib/entity/vas-control.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-control.model.mjs +45 -51
- package/esm2020/lib/entity/vas-field.model.mjs +8 -4
- package/esm2020/lib/entity/vas-file.model.mjs +10 -6
- package/esm2020/lib/entity/vas-fire-user.model.mjs +15 -5
- package/esm2020/lib/entity/vas-form.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-form.model.mjs +28 -42
- package/esm2020/lib/entity/vas-group.model.mjs +8 -25
- package/esm2020/lib/entity/vas-instruction-job-field.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction-job-field.model.mjs +42 -0
- package/esm2020/lib/entity/vas-instruction-job.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction-job.model.mjs +81 -0
- package/esm2020/lib/entity/vas-instruction-provider.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction-provider.model.mjs +63 -0
- package/esm2020/lib/entity/vas-instruction.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-instruction.model.mjs +49 -0
- package/esm2020/lib/entity/vas-invitation.mjs +60 -4
- package/esm2020/lib/entity/vas-job-data.model.mjs +5 -14
- package/esm2020/lib/entity/vas-job.model.mjs +17 -49
- package/esm2020/lib/entity/vas-membership.model.mjs +8 -4
- package/esm2020/lib/entity/vas-note.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-note.model.mjs +50 -0
- package/esm2020/lib/entity/vas-report-layout.model.mjs +5 -3
- package/esm2020/lib/entity/vas-report-request.model.mjs +8 -4
- package/esm2020/lib/entity/vas-report.model.mjs +11 -13
- package/esm2020/lib/entity/vas-restricted-account-object.model.mjs +5 -3
- package/esm2020/lib/entity/vas-user.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-user.model.mjs +15 -5
- package/fesm2015/ironcode-vas-lib.mjs +626 -329
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
- package/fesm2020/ironcode-vas-lib.mjs +655 -326
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/index.d.ts +10 -0
- package/lib/entity/vas-account-object.model.d.ts +3 -1
- package/lib/entity/vas-base.dto.d.ts +2 -0
- package/lib/entity/vas-base.model.d.ts +3 -10
- package/lib/entity/vas-branch.model.d.ts +3 -1
- package/lib/entity/vas-contact.dto.d.ts +7 -0
- package/lib/entity/vas-contact.model.d.ts +11 -1
- package/lib/entity/vas-control-type.model.d.ts +5 -9
- package/lib/entity/vas-control.dto.d.ts +3 -1
- package/lib/entity/vas-control.model.d.ts +11 -37
- package/lib/entity/vas-field.model.d.ts +3 -1
- package/lib/entity/vas-file.model.d.ts +4 -2
- package/lib/entity/vas-fire-user.model.d.ts +6 -1
- package/lib/entity/vas-form.dto.d.ts +1 -0
- package/lib/entity/vas-form.model.d.ts +7 -22
- package/lib/entity/vas-group.model.d.ts +3 -22
- package/lib/entity/vas-instruction-job-field.dto.d.ts +5 -0
- package/lib/entity/vas-instruction-job-field.model.d.ts +22 -0
- package/lib/entity/vas-instruction-job.dto.d.ts +15 -0
- package/lib/entity/vas-instruction-job.model.d.ts +57 -0
- package/lib/entity/vas-instruction-provider.dto.d.ts +8 -0
- package/lib/entity/vas-instruction-provider.model.d.ts +33 -0
- package/lib/entity/vas-instruction.dto.d.ts +5 -0
- package/lib/entity/vas-instruction.model.d.ts +29 -0
- package/lib/entity/vas-invitation.d.ts +36 -3
- package/lib/entity/vas-job-data.model.d.ts +3 -12
- package/lib/entity/vas-job.model.d.ts +8 -37
- package/lib/entity/vas-membership.model.d.ts +3 -1
- package/lib/entity/vas-note.dto.d.ts +6 -0
- package/lib/entity/vas-note.model.d.ts +30 -0
- package/lib/entity/vas-report-layout.model.d.ts +3 -1
- package/lib/entity/vas-report-request.model.d.ts +3 -1
- package/lib/entity/vas-report.model.d.ts +5 -3
- package/lib/entity/vas-restricted-account-object.model.d.ts +3 -1
- package/lib/entity/vas-user.dto.d.ts +3 -0
- package/lib/entity/vas-user.model.d.ts +6 -1
- package/package.json +1 -1
|
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const moment_1 = tslib_1.__importDefault(require("moment/moment"));
|
|
6
6
|
const vas_user_model_1 = require("./vas-user.model");
|
|
7
7
|
class VasFireUserModel extends vas_user_model_1.VasUserModel {
|
|
8
|
-
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', email, username, accounts, tokens, topics, language, displayName) {
|
|
9
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, email, username);
|
|
8
|
+
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', createdByName, modifiedByName, email, name, username, memberships, instructionProviders, accounts, tokens, topics, language, displayName) {
|
|
9
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, email, name, username, memberships, instructionProviders);
|
|
10
10
|
this.id = id;
|
|
11
11
|
this.created = created;
|
|
12
12
|
this.serverCreated = serverCreated;
|
|
@@ -14,8 +14,13 @@ class VasFireUserModel extends vas_user_model_1.VasUserModel {
|
|
|
14
14
|
this.modified = modified;
|
|
15
15
|
this.serverModified = serverModified;
|
|
16
16
|
this.modifiedBy = modifiedBy;
|
|
17
|
+
this.createdByName = createdByName;
|
|
18
|
+
this.modifiedByName = modifiedByName;
|
|
17
19
|
this.email = email;
|
|
20
|
+
this.name = name;
|
|
18
21
|
this.username = username;
|
|
22
|
+
this.memberships = memberships;
|
|
23
|
+
this.instructionProviders = instructionProviders;
|
|
19
24
|
this.accounts = accounts;
|
|
20
25
|
this.tokens = tokens;
|
|
21
26
|
this.topics = topics;
|
|
@@ -23,10 +28,10 @@ class VasFireUserModel extends vas_user_model_1.VasUserModel {
|
|
|
23
28
|
this.displayName = displayName;
|
|
24
29
|
}
|
|
25
30
|
static fromDto(dto) {
|
|
26
|
-
return new VasFireUserModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.email || '', dto.username || '', dto.accounts || {}, dto.tokens || [], dto.topics || [], dto.language || '', dto.displayName || '');
|
|
31
|
+
return new VasFireUserModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.email || '', dto.name || '', dto.username || '', dto.memberships || [], dto.instructionProviders || [], dto.accounts || {}, dto.tokens || [], dto.topics || [], dto.language || '', dto.displayName || '');
|
|
27
32
|
}
|
|
28
33
|
static newUser(uid, displayName, email) {
|
|
29
|
-
return new VasFireUserModel(uid, (0, moment_1.default)().toISOString(), (0, moment_1.default)().toISOString(), uid, (0, moment_1.default)().toISOString(), (0, moment_1.default)().toISOString(), uid, email, email, {}, [], [], '', displayName);
|
|
34
|
+
return new VasFireUserModel(uid, (0, moment_1.default)().toISOString(), (0, moment_1.default)().toISOString(), uid, (0, moment_1.default)().toISOString(), (0, moment_1.default)().toISOString(), uid, '', '', email, displayName, email, [], [], {}, [], [], '', displayName);
|
|
30
35
|
}
|
|
31
36
|
toDto() {
|
|
32
37
|
return {
|
|
@@ -37,8 +42,13 @@ class VasFireUserModel extends vas_user_model_1.VasUserModel {
|
|
|
37
42
|
modified: this.modified,
|
|
38
43
|
serverModified: this.serverModified,
|
|
39
44
|
modifiedBy: this.modifiedBy,
|
|
45
|
+
createdByName: this.createdByName,
|
|
46
|
+
modifiedByName: this.modifiedByName,
|
|
40
47
|
email: this.email,
|
|
48
|
+
name: this.name,
|
|
41
49
|
username: this.username,
|
|
50
|
+
memberships: this.memberships,
|
|
51
|
+
instructionProviders: this.instructionProviders,
|
|
42
52
|
accounts: this.accounts,
|
|
43
53
|
tokens: this.tokens,
|
|
44
54
|
topics: this.topics,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-fire-user.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-fire-user.model.ts"],"names":[],"mappings":";;;;AACA,mEAAmC;AACnC,qDAAgD;AAEhD,MAAa,gBAAiB,SAAQ,6BAAY;IAEhD,YACkB,EAAU,EACV,UAAkB,EAAE,EACpB,gBAAwB,EAAE,EAC1B,YAAoB,EAAE,EACtB,WAAmB,EAAE,EACrB,iBAAyB,EAAE,EAC3B,aAAqB,EAAE,EACvB,KAAa,EACb,QAAgB,
|
|
1
|
+
{"version":3,"file":"vas-fire-user.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-fire-user.model.ts"],"names":[],"mappings":";;;;AACA,mEAAm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D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,WAAW;QACT,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;CACF;AAxKD,4CAwKC","sourcesContent":["import { VasFireUserDto, VasFireUserDtoAccountType } from './vas-fire-user.dto';\nimport moment from 'moment/moment';\nimport { VasUserModel } from './vas-user.model';\n\nexport class VasFireUserModel extends VasUserModel implements VasFireUserDto {\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 override createdByName: string,\n public override modifiedByName: string,\n public override email: string,\n public override name: string,\n public override username: string,\n public override memberships: Array<string>,\n public override instructionProviders: Array<string>,\n public accounts: VasFireUserDtoAccountType,\n public tokens: Array<string>,\n public topics: Array<string>,\n public language: string,\n public displayName: string,\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n email,\n name,\n username,\n memberships,\n instructionProviders\n );\n }\n\n public static override fromDto(dto: VasFireUserDto): VasFireUserModel {\n return new VasFireUserModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.email || '',\n dto.name || '',\n dto.username || '',\n dto.memberships || [],\n dto.instructionProviders || [],\n dto.accounts || {},\n dto.tokens || [],\n dto.topics || [],\n dto.language || '',\n dto.displayName || ''\n );\n }\n\n public static newUser(\n uid: string,\n displayName: string,\n email: string\n ): VasFireUserModel {\n return new VasFireUserModel(\n uid,\n moment().toISOString(),\n moment().toISOString(),\n uid,\n moment().toISOString(),\n moment().toISOString(),\n uid,\n '',\n '',\n email,\n displayName,\n email,\n [],\n [],\n {},\n [],\n [],\n '',\n displayName\n )\n }\n\n public override toDto(): VasFireUserDto {\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 createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n email: this.email,\n name: this.name,\n username: this.username,\n memberships: this.memberships,\n instructionProviders: this.instructionProviders,\n accounts: this.accounts,\n tokens: this.tokens,\n topics: this.topics,\n language: this.language,\n displayName: this.displayName\n };\n }\n\n /**\n * Adds token to tokens list if it is not already present\n * @param token the new token\n */\n addToken(token: string): void {\n if (this.tokens.includes(token)) {\n return;\n }\n this.tokens.push(token);\n }\n\n /**\n * Remove token from tokens list\n * @param token the token to remove\n */\n removeToken(token: string): void {\n this.tokens = this.tokens.filter(t => t !== token);\n }\n\n /**\n * Resets the tokens list\n */\n resetTokens(): void {\n this.tokens = [];\n }\n\n /**\n * Adds topic to topics list if it is not already present\n * @param topic the new token\n */\n addTopic(topic: string): void {\n if (this.topics.includes(topic)) {\n return;\n }\n this.topics.push(topic);\n }\n\n /**\n * Remove topic from topic list\n * @param topic the topic to remove\n */\n removeTopic(topic: string): void {\n this.topics = this.topics.filter(t => t !== topic);\n }\n\n /**\n * Resets the topic list\n */\n resetTopics(): void {\n this.topics = [];\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-form.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,MAAM,WAAW,UAAW,SAAQ,6BAA6B;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"vas-form.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEpF,MAAM,WAAW,UAAW,SAAQ,6BAA6B;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-form.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasGroupDto } from './vas-group.dto';\nimport { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\n\nexport interface VasFormDto extends VasRestrictedAccountObjectDto {\n jobType: string;\n title: string;\n description: string;\n groups: VasGroupDto[];\n dynamicDescriptor: string;\n pipelineName: string;\n indexName: string;\n config: string;\n geoLocationEnabled: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-form.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasGroupDto } from './vas-group.dto';\nimport { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\n\nexport interface VasFormDto extends VasRestrictedAccountObjectDto {\n jobType: string;\n title: string;\n description: string;\n groups: VasGroupDto[];\n dynamicDescriptor: string;\n pipelineName: string;\n indexName: string;\n config: string;\n geoLocationEnabled: boolean;\n filesEnabled: boolean;\n}\n"]}
|
|
@@ -16,6 +16,8 @@ export declare class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
16
16
|
modified: string;
|
|
17
17
|
serverModified: string;
|
|
18
18
|
modifiedBy: string;
|
|
19
|
+
createdByName: string;
|
|
20
|
+
modifiedByName: string;
|
|
19
21
|
account: string;
|
|
20
22
|
accessGroup: string;
|
|
21
23
|
jobType: string;
|
|
@@ -27,27 +29,8 @@ export declare class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
27
29
|
pipelineName: string;
|
|
28
30
|
config: string;
|
|
29
31
|
geoLocationEnabled: boolean;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* @param {string} created
|
|
33
|
-
* @param {string} serverCreated
|
|
34
|
-
* @param {string} createdBy
|
|
35
|
-
* @param {string} modified
|
|
36
|
-
* @param {string} serverModified
|
|
37
|
-
* @param {string} modifiedBy
|
|
38
|
-
* @param {string} account
|
|
39
|
-
* @param {string} accessGroup
|
|
40
|
-
* @param {string} jobType
|
|
41
|
-
* @param {string} title
|
|
42
|
-
* @param {string} description
|
|
43
|
-
* @param {VasGroupModel[]} groups
|
|
44
|
-
* @param {string} dynamicDescriptor
|
|
45
|
-
* @param {string} indexName
|
|
46
|
-
* @param {string} pipelineName
|
|
47
|
-
* @param {string} config
|
|
48
|
-
* @param {boolean} geoLocationEnabled
|
|
49
|
-
*/
|
|
50
|
-
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, account: string, accessGroup: string, jobType: string, title: string, description: string, groups: VasGroupModel[], dynamicDescriptor: string, indexName: string, pipelineName: string, config: string, geoLocationEnabled: boolean);
|
|
32
|
+
filesEnabled: boolean;
|
|
33
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, accessGroup: string, jobType: string, title: string, description: string, groups: VasGroupModel[], dynamicDescriptor: string, indexName: string, pipelineName: string, config: string, geoLocationEnabled: boolean, filesEnabled: boolean);
|
|
51
34
|
/**
|
|
52
35
|
* Returns the name of this form in a "safe" way, i.e. no spaces, special
|
|
53
36
|
* characters
|
|
@@ -62,14 +45,16 @@ export declare class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
62
45
|
* @param {VasFormDto} formDto
|
|
63
46
|
* @param {Array<VasControlTypeDto>} controlTypeDtos
|
|
64
47
|
* @return {VasFormModel}
|
|
48
|
+
* @deprecated vas-rest has been updated to inline control types into the
|
|
49
|
+
* control so this method is no longer required. use VasFormModel.fromDto()
|
|
65
50
|
*/
|
|
66
51
|
static fromApiResponse(formDto: VasFormDto, controlTypeDtos: Array<VasControlTypeDto>): VasFormModel;
|
|
52
|
+
static empty(): VasFormModel;
|
|
67
53
|
/**
|
|
68
54
|
* @param {VasFormDto} dto
|
|
69
55
|
* @return {VasFormModel}
|
|
70
56
|
*/
|
|
71
57
|
static fromDto(dto: Partial<VasFormDto>): VasFormModel;
|
|
72
|
-
addControlTypesToControl(controlTypes: Array<VasControlTypeDto>): void;
|
|
73
58
|
/**
|
|
74
59
|
* @param {string} id
|
|
75
60
|
* @return {VasControlModel | undefined}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-form.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"vas-form.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C;;GAEG;AACH,qBAAa,YAAa,SAAQ,+BAA+B;IAG7C,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;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,MAAM;IAC5B,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,aAAa,EAAE;IACvB,iBAAiB,EAAE,MAAM;IACzB,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,MAAM;IACd,kBAAkB,EAAE,OAAO;IAC3B,YAAY,EAAE,OAAO;gBApBZ,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,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,EAAE,EACvB,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,OAAO,EAC3B,YAAY,EAAE,OAAO;IAiB9B;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAKtB;IAGD;;;;;;;;;;OAUG;WACW,eAAe,CAC3B,OAAO,EAAE,UAAU,EACnB,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,GACxC,YAAY;WAsBD,KAAK,IAAI,YAAY;IAInC;;;OAGG;WACW,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,YAAY;IA4B7D;;;OAGG;IACH,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAc7D;;;;OAIG;IACH,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAcjE;;;OAGG;IACH,qBAAqB,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAa7C;;;OAGG;IACH,oBAAoB,CAClB,QAAQ,EAAE,WAAW,GACpB,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAAA;KAAE,CAAC;IAe7D;;OAEG;IACH,KAAK,IAAI,UAAU;CAyBpB"}
|
|
@@ -2,34 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VasFormModel = void 0;
|
|
4
4
|
const vas_restricted_account_object_model_1 = require("./vas-restricted-account-object.model");
|
|
5
|
-
const vas_control_type_model_1 = require("./vas-control-type.model");
|
|
6
5
|
const vas_group_model_1 = require("./vas-group.model");
|
|
6
|
+
const vas_control_type_model_1 = require("./vas-control-type.model");
|
|
7
7
|
/**
|
|
8
8
|
* VasFormModel
|
|
9
9
|
*/
|
|
10
10
|
class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAccountObjectModel {
|
|
11
|
-
|
|
12
|
-
|
|
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} jobType
|
|
22
|
-
* @param {string} title
|
|
23
|
-
* @param {string} description
|
|
24
|
-
* @param {VasGroupModel[]} groups
|
|
25
|
-
* @param {string} dynamicDescriptor
|
|
26
|
-
* @param {string} indexName
|
|
27
|
-
* @param {string} pipelineName
|
|
28
|
-
* @param {string} config
|
|
29
|
-
* @param {boolean} geoLocationEnabled
|
|
30
|
-
*/
|
|
31
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, jobType, title, description, groups, dynamicDescriptor, indexName, pipelineName, config, geoLocationEnabled) {
|
|
32
|
-
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
11
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, jobType, title, description, groups, dynamicDescriptor, indexName, pipelineName, config, geoLocationEnabled, filesEnabled) {
|
|
12
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup);
|
|
33
13
|
this.id = id;
|
|
34
14
|
this.created = created;
|
|
35
15
|
this.serverCreated = serverCreated;
|
|
@@ -37,6 +17,8 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
37
17
|
this.modified = modified;
|
|
38
18
|
this.serverModified = serverModified;
|
|
39
19
|
this.modifiedBy = modifiedBy;
|
|
20
|
+
this.createdByName = createdByName;
|
|
21
|
+
this.modifiedByName = modifiedByName;
|
|
40
22
|
this.account = account;
|
|
41
23
|
this.accessGroup = accessGroup;
|
|
42
24
|
this.jobType = jobType;
|
|
@@ -48,6 +30,7 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
48
30
|
this.pipelineName = pipelineName;
|
|
49
31
|
this.config = config;
|
|
50
32
|
this.geoLocationEnabled = geoLocationEnabled;
|
|
33
|
+
this.filesEnabled = filesEnabled;
|
|
51
34
|
}
|
|
52
35
|
/**
|
|
53
36
|
* Returns the name of this form in a "safe" way, i.e. no spaces, special
|
|
@@ -68,6 +51,8 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
68
51
|
* @param {VasFormDto} formDto
|
|
69
52
|
* @param {Array<VasControlTypeDto>} controlTypeDtos
|
|
70
53
|
* @return {VasFormModel}
|
|
54
|
+
* @deprecated vas-rest has been updated to inline control types into the
|
|
55
|
+
* control so this method is no longer required. use VasFormModel.fromDto()
|
|
71
56
|
*/
|
|
72
57
|
static fromApiResponse(formDto, controlTypeDtos) {
|
|
73
58
|
const controlTypeModels = controlTypeDtos
|
|
@@ -77,32 +62,30 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
77
62
|
.forEach(group => {
|
|
78
63
|
group.controls
|
|
79
64
|
.forEach(control => {
|
|
80
|
-
|
|
81
|
-
|
|
65
|
+
// Note that we are forcing types here. This is because we have
|
|
66
|
+
// updated the typings for ControlModel and ControlDto to reflect
|
|
67
|
+
// the fact that VASREST is updating the response from certain
|
|
68
|
+
// controllers to inline ControlType into the Control. Consumers of
|
|
69
|
+
// the library will know what version of the API they are consuming
|
|
70
|
+
// so can decide when to migrate away from fromApiResponse, and can
|
|
71
|
+
// use fromDto instead
|
|
72
|
+
control.controlType = controlTypeModels
|
|
73
|
+
.find(ct => ct.id === (control.controlTypeId));
|
|
82
74
|
});
|
|
83
75
|
});
|
|
84
76
|
return formModel;
|
|
85
77
|
}
|
|
78
|
+
static empty() {
|
|
79
|
+
return VasFormModel.fromDto({});
|
|
80
|
+
}
|
|
86
81
|
/**
|
|
87
82
|
* @param {VasFormDto} dto
|
|
88
83
|
* @return {VasFormModel}
|
|
89
84
|
*/
|
|
90
85
|
static fromDto(dto) {
|
|
91
|
-
return new VasFormModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.jobType || '', dto.title || '', dto.description || '', (dto.groups || [])
|
|
86
|
+
return new VasFormModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.accessGroup || '', dto.jobType || '', dto.title || '', dto.description || '', (dto.groups || [])
|
|
92
87
|
.sort((a, b) => a.sequence - b.sequence)
|
|
93
|
-
.map(g => vas_group_model_1.VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config || '', dto.geoLocationEnabled || false);
|
|
94
|
-
}
|
|
95
|
-
addControlTypesToControl(controlTypes) {
|
|
96
|
-
const controlTypeModels = controlTypes
|
|
97
|
-
.map(ct => vas_control_type_model_1.VasControlTypeModel.fromDto(ct));
|
|
98
|
-
this.groups
|
|
99
|
-
.forEach(group => {
|
|
100
|
-
group.controls
|
|
101
|
-
.forEach(control => {
|
|
102
|
-
control.controlTypeModel = controlTypeModels
|
|
103
|
-
.find(ctm => ctm.id === control.controlType);
|
|
104
|
-
});
|
|
105
|
-
});
|
|
88
|
+
.map(g => vas_group_model_1.VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config || '', dto.geoLocationEnabled || false, dto.filesEnabled || false);
|
|
106
89
|
}
|
|
107
90
|
/**
|
|
108
91
|
* @param {string} id
|
|
@@ -147,8 +130,7 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
147
130
|
const paths = [];
|
|
148
131
|
this.groups.forEach(group => {
|
|
149
132
|
group.controls.forEach(control => {
|
|
150
|
-
|
|
151
|
-
if (((_a = control.controlTypeModel) === null || _a === void 0 ? void 0 : _a.name) !== 'camera') {
|
|
133
|
+
if (control.controlTypeName !== 'camera') {
|
|
152
134
|
return;
|
|
153
135
|
}
|
|
154
136
|
paths.push([group.name, control.safeName]);
|
|
@@ -186,6 +168,8 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
186
168
|
modified: this.modified,
|
|
187
169
|
serverModified: this.serverModified,
|
|
188
170
|
modifiedBy: this.modifiedBy,
|
|
171
|
+
createdByName: this.createdByName,
|
|
172
|
+
modifiedByName: this.modifiedByName,
|
|
189
173
|
account: this.account,
|
|
190
174
|
accessGroup: this.accessGroup,
|
|
191
175
|
jobType: this.jobType,
|
|
@@ -196,7 +180,8 @@ class VasFormModel extends vas_restricted_account_object_model_1.VasRestrictedAc
|
|
|
196
180
|
indexName: this.indexName,
|
|
197
181
|
pipelineName: this.pipelineName,
|
|
198
182
|
config: this.config,
|
|
199
|
-
geoLocationEnabled: this.geoLocationEnabled
|
|
183
|
+
geoLocationEnabled: this.geoLocationEnabled,
|
|
184
|
+
filesEnabled: this.filesEnabled
|
|
200
185
|
};
|
|
201
186
|
}
|
|
202
187
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-form.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.model.ts"],"names":[],"mappings":";;;AAAA,+FAAwF;AAExF,qEAA+D;AAI/D,uDAAkD;AAGlD;;GAEG;AACH,MAAa,YAAa,SAAQ,qEAA+B;IAC/D;;;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ACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAC/C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;SAC5C,CAAC;IACJ,CAAC;CACF;AA5OD,oCA4OC","sourcesContent":["import { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { VasControlTypeDto } from './vas-control-type.dto';\nimport { VasControlTypeModel } from './vas-control-type.model';\nimport { VasControlModel } from './vas-control.model';\nimport { VasFieldDtoValue } from './vas-field.dto';\nimport { VasFormDto } from './vas-form.dto';\nimport { VasGroupModel } from './vas-group.model';\nimport { VasJobModel } from './vas-job.model';\n\n/**\n * VasFormModel\n */\nexport class VasFormModel extends VasRestrictedAccountObjectModel {\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} jobType\n * @param {string} title\n * @param {string} description\n * @param {VasGroupModel[]} groups\n * @param {string} dynamicDescriptor\n * @param {string} indexName\n * @param {string} pipelineName\n * @param {string} config\n * @param {boolean} geoLocationEnabled\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 override account: string,\n public override accessGroup: string,\n public jobType: string,\n public title: string,\n public description: string,\n public groups: VasGroupModel[],\n public dynamicDescriptor: string,\n public indexName: string,\n public pipelineName: string,\n public config: string,\n public geoLocationEnabled: boolean\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n account,\n accessGroup\n );\n }\n\n /**\n * Returns the name of this form in a \"safe\" way, i.e. no spaces, special\n * characters\n * @return {string}\n */\n get safeTitle(): string {\n return this.title\n .replace(/[^a-z0-9]/gi, '-')\n .replace(/-+/g, '-')\n .toLowerCase();\n }\n\n\n /**\n * The VAS API response for Form will inline Group and Control but not\n * ControlType. This method is a help which will allows us to construct an\n * instance of VasFormModel with the ControlType model set appropriately into\n * each VasControlModel\n * @param {VasFormDto} formDto\n * @param {Array<VasControlTypeDto>} controlTypeDtos\n * @return {VasFormModel}\n */\n public static fromApiResponse(\n formDto: VasFormDto,\n controlTypeDtos: Array<VasControlTypeDto>\n ): VasFormModel {\n const controlTypeModels = controlTypeDtos\n .map(ctDto => VasControlTypeModel.fromDto(ctDto));\n const formModel = VasFormModel.fromDto(formDto);\n formModel.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n control.controlTypeModel = controlTypeModels\n .find(ct => ct.id === control.controlType);\n });\n });\n return formModel;\n }\n\n /**\n * @param {VasFormDto} dto\n * @return {VasFormModel}\n */\n public static fromDto(dto: Partial<VasFormDto>): VasFormModel {\n return new VasFormModel(\n dto.id || '',\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.jobType || '',\n dto.title || '',\n dto.description || '',\n (dto.groups || [])\n .sort((a, b) => a.sequence - b.sequence)\n .map(g => VasGroupModel.fromDto(g)),\n dto.dynamicDescriptor || '',\n dto.indexName || '',\n dto.pipelineName || '',\n dto.config || '',\n dto.geoLocationEnabled || false\n );\n }\n\n addControlTypesToControl(controlTypes: Array<VasControlTypeDto>): void {\n const controlTypeModels = controlTypes\n .map(ct => VasControlTypeModel.fromDto(ct))\n this.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n control.controlTypeModel = controlTypeModels\n .find(ctm => ctm.id === control.controlType)\n });\n });\n }\n\n /**\n * @param {string} id\n * @return {VasControlModel | undefined}\n */\n findControlModelById(id: string): VasControlModel | undefined {\n let result;\n this.groups\n .find(group => group.controls\n .find(control => {\n if (control.id !== id) {\n return;\n }\n result = control;\n return true;\n }));\n return result;\n }\n\n /**\n *\n * @param {string} name\n * @return {VasControlModel | undefined}\n */\n findControlModelByName(name: string): VasControlModel | undefined {\n let result;\n this.groups\n .find(group => group.controls\n .find(control => {\n if (control.name !== name) {\n return;\n }\n result = control;\n return true;\n }));\n return result;\n }\n\n /**\n *\n * @return {Array<Array<string>>}\n */\n getCameraControlPaths(): Array<Array<string>> {\n const paths: string[][] = [];\n this.groups.forEach(group => {\n group.controls.forEach(control => {\n if (control.controlTypeModel?.name !== 'camera') {\n return;\n }\n paths.push([group.name, control.safeName]);\n });\n });\n return paths;\n }\n\n /**\n * @param {VasJobModel} jobModel\n * @return {Array<{id: string, value: VasFieldDtoValue}>}\n */\n getValuesByControlId(\n jobModel: VasJobModel\n ): Array<{id: string, value: VasFieldDtoValue | undefined}> {\n const items: Array<{id: string, value: VasFieldDtoValue | undefined}> = [];\n this.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n items.push({\n id: control.id,\n value: jobModel.getValueByPath([group.name, control.safeName])\n });\n });\n });\n return items;\n }\n\n /**\n * @return {VasFormDto}\n */\n toDto(): VasFormDto {\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 jobType: this.jobType,\n title: this.title,\n description: this.description,\n groups: this.groups.map(group => group.toDto()),\n dynamicDescriptor: this.dynamicDescriptor,\n indexName: this.indexName,\n pipelineName: this.pipelineName,\n config: this.config,\n geoLocationEnabled: this.geoLocationEnabled\n };\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"vas-form.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-form.model.ts"],"names":[],"mappings":";;;AAAA,+FAAwF;AAKxF,uDAAkD;AAElD,qEAA+D;AAE/D;;GAEG;AACH,MAAa,YAAa,SAAQ,qEAA+B;IAE/D,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,WAAmB,EAC5B,OAAe,EACf,KAAa,EACb,WAAmB,EACnB,MAAuB,EACvB,iBAAyB,EACzB,SAAiB,EACjB,YAAoB,EACpB,MAAc,EACd,kBAA2B,EAC3B,YAAqB;QAE5B,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,WAAW,CACZ,CAAC;QAlCc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAQ;QACrB,mBAAc,GAAd,cAAc,CAAQ;QACtB,YAAO,GAAP,OAAO,CAAQ;QACf,gBAAW,GAA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E,IAAI,CAAC,YAAY;SAChC,CAAC;IACJ,CAAC;CACF;AApOD,oCAoOC","sourcesContent":["import { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { VasControlTypeDto } from './vas-control-type.dto';\nimport { VasControlModel } from './vas-control.model';\nimport { VasFieldDtoValue } from './vas-field.dto';\nimport { VasFormDto } from './vas-form.dto';\nimport { VasGroupModel } from './vas-group.model';\nimport { VasJobModel } from './vas-job.model';\nimport { VasControlTypeModel } from './vas-control-type.model';\n\n/**\n * VasFormModel\n */\nexport class VasFormModel extends VasRestrictedAccountObjectModel {\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 override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override accessGroup: string,\n public jobType: string,\n public title: string,\n public description: string,\n public groups: VasGroupModel[],\n public dynamicDescriptor: string,\n public indexName: string,\n public pipelineName: string,\n public config: string,\n public geoLocationEnabled: boolean,\n public filesEnabled: boolean\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n accessGroup\n );\n }\n\n /**\n * Returns the name of this form in a \"safe\" way, i.e. no spaces, special\n * characters\n * @return {string}\n */\n get safeTitle(): string {\n return this.title\n .replace(/[^a-z0-9]/gi, '-')\n .replace(/-+/g, '-')\n .toLowerCase();\n }\n\n\n /**\n * The VAS API response for Form will inline Group and Control but not\n * ControlType. This method is a help which will allows us to construct an\n * instance of VasFormModel with the ControlType model set appropriately into\n * each VasControlModel\n * @param {VasFormDto} formDto\n * @param {Array<VasControlTypeDto>} controlTypeDtos\n * @return {VasFormModel}\n * @deprecated vas-rest has been updated to inline control types into the\n * control so this method is no longer required. use VasFormModel.fromDto()\n */\n public static fromApiResponse(\n formDto: VasFormDto,\n controlTypeDtos: Array<VasControlTypeDto>\n ): VasFormModel {\n const controlTypeModels = controlTypeDtos\n .map(ctDto => VasControlTypeModel.fromDto(ctDto));\n const formModel = VasFormModel.fromDto(formDto);\n formModel.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n // Note that we are forcing types here. This is because we have\n // updated the typings for ControlModel and ControlDto to reflect\n // the fact that VASREST is updating the response from certain\n // controllers to inline ControlType into the Control. Consumers of\n // the library will know what version of the API they are consuming\n // so can decide when to migrate away from fromApiResponse, and can\n // use fromDto instead\n (control.controlType as any) = controlTypeModels\n .find(ct => ct.id === ((control as any).controlTypeId));\n });\n });\n return formModel;\n }\n\n public static empty(): VasFormModel {\n return VasFormModel.fromDto({});\n }\n\n /**\n * @param {VasFormDto} dto\n * @return {VasFormModel}\n */\n public static fromDto(dto: Partial<VasFormDto>): VasFormModel {\n return new VasFormModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.jobType || '',\n dto.title || '',\n dto.description || '',\n (dto.groups || [])\n .sort((a, b) => a.sequence - b.sequence)\n .map(g => VasGroupModel.fromDto(g)),\n dto.dynamicDescriptor || '',\n dto.indexName || '',\n dto.pipelineName || '',\n dto.config || '',\n dto.geoLocationEnabled || false,\n dto.filesEnabled || false\n );\n }\n\n /**\n * @param {string} id\n * @return {VasControlModel | undefined}\n */\n findControlModelById(id: string): VasControlModel | undefined {\n let result;\n this.groups\n .find(group => group.controls\n .find(control => {\n if (control.id !== id) {\n return;\n }\n result = control;\n return true;\n }));\n return result;\n }\n\n /**\n *\n * @param {string} name\n * @return {VasControlModel | undefined}\n */\n findControlModelByName(name: string): VasControlModel | undefined {\n let result;\n this.groups\n .find(group => group.controls\n .find(control => {\n if (control.name !== name) {\n return;\n }\n result = control;\n return true;\n }));\n return result;\n }\n\n /**\n *\n * @return {Array<Array<string>>}\n */\n getCameraControlPaths(): Array<Array<string>> {\n const paths: string[][] = [];\n this.groups.forEach(group => {\n group.controls.forEach(control => {\n if (control.controlTypeName !== 'camera') {\n return;\n }\n paths.push([group.name, control.safeName]);\n });\n });\n return paths;\n }\n\n /**\n * @param {VasJobModel} jobModel\n * @return {Array<{id: string, value: VasFieldDtoValue}>}\n */\n getValuesByControlId(\n jobModel: VasJobModel\n ): Array<{ id: string, value: VasFieldDtoValue | undefined }> {\n const items: Array<{ id: string, value: VasFieldDtoValue | undefined }> = [];\n this.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n items.push({\n id: control.id,\n value: jobModel.getValueByPath([group.name, control.safeName])\n });\n });\n });\n return items;\n }\n\n /**\n * @return {VasFormDto}\n */\n toDto(): VasFormDto {\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 createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n accessGroup: this.accessGroup,\n jobType: this.jobType,\n title: this.title,\n description: this.description,\n groups: this.groups.map(group => group.toDto()),\n dynamicDescriptor: this.dynamicDescriptor,\n indexName: this.indexName,\n pipelineName: this.pipelineName,\n config: this.config,\n geoLocationEnabled: this.geoLocationEnabled,\n filesEnabled: this.filesEnabled\n };\n }\n}\n\n"]}
|
|
@@ -13,6 +13,8 @@ export declare class VasGroupModel extends VasBaseModel {
|
|
|
13
13
|
modified: string;
|
|
14
14
|
serverModified: string;
|
|
15
15
|
modifiedBy: string;
|
|
16
|
+
createdByName: string;
|
|
17
|
+
modifiedByName: string;
|
|
16
18
|
account: string;
|
|
17
19
|
accessGroup: string;
|
|
18
20
|
name: string;
|
|
@@ -25,28 +27,7 @@ export declare class VasGroupModel extends VasBaseModel {
|
|
|
25
27
|
visibleIfEquals: string;
|
|
26
28
|
controls: VasControlModel[];
|
|
27
29
|
scoreWeight: number;
|
|
28
|
-
|
|
29
|
-
* @param {string} id
|
|
30
|
-
* @param {string} created
|
|
31
|
-
* @param {string} serverCreated
|
|
32
|
-
* @param {string} createdBy
|
|
33
|
-
* @param {string} modified
|
|
34
|
-
* @param {string} serverModified
|
|
35
|
-
* @param {string} modifiedBy
|
|
36
|
-
* @param {string} account
|
|
37
|
-
* @param {string} accessGroup
|
|
38
|
-
* @param {string} name
|
|
39
|
-
* @param {string} title
|
|
40
|
-
* @param {string} description
|
|
41
|
-
* @param {number} sequence
|
|
42
|
-
* @param {boolean} includeInSummary
|
|
43
|
-
* @param {string[]} forms
|
|
44
|
-
* @param {string} visibilityControl
|
|
45
|
-
* @param {string} visibleIfEquals
|
|
46
|
-
* @param {VasControlModel[]} controls
|
|
47
|
-
* @param {number} scoreWeight
|
|
48
|
-
*/
|
|
49
|
-
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, account: string, accessGroup: string, name: string, title: string, description: string, sequence: number, includeInSummary: boolean, forms: string[], visibilityControl: string, visibleIfEquals: string, controls: VasControlModel[], scoreWeight: number);
|
|
30
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, accessGroup: string, name: string, title: string, description: string, sequence: number, includeInSummary: boolean, forms: string[], visibilityControl: string, visibleIfEquals: string, controls: VasControlModel[], scoreWeight: number);
|
|
50
31
|
/**
|
|
51
32
|
* @param {VasGroupDto} dto
|
|
52
33
|
* @return {VasGroupModel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-group.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-group.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"vas-group.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-group.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;GAEG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAG3B,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;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IAC/B,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,MAAM;IAChB,gBAAgB,EAAE,OAAO;IACzB,KAAK,EAAE,MAAM,EAAE;IACf,iBAAiB,EAAE,MAAM;IACzB,eAAe,EAAE,MAAM;IACvB,QAAQ,EAAE,eAAe,EAAE;IAC3B,WAAW,EAAE,MAAM;gBApBV,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,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EAC/B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,OAAO,EACzB,KAAK,EAAE,MAAM,EAAE,EACf,iBAAiB,EAAE,MAAM,EACzB,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,eAAe,EAAE,EAC3B,WAAW,EAAE,MAAM;IAe5B;;;OAGG;WACW,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,aAAa;IA8B/D;;;OAGG;IACH,SAAS,CACP,iBAAiB,EAAE,KAAK,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAAA;KAAC,CAAC,GAC1E,OAAO;IAgBV;;OAEG;IACH,KAAK,IAAI,WAAW;CAyBrB"}
|
|
@@ -8,29 +8,8 @@ const angular2_uuid_1 = require("angular2-uuid");
|
|
|
8
8
|
* GroupModel
|
|
9
9
|
*/
|
|
10
10
|
class VasGroupModel extends vas_base_model_1.VasBaseModel {
|
|
11
|
-
|
|
12
|
-
|
|
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);
|
|
11
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, accessGroup, name, title, description, sequence, includeInSummary, forms, visibilityControl, visibleIfEquals, controls, scoreWeight) {
|
|
12
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
34
13
|
this.id = id;
|
|
35
14
|
this.created = created;
|
|
36
15
|
this.serverCreated = serverCreated;
|
|
@@ -38,6 +17,8 @@ class VasGroupModel extends vas_base_model_1.VasBaseModel {
|
|
|
38
17
|
this.modified = modified;
|
|
39
18
|
this.serverModified = serverModified;
|
|
40
19
|
this.modifiedBy = modifiedBy;
|
|
20
|
+
this.createdByName = createdByName;
|
|
21
|
+
this.modifiedByName = modifiedByName;
|
|
41
22
|
this.account = account;
|
|
42
23
|
this.accessGroup = accessGroup;
|
|
43
24
|
this.name = name;
|
|
@@ -58,7 +39,7 @@ class VasGroupModel extends vas_base_model_1.VasBaseModel {
|
|
|
58
39
|
static fromDto(dto) {
|
|
59
40
|
return new VasGroupModel(
|
|
60
41
|
// 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 || [])
|
|
42
|
+
dto.id || angular2_uuid_1.UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', 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
43
|
.filter(control => control.name.startsWith('fields.'))
|
|
63
44
|
.sort((a, b) => a.sequence - b.sequence)
|
|
64
45
|
.map(c => vas_control_model_1.VasControlModel.fromDto(c)), dto.scoreWeight || 1);
|
|
@@ -91,6 +72,8 @@ class VasGroupModel extends vas_base_model_1.VasBaseModel {
|
|
|
91
72
|
modified: this.modified,
|
|
92
73
|
serverModified: this.serverModified,
|
|
93
74
|
modifiedBy: this.modifiedBy,
|
|
75
|
+
createdByName: this.createdByName,
|
|
76
|
+
modifiedByName: this.modifiedByName,
|
|
94
77
|
account: this.account,
|
|
95
78
|
accessGroup: this.accessGroup,
|
|
96
79
|
name: this.name,
|
|
@@ -1 +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;
|
|
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;IAE7C,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EAC/B,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,EACV,aA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KAAK;QACH,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;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;AA1HD,sCA0HC","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 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 override createdByName: string,\n public override modifiedByName: 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 createdByName,\n modifiedByName,\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.createdByName || '',\n dto.modifiedByName || '',\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 .filter(control => control.name.startsWith('fields.'))\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 createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\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-instruction-job-field.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-instruction-job-field.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,yBAA0B,SAAQ,UAAU;IAC3D,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-instruction-job-field.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-instruction-job-field.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasBaseDto } from './vas-base.dto';\n\nexport interface VasInstructionJobFieldDto extends VasBaseDto {\n value: string\n name: string\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VasBaseModel } from './vas-base.model';
|
|
2
|
+
import { VasInstructionJobFieldDto } from './vas-instruction-job-field.dto';
|
|
3
|
+
/**
|
|
4
|
+
* VasInstructionJobFieldModel
|
|
5
|
+
*/
|
|
6
|
+
export declare class VasInstructionJobFieldModel extends VasBaseModel {
|
|
7
|
+
id: string;
|
|
8
|
+
created: string;
|
|
9
|
+
serverCreated: string;
|
|
10
|
+
createdBy: string;
|
|
11
|
+
modified: string;
|
|
12
|
+
serverModified: string;
|
|
13
|
+
modifiedBy: string;
|
|
14
|
+
createdByName: string;
|
|
15
|
+
modifiedByName: string;
|
|
16
|
+
value: string;
|
|
17
|
+
name: string;
|
|
18
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, value: string, name: string);
|
|
19
|
+
static empty(): VasInstructionJobFieldModel;
|
|
20
|
+
static fromDto(dto: Partial<VasInstructionJobFieldDto>): VasInstructionJobFieldModel;
|
|
21
|
+
toDto(): VasInstructionJobFieldDto;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=vas-instruction-job-field.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-instruction-job-field.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-instruction-job-field.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,YAAY;IAGzC,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;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IAC/B,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM;gBAVH,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,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EAC/B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM;IAerB,MAAM,CAAC,KAAK,IAAI,2BAA2B;IAgB3C,MAAM,CAAC,OAAO,CACZ,GAAG,EAAE,OAAO,CAAC,yBAAyB,CAAC,GACtC,2BAA2B;IAgB9B,KAAK,IAAI,yBAAyB;CAenC"}
|