@commercetools-frontend-extensions/export-resources-modal 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -5
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +246 -385
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +244 -379
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +247 -386
- package/package.json +17 -17
|
@@ -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,179 +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
|
-
projectKey = _ref.projectKey,
|
|
690
|
-
graphQuery = _ref.graphQuery,
|
|
691
|
-
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
692
|
-
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
693
|
-
const response = await asyncDispatchFn(sdk.actions.post({
|
|
694
|
-
// FIXME: EXPORT is undefined
|
|
695
|
-
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.EXPORT,
|
|
696
|
-
uri: uri,
|
|
697
|
-
headers: {
|
|
698
|
-
accept: 'application/json'
|
|
699
|
-
},
|
|
700
|
-
payload: {
|
|
701
|
-
fileName,
|
|
702
|
-
fileFormat,
|
|
703
|
-
columns,
|
|
704
|
-
query: graphQuery
|
|
705
|
-
}
|
|
706
|
-
}));
|
|
707
|
-
return response;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
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; }
|
|
711
|
-
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; }
|
|
712
|
-
const getExportLogsLink = (projectKey, msg) => jsxRuntime.jsx(uiKit.Link, {
|
|
713
|
-
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
714
|
-
children: msg
|
|
715
|
-
});
|
|
716
|
-
function ExportConfirmationModal(props) {
|
|
717
|
-
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
718
|
-
var _applicationContext$p, _applicationContext$p2;
|
|
719
|
-
return {
|
|
720
|
-
projectName: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.name,
|
|
721
|
-
projectKey: (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.key
|
|
722
|
-
};
|
|
723
|
-
}),
|
|
724
|
-
projectName = _useApplicationContex.projectName,
|
|
725
|
-
projectKey = _useApplicationContex.projectKey;
|
|
726
|
-
const _useExportResourcesCo = useExportResourcesContext(),
|
|
727
|
-
formik = _useExportResourcesCo.formik,
|
|
728
|
-
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
729
|
-
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
730
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
731
|
-
resourceType = _useExportResourcesCo.resourceType;
|
|
732
|
-
const showNotification = actionsGlobal.useShowNotification();
|
|
733
|
-
const intl = reactIntl.useIntl();
|
|
734
|
-
const asyncDispatch = sdk.useAsyncDispatch();
|
|
735
|
-
const resourceTypePlural = resourceTypeToPlural({
|
|
736
|
-
resourceType: props.resourceType
|
|
737
|
-
});
|
|
738
|
-
const countInConfirmationMessage = () => {
|
|
739
|
-
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
740
|
-
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
741
|
-
return allResourcesCount;
|
|
742
|
-
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
743
|
-
return matchingResourcesCount;
|
|
744
|
-
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
745
|
-
return selectedResourceIds.length;
|
|
746
|
-
default:
|
|
747
|
-
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
748
|
-
}
|
|
749
|
-
};
|
|
750
|
-
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
751
|
-
dataAttributesPrimaryButton: {
|
|
752
|
-
'data-testid': 'confirm-export-button'
|
|
753
|
-
},
|
|
754
|
-
title: intl.formatMessage(messages.confirmationTitle, {
|
|
755
|
-
resourceType: resourceTypePlural
|
|
756
|
-
}),
|
|
757
|
-
labelPrimary: intl.formatMessage(messages.exportConfirmationLabel, {
|
|
758
|
-
resourceType: resourceTypePlural
|
|
759
|
-
}),
|
|
760
|
-
isOpen: props.isOpen,
|
|
761
|
-
onClose: props.closeModal,
|
|
762
|
-
onCancel: props.closeModal,
|
|
763
|
-
onConfirm: async () => {
|
|
764
|
-
const graphQuery = buildGraphQuery({
|
|
765
|
-
resourceType: resourceType,
|
|
766
|
-
selectedResourceIds: selectedResourceIds,
|
|
767
|
-
fields: _valuesInstanceProperty__default["default"](formik).fields,
|
|
768
|
-
exportSelectionType: _valuesInstanceProperty__default["default"](formik).exportSelectionType,
|
|
769
|
-
languages: _valuesInstanceProperty__default["default"](formik).languages
|
|
770
|
-
});
|
|
771
|
-
props.closeModal();
|
|
772
|
-
try {
|
|
773
|
-
var _context;
|
|
774
|
-
const response = await createExportOperation({
|
|
775
|
-
fileName: appendCsvOrJsonExtensionIfAbsent(_valuesInstanceProperty__default["default"](formik).fileName, _valuesInstanceProperty__default["default"](formik).outputFormat),
|
|
776
|
-
fileFormat: _valuesInstanceProperty__default["default"](formik).outputFormat,
|
|
777
|
-
locales: _valuesInstanceProperty__default["default"](formik).languages,
|
|
778
|
-
columns: _mapInstanceProperty__default["default"](_context = flattenNestedFields(_valuesInstanceProperty__default["default"](formik).fields)).call(_context, field => field.key),
|
|
779
|
-
projectKey,
|
|
780
|
-
graphQuery,
|
|
781
|
-
asyncDispatchFn: asyncDispatch
|
|
782
|
-
});
|
|
783
|
-
switch (response.state) {
|
|
784
|
-
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
785
|
-
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
786
|
-
showNotification({
|
|
787
|
-
kind: 'success',
|
|
788
|
-
domain: constants.DOMAINS.SIDE,
|
|
789
|
-
text: intl.formatMessage(messages.exportOperationSuccessMessage, {
|
|
790
|
-
newline: getNewLine,
|
|
791
|
-
logsLink: msg => getExportLogsLink(projectKey, msg),
|
|
792
|
-
b: getBold
|
|
793
|
-
})
|
|
794
|
-
});
|
|
795
|
-
props.onCloseParentModal();
|
|
796
|
-
break;
|
|
797
|
-
default:
|
|
798
|
-
throw new UnexpectedExportOperationStateError(response.state);
|
|
799
|
-
}
|
|
800
|
-
} catch (errors) {
|
|
801
|
-
actionsGlobal.showApiErrorNotification({
|
|
802
|
-
errors
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
children: jsxRuntime.jsxs("div", {
|
|
807
|
-
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
808
|
-
intlMessage: _objectSpread$7(_objectSpread$7({}, messages.confirmationBodyPlan), {}, {
|
|
809
|
-
values: {
|
|
810
|
-
resourceType: resourceTypePlural,
|
|
811
|
-
projectName: projectName,
|
|
812
|
-
count: countInConfirmationMessage(),
|
|
813
|
-
bold: getBold
|
|
814
|
-
}
|
|
815
|
-
})
|
|
816
|
-
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
817
|
-
intlMessage: messages.confirmationBodyQuestion
|
|
818
|
-
})]
|
|
819
|
-
})
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
823
|
-
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
824
|
-
resourceType: PropTypes__default["default"].string.isRequired,
|
|
825
|
-
closeModal: PropTypes__default["default"].func.isRequired,
|
|
826
|
-
onCloseParentModal: PropTypes__default["default"].func.isRequired
|
|
827
|
-
} : {};
|
|
828
|
-
|
|
829
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; }
|
|
830
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; }
|
|
831
654
|
function FieldsRenderer(_ref) {
|
|
@@ -895,6 +718,14 @@ ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
895
718
|
})).isRequired
|
|
896
719
|
} : {};
|
|
897
720
|
|
|
721
|
+
function useExportResourcesContext() {
|
|
722
|
+
const context = react$1.useContext(ExportResourcesContext);
|
|
723
|
+
if (!context) {
|
|
724
|
+
throw new MissingExportResourceProviderError();
|
|
725
|
+
}
|
|
726
|
+
return context;
|
|
727
|
+
}
|
|
728
|
+
|
|
898
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; }
|
|
899
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; }
|
|
900
731
|
function ExportSelectionRadioButtons() {
|
|
@@ -906,7 +737,8 @@ function ExportSelectionRadioButtons() {
|
|
|
906
737
|
resourceType = _useExportResourcesCo.resourceType,
|
|
907
738
|
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
908
739
|
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
909
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds
|
|
740
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
741
|
+
exportSelectionType = _useExportResourcesCo.exportSelectionType;
|
|
910
742
|
const resourceTypePlural = resourceTypeToPlural({
|
|
911
743
|
resourceType: resourceType
|
|
912
744
|
});
|
|
@@ -914,7 +746,7 @@ function ExportSelectionRadioButtons() {
|
|
|
914
746
|
scale: "xl",
|
|
915
747
|
children: jsxRuntime.jsxs(uiKit.RadioInput.Group, {
|
|
916
748
|
name: "exportSelectionType",
|
|
917
|
-
value:
|
|
749
|
+
value: exportSelectionType,
|
|
918
750
|
direction: "inline",
|
|
919
751
|
directionProps: {
|
|
920
752
|
scale: 'xl'
|
|
@@ -970,11 +802,11 @@ function ExportTextMessage() {
|
|
|
970
802
|
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
971
803
|
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
972
804
|
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
973
|
-
|
|
805
|
+
exportSelectionType = _useExportResourcesCo.exportSelectionType;
|
|
974
806
|
const resourceTypePlural = resourceTypeToPlural({
|
|
975
807
|
resourceType: resourceType
|
|
976
808
|
});
|
|
977
|
-
switch (
|
|
809
|
+
switch (exportSelectionType) {
|
|
978
810
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
979
811
|
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
980
812
|
intlMessage: _objectSpread$4(_objectSpread$4({}, messages.exportAllMessage), {}, {
|
|
@@ -1006,7 +838,7 @@ function ExportTextMessage() {
|
|
|
1006
838
|
})
|
|
1007
839
|
});
|
|
1008
840
|
default:
|
|
1009
|
-
throw new UnexpectedSelectionTypeError(
|
|
841
|
+
throw new UnexpectedSelectionTypeError(exportSelectionType);
|
|
1010
842
|
}
|
|
1011
843
|
}
|
|
1012
844
|
|
|
@@ -1014,7 +846,8 @@ const ExportSelection = () => {
|
|
|
1014
846
|
const _useTheme = designSystem.useTheme(),
|
|
1015
847
|
isNewTheme = _useTheme.isNewTheme;
|
|
1016
848
|
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1017
|
-
formik = _useExportResourcesCo.formik
|
|
849
|
+
formik = _useExportResourcesCo.formik,
|
|
850
|
+
exportSelectionType = _useExportResourcesCo.exportSelectionType;
|
|
1018
851
|
const onAppliedFilterRemove = filter => {
|
|
1019
852
|
var _context;
|
|
1020
853
|
formik.setFieldValue('appliedFilters', _filterInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](formik).appliedFilters).call(_context, appliedFilter => appliedFilter !== filter));
|
|
@@ -1027,7 +860,7 @@ const ExportSelection = () => {
|
|
|
1027
860
|
as: "h2",
|
|
1028
861
|
intlMessage: messages.exportSelection
|
|
1029
862
|
}), jsxRuntime.jsx(ExportSelectionRadioButtons, {}), jsxRuntime.jsx(ExportTextMessage, {})]
|
|
1030
|
-
}),
|
|
863
|
+
}), exportSelectionType === EXPORT_SELECTION_TYPES.ONLY_MATCHING && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1031
864
|
children: [jsxRuntime.jsx(ExportBasedOnMyViewsSelectField, {}), jsxRuntime.jsx(AppliedSearchTerms, {
|
|
1032
865
|
appliedSearchTerms: _valuesInstanceProperty__default["default"](formik).appliedSearchTerms
|
|
1033
866
|
}), jsxRuntime.jsx(AppliedFilters, {
|
|
@@ -1056,7 +889,7 @@ const ExportSelection = () => {
|
|
|
1056
889
|
scale: "m",
|
|
1057
890
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1058
891
|
scale: "l",
|
|
1059
|
-
children: [jsxRuntime.jsx(ExportTextMessage, {}),
|
|
892
|
+
children: [jsxRuntime.jsx(ExportTextMessage, {}), exportSelectionType === EXPORT_SELECTION_TYPES.ONLY_MATCHING && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1060
893
|
children: [jsxRuntime.jsx(ExportBasedOnMyViewsSelectField, {}), jsxRuntime.jsx(AppliedSearchTerms, {
|
|
1061
894
|
appliedSearchTerms: _valuesInstanceProperty__default["default"](formik).appliedSearchTerms
|
|
1062
895
|
}), jsxRuntime.jsx(AppliedFilters, {
|
|
@@ -1102,143 +935,106 @@ ExportProperties.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1102
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; }
|
|
1103
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; }
|
|
1104
937
|
const outputFormatOptions = [{
|
|
1105
|
-
value: OUTPUT_FORMATS.JSON,
|
|
1106
|
-
label: 'JSON'
|
|
1107
|
-
}, {
|
|
1108
938
|
value: OUTPUT_FORMATS.CSV,
|
|
1109
939
|
label: 'CSV'
|
|
940
|
+
}, {
|
|
941
|
+
value: OUTPUT_FORMATS.JSON,
|
|
942
|
+
label: 'JSON'
|
|
1110
943
|
}];
|
|
1111
|
-
function
|
|
1112
|
-
return _mapInstanceProperty__default["default"](
|
|
1113
|
-
value:
|
|
1114
|
-
label:
|
|
944
|
+
function mapLocalesToOptions(locales) {
|
|
945
|
+
return _mapInstanceProperty__default["default"](locales).call(locales, locale => ({
|
|
946
|
+
value: locale,
|
|
947
|
+
label: locale
|
|
1115
948
|
}));
|
|
1116
949
|
}
|
|
1117
950
|
function ExportFileSettings(props) {
|
|
1118
|
-
const _useTheme = designSystem.useTheme(),
|
|
1119
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
1120
951
|
const intl = reactIntl.useIntl();
|
|
1121
952
|
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1122
953
|
formik = _useExportResourcesCo.formik;
|
|
1123
954
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
1124
955
|
var _applicationContext$p;
|
|
1125
956
|
return {
|
|
1126
|
-
|
|
1127
|
-
|
|
957
|
+
locale: applicationContext.dataLocale,
|
|
958
|
+
locales: ((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) || []
|
|
1128
959
|
};
|
|
1129
960
|
}),
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
if (isNewTheme) return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1133
|
-
scale: "xxxl",
|
|
1134
|
-
children: [jsxRuntime.jsx(applicationComponents.PageContentNarrow, {
|
|
1135
|
-
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1136
|
-
scale: "xl",
|
|
1137
|
-
children: [jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({}, formik.getFieldProps('outputFormat')), {}, {
|
|
1138
|
-
title: intl.formatMessage(messages.outputFormat),
|
|
1139
|
-
options: outputFormatOptions
|
|
1140
|
-
})), jsxRuntime.jsx(uiKit.TextField, _objectSpread$2(_objectSpread$2({
|
|
1141
|
-
title: intl.formatMessage(messages.fileName)
|
|
1142
|
-
}, formik.getFieldProps('fileName')), {}, {
|
|
1143
|
-
touched: formik.touched.fileName,
|
|
1144
|
-
errors: formik.errors.fileName,
|
|
1145
|
-
renderError: renderFileNameError
|
|
1146
|
-
})), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1147
|
-
scale: "xs",
|
|
1148
|
-
children: [jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({
|
|
1149
|
-
id: "languages",
|
|
1150
|
-
title: intl.formatMessage(messages.localLanguage),
|
|
1151
|
-
options: mapLanguagesToOptions(languages),
|
|
1152
|
-
isMulti: true
|
|
1153
|
-
}, formik.getFieldProps('languages')), {}, {
|
|
1154
|
-
onChange: e => {
|
|
1155
|
-
formik.handleChange(e);
|
|
1156
|
-
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1157
|
-
},
|
|
1158
|
-
touched: formik.touched.languages,
|
|
1159
|
-
errors: formik.errors.languages,
|
|
1160
|
-
renderError: renderLanguageError
|
|
1161
|
-
})), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1162
|
-
name: "isAllLanguagesChecked",
|
|
1163
|
-
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLanguagesChecked,
|
|
1164
|
-
onChange: e => {
|
|
1165
|
-
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1166
|
-
formik.handleChange(e);
|
|
1167
|
-
},
|
|
1168
|
-
children: intl.formatMessage(messages.all)
|
|
1169
|
-
})]
|
|
1170
|
-
})]
|
|
1171
|
-
})
|
|
1172
|
-
}), jsxRuntime.jsx(applicationComponents.PageContentWide, {
|
|
1173
|
-
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1174
|
-
scale: "xxxl",
|
|
1175
|
-
children: [jsxRuntime.jsx(ExportSelection, {}), jsxRuntime.jsx(ExportProperties, {
|
|
1176
|
-
renderProperties: props.renderProperties
|
|
1177
|
-
})]
|
|
1178
|
-
})
|
|
1179
|
-
})]
|
|
1180
|
-
});
|
|
961
|
+
locales = _useApplicationContex.locales,
|
|
962
|
+
locale = _useApplicationContex.locale;
|
|
1181
963
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1182
|
-
scale: "
|
|
1183
|
-
children: [jsxRuntime.
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
children: jsxRuntime.jsx(uiKit.SelectField, _objectSpread$2(_objectSpread$2({
|
|
1199
|
-
id: "languages",
|
|
1200
|
-
title: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1201
|
-
scale: "s",
|
|
1202
|
-
children: [jsxRuntime.jsx("label", {
|
|
1203
|
-
htmlFor: "languages",
|
|
1204
|
-
children: intl.formatMessage(messages.localLanguage)
|
|
1205
|
-
}), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1206
|
-
name: "isAllLanguagesChecked",
|
|
1207
|
-
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLanguagesChecked,
|
|
1208
|
-
onChange: e => {
|
|
1209
|
-
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1210
|
-
formik.handleChange(e);
|
|
1211
|
-
},
|
|
1212
|
-
children: jsxRuntime.jsx("div", {
|
|
1213
|
-
css: styles.notBold,
|
|
1214
|
-
children: intl.formatMessage(messages.all)
|
|
1215
|
-
})
|
|
1216
|
-
})]
|
|
1217
|
-
}),
|
|
1218
|
-
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),
|
|
1219
980
|
isMulti: true
|
|
1220
|
-
}, formik.getFieldProps('
|
|
981
|
+
}, formik.getFieldProps('locales')), {}, {
|
|
982
|
+
onChange: e => {
|
|
983
|
+
formik.handleChange(e);
|
|
984
|
+
formik.setFieldValue('isAllLocalesChecked', false);
|
|
985
|
+
},
|
|
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,
|
|
1221
992
|
onChange: e => {
|
|
993
|
+
if (e.target.checked) formik.setFieldValue('locales', locales);else formik.setFieldValue('locales', [locale]);
|
|
1222
994
|
formik.handleChange(e);
|
|
1223
|
-
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1224
995
|
},
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
horizontalConstraint: 7
|
|
1229
|
-
}))
|
|
1230
|
-
}), jsxRuntime.jsx(ExportSelection, {}), jsxRuntime.jsx(ExportProperties, {
|
|
996
|
+
children: intl.formatMessage(messages.selectAllLocales)
|
|
997
|
+
})]
|
|
998
|
+
}), props.showExportSelection && jsxRuntime.jsx(ExportSelection, {}), jsxRuntime.jsx(ExportProperties, {
|
|
1231
999
|
renderProperties: props.renderProperties
|
|
1232
1000
|
})]
|
|
1233
1001
|
});
|
|
1234
1002
|
}
|
|
1235
1003
|
ExportFileSettings.displayName = 'ExportFileSettings';
|
|
1236
1004
|
ExportFileSettings.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1005
|
+
showExportSelection: PropTypes__default["default"].bool,
|
|
1237
1006
|
renderProperties: PropTypes__default["default"].func
|
|
1238
1007
|
} : {};
|
|
1239
1008
|
|
|
1240
1009
|
const ExportResourcesContext = /*#__PURE__*/react$1.createContext();
|
|
1241
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
|
+
|
|
1242
1038
|
const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
1243
1039
|
resourceType: PropTypes__default["default"].string.isRequired,
|
|
1244
1040
|
outputFormat: PropTypes__default["default"].string,
|
|
@@ -1246,6 +1042,7 @@ const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
|
1246
1042
|
allResourcesCount: PropTypes__default["default"].number.isRequired,
|
|
1247
1043
|
matchingResourcesCount: PropTypes__default["default"].number,
|
|
1248
1044
|
selectedResourceIds: PropTypes__default["default"].array,
|
|
1045
|
+
showExportSelection: PropTypes__default["default"].bool,
|
|
1249
1046
|
// TODO: Circular reference
|
|
1250
1047
|
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
1251
1048
|
key: PropTypes__default["default"].string.isRequired,
|
|
@@ -1264,34 +1061,85 @@ const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
|
1264
1061
|
}).isRequired;
|
|
1265
1062
|
|
|
1266
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; }
|
|
1267
|
-
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; }
|
|
1268
1065
|
const ExportResourcesContextProvider = props => {
|
|
1269
|
-
var
|
|
1066
|
+
var _context2;
|
|
1067
|
+
const intl = reactIntl.useIntl();
|
|
1270
1068
|
const todayFormatted = moment__default["default"]().format('DD-MM-YY_HH-mm');
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
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
|
+
}
|
|
1121
|
+
};
|
|
1275
1122
|
const formik$1 = formik.useFormik({
|
|
1276
1123
|
initialValues: {
|
|
1277
1124
|
outputFormat: props.outputFormat,
|
|
1278
|
-
fileName: _concatInstanceProperty__default["default"](
|
|
1125
|
+
fileName: _concatInstanceProperty__default["default"](_context2 = "".concat(resourceTypeToPlural({
|
|
1279
1126
|
resourceType: props.resourceType,
|
|
1280
1127
|
isUpperCase: true
|
|
1281
|
-
}), "_Export_")).call(
|
|
1282
|
-
|
|
1128
|
+
}), "_Export_")).call(_context2, todayFormatted),
|
|
1129
|
+
locales: [locale],
|
|
1283
1130
|
fields: props.fields,
|
|
1284
1131
|
appliedSearchTerms: props.appliedSearchTerms,
|
|
1285
1132
|
appliedFilters: props.appliedFilters,
|
|
1286
|
-
|
|
1287
|
-
isAllLanguagesChecked: false
|
|
1133
|
+
isAllLocalesChecked: false
|
|
1288
1134
|
},
|
|
1289
|
-
validate
|
|
1135
|
+
validate,
|
|
1136
|
+
onSubmit
|
|
1290
1137
|
});
|
|
1291
1138
|
return jsxRuntime.jsx(ExportResourcesContext.Provider, {
|
|
1292
1139
|
value: {
|
|
1293
1140
|
formik: formik$1,
|
|
1294
1141
|
resourceType: props.resourceType,
|
|
1142
|
+
exportSelectionType: props.exportSelectionType,
|
|
1295
1143
|
allResourcesCount: props.allResourcesCount,
|
|
1296
1144
|
matchingResourcesCount: props.matchingResourcesCount,
|
|
1297
1145
|
selectedResourceIds: props.selectedResourceIds
|
|
@@ -1303,15 +1151,19 @@ ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
|
1303
1151
|
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$1(_objectSpread$1({}, ExportResourcesModalShape), {}, {
|
|
1304
1152
|
children: PropTypes__default["default"].node
|
|
1305
1153
|
}) : {};
|
|
1154
|
+
const getExportLogsLink = (projectKey, msg) => jsxRuntime.jsx(uiKit.Link, {
|
|
1155
|
+
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
1156
|
+
children: msg
|
|
1157
|
+
});
|
|
1306
1158
|
|
|
1307
|
-
const _excluded = ["renderProperties"];
|
|
1159
|
+
const _excluded = ["renderProperties", "showExportSelection"];
|
|
1308
1160
|
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; }
|
|
1309
1161
|
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; }
|
|
1310
1162
|
const ExportResourcesModal = _ref => {
|
|
1311
1163
|
let renderProperties = _ref.renderProperties,
|
|
1164
|
+
showExportSelection = _ref.showExportSelection,
|
|
1312
1165
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
1313
1166
|
const intl = reactIntl.useIntl();
|
|
1314
|
-
const confirmationModal = applicationComponents.useModalState();
|
|
1315
1167
|
const resourceTypePlural = resourceTypeToPlural({
|
|
1316
1168
|
resourceType: props.resourceType
|
|
1317
1169
|
});
|
|
@@ -1319,30 +1171,38 @@ const ExportResourcesModal = _ref => {
|
|
|
1319
1171
|
children: jsxRuntime.jsx(ExportResourcesContext.Consumer, {
|
|
1320
1172
|
children: _ref2 => {
|
|
1321
1173
|
let formik = _ref2.formik;
|
|
1322
|
-
return jsxRuntime.
|
|
1174
|
+
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
1323
1175
|
isOpen: true,
|
|
1324
1176
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1325
1177
|
resourceType: resourceTypePlural
|
|
1326
1178
|
}),
|
|
1327
1179
|
onClose: props.closeModal,
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1180
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1181
|
+
scale: "xxxl",
|
|
1182
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1183
|
+
scale: "l",
|
|
1184
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1185
|
+
alignItems: "center",
|
|
1186
|
+
children: [jsxRuntime.jsx(uiKit.ExportIcon, {
|
|
1187
|
+
size: "medium",
|
|
1188
|
+
color: "neutral60"
|
|
1189
|
+
}), jsxRuntime.jsx(ExportTextMessage, {})]
|
|
1190
|
+
}), jsxRuntime.jsx(ExportFileSettings, {
|
|
1191
|
+
renderProperties: renderProperties,
|
|
1192
|
+
showExportSelection: showExportSelection
|
|
1193
|
+
})]
|
|
1194
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
1195
|
+
justifyContent: "flex-end",
|
|
1196
|
+
scale: "m",
|
|
1197
|
+
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
1198
|
+
label: intl.formatMessage(messages.cancel),
|
|
1199
|
+
onClick: props.closeModal
|
|
1200
|
+
}), jsxRuntime.jsx(uiKit.PrimaryButton, {
|
|
1201
|
+
label: intl.formatMessage(messages.startExport),
|
|
1202
|
+
onClick: formik.submitForm
|
|
1203
|
+
})]
|
|
1204
|
+
})]
|
|
1205
|
+
})
|
|
1346
1206
|
});
|
|
1347
1207
|
}
|
|
1348
1208
|
})
|
|
@@ -1356,7 +1216,8 @@ ExportResourcesModal.defaultProps = {
|
|
|
1356
1216
|
appliedFilters: [],
|
|
1357
1217
|
matchingResourcesCount: 0,
|
|
1358
1218
|
exportSelectionType: EXPORT_SELECTION_TYPES.ALL_RESOURCES,
|
|
1359
|
-
outputFormat: OUTPUT_FORMATS.CSV
|
|
1219
|
+
outputFormat: OUTPUT_FORMATS.CSV,
|
|
1220
|
+
showExportSelection: false
|
|
1360
1221
|
};
|
|
1361
1222
|
|
|
1362
1223
|
exports.EXPORTABLE_RESOURCES = EXPORTABLE_RESOURCES;
|