@ironcode/vas-lib 1.5.2 → 1.7.0
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 +2 -1
- package/cjs/lib/entity/index.d.ts.map +1 -1
- package/cjs/lib/entity/index.js +2 -1
- package/cjs/lib/entity/index.js.map +1 -1
- package/cjs/lib/entity/vas-field.dto.d.ts +3 -0
- package/cjs/lib/entity/vas-field.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-field.dto.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.d.ts +4 -1
- package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-field.model.js +8 -2
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-form-config.dto.d.ts +19 -1
- package/cjs/lib/entity/vas-form-config.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form-config.dto.js.map +1 -1
- package/cjs/lib/entity/vas-form-config.model.d.ts +22 -0
- package/cjs/lib/entity/vas-form-config.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-form-config.model.js +35 -0
- package/cjs/lib/entity/vas-form-config.model.js.map +1 -0
- package/cjs/lib/entity/vas-form.model.d.ts +3 -2
- package/cjs/lib/entity/vas-form.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form.model.js +3 -2
- package/cjs/lib/entity/vas-form.model.js.map +1 -1
- package/cjs/lib/entity/vas-instruction-provider.dto.d.ts +1 -0
- package/cjs/lib/entity/vas-instruction-provider.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-instruction-provider.dto.js.map +1 -1
- package/cjs/lib/entity/vas-instruction-provider.model.d.ts +2 -1
- package/cjs/lib/entity/vas-instruction-provider.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-instruction-provider.model.js +6 -4
- package/cjs/lib/entity/vas-instruction-provider.model.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.d.ts +5 -3
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +5 -2
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/package.json +8 -13
- package/esm2020/lib/entity/index.mjs +3 -2
- package/esm2020/lib/entity/vas-field.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-field.model.mjs +9 -3
- package/esm2020/lib/entity/vas-form-config.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-form-config.model.mjs +31 -0
- package/esm2020/lib/entity/vas-form.model.mjs +4 -3
- package/esm2020/lib/entity/vas-instruction-provider.dto.mjs +1 -1
- package/esm2020/lib/entity/vas-instruction-provider.model.mjs +8 -5
- package/esm2020/lib/entity/vas-job.model.mjs +6 -3
- package/fesm2015/ironcode-vas-lib.mjs +53 -11
- package/fesm2015/ironcode-vas-lib.mjs.map +1 -1
- package/fesm2020/ironcode-vas-lib.mjs +54 -11
- package/fesm2020/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/index.d.ts +2 -1
- package/lib/entity/vas-field.dto.d.ts +3 -0
- package/lib/entity/vas-field.model.d.ts +4 -1
- package/lib/entity/vas-form-config.dto.d.ts +19 -1
- package/lib/entity/vas-form-config.model.d.ts +21 -0
- package/lib/entity/vas-form.model.d.ts +3 -2
- package/lib/entity/vas-instruction-provider.dto.d.ts +1 -0
- package/lib/entity/vas-instruction-provider.model.d.ts +2 -1
- package/lib/entity/vas-job.model.d.ts +5 -3
- package/package.json +1 -1
|
@@ -637,7 +637,7 @@ class VasJobDataModel extends VasAccountObjectModel {
|
|
|
637
637
|
* VasFieldModel
|
|
638
638
|
*/
|
|
639
639
|
class VasFieldModel extends VasJobDataModel {
|
|
640
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, control, fieldJobPointers, value, version) {
|
|
640
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job, control, fieldJobPointers, value, version, controlName, controlTitle, controlTypeName) {
|
|
641
641
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, job);
|
|
642
642
|
this.id = id;
|
|
643
643
|
this.created = created;
|
|
@@ -654,13 +654,16 @@ class VasFieldModel extends VasJobDataModel {
|
|
|
654
654
|
this.fieldJobPointers = fieldJobPointers;
|
|
655
655
|
this.value = value;
|
|
656
656
|
this.version = version;
|
|
657
|
+
this.controlName = controlName;
|
|
658
|
+
this.controlTitle = controlTitle;
|
|
659
|
+
this.controlTypeName = controlTypeName;
|
|
657
660
|
}
|
|
658
661
|
/**
|
|
659
662
|
* @param {VasFieldDto} fieldDto
|
|
660
663
|
* @return {VasFieldModel}
|
|
661
664
|
*/
|
|
662
665
|
static fromDto(fieldDto) {
|
|
663
|
-
return new VasFieldModel(fieldDto.id || '', fieldDto.created || '', fieldDto.serverCreated || '', fieldDto.createdBy || '', fieldDto.modified || '', fieldDto.serverModified || '', fieldDto.modifiedBy || '', fieldDto.createdByName || '', fieldDto.modifiedByName || '', fieldDto.account || '', fieldDto.job || '', fieldDto.control || '', fieldDto.fieldJobPointers || [], fieldDto.value || '', fieldDto.version || 0);
|
|
666
|
+
return new VasFieldModel(fieldDto.id || '', fieldDto.created || '', fieldDto.serverCreated || '', fieldDto.createdBy || '', fieldDto.modified || '', fieldDto.serverModified || '', fieldDto.modifiedBy || '', fieldDto.createdByName || '', fieldDto.modifiedByName || '', fieldDto.account || '', fieldDto.job || '', fieldDto.control || '', fieldDto.fieldJobPointers || [], fieldDto.value || '', fieldDto.version || 0, fieldDto.controlName || '', fieldDto.controlTitle || '', fieldDto.controlTypeName || '');
|
|
664
667
|
}
|
|
665
668
|
/**
|
|
666
669
|
* @return {VasFieldDto}
|
|
@@ -682,6 +685,9 @@ class VasFieldModel extends VasJobDataModel {
|
|
|
682
685
|
fieldJobPointers: this.fieldJobPointers,
|
|
683
686
|
value: this.value,
|
|
684
687
|
version: this.version,
|
|
688
|
+
controlName: this.controlName,
|
|
689
|
+
controlTitle: this.controlTitle,
|
|
690
|
+
controlTypeName: this.controlTypeName,
|
|
685
691
|
};
|
|
686
692
|
}
|
|
687
693
|
/**
|
|
@@ -951,6 +957,37 @@ class VasGroupModel extends VasRestrictedAccountObjectModel {
|
|
|
951
957
|
}
|
|
952
958
|
}
|
|
953
959
|
|
|
960
|
+
class VasFormConfigModel {
|
|
961
|
+
constructor(emailRecipients, actions) {
|
|
962
|
+
this.emailRecipients = emailRecipients;
|
|
963
|
+
this.actions = actions;
|
|
964
|
+
}
|
|
965
|
+
toDto() {
|
|
966
|
+
return {
|
|
967
|
+
emailRecipients: this.emailRecipients,
|
|
968
|
+
actions: this.actions
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
toJsonString() {
|
|
972
|
+
return JSON.stringify(this.toDto());
|
|
973
|
+
}
|
|
974
|
+
static create() {
|
|
975
|
+
return new VasFormConfigModel();
|
|
976
|
+
}
|
|
977
|
+
static fromDto(dto) {
|
|
978
|
+
return new VasFormConfigModel(dto.emailRecipients, dto.actions);
|
|
979
|
+
}
|
|
980
|
+
static fromJsonString(value) {
|
|
981
|
+
try {
|
|
982
|
+
const dto = JSON.parse(value || '{}');
|
|
983
|
+
return VasFormConfigModel.fromDto(dto);
|
|
984
|
+
}
|
|
985
|
+
catch (e) {
|
|
986
|
+
return VasFormConfigModel.create();
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
954
991
|
/**
|
|
955
992
|
* VasFormModel
|
|
956
993
|
*/
|
|
@@ -1032,7 +1069,7 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
1032
1069
|
static fromDto(dto) {
|
|
1033
1070
|
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 || [])
|
|
1034
1071
|
.sort((a, b) => a.sequence - b.sequence)
|
|
1035
|
-
.map(g => VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', dto.config
|
|
1072
|
+
.map(g => VasGroupModel.fromDto(g)), dto.dynamicDescriptor || '', dto.indexName || '', dto.pipelineName || '', VasFormConfigModel.fromJsonString(dto.config), dto.geoLocationEnabled || false, dto.filesEnabled || false);
|
|
1036
1073
|
}
|
|
1037
1074
|
/**
|
|
1038
1075
|
* @param {string} id
|
|
@@ -1126,7 +1163,7 @@ class VasFormModel extends VasRestrictedAccountObjectModel {
|
|
|
1126
1163
|
dynamicDescriptor: this.dynamicDescriptor,
|
|
1127
1164
|
indexName: this.indexName,
|
|
1128
1165
|
pipelineName: this.pipelineName,
|
|
1129
|
-
config: this.config,
|
|
1166
|
+
config: this.config.toJsonString(),
|
|
1130
1167
|
geoLocationEnabled: this.geoLocationEnabled,
|
|
1131
1168
|
filesEnabled: this.filesEnabled
|
|
1132
1169
|
};
|
|
@@ -1469,7 +1506,7 @@ class VasInstructionJobModel extends VasBaseModel {
|
|
|
1469
1506
|
* VasInstructionProviderModel
|
|
1470
1507
|
*/
|
|
1471
1508
|
class VasInstructionProviderModel extends VasAccountObjectModel {
|
|
1472
|
-
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, form, title, secret, portalEnabled) {
|
|
1509
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, form, title, secret, portalEnabled, portalVisible) {
|
|
1473
1510
|
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
1474
1511
|
this.id = id;
|
|
1475
1512
|
this.created = created;
|
|
@@ -1485,6 +1522,7 @@ class VasInstructionProviderModel extends VasAccountObjectModel {
|
|
|
1485
1522
|
this.title = title;
|
|
1486
1523
|
this.secret = secret;
|
|
1487
1524
|
this.portalEnabled = portalEnabled;
|
|
1525
|
+
this.portalVisible = portalVisible;
|
|
1488
1526
|
}
|
|
1489
1527
|
/**
|
|
1490
1528
|
* @param dto VasInstructionDto
|
|
@@ -1493,7 +1531,7 @@ class VasInstructionProviderModel extends VasAccountObjectModel {
|
|
|
1493
1531
|
static fromDto(dto) {
|
|
1494
1532
|
return new VasInstructionProviderModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.form ?
|
|
1495
1533
|
VasFormModel.fromDto(dto.form) :
|
|
1496
|
-
VasFormModel.empty(), dto.title || '', dto.secret || '', dto.portalEnabled || false);
|
|
1534
|
+
VasFormModel.empty(), dto.title || '', dto.secret || '', dto.portalEnabled || false, dto.portalVisible || true);
|
|
1497
1535
|
}
|
|
1498
1536
|
/**
|
|
1499
1537
|
* @returns VasNoteDto
|
|
@@ -1513,7 +1551,8 @@ class VasInstructionProviderModel extends VasAccountObjectModel {
|
|
|
1513
1551
|
form: this.form.toDto(),
|
|
1514
1552
|
title: this.title,
|
|
1515
1553
|
secret: this.secret,
|
|
1516
|
-
portalEnabled: this.portalEnabled
|
|
1554
|
+
portalEnabled: this.portalEnabled,
|
|
1555
|
+
portalVisible: this.portalVisible
|
|
1517
1556
|
};
|
|
1518
1557
|
}
|
|
1519
1558
|
toApiDto(options) {
|
|
@@ -1521,7 +1560,8 @@ class VasInstructionProviderModel extends VasAccountObjectModel {
|
|
|
1521
1560
|
...super.toApiDto(options),
|
|
1522
1561
|
title: this.title,
|
|
1523
1562
|
form: this.form.id,
|
|
1524
|
-
portalEnabled: this.portalEnabled
|
|
1563
|
+
portalEnabled: this.portalEnabled,
|
|
1564
|
+
portalVisible: this.portalVisible
|
|
1525
1565
|
};
|
|
1526
1566
|
}
|
|
1527
1567
|
}
|
|
@@ -1843,8 +1883,10 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1843
1883
|
/**
|
|
1844
1884
|
* Will return an object whose keys are the names of all fields in the job.
|
|
1845
1885
|
* This method is similar to `getFields` except that this method will only
|
|
1846
|
-
* return values where a value was set, as opposed to `getFields` which
|
|
1847
|
-
* return a
|
|
1886
|
+
* return values where a value was set, as opposed to `getFields` which will
|
|
1887
|
+
* return a value for every control even if not value was set, because it uses
|
|
1888
|
+
* the form to drive the logic. Note also this method will return values for
|
|
1889
|
+
* any Fields in the fields array.
|
|
1848
1890
|
* @return {Record<string, VasFieldDtoValue>}
|
|
1849
1891
|
*/
|
|
1850
1892
|
getFields2() {
|
|
@@ -1857,6 +1899,7 @@ class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
1857
1899
|
fields[controlName] = this.getValueByPath([groupName, controlName]);
|
|
1858
1900
|
});
|
|
1859
1901
|
}, {});
|
|
1902
|
+
this.fields.forEach(field => fields[field.controlName] = field.value);
|
|
1860
1903
|
return fields;
|
|
1861
1904
|
}
|
|
1862
1905
|
/**
|
|
@@ -2401,5 +2444,5 @@ class VasVehicleModel extends VasAccountObjectModel {
|
|
|
2401
2444
|
* Generated bundle index. Do not edit.
|
|
2402
2445
|
*/
|
|
2403
2446
|
|
|
2404
|
-
export { VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormModel, VasGroupModel, VasInstructionJobFieldModel, VasInstructionJobModel, VasInstructionModel, VasInstructionProviderModel, VasInvitationModel, VasInvitationTypeEnum, VasJobDataModel, VasJobEmailModel, VasJobModel, VasMembershipModel, VasNoteModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasUserModel, VasVehicleModel, getEmptyGeoLocation, isCameraControlValueV1, isFileDto };
|
|
2447
|
+
export { VasAccountIndexingMode, VasAccountObjectModel, VasBaseModel, VasBranchModel, VasContactModel, VasControlConfigDirection, VasControlModel, VasControlTypeModel, VasFieldModel, VasFileModel, VasFireUserModel, VasFormConfigModel, VasFormModel, VasGroupModel, VasInstructionJobFieldModel, VasInstructionJobModel, VasInstructionModel, VasInstructionProviderModel, VasInvitationModel, VasInvitationTypeEnum, VasJobDataModel, VasJobEmailModel, VasJobModel, VasMembershipModel, VasNoteModel, VasReportLayoutModel, VasReportModel, VasReportRequestModel, VasRestrictedAccountObjectModel, VasUserModel, VasVehicleModel, getEmptyGeoLocation, isCameraControlValueV1, isFileDto };
|
|
2405
2448
|
//# sourceMappingURL=ironcode-vas-lib.mjs.map
|