@commercetools-frontend-extensions/export-resources-modal 4.10.2 → 4.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +144 -191
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +144 -191
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +144 -191
- package/dist/declarations/src/@types/export-resources-modal-context.d.ts +0 -1
- package/dist/declarations/src/export-resources-modal.d.ts +1 -8
- package/package.json +10 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
2
3
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
3
4
|
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
4
5
|
import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
@@ -44,7 +45,6 @@ import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instanc
|
|
|
44
45
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
45
46
|
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
46
47
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
47
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
48
48
|
import { formatLocalizedString, applyTransformedLocalizedFields } from '@commercetools-frontend/l10n';
|
|
49
49
|
import sortBy from 'lodash/sortBy';
|
|
50
50
|
import _styled from '@emotion/styled/base';
|
|
@@ -69,299 +69,241 @@ function getNewLine() {
|
|
|
69
69
|
|
|
70
70
|
var messages = defineMessages({
|
|
71
71
|
'modalTitle.category': {
|
|
72
|
-
id:
|
|
73
|
-
|
|
74
|
-
defaultMessage: 'Export categories'
|
|
72
|
+
id: "ExportResourcesModal.modalTitle.category",
|
|
73
|
+
defaultMessage: "Export categories"
|
|
75
74
|
},
|
|
76
75
|
'modalTitle.product': {
|
|
77
|
-
id:
|
|
78
|
-
|
|
79
|
-
defaultMessage: 'Export products'
|
|
76
|
+
id: "ExportResourcesModal.modalTitle.product",
|
|
77
|
+
defaultMessage: "Export products"
|
|
80
78
|
},
|
|
81
79
|
'modalTitle.inventory-entry': {
|
|
82
|
-
id:
|
|
83
|
-
|
|
84
|
-
defaultMessage: 'Export inventories'
|
|
80
|
+
id: "ExportResourcesModal.modalTitle.inventoryEntry",
|
|
81
|
+
defaultMessage: "Export inventories"
|
|
85
82
|
},
|
|
86
83
|
'modalTitle.discount-code': {
|
|
87
|
-
id:
|
|
88
|
-
|
|
89
|
-
defaultMessage: 'Export discount codes'
|
|
84
|
+
id: "ExportResourcesModal.modalTitle.discountCode",
|
|
85
|
+
defaultMessage: "Export discount codes"
|
|
90
86
|
},
|
|
91
87
|
'modalTitle.customer': {
|
|
92
|
-
id:
|
|
93
|
-
|
|
94
|
-
defaultMessage: 'Export customers'
|
|
88
|
+
id: "ExportResourcesModal.modalTitle.customer",
|
|
89
|
+
defaultMessage: "Export customers"
|
|
95
90
|
},
|
|
96
91
|
'modalTitle.order': {
|
|
97
|
-
id:
|
|
98
|
-
|
|
99
|
-
defaultMessage: 'Export orders'
|
|
92
|
+
id: "ExportResourcesModal.modalTitle.order",
|
|
93
|
+
defaultMessage: "Export orders"
|
|
100
94
|
},
|
|
101
95
|
'modalTitle.product-type': {
|
|
102
|
-
id:
|
|
103
|
-
|
|
104
|
-
defaultMessage: 'Export product types'
|
|
96
|
+
id: "ExportResourcesModal.modalTitle.productType",
|
|
97
|
+
defaultMessage: "Export product types"
|
|
105
98
|
},
|
|
106
99
|
outputFormat: {
|
|
107
|
-
id:
|
|
108
|
-
|
|
109
|
-
defaultMessage: 'File format'
|
|
100
|
+
id: "ExportResourcesModal.outputFormat",
|
|
101
|
+
defaultMessage: "File format"
|
|
110
102
|
},
|
|
111
103
|
fileName: {
|
|
112
|
-
id:
|
|
113
|
-
|
|
114
|
-
defaultMessage: 'File name'
|
|
104
|
+
id: "ExportResourcesModal.fileName",
|
|
105
|
+
defaultMessage: "File name"
|
|
115
106
|
},
|
|
116
107
|
locale: {
|
|
117
|
-
id:
|
|
118
|
-
|
|
119
|
-
defaultMessage: 'Locale'
|
|
108
|
+
id: "ExportResourcesModal.locale",
|
|
109
|
+
defaultMessage: "Locale"
|
|
120
110
|
},
|
|
121
111
|
exportBasedOnMyViewsMessage: {
|
|
122
|
-
id:
|
|
123
|
-
|
|
124
|
-
defaultMessage: 'Select export settings based on:'
|
|
112
|
+
id: "ExportResourcesModal.exportBasedOnMyViewsMessage",
|
|
113
|
+
defaultMessage: "Select export settings based on:"
|
|
125
114
|
},
|
|
126
115
|
propertiesPanelLabel: {
|
|
127
|
-
id:
|
|
128
|
-
|
|
129
|
-
defaultMessage: 'Properties'
|
|
116
|
+
id: "ExportResourcesModal.propertiesPanelLabel",
|
|
117
|
+
defaultMessage: "Properties"
|
|
130
118
|
},
|
|
131
119
|
exportOperationSuccessMessage: {
|
|
132
|
-
id:
|
|
133
|
-
|
|
134
|
-
defaultMessage: '<b>Your export has started.</b> <newline></newline><logsLink>Go to Export logs</logsLink> to view the progress and download the file.'
|
|
120
|
+
id: "ExportResourcesModal.exportOperationSuccessMessage",
|
|
121
|
+
defaultMessage: "<b>Your export has started.</b> <newline></newline><logsLink>Go to Export logs</logsLink> to view the progress and download the file."
|
|
135
122
|
},
|
|
136
123
|
nothingApplied: {
|
|
137
|
-
id:
|
|
138
|
-
|
|
139
|
-
defaultMessage: 'nothing applied'
|
|
124
|
+
id: "ExportResourcesModal.nothingApplied",
|
|
125
|
+
defaultMessage: "nothing applied"
|
|
140
126
|
},
|
|
141
127
|
includeAllLocales: {
|
|
142
|
-
id:
|
|
143
|
-
|
|
144
|
-
defaultMessage: 'Include all locales'
|
|
128
|
+
id: "ExportResourcesModal.includeAllLocales",
|
|
129
|
+
defaultMessage: "Include all locales"
|
|
145
130
|
},
|
|
146
131
|
missingFileNameError: {
|
|
147
|
-
id:
|
|
148
|
-
|
|
149
|
-
defaultMessage: 'Please enter a file name'
|
|
132
|
+
id: "ExportResourcesModal.missingFileNameError",
|
|
133
|
+
defaultMessage: "Please enter a file name"
|
|
150
134
|
},
|
|
151
135
|
invalidFileNameError: {
|
|
152
|
-
id:
|
|
153
|
-
|
|
154
|
-
defaultMessage: 'File name may only contain alphanumeric characters, hyphens and underscores'
|
|
136
|
+
id: "ExportResourcesModal.invalidFileNameError",
|
|
137
|
+
defaultMessage: "File name may only contain alphanumeric characters, hyphens and underscores"
|
|
155
138
|
},
|
|
156
139
|
missingLocaleError: {
|
|
157
|
-
id:
|
|
158
|
-
|
|
159
|
-
defaultMessage: 'Please select at least one locale'
|
|
140
|
+
id: "ExportResourcesModal.missingLocaleError",
|
|
141
|
+
defaultMessage: "Please select at least one locale"
|
|
160
142
|
},
|
|
161
143
|
myViews: {
|
|
162
|
-
id:
|
|
163
|
-
|
|
164
|
-
defaultMessage: 'My Views'
|
|
144
|
+
id: "ExportResourcesModal.myViews",
|
|
145
|
+
defaultMessage: "My Views"
|
|
165
146
|
},
|
|
166
147
|
selectFieldsToExport: {
|
|
167
|
-
id:
|
|
168
|
-
defaultMessage:
|
|
148
|
+
id: "ExportResourcesModal.selectFieldsToExport",
|
|
149
|
+
defaultMessage: "Select fields to export"
|
|
169
150
|
},
|
|
170
151
|
back: {
|
|
171
|
-
id:
|
|
172
|
-
|
|
173
|
-
defaultMessage: 'Back'
|
|
152
|
+
id: "ExportResourcesModal.back",
|
|
153
|
+
defaultMessage: "Back"
|
|
174
154
|
},
|
|
175
155
|
startExport: {
|
|
176
|
-
id:
|
|
177
|
-
|
|
178
|
-
defaultMessage: 'Start export'
|
|
156
|
+
id: "ExportResourcesModal.startExport",
|
|
157
|
+
defaultMessage: "Start export"
|
|
179
158
|
},
|
|
180
159
|
continue: {
|
|
181
|
-
id:
|
|
182
|
-
|
|
183
|
-
defaultMessage: 'Continue'
|
|
160
|
+
id: "ExportResourcesModal.continue",
|
|
161
|
+
defaultMessage: "Continue"
|
|
184
162
|
},
|
|
185
163
|
fieldDefinitions: {
|
|
186
|
-
id:
|
|
187
|
-
|
|
188
|
-
defaultMessage: 'Field definitions'
|
|
164
|
+
id: "ExportResourcesModal.fieldDefinitions",
|
|
165
|
+
defaultMessage: "Field definitions"
|
|
189
166
|
},
|
|
190
167
|
unexpectedError: {
|
|
191
|
-
id:
|
|
192
|
-
|
|
193
|
-
defaultMessage: 'An error occurred while starting the export process. Please try again or contact support if the problem persists.'
|
|
168
|
+
id: "ExportResourcesModal.unexpectedError",
|
|
169
|
+
defaultMessage: "An error occurred while starting the export process. Please try again or contact support if the problem persists."
|
|
194
170
|
},
|
|
195
171
|
searchForFields: {
|
|
196
|
-
id:
|
|
197
|
-
|
|
198
|
-
defaultMessage: 'Search for fields'
|
|
172
|
+
id: "ExportResourcesModal.searchForFields",
|
|
173
|
+
defaultMessage: "Search for fields"
|
|
199
174
|
},
|
|
200
175
|
thereAreNoResults: {
|
|
201
|
-
id:
|
|
202
|
-
|
|
203
|
-
defaultMessage: 'There are no results that match your search.'
|
|
176
|
+
id: "ExportResourcesModal.thereAreNoResults",
|
|
177
|
+
defaultMessage: "There are no results that match your search."
|
|
204
178
|
},
|
|
205
179
|
suggestions: {
|
|
206
|
-
id:
|
|
207
|
-
|
|
208
|
-
defaultMessage: 'Suggestions:'
|
|
180
|
+
id: "ExportResourcesModal.suggestions",
|
|
181
|
+
defaultMessage: "Suggestions:"
|
|
209
182
|
},
|
|
210
183
|
checkTheSpelling: {
|
|
211
|
-
id:
|
|
212
|
-
|
|
213
|
-
defaultMessage: 'Check the spelling.'
|
|
184
|
+
id: "ExportResourcesModal.checkTheSpelling",
|
|
185
|
+
defaultMessage: "Check the spelling."
|
|
214
186
|
},
|
|
215
187
|
searchByEnteringTheExactFieldName: {
|
|
216
|
-
id:
|
|
217
|
-
|
|
218
|
-
defaultMessage: 'Try searching by entering the exact field name.'
|
|
188
|
+
id: "ExportResourcesModal.searchByEnteringTheExactFieldName",
|
|
189
|
+
defaultMessage: "Try searching by entering the exact field name."
|
|
219
190
|
},
|
|
220
191
|
exportScope: {
|
|
221
|
-
id:
|
|
222
|
-
|
|
223
|
-
defaultMessage: 'Scope'
|
|
192
|
+
id: "ExportResourcesModal.exportScope",
|
|
193
|
+
defaultMessage: "Scope"
|
|
224
194
|
},
|
|
225
195
|
exportScopeAllCategories: {
|
|
226
|
-
id:
|
|
227
|
-
|
|
228
|
-
defaultMessage: 'Export all: {total, plural, one {# category} other {# categories}}'
|
|
196
|
+
id: "ExportResourcesModal.exportScopeAllCategories",
|
|
197
|
+
defaultMessage: "Export all: {total, plural, one {# category} other {# categories}}"
|
|
229
198
|
},
|
|
230
199
|
exportScopeSelectedCategories: {
|
|
231
|
-
id:
|
|
232
|
-
|
|
233
|
-
defaultMessage: 'Export selected: {total, plural, one {# category} other {# categories}}'
|
|
200
|
+
id: "ExportResourcesModal.exportScopeSelectedCategories",
|
|
201
|
+
defaultMessage: "Export selected: {total, plural, one {# category} other {# categories}}"
|
|
234
202
|
},
|
|
235
203
|
exportScopeFilteredCategories: {
|
|
236
|
-
id:
|
|
237
|
-
|
|
238
|
-
defaultMessage: 'Export filtered: {total, plural, one {# category} other {# categories}}'
|
|
204
|
+
id: "ExportResourcesModal.exportScopeFilteredCategories",
|
|
205
|
+
defaultMessage: "Export filtered: {total, plural, one {# category} other {# categories}}"
|
|
239
206
|
},
|
|
240
207
|
exportScopeAllProducts: {
|
|
241
|
-
id:
|
|
242
|
-
|
|
243
|
-
defaultMessage: 'Export all: {total, plural, one {# product} other {# products}}'
|
|
208
|
+
id: "ExportResourcesModal.exportScopeAllProducts",
|
|
209
|
+
defaultMessage: "Export all: {total, plural, one {# product} other {# products}}"
|
|
244
210
|
},
|
|
245
211
|
exportScopeSelectedProducts: {
|
|
246
|
-
id:
|
|
247
|
-
|
|
248
|
-
defaultMessage: 'Export selected: {total, plural, one {# product} other {# products}}'
|
|
212
|
+
id: "ExportResourcesModal.exportScopeSelectedProducts",
|
|
213
|
+
defaultMessage: "Export selected: {total, plural, one {# product} other {# products}}"
|
|
249
214
|
},
|
|
250
215
|
exportScopeFilteredProducts: {
|
|
251
|
-
id:
|
|
252
|
-
|
|
253
|
-
defaultMessage: 'Export filtered: {total, plural, one {# product} other {# products}}'
|
|
216
|
+
id: "ExportResourcesModal.exportScopeFilteredProducts",
|
|
217
|
+
defaultMessage: "Export filtered: {total, plural, one {# product} other {# products}}"
|
|
254
218
|
},
|
|
255
219
|
exportScopeAllProductTypes: {
|
|
256
|
-
id:
|
|
257
|
-
|
|
258
|
-
defaultMessage: 'Export all: {total, plural, one {# product type} other {# product types}}'
|
|
220
|
+
id: "ExportResourcesModal.exportScopeAllProductTypes",
|
|
221
|
+
defaultMessage: "Export all: {total, plural, one {# product type} other {# product types}}"
|
|
259
222
|
},
|
|
260
223
|
exportScopeSelectedProductTypes: {
|
|
261
|
-
id:
|
|
262
|
-
|
|
263
|
-
defaultMessage: 'Export selected: {total, plural, one {# product type} other {# product types}}'
|
|
224
|
+
id: "ExportResourcesModal.exportScopeSelectedProductTypes",
|
|
225
|
+
defaultMessage: "Export selected: {total, plural, one {# product type} other {# product types}}"
|
|
264
226
|
},
|
|
265
227
|
exportScopeFilteredProductTypes: {
|
|
266
|
-
id:
|
|
267
|
-
|
|
268
|
-
defaultMessage: 'Export filtered: {total, plural, one {# product type} other {# product types}}'
|
|
228
|
+
id: "ExportResourcesModal.exportScopeFilteredProductTypes",
|
|
229
|
+
defaultMessage: "Export filtered: {total, plural, one {# product type} other {# product types}}"
|
|
269
230
|
},
|
|
270
231
|
exportInventoriesForAllProducts: {
|
|
271
|
-
id:
|
|
272
|
-
|
|
273
|
-
defaultMessage: 'Export inventories for all {total, plural, one {# product} other {# products}}'
|
|
232
|
+
id: "ExportResourcesModal.exportInventoriesForAllProducts",
|
|
233
|
+
defaultMessage: "Export inventories for all {total, plural, one {# product} other {# products}}"
|
|
274
234
|
},
|
|
275
235
|
exportInventoriesForSelectedProducts: {
|
|
276
|
-
id:
|
|
277
|
-
|
|
278
|
-
defaultMessage: 'Export inventories for the {total, plural, one {# selected product} other {# selected products}}'
|
|
236
|
+
id: "ExportResourcesModal.exportInventoriesForSelectedProducts",
|
|
237
|
+
defaultMessage: "Export inventories for the {total, plural, one {# selected product} other {# selected products}}"
|
|
279
238
|
},
|
|
280
239
|
exportInventoriesForFilteredProducts: {
|
|
281
|
-
id:
|
|
282
|
-
|
|
283
|
-
defaultMessage: 'Export inventories for the {total, plural, one {# filtered product} other {# filtered products}}'
|
|
240
|
+
id: "ExportResourcesModal.exportInventoriesForFilteredProducts",
|
|
241
|
+
defaultMessage: "Export inventories for the {total, plural, one {# filtered product} other {# filtered products}}"
|
|
284
242
|
},
|
|
285
243
|
exportScopeAllDiscountCodes: {
|
|
286
|
-
id:
|
|
287
|
-
|
|
288
|
-
defaultMessage: 'Export all: {total, plural, one {# discount code} other {# discount codes}}'
|
|
244
|
+
id: "ExportResourcesModal.exportScopeAllDiscountCodes",
|
|
245
|
+
defaultMessage: "Export all: {total, plural, one {# discount code} other {# discount codes}}"
|
|
289
246
|
},
|
|
290
247
|
exportScopeSelectedDiscountCodes: {
|
|
291
|
-
id:
|
|
292
|
-
|
|
293
|
-
defaultMessage: 'Export selected: {total, plural, one {# discount code} other {# discount codes}}'
|
|
248
|
+
id: "ExportResourcesModal.exportScopeSelectedDiscountCodes",
|
|
249
|
+
defaultMessage: "Export selected: {total, plural, one {# discount code} other {# discount codes}}"
|
|
294
250
|
},
|
|
295
251
|
exportScopeFilteredDiscountCodes: {
|
|
296
|
-
id:
|
|
297
|
-
|
|
298
|
-
defaultMessage: 'Export filtered: {total, plural, one {# discount code} other {# discount codes}}'
|
|
252
|
+
id: "ExportResourcesModal.exportScopeFilteredDiscountCodes",
|
|
253
|
+
defaultMessage: "Export filtered: {total, plural, one {# discount code} other {# discount codes}}"
|
|
299
254
|
},
|
|
300
255
|
exportScopeAllOrders: {
|
|
301
|
-
id:
|
|
302
|
-
|
|
303
|
-
defaultMessage: 'Export all: {total, plural, one {# order} other {# orders}}'
|
|
256
|
+
id: "ExportResourcesModal.exportScopeAllOrders",
|
|
257
|
+
defaultMessage: "Export all: {total, plural, one {# order} other {# orders}}"
|
|
304
258
|
},
|
|
305
259
|
exportScopeSelectedOrders: {
|
|
306
|
-
id:
|
|
307
|
-
|
|
308
|
-
defaultMessage: 'Export selected: {total, plural, one {# order} other {# orders}}'
|
|
260
|
+
id: "ExportResourcesModal.exportScopeSelectedOrders",
|
|
261
|
+
defaultMessage: "Export selected: {total, plural, one {# order} other {# orders}}"
|
|
309
262
|
},
|
|
310
263
|
exportScopeFilteredOrders: {
|
|
311
|
-
id:
|
|
312
|
-
|
|
313
|
-
defaultMessage: 'Export filtered: {total, plural, one {# order} other {# orders}}'
|
|
264
|
+
id: "ExportResourcesModal.exportScopeFilteredOrders",
|
|
265
|
+
defaultMessage: "Export filtered: {total, plural, one {# order} other {# orders}}"
|
|
314
266
|
},
|
|
315
267
|
exportScopeAllCustomers: {
|
|
316
|
-
id:
|
|
317
|
-
|
|
318
|
-
defaultMessage: 'Export all: {total, plural, one {# customer} other {# customers}}'
|
|
268
|
+
id: "ExportResourcesModal.exportScopeAllCustomers",
|
|
269
|
+
defaultMessage: "Export all: {total, plural, one {# customer} other {# customers}}"
|
|
319
270
|
},
|
|
320
271
|
exportScopeSelectedCustomers: {
|
|
321
|
-
id:
|
|
322
|
-
|
|
323
|
-
defaultMessage: 'Export selected: {total, plural, one {# customer} other {# customers}}'
|
|
272
|
+
id: "ExportResourcesModal.exportScopeSelectedCustomers",
|
|
273
|
+
defaultMessage: "Export selected: {total, plural, one {# customer} other {# customers}}"
|
|
324
274
|
},
|
|
325
275
|
exportScopeFilteredCustomers: {
|
|
326
|
-
id:
|
|
327
|
-
|
|
328
|
-
defaultMessage: 'Export filtered: {total, plural, one {# customer} other {# customers}}'
|
|
276
|
+
id: "ExportResourcesModal.exportScopeFilteredCustomers",
|
|
277
|
+
defaultMessage: "Export filtered: {total, plural, one {# customer} other {# customers}}"
|
|
329
278
|
},
|
|
330
279
|
exportScopeSelectedWithoutCount: {
|
|
331
|
-
id:
|
|
332
|
-
|
|
333
|
-
defaultMessage: 'Export selected'
|
|
280
|
+
id: "ExportResourcesModal.exportScopeSelectedWithoutCount",
|
|
281
|
+
defaultMessage: "Export selected"
|
|
334
282
|
},
|
|
335
283
|
exportScopeFilteredWithoutCount: {
|
|
336
|
-
id:
|
|
337
|
-
|
|
338
|
-
defaultMessage: 'Export filtered'
|
|
284
|
+
id: "ExportResourcesModal.exportScopeFilteredWithoutCount",
|
|
285
|
+
defaultMessage: "Export filtered"
|
|
339
286
|
},
|
|
340
287
|
exportSettings: {
|
|
341
|
-
id:
|
|
342
|
-
|
|
343
|
-
defaultMessage: 'Settings'
|
|
288
|
+
id: "ExportResourcesModal.exportSettings",
|
|
289
|
+
defaultMessage: "Settings"
|
|
344
290
|
},
|
|
345
291
|
selected: {
|
|
346
|
-
id:
|
|
347
|
-
|
|
348
|
-
defaultMessage: '{total} selected'
|
|
292
|
+
id: "ExportResourcesModal.selected",
|
|
293
|
+
defaultMessage: "{total} selected"
|
|
349
294
|
},
|
|
350
295
|
// Preferences
|
|
351
296
|
exportPreferences: {
|
|
352
|
-
id:
|
|
353
|
-
|
|
354
|
-
defaultMessage: 'Preferences'
|
|
297
|
+
id: "ExportResourcesModal.exportPreferences",
|
|
298
|
+
defaultMessage: "Preferences"
|
|
355
299
|
},
|
|
356
300
|
fillRowsForOrderExport: {
|
|
357
|
-
id:
|
|
358
|
-
|
|
359
|
-
defaultMessage: 'Include Order number, id, and states in every row'
|
|
301
|
+
id: "ExportResourcesModal.fillRowsForOrderExport",
|
|
302
|
+
defaultMessage: "Include Order number, id, and states in every row"
|
|
360
303
|
},
|
|
361
304
|
fillRowsForProductExport: {
|
|
362
|
-
id:
|
|
363
|
-
|
|
364
|
-
defaultMessage: 'Include Product- and Variant-level information in every row'
|
|
305
|
+
id: "ExportResourcesModal.fillRowsForProductExport",
|
|
306
|
+
defaultMessage: "Include Product- and Variant-level information in every row"
|
|
365
307
|
}
|
|
366
308
|
});
|
|
367
309
|
|
|
@@ -1080,7 +1022,7 @@ const useStartExportOperation = props => {
|
|
|
1080
1022
|
};
|
|
1081
1023
|
};
|
|
1082
1024
|
|
|
1083
|
-
const _excluded$
|
|
1025
|
+
const _excluded$2 = ["fields"];
|
|
1084
1026
|
function ownKeys$6(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; }
|
|
1085
1027
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1086
1028
|
const getFieldFullName = _ref => {
|
|
@@ -1093,7 +1035,7 @@ const localizeTypeDefinitionLabels = function () {
|
|
|
1093
1035
|
let fieldDefinitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1094
1036
|
return _mapInstanceProperty(fieldDefinitions).call(fieldDefinitions, _ref2 => {
|
|
1095
1037
|
let fields = _ref2.fields,
|
|
1096
|
-
fieldsType = _objectWithoutProperties(_ref2, _excluded$
|
|
1038
|
+
fieldsType = _objectWithoutProperties(_ref2, _excluded$2);
|
|
1097
1039
|
const isFieldTypeLabelLocalized = _Array$isArray(fieldsType.label);
|
|
1098
1040
|
return {
|
|
1099
1041
|
name: fieldsType.name,
|
|
@@ -1903,10 +1845,10 @@ const ExportFieldsSelectionStep = () => {
|
|
|
1903
1845
|
|
|
1904
1846
|
const ExportResourcesContext = /*#__PURE__*/createContext();
|
|
1905
1847
|
|
|
1906
|
-
const _excluded = ["children"];
|
|
1848
|
+
const _excluded$1 = ["children"];
|
|
1907
1849
|
const ExportResourcesProvider = _ref => {
|
|
1908
1850
|
let children = _ref.children,
|
|
1909
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
1851
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
1910
1852
|
const initialValues = useInitialValues(props);
|
|
1911
1853
|
const _React$useState = React.useState(Step.FileSettings),
|
|
1912
1854
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -2034,6 +1976,7 @@ const useAsyncIntlMessages = (locale, loader) => {
|
|
|
2034
1976
|
return state;
|
|
2035
1977
|
};
|
|
2036
1978
|
|
|
1979
|
+
const _excluded = ["isOpen", "selectedResourceIds", "outputFormat", "fieldGroups", "fieldOrder"];
|
|
2037
1980
|
function ownKeys(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; }
|
|
2038
1981
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2039
1982
|
function invalidateLaunchDarklyCachedFeatureFlag(flagName) {
|
|
@@ -2053,13 +1996,24 @@ function invalidateLaunchDarklyCachedFeatureFlag(flagName) {
|
|
|
2053
1996
|
}
|
|
2054
1997
|
}
|
|
2055
1998
|
invalidateLaunchDarklyCachedFeatureFlag('enableOperationsExport');
|
|
2056
|
-
const ExportResourcesModal =
|
|
1999
|
+
const ExportResourcesModal = _ref3 => {
|
|
2000
|
+
let _ref3$isOpen = _ref3.isOpen,
|
|
2001
|
+
isOpen = _ref3$isOpen === void 0 ? false : _ref3$isOpen,
|
|
2002
|
+
_ref3$selectedResourc = _ref3.selectedResourceIds,
|
|
2003
|
+
selectedResourceIds = _ref3$selectedResourc === void 0 ? [] : _ref3$selectedResourc,
|
|
2004
|
+
_ref3$outputFormat = _ref3.outputFormat,
|
|
2005
|
+
outputFormat = _ref3$outputFormat === void 0 ? OUTPUT_FORMATS.CSV : _ref3$outputFormat,
|
|
2006
|
+
_ref3$fieldGroups = _ref3.fieldGroups,
|
|
2007
|
+
fieldGroups = _ref3$fieldGroups === void 0 ? [] : _ref3$fieldGroups,
|
|
2008
|
+
_ref3$fieldOrder = _ref3.fieldOrder,
|
|
2009
|
+
fieldOrder = _ref3$fieldOrder === void 0 ? [] : _ref3$fieldOrder,
|
|
2010
|
+
props = _objectWithoutProperties(_ref3, _excluded);
|
|
2057
2011
|
const _useApplicationContex = useApplicationContext(context => ({
|
|
2058
2012
|
locale: context.user && context.user.locale
|
|
2059
2013
|
})),
|
|
2060
2014
|
locale = _useApplicationContex.locale;
|
|
2061
2015
|
const messages = useAsyncIntlMessages(locale, loadMessages);
|
|
2062
|
-
if (!
|
|
2016
|
+
if (!isOpen || messages.isLoading) return null;
|
|
2063
2017
|
if (props.filters && !validateFilters(props.filters)) {
|
|
2064
2018
|
console.error('Invalid filters prop:', props.filters, 'Filters must contain one of these values: `filters` or `where`');
|
|
2065
2019
|
return null;
|
|
@@ -2067,18 +2021,17 @@ const ExportResourcesModal = props => {
|
|
|
2067
2021
|
return jsx(IntlProvider, {
|
|
2068
2022
|
locale: locale,
|
|
2069
2023
|
messages: messages.messages,
|
|
2070
|
-
children: jsx(ExportResourcesProvider, _objectSpread(_objectSpread({
|
|
2024
|
+
children: jsx(ExportResourcesProvider, _objectSpread(_objectSpread({
|
|
2025
|
+
fieldGroups: fieldGroups,
|
|
2026
|
+
fieldOrder: fieldOrder,
|
|
2027
|
+
isOpen: isOpen,
|
|
2028
|
+
outputFormat: outputFormat,
|
|
2029
|
+
selectedResourceIds: selectedResourceIds
|
|
2030
|
+
}, props), {}, {
|
|
2071
2031
|
children: jsx(CurrentStep, {})
|
|
2072
2032
|
}))
|
|
2073
2033
|
});
|
|
2074
2034
|
};
|
|
2075
2035
|
ExportResourcesModal.displayName = 'ExportResourcesModal';
|
|
2076
|
-
ExportResourcesModal.defaultProps = {
|
|
2077
|
-
isOpen: false,
|
|
2078
|
-
selectedResourceIds: [],
|
|
2079
|
-
outputFormat: OUTPUT_FORMATS.CSV,
|
|
2080
|
-
fieldGroups: [],
|
|
2081
|
-
fieldOrder: []
|
|
2082
|
-
};
|
|
2083
2036
|
|
|
2084
2037
|
export { EXPORTABLE_RESOURCES, EXPORT_TYPES, Step, ExportResourcesModal as default, useConvertFieldDefinitionsForExport };
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import type { ExportResourcesModalProps } from "./@types/index.js";
|
|
2
2
|
declare const ExportResourcesModal: {
|
|
3
|
-
(props: ExportResourcesModalProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
({ isOpen, selectedResourceIds, outputFormat, fieldGroups, fieldOrder, ...props }: ExportResourcesModalProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
displayName: string;
|
|
5
|
-
defaultProps: {
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
selectedResourceIds: never[];
|
|
8
|
-
outputFormat: string;
|
|
9
|
-
fieldGroups: never[];
|
|
10
|
-
fieldOrder: never[];
|
|
11
|
-
};
|
|
12
5
|
};
|
|
13
6
|
export default ExportResourcesModal;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/export-resources-modal",
|
|
3
3
|
"description": "Shared export modal for exporting resources",
|
|
4
|
-
"version": "4.10.
|
|
4
|
+
"version": "4.10.4",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"react": "17.0.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@commercetools-frontend/actions-global": "22.
|
|
35
|
-
"@commercetools-frontend/application-components": "22.
|
|
36
|
-
"@commercetools-frontend/application-shell": "22.
|
|
37
|
-
"@commercetools-frontend/application-shell-connectors": "22.
|
|
38
|
-
"@commercetools-frontend/constants": "22.
|
|
39
|
-
"@commercetools-frontend/i18n": "22.
|
|
40
|
-
"@commercetools-frontend/jest-preset-mc-app": "22.
|
|
34
|
+
"@commercetools-frontend/actions-global": "22.38.1",
|
|
35
|
+
"@commercetools-frontend/application-components": "22.38.1",
|
|
36
|
+
"@commercetools-frontend/application-shell": "22.38.1",
|
|
37
|
+
"@commercetools-frontend/application-shell-connectors": "22.38.1",
|
|
38
|
+
"@commercetools-frontend/constants": "22.38.1",
|
|
39
|
+
"@commercetools-frontend/i18n": "22.38.1",
|
|
40
|
+
"@commercetools-frontend/jest-preset-mc-app": "22.38.1",
|
|
41
41
|
"@commercetools-frontend/l10n": "22.x",
|
|
42
|
-
"@commercetools-frontend/sdk": "22.
|
|
43
|
-
"@commercetools-frontend/sentry": "22.
|
|
42
|
+
"@commercetools-frontend/sdk": "22.38.1",
|
|
43
|
+
"@commercetools-frontend/sentry": "22.38.1",
|
|
44
44
|
"@commercetools-frontend/ui-kit": "19.20.1",
|
|
45
45
|
"@commercetools-uikit/design-system": "19.20.1",
|
|
46
46
|
"@preconstruct/cli": "2.8.9",
|