@commercetools-frontend-extensions/export-resources-modal 1.3.1 → 1.3.3
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.
|
@@ -8,8 +8,8 @@ import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/obje
|
|
|
8
8
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
9
9
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
10
10
|
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
11
|
-
import { defineMessages,
|
|
12
|
-
import { PageContentNarrow, PageContentWide,
|
|
11
|
+
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
12
|
+
import { ConfirmationDialog, PageContentNarrow, PageContentWide, useModalState, FormModalPage } from '@commercetools-frontend/application-components';
|
|
13
13
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
14
14
|
import _flatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/flat';
|
|
15
15
|
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
@@ -22,42 +22,44 @@ import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possi
|
|
|
22
22
|
import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
23
23
|
import _wrapNativeSuper from '@babel/runtime-corejs3/helpers/esm/wrapNativeSuper';
|
|
24
24
|
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
25
|
-
import
|
|
26
|
-
import PropTypes from 'prop-types';
|
|
27
|
-
import { useFormik } from 'formik';
|
|
28
|
-
import moment from 'moment';
|
|
29
|
-
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
30
|
-
import { createContext, useState, useContext, Children } from 'react';
|
|
31
|
-
import { TextInput, Spacings, RadioInput, Text, CollapsiblePanel, Tag, AngleRightIcon, Constraints, SelectInput, customProperties as customProperties$1, Card, SelectField, TextField, CheckboxInput, ContentNotification, Link } from '@commercetools-frontend/ui-kit';
|
|
25
|
+
import { TextInput, Text, CollapsiblePanel, Tag, Spacings, AngleRightIcon, customProperties as customProperties$1, Constraints, SelectInput, Link, RadioInput, Card, SelectField, TextField, CheckboxInput } from '@commercetools-frontend/ui-kit';
|
|
32
26
|
import omitEmpty from 'omit-empty-es';
|
|
33
27
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
34
|
-
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
35
28
|
import { customProperties, useTheme } from '@commercetools-uikit/design-system';
|
|
29
|
+
import PropTypes from 'prop-types';
|
|
30
|
+
import { Children, useContext, createContext } from 'react';
|
|
36
31
|
import { css } from '@emotion/react';
|
|
37
32
|
import _styled from '@emotion/styled/base';
|
|
33
|
+
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
34
|
+
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
38
35
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
36
|
+
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
37
|
+
import { useShowNotification, showApiErrorNotification } from '@commercetools-frontend/actions-global';
|
|
38
|
+
import { useFormik } from 'formik';
|
|
39
|
+
import moment from 'moment';
|
|
41
40
|
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
const EXPORT_OPERATION_STATES = {
|
|
42
|
+
PROCESSING: 'processing',
|
|
43
|
+
COMPLETED: 'completed',
|
|
44
|
+
FAILED: 'failed'
|
|
46
45
|
};
|
|
46
|
+
|
|
47
47
|
const EXPORT_SELECTION_TYPES = {
|
|
48
48
|
ALL_RESOURCES: 'allResources',
|
|
49
49
|
ONLY_MATCHING: 'onlyMatching',
|
|
50
50
|
ONLY_SELECTED: 'onlySelected'
|
|
51
51
|
};
|
|
52
|
+
|
|
53
|
+
const EXPORTABLE_RESOURCES = {
|
|
54
|
+
CATEGORY: 'category',
|
|
55
|
+
PRODUCT: 'product',
|
|
56
|
+
DISCOUNT_CODE: 'discountCode'
|
|
57
|
+
};
|
|
58
|
+
|
|
52
59
|
const OUTPUT_FORMATS = {
|
|
53
60
|
JSON: 'json',
|
|
54
61
|
CSV: 'csv'
|
|
55
62
|
};
|
|
56
|
-
const EXPORT_OPERATION_STATES = {
|
|
57
|
-
PROCESSING: 'processing',
|
|
58
|
-
COMPLETED: 'completed',
|
|
59
|
-
FAILED: 'failed'
|
|
60
|
-
};
|
|
61
63
|
|
|
62
64
|
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); }; }
|
|
63
65
|
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; } }
|
|
@@ -153,6 +155,14 @@ function isFilledArray(maybeArray) {
|
|
|
153
155
|
return _Array$isArray(maybeArray) && maybeArray.length;
|
|
154
156
|
}
|
|
155
157
|
|
|
158
|
+
/*
|
|
159
|
+
* This function is responsible for constructing the GraphQL query based on the export settings
|
|
160
|
+
*
|
|
161
|
+
* Depending on the type of export selection (all resources, only selected, or only matching/filtered) it constructs different types of queries:
|
|
162
|
+
* - For 'all resources', it generates a query that fetches all fields and languages specified in the export settings.
|
|
163
|
+
* - For 'only selected', it creates a query that fetches only the fields and languages of the selected resources. The ids of the selected resources are included in the query.
|
|
164
|
+
* - The 'only matching' case is a placeholder for future development where a query will be constructed based on certain filtering criteria using the `where` parameter.
|
|
165
|
+
*/
|
|
156
166
|
function buildGraphQuery(exportSettings) {
|
|
157
167
|
var _context;
|
|
158
168
|
const operation = resourceTypeToOperationName(exportSettings.resourceType);
|
|
@@ -188,6 +198,21 @@ function buildGraphQuery(exportSettings) {
|
|
|
188
198
|
throw new UnexpectedSelectionTypeError(exportSettings.exportSelectionType);
|
|
189
199
|
}
|
|
190
200
|
}
|
|
201
|
+
|
|
202
|
+
/*
|
|
203
|
+
* This function builds the necessary field structure for our GraphQL queries, tt is specifically designed to handle different types of fields
|
|
204
|
+
*
|
|
205
|
+
* For fields whose values change depending on the language aka localised fields, a unique request format is used
|
|
206
|
+
* This format combines the field and the language, separated by '_____'. This approach is adopted as our system disallows the use of hyphens `-` in these situations
|
|
207
|
+
*
|
|
208
|
+
* Fields that don't vary by language but contain additional subfields (known as 'nested fields') are also addressed
|
|
209
|
+
* In these cases the function is used recursively on these subfields to generate the appropriate request.
|
|
210
|
+
*
|
|
211
|
+
* Overall, this function enables us to accurately request different types of data, including those varying by language or containing subfields.
|
|
212
|
+
*
|
|
213
|
+
* More details can be found in the related PR: https://github.com/commercetools/commercetools-exporter/pull/103
|
|
214
|
+
*/
|
|
215
|
+
|
|
191
216
|
function buildFields(_ref) {
|
|
192
217
|
var _context2;
|
|
193
218
|
let fields = _ref.fields,
|
|
@@ -195,7 +220,7 @@ function buildFields(_ref) {
|
|
|
195
220
|
return _flatInstanceProperty(_context2 = _mapInstanceProperty(fields).call(fields, field => {
|
|
196
221
|
if (field.isLocalized) return _mapInstanceProperty(languages).call(languages, language => {
|
|
197
222
|
var _context3, _context4, _context5;
|
|
198
|
-
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty(_context3 = "".concat(field.key, "
|
|
223
|
+
const alias = replaceSpecialCharsWithUnderscore(_concatInstanceProperty(_context3 = "".concat(field.key, "_____")).call(_context3, language));
|
|
199
224
|
return _concatInstanceProperty(_context4 = _concatInstanceProperty(_context5 = "".concat(alias, ": ")).call(_context5, field.key, "(locale: \"")).call(_context4, language, "\")");
|
|
200
225
|
});else {
|
|
201
226
|
if (isFilledArray(field.fields)) {
|
|
@@ -211,6 +236,22 @@ function buildFields(_ref) {
|
|
|
211
236
|
})).call(_context2);
|
|
212
237
|
}
|
|
213
238
|
|
|
239
|
+
function validate(values) {
|
|
240
|
+
const errors = {
|
|
241
|
+
fileName: {},
|
|
242
|
+
languages: {}
|
|
243
|
+
};
|
|
244
|
+
if (TextInput.isEmpty(values.fileName)) {
|
|
245
|
+
errors.fileName.missing = true;
|
|
246
|
+
} else if (!/^[a-zA-Z0-9-_]+$/.test(values.fileName)) {
|
|
247
|
+
errors.fileName.invalidInput = true;
|
|
248
|
+
}
|
|
249
|
+
if (values.languages.length < 1) {
|
|
250
|
+
errors.languages.missing = true;
|
|
251
|
+
}
|
|
252
|
+
return omitEmpty(errors);
|
|
253
|
+
}
|
|
254
|
+
|
|
214
255
|
var messages = defineMessages({
|
|
215
256
|
modalTitle: {
|
|
216
257
|
id: 'ExportResourcesModal.modalTitle',
|
|
@@ -325,7 +366,7 @@ var messages = defineMessages({
|
|
|
325
366
|
exportOperationSuccessMessage: {
|
|
326
367
|
id: 'ExportResourcesModal.exportOperationSuccessMessage',
|
|
327
368
|
description: 'Success message',
|
|
328
|
-
defaultMessage: 'Your export has started
|
|
369
|
+
defaultMessage: '<b>Your export has started.</b> <newline></newline><logsLink>Go to Export logs</logsLink> to view the progress and download the file.'
|
|
329
370
|
},
|
|
330
371
|
exportConfirmationLabel: {
|
|
331
372
|
id: 'ExportResourcesModal.exportConfirmationLabel',
|
|
@@ -364,122 +405,36 @@ var messages = defineMessages({
|
|
|
364
405
|
}
|
|
365
406
|
});
|
|
366
407
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
isOpen: PropTypes.bool.isRequired,
|
|
373
|
-
closeModal: PropTypes.func.isRequired,
|
|
374
|
-
allResourcesCount: PropTypes.number.isRequired,
|
|
375
|
-
matchingResourcesCount: PropTypes.number,
|
|
376
|
-
selectedResourceIds: PropTypes.array,
|
|
377
|
-
// TODO: Circular reference
|
|
378
|
-
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
379
|
-
key: PropTypes.string.isRequired,
|
|
380
|
-
label: PropTypes.string,
|
|
381
|
-
isLocalized: PropTypes.bool,
|
|
382
|
-
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
383
|
-
key: PropTypes.string.isRequired,
|
|
384
|
-
label: PropTypes.string,
|
|
385
|
-
isLocalized: PropTypes.bool
|
|
386
|
-
}))
|
|
387
|
-
})).isRequired,
|
|
388
|
-
exportSelectionType: PropTypes.string,
|
|
389
|
-
appliedSearchTerms: PropTypes.array,
|
|
390
|
-
appliedFilters: PropTypes.array,
|
|
391
|
-
renderProperties: PropTypes.func
|
|
392
|
-
}).isRequired;
|
|
393
|
-
|
|
394
|
-
function validate(values) {
|
|
395
|
-
const errors = {
|
|
396
|
-
fileName: {},
|
|
397
|
-
languages: {}
|
|
398
|
-
};
|
|
399
|
-
if (TextInput.isEmpty(values.fileName)) {
|
|
400
|
-
errors.fileName.missing = true;
|
|
401
|
-
} else if (!/^[a-zA-Z0-9-_]+$/.test(values.fileName)) {
|
|
402
|
-
errors.fileName.invalidInput = true;
|
|
403
|
-
}
|
|
404
|
-
if (values.languages.length < 1) {
|
|
405
|
-
errors.languages.missing = true;
|
|
406
|
-
}
|
|
407
|
-
return omitEmpty(errors);
|
|
408
|
-
}
|
|
409
|
-
|
|
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; }
|
|
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; }
|
|
412
|
-
const ExportResourcesContextProvider = props => {
|
|
413
|
-
var _context;
|
|
414
|
-
const todayFormatted = moment().format('DD-MM-YY_HH-mm');
|
|
415
|
-
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
416
|
-
language: applicationContext.dataLocale
|
|
417
|
-
})),
|
|
418
|
-
language = _useApplicationContex.language;
|
|
419
|
-
const formik = useFormik({
|
|
420
|
-
initialValues: {
|
|
421
|
-
outputFormat: props.outputFormat,
|
|
422
|
-
fileName: _concatInstanceProperty(_context = "".concat(resourceTypeToPlural({
|
|
423
|
-
resourceType: props.resourceType,
|
|
424
|
-
isUpperCase: true
|
|
425
|
-
}), "_Export_")).call(_context, todayFormatted),
|
|
426
|
-
languages: [language],
|
|
427
|
-
fields: props.fields,
|
|
428
|
-
appliedSearchTerms: props.appliedSearchTerms,
|
|
429
|
-
appliedFilters: props.appliedFilters,
|
|
430
|
-
exportSelectionType: props.exportSelectionType,
|
|
431
|
-
isAllLanguagesChecked: false
|
|
432
|
-
},
|
|
433
|
-
validate
|
|
434
|
-
});
|
|
435
|
-
const _useState = useState(false),
|
|
436
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
437
|
-
exportOperationStarted = _useState2[0],
|
|
438
|
-
setExportOperationStarted = _useState2[1];
|
|
439
|
-
return jsx(ExportResourcesContext.Provider, {
|
|
440
|
-
value: {
|
|
441
|
-
formik,
|
|
442
|
-
resourceType: props.resourceType,
|
|
443
|
-
allResourcesCount: props.allResourcesCount,
|
|
444
|
-
matchingResourcesCount: props.matchingResourcesCount,
|
|
445
|
-
selectedResourceIds: props.selectedResourceIds,
|
|
446
|
-
exportOperationStarted,
|
|
447
|
-
setExportOperationStarted
|
|
448
|
-
},
|
|
449
|
-
children: props.children
|
|
408
|
+
function getBold(msg) {
|
|
409
|
+
return jsx(Text.Body, {
|
|
410
|
+
as: "span",
|
|
411
|
+
isBold: true,
|
|
412
|
+
children: msg
|
|
450
413
|
});
|
|
451
|
-
}
|
|
452
|
-
ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
453
|
-
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$b(_objectSpread$b({}, ExportResourcesModalShape), {}, {
|
|
454
|
-
children: PropTypes.node
|
|
455
|
-
}) : {};
|
|
414
|
+
}
|
|
456
415
|
|
|
457
|
-
function
|
|
458
|
-
|
|
459
|
-
if (!context) {
|
|
460
|
-
throw new MissingExportResourceProviderError();
|
|
461
|
-
}
|
|
462
|
-
return context;
|
|
416
|
+
function getNewLine() {
|
|
417
|
+
return jsx("br", {});
|
|
463
418
|
}
|
|
464
419
|
|
|
465
420
|
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)."; }
|
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJMkIiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LXdyYXA6IHdyYXA7XG4gIGRpc3BsYXk6IGlubGluZS1mbGV4O1xuICBwYWRkaW5nOiAwICR7aXNOZXdUaGVtZSA/IDAgOiBjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbiAgJiA+
|
|
421
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJMkIiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LXdyYXA6IHdyYXA7XG4gIGRpc3BsYXk6IGlubGluZS1mbGV4O1xuICBwYWRkaW5nOiAwICR7aXNOZXdUaGVtZSA/IDAgOiBjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbiAgJiA+IGRpdiB7XG4gICAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdTfSAwO1xuICB9XG5gXG5cbmNvbnN0IHRhZ0xpc3RJdGVtID0gY3NzYFxuICBtYXJnaW46IDAgJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdYc30gJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdYc30gMDtcbiAgZGlzcGxheTogZmxleDtcbiAgbWluLXdpZHRoOiAwO1xuYFxuXG5jb25zdCBkaXZpZGVyID0gY3NzYFxuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICB3aWR0aDogMTAwJTtcbiAgbWFyZ2luOiAwO1xuICBib3JkZXI6IDA7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JOZXV0cmFsNjB9O1xuYFxuXG5jb25zdCBub3RCb2xkID0gY3NzYFxuICBmb250LXdlaWdodDogbm9ybWFsO1xuYFxuXG5jb25zdCBzdWNjZXNzTWVzc2FnZSA9IGNzc2BcbiAgbWFyZ2luLWJvdHRvbTogJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbmBcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG4iXX0= */");
|
|
467
422
|
const tagListContainer = _ref => {
|
|
468
423
|
let isNewTheme = _ref.isNewTheme;
|
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0QiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LXdyYXA6IHdyYXA7XG4gIGRpc3BsYXk6IGlubGluZS1mbGV4O1xuICBwYWRkaW5nOiAwICR7aXNOZXdUaGVtZSA/IDAgOiBjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbiAgJiA+
|
|
424
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0QiLCJmaWxlIjoic3R5bGVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nXG5cbmNvbnN0IHNtYWxsVG9wUGFkZGluZyA9IGNzc2BcbiAgcGFkZGluZy10b3A6ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9O1xuYFxuXG5jb25zdCB0YWdMaXN0Q29udGFpbmVyID0gKHsgaXNOZXdUaGVtZSB9KSA9PiBjc3NgXG4gIHdpZHRoOiAxMDAlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LXdyYXA6IHdyYXA7XG4gIGRpc3BsYXk6IGlubGluZS1mbGV4O1xuICBwYWRkaW5nOiAwICR7aXNOZXdUaGVtZSA/IDAgOiBjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbiAgJiA+IGRpdiB7XG4gICAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdTfSAwO1xuICB9XG5gXG5cbmNvbnN0IHRhZ0xpc3RJdGVtID0gY3NzYFxuICBtYXJnaW46IDAgJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdYc30gJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdYc30gMDtcbiAgZGlzcGxheTogZmxleDtcbiAgbWluLXdpZHRoOiAwO1xuYFxuXG5jb25zdCBkaXZpZGVyID0gY3NzYFxuICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICB3aWR0aDogMTAwJTtcbiAgbWFyZ2luOiAwO1xuICBib3JkZXI6IDA7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JOZXV0cmFsNjB9O1xuYFxuXG5jb25zdCBub3RCb2xkID0gY3NzYFxuICBmb250LXdlaWdodDogbm9ybWFsO1xuYFxuXG5jb25zdCBzdWNjZXNzTWVzc2FnZSA9IGNzc2BcbiAgbWFyZ2luLWJvdHRvbTogJHtjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdMfTtcbmBcblxuZXhwb3J0IGNvbnN0IHN0eWxlcyA9IHtcbiAgdGFnTGlzdEl0ZW0sXG4gIHRhZ0xpc3RDb250YWluZXIsXG4gIHNtYWxsVG9wUGFkZGluZyxcbiAgZGl2aWRlcixcbiAgbm90Qm9sZCxcbiAgc3VjY2Vzc01lc3NhZ2UsXG59XG4iXX0= */");
|
|
470
425
|
};
|
|
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,
|
|
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,
|
|
426
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQnVCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */");
|
|
427
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5Qm1CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */");
|
|
473
428
|
const notBold = process.env.NODE_ENV === "production" ? {
|
|
474
429
|
name: "lugakg",
|
|
475
430
|
styles: "font-weight:normal"
|
|
476
431
|
} : {
|
|
477
432
|
name: "w02aau-notBold",
|
|
478
433
|
styles: "font-weight:normal;label:notBold;",
|
|
479
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
434
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ21CIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */",
|
|
480
435
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
481
436
|
};
|
|
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,
|
|
437
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFxQzBCIiwiZmlsZSI6InN0eWxlcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIFRPRE86IEByZWRlc2lnbiBjbGVhbnVwXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMgfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJ1xuXG5jb25zdCBzbWFsbFRvcFBhZGRpbmcgPSBjc3NgXG4gIHBhZGRpbmctdG9wOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1hzfTtcbmBcblxuY29uc3QgdGFnTGlzdENvbnRhaW5lciA9ICh7IGlzTmV3VGhlbWUgfSkgPT4gY3NzYFxuICB3aWR0aDogMTAwJTtcbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC13cmFwOiB3cmFwO1xuICBkaXNwbGF5OiBpbmxpbmUtZmxleDtcbiAgcGFkZGluZzogMCAke2lzTmV3VGhlbWUgPyAwIDogY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG4gICYgPiBkaXYge1xuICAgIG1hcmdpbjogMCAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1N9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU30gMDtcbiAgfVxuYFxuXG5jb25zdCB0YWdMaXN0SXRlbSA9IGNzc2BcbiAgbWFyZ2luOiAwICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nWHN9IDA7XG4gIGRpc3BsYXk6IGZsZXg7XG4gIG1pbi13aWR0aDogMDtcbmBcblxuY29uc3QgZGl2aWRlciA9IGNzc2BcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgd2lkdGg6IDEwMCU7XG4gIG1hcmdpbjogMDtcbiAgYm9yZGVyOiAwO1xuICBib3JkZXItdG9wOiAxcHggc29saWQgJHtjdXN0b21Qcm9wZXJ0aWVzLmNvbG9yTmV1dHJhbDYwfTtcbmBcblxuY29uc3Qgbm90Qm9sZCA9IGNzc2BcbiAgZm9udC13ZWlnaHQ6IG5vcm1hbDtcbmBcblxuY29uc3Qgc3VjY2Vzc01lc3NhZ2UgPSBjc3NgXG4gIG1hcmdpbi1ib3R0b206ICR7Y3VzdG9tUHJvcGVydGllcy5zcGFjaW5nTH07XG5gXG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7XG4gIHRhZ0xpc3RJdGVtLFxuICB0YWdMaXN0Q29udGFpbmVyLFxuICBzbWFsbFRvcFBhZGRpbmcsXG4gIGRpdmlkZXIsXG4gIG5vdEJvbGQsXG4gIHN1Y2Nlc3NNZXNzYWdlLFxufVxuIl19 */");
|
|
483
438
|
const styles = {
|
|
484
439
|
tagListItem,
|
|
485
440
|
tagListContainer,
|
|
@@ -489,129 +444,6 @@ const styles = {
|
|
|
489
444
|
successMessage
|
|
490
445
|
};
|
|
491
446
|
|
|
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; }
|
|
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; }
|
|
494
|
-
function ExportSelectionRadioButtons() {
|
|
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({
|
|
505
|
-
resourceType: resourceType
|
|
506
|
-
});
|
|
507
|
-
return jsx(Spacings.Inline, {
|
|
508
|
-
scale: "xl",
|
|
509
|
-
children: jsxs(RadioInput.Group, {
|
|
510
|
-
name: "exportSelectionType",
|
|
511
|
-
value: _valuesInstanceProperty(formik).exportSelectionType,
|
|
512
|
-
direction: "inline",
|
|
513
|
-
directionProps: {
|
|
514
|
-
scale: 'xl'
|
|
515
|
-
},
|
|
516
|
-
onChange: formik.handleChange,
|
|
517
|
-
children: [jsx(RadioInput.Option, {
|
|
518
|
-
value: EXPORT_SELECTION_TYPES.ALL_RESOURCES,
|
|
519
|
-
"data-testid": 'test-all-resources',
|
|
520
|
-
children: jsx(Text.Body, {
|
|
521
|
-
isBold: !isNewTheme,
|
|
522
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.exportAllResources), {}, {
|
|
523
|
-
values: {
|
|
524
|
-
resourceType: resourceTypePlural,
|
|
525
|
-
count: allResourcesCount
|
|
526
|
-
}
|
|
527
|
-
})
|
|
528
|
-
})
|
|
529
|
-
}), jsx(RadioInput.Option, {
|
|
530
|
-
value: EXPORT_SELECTION_TYPES.ONLY_MATCHING,
|
|
531
|
-
"data-testid": 'test-only-matching',
|
|
532
|
-
isDisabled: !Boolean(matchingResourcesCount),
|
|
533
|
-
children: jsx(Text.Body, {
|
|
534
|
-
isBold: !isNewTheme,
|
|
535
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.exportOnlyMatchingResources), {}, {
|
|
536
|
-
values: {
|
|
537
|
-
count: matchingResourcesCount || intl.formatMessage(messages.nothingApplied)
|
|
538
|
-
}
|
|
539
|
-
})
|
|
540
|
-
})
|
|
541
|
-
}), jsx(RadioInput.Option, {
|
|
542
|
-
value: EXPORT_SELECTION_TYPES.ONLY_SELECTED,
|
|
543
|
-
"data-testid": 'test-only-selected',
|
|
544
|
-
isDisabled: !Boolean(selectedResourceIds.length),
|
|
545
|
-
children: jsx(Text.Body, {
|
|
546
|
-
isBold: !isNewTheme,
|
|
547
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.exportOnlySelectedResources), {}, {
|
|
548
|
-
values: {
|
|
549
|
-
resourceType: resourceTypePlural,
|
|
550
|
-
count: selectedResourceIds.length
|
|
551
|
-
}
|
|
552
|
-
})
|
|
553
|
-
})
|
|
554
|
-
})]
|
|
555
|
-
})
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
function getBold(msg) {
|
|
560
|
-
return jsx(Text.Body, {
|
|
561
|
-
as: "span",
|
|
562
|
-
isBold: true,
|
|
563
|
-
children: msg
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
|
|
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; }
|
|
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; }
|
|
569
|
-
function ExportTextMessage() {
|
|
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({
|
|
577
|
-
resourceType: resourceType
|
|
578
|
-
});
|
|
579
|
-
switch (_valuesInstanceProperty(formik).exportSelectionType) {
|
|
580
|
-
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
581
|
-
return jsx(Text.Body, {
|
|
582
|
-
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportAllMessage), {}, {
|
|
583
|
-
values: {
|
|
584
|
-
count: allResourcesCount,
|
|
585
|
-
resourceType: resourceTypePlural,
|
|
586
|
-
b: getBold
|
|
587
|
-
}
|
|
588
|
-
})
|
|
589
|
-
});
|
|
590
|
-
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
591
|
-
return jsx(Text.Body, {
|
|
592
|
-
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportMatchingMessage), {}, {
|
|
593
|
-
values: {
|
|
594
|
-
count: matchingResourcesCount,
|
|
595
|
-
resourceType: resourceTypePlural,
|
|
596
|
-
b: getBold
|
|
597
|
-
}
|
|
598
|
-
})
|
|
599
|
-
});
|
|
600
|
-
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
601
|
-
return jsx(Text.Body, {
|
|
602
|
-
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.exportSelectedMessage), {}, {
|
|
603
|
-
values: {
|
|
604
|
-
count: selectedResourceIds.length,
|
|
605
|
-
resourceType: resourceTypePlural,
|
|
606
|
-
b: getBold
|
|
607
|
-
}
|
|
608
|
-
})
|
|
609
|
-
});
|
|
610
|
-
default:
|
|
611
|
-
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty(formik).exportSelectionType);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
447
|
function TagList(props) {
|
|
616
448
|
const _useTheme = useTheme(),
|
|
617
449
|
isNewTheme = _useTheme.isNewTheme;
|
|
@@ -632,8 +464,8 @@ TagList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
632
464
|
'data-testid': PropTypes.string
|
|
633
465
|
} : {};
|
|
634
466
|
|
|
635
|
-
function ownKeys$
|
|
636
|
-
function _objectSpread$
|
|
467
|
+
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; }
|
|
468
|
+
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; }
|
|
637
469
|
function AppliedFilters(_ref) {
|
|
638
470
|
let filters = _ref.filters,
|
|
639
471
|
onFilterRemove = _ref.onFilterRemove;
|
|
@@ -643,7 +475,7 @@ function AppliedFilters(_ref) {
|
|
|
643
475
|
condensed: true,
|
|
644
476
|
isDefaultClosed: !Boolean(filters.length),
|
|
645
477
|
header: jsx(Text.Body, {
|
|
646
|
-
intlMessage: _objectSpread$
|
|
478
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.appliedFiltersMessage), {}, {
|
|
647
479
|
values: {
|
|
648
480
|
filtersCount: filters.length
|
|
649
481
|
}
|
|
@@ -672,7 +504,7 @@ function AppliedFilters(_ref) {
|
|
|
672
504
|
color: "neutral60"
|
|
673
505
|
}), jsx(Text.Body, {
|
|
674
506
|
isBold: true,
|
|
675
|
-
intlMessage: _objectSpread$
|
|
507
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages.appliedFiltersMessage), {}, {
|
|
676
508
|
values: {
|
|
677
509
|
filtersCount: filters.length
|
|
678
510
|
}
|
|
@@ -696,35 +528,14 @@ AppliedFilters.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
696
528
|
onFilterRemove: PropTypes.func.isRequired
|
|
697
529
|
} : {};
|
|
698
530
|
|
|
699
|
-
|
|
700
|
-
function
|
|
701
|
-
const _useTheme = useTheme(),
|
|
702
|
-
themedValue = _useTheme.themedValue;
|
|
703
|
-
return jsxs(Spacings.Inline, {
|
|
704
|
-
scale: "m",
|
|
705
|
-
alignItems: "center",
|
|
706
|
-
children: [jsx(Text.Body, {
|
|
707
|
-
intlMessage: messages.exportBasedOnMyViewsMessage
|
|
708
|
-
}), jsx(Text.Body, {
|
|
709
|
-
intlMessage: messages.myViews
|
|
710
|
-
}), jsx(Constraints.Horizontal, {
|
|
711
|
-
max: themedValue(4, 7),
|
|
712
|
-
children: jsx(SelectInput, {
|
|
713
|
-
isDisabled: true,
|
|
714
|
-
placeholder: "Default"
|
|
715
|
-
})
|
|
716
|
-
})]
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
|
|
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; }
|
|
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; }
|
|
531
|
+
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; }
|
|
532
|
+
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; }
|
|
722
533
|
const IconPlaceholder = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
723
|
-
target: "
|
|
534
|
+
target: "e1oion860"
|
|
724
535
|
} : {
|
|
725
|
-
target: "
|
|
536
|
+
target: "e1oion860",
|
|
726
537
|
label: "IconPlaceholder"
|
|
727
|
-
})("width:", customProperties$1.spacingM, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
538
|
+
})("width:", customProperties$1.spacingM, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcGxpZWQtc2VhcmNoLXRlcm1zLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFha0MiLCJmaWxlIjoiYXBwbGllZC1zZWFyY2gtdGVybXMuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogQHJlZGVzaWduIGNsZWFudXBcbmltcG9ydCB7IHVzZVRoZW1lIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvZGVzaWduLXN5c3RlbSdcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcydcbmltcG9ydCB7XG4gIEFuZ2xlUmlnaHRJY29uLFxuICBDb2xsYXBzaWJsZVBhbmVsLFxuICBjdXN0b21Qcm9wZXJ0aWVzLFxuICBTcGFjaW5ncyxcbiAgVGV4dCxcbn0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0J1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgbWVzc2FnZXMgZnJvbSAnLi4vbWVzc2FnZXMnXG5cbmNvbnN0IEljb25QbGFjZWhvbGRlciA9IHN0eWxlZC5kaXZgXG4gIHdpZHRoOiAke2N1c3RvbVByb3BlcnRpZXMuc3BhY2luZ019O1xuYFxuXG5leHBvcnQgZnVuY3Rpb24gQXBwbGllZFNlYXJjaFRlcm1zKHsgYXBwbGllZFNlYXJjaFRlcm1zIH0pIHtcbiAgY29uc3QgeyBpc05ld1RoZW1lIH0gPSB1c2VUaGVtZSgpXG5cbiAgaWYgKGlzTmV3VGhlbWUpXG4gICAgcmV0dXJuIChcbiAgICAgIDxDb2xsYXBzaWJsZVBhbmVsXG4gICAgICAgIGNvbmRlbnNlZFxuICAgICAgICBpc0RlZmF1bHRDbG9zZWQ9eyFCb29sZWFuKGFwcGxpZWRTZWFyY2hUZXJtcy5sZW5ndGgpfVxuICAgICAgICBoZWFkZXI9e1xuICAgICAgICAgIDxUZXh0LkJvZHlcbiAgICAgICAgICAgIGludGxNZXNzYWdlPXt7XG4gICAgICAgICAgICAgIC4uLm1lc3NhZ2VzLmFwcGxpZWRTZWFyY2hUZXJtc01lc3NhZ2UsXG4gICAgICAgICAgICAgIHZhbHVlczoge1xuICAgICAgICAgICAgICAgIHNlYXJjaFRlcm1zQ291bnQ6IGFwcGxpZWRTZWFyY2hUZXJtcy5sZW5ndGgsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9fVxuICAgICAgICAgIC8+XG4gICAgICAgIH1cbiAgICAgID5cbiAgICAgICAgPFRleHQuQm9keT57YXBwbGllZFNlYXJjaFRlcm1zLmpvaW4oJywgJyl9PC9UZXh0LkJvZHk+XG4gICAgICA8L0NvbGxhcHNpYmxlUGFuZWw+XG4gICAgKVxuICByZXR1cm4gKFxuICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cInNcIj5cbiAgICAgIDxTcGFjaW5ncy5JbmxpbmUgc2NhbGU9XCJzXCIgYWxpZ25JdGVtcz1cImZsZXgtc3RhcnRcIj5cbiAgICAgICAgPEFuZ2xlUmlnaHRJY29uXG4gICAgICAgICAgZGF0YS10ZXN0aWQ9XCJ0ZXN0LWFycm93UmlnaHRcIlxuICAgICAgICAgIHNpemU9XCJtZWRpdW1cIlxuICAgICAgICAgIGNvbG9yPVwibmV1dHJhbDYwXCJcbiAgICAgICAgLz5cbiAgICAgICAgPFRleHQuQm9keVxuICAgICAgICAgIGlzQm9sZFxuICAgICAgICAgIGludGxNZXNzYWdlPXt7XG4gICAgICAgICAgICAuLi5tZXNzYWdlcy5hcHBsaWVkU2VhcmNoVGVybXNNZXNzYWdlLFxuICAgICAgICAgICAgdmFsdWVzOiB7XG4gICAgICAgICAgICAgIHNlYXJjaFRlcm1zQ291bnQ6IGFwcGxpZWRTZWFyY2hUZXJtcy5sZW5ndGgsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH19XG4gICAgICAgIC8+XG4gICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgIDxTcGFjaW5ncy5JbmxpbmUgc2NhbGU9XCJzXCIgYWxpZ25JdGVtcz1cImZsZXgtc3RhcnRcIj5cbiAgICAgICAgPEljb25QbGFjZWhvbGRlciAvPlxuICAgICAgICA8VGV4dC5Cb2R5PnthcHBsaWVkU2VhcmNoVGVybXMuam9pbignLCAnKX08L1RleHQuQm9keT5cbiAgICAgIDwvU3BhY2luZ3MuSW5saW5lPlxuICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gIClcbn1cbkFwcGxpZWRTZWFyY2hUZXJtcy5wcm9wVHlwZXMgPSB7XG4gIGFwcGxpZWRTZWFyY2hUZXJtczogUHJvcFR5cGVzLmFycmF5LmlzUmVxdWlyZWQsXG59XG4iXX0= */"));
|
|
728
539
|
function AppliedSearchTerms(_ref) {
|
|
729
540
|
let appliedSearchTerms = _ref.appliedSearchTerms;
|
|
730
541
|
const _useTheme = useTheme(),
|
|
@@ -733,7 +544,7 @@ function AppliedSearchTerms(_ref) {
|
|
|
733
544
|
condensed: true,
|
|
734
545
|
isDefaultClosed: !Boolean(appliedSearchTerms.length),
|
|
735
546
|
header: jsx(Text.Body, {
|
|
736
|
-
intlMessage: _objectSpread$
|
|
547
|
+
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.appliedSearchTermsMessage), {}, {
|
|
737
548
|
values: {
|
|
738
549
|
searchTermsCount: appliedSearchTerms.length
|
|
739
550
|
}
|
|
@@ -754,7 +565,7 @@ function AppliedSearchTerms(_ref) {
|
|
|
754
565
|
color: "neutral60"
|
|
755
566
|
}), jsx(Text.Body, {
|
|
756
567
|
isBold: true,
|
|
757
|
-
intlMessage: _objectSpread$
|
|
568
|
+
intlMessage: _objectSpread$9(_objectSpread$9({}, messages.appliedSearchTermsMessage), {}, {
|
|
758
569
|
values: {
|
|
759
570
|
searchTermsCount: appliedSearchTerms.length
|
|
760
571
|
}
|
|
@@ -773,6 +584,189 @@ AppliedSearchTerms.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
773
584
|
appliedSearchTerms: PropTypes.array.isRequired
|
|
774
585
|
} : {};
|
|
775
586
|
|
|
587
|
+
// TODO: @redesign cleanup
|
|
588
|
+
function ExportBasedOnMyViewsSelectField() {
|
|
589
|
+
const _useTheme = useTheme(),
|
|
590
|
+
themedValue = _useTheme.themedValue;
|
|
591
|
+
return jsxs(Spacings.Inline, {
|
|
592
|
+
scale: "m",
|
|
593
|
+
alignItems: "center",
|
|
594
|
+
children: [jsx(Text.Body, {
|
|
595
|
+
intlMessage: messages.exportBasedOnMyViewsMessage
|
|
596
|
+
}), jsx(Text.Body, {
|
|
597
|
+
intlMessage: messages.myViews
|
|
598
|
+
}), jsx(Constraints.Horizontal, {
|
|
599
|
+
max: themedValue(4, 7),
|
|
600
|
+
children: jsx(SelectInput, {
|
|
601
|
+
isDisabled: true,
|
|
602
|
+
placeholder: "Default"
|
|
603
|
+
})
|
|
604
|
+
})]
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
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; }
|
|
609
|
+
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; }
|
|
610
|
+
function renderFileNameError(key) {
|
|
611
|
+
switch (key) {
|
|
612
|
+
case 'missing':
|
|
613
|
+
return jsx(FormattedMessage, _objectSpread$8({}, messages.missingFileNameError));
|
|
614
|
+
case 'invalidInput':
|
|
615
|
+
return jsx(FormattedMessage, _objectSpread$8({}, messages.invalidFileNameError));
|
|
616
|
+
default:
|
|
617
|
+
return null;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
function renderLanguageError(key) {
|
|
621
|
+
switch (key) {
|
|
622
|
+
case 'missing':
|
|
623
|
+
return jsx(FormattedMessage, _objectSpread$8({}, messages.missingLanguageError));
|
|
624
|
+
default:
|
|
625
|
+
return null;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
function useExportResourcesContext() {
|
|
630
|
+
const context = useContext(ExportResourcesContext);
|
|
631
|
+
if (!context) {
|
|
632
|
+
throw new MissingExportResourceProviderError();
|
|
633
|
+
}
|
|
634
|
+
return context;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
async function createExportOperation(_ref) {
|
|
638
|
+
let projectKey = _ref.projectKey,
|
|
639
|
+
graphQuery = _ref.graphQuery,
|
|
640
|
+
asyncDispatchFn = _ref.asyncDispatchFn;
|
|
641
|
+
const uri = "/proxy/export/".concat(projectKey, "/export-operations");
|
|
642
|
+
const response = await asyncDispatchFn(actions.post({
|
|
643
|
+
// FIXME: EXPORT is undefined
|
|
644
|
+
mcApiProxyTarget: MC_API_PROXY_TARGETS.EXPORT,
|
|
645
|
+
uri: uri,
|
|
646
|
+
headers: {
|
|
647
|
+
accept: 'application/json'
|
|
648
|
+
},
|
|
649
|
+
payload: {
|
|
650
|
+
query: graphQuery
|
|
651
|
+
}
|
|
652
|
+
}));
|
|
653
|
+
return response;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
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; }
|
|
657
|
+
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; }
|
|
658
|
+
const getExportLogsLink = (projectKey, msg) => jsx(Link, {
|
|
659
|
+
to: "/".concat(projectKey, "/operations/export/logs"),
|
|
660
|
+
children: msg
|
|
661
|
+
});
|
|
662
|
+
function ExportConfirmationModal(props) {
|
|
663
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
664
|
+
var _applicationContext$p, _applicationContext$p2;
|
|
665
|
+
return {
|
|
666
|
+
projectName: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.name,
|
|
667
|
+
projectKey: (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.key
|
|
668
|
+
};
|
|
669
|
+
}),
|
|
670
|
+
projectName = _useApplicationContex.projectName,
|
|
671
|
+
projectKey = _useApplicationContex.projectKey;
|
|
672
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
673
|
+
formik = _useExportResourcesCo.formik,
|
|
674
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
675
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
676
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
677
|
+
resourceType = _useExportResourcesCo.resourceType;
|
|
678
|
+
const showNotification = useShowNotification();
|
|
679
|
+
const intl = useIntl();
|
|
680
|
+
const asyncDispatch = useAsyncDispatch();
|
|
681
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
682
|
+
resourceType: props.resourceType
|
|
683
|
+
});
|
|
684
|
+
const countInConfirmationMessage = () => {
|
|
685
|
+
switch (_valuesInstanceProperty(formik).exportSelectionType) {
|
|
686
|
+
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
687
|
+
return allResourcesCount;
|
|
688
|
+
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
689
|
+
return matchingResourcesCount;
|
|
690
|
+
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
691
|
+
return selectedResourceIds.length;
|
|
692
|
+
default:
|
|
693
|
+
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty(formik).exportSelectionType);
|
|
694
|
+
}
|
|
695
|
+
};
|
|
696
|
+
return jsx(ConfirmationDialog, {
|
|
697
|
+
dataAttributesPrimaryButton: {
|
|
698
|
+
'data-testid': 'confirm-export-button'
|
|
699
|
+
},
|
|
700
|
+
title: intl.formatMessage(messages.confirmationTitle, {
|
|
701
|
+
resourceType: resourceTypePlural
|
|
702
|
+
}),
|
|
703
|
+
labelPrimary: intl.formatMessage(messages.exportConfirmationLabel, {
|
|
704
|
+
resourceType: resourceTypePlural
|
|
705
|
+
}),
|
|
706
|
+
isOpen: props.isOpen,
|
|
707
|
+
onClose: props.closeModal,
|
|
708
|
+
onCancel: props.closeModal,
|
|
709
|
+
onConfirm: async () => {
|
|
710
|
+
const graphQuery = buildGraphQuery({
|
|
711
|
+
resourceType: resourceType,
|
|
712
|
+
selectedResourceIds: selectedResourceIds,
|
|
713
|
+
fields: _valuesInstanceProperty(formik).fields,
|
|
714
|
+
exportSelectionType: _valuesInstanceProperty(formik).exportSelectionType,
|
|
715
|
+
languages: _valuesInstanceProperty(formik).languages
|
|
716
|
+
});
|
|
717
|
+
props.closeModal();
|
|
718
|
+
try {
|
|
719
|
+
const response = await createExportOperation({
|
|
720
|
+
projectKey,
|
|
721
|
+
graphQuery,
|
|
722
|
+
asyncDispatchFn: asyncDispatch
|
|
723
|
+
});
|
|
724
|
+
switch (response.state) {
|
|
725
|
+
case EXPORT_OPERATION_STATES.PROCESSING:
|
|
726
|
+
case EXPORT_OPERATION_STATES.COMPLETED:
|
|
727
|
+
showNotification({
|
|
728
|
+
kind: 'success',
|
|
729
|
+
domain: DOMAINS.SIDE,
|
|
730
|
+
text: intl.formatMessage(messages.exportOperationSuccessMessage, {
|
|
731
|
+
newline: getNewLine,
|
|
732
|
+
logsLink: msg => getExportLogsLink(projectKey, msg),
|
|
733
|
+
b: getBold
|
|
734
|
+
})
|
|
735
|
+
});
|
|
736
|
+
props.onCloseParentModal();
|
|
737
|
+
break;
|
|
738
|
+
default:
|
|
739
|
+
throw new UnexpectedExportOperationStateError(response.state);
|
|
740
|
+
}
|
|
741
|
+
} catch (errors) {
|
|
742
|
+
showApiErrorNotification({
|
|
743
|
+
errors
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
children: jsxs("div", {
|
|
748
|
+
children: [jsx(Text.Body, {
|
|
749
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages.confirmationBodyPlan), {}, {
|
|
750
|
+
values: {
|
|
751
|
+
resourceType: resourceTypePlural,
|
|
752
|
+
projectName: projectName,
|
|
753
|
+
count: countInConfirmationMessage(),
|
|
754
|
+
bold: getBold
|
|
755
|
+
}
|
|
756
|
+
})
|
|
757
|
+
}), jsx(Text.Body, {
|
|
758
|
+
intlMessage: messages.confirmationBodyQuestion
|
|
759
|
+
})]
|
|
760
|
+
})
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
764
|
+
isOpen: PropTypes.bool.isRequired,
|
|
765
|
+
resourceType: PropTypes.string.isRequired,
|
|
766
|
+
closeModal: PropTypes.func.isRequired,
|
|
767
|
+
onCloseParentModal: PropTypes.func.isRequired
|
|
768
|
+
} : {};
|
|
769
|
+
|
|
776
770
|
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; }
|
|
777
771
|
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; }
|
|
778
772
|
function normalizeFields(fields) {
|
|
@@ -834,28 +828,143 @@ function ExportFields(_ref2) {
|
|
|
834
828
|
isBold: true,
|
|
835
829
|
intlMessage: _objectSpread$6(_objectSpread$6({}, messages.columnsMessage), {}, {
|
|
836
830
|
values: {
|
|
837
|
-
columnsCount: fields.length
|
|
831
|
+
columnsCount: fields.length
|
|
832
|
+
}
|
|
833
|
+
})
|
|
834
|
+
})]
|
|
835
|
+
}), jsx(FieldsRenderer, {
|
|
836
|
+
fields: fields
|
|
837
|
+
})]
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
841
|
+
// TODO: Circular reference
|
|
842
|
+
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
843
|
+
key: PropTypes.string.isRequired,
|
|
844
|
+
label: PropTypes.string,
|
|
845
|
+
isLocalized: PropTypes.bool,
|
|
846
|
+
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
847
|
+
key: PropTypes.string.isRequired,
|
|
848
|
+
label: PropTypes.string,
|
|
849
|
+
isLocalized: PropTypes.bool
|
|
850
|
+
}))
|
|
851
|
+
})).isRequired
|
|
852
|
+
} : {};
|
|
853
|
+
|
|
854
|
+
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; }
|
|
855
|
+
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; }
|
|
856
|
+
function ExportSelectionRadioButtons() {
|
|
857
|
+
const _useTheme = useTheme(),
|
|
858
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
859
|
+
const intl = useIntl();
|
|
860
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
861
|
+
formik = _useExportResourcesCo.formik,
|
|
862
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
863
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
864
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
865
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds;
|
|
866
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
867
|
+
resourceType: resourceType
|
|
868
|
+
});
|
|
869
|
+
return jsx(Spacings.Inline, {
|
|
870
|
+
scale: "xl",
|
|
871
|
+
children: jsxs(RadioInput.Group, {
|
|
872
|
+
name: "exportSelectionType",
|
|
873
|
+
value: _valuesInstanceProperty(formik).exportSelectionType,
|
|
874
|
+
direction: "inline",
|
|
875
|
+
directionProps: {
|
|
876
|
+
scale: 'xl'
|
|
877
|
+
},
|
|
878
|
+
onChange: formik.handleChange,
|
|
879
|
+
children: [jsx(RadioInput.Option, {
|
|
880
|
+
value: EXPORT_SELECTION_TYPES.ALL_RESOURCES,
|
|
881
|
+
"data-testid": 'test-all-resources',
|
|
882
|
+
children: jsx(Text.Body, {
|
|
883
|
+
isBold: !isNewTheme,
|
|
884
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages.exportAllResources), {}, {
|
|
885
|
+
values: {
|
|
886
|
+
resourceType: resourceTypePlural,
|
|
887
|
+
count: allResourcesCount
|
|
888
|
+
}
|
|
889
|
+
})
|
|
890
|
+
})
|
|
891
|
+
}), jsx(RadioInput.Option, {
|
|
892
|
+
value: EXPORT_SELECTION_TYPES.ONLY_MATCHING,
|
|
893
|
+
"data-testid": 'test-only-matching',
|
|
894
|
+
isDisabled: !Boolean(matchingResourcesCount),
|
|
895
|
+
children: jsx(Text.Body, {
|
|
896
|
+
isBold: !isNewTheme,
|
|
897
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages.exportOnlyMatchingResources), {}, {
|
|
898
|
+
values: {
|
|
899
|
+
count: matchingResourcesCount || intl.formatMessage(messages.nothingApplied)
|
|
900
|
+
}
|
|
901
|
+
})
|
|
902
|
+
})
|
|
903
|
+
}), jsx(RadioInput.Option, {
|
|
904
|
+
value: EXPORT_SELECTION_TYPES.ONLY_SELECTED,
|
|
905
|
+
"data-testid": 'test-only-selected',
|
|
906
|
+
isDisabled: !Boolean(selectedResourceIds.length),
|
|
907
|
+
children: jsx(Text.Body, {
|
|
908
|
+
isBold: !isNewTheme,
|
|
909
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages.exportOnlySelectedResources), {}, {
|
|
910
|
+
values: {
|
|
911
|
+
resourceType: resourceTypePlural,
|
|
912
|
+
count: selectedResourceIds.length
|
|
913
|
+
}
|
|
914
|
+
})
|
|
915
|
+
})
|
|
916
|
+
})]
|
|
917
|
+
})
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
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; }
|
|
922
|
+
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; }
|
|
923
|
+
function ExportTextMessage() {
|
|
924
|
+
const _useExportResourcesCo = useExportResourcesContext(),
|
|
925
|
+
resourceType = _useExportResourcesCo.resourceType,
|
|
926
|
+
allResourcesCount = _useExportResourcesCo.allResourcesCount,
|
|
927
|
+
selectedResourceIds = _useExportResourcesCo.selectedResourceIds,
|
|
928
|
+
matchingResourcesCount = _useExportResourcesCo.matchingResourcesCount,
|
|
929
|
+
formik = _useExportResourcesCo.formik;
|
|
930
|
+
const resourceTypePlural = resourceTypeToPlural({
|
|
931
|
+
resourceType: resourceType
|
|
932
|
+
});
|
|
933
|
+
switch (_valuesInstanceProperty(formik).exportSelectionType) {
|
|
934
|
+
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
935
|
+
return jsx(Text.Body, {
|
|
936
|
+
intlMessage: _objectSpread$4(_objectSpread$4({}, messages.exportAllMessage), {}, {
|
|
937
|
+
values: {
|
|
938
|
+
count: allResourcesCount,
|
|
939
|
+
resourceType: resourceTypePlural,
|
|
940
|
+
b: getBold
|
|
941
|
+
}
|
|
942
|
+
})
|
|
943
|
+
});
|
|
944
|
+
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
945
|
+
return jsx(Text.Body, {
|
|
946
|
+
intlMessage: _objectSpread$4(_objectSpread$4({}, messages.exportMatchingMessage), {}, {
|
|
947
|
+
values: {
|
|
948
|
+
count: matchingResourcesCount,
|
|
949
|
+
resourceType: resourceTypePlural,
|
|
950
|
+
b: getBold
|
|
838
951
|
}
|
|
839
952
|
})
|
|
840
|
-
})
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
953
|
+
});
|
|
954
|
+
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
955
|
+
return jsx(Text.Body, {
|
|
956
|
+
intlMessage: _objectSpread$4(_objectSpread$4({}, messages.exportSelectedMessage), {}, {
|
|
957
|
+
values: {
|
|
958
|
+
count: selectedResourceIds.length,
|
|
959
|
+
resourceType: resourceTypePlural,
|
|
960
|
+
b: getBold
|
|
961
|
+
}
|
|
962
|
+
})
|
|
963
|
+
});
|
|
964
|
+
default:
|
|
965
|
+
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty(formik).exportSelectionType);
|
|
966
|
+
}
|
|
845
967
|
}
|
|
846
|
-
ExportFields.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
847
|
-
// TODO: Circular reference
|
|
848
|
-
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
849
|
-
key: PropTypes.string.isRequired,
|
|
850
|
-
label: PropTypes.string,
|
|
851
|
-
isLocalized: PropTypes.bool,
|
|
852
|
-
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
853
|
-
key: PropTypes.string.isRequired,
|
|
854
|
-
label: PropTypes.string,
|
|
855
|
-
isLocalized: PropTypes.bool
|
|
856
|
-
}))
|
|
857
|
-
})).isRequired
|
|
858
|
-
} : {};
|
|
859
968
|
|
|
860
969
|
const ExportSelection = () => {
|
|
861
970
|
const _useTheme = useTheme(),
|
|
@@ -919,8 +1028,8 @@ const ExportSelection = () => {
|
|
|
919
1028
|
});
|
|
920
1029
|
};
|
|
921
1030
|
|
|
922
|
-
function ownKeys$
|
|
923
|
-
function _objectSpread$
|
|
1031
|
+
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; }
|
|
1032
|
+
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; }
|
|
924
1033
|
const ExportProperties = props => {
|
|
925
1034
|
const _useTheme = useTheme(),
|
|
926
1035
|
isNewTheme = _useTheme.isNewTheme;
|
|
@@ -937,7 +1046,7 @@ const ExportProperties = props => {
|
|
|
937
1046
|
return jsx(CollapsiblePanel, {
|
|
938
1047
|
header: jsx(Text.Body, {
|
|
939
1048
|
isBold: true,
|
|
940
|
-
intlMessage: _objectSpread$
|
|
1049
|
+
intlMessage: _objectSpread$3({}, messages.propertiesPanelLabel)
|
|
941
1050
|
}),
|
|
942
1051
|
children: props.renderProperties()
|
|
943
1052
|
});
|
|
@@ -946,29 +1055,8 @@ ExportProperties.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
946
1055
|
renderProperties: PropTypes.func
|
|
947
1056
|
} : {};
|
|
948
1057
|
|
|
949
|
-
function ownKeys$
|
|
950
|
-
function _objectSpread$
|
|
951
|
-
function renderFileNameError(key) {
|
|
952
|
-
switch (key) {
|
|
953
|
-
case 'missing':
|
|
954
|
-
return jsx(FormattedMessage, _objectSpread$4({}, messages.missingFileNameError));
|
|
955
|
-
case 'invalidInput':
|
|
956
|
-
return jsx(FormattedMessage, _objectSpread$4({}, messages.invalidFileNameError));
|
|
957
|
-
default:
|
|
958
|
-
return null;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
function renderLanguageError(key) {
|
|
962
|
-
switch (key) {
|
|
963
|
-
case 'missing':
|
|
964
|
-
return jsx(FormattedMessage, _objectSpread$4({}, messages.missingLanguageError));
|
|
965
|
-
default:
|
|
966
|
-
return null;
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
|
|
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; }
|
|
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; }
|
|
1058
|
+
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; }
|
|
1059
|
+
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; }
|
|
972
1060
|
const outputFormatOptions = [{
|
|
973
1061
|
value: OUTPUT_FORMATS.JSON,
|
|
974
1062
|
label: 'JSON'
|
|
@@ -1002,12 +1090,12 @@ function ExportFileSettings(props) {
|
|
|
1002
1090
|
children: [jsx(PageContentNarrow, {
|
|
1003
1091
|
children: jsxs(Spacings.Stack, {
|
|
1004
1092
|
scale: "xl",
|
|
1005
|
-
children: [jsx(SelectField, _objectSpread$
|
|
1093
|
+
children: [jsx(SelectField, _objectSpread$2(_objectSpread$2({
|
|
1006
1094
|
isDisabled: true
|
|
1007
1095
|
}, formik.getFieldProps('outputFormat')), {}, {
|
|
1008
1096
|
title: intl.formatMessage(messages.outputFormat),
|
|
1009
1097
|
options: outputFormatOptions
|
|
1010
|
-
})), jsx(TextField, _objectSpread$
|
|
1098
|
+
})), jsx(TextField, _objectSpread$2(_objectSpread$2({
|
|
1011
1099
|
title: intl.formatMessage(messages.fileName)
|
|
1012
1100
|
}, formik.getFieldProps('fileName')), {}, {
|
|
1013
1101
|
touched: formik.touched.fileName,
|
|
@@ -1015,7 +1103,7 @@ function ExportFileSettings(props) {
|
|
|
1015
1103
|
renderError: renderFileNameError
|
|
1016
1104
|
})), jsxs(Spacings.Stack, {
|
|
1017
1105
|
scale: "xs",
|
|
1018
|
-
children: [jsx(SelectField, _objectSpread$
|
|
1106
|
+
children: [jsx(SelectField, _objectSpread$2(_objectSpread$2({
|
|
1019
1107
|
id: "languages",
|
|
1020
1108
|
title: intl.formatMessage(messages.localLanguage),
|
|
1021
1109
|
options: mapLanguagesToOptions(languages),
|
|
@@ -1052,13 +1140,13 @@ function ExportFileSettings(props) {
|
|
|
1052
1140
|
scale: "l",
|
|
1053
1141
|
children: [jsxs(Spacings.Inline, {
|
|
1054
1142
|
scale: "l",
|
|
1055
|
-
children: [jsx(SelectField, _objectSpread$
|
|
1143
|
+
children: [jsx(SelectField, _objectSpread$2(_objectSpread$2({
|
|
1056
1144
|
isDisabled: true
|
|
1057
1145
|
}, formik.getFieldProps('outputFormat')), {}, {
|
|
1058
1146
|
title: intl.formatMessage(messages.outputFormat),
|
|
1059
1147
|
options: outputFormatOptions,
|
|
1060
1148
|
horizontalConstraint: 7
|
|
1061
|
-
})), jsx(TextField, _objectSpread$
|
|
1149
|
+
})), jsx(TextField, _objectSpread$2(_objectSpread$2({
|
|
1062
1150
|
title: intl.formatMessage(messages.fileName)
|
|
1063
1151
|
}, formik.getFieldProps('fileName')), {}, {
|
|
1064
1152
|
touched: formik.touched.fileName,
|
|
@@ -1067,7 +1155,7 @@ function ExportFileSettings(props) {
|
|
|
1067
1155
|
horizontalConstraint: 7
|
|
1068
1156
|
}))]
|
|
1069
1157
|
}), jsx(Spacings.Inline, {
|
|
1070
|
-
children: jsx(SelectField, _objectSpread$
|
|
1158
|
+
children: jsx(SelectField, _objectSpread$2(_objectSpread$2({
|
|
1071
1159
|
id: "languages",
|
|
1072
1160
|
title: jsxs(Spacings.Inline, {
|
|
1073
1161
|
scale: "s",
|
|
@@ -1109,161 +1197,73 @@ ExportFileSettings.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1109
1197
|
renderProperties: PropTypes.func
|
|
1110
1198
|
} : {};
|
|
1111
1199
|
|
|
1112
|
-
|
|
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
|
-
}
|
|
1127
|
-
}));
|
|
1128
|
-
return response;
|
|
1129
|
-
}
|
|
1200
|
+
const ExportResourcesContext = /*#__PURE__*/createContext();
|
|
1130
1201
|
|
|
1131
|
-
|
|
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; }
|
|
1133
|
-
function ExportConfirmationModal(props) {
|
|
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({
|
|
1153
|
-
resourceType: props.resourceType
|
|
1154
|
-
});
|
|
1155
|
-
const countInConfirmationMessage = () => {
|
|
1156
|
-
switch (_valuesInstanceProperty(formik).exportSelectionType) {
|
|
1157
|
-
case EXPORT_SELECTION_TYPES.ALL_RESOURCES:
|
|
1158
|
-
return allResourcesCount;
|
|
1159
|
-
case EXPORT_SELECTION_TYPES.ONLY_MATCHING:
|
|
1160
|
-
return matchingResourcesCount;
|
|
1161
|
-
case EXPORT_SELECTION_TYPES.ONLY_SELECTED:
|
|
1162
|
-
return selectedResourceIds.length;
|
|
1163
|
-
default:
|
|
1164
|
-
throw new UnexpectedSelectionTypeError(_valuesInstanceProperty(formik).exportSelectionType);
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
return jsx(ConfirmationDialog, {
|
|
1168
|
-
dataAttributesPrimaryButton: {
|
|
1169
|
-
'data-testid': 'confirm-export-button'
|
|
1170
|
-
},
|
|
1171
|
-
title: intl.formatMessage(messages.confirmationTitle, {
|
|
1172
|
-
resourceType: resourceTypePlural
|
|
1173
|
-
}),
|
|
1174
|
-
labelPrimary: intl.formatMessage(messages.exportConfirmationLabel, {
|
|
1175
|
-
resourceType: resourceTypePlural
|
|
1176
|
-
}),
|
|
1177
|
-
isOpen: props.isOpen,
|
|
1178
|
-
onClose: props.closeModal,
|
|
1179
|
-
onCancel: props.closeModal,
|
|
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:
|
|
1199
|
-
setExportOperationStarted(true);
|
|
1200
|
-
break;
|
|
1201
|
-
default:
|
|
1202
|
-
throw new UnexpectedExportOperationStateError(response.state);
|
|
1203
|
-
}
|
|
1204
|
-
} catch (errors) {
|
|
1205
|
-
showApiErrorNotification({
|
|
1206
|
-
errors
|
|
1207
|
-
});
|
|
1208
|
-
}
|
|
1209
|
-
},
|
|
1210
|
-
children: jsxs("div", {
|
|
1211
|
-
children: [jsx(Text.Body, {
|
|
1212
|
-
intlMessage: _objectSpread$2(_objectSpread$2({}, messages.confirmationBodyPlan), {}, {
|
|
1213
|
-
values: {
|
|
1214
|
-
resourceType: resourceTypePlural,
|
|
1215
|
-
projectName: projectName,
|
|
1216
|
-
count: countInConfirmationMessage(),
|
|
1217
|
-
bold: getBold
|
|
1218
|
-
}
|
|
1219
|
-
})
|
|
1220
|
-
}), jsx(Text.Body, {
|
|
1221
|
-
intlMessage: messages.confirmationBodyQuestion
|
|
1222
|
-
})]
|
|
1223
|
-
})
|
|
1224
|
-
});
|
|
1225
|
-
}
|
|
1226
|
-
ExportConfirmationModal.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1227
|
-
isOpen: PropTypes.bool.isRequired,
|
|
1202
|
+
const ExportResourcesModalShape = PropTypes.shape({
|
|
1228
1203
|
resourceType: PropTypes.string.isRequired,
|
|
1229
|
-
|
|
1230
|
-
|
|
1204
|
+
outputFormat: PropTypes.string,
|
|
1205
|
+
isOpen: PropTypes.bool.isRequired,
|
|
1206
|
+
closeModal: PropTypes.func.isRequired,
|
|
1207
|
+
allResourcesCount: PropTypes.number.isRequired,
|
|
1208
|
+
matchingResourcesCount: PropTypes.number,
|
|
1209
|
+
selectedResourceIds: PropTypes.array,
|
|
1210
|
+
// TODO: Circular reference
|
|
1211
|
+
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
1212
|
+
key: PropTypes.string.isRequired,
|
|
1213
|
+
label: PropTypes.string,
|
|
1214
|
+
isLocalized: PropTypes.bool,
|
|
1215
|
+
fields: PropTypes.arrayOf(PropTypes.shape({
|
|
1216
|
+
key: PropTypes.string.isRequired,
|
|
1217
|
+
label: PropTypes.string,
|
|
1218
|
+
isLocalized: PropTypes.bool
|
|
1219
|
+
}))
|
|
1220
|
+
})).isRequired,
|
|
1221
|
+
exportSelectionType: PropTypes.string,
|
|
1222
|
+
appliedSearchTerms: PropTypes.array,
|
|
1223
|
+
appliedFilters: PropTypes.array,
|
|
1224
|
+
renderProperties: PropTypes.func
|
|
1225
|
+
}).isRequired;
|
|
1231
1226
|
|
|
1232
1227
|
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; }
|
|
1233
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
values: {
|
|
1257
|
-
logsLink: msg => getExportLogsLink(projectKey, msg)
|
|
1258
|
-
}
|
|
1259
|
-
})
|
|
1260
|
-
})
|
|
1261
|
-
})
|
|
1228
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1229
|
+
const ExportResourcesContextProvider = props => {
|
|
1230
|
+
var _context;
|
|
1231
|
+
const todayFormatted = moment().format('DD-MM-YY_HH-mm');
|
|
1232
|
+
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
1233
|
+
language: applicationContext.dataLocale
|
|
1234
|
+
})),
|
|
1235
|
+
language = _useApplicationContex.language;
|
|
1236
|
+
const formik = useFormik({
|
|
1237
|
+
initialValues: {
|
|
1238
|
+
outputFormat: props.outputFormat,
|
|
1239
|
+
fileName: _concatInstanceProperty(_context = "".concat(resourceTypeToPlural({
|
|
1240
|
+
resourceType: props.resourceType,
|
|
1241
|
+
isUpperCase: true
|
|
1242
|
+
}), "_Export_")).call(_context, todayFormatted),
|
|
1243
|
+
languages: [language],
|
|
1244
|
+
fields: props.fields,
|
|
1245
|
+
appliedSearchTerms: props.appliedSearchTerms,
|
|
1246
|
+
appliedFilters: props.appliedFilters,
|
|
1247
|
+
exportSelectionType: props.exportSelectionType,
|
|
1248
|
+
isAllLanguagesChecked: false
|
|
1249
|
+
},
|
|
1250
|
+
validate
|
|
1262
1251
|
});
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1252
|
+
return jsx(ExportResourcesContext.Provider, {
|
|
1253
|
+
value: {
|
|
1254
|
+
formik,
|
|
1255
|
+
resourceType: props.resourceType,
|
|
1256
|
+
allResourcesCount: props.allResourcesCount,
|
|
1257
|
+
matchingResourcesCount: props.matchingResourcesCount,
|
|
1258
|
+
selectedResourceIds: props.selectedResourceIds
|
|
1259
|
+
},
|
|
1260
|
+
children: props.children
|
|
1261
|
+
});
|
|
1262
|
+
};
|
|
1263
|
+
ExportResourcesContextProvider.displayName = 'ExportResourcesContextProvider';
|
|
1264
|
+
ExportResourcesContextProvider.propTypes = process.env.NODE_ENV !== "production" ? _objectSpread$1(_objectSpread$1({}, ExportResourcesModalShape), {}, {
|
|
1265
|
+
children: PropTypes.node
|
|
1266
|
+
}) : {};
|
|
1267
1267
|
|
|
1268
1268
|
const _excluded = ["renderProperties"];
|
|
1269
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; }
|
|
@@ -1279,8 +1279,7 @@ const ExportResourcesModal = _ref => {
|
|
|
1279
1279
|
return jsx(ExportResourcesContextProvider, _objectSpread(_objectSpread({}, props), {}, {
|
|
1280
1280
|
children: jsx(ExportResourcesContext.Consumer, {
|
|
1281
1281
|
children: _ref2 => {
|
|
1282
|
-
let formik = _ref2.formik
|
|
1283
|
-
exportOperationStarted = _ref2.exportOperationStarted;
|
|
1282
|
+
let formik = _ref2.formik;
|
|
1284
1283
|
return jsxs(FormModalPage, {
|
|
1285
1284
|
title: intl.formatMessage(messages.modalTitle, {
|
|
1286
1285
|
resourceType: resourceTypePlural
|
|
@@ -1297,14 +1296,13 @@ const ExportResourcesModal = _ref => {
|
|
|
1297
1296
|
resourceType: props.resourceType
|
|
1298
1297
|
}),
|
|
1299
1298
|
onPrimaryButtonClick: confirmationModal.openModal,
|
|
1300
|
-
children: [jsx(
|
|
1301
|
-
isShown: exportOperationStarted
|
|
1302
|
-
}), jsx(ExportFileSettings, {
|
|
1299
|
+
children: [jsx(ExportFileSettings, {
|
|
1303
1300
|
renderProperties: renderProperties
|
|
1304
1301
|
}), jsx(ExportConfirmationModal, {
|
|
1305
1302
|
resourceType: props.resourceType,
|
|
1306
1303
|
isOpen: confirmationModal.isModalOpen,
|
|
1307
|
-
closeModal: confirmationModal.closeModal
|
|
1304
|
+
closeModal: confirmationModal.closeModal,
|
|
1305
|
+
onCloseParentModal: props.closeModal
|
|
1308
1306
|
})]
|
|
1309
1307
|
});
|
|
1310
1308
|
}
|