@commercetools-frontend-extensions/export-resources-modal 4.4.6 → 4.5.0
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/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +90 -6
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +90 -6
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +90 -6
- package/dist/declarations/src/@constants/exportable-resources.d.ts +3 -0
- package/dist/declarations/src/@types/export-resources-modal-types.d.ts +2 -2
- package/dist/declarations/src/@types/resource-type.d.ts +2 -2
- package/package.json +14 -14
|
@@ -244,6 +244,11 @@ var messages = reactIntl.defineMessages({
|
|
|
244
244
|
description: 'Label for Export Selected categories',
|
|
245
245
|
defaultMessage: 'Export selected: {total} categories'
|
|
246
246
|
},
|
|
247
|
+
exportScopeFilteredCategories: {
|
|
248
|
+
id: 'ExportResourcesModal.exportScopeFilteredCategories',
|
|
249
|
+
description: 'Label for Export Filtered categories',
|
|
250
|
+
defaultMessage: 'Export filtered: {total} categories'
|
|
251
|
+
},
|
|
247
252
|
exportScopeAllProducts: {
|
|
248
253
|
id: 'ExportResourcesModal.exportScopeAllProducts',
|
|
249
254
|
description: 'Label for Export All products',
|
|
@@ -254,6 +259,26 @@ var messages = reactIntl.defineMessages({
|
|
|
254
259
|
description: 'Label for Export Selected products',
|
|
255
260
|
defaultMessage: 'Export selected: {total} products'
|
|
256
261
|
},
|
|
262
|
+
exportScopeFilteredProducts: {
|
|
263
|
+
id: 'ExportResourcesModal.exportScopeFilteredProducts',
|
|
264
|
+
description: 'Label for Export Filtered products',
|
|
265
|
+
defaultMessage: 'Export filtered: {total} products'
|
|
266
|
+
},
|
|
267
|
+
exportScopeAllProductTypes: {
|
|
268
|
+
id: 'ExportResourcesModal.exportScopeAllProductTypes',
|
|
269
|
+
description: 'Label for Export All product types',
|
|
270
|
+
defaultMessage: 'Export all: {total} product types'
|
|
271
|
+
},
|
|
272
|
+
exportScopeSelectedProductTypes: {
|
|
273
|
+
id: 'ExportResourcesModal.exportScopeSelectedProductTypes',
|
|
274
|
+
description: 'Label for Export Selected product types',
|
|
275
|
+
defaultMessage: 'Export selected: {total} product types'
|
|
276
|
+
},
|
|
277
|
+
exportScopeFilteredProductTypes: {
|
|
278
|
+
id: 'ExportResourcesModal.exportScopeFilteredProductTypes',
|
|
279
|
+
description: 'Label for Export Filtered product types',
|
|
280
|
+
defaultMessage: 'Export filtered: {total} product types'
|
|
281
|
+
},
|
|
257
282
|
exportScopeAllInventories: {
|
|
258
283
|
id: 'ExportResourcesModal.exportScopeAllInventories',
|
|
259
284
|
description: 'Label for Export All inventories',
|
|
@@ -264,6 +289,11 @@ var messages = reactIntl.defineMessages({
|
|
|
264
289
|
description: 'Label for Export Selected inventories',
|
|
265
290
|
defaultMessage: 'Export selected: {total} inventories'
|
|
266
291
|
},
|
|
292
|
+
exportScopeFilteredInventories: {
|
|
293
|
+
id: 'ExportResourcesModal.exportScopeFilteredInventories',
|
|
294
|
+
description: 'Label for Export Filtered inventories',
|
|
295
|
+
defaultMessage: 'Export filtered: {total} inventories'
|
|
296
|
+
},
|
|
267
297
|
exportScopeAllDiscountCodes: {
|
|
268
298
|
id: 'ExportResourcesModal.exportScopeAllDiscountCodes',
|
|
269
299
|
description: 'Label for Export All discount codes',
|
|
@@ -276,9 +306,39 @@ var messages = reactIntl.defineMessages({
|
|
|
276
306
|
},
|
|
277
307
|
exportScopeFilteredDiscountCodes: {
|
|
278
308
|
id: 'ExportResourcesModal.exportScopeFilteredDiscountCodes',
|
|
279
|
-
description: 'Label for Export
|
|
309
|
+
description: 'Label for Export Filtered discount codes',
|
|
280
310
|
defaultMessage: 'Export filtered: {total} discount codes'
|
|
281
311
|
},
|
|
312
|
+
exportScopeAllOrders: {
|
|
313
|
+
id: 'ExportResourcesModal.exportScopeAllOrders',
|
|
314
|
+
description: 'Label for Export All orders',
|
|
315
|
+
defaultMessage: 'Export all: {total} orders'
|
|
316
|
+
},
|
|
317
|
+
exportScopeSelectedOrders: {
|
|
318
|
+
id: 'ExportResourcesModal.exportScopeSelectedOrders',
|
|
319
|
+
description: 'Label for Export Selected orders',
|
|
320
|
+
defaultMessage: 'Export selected: {total} orders'
|
|
321
|
+
},
|
|
322
|
+
exportScopeFilteredOrders: {
|
|
323
|
+
id: 'ExportResourcesModal.exportScopeFilteredOrders',
|
|
324
|
+
description: 'Label for Export Filtered orders',
|
|
325
|
+
defaultMessage: 'Export filtered: {total} orders'
|
|
326
|
+
},
|
|
327
|
+
exportScopeAllCustomers: {
|
|
328
|
+
id: 'ExportResourcesModal.exportScopeAllCustomers',
|
|
329
|
+
description: 'Label for Export All customers',
|
|
330
|
+
defaultMessage: 'Export all: {total} customers'
|
|
331
|
+
},
|
|
332
|
+
exportScopeSelectedCustomers: {
|
|
333
|
+
id: 'ExportResourcesModal.exportScopeSelectedCustomers',
|
|
334
|
+
description: 'Label for Export Selected customers',
|
|
335
|
+
defaultMessage: 'Export selected: {total} customers'
|
|
336
|
+
},
|
|
337
|
+
exportScopeFilteredCustomers: {
|
|
338
|
+
id: 'ExportResourcesModal.exportScopeFilteredCustomers',
|
|
339
|
+
description: 'Label for Export Filtered customers',
|
|
340
|
+
defaultMessage: 'Export filtered: {total} customers'
|
|
341
|
+
},
|
|
282
342
|
exportScopeSelectedWithoutCount: {
|
|
283
343
|
id: 'ExportResourcesModal.exportScopeSelectedWithoutCount',
|
|
284
344
|
description: 'Label for Export Selected without count',
|
|
@@ -342,8 +402,11 @@ const EXPORT_TYPES = {
|
|
|
342
402
|
const EXPORTABLE_RESOURCES = {
|
|
343
403
|
CATEGORY: 'category',
|
|
344
404
|
PRODUCT: 'product',
|
|
405
|
+
PRODUCT_TYPE: 'product-type',
|
|
345
406
|
DISCOUNT_CODE: 'discount-code',
|
|
346
|
-
INVENTORY_ENTRY: 'inventory-entry'
|
|
407
|
+
INVENTORY_ENTRY: 'inventory-entry',
|
|
408
|
+
ORDER: 'order',
|
|
409
|
+
CUSTOMER: 'customer'
|
|
347
410
|
};
|
|
348
411
|
|
|
349
412
|
const OUTPUT_FORMATS = {
|
|
@@ -361,20 +424,38 @@ const OUTPUT_FORMAT_OPTIONS = [{
|
|
|
361
424
|
const resourceTypeMessages = {
|
|
362
425
|
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
363
426
|
exportScopeAll: messages.exportScopeAllCategories,
|
|
364
|
-
exportScopeSelected: messages.exportScopeSelectedCategories
|
|
427
|
+
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
428
|
+
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
365
429
|
},
|
|
366
430
|
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
367
431
|
exportScopeAll: messages.exportScopeAllProducts,
|
|
368
|
-
exportScopeSelected: messages.exportScopeSelectedProducts
|
|
432
|
+
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
433
|
+
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
434
|
+
},
|
|
435
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
436
|
+
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
437
|
+
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
438
|
+
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
369
439
|
},
|
|
370
440
|
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
371
441
|
exportScopeAll: messages.exportScopeAllInventories,
|
|
372
|
-
exportScopeSelected: messages.exportScopeSelectedInventories
|
|
442
|
+
exportScopeSelected: messages.exportScopeSelectedInventories,
|
|
443
|
+
exportScopeFiltered: messages.exportScopeFilteredInventories
|
|
373
444
|
},
|
|
374
445
|
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
375
446
|
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
376
447
|
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
377
448
|
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
449
|
+
},
|
|
450
|
+
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
451
|
+
exportScopeAll: messages.exportScopeAllOrders,
|
|
452
|
+
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
453
|
+
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
454
|
+
},
|
|
455
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
456
|
+
exportScopeAll: messages.exportScopeAllCustomers,
|
|
457
|
+
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
458
|
+
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
378
459
|
}
|
|
379
460
|
};
|
|
380
461
|
|
|
@@ -491,8 +572,11 @@ function resourceTypeToFileName(resourceType) {
|
|
|
491
572
|
const resourceTypeMap = {
|
|
492
573
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
493
574
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
575
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: 'Product_Types',
|
|
494
576
|
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: 'Discount_Codes',
|
|
495
|
-
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories'
|
|
577
|
+
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories',
|
|
578
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: 'Customers',
|
|
579
|
+
[EXPORTABLE_RESOURCES.ORDER]: 'Orders'
|
|
496
580
|
};
|
|
497
581
|
const displayName = resourceTypeMap[resourceType];
|
|
498
582
|
if (!displayName) {
|
|
@@ -244,6 +244,11 @@ var messages = reactIntl.defineMessages({
|
|
|
244
244
|
description: 'Label for Export Selected categories',
|
|
245
245
|
defaultMessage: 'Export selected: {total} categories'
|
|
246
246
|
},
|
|
247
|
+
exportScopeFilteredCategories: {
|
|
248
|
+
id: 'ExportResourcesModal.exportScopeFilteredCategories',
|
|
249
|
+
description: 'Label for Export Filtered categories',
|
|
250
|
+
defaultMessage: 'Export filtered: {total} categories'
|
|
251
|
+
},
|
|
247
252
|
exportScopeAllProducts: {
|
|
248
253
|
id: 'ExportResourcesModal.exportScopeAllProducts',
|
|
249
254
|
description: 'Label for Export All products',
|
|
@@ -254,6 +259,26 @@ var messages = reactIntl.defineMessages({
|
|
|
254
259
|
description: 'Label for Export Selected products',
|
|
255
260
|
defaultMessage: 'Export selected: {total} products'
|
|
256
261
|
},
|
|
262
|
+
exportScopeFilteredProducts: {
|
|
263
|
+
id: 'ExportResourcesModal.exportScopeFilteredProducts',
|
|
264
|
+
description: 'Label for Export Filtered products',
|
|
265
|
+
defaultMessage: 'Export filtered: {total} products'
|
|
266
|
+
},
|
|
267
|
+
exportScopeAllProductTypes: {
|
|
268
|
+
id: 'ExportResourcesModal.exportScopeAllProductTypes',
|
|
269
|
+
description: 'Label for Export All product types',
|
|
270
|
+
defaultMessage: 'Export all: {total} product types'
|
|
271
|
+
},
|
|
272
|
+
exportScopeSelectedProductTypes: {
|
|
273
|
+
id: 'ExportResourcesModal.exportScopeSelectedProductTypes',
|
|
274
|
+
description: 'Label for Export Selected product types',
|
|
275
|
+
defaultMessage: 'Export selected: {total} product types'
|
|
276
|
+
},
|
|
277
|
+
exportScopeFilteredProductTypes: {
|
|
278
|
+
id: 'ExportResourcesModal.exportScopeFilteredProductTypes',
|
|
279
|
+
description: 'Label for Export Filtered product types',
|
|
280
|
+
defaultMessage: 'Export filtered: {total} product types'
|
|
281
|
+
},
|
|
257
282
|
exportScopeAllInventories: {
|
|
258
283
|
id: 'ExportResourcesModal.exportScopeAllInventories',
|
|
259
284
|
description: 'Label for Export All inventories',
|
|
@@ -264,6 +289,11 @@ var messages = reactIntl.defineMessages({
|
|
|
264
289
|
description: 'Label for Export Selected inventories',
|
|
265
290
|
defaultMessage: 'Export selected: {total} inventories'
|
|
266
291
|
},
|
|
292
|
+
exportScopeFilteredInventories: {
|
|
293
|
+
id: 'ExportResourcesModal.exportScopeFilteredInventories',
|
|
294
|
+
description: 'Label for Export Filtered inventories',
|
|
295
|
+
defaultMessage: 'Export filtered: {total} inventories'
|
|
296
|
+
},
|
|
267
297
|
exportScopeAllDiscountCodes: {
|
|
268
298
|
id: 'ExportResourcesModal.exportScopeAllDiscountCodes',
|
|
269
299
|
description: 'Label for Export All discount codes',
|
|
@@ -276,9 +306,39 @@ var messages = reactIntl.defineMessages({
|
|
|
276
306
|
},
|
|
277
307
|
exportScopeFilteredDiscountCodes: {
|
|
278
308
|
id: 'ExportResourcesModal.exportScopeFilteredDiscountCodes',
|
|
279
|
-
description: 'Label for Export
|
|
309
|
+
description: 'Label for Export Filtered discount codes',
|
|
280
310
|
defaultMessage: 'Export filtered: {total} discount codes'
|
|
281
311
|
},
|
|
312
|
+
exportScopeAllOrders: {
|
|
313
|
+
id: 'ExportResourcesModal.exportScopeAllOrders',
|
|
314
|
+
description: 'Label for Export All orders',
|
|
315
|
+
defaultMessage: 'Export all: {total} orders'
|
|
316
|
+
},
|
|
317
|
+
exportScopeSelectedOrders: {
|
|
318
|
+
id: 'ExportResourcesModal.exportScopeSelectedOrders',
|
|
319
|
+
description: 'Label for Export Selected orders',
|
|
320
|
+
defaultMessage: 'Export selected: {total} orders'
|
|
321
|
+
},
|
|
322
|
+
exportScopeFilteredOrders: {
|
|
323
|
+
id: 'ExportResourcesModal.exportScopeFilteredOrders',
|
|
324
|
+
description: 'Label for Export Filtered orders',
|
|
325
|
+
defaultMessage: 'Export filtered: {total} orders'
|
|
326
|
+
},
|
|
327
|
+
exportScopeAllCustomers: {
|
|
328
|
+
id: 'ExportResourcesModal.exportScopeAllCustomers',
|
|
329
|
+
description: 'Label for Export All customers',
|
|
330
|
+
defaultMessage: 'Export all: {total} customers'
|
|
331
|
+
},
|
|
332
|
+
exportScopeSelectedCustomers: {
|
|
333
|
+
id: 'ExportResourcesModal.exportScopeSelectedCustomers',
|
|
334
|
+
description: 'Label for Export Selected customers',
|
|
335
|
+
defaultMessage: 'Export selected: {total} customers'
|
|
336
|
+
},
|
|
337
|
+
exportScopeFilteredCustomers: {
|
|
338
|
+
id: 'ExportResourcesModal.exportScopeFilteredCustomers',
|
|
339
|
+
description: 'Label for Export Filtered customers',
|
|
340
|
+
defaultMessage: 'Export filtered: {total} customers'
|
|
341
|
+
},
|
|
282
342
|
exportScopeSelectedWithoutCount: {
|
|
283
343
|
id: 'ExportResourcesModal.exportScopeSelectedWithoutCount',
|
|
284
344
|
description: 'Label for Export Selected without count',
|
|
@@ -342,8 +402,11 @@ const EXPORT_TYPES = {
|
|
|
342
402
|
const EXPORTABLE_RESOURCES = {
|
|
343
403
|
CATEGORY: 'category',
|
|
344
404
|
PRODUCT: 'product',
|
|
405
|
+
PRODUCT_TYPE: 'product-type',
|
|
345
406
|
DISCOUNT_CODE: 'discount-code',
|
|
346
|
-
INVENTORY_ENTRY: 'inventory-entry'
|
|
407
|
+
INVENTORY_ENTRY: 'inventory-entry',
|
|
408
|
+
ORDER: 'order',
|
|
409
|
+
CUSTOMER: 'customer'
|
|
347
410
|
};
|
|
348
411
|
|
|
349
412
|
const OUTPUT_FORMATS = {
|
|
@@ -361,20 +424,38 @@ const OUTPUT_FORMAT_OPTIONS = [{
|
|
|
361
424
|
const resourceTypeMessages = {
|
|
362
425
|
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
363
426
|
exportScopeAll: messages.exportScopeAllCategories,
|
|
364
|
-
exportScopeSelected: messages.exportScopeSelectedCategories
|
|
427
|
+
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
428
|
+
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
365
429
|
},
|
|
366
430
|
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
367
431
|
exportScopeAll: messages.exportScopeAllProducts,
|
|
368
|
-
exportScopeSelected: messages.exportScopeSelectedProducts
|
|
432
|
+
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
433
|
+
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
434
|
+
},
|
|
435
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
436
|
+
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
437
|
+
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
438
|
+
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
369
439
|
},
|
|
370
440
|
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
371
441
|
exportScopeAll: messages.exportScopeAllInventories,
|
|
372
|
-
exportScopeSelected: messages.exportScopeSelectedInventories
|
|
442
|
+
exportScopeSelected: messages.exportScopeSelectedInventories,
|
|
443
|
+
exportScopeFiltered: messages.exportScopeFilteredInventories
|
|
373
444
|
},
|
|
374
445
|
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
375
446
|
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
376
447
|
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
377
448
|
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
449
|
+
},
|
|
450
|
+
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
451
|
+
exportScopeAll: messages.exportScopeAllOrders,
|
|
452
|
+
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
453
|
+
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
454
|
+
},
|
|
455
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
456
|
+
exportScopeAll: messages.exportScopeAllCustomers,
|
|
457
|
+
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
458
|
+
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
378
459
|
}
|
|
379
460
|
};
|
|
380
461
|
|
|
@@ -491,8 +572,11 @@ function resourceTypeToFileName(resourceType) {
|
|
|
491
572
|
const resourceTypeMap = {
|
|
492
573
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
493
574
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
575
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: 'Product_Types',
|
|
494
576
|
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: 'Discount_Codes',
|
|
495
|
-
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories'
|
|
577
|
+
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories',
|
|
578
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: 'Customers',
|
|
579
|
+
[EXPORTABLE_RESOURCES.ORDER]: 'Orders'
|
|
496
580
|
};
|
|
497
581
|
const displayName = resourceTypeMap[resourceType];
|
|
498
582
|
if (!displayName) {
|
|
@@ -210,6 +210,11 @@ var messages = defineMessages({
|
|
|
210
210
|
description: 'Label for Export Selected categories',
|
|
211
211
|
defaultMessage: 'Export selected: {total} categories'
|
|
212
212
|
},
|
|
213
|
+
exportScopeFilteredCategories: {
|
|
214
|
+
id: 'ExportResourcesModal.exportScopeFilteredCategories',
|
|
215
|
+
description: 'Label for Export Filtered categories',
|
|
216
|
+
defaultMessage: 'Export filtered: {total} categories'
|
|
217
|
+
},
|
|
213
218
|
exportScopeAllProducts: {
|
|
214
219
|
id: 'ExportResourcesModal.exportScopeAllProducts',
|
|
215
220
|
description: 'Label for Export All products',
|
|
@@ -220,6 +225,26 @@ var messages = defineMessages({
|
|
|
220
225
|
description: 'Label for Export Selected products',
|
|
221
226
|
defaultMessage: 'Export selected: {total} products'
|
|
222
227
|
},
|
|
228
|
+
exportScopeFilteredProducts: {
|
|
229
|
+
id: 'ExportResourcesModal.exportScopeFilteredProducts',
|
|
230
|
+
description: 'Label for Export Filtered products',
|
|
231
|
+
defaultMessage: 'Export filtered: {total} products'
|
|
232
|
+
},
|
|
233
|
+
exportScopeAllProductTypes: {
|
|
234
|
+
id: 'ExportResourcesModal.exportScopeAllProductTypes',
|
|
235
|
+
description: 'Label for Export All product types',
|
|
236
|
+
defaultMessage: 'Export all: {total} product types'
|
|
237
|
+
},
|
|
238
|
+
exportScopeSelectedProductTypes: {
|
|
239
|
+
id: 'ExportResourcesModal.exportScopeSelectedProductTypes',
|
|
240
|
+
description: 'Label for Export Selected product types',
|
|
241
|
+
defaultMessage: 'Export selected: {total} product types'
|
|
242
|
+
},
|
|
243
|
+
exportScopeFilteredProductTypes: {
|
|
244
|
+
id: 'ExportResourcesModal.exportScopeFilteredProductTypes',
|
|
245
|
+
description: 'Label for Export Filtered product types',
|
|
246
|
+
defaultMessage: 'Export filtered: {total} product types'
|
|
247
|
+
},
|
|
223
248
|
exportScopeAllInventories: {
|
|
224
249
|
id: 'ExportResourcesModal.exportScopeAllInventories',
|
|
225
250
|
description: 'Label for Export All inventories',
|
|
@@ -230,6 +255,11 @@ var messages = defineMessages({
|
|
|
230
255
|
description: 'Label for Export Selected inventories',
|
|
231
256
|
defaultMessage: 'Export selected: {total} inventories'
|
|
232
257
|
},
|
|
258
|
+
exportScopeFilteredInventories: {
|
|
259
|
+
id: 'ExportResourcesModal.exportScopeFilteredInventories',
|
|
260
|
+
description: 'Label for Export Filtered inventories',
|
|
261
|
+
defaultMessage: 'Export filtered: {total} inventories'
|
|
262
|
+
},
|
|
233
263
|
exportScopeAllDiscountCodes: {
|
|
234
264
|
id: 'ExportResourcesModal.exportScopeAllDiscountCodes',
|
|
235
265
|
description: 'Label for Export All discount codes',
|
|
@@ -242,9 +272,39 @@ var messages = defineMessages({
|
|
|
242
272
|
},
|
|
243
273
|
exportScopeFilteredDiscountCodes: {
|
|
244
274
|
id: 'ExportResourcesModal.exportScopeFilteredDiscountCodes',
|
|
245
|
-
description: 'Label for Export
|
|
275
|
+
description: 'Label for Export Filtered discount codes',
|
|
246
276
|
defaultMessage: 'Export filtered: {total} discount codes'
|
|
247
277
|
},
|
|
278
|
+
exportScopeAllOrders: {
|
|
279
|
+
id: 'ExportResourcesModal.exportScopeAllOrders',
|
|
280
|
+
description: 'Label for Export All orders',
|
|
281
|
+
defaultMessage: 'Export all: {total} orders'
|
|
282
|
+
},
|
|
283
|
+
exportScopeSelectedOrders: {
|
|
284
|
+
id: 'ExportResourcesModal.exportScopeSelectedOrders',
|
|
285
|
+
description: 'Label for Export Selected orders',
|
|
286
|
+
defaultMessage: 'Export selected: {total} orders'
|
|
287
|
+
},
|
|
288
|
+
exportScopeFilteredOrders: {
|
|
289
|
+
id: 'ExportResourcesModal.exportScopeFilteredOrders',
|
|
290
|
+
description: 'Label for Export Filtered orders',
|
|
291
|
+
defaultMessage: 'Export filtered: {total} orders'
|
|
292
|
+
},
|
|
293
|
+
exportScopeAllCustomers: {
|
|
294
|
+
id: 'ExportResourcesModal.exportScopeAllCustomers',
|
|
295
|
+
description: 'Label for Export All customers',
|
|
296
|
+
defaultMessage: 'Export all: {total} customers'
|
|
297
|
+
},
|
|
298
|
+
exportScopeSelectedCustomers: {
|
|
299
|
+
id: 'ExportResourcesModal.exportScopeSelectedCustomers',
|
|
300
|
+
description: 'Label for Export Selected customers',
|
|
301
|
+
defaultMessage: 'Export selected: {total} customers'
|
|
302
|
+
},
|
|
303
|
+
exportScopeFilteredCustomers: {
|
|
304
|
+
id: 'ExportResourcesModal.exportScopeFilteredCustomers',
|
|
305
|
+
description: 'Label for Export Filtered customers',
|
|
306
|
+
defaultMessage: 'Export filtered: {total} customers'
|
|
307
|
+
},
|
|
248
308
|
exportScopeSelectedWithoutCount: {
|
|
249
309
|
id: 'ExportResourcesModal.exportScopeSelectedWithoutCount',
|
|
250
310
|
description: 'Label for Export Selected without count',
|
|
@@ -308,8 +368,11 @@ const EXPORT_TYPES = {
|
|
|
308
368
|
const EXPORTABLE_RESOURCES = {
|
|
309
369
|
CATEGORY: 'category',
|
|
310
370
|
PRODUCT: 'product',
|
|
371
|
+
PRODUCT_TYPE: 'product-type',
|
|
311
372
|
DISCOUNT_CODE: 'discount-code',
|
|
312
|
-
INVENTORY_ENTRY: 'inventory-entry'
|
|
373
|
+
INVENTORY_ENTRY: 'inventory-entry',
|
|
374
|
+
ORDER: 'order',
|
|
375
|
+
CUSTOMER: 'customer'
|
|
313
376
|
};
|
|
314
377
|
|
|
315
378
|
const OUTPUT_FORMATS = {
|
|
@@ -327,20 +390,38 @@ const OUTPUT_FORMAT_OPTIONS = [{
|
|
|
327
390
|
const resourceTypeMessages = {
|
|
328
391
|
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
329
392
|
exportScopeAll: messages.exportScopeAllCategories,
|
|
330
|
-
exportScopeSelected: messages.exportScopeSelectedCategories
|
|
393
|
+
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
394
|
+
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
331
395
|
},
|
|
332
396
|
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
333
397
|
exportScopeAll: messages.exportScopeAllProducts,
|
|
334
|
-
exportScopeSelected: messages.exportScopeSelectedProducts
|
|
398
|
+
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
399
|
+
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
400
|
+
},
|
|
401
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
402
|
+
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
403
|
+
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
404
|
+
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
335
405
|
},
|
|
336
406
|
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
337
407
|
exportScopeAll: messages.exportScopeAllInventories,
|
|
338
|
-
exportScopeSelected: messages.exportScopeSelectedInventories
|
|
408
|
+
exportScopeSelected: messages.exportScopeSelectedInventories,
|
|
409
|
+
exportScopeFiltered: messages.exportScopeFilteredInventories
|
|
339
410
|
},
|
|
340
411
|
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
341
412
|
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
342
413
|
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
343
414
|
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
415
|
+
},
|
|
416
|
+
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
417
|
+
exportScopeAll: messages.exportScopeAllOrders,
|
|
418
|
+
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
419
|
+
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
420
|
+
},
|
|
421
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
422
|
+
exportScopeAll: messages.exportScopeAllCustomers,
|
|
423
|
+
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
424
|
+
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
344
425
|
}
|
|
345
426
|
};
|
|
346
427
|
|
|
@@ -457,8 +538,11 @@ function resourceTypeToFileName(resourceType) {
|
|
|
457
538
|
const resourceTypeMap = {
|
|
458
539
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
459
540
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
541
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: 'Product_Types',
|
|
460
542
|
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: 'Discount_Codes',
|
|
461
|
-
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories'
|
|
543
|
+
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: 'Inventories',
|
|
544
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: 'Customers',
|
|
545
|
+
[EXPORTABLE_RESOURCES.ORDER]: 'Orders'
|
|
462
546
|
};
|
|
463
547
|
const displayName = resourceTypeMap[resourceType];
|
|
464
548
|
if (!displayName) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare const EXPORTABLE_RESOURCES: {
|
|
2
2
|
readonly CATEGORY: "category";
|
|
3
3
|
readonly PRODUCT: "product";
|
|
4
|
+
readonly PRODUCT_TYPE: "product-type";
|
|
4
5
|
readonly DISCOUNT_CODE: "discount-code";
|
|
5
6
|
readonly INVENTORY_ENTRY: "inventory-entry";
|
|
7
|
+
readonly ORDER: "order";
|
|
8
|
+
readonly CUSTOMER: "customer";
|
|
6
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResourceType } from "./resource-type.js";
|
|
2
2
|
import { EXPORT_TYPES } from "../@constants/index.js";
|
|
3
3
|
export interface Field {
|
|
4
4
|
name: string;
|
|
@@ -21,7 +21,7 @@ export interface FieldGroup {
|
|
|
21
21
|
}
|
|
22
22
|
export interface ExportResourcesModalShape {
|
|
23
23
|
isOpen?: boolean;
|
|
24
|
-
resourceType:
|
|
24
|
+
resourceType: ResourceType;
|
|
25
25
|
outputFormat?: string;
|
|
26
26
|
filters?: Filters;
|
|
27
27
|
totalResourcesCount: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EXPORTABLE_RESOURCES } from "../@constants/exportable-resources.js";
|
|
2
|
-
export type
|
|
2
|
+
export type ResourceType = (typeof EXPORTABLE_RESOURCES)[keyof typeof EXPORTABLE_RESOURCES];
|
|
3
3
|
export type ResourceTypeMap = {
|
|
4
|
-
[K in
|
|
4
|
+
[K in ResourceType]: unknown;
|
|
5
5
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/export-resources-modal",
|
|
3
3
|
"description": "Shared export modal for exporting resources",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.5.0",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "7.25.0",
|
|
19
19
|
"@babel/runtime-corejs3": "7.25.0",
|
|
20
|
-
"@commercetools-frontend/experimental-components": "6.1.
|
|
21
|
-
"@commercetools-frontend/fullstory": "2.4.
|
|
20
|
+
"@commercetools-frontend/experimental-components": "6.1.4",
|
|
21
|
+
"@commercetools-frontend/fullstory": "2.4.5",
|
|
22
22
|
"@emotion/react": "11.13.0",
|
|
23
23
|
"@emotion/styled": "11.13.0",
|
|
24
24
|
"@formatjs/cli": "6.2.12",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"rimraf": "5.0.10"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@commercetools-frontend/actions-global": "
|
|
56
|
-
"@commercetools-frontend/application-components": "
|
|
57
|
-
"@commercetools-frontend/application-shell": "
|
|
58
|
-
"@commercetools-frontend/application-shell-connectors": "
|
|
59
|
-
"@commercetools-frontend/constants": "
|
|
60
|
-
"@commercetools-frontend/i18n": "
|
|
61
|
-
"@commercetools-frontend/jest-preset-mc-app": "
|
|
62
|
-
"@commercetools-frontend/sdk": "
|
|
63
|
-
"@commercetools-frontend/sentry": "
|
|
64
|
-
"@commercetools-frontend/ui-kit": "
|
|
65
|
-
"@commercetools-uikit/design-system": "
|
|
55
|
+
"@commercetools-frontend/actions-global": "22.x",
|
|
56
|
+
"@commercetools-frontend/application-components": "22.x",
|
|
57
|
+
"@commercetools-frontend/application-shell": "22.x",
|
|
58
|
+
"@commercetools-frontend/application-shell-connectors": "22.x",
|
|
59
|
+
"@commercetools-frontend/constants": "22.x",
|
|
60
|
+
"@commercetools-frontend/i18n": "22.x",
|
|
61
|
+
"@commercetools-frontend/jest-preset-mc-app": "22.x",
|
|
62
|
+
"@commercetools-frontend/sdk": "22.x",
|
|
63
|
+
"@commercetools-frontend/sentry": "22.x",
|
|
64
|
+
"@commercetools-frontend/ui-kit": "19.x",
|
|
65
|
+
"@commercetools-uikit/design-system": "19.x",
|
|
66
66
|
"react-intl": "6.x",
|
|
67
67
|
"react-redux": "7.x",
|
|
68
68
|
"redux": "4.x"
|