@bindu-dashing/dam-solution-v2 5.8.164 → 5.8.166

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.
@@ -184,7 +184,11 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
184
184
  const finalTeamsApi = teamsApiDetailsFromData.teamsApi || teamsApi;
185
185
  const finalUsername = teamsApiDetailsFromData.username || username;
186
186
  const finalPassword = teamsApiDetailsFromData.password || password;
187
- const values = Object.assign(Object.assign({}, data), { showFilePreview: (_a = data.showFilePreview) !== null && _a !== void 0 ? _a : false, accessKey: appType == "reactJs"
187
+ // Convert adminTeams to strings for API (API expects strings like ["547"] not numbers like [547])
188
+ const adminTeamsAsStrings = Array.isArray(data.adminTeams)
189
+ ? data.adminTeams.map((team) => String(team))
190
+ : [];
191
+ const values = Object.assign(Object.assign({}, data), { adminTeams: adminTeamsAsStrings, showFilePreview: (_a = data.showFilePreview) !== null && _a !== void 0 ? _a : false, accessKey: appType == "reactJs"
188
192
  ? process.env.REACT_APP_MIXDRIVE_CLIENT_PARENT_ACCESS_KEY
189
193
  : process.env.NEXT_PUBLIC_MIXDRIVE_CLIENT_PARENT_ACCESS_KEY, secretKey: appType == "reactJs"
190
194
  ? process.env.REACT_APP_MIXDRIVE_CLIENT_PARENT_SECRET_KEY
@@ -114,7 +114,6 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
114
114
  const formData = new FormData();
115
115
  formData.append("assetId", values === null || values === void 0 ? void 0 : values.asset_type_id);
116
116
  formData.append("rejectInvalidMetaFile", (values === null || values === void 0 ? void 0 : values.reject_invalid_meta_file) ? "true" : "false");
117
- formData.append("zipFileUrl", values === null || values === void 0 ? void 0 : values.zip_file_url);
118
117
  formData.append("file", metaFile);
119
118
  formData.append("folderId", folderId);
120
119
  formData.append("email", values === null || values === void 0 ? void 0 : values.email);
@@ -122,6 +121,9 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
122
121
  if (key) {
123
122
  formData.append("zipFileKey", key);
124
123
  }
124
+ else if (assetsSourceType === "zipUrl") {
125
+ formData.append("zipFileUrl", (values === null || values === void 0 ? void 0 : values.zip_file_url) || "");
126
+ }
125
127
  response = yield api.post(BULK_UPLOAD_URL, formData);
126
128
  }
127
129
  // console.log(response);
@@ -206,7 +208,7 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
206
208
  }, disabled: !assetTypeId, onRemove: () => {
207
209
  setMetaFile(null);
208
210
  setFileError("Meta File is required");
209
- }, accept: ".csv,.xlsx,.xls", maxCount: 1, children: _jsx(Button, { icon: _jsx(UploadOutlined, {}), disabled: !assetTypeId, children: "Upload" }) }) }), fileError && (_jsx(Typography.Text, { style: { color: "red" }, children: fileError })), _jsx(Form.Item, { name: "reject_invalid_meta_file", valuePropName: "checked", children: _jsxs(Checkbox, { name: "reject_invalid_meta_file", children: ["Reject invalid meta file", _jsx(Popover, { content: _jsxs("span", { style: { color: "grey", padding: "5px" }, children: ["When this option is selected the uploaded metadata", _jsx("br", {}), " file will be rejected if it contains invalid values"] }), children: _jsx(QuestionCircleOutlined, { style: { marginLeft: "5px", color: "silver" } }) })] }) })] })), _jsx(Form.Item, { label: "Upload your DAM Files (must be zipped)", name: "assets_source_type", children: _jsxs(Radio.Group, { onChange: (e) => setAssetsSourceType(e.target.value), value: assetsSourceType, disabled: thumbnailsOnly ? false : !assetTypeId, children: [_jsx(Radio, { value: "zip", children: "Zip file" }), _jsx(Radio, { value: "zipUrl", children: "Zip file url" })] }) }), assetsSourceType == "zip" ? (_jsxs(_Fragment, { children: [_jsx(Form.Item, { label: "Assets zip file", name: "assets_zip_file", rules: [
211
+ }, accept: ".csv,.xlsx,.xls", maxCount: 1, children: _jsx(Button, { icon: _jsx(UploadOutlined, {}), disabled: !assetTypeId, children: "Upload" }) }) }), fileError && (_jsx(Typography.Text, { style: { color: "red" }, children: fileError }))] })), _jsx(Form.Item, { label: "Upload your DAM Files (must be zipped)", name: "assets_source_type", children: _jsxs(Radio.Group, { onChange: (e) => setAssetsSourceType(e.target.value), value: assetsSourceType, disabled: thumbnailsOnly ? false : !assetTypeId, children: [_jsx(Radio, { value: "zip", children: "Zip file" }), _jsx(Radio, { value: "zipUrl", children: "Zip file url" })] }) }), assetsSourceType == "zip" ? (_jsxs(_Fragment, { children: [_jsx(Form.Item, { label: "Assets zip file", name: "assets_zip_file", rules: [
210
212
  {
211
213
  required: true,
212
214
  message: "Asset zip file is required",
@@ -271,7 +273,7 @@ const BulkUploadModal = ({ toggleUpload, userEmail, folderId, thumbnailsOnly, })
271
273
  required: true,
272
274
  message: "Email is required",
273
275
  },
274
- ], children: _jsx(Input, { placeholder: "Email", disabled: !assetTypeId }) })), _jsx(Form.Item, { children: _jsx(Button, { block: true, type: "primary", htmlType: "submit", style: {
276
+ ], children: _jsx(Input, { placeholder: "Email", disabled: !assetTypeId }) })), !thumbnailsOnly && (_jsx(Form.Item, { name: "reject_invalid_meta_file", valuePropName: "checked", children: _jsxs(Checkbox, { name: "reject_invalid_meta_file", children: ["Reject invalid meta file", _jsx(Popover, { content: _jsxs("span", { style: { color: "grey", padding: "5px" }, children: ["When this option is selected the uploaded metadata", _jsx("br", {}), " file will be rejected if it contains invalid values"] }), children: _jsx(QuestionCircleOutlined, { style: { marginLeft: "5px", color: "silver" } }) })] }) })), _jsx(Form.Item, { children: _jsx(Button, { block: true, type: "primary", htmlType: "submit", style: {
275
277
  marginBottom: "10px",
276
278
  backgroundColor: styles === null || styles === void 0 ? void 0 : styles.primaryColor,
277
279
  }, loading: loading, disabled: thumbnailsOnly ? false : !assetTypeId, children: "Submit" }) })] }) }));
@@ -26,8 +26,6 @@ export function fetchBrandDetails(api, brandId) {
26
26
  return __awaiter(this, void 0, void 0, function* () {
27
27
  try {
28
28
  const response = yield api.get(FETCH_BRAND_DETAILS_URL.replace(":brandId", brandId));
29
- // API response structure: { status: true, code: 200, data: { ... } }
30
- // The axios interceptor already extracts response.data, so response is { status, code, data }
31
29
  return get(response, "data", {});
32
30
  }
33
31
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.164",
3
+ "version": "5.8.166",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",