@commercetools-frontend-extensions/export-resources-modal 5.15.1 → 5.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,6 +18,7 @@ import { useApplicationContext } from '@commercetools-frontend/application-shell
|
|
|
18
18
|
import { Text, TextInput, Spacings, SelectField, CheckboxInput, ContentNotification, Link, RadioInput, TextField, AngleRightIcon, Grid, designTokens, FieldLabel, Constraints, Tooltip, SupportIcon, Stamp, IconButton, AngleDownIcon, CollapsibleMotion, Card, SearchTextInput, LoadingSpinner, TagList, FlatButton, AngleUpIcon, CheckBoldIcon, DataTable } from '@commercetools-frontend/ui-kit';
|
|
19
19
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
20
20
|
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
21
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
21
22
|
import { FormDialog } from '@commercetools-frontend/application-components';
|
|
22
23
|
import { Masking } from '@commercetools-frontend/fullstory';
|
|
23
24
|
import { DELIMITERS as DELIMITERS$1, appendCsvOrJsonExtensionIfAbsent, mapFormikErrors, FileDroppedArea, EnabledDropArea, ActiveDragDropArea, FileDropArea as FileDropArea$1 } from '@commercetools-frontend-extensions/operations';
|
|
@@ -34,7 +35,6 @@ import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
34
35
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
35
36
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
36
37
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
37
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
38
38
|
import omitEmpty from 'omit-empty-es';
|
|
39
39
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
40
40
|
import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
@@ -43,7 +43,6 @@ import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
|
43
43
|
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
44
44
|
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
45
45
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
46
|
-
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
47
46
|
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
48
47
|
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
49
48
|
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
@@ -959,7 +958,7 @@ let UnexpectedExportOperationStateError = /*#__PURE__*/function (_Error) {
|
|
|
959
958
|
function UnexpectedExportOperationStateError(state) {
|
|
960
959
|
var _this;
|
|
961
960
|
_classCallCheck(this, UnexpectedExportOperationStateError);
|
|
962
|
-
_this = _callSuper$3(this, UnexpectedExportOperationStateError, [
|
|
961
|
+
_this = _callSuper$3(this, UnexpectedExportOperationStateError, ["Unexpected export operation state \"".concat(state, "\"")]);
|
|
963
962
|
_this.name = 'UnexpectedExportOperationStateError';
|
|
964
963
|
return _this;
|
|
965
964
|
}
|
|
@@ -973,7 +972,7 @@ let UnexpectedResourceTypeError = /*#__PURE__*/function (_Error) {
|
|
|
973
972
|
function UnexpectedResourceTypeError(resourceType) {
|
|
974
973
|
var _this;
|
|
975
974
|
_classCallCheck(this, UnexpectedResourceTypeError);
|
|
976
|
-
_this = _callSuper$2(this, UnexpectedResourceTypeError, [
|
|
975
|
+
_this = _callSuper$2(this, UnexpectedResourceTypeError, ["Unexpected resource type \"".concat(resourceType, "\"")]);
|
|
977
976
|
_this.name = 'UnexpectedResourceTypeError';
|
|
978
977
|
return _this;
|
|
979
978
|
}
|
|
@@ -1020,7 +1019,7 @@ function useExportResourcesModalContext() {
|
|
|
1020
1019
|
}
|
|
1021
1020
|
|
|
1022
1021
|
function ownKeys$e(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1023
|
-
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1022
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys$e(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$e(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1024
1023
|
const defaultOptions = {
|
|
1025
1024
|
storageType: 'local',
|
|
1026
1025
|
segregateByUser: true
|
|
@@ -1030,7 +1029,7 @@ const safeParse = value => {
|
|
|
1030
1029
|
if (value === null) return value;
|
|
1031
1030
|
try {
|
|
1032
1031
|
return JSON.parse(value);
|
|
1033
|
-
} catch {
|
|
1032
|
+
} catch (_unused) {
|
|
1034
1033
|
return value;
|
|
1035
1034
|
}
|
|
1036
1035
|
};
|
|
@@ -1054,7 +1053,10 @@ const clearStaleExportModalEntries = (storage, currentKey) => {
|
|
|
1054
1053
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
1055
1054
|
var _context;
|
|
1056
1055
|
const mergedOptions = _objectSpread$e(_objectSpread$e({}, defaultOptions), options);
|
|
1057
|
-
const userId = useApplicationContext(context =>
|
|
1056
|
+
const userId = useApplicationContext(context => {
|
|
1057
|
+
var _context$user;
|
|
1058
|
+
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
1059
|
+
});
|
|
1058
1060
|
const scopedStorageKey = _filterInstanceProperty(_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
1059
1061
|
const readFromStorage = useCallback(() => {
|
|
1060
1062
|
const rawStorageValue = getStorage(mergedOptions.storageType).getItem(scopedStorageKey);
|
|
@@ -1073,8 +1075,9 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1073
1075
|
return parsedStorageValue;
|
|
1074
1076
|
}, [mergedOptions.storageType, scopedStorageKey]);
|
|
1075
1077
|
const initializeStorageValue = () => {
|
|
1078
|
+
var _ref, _readFromStorage;
|
|
1076
1079
|
// default the storage value to the initial provided value when provided
|
|
1077
|
-
return readFromStorage()
|
|
1080
|
+
return (_ref = (_readFromStorage = readFromStorage()) !== null && _readFromStorage !== void 0 ? _readFromStorage : initialStorageValue) !== null && _ref !== void 0 ? _ref : null;
|
|
1078
1081
|
};
|
|
1079
1082
|
const _useState = useState(initializeStorageValue),
|
|
1080
1083
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1094,14 +1097,16 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1094
1097
|
storage.setItem(scopedStorageKey, serializedValue);
|
|
1095
1098
|
writeSucceeded = true;
|
|
1096
1099
|
} catch (retryError) {
|
|
1097
|
-
|
|
1100
|
+
var _context2;
|
|
1101
|
+
reportErrorToSentry(new Error(_concatInstanceProperty(_context2 = "Failed to persist \"".concat(scopedStorageKey, "\" to ")).call(_context2, mergedOptions.storageType, "Storage after cleanup. The selection will not be remembered for future sessions.")), {
|
|
1098
1102
|
extra: {
|
|
1099
1103
|
error: retryError
|
|
1100
1104
|
}
|
|
1101
1105
|
});
|
|
1102
1106
|
}
|
|
1103
1107
|
} else {
|
|
1104
|
-
|
|
1108
|
+
var _context3;
|
|
1109
|
+
reportErrorToSentry(new Error(_concatInstanceProperty(_context3 = "Failed to persist \"".concat(scopedStorageKey, "\" to ")).call(_context3, mergedOptions.storageType, "Storage. The selection will not be remembered for future sessions.")), {
|
|
1105
1110
|
extra: {
|
|
1106
1111
|
error
|
|
1107
1112
|
}
|
|
@@ -1126,7 +1131,7 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1126
1131
|
};
|
|
1127
1132
|
|
|
1128
1133
|
function resourceTypeToFileName(resourceType, locale) {
|
|
1129
|
-
var _context;
|
|
1134
|
+
var _context, _context2, _context3, _context4;
|
|
1130
1135
|
const date = new Date();
|
|
1131
1136
|
const dateFormatter = new Intl.DateTimeFormat(locale, {
|
|
1132
1137
|
year: '2-digit',
|
|
@@ -1144,7 +1149,7 @@ function resourceTypeToFileName(resourceType, locale) {
|
|
|
1144
1149
|
return acc;
|
|
1145
1150
|
}, {});
|
|
1146
1151
|
const orderedDateParts = _mapInstanceProperty(_context = _filterInstanceProperty(parts).call(parts, part => part.type === 'day' || part.type === 'month' || part.type === 'year')).call(_context, part => dateParts[part.type]).join('-');
|
|
1147
|
-
const formattedDate =
|
|
1152
|
+
const formattedDate = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(orderedDateParts, "_")).call(_context3, dateParts.hour, "-")).call(_context2, dateParts.minute);
|
|
1148
1153
|
const resourceTypeMap = {
|
|
1149
1154
|
[EXPORTABLE_RESOURCES.CATEGORY]: 'Categories',
|
|
1150
1155
|
[EXPORTABLE_RESOURCES.PRODUCT]: 'Products',
|
|
@@ -1161,7 +1166,7 @@ function resourceTypeToFileName(resourceType, locale) {
|
|
|
1161
1166
|
if (!displayName) {
|
|
1162
1167
|
throw new UnexpectedResourceTypeError(resourceType);
|
|
1163
1168
|
}
|
|
1164
|
-
return
|
|
1169
|
+
return _concatInstanceProperty(_context4 = "".concat(displayName, "_Export_")).call(_context4, formattedDate);
|
|
1165
1170
|
}
|
|
1166
1171
|
function mapLocalesToOptions(locales) {
|
|
1167
1172
|
return _mapInstanceProperty(locales).call(locales, locale => ({
|
|
@@ -1198,9 +1203,9 @@ function sortFieldsByFieldOrder(_ref) {
|
|
|
1198
1203
|
return fieldNames;
|
|
1199
1204
|
}
|
|
1200
1205
|
function buildSelectedExportFilters(selectedResourceIds) {
|
|
1201
|
-
if (!selectedResourceIds || selectedResourceIds
|
|
1202
|
-
const formattedIds = _mapInstanceProperty(selectedResourceIds).call(selectedResourceIds, id =>
|
|
1203
|
-
return
|
|
1206
|
+
if (!selectedResourceIds || (selectedResourceIds === null || selectedResourceIds === void 0 ? void 0 : selectedResourceIds.length) === 0) return undefined;
|
|
1207
|
+
const formattedIds = _mapInstanceProperty(selectedResourceIds).call(selectedResourceIds, id => "\"".concat(id, "\"")).join(', ');
|
|
1208
|
+
return "id in (".concat(formattedIds, ")");
|
|
1204
1209
|
}
|
|
1205
1210
|
function isQueryFilter(filters) {
|
|
1206
1211
|
if (!filters) return false;
|
|
@@ -1221,28 +1226,29 @@ function validateFilters(filtersObject) {
|
|
|
1221
1226
|
return Boolean(isQueryFilter(filtersObject.filters) || isSearchFilter(filtersObject.filters) || isPredicateFilter(filtersObject));
|
|
1222
1227
|
}
|
|
1223
1228
|
function areFiltersApplied(filtersObject) {
|
|
1224
|
-
var
|
|
1229
|
+
var _context5;
|
|
1225
1230
|
if (!filtersObject) {
|
|
1226
1231
|
return false;
|
|
1227
1232
|
}
|
|
1228
|
-
if (filtersObject.where && _trimInstanceProperty(
|
|
1233
|
+
if (filtersObject.where && _trimInstanceProperty(_context5 = filtersObject.where).call(_context5) !== '') {
|
|
1229
1234
|
return true;
|
|
1230
1235
|
}
|
|
1231
1236
|
if (isQueryFilter(filtersObject.filters)) {
|
|
1232
1237
|
return Boolean(filtersObject.filters.query);
|
|
1233
1238
|
}
|
|
1234
1239
|
if (isSearchFilter(filtersObject.filters)) {
|
|
1235
|
-
var
|
|
1240
|
+
var _filters$filters, _filters$fullText;
|
|
1236
1241
|
const _filters = filtersObject.filters;
|
|
1237
|
-
return Boolean(_filters.filters
|
|
1242
|
+
return Boolean(((_filters$filters = _filters.filters) === null || _filters$filters === void 0 ? void 0 : _filters$filters.length) || ((_filters$fullText = _filters.fullText) === null || _filters$fullText === void 0 || (_filters$fullText = _filters$fullText.text) === null || _filters$fullText === void 0 ? void 0 : _trimInstanceProperty(_filters$fullText).call(_filters$fullText)));
|
|
1238
1243
|
}
|
|
1239
1244
|
return false;
|
|
1240
1245
|
}
|
|
1241
1246
|
function getInitialExportType(args) {
|
|
1242
|
-
|
|
1247
|
+
var _args$selectedResourc, _args$filters;
|
|
1248
|
+
if ((_args$selectedResourc = args.selectedResourceIds) !== null && _args$selectedResourc !== void 0 && _args$selectedResourc.length) {
|
|
1243
1249
|
return EXPORT_TYPES.SELECTED;
|
|
1244
1250
|
}
|
|
1245
|
-
if (args.filters
|
|
1251
|
+
if ((_args$filters = args.filters) !== null && _args$filters !== void 0 && _args$filters.total && areFiltersApplied(args.filters)) {
|
|
1246
1252
|
return EXPORT_TYPES.FILTERED;
|
|
1247
1253
|
}
|
|
1248
1254
|
return EXPORT_TYPES.ALL;
|
|
@@ -1256,7 +1262,7 @@ const isAnyFieldChecked = fields => {
|
|
|
1256
1262
|
};
|
|
1257
1263
|
const hasDependentFields = field => {
|
|
1258
1264
|
var _context;
|
|
1259
|
-
return Boolean(field
|
|
1265
|
+
return Boolean((field === null || field === void 0 ? void 0 : field.dependentGroupNames) && field.dependentGroupNames.length > 0 || (field === null || field === void 0 ? void 0 : field.dependentFieldNames) && field.dependentFieldNames.length > 0 || (field === null || field === void 0 ? void 0 : field.fields) && _someInstanceProperty(_context = field.fields).call(_context, nestedField => hasDependentFields(nestedField)));
|
|
1260
1266
|
};
|
|
1261
1267
|
const isFieldOrNestedFieldChecked = (field, fieldName) => {
|
|
1262
1268
|
if (field.name === fieldName && field.isChecked) {
|
|
@@ -1274,7 +1280,8 @@ const getIndependentFields = group => {
|
|
|
1274
1280
|
const independentFields = [];
|
|
1275
1281
|
const findIndependentFields = fields => {
|
|
1276
1282
|
_forEachInstanceProperty(fields).call(fields, field => {
|
|
1277
|
-
|
|
1283
|
+
var _field$dependentGroup, _field$dependentField;
|
|
1284
|
+
if (!((_field$dependentGroup = field.dependentGroupNames) !== null && _field$dependentGroup !== void 0 && _field$dependentGroup.length) && !((_field$dependentField = field.dependentFieldNames) !== null && _field$dependentField !== void 0 && _field$dependentField.length)) {
|
|
1278
1285
|
independentFields.push(field);
|
|
1279
1286
|
}
|
|
1280
1287
|
if (field.fields) {
|
|
@@ -1368,11 +1375,12 @@ const extractFieldNamesFromGroups = (groups, fieldOrder) => {
|
|
|
1368
1375
|
let checkedFields = [];
|
|
1369
1376
|
const getCheckedFields = fields => {
|
|
1370
1377
|
return _filterInstanceProperty(fields).call(fields, field => {
|
|
1378
|
+
var _field$isChecked;
|
|
1371
1379
|
if (field.fields) {
|
|
1372
1380
|
return getCheckedFields(field.fields);
|
|
1373
1381
|
}
|
|
1374
1382
|
if (field.isChecked) checkedFields.push(field);
|
|
1375
|
-
return field.isChecked
|
|
1383
|
+
return (_field$isChecked = field.isChecked) !== null && _field$isChecked !== void 0 ? _field$isChecked : false;
|
|
1376
1384
|
});
|
|
1377
1385
|
};
|
|
1378
1386
|
_forEachInstanceProperty(groups).call(groups, group => {
|
|
@@ -1454,7 +1462,7 @@ function isFieldNameValid(header) {
|
|
|
1454
1462
|
}
|
|
1455
1463
|
|
|
1456
1464
|
function ownKeys$d(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1457
|
-
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1465
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys$d(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys$d(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1458
1466
|
const updateFieldGroupsWithIsCheckedValue = (groups, cachedSelectedGroups) => {
|
|
1459
1467
|
const updateFields = (fields, isParentChecked, parentFieldPath) => {
|
|
1460
1468
|
return _mapInstanceProperty(fields).call(fields, field => {
|
|
@@ -1462,8 +1470,10 @@ const updateFieldGroupsWithIsCheckedValue = (groups, cachedSelectedGroups) => {
|
|
|
1462
1470
|
if (field.isRequired) {
|
|
1463
1471
|
isChecked = true;
|
|
1464
1472
|
} else {
|
|
1465
|
-
|
|
1466
|
-
|
|
1473
|
+
var _context;
|
|
1474
|
+
if (cachedSelectedGroups[_concatInstanceProperty(_context = "".concat(parentFieldPath, ".")).call(_context, field.name)] !== undefined) {
|
|
1475
|
+
var _context2;
|
|
1476
|
+
isChecked = cachedSelectedGroups[_concatInstanceProperty(_context2 = "".concat(parentFieldPath, ".")).call(_context2, field.name)];
|
|
1467
1477
|
} else if (!hasDependentFields(field) && field.isSelectedByDefault) {
|
|
1468
1478
|
isChecked = true;
|
|
1469
1479
|
} else if (isParentChecked) {
|
|
@@ -1472,7 +1482,8 @@ const updateFieldGroupsWithIsCheckedValue = (groups, cachedSelectedGroups) => {
|
|
|
1472
1482
|
}
|
|
1473
1483
|
let updatedFields = field.fields;
|
|
1474
1484
|
if (field.fields) {
|
|
1475
|
-
|
|
1485
|
+
var _context3;
|
|
1486
|
+
updatedFields = updateFields(field.fields, isChecked, _concatInstanceProperty(_context3 = "".concat(parentFieldPath, ".")).call(_context3, field.name));
|
|
1476
1487
|
isChecked = false;
|
|
1477
1488
|
}
|
|
1478
1489
|
return _objectSpread$d(_objectSpread$d({}, field), {}, {
|
|
@@ -1519,14 +1530,15 @@ const updateFieldGroupWithAdditionalFieldExtensions = groups => {
|
|
|
1519
1530
|
});
|
|
1520
1531
|
};
|
|
1521
1532
|
const getIsExpanded = (field, groupName, cachedExpandedGroups) => {
|
|
1533
|
+
var _context4, _ref, _cachedExpandedGroups;
|
|
1522
1534
|
if (!field.isExpandable) {
|
|
1523
1535
|
return false;
|
|
1524
1536
|
}
|
|
1525
1537
|
if (field.fields && field.maxVisibleChildren && field.fields.length > field.maxVisibleChildren) {
|
|
1526
1538
|
return false;
|
|
1527
1539
|
}
|
|
1528
|
-
const cacheKey =
|
|
1529
|
-
return cachedExpandedGroups[cacheKey]
|
|
1540
|
+
const cacheKey = _concatInstanceProperty(_context4 = "".concat(groupName, ".")).call(_context4, field.name);
|
|
1541
|
+
return (_ref = (_cachedExpandedGroups = cachedExpandedGroups[cacheKey]) !== null && _cachedExpandedGroups !== void 0 ? _cachedExpandedGroups : field.isExpanded) !== null && _ref !== void 0 ? _ref : false;
|
|
1530
1542
|
};
|
|
1531
1543
|
const updateFieldGroupsWithIsExpandedValue = (groups, cachedExpandedGroups) => {
|
|
1532
1544
|
function updateFields(fields, groupName) {
|
|
@@ -1547,22 +1559,24 @@ const updateFieldGroupsWithIsExpandedValue = (groups, cachedExpandedGroups) => {
|
|
|
1547
1559
|
});
|
|
1548
1560
|
}
|
|
1549
1561
|
return _mapInstanceProperty(groups).call(groups, group => {
|
|
1562
|
+
var _ref2, _cachedExpandedGroups2;
|
|
1550
1563
|
const updatedFields = updateFields(group.fields, group.groupName);
|
|
1551
1564
|
return _objectSpread$d(_objectSpread$d({}, group), {}, {
|
|
1552
|
-
isExpanded: cachedExpandedGroups[group.groupName]
|
|
1565
|
+
isExpanded: (_ref2 = (_cachedExpandedGroups2 = cachedExpandedGroups[group.groupName]) !== null && _cachedExpandedGroups2 !== void 0 ? _cachedExpandedGroups2 : group.isExpanded) !== null && _ref2 !== void 0 ? _ref2 : false,
|
|
1553
1566
|
fields: updatedFields
|
|
1554
1567
|
});
|
|
1555
1568
|
});
|
|
1556
1569
|
};
|
|
1557
1570
|
const updateFieldDependenciesStatus = formik => {
|
|
1558
|
-
var
|
|
1571
|
+
var _context6;
|
|
1559
1572
|
const updateFields = (fields, path) => {
|
|
1560
1573
|
_forEachInstanceProperty(fields).call(fields, (field, index) => {
|
|
1561
|
-
|
|
1574
|
+
var _context5;
|
|
1575
|
+
const currentPath = _concatInstanceProperty(_context5 = "".concat(path, ".fields[")).call(_context5, index, "]");
|
|
1562
1576
|
if (hasDependentFields(field)) {
|
|
1563
1577
|
const nextIsChecked = isAnyDependentChecked(_valuesInstanceProperty(formik).groups, field.dependentGroupNames, field.dependentFieldNames);
|
|
1564
1578
|
if (field.isChecked !== nextIsChecked) {
|
|
1565
|
-
formik.setFieldValue(
|
|
1579
|
+
formik.setFieldValue("".concat(currentPath, ".isChecked"), nextIsChecked, false);
|
|
1566
1580
|
}
|
|
1567
1581
|
}
|
|
1568
1582
|
if (field.fields) {
|
|
@@ -1570,8 +1584,8 @@ const updateFieldDependenciesStatus = formik => {
|
|
|
1570
1584
|
}
|
|
1571
1585
|
});
|
|
1572
1586
|
};
|
|
1573
|
-
_forEachInstanceProperty(
|
|
1574
|
-
updateFields(group.fields,
|
|
1587
|
+
_forEachInstanceProperty(_context6 = _valuesInstanceProperty(formik).groups).call(_context6, (group, index) => {
|
|
1588
|
+
updateFields(group.fields, "groups[".concat(index, "]"));
|
|
1575
1589
|
});
|
|
1576
1590
|
};
|
|
1577
1591
|
|
|
@@ -1591,8 +1605,8 @@ const getCsvHeaders = file => {
|
|
|
1591
1605
|
};
|
|
1592
1606
|
reader.onload = e => {
|
|
1593
1607
|
try {
|
|
1594
|
-
var _context, _context2;
|
|
1595
|
-
const text = e.target
|
|
1608
|
+
var _e$target, _context, _context2;
|
|
1609
|
+
const text = (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
|
|
1596
1610
|
entireFile += text;
|
|
1597
1611
|
const firstLineEnd = _indexOfInstanceProperty(entireFile).call(entireFile, '\n');
|
|
1598
1612
|
if (firstLineEnd === -1 && offset < file.size) {
|
|
@@ -1615,29 +1629,30 @@ const getCsvHeaders = file => {
|
|
|
1615
1629
|
};
|
|
1616
1630
|
|
|
1617
1631
|
function ownKeys$c(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1618
|
-
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1632
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys$c(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys$c(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1619
1633
|
function groupFieldValidationErrors(errors, intl) {
|
|
1620
|
-
var
|
|
1634
|
+
var _context3, _context5;
|
|
1621
1635
|
const errorsByCode = _reduceInstanceProperty(errors).call(errors, (groups, error) => {
|
|
1622
|
-
var _context;
|
|
1623
|
-
const groupKey = error.code === 'AttributeLevelMismatch' && error.actualLevel ?
|
|
1636
|
+
var _context, _context2;
|
|
1637
|
+
const groupKey = error.code === 'AttributeLevelMismatch' && error.actualLevel ? _concatInstanceProperty(_context = "".concat(error.code, "-")).call(_context, error.actualLevel) : error.code;
|
|
1624
1638
|
const group = groups[groupKey] || {
|
|
1625
1639
|
code: error.code,
|
|
1626
1640
|
originalErrors: [],
|
|
1627
1641
|
fieldNames: []
|
|
1628
1642
|
};
|
|
1629
|
-
if (error.field && !_includesInstanceProperty(
|
|
1643
|
+
if (error.field && !_includesInstanceProperty(_context2 = group.fieldNames).call(_context2, error.field)) {
|
|
1630
1644
|
group.fieldNames.push(error.field);
|
|
1631
1645
|
}
|
|
1632
1646
|
group.originalErrors.push(error);
|
|
1633
1647
|
groups[groupKey] = group;
|
|
1634
1648
|
return groups;
|
|
1635
1649
|
}, {});
|
|
1636
|
-
_forEachInstanceProperty(
|
|
1637
|
-
var
|
|
1638
|
-
_sortInstanceProperty(
|
|
1650
|
+
_forEachInstanceProperty(_context3 = _Object$values(errorsByCode)).call(_context3, group => {
|
|
1651
|
+
var _context4;
|
|
1652
|
+
_sortInstanceProperty(_context4 = group.fieldNames).call(_context4);
|
|
1639
1653
|
});
|
|
1640
|
-
return _mapInstanceProperty(
|
|
1654
|
+
return _mapInstanceProperty(_context5 = _Object$values(errorsByCode)).call(_context5, group => {
|
|
1655
|
+
var _group$originalErrors;
|
|
1641
1656
|
let messageTitle;
|
|
1642
1657
|
switch (group.code) {
|
|
1643
1658
|
case 'NotSupportedField':
|
|
@@ -1661,21 +1676,21 @@ function groupFieldValidationErrors(errors, intl) {
|
|
|
1661
1676
|
case 'AttributeLevelMismatch':
|
|
1662
1677
|
{
|
|
1663
1678
|
const referenceError = group.originalErrors[0];
|
|
1664
|
-
if (referenceError
|
|
1679
|
+
if ((referenceError === null || referenceError === void 0 ? void 0 : referenceError.actualLevel) === 'Product') {
|
|
1665
1680
|
messageTitle = intl.formatMessage(messages.attributeLevelMismatchProductLevelTitle, {
|
|
1666
1681
|
b: getSmallBold
|
|
1667
1682
|
});
|
|
1668
|
-
} else if (referenceError
|
|
1683
|
+
} else if ((referenceError === null || referenceError === void 0 ? void 0 : referenceError.actualLevel) === 'Variant') {
|
|
1669
1684
|
messageTitle = intl.formatMessage(messages.attributeLevelMismatchVariantLevelTitle, {
|
|
1670
1685
|
b: getSmallBold
|
|
1671
1686
|
});
|
|
1672
1687
|
} else {
|
|
1673
|
-
messageTitle = referenceError
|
|
1688
|
+
messageTitle = (referenceError === null || referenceError === void 0 ? void 0 : referenceError.message) || intl.formatMessage(messages.unknownError);
|
|
1674
1689
|
}
|
|
1675
1690
|
break;
|
|
1676
1691
|
}
|
|
1677
1692
|
default:
|
|
1678
|
-
messageTitle = group.originalErrors[0]
|
|
1693
|
+
messageTitle = ((_group$originalErrors = group.originalErrors[0]) === null || _group$originalErrors === void 0 ? void 0 : _group$originalErrors.message) || intl.formatMessage(messages.unknownError);
|
|
1679
1694
|
}
|
|
1680
1695
|
return _objectSpread$c(_objectSpread$c({}, group), {}, {
|
|
1681
1696
|
messageTitle
|
|
@@ -1695,22 +1710,28 @@ function isExportApiErrorResponse(error) {
|
|
|
1695
1710
|
}
|
|
1696
1711
|
|
|
1697
1712
|
const useInitialValues = props => {
|
|
1698
|
-
var _context;
|
|
1699
|
-
const _useApplicationContex = useApplicationContext(applicationContext =>
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1713
|
+
var _context, _context2, _context3;
|
|
1714
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
1715
|
+
var _applicationContext$u;
|
|
1716
|
+
return {
|
|
1717
|
+
locale: applicationContext.dataLocale,
|
|
1718
|
+
userLocale: (_applicationContext$u = applicationContext.user) === null || _applicationContext$u === void 0 ? void 0 : _applicationContext$u.locale
|
|
1719
|
+
};
|
|
1720
|
+
}),
|
|
1703
1721
|
locale = _useApplicationContex.locale,
|
|
1704
1722
|
userLocale = _useApplicationContex.userLocale;
|
|
1705
|
-
const _useApplicationContex2 = useApplicationContext(context =>
|
|
1706
|
-
|
|
1707
|
-
|
|
1723
|
+
const _useApplicationContex2 = useApplicationContext(context => {
|
|
1724
|
+
var _context$project;
|
|
1725
|
+
return {
|
|
1726
|
+
projectKey: (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key
|
|
1727
|
+
};
|
|
1728
|
+
}),
|
|
1708
1729
|
projectKey = _useApplicationContex2.projectKey;
|
|
1709
|
-
const _useStorage = useStorage(
|
|
1730
|
+
const _useStorage = useStorage(_concatInstanceProperty(_context = "".concat(projectKey, "/")).call(_context, OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION), {}),
|
|
1710
1731
|
_useStorage2 = _slicedToArray(_useStorage, 1),
|
|
1711
1732
|
cachedSelectedGroups = _useStorage2[0];
|
|
1712
|
-
const _useStorage3 = useStorage(
|
|
1713
|
-
[props.resourceType]: _reduceInstanceProperty(
|
|
1733
|
+
const _useStorage3 = useStorage(_concatInstanceProperty(_context2 = "".concat(projectKey, "/")).call(_context2, OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP), {
|
|
1734
|
+
[props.resourceType]: _reduceInstanceProperty(_context3 = props.fieldGroups).call(_context3, (acc, group) => {
|
|
1714
1735
|
acc[group.groupName] = group.isExpanded;
|
|
1715
1736
|
return acc;
|
|
1716
1737
|
}, {})
|
|
@@ -1719,10 +1740,10 @@ const useInitialValues = props => {
|
|
|
1719
1740
|
cachedExpandedGroups = _useStorage4[0];
|
|
1720
1741
|
return React.useMemo(() => {
|
|
1721
1742
|
let groups = removeEmptyGroups(props.fieldGroups);
|
|
1722
|
-
groups = updateFieldGroupsWithIsCheckedValue(groups, cachedSelectedGroups
|
|
1723
|
-
groups = updateFieldGroupsWithIsExpandedValue(groups, cachedExpandedGroups
|
|
1743
|
+
groups = updateFieldGroupsWithIsCheckedValue(groups, (cachedSelectedGroups === null || cachedSelectedGroups === void 0 ? void 0 : cachedSelectedGroups[props.resourceType]) || {});
|
|
1744
|
+
groups = updateFieldGroupsWithIsExpandedValue(groups, (cachedExpandedGroups === null || cachedExpandedGroups === void 0 ? void 0 : cachedExpandedGroups[props.resourceType]) || {});
|
|
1724
1745
|
return {
|
|
1725
|
-
fileName:
|
|
1746
|
+
fileName: "".concat(resourceTypeToFileName(props.resourceType, userLocale)),
|
|
1726
1747
|
locales: [locale],
|
|
1727
1748
|
groups: updateFieldGroupWithAdditionalFieldExtensions(groups),
|
|
1728
1749
|
queryPredicate: '',
|
|
@@ -1742,7 +1763,7 @@ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
1742
1763
|
async function makeExportRequest(params, asyncDispatchFn) {
|
|
1743
1764
|
const projectKey = params.projectKey,
|
|
1744
1765
|
requestData = _objectWithoutProperties(params, _excluded$3);
|
|
1745
|
-
const uri =
|
|
1766
|
+
const uri = "/".concat(projectKey, "/export-operations");
|
|
1746
1767
|
const requestAction = actions.post({
|
|
1747
1768
|
mcApiProxyTarget: MC_API_PROXY_TARGETS.EXPORT,
|
|
1748
1769
|
uri,
|
|
@@ -1773,22 +1794,27 @@ function validateExportOperation(params, asyncDispatchFn) {
|
|
|
1773
1794
|
}
|
|
1774
1795
|
|
|
1775
1796
|
const mergeWhereClause = (base, user) => {
|
|
1797
|
+
var _context;
|
|
1776
1798
|
if (!base && !user) return undefined;
|
|
1777
1799
|
if (base && !user) return base;
|
|
1778
1800
|
if (!base && user) return user;
|
|
1779
|
-
return
|
|
1801
|
+
return _concatInstanceProperty(_context = "(".concat(base, ") and (")).call(_context, user, ")");
|
|
1780
1802
|
};
|
|
1781
1803
|
const useStartExportOperation = props => {
|
|
1782
1804
|
const intl = useIntl();
|
|
1783
1805
|
const asyncDispatch = useAsyncDispatch();
|
|
1784
1806
|
const showNotification = useShowNotification();
|
|
1785
|
-
const _useApplicationContex = useApplicationContext(applicationContext =>
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1807
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
1808
|
+
var _applicationContext$p;
|
|
1809
|
+
return {
|
|
1810
|
+
locale: applicationContext.dataLocale,
|
|
1811
|
+
projectKey: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.key
|
|
1812
|
+
};
|
|
1813
|
+
}),
|
|
1789
1814
|
projectKey = _useApplicationContex.projectKey;
|
|
1790
1815
|
const startExportOperation = async (values, exportType, fieldSelectionMode, localeOption, importedHeaders, selectedStoreKey) => {
|
|
1791
1816
|
try {
|
|
1817
|
+
var _props$selectedResour, _props$baseFilters;
|
|
1792
1818
|
if (!projectKey) throw new Error('Project key is missing');
|
|
1793
1819
|
let fields = [];
|
|
1794
1820
|
if (fieldSelectionMode === 'imported-csv-template' && values.importedCsvTemplateFile) {
|
|
@@ -1798,7 +1824,7 @@ const useStartExportOperation = props => {
|
|
|
1798
1824
|
}
|
|
1799
1825
|
let where = undefined;
|
|
1800
1826
|
let filters = undefined;
|
|
1801
|
-
if (exportType === EXPORT_TYPES.SELECTED && props.selectedResourceIds
|
|
1827
|
+
if (exportType === EXPORT_TYPES.SELECTED && (_props$selectedResour = props.selectedResourceIds) !== null && _props$selectedResour !== void 0 && _props$selectedResour.length) {
|
|
1802
1828
|
where = props.selectedScopeQueryPredicateBuilder ? props.selectedScopeQueryPredicateBuilder(props.selectedResourceIds) : buildSelectedExportFilters(props.selectedResourceIds);
|
|
1803
1829
|
} else if (exportType === EXPORT_TYPES.FILTERED && props.filters) {
|
|
1804
1830
|
where = props.filters.where;
|
|
@@ -1808,12 +1834,12 @@ const useStartExportOperation = props => {
|
|
|
1808
1834
|
filters = props.filters.filters;
|
|
1809
1835
|
}
|
|
1810
1836
|
} else if (exportType === EXPORT_TYPES.QUERY_PREDICATE) {
|
|
1811
|
-
var
|
|
1812
|
-
where = _trimInstanceProperty(
|
|
1837
|
+
var _context2;
|
|
1838
|
+
where = _trimInstanceProperty(_context2 = values.queryPredicate).call(_context2);
|
|
1813
1839
|
} else if (exportType === EXPORT_TYPES.SPECIFIC_STORE) {
|
|
1814
|
-
where =
|
|
1840
|
+
where = "store(key=\"".concat(selectedStoreKey, "\")");
|
|
1815
1841
|
}
|
|
1816
|
-
where = mergeWhereClause(props.baseFilters
|
|
1842
|
+
where = mergeWhereClause((_props$baseFilters = props.baseFilters) === null || _props$baseFilters === void 0 ? void 0 : _props$baseFilters.where, where);
|
|
1817
1843
|
let locales = undefined;
|
|
1818
1844
|
if (localeOption !== 'onlyLocalesFoundInCsvFile') {
|
|
1819
1845
|
locales = values.locales;
|
|
@@ -1890,7 +1916,7 @@ const useStartExportOperation = props => {
|
|
|
1890
1916
|
|
|
1891
1917
|
const _excluded$2 = ["fields"];
|
|
1892
1918
|
function ownKeys$a(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1893
|
-
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1919
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$a(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1894
1920
|
const getFieldFullName = _ref => {
|
|
1895
1921
|
var _context;
|
|
1896
1922
|
let fieldPrefix = _ref.fieldPrefix,
|
|
@@ -1900,7 +1926,6 @@ const getFieldFullName = _ref => {
|
|
|
1900
1926
|
const localizeTypeDefinitionLabels = function () {
|
|
1901
1927
|
let fieldDefinitions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1902
1928
|
return _mapInstanceProperty(fieldDefinitions).call(fieldDefinitions, _ref2 => {
|
|
1903
|
-
var _context2, _context3;
|
|
1904
1929
|
let fields = _ref2.fields,
|
|
1905
1930
|
fieldsType = _objectWithoutProperties(_ref2, _excluded$2);
|
|
1906
1931
|
const isFieldTypeLabelLocalized = _Array$isArray(fieldsType.label);
|
|
@@ -1910,7 +1935,7 @@ const localizeTypeDefinitionLabels = function () {
|
|
|
1910
1935
|
from: 'label',
|
|
1911
1936
|
to: 'label'
|
|
1912
1937
|
}]).label : fieldsType.label,
|
|
1913
|
-
fields: (
|
|
1938
|
+
fields: (fields === null || fields === void 0 ? void 0 : _mapInstanceProperty(fields).call(fields, field => {
|
|
1914
1939
|
const isFieldLabelLocalized = _Array$isArray(field.label);
|
|
1915
1940
|
if (!isFieldLabelLocalized) {
|
|
1916
1941
|
return field;
|
|
@@ -1919,22 +1944,26 @@ const localizeTypeDefinitionLabels = function () {
|
|
|
1919
1944
|
from: 'label',
|
|
1920
1945
|
to: 'label'
|
|
1921
1946
|
}]));
|
|
1922
|
-
}) || []
|
|
1947
|
+
})) || []
|
|
1923
1948
|
};
|
|
1924
1949
|
});
|
|
1925
1950
|
};
|
|
1926
1951
|
const useConvertFieldDefinitionsForExport = () => {
|
|
1927
|
-
const _useApplicationContex = useApplicationContext(applicationContext =>
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1952
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
1953
|
+
var _applicationContext$p;
|
|
1954
|
+
return {
|
|
1955
|
+
language: applicationContext.dataLocale,
|
|
1956
|
+
languages: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages
|
|
1957
|
+
};
|
|
1958
|
+
}),
|
|
1931
1959
|
language = _useApplicationContex.language,
|
|
1932
1960
|
languages = _useApplicationContex.languages;
|
|
1933
1961
|
const sortByField = (fields, fieldName) => {
|
|
1934
1962
|
if (!fields) return [];
|
|
1935
1963
|
if (fieldName) {
|
|
1936
1964
|
return sortBy(fields, field => {
|
|
1937
|
-
|
|
1965
|
+
var _field$fieldName;
|
|
1966
|
+
return (_field$fieldName = field[fieldName]) === null || _field$fieldName === void 0 ? void 0 : _field$fieldName.toLowerCase();
|
|
1938
1967
|
});
|
|
1939
1968
|
}
|
|
1940
1969
|
return fields;
|
|
@@ -1948,7 +1977,7 @@ const useConvertFieldDefinitionsForExport = () => {
|
|
|
1948
1977
|
if (!fieldDefinitions) return [];
|
|
1949
1978
|
const localizedTypeDefinitions = localizeTypeDefinitionLabels(fieldDefinitions);
|
|
1950
1979
|
const results = _mapInstanceProperty(localizedTypeDefinitions).call(localizedTypeDefinitions, transformedType => {
|
|
1951
|
-
var
|
|
1980
|
+
var _transformedType$fiel;
|
|
1952
1981
|
const isTypeLabelLocalized = typeof transformedType.label !== 'string';
|
|
1953
1982
|
return {
|
|
1954
1983
|
isExpandable: true,
|
|
@@ -1962,7 +1991,7 @@ const useConvertFieldDefinitionsForExport = () => {
|
|
|
1962
1991
|
fallbackOrder: languages,
|
|
1963
1992
|
fallback: transformedType.name
|
|
1964
1993
|
}) : transformedType.label,
|
|
1965
|
-
fields: sortByField((
|
|
1994
|
+
fields: sortByField((_transformedType$fiel = transformedType.fields) === null || _transformedType$fiel === void 0 ? void 0 : _mapInstanceProperty(_transformedType$fiel).call(_transformedType$fiel, fieldDefinition => {
|
|
1966
1995
|
const isFieldLabelLocalized = typeof fieldDefinition.label !== 'string';
|
|
1967
1996
|
return {
|
|
1968
1997
|
name: getFieldFullName({
|
|
@@ -1993,13 +2022,16 @@ const useValidateExportOperation = () => {
|
|
|
1993
2022
|
const intl = useIntl();
|
|
1994
2023
|
const asyncDispatch = useAsyncDispatch();
|
|
1995
2024
|
const showNotification = useShowNotification();
|
|
1996
|
-
const _useApplicationContex = useApplicationContext(context =>
|
|
1997
|
-
|
|
1998
|
-
|
|
2025
|
+
const _useApplicationContex = useApplicationContext(context => {
|
|
2026
|
+
var _context$project;
|
|
2027
|
+
return {
|
|
2028
|
+
projectKey: (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key
|
|
2029
|
+
};
|
|
2030
|
+
}),
|
|
1999
2031
|
projectKey = _useApplicationContex.projectKey;
|
|
2000
2032
|
const validateExport = async params => {
|
|
2001
2033
|
try {
|
|
2002
|
-
var _context,
|
|
2034
|
+
var _context, _params$queryPredicat;
|
|
2003
2035
|
if (!projectKey) return;
|
|
2004
2036
|
const invalidFields = _filterInstanceProperty(_context = params.fields).call(_context, field => !isFieldNameValid(field));
|
|
2005
2037
|
if (invalidFields.length > 0) {
|
|
@@ -2018,7 +2050,7 @@ const useValidateExportOperation = () => {
|
|
|
2018
2050
|
fileFormat: params.outputFormat,
|
|
2019
2051
|
fields: params.fields,
|
|
2020
2052
|
locales: params.locales,
|
|
2021
|
-
where: ((
|
|
2053
|
+
where: ((_params$queryPredicat = params.queryPredicate) === null || _params$queryPredicat === void 0 ? void 0 : _trimInstanceProperty(_params$queryPredicat).call(_params$queryPredicat)) || undefined
|
|
2022
2054
|
}, asyncDispatch);
|
|
2023
2055
|
if (isExportApiSuccessResponse(response) && response.resourceCount === 0) {
|
|
2024
2056
|
return {
|
|
@@ -2031,11 +2063,12 @@ const useValidateExportOperation = () => {
|
|
|
2031
2063
|
};
|
|
2032
2064
|
} catch (error) {
|
|
2033
2065
|
if (isExportApiErrorResponse(error)) {
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2066
|
+
var _error$body$errors, _error$body$validatio;
|
|
2067
|
+
if ((_error$body$errors = error.body.errors) !== null && _error$body$errors !== void 0 && _error$body$errors.length) {
|
|
2068
|
+
var _context2;
|
|
2069
|
+
const whereError = _findInstanceProperty(_context2 = error.body.errors).call(_context2, error => {
|
|
2070
|
+
var _context3;
|
|
2071
|
+
return error.message && _includesInstanceProperty(_context3 = error.message).call(_context3, 'Malformed parameter: where');
|
|
2039
2072
|
});
|
|
2040
2073
|
if (whereError) {
|
|
2041
2074
|
return {
|
|
@@ -2044,7 +2077,7 @@ const useValidateExportOperation = () => {
|
|
|
2044
2077
|
};
|
|
2045
2078
|
}
|
|
2046
2079
|
}
|
|
2047
|
-
if (error.body.validationErrors
|
|
2080
|
+
if ((_error$body$validatio = error.body.validationErrors) !== null && _error$body$validatio !== void 0 && _error$body$validatio.length) {
|
|
2048
2081
|
return {
|
|
2049
2082
|
success: false,
|
|
2050
2083
|
validationErrors: error.body.validationErrors
|
|
@@ -2222,10 +2255,10 @@ function ExportScopeSection() {
|
|
|
2222
2255
|
})
|
|
2223
2256
|
}), !hideExportSelectedResourcesOption && jsx(RadioInput.Option, {
|
|
2224
2257
|
value: EXPORT_TYPES.SELECTED,
|
|
2225
|
-
isDisabled: !selectedResourceIds
|
|
2258
|
+
isDisabled: !(selectedResourceIds !== null && selectedResourceIds !== void 0 && selectedResourceIds.length),
|
|
2226
2259
|
children: jsx(Text.Body, {
|
|
2227
|
-
tone: !selectedResourceIds
|
|
2228
|
-
intlMessage: selectedResourceIds
|
|
2260
|
+
tone: !(selectedResourceIds !== null && selectedResourceIds !== void 0 && selectedResourceIds.length) ? 'tertiary' : undefined,
|
|
2261
|
+
intlMessage: selectedResourceIds !== null && selectedResourceIds !== void 0 && selectedResourceIds.length ? _objectSpread$8(_objectSpread$8({}, resourceTypeMessages[resourceType].exportScopeSelected), {}, {
|
|
2229
2262
|
values: {
|
|
2230
2263
|
total: selectedResourceIds.length
|
|
2231
2264
|
}
|
|
@@ -2270,6 +2303,7 @@ function ExportScopeSection() {
|
|
|
2270
2303
|
}
|
|
2271
2304
|
|
|
2272
2305
|
const ExportFileSettingsStep = () => {
|
|
2306
|
+
var _context, _context2, _context3;
|
|
2273
2307
|
const intl = useIntl();
|
|
2274
2308
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
2275
2309
|
formik = _useExportResourcesMo.formik,
|
|
@@ -2290,13 +2324,13 @@ const ExportFileSettingsStep = () => {
|
|
|
2290
2324
|
const shouldShowPreferences = _valuesInstanceProperty(formik).outputFormat === 'csv';
|
|
2291
2325
|
return jsx(FormDialog, {
|
|
2292
2326
|
isOpen: true,
|
|
2293
|
-
title:
|
|
2327
|
+
title: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages.stepCount, {
|
|
2294
2328
|
currentStep: 1,
|
|
2295
2329
|
totalSteps: TOTAL_STEPS
|
|
2296
|
-
})
|
|
2297
|
-
labelPrimary:
|
|
2330
|
+
}), ": ")).call(_context, intl.formatMessage(messages["modalTitle.".concat(resourceType)])),
|
|
2331
|
+
labelPrimary: _concatInstanceProperty(_context2 = "".concat(intl.formatMessage(messages.stepNumber, {
|
|
2298
2332
|
stepNumber: 2
|
|
2299
|
-
})
|
|
2333
|
+
}), ": ")).call(_context2, intl.formatMessage(messages.selectContentToExport)),
|
|
2300
2334
|
iconLeftPrimaryButton: jsx(AngleRightIcon, {}),
|
|
2301
2335
|
onPrimaryButtonClick: formik.submitForm,
|
|
2302
2336
|
isPrimaryButtonDisabled: !formik.isValid || isStoreSelectionMissing,
|
|
@@ -2306,7 +2340,7 @@ const ExportFileSettingsStep = () => {
|
|
|
2306
2340
|
children: jsx(Masking.Unmask, {
|
|
2307
2341
|
children: jsxs(Grid, {
|
|
2308
2342
|
gridRowGap: designTokens.spacingXl,
|
|
2309
|
-
gridTemplateColumns:
|
|
2343
|
+
gridTemplateColumns: _concatInstanceProperty(_context3 = "calc(".concat(designTokens.constraint3, " + ")).call(_context3, designTokens.spacingL, ") auto"),
|
|
2310
2344
|
children: [jsx(Grid.Item, {
|
|
2311
2345
|
children: jsx(Text.Body, {
|
|
2312
2346
|
intlMessage: messages.scope
|
|
@@ -2363,10 +2397,13 @@ const ExportLocaleSelectField = () => {
|
|
|
2363
2397
|
fieldSelectionMode = _useExportResourcesMo.fieldSelectionMode,
|
|
2364
2398
|
localeOption = _useExportResourcesMo.localeOption,
|
|
2365
2399
|
setLocaleOption = _useExportResourcesMo.setLocaleOption;
|
|
2366
|
-
const _useApplicationContex = useApplicationContext(applicationContext =>
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2400
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
2401
|
+
var _applicationContext$p;
|
|
2402
|
+
return {
|
|
2403
|
+
locale: applicationContext.dataLocale,
|
|
2404
|
+
locales: ((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) || []
|
|
2405
|
+
};
|
|
2406
|
+
}),
|
|
2370
2407
|
locales = _useApplicationContex.locales,
|
|
2371
2408
|
locale = _useApplicationContex.locale;
|
|
2372
2409
|
const isOnlyLocalesFoundInCsvFileOptionDisabled = React.useMemo(() => {
|
|
@@ -2472,25 +2509,29 @@ const ImportedCsvTemplateFieldsForm = () => {
|
|
|
2472
2509
|
};
|
|
2473
2510
|
|
|
2474
2511
|
function ownKeys$6(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2475
|
-
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
2512
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2476
2513
|
const exportFieldSelectionContextDefaultValues = {
|
|
2477
2514
|
updateExpandedGroups: (_name, _value) => {}
|
|
2478
2515
|
};
|
|
2479
2516
|
const ExportFieldSelectionContext = /*#__PURE__*/createContext(exportFieldSelectionContextDefaultValues);
|
|
2480
2517
|
const ExportFieldSelectionProvider = _ref => {
|
|
2518
|
+
var _context;
|
|
2481
2519
|
let resourceType = _ref.resourceType,
|
|
2482
2520
|
children = _ref.children;
|
|
2483
|
-
const _useApplicationContex = useApplicationContext(context =>
|
|
2484
|
-
|
|
2485
|
-
|
|
2521
|
+
const _useApplicationContex = useApplicationContext(context => {
|
|
2522
|
+
var _context$project;
|
|
2523
|
+
return {
|
|
2524
|
+
projectKey: (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key
|
|
2525
|
+
};
|
|
2526
|
+
}),
|
|
2486
2527
|
projectKey = _useApplicationContex.projectKey;
|
|
2487
|
-
const _useStorage = useStorage(
|
|
2528
|
+
const _useStorage = useStorage(_concatInstanceProperty(_context = "".concat(projectKey, "/")).call(_context, OPERATIONS_EXPORT_RESOURCES_MODAL_EXPANDED_GROUP), {}),
|
|
2488
2529
|
_useStorage2 = _slicedToArray(_useStorage, 2),
|
|
2489
2530
|
cachedExpandedGroups = _useStorage2[0],
|
|
2490
2531
|
setCachedExpandedGroups = _useStorage2[1];
|
|
2491
2532
|
const updateExpandedGroups = useCallback((name, value) => {
|
|
2492
2533
|
setCachedExpandedGroups(_objectSpread$6(_objectSpread$6({}, cachedExpandedGroups), {}, {
|
|
2493
|
-
[resourceType]: _objectSpread$6(_objectSpread$6({}, cachedExpandedGroups
|
|
2534
|
+
[resourceType]: _objectSpread$6(_objectSpread$6({}, (cachedExpandedGroups === null || cachedExpandedGroups === void 0 ? void 0 : cachedExpandedGroups[resourceType]) || {}), {}, {
|
|
2494
2535
|
[name]: value
|
|
2495
2536
|
})
|
|
2496
2537
|
}));
|
|
@@ -2549,7 +2590,7 @@ const CollapsibleFieldWrapper = _ref => {
|
|
|
2549
2590
|
registerContentNode
|
|
2550
2591
|
});
|
|
2551
2592
|
}
|
|
2552
|
-
},
|
|
2593
|
+
}, "".concat(isForceExpanded));
|
|
2553
2594
|
return children({
|
|
2554
2595
|
isOpen: true,
|
|
2555
2596
|
toggle: () => {},
|
|
@@ -2557,7 +2598,6 @@ const CollapsibleFieldWrapper = _ref => {
|
|
|
2557
2598
|
});
|
|
2558
2599
|
};
|
|
2559
2600
|
const FieldSection = _ref3 => {
|
|
2560
|
-
var _context, _context2, _context7, _context8;
|
|
2561
2601
|
let fields = _ref3.fields,
|
|
2562
2602
|
parentKeys = _ref3.parentKeys,
|
|
2563
2603
|
formik = _ref3.formik,
|
|
@@ -2567,11 +2607,11 @@ const FieldSection = _ref3 => {
|
|
|
2567
2607
|
maxVisibleChildren = _ref3.maxVisibleChildren;
|
|
2568
2608
|
const _useExportFieldSelect = useExportFieldSelectionContext(),
|
|
2569
2609
|
updateExpandedGroups = _useExportFieldSelect.updateExpandedGroups;
|
|
2570
|
-
const visibleFields = isSearchActive || !maxVisibleChildren ? fields :
|
|
2610
|
+
const visibleFields = isSearchActive || !maxVisibleChildren ? fields : fields === null || fields === void 0 ? void 0 : _sliceInstanceProperty(fields).call(fields, 0, maxVisibleChildren);
|
|
2571
2611
|
const hasMoreFields = maxVisibleChildren && !isSearchActive && fields && fields.length > maxVisibleChildren;
|
|
2572
2612
|
const visibleIndex = field => {
|
|
2573
|
-
var
|
|
2574
|
-
return (
|
|
2613
|
+
var _context;
|
|
2614
|
+
return (fields === null || fields === void 0 ? void 0 : _indexOfInstanceProperty(_context = _filterInstanceProperty(fields).call(fields, f => !f.isHidden)).call(_context, field)) || -1;
|
|
2575
2615
|
};
|
|
2576
2616
|
const shouldDisplayField = field => {
|
|
2577
2617
|
if (field.isHidden) return false;
|
|
@@ -2583,13 +2623,15 @@ const FieldSection = _ref3 => {
|
|
|
2583
2623
|
};
|
|
2584
2624
|
return jsxs(Spacings.Stack, {
|
|
2585
2625
|
scale: "s",
|
|
2586
|
-
children: [
|
|
2626
|
+
children: [visibleFields === null || visibleFields === void 0 ? void 0 : _mapInstanceProperty(visibleFields).call(visibleFields, (field, index) => {
|
|
2627
|
+
var _field$dependentGroup, _field$dependentField, _context2;
|
|
2587
2628
|
const isChildrenCountDisplayed = shouldDisplayChildrenCount(field);
|
|
2588
|
-
const hasDependents = Boolean(field.dependentGroupNames
|
|
2629
|
+
const hasDependents = Boolean(((_field$dependentGroup = field.dependentGroupNames) === null || _field$dependentGroup === void 0 ? void 0 : _field$dependentGroup.length) || ((_field$dependentField = field.dependentFieldNames) === null || _field$dependentField === void 0 ? void 0 : _field$dependentField.length));
|
|
2589
2630
|
const isAnyOfTheChildFieldsChecked = isAnyFieldChecked(field.fields || []);
|
|
2590
2631
|
const allFieldsChecked = areAllFieldsChecked(field.fields || []);
|
|
2591
2632
|
const getIsChecked = () => {
|
|
2592
|
-
|
|
2633
|
+
var _field$fields;
|
|
2634
|
+
const isParent = Boolean(field.fields && ((_field$fields = field.fields) === null || _field$fields === void 0 ? void 0 : _field$fields.length) > 0);
|
|
2593
2635
|
if (isParent) return areAllFieldsChecked(field.fields);
|
|
2594
2636
|
return field.isChecked;
|
|
2595
2637
|
};
|
|
@@ -2598,6 +2640,7 @@ const FieldSection = _ref3 => {
|
|
|
2598
2640
|
isForceExpanded: isSearchActive,
|
|
2599
2641
|
field: field,
|
|
2600
2642
|
children: _ref4 => {
|
|
2643
|
+
var _context3;
|
|
2601
2644
|
let isOpen = _ref4.isOpen,
|
|
2602
2645
|
toggle = _ref4.toggle,
|
|
2603
2646
|
registerContentNode = _ref4.registerContentNode;
|
|
@@ -2607,11 +2650,12 @@ const FieldSection = _ref3 => {
|
|
|
2607
2650
|
size: "20",
|
|
2608
2651
|
style: {
|
|
2609
2652
|
position: 'absolute',
|
|
2610
|
-
left:
|
|
2653
|
+
left: "calc(-1 * ".concat(designTokens.spacingXl, ")")
|
|
2611
2654
|
},
|
|
2612
2655
|
onClick: () => {
|
|
2613
2656
|
if (!isSearchActive) {
|
|
2614
|
-
|
|
2657
|
+
var _context4;
|
|
2658
|
+
updateExpandedGroups(_concatInstanceProperty(_context4 = "".concat(groupName, ".")).call(_context4, field.name), !isOpen);
|
|
2615
2659
|
}
|
|
2616
2660
|
toggle();
|
|
2617
2661
|
},
|
|
@@ -2625,17 +2669,19 @@ const FieldSection = _ref3 => {
|
|
|
2625
2669
|
isChecked: getIsChecked(),
|
|
2626
2670
|
isReadOnly: hasDependents || field.isRequired,
|
|
2627
2671
|
onChange: e => {
|
|
2628
|
-
|
|
2672
|
+
var _context5, _field$fields3;
|
|
2673
|
+
const path = _concatInstanceProperty(_context5 = "".concat(parentKeys.join('.'), ".fields[")).call(_context5, index, "]");
|
|
2629
2674
|
const checked = e.target.checked;
|
|
2630
2675
|
// Update all child fields
|
|
2631
2676
|
const updateAllChildFieldsChecked = (path, checked) => {
|
|
2632
2677
|
const item = get(_valuesInstanceProperty(formik), path);
|
|
2633
2678
|
if (item && item.fields) {
|
|
2634
|
-
var
|
|
2635
|
-
_forEachInstanceProperty(
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2679
|
+
var _context6;
|
|
2680
|
+
_forEachInstanceProperty(_context6 = item.fields).call(_context6, (field, i) => {
|
|
2681
|
+
var _context7, _field$fields2;
|
|
2682
|
+
const fieldPath = _concatInstanceProperty(_context7 = "".concat(path, ".fields[")).call(_context7, i, "]");
|
|
2683
|
+
if (!((_field$fields2 = field.fields) !== null && _field$fields2 !== void 0 && _field$fields2.length)) {
|
|
2684
|
+
formik.setFieldValue("".concat(fieldPath, ".isChecked"), checked || field.isRequired,
|
|
2639
2685
|
// pass `false` to avoid revalidating the form with intermediate values
|
|
2640
2686
|
false);
|
|
2641
2687
|
}
|
|
@@ -2643,8 +2689,8 @@ const FieldSection = _ref3 => {
|
|
|
2643
2689
|
});
|
|
2644
2690
|
}
|
|
2645
2691
|
};
|
|
2646
|
-
if (!field.fields
|
|
2647
|
-
formik.setFieldValue(
|
|
2692
|
+
if (!((_field$fields3 = field.fields) !== null && _field$fields3 !== void 0 && _field$fields3.length)) {
|
|
2693
|
+
formik.setFieldValue("".concat(path, ".isChecked"), checked || field.isRequired,
|
|
2648
2694
|
// pass `false` to avoid revalidating the form with intermediate values
|
|
2649
2695
|
false);
|
|
2650
2696
|
}
|
|
@@ -2669,16 +2715,16 @@ const FieldSection = _ref3 => {
|
|
|
2669
2715
|
fields: field.fields,
|
|
2670
2716
|
maxVisibleChildren: field.maxVisibleChildren,
|
|
2671
2717
|
formik: formik,
|
|
2672
|
-
parentKeys: [...parentKeys,
|
|
2718
|
+
parentKeys: [...parentKeys, "fields[".concat(index, "]")],
|
|
2673
2719
|
isAnySiblingChecked: isAnySiblingChecked,
|
|
2674
2720
|
isSearchActive: isSearchActive,
|
|
2675
2721
|
groupName: groupName
|
|
2676
2722
|
})]
|
|
2677
2723
|
})
|
|
2678
2724
|
})]
|
|
2679
|
-
},
|
|
2725
|
+
}, _concatInstanceProperty(_context3 = "".concat(field.name, "-")).call(_context3, index));
|
|
2680
2726
|
}
|
|
2681
|
-
},
|
|
2727
|
+
}, _concatInstanceProperty(_context2 = "".concat(field.name, ".")).call(_context2, isSearchActive));
|
|
2682
2728
|
}), hasMoreFields && jsx("div", {
|
|
2683
2729
|
css: /*#__PURE__*/css("padding-left:", designTokens.spacingXs, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:FieldSection;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpZWxkLXNlY3Rpb24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFQa0IiLCJmaWxlIjoiZmllbGQtc2VjdGlvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGcmFnbWVudCB9IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHtcbiAgQW5nbGVEb3duSWNvbixcbiAgQW5nbGVSaWdodEljb24sXG4gIENoZWNrYm94SW5wdXQsXG4gIENvbGxhcHNpYmxlTW90aW9uLFxuICBJY29uQnV0dG9uLFxuICBTcGFjaW5ncyxcbiAgVGV4dCxcbiAgZGVzaWduVG9rZW5zLFxufSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnXG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHR5cGUgeyBGb3JtaWtQcm9wcyB9IGZyb20gJ2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lzcGxheUZpZWxkKGZpZWxkKSkgcmV0dXJuIG51bGxcbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICA8Q29sbGFwc2libGVGaWVsZFdyYXBwZXJcbiAgICAgICAgICAgIGlzRm9yY2VFeHBhbmRlZD17aXNTZWFyY2hBY3RpdmV9XG4gICAgICAgICAgICBmaWVsZD17ZmllbGR9XG4gICAgICAgICAgICBrZXk9e2Ake2ZpZWxkLm5hbWV9LiR7aXNTZWFyY2hBY3RpdmV9YH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICB7KHsgaXNPcGVuLCB0b2dnbGUsIHJlZ2lzdGVyQ29udGVudE5vZGUgfSkgPT4gKFxuICAgICAgICAgICAgICA8RnJhZ21lbnQga2V5PXtgJHtmaWVsZC5uYW1lfS0ke2luZGV4fWB9PlxuICAgICAgICAgICAgICAgIDxGaWVsZFdyYXBwZXI+XG4gICAgICAgICAgICAgICAgICB7ZmllbGQuaXNFeHBhbmRhYmxlICYmIChcbiAgICAgICAgICAgICAgICAgICAgPEljb25CdXR0b25cbiAgICAgICAgICAgICAgICAgICAgICBzaXplPVwiMjBcIlxuICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQ6IGBjYWxjKC0xICogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZ1hsfSlgLFxuICAgICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc1NlYXJjaEFjdGl2ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVFeHBhbmRlZEdyb3VwcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgJHtncm91cE5hbWV9LiR7ZmllbGQubmFtZX1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICFpc09wZW5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9nZ2xlKClcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgIGljb249e2lzT3BlbiA/IDxBbmdsZURvd25JY29uIC8+IDogPEFuZ2xlUmlnaHRJY29uIC8+fVxuICAgICAgICAgICAgICAgICAgICAgIGxhYmVsPVwiXCJcbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICA8U3BhY2luZ3MuSW5saW5lIHNjYWxlPVwic1wiIGFsaWduSXRlbXM9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgPENoZWNrYm94SW5wdXRcbiAgICAgICAgICAgICAgICAgICAgICBpc0luZGV0ZXJtaW5hdGU9e1xuICAgICAgICAgICAgICAgICAgICAgICAgZmllbGQuaXNFeHBhbmRhYmxlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAhYWxsRmllbGRzQ2hlY2tlZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgaXNBbnlPZlRoZUNoaWxkRmllbGRzQ2hlY2tlZFxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICBpc0NoZWNrZWQ9e2dldElzQ2hlY2tlZCgpfVxuICAgICAgICAgICAgICAgICAgICAgIGlzUmVhZE9ubHk9e2hhc0RlcGVuZGVudHMgfHwgZmllbGQuaXNSZXF1aXJlZH1cbiAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZT17KGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhdGggPSBgJHtwYXJlbnRLZXlzLmpvaW4oJy4nKX0uZmllbGRzWyR7aW5kZXh9XWBcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoZWNrZWQgPSBlLnRhcmdldC5jaGVja2VkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgYWxsIGNoaWxkIGZpZWxkc1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdXBkYXRlQWxsQ2hpbGRGaWVsZHNDaGVja2VkID0gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoOiBzdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrZWQ6IGJvb2xlYW5cbiAgICAgICAgICAgICAgICAgICAgICAgICkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0gZ2V0KGZvcm1pay52YWx1ZXMsIHBhdGgpIGFzIEZvcm1GaWVsZFxuICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbSAmJiBpdGVtLmZpZWxkcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uZmllbGRzLmZvckVhY2goKGZpZWxkLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBmaWVsZFBhdGggPSBgJHtwYXRofS5maWVsZHNbJHtpfV1gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWZpZWxkLmZpZWxkcz8ubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1pay5zZXRGaWVsZFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAke2ZpZWxkUGF0aH0uaXNDaGVja2VkYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkIHx8IGZpZWxkLmlzUmVxdWlyZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGFzcyBgZmFsc2VgIHRvIGF2b2lkIHJldmFsaWRhdGluZyB0aGUgZm9ybSB3aXRoIGludGVybWVkaWF0ZSB2YWx1ZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVBbGxDaGlsZEZpZWxkc0NoZWNrZWQoZmllbGRQYXRoLCBjaGVja2VkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZmllbGQuZmllbGRzPy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWlrLnNldEZpZWxkVmFsdWUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYCR7cGF0aH0uaXNDaGVja2VkYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja2VkIHx8IGZpZWxkLmlzUmVxdWlyZWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGFzcyBgZmFsc2VgIHRvIGF2b2lkIHJldmFsaWRhdGluZyB0aGUgZm9ybSB3aXRoIGludGVybWVkaWF0ZSB2YWx1ZXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVBbGxDaGlsZEZpZWxkc0NoZWNrZWQocGF0aCwgY2hlY2tlZClcbiAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgICAge2ZpZWxkLmxhYmVsfVxuICAgICAgICAgICAgICAgICAgICAgIHsoaGFzRGVwZW5kZW50cyB8fCBmaWVsZC5pc1JlcXVpcmVkKSAmJiAnIConfVxuICAgICAgICAgICAgICAgICAgICA8L0NoZWNrYm94SW5wdXQ+XG4gICAgICAgICAgICAgICAgICAgIHtpc0NoaWxkcmVuQ291bnREaXNwbGF5ZWQgJiZcbiAgICAgICAgICAgICAgICAgICAgICBmaWVsZC5maWVsZHMgJiZcbiAgICAgICAgICAgICAgICAgICAgICBmaWVsZC5maWVsZHMubGVuZ3RoID4gMCAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxleDogJzAgMCBhdXRvJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgPEZpZWxkc0NvdW50U3RhbXAgY291bnQ9e2ZpZWxkLmZpZWxkcy5sZW5ndGh9IC8+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgPC9TcGFjaW5ncy5JbmxpbmU+XG4gICAgICAgICAgICAgICAgPC9GaWVsZFdyYXBwZXI+XG4gICAgICAgICAgICAgICAge2ZpZWxkLmZpZWxkcyAmJiBmaWVsZC5maWVsZHMubGVuZ3RoID4gMCAmJiAoXG4gICAgICAgICAgICAgICAgICA8U3R5bGVkRXhwYW5kYWJsZUNvbnRlbnRcbiAgICAgICAgICAgICAgICAgICAgcmVmPXtyZWdpc3RlckNvbnRlbnROb2RlfVxuICAgICAgICAgICAgICAgICAgICBpc09wZW49e2lzT3Blbn1cbiAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAge2lzT3BlbiAmJiAoXG4gICAgICAgICAgICAgICAgICAgICAgPFNwYWNpbmdzLklubGluZSBzY2FsZT1cInhsXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IC8+XG4gICAgICAgICAgICAgICAgICAgICAgICA8RmllbGRTZWN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkcz17ZmllbGQuZmllbGRzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhWaXNpYmxlQ2hpbGRyZW49e2ZpZWxkLm1heFZpc2libGVDaGlsZHJlbn1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWlrPXtmb3JtaWt9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudEtleXM9e1suLi5wYXJlbnRLZXlzLCBgZmllbGRzWyR7aW5kZXh9XWBdfVxuICAgICAgICAgICAgICAgICAgICAgICAgICBpc0FueVNpYmxpbmdDaGVja2VkPXtpc0FueVNpYmxpbmdDaGVja2VkfVxuICAgICAgICAgICAgICAgICAgICAgICAgICBpc1NlYXJjaEFjdGl2ZT17aXNTZWFyY2hBY3RpdmV9XG4gICAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwTmFtZT17Z3JvdXBOYW1lfVxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgIDwvU3R5bGVkRXhwYW5kYWJsZUNvbnRlbnQ+XG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgPC9GcmFnbWVudD5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9Db2xsYXBzaWJsZUZpZWxkV3JhcHBlcj5cbiAgICAgICAgKVxuICAgICAgfSl9XG4gICAgICB7aGFzTW9yZUZpZWxkcyAmJiAoXG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZ1hzfTtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFRleHQuRGV0YWlsIHRvbmU9XCJ0ZXJ0aWFyeVwiIGludGxNZXNzYWdlPXttZXNzYWdlcy5sb2FkTW9yZUZpZWxkc30gLz5cbiAgICAgICAgPC9kaXY+XG4gICAgICApfVxuICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gIClcbn1cbiJdfQ== */"),
|
|
2684
2730
|
children: jsx(Text.Detail, {
|
|
@@ -2747,7 +2793,7 @@ const FieldGroupSection = _ref2 => {
|
|
|
2747
2793
|
const isAnyFieldInGroupChecked = useMemo(() => isAnyFieldChecked(group.fields), [group.fields]);
|
|
2748
2794
|
const _useExportFieldSelect = useExportFieldSelectionContext(),
|
|
2749
2795
|
updateExpandedGroups = _useExportFieldSelect.updateExpandedGroups;
|
|
2750
|
-
const parentKey =
|
|
2796
|
+
const parentKey = "groups[".concat(index, "]");
|
|
2751
2797
|
const handleChangeAllFields = e => {
|
|
2752
2798
|
const item = get(_valuesInstanceProperty(formik), parentKey);
|
|
2753
2799
|
function updateAllFields(fields, checked) {
|
|
@@ -2829,7 +2875,7 @@ const FieldGroupSection = _ref2 => {
|
|
|
2829
2875
|
})]
|
|
2830
2876
|
});
|
|
2831
2877
|
}
|
|
2832
|
-
},
|
|
2878
|
+
}, "".concat(isSearchActive));
|
|
2833
2879
|
};
|
|
2834
2880
|
|
|
2835
2881
|
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)."; }
|
|
@@ -2868,7 +2914,7 @@ const NoSearchResults = () => {
|
|
|
2868
2914
|
};
|
|
2869
2915
|
|
|
2870
2916
|
function ownKeys$4(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2871
|
-
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
2917
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys$4(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context0 = ownKeys$4(Object(t))).call(_context0, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2872
2918
|
const totalSpacing = 56 +
|
|
2873
2919
|
// MC header
|
|
2874
2920
|
32 * 2 + (
|
|
@@ -2913,30 +2959,34 @@ const StyledGridCard = /*#__PURE__*/_styled(Card, process.env.NODE_ENV === "prod
|
|
|
2913
2959
|
label: "StyledGridCard"
|
|
2914
2960
|
})("max-height:calc(100vh - ", totalSpacing, "px);overflow:auto;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlbGVjdGVkLWZpZWxkcy1mb3JtLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0Q21DIiwiZmlsZSI6InNlbGVjdGVkLWZpZWxkcy1mb3JtLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCdcbmltcG9ydCB7IHVzZUludGwgfSBmcm9tICdyZWFjdC1pbnRsJ1xuaW1wb3J0IHsgdXNlQXBwbGljYXRpb25Db250ZXh0IH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwtY29ubmVjdG9ycydcbmltcG9ydCB7XG4gIENhcmQsXG4gIEdyaWQsXG4gIFNwYWNpbmdzLFxuICBTZWFyY2hUZXh0SW5wdXQsXG4gIGRlc2lnblRva2Vucyxcbn0gZnJvbSAnQGNvbW1lcmNld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91cC5ncm91cE5hbWV9XG4gICAgICAgICAgICAgICAgICBncm91cD17Z3JvdXB9XG4gICAgICAgICAgICAgICAgICBpbmRleD17aW5kZXh9XG4gICAgICAgICAgICAgICAgICBmb3JtaWs9e2Zvcm1pa31cbiAgICAgICAgICAgICAgICAgIGlzU2VhcmNoQWN0aXZlPXtpc1NlYXJjaEFjdGl2ZX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICApKX1cbiAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICA8L1N0eWxlZEdyaWRDYXJkPlxuICAgICAgICApIDogKFxuICAgICAgICAgIDxOb1NlYXJjaFJlc3VsdHMgLz5cbiAgICAgICAgKX1cbiAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgPC9FeHBvcnRGaWVsZFNlbGVjdGlvblByb3ZpZGVyPlxuICApXG59XG4iXX0= */"));
|
|
2915
2961
|
const SelectedFieldsForm = () => {
|
|
2916
|
-
var _context,
|
|
2962
|
+
var _context, _fieldSearchTerm$trim, _context7, _context8;
|
|
2917
2963
|
const intl = useIntl();
|
|
2918
2964
|
const _React$useState = React.useState(''),
|
|
2919
2965
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
2920
2966
|
fieldSearchTerm = _React$useState2[0],
|
|
2921
2967
|
setFieldSearchTerm = _React$useState2[1];
|
|
2922
|
-
const _useApplicationContex = useApplicationContext(context =>
|
|
2923
|
-
|
|
2924
|
-
|
|
2968
|
+
const _useApplicationContex = useApplicationContext(context => {
|
|
2969
|
+
var _context$project;
|
|
2970
|
+
return {
|
|
2971
|
+
projectKey: (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key
|
|
2972
|
+
};
|
|
2973
|
+
}),
|
|
2925
2974
|
projectKey = _useApplicationContex.projectKey;
|
|
2926
|
-
const _useStorage = useStorage(
|
|
2975
|
+
const _useStorage = useStorage(_concatInstanceProperty(_context = "".concat(projectKey, "/")).call(_context, OPERATIONS_EXPORT_RESOURCES_MODAL_SELECTION), {}),
|
|
2927
2976
|
_useStorage2 = _slicedToArray(_useStorage, 2),
|
|
2928
2977
|
cachedSelectedGroups = _useStorage2[0],
|
|
2929
2978
|
setCachedSelectedGroups = _useStorage2[1];
|
|
2930
2979
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
2931
2980
|
formik = _useExportResourcesMo.formik,
|
|
2932
2981
|
resourceType = _useExportResourcesMo.resourceType;
|
|
2933
|
-
const isSearchActive = (
|
|
2982
|
+
const isSearchActive = (fieldSearchTerm === null || fieldSearchTerm === void 0 || (_fieldSearchTerm$trim = _trimInstanceProperty(fieldSearchTerm).call(fieldSearchTerm)) === null || _fieldSearchTerm$trim === void 0 ? void 0 : _fieldSearchTerm$trim.length) >= MIN_SEARCH_LENGTH;
|
|
2934
2983
|
React.useEffect(() => {
|
|
2935
2984
|
var _context4;
|
|
2936
2985
|
updateFieldDependenciesStatus(formik);
|
|
2937
2986
|
const checkedFields = {};
|
|
2938
2987
|
function getCheckedFields(field, groupName) {
|
|
2939
|
-
|
|
2988
|
+
var _context2;
|
|
2989
|
+
const fieldName = field.name ? _concatInstanceProperty(_context2 = "".concat(groupName, ".")).call(_context2, field.name) : groupName;
|
|
2940
2990
|
if (field.fields) {
|
|
2941
2991
|
var _context3;
|
|
2942
2992
|
_forEachInstanceProperty(_context3 = field.fields).call(_context3, f => getCheckedFields(f, fieldName));
|
|
@@ -3016,7 +3066,7 @@ const SelectedFieldsForm = () => {
|
|
|
3016
3066
|
insetScale: "none",
|
|
3017
3067
|
children: jsx(Grid, {
|
|
3018
3068
|
gridAutoFlow: "row",
|
|
3019
|
-
gridTemplateColumns:
|
|
3069
|
+
gridTemplateColumns: _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = "calc(".concat(designTokens.spacingL, " + ")).call(_context8, designTokens.constraint5, " + ")).call(_context7, designTokens.spacingL, ") auto"),
|
|
3020
3070
|
children: _mapInstanceProperty(filteredGroups).call(filteredGroups, (group, index) => jsx(FieldGroupSection, {
|
|
3021
3071
|
group: group,
|
|
3022
3072
|
index: index,
|
|
@@ -3037,6 +3087,7 @@ const Divider = /*#__PURE__*/_styled("hr", process.env.NODE_ENV === "production"
|
|
|
3037
3087
|
})("display:block;height:1px;border:0;border-top:1px solid ", designTokens.colorNeutral90, ";margin:0;padding:0;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpdmlkZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdnQyIsImZpbGUiOiJkaXZpZGVyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGRlc2lnblRva2VucyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCdcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuXG5leHBvcnQgY29uc3QgRGl2aWRlciA9IHN0eWxlZC5ocmBcbiAgZGlzcGxheTogYmxvY2s7XG4gIGhlaWdodDogMXB4O1xuICBib3JkZXI6IDA7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAke2Rlc2lnblRva2Vucy5jb2xvck5ldXRyYWw5MH07XG4gIG1hcmdpbjogMDtcbiAgcGFkZGluZzogMDtcbmBcbiJdfQ== */"));
|
|
3038
3088
|
|
|
3039
3089
|
const ExportFieldsSelectionStep = () => {
|
|
3090
|
+
var _context, _context2;
|
|
3040
3091
|
const intl = useIntl();
|
|
3041
3092
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
3042
3093
|
formik = _useExportResourcesMo.formik,
|
|
@@ -3058,13 +3109,13 @@ const ExportFieldsSelectionStep = () => {
|
|
|
3058
3109
|
};
|
|
3059
3110
|
return jsx(FormDialog, {
|
|
3060
3111
|
isOpen: true,
|
|
3061
|
-
title:
|
|
3112
|
+
title: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages.stepCount, {
|
|
3062
3113
|
currentStep: 2,
|
|
3063
3114
|
totalSteps: TOTAL_STEPS
|
|
3064
|
-
})
|
|
3065
|
-
labelPrimary:
|
|
3115
|
+
}), ": ")).call(_context, intl.formatMessage(messages.selectFieldsToExport)),
|
|
3116
|
+
labelPrimary: _concatInstanceProperty(_context2 = "".concat(intl.formatMessage(messages.stepNumber, {
|
|
3066
3117
|
stepNumber: 3
|
|
3067
|
-
})
|
|
3118
|
+
}), ": ")).call(_context2, intl.formatMessage(messages.confirmSelection)),
|
|
3068
3119
|
iconLeftPrimaryButton: jsx(AngleRightIcon, {}),
|
|
3069
3120
|
onPrimaryButtonClick: formik.submitForm,
|
|
3070
3121
|
isPrimaryButtonDisabled: isLoading || !formik.isValid,
|
|
@@ -3073,7 +3124,7 @@ const ExportFieldsSelectionStep = () => {
|
|
|
3073
3124
|
onClose: onClose,
|
|
3074
3125
|
size: 16,
|
|
3075
3126
|
dataAttributesPrimaryButton: {
|
|
3076
|
-
'data-tracking-target':
|
|
3127
|
+
'data-tracking-target': "".concat(resourceType, "_export-start_export_button")
|
|
3077
3128
|
},
|
|
3078
3129
|
children: isLoading ? jsx(Spacings.Stack, {
|
|
3079
3130
|
scale: "m",
|
|
@@ -3177,11 +3228,11 @@ const ExportResourcesProvider = _ref => {
|
|
|
3177
3228
|
locales: values.locales,
|
|
3178
3229
|
queryPredicate: values.queryPredicate
|
|
3179
3230
|
});
|
|
3180
|
-
if (validationResult
|
|
3231
|
+
if (validationResult !== null && validationResult !== void 0 && validationResult.invalidQueryPredicate) {
|
|
3181
3232
|
formik.setFieldError('queryPredicate', 'invalidInput');
|
|
3182
3233
|
return;
|
|
3183
3234
|
}
|
|
3184
|
-
if (validationResult
|
|
3235
|
+
if (validationResult !== null && validationResult !== void 0 && validationResult.noResourcesToExportForQueryPredicate) {
|
|
3185
3236
|
formik.setFieldError('queryPredicate', 'noResourcesToExportForQueryPredicate');
|
|
3186
3237
|
return;
|
|
3187
3238
|
}
|
|
@@ -3201,10 +3252,10 @@ const ExportResourcesProvider = _ref => {
|
|
|
3201
3252
|
locales: isUsingImportedCsvLocales ? undefined : values.locales,
|
|
3202
3253
|
queryPredicate: values.queryPredicate
|
|
3203
3254
|
});
|
|
3204
|
-
if (validationResult
|
|
3255
|
+
if (validationResult !== null && validationResult !== void 0 && validationResult.success) {
|
|
3205
3256
|
setCurrentStep(Step.ConfirmExport);
|
|
3206
3257
|
} else {
|
|
3207
|
-
setValidationErrors(validationResult
|
|
3258
|
+
setValidationErrors(validationResult === null || validationResult === void 0 ? void 0 : validationResult.validationErrors);
|
|
3208
3259
|
setCurrentStep(Step.ValidationErrors);
|
|
3209
3260
|
}
|
|
3210
3261
|
} else {
|
|
@@ -3260,7 +3311,7 @@ const ExportResourcesProvider = _ref => {
|
|
|
3260
3311
|
|
|
3261
3312
|
const ExportLogsLink = props => {
|
|
3262
3313
|
return jsx(Link, {
|
|
3263
|
-
to:
|
|
3314
|
+
to: "/".concat(props.projectKey, "/operations/export/logs"),
|
|
3264
3315
|
tone: props.tone,
|
|
3265
3316
|
children: props.msg
|
|
3266
3317
|
}, "link");
|
|
@@ -3301,12 +3352,16 @@ const FieldsPreview = _ref => {
|
|
|
3301
3352
|
};
|
|
3302
3353
|
|
|
3303
3354
|
function ownKeys$3(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3304
|
-
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
3355
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$3(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$3(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3305
3356
|
const ExportConfirmationStep = () => {
|
|
3357
|
+
var _context2;
|
|
3306
3358
|
const intl = useIntl();
|
|
3307
|
-
const _useApplicationContex = useApplicationContext(applicationContext =>
|
|
3308
|
-
|
|
3309
|
-
|
|
3359
|
+
const _useApplicationContex = useApplicationContext(applicationContext => {
|
|
3360
|
+
var _applicationContext$p;
|
|
3361
|
+
return {
|
|
3362
|
+
projectKey: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.key
|
|
3363
|
+
};
|
|
3364
|
+
}),
|
|
3310
3365
|
projectKey = _useApplicationContex.projectKey;
|
|
3311
3366
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
3312
3367
|
formik = _useExportResourcesMo.formik,
|
|
@@ -3328,10 +3383,10 @@ const ExportConfirmationStep = () => {
|
|
|
3328
3383
|
const returnToFieldsSelection = () => setCurrentStep(Step.FieldsSelection);
|
|
3329
3384
|
return jsx(FormDialog, {
|
|
3330
3385
|
isOpen: true,
|
|
3331
|
-
title:
|
|
3386
|
+
title: _concatInstanceProperty(_context2 = "".concat(intl.formatMessage(messages.stepCount, {
|
|
3332
3387
|
currentStep: 3,
|
|
3333
3388
|
totalSteps: TOTAL_STEPS
|
|
3334
|
-
})
|
|
3389
|
+
}), ": ")).call(_context2, intl.formatMessage(messages.exportPreview)),
|
|
3335
3390
|
labelPrimary: intl.formatMessage(messages.startExport),
|
|
3336
3391
|
onPrimaryButtonClick: formik.submitForm,
|
|
3337
3392
|
labelSecondary: intl.formatMessage(messages.selectDifferentFields),
|
|
@@ -3402,7 +3457,7 @@ const ExportConfirmationStep = () => {
|
|
|
3402
3457
|
};
|
|
3403
3458
|
|
|
3404
3459
|
function ownKeys$2(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3405
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
3460
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys$2(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$2(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3406
3461
|
const getColumns = () => [{
|
|
3407
3462
|
key: 'errorType',
|
|
3408
3463
|
label: jsx(FormattedMessage, _objectSpread$2({}, messages.errorType)),
|
|
@@ -3415,7 +3470,8 @@ const ErrorTable = props => {
|
|
|
3415
3470
|
var _context;
|
|
3416
3471
|
const intl = useIntl();
|
|
3417
3472
|
const rows = _mapInstanceProperty(_context = props.errors).call(_context, row => {
|
|
3418
|
-
|
|
3473
|
+
var _row$originalErrors$, _context2;
|
|
3474
|
+
const id = row.code === 'AttributeLevelMismatch' && (_row$originalErrors$ = row.originalErrors[0]) !== null && _row$originalErrors$ !== void 0 && _row$originalErrors$.actualLevel ? _concatInstanceProperty(_context2 = "".concat(row.code, "-")).call(_context2, row.originalErrors[0].actualLevel) : row.code;
|
|
3419
3475
|
return _objectSpread$2(_objectSpread$2({}, row), {}, {
|
|
3420
3476
|
id
|
|
3421
3477
|
});
|
|
@@ -3432,7 +3488,7 @@ const ErrorTable = props => {
|
|
|
3432
3488
|
});
|
|
3433
3489
|
};
|
|
3434
3490
|
function itemRenderer(item, column, intl) {
|
|
3435
|
-
var
|
|
3491
|
+
var _context3;
|
|
3436
3492
|
switch (column.key) {
|
|
3437
3493
|
case 'errorType':
|
|
3438
3494
|
return jsx(Stamp, {
|
|
@@ -3450,7 +3506,7 @@ function itemRenderer(item, column, intl) {
|
|
|
3450
3506
|
margin: 0,
|
|
3451
3507
|
paddingLeft: designTokens.spacingL
|
|
3452
3508
|
},
|
|
3453
|
-
children: _mapInstanceProperty(
|
|
3509
|
+
children: _mapInstanceProperty(_context3 = item.fieldNames).call(_context3, (field, index) => jsx("li", {
|
|
3454
3510
|
children: jsx(Text.Detail, {
|
|
3455
3511
|
children: field
|
|
3456
3512
|
})
|
|
@@ -3487,6 +3543,7 @@ function getErrorTypeLabel(errorCode, intl) {
|
|
|
3487
3543
|
function ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3488
3544
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3489
3545
|
const ExportValidationErrorsStep = () => {
|
|
3546
|
+
var _formik$values$import;
|
|
3490
3547
|
const intl = useIntl();
|
|
3491
3548
|
const _useExportResourcesMo = useExportResourcesModalContext(),
|
|
3492
3549
|
formik = _useExportResourcesMo.formik,
|
|
@@ -3529,7 +3586,7 @@ const ExportValidationErrorsStep = () => {
|
|
|
3529
3586
|
intlMessage: _objectSpread$1(_objectSpread$1({}, messages.uploadErrorsDetected), {}, {
|
|
3530
3587
|
values: {
|
|
3531
3588
|
total: intl.formatNumber(validationErrors.length),
|
|
3532
|
-
fileName: _valuesInstanceProperty(formik).importedCsvTemplateFile
|
|
3589
|
+
fileName: (_formik$values$import = _valuesInstanceProperty(formik).importedCsvTemplateFile) === null || _formik$values$import === void 0 ? void 0 : _formik$values$import.name,
|
|
3533
3590
|
b: msg => jsx("b", {
|
|
3534
3591
|
children: msg
|
|
3535
3592
|
}, crypto.randomUUID()),
|
|
@@ -3637,17 +3694,20 @@ const FileDropArea = () => {
|
|
|
3637
3694
|
'text/csv': ['.csv']
|
|
3638
3695
|
},
|
|
3639
3696
|
getDropAreaState: getState,
|
|
3640
|
-
children: dropAreaState =>
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3697
|
+
children: dropAreaState => {
|
|
3698
|
+
var _formik$values$import;
|
|
3699
|
+
return getDropArea({
|
|
3700
|
+
dropAreaState,
|
|
3701
|
+
isFileDropped: Boolean(_valuesInstanceProperty(formik).importedCsvTemplateFile),
|
|
3702
|
+
fileName: (_formik$values$import = _valuesInstanceProperty(formik).importedCsvTemplateFile) === null || _formik$values$import === void 0 ? void 0 : _formik$values$import.name,
|
|
3703
|
+
messages: {
|
|
3704
|
+
chooseFile: intl.formatMessage(messages.chooseFile),
|
|
3705
|
+
dragAndDropCSV: intl.formatMessage(messages.dragAndDropCSV),
|
|
3706
|
+
or: intl.formatMessage(messages.or),
|
|
3707
|
+
browseFile: intl.formatMessage(messages.browseFile)
|
|
3708
|
+
}
|
|
3709
|
+
});
|
|
3710
|
+
}
|
|
3651
3711
|
});
|
|
3652
3712
|
};
|
|
3653
3713
|
|
|
@@ -3674,8 +3734,8 @@ const loadMessages = async locale => {
|
|
|
3674
3734
|
return parseChunkImport(chunkImport);
|
|
3675
3735
|
} catch (error) {
|
|
3676
3736
|
// eslint-disable-next-line no-console
|
|
3677
|
-
console.warn(
|
|
3678
|
-
reportErrorToSentry(new Error(
|
|
3737
|
+
console.warn("Something went wrong while loading the export-resources-modal messages for ".concat(locale), error);
|
|
3738
|
+
reportErrorToSentry(new Error("Something went wrong while loading the export-resources-modal messages for ".concat(locale)), {
|
|
3679
3739
|
extra: error
|
|
3680
3740
|
});
|
|
3681
3741
|
return {};
|