@nkhang1902/strapi-plugin-export-import-clsx 1.2.9 → 1.2.92

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkhang1902/strapi-plugin-export-import-clsx",
3
- "version": "1.2.9",
3
+ "version": "1.2.92",
4
4
  "description": "A powerful Strapi plugin for exporting and importing data with Excel support and advanced filtering",
5
5
  "main": "./strapi-server.js",
6
6
  "scripts": {
@@ -243,9 +243,10 @@ module.exports = ({ strapi }) => ({
243
243
  "title",
244
244
  "tickerCode",
245
245
  ];
246
- const ALLOWED_JSONB_FIELDS = [
246
+ const ALLOWED_OBJECT_ARRAY_FIELDS = [
247
247
  "meetingTypes",
248
248
  ];
249
+ const ALLOWED_OBJECT_FIELDS = [];
249
250
 
250
251
  for (const [contentType, entries] of Object.entries(data)) {
251
252
  // Clean sheet name (Excel has restrictions)
@@ -277,6 +278,9 @@ module.exports = ({ strapi }) => ({
277
278
 
278
279
  function handleObject(key, value) {
279
280
  if (!value) return;
281
+ if (ALLOWED_OBJECT_ARRAY_FIELDS.includes(key)) {
282
+ return value.join("|");
283
+ }
280
284
  if (relationFields.includes(key)) {
281
285
  for (const field of SHORTCUT_FIELDS) {
282
286
  if (value[field]) {
@@ -302,7 +306,7 @@ module.exports = ({ strapi }) => ({
302
306
  continue
303
307
  }
304
308
  if (SYSTEM_KEYS.includes(key)) continue;
305
- if (customFields.includes(key) && !ALLOWED_JSONB_FIELDS.includes(key)) continue;
309
+ if (customFields.includes(key) && !ALLOWED_OBJECT_FIELDS.includes(key) && !ALLOWED_OBJECT_ARRAY_FIELDS.includes(key)) continue;
306
310
  if ([...skipFields, "wishlist", "availableSlot"].includes(key))
307
311
  continue;
308
312
 
@@ -319,12 +323,6 @@ module.exports = ({ strapi }) => ({
319
323
  continue;
320
324
  }
321
325
 
322
- if (value !== null && typeof value === "object" && ALLOWED_JSONB_FIELDS.includes(key)) {
323
- console.log(key, value)
324
- result[key] = value.join("|");
325
- continue;
326
- }
327
-
328
326
  if (!Array.isArray(value) && typeof value === "object") {
329
327
  let temp = handleObject(key, value);
330
328
  if (temp !== undefined) {