@bindu-dashing/dam-solution-v2 5.8.187 → 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 }))] })] }), _jsxs(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: [disabledReason && (_jsxs("p", { className: "md-lib-text-sm md-lib-mb-2 md-lib-mr-2", style: { color: styles === null || styles === void 0 ? void 0 : styles.secondaryTextColor }, children: ["Update disabled: ", disabledReason] })), _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" })] })] })] }) })] }));
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(emailsValue) &&
55
- emailsValue.length > 0 &&
56
- emailsValue.every((e) => get(validateEmail(e), "valid"));
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();
@@ -110,15 +110,18 @@ const FileDetails = ({ open, handleClose, file, files, fileIds, onCloseSelection
110
110
  }
111
111
  }, [open]);
112
112
  // Lock body scroll when preview modal is open so drive page files don't scroll behind it
113
+ // Add body class so host app can lower header z-index and let preview modal appear above it
113
114
  useEffect(() => {
114
115
  if (open && visible) {
115
116
  const prevBodyOverflow = document.body.style.overflow;
116
117
  const prevHtmlOverflow = document.documentElement.style.overflow;
117
118
  document.body.style.overflow = "hidden";
118
119
  document.documentElement.style.overflow = "hidden";
120
+ document.body.classList.add("dam-preview-open");
119
121
  return () => {
120
122
  document.body.style.overflow = prevBodyOverflow;
121
123
  document.documentElement.style.overflow = prevHtmlOverflow;
124
+ document.body.classList.remove("dam-preview-open");
122
125
  };
123
126
  }
124
127
  }, [open, visible]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.187",
3
+ "version": "5.8.189",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",