@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
|
@@ -15,12 +15,12 @@ import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/obje
|
|
|
15
15
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
16
16
|
import { defineMessages, FormattedMessage, useIntl, IntlProvider } from 'react-intl';
|
|
17
17
|
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
18
|
-
import { Text, TextInput, CheckboxInput, RadioInput, TextField, AngleRightIcon,
|
|
19
|
-
import { jsx,
|
|
20
|
-
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
18
|
+
import { Text, TextInput, Spacings, SelectInput, CheckboxInput, Link, RadioInput, TextField, AngleRightIcon, Grid, designTokens, SelectField, FieldLabel, Constraints, Tooltip, SupportIcon, Stamp, IconButton, AngleDownIcon, CollapsibleMotion, Card, SearchTextInput, TagList, FlatButton, AngleUpIcon, CheckBoldIcon, DataTable } from '@commercetools-frontend/ui-kit';
|
|
19
|
+
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
21
20
|
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
22
21
|
import { FormDialog } from '@commercetools-frontend/application-components';
|
|
23
22
|
import { Masking } from '@commercetools-frontend/fullstory';
|
|
23
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
24
24
|
import React, { useContext, useCallback, useState, useEffect, createContext, Fragment as Fragment$1, useMemo, lazy } from 'react';
|
|
25
25
|
import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
26
26
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
@@ -35,7 +35,6 @@ import omitEmpty from 'omit-empty-es';
|
|
|
35
35
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
36
36
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
37
37
|
import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
38
|
-
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
39
38
|
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
40
39
|
import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
41
40
|
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
@@ -44,6 +43,7 @@ import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instanc
|
|
|
44
43
|
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
45
44
|
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
46
45
|
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
46
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
47
47
|
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
48
48
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
49
49
|
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
@@ -237,10 +237,10 @@ var messages = defineMessages({
|
|
|
237
237
|
description: 'In Export fields selection - Search by entering the exact field name message',
|
|
238
238
|
defaultMessage: 'Try searching by entering the exact field name.'
|
|
239
239
|
},
|
|
240
|
-
|
|
241
|
-
id: 'ExportResourcesModal.
|
|
242
|
-
description: 'Label for
|
|
243
|
-
defaultMessage: 'Scope'
|
|
240
|
+
scope: {
|
|
241
|
+
id: 'ExportResourcesModal.scope',
|
|
242
|
+
description: 'Label for "Scope:"',
|
|
243
|
+
defaultMessage: 'Scope:'
|
|
244
244
|
},
|
|
245
245
|
exportScopeAllCategories: {
|
|
246
246
|
id: 'ExportResourcesModal.exportScopeAllCategories',
|
|
@@ -357,30 +357,30 @@ var messages = defineMessages({
|
|
|
357
357
|
description: 'Label for Export Filtered without count',
|
|
358
358
|
defaultMessage: 'Export filtered'
|
|
359
359
|
},
|
|
360
|
-
|
|
361
|
-
id: 'ExportResourcesModal.
|
|
362
|
-
description: 'Label for
|
|
363
|
-
defaultMessage: '
|
|
360
|
+
saveAs: {
|
|
361
|
+
id: 'ExportResourcesModal.saveAs',
|
|
362
|
+
description: 'Label for "Save as:"',
|
|
363
|
+
defaultMessage: 'Save as:'
|
|
364
364
|
},
|
|
365
365
|
selected: {
|
|
366
366
|
id: 'ExportResourcesModal.selected',
|
|
367
367
|
description: 'Label for total Selected',
|
|
368
368
|
defaultMessage: '{total} selected'
|
|
369
369
|
},
|
|
370
|
-
|
|
371
|
-
id: 'ExportResourcesModal.
|
|
372
|
-
description: '
|
|
373
|
-
defaultMessage: '
|
|
370
|
+
fillRows: {
|
|
371
|
+
id: 'ExportResourcesModal.fillRows',
|
|
372
|
+
description: 'A checkbox label for filling rows with complete data',
|
|
373
|
+
defaultMessage: 'Fill all rows with complete data'
|
|
374
374
|
},
|
|
375
|
-
|
|
376
|
-
id: 'ExportResourcesModal.
|
|
377
|
-
description: 'A
|
|
378
|
-
defaultMessage: '
|
|
375
|
+
moreInformation: {
|
|
376
|
+
id: 'ExportResourcesModal.moreInformation',
|
|
377
|
+
description: 'A label for more information',
|
|
378
|
+
defaultMessage: 'For more information, refer to the {documentationLink}'
|
|
379
379
|
},
|
|
380
|
-
|
|
381
|
-
id: 'ExportResourcesModal.
|
|
382
|
-
description: 'A
|
|
383
|
-
defaultMessage: '
|
|
380
|
+
documentation: {
|
|
381
|
+
id: 'ExportResourcesModal.documentation',
|
|
382
|
+
description: 'A label for Documentation link',
|
|
383
|
+
defaultMessage: 'Documentation'
|
|
384
384
|
},
|
|
385
385
|
loadMoreFields: {
|
|
386
386
|
id: 'ExportResourcesModal.loadMoreFields',
|
|
@@ -601,6 +601,61 @@ var messages = defineMessages({
|
|
|
601
601
|
id: 'ExportResourcesModal.noResourcesToExportForQueryPredicate',
|
|
602
602
|
description: 'Error message when there are no resources to export for given query predicate',
|
|
603
603
|
defaultMessage: 'No resources match your query predicate. Please check your query predicate and try again.'
|
|
604
|
+
},
|
|
605
|
+
separators: {
|
|
606
|
+
id: 'ExportResourcesModal.separators',
|
|
607
|
+
description: 'Label for separators',
|
|
608
|
+
defaultMessage: 'Separators'
|
|
609
|
+
},
|
|
610
|
+
separatorsDescription: {
|
|
611
|
+
id: 'ExportResourcesModal.separatorsDescription',
|
|
612
|
+
description: 'Description for column separators',
|
|
613
|
+
defaultMessage: 'Configure how columns are separated in the exported file'
|
|
614
|
+
},
|
|
615
|
+
columns: {
|
|
616
|
+
id: 'ExportResourcesModal.columns',
|
|
617
|
+
description: 'Label for column separator select',
|
|
618
|
+
defaultMessage: 'Columns:'
|
|
619
|
+
},
|
|
620
|
+
decimal: {
|
|
621
|
+
id: 'ExportResourcesModal.decimal',
|
|
622
|
+
description: 'Label for decimal separator select',
|
|
623
|
+
defaultMessage: 'Decimals:'
|
|
624
|
+
},
|
|
625
|
+
columnSeparatorComma: {
|
|
626
|
+
id: 'ExportResourcesModal.columnSeparatorComma',
|
|
627
|
+
description: 'Label for comma column separator option',
|
|
628
|
+
defaultMessage: 'comma (,)'
|
|
629
|
+
},
|
|
630
|
+
columnSeparatorSemicolon: {
|
|
631
|
+
id: 'ExportResourcesModal.columnSeparatorSemicolon',
|
|
632
|
+
description: 'Label for semicolon column separator option',
|
|
633
|
+
defaultMessage: 'semicolon (;)'
|
|
634
|
+
},
|
|
635
|
+
decimalSeparatorPoint: {
|
|
636
|
+
id: 'ExportResourcesModal.decimalSeparatorPoint',
|
|
637
|
+
description: 'Label for point decimal separator option',
|
|
638
|
+
defaultMessage: 'point (.)'
|
|
639
|
+
},
|
|
640
|
+
decimalSeparatorComma: {
|
|
641
|
+
id: 'ExportResourcesModal.decimalSeparatorComma',
|
|
642
|
+
description: 'Label for comma decimal separator option',
|
|
643
|
+
defaultMessage: 'comma (,)'
|
|
644
|
+
},
|
|
645
|
+
columnSeparatorTab: {
|
|
646
|
+
id: 'ExportResourcesModal.columnSeparatorTab',
|
|
647
|
+
description: 'Label for tab column separator option',
|
|
648
|
+
defaultMessage: 'tab (\\t)'
|
|
649
|
+
},
|
|
650
|
+
columnSeparatorPipe: {
|
|
651
|
+
id: 'ExportResourcesModal.columnSeparatorPipe',
|
|
652
|
+
description: 'Label for pipe column separator option',
|
|
653
|
+
defaultMessage: 'pipe (|)'
|
|
654
|
+
},
|
|
655
|
+
csvSettings: {
|
|
656
|
+
id: 'ExportResourcesModal.csvSettings',
|
|
657
|
+
description: 'Label for CSV settings section',
|
|
658
|
+
defaultMessage: 'CSV settings:'
|
|
604
659
|
}
|
|
605
660
|
});
|
|
606
661
|
|
|
@@ -637,6 +692,128 @@ const renderQueryPredicateError = key => {
|
|
|
637
692
|
}
|
|
638
693
|
};
|
|
639
694
|
|
|
695
|
+
const Z_INDEX_DROPDOWN = 30000;
|
|
696
|
+
const OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION = 'OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION';
|
|
697
|
+
const OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP = 'OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP';
|
|
698
|
+
const TOTAL_STEPS = 3;
|
|
699
|
+
|
|
700
|
+
const DELIMITERS$1 = {
|
|
701
|
+
COMMA: ',',
|
|
702
|
+
SEMICOLON: ';',
|
|
703
|
+
POINT: '.',
|
|
704
|
+
TAB: '\t',
|
|
705
|
+
PIPE: '|'
|
|
706
|
+
};
|
|
707
|
+
const COLUMN_DELIMITER_OPTIONS = [{
|
|
708
|
+
label: messages.columnSeparatorComma,
|
|
709
|
+
value: DELIMITERS$1.COMMA
|
|
710
|
+
}, {
|
|
711
|
+
label: messages.columnSeparatorSemicolon,
|
|
712
|
+
value: DELIMITERS$1.SEMICOLON
|
|
713
|
+
}, {
|
|
714
|
+
label: messages.columnSeparatorTab,
|
|
715
|
+
value: DELIMITERS$1.TAB
|
|
716
|
+
}, {
|
|
717
|
+
label: messages.columnSeparatorPipe,
|
|
718
|
+
value: DELIMITERS$1.PIPE
|
|
719
|
+
}];
|
|
720
|
+
const DECIMAL_DELIMITER_OPTIONS = [{
|
|
721
|
+
label: messages.decimalSeparatorPoint,
|
|
722
|
+
value: DELIMITERS$1.POINT
|
|
723
|
+
}, {
|
|
724
|
+
label: messages.decimalSeparatorComma,
|
|
725
|
+
value: DELIMITERS$1.COMMA
|
|
726
|
+
}];
|
|
727
|
+
|
|
728
|
+
const EXPORT_OPERATION_STATES = {
|
|
729
|
+
PROCESSING: 'processing',
|
|
730
|
+
COMPLETED: 'completed',
|
|
731
|
+
FAILED: 'failed',
|
|
732
|
+
QUEUED: 'queued'
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
const EXPORT_TYPES = {
|
|
736
|
+
ALL: 'all',
|
|
737
|
+
FILTERED: 'filtered',
|
|
738
|
+
SELECTED: 'selected',
|
|
739
|
+
QUERY_PREDICATE: 'query-predicate'
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
const EXPORTABLE_RESOURCES = {
|
|
743
|
+
CATEGORY: 'category',
|
|
744
|
+
PRODUCT: 'product',
|
|
745
|
+
PRODUCT_TYPE: 'product-type',
|
|
746
|
+
DISCOUNT_CODE: 'discount-code',
|
|
747
|
+
INVENTORY_ENTRY: 'inventory-entry',
|
|
748
|
+
ORDER: 'order',
|
|
749
|
+
CUSTOMER: 'customer'
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
const OUTPUT_FORMATS = {
|
|
753
|
+
JSON: 'json',
|
|
754
|
+
CSV: 'csv'
|
|
755
|
+
};
|
|
756
|
+
const OUTPUT_FORMAT_OPTIONS = [{
|
|
757
|
+
value: OUTPUT_FORMATS.CSV,
|
|
758
|
+
label: 'CSV'
|
|
759
|
+
}, {
|
|
760
|
+
value: OUTPUT_FORMATS.JSON,
|
|
761
|
+
label: 'JSON'
|
|
762
|
+
}];
|
|
763
|
+
|
|
764
|
+
const EXPORT_DATA_DOCUMENTATION_LINK = 'https://docs.commercetools.com/merchant-center/export-data';
|
|
765
|
+
const CSV_TEMPLATES_LINK = 'https://docs.commercetools.com/merchant-center/import-data#download-a-template';
|
|
766
|
+
const CSV_STRUCTURE_DOCUMENTATION_LINK = 'https://docs.commercetools.com/merchant-center/export-data#structure-of-exported-csv-files';
|
|
767
|
+
|
|
768
|
+
const resourceTypeMessages = {
|
|
769
|
+
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
770
|
+
exportScopeAll: messages.exportScopeAllCategories,
|
|
771
|
+
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
772
|
+
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
773
|
+
},
|
|
774
|
+
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
775
|
+
exportScopeAll: messages.exportScopeAllProducts,
|
|
776
|
+
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
777
|
+
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
778
|
+
},
|
|
779
|
+
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
780
|
+
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
781
|
+
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
782
|
+
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
783
|
+
},
|
|
784
|
+
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
785
|
+
exportScopeAll: messages.exportInventoriesForAllProducts,
|
|
786
|
+
exportScopeSelected: messages.exportInventoriesForSelectedProducts,
|
|
787
|
+
exportScopeFiltered: messages.exportInventoriesForFilteredProducts
|
|
788
|
+
},
|
|
789
|
+
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
790
|
+
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
791
|
+
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
792
|
+
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
793
|
+
},
|
|
794
|
+
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
795
|
+
exportScopeAll: messages.exportScopeAllOrders,
|
|
796
|
+
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
797
|
+
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
798
|
+
},
|
|
799
|
+
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
800
|
+
exportScopeAll: messages.exportScopeAllCustomers,
|
|
801
|
+
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
802
|
+
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
const FIELD_SELECTION_MODES = {
|
|
807
|
+
SELECTED_FIELDS: 'selected-fields',
|
|
808
|
+
IMPORTED_CSV_TEMPLATE: 'imported-csv-template'
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
function ownKeys$g(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
812
|
+
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(_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
813
|
+
const DEFAULT_SHORT_LIVED_FLAGS = {};
|
|
814
|
+
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
815
|
+
_objectSpread$g(_objectSpread$g({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
816
|
+
|
|
640
817
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
641
818
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
642
819
|
let MissingExportResourceProviderError = /*#__PURE__*/function (_Error) {
|
|
@@ -702,8 +879,8 @@ function useExportResourcesModalContext() {
|
|
|
702
879
|
return context;
|
|
703
880
|
}
|
|
704
881
|
|
|
705
|
-
function ownKeys$
|
|
706
|
-
function _objectSpread$
|
|
882
|
+
function ownKeys$f(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
883
|
+
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(_context2 = ownKeys$f(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$f(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
707
884
|
const defaultOptions = {
|
|
708
885
|
storageType: 'local',
|
|
709
886
|
segregateByUser: true
|
|
@@ -721,7 +898,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
721
898
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
722
899
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
723
900
|
var _context;
|
|
724
|
-
const mergedOptions = _objectSpread$
|
|
901
|
+
const mergedOptions = _objectSpread$f(_objectSpread$f({}, defaultOptions), options);
|
|
725
902
|
const userId = useApplicationContext(context => context.user?.id);
|
|
726
903
|
const scopedStorageKey = _filterInstanceProperty(_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
727
904
|
const readFromStorage = useCallback(() => {
|
|
@@ -765,99 +942,6 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
765
942
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
766
943
|
};
|
|
767
944
|
|
|
768
|
-
const Z_INDEX_DROPDOWN = 30000;
|
|
769
|
-
const OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION = 'OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION';
|
|
770
|
-
const OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP = 'OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP';
|
|
771
|
-
const TOTAL_STEPS = 3;
|
|
772
|
-
|
|
773
|
-
const EXPORT_OPERATION_STATES = {
|
|
774
|
-
PROCESSING: 'processing',
|
|
775
|
-
COMPLETED: 'completed',
|
|
776
|
-
FAILED: 'failed',
|
|
777
|
-
QUEUED: 'queued'
|
|
778
|
-
};
|
|
779
|
-
|
|
780
|
-
const EXPORT_TYPES = {
|
|
781
|
-
ALL: 'all',
|
|
782
|
-
FILTERED: 'filtered',
|
|
783
|
-
SELECTED: 'selected',
|
|
784
|
-
QUERY_PREDICATE: 'query-predicate'
|
|
785
|
-
};
|
|
786
|
-
|
|
787
|
-
const EXPORTABLE_RESOURCES = {
|
|
788
|
-
CATEGORY: 'category',
|
|
789
|
-
PRODUCT: 'product',
|
|
790
|
-
PRODUCT_TYPE: 'product-type',
|
|
791
|
-
DISCOUNT_CODE: 'discount-code',
|
|
792
|
-
INVENTORY_ENTRY: 'inventory-entry',
|
|
793
|
-
ORDER: 'order',
|
|
794
|
-
CUSTOMER: 'customer'
|
|
795
|
-
};
|
|
796
|
-
|
|
797
|
-
const OUTPUT_FORMATS = {
|
|
798
|
-
JSON: 'json',
|
|
799
|
-
CSV: 'csv'
|
|
800
|
-
};
|
|
801
|
-
const OUTPUT_FORMAT_OPTIONS = [{
|
|
802
|
-
value: OUTPUT_FORMATS.CSV,
|
|
803
|
-
label: 'CSV'
|
|
804
|
-
}, {
|
|
805
|
-
value: OUTPUT_FORMATS.JSON,
|
|
806
|
-
label: 'JSON'
|
|
807
|
-
}];
|
|
808
|
-
|
|
809
|
-
const EXPORT_DATA_DOCUMENTATION_LINK = 'https://docs.commercetools.com/merchant-center/export-data';
|
|
810
|
-
const CSV_TEMPLATES_LINK = 'https://docs.commercetools.com/merchant-center/import-data#download-a-template';
|
|
811
|
-
|
|
812
|
-
const resourceTypeMessages = {
|
|
813
|
-
[EXPORTABLE_RESOURCES.CATEGORY]: {
|
|
814
|
-
exportScopeAll: messages.exportScopeAllCategories,
|
|
815
|
-
exportScopeSelected: messages.exportScopeSelectedCategories,
|
|
816
|
-
exportScopeFiltered: messages.exportScopeFilteredCategories
|
|
817
|
-
},
|
|
818
|
-
[EXPORTABLE_RESOURCES.PRODUCT]: {
|
|
819
|
-
exportScopeAll: messages.exportScopeAllProducts,
|
|
820
|
-
exportScopeSelected: messages.exportScopeSelectedProducts,
|
|
821
|
-
exportScopeFiltered: messages.exportScopeFilteredProducts
|
|
822
|
-
},
|
|
823
|
-
[EXPORTABLE_RESOURCES.PRODUCT_TYPE]: {
|
|
824
|
-
exportScopeAll: messages.exportScopeAllProductTypes,
|
|
825
|
-
exportScopeSelected: messages.exportScopeSelectedProductTypes,
|
|
826
|
-
exportScopeFiltered: messages.exportScopeFilteredProductTypes
|
|
827
|
-
},
|
|
828
|
-
[EXPORTABLE_RESOURCES.INVENTORY_ENTRY]: {
|
|
829
|
-
exportScopeAll: messages.exportInventoriesForAllProducts,
|
|
830
|
-
exportScopeSelected: messages.exportInventoriesForSelectedProducts,
|
|
831
|
-
exportScopeFiltered: messages.exportInventoriesForFilteredProducts
|
|
832
|
-
},
|
|
833
|
-
[EXPORTABLE_RESOURCES.DISCOUNT_CODE]: {
|
|
834
|
-
exportScopeAll: messages.exportScopeAllDiscountCodes,
|
|
835
|
-
exportScopeSelected: messages.exportScopeSelectedDiscountCodes,
|
|
836
|
-
exportScopeFiltered: messages.exportScopeFilteredDiscountCodes
|
|
837
|
-
},
|
|
838
|
-
[EXPORTABLE_RESOURCES.ORDER]: {
|
|
839
|
-
exportScopeAll: messages.exportScopeAllOrders,
|
|
840
|
-
exportScopeSelected: messages.exportScopeSelectedOrders,
|
|
841
|
-
exportScopeFiltered: messages.exportScopeFilteredOrders
|
|
842
|
-
},
|
|
843
|
-
[EXPORTABLE_RESOURCES.CUSTOMER]: {
|
|
844
|
-
exportScopeAll: messages.exportScopeAllCustomers,
|
|
845
|
-
exportScopeSelected: messages.exportScopeSelectedCustomers,
|
|
846
|
-
exportScopeFiltered: messages.exportScopeFilteredCustomers
|
|
847
|
-
}
|
|
848
|
-
};
|
|
849
|
-
|
|
850
|
-
const FIELD_SELECTION_MODES = {
|
|
851
|
-
SELECTED_FIELDS: 'selected-fields',
|
|
852
|
-
IMPORTED_CSV_TEMPLATE: 'imported-csv-template'
|
|
853
|
-
};
|
|
854
|
-
|
|
855
|
-
function ownKeys$f(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
856
|
-
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(_context = ownKeys$f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$f(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
857
|
-
const DEFAULT_SHORT_LIVED_FLAGS = {};
|
|
858
|
-
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
859
|
-
_objectSpread$f(_objectSpread$f({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
860
|
-
|
|
861
945
|
function resourceTypeToFileName(resourceType, locale) {
|
|
862
946
|
var _context;
|
|
863
947
|
const date = new Date();
|
|
@@ -1447,13 +1531,14 @@ const useInitialValues = props => {
|
|
|
1447
1531
|
groups = updateFieldGroupsWithIsCheckedValue(groups, cachedSelectedGroups?.[props.resourceType] || {});
|
|
1448
1532
|
groups = updateFieldGroupsWithIsExpandedValue(groups, cachedExpandedGroups?.[props.resourceType] || {});
|
|
1449
1533
|
return {
|
|
1450
|
-
outputFormat: props.outputFormat,
|
|
1451
1534
|
fileName: `${resourceTypeToFileName(props.resourceType, userLocale)}`,
|
|
1452
1535
|
locales: [locale],
|
|
1453
1536
|
groups: updateFieldGroupWithAdditionalFieldExtensions(groups),
|
|
1454
1537
|
queryPredicate: '',
|
|
1455
|
-
// Preferences
|
|
1456
1538
|
fillRows: false,
|
|
1539
|
+
outputFormat: props.outputFormat,
|
|
1540
|
+
columnSeparator: DELIMITERS$1.COMMA,
|
|
1541
|
+
decimalSeparator: DELIMITERS$1.POINT,
|
|
1457
1542
|
importedCsvTemplateFile: null
|
|
1458
1543
|
};
|
|
1459
1544
|
}, [props.fieldGroups, props.resourceType, props.outputFormat, cachedSelectedGroups, cachedExpandedGroups, locale, userLocale]);
|
|
@@ -1529,13 +1614,18 @@ const useStartExportOperation = props => {
|
|
|
1529
1614
|
if (localeOption !== 'onlyLocalesFoundInCsvFile') {
|
|
1530
1615
|
locales = values.locales;
|
|
1531
1616
|
}
|
|
1617
|
+
const isCsv = values.outputFormat === 'csv';
|
|
1532
1618
|
const response = await createExportOperation({
|
|
1533
1619
|
projectKey,
|
|
1534
1620
|
resourceType: props.resourceType,
|
|
1535
1621
|
fileName: appendCsvOrJsonExtensionIfAbsent(values.fileName, values.outputFormat),
|
|
1536
1622
|
fileFormat: values.outputFormat,
|
|
1537
1623
|
locales,
|
|
1538
|
-
fillRows: values.fillRows,
|
|
1624
|
+
fillRows: isCsv && values.fillRows,
|
|
1625
|
+
separator: isCsv ? {
|
|
1626
|
+
columns: values.columnSeparator,
|
|
1627
|
+
decimal: values.decimalSeparator
|
|
1628
|
+
} : undefined,
|
|
1539
1629
|
fields,
|
|
1540
1630
|
where,
|
|
1541
1631
|
filters
|
|
@@ -1766,43 +1856,85 @@ const useValidateExportOperation = () => {
|
|
|
1766
1856
|
|
|
1767
1857
|
function ownKeys$a(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1768
1858
|
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(_context = ownKeys$a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$a(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1769
|
-
const
|
|
1859
|
+
const ExportPreferenceSection = () => {
|
|
1770
1860
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
1771
1861
|
formik = _useExportResourcesMo.formik;
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1862
|
+
const columnSeparatorOptions = _mapInstanceProperty(COLUMN_DELIMITER_OPTIONS).call(COLUMN_DELIMITER_OPTIONS, option => _objectSpread$a(_objectSpread$a({}, option), {}, {
|
|
1863
|
+
label: jsx(FormattedMessage, _objectSpread$a({}, option.label))
|
|
1864
|
+
}));
|
|
1865
|
+
const decimalSeparatorOptions = _mapInstanceProperty(DECIMAL_DELIMITER_OPTIONS).call(DECIMAL_DELIMITER_OPTIONS, option => _objectSpread$a(_objectSpread$a({}, option), {}, {
|
|
1866
|
+
label: jsx(FormattedMessage, _objectSpread$a({}, option.label))
|
|
1867
|
+
}));
|
|
1868
|
+
return jsxs(Spacings.Stack, {
|
|
1869
|
+
scale: "m",
|
|
1870
|
+
children: [jsxs(Spacings.Stack, {
|
|
1871
|
+
scale: "s",
|
|
1872
|
+
children: [jsxs("div", {
|
|
1873
|
+
children: [jsx(Text.Body, {
|
|
1874
|
+
intlMessage: messages.separators
|
|
1875
|
+
}), jsx(Text.Caption, {
|
|
1876
|
+
intlMessage: messages.separatorsDescription
|
|
1877
|
+
})]
|
|
1878
|
+
}), jsxs(Spacings.Inline, {
|
|
1879
|
+
scale: "s",
|
|
1880
|
+
children: [jsxs(Spacings.Inline, {
|
|
1881
|
+
scale: "xs",
|
|
1882
|
+
alignItems: "center",
|
|
1883
|
+
children: [jsx(Text.Body, {
|
|
1884
|
+
intlMessage: messages.columns
|
|
1885
|
+
}), jsx(SelectInput, {
|
|
1886
|
+
horizontalConstraint: 4,
|
|
1887
|
+
isSearchable: false,
|
|
1888
|
+
options: columnSeparatorOptions,
|
|
1889
|
+
value: _valuesInstanceProperty(formik).columnSeparator,
|
|
1890
|
+
onChange: e => {
|
|
1891
|
+
formik.setFieldValue('columnSeparator', e.target.value);
|
|
1892
|
+
},
|
|
1893
|
+
menuPortalTarget: document.body,
|
|
1894
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1895
|
+
})]
|
|
1896
|
+
}), jsxs(Spacings.Inline, {
|
|
1897
|
+
scale: "s",
|
|
1898
|
+
alignItems: "center",
|
|
1899
|
+
children: [jsx(Text.Body, {
|
|
1900
|
+
intlMessage: messages.decimal
|
|
1901
|
+
}), jsx(SelectInput, {
|
|
1902
|
+
isSearchable: false,
|
|
1903
|
+
options: decimalSeparatorOptions,
|
|
1904
|
+
value: _valuesInstanceProperty(formik).decimalSeparator,
|
|
1905
|
+
onChange: e => {
|
|
1906
|
+
formik.setFieldValue('decimalSeparator', e.target.value);
|
|
1907
|
+
},
|
|
1908
|
+
menuPortalTarget: document.body,
|
|
1909
|
+
horizontalConstraint: 4,
|
|
1910
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1911
|
+
})]
|
|
1912
|
+
})]
|
|
1913
|
+
})]
|
|
1914
|
+
}), jsxs("div", {
|
|
1915
|
+
children: [jsx(CheckboxInput, {
|
|
1916
|
+
isChecked: _valuesInstanceProperty(formik).fillRows,
|
|
1917
|
+
onChange: e => {
|
|
1918
|
+
formik.setFieldValue('fillRows', e.target.checked);
|
|
1919
|
+
},
|
|
1920
|
+
children: jsx(FormattedMessage, _objectSpread$a({}, messages.fillRows))
|
|
1921
|
+
}), jsxs(Spacings.Inline, {
|
|
1922
|
+
scale: "xl",
|
|
1923
|
+
children: [jsx("div", {}), jsx(Text.Caption, {
|
|
1924
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.moreInformation), {}, {
|
|
1925
|
+
values: {
|
|
1926
|
+
documentationLink: jsx(Link, {
|
|
1927
|
+
intlMessage: messages.documentation,
|
|
1928
|
+
isExternal: true,
|
|
1929
|
+
to: CSV_STRUCTURE_DOCUMENTATION_LINK
|
|
1930
|
+
}, "documentation-link")
|
|
1931
|
+
}
|
|
1932
|
+
})
|
|
1933
|
+
})]
|
|
1934
|
+
})]
|
|
1935
|
+
})]
|
|
1793
1936
|
});
|
|
1794
1937
|
};
|
|
1795
|
-
const ExportPreferenceSection = () => {
|
|
1796
|
-
const _useExportResourcesMo3 = useExportResourcesModalContext(),
|
|
1797
|
-
resourceType = _useExportResourcesMo3.resourceType;
|
|
1798
|
-
if (resourceType === 'order') {
|
|
1799
|
-
return jsx(OrderPreferences, {});
|
|
1800
|
-
}
|
|
1801
|
-
if (resourceType === 'product') {
|
|
1802
|
-
return jsx(ProductPreferences, {});
|
|
1803
|
-
}
|
|
1804
|
-
return null;
|
|
1805
|
-
};
|
|
1806
1938
|
|
|
1807
1939
|
function ownKeys$9(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1808
1940
|
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(_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1881,7 +2013,6 @@ function ExportScopeSection() {
|
|
|
1881
2013
|
}
|
|
1882
2014
|
|
|
1883
2015
|
const ExportFileSettingsStep = () => {
|
|
1884
|
-
var _context;
|
|
1885
2016
|
const intl = useIntl();
|
|
1886
2017
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
1887
2018
|
formik = _useExportResourcesMo.formik,
|
|
@@ -1896,9 +2027,7 @@ const ExportFileSettingsStep = () => {
|
|
|
1896
2027
|
setLocaleOption(LocaleOption.Selected);
|
|
1897
2028
|
}
|
|
1898
2029
|
};
|
|
1899
|
-
|
|
1900
|
-
// TODO: make this dynamic based on the resource type & output format (more scalable)
|
|
1901
|
-
const shouldShowPreferences = _includesInstanceProperty(_context = ['order', 'product']).call(_context, resourceType) && _valuesInstanceProperty(formik).outputFormat === 'csv';
|
|
2030
|
+
const shouldShowPreferences = _valuesInstanceProperty(formik).outputFormat === 'csv';
|
|
1902
2031
|
return jsx(FormDialog, {
|
|
1903
2032
|
isOpen: true,
|
|
1904
2033
|
title: `${intl.formatMessage(messages.stepCount, {
|
|
@@ -1920,31 +2049,22 @@ const ExportFileSettingsStep = () => {
|
|
|
1920
2049
|
children: jsx(Spacings.Stack, {
|
|
1921
2050
|
scale: "l",
|
|
1922
2051
|
children: jsxs(Grid, {
|
|
1923
|
-
gridRowGap: designTokens.
|
|
2052
|
+
gridRowGap: designTokens.spacingM,
|
|
1924
2053
|
gridTemplateColumns: `calc(${designTokens.constraint3} + ${designTokens.spacingL}) auto`,
|
|
1925
2054
|
children: [jsx(Grid.Item, {
|
|
1926
2055
|
children: jsx(Text.Body, {
|
|
1927
|
-
intlMessage: messages.
|
|
2056
|
+
intlMessage: messages.scope
|
|
1928
2057
|
})
|
|
1929
2058
|
}), jsx(Grid.Item, {
|
|
1930
2059
|
children: jsx(ExportScopeSection, {})
|
|
1931
2060
|
}), jsx(Grid.Item, {
|
|
1932
2061
|
children: jsx(Text.Body, {
|
|
1933
|
-
intlMessage: messages.
|
|
2062
|
+
intlMessage: messages.saveAs
|
|
1934
2063
|
})
|
|
1935
2064
|
}), jsx(Grid.Item, {
|
|
1936
2065
|
children: jsxs(Spacings.Stack, {
|
|
1937
|
-
scale: "
|
|
1938
|
-
children: [jsx(
|
|
1939
|
-
name: "outputFormat",
|
|
1940
|
-
onChange: handleOutputFormatChange,
|
|
1941
|
-
onBlur: formik.handleBlur,
|
|
1942
|
-
value: _valuesInstanceProperty(formik).outputFormat,
|
|
1943
|
-
title: intl.formatMessage(messages.outputFormat),
|
|
1944
|
-
options: OUTPUT_FORMAT_OPTIONS,
|
|
1945
|
-
menuPortalTarget: document.body,
|
|
1946
|
-
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1947
|
-
}), jsx(Masking.Mask, {
|
|
2066
|
+
scale: "s",
|
|
2067
|
+
children: [jsx(Masking.Mask, {
|
|
1948
2068
|
children: jsx(TextField, {
|
|
1949
2069
|
name: "fileName",
|
|
1950
2070
|
onChange: formik.handleChange,
|
|
@@ -1955,12 +2075,21 @@ const ExportFileSettingsStep = () => {
|
|
|
1955
2075
|
errors: mapFormikErrors(formik.errors.fileName),
|
|
1956
2076
|
renderError: renderFileNameError
|
|
1957
2077
|
})
|
|
2078
|
+
}), jsx(SelectField, {
|
|
2079
|
+
name: "outputFormat",
|
|
2080
|
+
onChange: handleOutputFormatChange,
|
|
2081
|
+
onBlur: formik.handleBlur,
|
|
2082
|
+
value: _valuesInstanceProperty(formik).outputFormat,
|
|
2083
|
+
title: intl.formatMessage(messages.outputFormat),
|
|
2084
|
+
options: OUTPUT_FORMAT_OPTIONS,
|
|
2085
|
+
menuPortalTarget: document.body,
|
|
2086
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN
|
|
1958
2087
|
})]
|
|
1959
2088
|
})
|
|
1960
2089
|
}), shouldShowPreferences && jsxs(Fragment, {
|
|
1961
2090
|
children: [jsx(Grid.Item, {
|
|
1962
2091
|
children: jsx(Text.Body, {
|
|
1963
|
-
intlMessage: messages.
|
|
2092
|
+
intlMessage: messages.csvSettings
|
|
1964
2093
|
})
|
|
1965
2094
|
}), jsx(Grid.Item, {
|
|
1966
2095
|
children: jsx(ExportPreferenceSection, {})
|
|
@@ -3188,11 +3317,11 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
3188
3317
|
return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? "" : ";label:getDefaultDropWrapperStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyb3AtYXJlYS13cmFwcGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5QlkiLCJmaWxlIjoiZHJvcC1hcmVhLXdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBEcm9wem9uZVJvb3RQcm9wcyB9IGZyb20gJ3JlYWN0LWRyb3B6b25lJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IHN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuaW1wb3J0IHsgdHlwZSBEcm9wQXJlYVN0YXRlIH0gZnJvbSAnLi4vLi4vLi4vQHR5cGVzJ1xuXG5pbnRlcmZhY2UgRHJvcFdyYXBwZXJQcm9wcyBleHRlbmRzIERyb3B6b25lUm9vdFByb3BzIHtcbiAgZHJvcEFyZWFTdGF0ZTogRHJvcEFyZWFTdGF0ZVxufVxuZXhwb3J0IGNvbnN0IERyb3BXcmFwcGVyID0gc3R5bGVkLmRpdjxEcm9wV3JhcHBlclByb3BzPmBcbiAgJHtzdHlsZXMuYmFzZX1cbiAgJHsocHJvcHMpID0+IHtcbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2RlZmF1bHQnKSB7XG4gICAgICByZXR1cm4gc3R5bGVzLnJlYWR5Rm9yRHJvcFxuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2FjdGl2ZS1kcmFnJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5hY3RpdmVEcmFnXG4gICAgfVxuICAgIGlmIChwcm9wcy5kcm9wQXJlYVN0YXRlID09PSAnZmlsZS1kcm9wcGVkJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5maWxlRHJvcHBlZFxuICAgIH1cbiAgICByZXR1cm4gZ2V0RGVmYXVsdERyb3BXcmFwcGVyU3R5bGVzKHByb3BzLmRyb3BBcmVhU3RhdGUpXG4gIH19XG5gXG5mdW5jdGlvbiBnZXREZWZhdWx0RHJvcFdyYXBwZXJTdHlsZXMoX2Ryb3BBcmVhU3RhdGU6IG5ldmVyKSB7XG4gIHJldHVybiBjc3NgYFxufVxuIl19 */");
|
|
3189
3318
|
}
|
|
3190
3319
|
|
|
3191
|
-
var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-
|
|
3320
|
+
var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-fb905a01.esm.js' /* webpackChunkName: "active-drag-drop-area" */));
|
|
3192
3321
|
|
|
3193
|
-
var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-
|
|
3322
|
+
var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-5d5a61c8.esm.js' /* webpackChunkName: "enabled-drop-area" */));
|
|
3194
3323
|
|
|
3195
|
-
var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-
|
|
3324
|
+
var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-aad1bd09.esm.js' /* webpackChunkName: "filed-dropped-area" */));
|
|
3196
3325
|
|
|
3197
3326
|
function getDropArea(_ref) {
|
|
3198
3327
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -3273,17 +3402,17 @@ const getChunkImport = locale => {
|
|
|
3273
3402
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
3274
3403
|
switch (intlLocale) {
|
|
3275
3404
|
case 'de':
|
|
3276
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-
|
|
3405
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-de" */'./de-324f2829.esm.js');
|
|
3277
3406
|
case 'es':
|
|
3278
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-
|
|
3407
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-es" */'./es-735dbaf2.esm.js');
|
|
3279
3408
|
case 'fr-FR':
|
|
3280
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
3409
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-fr-FR" */'./fr-FR-96dce16c.esm.js');
|
|
3281
3410
|
case 'ja':
|
|
3282
3411
|
return import(/* webpackChunkName: "export-resources-modal-i18n-ja" */'./ja-73c088a7.esm.js');
|
|
3283
3412
|
case 'pt-BR':
|
|
3284
|
-
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
3413
|
+
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-7fd72f5d.esm.js');
|
|
3285
3414
|
default:
|
|
3286
|
-
return import(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-
|
|
3415
|
+
return import(/* webpackChunkName: "export-resources-modal-i18n-en" */'./en-015fa203.esm.js');
|
|
3287
3416
|
}
|
|
3288
3417
|
};
|
|
3289
3418
|
const loadMessages = async locale => {
|