@commercetools-frontend-extensions/export-resources-modal 1.4.1 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +248 -387
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +246 -381
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +249 -388
- package/package.json +20 -20
|
@@ -14,6 +14,7 @@ var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
|
14
14
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
15
15
|
var reactIntl = require('react-intl');
|
|
16
16
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
17
|
+
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
17
18
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
18
19
|
var _flatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/flat');
|
|
19
20
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
@@ -26,7 +27,6 @@ var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibl
|
|
|
26
27
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
27
28
|
var _wrapNativeSuper = require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
28
29
|
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
29
|
-
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
30
30
|
var omitEmpty = require('omit-empty-es');
|
|
31
31
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
32
32
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
@@ -36,11 +36,11 @@ var react = require('@emotion/react');
|
|
|
36
36
|
var _styled = require('@emotion/styled/base');
|
|
37
37
|
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
38
38
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
39
|
-
var sdk = require('@commercetools-frontend/sdk');
|
|
40
|
-
var constants = require('@commercetools-frontend/constants');
|
|
41
|
-
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
42
39
|
var formik = require('formik');
|
|
43
40
|
var moment = require('moment');
|
|
41
|
+
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
42
|
+
var sdk = require('@commercetools-frontend/sdk');
|
|
43
|
+
var constants = require('@commercetools-frontend/constants');
|
|
44
44
|
|
|
45
45
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
46
46
|
|
|
@@ -146,8 +146,8 @@ let UnexpectedResourceTypeError = /*#__PURE__*/function (_Error) {
|
|
|
146
146
|
return _createClass(UnexpectedResourceTypeError);
|
|
147
147
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
148
148
|
|
|
149
|
-
function ownKeys$
|
|
150
|
-
function _objectSpread$
|
|
149
|
+
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; }
|
|
150
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$a(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$a(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
151
151
|
function resourceTypeToPlural(_ref) {
|
|
152
152
|
let resourceType = _ref.resourceType,
|
|
153
153
|
_ref$isUpperCase = _ref.isUpperCase,
|
|
@@ -193,7 +193,7 @@ function flattenNestedFields(fields) {
|
|
|
193
193
|
var _context2;
|
|
194
194
|
return _mapInstanceProperty__default["default"](_context2 = flattenNestedFields(field.fields)).call(_context2, nestedField => {
|
|
195
195
|
var _context3;
|
|
196
|
-
return _objectSpread$
|
|
196
|
+
return _objectSpread$a(_objectSpread$a({}, nestedField), {}, {
|
|
197
197
|
key: _concatInstanceProperty__default["default"](_context3 = "".concat(field.key, ".")).call(_context3, nestedField.key)
|
|
198
198
|
});
|
|
199
199
|
});
|
|
@@ -207,8 +207,8 @@ function flattenNestedFields(fields) {
|
|
|
207
207
|
* This function is responsible for constructing the GraphQL query based on the export settings
|
|
208
208
|
*
|
|
209
209
|
* Depending on the type of export selection (all resources, only selected, or only matching/filtered) it constructs different types of queries:
|
|
210
|
-
* - For 'all resources', it generates a query that fetches all fields and
|
|
211
|
-
* - For 'only selected', it creates a query that fetches only the fields and
|
|
210
|
+
* - For 'all resources', it generates a query that fetches all fields and locales specified in the export settings.
|
|
211
|
+
* - For 'only selected', it creates a query that fetches only the fields and locales of the selected resources. The ids of the selected resources are included in the query.
|
|
212
212
|
* - The 'only matching' case is a placeholder for future development where a query will be constructed based on certain filtering criteria using the `where` parameter.
|
|
213
213
|
*/
|
|
214
214
|
function buildGraphQuery(exportSettings) {
|
|
@@ -221,7 +221,7 @@ function buildGraphQuery(exportSettings) {
|
|
|
221
221
|
fields: [{
|
|
222
222
|
results: buildFields({
|
|
223
223
|
fields: exportSettings.fields,
|
|
224
|
-
|
|
224
|
+
locales: exportSettings.locales
|
|
225
225
|
})
|
|
226
226
|
}],
|
|
227
227
|
variables: {}
|
|
@@ -232,7 +232,7 @@ function buildGraphQuery(exportSettings) {
|
|
|
232
232
|
fields: [{
|
|
233
233
|
results: buildFields({
|
|
234
234
|
fields: exportSettings.fields,
|
|
235
|
-
|
|
235
|
+
locales: exportSettings.locales
|
|
236
236
|
})
|
|
237
237
|
}],
|
|
238
238
|
variables: {
|
|
@@ -250,13 +250,13 @@ function buildGraphQuery(exportSettings) {
|
|
|
250
250
|
/*
|
|
251
251
|
* This function builds the necessary field structure for our GraphQL queries, tt is specifically designed to handle different types of fields
|
|
252
252
|
*
|
|
253
|
-
* For fields whose values change depending on the
|
|
254
|
-
* This format combines the field and the
|
|
253
|
+
* For fields whose values change depending on the locale aka localised fields, a unique request format is used
|
|
254
|
+
* This format combines the field and the locale, separated by '______'. This approach is adopted as our system disallows the use of hyphens `-` in these situations
|
|
255
255
|
*
|
|
256
|
-
* Fields that don't vary by
|
|
256
|
+
* Fields that don't vary by locale but contain additional subfields (known as 'nested fields') are also addressed
|
|
257
257
|
* In these cases the function is used recursively on these subfields to generate the appropriate request.
|
|
258
258
|
*
|
|
259
|
-
* Overall, this function enables us to accurately request different types of data, including those varying by
|
|
259
|
+
* Overall, this function enables us to accurately request different types of data, including those varying by locale or containing subfields.
|
|
260
260
|
*
|
|
261
261
|
* More details can be found in the related PR: https://github.com/commercetools/commercetools-exporter/pull/103
|
|
262
262
|
*/
|
|
@@ -264,18 +264,18 @@ function buildGraphQuery(exportSettings) {
|
|
|
264
264
|
function buildFields(_ref) {
|
|
265
265
|
var _context2;
|
|
266
266
|
let fields = _ref.fields,
|
|
267
|
-
|
|
267
|
+
locales = _ref.locales;
|
|
268
268
|
return _flatInstanceProperty__default["default"](_context2 = _mapInstanceProperty__default["default"](fields).call(fields, field => {
|
|
269
|
-
if (field.isLocalized) return _mapInstanceProperty__default["default"](
|
|
269
|
+
if (field.isLocalized) return _mapInstanceProperty__default["default"](locales).call(locales, locale => {
|
|
270
270
|
var _context3, _context4, _context5;
|
|
271
|
-
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty__default["default"](_context3 = "".concat(field.key, "______")).call(_context3,
|
|
272
|
-
return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(alias, ": ")).call(_context5, field.key, "(locale: \"")).call(_context4,
|
|
271
|
+
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty__default["default"](_context3 = "".concat(field.key, "______")).call(_context3, locale));
|
|
272
|
+
return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(alias, ": ")).call(_context5, field.key, "(locale: \"")).call(_context4, locale, "\")");
|
|
273
273
|
});else {
|
|
274
274
|
if (isFilledArray(field.fields)) {
|
|
275
275
|
return {
|
|
276
276
|
[field.key]: buildFields({
|
|
277
277
|
fields: field.fields,
|
|
278
|
-
|
|
278
|
+
locales
|
|
279
279
|
})
|
|
280
280
|
};
|
|
281
281
|
}
|
|
@@ -287,15 +287,15 @@ function buildFields(_ref) {
|
|
|
287
287
|
function validate(values) {
|
|
288
288
|
const errors = {
|
|
289
289
|
fileName: {},
|
|
290
|
-
|
|
290
|
+
locales: {}
|
|
291
291
|
};
|
|
292
292
|
if (uiKit.TextInput.isEmpty(values.fileName)) {
|
|
293
293
|
errors.fileName.missing = true;
|
|
294
294
|
} else if (!/^[a-zA-Z0-9-_.]+$/.test(values.fileName)) {
|
|
295
295
|
errors.fileName.invalidInput = true;
|
|
296
296
|
}
|
|
297
|
-
if (values.
|
|
298
|
-
errors.
|
|
297
|
+
if (values.locales.length < 1) {
|
|
298
|
+
errors.locales.missing = true;
|
|
299
299
|
}
|
|
300
300
|
return omitEmpty__default["default"](errors);
|
|
301
301
|
}
|
|
@@ -306,21 +306,6 @@ var messages = reactIntl.defineMessages({
|
|
|
306
306
|
description: 'Label for the modal title',
|
|
307
307
|
defaultMessage: 'Export {resourceType}'
|
|
308
308
|
},
|
|
309
|
-
modalSubTitle: {
|
|
310
|
-
id: 'ExportResourcesModal.modalSubTitle',
|
|
311
|
-
description: 'Label for the modal subtitle',
|
|
312
|
-
defaultMessage: 'Define export settings'
|
|
313
|
-
},
|
|
314
|
-
topBarPreviousPathLabel: {
|
|
315
|
-
id: 'ExportResourcesModal.topBarPreviousPathLabel',
|
|
316
|
-
description: 'Label for the topBar previous label',
|
|
317
|
-
defaultMessage: 'To {resourceType} List'
|
|
318
|
-
},
|
|
319
|
-
exportButton: {
|
|
320
|
-
id: 'ExportResourcesModal.exportButton',
|
|
321
|
-
description: 'Export primary button',
|
|
322
|
-
defaultMessage: 'Export {resourceType}'
|
|
323
|
-
},
|
|
324
309
|
outputFormat: {
|
|
325
310
|
id: 'ExportResourcesModal.outputFormat',
|
|
326
311
|
description: 'File format like (csv, xls, ...etc)',
|
|
@@ -331,10 +316,10 @@ var messages = reactIntl.defineMessages({
|
|
|
331
316
|
description: 'exported file name',
|
|
332
317
|
defaultMessage: 'File name'
|
|
333
318
|
},
|
|
334
|
-
|
|
335
|
-
id: 'ExportResourcesModal.
|
|
336
|
-
description: '
|
|
337
|
-
defaultMessage: '
|
|
319
|
+
locale: {
|
|
320
|
+
id: 'ExportResourcesModal.locale',
|
|
321
|
+
description: 'Locale',
|
|
322
|
+
defaultMessage: 'Locale'
|
|
338
323
|
},
|
|
339
324
|
exportSelection: {
|
|
340
325
|
id: 'ExportResourcesModal.exportSelection',
|
|
@@ -396,40 +381,20 @@ var messages = reactIntl.defineMessages({
|
|
|
396
381
|
description: 'properties panel label',
|
|
397
382
|
defaultMessage: 'Properties'
|
|
398
383
|
},
|
|
399
|
-
confirmationTitle: {
|
|
400
|
-
id: 'ExportResourcesModal.confirmationTitle',
|
|
401
|
-
description: 'Title for the confirmation dialog',
|
|
402
|
-
defaultMessage: 'Export {resourceType} data'
|
|
403
|
-
},
|
|
404
|
-
confirmationBodyPlan: {
|
|
405
|
-
id: 'ExportResourcesModal.confirmationBodyPlan',
|
|
406
|
-
description: 'Confirmation dialog action plan',
|
|
407
|
-
defaultMessage: 'You are about to export <bold>{count}</bold> {resourceType} from the project: <bold>{projectName}</bold>.'
|
|
408
|
-
},
|
|
409
|
-
confirmationBodyQuestion: {
|
|
410
|
-
id: 'ExportResourcesModal.confirmationBodyQuestion',
|
|
411
|
-
description: 'Confirmation question',
|
|
412
|
-
defaultMessage: 'Are you sure you want to continue?'
|
|
413
|
-
},
|
|
414
384
|
exportOperationSuccessMessage: {
|
|
415
385
|
id: 'ExportResourcesModal.exportOperationSuccessMessage',
|
|
416
386
|
description: 'Success message',
|
|
417
387
|
defaultMessage: '<b>Your export has started.</b> <newline></newline><logsLink>Go to Export logs</logsLink> to view the progress and download the file.'
|
|
418
388
|
},
|
|
419
|
-
exportConfirmationLabel: {
|
|
420
|
-
id: 'ExportResourcesModal.exportConfirmationLabel',
|
|
421
|
-
description: 'Label for the export button in confirmation dialog',
|
|
422
|
-
defaultMessage: 'Export {resourceType}'
|
|
423
|
-
},
|
|
424
389
|
nothingApplied: {
|
|
425
390
|
id: 'ExportResourcesModal.nothingApplied',
|
|
426
391
|
description: 'Shown when there is no filter applied',
|
|
427
392
|
defaultMessage: 'nothing applied'
|
|
428
393
|
},
|
|
429
|
-
|
|
430
|
-
id: 'ExportResourcesModal.
|
|
431
|
-
description: 'label for "
|
|
432
|
-
defaultMessage: '
|
|
394
|
+
selectAllLocales: {
|
|
395
|
+
id: 'ExportResourcesModal.selectAllLocales',
|
|
396
|
+
description: 'label for "Select all locales" checkbox',
|
|
397
|
+
defaultMessage: 'Select all locales'
|
|
433
398
|
},
|
|
434
399
|
missingFileNameError: {
|
|
435
400
|
id: 'ExportResourcesModal.missingFileNameError',
|
|
@@ -441,15 +406,25 @@ var messages = reactIntl.defineMessages({
|
|
|
441
406
|
description: 'Error when file name field is not valid',
|
|
442
407
|
defaultMessage: 'File name may only contain alphanumeric characters, hyphens and underscores'
|
|
443
408
|
},
|
|
444
|
-
|
|
445
|
-
id: 'ExportResourcesModal.
|
|
446
|
-
description: 'Error when no
|
|
447
|
-
defaultMessage: 'Please select at least one
|
|
409
|
+
missingLocaleError: {
|
|
410
|
+
id: 'ExportResourcesModal.missingLocaleError',
|
|
411
|
+
description: 'Error when no locale is selected',
|
|
412
|
+
defaultMessage: 'Please select at least one locale'
|
|
448
413
|
},
|
|
449
414
|
myViews: {
|
|
450
415
|
id: 'ExportResourcesModal.myViews',
|
|
451
416
|
description: 'Label for "My Views" Select Field',
|
|
452
417
|
defaultMessage: 'My Views'
|
|
418
|
+
},
|
|
419
|
+
cancel: {
|
|
420
|
+
id: 'ExportResourcesModal.cancel',
|
|
421
|
+
description: 'Label for "Cancel" button',
|
|
422
|
+
defaultMessage: 'Cancel'
|
|
423
|
+
},
|
|
424
|
+
startExport: {
|
|
425
|
+
id: 'ExportResourcesModal.startExport',
|
|
426
|
+
description: 'Label for "Start Export" button',
|
|
427
|
+
defaultMessage: 'Start Export'
|
|
453
428
|
}
|
|
454
429
|
});
|
|
455
430
|
|
|
@@ -512,8 +487,8 @@ TagList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
512
487
|
'data-testid': PropTypes__default["default"].string
|
|
513
488
|
} : {};
|
|
514
489
|
|
|
515
|
-
function ownKeys$
|
|
516
|
-
function _objectSpread$
|
|
490
|
+
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; }
|
|
491
|
+
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; }
|
|
517
492
|
function AppliedFilters(_ref) {
|
|
518
493
|
let filters = _ref.filters,
|
|
519
494
|
onFilterRemove = _ref.onFilterRemove;
|
|
@@ -523,7 +498,7 @@ function AppliedFilters(_ref) {
|
|
|
523
498
|
condensed: true,
|
|
524
499
|
isDefaultClosed: !Boolean(filters.length),
|
|
525
500
|
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
526
|
-
intlMessage: _objectSpread$
|
|
501
|
+
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.appliedFiltersMessage), {}, {
|
|
527
502
|
values: {
|
|
528
503
|
filtersCount: filters.length
|
|
529
504
|
}
|
|
@@ -552,7 +527,7 @@ function AppliedFilters(_ref) {
|
|
|
552
527
|
color: "neutral60"
|
|
553
528
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
554
529
|
isBold: true,
|
|
555
|
-
intlMessage: _objectSpread$
|
|
530
|
+
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.appliedFiltersMessage), {}, {
|
|
556
531
|
values: {
|
|
557
532
|
filtersCount: filters.length
|
|
558
533
|
}
|
|
@@ -576,8 +551,8 @@ AppliedFilters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
576
551
|
onFilterRemove: PropTypes__default["default"].func.isRequired
|
|
577
552
|
} : {};
|
|
578
553
|
|
|
579
|
-
function ownKeys$
|
|
580
|
-
function _objectSpread$
|
|
554
|
+
function ownKeys$8(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; }
|
|
555
|
+
function _objectSpread$8(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$8(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$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
581
556
|
const IconPlaceholder = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
582
557
|
target: "e1oion860"
|
|
583
558
|
} : {
|
|
@@ -592,7 +567,7 @@ function AppliedSearchTerms(_ref) {
|
|
|
592
567
|
condensed: true,
|
|
593
568
|
isDefaultClosed: !Boolean(appliedSearchTerms.length),
|
|
594
569
|
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
595
|
-
intlMessage: _objectSpread$
|
|
570
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages.appliedSearchTermsMessage), {}, {
|
|
596
571
|
values: {
|
|
597
572
|
searchTermsCount: appliedSearchTerms.length
|
|
598
573
|
}
|
|
@@ -613,7 +588,7 @@ function AppliedSearchTerms(_ref) {
|
|
|
613
588
|
color: "neutral60"
|
|
614
589
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
615
590
|
isBold: true,
|
|
616
|
-
intlMessage: _objectSpread$
|
|
591
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages.appliedSearchTermsMessage), {}, {
|
|
617
592
|
values: {
|
|
618
593
|
searchTermsCount: appliedSearchTerms.length
|
|
619
594
|
}
|
|
@@ -653,181 +628,27 @@ function ExportBasedOnMyViewsSelectField() {
|
|
|
653
628
|
});
|
|
654
629
|
}
|
|
655
630
|
|
|
656
|
-
function ownKeys$
|
|
657
|
-
function _objectSpread$
|
|
631
|
+
function ownKeys$7(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; }
|
|
632
|
+
function _objectSpread$7(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$7(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$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
658
633
|
function renderFileNameError(key) {
|
|
659
634
|
switch (key) {
|
|
660
635
|
case 'missing':
|
|
661
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
636
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages.missingFileNameError));
|
|
662
637
|
case 'invalidInput':
|
|
663
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
638
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages.invalidFileNameError));
|
|
664
639
|
default:
|
|
665
640
|
return null;
|
|
666
641
|
}
|
|
667
642
|
}
|
|
668
|
-
function
|
|
643
|
+
function renderLocaleError(key) {
|
|
669
644
|
switch (key) {
|
|
670
645
|
case 'missing':
|
|
671
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
646
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages.missingLocaleError));
|
|
672
647
|
default:
|
|
673
648
|
return null;
|
|
674
649
|
}
|
|
675
650
|
}
|
|
676
651
|
|
|
677
|
-
function useExportResourcesContext() {
|
|
678
|
-
const context = react$1.useContext(ExportResourcesContext);
|
|
679
|
-
if (!context) {
|
|
680
|
-
throw new MissingExportResourceProviderError();
|
|
681
|
-
}
|
|
682
|
-
return context;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
async function createExportOperation(_ref) {
|
|
686
|
-
let fileName = _ref.fileName,
|
|
687
|
-
fileFormat = _ref.fileFormat,
|
|
688
|
-
columns = _ref.columns,
|
|
689
|
-
locales = _ref.locales,
|
|
690
|
-
projectKey = _ref.projectKey,
|
|
691
|
-
graphQuery = _ref.graphQuery,
|
|
692
|
-
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
693
|
-
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
694
|
-
const response = await asyncDispatchFn(sdk.actions.post({
|
|
695
|
-
// FIXME: EXPORT is undefined
|
|
696
|
-
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.EXPORT,
|
|
697
|
-
uri: uri,
|
|
698
|
-
headers: {
|
|
699
|
-
accept: 'application/json'
|
|
700
|
-
},
|
|
701
|
-
payload: {
|
|
702
|
-
fileName,
|
|
703
|
-
fileFormat,
|
|
704
|
-
columns,
|
|
705
|
-
locales,
|
|
706
|
-
query: graphQuery
|
|
707
|
-
}
|
|
708
|
-
}));
|
|
709
|
-
return response;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
function ownKeys$7(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; }
|
|
713
|
-
function _objectSpread$7(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$7(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$7(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
714
|
-
const getExportLogsLink = (projectKey, msg) => jsxRuntime.jsx(uiKit.Link, {
|
|
715
|
-
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
716
|
-
children: msg
|
|
717
|
-
});
|
|
718
|
-
function ExportConfirmationModal(props) {
|
|
719
|
-
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
720
|
-
var _applicationContext$p, _applicationContext$p2;
|
|
721
|
-
return {
|
|
722
|
-
projectName: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.name,
|
|
723
|
-
projectKey: (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.key
|
|
724
|
-
};
|
|
725
|
-
}),
|
|
726
|
-
projectName = _useApplicationContex.projectName,
|
|
727
|
-
projectKey = _useApplicationContex.projectKey;
|
|
728
|
-
const _useExportResourcesCo = useExportResourcesContext(),
|
|
729
|
-
formik = _useExportResourcesCo.formik,
|
|
730
|
-
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
731
|
-
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
732
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
733
|
-
resourceType = _useExportResourcesCo.resourceType;
|
|
734
|
-
const showNotification = actionsGlobal.useShowNotification();
|
|
735
|
-
const intl = reactIntl.useIntl();
|
|
736
|
-
const asyncDispatch = sdk.useAsyncDispatch();
|
|
737
|
-
const resourceTypePlural = resourceTypeToPlural({
|
|
738
|
-
resourceType: props.resourceType
|
|
739
|
-
});
|
|
740
|
-
const countInConfirmationMessage = () => {
|
|
741
|
-
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
742
|
-
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
743
|
-
return allResourcesCount;
|
|
744
|
-
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
745
|
-
return matchingResourcesCount;
|
|
746
|
-
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
747
|
-
return selectedResourceIds.length;
|
|
748
|
-
default:
|
|
749
|
-
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
750
|
-
}
|
|
751
|
-
};
|
|
752
|
-
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
753
|
-
dataAttributesPrimaryButton: {
|
|
754
|
-
'data-testid': 'confirm-export-button'
|
|
755
|
-
},
|
|
756
|
-
title: intl.formatMessage(messages.confirmationTitle, {
|
|
757
|
-
resourceType: resourceTypePlural
|
|
758
|
-
}),
|
|
759
|
-
labelPrimary: intl.formatMessage(messages.exportConfirmationLabel, {
|
|
760
|
-
resourceType: resourceTypePlural
|
|
761
|
-
}),
|
|
762
|
-
isOpen: props.isOpen,
|
|
763
|
-
onClose: props.closeModal,
|
|
764
|
-
onCancel: props.closeModal,
|
|
765
|
-
onConfirm: async () => {
|
|
766
|
-
const graphQuery = buildGraphQuery({
|
|
767
|
-
resourceType: resourceType,
|
|
768
|
-
selectedResourceIds: selectedResourceIds,
|
|
769
|
-
fields: _valuesInstanceProperty__default["default"](formik).fields,
|
|
770
|
-
exportSelectionType: _valuesInstanceProperty__default["default"](formik).exportSelectionType,
|
|
771
|
-
languages: _valuesInstanceProperty__default["default"](formik).languages
|
|
772
|
-
});
|
|
773
|
-
props.closeModal();
|
|
774
|
-
try {
|
|
775
|
-
var _context;
|
|
776
|
-
const response = await createExportOperation({
|
|
777
|
-
fileName: appendCsvOrJsonExtensionIfAbsent(_valuesInstanceProperty__default["default"](formik).fileName, _valuesInstanceProperty__default["default"](formik).outputFormat),
|
|
778
|
-
fileFormat: _valuesInstanceProperty__default["default"](formik).outputFormat,
|
|
779
|
-
locales: _valuesInstanceProperty__default["default"](formik).languages,
|
|
780
|
-
columns: _mapInstanceProperty__default["default"](_context = flattenNestedFields(_valuesInstanceProperty__default["default"](formik).fields)).call(_context, field => field.key),
|
|
781
|
-
projectKey,
|
|
782
|
-
graphQuery,
|
|
783
|
-
asyncDispatchFn: asyncDispatch
|
|
784
|
-
});
|
|
785
|
-
switch (response.state) {
|
|
786
|
-
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
787
|
-
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
788
|
-
showNotification({
|
|
789
|
-
kind: 'success',
|
|
790
|
-
domain: constants.DOMAINS.SIDE,
|
|
791
|
-
text: intl.formatMessage(messages.exportOperationSuccessMessage, {
|
|
792
|
-
newline: getNewLine,
|
|
793
|
-
logsLink: msg => getExportLogsLink(projectKey, msg),
|
|
794
|
-
b: getBold
|
|
795
|
-
})
|
|
796
|
-
});
|
|
797
|
-
props.onCloseParentModal();
|
|
798
|
-
break;
|
|
799
|
-
default:
|
|
800
|
-
throw new UnexpectedExportOperationStateError(response.state);
|
|
801
|
-
}
|
|
802
|
-
} catch (errors) {
|
|
803
|
-
actionsGlobal.showApiErrorNotification({
|
|
804
|
-
errors
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
},
|
|
808
|
-
children: jsxRuntime.jsxs("div", {
|
|
809
|
-
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
810
|
-
intlMessage: _objectSpread$7(_objectSpread$7({}, messages.confirmationBodyPlan), {}, {
|
|
811
|
-
values: {
|
|
812
|
-
resourceType: resourceTypePlural,
|
|
813
|
-
projectName: projectName,
|
|
814
|
-
count: countInConfirmationMessage(),
|
|
815
|
-
bold: getBold
|
|
816
|
-
}
|
|
817
|
-
})
|
|
818
|
-
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
819
|
-
intlMessage: messages.confirmationBodyQuestion
|
|
820
|
-
})]
|
|
821
|
-
})
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
825
|
-
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
826
|
-
resourceType: PropTypes__default["default"].string.isRequired,
|
|
827
|
-
closeModal: PropTypes__default["default"].func.isRequired,
|
|
828
|
-
onCloseParentModal: PropTypes__default["default"].func.isRequired
|
|
829
|
-
} : {};
|
|
830
|
-
|
|
831
652
|
function ownKeys$6(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; }
|
|
832
653
|
function _objectSpread$6(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$6(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$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
833
654
|
function FieldsRenderer(_ref) {
|
|
@@ -897,6 +718,14 @@ ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
897
718
|
})).isRequired
|
|
898
719
|
} : {};
|
|
899
720
|
|
|
721
|
+
function useExportResourcesContext() {
|
|
722
|
+
const context = react$1.useContext(ExportResourcesContext);
|
|
723
|
+
if (!context) {
|
|
724
|
+
throw new MissingExportResourceProviderError();
|
|
725
|
+
}
|
|
726
|
+
return context;
|
|
727
|
+
}
|
|
728
|
+
|
|
900
729
|
function ownKeys$5(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; }
|
|
901
730
|
function _objectSpread$5(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$5(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$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
902
731
|
function ExportSelectionRadioButtons() {
|
|
@@ -908,7 +737,8 @@ function ExportSelectionRadioButtons() {
|
|
|
908
737
|
resourceType = _useExportResourcesCo.resourceType,
|
|
909
738
|
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
910
739
|
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
911
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds
|
|
740
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
741
|
+
exportSelectionType = _useExportResourcesCo.exportSelectionType;
|
|
912
742
|
const resourceTypePlural = resourceTypeToPlural({
|
|
913
743
|
resourceType: resourceType
|
|
914
744
|
});
|
|
@@ -916,7 +746,7 @@ function ExportSelectionRadioButtons() {
|
|
|
916
746
|
scale: "xl",
|
|
917
747
|
children: jsxRuntime.jsxs(uiKit.RadioInput.Group, {
|
|
918
748
|
name: "exportSelectionType",
|
|
919
|
-
value:
|
|
749
|
+
value: exportSelectionType,
|
|
920
750
|
direction: "inline",
|
|
921
751
|
directionProps: {
|
|
922
752
|
scale: 'xl'
|
|
@@ -972,11 +802,11 @@ function ExportTextMessage() {
|
|
|
972
802
|
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
973
803
|
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
974
804
|
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
975
|
-
|
|
805
|
+
exportSelectionType = _useExportResourcesCo.exportSelectionType;
|
|
976
806
|
const resourceTypePlural = resourceTypeToPlural({
|
|
977
807
|
resourceType: resourceType
|
|
978
808
|
});
|
|
979
|
-
switch (
|
|
809
|
+
switch (exportSelectionType) {
|
|
980
810
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
981
811
|
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
982
812
|
intlMessage: _objectSpread$4(_objectSpread$4({}, messages.exportAllMessage), {}, {
|
|
@@ -1008,7 +838,7 @@ function ExportTextMessage() {
|
|
|
1008
838
|
})
|
|
1009
839
|
});
|
|
1010
840
|
default:
|
|
1011
|
-
throw new UnexpectedSelectionTypeError(
|
|
841
|
+
throw new UnexpectedSelectionTypeError(exportSelectionType);
|
|
1012
842
|
}
|
|
1013
843
|
}
|
|
1014
844
|
|
|
@@ -1016,7 +846,8 @@ const ExportSelection = () => {
|
|
|
1016
846
|
const _useTheme = designSystem.useTheme(),
|
|
1017
847
|
isNewTheme = _useTheme.isNewTheme;
|
|
1018
848
|
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1019
|
-
formik = _useExportResourcesCo.formik
|
|
849
|
+
formik = _useExportResourcesCo.formik,
|
|
850
|
+
exportSelectionType = _useExportResourcesCo.exportSelectionType;
|
|
1020
851
|
const onAppliedFilterRemove = filter => {
|
|
1021
852
|
var _context;
|
|
1022
853
|
formik.setFieldValue('appliedFilters', _filterInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](formik).appliedFilters).call(_context, appliedFilter => appliedFilter !== filter));
|
|
@@ -1029,7 +860,7 @@ const ExportSelection = () => {
|
|
|
1029
860
|
as: "h2",
|
|
1030
861
|
intlMessage: messages.exportSelection
|
|
1031
862
|
}), jsxRuntime.jsx(ExportSelectionRadioButtons, {}), jsxRuntime.jsx(ExportTextMessage, {})]
|
|
1032
|
-
}),
|
|
863
|
+
}), exportSelectionType === EXPORT_SELECTION_TYPES.ONLY_MATCHING && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1033
864
|
children: [jsxRuntime.jsx(ExportBasedOnMyViewsSelectField, {}), jsxRuntime.jsx(AppliedSearchTerms, {
|
|
1034
865
|
appliedSearchTerms: _valuesInstanceProperty__default["default"](formik).appliedSearchTerms
|
|
1035
866
|
}), jsxRuntime.jsx(AppliedFilters, {
|
|
@@ -1058,7 +889,7 @@ const ExportSelection = () => {
|
|
|
1058
889
|
scale: "m",
|
|
1059
890
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1060
891
|
scale: "l",
|
|
1061
|
-
children: [jsxRuntime.jsx(ExportTextMessage, {}),
|
|
892
|
+
children: [jsxRuntime.jsx(ExportTextMessage, {}), exportSelectionType === EXPORT_SELECTION_TYPES.ONLY_MATCHING && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1062
893
|
children: [jsxRuntime.jsx(ExportBasedOnMyViewsSelectField, {}), jsxRuntime.jsx(AppliedSearchTerms, {
|
|
1063
894
|
appliedSearchTerms: _valuesInstanceProperty__default["default"](formik).appliedSearchTerms
|
|
1064
895
|
}), jsxRuntime.jsx(AppliedFilters, {
|
|
@@ -1104,143 +935,106 @@ ExportProperties.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1104
935
|
function ownKeys$2(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; }
|
|
1105
936
|
function _objectSpread$2(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$2(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$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1106
937
|
const outputFormatOptions = [{
|
|
1107
|
-
value: OUTPUT_FORMATS.JSON,
|
|
1108
|
-
label: 'JSON'
|
|
1109
|
-
}, {
|
|
1110
938
|
value: OUTPUT_FORMATS.CSV,
|
|
1111
939
|
label: 'CSV'
|
|
940
|
+
}, {
|
|
941
|
+
value: OUTPUT_FORMATS.JSON,
|
|
942
|
+
label: 'JSON'
|
|
1112
943
|
}];
|
|
1113
|
-
function
|
|
1114
|
-
return _mapInstanceProperty__default["default"](
|
|
1115
|
-
value:
|
|
1116
|
-
label:
|
|
944
|
+
function mapLocalesToOptions(locales) {
|
|
945
|
+
return _mapInstanceProperty__default["default"](locales).call(locales, locale => ({
|
|
946
|
+
value: locale,
|
|
947
|
+
label: locale
|
|
1117
948
|
}));
|
|
1118
949
|
}
|
|
1119
950
|
function ExportFileSettings(props) {
|
|
1120
|
-
const _useTheme = designSystem.useTheme(),
|
|
1121
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
1122
951
|
const intl = reactIntl.useIntl();
|
|
1123
952
|
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1124
953
|
formik = _useExportResourcesCo.formik;
|
|
1125
954
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
1126
955
|
var _applicationContext$p;
|
|
1127
956
|
return {
|
|
1128
|
-
|
|
1129
|
-
|
|
957
|
+
locale: applicationContext.dataLocale,
|
|
958
|
+
locales: ((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) || []
|
|
1130
959
|
};
|
|
1131
960
|
}),
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
if (isNewTheme) return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1135
|
-
scale: "xxxl",
|
|
1136
|
-
children: [jsxRuntime.jsx(applicationComponents.PageContentNarrow, {
|
|
1137
|
-
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1138
|
-
scale: "xl",
|
|
1139
|
-
children: [jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({}, formik.getFieldProps('outputFormat')), {}, {
|
|
1140
|
-
title: intl.formatMessage(messages.outputFormat),
|
|
1141
|
-
options: outputFormatOptions
|
|
1142
|
-
})), jsxRuntime.jsx(uiKit.TextField, _objectSpread$2(_objectSpread$2({
|
|
1143
|
-
title: intl.formatMessage(messages.fileName)
|
|
1144
|
-
}, formik.getFieldProps('fileName')), {}, {
|
|
1145
|
-
touched: formik.touched.fileName,
|
|
1146
|
-
errors: formik.errors.fileName,
|
|
1147
|
-
renderError: renderFileNameError
|
|
1148
|
-
})), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1149
|
-
scale: "xs",
|
|
1150
|
-
children: [jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({
|
|
1151
|
-
id: "languages",
|
|
1152
|
-
title: intl.formatMessage(messages.localLanguage),
|
|
1153
|
-
options: mapLanguagesToOptions(languages),
|
|
1154
|
-
isMulti: true
|
|
1155
|
-
}, formik.getFieldProps('languages')), {}, {
|
|
1156
|
-
onChange: e => {
|
|
1157
|
-
formik.handleChange(e);
|
|
1158
|
-
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1159
|
-
},
|
|
1160
|
-
touched: formik.touched.languages,
|
|
1161
|
-
errors: formik.errors.languages,
|
|
1162
|
-
renderError: renderLanguageError
|
|
1163
|
-
})), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1164
|
-
name: "isAllLanguagesChecked",
|
|
1165
|
-
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLanguagesChecked,
|
|
1166
|
-
onChange: e => {
|
|
1167
|
-
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1168
|
-
formik.handleChange(e);
|
|
1169
|
-
},
|
|
1170
|
-
children: intl.formatMessage(messages.all)
|
|
1171
|
-
})]
|
|
1172
|
-
})]
|
|
1173
|
-
})
|
|
1174
|
-
}), jsxRuntime.jsx(applicationComponents.PageContentWide, {
|
|
1175
|
-
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1176
|
-
scale: "xxxl",
|
|
1177
|
-
children: [jsxRuntime.jsx(ExportSelection, {}), jsxRuntime.jsx(ExportProperties, {
|
|
1178
|
-
renderProperties: props.renderProperties
|
|
1179
|
-
})]
|
|
1180
|
-
})
|
|
1181
|
-
})]
|
|
1182
|
-
});
|
|
961
|
+
locales = _useApplicationContex.locales,
|
|
962
|
+
locale = _useApplicationContex.locale;
|
|
1183
963
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1184
|
-
scale: "
|
|
1185
|
-
children: [jsxRuntime.
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
children: jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({
|
|
1201
|
-
id: "languages",
|
|
1202
|
-
title: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1203
|
-
scale: "s",
|
|
1204
|
-
children: [jsxRuntime.jsx("label", {
|
|
1205
|
-
htmlFor: "languages",
|
|
1206
|
-
children: intl.formatMessage(messages.localLanguage)
|
|
1207
|
-
}), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1208
|
-
name: "isAllLanguagesChecked",
|
|
1209
|
-
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLanguagesChecked,
|
|
1210
|
-
onChange: e => {
|
|
1211
|
-
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1212
|
-
formik.handleChange(e);
|
|
1213
|
-
},
|
|
1214
|
-
children: jsxRuntime.jsx("div", {
|
|
1215
|
-
css: styles.notBold,
|
|
1216
|
-
children: intl.formatMessage(messages.all)
|
|
1217
|
-
})
|
|
1218
|
-
})]
|
|
1219
|
-
}),
|
|
1220
|
-
options: mapLanguagesToOptions(languages),
|
|
964
|
+
scale: "m",
|
|
965
|
+
children: [jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({}, formik.getFieldProps('outputFormat')), {}, {
|
|
966
|
+
title: intl.formatMessage(messages.outputFormat),
|
|
967
|
+
options: outputFormatOptions
|
|
968
|
+
})), jsxRuntime.jsx(uiKit.TextField, _objectSpread$2(_objectSpread$2({
|
|
969
|
+
title: intl.formatMessage(messages.fileName)
|
|
970
|
+
}, formik.getFieldProps('fileName')), {}, {
|
|
971
|
+
touched: formik.touched.fileName,
|
|
972
|
+
errors: formik.errors.fileName,
|
|
973
|
+
renderError: renderFileNameError
|
|
974
|
+
})), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
975
|
+
scale: "xs",
|
|
976
|
+
children: [jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({
|
|
977
|
+
id: "locales",
|
|
978
|
+
title: intl.formatMessage(messages.locale),
|
|
979
|
+
options: mapLocalesToOptions(locales),
|
|
1221
980
|
isMulti: true
|
|
1222
|
-
}, formik.getFieldProps('
|
|
981
|
+
}, formik.getFieldProps('locales')), {}, {
|
|
1223
982
|
onChange: e => {
|
|
1224
983
|
formik.handleChange(e);
|
|
1225
|
-
formik.setFieldValue('
|
|
984
|
+
formik.setFieldValue('isAllLocalesChecked', false);
|
|
1226
985
|
},
|
|
1227
|
-
touched: formik.touched.
|
|
1228
|
-
errors: formik.errors.
|
|
1229
|
-
renderError:
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
986
|
+
touched: formik.touched.locales,
|
|
987
|
+
errors: formik.errors.locales,
|
|
988
|
+
renderError: renderLocaleError
|
|
989
|
+
})), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
990
|
+
name: "isAllLocalesChecked",
|
|
991
|
+
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLocalesChecked,
|
|
992
|
+
onChange: e => {
|
|
993
|
+
if (e.target.checked) formik.setFieldValue('locales', locales);else formik.setFieldValue('locales', [locale]);
|
|
994
|
+
formik.handleChange(e);
|
|
995
|
+
},
|
|
996
|
+
children: intl.formatMessage(messages.selectAllLocales)
|
|
997
|
+
})]
|
|
998
|
+
}), props.showExportSelection && jsxRuntime.jsx(ExportSelection, {}), jsxRuntime.jsx(ExportProperties, {
|
|
1233
999
|
renderProperties: props.renderProperties
|
|
1234
1000
|
})]
|
|
1235
1001
|
});
|
|
1236
1002
|
}
|
|
1237
1003
|
ExportFileSettings.displayName = 'ExportFileSettings';
|
|
1238
1004
|
ExportFileSettings.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1005
|
+
showExportSelection: PropTypes__default["default"].bool,
|
|
1239
1006
|
renderProperties: PropTypes__default["default"].func
|
|
1240
1007
|
} : {};
|
|
1241
1008
|
|
|
1242
1009
|
const ExportResourcesContext = /*#__PURE__*/react$1.createContext();
|
|
1243
1010
|
|
|
1011
|
+
async function createExportOperation(_ref) {
|
|
1012
|
+
let fileName = _ref.fileName,
|
|
1013
|
+
fileFormat = _ref.fileFormat,
|
|
1014
|
+
columns = _ref.columns,
|
|
1015
|
+
locales = _ref.locales,
|
|
1016
|
+
projectKey = _ref.projectKey,
|
|
1017
|
+
graphQuery = _ref.graphQuery,
|
|
1018
|
+
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
1019
|
+
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
1020
|
+
const response = await asyncDispatchFn(sdk.actions.post({
|
|
1021
|
+
// FIXME: EXPORT is undefined
|
|
1022
|
+
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.EXPORT,
|
|
1023
|
+
uri: uri,
|
|
1024
|
+
headers: {
|
|
1025
|
+
accept: 'application/json'
|
|
1026
|
+
},
|
|
1027
|
+
payload: {
|
|
1028
|
+
fileName,
|
|
1029
|
+
fileFormat,
|
|
1030
|
+
columns,
|
|
1031
|
+
locales,
|
|
1032
|
+
query: graphQuery
|
|
1033
|
+
}
|
|
1034
|
+
}));
|
|
1035
|
+
return response;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1244
1038
|
const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
1245
1039
|
resourceType: PropTypes__default["default"].string.isRequired,
|
|
1246
1040
|
outputFormat: PropTypes__default["default"].string,
|
|
@@ -1248,6 +1042,7 @@ const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
|
1248
1042
|
allResourcesCount: PropTypes__default["default"].number.isRequired,
|
|
1249
1043
|
matchingResourcesCount: PropTypes__default["default"].number,
|
|
1250
1044
|
selectedResourceIds: PropTypes__default["default"].array,
|
|
1045
|
+
showExportSelection: PropTypes__default["default"].bool,
|
|
1251
1046
|
// TODO: Circular reference
|
|
1252
1047
|
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
1253
1048
|
key: PropTypes__default["default"].string.isRequired,
|
|
@@ -1266,34 +1061,87 @@ const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
|
1266
1061
|
}).isRequired;
|
|
1267
1062
|
|
|
1268
1063
|
function ownKeys$1(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; }
|
|
1269
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1064
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$1(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1270
1065
|
const ExportResourcesContextProvider = props => {
|
|
1271
|
-
var
|
|
1066
|
+
var _context2;
|
|
1067
|
+
const intl = reactIntl.useIntl();
|
|
1272
1068
|
const todayFormatted = moment__default["default"]().format('DD-MM-YY_HH-mm');
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1069
|
+
const asyncDispatch = sdk.useAsyncDispatch();
|
|
1070
|
+
const showNotification = actionsGlobal.useShowNotification();
|
|
1071
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
1072
|
+
var _applicationContext$p;
|
|
1073
|
+
return {
|
|
1074
|
+
locale: applicationContext.dataLocale,
|
|
1075
|
+
projectKey: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.key
|
|
1076
|
+
};
|
|
1077
|
+
}),
|
|
1078
|
+
projectKey = _useApplicationContex.projectKey,
|
|
1079
|
+
locale = _useApplicationContex.locale;
|
|
1080
|
+
const onSubmit = async values => {
|
|
1081
|
+
const graphQuery = buildGraphQuery({
|
|
1082
|
+
resourceType: props.resourceType,
|
|
1083
|
+
exportSelectionType: props.exportSelectionType,
|
|
1084
|
+
selectedResourceIds: props.selectedResourceIds,
|
|
1085
|
+
fields: values.fields,
|
|
1086
|
+
locales: values.locales
|
|
1087
|
+
});
|
|
1088
|
+
try {
|
|
1089
|
+
var _context;
|
|
1090
|
+
const response = await createExportOperation({
|
|
1091
|
+
fileName: appendCsvOrJsonExtensionIfAbsent(values.fileName, values.outputFormat),
|
|
1092
|
+
fileFormat: values.outputFormat,
|
|
1093
|
+
locales: values.locales,
|
|
1094
|
+
columns: _mapInstanceProperty__default["default"](_context = flattenNestedFields(values.fields)).call(_context, field => field.key),
|
|
1095
|
+
projectKey,
|
|
1096
|
+
graphQuery,
|
|
1097
|
+
asyncDispatchFn: asyncDispatch
|
|
1098
|
+
});
|
|
1099
|
+
switch (response.state) {
|
|
1100
|
+
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
1101
|
+
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
1102
|
+
showNotification({
|
|
1103
|
+
kind: 'info',
|
|
1104
|
+
domain: constants.DOMAINS.SIDE,
|
|
1105
|
+
text: intl.formatMessage(messages.exportOperationSuccessMessage, {
|
|
1106
|
+
newline: getNewLine,
|
|
1107
|
+
logsLink: msg => getExportLogsLink(projectKey, msg),
|
|
1108
|
+
b: getBold
|
|
1109
|
+
})
|
|
1110
|
+
});
|
|
1111
|
+
break;
|
|
1112
|
+
default:
|
|
1113
|
+
throw new UnexpectedExportOperationStateError(response.state);
|
|
1114
|
+
}
|
|
1115
|
+
} catch (errors) {
|
|
1116
|
+
// TODO: custom error messages for each error type
|
|
1117
|
+
actionsGlobal.showApiErrorNotification({
|
|
1118
|
+
errors
|
|
1119
|
+
});
|
|
1120
|
+
} finally {
|
|
1121
|
+
props.closeModal();
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1277
1124
|
const formik$1 = formik.useFormik({
|
|
1278
1125
|
initialValues: {
|
|
1279
1126
|
outputFormat: props.outputFormat,
|
|
1280
|
-
fileName: _concatInstanceProperty__default["default"](
|
|
1127
|
+
fileName: _concatInstanceProperty__default["default"](_context2 = "".concat(resourceTypeToPlural({
|
|
1281
1128
|
resourceType: props.resourceType,
|
|
1282
1129
|
isUpperCase: true
|
|
1283
|
-
}), "_Export_")).call(
|
|
1284
|
-
|
|
1130
|
+
}), "_Export_")).call(_context2, todayFormatted),
|
|
1131
|
+
locales: [locale],
|
|
1285
1132
|
fields: props.fields,
|
|
1286
1133
|
appliedSearchTerms: props.appliedSearchTerms,
|
|
1287
1134
|
appliedFilters: props.appliedFilters,
|
|
1288
|
-
|
|
1289
|
-
isAllLanguagesChecked: false
|
|
1135
|
+
isAllLocalesChecked: false
|
|
1290
1136
|
},
|
|
1291
|
-
validate
|
|
1137
|
+
validate,
|
|
1138
|
+
onSubmit
|
|
1292
1139
|
});
|
|
1293
1140
|
return jsxRuntime.jsx(ExportResourcesContext.Provider, {
|
|
1294
1141
|
value: {
|
|
1295
1142
|
formik: formik$1,
|
|
1296
1143
|
resourceType: props.resourceType,
|
|
1144
|
+
exportSelectionType: props.exportSelectionType,
|
|
1297
1145
|
allResourcesCount: props.allResourcesCount,
|
|
1298
1146
|
matchingResourcesCount: props.matchingResourcesCount,
|
|
1299
1147
|
selectedResourceIds: props.selectedResourceIds
|
|
@@ -1305,15 +1153,19 @@ ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
|
1305
1153
|
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$1(_objectSpread$1({}, ExportResourcesModalShape), {}, {
|
|
1306
1154
|
children: PropTypes__default["default"].node
|
|
1307
1155
|
}) : {};
|
|
1156
|
+
const getExportLogsLink = (projectKey, msg) => jsxRuntime.jsx(uiKit.Link, {
|
|
1157
|
+
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
1158
|
+
children: msg
|
|
1159
|
+
});
|
|
1308
1160
|
|
|
1309
|
-
const _excluded = ["renderProperties"];
|
|
1161
|
+
const _excluded = ["renderProperties", "showExportSelection"];
|
|
1310
1162
|
function ownKeys(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; }
|
|
1311
1163
|
function _objectSpread(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(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(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1312
1164
|
const ExportResourcesModal = _ref => {
|
|
1313
1165
|
let renderProperties = _ref.renderProperties,
|
|
1166
|
+
showExportSelection = _ref.showExportSelection,
|
|
1314
1167
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1315
1168
|
const intl = reactIntl.useIntl();
|
|
1316
|
-
const confirmationModal = applicationComponents.useModalState();
|
|
1317
1169
|
const resourceTypePlural = resourceTypeToPlural({
|
|
1318
1170
|
resourceType: props.resourceType
|
|
1319
1171
|
});
|
|
@@ -1321,30 +1173,38 @@ const ExportResourcesModal = _ref => {
|
|
|
1321
1173
|
children: jsxRuntime.jsx(ExportResourcesContext.Consumer, {
|
|
1322
1174
|
children: _ref2 => {
|
|
1323
1175
|
let formik = _ref2.formik;
|
|
1324
|
-
return jsxRuntime.
|
|
1176
|
+
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
1325
1177
|
isOpen: true,
|
|
1326
1178
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1327
1179
|
resourceType: resourceTypePlural
|
|
1328
1180
|
}),
|
|
1329
1181
|
onClose: props.closeModal,
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1182
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1183
|
+
scale: "xxxl",
|
|
1184
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1185
|
+
scale: "l",
|
|
1186
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1187
|
+
alignItems: "center",
|
|
1188
|
+
children: [jsxRuntime.jsx(uiKit.ExportIcon, {
|
|
1189
|
+
size: "medium",
|
|
1190
|
+
color: "neutral60"
|
|
1191
|
+
}), jsxRuntime.jsx(ExportTextMessage, {})]
|
|
1192
|
+
}), jsxRuntime.jsx(ExportFileSettings, {
|
|
1193
|
+
renderProperties: renderProperties,
|
|
1194
|
+
showExportSelection: showExportSelection
|
|
1195
|
+
})]
|
|
1196
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1197
|
+
justifyContent: "flex-end",
|
|
1198
|
+
scale: "m",
|
|
1199
|
+
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
1200
|
+
label: intl.formatMessage(messages.cancel),
|
|
1201
|
+
onClick: props.closeModal
|
|
1202
|
+
}), jsxRuntime.jsx(uiKit.PrimaryButton, {
|
|
1203
|
+
label: intl.formatMessage(messages.startExport),
|
|
1204
|
+
onClick: formik.submitForm
|
|
1205
|
+
})]
|
|
1206
|
+
})]
|
|
1207
|
+
})
|
|
1348
1208
|
});
|
|
1349
1209
|
}
|
|
1350
1210
|
})
|
|
@@ -1358,7 +1218,8 @@ ExportResourcesModal.defaultProps = {
|
|
|
1358
1218
|
appliedFilters: [],
|
|
1359
1219
|
matchingResourcesCount: 0,
|
|
1360
1220
|
exportSelectionType: EXPORT_SELECTION_TYPES.ALL_RESOURCES,
|
|
1361
|
-
outputFormat: OUTPUT_FORMATS.CSV
|
|
1221
|
+
outputFormat: OUTPUT_FORMATS.CSV,
|
|
1222
|
+
showExportSelection: false
|
|
1362
1223
|
};
|
|
1363
1224
|
|
|
1364
1225
|
exports.EXPORTABLE_RESOURCES = EXPORTABLE_RESOURCES;
|