@commercetools-frontend-extensions/export-resources-modal 4.7.1 → 4.8.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/README.md +7 -2
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +70 -57
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +69 -56
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +69 -58
- package/dist/{de-af429e2a.cjs.dev.js → de-3d4cf3d0.cjs.prod.js} +1 -1
- package/dist/{de-9746c508.esm.js → de-abc94d19.esm.js} +1 -1
- package/dist/{de-f235117b.cjs.prod.js → de-d6a38e9e.cjs.dev.js} +1 -1
- package/dist/declarations/src/@types/export-api.d.ts +5 -1
- package/dist/declarations/src/@types/export-resources-modal-context.d.ts +6 -2
- package/dist/declarations/src/@types/export-resources-modal-types.d.ts +8 -2
- package/dist/{en-8b4fee65.cjs.dev.js → en-0ea9f92c.cjs.dev.js} +1 -1
- package/dist/{en-b0fc803b.esm.js → en-38313842.esm.js} +1 -1
- package/dist/{en-0a4519c0.cjs.prod.js → en-fc0085cc.cjs.prod.js} +1 -1
- package/dist/{es-339117ae.cjs.prod.js → es-6360d546.cjs.prod.js} +1 -1
- package/dist/{es-ed7a7149.esm.js → es-85c5a396.esm.js} +1 -1
- package/dist/{es-1da000fa.cjs.dev.js → es-a4227b21.cjs.dev.js} +1 -1
- package/dist/{fr-FR-af05384b.cjs.prod.js → fr-FR-1602d5ff.cjs.dev.js} +1 -1
- package/dist/{fr-FR-01c89efe.esm.js → fr-FR-e610590b.esm.js} +1 -1
- package/dist/{fr-FR-f6456131.cjs.dev.js → fr-FR-ff7ec057.cjs.prod.js} +1 -1
- package/dist/{pt-BR-03e1fb85.cjs.prod.js → pt-BR-7b17be9e.cjs.dev.js} +1 -1
- package/dist/{pt-BR-8b9dd081.esm.js → pt-BR-ccc18639.esm.js} +1 -1
- package/dist/{pt-BR-bc9a187a.cjs.dev.js → pt-BR-d9b0a36d.cjs.prod.js} +1 -1
- package/dist/{zh-CN-e6a19d6d.cjs.dev.js → zh-CN-0126d1d1.cjs.prod.js} +1 -1
- package/dist/{zh-CN-1051c1d7.cjs.prod.js → zh-CN-0f473f16.cjs.dev.js} +1 -1
- package/dist/{zh-CN-464f6fce.esm.js → zh-CN-9a726ccd.esm.js} +1 -1
- package/package.json +1 -1
|
@@ -40,6 +40,7 @@ import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array
|
|
|
40
40
|
import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
41
41
|
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
42
42
|
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
43
|
+
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
43
44
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
44
45
|
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
45
46
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
@@ -224,107 +225,107 @@ var messages = defineMessages({
|
|
|
224
225
|
exportScopeAllCategories: {
|
|
225
226
|
id: 'ExportResourcesModal.exportScopeAllCategories',
|
|
226
227
|
description: 'Label for Export All categories',
|
|
227
|
-
defaultMessage: 'Export all: {total} categories'
|
|
228
|
+
defaultMessage: 'Export all: {total, plural, one {# category} other {# categories}}'
|
|
228
229
|
},
|
|
229
230
|
exportScopeSelectedCategories: {
|
|
230
231
|
id: 'ExportResourcesModal.exportScopeSelectedCategories',
|
|
231
232
|
description: 'Label for Export Selected categories',
|
|
232
|
-
defaultMessage: 'Export selected: {total} categories'
|
|
233
|
+
defaultMessage: 'Export selected: {total, plural, one {# category} other {# categories}}'
|
|
233
234
|
},
|
|
234
235
|
exportScopeFilteredCategories: {
|
|
235
236
|
id: 'ExportResourcesModal.exportScopeFilteredCategories',
|
|
236
237
|
description: 'Label for Export Filtered categories',
|
|
237
|
-
defaultMessage: 'Export filtered: {total} categories'
|
|
238
|
+
defaultMessage: 'Export filtered: {total, plural, one {# category} other {# categories}}'
|
|
238
239
|
},
|
|
239
240
|
exportScopeAllProducts: {
|
|
240
241
|
id: 'ExportResourcesModal.exportScopeAllProducts',
|
|
241
242
|
description: 'Label for Export All products',
|
|
242
|
-
defaultMessage: 'Export all: {total} products'
|
|
243
|
+
defaultMessage: 'Export all: {total, plural, one {# product} other {# products}}'
|
|
243
244
|
},
|
|
244
245
|
exportScopeSelectedProducts: {
|
|
245
246
|
id: 'ExportResourcesModal.exportScopeSelectedProducts',
|
|
246
247
|
description: 'Label for Export Selected products',
|
|
247
|
-
defaultMessage: 'Export selected: {total} products'
|
|
248
|
+
defaultMessage: 'Export selected: {total, plural, one {# product} other {# products}}'
|
|
248
249
|
},
|
|
249
250
|
exportScopeFilteredProducts: {
|
|
250
251
|
id: 'ExportResourcesModal.exportScopeFilteredProducts',
|
|
251
252
|
description: 'Label for Export Filtered products',
|
|
252
|
-
defaultMessage: 'Export filtered: {total} products'
|
|
253
|
+
defaultMessage: 'Export filtered: {total, plural, one {# product} other {# products}}'
|
|
253
254
|
},
|
|
254
255
|
exportScopeAllProductTypes: {
|
|
255
256
|
id: 'ExportResourcesModal.exportScopeAllProductTypes',
|
|
256
257
|
description: 'Label for Export All product types',
|
|
257
|
-
defaultMessage: 'Export all: {total} product types'
|
|
258
|
+
defaultMessage: 'Export all: {total, plural, one {# product type} other {# product types}}'
|
|
258
259
|
},
|
|
259
260
|
exportScopeSelectedProductTypes: {
|
|
260
261
|
id: 'ExportResourcesModal.exportScopeSelectedProductTypes',
|
|
261
262
|
description: 'Label for Export Selected product types',
|
|
262
|
-
defaultMessage: 'Export selected: {total} product types'
|
|
263
|
+
defaultMessage: 'Export selected: {total, plural, one {# product type} other {# product types}}'
|
|
263
264
|
},
|
|
264
265
|
exportScopeFilteredProductTypes: {
|
|
265
266
|
id: 'ExportResourcesModal.exportScopeFilteredProductTypes',
|
|
266
267
|
description: 'Label for Export Filtered product types',
|
|
267
|
-
defaultMessage: 'Export filtered: {total} product types'
|
|
268
|
+
defaultMessage: 'Export filtered: {total, plural, one {# product type} other {# product types}}'
|
|
268
269
|
},
|
|
269
270
|
exportInventoriesForAllProducts: {
|
|
270
271
|
id: 'ExportResourcesModal.exportInventoriesForAllProducts',
|
|
271
272
|
description: 'Label for Export All inventories',
|
|
272
|
-
defaultMessage: 'Export inventories for all {total} products'
|
|
273
|
+
defaultMessage: 'Export inventories for all {total, plural, one {# product} other {# products}}'
|
|
273
274
|
},
|
|
274
275
|
exportInventoriesForSelectedProducts: {
|
|
275
276
|
id: 'ExportResourcesModal.exportInventoriesForSelectedProducts',
|
|
276
277
|
description: 'Label for Export Selected inventories',
|
|
277
|
-
defaultMessage: 'Export inventories for the {total} selected products'
|
|
278
|
+
defaultMessage: 'Export inventories for the {total, plural, one {# selected product} other {# selected products}}'
|
|
278
279
|
},
|
|
279
280
|
exportInventoriesForFilteredProducts: {
|
|
280
281
|
id: 'ExportResourcesModal.exportInventoriesForFilteredProducts',
|
|
281
282
|
description: 'Label for Export Filtered inventories',
|
|
282
|
-
defaultMessage: 'Export inventories for the {total} filtered products'
|
|
283
|
+
defaultMessage: 'Export inventories for the {total, plural, one {# filtered product} other {# filtered products}}'
|
|
283
284
|
},
|
|
284
285
|
exportScopeAllDiscountCodes: {
|
|
285
286
|
id: 'ExportResourcesModal.exportScopeAllDiscountCodes',
|
|
286
287
|
description: 'Label for Export All discount codes',
|
|
287
|
-
defaultMessage: 'Export all: {total} discount codes'
|
|
288
|
+
defaultMessage: 'Export all: {total, plural, one {# discount code} other {# discount codes}}'
|
|
288
289
|
},
|
|
289
290
|
exportScopeSelectedDiscountCodes: {
|
|
290
291
|
id: 'ExportResourcesModal.exportScopeSelectedDiscountCodes',
|
|
291
292
|
description: 'Label for Export Selected discount codes',
|
|
292
|
-
defaultMessage: 'Export selected: {total} discount codes'
|
|
293
|
+
defaultMessage: 'Export selected: {total, plural, one {# discount code} other {# discount codes}}'
|
|
293
294
|
},
|
|
294
295
|
exportScopeFilteredDiscountCodes: {
|
|
295
296
|
id: 'ExportResourcesModal.exportScopeFilteredDiscountCodes',
|
|
296
297
|
description: 'Label for Export Filtered discount codes',
|
|
297
|
-
defaultMessage: 'Export filtered: {total} discount codes'
|
|
298
|
+
defaultMessage: 'Export filtered: {total, plural, one {# discount code} other {# discount codes}}'
|
|
298
299
|
},
|
|
299
300
|
exportScopeAllOrders: {
|
|
300
301
|
id: 'ExportResourcesModal.exportScopeAllOrders',
|
|
301
302
|
description: 'Label for Export All orders',
|
|
302
|
-
defaultMessage: 'Export all: {total} orders'
|
|
303
|
+
defaultMessage: 'Export all: {total, plural, one {# order} other {# orders}}'
|
|
303
304
|
},
|
|
304
305
|
exportScopeSelectedOrders: {
|
|
305
306
|
id: 'ExportResourcesModal.exportScopeSelectedOrders',
|
|
306
307
|
description: 'Label for Export Selected orders',
|
|
307
|
-
defaultMessage: 'Export selected: {total} orders'
|
|
308
|
+
defaultMessage: 'Export selected: {total, plural, one {# order} other {# orders}}'
|
|
308
309
|
},
|
|
309
310
|
exportScopeFilteredOrders: {
|
|
310
311
|
id: 'ExportResourcesModal.exportScopeFilteredOrders',
|
|
311
312
|
description: 'Label for Export Filtered orders',
|
|
312
|
-
defaultMessage: 'Export filtered: {total} orders'
|
|
313
|
+
defaultMessage: 'Export filtered: {total, plural, one {# order} other {# orders}}'
|
|
313
314
|
},
|
|
314
315
|
exportScopeAllCustomers: {
|
|
315
316
|
id: 'ExportResourcesModal.exportScopeAllCustomers',
|
|
316
317
|
description: 'Label for Export All customers',
|
|
317
|
-
defaultMessage: 'Export all: {total} customers'
|
|
318
|
+
defaultMessage: 'Export all: {total, plural, one {# customer} other {# customers}}'
|
|
318
319
|
},
|
|
319
320
|
exportScopeSelectedCustomers: {
|
|
320
321
|
id: 'ExportResourcesModal.exportScopeSelectedCustomers',
|
|
321
322
|
description: 'Label for Export Selected customers',
|
|
322
|
-
defaultMessage: 'Export selected: {total} customers'
|
|
323
|
+
defaultMessage: 'Export selected: {total, plural, one {# customer} other {# customers}}'
|
|
323
324
|
},
|
|
324
325
|
exportScopeFilteredCustomers: {
|
|
325
326
|
id: 'ExportResourcesModal.exportScopeFilteredCustomers',
|
|
326
327
|
description: 'Label for Export Filtered customers',
|
|
327
|
-
defaultMessage: 'Export filtered: {total} customers'
|
|
328
|
+
defaultMessage: 'Export filtered: {total, plural, one {# customer} other {# customers}}'
|
|
328
329
|
},
|
|
329
330
|
exportScopeSelectedWithoutCount: {
|
|
330
331
|
id: 'ExportResourcesModal.exportScopeSelectedWithoutCount',
|
|
@@ -614,6 +615,12 @@ const getTotalCheckedFields = group => {
|
|
|
614
615
|
return countCheckedFields(group.fields);
|
|
615
616
|
};
|
|
616
617
|
|
|
618
|
+
let Step = /*#__PURE__*/function (Step) {
|
|
619
|
+
Step["FileSettings"] = "file-settings";
|
|
620
|
+
Step["FieldsSelection"] = "fields-selection";
|
|
621
|
+
return Step;
|
|
622
|
+
}({});
|
|
623
|
+
|
|
617
624
|
function validate(_ref) {
|
|
618
625
|
let values = _valuesInstanceProperty(_ref),
|
|
619
626
|
step = _ref.step;
|
|
@@ -633,7 +640,7 @@ function validate(_ref) {
|
|
|
633
640
|
if (locales.length < 1) {
|
|
634
641
|
errors.locales.missing = true;
|
|
635
642
|
}
|
|
636
|
-
if (step ===
|
|
643
|
+
if (step === Step.FieldsSelection) {
|
|
637
644
|
const allFields = _reduceInstanceProperty(groups).call(groups, (acc, group) => _concatInstanceProperty(acc).call(acc, group.fields), []);
|
|
638
645
|
const checkedFieldsCount = _filterInstanceProperty(allFields).call(allFields, field => {
|
|
639
646
|
if (field.fields) return isAnyFieldChecked(field.fields);
|
|
@@ -732,20 +739,21 @@ function buildSelectedExportFilters(selectedResourceIds) {
|
|
|
732
739
|
return `id in (${formattedIds})`;
|
|
733
740
|
}
|
|
734
741
|
function validateFilters(filters) {
|
|
735
|
-
const
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
// Ensure only one of `
|
|
739
|
-
const validFilterState =
|
|
742
|
+
const hasWhere = 'where' in filters;
|
|
743
|
+
const hasFilters = 'filters' in filters;
|
|
744
|
+
const hasFullText = 'fullText' in filters;
|
|
745
|
+
// Ensure only one of `where` or `filters` is applied but not both or none
|
|
746
|
+
const validFilterState = hasWhere && !hasFilters || !hasWhere && hasFilters || hasFullText && filters?.fullText?.text?.trim() !== '';
|
|
740
747
|
return validFilterState;
|
|
741
748
|
}
|
|
742
|
-
function areFiltersApplied(
|
|
743
|
-
if (!
|
|
749
|
+
function areFiltersApplied(filterObject) {
|
|
750
|
+
if (!filterObject) {
|
|
744
751
|
return false;
|
|
745
752
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
753
|
+
let filters = filterObject.filters,
|
|
754
|
+
where = filterObject.where;
|
|
755
|
+
let hasFilters = where && _trimInstanceProperty(where).call(where) !== '' || Boolean(_Array$isArray(filters) && filters.length > 0 || typeof filters === 'object' && _Object$keys(filters).length > 0);
|
|
756
|
+
return hasFilters;
|
|
749
757
|
}
|
|
750
758
|
function getInitialExportType(args) {
|
|
751
759
|
if (args.selectedResourceIds?.length) {
|
|
@@ -930,7 +938,8 @@ async function createExportOperation(_ref, asyncDispatchFn) {
|
|
|
930
938
|
locales = _ref.locales,
|
|
931
939
|
filters = _ref.filters,
|
|
932
940
|
where = _ref.where,
|
|
933
|
-
fillRows = _ref.fillRows
|
|
941
|
+
fillRows = _ref.fillRows,
|
|
942
|
+
fullText = _ref.fullText;
|
|
934
943
|
const uri = `/${projectKey}/export-operations`;
|
|
935
944
|
const response = await asyncDispatchFn(actions.post({
|
|
936
945
|
mcApiProxyTarget: MC_API_PROXY_TARGETS.EXPORT,
|
|
@@ -947,8 +956,9 @@ async function createExportOperation(_ref, asyncDispatchFn) {
|
|
|
947
956
|
fillRows,
|
|
948
957
|
// Query predicate
|
|
949
958
|
where,
|
|
950
|
-
// Search API filters
|
|
951
|
-
filters
|
|
959
|
+
// Search API filters or Category API filters
|
|
960
|
+
filters,
|
|
961
|
+
fullText
|
|
952
962
|
}
|
|
953
963
|
}));
|
|
954
964
|
if (!response || typeof response !== 'object' || !('state' in response)) {
|
|
@@ -991,16 +1001,16 @@ const useStartExportOperation = props => {
|
|
|
991
1001
|
const fields = extractFieldNamesFromGroups(values.groups);
|
|
992
1002
|
let where = undefined;
|
|
993
1003
|
let filters = undefined;
|
|
1004
|
+
let fullText = undefined;
|
|
994
1005
|
if (exportType === EXPORT_TYPES.SELECTED && props.selectedResourceIds?.length) {
|
|
995
1006
|
where = buildSelectedExportFilters(props.selectedResourceIds);
|
|
996
1007
|
} else if (exportType === EXPORT_TYPES.FILTERED) {
|
|
997
|
-
if (props.filters
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
};
|
|
1008
|
+
if (props.filters) {
|
|
1009
|
+
;
|
|
1010
|
+
var _props$filters = props.filters;
|
|
1011
|
+
filters = _props$filters.filters;
|
|
1012
|
+
where = _props$filters.where;
|
|
1013
|
+
fullText = _props$filters.fullText;
|
|
1004
1014
|
}
|
|
1005
1015
|
}
|
|
1006
1016
|
const response = await createExportOperation({
|
|
@@ -1012,7 +1022,8 @@ const useStartExportOperation = props => {
|
|
|
1012
1022
|
fillRows: values.fillRows,
|
|
1013
1023
|
fields,
|
|
1014
1024
|
where,
|
|
1015
|
-
filters
|
|
1025
|
+
filters,
|
|
1026
|
+
fullText
|
|
1016
1027
|
}, asyncDispatch);
|
|
1017
1028
|
switch (response.state) {
|
|
1018
1029
|
case EXPORT_OPERATION_STATES.QUEUED:
|
|
@@ -1729,7 +1740,7 @@ const StyledGridCard = /*#__PURE__*/_styled(Card, process.env.NODE_ENV === "prod
|
|
|
1729
1740
|
} : {
|
|
1730
1741
|
target: "e5mvpn60",
|
|
1731
1742
|
label: "StyledGridCard"
|
|
1732
|
-
})("max-height:calc(100vh - ", totalSpacing, "px);overflow:auto;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
1743
|
+
})("max-height:calc(100vh - ", totalSpacing, "px);overflow:auto;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImV4cG9ydC1maWVsZHMtc2VsZWN0aW9uLXN0ZXAudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBDbUMiLCJmaWxlIjoiZXhwb3J0LWZpZWxkcy1zZWxlY3Rpb24tc3RlcC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCdcbmltcG9ydCB7IEZvcm1EaWFsb2cgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1jb21wb25lbnRzJ1xuaW1wb3J0IHsgdXNlQXBwbGljYXRpb25Db250ZXh0IH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwtY29ubmVjdG9ycydcbmltcG9ydCB7IHVzZVN0b3JhZ2UgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9leHBlcmltZW50YWwtY29tcG9uZW50cydcbmltcG9ydCB7IE1hc2tpbmcgYXMgRnVsbFN0b3J5TWFza2luZyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2Z1bGxzdG9yeSdcbmltcG9ydCB7XG4gIENhcmQsXG4gIEdyaWQsXG4gIFNwYWNpbmdzLFxuICBTZWFyY2hUZXh0SW5wdXQsXG4gIGRlc2lnblRva2Vucyxcbn0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0J1xua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mdlPXtvblNlYXJjaENoYW5nZVRocm90dGxlZH1cbiAgICAgICAgICAgICAgb25SZXNldD17b25TZWFyY2hSZXNldH1cbiAgICAgICAgICAgICAgLy8gVE9ETzogYFNlYXJjaFRleHRJbnB1dGAgcHJvcHMgdG8gYmUgaW1wcm92ZWQuIFRoZSBgb25TdWJtaXRgIGNhbGxiYWNrIHNob3VsZG4ndCBiZSBtYW5kYXRvcnlcbiAgICAgICAgICAgICAgb25TdWJtaXQ9eygpID0+IHt9fVxuICAgICAgICAgICAgICBpZD1cImV4cG9ydC1maWVsZHMtc2VhcmNoXCJcbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICB7aGFzUmVzdWx0cyA/IChcbiAgICAgICAgICAgICAgPFN0eWxlZEdyaWRDYXJkIGluc2V0U2NhbGU9XCJub25lXCI+XG4gICAgICAgICAgICAgICAgPEdyaWRcbiAgICAgICAgICAgICAgICAgIGdyaWRBdXRvRmxvdz1cInJvd1wiXG4gICAgICAgICAgICAgICAgICBncmlkVGVtcGxhdGVDb2x1bW5zPXtgY2FsYygke2Rlc2lnblRva2Vucy5zcGFjaW5nTH0gKyAke2Rlc2lnblRva2Vucy5jb25zdHJhaW50NX0gKyAke2Rlc2lnblRva2Vucy5zcGFjaW5nTH0pIGF1dG9gfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgIHtmaWx0ZXJlZEdyb3Vwcy5tYXAoKGdyb3VwLCBpbmRleCkgPT4gKFxuICAgICAgICAgICAgICAgICAgICA8RmllbGRHcm91cFNlY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICBrZXk9e2dyb3VwLmdyb3VwTmFtZX1cbiAgICAgICAgICAgICAgICAgICAgICBncm91cD17Z3JvdXB9XG4gICAgICAgICAgICAgICAgICAgICAgaW5kZXg9e2luZGV4fVxuICAgICAgICAgICAgICAgICAgICAgIGZvcm1paz17Zm9ybWlrfVxuICAgICAgICAgICAgICAgICAgICAgIGlzRm9yY2VFeHBhbmRlZD17ZmllbGRTZWFyY2hUZXJtPy50cmltKCk/Lmxlbmd0aCA+IDB9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICApKX1cbiAgICAgICAgICAgICAgICA8L0dyaWQ+XG4gICAgICAgICAgICAgIDwvU3R5bGVkR3JpZENhcmQ+XG4gICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICA8Tm9TZWFyY2hSZXN1bHRzIC8+XG4gICAgICAgICAgICApfVxuICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgIDwvRXhwb3J0RmllbGRTZWxlY3Rpb25Qcm92aWRlcj5cbiAgICAgIDwvRnVsbFN0b3J5TWFza2luZy5Vbm1hc2s+XG4gICAgPC9Gb3JtRGlhbG9nPlxuICApXG59XG4iXX0= */"));
|
|
1733
1744
|
const ExportFieldsSelectionStep = () => {
|
|
1734
1745
|
const intl = useIntl();
|
|
1735
1746
|
const _React$useState = React.useState(''),
|
|
@@ -1820,7 +1831,7 @@ const ExportFieldsSelectionStep = () => {
|
|
|
1820
1831
|
onPrimaryButtonClick: formik.submitForm,
|
|
1821
1832
|
isPrimaryButtonDisabled: !formik.isValid,
|
|
1822
1833
|
labelSecondary: intl.formatMessage(messages.back),
|
|
1823
|
-
onSecondaryButtonClick: () => setCurrentStep(
|
|
1834
|
+
onSecondaryButtonClick: () => setCurrentStep(Step.FileSettings),
|
|
1824
1835
|
onClose: onClose,
|
|
1825
1836
|
size: 16,
|
|
1826
1837
|
children: jsx(Masking.Unmask, {
|
|
@@ -1863,7 +1874,7 @@ const ExportResourcesProvider = _ref => {
|
|
|
1863
1874
|
let children = _ref.children,
|
|
1864
1875
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1865
1876
|
const initialValues = useInitialValues(props);
|
|
1866
|
-
const _React$useState = React.useState(
|
|
1877
|
+
const _React$useState = React.useState(Step.FileSettings),
|
|
1867
1878
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1868
1879
|
currentStep = _React$useState2[0],
|
|
1869
1880
|
setCurrentStep = _React$useState2[1];
|
|
@@ -1877,8 +1888,8 @@ const ExportResourcesProvider = _ref => {
|
|
|
1877
1888
|
const _useStartExportOperat = useStartExportOperation(props),
|
|
1878
1889
|
startExportOperation = _useStartExportOperat.startExportOperation;
|
|
1879
1890
|
const onSubmit = async values => {
|
|
1880
|
-
if (currentStep ===
|
|
1881
|
-
setCurrentStep(
|
|
1891
|
+
if (currentStep === Step.FileSettings) {
|
|
1892
|
+
setCurrentStep(Step.FieldsSelection);
|
|
1882
1893
|
} else {
|
|
1883
1894
|
startExportOperation(values, exportType);
|
|
1884
1895
|
}
|
|
@@ -1917,8 +1928,8 @@ const CurrentStep = () => {
|
|
|
1917
1928
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
1918
1929
|
currentStep = _useExportResourcesMo.currentStep;
|
|
1919
1930
|
const steps = {
|
|
1920
|
-
|
|
1921
|
-
|
|
1931
|
+
'file-settings': jsx(ExportFileSettingsStep, {}),
|
|
1932
|
+
'fields-selection': jsx(ExportFieldsSelectionStep, {})
|
|
1922
1933
|
};
|
|
1923
1934
|
return steps[currentStep] || null;
|
|
1924
1935
|
};
|
|
@@ -1927,19 +1938,19 @@ const getChunkImport = locale => {
|
|
|
1927
1938
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
1928
1939
|
switch (intlLocale) {
|
|
1929
1940
|
case 'de':
|
|
1930
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
1941
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-abc94d19.esm.js');
|
|
1931
1942
|
case 'es':
|
|
1932
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
1943
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-85c5a396.esm.js');
|
|
1933
1944
|
case 'fr-FR':
|
|
1934
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
1945
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-e610590b.esm.js');
|
|
1935
1946
|
case 'zh-CN':
|
|
1936
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-
|
|
1947
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-zh-CN" */'./zh-CN-9a726ccd.esm.js');
|
|
1937
1948
|
case 'ja':
|
|
1938
1949
|
return import(/* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-73c088a7.esm.js');
|
|
1939
1950
|
case 'pt-BR':
|
|
1940
|
-
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
1951
|
+
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-ccc18639.esm.js');
|
|
1941
1952
|
default:
|
|
1942
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
1953
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-38313842.esm.js');
|
|
1943
1954
|
}
|
|
1944
1955
|
};
|
|
1945
1956
|
const loadMessages = async locale => {
|
|
@@ -2018,7 +2029,7 @@ const ExportResourcesModal = props => {
|
|
|
2018
2029
|
const messages = useAsyncIntlMessages(locale, loadMessages);
|
|
2019
2030
|
if (!props.isOpen || messages.isLoading) return null;
|
|
2020
2031
|
if (props.filters && !validateFilters(props.filters)) {
|
|
2021
|
-
console.error('Invalid filters prop:', props.filters, 'Filters must contain
|
|
2032
|
+
console.error('Invalid filters prop:', props.filters, 'Filters must contain one of these values: `filters` or `where`');
|
|
2022
2033
|
return null;
|
|
2023
2034
|
}
|
|
2024
2035
|
return jsx(IntlProvider, {
|
|
@@ -2038,4 +2049,4 @@ ExportResourcesModal.defaultProps = {
|
|
|
2038
2049
|
fieldOrder: []
|
|
2039
2050
|
};
|
|
2040
2051
|
|
|
2041
|
-
export { EXPORTABLE_RESOURCES, EXPORT_TYPES, ExportResourcesModal as default, useConvertFieldDefinitionsForExport };
|
|
2052
|
+
export { EXPORTABLE_RESOURCES, EXPORT_TYPES, Step, ExportResourcesModal as default, useConvertFieldDefinitionsForExport };
|
|
@@ -135,7 +135,7 @@ var de = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -133,7 +133,7 @@ var de = {
|
|
|
133
133
|
},
|
|
134
134
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
135
135
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
136
|
-
string: "
|
|
136
|
+
string: "Include Order number, id, and states in every row"
|
|
137
137
|
},
|
|
138
138
|
"ExportResourcesModal.includeAllLocales": {
|
|
139
139
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var de = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -7,9 +7,13 @@ export interface ExportApiRequest {
|
|
|
7
7
|
locales: string[];
|
|
8
8
|
filters?: {
|
|
9
9
|
query: Record<string, unknown>;
|
|
10
|
-
}
|
|
10
|
+
} | Array<string>;
|
|
11
11
|
where?: string;
|
|
12
12
|
fillRows?: boolean;
|
|
13
|
+
fullText?: {
|
|
14
|
+
text: string;
|
|
15
|
+
locale: string;
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
18
|
export interface ExportApiResponse {
|
|
15
19
|
id: string;
|
|
@@ -2,10 +2,14 @@ import type { FormikProps } from 'formik';
|
|
|
2
2
|
import type { ExportType, Filters } from "./export-resources-modal-types.js";
|
|
3
3
|
import type { FormValues } from "./form.js";
|
|
4
4
|
import type { ResourceType } from "./resource-type.js";
|
|
5
|
+
export declare enum Step {
|
|
6
|
+
FileSettings = "file-settings",
|
|
7
|
+
FieldsSelection = "fields-selection"
|
|
8
|
+
}
|
|
5
9
|
export interface ExportResourcesModalContext {
|
|
6
10
|
formik: FormikProps<FormValues>;
|
|
7
|
-
currentStep:
|
|
8
|
-
setCurrentStep: React.Dispatch<React.SetStateAction<
|
|
11
|
+
currentStep: Step;
|
|
12
|
+
setCurrentStep: React.Dispatch<React.SetStateAction<Step>>;
|
|
9
13
|
onClose: () => void;
|
|
10
14
|
resourceType: ResourceType;
|
|
11
15
|
exportType: ExportType;
|
|
@@ -33,7 +33,13 @@ export interface ExportResourcesModalProps {
|
|
|
33
33
|
}
|
|
34
34
|
export type ExportType = keyof typeof EXPORT_TYPES;
|
|
35
35
|
export type Filters = {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
filters?: {
|
|
37
|
+
query: Record<string, unknown>;
|
|
38
|
+
} | Array<string>;
|
|
39
|
+
where?: string;
|
|
40
|
+
fullText?: {
|
|
41
|
+
text: string;
|
|
42
|
+
locale: string;
|
|
43
|
+
};
|
|
38
44
|
total: number;
|
|
39
45
|
};
|
|
@@ -135,7 +135,7 @@ var en = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -133,7 +133,7 @@ var en = {
|
|
|
133
133
|
},
|
|
134
134
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
135
135
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
136
|
-
string: "
|
|
136
|
+
string: "Include Order number, id, and states in every row"
|
|
137
137
|
},
|
|
138
138
|
"ExportResourcesModal.includeAllLocales": {
|
|
139
139
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var en = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var es = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -133,7 +133,7 @@ var es = {
|
|
|
133
133
|
},
|
|
134
134
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
135
135
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
136
|
-
string: "
|
|
136
|
+
string: "Include Order number, id, and states in every row"
|
|
137
137
|
},
|
|
138
138
|
"ExportResourcesModal.includeAllLocales": {
|
|
139
139
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var es = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var frFR = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -133,7 +133,7 @@ var frFR = {
|
|
|
133
133
|
},
|
|
134
134
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
135
135
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
136
|
-
string: "
|
|
136
|
+
string: "Include Order number, id, and states in every row"
|
|
137
137
|
},
|
|
138
138
|
"ExportResourcesModal.includeAllLocales": {
|
|
139
139
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var frFR = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var ptBR = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -133,7 +133,7 @@ var ptBR = {
|
|
|
133
133
|
},
|
|
134
134
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
135
135
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
136
|
-
string: "
|
|
136
|
+
string: "Include Order number, id, and states in every row"
|
|
137
137
|
},
|
|
138
138
|
"ExportResourcesModal.includeAllLocales": {
|
|
139
139
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var ptBR = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var zhCN = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -135,7 +135,7 @@ var zhCN = {
|
|
|
135
135
|
},
|
|
136
136
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
137
137
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
138
|
-
string: "
|
|
138
|
+
string: "Include Order number, id, and states in every row"
|
|
139
139
|
},
|
|
140
140
|
"ExportResourcesModal.includeAllLocales": {
|
|
141
141
|
developer_comment: "label for \"Include all locales\" checkbox",
|
|
@@ -133,7 +133,7 @@ var zhCN = {
|
|
|
133
133
|
},
|
|
134
134
|
"ExportResourcesModal.fillRowsForOrderExport": {
|
|
135
135
|
developer_comment: "A checkbox label for filling rows for order export",
|
|
136
|
-
string: "
|
|
136
|
+
string: "Include Order number, id, and states in every row"
|
|
137
137
|
},
|
|
138
138
|
"ExportResourcesModal.includeAllLocales": {
|
|
139
139
|
developer_comment: "label for \"Include all locales\" checkbox",
|
package/package.json
CHANGED