@bindu-dashing/dam-solution-v2 5.9.236 → 5.9.237
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.
|
@@ -153,7 +153,7 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
153
153
|
fetchClientData();
|
|
154
154
|
}, [isEditMode, existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.brandId, existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.subdomain, api, form]);
|
|
155
155
|
const onFinish = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
156
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
156
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
157
157
|
try {
|
|
158
158
|
setLoading(true);
|
|
159
159
|
let response;
|
|
@@ -240,8 +240,8 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
240
240
|
payload.adminTeams = adminTeamsAsStrings;
|
|
241
241
|
if (((_a = data.showFilePreview) !== null && _a !== void 0 ? _a : false) !== get(clientData, "showFilePreview", false))
|
|
242
242
|
payload.showFilePreview = (_b = data.showFilePreview) !== null && _b !== void 0 ? _b : false;
|
|
243
|
-
if (((_c = data.showEditImagePicker) !== null && _c !== void 0 ? _c : false) !== get(clientData, "showEditImagePicker", false))
|
|
244
|
-
payload.showEditImagePicker = (
|
|
243
|
+
if (((_c = data.showEditImagePicker) !== null && _c !== void 0 ? _c : false) !== ((_d = get(clientData, "showEditImagePicker")) !== null && _d !== void 0 ? _d : get(clientData, "ShowEditImagepicker", false)))
|
|
244
|
+
payload.showEditImagePicker = (_e = data.showEditImagePicker) !== null && _e !== void 0 ? _e : false;
|
|
245
245
|
if (teamsApiDetailsChanged)
|
|
246
246
|
payload.teamsApiDetails = {
|
|
247
247
|
teamsApi: newTeamsApiDetails.teamsApi || "",
|
|
@@ -287,7 +287,7 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
287
287
|
locationType: "INTERNAL",
|
|
288
288
|
rootPath: formDamLocation === null || formDamLocation === void 0 ? void 0 : formDamLocation.rootPath,
|
|
289
289
|
};
|
|
290
|
-
const values = Object.assign(Object.assign({}, data), { adminTeams: adminTeamsAsStrings, showFilePreview: (
|
|
290
|
+
const values = Object.assign(Object.assign({}, data), { adminTeams: adminTeamsAsStrings, showFilePreview: (_f = data.showFilePreview) !== null && _f !== void 0 ? _f : false, showEditImagePicker: (_g = data.showEditImagePicker) !== null && _g !== void 0 ? _g : false, accessKey: appType == "reactJs"
|
|
291
291
|
? process.env.REACT_APP_MIXDRIVE_CLIENT_PARENT_ACCESS_KEY
|
|
292
292
|
: process.env.NEXT_PUBLIC_MIXDRIVE_CLIENT_PARENT_ACCESS_KEY, secretKey: appType == "reactJs"
|
|
293
293
|
? process.env.REACT_APP_MIXDRIVE_CLIENT_PARENT_SECRET_KEY
|
|
@@ -301,12 +301,12 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
301
301
|
response = yield api.post(CREATE_SUB_BRAND, values);
|
|
302
302
|
}
|
|
303
303
|
setLoading(false);
|
|
304
|
-
showNotification((
|
|
304
|
+
showNotification((_h = response === null || response === void 0 ? void 0 : response.message) !== null && _h !== void 0 ? _h : (get(response, "message") || (isEditMode ? UPDATE_SUCCESS : CREATE_SUCCESS)), NotificationStatus.SUCCESS);
|
|
305
305
|
// Call onSuccess before closing drawer so parent can show its toast (e.g. d1-admin, ThemePage)
|
|
306
306
|
// Parent expects accessKey, secretKey, subdomain - always provide when in edit mode
|
|
307
307
|
if (onSuccess) {
|
|
308
308
|
const successData = isEditMode
|
|
309
|
-
? Object.assign(Object.assign(Object.assign({}, response === null || response === void 0 ? void 0 : response.data), response), { accessKey: (
|
|
309
|
+
? Object.assign(Object.assign(Object.assign({}, response === null || response === void 0 ? void 0 : response.data), response), { accessKey: (_k = (_j = existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.accessKey) !== null && _j !== void 0 ? _j : get(response, "accessKey")) !== null && _k !== void 0 ? _k : get(clientData, "accessKey"), secretKey: (_m = (_l = existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.secretKey) !== null && _l !== void 0 ? _l : get(response, "secretKey")) !== null && _m !== void 0 ? _m : get(clientData, "secretKey"), subdomain: (_q = (_p = (_o = data === null || data === void 0 ? void 0 : data.subdomain) !== null && _o !== void 0 ? _o : existingClientData === null || existingClientData === void 0 ? void 0 : existingClientData.subdomain) !== null && _p !== void 0 ? _p : get(response, "subdomain")) !== null && _q !== void 0 ? _q : get(clientData, "subdomain") }) : (_r = response === null || response === void 0 ? void 0 : response.data) !== null && _r !== void 0 ? _r : response;
|
|
310
310
|
// Guard: parent (e.g. ThemePage.onCreateDamClient) accesses data.accessKey - never pass undefined
|
|
311
311
|
const safeData = successData && typeof successData === "object"
|
|
312
312
|
? successData
|
|
@@ -328,6 +328,7 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
328
328
|
});
|
|
329
329
|
// Populate form when client data and teams are ready
|
|
330
330
|
useEffect(() => {
|
|
331
|
+
var _a;
|
|
331
332
|
if (clientData && Object.keys(clientData).length > 0) {
|
|
332
333
|
const damLocationDetails = get(clientData, "damLocationDetails", {});
|
|
333
334
|
const locationType = get(damLocationDetails, "locationType", "");
|
|
@@ -346,7 +347,7 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
346
347
|
accessTypes: get(clientData, "accessTypes", []),
|
|
347
348
|
adminTeams: adminTeamsFormatted,
|
|
348
349
|
showFilePreview: get(clientData, "showFilePreview", false),
|
|
349
|
-
showEditImagePicker: get(clientData, "showEditImagePicker", false),
|
|
350
|
+
showEditImagePicker: (_a = get(clientData, "showEditImagePicker")) !== null && _a !== void 0 ? _a : get(clientData, "ShowEditImagepicker", false),
|
|
350
351
|
teamsApiDetails: {
|
|
351
352
|
teamsApi: get(teamsApiDetails, "teamsApi", ""),
|
|
352
353
|
username: get(teamsApiDetails, "username", ""),
|
|
@@ -23,10 +23,11 @@ const getEditorType = (file) => {
|
|
|
23
23
|
return null;
|
|
24
24
|
};
|
|
25
25
|
const FilesGridView = ({ files, handleClick, selectedFileIds, isImagePicker, selectedPickerFile, }) => {
|
|
26
|
+
var _a;
|
|
26
27
|
const { type } = useAppParams();
|
|
27
28
|
const damConfig = useDamConfig();
|
|
28
29
|
const brand = get(damConfig, "brand", {});
|
|
29
|
-
const showImagePickerEdit = get(brand, "showEditImagePicker", false);
|
|
30
|
+
const showImagePickerEdit = (_a = get(brand, "showEditImagePicker")) !== null && _a !== void 0 ? _a : get(brand, "ShowEditImagepicker", false);
|
|
30
31
|
const [editState, setEditState] = useState({ editFile: null, showEditModal: false });
|
|
31
32
|
const { editFile, showEditModal } = editState;
|
|
32
33
|
const openEditor = (file) => {
|
|
@@ -102,11 +102,12 @@ const formatMetadataDisplayValue = (value, field, teams) => {
|
|
|
102
102
|
return String(value);
|
|
103
103
|
};
|
|
104
104
|
const FolderListView = ({ folders, foldersFetching, hasNextPage, fetchNextPage, selectedFileIds, selectedFolderIds, setSelectedItems, isImagePicker, setSelectedFile, setParentFolderId, selectedPickerFile, location, assets, sortByKey, sortOrder, setSortOrders, onSearch, searchKey, searchValue, metadataKey, metadataValue, setSelectedKeys, }) => {
|
|
105
|
+
var _a;
|
|
105
106
|
const navigate = useAppNavigate();
|
|
106
107
|
const damConfig = useDamConfig();
|
|
107
108
|
const teams = get(damConfig, "teams", []);
|
|
108
109
|
const brand = get(damConfig, "brand", {});
|
|
109
|
-
const showImagePickerEdit = get(brand, "showEditImagePicker", false);
|
|
110
|
+
const showImagePickerEdit = (_a = get(brand, "showEditImagePicker")) !== null && _a !== void 0 ? _a : get(brand, "ShowEditImagepicker", false);
|
|
110
111
|
const [state, setState] = useState({
|
|
111
112
|
selectedFile: {},
|
|
112
113
|
showPreviewModal: false,
|