@bindu-dashing/dam-solution-v2 5.8.188 → 5.8.189
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.
|
@@ -348,12 +348,12 @@ export default function AddFieldProperties({ field, setCurrentFieldIndex, onUpda
|
|
|
348
348
|
InputTypes.TEAM,
|
|
349
349
|
InputTypes.CHECKBOX,
|
|
350
350
|
InputTypes.RADIO,
|
|
351
|
-
], get(currentInputType, "defaultName")) && (_jsx(OptionsField, { field: field, supportedTypes: get(currentInputType, "supportedTypes", []), currentInputType: currentInputType }))] })] }),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
351
|
+
], get(currentInputType, "defaultName")) && (_jsx(OptionsField, { field: field, supportedTypes: get(currentInputType, "supportedTypes", []), currentInputType: currentInputType }))] })] }), _jsx(Form.Item, { className: "md-lib-flex md-lib-flex-col md-lib-items-end md-lib-absolute md-lib-bottom-0 md-lib-right-0 md-lib-pr-4 md-lib-pb-4", children: _jsxs("div", { className: "md-lib-flex md-lib-items-center", children: [_jsx(Button, { color: "primary", variant: "text", onClick: () => {
|
|
352
|
+
if (onCancel && index !== null) {
|
|
353
|
+
onCancel(index);
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
setCurrentFieldIndex(null);
|
|
357
|
+
}
|
|
358
|
+
}, size: "large", children: "Cancel" }), _jsx(Button, { color: "primary", htmlType: "submit", className: "md-lib-ml-2 md-lib-border-primaryColor md-lib-text-primaryColor", size: "large", loading: loading, disabled: !isFormValid || loading, title: disabledReason || undefined, children: "Update" })] }) })] }) })] }));
|
|
359
359
|
}
|
|
@@ -43,7 +43,6 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
|
|
|
43
43
|
const [form] = Form.useForm();
|
|
44
44
|
const emailValue = Form.useWatch("email", form);
|
|
45
45
|
const zipFileUrlValue = Form.useWatch("zip_file_url", form);
|
|
46
|
-
const emailsValue = Form.useWatch("emails", form);
|
|
47
46
|
const isSubmitDisabled = useMemo(() => {
|
|
48
47
|
if (loading)
|
|
49
48
|
return true;
|
|
@@ -51,9 +50,9 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
|
|
|
51
50
|
const hasAssetFile = assetsSourceType === "zip"
|
|
52
51
|
? assetFile && !assetFileError
|
|
53
52
|
: !!(zipFileUrlValue === null || zipFileUrlValue === void 0 ? void 0 : zipFileUrlValue.trim());
|
|
54
|
-
const hasEmails = Array.isArray(
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
const hasEmails = Array.isArray(emailValue) &&
|
|
54
|
+
emailValue.length > 0 &&
|
|
55
|
+
emailValue.every((e) => get(validateEmail(e), "valid"));
|
|
57
56
|
return !hasAssetFile || !hasEmails;
|
|
58
57
|
}
|
|
59
58
|
const hasAssetType = !!assetTypeId;
|
|
@@ -74,7 +73,6 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
|
|
|
74
73
|
assetsSourceType,
|
|
75
74
|
emailValue,
|
|
76
75
|
zipFileUrlValue,
|
|
77
|
-
emailsValue,
|
|
78
76
|
]);
|
|
79
77
|
useEffect(() => {
|
|
80
78
|
onFetchAssetTemplates();
|