blixify-ui-web 1.2.21 → 1.2.22
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/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +11 -2
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +19 -2
- package/lib/components/data/updateModule.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KASN,MAAM,OAAO,CAAC;AA2Ef,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoC1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KASN,MAAM,OAAO,CAAC;AA2Ef,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoC1B,eAAO,MAAM,YAAY,mFAihVvB,CAAC"}
|
|
@@ -2478,7 +2478,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2478
2478
|
case 0:
|
|
2479
2479
|
_a.trys.push([0, 4, , 5]);
|
|
2480
2480
|
uploadAsset_1 = function (eachImage, selectedField, listObjectId, multiple) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2481
|
-
var uploadedData_1, imageValue, imageCollectionName, imageParentId, fileName, responseData, err_7;
|
|
2481
|
+
var uploadedData_1, hadValidEntries, imageValue, imageCollectionName, imageParentId, fileName, responseData, err_7;
|
|
2482
2482
|
var _a, _b;
|
|
2483
2483
|
return __generator(this, function (_c) {
|
|
2484
2484
|
switch (_c.label) {
|
|
@@ -2493,11 +2493,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2493
2493
|
Array.isArray(selectedField["upload"]))) return [3 /*break*/, 3];
|
|
2494
2494
|
uploadedData_1 = [];
|
|
2495
2495
|
return [4 /*yield*/, Promise.all(selectedField["upload"].map(function (eachField) { return __awaiter(void 0, void 0, void 0, function () {
|
|
2496
|
-
var imageCollectionName, imageParentId, originalFileName, fileName, responseData, uploaded;
|
|
2496
|
+
var fileNameIsValid, imageCollectionName, imageParentId, originalFileName, fileName, responseData, uploaded;
|
|
2497
2497
|
var _a, _b, _c;
|
|
2498
2498
|
return __generator(this, function (_d) {
|
|
2499
2499
|
switch (_d.label) {
|
|
2500
2500
|
case 0:
|
|
2501
|
+
fileNameIsValid = eachField.fileName instanceof File ||
|
|
2502
|
+
(typeof eachField.fileName === "string" &&
|
|
2503
|
+
eachField.fileName.trim() !== "");
|
|
2504
|
+
if (!fileNameIsValid)
|
|
2505
|
+
return [2 /*return*/, null];
|
|
2501
2506
|
imageCollectionName = (_a = eachImage.imageCollectionName) !== null && _a !== void 0 ? _a : "";
|
|
2502
2507
|
if (objectId) {
|
|
2503
2508
|
imageCollectionName += "/".concat(dataId);
|
|
@@ -2543,6 +2548,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
2543
2548
|
}); }))];
|
|
2544
2549
|
case 2:
|
|
2545
2550
|
_c.sent();
|
|
2551
|
+
hadValidEntries = uploadedData_1.length > 0 ||
|
|
2552
|
+
selectedField["upload"].length === 0;
|
|
2553
|
+
if (!hadValidEntries)
|
|
2554
|
+
return [2 /*return*/, selectedField];
|
|
2546
2555
|
return [2 /*return*/, selectedField["data"].concat(uploadedData_1)];
|
|
2547
2556
|
case 3: return [2 /*return*/, selectedField];
|
|
2548
2557
|
case 4: return [3 /*break*/, 8];
|