@commercetools-frontend-extensions/export-resources-modal 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.dev.js +241 -430
- package/dist/commercetools-frontend-extensions-export-resources-modal.cjs.prod.js +241 -428
- package/dist/commercetools-frontend-extensions-export-resources-modal.esm.js +242 -430
- package/package.json +44 -39
|
@@ -35,135 +35,101 @@ import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
35
35
|
import { customProperties, useTheme } from '@commercetools-uikit/design-system';
|
|
36
36
|
import { css } from '@emotion/react';
|
|
37
37
|
import _styled from '@emotion/styled/base';
|
|
38
|
-
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
|
|
39
|
-
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
40
38
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
41
39
|
import { showApiErrorNotification } from '@commercetools-frontend/actions-global';
|
|
42
40
|
import { MC_API_PROXY_TARGETS } from '@commercetools-frontend/constants';
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
const EXPORTABLE_RESOURCES = {
|
|
45
43
|
CATEGORY: 'category',
|
|
46
44
|
PRODUCT: 'product',
|
|
47
45
|
DISCOUNT_CODE: 'discountCode'
|
|
48
46
|
};
|
|
49
|
-
|
|
47
|
+
const EXPORT_SELECTION_TYPES = {
|
|
50
48
|
ALL_RESOURCES: 'allResources',
|
|
51
49
|
ONLY_MATCHING: 'onlyMatching',
|
|
52
50
|
ONLY_SELECTED: 'onlySelected'
|
|
53
51
|
};
|
|
54
|
-
|
|
52
|
+
const OUTPUT_FORMATS = {
|
|
55
53
|
JSON: 'json',
|
|
56
54
|
CSV: 'csv'
|
|
57
55
|
};
|
|
58
|
-
|
|
56
|
+
const EXPORT_OPERATION_STATES = {
|
|
59
57
|
PROCESSING: 'processing',
|
|
60
58
|
COMPLETED: 'completed',
|
|
61
59
|
FAILED: 'failed'
|
|
62
60
|
};
|
|
63
61
|
|
|
64
62
|
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(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
65
|
-
|
|
66
63
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
67
|
-
|
|
68
|
-
var UnexpectedSelectionTypeError = /*#__PURE__*/function (_Error) {
|
|
64
|
+
let UnexpectedSelectionTypeError = /*#__PURE__*/function (_Error) {
|
|
69
65
|
_inherits(UnexpectedSelectionTypeError, _Error);
|
|
70
|
-
|
|
71
66
|
var _super = _createSuper$3(UnexpectedSelectionTypeError);
|
|
72
|
-
|
|
73
67
|
function UnexpectedSelectionTypeError(exportSelectionType) {
|
|
74
68
|
var _this;
|
|
75
|
-
|
|
76
69
|
_classCallCheck(this, UnexpectedSelectionTypeError);
|
|
77
|
-
|
|
78
70
|
_this = _super.call(this, "Unexpected column: ".concat(exportSelectionType));
|
|
79
71
|
_this.name = 'UnexpectedSelectionTypeError';
|
|
80
72
|
return _this;
|
|
81
73
|
}
|
|
82
|
-
|
|
83
74
|
return _createClass(UnexpectedSelectionTypeError);
|
|
84
75
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
85
76
|
|
|
86
77
|
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
87
|
-
|
|
88
78
|
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
89
|
-
|
|
90
|
-
var MissingExportResourceProviderError = /*#__PURE__*/function (_Error) {
|
|
79
|
+
let MissingExportResourceProviderError = /*#__PURE__*/function (_Error) {
|
|
91
80
|
_inherits(MissingExportResourceProviderError, _Error);
|
|
92
|
-
|
|
93
81
|
var _super = _createSuper$2(MissingExportResourceProviderError);
|
|
94
|
-
|
|
95
82
|
function MissingExportResourceProviderError() {
|
|
96
83
|
var _this;
|
|
97
|
-
|
|
98
84
|
_classCallCheck(this, MissingExportResourceProviderError);
|
|
99
|
-
|
|
100
85
|
_this = _super.call(this, 'useExportResourcesContext must be used within ExportResourcesContextProvider');
|
|
101
86
|
_this.name = 'MissingExportResourceProviderError';
|
|
102
87
|
return _this;
|
|
103
88
|
}
|
|
104
|
-
|
|
105
89
|
return _createClass(MissingExportResourceProviderError);
|
|
106
90
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
107
91
|
|
|
108
92
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
109
|
-
|
|
110
93
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
111
|
-
|
|
112
|
-
var UnexpectedExportOperationStateError = /*#__PURE__*/function (_Error) {
|
|
94
|
+
let UnexpectedExportOperationStateError = /*#__PURE__*/function (_Error) {
|
|
113
95
|
_inherits(UnexpectedExportOperationStateError, _Error);
|
|
114
|
-
|
|
115
96
|
var _super = _createSuper$1(UnexpectedExportOperationStateError);
|
|
116
|
-
|
|
117
97
|
function UnexpectedExportOperationStateError(state) {
|
|
118
98
|
var _this;
|
|
119
|
-
|
|
120
99
|
_classCallCheck(this, UnexpectedExportOperationStateError);
|
|
121
|
-
|
|
122
100
|
_this = _super.call(this, "Unexpected export operation state \"".concat(state, "\""));
|
|
123
101
|
_this.name = 'UnexpectedExportOperationStateError';
|
|
124
102
|
return _this;
|
|
125
103
|
}
|
|
126
|
-
|
|
127
104
|
return _createClass(UnexpectedExportOperationStateError);
|
|
128
105
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
129
106
|
|
|
130
107
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
131
|
-
|
|
132
108
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
133
|
-
|
|
134
|
-
var UnexpectedResourceTypeError = /*#__PURE__*/function (_Error) {
|
|
109
|
+
let UnexpectedResourceTypeError = /*#__PURE__*/function (_Error) {
|
|
135
110
|
_inherits(UnexpectedResourceTypeError, _Error);
|
|
136
|
-
|
|
137
111
|
var _super = _createSuper(UnexpectedResourceTypeError);
|
|
138
|
-
|
|
139
112
|
function UnexpectedResourceTypeError(resourceType) {
|
|
140
113
|
var _this;
|
|
141
|
-
|
|
142
114
|
_classCallCheck(this, UnexpectedResourceTypeError);
|
|
143
|
-
|
|
144
115
|
_this = _super.call(this, "Unexpected resource type: ".concat(resourceType));
|
|
145
116
|
_this.name = 'UnexpectedResourceTypeError';
|
|
146
117
|
return _this;
|
|
147
118
|
}
|
|
148
|
-
|
|
149
119
|
return _createClass(UnexpectedResourceTypeError);
|
|
150
120
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
151
121
|
|
|
152
122
|
function resourceTypeToPlural(_ref) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
123
|
+
let resourceType = _ref.resourceType,
|
|
124
|
+
_ref$isUpperCase = _ref.isUpperCase,
|
|
125
|
+
isUpperCase = _ref$isUpperCase === void 0 ? false : _ref$isUpperCase;
|
|
157
126
|
switch (resourceType) {
|
|
158
127
|
case EXPORTABLE_RESOURCES.CATEGORY:
|
|
159
128
|
return isUpperCase ? 'Categories' : 'categories';
|
|
160
|
-
|
|
161
129
|
case EXPORTABLE_RESOURCES.PRODUCT:
|
|
162
130
|
return isUpperCase ? 'Products' : 'products';
|
|
163
|
-
|
|
164
131
|
case EXPORTABLE_RESOURCES.DISCOUNT_CODE:
|
|
165
132
|
return isUpperCase ? 'Discount codes' : 'discount codes';
|
|
166
|
-
|
|
167
133
|
default:
|
|
168
134
|
throw UnexpectedResourceTypeError(resourceType);
|
|
169
135
|
}
|
|
@@ -172,13 +138,10 @@ function resourceTypeToOperationName(resourceType) {
|
|
|
172
138
|
switch (resourceType) {
|
|
173
139
|
case EXPORTABLE_RESOURCES.CATEGORY:
|
|
174
140
|
return 'categories';
|
|
175
|
-
|
|
176
141
|
case EXPORTABLE_RESOURCES.PRODUCT:
|
|
177
142
|
return 'products';
|
|
178
|
-
|
|
179
143
|
case EXPORTABLE_RESOURCES.DISCOUNT_CODE:
|
|
180
144
|
return 'discountCodes';
|
|
181
|
-
|
|
182
145
|
default:
|
|
183
146
|
throw UnexpectedResourceTypeError(resourceType);
|
|
184
147
|
}
|
|
@@ -192,13 +155,11 @@ function isFilledArray(maybeArray) {
|
|
|
192
155
|
|
|
193
156
|
function buildGraphQuery(exportSettings) {
|
|
194
157
|
var _context;
|
|
195
|
-
|
|
196
|
-
var operation = resourceTypeToOperationName(exportSettings.resourceType);
|
|
197
|
-
|
|
158
|
+
const operation = resourceTypeToOperationName(exportSettings.resourceType);
|
|
198
159
|
switch (exportSettings.exportSelectionType) {
|
|
199
160
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
200
161
|
return query({
|
|
201
|
-
operation
|
|
162
|
+
operation,
|
|
202
163
|
fields: [{
|
|
203
164
|
results: buildFields({
|
|
204
165
|
fields: exportSettings.fields,
|
|
@@ -207,10 +168,9 @@ function buildGraphQuery(exportSettings) {
|
|
|
207
168
|
}],
|
|
208
169
|
variables: {}
|
|
209
170
|
});
|
|
210
|
-
|
|
211
171
|
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
212
172
|
return query({
|
|
213
|
-
operation
|
|
173
|
+
operation,
|
|
214
174
|
fields: [{
|
|
215
175
|
results: buildFields({
|
|
216
176
|
fields: exportSettings.fields,
|
|
@@ -218,40 +178,34 @@ function buildGraphQuery(exportSettings) {
|
|
|
218
178
|
})
|
|
219
179
|
}],
|
|
220
180
|
variables: {
|
|
221
|
-
where: "id in (".concat(_mapInstanceProperty(_context = exportSettings.selectedResourceIds).call(_context,
|
|
222
|
-
return "\\\"".concat(id, "\\\"");
|
|
223
|
-
}).join(', '), ")")
|
|
181
|
+
where: "id in (".concat(_mapInstanceProperty(_context = exportSettings.selectedResourceIds).call(_context, id => "\\\"".concat(id, "\\\"")).join(', '), ")")
|
|
224
182
|
}
|
|
225
183
|
});
|
|
226
|
-
|
|
227
184
|
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
228
185
|
// TODO: gql query for exporting filtered resources.
|
|
229
186
|
throw new UnexpectedSelectionTypeError(exportSettings.exportSelectionType);
|
|
230
|
-
|
|
231
187
|
default:
|
|
232
188
|
throw new UnexpectedSelectionTypeError(exportSettings.exportSelectionType);
|
|
233
189
|
}
|
|
234
190
|
}
|
|
235
|
-
|
|
236
191
|
function buildFields(_ref) {
|
|
237
192
|
var _context2;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
if (field.isLocalized) return _mapInstanceProperty(languages).call(languages, function (language) {
|
|
193
|
+
let fields = _ref.fields,
|
|
194
|
+
languages = _ref.languages;
|
|
195
|
+
return _flatInstanceProperty(_context2 = _mapInstanceProperty(fields).call(fields, field => {
|
|
196
|
+
if (field.isLocalized) return _mapInstanceProperty(languages).call(languages, language => {
|
|
243
197
|
var _context3, _context4, _context5;
|
|
244
|
-
|
|
245
|
-
var alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty(_context3 = "".concat(field.key, "_")).call(_context3, language));
|
|
198
|
+
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty(_context3 = "".concat(field.key, "_")).call(_context3, language));
|
|
246
199
|
return _concatInstanceProperty(_context4 = _concatInstanceProperty(_context5 = "".concat(alias, ": ")).call(_context5, field.key, "(locale: \"")).call(_context4, language, "\")");
|
|
247
200
|
});else {
|
|
248
201
|
if (isFilledArray(field.fields)) {
|
|
249
|
-
return
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
202
|
+
return {
|
|
203
|
+
[field.key]: buildFields({
|
|
204
|
+
fields: field.fields,
|
|
205
|
+
languages
|
|
206
|
+
})
|
|
207
|
+
};
|
|
253
208
|
}
|
|
254
|
-
|
|
255
209
|
return field.key;
|
|
256
210
|
}
|
|
257
211
|
})).call(_context2);
|
|
@@ -410,7 +364,7 @@ var messages = defineMessages({
|
|
|
410
364
|
}
|
|
411
365
|
});
|
|
412
366
|
|
|
413
|
-
|
|
367
|
+
const ExportResourcesContext = /*#__PURE__*/createContext();
|
|
414
368
|
|
|
415
369
|
var ExportResourcesModalShape = PropTypes.shape({
|
|
416
370
|
resourceType: PropTypes.string.isRequired,
|
|
@@ -438,41 +392,31 @@ var ExportResourcesModalShape = PropTypes.shape({
|
|
|
438
392
|
}).isRequired;
|
|
439
393
|
|
|
440
394
|
function validate(values) {
|
|
441
|
-
|
|
395
|
+
const errors = {
|
|
442
396
|
fileName: {},
|
|
443
397
|
languages: {}
|
|
444
398
|
};
|
|
445
|
-
|
|
446
399
|
if (TextInput.isEmpty(values.fileName)) {
|
|
447
400
|
errors.fileName.missing = true;
|
|
448
401
|
} else if (!/^[a-zA-Z0-9-_]+$/.test(values.fileName)) {
|
|
449
402
|
errors.fileName.invalidInput = true;
|
|
450
403
|
}
|
|
451
|
-
|
|
452
404
|
if (values.languages.length < 1) {
|
|
453
405
|
errors.languages.missing = true;
|
|
454
406
|
}
|
|
455
|
-
|
|
456
407
|
return omitEmpty(errors);
|
|
457
408
|
}
|
|
458
409
|
|
|
459
410
|
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
460
|
-
|
|
461
411
|
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(_context2 = ownKeys$b(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$b(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
462
|
-
|
|
463
|
-
var ExportResourcesContextProvider = function ExportResourcesContextProvider(props) {
|
|
412
|
+
const ExportResourcesContextProvider = props => {
|
|
464
413
|
var _context;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
var _useApplicationContex = useApplicationContext(function (applicationContext) {
|
|
469
|
-
return {
|
|
414
|
+
const todayFormatted = moment().format('DD-MM-YY_HH-mm');
|
|
415
|
+
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
470
416
|
language: applicationContext.dataLocale
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
var formik = useFormik({
|
|
417
|
+
})),
|
|
418
|
+
language = _useApplicationContex.language;
|
|
419
|
+
const formik = useFormik({
|
|
476
420
|
initialValues: {
|
|
477
421
|
outputFormat: props.outputFormat,
|
|
478
422
|
fileName: _concatInstanceProperty(_context = "".concat(resourceTypeToPlural({
|
|
@@ -486,54 +430,47 @@ var ExportResourcesContextProvider = function ExportResourcesContextProvider(pro
|
|
|
486
430
|
exportSelectionType: props.exportSelectionType,
|
|
487
431
|
isAllLanguagesChecked: false
|
|
488
432
|
},
|
|
489
|
-
validate
|
|
433
|
+
validate
|
|
490
434
|
});
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
setExportOperationStarted = _useState2[1];
|
|
496
|
-
|
|
435
|
+
const _useState = useState(false),
|
|
436
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
437
|
+
exportOperationStarted = _useState2[0],
|
|
438
|
+
setExportOperationStarted = _useState2[1];
|
|
497
439
|
return jsx(ExportResourcesContext.Provider, {
|
|
498
440
|
value: {
|
|
499
|
-
formik
|
|
441
|
+
formik,
|
|
500
442
|
resourceType: props.resourceType,
|
|
501
443
|
allResourcesCount: props.allResourcesCount,
|
|
502
444
|
matchingResourcesCount: props.matchingResourcesCount,
|
|
503
445
|
selectedResourceIds: props.selectedResourceIds,
|
|
504
|
-
exportOperationStarted
|
|
505
|
-
setExportOperationStarted
|
|
446
|
+
exportOperationStarted,
|
|
447
|
+
setExportOperationStarted
|
|
506
448
|
},
|
|
507
449
|
children: props.children
|
|
508
450
|
});
|
|
509
451
|
};
|
|
510
|
-
|
|
511
452
|
ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
512
453
|
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$b(_objectSpread$b({}, ExportResourcesModalShape), {}, {
|
|
513
454
|
children: PropTypes.node
|
|
514
455
|
}) : {};
|
|
515
456
|
|
|
516
457
|
function useExportResourcesContext() {
|
|
517
|
-
|
|
518
|
-
|
|
458
|
+
const context = useContext(ExportResourcesContext);
|
|
519
459
|
if (!context) {
|
|
520
460
|
throw new MissingExportResourceProviderError();
|
|
521
461
|
}
|
|
522
|
-
|
|
523
462
|
return context;
|
|
524
463
|
}
|
|
525
464
|
|
|
526
465
|
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)."; }
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
var isNewTheme = _ref.isNewTheme;
|
|
466
|
+
const smallTopPadding = /*#__PURE__*/css("padding-top:", customProperties.spacingXs, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:smallTopPadding;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJMkIiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXV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9wZXJ0aWVzLnNwYWNpbmdMfTtcbmBcblxuY29uc3Qgc3R5bGVzID0ge1xuICB0YWdMaXN0SXRlbSxcbiAgdGFnTGlzdENvbnRhaW5lcixcbiAgc21hbGxUb3BQYWRkaW5nLFxuICBkaXZpZGVyLFxuICBub3RCb2xkLFxuICBzdWNjZXNzTWVzc2FnZSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgc3R5bGVzXG4iXX0= */");
|
|
467
|
+
const tagListContainer = _ref => {
|
|
468
|
+
let isNewTheme = _ref.isNewTheme;
|
|
531
469
|
return /*#__PURE__*/css("width:100%;display:flex;flex-wrap:wrap;display:inline-flex;padding:0 ", isNewTheme ? 0 : customProperties.spacingL, ";&>div{margin:0 ", customProperties.spacingS, " ", customProperties.spacingS, " 0;}" + (process.env.NODE_ENV === "production" ? "" : ";label:tagListContainer;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0QiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmb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|
534
|
-
|
|
535
|
-
|
|
536
|
-
var notBold = process.env.NODE_ENV === "production" ? {
|
|
471
|
+
const tagListItem = /*#__PURE__*/css("margin:0 ", customProperties.spacingXs, " ", 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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQnVCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */");
|
|
472
|
+
const divider = /*#__PURE__*/css("box-sizing:border-box;width:100%;margin:0;border:0;border-top:1px solid ", customProperties.colorNeutral60, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:divider;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5Qm1CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IE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sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */");
|
|
473
|
+
const notBold = process.env.NODE_ENV === "production" ? {
|
|
537
474
|
name: "lugakg",
|
|
538
475
|
styles: "font-weight:normal"
|
|
539
476
|
} : {
|
|
@@ -542,33 +479,29 @@ var notBold = process.env.NODE_ENV === "production" ? {
|
|
|
542
479
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ21CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0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0eWxlc1xuIl19 */",
|
|
543
480
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
544
481
|
};
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
tagListItem
|
|
548
|
-
tagListContainer
|
|
549
|
-
smallTopPadding
|
|
550
|
-
divider
|
|
551
|
-
notBold
|
|
552
|
-
successMessage
|
|
482
|
+
const successMessage = /*#__PURE__*/css("margin-bottom:", customProperties.spacingL, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:successMessage;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQzBCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */");
|
|
483
|
+
const styles = {
|
|
484
|
+
tagListItem,
|
|
485
|
+
tagListContainer,
|
|
486
|
+
smallTopPadding,
|
|
487
|
+
divider,
|
|
488
|
+
notBold,
|
|
489
|
+
successMessage
|
|
553
490
|
};
|
|
554
491
|
|
|
555
492
|
function ownKeys$a(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
556
|
-
|
|
557
493
|
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(_context = ownKeys$a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$a(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
558
494
|
function ExportSelectionRadioButtons() {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds;
|
|
570
|
-
|
|
571
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
495
|
+
const _useTheme = useTheme(),
|
|
496
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
497
|
+
const intl = useIntl();
|
|
498
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
499
|
+
formik = _useExportResourcesCo.formik,
|
|
500
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
501
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
502
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
503
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds;
|
|
504
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
572
505
|
resourceType: resourceType
|
|
573
506
|
});
|
|
574
507
|
return jsx(Spacings.Inline, {
|
|
@@ -632,20 +565,17 @@ function getBold(msg) {
|
|
|
632
565
|
}
|
|
633
566
|
|
|
634
567
|
function ownKeys$9(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
635
|
-
|
|
636
568
|
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(_context = ownKeys$9(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$9(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
637
569
|
function ExportTextMessage() {
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
570
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
571
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
572
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
573
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
574
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
575
|
+
formik = _useExportResourcesCo.formik;
|
|
576
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
646
577
|
resourceType: resourceType
|
|
647
578
|
});
|
|
648
|
-
|
|
649
579
|
switch (_valuesInstanceProperty(formik).exportSelectionType) {
|
|
650
580
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
651
581
|
return jsx(Text.Body, {
|
|
@@ -657,7 +587,6 @@ function ExportTextMessage() {
|
|
|
657
587
|
}
|
|
658
588
|
})
|
|
659
589
|
});
|
|
660
|
-
|
|
661
590
|
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
662
591
|
return jsx(Text.Body, {
|
|
663
592
|
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportMatchingMessage), {}, {
|
|
@@ -668,7 +597,6 @@ function ExportTextMessage() {
|
|
|
668
597
|
}
|
|
669
598
|
})
|
|
670
599
|
});
|
|
671
|
-
|
|
672
600
|
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
673
601
|
return jsx(Text.Body, {
|
|
674
602
|
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportSelectedMessage), {}, {
|
|
@@ -679,27 +607,23 @@ function ExportTextMessage() {
|
|
|
679
607
|
}
|
|
680
608
|
})
|
|
681
609
|
});
|
|
682
|
-
|
|
683
610
|
default:
|
|
684
611
|
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty(formik).exportSelectionType);
|
|
685
612
|
}
|
|
686
613
|
}
|
|
687
614
|
|
|
688
615
|
function TagList(props) {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
616
|
+
const _useTheme = useTheme(),
|
|
617
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
692
618
|
return jsx("div", {
|
|
693
619
|
css: styles.tagListContainer({
|
|
694
|
-
isNewTheme
|
|
620
|
+
isNewTheme
|
|
695
621
|
}),
|
|
696
622
|
"data-testid": props['data-testid'],
|
|
697
|
-
children: _mapInstanceProperty(Children).call(Children, props.children,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
});
|
|
702
|
-
})
|
|
623
|
+
children: _mapInstanceProperty(Children).call(Children, props.children, tag => jsx("div", {
|
|
624
|
+
css: styles.tagListItem,
|
|
625
|
+
children: tag
|
|
626
|
+
}))
|
|
703
627
|
});
|
|
704
628
|
}
|
|
705
629
|
TagList.displayName = 'TagList';
|
|
@@ -709,15 +633,12 @@ TagList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
709
633
|
} : {};
|
|
710
634
|
|
|
711
635
|
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
712
|
-
|
|
713
636
|
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(_context = ownKeys$8(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
714
637
|
function AppliedFilters(_ref) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
720
|
-
|
|
638
|
+
let filters = _ref.filters,
|
|
639
|
+
onFilterRemove = _ref.onFilterRemove;
|
|
640
|
+
const _useTheme = useTheme(),
|
|
641
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
721
642
|
if (isNewTheme) return jsx(CollapsiblePanel, {
|
|
722
643
|
condensed: true,
|
|
723
644
|
isDefaultClosed: !Boolean(filters.length),
|
|
@@ -729,17 +650,15 @@ function AppliedFilters(_ref) {
|
|
|
729
650
|
})
|
|
730
651
|
}),
|
|
731
652
|
children: jsx(TagList, {
|
|
732
|
-
children: _mapInstanceProperty(filters).call(filters,
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
}, filter);
|
|
742
|
-
})
|
|
653
|
+
children: _mapInstanceProperty(filters).call(filters, filter => jsx("div", {
|
|
654
|
+
"data-testid": "test-filter-".concat(filter),
|
|
655
|
+
children: jsx(Tag, {
|
|
656
|
+
onRemove: () => {
|
|
657
|
+
onFilterRemove(filter);
|
|
658
|
+
},
|
|
659
|
+
children: filter
|
|
660
|
+
})
|
|
661
|
+
}, filter))
|
|
743
662
|
})
|
|
744
663
|
});
|
|
745
664
|
return jsxs(Spacings.Stack, {
|
|
@@ -760,17 +679,15 @@ function AppliedFilters(_ref) {
|
|
|
760
679
|
})
|
|
761
680
|
})]
|
|
762
681
|
}), jsx(TagList, {
|
|
763
|
-
children: _mapInstanceProperty(filters).call(filters,
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
}, filter);
|
|
773
|
-
})
|
|
682
|
+
children: _mapInstanceProperty(filters).call(filters, filter => jsx("div", {
|
|
683
|
+
"data-testid": "test-filter-".concat(filter),
|
|
684
|
+
children: jsx(Tag, {
|
|
685
|
+
onRemove: () => {
|
|
686
|
+
onFilterRemove(filter);
|
|
687
|
+
},
|
|
688
|
+
children: filter
|
|
689
|
+
})
|
|
690
|
+
}, filter))
|
|
774
691
|
})]
|
|
775
692
|
});
|
|
776
693
|
}
|
|
@@ -781,9 +698,8 @@ AppliedFilters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
781
698
|
|
|
782
699
|
// TODO: @redesign cleanup
|
|
783
700
|
function ExportBasedOnMyViewsSelectField() {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
701
|
+
const _useTheme = useTheme(),
|
|
702
|
+
themedValue = _useTheme.themedValue;
|
|
787
703
|
return jsxs(Spacings.Inline, {
|
|
788
704
|
scale: "m",
|
|
789
705
|
alignItems: "center",
|
|
@@ -802,22 +718,17 @@ function ExportBasedOnMyViewsSelectField() {
|
|
|
802
718
|
}
|
|
803
719
|
|
|
804
720
|
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
805
|
-
|
|
806
721
|
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(_context = ownKeys$7(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$7(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
807
|
-
|
|
808
|
-
var IconPlaceholder = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
722
|
+
const IconPlaceholder = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
809
723
|
target: "e1nl5t3e0"
|
|
810
724
|
} : {
|
|
811
725
|
target: "e1nl5t3e0",
|
|
812
726
|
label: "IconPlaceholder"
|
|
813
727
|
})("width:", customProperties$1.spacingM, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcGxpZWQtc2VhcmNoLXRlcm1zLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFha0MiLCJmaWxlIjoiYXBwbGllZC1zZWFyY2gtdGVybXMuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IHVzZVRoZW1lIH0gZnJvbSAnQGNvbW1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gICA8L1NwYWNpbmdzLklubGluZT5cbiAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICApXG59XG5BcHBsaWVkU2VhcmNoVGVybXMucHJvcFR5cGVzID0ge1xuICBhcHBsaWVkU2VhcmNoVGVybXM6IFByb3BUeXBlcy5hcnJheS5pc1JlcXVpcmVkLFxufVxuIl19 */"));
|
|
814
|
-
|
|
815
728
|
function AppliedSearchTerms(_ref) {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
820
|
-
|
|
729
|
+
let appliedSearchTerms = _ref.appliedSearchTerms;
|
|
730
|
+
const _useTheme = useTheme(),
|
|
731
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
821
732
|
if (isNewTheme) return jsx(CollapsiblePanel, {
|
|
822
733
|
condensed: true,
|
|
823
734
|
isDefaultClosed: !Boolean(appliedSearchTerms.length),
|
|
@@ -863,51 +774,39 @@ AppliedSearchTerms.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
863
774
|
} : {};
|
|
864
775
|
|
|
865
776
|
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
866
|
-
|
|
867
777
|
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys$6(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys$6(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
868
|
-
|
|
869
778
|
function normalizeFields(fields) {
|
|
870
|
-
|
|
779
|
+
const result = _mapInstanceProperty(fields).call(fields, field => {
|
|
871
780
|
if (isFilledArray(field.fields)) {
|
|
872
781
|
var _context;
|
|
873
|
-
|
|
874
|
-
return _mapInstanceProperty(_context = normalizeFields(field.fields)).call(_context, function (nestedField) {
|
|
782
|
+
return _mapInstanceProperty(_context = normalizeFields(field.fields)).call(_context, nestedField => {
|
|
875
783
|
var _context2;
|
|
876
|
-
|
|
877
784
|
return _objectSpread$6(_objectSpread$6({}, nestedField), {}, {
|
|
878
785
|
key: _concatInstanceProperty(_context2 = "".concat(field.key, ".")).call(_context2, nestedField.key)
|
|
879
786
|
});
|
|
880
787
|
});
|
|
881
788
|
}
|
|
882
|
-
|
|
883
789
|
return field;
|
|
884
790
|
});
|
|
885
|
-
|
|
886
791
|
return _flatInstanceProperty(result).call(result);
|
|
887
792
|
}
|
|
888
|
-
|
|
889
793
|
function FieldsRenderer(_ref) {
|
|
890
|
-
|
|
891
|
-
|
|
794
|
+
let fields = _ref.fields;
|
|
795
|
+
const allFields = normalizeFields(fields);
|
|
892
796
|
return jsx(TagList, {
|
|
893
|
-
children: _mapInstanceProperty(allFields).call(allFields,
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
children:
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}, field.key);
|
|
900
|
-
})
|
|
797
|
+
children: _mapInstanceProperty(allFields).call(allFields, field => jsx("div", {
|
|
798
|
+
"data-testid": "test-field-".concat(field.key),
|
|
799
|
+
children: jsx(Tag, {
|
|
800
|
+
children: field.label || field.key
|
|
801
|
+
})
|
|
802
|
+
}, field.key))
|
|
901
803
|
});
|
|
902
804
|
}
|
|
903
|
-
|
|
904
805
|
FieldsRenderer.propTypes = process.env.NODE_ENV !== "production" ? ExportFields.propTypes : {};
|
|
905
806
|
function ExportFields(_ref2) {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
910
|
-
|
|
807
|
+
let fields = _ref2.fields;
|
|
808
|
+
const _useTheme = useTheme(),
|
|
809
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
911
810
|
if (isNewTheme) return jsx(CollapsiblePanel, {
|
|
912
811
|
condensed: true,
|
|
913
812
|
isDefaultClosed: !Boolean(fields.length),
|
|
@@ -958,21 +857,15 @@ ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
958
857
|
})).isRequired
|
|
959
858
|
} : {};
|
|
960
859
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
var onAppliedFilterRemove = function onAppliedFilterRemove(filter) {
|
|
860
|
+
const ExportSelection = () => {
|
|
861
|
+
const _useTheme = useTheme(),
|
|
862
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
863
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
864
|
+
formik = _useExportResourcesCo.formik;
|
|
865
|
+
const onAppliedFilterRemove = filter => {
|
|
969
866
|
var _context;
|
|
970
|
-
|
|
971
|
-
formik.setFieldValue('appliedFilters', _filterInstanceProperty(_context = _valuesInstanceProperty(formik).appliedFilters).call(_context, function (appliedFilter) {
|
|
972
|
-
return appliedFilter !== filter;
|
|
973
|
-
}));
|
|
867
|
+
formik.setFieldValue('appliedFilters', _filterInstanceProperty(_context = _valuesInstanceProperty(formik).appliedFilters).call(_context, appliedFilter => appliedFilter !== filter));
|
|
974
868
|
};
|
|
975
|
-
|
|
976
869
|
if (isNewTheme) return jsxs(Spacings.Stack, {
|
|
977
870
|
scale: "xl",
|
|
978
871
|
children: [jsxs(Spacings.Stack, {
|
|
@@ -1027,12 +920,10 @@ var ExportSelection = function ExportSelection() {
|
|
|
1027
920
|
};
|
|
1028
921
|
|
|
1029
922
|
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1030
|
-
|
|
1031
923
|
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(_context = ownKeys$5(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$5(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
924
|
+
const ExportProperties = props => {
|
|
925
|
+
const _useTheme = useTheme(),
|
|
926
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
1036
927
|
if (typeof props.renderProperties !== 'function') return null;
|
|
1037
928
|
if (isNewTheme) return jsxs(Spacings.Stack, {
|
|
1038
929
|
scale: "m",
|
|
@@ -1056,16 +947,13 @@ ExportProperties.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1056
947
|
} : {};
|
|
1057
948
|
|
|
1058
949
|
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1059
|
-
|
|
1060
950
|
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(_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1061
951
|
function renderFileNameError(key) {
|
|
1062
952
|
switch (key) {
|
|
1063
953
|
case 'missing':
|
|
1064
954
|
return jsx(FormattedMessage, _objectSpread$4({}, messages.missingFileNameError));
|
|
1065
|
-
|
|
1066
955
|
case 'invalidInput':
|
|
1067
956
|
return jsx(FormattedMessage, _objectSpread$4({}, messages.invalidFileNameError));
|
|
1068
|
-
|
|
1069
957
|
default:
|
|
1070
958
|
return null;
|
|
1071
959
|
}
|
|
@@ -1074,52 +962,41 @@ function renderLanguageError(key) {
|
|
|
1074
962
|
switch (key) {
|
|
1075
963
|
case 'missing':
|
|
1076
964
|
return jsx(FormattedMessage, _objectSpread$4({}, messages.missingLanguageError));
|
|
1077
|
-
|
|
1078
965
|
default:
|
|
1079
966
|
return null;
|
|
1080
967
|
}
|
|
1081
968
|
}
|
|
1082
969
|
|
|
1083
970
|
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1084
|
-
|
|
1085
971
|
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(_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1086
|
-
|
|
972
|
+
const outputFormatOptions = [{
|
|
1087
973
|
value: OUTPUT_FORMATS.JSON,
|
|
1088
974
|
label: 'JSON'
|
|
1089
975
|
}, {
|
|
1090
976
|
value: OUTPUT_FORMATS.CSV,
|
|
1091
977
|
label: 'CSV'
|
|
1092
978
|
}];
|
|
1093
|
-
|
|
1094
979
|
function mapLanguagesToOptions(languages) {
|
|
1095
|
-
return _mapInstanceProperty(languages).call(languages,
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
};
|
|
1100
|
-
});
|
|
980
|
+
return _mapInstanceProperty(languages).call(languages, language => ({
|
|
981
|
+
value: language,
|
|
982
|
+
label: language
|
|
983
|
+
}));
|
|
1101
984
|
}
|
|
1102
|
-
|
|
1103
985
|
function ExportFileSettings(props) {
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
};
|
|
1119
|
-
}),
|
|
1120
|
-
languages = _useApplicationContex.languages,
|
|
1121
|
-
language = _useApplicationContex.language;
|
|
1122
|
-
|
|
986
|
+
const _useTheme = useTheme(),
|
|
987
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
988
|
+
const intl = useIntl();
|
|
989
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
990
|
+
formik = _useExportResourcesCo.formik;
|
|
991
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
992
|
+
var _applicationContext$p;
|
|
993
|
+
return {
|
|
994
|
+
language: applicationContext.dataLocale,
|
|
995
|
+
languages: ((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) || []
|
|
996
|
+
};
|
|
997
|
+
}),
|
|
998
|
+
languages = _useApplicationContex.languages,
|
|
999
|
+
language = _useApplicationContex.language;
|
|
1123
1000
|
if (isNewTheme) return jsxs(Spacings.Stack, {
|
|
1124
1001
|
scale: "xxxl",
|
|
1125
1002
|
children: [jsx(PageContentNarrow, {
|
|
@@ -1144,7 +1021,7 @@ function ExportFileSettings(props) {
|
|
|
1144
1021
|
options: mapLanguagesToOptions(languages),
|
|
1145
1022
|
isMulti: true
|
|
1146
1023
|
}, formik.getFieldProps('languages')), {}, {
|
|
1147
|
-
onChange:
|
|
1024
|
+
onChange: e => {
|
|
1148
1025
|
formik.handleChange(e);
|
|
1149
1026
|
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1150
1027
|
},
|
|
@@ -1154,7 +1031,7 @@ function ExportFileSettings(props) {
|
|
|
1154
1031
|
})), jsx(CheckboxInput, {
|
|
1155
1032
|
name: "isAllLanguagesChecked",
|
|
1156
1033
|
isChecked: _valuesInstanceProperty(formik).isAllLanguagesChecked,
|
|
1157
|
-
onChange:
|
|
1034
|
+
onChange: e => {
|
|
1158
1035
|
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1159
1036
|
formik.handleChange(e);
|
|
1160
1037
|
},
|
|
@@ -1200,7 +1077,7 @@ function ExportFileSettings(props) {
|
|
|
1200
1077
|
}), jsx(CheckboxInput, {
|
|
1201
1078
|
name: "isAllLanguagesChecked",
|
|
1202
1079
|
isChecked: _valuesInstanceProperty(formik).isAllLanguagesChecked,
|
|
1203
|
-
onChange:
|
|
1080
|
+
onChange: e => {
|
|
1204
1081
|
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1205
1082
|
formik.handleChange(e);
|
|
1206
1083
|
},
|
|
@@ -1213,7 +1090,7 @@ function ExportFileSettings(props) {
|
|
|
1213
1090
|
options: mapLanguagesToOptions(languages),
|
|
1214
1091
|
isMulti: true
|
|
1215
1092
|
}, formik.getFieldProps('languages')), {}, {
|
|
1216
|
-
onChange:
|
|
1093
|
+
onChange: e => {
|
|
1217
1094
|
formik.handleChange(e);
|
|
1218
1095
|
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1219
1096
|
},
|
|
@@ -1232,89 +1109,61 @@ ExportFileSettings.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1232
1109
|
renderProperties: PropTypes.func
|
|
1233
1110
|
} : {};
|
|
1234
1111
|
|
|
1235
|
-
function createExportOperation(
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
mcApiProxyTarget: MC_API_PROXY_TARGETS.EXPORT,
|
|
1251
|
-
uri: uri,
|
|
1252
|
-
headers: {
|
|
1253
|
-
accept: 'application/json'
|
|
1254
|
-
},
|
|
1255
|
-
payload: {
|
|
1256
|
-
query: graphQuery
|
|
1257
|
-
}
|
|
1258
|
-
}));
|
|
1259
|
-
|
|
1260
|
-
case 4:
|
|
1261
|
-
response = _context.sent;
|
|
1262
|
-
return _context.abrupt("return", response);
|
|
1263
|
-
|
|
1264
|
-
case 6:
|
|
1265
|
-
case "end":
|
|
1266
|
-
return _context.stop();
|
|
1267
|
-
}
|
|
1268
|
-
}, _callee);
|
|
1112
|
+
async function createExportOperation(_ref) {
|
|
1113
|
+
let projectKey = _ref.projectKey,
|
|
1114
|
+
graphQuery = _ref.graphQuery,
|
|
1115
|
+
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
1116
|
+
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
1117
|
+
const response = await asyncDispatchFn(actions.post({
|
|
1118
|
+
// FIXME: EXPORT is undefined
|
|
1119
|
+
mcApiProxyTarget: MC_API_PROXY_TARGETS.EXPORT,
|
|
1120
|
+
uri: uri,
|
|
1121
|
+
headers: {
|
|
1122
|
+
accept: 'application/json'
|
|
1123
|
+
},
|
|
1124
|
+
payload: {
|
|
1125
|
+
query: graphQuery
|
|
1126
|
+
}
|
|
1269
1127
|
}));
|
|
1270
|
-
return
|
|
1128
|
+
return response;
|
|
1271
1129
|
}
|
|
1272
1130
|
|
|
1273
1131
|
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1274
|
-
|
|
1275
|
-
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$2(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$2(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1132
|
+
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(_context = ownKeys$2(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$2(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1276
1133
|
function ExportConfirmationModal(props) {
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
var intl = useIntl();
|
|
1297
|
-
var asyncDispatch = useAsyncDispatch();
|
|
1298
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
1134
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
1135
|
+
var _applicationContext$p, _applicationContext$p2;
|
|
1136
|
+
return {
|
|
1137
|
+
projectName: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.name,
|
|
1138
|
+
projectKey: (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.key
|
|
1139
|
+
};
|
|
1140
|
+
}),
|
|
1141
|
+
projectName = _useApplicationContex.projectName,
|
|
1142
|
+
projectKey = _useApplicationContex.projectKey;
|
|
1143
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1144
|
+
formik = _useExportResourcesCo.formik,
|
|
1145
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
1146
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
1147
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
1148
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
1149
|
+
setExportOperationStarted = _useExportResourcesCo.setExportOperationStarted;
|
|
1150
|
+
const intl = useIntl();
|
|
1151
|
+
const asyncDispatch = useAsyncDispatch();
|
|
1152
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
1299
1153
|
resourceType: props.resourceType
|
|
1300
1154
|
});
|
|
1301
|
-
|
|
1302
|
-
var countInConfirmationMessage = function countInConfirmationMessage() {
|
|
1155
|
+
const countInConfirmationMessage = () => {
|
|
1303
1156
|
switch (_valuesInstanceProperty(formik).exportSelectionType) {
|
|
1304
1157
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
1305
1158
|
return allResourcesCount;
|
|
1306
|
-
|
|
1307
1159
|
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
1308
1160
|
return matchingResourcesCount;
|
|
1309
|
-
|
|
1310
1161
|
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
1311
1162
|
return selectedResourceIds.length;
|
|
1312
|
-
|
|
1313
1163
|
default:
|
|
1314
1164
|
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty(formik).exportSelectionType);
|
|
1315
1165
|
}
|
|
1316
1166
|
};
|
|
1317
|
-
|
|
1318
1167
|
return jsx(ConfirmationDialog, {
|
|
1319
1168
|
dataAttributesPrimaryButton: {
|
|
1320
1169
|
'data-testid': 'confirm-export-button'
|
|
@@ -1328,58 +1177,36 @@ function ExportConfirmationModal(props) {
|
|
|
1328
1177
|
isOpen: props.isOpen,
|
|
1329
1178
|
onClose: props.closeModal,
|
|
1330
1179
|
onCancel: props.closeModal,
|
|
1331
|
-
onConfirm:
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
asyncDispatchFn: asyncDispatch
|
|
1351
|
-
});
|
|
1352
|
-
|
|
1353
|
-
case 6:
|
|
1354
|
-
response = _context.sent;
|
|
1355
|
-
_context.t0 = response.state;
|
|
1356
|
-
_context.next = _context.t0 === EXPORT_OPERATION_STATES.PROCESSING ? 10 : _context.t0 === EXPORT_OPERATION_STATES.COMPLETED ? 10 : 12;
|
|
1357
|
-
break;
|
|
1358
|
-
|
|
1359
|
-
case 10:
|
|
1180
|
+
onConfirm: async () => {
|
|
1181
|
+
setExportOperationStarted(false);
|
|
1182
|
+
const graphQuery = buildGraphQuery({
|
|
1183
|
+
resourceType: resourceType,
|
|
1184
|
+
selectedResourceIds: selectedResourceIds,
|
|
1185
|
+
fields: _valuesInstanceProperty(formik).fields,
|
|
1186
|
+
exportSelectionType: _valuesInstanceProperty(formik).exportSelectionType,
|
|
1187
|
+
languages: _valuesInstanceProperty(formik).languages
|
|
1188
|
+
});
|
|
1189
|
+
props.closeModal();
|
|
1190
|
+
try {
|
|
1191
|
+
const response = await createExportOperation({
|
|
1192
|
+
projectKey,
|
|
1193
|
+
graphQuery,
|
|
1194
|
+
asyncDispatchFn: asyncDispatch
|
|
1195
|
+
});
|
|
1196
|
+
switch (response.state) {
|
|
1197
|
+
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
1198
|
+
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
1360
1199
|
setExportOperationStarted(true);
|
|
1361
|
-
return _context.abrupt("break", 13);
|
|
1362
|
-
|
|
1363
|
-
case 12:
|
|
1364
|
-
throw new UnexpectedExportOperationStateError(response.state);
|
|
1365
|
-
|
|
1366
|
-
case 13:
|
|
1367
|
-
_context.next = 18;
|
|
1368
1200
|
break;
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
_context.prev = 15;
|
|
1372
|
-
_context.t1 = _context["catch"](3);
|
|
1373
|
-
showApiErrorNotification({
|
|
1374
|
-
errors: _context.t1
|
|
1375
|
-
});
|
|
1376
|
-
|
|
1377
|
-
case 18:
|
|
1378
|
-
case "end":
|
|
1379
|
-
return _context.stop();
|
|
1201
|
+
default:
|
|
1202
|
+
throw new UnexpectedExportOperationStateError(response.state);
|
|
1380
1203
|
}
|
|
1381
|
-
}
|
|
1382
|
-
|
|
1204
|
+
} catch (errors) {
|
|
1205
|
+
showApiErrorNotification({
|
|
1206
|
+
errors
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
},
|
|
1383
1210
|
children: jsxs("div", {
|
|
1384
1211
|
children: [jsx(Text.Body, {
|
|
1385
1212
|
intlMessage: _objectSpread$2(_objectSpread$2({}, messages.confirmationBodyPlan), {}, {
|
|
@@ -1403,28 +1230,20 @@ ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1403
1230
|
} : {};
|
|
1404
1231
|
|
|
1405
1232
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1406
|
-
|
|
1407
1233
|
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(_context = ownKeys$1(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
children: msg
|
|
1413
|
-
});
|
|
1414
|
-
};
|
|
1415
|
-
|
|
1234
|
+
const getExportLogsLink = (projectKey, msg) => jsx(Link, {
|
|
1235
|
+
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
1236
|
+
children: msg
|
|
1237
|
+
});
|
|
1416
1238
|
function ExportOperationSuccessMessage(_ref) {
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
}),
|
|
1426
|
-
projectKey = _useApplicationContex.projectKey;
|
|
1427
|
-
|
|
1239
|
+
let isShown = _ref.isShown;
|
|
1240
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
1241
|
+
var _applicationContext$p;
|
|
1242
|
+
return {
|
|
1243
|
+
projectKey: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.key
|
|
1244
|
+
};
|
|
1245
|
+
}),
|
|
1246
|
+
projectKey = _useApplicationContex.projectKey;
|
|
1428
1247
|
if (!isShown) return null;
|
|
1429
1248
|
return jsx("div", {
|
|
1430
1249
|
css: styles.successMessage,
|
|
@@ -1435,9 +1254,7 @@ function ExportOperationSuccessMessage(_ref) {
|
|
|
1435
1254
|
type: "success",
|
|
1436
1255
|
intlMessage: _objectSpread$1(_objectSpread$1({}, messages.exportOperationSuccessMessage), {}, {
|
|
1437
1256
|
values: {
|
|
1438
|
-
logsLink:
|
|
1439
|
-
return getExportLogsLink(projectKey, msg);
|
|
1440
|
-
}
|
|
1257
|
+
logsLink: msg => getExportLogsLink(projectKey, msg)
|
|
1441
1258
|
}
|
|
1442
1259
|
})
|
|
1443
1260
|
})
|
|
@@ -1448,26 +1265,22 @@ ExportOperationSuccessMessage.propTypes = process.env.NODE_ENV !== "production"
|
|
|
1448
1265
|
isShown: PropTypes.bool.isRequired
|
|
1449
1266
|
} : {};
|
|
1450
1267
|
|
|
1451
|
-
|
|
1452
|
-
|
|
1268
|
+
const _excluded = ["renderProperties"];
|
|
1453
1269
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1454
|
-
|
|
1455
1270
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
var confirmationModal = useModalState();
|
|
1463
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
1271
|
+
const ExportResourcesModal = _ref => {
|
|
1272
|
+
let renderProperties = _ref.renderProperties,
|
|
1273
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
1274
|
+
const intl = useIntl();
|
|
1275
|
+
const confirmationModal = useModalState();
|
|
1276
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
1464
1277
|
resourceType: props.resourceType
|
|
1465
1278
|
});
|
|
1466
1279
|
return jsx(ExportResourcesContextProvider, _objectSpread(_objectSpread({}, props), {}, {
|
|
1467
1280
|
children: jsx(ExportResourcesContext.Consumer, {
|
|
1468
|
-
children:
|
|
1469
|
-
|
|
1470
|
-
|
|
1281
|
+
children: _ref2 => {
|
|
1282
|
+
let formik = _ref2.formik,
|
|
1283
|
+
exportOperationStarted = _ref2.exportOperationStarted;
|
|
1471
1284
|
return jsxs(FormModalPage, {
|
|
1472
1285
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1473
1286
|
resourceType: resourceTypePlural
|
|
@@ -1498,7 +1311,6 @@ var ExportResourcesModal = function ExportResourcesModal(_ref) {
|
|
|
1498
1311
|
})
|
|
1499
1312
|
}));
|
|
1500
1313
|
};
|
|
1501
|
-
|
|
1502
1314
|
ExportResourcesModal.displayName = 'ExportResourcesModal';
|
|
1503
1315
|
ExportResourcesModal.propTypes = process.env.NODE_ENV !== "production" ? ExportResourcesModalShape : {};
|
|
1504
1316
|
ExportResourcesModal.defaultProps = {
|