@churchillliving/se-ui-toolkit 6.53.451 → 6.53.452
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/bundles/churchillliving-se-ui-toolkit.umd.js +20 -9
- package/bundles/churchillliving-se-ui-toolkit.umd.js.map +1 -1
- package/churchillliving-se-ui-toolkit.metadata.json +1 -1
- package/esm2015/lib/components/base/file-upload/file-upload.component.js +8 -4
- package/esm2015/lib/models/form.model.js +9 -1
- package/esm2015/lib/services/card.service.js +4 -5
- package/esm2015/lib/services/form.service.js +2 -1
- package/fesm2015/churchillliving-se-ui-toolkit.js +19 -8
- package/fesm2015/churchillliving-se-ui-toolkit.js.map +1 -1
- package/lib/models/form.model.d.ts +8 -0
- package/lib/services/card.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -993,6 +993,14 @@
|
|
|
993
993
|
ESelectFileType["PDF"] = ".pdf";
|
|
994
994
|
ESelectFileType["MRT"] = ".mrt";
|
|
995
995
|
})(exports.ESelectFileType || (exports.ESelectFileType = {}));
|
|
996
|
+
exports.ESystemConfig = void 0;
|
|
997
|
+
(function (ESystemConfig) {
|
|
998
|
+
ESystemConfig["FURNITUREITEMPICTUREPATH"] = "FurnitureItemPicutrePath";
|
|
999
|
+
ESystemConfig["FILEROOTPATH"] = "FILEROOTPATH";
|
|
1000
|
+
ESystemConfig["EMPLOYEEPICTUREPATH"] = "EmployeePicutrePath";
|
|
1001
|
+
ESystemConfig["REPORTPATH"] = "ReportPath";
|
|
1002
|
+
ESystemConfig["SUITEPICTUREPATH"] = "SuitePicutrePath";
|
|
1003
|
+
})(exports.ESystemConfig || (exports.ESystemConfig = {}));
|
|
996
1004
|
exports.EValidator = void 0;
|
|
997
1005
|
(function (EValidator) {
|
|
998
1006
|
EValidator["REQUIRED"] = "required";
|
|
@@ -6593,6 +6601,7 @@
|
|
|
6593
6601
|
color: fieldInfo.color,
|
|
6594
6602
|
card: fieldInfo.card,
|
|
6595
6603
|
uniqueKey: fieldInfo.uniqueKey,
|
|
6604
|
+
pathSystemConfig: fieldInfo.pathSystemConfig,
|
|
6596
6605
|
azureContainer: fieldInfo.azureContainer,
|
|
6597
6606
|
class: fieldInfo.class
|
|
6598
6607
|
};
|
|
@@ -8972,7 +8981,7 @@
|
|
|
8972
8981
|
FileUploadComponent.prototype.ngOnInit = function () { };
|
|
8973
8982
|
FileUploadComponent.prototype.uploadFile = function (files) {
|
|
8974
8983
|
var _this = this;
|
|
8975
|
-
var _a, _b, _c, _d;
|
|
8984
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
8976
8985
|
var fileData = new FormData();
|
|
8977
8986
|
var chooseFile = false;
|
|
8978
8987
|
for (var i = 0; i < files.length; i++) {
|
|
@@ -8985,8 +8994,11 @@
|
|
|
8985
8994
|
if (this.fields && ((_a = this.fields.uniqueKey) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
8986
8995
|
fileData.append('uniqueKey', (_b = this.fields) === null || _b === void 0 ? void 0 : _b.uniqueKey);
|
|
8987
8996
|
}
|
|
8988
|
-
else if (this.fields && ((_c = this.fields.
|
|
8989
|
-
fileData.append('
|
|
8997
|
+
else if (this.fields && ((_c = this.fields.pathSystemConfig) === null || _c === void 0 ? void 0 : _c.length) > 0 && ((_d = this.fields) === null || _d === void 0 ? void 0 : _d.SetfileTypes) !== exports.ESelectFileType.MRT) {
|
|
8998
|
+
fileData.append('pathSystemConfig', (_e = this.fields) === null || _e === void 0 ? void 0 : _e.pathSystemConfig);
|
|
8999
|
+
}
|
|
9000
|
+
else if (this.fields && ((_f = this.fields.azureContainer) === null || _f === void 0 ? void 0 : _f.length) > 0 && ((_g = this.fields) === null || _g === void 0 ? void 0 : _g.SetfileTypes) === exports.ESelectFileType.MRT) {
|
|
9001
|
+
fileData.append('azureContainer', (_h = this.fields) === null || _h === void 0 ? void 0 : _h.azureContainer);
|
|
8990
9002
|
}
|
|
8991
9003
|
this.requestService.get('/Upload', fileData).subscribe(function (data) {
|
|
8992
9004
|
var _a;
|
|
@@ -8998,8 +9010,8 @@
|
|
|
8998
9010
|
}
|
|
8999
9011
|
_this.fileUrl.emit(data.results);
|
|
9000
9012
|
}
|
|
9001
|
-
}, function (
|
|
9002
|
-
var error =
|
|
9013
|
+
}, function (_j) {
|
|
9014
|
+
var error = _j.error;
|
|
9003
9015
|
_this.alertService.apiError(error);
|
|
9004
9016
|
if (_this.fields.onReturn) {
|
|
9005
9017
|
_this.fields.onReturn(error);
|
|
@@ -10493,13 +10505,12 @@
|
|
|
10493
10505
|
});
|
|
10494
10506
|
return arr;
|
|
10495
10507
|
};
|
|
10496
|
-
CardService.prototype.setFileUploadData = function (response, dynamicForm, id, uploadImgBaseUrlDev) {
|
|
10508
|
+
CardService.prototype.setFileUploadData = function (response, dynamicForm, id, containerName, uploadImgBaseUrlDev) {
|
|
10497
10509
|
var _a;
|
|
10498
10510
|
if (response) {
|
|
10499
10511
|
response.forEach(function (res) {
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
res['blobFileUrl'] = uploadImgBaseUrlDev + ((_b = res.azureContainer.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) + '/' + res.actualFileName;
|
|
10512
|
+
if (res.fileExtension !== ".mrt" && containerName && uploadImgBaseUrlDev) {
|
|
10513
|
+
res['blobFileUrl'] = uploadImgBaseUrlDev + '/' + containerName + '/' + res.actualFileName;
|
|
10503
10514
|
}
|
|
10504
10515
|
});
|
|
10505
10516
|
(_a = dynamicForm.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (x) {
|