@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
|
@@ -39,8 +39,6 @@ var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
39
39
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
40
40
|
var react$1 = require('@emotion/react');
|
|
41
41
|
var _styled = require('@emotion/styled/base');
|
|
42
|
-
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
43
|
-
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
44
42
|
var sdk = require('@commercetools-frontend/sdk');
|
|
45
43
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
46
44
|
var constants = require('@commercetools-frontend/constants');
|
|
@@ -65,131 +63,98 @@ var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
|
65
63
|
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
66
64
|
var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
|
|
67
65
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
68
|
-
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
69
66
|
|
|
70
|
-
|
|
67
|
+
const EXPORTABLE_RESOURCES = {
|
|
71
68
|
CATEGORY: 'category',
|
|
72
69
|
PRODUCT: 'product',
|
|
73
70
|
DISCOUNT_CODE: 'discountCode'
|
|
74
71
|
};
|
|
75
|
-
|
|
72
|
+
const EXPORT_SELECTION_TYPES = {
|
|
76
73
|
ALL_RESOURCES: 'allResources',
|
|
77
74
|
ONLY_MATCHING: 'onlyMatching',
|
|
78
75
|
ONLY_SELECTED: 'onlySelected'
|
|
79
76
|
};
|
|
80
|
-
|
|
77
|
+
const OUTPUT_FORMATS = {
|
|
81
78
|
JSON: 'json',
|
|
82
79
|
CSV: 'csv'
|
|
83
80
|
};
|
|
84
|
-
|
|
81
|
+
const EXPORT_OPERATION_STATES = {
|
|
85
82
|
PROCESSING: 'processing',
|
|
86
83
|
COMPLETED: 'completed',
|
|
87
84
|
FAILED: 'failed'
|
|
88
85
|
};
|
|
89
86
|
|
|
90
87
|
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); }; }
|
|
91
|
-
|
|
92
88
|
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; } }
|
|
93
|
-
|
|
94
|
-
var UnexpectedSelectionTypeError = /*#__PURE__*/function (_Error) {
|
|
89
|
+
let UnexpectedSelectionTypeError = /*#__PURE__*/function (_Error) {
|
|
95
90
|
_inherits(UnexpectedSelectionTypeError, _Error);
|
|
96
|
-
|
|
97
91
|
var _super = _createSuper$3(UnexpectedSelectionTypeError);
|
|
98
|
-
|
|
99
92
|
function UnexpectedSelectionTypeError(exportSelectionType) {
|
|
100
93
|
var _this;
|
|
101
|
-
|
|
102
94
|
_classCallCheck(this, UnexpectedSelectionTypeError);
|
|
103
|
-
|
|
104
95
|
_this = _super.call(this, "Unexpected column: ".concat(exportSelectionType));
|
|
105
96
|
_this.name = 'UnexpectedSelectionTypeError';
|
|
106
97
|
return _this;
|
|
107
98
|
}
|
|
108
|
-
|
|
109
99
|
return _createClass(UnexpectedSelectionTypeError);
|
|
110
100
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
111
101
|
|
|
112
102
|
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__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
113
|
-
|
|
114
103
|
function _isNativeReflectConstruct$2() { 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; } }
|
|
115
|
-
|
|
116
|
-
var MissingExportResourceProviderError = /*#__PURE__*/function (_Error) {
|
|
104
|
+
let MissingExportResourceProviderError = /*#__PURE__*/function (_Error) {
|
|
117
105
|
_inherits(MissingExportResourceProviderError, _Error);
|
|
118
|
-
|
|
119
106
|
var _super = _createSuper$2(MissingExportResourceProviderError);
|
|
120
|
-
|
|
121
107
|
function MissingExportResourceProviderError() {
|
|
122
108
|
var _this;
|
|
123
|
-
|
|
124
109
|
_classCallCheck(this, MissingExportResourceProviderError);
|
|
125
|
-
|
|
126
110
|
_this = _super.call(this, 'useExportResourcesContext must be used within ExportResourcesContextProvider');
|
|
127
111
|
_this.name = 'MissingExportResourceProviderError';
|
|
128
112
|
return _this;
|
|
129
113
|
}
|
|
130
|
-
|
|
131
114
|
return _createClass(MissingExportResourceProviderError);
|
|
132
115
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
133
116
|
|
|
134
117
|
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__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
135
|
-
|
|
136
118
|
function _isNativeReflectConstruct$1() { 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; } }
|
|
137
|
-
|
|
138
|
-
var UnexpectedExportOperationStateError = /*#__PURE__*/function (_Error) {
|
|
119
|
+
let UnexpectedExportOperationStateError = /*#__PURE__*/function (_Error) {
|
|
139
120
|
_inherits(UnexpectedExportOperationStateError, _Error);
|
|
140
|
-
|
|
141
121
|
var _super = _createSuper$1(UnexpectedExportOperationStateError);
|
|
142
|
-
|
|
143
122
|
function UnexpectedExportOperationStateError(state) {
|
|
144
123
|
var _this;
|
|
145
|
-
|
|
146
124
|
_classCallCheck(this, UnexpectedExportOperationStateError);
|
|
147
|
-
|
|
148
125
|
_this = _super.call(this, "Unexpected export operation state \"".concat(state, "\""));
|
|
149
126
|
_this.name = 'UnexpectedExportOperationStateError';
|
|
150
127
|
return _this;
|
|
151
128
|
}
|
|
152
|
-
|
|
153
129
|
return _createClass(UnexpectedExportOperationStateError);
|
|
154
130
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
155
131
|
|
|
156
132
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); 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); }; }
|
|
157
|
-
|
|
158
133
|
function _isNativeReflectConstruct() { 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; } }
|
|
159
|
-
|
|
160
|
-
var UnexpectedResourceTypeError = /*#__PURE__*/function (_Error) {
|
|
134
|
+
let UnexpectedResourceTypeError = /*#__PURE__*/function (_Error) {
|
|
161
135
|
_inherits(UnexpectedResourceTypeError, _Error);
|
|
162
|
-
|
|
163
136
|
var _super = _createSuper(UnexpectedResourceTypeError);
|
|
164
|
-
|
|
165
137
|
function UnexpectedResourceTypeError(resourceType) {
|
|
166
138
|
var _this;
|
|
167
|
-
|
|
168
139
|
_classCallCheck(this, UnexpectedResourceTypeError);
|
|
169
|
-
|
|
170
140
|
_this = _super.call(this, "Unexpected resource type: ".concat(resourceType));
|
|
171
141
|
_this.name = 'UnexpectedResourceTypeError';
|
|
172
142
|
return _this;
|
|
173
143
|
}
|
|
174
|
-
|
|
175
144
|
return _createClass(UnexpectedResourceTypeError);
|
|
176
145
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
177
146
|
|
|
178
147
|
function resourceTypeToPlural(_ref) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
148
|
+
let resourceType = _ref.resourceType,
|
|
149
|
+
_ref$isUpperCase = _ref.isUpperCase,
|
|
150
|
+
isUpperCase = _ref$isUpperCase === void 0 ? false : _ref$isUpperCase;
|
|
183
151
|
switch (resourceType) {
|
|
184
152
|
case EXPORTABLE_RESOURCES.CATEGORY:
|
|
185
153
|
return isUpperCase ? 'Categories' : 'categories';
|
|
186
|
-
|
|
187
154
|
case EXPORTABLE_RESOURCES.PRODUCT:
|
|
188
155
|
return isUpperCase ? 'Products' : 'products';
|
|
189
|
-
|
|
190
156
|
case EXPORTABLE_RESOURCES.DISCOUNT_CODE:
|
|
191
157
|
return isUpperCase ? 'Discount codes' : 'discount codes';
|
|
192
|
-
|
|
193
158
|
default:
|
|
194
159
|
throw UnexpectedResourceTypeError(resourceType);
|
|
195
160
|
}
|
|
@@ -198,13 +163,10 @@ function resourceTypeToOperationName(resourceType) {
|
|
|
198
163
|
switch (resourceType) {
|
|
199
164
|
case EXPORTABLE_RESOURCES.CATEGORY:
|
|
200
165
|
return 'categories';
|
|
201
|
-
|
|
202
166
|
case EXPORTABLE_RESOURCES.PRODUCT:
|
|
203
167
|
return 'products';
|
|
204
|
-
|
|
205
168
|
case EXPORTABLE_RESOURCES.DISCOUNT_CODE:
|
|
206
169
|
return 'discountCodes';
|
|
207
|
-
|
|
208
170
|
default:
|
|
209
171
|
throw UnexpectedResourceTypeError(resourceType);
|
|
210
172
|
}
|
|
@@ -218,13 +180,11 @@ function isFilledArray(maybeArray) {
|
|
|
218
180
|
|
|
219
181
|
function buildGraphQuery(exportSettings) {
|
|
220
182
|
var _context;
|
|
221
|
-
|
|
222
|
-
var operation = resourceTypeToOperationName(exportSettings.resourceType);
|
|
223
|
-
|
|
183
|
+
const operation = resourceTypeToOperationName(exportSettings.resourceType);
|
|
224
184
|
switch (exportSettings.exportSelectionType) {
|
|
225
185
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
226
186
|
return gqlQueryBuilder.query({
|
|
227
|
-
operation
|
|
187
|
+
operation,
|
|
228
188
|
fields: [{
|
|
229
189
|
results: buildFields({
|
|
230
190
|
fields: exportSettings.fields,
|
|
@@ -233,10 +193,9 @@ function buildGraphQuery(exportSettings) {
|
|
|
233
193
|
}],
|
|
234
194
|
variables: {}
|
|
235
195
|
});
|
|
236
|
-
|
|
237
196
|
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
238
197
|
return gqlQueryBuilder.query({
|
|
239
|
-
operation
|
|
198
|
+
operation,
|
|
240
199
|
fields: [{
|
|
241
200
|
results: buildFields({
|
|
242
201
|
fields: exportSettings.fields,
|
|
@@ -244,40 +203,34 @@ function buildGraphQuery(exportSettings) {
|
|
|
244
203
|
})
|
|
245
204
|
}],
|
|
246
205
|
variables: {
|
|
247
|
-
where: "id in (".concat(_mapInstanceProperty__default["default"](_context = exportSettings.selectedResourceIds).call(_context,
|
|
248
|
-
return "\\\"".concat(id, "\\\"");
|
|
249
|
-
}).join(', '), ")")
|
|
206
|
+
where: "id in (".concat(_mapInstanceProperty__default["default"](_context = exportSettings.selectedResourceIds).call(_context, id => "\\\"".concat(id, "\\\"")).join(', '), ")")
|
|
250
207
|
}
|
|
251
208
|
});
|
|
252
|
-
|
|
253
209
|
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
254
210
|
// TODO: gql query for exporting filtered resources.
|
|
255
211
|
throw new UnexpectedSelectionTypeError(exportSettings.exportSelectionType);
|
|
256
|
-
|
|
257
212
|
default:
|
|
258
213
|
throw new UnexpectedSelectionTypeError(exportSettings.exportSelectionType);
|
|
259
214
|
}
|
|
260
215
|
}
|
|
261
|
-
|
|
262
216
|
function buildFields(_ref) {
|
|
263
217
|
var _context2;
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
if (field.isLocalized) return _mapInstanceProperty__default["default"](languages).call(languages, function (language) {
|
|
218
|
+
let fields = _ref.fields,
|
|
219
|
+
languages = _ref.languages;
|
|
220
|
+
return _flatInstanceProperty__default["default"](_context2 = _mapInstanceProperty__default["default"](fields).call(fields, field => {
|
|
221
|
+
if (field.isLocalized) return _mapInstanceProperty__default["default"](languages).call(languages, language => {
|
|
269
222
|
var _context3, _context4, _context5;
|
|
270
|
-
|
|
271
|
-
var alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty__default["default"](_context3 = "".concat(field.key, "_")).call(_context3, language));
|
|
223
|
+
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty__default["default"](_context3 = "".concat(field.key, "_")).call(_context3, language));
|
|
272
224
|
return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(alias, ": ")).call(_context5, field.key, "(locale: \"")).call(_context4, language, "\")");
|
|
273
225
|
});else {
|
|
274
226
|
if (isFilledArray(field.fields)) {
|
|
275
|
-
return
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
227
|
+
return {
|
|
228
|
+
[field.key]: buildFields({
|
|
229
|
+
fields: field.fields,
|
|
230
|
+
languages
|
|
231
|
+
})
|
|
232
|
+
};
|
|
279
233
|
}
|
|
280
|
-
|
|
281
234
|
return field.key;
|
|
282
235
|
}
|
|
283
236
|
})).call(_context2);
|
|
@@ -436,7 +389,7 @@ var messages = reactIntl.defineMessages({
|
|
|
436
389
|
}
|
|
437
390
|
});
|
|
438
391
|
|
|
439
|
-
|
|
392
|
+
const ExportResourcesContext = /*#__PURE__*/react.createContext();
|
|
440
393
|
|
|
441
394
|
var ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
442
395
|
resourceType: PropTypes__default["default"].string.isRequired,
|
|
@@ -464,41 +417,31 @@ var ExportResourcesModalShape = PropTypes__default["default"].shape({
|
|
|
464
417
|
}).isRequired;
|
|
465
418
|
|
|
466
419
|
function validate(values) {
|
|
467
|
-
|
|
420
|
+
const errors = {
|
|
468
421
|
fileName: {},
|
|
469
422
|
languages: {}
|
|
470
423
|
};
|
|
471
|
-
|
|
472
424
|
if (uiKit.TextInput.isEmpty(values.fileName)) {
|
|
473
425
|
errors.fileName.missing = true;
|
|
474
426
|
} else if (!/^[a-zA-Z0-9-_]+$/.test(values.fileName)) {
|
|
475
427
|
errors.fileName.invalidInput = true;
|
|
476
428
|
}
|
|
477
|
-
|
|
478
429
|
if (values.languages.length < 1) {
|
|
479
430
|
errors.languages.missing = true;
|
|
480
431
|
}
|
|
481
|
-
|
|
482
432
|
return omitEmpty__default["default"](errors);
|
|
483
433
|
}
|
|
484
434
|
|
|
485
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; }
|
|
486
|
-
|
|
487
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; }
|
|
488
|
-
|
|
489
|
-
var ExportResourcesContextProvider = function ExportResourcesContextProvider(props) {
|
|
437
|
+
const ExportResourcesContextProvider = props => {
|
|
490
438
|
var _context;
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
var _useApplicationContex = applicationShellConnectors.useApplicationContext(function (applicationContext) {
|
|
495
|
-
return {
|
|
439
|
+
const todayFormatted = moment__default["default"]().format('DD-MM-YY_HH-mm');
|
|
440
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
496
441
|
language: applicationContext.dataLocale
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
var formik$1 = formik.useFormik({
|
|
442
|
+
})),
|
|
443
|
+
language = _useApplicationContex.language;
|
|
444
|
+
const formik$1 = formik.useFormik({
|
|
502
445
|
initialValues: {
|
|
503
446
|
outputFormat: props.outputFormat,
|
|
504
447
|
fileName: _concatInstanceProperty__default["default"](_context = "".concat(resourceTypeToPlural({
|
|
@@ -512,14 +455,12 @@ var ExportResourcesContextProvider = function ExportResourcesContextProvider(pro
|
|
|
512
455
|
exportSelectionType: props.exportSelectionType,
|
|
513
456
|
isAllLanguagesChecked: false
|
|
514
457
|
},
|
|
515
|
-
validate
|
|
458
|
+
validate
|
|
516
459
|
});
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
setExportOperationStarted = _useState2[1];
|
|
522
|
-
|
|
460
|
+
const _useState = react.useState(false),
|
|
461
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
462
|
+
exportOperationStarted = _useState2[0],
|
|
463
|
+
setExportOperationStarted = _useState2[1];
|
|
523
464
|
return jsxRuntime.jsx(ExportResourcesContext.Provider, {
|
|
524
465
|
value: {
|
|
525
466
|
formik: formik$1,
|
|
@@ -527,39 +468,34 @@ var ExportResourcesContextProvider = function ExportResourcesContextProvider(pro
|
|
|
527
468
|
allResourcesCount: props.allResourcesCount,
|
|
528
469
|
matchingResourcesCount: props.matchingResourcesCount,
|
|
529
470
|
selectedResourceIds: props.selectedResourceIds,
|
|
530
|
-
exportOperationStarted
|
|
531
|
-
setExportOperationStarted
|
|
471
|
+
exportOperationStarted,
|
|
472
|
+
setExportOperationStarted
|
|
532
473
|
},
|
|
533
474
|
children: props.children
|
|
534
475
|
});
|
|
535
476
|
};
|
|
536
|
-
|
|
537
477
|
ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
538
478
|
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$b(_objectSpread$b({}, ExportResourcesModalShape), {}, {
|
|
539
479
|
children: PropTypes__default["default"].node
|
|
540
480
|
}) : {};
|
|
541
481
|
|
|
542
482
|
function useExportResourcesContext() {
|
|
543
|
-
|
|
544
|
-
|
|
483
|
+
const context = react.useContext(ExportResourcesContext);
|
|
545
484
|
if (!context) {
|
|
546
485
|
throw new MissingExportResourceProviderError();
|
|
547
486
|
}
|
|
548
|
-
|
|
549
487
|
return context;
|
|
550
488
|
}
|
|
551
489
|
|
|
552
490
|
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)."; }
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
var isNewTheme = _ref.isNewTheme;
|
|
491
|
+
const smallTopPadding = /*#__PURE__*/react$1.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJMkIiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LXdyYXA6IHdyYXA7XG4gIGRpc3BsYXk6IGlubGluZS1mbGV4O1xuICBwYWRkaW5nOiAwICR7aXNOZXdUaGVtZSA/IDAgOiBjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbiAgJiA+IGRpdiB7XG4gICAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdTfSAwO1xuICB9XG5gXG5cbmNvbnN0IHRhZ0xpc3RJdGVtID0gY3NzYFxuICBtYXJnaW46IDAgJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdYc30gJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdYc30gMDtcbiAgZGlzcGxheTogZmxleDtcbiAgbWluLXdpZHRoOiAwO1xuYFxuXG5jb25zdCBkaXZpZGVyID0gY3NzYFxuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICB3aWR0aDogMTAwJTtcbiAgbWFyZ2luOiAwO1xuICBib3JkZXI6IDA7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JOZXV0cmFsNjB9O1xuYFxuXG5jb25zdCBub3RCb2xkID0gY3NzYFxuICBmb250LXdlaWdodDogbm9ybWFsO1xuYFxuXG5jb25zdCBzdWNjZXNzTWVzc2FnZSA9IGNzc2BcbiAgbWFyZ2luLWJvdHRvbTogJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbmBcblxuY29uc3Qgc3R5bGVzID0ge1xuICB0YWdMaXN0SXRlbSxcbiAgdGFnTGlzdENvbnRhaW5lcixcbiAgc21hbGxUb3BQYWRkaW5nLFxuICBkaXZpZGVyLFxuICBub3RCb2xkLFxuICBzdWNjZXNzTWVzc2FnZSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgc3R5bGVzXG4iXX0= */");
|
|
492
|
+
const tagListContainer = _ref => {
|
|
493
|
+
let isNewTheme = _ref.isNewTheme;
|
|
557
494
|
return /*#__PURE__*/react$1.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 === "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kaXZpZGVyID0gY3NzYFxuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICB3aWR0aDogMTAwJTtcbiAgbWFyZ2luOiAwO1xuICBib3JkZXI6IDA7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JOZXV0cmFsNjB9O1xuYFxuXG5jb25zdCBub3RCb2xkID0gY3NzYFxuICBmb250LXdlaWdodDogbm9ybWFsO1xuYFxuXG5jb25zdCBzdWNjZXNzTWVzc2FnZSA9IGNzc2BcbiAgbWFyZ2luLWJvdHRvbTogJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbmBcblxuY29uc3Qgc3R5bGVzID0ge1xuICB0YWdMaXN0SXRlbSxcbiAgdGFnTGlzdENvbnRhaW5lcixcbiAgc21hbGxUb3BQYWRkaW5nLFxuICBkaXZpZGVyLFxuICBub3RCb2xkLFxuICBzdWNjZXNzTWVzc2FnZSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgc3R5bGVzXG4iXX0= */");
|
|
558
495
|
};
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
var notBold = process.env.NODE_ENV === "production" ? {
|
|
496
|
+
const tagListItem = /*#__PURE__*/react$1.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQnVCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG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2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */");
|
|
497
|
+
const divider = /*#__PURE__*/react$1.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5Qm1CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */");
|
|
498
|
+
const notBold = process.env.NODE_ENV === "production" ? {
|
|
563
499
|
name: "lugakg",
|
|
564
500
|
styles: "font-weight:normal"
|
|
565
501
|
} : {
|
|
@@ -568,33 +504,29 @@ var notBold = process.env.NODE_ENV === "production" ? {
|
|
|
568
504
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ21CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */",
|
|
569
505
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
570
506
|
};
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
tagListItem
|
|
574
|
-
tagListContainer
|
|
575
|
-
smallTopPadding
|
|
576
|
-
divider
|
|
577
|
-
notBold
|
|
578
|
-
successMessage
|
|
507
|
+
const successMessage = /*#__PURE__*/react$1.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQzBCIiwiZmlsZSI6InN0eWxlcy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9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG5cbmV4cG9ydCBkZWZhdWx0IHN0eWxlc1xuIl19 */");
|
|
508
|
+
const styles = {
|
|
509
|
+
tagListItem,
|
|
510
|
+
tagListContainer,
|
|
511
|
+
smallTopPadding,
|
|
512
|
+
divider,
|
|
513
|
+
notBold,
|
|
514
|
+
successMessage
|
|
579
515
|
};
|
|
580
516
|
|
|
581
517
|
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; }
|
|
582
|
-
|
|
583
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; }
|
|
584
519
|
function ExportSelectionRadioButtons() {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
selectedResourceIds = _useExportResourcesCo.selectedResourceIds;
|
|
596
|
-
|
|
597
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
520
|
+
const _useTheme = designSystem.useTheme(),
|
|
521
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
522
|
+
const intl = reactIntl.useIntl();
|
|
523
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
524
|
+
formik = _useExportResourcesCo.formik,
|
|
525
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
526
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
527
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
528
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds;
|
|
529
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
598
530
|
resourceType: resourceType
|
|
599
531
|
});
|
|
600
532
|
return jsxRuntime.jsx(uiKit.Spacings.Inline, {
|
|
@@ -658,20 +590,17 @@ function getBold(msg) {
|
|
|
658
590
|
}
|
|
659
591
|
|
|
660
592
|
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; }
|
|
661
|
-
|
|
662
593
|
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; }
|
|
663
594
|
function ExportTextMessage() {
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
595
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
596
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
597
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
598
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
599
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
600
|
+
formik = _useExportResourcesCo.formik;
|
|
601
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
672
602
|
resourceType: resourceType
|
|
673
603
|
});
|
|
674
|
-
|
|
675
604
|
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
676
605
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
677
606
|
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -683,7 +612,6 @@ function ExportTextMessage() {
|
|
|
683
612
|
}
|
|
684
613
|
})
|
|
685
614
|
});
|
|
686
|
-
|
|
687
615
|
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
688
616
|
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
689
617
|
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportMatchingMessage), {}, {
|
|
@@ -694,7 +622,6 @@ function ExportTextMessage() {
|
|
|
694
622
|
}
|
|
695
623
|
})
|
|
696
624
|
});
|
|
697
|
-
|
|
698
625
|
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
699
626
|
return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
700
627
|
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportSelectedMessage), {}, {
|
|
@@ -705,27 +632,23 @@ function ExportTextMessage() {
|
|
|
705
632
|
}
|
|
706
633
|
})
|
|
707
634
|
});
|
|
708
|
-
|
|
709
635
|
default:
|
|
710
636
|
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
711
637
|
}
|
|
712
638
|
}
|
|
713
639
|
|
|
714
640
|
function TagList(props) {
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
641
|
+
const _useTheme = designSystem.useTheme(),
|
|
642
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
718
643
|
return jsxRuntime.jsx("div", {
|
|
719
644
|
css: styles.tagListContainer({
|
|
720
|
-
isNewTheme
|
|
645
|
+
isNewTheme
|
|
721
646
|
}),
|
|
722
647
|
"data-testid": props['data-testid'],
|
|
723
|
-
children: _mapInstanceProperty__default["default"](react.Children).call(react.Children, props.children,
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
});
|
|
728
|
-
})
|
|
648
|
+
children: _mapInstanceProperty__default["default"](react.Children).call(react.Children, props.children, tag => jsxRuntime.jsx("div", {
|
|
649
|
+
css: styles.tagListItem,
|
|
650
|
+
children: tag
|
|
651
|
+
}))
|
|
729
652
|
});
|
|
730
653
|
}
|
|
731
654
|
TagList.displayName = 'TagList';
|
|
@@ -735,15 +658,12 @@ TagList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
735
658
|
} : {};
|
|
736
659
|
|
|
737
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; }
|
|
738
|
-
|
|
739
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; }
|
|
740
662
|
function AppliedFilters(_ref) {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
746
|
-
|
|
663
|
+
let filters = _ref.filters,
|
|
664
|
+
onFilterRemove = _ref.onFilterRemove;
|
|
665
|
+
const _useTheme = designSystem.useTheme(),
|
|
666
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
747
667
|
if (isNewTheme) return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
748
668
|
condensed: true,
|
|
749
669
|
isDefaultClosed: !Boolean(filters.length),
|
|
@@ -755,17 +675,15 @@ function AppliedFilters(_ref) {
|
|
|
755
675
|
})
|
|
756
676
|
}),
|
|
757
677
|
children: jsxRuntime.jsx(TagList, {
|
|
758
|
-
children: _mapInstanceProperty__default["default"](filters).call(filters,
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}, filter);
|
|
768
|
-
})
|
|
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))
|
|
769
687
|
})
|
|
770
688
|
});
|
|
771
689
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -786,17 +704,15 @@ function AppliedFilters(_ref) {
|
|
|
786
704
|
})
|
|
787
705
|
})]
|
|
788
706
|
}), jsxRuntime.jsx(TagList, {
|
|
789
|
-
children: _mapInstanceProperty__default["default"](filters).call(filters,
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
}, filter);
|
|
799
|
-
})
|
|
707
|
+
children: _mapInstanceProperty__default["default"](filters).call(filters, filter => jsxRuntime.jsx("div", {
|
|
708
|
+
"data-testid": "test-filter-".concat(filter),
|
|
709
|
+
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
710
|
+
onRemove: () => {
|
|
711
|
+
onFilterRemove(filter);
|
|
712
|
+
},
|
|
713
|
+
children: filter
|
|
714
|
+
})
|
|
715
|
+
}, filter))
|
|
800
716
|
})]
|
|
801
717
|
});
|
|
802
718
|
}
|
|
@@ -807,9 +723,8 @@ AppliedFilters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
807
723
|
|
|
808
724
|
// TODO: @redesign cleanup
|
|
809
725
|
function ExportBasedOnMyViewsSelectField() {
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
726
|
+
const _useTheme = designSystem.useTheme(),
|
|
727
|
+
themedValue = _useTheme.themedValue;
|
|
813
728
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
814
729
|
scale: "m",
|
|
815
730
|
alignItems: "center",
|
|
@@ -828,22 +743,17 @@ function ExportBasedOnMyViewsSelectField() {
|
|
|
828
743
|
}
|
|
829
744
|
|
|
830
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; }
|
|
831
|
-
|
|
832
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; }
|
|
833
|
-
|
|
834
|
-
var IconPlaceholder = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
747
|
+
const IconPlaceholder = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
835
748
|
target: "e1nl5t3e0"
|
|
836
749
|
} : {
|
|
837
750
|
target: "e1nl5t3e0",
|
|
838
751
|
label: "IconPlaceholder"
|
|
839
752
|
})("width:", uiKit.customProperties.spacingM, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcGxpZWQtc2VhcmNoLXRlcm1zLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFha0MiLCJmaWxlIjoiYXBwbGllZC1zZWFyY2gtdGVybXMuanN4Iiwic291cmNlc0NvbnRlb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iAgICAgICAgPFRleHQuQm9keT57YXBwbGllZFNlYXJjaFRlcm1zLmpvaW4oJywgJyl9PC9UZXh0LkJvZHk+XG4gICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICApXG59XG5BcHBsaWVkU2VhcmNoVGVybXMucHJvcFR5cGVzID0ge1xuICBhcHBsaWVkU2VhcmNoVGVybXM6IFByb3BUeXBlcy5hcnJheS5pc1JlcXVpcmVkLFxufVxuIl19 */"));
|
|
840
|
-
|
|
841
753
|
function AppliedSearchTerms(_ref) {
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
846
|
-
|
|
754
|
+
let appliedSearchTerms = _ref.appliedSearchTerms;
|
|
755
|
+
const _useTheme = designSystem.useTheme(),
|
|
756
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
847
757
|
if (isNewTheme) return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
848
758
|
condensed: true,
|
|
849
759
|
isDefaultClosed: !Boolean(appliedSearchTerms.length),
|
|
@@ -889,51 +799,39 @@ AppliedSearchTerms.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
889
799
|
} : {};
|
|
890
800
|
|
|
891
801
|
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; }
|
|
892
|
-
|
|
893
802
|
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__default["default"](_context3 = ownKeys$6(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$6(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
894
|
-
|
|
895
803
|
function normalizeFields(fields) {
|
|
896
|
-
|
|
804
|
+
const result = _mapInstanceProperty__default["default"](fields).call(fields, field => {
|
|
897
805
|
if (isFilledArray(field.fields)) {
|
|
898
806
|
var _context;
|
|
899
|
-
|
|
900
|
-
return _mapInstanceProperty__default["default"](_context = normalizeFields(field.fields)).call(_context, function (nestedField) {
|
|
807
|
+
return _mapInstanceProperty__default["default"](_context = normalizeFields(field.fields)).call(_context, nestedField => {
|
|
901
808
|
var _context2;
|
|
902
|
-
|
|
903
809
|
return _objectSpread$6(_objectSpread$6({}, nestedField), {}, {
|
|
904
810
|
key: _concatInstanceProperty__default["default"](_context2 = "".concat(field.key, ".")).call(_context2, nestedField.key)
|
|
905
811
|
});
|
|
906
812
|
});
|
|
907
813
|
}
|
|
908
|
-
|
|
909
814
|
return field;
|
|
910
815
|
});
|
|
911
|
-
|
|
912
816
|
return _flatInstanceProperty__default["default"](result).call(result);
|
|
913
817
|
}
|
|
914
|
-
|
|
915
818
|
function FieldsRenderer(_ref) {
|
|
916
|
-
|
|
917
|
-
|
|
819
|
+
let fields = _ref.fields;
|
|
820
|
+
const allFields = normalizeFields(fields);
|
|
918
821
|
return jsxRuntime.jsx(TagList, {
|
|
919
|
-
children: _mapInstanceProperty__default["default"](allFields).call(allFields,
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
children:
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}, field.key);
|
|
926
|
-
})
|
|
822
|
+
children: _mapInstanceProperty__default["default"](allFields).call(allFields, field => jsxRuntime.jsx("div", {
|
|
823
|
+
"data-testid": "test-field-".concat(field.key),
|
|
824
|
+
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
825
|
+
children: field.label || field.key
|
|
826
|
+
})
|
|
827
|
+
}, field.key))
|
|
927
828
|
});
|
|
928
829
|
}
|
|
929
|
-
|
|
930
830
|
FieldsRenderer.propTypes = process.env.NODE_ENV !== "production" ? ExportFields.propTypes : {};
|
|
931
831
|
function ExportFields(_ref2) {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
936
|
-
|
|
832
|
+
let fields = _ref2.fields;
|
|
833
|
+
const _useTheme = designSystem.useTheme(),
|
|
834
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
937
835
|
if (isNewTheme) return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
938
836
|
condensed: true,
|
|
939
837
|
isDefaultClosed: !Boolean(fields.length),
|
|
@@ -984,21 +882,15 @@ ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
984
882
|
})).isRequired
|
|
985
883
|
} : {};
|
|
986
884
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
var onAppliedFilterRemove = function onAppliedFilterRemove(filter) {
|
|
885
|
+
const ExportSelection = () => {
|
|
886
|
+
const _useTheme = designSystem.useTheme(),
|
|
887
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
888
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
889
|
+
formik = _useExportResourcesCo.formik;
|
|
890
|
+
const onAppliedFilterRemove = filter => {
|
|
995
891
|
var _context;
|
|
996
|
-
|
|
997
|
-
formik.setFieldValue('appliedFilters', _filterInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](formik).appliedFilters).call(_context, function (appliedFilter) {
|
|
998
|
-
return appliedFilter !== filter;
|
|
999
|
-
}));
|
|
892
|
+
formik.setFieldValue('appliedFilters', _filterInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](formik).appliedFilters).call(_context, appliedFilter => appliedFilter !== filter));
|
|
1000
893
|
};
|
|
1001
|
-
|
|
1002
894
|
if (isNewTheme) return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1003
895
|
scale: "xl",
|
|
1004
896
|
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -1053,12 +945,10 @@ var ExportSelection = function ExportSelection() {
|
|
|
1053
945
|
};
|
|
1054
946
|
|
|
1055
947
|
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; }
|
|
1056
|
-
|
|
1057
948
|
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; }
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
949
|
+
const ExportProperties = props => {
|
|
950
|
+
const _useTheme = designSystem.useTheme(),
|
|
951
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
1062
952
|
if (typeof props.renderProperties !== 'function') return null;
|
|
1063
953
|
if (isNewTheme) return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1064
954
|
scale: "m",
|
|
@@ -1082,16 +972,13 @@ ExportProperties.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1082
972
|
} : {};
|
|
1083
973
|
|
|
1084
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; }
|
|
1085
|
-
|
|
1086
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; }
|
|
1087
976
|
function renderFileNameError(key) {
|
|
1088
977
|
switch (key) {
|
|
1089
978
|
case 'missing':
|
|
1090
979
|
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$4({}, messages.missingFileNameError));
|
|
1091
|
-
|
|
1092
980
|
case 'invalidInput':
|
|
1093
981
|
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$4({}, messages.invalidFileNameError));
|
|
1094
|
-
|
|
1095
982
|
default:
|
|
1096
983
|
return null;
|
|
1097
984
|
}
|
|
@@ -1100,52 +987,41 @@ function renderLanguageError(key) {
|
|
|
1100
987
|
switch (key) {
|
|
1101
988
|
case 'missing':
|
|
1102
989
|
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$4({}, messages.missingLanguageError));
|
|
1103
|
-
|
|
1104
990
|
default:
|
|
1105
991
|
return null;
|
|
1106
992
|
}
|
|
1107
993
|
}
|
|
1108
994
|
|
|
1109
995
|
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; }
|
|
1110
|
-
|
|
1111
996
|
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; }
|
|
1112
|
-
|
|
997
|
+
const outputFormatOptions = [{
|
|
1113
998
|
value: OUTPUT_FORMATS.JSON,
|
|
1114
999
|
label: 'JSON'
|
|
1115
1000
|
}, {
|
|
1116
1001
|
value: OUTPUT_FORMATS.CSV,
|
|
1117
1002
|
label: 'CSV'
|
|
1118
1003
|
}];
|
|
1119
|
-
|
|
1120
1004
|
function mapLanguagesToOptions(languages) {
|
|
1121
|
-
return _mapInstanceProperty__default["default"](languages).call(languages,
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
};
|
|
1126
|
-
});
|
|
1005
|
+
return _mapInstanceProperty__default["default"](languages).call(languages, language => ({
|
|
1006
|
+
value: language,
|
|
1007
|
+
label: language
|
|
1008
|
+
}));
|
|
1127
1009
|
}
|
|
1128
|
-
|
|
1129
1010
|
function ExportFileSettings(props) {
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
};
|
|
1145
|
-
}),
|
|
1146
|
-
languages = _useApplicationContex.languages,
|
|
1147
|
-
language = _useApplicationContex.language;
|
|
1148
|
-
|
|
1011
|
+
const _useTheme = designSystem.useTheme(),
|
|
1012
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
1013
|
+
const intl = reactIntl.useIntl();
|
|
1014
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
1015
|
+
formik = _useExportResourcesCo.formik;
|
|
1016
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
1017
|
+
var _applicationContext$p;
|
|
1018
|
+
return {
|
|
1019
|
+
language: applicationContext.dataLocale,
|
|
1020
|
+
languages: ((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) || []
|
|
1021
|
+
};
|
|
1022
|
+
}),
|
|
1023
|
+
languages = _useApplicationContex.languages,
|
|
1024
|
+
language = _useApplicationContex.language;
|
|
1149
1025
|
if (isNewTheme) return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1150
1026
|
scale: "xxxl",
|
|
1151
1027
|
children: [jsxRuntime.jsx(applicationComponents.PageContentNarrow, {
|
|
@@ -1170,7 +1046,7 @@ function ExportFileSettings(props) {
|
|
|
1170
1046
|
options: mapLanguagesToOptions(languages),
|
|
1171
1047
|
isMulti: true
|
|
1172
1048
|
}, formik.getFieldProps('languages')), {}, {
|
|
1173
|
-
onChange:
|
|
1049
|
+
onChange: e => {
|
|
1174
1050
|
formik.handleChange(e);
|
|
1175
1051
|
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1176
1052
|
},
|
|
@@ -1180,7 +1056,7 @@ function ExportFileSettings(props) {
|
|
|
1180
1056
|
})), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1181
1057
|
name: "isAllLanguagesChecked",
|
|
1182
1058
|
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLanguagesChecked,
|
|
1183
|
-
onChange:
|
|
1059
|
+
onChange: e => {
|
|
1184
1060
|
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1185
1061
|
formik.handleChange(e);
|
|
1186
1062
|
},
|
|
@@ -1226,7 +1102,7 @@ function ExportFileSettings(props) {
|
|
|
1226
1102
|
}), jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
1227
1103
|
name: "isAllLanguagesChecked",
|
|
1228
1104
|
isChecked: _valuesInstanceProperty__default["default"](formik).isAllLanguagesChecked,
|
|
1229
|
-
onChange:
|
|
1105
|
+
onChange: e => {
|
|
1230
1106
|
if (e.target.checked) formik.setFieldValue('languages', languages);else formik.setFieldValue('languages', [language]);
|
|
1231
1107
|
formik.handleChange(e);
|
|
1232
1108
|
},
|
|
@@ -1239,7 +1115,7 @@ function ExportFileSettings(props) {
|
|
|
1239
1115
|
options: mapLanguagesToOptions(languages),
|
|
1240
1116
|
isMulti: true
|
|
1241
1117
|
}, formik.getFieldProps('languages')), {}, {
|
|
1242
|
-
onChange:
|
|
1118
|
+
onChange: e => {
|
|
1243
1119
|
formik.handleChange(e);
|
|
1244
1120
|
formik.setFieldValue('isAllLanguagesChecked', false);
|
|
1245
1121
|
},
|
|
@@ -1258,89 +1134,61 @@ ExportFileSettings.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1258
1134
|
renderProperties: PropTypes__default["default"].func
|
|
1259
1135
|
} : {};
|
|
1260
1136
|
|
|
1261
|
-
function createExportOperation(
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.EXPORT,
|
|
1277
|
-
uri: uri,
|
|
1278
|
-
headers: {
|
|
1279
|
-
accept: 'application/json'
|
|
1280
|
-
},
|
|
1281
|
-
payload: {
|
|
1282
|
-
query: graphQuery
|
|
1283
|
-
}
|
|
1284
|
-
}));
|
|
1285
|
-
|
|
1286
|
-
case 4:
|
|
1287
|
-
response = _context.sent;
|
|
1288
|
-
return _context.abrupt("return", response);
|
|
1289
|
-
|
|
1290
|
-
case 6:
|
|
1291
|
-
case "end":
|
|
1292
|
-
return _context.stop();
|
|
1293
|
-
}
|
|
1294
|
-
}, _callee);
|
|
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
|
+
}
|
|
1295
1152
|
}));
|
|
1296
|
-
return
|
|
1153
|
+
return response;
|
|
1297
1154
|
}
|
|
1298
1155
|
|
|
1299
1156
|
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; }
|
|
1300
|
-
|
|
1301
|
-
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__default["default"](_context2 = ownKeys$2(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$2(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1157
|
+
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; }
|
|
1302
1158
|
function ExportConfirmationModal(props) {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
var intl = reactIntl.useIntl();
|
|
1323
|
-
var asyncDispatch = sdk.useAsyncDispatch();
|
|
1324
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
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({
|
|
1325
1178
|
resourceType: props.resourceType
|
|
1326
1179
|
});
|
|
1327
|
-
|
|
1328
|
-
var countInConfirmationMessage = function countInConfirmationMessage() {
|
|
1180
|
+
const countInConfirmationMessage = () => {
|
|
1329
1181
|
switch (_valuesInstanceProperty__default["default"](formik).exportSelectionType) {
|
|
1330
1182
|
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
1331
1183
|
return allResourcesCount;
|
|
1332
|
-
|
|
1333
1184
|
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
1334
1185
|
return matchingResourcesCount;
|
|
1335
|
-
|
|
1336
1186
|
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
1337
1187
|
return selectedResourceIds.length;
|
|
1338
|
-
|
|
1339
1188
|
default:
|
|
1340
1189
|
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty__default["default"](formik).exportSelectionType);
|
|
1341
1190
|
}
|
|
1342
1191
|
};
|
|
1343
|
-
|
|
1344
1192
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
1345
1193
|
dataAttributesPrimaryButton: {
|
|
1346
1194
|
'data-testid': 'confirm-export-button'
|
|
@@ -1354,58 +1202,36 @@ function ExportConfirmationModal(props) {
|
|
|
1354
1202
|
isOpen: props.isOpen,
|
|
1355
1203
|
onClose: props.closeModal,
|
|
1356
1204
|
onCancel: props.closeModal,
|
|
1357
|
-
onConfirm:
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
asyncDispatchFn: asyncDispatch
|
|
1377
|
-
});
|
|
1378
|
-
|
|
1379
|
-
case 6:
|
|
1380
|
-
response = _context.sent;
|
|
1381
|
-
_context.t0 = response.state;
|
|
1382
|
-
_context.next = _context.t0 === EXPORT_OPERATION_STATES.PROCESSING ? 10 : _context.t0 === EXPORT_OPERATION_STATES.COMPLETED ? 10 : 12;
|
|
1383
|
-
break;
|
|
1384
|
-
|
|
1385
|
-
case 10:
|
|
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:
|
|
1386
1224
|
setExportOperationStarted(true);
|
|
1387
|
-
return _context.abrupt("break", 13);
|
|
1388
|
-
|
|
1389
|
-
case 12:
|
|
1390
|
-
throw new UnexpectedExportOperationStateError(response.state);
|
|
1391
|
-
|
|
1392
|
-
case 13:
|
|
1393
|
-
_context.next = 18;
|
|
1394
1225
|
break;
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
_context.prev = 15;
|
|
1398
|
-
_context.t1 = _context["catch"](3);
|
|
1399
|
-
actionsGlobal.showApiErrorNotification({
|
|
1400
|
-
errors: _context.t1
|
|
1401
|
-
});
|
|
1402
|
-
|
|
1403
|
-
case 18:
|
|
1404
|
-
case "end":
|
|
1405
|
-
return _context.stop();
|
|
1226
|
+
default:
|
|
1227
|
+
throw new UnexpectedExportOperationStateError(response.state);
|
|
1406
1228
|
}
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1229
|
+
} catch (errors) {
|
|
1230
|
+
actionsGlobal.showApiErrorNotification({
|
|
1231
|
+
errors
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1409
1235
|
children: jsxRuntime.jsxs("div", {
|
|
1410
1236
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1411
1237
|
intlMessage: _objectSpread$2(_objectSpread$2({}, messages.confirmationBodyPlan), {}, {
|
|
@@ -1429,28 +1255,20 @@ ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1429
1255
|
} : {};
|
|
1430
1256
|
|
|
1431
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; }
|
|
1432
|
-
|
|
1433
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; }
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
children: msg
|
|
1439
|
-
});
|
|
1440
|
-
};
|
|
1441
|
-
|
|
1259
|
+
const getExportLogsLink = (projectKey, msg) => jsxRuntime.jsx(uiKit.Link, {
|
|
1260
|
+
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
1261
|
+
children: msg
|
|
1262
|
+
});
|
|
1442
1263
|
function ExportOperationSuccessMessage(_ref) {
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
}),
|
|
1452
|
-
projectKey = _useApplicationContex.projectKey;
|
|
1453
|
-
|
|
1264
|
+
let isShown = _ref.isShown;
|
|
1265
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
|
|
1266
|
+
var _applicationContext$p;
|
|
1267
|
+
return {
|
|
1268
|
+
projectKey: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.key
|
|
1269
|
+
};
|
|
1270
|
+
}),
|
|
1271
|
+
projectKey = _useApplicationContex.projectKey;
|
|
1454
1272
|
if (!isShown) return null;
|
|
1455
1273
|
return jsxRuntime.jsx("div", {
|
|
1456
1274
|
css: styles.successMessage,
|
|
@@ -1461,9 +1279,7 @@ function ExportOperationSuccessMessage(_ref) {
|
|
|
1461
1279
|
type: "success",
|
|
1462
1280
|
intlMessage: _objectSpread$1(_objectSpread$1({}, messages.exportOperationSuccessMessage), {}, {
|
|
1463
1281
|
values: {
|
|
1464
|
-
logsLink:
|
|
1465
|
-
return getExportLogsLink(projectKey, msg);
|
|
1466
|
-
}
|
|
1282
|
+
logsLink: msg => getExportLogsLink(projectKey, msg)
|
|
1467
1283
|
}
|
|
1468
1284
|
})
|
|
1469
1285
|
})
|
|
@@ -1474,26 +1290,22 @@ ExportOperationSuccessMessage.propTypes = process.env.NODE_ENV !== "production"
|
|
|
1474
1290
|
isShown: PropTypes__default["default"].bool.isRequired
|
|
1475
1291
|
} : {};
|
|
1476
1292
|
|
|
1477
|
-
|
|
1478
|
-
|
|
1293
|
+
const _excluded = ["renderProperties"];
|
|
1479
1294
|
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; }
|
|
1480
|
-
|
|
1481
1295
|
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; }
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
var confirmationModal = applicationComponents.useModalState();
|
|
1489
|
-
var resourceTypePlural = resourceTypeToPlural({
|
|
1296
|
+
const ExportResourcesModal = _ref => {
|
|
1297
|
+
let renderProperties = _ref.renderProperties,
|
|
1298
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
1299
|
+
const intl = reactIntl.useIntl();
|
|
1300
|
+
const confirmationModal = applicationComponents.useModalState();
|
|
1301
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
1490
1302
|
resourceType: props.resourceType
|
|
1491
1303
|
});
|
|
1492
1304
|
return jsxRuntime.jsx(ExportResourcesContextProvider, _objectSpread(_objectSpread({}, props), {}, {
|
|
1493
1305
|
children: jsxRuntime.jsx(ExportResourcesContext.Consumer, {
|
|
1494
|
-
children:
|
|
1495
|
-
|
|
1496
|
-
|
|
1306
|
+
children: _ref2 => {
|
|
1307
|
+
let formik = _ref2.formik,
|
|
1308
|
+
exportOperationStarted = _ref2.exportOperationStarted;
|
|
1497
1309
|
return jsxRuntime.jsxs(applicationComponents.FormModalPage, {
|
|
1498
1310
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1499
1311
|
resourceType: resourceTypePlural
|
|
@@ -1524,7 +1336,6 @@ var ExportResourcesModal = function ExportResourcesModal(_ref) {
|
|
|
1524
1336
|
})
|
|
1525
1337
|
}));
|
|
1526
1338
|
};
|
|
1527
|
-
|
|
1528
1339
|
ExportResourcesModal.displayName = 'ExportResourcesModal';
|
|
1529
1340
|
ExportResourcesModal.propTypes = process.env.NODE_ENV !== "production" ? ExportResourcesModalShape : {};
|
|
1530
1341
|
ExportResourcesModal.defaultProps = {
|