@commercetools-frontend-extensions/export-resources-modal 5.1.5 → 5.3.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/{active-drag-drop-area-95a76828.cjs.dev.js → active-drag-drop-area-e3f74c13.cjs.dev.js} +3 -3
- package/dist/{active-drag-drop-area-02be53e3.cjs.prod.js → active-drag-drop-area-e9bf7129.cjs.prod.js} +3 -3
- package/dist/{active-drag-drop-area-d6b75271.esm.js → active-drag-drop-area-fb905a01.esm.js} +3 -3
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +3 -3
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +3 -3
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +3 -3
- package/dist/{de-458f4116.esm.js → de-324f2829.esm.js} +64 -20
- package/dist/{de-c18aeb38.cjs.dev.js → de-44143469.cjs.dev.js} +64 -20
- package/dist/{de-172c3905.cjs.prod.js → de-850971a3.cjs.prod.js} +64 -20
- package/dist/declarations/src/@constants/delimiters.d.ts +19 -0
- package/dist/declarations/src/@constants/urls.d.ts +1 -0
- package/dist/declarations/src/@types/export-api.d.ts +10 -0
- package/dist/declarations/src/@types/form.d.ts +2 -0
- package/dist/{en-bf084198.esm.js → en-015fa203.esm.js} +64 -20
- package/dist/{en-951cd344.cjs.prod.js → en-6928b534.cjs.dev.js} +64 -20
- package/dist/{en-68174953.cjs.dev.js → en-89430bcb.cjs.prod.js} +64 -20
- package/dist/{enabled-drop-area-288842af.cjs.prod.js → enabled-drop-area-3161efde.cjs.prod.js} +3 -3
- package/dist/{enabled-drop-area-d3bbcefb.esm.js → enabled-drop-area-5d5a61c8.esm.js} +3 -3
- package/dist/{enabled-drop-area-febabd16.cjs.dev.js → enabled-drop-area-b35ddf49.cjs.dev.js} +3 -3
- package/dist/{es-a8553ca8.esm.js → es-735dbaf2.esm.js} +64 -20
- package/dist/{es-b0a9fb31.cjs.prod.js → es-e6dd1e27.cjs.dev.js} +64 -20
- package/dist/{es-38a3a3ae.cjs.dev.js → es-e73368be.cjs.prod.js} +64 -20
- package/dist/{file-dropped-area-c19096f2.cjs.prod.js → file-dropped-area-85fb3d1d.cjs.prod.js} +1 -1
- package/dist/{file-dropped-area-eb9f32ff.esm.js → file-dropped-area-aad1bd09.esm.js} +1 -1
- package/dist/{file-dropped-area-9fe104b9.cjs.dev.js → file-dropped-area-ff7e0b8e.cjs.dev.js} +1 -1
- package/dist/{fr-FR-97c22617.cjs.dev.js → fr-FR-0eab30ec.cjs.prod.js} +64 -20
- package/dist/{fr-FR-8146efa8.cjs.prod.js → fr-FR-62affef0.cjs.dev.js} +64 -20
- package/dist/{fr-FR-87237d20.esm.js → fr-FR-96dce16c.esm.js} +64 -20
- package/dist/{index-fba0d105.cjs.dev.js → index-2ed12fce.cjs.dev.js} +312 -183
- package/dist/{index-6fc91e18.cjs.prod.js → index-e73d846c.cjs.prod.js} +312 -183
- package/dist/{index-4b561bdd.esm.js → index-f0396960.esm.js} +312 -183
- package/dist/{pt-BR-c725734e.cjs.prod.js → pt-BR-13243e64.cjs.dev.js} +64 -20
- package/dist/{pt-BR-cf6abfcc.esm.js → pt-BR-7fd72f5d.esm.js} +64 -20
- package/dist/{pt-BR-c42a98aa.cjs.dev.js → pt-BR-ced88ff5.cjs.prod.js} +64 -20
- package/package.json +4 -4
|
@@ -19,10 +19,10 @@ var reactIntl = require('react-intl');
|
|
|
19
19
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
20
20
|
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
21
21
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
22
|
-
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
23
22
|
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
24
23
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
25
24
|
var fullstory = require('@commercetools-frontend/fullstory');
|
|
25
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
26
26
|
var React = require('react');
|
|
27
27
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
28
28
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
@@ -37,7 +37,6 @@ var omitEmpty = require('omit-empty-es');
|
|
|
37
37
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
38
38
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
39
39
|
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
40
|
-
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
41
40
|
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
42
41
|
var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
|
|
43
42
|
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
@@ -46,6 +45,7 @@ var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/insta
|
|
|
46
45
|
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
47
46
|
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
48
47
|
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
48
|
+
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
49
49
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
50
50
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
51
51
|
var constants = require('@commercetools-frontend/constants');
|
|
@@ -76,8 +76,8 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
76
76
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
77
77
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
78
78
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
79
|
-
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
80
79
|
var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
|
|
80
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
81
81
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
82
82
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
83
83
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
@@ -86,7 +86,6 @@ var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
|
86
86
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
87
87
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
88
88
|
var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
|
|
89
|
-
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
90
89
|
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
91
90
|
var _Set__default = /*#__PURE__*/_interopDefault(_Set);
|
|
92
91
|
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
@@ -95,6 +94,7 @@ var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceP
|
|
|
95
94
|
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
96
95
|
var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
97
96
|
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
97
|
+
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
98
98
|
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
99
99
|
var sortBy__default = /*#__PURE__*/_interopDefault(sortBy);
|
|
100
100
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
@@ -278,10 +278,10 @@ var messages = reactIntl.defineMessages({
|
|
|
278
278
|
description: 'In Export fields selection - Search by entering the exact field name message',
|
|
279
279
|
defaultMessage: 'Try searching by entering the exact field name.'
|
|
280
280
|
},
|
|
281
|
-
|
|
282
|
-
id: 'ExportResourcesModal.
|
|
283
|
-
description: 'Label for
|
|
284
|
-
defaultMessage: 'Scope'
|
|
281
|
+
scope: {
|
|
282
|
+
id: 'ExportResourcesModal.scope',
|
|
283
|
+
description: 'Label for "Scope:"',
|
|
284
|
+
defaultMessage: 'Scope:'
|
|
285
285
|
},
|
|
286
286
|
exportScopeAllCategories: {
|
|
287
287
|
id: 'ExportResourcesModal.exportScopeAllCategories',
|
|
@@ -398,30 +398,30 @@ var messages = reactIntl.defineMessages({
|
|
|
398
398
|
description: 'Label for Export Filtered without count',
|
|
399
399
|
defaultMessage: 'Export filtered'
|
|
400
400
|
},
|
|
401
|
-
|
|
402
|
-
id: 'ExportResourcesModal.
|
|
403
|
-
description: 'Label for
|
|
404
|
-
defaultMessage: '
|
|
401
|
+
saveAs: {
|
|
402
|
+
id: 'ExportResourcesModal.saveAs',
|
|
403
|
+
description: 'Label for "Save as:"',
|
|
404
|
+
defaultMessage: 'Save as:'
|
|
405
405
|
},
|
|
406
406
|
selected: {
|
|
407
407
|
id: 'ExportResourcesModal.selected',
|
|
408
408
|
description: 'Label for total Selected',
|
|
409
409
|
defaultMessage: '{total} selected'
|
|
410
410
|
},
|
|
411
|
-
|
|
412
|
-
id: 'ExportResourcesModal.
|
|
413
|
-
description: '
|
|
414
|
-
defaultMessage: '
|
|
411
|
+
fillRows: {
|
|
412
|
+
id: 'ExportResourcesModal.fillRows',
|
|
413
|
+
description: 'A checkbox label for filling rows with complete data',
|
|
414
|
+
defaultMessage: 'Fill all rows with complete data'
|
|
415
415
|
},
|
|
416
|
-
|
|
417
|
-
id: 'ExportResourcesModal.
|
|
418
|
-
description: 'A
|
|
419
|
-
defaultMessage: '
|
|
416
|
+
moreInformation: {
|
|
417
|
+
id: 'ExportResourcesModal.moreInformation',
|
|
418
|
+
description: 'A label for more information',
|
|
419
|
+
defaultMessage: 'For more information, refer to the {documentationLink}'
|
|
420
420
|
},
|
|
421
|
-
|
|
422
|
-
id: 'ExportResourcesModal.
|
|
423
|
-
description: 'A
|
|
424
|
-
defaultMessage: '
|
|
421
|
+
documentation: {
|
|
422
|
+
id: 'ExportResourcesModal.documentation',
|
|
423
|
+
description: 'A label for Documentation link',
|
|
424
|
+
defaultMessage: 'Documentation'
|
|
425
425
|
},
|
|
426
426
|
loadMoreFields: {
|
|
427
427
|
id: 'ExportResourcesModal.loadMoreFields',
|
|
@@ -642,6 +642,61 @@ var messages = reactIntl.defineMessages({
|
|
|
642
642
|
id: 'ExportResourcesModal.noResourcesToExportForQueryPredicate',
|
|
643
643
|
description: 'Error message when there are no resources to export for given query predicate',
|
|
644
644
|
defaultMessage: 'No resources match your query predicate. Please check your query predicate and try again.'
|
|
645
|
+
},
|
|
646
|
+
separators: {
|
|
647
|
+
id: 'ExportResourcesModal.separators',
|
|
648
|
+
description: 'Label for separators',
|
|
649
|
+
defaultMessage: 'Separators'
|
|
650
|
+
},
|
|
651
|
+
separatorsDescription: {
|
|
652
|
+
id: 'ExportResourcesModal.separatorsDescription',
|
|
653
|
+
description: 'Description for column separators',
|
|
654
|
+
defaultMessage: 'Configure how columns are separated in the exported file'
|
|
655
|
+
},
|
|
656
|
+
columns: {
|
|
657
|
+
id: 'ExportResourcesModal.columns',
|
|
658
|
+
description: 'Label for column separator select',
|
|
659
|
+
defaultMessage: 'Columns:'
|
|
660
|
+
},
|
|
661
|
+
decimal: {
|
|
662
|
+
id: 'ExportResourcesModal.decimal',
|
|
663
|
+
description: 'Label for decimal separator select',
|
|
664
|
+
defaultMessage: 'Decimals:'
|
|
665
|
+
},
|
|
666
|
+
columnSeparatorComma: {
|
|
667
|
+
id: 'ExportResourcesModal.columnSeparatorComma',
|
|
668
|
+
description: 'Label for comma column separator option',
|
|
669
|
+
defaultMessage: 'comma (,)'
|
|
670
|
+
},
|
|
671
|
+
columnSeparatorSemicolon: {
|
|
672
|
+
id: 'ExportResourcesModal.columnSeparatorSemicolon',
|
|
673
|
+
description: 'Label for semicolon column separator option',
|
|
674
|
+
defaultMessage: 'semicolon (;)'
|
|
675
|
+
},
|
|
676
|
+
decimalSeparatorPoint: {
|
|
677
|
+
id: 'ExportResourcesModal.decimalSeparatorPoint',
|
|
678
|
+
description: 'Label for point decimal separator option',
|
|
679
|
+
defaultMessage: 'point (.)'
|
|
680
|
+
},
|
|
681
|
+
decimalSeparatorComma: {
|
|
682
|
+
id: 'ExportResourcesModal.decimalSeparatorComma',
|
|
683
|
+
description: 'Label for comma decimal separator option',
|
|
684
|
+
defaultMessage: 'comma (,)'
|
|
685
|
+
},
|
|
686
|
+
columnSeparatorTab: {
|
|
687
|
+
id: 'ExportResourcesModal.columnSeparatorTab',
|
|
688
|
+
description: 'Label for tab column separator option',
|
|
689
|
+
defaultMessage: 'tab (\\t)'
|
|
690
|
+
},
|
|
691
|
+
columnSeparatorPipe: {
|
|
692
|
+
id: 'ExportResourcesModal.columnSeparatorPipe',
|
|
693
|
+
description: 'Label for pipe column separator option',
|
|
694
|
+
defaultMessage: 'pipe (|)'
|
|
695
|
+
},
|
|
696
|
+
csvSettings: {
|
|
697
|
+
id: 'ExportResourcesModal.csvSettings',
|
|
698
|
+
description: 'Label for CSV settings section',
|
|
699
|
+
defaultMessage: 'CSV settings:'
|
|
645
700
|
}
|
|
646
701
|
});
|
|
647
702
|
|
|
@@ -678,6 +733,128 @@ const renderQueryPredicateError = key => {
|
|
|
678
733
|
}
|
|
679
734
|
};
|
|
680
735
|
|
|
736
|
+
const Z_INDEX_DROPDOWN = 30000;
|
|
737
|
+
const OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION = 'OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION';
|
|
738
|
+
const OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP = 'OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP';
|
|
739
|
+
const TOTAL_STEPS = 3;
|
|
740
|
+
|
|
741
|
+
const DELIMITERS$1 = {
|
|
742
|
+
COMMA: ',',
|
|
743
|
+
SEMICOLON: ';',
|
|
744
|
+
POINT: '.',
|
|
745
|
+
TAB: '\t',
|
|
746
|
+
PIPE: '|'
|
|
747
|
+
};
|
|
748
|
+
const COLUMN_DELIMITER_OPTIONS = [{
|
|
749
|
+
label: messages.columnSeparatorComma,
|
|
750
|
+
value: DELIMITERS$1.COMMA
|
|
751
|
+
}, {
|
|
752
|
+
label: messages.columnSeparatorSemicolon,
|
|
753
|
+
value: DELIMITERS$1.SEMICOLON
|
|
754
|
+
}, {
|
|
755
|
+
label: messages.columnSeparatorTab,
|
|
756
|
+
value: DELIMITERS$1.TAB
|
|
757
|
+
}, {
|
|
758
|
+
label: messages.columnSeparatorPipe,
|
|
759
|
+
value: DELIMITERS$1.PIPE
|
|
760
|
+
}];
|
|
761
|
+
const DECIMAL_DELIMITER_OPTIONS = [{
|
|
762
|
+
label: messages.decimalSeparatorPoint,
|
|
763
|
+
value: DELIMITERS$1.POINT
|
|
764
|
+
}, {
|
|
765
|
+
label: messages.decimalSeparatorComma,
|
|
766
|
+
value: DELIMITERS$1.COMMA
|
|
767
|
+
}];
|
|
768
|
+
|
|
769
|
+
const EXPORT_OPERATION_STATES = {
|
|
770
|
+
PROCESSING: 'processing',
|
|
771
|
+
COMPLETED: 'completed',
|
|
772
|
+
FAILED: 'failed',
|
|
773
|
+
QUEUED: 'queued'
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
const EXPORT_TYPES = {
|
|
777
|
+
ALL: 'all',
|
|
778
|
+
FILTERED: 'filtered',
|
|
779
|
+
SELECTED: 'selected',
|
|
780
|
+
QUERY_PREDICATE: 'query-predicate'
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
const EXPORTABLE_RESOURCES = {
|
|
784
|
+
CATEGORY: 'category',
|
|
785
|
+
PRODUCT: 'product',
|
|
786
|
+
PRODUCT_TYPE: 'product-type',
|
|
787
|
+
DISCOUNT_CODE: 'discount-code',
|
|
788
|
+
INVENTORY_ENTRY: 'inventory-entry',
|
|
789
|
+
ORDER: 'order',
|
|
790
|
+
CUSTOMER: 'customer'
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
const OUTPUT_FORMATS = {
|
|
794
|
+
JSON: 'json',
|
|
795
|
+
CSV: 'csv'
|
|
796
|
+
};
|
|
797
|
+
const OUTPUT_FORMAT_OPTIONS = [{
|
|
798
|
+
value: OUTPUT_FORMATS.CSV,
|
|
799
|
+
label: 'CSV'
|
|
800
|
+
}, {
|
|
801
|
+
value: OUTPUT_FORMATS.JSON,
|
|
802
|
+
label: 'JSON'
|
|
803
|
+
}];
|
|
804
|
+
|
|
805
|
+
const EXPORT_DATA_DOCUMENTATION_LINK = 'https://docs.commercetools.com/merchant-center/export-data';
|
|
806
|
+
const CSV_TEMPLATES_LINK = 'https://docs.commercetools.com/merchant-center/import-data#download-a-template';
|
|
807
|
+
const CSV_STRUCTURE_DOCUMENTATION_LINK = 'https://docs.commercetools.com/merchant-center/export-data#structure-of-exported-csv-files';
|
|
808
|
+
|
|
809
|
+
const resourceTypeMessages = {
|
|
810
|
+
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
811
|
+
exportScopeAll: messages.exportScopeAllCategories,
|
|
812
|
+
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
813
|
+
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
814
|
+
},
|
|
815
|
+
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
816
|
+
exportScopeAll: messages.exportScopeAllProducts,
|
|
817
|
+
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
818
|
+
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
819
|
+
},
|
|
820
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
821
|
+
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
822
|
+
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
823
|
+
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
824
|
+
},
|
|
825
|
+
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
826
|
+
exportScopeAll: messages.exportInventoriesForAllProducts,
|
|
827
|
+
exportScopeSelected: messages.exportInventoriesForSelectedProducts,
|
|
828
|
+
exportScopeFiltered: messages.exportInventoriesForFilteredProducts
|
|
829
|
+
},
|
|
830
|
+
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
831
|
+
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
832
|
+
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
833
|
+
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
834
|
+
},
|
|
835
|
+
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
836
|
+
exportScopeAll: messages.exportScopeAllOrders,
|
|
837
|
+
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
838
|
+
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
839
|
+
},
|
|
840
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
841
|
+
exportScopeAll: messages.exportScopeAllCustomers,
|
|
842
|
+
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
843
|
+
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
|
|
847
|
+
const FIELD_SELECTION_MODES = {
|
|
848
|
+
SELECTED_FIELDS: 'selected-fields',
|
|
849
|
+
IMPORTED_CSV_TEMPLATE: 'imported-csv-template'
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
853
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
854
|
+
const DEFAULT_SHORT_LIVED_FLAGS = {};
|
|
855
|
+
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
856
|
+
_objectSpread$g(_objectSpread$g({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
857
|
+
|
|
681
858
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
682
859
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
683
860
|
let MissingExportResourceProviderError = /*#__PURE__*/function (_Error) {
|
|
@@ -743,8 +920,8 @@ function useExportResourcesModalContext() {
|
|
|
743
920
|
return context;
|
|
744
921
|
}
|
|
745
922
|
|
|
746
|
-
function ownKeys$
|
|
747
|
-
function _objectSpread$
|
|
923
|
+
function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
924
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$f(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
748
925
|
const defaultOptions = {
|
|
749
926
|
storageType: 'local',
|
|
750
927
|
segregateByUser: true
|
|
@@ -762,7 +939,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
762
939
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
763
940
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
764
941
|
var _context;
|
|
765
|
-
const mergedOptions = _objectSpread$
|
|
942
|
+
const mergedOptions = _objectSpread$f(_objectSpread$f({}, defaultOptions), options);
|
|
766
943
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
767
944
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
768
945
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -806,99 +983,6 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
806
983
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
807
984
|
};
|
|
808
985
|
|
|
809
|
-
const Z_INDEX_DROPDOWN = 30000;
|
|
810
|
-
const OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION = 'OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION';
|
|
811
|
-
const OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP = 'OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP';
|
|
812
|
-
const TOTAL_STEPS = 3;
|
|
813
|
-
|
|
814
|
-
const EXPORT_OPERATION_STATES = {
|
|
815
|
-
PROCESSING: 'processing',
|
|
816
|
-
COMPLETED: 'completed',
|
|
817
|
-
FAILED: 'failed',
|
|
818
|
-
QUEUED: 'queued'
|
|
819
|
-
};
|
|
820
|
-
|
|
821
|
-
const EXPORT_TYPES = {
|
|
822
|
-
ALL: 'all',
|
|
823
|
-
FILTERED: 'filtered',
|
|
824
|
-
SELECTED: 'selected',
|
|
825
|
-
QUERY_PREDICATE: 'query-predicate'
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
const EXPORTABLE_RESOURCES = {
|
|
829
|
-
CATEGORY: 'category',
|
|
830
|
-
PRODUCT: 'product',
|
|
831
|
-
PRODUCT_TYPE: 'product-type',
|
|
832
|
-
DISCOUNT_CODE: 'discount-code',
|
|
833
|
-
INVENTORY_ENTRY: 'inventory-entry',
|
|
834
|
-
ORDER: 'order',
|
|
835
|
-
CUSTOMER: 'customer'
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
const OUTPUT_FORMATS = {
|
|
839
|
-
JSON: 'json',
|
|
840
|
-
CSV: 'csv'
|
|
841
|
-
};
|
|
842
|
-
const OUTPUT_FORMAT_OPTIONS = [{
|
|
843
|
-
value: OUTPUT_FORMATS.CSV,
|
|
844
|
-
label: 'CSV'
|
|
845
|
-
}, {
|
|
846
|
-
value: OUTPUT_FORMATS.JSON,
|
|
847
|
-
label: 'JSON'
|
|
848
|
-
}];
|
|
849
|
-
|
|
850
|
-
const EXPORT_DATA_DOCUMENTATION_LINK = 'https://docs.commercetools.com/merchant-center/export-data';
|
|
851
|
-
const CSV_TEMPLATES_LINK = 'https://docs.commercetools.com/merchant-center/import-data#download-a-template';
|
|
852
|
-
|
|
853
|
-
const resourceTypeMessages = {
|
|
854
|
-
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
855
|
-
exportScopeAll: messages.exportScopeAllCategories,
|
|
856
|
-
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
857
|
-
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
858
|
-
},
|
|
859
|
-
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
860
|
-
exportScopeAll: messages.exportScopeAllProducts,
|
|
861
|
-
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
862
|
-
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
863
|
-
},
|
|
864
|
-
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
865
|
-
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
866
|
-
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
867
|
-
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
868
|
-
},
|
|
869
|
-
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
870
|
-
exportScopeAll: messages.exportInventoriesForAllProducts,
|
|
871
|
-
exportScopeSelected: messages.exportInventoriesForSelectedProducts,
|
|
872
|
-
exportScopeFiltered: messages.exportInventoriesForFilteredProducts
|
|
873
|
-
},
|
|
874
|
-
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
875
|
-
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
876
|
-
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
877
|
-
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
878
|
-
},
|
|
879
|
-
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
880
|
-
exportScopeAll: messages.exportScopeAllOrders,
|
|
881
|
-
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
882
|
-
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
883
|
-
},
|
|
884
|
-
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
885
|
-
exportScopeAll: messages.exportScopeAllCustomers,
|
|
886
|
-
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
887
|
-
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
888
|
-
}
|
|
889
|
-
};
|
|
890
|
-
|
|
891
|
-
const FIELD_SELECTION_MODES = {
|
|
892
|
-
SELECTED_FIELDS: 'selected-fields',
|
|
893
|
-
IMPORTED_CSV_TEMPLATE: 'imported-csv-template'
|
|
894
|
-
};
|
|
895
|
-
|
|
896
|
-
function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
897
|
-
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
898
|
-
const DEFAULT_SHORT_LIVED_FLAGS = {};
|
|
899
|
-
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
900
|
-
_objectSpread$f(_objectSpread$f({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
901
|
-
|
|
902
986
|
function resourceTypeToFileName(resourceType, locale) {
|
|
903
987
|
var _context;
|
|
904
988
|
const date = new Date();
|
|
@@ -1488,13 +1572,14 @@ const useInitialValues = props => {
|
|
|
1488
1572
|
groups = updateFieldGroupsWithIsCheckedValue(groups, cachedSelectedGroups?.[props.resourceType] || {});
|
|
1489
1573
|
groups = updateFieldGroupsWithIsExpandedValue(groups, cachedExpandedGroups?.[props.resourceType] || {});
|
|
1490
1574
|
return {
|
|
1491
|
-
outputFormat: props.outputFormat,
|
|
1492
1575
|
fileName: `${resourceTypeToFileName(props.resourceType, userLocale)}`,
|
|
1493
1576
|
locales: [locale],
|
|
1494
1577
|
groups: updateFieldGroupWithAdditionalFieldExtensions(groups),
|
|
1495
1578
|
queryPredicate: '',
|
|
1496
|
-
// Preferences
|
|
1497
1579
|
fillRows: false,
|
|
1580
|
+
outputFormat: props.outputFormat,
|
|
1581
|
+
columnSeparator: DELIMITERS$1.COMMA,
|
|
1582
|
+
decimalSeparator: DELIMITERS$1.POINT,
|
|
1498
1583
|
importedCsvTemplateFile: null
|
|
1499
1584
|
};
|
|
1500
1585
|
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale, userLocale]);
|
|
@@ -1570,13 +1655,18 @@ const useStartExportOperation = props => {
|
|
|
1570
1655
|
if (localeOption !== 'onlyLocalesFoundInCsvFile') {
|
|
1571
1656
|
locales = values.locales;
|
|
1572
1657
|
}
|
|
1658
|
+
const isCsv = values.outputFormat === 'csv';
|
|
1573
1659
|
const response = await createExportOperation({
|
|
1574
1660
|
projectKey,
|
|
1575
1661
|
resourceType: props.resourceType,
|
|
1576
1662
|
fileName: appendCsvOrJsonExtensionIfAbsent(values.fileName, values.outputFormat),
|
|
1577
1663
|
fileFormat: values.outputFormat,
|
|
1578
1664
|
locales,
|
|
1579
|
-
fillRows: values.fillRows,
|
|
1665
|
+
fillRows: isCsv && values.fillRows,
|
|
1666
|
+
separator: isCsv ? {
|
|
1667
|
+
columns: values.columnSeparator,
|
|
1668
|
+
decimal: values.decimalSeparator
|
|
1669
|
+
} : undefined,
|
|
1580
1670
|
fields,
|
|
1581
1671
|
where,
|
|
1582
1672
|
filters
|
|
@@ -1807,43 +1897,85 @@ const useValidateExportOperation = () => {
|
|
|
1807
1897
|
|
|
1808
1898
|
function ownKeys$a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1809
1899
|
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1810
|
-
const
|
|
1900
|
+
const ExportPreferenceSection = () => {
|
|
1811
1901
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
1812
1902
|
formik = _useExportResourcesMo.formik;
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1903
|
+
const columnSeparatorOptions = _mapInstanceProperty__default["default"](COLUMN_DELIMITER_OPTIONS).call(COLUMN_DELIMITER_OPTIONS, option => _objectSpread$a(_objectSpread$a({}, option), {}, {
|
|
1904
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$a({}, option.label))
|
|
1905
|
+
}));
|
|
1906
|
+
const decimalSeparatorOptions = _mapInstanceProperty__default["default"](DECIMAL_DELIMITER_OPTIONS).call(DECIMAL_DELIMITER_OPTIONS, option => _objectSpread$a(_objectSpread$a({}, option), {}, {
|
|
1907
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$a({}, option.label))
|
|
1908
|
+
}));
|
|
1909
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1910
|
+
scale: "m",
|
|
1911
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1912
|
+
scale: "s",
|
|
1913
|
+
children: [jsxRuntime.jsxs("div", {
|
|
1914
|
+
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1915
|
+
intlMessage: messages.separators
|
|
1916
|
+
}), jsxRuntime.jsx(uiKit.Text.Caption, {
|
|
1917
|
+
intlMessage: messages.separatorsDescription
|
|
1918
|
+
})]
|
|
1919
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1920
|
+
scale: "s",
|
|
1921
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1922
|
+
scale: "xs",
|
|
1923
|
+
alignItems: "center",
|
|
1924
|
+
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1925
|
+
intlMessage: messages.columns
|
|
1926
|
+
}), jsxRuntime.jsx(uiKit.SelectInput, {
|
|
1927
|
+
horizontalConstraint: 4,
|
|
1928
|
+
isSearchable: false,
|
|
1929
|
+
options: columnSeparatorOptions,
|
|
1930
|
+
value: _valuesInstanceProperty__default["default"](formik).columnSeparator,
|
|
1931
|
+
onChange: e => {
|
|
1932
|
+
formik.setFieldValue('columnSeparator', e.target.value);
|
|
1933
|
+
},
|
|
1934
|
+
menuPortalTarget: document.body,
|
|
1935
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1936
|
+
})]
|
|
1937
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1938
|
+
scale: "s",
|
|
1939
|
+
alignItems: "center",
|
|
1940
|
+
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1941
|
+
intlMessage: messages.decimal
|
|
1942
|
+
}), jsxRuntime.jsx(uiKit.SelectInput, {
|
|
1943
|
+
isSearchable: false,
|
|
1944
|
+
options: decimalSeparatorOptions,
|
|
1945
|
+
value: _valuesInstanceProperty__default["default"](formik).decimalSeparator,
|
|
1946
|
+
onChange: e => {
|
|
1947
|
+
formik.setFieldValue('decimalSeparator', e.target.value);
|
|
1948
|
+
},
|
|
1949
|
+
menuPortalTarget: document.body,
|
|
1950
|
+
horizontalConstraint: 4,
|
|
1951
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1952
|
+
})]
|
|
1953
|
+
})]
|
|
1954
|
+
})]
|
|
1955
|
+
}), jsxRuntime.jsxs("div", {
|
|
1956
|
+
children: [jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1957
|
+
isChecked: _valuesInstanceProperty__default["default"](formik).fillRows,
|
|
1958
|
+
onChange: e => {
|
|
1959
|
+
formik.setFieldValue('fillRows', e.target.checked);
|
|
1960
|
+
},
|
|
1961
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$a({}, messages.fillRows))
|
|
1962
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1963
|
+
scale: "xl",
|
|
1964
|
+
children: [jsxRuntime.jsx("div", {}), jsxRuntime.jsx(uiKit.Text.Caption, {
|
|
1965
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.moreInformation), {}, {
|
|
1966
|
+
values: {
|
|
1967
|
+
documentationLink: jsxRuntime.jsx(uiKit.Link, {
|
|
1968
|
+
intlMessage: messages.documentation,
|
|
1969
|
+
isExternal: true,
|
|
1970
|
+
to: CSV_STRUCTURE_DOCUMENTATION_LINK
|
|
1971
|
+
}, "documentation-link")
|
|
1972
|
+
}
|
|
1973
|
+
})
|
|
1974
|
+
})]
|
|
1975
|
+
})]
|
|
1976
|
+
})]
|
|
1834
1977
|
});
|
|
1835
1978
|
};
|
|
1836
|
-
const ExportPreferenceSection = () => {
|
|
1837
|
-
const _useExportResourcesMo3 = useExportResourcesModalContext(),
|
|
1838
|
-
resourceType = _useExportResourcesMo3.resourceType;
|
|
1839
|
-
if (resourceType === 'order') {
|
|
1840
|
-
return jsxRuntime.jsx(OrderPreferences, {});
|
|
1841
|
-
}
|
|
1842
|
-
if (resourceType === 'product') {
|
|
1843
|
-
return jsxRuntime.jsx(ProductPreferences, {});
|
|
1844
|
-
}
|
|
1845
|
-
return null;
|
|
1846
|
-
};
|
|
1847
1979
|
|
|
1848
1980
|
function ownKeys$9(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1849
1981
|
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1922,7 +2054,6 @@ function ExportScopeSection() {
|
|
|
1922
2054
|
}
|
|
1923
2055
|
|
|
1924
2056
|
const ExportFileSettingsStep = () => {
|
|
1925
|
-
var _context;
|
|
1926
2057
|
const intl = reactIntl.useIntl();
|
|
1927
2058
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
1928
2059
|
formik = _useExportResourcesMo.formik,
|
|
@@ -1937,9 +2068,7 @@ const ExportFileSettingsStep = () => {
|
|
|
1937
2068
|
setLocaleOption(LocaleOption.Selected);
|
|
1938
2069
|
}
|
|
1939
2070
|
};
|
|
1940
|
-
|
|
1941
|
-
// TODO: make this dynamic based on the resource type & output format (more scalable)
|
|
1942
|
-
const shouldShowPreferences = _includesInstanceProperty__default["default"](_context = ['order', 'product']).call(_context, resourceType) && _valuesInstanceProperty__default["default"](formik).outputFormat === 'csv';
|
|
2071
|
+
const shouldShowPreferences = _valuesInstanceProperty__default["default"](formik).outputFormat === 'csv';
|
|
1943
2072
|
return jsxRuntime.jsx(applicationComponents.FormDialog, {
|
|
1944
2073
|
isOpen: true,
|
|
1945
2074
|
title: `${intl.formatMessage(messages.stepCount, {
|
|
@@ -1961,31 +2090,22 @@ const ExportFileSettingsStep = () => {
|
|
|
1961
2090
|
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
1962
2091
|
scale: "l",
|
|
1963
2092
|
children: jsxRuntime.jsxs(uiKit.Grid, {
|
|
1964
|
-
gridRowGap: uiKit.designTokens.
|
|
2093
|
+
gridRowGap: uiKit.designTokens.spacingM,
|
|
1965
2094
|
gridTemplateColumns: `calc(${uiKit.designTokens.constraint3} + ${uiKit.designTokens.spacingL}) auto`,
|
|
1966
2095
|
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1967
2096
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1968
|
-
intlMessage: messages.
|
|
2097
|
+
intlMessage: messages.scope
|
|
1969
2098
|
})
|
|
1970
2099
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1971
2100
|
children: jsxRuntime.jsx(ExportScopeSection, {})
|
|
1972
2101
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1973
2102
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1974
|
-
intlMessage: messages.
|
|
2103
|
+
intlMessage: messages.saveAs
|
|
1975
2104
|
})
|
|
1976
2105
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1977
2106
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1978
|
-
scale: "
|
|
1979
|
-
children: [jsxRuntime.jsx(
|
|
1980
|
-
name: "outputFormat",
|
|
1981
|
-
onChange: handleOutputFormatChange,
|
|
1982
|
-
onBlur: formik.handleBlur,
|
|
1983
|
-
value: _valuesInstanceProperty__default["default"](formik).outputFormat,
|
|
1984
|
-
title: intl.formatMessage(messages.outputFormat),
|
|
1985
|
-
options: OUTPUT_FORMAT_OPTIONS,
|
|
1986
|
-
menuPortalTarget: document.body,
|
|
1987
|
-
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1988
|
-
}), jsxRuntime.jsx(fullstory.Masking.Mask, {
|
|
2107
|
+
scale: "s",
|
|
2108
|
+
children: [jsxRuntime.jsx(fullstory.Masking.Mask, {
|
|
1989
2109
|
children: jsxRuntime.jsx(uiKit.TextField, {
|
|
1990
2110
|
name: "fileName",
|
|
1991
2111
|
onChange: formik.handleChange,
|
|
@@ -1996,12 +2116,21 @@ const ExportFileSettingsStep = () => {
|
|
|
1996
2116
|
errors: mapFormikErrors(formik.errors.fileName),
|
|
1997
2117
|
renderError: renderFileNameError
|
|
1998
2118
|
})
|
|
2119
|
+
}), jsxRuntime.jsx(uiKit.SelectField, {
|
|
2120
|
+
name: "outputFormat",
|
|
2121
|
+
onChange: handleOutputFormatChange,
|
|
2122
|
+
onBlur: formik.handleBlur,
|
|
2123
|
+
value: _valuesInstanceProperty__default["default"](formik).outputFormat,
|
|
2124
|
+
title: intl.formatMessage(messages.outputFormat),
|
|
2125
|
+
options: OUTPUT_FORMAT_OPTIONS,
|
|
2126
|
+
menuPortalTarget: document.body,
|
|
2127
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1999
2128
|
})]
|
|
2000
2129
|
})
|
|
2001
2130
|
}), shouldShowPreferences && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2002
2131
|
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
2003
2132
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2004
|
-
intlMessage: messages.
|
|
2133
|
+
intlMessage: messages.csvSettings
|
|
2005
2134
|
})
|
|
2006
2135
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
2007
2136
|
children: jsxRuntime.jsx(ExportPreferenceSection, {})
|
|
@@ -3193,11 +3322,11 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
3193
3322
|
return /*#__PURE__*/react.css("" , "" );
|
|
3194
3323
|
}
|
|
3195
3324
|
|
|
3196
|
-
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-
|
|
3325
|
+
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-e9bf7129.cjs.prod.js' /* webpackChunkName: "active-drag-drop-area" */); }));
|
|
3197
3326
|
|
|
3198
|
-
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-
|
|
3327
|
+
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-3161efde.cjs.prod.js' /* webpackChunkName: "enabled-drop-area" */); }));
|
|
3199
3328
|
|
|
3200
|
-
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-
|
|
3329
|
+
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-85fb3d1d.cjs.prod.js' /* webpackChunkName: "filed-dropped-area" */); }));
|
|
3201
3330
|
|
|
3202
3331
|
function getDropArea(_ref) {
|
|
3203
3332
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -3278,17 +3407,17 @@ const getChunkImport = locale => {
|
|
|
3278
3407
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
3279
3408
|
switch (intlLocale) {
|
|
3280
3409
|
case 'de':
|
|
3281
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
3410
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-850971a3.cjs.prod.js'); });
|
|
3282
3411
|
case 'es':
|
|
3283
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
3412
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-e73368be.cjs.prod.js'); });
|
|
3284
3413
|
case 'fr-FR':
|
|
3285
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
3414
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-0eab30ec.cjs.prod.js'); });
|
|
3286
3415
|
case 'ja':
|
|
3287
3416
|
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-37632763.cjs.prod.js'); });
|
|
3288
3417
|
case 'pt-BR':
|
|
3289
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
3418
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-ced88ff5.cjs.prod.js'); });
|
|
3290
3419
|
default:
|
|
3291
|
-
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
3420
|
+
return Promise.resolve().then(function () { return require(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-89430bcb.cjs.prod.js'); });
|
|
3292
3421
|
}
|
|
3293
3422
|
};
|
|
3294
3423
|
const loadMessages = async locale => {
|