@commercetools-frontend-extensions/export-resources-modal 1.3.0 → 1.3.2
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.
|
@@ -26,21 +26,21 @@ var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibl
|
|
|
26
26
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
27
27
|
var _wrapNativeSuper = require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
28
28
|
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
29
|
-
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
30
|
-
var PropTypes = require('prop-types');
|
|
31
|
-
var formik = require('formik');
|
|
32
|
-
var moment = require('moment');
|
|
33
|
-
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
34
|
-
var react = require('react');
|
|
35
29
|
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
36
30
|
var omitEmpty = require('omit-empty-es');
|
|
37
31
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
38
|
-
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
39
32
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
40
|
-
var
|
|
33
|
+
var PropTypes = require('prop-types');
|
|
34
|
+
var React = require('react');
|
|
35
|
+
var react = require('@emotion/react');
|
|
41
36
|
var _styled = require('@emotion/styled/base');
|
|
37
|
+
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
38
|
+
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
42
39
|
var sdk = require('@commercetools-frontend/sdk');
|
|
43
40
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
41
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
42
|
+
var formik = require('formik');
|
|
43
|
+
var moment = require('moment');
|
|
44
44
|
var constants = require('@commercetools-frontend/constants');
|
|
45
45
|
|
|
46
46
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -58,31 +58,35 @@ var _flatInstanceProperty__default = /*#__PURE__*/_interopDefault(_flatInstanceP
|
|
|
58
58
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
59
59
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
60
60
|
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
61
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
62
|
-
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
63
61
|
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
64
|
-
var
|
|
62
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
63
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
65
64
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
65
|
+
var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
|
|
66
|
+
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
66
67
|
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
const EXPORT_OPERATION_STATES = {
|
|
69
|
+
PROCESSING: 'processing',
|
|
70
|
+
COMPLETED: 'completed',
|
|
71
|
+
FAILED: 'failed'
|
|
71
72
|
};
|
|
73
|
+
|
|
72
74
|
const EXPORT_SELECTION_TYPES = {
|
|
73
75
|
ALL_RESOURCES: 'allResources',
|
|
74
76
|
ONLY_MATCHING: 'onlyMatching',
|
|
75
77
|
ONLY_SELECTED: 'onlySelected'
|
|
76
78
|
};
|
|
79
|
+
|
|
80
|
+
const EXPORTABLE_RESOURCES = {
|
|
81
|
+
CATEGORY: 'category',
|
|
82
|
+
PRODUCT: 'product',
|
|
83
|
+
DISCOUNT_CODE: 'discountCode'
|
|
84
|
+
};
|
|
85
|
+
|
|
77
86
|
const OUTPUT_FORMATS = {
|
|
78
87
|
JSON: 'json',
|
|
79
88
|
CSV: 'csv'
|
|
80
89
|
};
|
|
81
|
-
const EXPORT_OPERATION_STATES = {
|
|
82
|
-
PROCESSING: 'processing',
|
|
83
|
-
COMPLETED: 'completed',
|
|
84
|
-
FAILED: 'failed'
|
|
85
|
-
};
|
|
86
90
|
|
|
87
91
|
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
88
92
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -178,6 +182,14 @@ function isFilledArray(maybeArray) {
|
|
|
178
182
|
return _Array$isArray__default["default"](maybeArray) && maybeArray.length;
|
|
179
183
|
}
|
|
180
184
|
|
|
185
|
+
/*
|
|
186
|
+
* This function is responsible for constructing the GraphQL query based on the export settings
|
|
187
|
+
*
|
|
188
|
+
* Depending on the type of export selection (all resources, only selected, or only matching/filtered) it constructs different types of queries:
|
|
189
|
+
* - For 'all resources', it generates a query that fetches all fields and languages specified in the export settings.
|
|
190
|
+
* - For 'only selected', it creates a query that fetches only the fields and languages of the selected resources. The ids of the selected resources are included in the query.
|
|
191
|
+
* - 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.
|
|
192
|
+
*/
|
|
181
193
|
function buildGraphQuery(exportSettings) {
|
|
182
194
|
var _context;
|
|
183
195
|
const operation = resourceTypeToOperationName(exportSettings.resourceType);
|
|
@@ -213,6 +225,21 @@ function buildGraphQuery(exportSettings) {
|
|
|
213
225
|
throw new UnexpectedSelectionTypeError(exportSettings.exportSelectionType);
|
|
214
226
|
}
|
|
215
227
|
}
|
|
228
|
+
|
|
229
|
+
/*
|
|
230
|
+
* This function builds the necessary field structure for our GraphQL queries, tt is specifically designed to handle different types of fields
|
|
231
|
+
*
|
|
232
|
+
* For fields whose values change depending on the language aka localised fields, a unique request format is used
|
|
233
|
+
* This format combines the field and the language, separated by '_____'. This approach is adopted as our system disallows the use of hyphens `-` in these situations
|
|
234
|
+
*
|
|
235
|
+
* Fields that don't vary by language but contain additional subfields (known as 'nested fields') are also addressed
|
|
236
|
+
* In these cases the function is used recursively on these subfields to generate the appropriate request.
|
|
237
|
+
*
|
|
238
|
+
* Overall, this function enables us to accurately request different types of data, including those varying by language or containing subfields.
|
|
239
|
+
*
|
|
240
|
+
* More details can be found in the related PR: https://github.com/commercetools/commercetools-exporter/pull/103
|
|
241
|
+
*/
|
|
242
|
+
|
|
216
243
|
function buildFields(_ref) {
|
|
217
244
|
var _context2;
|
|
218
245
|
let fields = _ref.fields,
|
|
@@ -220,7 +247,7 @@ function buildFields(_ref) {
|
|
|
220
247
|
return _flatInstanceProperty__default["default"](_context2 = _mapInstanceProperty__default["default"](fields).call(fields, field => {
|
|
221
248
|
if (field.isLocalized) return _mapInstanceProperty__default["default"](languages).call(languages, language => {
|
|
222
249
|
var _context3, _context4, _context5;
|
|
223
|
-
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty__default["default"](_context3 = "".concat(field.key, "
|
|
250
|
+
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty__default["default"](_context3 = "".concat(field.key, "_____")).call(_context3, language));
|
|
224
251
|
return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(alias, ": ")).call(_context5, field.key, "(locale: \"")).call(_context4, language, "\")");
|
|
225
252
|
});else {
|
|
226
253
|
if (isFilledArray(field.fields)) {
|
|
@@ -236,6 +263,22 @@ function buildFields(_ref) {
|
|
|
236
263
|
})).call(_context2);
|
|
237
264
|
}
|
|
238
265
|
|
|
266
|
+
function validate(values) {
|
|
267
|
+
const errors = {
|
|
268
|
+
fileName: {},
|
|
269
|
+
languages: {}
|
|
270
|
+
};
|
|
271
|
+
if (uiKit.TextInput.isEmpty(values.fileName)) {
|
|
272
|
+
errors.fileName.missing = true;
|
|
273
|
+
} else if (!/^[a-zA-Z0-9-_]+$/.test(values.fileName)) {
|
|
274
|
+
errors.fileName.invalidInput = true;
|
|
275
|
+
}
|
|
276
|
+
if (values.languages.length < 1) {
|
|
277
|
+
errors.languages.missing = true;
|
|
278
|
+
}
|
|
279
|
+
return omitEmpty__default["default"](errors);
|
|
280
|
+
}
|
|
281
|
+
|
|
239
282
|
var messages = reactIntl.defineMessages({
|
|
240
283
|
modalTitle: {
|
|
241
284
|
id: 'ExportResourcesModal.modalTitle',
|
|
@@ -389,122 +432,32 @@ var messages = reactIntl.defineMessages({
|
|
|
389
432
|
}
|
|
390
433
|
});
|
|
391
434
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
398
|
-
closeModal: PropTypes__default["default"].func.isRequired,
|
|
399
|
-
allResourcesCount: PropTypes__default["default"].number.isRequired,
|
|
400
|
-
matchingResourcesCount: PropTypes__default["default"].number,
|
|
401
|
-
selectedResourceIds: PropTypes__default["default"].array,
|
|
402
|
-
// TODO: Circular reference
|
|
403
|
-
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
404
|
-
key: PropTypes__default["default"].string.isRequired,
|
|
405
|
-
label: PropTypes__default["default"].string,
|
|
406
|
-
isLocalized: PropTypes__default["default"].bool,
|
|
407
|
-
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
408
|
-
key: PropTypes__default["default"].string.isRequired,
|
|
409
|
-
label: PropTypes__default["default"].string,
|
|
410
|
-
isLocalized: PropTypes__default["default"].bool
|
|
411
|
-
}))
|
|
412
|
-
})).isRequired,
|
|
413
|
-
exportSelectionType: PropTypes__default["default"].string,
|
|
414
|
-
appliedSearchTerms: PropTypes__default["default"].array,
|
|
415
|
-
appliedFilters: PropTypes__default["default"].array,
|
|
416
|
-
renderProperties: PropTypes__default["default"].func
|
|
417
|
-
}).isRequired;
|
|
418
|
-
|
|
419
|
-
function validate(values) {
|
|
420
|
-
const errors = {
|
|
421
|
-
fileName: {},
|
|
422
|
-
languages: {}
|
|
423
|
-
};
|
|
424
|
-
if (uiKit.TextInput.isEmpty(values.fileName)) {
|
|
425
|
-
errors.fileName.missing = true;
|
|
426
|
-
} else if (!/^[a-zA-Z0-9-_]+$/.test(values.fileName)) {
|
|
427
|
-
errors.fileName.invalidInput = true;
|
|
428
|
-
}
|
|
429
|
-
if (values.languages.length < 1) {
|
|
430
|
-
errors.languages.missing = true;
|
|
431
|
-
}
|
|
432
|
-
return omitEmpty__default["default"](errors);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
436
|
-
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$b(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$b(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
437
|
-
const ExportResourcesContextProvider = props => {
|
|
438
|
-
var _context;
|
|
439
|
-
const todayFormatted = moment__default["default"]().format('DD-MM-YY_HH-mm');
|
|
440
|
-
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
441
|
-
language: applicationContext.dataLocale
|
|
442
|
-
})),
|
|
443
|
-
language = _useApplicationContex.language;
|
|
444
|
-
const formik$1 = formik.useFormik({
|
|
445
|
-
initialValues: {
|
|
446
|
-
outputFormat: props.outputFormat,
|
|
447
|
-
fileName: _concatInstanceProperty__default["default"](_context = "".concat(resourceTypeToPlural({
|
|
448
|
-
resourceType: props.resourceType,
|
|
449
|
-
isUpperCase: true
|
|
450
|
-
}), "_Export_")).call(_context, todayFormatted),
|
|
451
|
-
languages: [language],
|
|
452
|
-
fields: props.fields,
|
|
453
|
-
appliedSearchTerms: props.appliedSearchTerms,
|
|
454
|
-
appliedFilters: props.appliedFilters,
|
|
455
|
-
exportSelectionType: props.exportSelectionType,
|
|
456
|
-
isAllLanguagesChecked: false
|
|
457
|
-
},
|
|
458
|
-
validate
|
|
459
|
-
});
|
|
460
|
-
const _useState = react.useState(false),
|
|
461
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
462
|
-
exportOperationStarted = _useState2[0],
|
|
463
|
-
setExportOperationStarted = _useState2[1];
|
|
464
|
-
return jsxRuntime.jsx(ExportResourcesContext.Provider, {
|
|
465
|
-
value: {
|
|
466
|
-
formik: formik$1,
|
|
467
|
-
resourceType: props.resourceType,
|
|
468
|
-
allResourcesCount: props.allResourcesCount,
|
|
469
|
-
matchingResourcesCount: props.matchingResourcesCount,
|
|
470
|
-
selectedResourceIds: props.selectedResourceIds,
|
|
471
|
-
exportOperationStarted,
|
|
472
|
-
setExportOperationStarted
|
|
473
|
-
},
|
|
474
|
-
children: props.children
|
|
435
|
+
function getBold(msg) {
|
|
436
|
+
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
437
|
+
as: "span",
|
|
438
|
+
isBold: true,
|
|
439
|
+
children: msg
|
|
475
440
|
});
|
|
476
|
-
};
|
|
477
|
-
ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
478
|
-
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$b(_objectSpread$b({}, ExportResourcesModalShape), {}, {
|
|
479
|
-
children: PropTypes__default["default"].node
|
|
480
|
-
}) : {};
|
|
481
|
-
|
|
482
|
-
function useExportResourcesContext() {
|
|
483
|
-
const context = react.useContext(ExportResourcesContext);
|
|
484
|
-
if (!context) {
|
|
485
|
-
throw new MissingExportResourceProviderError();
|
|
486
|
-
}
|
|
487
|
-
return context;
|
|
488
441
|
}
|
|
489
442
|
|
|
490
443
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
491
|
-
const smallTopPadding = /*#__PURE__*/react
|
|
444
|
+
const smallTopPadding = /*#__PURE__*/react.css("padding-top:", designSystem.customProperties.spacingXs, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:smallTopPadding;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJMkIiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJ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tjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbmBcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG4iXX0= */");
|
|
492
445
|
const tagListContainer = _ref => {
|
|
493
446
|
let isNewTheme = _ref.isNewTheme;
|
|
494
|
-
return /*#__PURE__*/react
|
|
447
|
+
return /*#__PURE__*/react.css("width:100%;display:flex;flex-wrap:wrap;display:inline-flex;padding:0 ", isNewTheme ? 0 : designSystem.customProperties.spacingL, ";&>div{margin:0 ", designSystem.customProperties.spacingS, " ", designSystem.customProperties.spacingS, " 0;}" + (process.env.NODE_ENV === "production" ? "" : ";label:tagListContainer;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0QiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAx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448
|
};
|
|
496
|
-
const tagListItem = /*#__PURE__*/react
|
|
497
|
-
const divider = /*#__PURE__*/react
|
|
449
|
+
const tagListItem = /*#__PURE__*/react.css("margin:0 ", designSystem.customProperties.spacingXs, " ", designSystem.customProperties.spacingXs, " 0;display:flex;min-width:0;" + (process.env.NODE_ENV === "production" ? "" : ";label:tagListItem;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQnVCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */");
|
|
450
|
+
const divider = /*#__PURE__*/react.css("box-sizing:border-box;width:100%;margin:0;border:0;border-top:1px solid ", designSystem.customProperties.colorNeutral60, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:divider;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5Qm1CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRP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90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */");
|
|
498
451
|
const notBold = process.env.NODE_ENV === "production" ? {
|
|
499
452
|
name: "lugakg",
|
|
500
453
|
styles: "font-weight:normal"
|
|
501
454
|
} : {
|
|
502
455
|
name: "w02aau-notBold",
|
|
503
456
|
styles: "font-weight:normal;label:notBold;",
|
|
504
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
457
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ21CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV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3NNZXNzYWdlLFxufVxuIl19 */",
|
|
505
458
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
506
459
|
};
|
|
507
|
-
const successMessage = /*#__PURE__*/react
|
|
460
|
+
const successMessage = /*#__PURE__*/react.css("margin-bottom:", designSystem.customProperties.spacingL, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:successMessage;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQzBCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */");
|
|
508
461
|
const styles = {
|
|
509
462
|
tagListItem,
|
|
510
463
|
tagListContainer,
|
|
@@ -514,177 +467,54 @@ const styles = {
|
|
|
514
467
|
successMessage
|
|
515
468
|
};
|
|
516
469
|
|
|
517
|
-
function
|
|
518
|
-
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
519
|
-
function ExportSelectionRadioButtons() {
|
|
470
|
+
function TagList(props) {
|
|
520
471
|
const _useTheme = designSystem.useTheme(),
|
|
521
472
|
isNewTheme = _useTheme.isNewTheme;
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
});
|
|
532
|
-
return jsxRuntime.jsx(uiKit.Spacings.Inline, {
|
|
533
|
-
scale: "xl",
|
|
534
|
-
children: jsxRuntime.jsxs(uiKit.RadioInput.Group, {
|
|
535
|
-
name: "exportSelectionType",
|
|
536
|
-
value: _valuesInstanceProperty__default["default"](formik).exportSelectionType,
|
|
537
|
-
direction: "inline",
|
|
538
|
-
directionProps: {
|
|
539
|
-
scale: 'xl'
|
|
540
|
-
},
|
|
541
|
-
onChange: formik.handleChange,
|
|
542
|
-
children: [jsxRuntime.jsx(uiKit.RadioInput.Option, {
|
|
543
|
-
value: EXPORT_SELECTION_TYPES.ALL_RESOURCES,
|
|
544
|
-
"data-testid": 'test-all-resources',
|
|
545
|
-
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
546
|
-
isBold: !isNewTheme,
|
|
547
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.exportAllResources), {}, {
|
|
548
|
-
values: {
|
|
549
|
-
resourceType: resourceTypePlural,
|
|
550
|
-
count: allResourcesCount
|
|
551
|
-
}
|
|
552
|
-
})
|
|
553
|
-
})
|
|
554
|
-
}), jsxRuntime.jsx(uiKit.RadioInput.Option, {
|
|
555
|
-
value: EXPORT_SELECTION_TYPES.ONLY_MATCHING,
|
|
556
|
-
"data-testid": 'test-only-matching',
|
|
557
|
-
isDisabled: !Boolean(matchingResourcesCount),
|
|
558
|
-
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
559
|
-
isBold: !isNewTheme,
|
|
560
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.exportOnlyMatchingResources), {}, {
|
|
561
|
-
values: {
|
|
562
|
-
count: matchingResourcesCount || intl.formatMessage(messages.nothingApplied)
|
|
563
|
-
}
|
|
564
|
-
})
|
|
565
|
-
})
|
|
566
|
-
}), jsxRuntime.jsx(uiKit.RadioInput.Option, {
|
|
567
|
-
value: EXPORT_SELECTION_TYPES.ONLY_SELECTED,
|
|
568
|
-
"data-testid": 'test-only-selected',
|
|
569
|
-
isDisabled: !Boolean(selectedResourceIds.length),
|
|
570
|
-
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
571
|
-
isBold: !isNewTheme,
|
|
572
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.exportOnlySelectedResources), {}, {
|
|
573
|
-
values: {
|
|
574
|
-
resourceType: resourceTypePlural,
|
|
575
|
-
count: selectedResourceIds.length
|
|
576
|
-
}
|
|
577
|
-
})
|
|
578
|
-
})
|
|
579
|
-
})]
|
|
580
|
-
})
|
|
473
|
+
return jsxRuntime.jsx("div", {
|
|
474
|
+
css: styles.tagListContainer({
|
|
475
|
+
isNewTheme
|
|
476
|
+
}),
|
|
477
|
+
"data-testid": props['data-testid'],
|
|
478
|
+
children: _mapInstanceProperty__default["default"](React.Children).call(React.Children, props.children, tag => jsxRuntime.jsx("div", {
|
|
479
|
+
css: styles.tagListItem,
|
|
480
|
+
children: tag
|
|
481
|
+
}))
|
|
581
482
|
});
|
|
582
483
|
}
|
|
484
|
+
TagList.displayName = 'TagList';
|
|
485
|
+
TagList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
486
|
+
children: PropTypes__default["default"].node.isRequired,
|
|
487
|
+
'data-testid': PropTypes__default["default"].string
|
|
488
|
+
} : {};
|
|
583
489
|
|
|
584
|
-
function
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}
|
|
613
|
-
})
|
|
614
|
-
});
|
|
615
|
-
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
616
|
-
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
617
|
-
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportMatchingMessage), {}, {
|
|
618
|
-
values: {
|
|
619
|
-
count: matchingResourcesCount,
|
|
620
|
-
resourceType: resourceTypePlural,
|
|
621
|
-
b: getBold
|
|
622
|
-
}
|
|
623
|
-
})
|
|
624
|
-
});
|
|
625
|
-
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
626
|
-
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
627
|
-
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportSelectedMessage), {}, {
|
|
628
|
-
values: {
|
|
629
|
-
count: selectedResourceIds.length,
|
|
630
|
-
resourceType: resourceTypePlural,
|
|
631
|
-
b: getBold
|
|
632
|
-
}
|
|
633
|
-
})
|
|
634
|
-
});
|
|
635
|
-
default:
|
|
636
|
-
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
function TagList(props) {
|
|
641
|
-
const _useTheme = designSystem.useTheme(),
|
|
642
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
643
|
-
return jsxRuntime.jsx("div", {
|
|
644
|
-
css: styles.tagListContainer({
|
|
645
|
-
isNewTheme
|
|
646
|
-
}),
|
|
647
|
-
"data-testid": props['data-testid'],
|
|
648
|
-
children: _mapInstanceProperty__default["default"](react.Children).call(react.Children, props.children, tag => jsxRuntime.jsx("div", {
|
|
649
|
-
css: styles.tagListItem,
|
|
650
|
-
children: tag
|
|
651
|
-
}))
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
TagList.displayName = 'TagList';
|
|
655
|
-
TagList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
656
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
657
|
-
'data-testid': PropTypes__default["default"].string
|
|
658
|
-
} : {};
|
|
659
|
-
|
|
660
|
-
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
661
|
-
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
662
|
-
function AppliedFilters(_ref) {
|
|
663
|
-
let filters = _ref.filters,
|
|
664
|
-
onFilterRemove = _ref.onFilterRemove;
|
|
665
|
-
const _useTheme = designSystem.useTheme(),
|
|
666
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
667
|
-
if (isNewTheme) return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
668
|
-
condensed: true,
|
|
669
|
-
isDefaultClosed: !Boolean(filters.length),
|
|
670
|
-
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
671
|
-
intlMessage: _objectSpread$8(_objectSpread$8({}, messages.appliedFiltersMessage), {}, {
|
|
672
|
-
values: {
|
|
673
|
-
filtersCount: filters.length
|
|
674
|
-
}
|
|
675
|
-
})
|
|
676
|
-
}),
|
|
677
|
-
children: jsxRuntime.jsx(TagList, {
|
|
678
|
-
children: _mapInstanceProperty__default["default"](filters).call(filters, filter => jsxRuntime.jsx("div", {
|
|
679
|
-
"data-testid": "test-filter-".concat(filter),
|
|
680
|
-
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
681
|
-
onRemove: () => {
|
|
682
|
-
onFilterRemove(filter);
|
|
683
|
-
},
|
|
684
|
-
children: filter
|
|
685
|
-
})
|
|
686
|
-
}, filter))
|
|
687
|
-
})
|
|
490
|
+
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
491
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$b(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$b(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
492
|
+
function AppliedFilters(_ref) {
|
|
493
|
+
let filters = _ref.filters,
|
|
494
|
+
onFilterRemove = _ref.onFilterRemove;
|
|
495
|
+
const _useTheme = designSystem.useTheme(),
|
|
496
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
497
|
+
if (isNewTheme) return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
498
|
+
condensed: true,
|
|
499
|
+
isDefaultClosed: !Boolean(filters.length),
|
|
500
|
+
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
501
|
+
intlMessage: _objectSpread$b(_objectSpread$b({}, messages.appliedFiltersMessage), {}, {
|
|
502
|
+
values: {
|
|
503
|
+
filtersCount: filters.length
|
|
504
|
+
}
|
|
505
|
+
})
|
|
506
|
+
}),
|
|
507
|
+
children: jsxRuntime.jsx(TagList, {
|
|
508
|
+
children: _mapInstanceProperty__default["default"](filters).call(filters, filter => jsxRuntime.jsx("div", {
|
|
509
|
+
"data-testid": "test-filter-".concat(filter),
|
|
510
|
+
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
511
|
+
onRemove: () => {
|
|
512
|
+
onFilterRemove(filter);
|
|
513
|
+
},
|
|
514
|
+
children: filter
|
|
515
|
+
})
|
|
516
|
+
}, filter))
|
|
517
|
+
})
|
|
688
518
|
});
|
|
689
519
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
690
520
|
scale: "s",
|
|
@@ -697,7 +527,7 @@ function AppliedFilters(_ref) {
|
|
|
697
527
|
color: "neutral60"
|
|
698
528
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
699
529
|
isBold: true,
|
|
700
|
-
intlMessage: _objectSpread$
|
|
530
|
+
intlMessage: _objectSpread$b(_objectSpread$b({}, messages.appliedFiltersMessage), {}, {
|
|
701
531
|
values: {
|
|
702
532
|
filtersCount: filters.length
|
|
703
533
|
}
|
|
@@ -721,35 +551,14 @@ AppliedFilters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
721
551
|
onFilterRemove: PropTypes__default["default"].func.isRequired
|
|
722
552
|
} : {};
|
|
723
553
|
|
|
724
|
-
|
|
725
|
-
function
|
|
726
|
-
const _useTheme = designSystem.useTheme(),
|
|
727
|
-
themedValue = _useTheme.themedValue;
|
|
728
|
-
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
729
|
-
scale: "m",
|
|
730
|
-
alignItems: "center",
|
|
731
|
-
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
732
|
-
intlMessage: messages.exportBasedOnMyViewsMessage
|
|
733
|
-
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
734
|
-
intlMessage: messages.myViews
|
|
735
|
-
}), jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
736
|
-
max: themedValue(4, 7),
|
|
737
|
-
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
738
|
-
isDisabled: true,
|
|
739
|
-
placeholder: "Default"
|
|
740
|
-
})
|
|
741
|
-
})]
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
746
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
554
|
+
function ownKeys$a(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
555
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
747
556
|
const IconPlaceholder = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
748
|
-
target: "
|
|
557
|
+
target: "e1oion860"
|
|
749
558
|
} : {
|
|
750
|
-
target: "
|
|
559
|
+
target: "e1oion860",
|
|
751
560
|
label: "IconPlaceholder"
|
|
752
|
-
})("width:", uiKit.customProperties.spacingM, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
561
|
+
})("width:", uiKit.customProperties.spacingM, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcGxpZWQtc2VhcmNoLXRlcm1zLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFha0MiLCJmaWxlIjoiYXBwbGll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AgICAgICAgPEljb25QbGFjZWhvbGRlciAvPlxuICAgICAgICA8VGV4dC5Cb2R5PnthcHBsaWVkU2VhcmNoVGVybXMuam9pbignLCAnKX08L1RleHQuQm9keT5cbiAgICAgIDwvU3BhY2luZ3MuSW5saW5lPlxuICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gIClcbn1cbkFwcGxpZWRTZWFyY2hUZXJtcy5wcm9wVHlwZXMgPSB7XG4gIGFwcGxpZWRTZWFyY2hUZXJtczogUHJvcFR5cGVzLmFycmF5LmlzUmVxdWlyZWQsXG59XG4iXX0= */"));
|
|
753
562
|
function AppliedSearchTerms(_ref) {
|
|
754
563
|
let appliedSearchTerms = _ref.appliedSearchTerms;
|
|
755
564
|
const _useTheme = designSystem.useTheme(),
|
|
@@ -758,7 +567,7 @@ function AppliedSearchTerms(_ref) {
|
|
|
758
567
|
condensed: true,
|
|
759
568
|
isDefaultClosed: !Boolean(appliedSearchTerms.length),
|
|
760
569
|
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
761
|
-
intlMessage: _objectSpread$
|
|
570
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.appliedSearchTermsMessage), {}, {
|
|
762
571
|
values: {
|
|
763
572
|
searchTermsCount: appliedSearchTerms.length
|
|
764
573
|
}
|
|
@@ -779,7 +588,7 @@ function AppliedSearchTerms(_ref) {
|
|
|
779
588
|
color: "neutral60"
|
|
780
589
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
781
590
|
isBold: true,
|
|
782
|
-
intlMessage: _objectSpread$
|
|
591
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.appliedSearchTermsMessage), {}, {
|
|
783
592
|
values: {
|
|
784
593
|
searchTermsCount: appliedSearchTerms.length
|
|
785
594
|
}
|
|
@@ -798,15 +607,185 @@ AppliedSearchTerms.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
798
607
|
appliedSearchTerms: PropTypes__default["default"].array.isRequired
|
|
799
608
|
} : {};
|
|
800
609
|
|
|
801
|
-
|
|
802
|
-
function
|
|
610
|
+
// TODO: @redesign cleanup
|
|
611
|
+
function ExportBasedOnMyViewsSelectField() {
|
|
612
|
+
const _useTheme = designSystem.useTheme(),
|
|
613
|
+
themedValue = _useTheme.themedValue;
|
|
614
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
615
|
+
scale: "m",
|
|
616
|
+
alignItems: "center",
|
|
617
|
+
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
618
|
+
intlMessage: messages.exportBasedOnMyViewsMessage
|
|
619
|
+
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
620
|
+
intlMessage: messages.myViews
|
|
621
|
+
}), jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
622
|
+
max: themedValue(4, 7),
|
|
623
|
+
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
624
|
+
isDisabled: true,
|
|
625
|
+
placeholder: "Default"
|
|
626
|
+
})
|
|
627
|
+
})]
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
function ownKeys$9(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
632
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
633
|
+
function renderFileNameError(key) {
|
|
634
|
+
switch (key) {
|
|
635
|
+
case 'missing':
|
|
636
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages.missingFileNameError));
|
|
637
|
+
case 'invalidInput':
|
|
638
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages.invalidFileNameError));
|
|
639
|
+
default:
|
|
640
|
+
return null;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
function renderLanguageError(key) {
|
|
644
|
+
switch (key) {
|
|
645
|
+
case 'missing':
|
|
646
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages.missingLanguageError));
|
|
647
|
+
default:
|
|
648
|
+
return null;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
function useExportResourcesContext() {
|
|
653
|
+
const context = React.useContext(ExportResourcesContext);
|
|
654
|
+
if (!context) {
|
|
655
|
+
throw new MissingExportResourceProviderError();
|
|
656
|
+
}
|
|
657
|
+
return context;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
async function createExportOperation(_ref) {
|
|
661
|
+
let projectKey = _ref.projectKey,
|
|
662
|
+
graphQuery = _ref.graphQuery,
|
|
663
|
+
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
664
|
+
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
665
|
+
const response = await asyncDispatchFn(sdk.actions.post({
|
|
666
|
+
// FIXME: EXPORT is undefined
|
|
667
|
+
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.EXPORT,
|
|
668
|
+
uri: uri,
|
|
669
|
+
headers: {
|
|
670
|
+
accept: 'application/json'
|
|
671
|
+
},
|
|
672
|
+
payload: {
|
|
673
|
+
query: graphQuery
|
|
674
|
+
}
|
|
675
|
+
}));
|
|
676
|
+
return response;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
680
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
681
|
+
function ExportConfirmationModal(props) {
|
|
682
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
683
|
+
var _applicationContext$p, _applicationContext$p2;
|
|
684
|
+
return {
|
|
685
|
+
projectName: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.name,
|
|
686
|
+
projectKey: (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.key
|
|
687
|
+
};
|
|
688
|
+
}),
|
|
689
|
+
projectName = _useApplicationContex.projectName,
|
|
690
|
+
projectKey = _useApplicationContex.projectKey;
|
|
691
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
692
|
+
formik = _useExportResourcesCo.formik,
|
|
693
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
694
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
695
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
696
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
697
|
+
setExportOperationStarted = _useExportResourcesCo.setExportOperationStarted;
|
|
698
|
+
const intl = reactIntl.useIntl();
|
|
699
|
+
const asyncDispatch = sdk.useAsyncDispatch();
|
|
700
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
701
|
+
resourceType: props.resourceType
|
|
702
|
+
});
|
|
703
|
+
const countInConfirmationMessage = () => {
|
|
704
|
+
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
705
|
+
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
706
|
+
return allResourcesCount;
|
|
707
|
+
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
708
|
+
return matchingResourcesCount;
|
|
709
|
+
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
710
|
+
return selectedResourceIds.length;
|
|
711
|
+
default:
|
|
712
|
+
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
716
|
+
dataAttributesPrimaryButton: {
|
|
717
|
+
'data-testid': 'confirm-export-button'
|
|
718
|
+
},
|
|
719
|
+
title: intl.formatMessage(messages.confirmationTitle, {
|
|
720
|
+
resourceType: resourceTypePlural
|
|
721
|
+
}),
|
|
722
|
+
labelPrimary: intl.formatMessage(messages.exportConfirmationLabel, {
|
|
723
|
+
resourceType: resourceTypePlural
|
|
724
|
+
}),
|
|
725
|
+
isOpen: props.isOpen,
|
|
726
|
+
onClose: props.closeModal,
|
|
727
|
+
onCancel: props.closeModal,
|
|
728
|
+
onConfirm: async () => {
|
|
729
|
+
setExportOperationStarted(false);
|
|
730
|
+
const graphQuery = buildGraphQuery({
|
|
731
|
+
resourceType: resourceType,
|
|
732
|
+
selectedResourceIds: selectedResourceIds,
|
|
733
|
+
fields: _valuesInstanceProperty__default["default"](formik).fields,
|
|
734
|
+
exportSelectionType: _valuesInstanceProperty__default["default"](formik).exportSelectionType,
|
|
735
|
+
languages: _valuesInstanceProperty__default["default"](formik).languages
|
|
736
|
+
});
|
|
737
|
+
props.closeModal();
|
|
738
|
+
try {
|
|
739
|
+
const response = await createExportOperation({
|
|
740
|
+
projectKey,
|
|
741
|
+
graphQuery,
|
|
742
|
+
asyncDispatchFn: asyncDispatch
|
|
743
|
+
});
|
|
744
|
+
switch (response.state) {
|
|
745
|
+
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
746
|
+
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
747
|
+
setExportOperationStarted(true);
|
|
748
|
+
break;
|
|
749
|
+
default:
|
|
750
|
+
throw new UnexpectedExportOperationStateError(response.state);
|
|
751
|
+
}
|
|
752
|
+
} catch (errors) {
|
|
753
|
+
actionsGlobal.showApiErrorNotification({
|
|
754
|
+
errors
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
children: jsxRuntime.jsxs("div", {
|
|
759
|
+
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
760
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages.confirmationBodyPlan), {}, {
|
|
761
|
+
values: {
|
|
762
|
+
resourceType: resourceTypePlural,
|
|
763
|
+
projectName: projectName,
|
|
764
|
+
count: countInConfirmationMessage(),
|
|
765
|
+
bold: getBold
|
|
766
|
+
}
|
|
767
|
+
})
|
|
768
|
+
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
769
|
+
intlMessage: messages.confirmationBodyQuestion
|
|
770
|
+
})]
|
|
771
|
+
})
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
775
|
+
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
776
|
+
resourceType: PropTypes__default["default"].string.isRequired,
|
|
777
|
+
closeModal: PropTypes__default["default"].func.isRequired
|
|
778
|
+
} : {};
|
|
779
|
+
|
|
780
|
+
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
781
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$7(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$7(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
803
782
|
function normalizeFields(fields) {
|
|
804
783
|
const result = _mapInstanceProperty__default["default"](fields).call(fields, field => {
|
|
805
784
|
if (isFilledArray(field.fields)) {
|
|
806
785
|
var _context;
|
|
807
786
|
return _mapInstanceProperty__default["default"](_context = normalizeFields(field.fields)).call(_context, nestedField => {
|
|
808
787
|
var _context2;
|
|
809
|
-
return _objectSpread$
|
|
788
|
+
return _objectSpread$7(_objectSpread$7({}, nestedField), {}, {
|
|
810
789
|
key: _concatInstanceProperty__default["default"](_context2 = "".concat(field.key, ".")).call(_context2, nestedField.key)
|
|
811
790
|
});
|
|
812
791
|
});
|
|
@@ -836,7 +815,7 @@ function ExportFields(_ref2) {
|
|
|
836
815
|
condensed: true,
|
|
837
816
|
isDefaultClosed: !Boolean(fields.length),
|
|
838
817
|
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
839
|
-
intlMessage: _objectSpread$
|
|
818
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages.columnsMessage), {}, {
|
|
840
819
|
values: {
|
|
841
820
|
columnsCount: fields.length
|
|
842
821
|
}
|
|
@@ -857,30 +836,145 @@ function ExportFields(_ref2) {
|
|
|
857
836
|
color: "neutral60"
|
|
858
837
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
859
838
|
isBold: true,
|
|
860
|
-
intlMessage: _objectSpread$
|
|
839
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages.columnsMessage), {}, {
|
|
840
|
+
values: {
|
|
841
|
+
columnsCount: fields.length
|
|
842
|
+
}
|
|
843
|
+
})
|
|
844
|
+
})]
|
|
845
|
+
}), jsxRuntime.jsx(FieldsRenderer, {
|
|
846
|
+
fields: fields
|
|
847
|
+
})]
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
851
|
+
// TODO: Circular reference
|
|
852
|
+
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
853
|
+
key: PropTypes__default["default"].string.isRequired,
|
|
854
|
+
label: PropTypes__default["default"].string,
|
|
855
|
+
isLocalized: PropTypes__default["default"].bool,
|
|
856
|
+
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
857
|
+
key: PropTypes__default["default"].string.isRequired,
|
|
858
|
+
label: PropTypes__default["default"].string,
|
|
859
|
+
isLocalized: PropTypes__default["default"].bool
|
|
860
|
+
}))
|
|
861
|
+
})).isRequired
|
|
862
|
+
} : {};
|
|
863
|
+
|
|
864
|
+
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
865
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
866
|
+
function ExportSelectionRadioButtons() {
|
|
867
|
+
const _useTheme = designSystem.useTheme(),
|
|
868
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
869
|
+
const intl = reactIntl.useIntl();
|
|
870
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
871
|
+
formik = _useExportResourcesCo.formik,
|
|
872
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
873
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
874
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
875
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds;
|
|
876
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
877
|
+
resourceType: resourceType
|
|
878
|
+
});
|
|
879
|
+
return jsxRuntime.jsx(uiKit.Spacings.Inline, {
|
|
880
|
+
scale: "xl",
|
|
881
|
+
children: jsxRuntime.jsxs(uiKit.RadioInput.Group, {
|
|
882
|
+
name: "exportSelectionType",
|
|
883
|
+
value: _valuesInstanceProperty__default["default"](formik).exportSelectionType,
|
|
884
|
+
direction: "inline",
|
|
885
|
+
directionProps: {
|
|
886
|
+
scale: 'xl'
|
|
887
|
+
},
|
|
888
|
+
onChange: formik.handleChange,
|
|
889
|
+
children: [jsxRuntime.jsx(uiKit.RadioInput.Option, {
|
|
890
|
+
value: EXPORT_SELECTION_TYPES.ALL_RESOURCES,
|
|
891
|
+
"data-testid": 'test-all-resources',
|
|
892
|
+
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
893
|
+
isBold: !isNewTheme,
|
|
894
|
+
intlMessage: _objectSpread$6(_objectSpread$6({}, messages.exportAllResources), {}, {
|
|
895
|
+
values: {
|
|
896
|
+
resourceType: resourceTypePlural,
|
|
897
|
+
count: allResourcesCount
|
|
898
|
+
}
|
|
899
|
+
})
|
|
900
|
+
})
|
|
901
|
+
}), jsxRuntime.jsx(uiKit.RadioInput.Option, {
|
|
902
|
+
value: EXPORT_SELECTION_TYPES.ONLY_MATCHING,
|
|
903
|
+
"data-testid": 'test-only-matching',
|
|
904
|
+
isDisabled: !Boolean(matchingResourcesCount),
|
|
905
|
+
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
906
|
+
isBold: !isNewTheme,
|
|
907
|
+
intlMessage: _objectSpread$6(_objectSpread$6({}, messages.exportOnlyMatchingResources), {}, {
|
|
908
|
+
values: {
|
|
909
|
+
count: matchingResourcesCount || intl.formatMessage(messages.nothingApplied)
|
|
910
|
+
}
|
|
911
|
+
})
|
|
912
|
+
})
|
|
913
|
+
}), jsxRuntime.jsx(uiKit.RadioInput.Option, {
|
|
914
|
+
value: EXPORT_SELECTION_TYPES.ONLY_SELECTED,
|
|
915
|
+
"data-testid": 'test-only-selected',
|
|
916
|
+
isDisabled: !Boolean(selectedResourceIds.length),
|
|
917
|
+
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
918
|
+
isBold: !isNewTheme,
|
|
919
|
+
intlMessage: _objectSpread$6(_objectSpread$6({}, messages.exportOnlySelectedResources), {}, {
|
|
920
|
+
values: {
|
|
921
|
+
resourceType: resourceTypePlural,
|
|
922
|
+
count: selectedResourceIds.length
|
|
923
|
+
}
|
|
924
|
+
})
|
|
925
|
+
})
|
|
926
|
+
})]
|
|
927
|
+
})
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
932
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
933
|
+
function ExportTextMessage() {
|
|
934
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
935
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
936
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
937
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
938
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
939
|
+
formik = _useExportResourcesCo.formik;
|
|
940
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
941
|
+
resourceType: resourceType
|
|
942
|
+
});
|
|
943
|
+
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
944
|
+
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
945
|
+
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
946
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages.exportAllMessage), {}, {
|
|
861
947
|
values: {
|
|
862
|
-
|
|
948
|
+
count: allResourcesCount,
|
|
949
|
+
resourceType: resourceTypePlural,
|
|
950
|
+
b: getBold
|
|
863
951
|
}
|
|
864
952
|
})
|
|
865
|
-
})
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
953
|
+
});
|
|
954
|
+
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
955
|
+
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
956
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages.exportMatchingMessage), {}, {
|
|
957
|
+
values: {
|
|
958
|
+
count: matchingResourcesCount,
|
|
959
|
+
resourceType: resourceTypePlural,
|
|
960
|
+
b: getBold
|
|
961
|
+
}
|
|
962
|
+
})
|
|
963
|
+
});
|
|
964
|
+
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
965
|
+
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
966
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages.exportSelectedMessage), {}, {
|
|
967
|
+
values: {
|
|
968
|
+
count: selectedResourceIds.length,
|
|
969
|
+
resourceType: resourceTypePlural,
|
|
970
|
+
b: getBold
|
|
971
|
+
}
|
|
972
|
+
})
|
|
973
|
+
});
|
|
974
|
+
default:
|
|
975
|
+
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
976
|
+
}
|
|
870
977
|
}
|
|
871
|
-
ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
872
|
-
// TODO: Circular reference
|
|
873
|
-
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
874
|
-
key: PropTypes__default["default"].string.isRequired,
|
|
875
|
-
label: PropTypes__default["default"].string,
|
|
876
|
-
isLocalized: PropTypes__default["default"].bool,
|
|
877
|
-
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
878
|
-
key: PropTypes__default["default"].string.isRequired,
|
|
879
|
-
label: PropTypes__default["default"].string,
|
|
880
|
-
isLocalized: PropTypes__default["default"].bool
|
|
881
|
-
}))
|
|
882
|
-
})).isRequired
|
|
883
|
-
} : {};
|
|
884
978
|
|
|
885
979
|
const ExportSelection = () => {
|
|
886
980
|
const _useTheme = designSystem.useTheme(),
|
|
@@ -944,8 +1038,8 @@ const ExportSelection = () => {
|
|
|
944
1038
|
});
|
|
945
1039
|
};
|
|
946
1040
|
|
|
947
|
-
function ownKeys$
|
|
948
|
-
function _objectSpread$
|
|
1041
|
+
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1042
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
949
1043
|
const ExportProperties = props => {
|
|
950
1044
|
const _useTheme = designSystem.useTheme(),
|
|
951
1045
|
isNewTheme = _useTheme.isNewTheme;
|
|
@@ -962,7 +1056,7 @@ const ExportProperties = props => {
|
|
|
962
1056
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
963
1057
|
header: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
964
1058
|
isBold: true,
|
|
965
|
-
intlMessage: _objectSpread$
|
|
1059
|
+
intlMessage: _objectSpread$4({}, messages.propertiesPanelLabel)
|
|
966
1060
|
}),
|
|
967
1061
|
children: props.renderProperties()
|
|
968
1062
|
});
|
|
@@ -971,27 +1065,6 @@ ExportProperties.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
971
1065
|
renderProperties: PropTypes__default["default"].func
|
|
972
1066
|
} : {};
|
|
973
1067
|
|
|
974
|
-
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
975
|
-
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
976
|
-
function renderFileNameError(key) {
|
|
977
|
-
switch (key) {
|
|
978
|
-
case 'missing':
|
|
979
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$4({}, messages.missingFileNameError));
|
|
980
|
-
case 'invalidInput':
|
|
981
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$4({}, messages.invalidFileNameError));
|
|
982
|
-
default:
|
|
983
|
-
return null;
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
function renderLanguageError(key) {
|
|
987
|
-
switch (key) {
|
|
988
|
-
case 'missing':
|
|
989
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$4({}, messages.missingLanguageError));
|
|
990
|
-
default:
|
|
991
|
-
return null;
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
|
|
995
1068
|
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
996
1069
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
997
1070
|
const outputFormatOptions = [{
|
|
@@ -1134,128 +1207,8 @@ ExportFileSettings.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1134
1207
|
renderProperties: PropTypes__default["default"].func
|
|
1135
1208
|
} : {};
|
|
1136
1209
|
|
|
1137
|
-
async function createExportOperation(_ref) {
|
|
1138
|
-
let projectKey = _ref.projectKey,
|
|
1139
|
-
graphQuery = _ref.graphQuery,
|
|
1140
|
-
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
1141
|
-
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
1142
|
-
const response = await asyncDispatchFn(sdk.actions.post({
|
|
1143
|
-
// FIXME: EXPORT is undefined
|
|
1144
|
-
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.EXPORT,
|
|
1145
|
-
uri: uri,
|
|
1146
|
-
headers: {
|
|
1147
|
-
accept: 'application/json'
|
|
1148
|
-
},
|
|
1149
|
-
payload: {
|
|
1150
|
-
query: graphQuery
|
|
1151
|
-
}
|
|
1152
|
-
}));
|
|
1153
|
-
return response;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
1210
|
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1157
1211
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1158
|
-
function ExportConfirmationModal(props) {
|
|
1159
|
-
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
1160
|
-
var _applicationContext$p, _applicationContext$p2;
|
|
1161
|
-
return {
|
|
1162
|
-
projectName: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.name,
|
|
1163
|
-
projectKey: (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.key
|
|
1164
|
-
};
|
|
1165
|
-
}),
|
|
1166
|
-
projectName = _useApplicationContex.projectName,
|
|
1167
|
-
projectKey = _useApplicationContex.projectKey;
|
|
1168
|
-
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1169
|
-
formik = _useExportResourcesCo.formik,
|
|
1170
|
-
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
1171
|
-
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
1172
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
1173
|
-
resourceType = _useExportResourcesCo.resourceType,
|
|
1174
|
-
setExportOperationStarted = _useExportResourcesCo.setExportOperationStarted;
|
|
1175
|
-
const intl = reactIntl.useIntl();
|
|
1176
|
-
const asyncDispatch = sdk.useAsyncDispatch();
|
|
1177
|
-
const resourceTypePlural = resourceTypeToPlural({
|
|
1178
|
-
resourceType: props.resourceType
|
|
1179
|
-
});
|
|
1180
|
-
const countInConfirmationMessage = () => {
|
|
1181
|
-
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
1182
|
-
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
1183
|
-
return allResourcesCount;
|
|
1184
|
-
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
1185
|
-
return matchingResourcesCount;
|
|
1186
|
-
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
1187
|
-
return selectedResourceIds.length;
|
|
1188
|
-
default:
|
|
1189
|
-
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
1190
|
-
}
|
|
1191
|
-
};
|
|
1192
|
-
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
1193
|
-
dataAttributesPrimaryButton: {
|
|
1194
|
-
'data-testid': 'confirm-export-button'
|
|
1195
|
-
},
|
|
1196
|
-
title: intl.formatMessage(messages.confirmationTitle, {
|
|
1197
|
-
resourceType: resourceTypePlural
|
|
1198
|
-
}),
|
|
1199
|
-
labelPrimary: intl.formatMessage(messages.exportConfirmationLabel, {
|
|
1200
|
-
resourceType: resourceTypePlural
|
|
1201
|
-
}),
|
|
1202
|
-
isOpen: props.isOpen,
|
|
1203
|
-
onClose: props.closeModal,
|
|
1204
|
-
onCancel: props.closeModal,
|
|
1205
|
-
onConfirm: async () => {
|
|
1206
|
-
setExportOperationStarted(false);
|
|
1207
|
-
const graphQuery = buildGraphQuery({
|
|
1208
|
-
resourceType: resourceType,
|
|
1209
|
-
selectedResourceIds: selectedResourceIds,
|
|
1210
|
-
fields: _valuesInstanceProperty__default["default"](formik).fields,
|
|
1211
|
-
exportSelectionType: _valuesInstanceProperty__default["default"](formik).exportSelectionType,
|
|
1212
|
-
languages: _valuesInstanceProperty__default["default"](formik).languages
|
|
1213
|
-
});
|
|
1214
|
-
props.closeModal();
|
|
1215
|
-
try {
|
|
1216
|
-
const response = await createExportOperation({
|
|
1217
|
-
projectKey,
|
|
1218
|
-
graphQuery,
|
|
1219
|
-
asyncDispatchFn: asyncDispatch
|
|
1220
|
-
});
|
|
1221
|
-
switch (response.state) {
|
|
1222
|
-
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
1223
|
-
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
1224
|
-
setExportOperationStarted(true);
|
|
1225
|
-
break;
|
|
1226
|
-
default:
|
|
1227
|
-
throw new UnexpectedExportOperationStateError(response.state);
|
|
1228
|
-
}
|
|
1229
|
-
} catch (errors) {
|
|
1230
|
-
actionsGlobal.showApiErrorNotification({
|
|
1231
|
-
errors
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
},
|
|
1235
|
-
children: jsxRuntime.jsxs("div", {
|
|
1236
|
-
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1237
|
-
intlMessage: _objectSpread$2(_objectSpread$2({}, messages.confirmationBodyPlan), {}, {
|
|
1238
|
-
values: {
|
|
1239
|
-
resourceType: resourceTypePlural,
|
|
1240
|
-
projectName: projectName,
|
|
1241
|
-
count: countInConfirmationMessage(),
|
|
1242
|
-
bold: getBold
|
|
1243
|
-
}
|
|
1244
|
-
})
|
|
1245
|
-
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1246
|
-
intlMessage: messages.confirmationBodyQuestion
|
|
1247
|
-
})]
|
|
1248
|
-
})
|
|
1249
|
-
});
|
|
1250
|
-
}
|
|
1251
|
-
ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1252
|
-
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
1253
|
-
resourceType: PropTypes__default["default"].string.isRequired,
|
|
1254
|
-
closeModal: PropTypes__default["default"].func.isRequired
|
|
1255
|
-
} : {};
|
|
1256
|
-
|
|
1257
|
-
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1258
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1259
1212
|
const getExportLogsLink = (projectKey, msg) => jsxRuntime.jsx(uiKit.Link, {
|
|
1260
1213
|
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
1261
1214
|
children: msg
|
|
@@ -1277,7 +1230,7 @@ function ExportOperationSuccessMessage(_ref) {
|
|
|
1277
1230
|
max: 16,
|
|
1278
1231
|
children: jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
1279
1232
|
type: "success",
|
|
1280
|
-
intlMessage: _objectSpread$
|
|
1233
|
+
intlMessage: _objectSpread$2(_objectSpread$2({}, messages.exportOperationSuccessMessage), {}, {
|
|
1281
1234
|
values: {
|
|
1282
1235
|
logsLink: msg => getExportLogsLink(projectKey, msg)
|
|
1283
1236
|
}
|
|
@@ -1290,6 +1243,80 @@ ExportOperationSuccessMessage.propTypes = process.env.NODE_ENV !== "production"
|
|
|
1290
1243
|
isShown: PropTypes__default["default"].bool.isRequired
|
|
1291
1244
|
} : {};
|
|
1292
1245
|
|
|
1246
|
+
const ExportResourcesContext = /*#__PURE__*/React.createContext();
|
|
1247
|
+
|
|
1248
|
+
const ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
1249
|
+
resourceType: PropTypes__default["default"].string.isRequired,
|
|
1250
|
+
outputFormat: PropTypes__default["default"].string,
|
|
1251
|
+
isOpen: PropTypes__default["default"].bool.isRequired,
|
|
1252
|
+
closeModal: PropTypes__default["default"].func.isRequired,
|
|
1253
|
+
allResourcesCount: PropTypes__default["default"].number.isRequired,
|
|
1254
|
+
matchingResourcesCount: PropTypes__default["default"].number,
|
|
1255
|
+
selectedResourceIds: PropTypes__default["default"].array,
|
|
1256
|
+
// TODO: Circular reference
|
|
1257
|
+
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
1258
|
+
key: PropTypes__default["default"].string.isRequired,
|
|
1259
|
+
label: PropTypes__default["default"].string,
|
|
1260
|
+
isLocalized: PropTypes__default["default"].bool,
|
|
1261
|
+
fields: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
1262
|
+
key: PropTypes__default["default"].string.isRequired,
|
|
1263
|
+
label: PropTypes__default["default"].string,
|
|
1264
|
+
isLocalized: PropTypes__default["default"].bool
|
|
1265
|
+
}))
|
|
1266
|
+
})).isRequired,
|
|
1267
|
+
exportSelectionType: PropTypes__default["default"].string,
|
|
1268
|
+
appliedSearchTerms: PropTypes__default["default"].array,
|
|
1269
|
+
appliedFilters: PropTypes__default["default"].array,
|
|
1270
|
+
renderProperties: PropTypes__default["default"].func
|
|
1271
|
+
}).isRequired;
|
|
1272
|
+
|
|
1273
|
+
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1274
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1275
|
+
const ExportResourcesContextProvider = props => {
|
|
1276
|
+
var _context;
|
|
1277
|
+
const todayFormatted = moment__default["default"]().format('DD-MM-YY_HH-mm');
|
|
1278
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
1279
|
+
language: applicationContext.dataLocale
|
|
1280
|
+
})),
|
|
1281
|
+
language = _useApplicationContex.language;
|
|
1282
|
+
const formik$1 = formik.useFormik({
|
|
1283
|
+
initialValues: {
|
|
1284
|
+
outputFormat: props.outputFormat,
|
|
1285
|
+
fileName: _concatInstanceProperty__default["default"](_context = "".concat(resourceTypeToPlural({
|
|
1286
|
+
resourceType: props.resourceType,
|
|
1287
|
+
isUpperCase: true
|
|
1288
|
+
}), "_Export_")).call(_context, todayFormatted),
|
|
1289
|
+
languages: [language],
|
|
1290
|
+
fields: props.fields,
|
|
1291
|
+
appliedSearchTerms: props.appliedSearchTerms,
|
|
1292
|
+
appliedFilters: props.appliedFilters,
|
|
1293
|
+
exportSelectionType: props.exportSelectionType,
|
|
1294
|
+
isAllLanguagesChecked: false
|
|
1295
|
+
},
|
|
1296
|
+
validate
|
|
1297
|
+
});
|
|
1298
|
+
const _React$useState = React__default["default"].useState(false),
|
|
1299
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1300
|
+
exportOperationStarted = _React$useState2[0],
|
|
1301
|
+
setExportOperationStarted = _React$useState2[1];
|
|
1302
|
+
return jsxRuntime.jsx(ExportResourcesContext.Provider, {
|
|
1303
|
+
value: {
|
|
1304
|
+
formik: formik$1,
|
|
1305
|
+
resourceType: props.resourceType,
|
|
1306
|
+
allResourcesCount: props.allResourcesCount,
|
|
1307
|
+
matchingResourcesCount: props.matchingResourcesCount,
|
|
1308
|
+
selectedResourceIds: props.selectedResourceIds,
|
|
1309
|
+
exportOperationStarted,
|
|
1310
|
+
setExportOperationStarted
|
|
1311
|
+
},
|
|
1312
|
+
children: props.children
|
|
1313
|
+
});
|
|
1314
|
+
};
|
|
1315
|
+
ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
1316
|
+
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$1(_objectSpread$1({}, ExportResourcesModalShape), {}, {
|
|
1317
|
+
children: PropTypes__default["default"].node
|
|
1318
|
+
}) : {};
|
|
1319
|
+
|
|
1293
1320
|
const _excluded = ["renderProperties"];
|
|
1294
1321
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1295
1322
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|