@churchillliving/se-ui-toolkit 6.53.451 → 6.53.453
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 +17 -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 +5 -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 +16 -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;
|
|
8976
8985
|
var fileData = new FormData();
|
|
8977
8986
|
var chooseFile = false;
|
|
8978
8987
|
for (var i = 0; i < files.length; i++) {
|
|
@@ -8985,8 +8994,8 @@
|
|
|
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.azureContainer) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
8989
|
-
fileData.append('azureContainer', (
|
|
8997
|
+
else if (this.fields && (((_c = this.fields.azureContainer) === null || _c === void 0 ? void 0 : _c.length) > 0 || ((_d = this.fields.pathSystemConfig) === null || _d === void 0 ? void 0 : _d.length) > 0)) {
|
|
8998
|
+
fileData.append('azureContainer', ((_e = this.fields) === null || _e === void 0 ? void 0 : _e.SetfileTypes) === exports.ESelectFileType.MRT ? (_f = this.fields) === null || _f === void 0 ? void 0 : _f.azureContainer : this.fields.pathSystemConfig);
|
|
8990
8999
|
}
|
|
8991
9000
|
this.requestService.get('/Upload', fileData).subscribe(function (data) {
|
|
8992
9001
|
var _a;
|
|
@@ -8998,8 +9007,8 @@
|
|
|
8998
9007
|
}
|
|
8999
9008
|
_this.fileUrl.emit(data.results);
|
|
9000
9009
|
}
|
|
9001
|
-
}, function (
|
|
9002
|
-
var error =
|
|
9010
|
+
}, function (_g) {
|
|
9011
|
+
var error = _g.error;
|
|
9003
9012
|
_this.alertService.apiError(error);
|
|
9004
9013
|
if (_this.fields.onReturn) {
|
|
9005
9014
|
_this.fields.onReturn(error);
|
|
@@ -10493,13 +10502,12 @@
|
|
|
10493
10502
|
});
|
|
10494
10503
|
return arr;
|
|
10495
10504
|
};
|
|
10496
|
-
CardService.prototype.setFileUploadData = function (response, dynamicForm, id, uploadImgBaseUrlDev) {
|
|
10505
|
+
CardService.prototype.setFileUploadData = function (response, dynamicForm, id, containerName, uploadImgBaseUrlDev) {
|
|
10497
10506
|
var _a;
|
|
10498
10507
|
if (response) {
|
|
10499
10508
|
response.forEach(function (res) {
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
res['blobFileUrl'] = uploadImgBaseUrlDev + ((_b = res.azureContainer.name) === null || _b === void 0 ? void 0 : _b.toLowerCase()) + '/' + res.actualFileName;
|
|
10509
|
+
if (res.fileExtension !== ".mrt" && containerName && uploadImgBaseUrlDev) {
|
|
10510
|
+
res['blobFileUrl'] = uploadImgBaseUrlDev + '/' + containerName + '/' + res.actualFileName;
|
|
10503
10511
|
}
|
|
10504
10512
|
});
|
|
10505
10513
|
(_a = dynamicForm.formSections) === null || _a === void 0 ? void 0 : _a.forEach(function (x) {
|