@ironcode/vas-lib 0.0.19 → 0.0.21
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 +3 -0
- package/cjs/lib/entity/index.d.ts.map +1 -1
- package/cjs/lib/entity/index.js +3 -0
- package/cjs/lib/entity/index.js.map +1 -1
- package/cjs/lib/entity/vas-control.dto.d.ts +1 -0
- 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 +3 -1
- package/cjs/lib/entity/vas-control.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-control.model.js +6 -3
- package/cjs/lib/entity/vas-control.model.js.map +1 -1
- package/cjs/lib/entity/vas-fire-user.dto.d.ts +10 -0
- package/cjs/lib/entity/vas-fire-user.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-fire-user.dto.js +3 -0
- package/cjs/lib/entity/vas-fire-user.dto.js.map +1 -0
- package/cjs/lib/entity/vas-fire-user.model.d.ts +19 -0
- package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-fire-user.model.js +43 -0
- package/cjs/lib/entity/vas-fire-user.model.js.map +1 -0
- package/cjs/lib/entity/vas-job.dto.d.ts +2 -0
- package/cjs/lib/entity/vas-job.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.dto.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.d.ts +3 -1
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +8 -4
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.spec-data.js +1 -0
- package/cjs/lib/entity/vas-job.model.spec-data.js.map +1 -1
- package/cjs/lib/entity/vas-membership.model.d.ts +28 -0
- package/cjs/lib/entity/vas-membership.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-membership.model.js +62 -0
- package/cjs/lib/entity/vas-membership.model.js.map +1 -0
- package/cjs/lib/entity/vas-user.dto.d.ts +1 -1
- 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 +2 -3
- package/cjs/lib/entity/vas-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-user.model.js +0 -15
- package/cjs/lib/entity/vas-user.model.js.map +1 -1
- package/esm2020/lib/entity/index.mjs +4 -1
- package/esm2020/lib/entity/vas-control.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-control.model.mjs +7 -4
- package/esm2020/lib/entity/vas-fire-user.dto.mjs +2 -0
- package/esm2020/lib/entity/vas-fire-user.model.mjs +38 -0
- package/esm2020/lib/entity/vas-job.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-job.model.mjs +9 -5
- package/esm2020/lib/entity/vas-membership.model.mjs +58 -0
- package/esm2020/lib/entity/vas-user.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-user.model.mjs +1 -15
- package/fesm2015/ironcode-vas-lib.mjs +142 -55
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
- package/fesm2020/ironcode-vas-lib.mjs +142 -55
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/index.d.ts +3 -0
- package/lib/entity/vas-control.dto.d.ts +1 -0
- package/lib/entity/vas-control.model.d.ts +3 -1
- package/lib/entity/vas-fire-user.dto.d.ts +9 -0
- package/lib/entity/vas-fire-user.model.d.ts +18 -0
- package/lib/entity/vas-job.dto.d.ts +2 -0
- package/lib/entity/vas-job.model.d.ts +3 -1
- package/lib/entity/vas-membership.model.d.ts +27 -0
- package/lib/entity/vas-user.dto.d.ts +1 -1
- package/lib/entity/vas-user.model.d.ts +2 -3
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './vas-fire-user.dto';
|
|
2
|
+
export * from './vas-fire-user.model';
|
|
1
3
|
export * from './vas-access-group.dto';
|
|
2
4
|
export * from './vas-account.dto';
|
|
3
5
|
export * from './vas-account-object.dto';
|
|
@@ -30,6 +32,7 @@ export * from './vas-job-type.dto';
|
|
|
30
32
|
export * from './vas-lookup.dto';
|
|
31
33
|
export * from './vas-lookup-type.dto';
|
|
32
34
|
export * from './vas-membership.dto';
|
|
35
|
+
export * from './vas-membership.model';
|
|
33
36
|
export * from './vas-report-layout.dto';
|
|
34
37
|
export * from './vas-report-layout.model';
|
|
35
38
|
export * from './vas-report-request.dto';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
|
package/cjs/lib/entity/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./vas-fire-user.dto"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./vas-fire-user.model"), exports);
|
|
4
6
|
tslib_1.__exportStar(require("./vas-access-group.dto"), exports);
|
|
5
7
|
tslib_1.__exportStar(require("./vas-account.dto"), exports);
|
|
6
8
|
tslib_1.__exportStar(require("./vas-account-object.dto"), exports);
|
|
@@ -33,6 +35,7 @@ tslib_1.__exportStar(require("./vas-job-type.dto"), exports);
|
|
|
33
35
|
tslib_1.__exportStar(require("./vas-lookup.dto"), exports);
|
|
34
36
|
tslib_1.__exportStar(require("./vas-lookup-type.dto"), exports);
|
|
35
37
|
tslib_1.__exportStar(require("./vas-membership.dto"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./vas-membership.model"), exports);
|
|
36
39
|
tslib_1.__exportStar(require("./vas-report-layout.dto"), exports);
|
|
37
40
|
tslib_1.__exportStar(require("./vas-report-layout.model"), exports);
|
|
38
41
|
tslib_1.__exportStar(require("./vas-report-request.dto"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC;AACvC,4DAAkC;AAClC,mEAAyC;AACzC,qEAA2C;AAC3C,yDAA+B;AAC/B,2DAAiC;AACjC,2DAAiC;AACjC,6DAAmC;AACnC,4DAAkC;AAClC,8DAAoC;AACpC,iEAAuC;AACvC,4DAAkC;AAClC,8DAAoC;AACpC,iEAAuC;AACvC,mEAAyC;AACzC,0DAAgC;AAChC,4DAAkC;AAClC,yDAA+B;AAC/B,2DAAiC;AACjC,yDAA+B;AAC/B,2DAAiC;AACjC,0DAAgC;AAChC,4DAAkC;AAClC,6DAAmC;AACnC,+DAAqC;AACrC,wDAA8B;AAC9B,0DAAgC;AAChC,+DAAqC;AACrC,6DAAmC;AACnC,2DAAiC;AACjC,gEAAsC;AACtC,+DAAqC;AACrC,kEAAwC;AACxC,oEAA0C;AAC1C,mEAAyC;AACzC,qEAA2C;AAC3C,8EAAoD;AACpD,gFAAsD;AACtD,8DAAoC;AACpC,yDAA+B;AAC/B,2DAAiC;AACjC,gEAAsC;AACtC,mEAAyC","sourcesContent":["export * from './vas-access-group.dto';\nexport * from './vas-account.dto';\nexport * from './vas-account-object.dto';\nexport * from './vas-account-object.model';\nexport * from './vas-base.dto';\nexport * from './vas-base.model';\nexport * from './vas-branch.dto';\nexport * from './vas-branch.model';\nexport * from './vas-contact.dto';\nexport * from './vas-contact.model';\nexport * from './vas-contact-type.dto';\nexport * from './vas-control.dto';\nexport * from './vas-control.model';\nexport * from './vas-control-type.dto';\nexport * from './vas-control-type.model';\nexport * from './vas-field.dto';\nexport * from './vas-field.model';\nexport * from './vas-file.dto';\nexport * from './vas-file.model';\nexport * from './vas-form.dto';\nexport * from './vas-form.model';\nexport * from './vas-group.dto';\nexport * from './vas-group.model';\nexport * from './vas-job-data.dto';\nexport * from './vas-job-data.model';\nexport * from './vas-job.dto';\nexport * from './vas-job.model';\nexport * from './vas-job-status.dto';\nexport * from './vas-job-type.dto';\nexport * from './vas-lookup.dto';\nexport * from './vas-lookup-type.dto';\nexport * from './vas-membership.dto';\nexport * from './vas-report-layout.dto';\nexport * from './vas-report-layout.model';\nexport * from './vas-report-request.dto';\nexport * from './vas-report-request.model';\nexport * from './vas-restricted-account-object.dto';\nexport * from './vas-restricted-account-object.model';\nexport * from './vas-task-type.dto';\nexport * from './vas-user.dto';\nexport * from './vas-user.model';\nexport * from './vas-form-config.dto';\nexport * from './vas-account-config.dto';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,gEAAsC;AACtC,iEAAuC;AACvC,4DAAkC;AAClC,mEAAyC;AACzC,qEAA2C;AAC3C,yDAA+B;AAC/B,2DAAiC;AACjC,2DAAiC;AACjC,6DAAmC;AACnC,4DAAkC;AAClC,8DAAoC;AACpC,iEAAuC;AACvC,4DAAkC;AAClC,8DAAoC;AACpC,iEAAuC;AACvC,mEAAyC;AACzC,0DAAgC;AAChC,4DAAkC;AAClC,yDAA+B;AAC/B,2DAAiC;AACjC,yDAA+B;AAC/B,2DAAiC;AACjC,0DAAgC;AAChC,4DAAkC;AAClC,6DAAmC;AACnC,+DAAqC;AACrC,wDAA8B;AAC9B,0DAAgC;AAChC,+DAAqC;AACrC,6DAAmC;AACnC,2DAAiC;AACjC,gEAAsC;AACtC,+DAAqC;AACrC,iEAAuC;AACvC,kEAAwC;AACxC,oEAA0C;AAC1C,mEAAyC;AACzC,qEAA2C;AAC3C,8EAAoD;AACpD,gFAAsD;AACtD,8DAAoC;AACpC,yDAA+B;AAC/B,2DAAiC;AACjC,gEAAsC;AACtC,mEAAyC","sourcesContent":["export * from './vas-fire-user.dto';\nexport * from './vas-fire-user.model';\nexport * from './vas-access-group.dto';\nexport * from './vas-account.dto';\nexport * from './vas-account-object.dto';\nexport * from './vas-account-object.model';\nexport * from './vas-base.dto';\nexport * from './vas-base.model';\nexport * from './vas-branch.dto';\nexport * from './vas-branch.model';\nexport * from './vas-contact.dto';\nexport * from './vas-contact.model';\nexport * from './vas-contact-type.dto';\nexport * from './vas-control.dto';\nexport * from './vas-control.model';\nexport * from './vas-control-type.dto';\nexport * from './vas-control-type.model';\nexport * from './vas-field.dto';\nexport * from './vas-field.model';\nexport * from './vas-file.dto';\nexport * from './vas-file.model';\nexport * from './vas-form.dto';\nexport * from './vas-form.model';\nexport * from './vas-group.dto';\nexport * from './vas-group.model';\nexport * from './vas-job-data.dto';\nexport * from './vas-job-data.model';\nexport * from './vas-job.dto';\nexport * from './vas-job.model';\nexport * from './vas-job-status.dto';\nexport * from './vas-job-type.dto';\nexport * from './vas-lookup.dto';\nexport * from './vas-lookup-type.dto';\nexport * from './vas-membership.dto';\nexport * from './vas-membership.model';\nexport * from './vas-report-layout.dto';\nexport * from './vas-report-layout.model';\nexport * from './vas-report-request.dto';\nexport * from './vas-report-request.model';\nexport * from './vas-restricted-account-object.dto';\nexport * from './vas-restricted-account-object.model';\nexport * from './vas-task-type.dto';\nexport * from './vas-user.dto';\nexport * from './vas-user.model';\nexport * from './vas-form-config.dto';\nexport * from './vas-account-config.dto';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAIpF,MAAM,WAAW,aAAc,SAAQ,6BAA6B;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
1
|
+
{"version":3,"file":"vas-control.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAIpF,MAAM,WAAW,aAAc,SAAQ,6BAA6B;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\n\n\n\nexport interface VasControlDto extends VasRestrictedAccountObjectDto {\n controlType: string;\n group: string;\n validators: string[];\n name: string;\n title: string;\n linkable: boolean;\n sequence: number;\n description: string;\n defaultValue: string;\n config: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-control.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\n\n\n\nexport interface VasControlDto extends VasRestrictedAccountObjectDto {\n controlType: string;\n group: string;\n validators: string[];\n name: string;\n title: string;\n linkable: boolean;\n sequence: number;\n description: string;\n descriptionImage: string;\n defaultValue: string;\n config: string;\n}\n"]}
|
|
@@ -25,6 +25,7 @@ export declare class VasControlModel extends VasBaseModel implements VasControlD
|
|
|
25
25
|
description: string;
|
|
26
26
|
defaultValue: string;
|
|
27
27
|
_config: string;
|
|
28
|
+
descriptionImage: string;
|
|
28
29
|
controlTypeModel: VasControlTypeModel | undefined;
|
|
29
30
|
protected configCache: any;
|
|
30
31
|
/**
|
|
@@ -47,8 +48,9 @@ export declare class VasControlModel extends VasBaseModel implements VasControlD
|
|
|
47
48
|
* @param {string} description
|
|
48
49
|
* @param {string} defaultValue
|
|
49
50
|
* @param {object} config
|
|
51
|
+
* @param {string} descriptionImage
|
|
50
52
|
*/
|
|
51
|
-
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, account: string, accessGroup: string, controlType: string, group: string, validators: string[], name: string, title: string, linkable: boolean, sequence: number, description: string, defaultValue: string, _config: string);
|
|
53
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, account: string, accessGroup: string, controlType: string, group: string, validators: string[], name: string, title: string, linkable: boolean, sequence: number, description: string, defaultValue: string, _config: string, descriptionImage: string);
|
|
52
54
|
/**
|
|
53
55
|
* The config property is returned from the api as a json string, this getter
|
|
54
56
|
* will deserialize it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,CAAC,OAAO,MAAM,+BAA+B,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAa,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"vas-control.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,MAAM,CAAC,OAAO,MAAM,+BAA+B,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/E;;GAEG;AACH,qBAAa,eAAgB,SAAQ,YAAa,YAAW,aAAa;IA2BtD,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,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE,MAAM;IACb,UAAU,EAAE,MAAM,EAAE;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,YAAY,EAAE,MAAM;IACpB,OAAO,EAAE,MAAM;IACf,gBAAgB,EAAE,MAAM;IA7C1B,gBAAgB,EAAE,mBAAmB,GAAG,SAAS,CAAa;IACrE,SAAS,CAAC,WAAW,EAAE,GAAG,CAAa;IAEvC;;;;;;;;;;;;;;;;;;;;;OAqBG;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,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAAE,EACpB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM;IAajC;;;;OAIG;IACH,cAAc,CAAC,CAAC,KAAK,CAAC;IAOtB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAGxB;IAED;;;;OAIG;IACH,IAAI,mBAAmB,IAAI,+BAA+B,CAkBzD;IAED;;;;OAIG;IACH,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED;;OAEG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;OAEG;WACW,KAAK,IAAI,eAAe;IAOtC;;;OAGG;WACW,OAAO,CACnB,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,GAC1B,eAAe;IA0BlB;;;OAGG;IACH,SAAS,CAAC,cAAc,CACtB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAC9B,+BAA+B;IAYlC;;OAEG;IACH,KAAK,IAAI,aAAa;CAwBvB"}
|
|
@@ -27,8 +27,9 @@ class VasControlModel extends vas_base_model_1.VasBaseModel {
|
|
|
27
27
|
* @param {string} description
|
|
28
28
|
* @param {string} defaultValue
|
|
29
29
|
* @param {object} config
|
|
30
|
+
* @param {string} descriptionImage
|
|
30
31
|
*/
|
|
31
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, _config) {
|
|
32
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, controlType, group, validators, name, title, linkable, sequence, description, defaultValue, _config, descriptionImage) {
|
|
32
33
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy);
|
|
33
34
|
this.id = id;
|
|
34
35
|
this.created = created;
|
|
@@ -49,6 +50,7 @@ class VasControlModel extends vas_base_model_1.VasBaseModel {
|
|
|
49
50
|
this.description = description;
|
|
50
51
|
this.defaultValue = defaultValue;
|
|
51
52
|
this._config = _config;
|
|
53
|
+
this.descriptionImage = descriptionImage;
|
|
52
54
|
this.controlTypeModel = undefined;
|
|
53
55
|
this.configCache = undefined;
|
|
54
56
|
}
|
|
@@ -122,7 +124,7 @@ class VasControlModel extends vas_base_model_1.VasBaseModel {
|
|
|
122
124
|
static fromDto(dto) {
|
|
123
125
|
return new VasControlModel(
|
|
124
126
|
// eslint-disable-next-line new-cap
|
|
125
|
-
dto.id || angular2_uuid_1.UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.controlType || '', dto.group || '', dto.validators || [], dto.name || '', dto.title || '', dto.linkable || false, dto.sequence || 0, dto.description || '', dto.defaultValue || '', dto.config || '{}');
|
|
127
|
+
dto.id || angular2_uuid_1.UUID.UUID(), dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.account || '', dto.accessGroup || '', dto.controlType || '', dto.group || '', dto.validators || [], dto.name || '', dto.title || '', dto.linkable || false, dto.sequence || 0, dto.description || '', dto.defaultValue || '', dto.config || '{}', dto.descriptionImage || '');
|
|
126
128
|
}
|
|
127
129
|
/**
|
|
128
130
|
* @param {string} value
|
|
@@ -162,7 +164,8 @@ class VasControlModel extends vas_base_model_1.VasBaseModel {
|
|
|
162
164
|
sequence: this.sequence,
|
|
163
165
|
description: this.description,
|
|
164
166
|
defaultValue: this.defaultValue,
|
|
165
|
-
config: this.config
|
|
167
|
+
config: this.config,
|
|
168
|
+
descriptionImage: this.descriptionImage,
|
|
166
169
|
};
|
|
167
170
|
}
|
|
168
171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-control.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAGhD,iDAAqC;AAIrC;;GAEG;AACH,MAAa,eAAgB,SAAQ,6BAAY;IAI/C
|
|
1
|
+
{"version":3,"file":"vas-control.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-control.model.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAGhD,iDAAqC;AAIrC;;GAEG;AACH,MAAa,eAAgB,SAAQ,6BAAY;IAI/C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAC3B,OAAe,EACf,WAAmB,EACnB,WAAmB,EACnB,KAAa,EACb,UAAoB,EACpB,IAAY,EACZ,KAAa,EACb,QAAiB,EACjB,QAAgB,EAChB,WAAmB,EACnB,YAAoB,EACpB,OAAe,EACf,gBAAwB;QAE/B,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,CACX,CAAC;QA7Bc,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;QAC3B,YAAO,GAAP,OAAO,CAAQ;QACf,gBAAW,GAAX,WAAW,CAAQ;QACnB,gBAAW,GAAX,WAAW,CAAQ;QACnB,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I,EAAE,CAC3B,CAAC;IACJ,CAAC;IAED;;;OAGG;IACO,cAAc,CACtB,KAA+B;QAE/B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,OAAO,KAAK,CAAC;SACd;QAED,IAAI;YACF,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1B;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAED;;OAEG;IACH,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,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC;IACJ,CAAC;CACF;AAhND,0CAgNC","sourcesContent":["import { VasBaseModel } from './vas-base.model';\nimport { VasControlTypeModel } from './vas-control-type.model';\nimport { VasControlDto } from './vas-control.dto';\nimport { UUID } from 'angular2-uuid';\n\nexport declare type VasControlModelDefaultValueType = string | number | object;\n\n/**\n * ControlModel\n */\nexport class VasControlModel extends VasBaseModel implements VasControlDto {\n public controlTypeModel: VasControlTypeModel | undefined = undefined;\n protected configCache: any = undefined;\n\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} controlType\n * @param {string} group\n * @param {string[]} validators\n * @param {string} name\n * @param {string} title\n * @param {boolean} linkable\n * @param {number} sequence\n * @param {string} description\n * @param {string} defaultValue\n * @param {object} config\n * @param {string} descriptionImage\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 controlType: string,\n public group: string,\n public validators: string[],\n public name: string,\n public title: string,\n public linkable: boolean,\n public sequence: number,\n public description: string,\n public defaultValue: string,\n public _config: string,\n public descriptionImage: string\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy\n );\n }\n\n /**\n * The config property is returned from the api as a json string, this getter\n * will deserialize it\n * @return {T}\n */\n getConfigModel<T>(): T {\n if (this.configCache !== undefined) {\n return this.configCache;\n }\n return this.configCache = JSON.parse(this._config) as T;\n }\n\n get config(): string {\n return this._config;\n }\n\n set config(config: string) {\n this._config = config;\n this.configCache = undefined;\n }\n\n /**\n * The defaultValue property is returned from the api as a string or number,\n * in the case of string, it maybe a json. This getter will return an\n * object if the value is a json string\n */\n get defaultValueDecoded(): VasControlModelDefaultValueType {\n\n if (this.defaultValue === '' && this.controlTypeModel) {\n switch (this.controlTypeModel.name) {\n case 'branch':\n case 'camera':\n case 'contact': {\n return {};\n }\n case 'toggle': {\n return {\n checked: false, comment: ''\n }\n }\n }\n }\n\n return this.parseMaybeJson(this.defaultValue);\n }\n\n /**\n * Returns the name of this control to be used in the report templates\n * i.e. fields.foo -> foo\n * @return {string}\n */\n get reportTemplateName(): string {\n return this.name.replace(/^fields\\./, '');\n }\n\n /**\n * @return {string}\n */\n get safeName(): string {\n return this.name;\n }\n\n /**\n * @return {VasControlModel}\n */\n public static empty(): VasControlModel {\n return VasControlModel.fromDto({\n // eslint-disable-next-line new-cap\n id: UUID.UUID()\n });\n }\n\n /**\n * @param {VasControlDto} dto\n * @return {VasControlModel}\n */\n public static fromDto(\n dto: Partial<VasControlDto>\n ): VasControlModel {\n return new VasControlModel(\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.controlType || '',\n dto.group || '',\n dto.validators || [],\n dto.name || '',\n dto.title || '',\n dto.linkable || false,\n dto.sequence || 0,\n dto.description || '',\n dto.defaultValue || '',\n dto.config || '{}',\n dto.descriptionImage || '',\n );\n }\n\n /**\n * @param {string} value\n * @return {VasControlModelDefaultValueType}\n */\n protected parseMaybeJson(\n value: string | number | object\n ): VasControlModelDefaultValueType {\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(value);\n } catch (e) {\n return value;\n }\n }\n\n /**\n * @return {VasControlDto}\n */\n toDto(): VasControlDto {\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 controlType: this.controlType,\n group: this.group,\n validators: this.validators,\n name: this.name,\n title: this.title,\n linkable: this.linkable,\n sequence: this.sequence,\n description: this.description,\n defaultValue: this.defaultValue,\n config: this.config,\n descriptionImage: this.descriptionImage,\n };\n }\n}\n\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VasUserDto } from './vas-user.dto';
|
|
2
|
+
import { VasAccountDto } from './vas-account.dto';
|
|
3
|
+
import { VasMembershipDto } from './vas-membership.dto';
|
|
4
|
+
export declare type VasFireUserDtoAccountType = Record<string, Omit<VasAccountDto, 'memberships'> & {
|
|
5
|
+
membership: VasMembershipDto;
|
|
6
|
+
}>;
|
|
7
|
+
export interface VasFireUserDto extends VasUserDto {
|
|
8
|
+
accounts: VasFireUserDtoAccountType;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=vas-fire-user.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-fire-user.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-fire-user.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,CAAC,OAAO,MAAM,yBAAyB,GAAG,MAAM,CACpD,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC,GAAG;IAAE,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAC9E,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,QAAQ,EAAE,yBAAyB,CAAC;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-fire-user.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-fire-user.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasUserDto } from './vas-user.dto';\nimport { VasAccountDto } from './vas-account.dto';\nimport { VasMembershipDto } from './vas-membership.dto';\n\nexport declare type VasFireUserDtoAccountType = Record<\n string, Omit<VasAccountDto, 'memberships'> & { membership: VasMembershipDto }\n>;\n\nexport interface VasFireUserDto extends VasUserDto {\n accounts: VasFireUserDtoAccountType;\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VasFireUserDto, VasFireUserDtoAccountType } from './vas-fire-user.dto';
|
|
2
|
+
import { VasUserModel } from './vas-user.model';
|
|
3
|
+
export declare class VasFireUserModel extends VasUserModel implements VasFireUserDto {
|
|
4
|
+
id: string;
|
|
5
|
+
created: string;
|
|
6
|
+
serverCreated: string;
|
|
7
|
+
createdBy: string;
|
|
8
|
+
modified: string;
|
|
9
|
+
serverModified: string;
|
|
10
|
+
modifiedBy: string;
|
|
11
|
+
email: string;
|
|
12
|
+
username: string;
|
|
13
|
+
accounts: VasFireUserDtoAccountType;
|
|
14
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, email: string, username: string, accounts: VasFireUserDtoAccountType);
|
|
15
|
+
static fromDto(dto: VasFireUserDto): VasFireUserModel;
|
|
16
|
+
static newUser(uid: string, displayName: string, email: string): VasFireUserModel;
|
|
17
|
+
toDto(): VasFireUserDto;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=vas-fire-user.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-fire-user.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-fire-user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,gBAAiB,SAAQ,YAAa,YAAW,cAAc;IAGxD,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,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IACzB,QAAQ,EAAE,yBAAyB;gBAT1B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAW,EACpB,aAAa,EAAE,MAAW,EAC1B,SAAS,EAAE,MAAW,EACtB,QAAQ,EAAE,MAAW,EACrB,cAAc,EAAE,MAAW,EAC3B,UAAU,EAAE,MAAW,EACvB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EACzB,QAAQ,EAAE,yBAAyB;WAerB,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,gBAAgB;WAevD,OAAO,CACnB,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,GACZ,gBAAgB;IAeH,KAAK,IAAI,cAAc;CAcxC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VasFireUserModel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const moment_1 = tslib_1.__importDefault(require("moment/moment"));
|
|
6
|
+
const vas_user_model_1 = require("./vas-user.model");
|
|
7
|
+
class VasFireUserModel extends vas_user_model_1.VasUserModel {
|
|
8
|
+
constructor(id, created = '', serverCreated = '', createdBy = '', modified = '', serverModified = '', modifiedBy = '', email, username, accounts) {
|
|
9
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, email, username);
|
|
10
|
+
this.id = id;
|
|
11
|
+
this.created = created;
|
|
12
|
+
this.serverCreated = serverCreated;
|
|
13
|
+
this.createdBy = createdBy;
|
|
14
|
+
this.modified = modified;
|
|
15
|
+
this.serverModified = serverModified;
|
|
16
|
+
this.modifiedBy = modifiedBy;
|
|
17
|
+
this.email = email;
|
|
18
|
+
this.username = username;
|
|
19
|
+
this.accounts = accounts;
|
|
20
|
+
}
|
|
21
|
+
static fromDto(dto) {
|
|
22
|
+
return new VasFireUserModel(dto.id, dto.created, dto.serverCreated, dto.createdBy, dto.modified, dto.serverModified, dto.modifiedBy, dto.email, dto.username, dto.accounts);
|
|
23
|
+
}
|
|
24
|
+
static newUser(uid, displayName, email) {
|
|
25
|
+
return new VasFireUserModel(uid, (0, moment_1.default)().toISOString(), uid, (0, moment_1.default)().toISOString(), uid, (0, moment_1.default)().toISOString(), (0, moment_1.default)().toISOString(), email, displayName, {});
|
|
26
|
+
}
|
|
27
|
+
toDto() {
|
|
28
|
+
return {
|
|
29
|
+
id: this.id,
|
|
30
|
+
created: this.created,
|
|
31
|
+
serverCreated: this.serverCreated,
|
|
32
|
+
createdBy: this.createdBy,
|
|
33
|
+
modified: this.modified,
|
|
34
|
+
serverModified: this.serverModified,
|
|
35
|
+
modifiedBy: this.modifiedBy,
|
|
36
|
+
email: this.email,
|
|
37
|
+
username: this.username,
|
|
38
|
+
accounts: this.accounts
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.VasFireUserModel = VasFireUserModel;
|
|
43
|
+
//# sourceMappingURL=vas-fire-user.model.js.map
|
|
@@ -0,0 +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,EACzB,QAAmC;QAE1C,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,KAAK,EACL,QAAQ,CACT,CAAC;QArBc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAa;QACpB,kBAAa,GAAb,aAAa,CAAa;QAC1B,cAAS,GAAT,SAAS,CAAa;QACtB,aAAQ,GAAR,QAAQ,CAAa;QACrB,mBAAc,GAAd,cAAc,C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C;CACF;AA3ED,4CA2EC","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 email: string,\n public override username: string,\n public accounts: VasFireUserDtoAccountType\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n email,\n username\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.email,\n dto.username,\n dto.accounts\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 uid,\n moment().toISOString(),\n uid,\n moment().toISOString(),\n moment().toISOString(),\n email,\n displayName,\n {}\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 email: this.email,\n username: this.username,\n accounts: this.accounts\n };\n }\n}\n"]}
|
|
@@ -14,6 +14,8 @@ export interface VasJobStaticDto extends VasRestrictedAccountObjectDto {
|
|
|
14
14
|
version: number;
|
|
15
15
|
files: Array<VasFileDto>;
|
|
16
16
|
fields: Array<VasFieldDto>;
|
|
17
|
+
createdByDisplayName: string;
|
|
18
|
+
modifiedByDisplayName: string;
|
|
17
19
|
}
|
|
18
20
|
export declare type VasJobDto = VasJobStaticDto & Record<string, VasFieldDtoValue>;
|
|
19
21
|
//# sourceMappingURL=vas-job.dto.d.ts.map
|
|
@@ -1 +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,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,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,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;
|
|
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,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,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,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AACD,MAAM,CAAC,OAAO,MAAM,SAAS,GAAG,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +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 { VasFileDto } from './vas-file.dto';\nimport { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\n\nexport interface VasJobStaticDto extends VasRestrictedAccountObjectDto {\n reference: string;\n jobDate: string;\n jobStatus: string;\n jobType: string;\n assigneeId: string;\n formId: string;\n timeZoneOffset: number;\n pendingFields: number;\n childModified: string;\n version: number;\n files: Array<VasFileDto>;\n fields: Array<VasFieldDto>;\n}\nexport declare type VasJobDto = VasJobStaticDto & Record<string, VasFieldDtoValue>;\n"]}
|
|
1
|
+
{"version":3,"file":"vas-job.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.dto.ts"],"names":[],"mappings":"","sourcesContent":["import { VasFileDto } from './vas-file.dto';\nimport { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\n\nexport interface VasJobStaticDto extends VasRestrictedAccountObjectDto {\n reference: string;\n jobDate: string;\n jobStatus: string;\n jobType: string;\n assigneeId: string;\n formId: string;\n timeZoneOffset: number;\n pendingFields: number;\n childModified: string;\n version: number;\n files: Array<VasFileDto>;\n fields: Array<VasFieldDto>;\n createdByDisplayName: string;\n modifiedByDisplayName: string;\n}\nexport declare type VasJobDto = VasJobStaticDto & Record<string, VasFieldDtoValue>;\n"]}
|
|
@@ -36,6 +36,8 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
36
36
|
version: number;
|
|
37
37
|
fields: Array<VasFieldDto>;
|
|
38
38
|
files: Array<VasFileDto>;
|
|
39
|
+
createdByDisplayName: string;
|
|
40
|
+
modifiedByDisplayName: string;
|
|
39
41
|
/**
|
|
40
42
|
* @param {string} id
|
|
41
43
|
* @param {string} created
|
|
@@ -59,7 +61,7 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
59
61
|
* @param {Array<VasFieldDto>} fields
|
|
60
62
|
* @param {Array<VasFileDto>} files
|
|
61
63
|
*/
|
|
62
|
-
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, assigneeId: string, formId: string, timeZoneOffset: number, pendingFields: number, childModified: string, version: number, fields: Array<VasFieldDto>, files: Array<VasFileDto
|
|
64
|
+
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, assigneeId: string, formId: string, timeZoneOffset: number, pendingFields: number, childModified: string, version: number, fields: Array<VasFieldDto>, files: Array<VasFileDto>, createdByDisplayName: string, modifiedByDisplayName: string);
|
|
63
65
|
/**
|
|
64
66
|
* Returns this with the dynamic interface
|
|
65
67
|
* @return {VasJobModelDynamicInterface}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-job.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gB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,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAgB9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+EG;IACH,aAAa,CACX,SAAS,EAAE,YAAY,EACvB,iBAAiB,GAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAA6B,EAClE,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAC3B,IAAI;IAkCP;;;;OAIG;IACH,cAAc,CAAC,CAAC,SAAS,gBAAgB,EACvC,IAAI,GAAE,MAAM,EAAO,GAClB,CAAC,GAAG,SAAS;IAIhB;;;;;;;;;;;;;;;;OAgBG;IACH,cAAc,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,IAAI;IAyBlE;;;;OAIG;IACI,KAAK,CAAC,UAAU,UAAQ,GAAG,SAAS;IAsC3C;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,WAAW,CACT,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,kBAER,GACA,MAAM;IAuET;;OAEG;IACM,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAa/D"}
|
|
@@ -34,7 +34,7 @@ class VasJobModel extends vas_restricted_account_object_model_1.VasRestrictedAcc
|
|
|
34
34
|
* @param {Array<VasFieldDto>} fields
|
|
35
35
|
* @param {Array<VasFileDto>} files
|
|
36
36
|
*/
|
|
37
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, reference, jobDate, jobStatus, jobType, assigneeId, formId, timeZoneOffset, pendingFields, childModified, version, fields, files) {
|
|
37
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup, reference, jobDate, jobStatus, jobType, assigneeId, formId, timeZoneOffset, pendingFields, childModified, version, fields, files, createdByDisplayName, modifiedByDisplayName) {
|
|
38
38
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, account, accessGroup);
|
|
39
39
|
this.id = id;
|
|
40
40
|
this.created = created;
|
|
@@ -57,6 +57,8 @@ class VasJobModel extends vas_restricted_account_object_model_1.VasRestrictedAcc
|
|
|
57
57
|
this.version = version;
|
|
58
58
|
this.fields = fields;
|
|
59
59
|
this.files = files;
|
|
60
|
+
this.createdByDisplayName = createdByDisplayName;
|
|
61
|
+
this.modifiedByDisplayName = modifiedByDisplayName;
|
|
60
62
|
}
|
|
61
63
|
/**
|
|
62
64
|
* Returns this with the dynamic interface
|
|
@@ -88,7 +90,7 @@ class VasJobModel extends vas_restricted_account_object_model_1.VasRestrictedAcc
|
|
|
88
90
|
static empty() {
|
|
89
91
|
return new VasJobModel(
|
|
90
92
|
// eslint-disable-next-line new-cap
|
|
91
|
-
angular2_uuid_1.UUID.UUID(), '', '', '', '', '', '', '', '', '', '', '', '', '', '', (0, moment_1.default)().utcOffset(), 0, '', 0, [], []);
|
|
93
|
+
angular2_uuid_1.UUID.UUID(), '', '', '', '', '', '', '', '', '', '', '', '', '', '', (0, moment_1.default)().utcOffset(), 0, '', 0, [], [], '', '');
|
|
92
94
|
}
|
|
93
95
|
/**
|
|
94
96
|
* @param {VasJobDto} jobDto
|
|
@@ -97,7 +99,7 @@ class VasJobModel extends vas_restricted_account_object_model_1.VasRestrictedAcc
|
|
|
97
99
|
static fromDto(jobDto) {
|
|
98
100
|
const model = new VasJobModel(
|
|
99
101
|
// eslint-disable-next-line new-cap
|
|
100
|
-
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.assigneeId || '', jobDto.formId || '', jobDto.timeZoneOffset || (0, moment_1.default)().utcOffset(), jobDto.pendingFields || 0, jobDto.childModified || '', jobDto.version || 0, jobDto.fields || [], jobDto.files || []);
|
|
102
|
+
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.assigneeId || '', jobDto.formId || '', jobDto.timeZoneOffset || (0, moment_1.default)().utcOffset(), jobDto.pendingFields || 0, jobDto.childModified || '', jobDto.version || 0, jobDto.fields || [], jobDto.files || [], jobDto.createdByDisplayName || '', jobDto.modifiedByDisplayName || '');
|
|
101
103
|
const emptyKeys = model.staticProperties;
|
|
102
104
|
Object
|
|
103
105
|
.keys(jobDto)
|
|
@@ -326,7 +328,9 @@ class VasJobModel extends vas_restricted_account_object_model_1.VasRestrictedAcc
|
|
|
326
328
|
childModified: this.childModified,
|
|
327
329
|
version: this.version,
|
|
328
330
|
fields: this.fields,
|
|
329
|
-
files: this.files
|
|
331
|
+
files: this.files,
|
|
332
|
+
createdByDisplayName: this.createdByDisplayName,
|
|
333
|
+
modifiedByDisplayName: this.modifiedByDisplayName
|
|
330
334
|
};
|
|
331
335
|
}
|
|
332
336
|
const dto = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-job.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":";;;;AACA,iDAAqC;AACrC,4DAA4B;AAC5B,kEAA4D;AAG5D,uDAAkD;AAGlD,+FAAwF;AAoBxF;;GAEG;AACH,MAAa,WAAY,SAAQ,qEAA+B;IAC9D;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,OAAe,EACf,WAAmB,EAC5B,SAA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AAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAA,CAAC;IAEF;;OAEG;IACM,QAAQ;QACf,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG,EAChC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,GAAG,EAC5B,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,GAAG,EAC5B,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,GAAG,EACpC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG,EAChC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,GAAG,EAClC,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,CAAC,EACxC,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,CAAC,IACtC;IACJ,CAAC;CACF;AA9gBD,kCA8gBC","sourcesContent":["import { VasFileDto } from './vas-file.dto';\nimport { UUID } from 'angular2-uuid';\nimport moment from 'moment';\nimport { getValueByPath } from '../utils/get-value-by-path';\nimport { VasBaseDto } from './vas-base.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\nimport { VasFieldModel } from './vas-field.model';\nimport { VasFormModel } from './vas-form.model';\nimport { VasJobDto } from './vas-job.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\n\nexport declare interface VasJobModelDynamicInterface {\n [s: string]: string | number | Record<string, VasFieldDtoValue>;\n}\n\nexport interface ParseSyntaxOptions {\n // This value will be used to adjust any datetime values that are referenced\n // in the syntax string. See\n // https://momentjscom.readthedocs.io/en/latest/moment/03-manipulating/09-utc-offset/\n // for more information about how `moment` will handle the value.\n timeZoneOffset: number,\n // this dictionary can be passed in to contain other objects to be referenced\n // in the syntax. For example if we have {job.foo} this will reference the\n // job's `foo` property, however if we have \"reportLayout.title\" this will\n // expect to find a property of `objects` called `reportLayout` which will\n // have a property called `title`\n objects?: Record<string, Partial<VasBaseDto> | Record<string, VasFieldDtoValue>>;\n}\n\n/**\n * JobModel\n */\nexport class VasJobModel 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} reference\n * @param {string} jobDate\n * @param {string} jobStatus\n * @param {string} jobType\n * @param {string} assigneeId\n * @param {string} formId\n * @param {number} timeZoneOffset\n * @param {number} pendingFields\n * @param {string} childModified\n * @param {number} version\n * @param {Array<VasFieldDto>} fields\n * @param {Array<VasFileDto>} files\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 reference: string,\n public jobDate: string,\n public jobStatus: string,\n public jobType: string,\n public assigneeId: string,\n public formId: string,\n public timeZoneOffset: number,\n public pendingFields: number,\n public childModified: string,\n public version: number,\n public fields: Array<VasFieldDto>,\n public files: Array<VasFileDto>\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 this with the dynamic interface\n * @return {VasJobModelDynamicInterface}\n */\n get $this(): VasJobModelDynamicInterface {\n return this as any;\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 moment().utcOffset(),\n 0,\n '',\n 0,\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.assigneeId || '',\n jobDto.formId || '',\n jobDto.timeZoneOffset || moment().utcOffset(),\n jobDto.pendingFields || 0,\n jobDto.childModified || '',\n jobDto.version || 0,\n jobDto.fields || [],\n jobDto.files || []\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 * Will return an object whose keys are the names of all fields in the job but\n * with the \"fields.\" part removed. This method is similar to `getFields`\n * except that this method will only return values that are set whereas\n * `getFields` will return a property regardless (because it uses the form to\n * drive the logic)\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields2(): Record<string, VasFieldDtoValue> {\n let fields: {[key: string]: VasFieldDtoValue} = {};\n this.dynamicProperties\n .forEach((groupName) => {\n Object\n .keys(this.$this[groupName])\n .forEach(controlName => {\n const controlNameShort = controlName.replace(/fields\\./, '');\n fields[controlNameShort] = this.getValueByPath(\n [groupName, controlName]\n )\n })\n }, {})\n return fields;\n }\n\n /**\n * This method will hydrate the `fields` property of the model. The reason for\n * this is that we have different ways to store the field data. One way, is\n * we store them as dynamic properties of the job. For example job.foo.bar,\n * where `foo` is the name of a Group, and `bar` is the name of a control.\n * Thus, when we create a job using a form in the client, the job object will\n * have its static properties (id, account, reference etc), and also a number\n * of dynamic properties determined by the Groups and Controls. This kind of\n * object is nice to work with in certain circumstances. However, the api\n * works differently. In the API a Job is a record, and references a number of\n * Field records. Each Field stores the value. Comparing these two models we\n * have:\n * A) job with dynamic properties, e.g.\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * foo: {\n * bar: \"value\"\n * }\n * }\n *\n * B) job with fields\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * <will not have dynamic properties>...\n * fields: [\n * {\n * id: <guid>,\n * <other field properties>,\n * value: \"value\"\n * }\n * ]\n * }\n *\n * So, what this method does is given a JobModel in the form of A, read all\n * of those dynamic properties and set them into `fields`. Doing this requires\n * knowledge of the Form that was used to create the job. Moreover, since the\n * dynamic properties do not contain the ids of the fields, we also allow to\n * pass in a `controlFieldIdMap`. This map stores the mapping between Control\n * and the Field that was created in the Job to store the value for that\n * Control. This is useful, if for example you want to compare a Job in form A\n * with a Job in form B, for example if you want to update the Job on the API\n * with a Job that was saved by a client in form A.\n *\n * E.g.\n * Client -> API: client requests form\n * User -> Client: user fills in the form and submits\n * Client -> Firestore: client saves the Job in form A i.e. dynamic props\n * Firestore -> Function: A function is triggered to sync the job to the API\n * Function -> API: Function checks if job already exists, it receives 404\n * Function -> Function: The function calls `hydrateFields(...)`\n * Function -> API: The function POST the Job to /jobs\n * Function -> API: The function POST each field to /fields\n *\n * Similarly, if the user updates the job\n * Client -> API: client requests form\n * User -> Client: user fills in the form and submits an update\n * Client -> Firestore: client saves the Job in form A i.e. dynamic props\n * Firestore -> Function: A function is triggered to sync the job to the API\n * Function -> API: Function checks if job already exists, it receives 200\n * Function -> Function: The function calls `hydrateFields(...)` passing in\n * the map is made by iterating over the fields it\n * received from the API and storing the mappings\n * between controlId and fieldId for each field\n * Function -> API: The function PATCH the Job to /jobs\n * Function -> API: The function POST/PATCH each field to /fields\n * treated as new\n *\n * @param {VasFormModel} formModel the VasFormModel that was used to create\n * the job\n * @param {Map<string, string>} controlFieldIdMap a mapping of control to\n * field ids. This is used to determine whether a new id for the field should\n * be generated, or to reuse an existing one from the map.\n * @param {Array<string>} controlNames if a value is provided, it will be used\n * to filter the fields that are returned.\n * @return {Array<VasFieldDto>}\n */\n hydrateFields(\n formModel: VasFormModel,\n controlFieldIdMap: Map<string, string> = new Map<string, string>(),\n controlNames?: Array<string>\n ): void {\n const fields: Array<VasFieldDto> = [];\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n\n if (!control.name.startsWith('fields.')) {\n return;\n }\n\n if (controlNames && !controlNames.includes(control.name)) {\n return;\n }\n\n fields.push(VasFieldModel.fromDto({\n // if the controlId exists in the map, use the associated fieldId,\n // otherwise generate a new id for the field.\n id: controlFieldIdMap.get(control.id) || UUID.UUID(),\n account: this.account,\n job: this.id,\n createdBy: this.createdBy,\n created: this.created,\n modifiedBy: this.modifiedBy,\n modified: this.modified,\n control: control.id,\n value: this.getValueByPath(\n [group.name, control.name]\n )\n }));\n });\n });\n this.fields = fields;\n }\n\n /**\n\n * @param {string[]} path path segments\n * @return {void}\n */\n getValueByPath<T extends VasFieldDtoValue>(\n path: string[] = []\n ): T | undefined {\n return getValueByPath(path, this.$this);\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 as any)[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\n if (staticOnly) {\n return {\n id: this.id,\n created: this.created,\n createdBy: this.createdBy,\n modified: this.modified,\n modifiedBy: this.modifiedBy,\n serverCreated: this.serverCreated,\n serverModified: this.serverModified,\n account: this.account,\n accessGroup: this.accessGroup,\n reference: this.reference,\n jobDate: this.jobDate,\n jobStatus: this.jobStatus,\n jobType: this.jobType,\n assigneeId: this.assigneeId,\n formId: this.formId,\n timeZoneOffset: this.timeZoneOffset,\n pendingFields: this.pendingFields,\n childModified: this.childModified,\n version: this.version,\n fields: this.fields,\n files: this.files\n };\n }\n\n const dto = {} as VasJobModelDynamicInterface;\n [...this.staticProperties, ...this.dynamicProperties]\n .forEach(prop =>\n (dto)[prop] = this.$this[prop]);\n\n return dto as any;\n }\n\n /**\n * This method will parse a syntax that allows us to build strings from the\n * values of from the job model. For example if the job model was:\n *\n * {\n * foo: 'bar'\n * }\n *\n * and we pass \"i am foo {foo}\", the result would be:\n *\n * \"i am foo bar\"\n *\n * we can also use moment to parse dates, for example if the job model was:\n *\n * {\n * created: \"2022-01-01T00:00:00+0000\"\n * }\n *\n * and we pass \"{created|date:YY-MM-DD}\", the result would be:\n *\n * \"2022-01-01\"\n *\n * @param {string} value a string with the syntax\n * @param {ParseSyntaxOptions} options\n * @return {string} the results of parsing the syntax on this job\n */\n parseSyntax(\n value: string,\n options: ParseSyntaxOptions = {\n timeZoneOffset: 0\n }\n ): string {\n\n if (!value || typeof value !== 'string') {\n return '';\n }\n return value.replace(/({[^}]*})/g, (match: string, token: string) => {\n const syntax = token.substring(1, token.length - 1);\n\n let [key, filter] = syntax.split('|');\n key = (key || '').trim();\n filter = (filter || '').trim()\n\n let filterName, filterArg: string = '';\n if (filter) {\n const splitIndex = filter.indexOf(':');\n if (splitIndex !== -1) {\n filterName = filter.substring(0, splitIndex);\n filterArg = filter.substring(splitIndex + 1);\n } else {\n filterName = filter;\n filterArg = '';\n }\n filterName = (filterName || '').trim();\n filterArg = (filterArg || '').trim();\n }\n const path = key.split('.');\n const objectKey = path.shift() || '';\n let result = '';\n if (objectKey === 'job') {\n result = (this.getValueByPath(path) || '').toString();\n } else if (objectKey === 'fields') {\n result = (getValueByPath(path, this.getFields2()) || '').toString();\n } else if (objectKey.length) {\n if (options.objects) {\n if (options.objects[objectKey] === undefined) {\n console.debug(\n `objectKey ${objectKey} is not present in options.object`\n );\n result = '';\n } else {\n result = (getValueByPath(path, options.objects[objectKey]) || '')\n .toString();\n }\n } else {\n console.debug(\n `objectKey ${objectKey} was used but options.object is not set`\n );\n return '';\n }\n } else {\n return '';\n }\n\n\n if (filterName && result) {\n switch (filterName) {\n case 'date': {\n return moment(result)\n .utcOffset(options.timeZoneOffset)\n .format(filterArg || '');\n }\n default: {\n console.warn('unknown filter %s', filterName);\n }\n }\n }\n\n return result;\n }).trim();\n };\n\n /**\n * @return {object}\n */\n override toApiDto(): Record<string, string | number | boolean> {\n return {\n ...super.toApiDto(),\n reference: this.reference || '~',\n jobDate: this.jobDate || '~',\n jobType: this.jobType || '~',\n accessGroup: this.accessGroup || '~',\n jobStatus: this.jobStatus || '~',\n assigneeId: this.assigneeId || '~',\n timeZoneOffset: this.timeZoneOffset || 0,\n pendingFields: this.pendingFields || 0,\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-job.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":";;;;AACA,iDAAqC;AACrC,4DAA4B;AAC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,QAAQ,EAAE,CAAC;qBACf;iBACF;qBAAM;oBACL,OAAO,CAAC,KAAK,CACX,aAAa,SAAS,yCAAyC,CAChE,CAAC;oBACF,OAAO,EAAE,CAAC;iBACX;aACF;iBAAM;gBACL,OAAO,EAAE,CAAC;aACX;YAGD,IAAI,UAAU,IAAI,MAAM,EAAE;gBACxB,QAAQ,UAAU,EAAE;oBAClB,KAAK,MAAM,CAAC,CAAC;wBACX,OAAO,IAAA,gBAAM,EAAC,MAAM,CAAC;6BAClB,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC;6BACjC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;qBAC5B;oBACD,OAAO,CAAC,CAAC;wBACP,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;qBAC/C;iBACF;aACF;YAED,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAA,CAAC;IAEF;;OAEG;IACM,QAAQ;QACf,uCACK,KAAK,CAAC,QAAQ,EAAE,KACnB,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG,EAChC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,GAAG,EAC5B,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,GAAG,EAC5B,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,GAAG,EACpC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,GAAG,EAChC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,GAAG,EAClC,cAAc,EAAE,IAAI,CAAC,cAAc,IAAI,CAAC,EACxC,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,CAAC,IACtC;IACJ,CAAC;CACF;AAthBD,kCAshBC","sourcesContent":["import { VasFileDto } from './vas-file.dto';\nimport { UUID } from 'angular2-uuid';\nimport moment from 'moment';\nimport { getValueByPath } from '../utils/get-value-by-path';\nimport { VasBaseDto } from './vas-base.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\nimport { VasFieldModel } from './vas-field.model';\nimport { VasFormModel } from './vas-form.model';\nimport { VasJobDto } from './vas-job.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\n\nexport declare interface VasJobModelDynamicInterface {\n [s: string]: string | number | Record<string, VasFieldDtoValue>;\n}\n\nexport interface ParseSyntaxOptions {\n // This value will be used to adjust any datetime values that are referenced\n // in the syntax string. See\n // https://momentjscom.readthedocs.io/en/latest/moment/03-manipulating/09-utc-offset/\n // for more information about how `moment` will handle the value.\n timeZoneOffset: number,\n // this dictionary can be passed in to contain other objects to be referenced\n // in the syntax. For example if we have {job.foo} this will reference the\n // job's `foo` property, however if we have \"reportLayout.title\" this will\n // expect to find a property of `objects` called `reportLayout` which will\n // have a property called `title`\n objects?: Record<string, Partial<VasBaseDto> | Record<string, VasFieldDtoValue>>;\n}\n\n/**\n * JobModel\n */\nexport class VasJobModel 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} reference\n * @param {string} jobDate\n * @param {string} jobStatus\n * @param {string} jobType\n * @param {string} assigneeId\n * @param {string} formId\n * @param {number} timeZoneOffset\n * @param {number} pendingFields\n * @param {string} childModified\n * @param {number} version\n * @param {Array<VasFieldDto>} fields\n * @param {Array<VasFileDto>} files\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 reference: string,\n public jobDate: string,\n public jobStatus: string,\n public jobType: string,\n public assigneeId: string,\n public formId: string,\n public timeZoneOffset: number,\n public pendingFields: number,\n public childModified: string,\n public version: number,\n public fields: Array<VasFieldDto>,\n public files: Array<VasFileDto>,\n public createdByDisplayName: string,\n public modifiedByDisplayName: string,\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 this with the dynamic interface\n * @return {VasJobModelDynamicInterface}\n */\n get $this(): VasJobModelDynamicInterface {\n return this as any;\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 moment().utcOffset(),\n 0,\n '',\n 0,\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.assigneeId || '',\n jobDto.formId || '',\n jobDto.timeZoneOffset || moment().utcOffset(),\n jobDto.pendingFields || 0,\n jobDto.childModified || '',\n jobDto.version || 0,\n jobDto.fields || [],\n jobDto.files || [],\n jobDto.createdByDisplayName || '',\n jobDto.modifiedByDisplayName || '',\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 * Will return an object whose keys are the names of all fields in the job but\n * with the \"fields.\" part removed. This method is similar to `getFields`\n * except that this method will only return values that are set whereas\n * `getFields` will return a property regardless (because it uses the form to\n * drive the logic)\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields2(): Record<string, VasFieldDtoValue> {\n let fields: {[key: string]: VasFieldDtoValue} = {};\n this.dynamicProperties\n .forEach((groupName) => {\n Object\n .keys(this.$this[groupName])\n .forEach(controlName => {\n const controlNameShort = controlName.replace(/fields\\./, '');\n fields[controlNameShort] = this.getValueByPath(\n [groupName, controlName]\n )\n })\n }, {})\n return fields;\n }\n\n /**\n * This method will hydrate the `fields` property of the model. The reason for\n * this is that we have different ways to store the field data. One way, is\n * we store them as dynamic properties of the job. For example job.foo.bar,\n * where `foo` is the name of a Group, and `bar` is the name of a control.\n * Thus, when we create a job using a form in the client, the job object will\n * have its static properties (id, account, reference etc), and also a number\n * of dynamic properties determined by the Groups and Controls. This kind of\n * object is nice to work with in certain circumstances. However, the api\n * works differently. In the API a Job is a record, and references a number of\n * Field records. Each Field stores the value. Comparing these two models we\n * have:\n * A) job with dynamic properties, e.g.\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * foo: {\n * bar: \"value\"\n * }\n * }\n *\n * B) job with fields\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * <will not have dynamic properties>...\n * fields: [\n * {\n * id: <guid>,\n * <other field properties>,\n * value: \"value\"\n * }\n * ]\n * }\n *\n * So, what this method does is given a JobModel in the form of A, read all\n * of those dynamic properties and set them into `fields`. Doing this requires\n * knowledge of the Form that was used to create the job. Moreover, since the\n * dynamic properties do not contain the ids of the fields, we also allow to\n * pass in a `controlFieldIdMap`. This map stores the mapping between Control\n * and the Field that was created in the Job to store the value for that\n * Control. This is useful, if for example you want to compare a Job in form A\n * with a Job in form B, for example if you want to update the Job on the API\n * with a Job that was saved by a client in form A.\n *\n * E.g.\n * Client -> API: client requests form\n * User -> Client: user fills in the form and submits\n * Client -> Firestore: client saves the Job in form A i.e. dynamic props\n * Firestore -> Function: A function is triggered to sync the job to the API\n * Function -> API: Function checks if job already exists, it receives 404\n * Function -> Function: The function calls `hydrateFields(...)`\n * Function -> API: The function POST the Job to /jobs\n * Function -> API: The function POST each field to /fields\n *\n * Similarly, if the user updates the job\n * Client -> API: client requests form\n * User -> Client: user fills in the form and submits an update\n * Client -> Firestore: client saves the Job in form A i.e. dynamic props\n * Firestore -> Function: A function is triggered to sync the job to the API\n * Function -> API: Function checks if job already exists, it receives 200\n * Function -> Function: The function calls `hydrateFields(...)` passing in\n * the map is made by iterating over the fields it\n * received from the API and storing the mappings\n * between controlId and fieldId for each field\n * Function -> API: The function PATCH the Job to /jobs\n * Function -> API: The function POST/PATCH each field to /fields\n * treated as new\n *\n * @param {VasFormModel} formModel the VasFormModel that was used to create\n * the job\n * @param {Map<string, string>} controlFieldIdMap a mapping of control to\n * field ids. This is used to determine whether a new id for the field should\n * be generated, or to reuse an existing one from the map.\n * @param {Array<string>} controlNames if a value is provided, it will be used\n * to filter the fields that are returned.\n * @return {Array<VasFieldDto>}\n */\n hydrateFields(\n formModel: VasFormModel,\n controlFieldIdMap: Map<string, string> = new Map<string, string>(),\n controlNames?: Array<string>\n ): void {\n const fields: Array<VasFieldDto> = [];\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n\n if (!control.name.startsWith('fields.')) {\n return;\n }\n\n if (controlNames && !controlNames.includes(control.name)) {\n return;\n }\n\n fields.push(VasFieldModel.fromDto({\n // if the controlId exists in the map, use the associated fieldId,\n // otherwise generate a new id for the field.\n id: controlFieldIdMap.get(control.id) || UUID.UUID(),\n account: this.account,\n job: this.id,\n createdBy: this.createdBy,\n created: this.created,\n modifiedBy: this.modifiedBy,\n modified: this.modified,\n control: control.id,\n value: this.getValueByPath(\n [group.name, control.name]\n )\n }));\n });\n });\n this.fields = fields;\n }\n\n /**\n\n * @param {string[]} path path segments\n * @return {void}\n */\n getValueByPath<T extends VasFieldDtoValue>(\n path: string[] = []\n ): T | undefined {\n return getValueByPath(path, this.$this);\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 as any)[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\n if (staticOnly) {\n return {\n id: this.id,\n created: this.created,\n createdBy: this.createdBy,\n modified: this.modified,\n modifiedBy: this.modifiedBy,\n serverCreated: this.serverCreated,\n serverModified: this.serverModified,\n account: this.account,\n accessGroup: this.accessGroup,\n reference: this.reference,\n jobDate: this.jobDate,\n jobStatus: this.jobStatus,\n jobType: this.jobType,\n assigneeId: this.assigneeId,\n formId: this.formId,\n timeZoneOffset: this.timeZoneOffset,\n pendingFields: this.pendingFields,\n childModified: this.childModified,\n version: this.version,\n fields: this.fields,\n files: this.files,\n createdByDisplayName: this.createdByDisplayName,\n modifiedByDisplayName: this.modifiedByDisplayName\n };\n }\n\n const dto = {} as VasJobModelDynamicInterface;\n [...this.staticProperties, ...this.dynamicProperties]\n .forEach(prop =>\n (dto)[prop] = this.$this[prop]);\n\n return dto as any;\n }\n\n /**\n * This method will parse a syntax that allows us to build strings from the\n * values of from the job model. For example if the job model was:\n *\n * {\n * foo: 'bar'\n * }\n *\n * and we pass \"i am foo {foo}\", the result would be:\n *\n * \"i am foo bar\"\n *\n * we can also use moment to parse dates, for example if the job model was:\n *\n * {\n * created: \"2022-01-01T00:00:00+0000\"\n * }\n *\n * and we pass \"{created|date:YY-MM-DD}\", the result would be:\n *\n * \"2022-01-01\"\n *\n * @param {string} value a string with the syntax\n * @param {ParseSyntaxOptions} options\n * @return {string} the results of parsing the syntax on this job\n */\n parseSyntax(\n value: string,\n options: ParseSyntaxOptions = {\n timeZoneOffset: 0\n }\n ): string {\n\n if (!value || typeof value !== 'string') {\n return '';\n }\n return value.replace(/({[^}]*})/g, (match: string, token: string) => {\n const syntax = token.substring(1, token.length - 1);\n\n let [key, filter] = syntax.split('|');\n key = (key || '').trim();\n filter = (filter || '').trim()\n\n let filterName, filterArg: string = '';\n if (filter) {\n const splitIndex = filter.indexOf(':');\n if (splitIndex !== -1) {\n filterName = filter.substring(0, splitIndex);\n filterArg = filter.substring(splitIndex + 1);\n } else {\n filterName = filter;\n filterArg = '';\n }\n filterName = (filterName || '').trim();\n filterArg = (filterArg || '').trim();\n }\n const path = key.split('.');\n const objectKey = path.shift() || '';\n let result = '';\n if (objectKey === 'job') {\n result = (this.getValueByPath(path) || '').toString();\n } else if (objectKey === 'fields') {\n result = (getValueByPath(path, this.getFields2()) || '').toString();\n } else if (objectKey.length) {\n if (options.objects) {\n if (options.objects[objectKey] === undefined) {\n console.debug(\n `objectKey ${objectKey} is not present in options.object`\n );\n result = '';\n } else {\n result = (getValueByPath(path, options.objects[objectKey]) || '')\n .toString();\n }\n } else {\n console.debug(\n `objectKey ${objectKey} was used but options.object is not set`\n );\n return '';\n }\n } else {\n return '';\n }\n\n\n if (filterName && result) {\n switch (filterName) {\n case 'date': {\n return moment(result)\n .utcOffset(options.timeZoneOffset)\n .format(filterArg || '');\n }\n default: {\n console.warn('unknown filter %s', filterName);\n }\n }\n }\n\n return result;\n }).trim();\n };\n\n /**\n * @return {object}\n */\n override toApiDto(): Record<string, string | number | boolean> {\n return {\n ...super.toApiDto(),\n reference: this.reference || '~',\n jobDate: this.jobDate || '~',\n jobType: this.jobType || '~',\n accessGroup: this.accessGroup || '~',\n jobStatus: this.jobStatus || '~',\n assigneeId: this.assigneeId || '~',\n timeZoneOffset: this.timeZoneOffset || 0,\n pendingFields: this.pendingFields || 0,\n };\n }\n}\n"]}
|
|
@@ -1 +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,
|
|
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,YA+DnB,CAAC"}
|
|
@@ -1 +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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;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 dynamicDescriptor: '',\n indexName: '',\n pipelineName: '',\n config: '',\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"]}
|
|
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,iBAAiB,EAAE,EAAE;IACrB,SAAS,EAAE,EAAE;IACb,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,EAAE;IACV,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,gBAAgB,EAAE,EAAE;oBACpB,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 dynamicDescriptor: '',\n indexName: '',\n pipelineName: '',\n config: '',\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 descriptionImage: '',\n defaultValue: '',\n config: '',\n }\n ],\n scoreWeight: 1,\n }\n ],\n} as VasFormDto;\n"]}
|