@commercetools-frontend-extensions/import-resources-modal 1.9.1 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{active-drag-drop-area-73dfaf5d.cjs.prod.js → active-drag-drop-area-58179e9a.cjs.prod.js} +1 -1
- package/dist/{active-drag-drop-area-8e57dd40.esm.js → active-drag-drop-area-5983aeff.esm.js} +1 -1
- package/dist/{active-drag-drop-area-ba4a851f.cjs.dev.js → active-drag-drop-area-bb4bbe27.cjs.dev.js} +1 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.esm.js +1 -1
- package/dist/{de-94201791.cjs.prod.js → de-3e1e8435.cjs.dev.js} +1 -1
- package/dist/{de-cf302015.esm.js → de-67bd98c5.esm.js} +1 -1
- package/dist/{de-7ed25bdf.cjs.dev.js → de-a33f40b4.cjs.prod.js} +1 -1
- package/dist/declarations/src/@types/file-upload.d.ts +1 -0
- package/dist/declarations/src/@types/import-container.d.ts +4 -2
- package/dist/{disabled-drop-area-034e0448.esm.js → disabled-drop-area-67de59ef.esm.js} +1 -1
- package/dist/{disabled-drop-area-ddd04658.cjs.prod.js → disabled-drop-area-9c90609b.cjs.prod.js} +1 -1
- package/dist/{disabled-drop-area-d1e857eb.cjs.dev.js → disabled-drop-area-a3d62583.cjs.dev.js} +1 -1
- package/dist/{enabled-drop-area-89b5985e.esm.js → enabled-drop-area-5f322d0a.esm.js} +1 -1
- package/dist/{enabled-drop-area-20a79b9e.cjs.prod.js → enabled-drop-area-723eb5b8.cjs.prod.js} +1 -1
- package/dist/{enabled-drop-area-a7cc9ec4.cjs.dev.js → enabled-drop-area-7cc66fc8.cjs.dev.js} +1 -1
- package/dist/{file-dropped-area-58e15030.esm.js → file-dropped-area-724a3d30.esm.js} +1 -1
- package/dist/{file-dropped-area-72914d0f.cjs.prod.js → file-dropped-area-d451d883.cjs.prod.js} +1 -1
- package/dist/{file-dropped-area-bacca40c.cjs.dev.js → file-dropped-area-e06176a3.cjs.dev.js} +1 -1
- package/dist/{index-0a743bd2.cjs.dev.js → index-44a01cb9.cjs.dev.js} +169 -79
- package/dist/{index-943152ea.esm.js → index-7a93797c.esm.js} +170 -80
- package/dist/{index-f01fd89f.cjs.prod.js → index-e08c812b.cjs.prod.js} +164 -79
- package/package.json +18 -18
|
@@ -116,27 +116,26 @@ let CurrentStep$1 = /*#__PURE__*/function (CurrentStep) {
|
|
|
116
116
|
return CurrentStep;
|
|
117
117
|
}({});
|
|
118
118
|
|
|
119
|
-
function ownKeys$
|
|
120
|
-
function _objectSpread$
|
|
119
|
+
function ownKeys$k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
120
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
121
121
|
|
|
122
122
|
// TODO: make this resource type specific
|
|
123
123
|
|
|
124
124
|
function reducer(state, action) {
|
|
125
|
-
if (action.type === 'setCurrentStep') return _objectSpread$
|
|
125
|
+
if (action.type === 'setCurrentStep') return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
126
126
|
currentStep: action.currentStep,
|
|
127
127
|
progress: 0
|
|
128
128
|
});
|
|
129
|
-
if (action.type === 'setUploadFileResponse') return _objectSpread$
|
|
129
|
+
if (action.type === 'setUploadFileResponse') return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
130
130
|
uploadFileResponse: action.uploadFileResponse
|
|
131
131
|
});
|
|
132
|
-
if (action.type === 'setResourceType') return _objectSpread$
|
|
133
|
-
settings: undefined,
|
|
132
|
+
if (action.type === 'setResourceType') return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
134
133
|
resourceType: action.resourceType
|
|
135
134
|
});
|
|
136
|
-
if (action.type === 'setContainerKey') return _objectSpread$
|
|
135
|
+
if (action.type === 'setContainerKey') return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
137
136
|
containerKey: action.containerKey
|
|
138
137
|
});
|
|
139
|
-
if (action.type === 'cancelImport') return _objectSpread$
|
|
138
|
+
if (action.type === 'cancelImport') return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
140
139
|
currentStep: CurrentStep$1.Upload,
|
|
141
140
|
containerKey: undefined,
|
|
142
141
|
fileUploadErrors: [],
|
|
@@ -145,7 +144,7 @@ function reducer(state, action) {
|
|
|
145
144
|
dropAreaState: 'disabled',
|
|
146
145
|
progress: 0
|
|
147
146
|
});
|
|
148
|
-
if (action.type === 'uploadNewFile') return _objectSpread$
|
|
147
|
+
if (action.type === 'uploadNewFile') return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
149
148
|
currentStep: CurrentStep$1.Upload,
|
|
150
149
|
containerKey: undefined,
|
|
151
150
|
fileUploadErrors: [],
|
|
@@ -155,28 +154,28 @@ function reducer(state, action) {
|
|
|
155
154
|
progress: 0
|
|
156
155
|
});
|
|
157
156
|
if (action.type === 'setDroppedFile') {
|
|
158
|
-
return _objectSpread$
|
|
157
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
159
158
|
droppedFile: action.droppedFile
|
|
160
159
|
});
|
|
161
160
|
}
|
|
162
161
|
if (action.type === 'setFileUploadErrors') {
|
|
163
|
-
return _objectSpread$
|
|
162
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
164
163
|
fileUploadErrors: action.fileUploadErrors
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
166
|
if (action.type === 'setAbortController') {
|
|
168
|
-
return _objectSpread$
|
|
167
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
169
168
|
abortController: action.abortController
|
|
170
169
|
});
|
|
171
170
|
}
|
|
172
171
|
if (action.type === 'setProgress') {
|
|
173
|
-
return _objectSpread$
|
|
172
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
174
173
|
progress: action.progress
|
|
175
174
|
});
|
|
176
175
|
}
|
|
177
176
|
if (action.type === 'setUploadSettings') {
|
|
178
|
-
return _objectSpread$
|
|
179
|
-
settings: _objectSpread$
|
|
177
|
+
return _objectSpread$k(_objectSpread$k({}, state), {}, {
|
|
178
|
+
settings: _objectSpread$k(_objectSpread$k({}, state.settings), action.settings)
|
|
180
179
|
});
|
|
181
180
|
}
|
|
182
181
|
throw new Error(getUnknownActionError(action));
|
|
@@ -192,7 +191,10 @@ const initialState = {
|
|
|
192
191
|
fileUploadErrors: [],
|
|
193
192
|
resourceType: 'category',
|
|
194
193
|
containerKey: undefined,
|
|
195
|
-
progress: 0
|
|
194
|
+
progress: 0,
|
|
195
|
+
settings: {
|
|
196
|
+
decimalSeparator: '.'
|
|
197
|
+
}
|
|
196
198
|
};
|
|
197
199
|
|
|
198
200
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -241,8 +243,8 @@ let HttpError = /*#__PURE__*/function (_Error) {
|
|
|
241
243
|
return _createClass(HttpError);
|
|
242
244
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
243
245
|
|
|
244
|
-
function ownKeys$
|
|
245
|
-
function _objectSpread$
|
|
246
|
+
function ownKeys$j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
247
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$j(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
246
248
|
const addProxyPrefixToUrl = (uri, proxy) => {
|
|
247
249
|
return proxy ? `/proxy/${proxy}${uri}` : uri;
|
|
248
250
|
};
|
|
@@ -254,7 +256,7 @@ const fetchUsingXhr = _ref2 => {
|
|
|
254
256
|
onSuccess = _ref2.onSuccess,
|
|
255
257
|
onError = _ref2.onError;
|
|
256
258
|
const options = applicationShell.createHttpClientOptions({
|
|
257
|
-
headers: _objectSpread$
|
|
259
|
+
headers: _objectSpread$j({
|
|
258
260
|
'Content-Type': 'application/json'
|
|
259
261
|
}, config?.headers)
|
|
260
262
|
});
|
|
@@ -298,7 +300,14 @@ const fetchUsingXhr = _ref2 => {
|
|
|
298
300
|
return xhr;
|
|
299
301
|
};
|
|
300
302
|
|
|
301
|
-
const
|
|
303
|
+
const DELIMITERS = {
|
|
304
|
+
COMMA: ',',
|
|
305
|
+
SEMICOLON: ';',
|
|
306
|
+
POINT: '.',
|
|
307
|
+
TAB: '\t',
|
|
308
|
+
PIPE: '|'
|
|
309
|
+
};
|
|
310
|
+
const COLUMN_DELIMITERS = [DELIMITERS.COMMA, DELIMITERS.SEMICOLON, DELIMITERS.PIPE, DELIMITERS.TAB];
|
|
302
311
|
const INITIAL_COLUMN_DISPLAY_COUNT = 8;
|
|
303
312
|
const IMPORT_TAG_KEYS = {
|
|
304
313
|
source: 'source'
|
|
@@ -399,11 +408,11 @@ const ACTION_RIGHTS = {
|
|
|
399
408
|
}
|
|
400
409
|
};
|
|
401
410
|
|
|
402
|
-
function ownKeys$
|
|
403
|
-
function _objectSpread$
|
|
411
|
+
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
412
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
404
413
|
const DEFAULT_SHORT_LIVED_FLAGS = {};
|
|
405
414
|
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
406
|
-
_objectSpread$
|
|
415
|
+
_objectSpread$i(_objectSpread$i({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
407
416
|
|
|
408
417
|
var sharedMessages = reactIntl.defineMessages({
|
|
409
418
|
[`modalTitle.${IMPORTABLE_RESOURCES.CATEGORY}`]: {
|
|
@@ -655,13 +664,13 @@ var sharedMessages = reactIntl.defineMessages({
|
|
|
655
664
|
//
|
|
656
665
|
});
|
|
657
666
|
|
|
658
|
-
function ownKeys$
|
|
659
|
-
function _objectSpread$
|
|
667
|
+
function ownKeys$h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
668
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$h(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$h(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
660
669
|
|
|
661
670
|
// Delimiters not included in this array may be treated as part of a column content
|
|
662
671
|
// potentially causing the file to be parsed as a single-column CSV and pass this validation
|
|
663
|
-
const
|
|
664
|
-
const DELIMITERS_TO_GUESS = [...
|
|
672
|
+
const NON_ALLOWED_COLUMN_DELIMITERS = ['%', '.', ' '];
|
|
673
|
+
const DELIMITERS_TO_GUESS = [...COLUMN_DELIMITERS, ...NON_ALLOWED_COLUMN_DELIMITERS];
|
|
665
674
|
const validateDelimiter = file => {
|
|
666
675
|
return new _Promise__default["default"](resolve => {
|
|
667
676
|
Papa__default["default"].parse(file, {
|
|
@@ -676,7 +685,7 @@ const validateDelimiter = file => {
|
|
|
676
685
|
}
|
|
677
686
|
const detectedDelimiter = result.meta.delimiter;
|
|
678
687
|
let isValid = false;
|
|
679
|
-
if (detectedDelimiter !== null && _includesInstanceProperty__default["default"](
|
|
688
|
+
if (detectedDelimiter !== null && _includesInstanceProperty__default["default"](COLUMN_DELIMITERS).call(COLUMN_DELIMITERS, detectedDelimiter)) {
|
|
680
689
|
var _context;
|
|
681
690
|
const isUndetectableDelimiter = _someInstanceProperty__default["default"](_context = result.errors).call(_context, error => error.code === 'UndetectableDelimiter');
|
|
682
691
|
if (!isUndetectableDelimiter) {
|
|
@@ -705,7 +714,7 @@ const mapUploadFileErrorsResponseToUploadFileErrorRows = uploadFileErrorsRespons
|
|
|
705
714
|
};
|
|
706
715
|
const mapFileUploadErrorsToUploadFileErrorRows = uploadFileErrors => {
|
|
707
716
|
let idCounter = 1;
|
|
708
|
-
return _mapInstanceProperty__default["default"](uploadFileErrors).call(uploadFileErrors, uploadFileError => _objectSpread$
|
|
717
|
+
return _mapInstanceProperty__default["default"](uploadFileErrors).call(uploadFileErrors, uploadFileError => _objectSpread$h(_objectSpread$h({}, uploadFileError), {}, {
|
|
709
718
|
id: String(idCounter++)
|
|
710
719
|
}));
|
|
711
720
|
};
|
|
@@ -745,7 +754,7 @@ const getValidatedColumns = (columns, ignoredColumns) => {
|
|
|
745
754
|
};
|
|
746
755
|
const formatAllowedDelimitersForMessageDisplay = intl => {
|
|
747
756
|
const localizedOr = intl.formatMessage(sharedMessages.listConjunctionOr);
|
|
748
|
-
const descriptions = _mapInstanceProperty__default["default"](
|
|
757
|
+
const descriptions = _mapInstanceProperty__default["default"](COLUMN_DELIMITERS).call(COLUMN_DELIMITERS, delimiter => {
|
|
749
758
|
let nameDescriptor;
|
|
750
759
|
switch (delimiter) {
|
|
751
760
|
case ',':
|
|
@@ -903,8 +912,8 @@ function uploadFileForImport(_ref) {
|
|
|
903
912
|
});
|
|
904
913
|
}
|
|
905
914
|
|
|
906
|
-
function ownKeys$
|
|
907
|
-
function _objectSpread$
|
|
915
|
+
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
916
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$g(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
908
917
|
function createImportContainerForFileUpload(importContainerDraft, projectKey, asyncDispatch) {
|
|
909
918
|
return asyncDispatch(sdk.actions.post({
|
|
910
919
|
mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.IMPORT,
|
|
@@ -913,7 +922,7 @@ function createImportContainerForFileUpload(importContainerDraft, projectKey, as
|
|
|
913
922
|
accept: 'application/json',
|
|
914
923
|
'Content-Type': 'application/json'
|
|
915
924
|
},
|
|
916
|
-
payload: _JSON$stringify__default["default"](_objectSpread$
|
|
925
|
+
payload: _JSON$stringify__default["default"](_objectSpread$g({
|
|
917
926
|
retentionPolicy: {
|
|
918
927
|
strategy: 'ttl',
|
|
919
928
|
config: {
|
|
@@ -957,8 +966,8 @@ function assertProcessFileResponse(maybeProcessFileResponse) {
|
|
|
957
966
|
throw new Error('Invalid response');
|
|
958
967
|
}
|
|
959
968
|
|
|
960
|
-
function ownKeys$
|
|
961
|
-
function _objectSpread$
|
|
969
|
+
function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
970
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
962
971
|
const ImportResourcesContext = /*#__PURE__*/React__default["default"].createContext();
|
|
963
972
|
const ImportResourcesProvider = props => {
|
|
964
973
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => ({
|
|
@@ -966,7 +975,7 @@ const ImportResourcesProvider = props => {
|
|
|
966
975
|
})),
|
|
967
976
|
projectKey = _useApplicationContex.projectKey;
|
|
968
977
|
const asyncDispatch = sdk.useAsyncDispatch();
|
|
969
|
-
const _React$useReducer = React__default["default"].useReducer(reducer, _objectSpread$
|
|
978
|
+
const _React$useReducer = React__default["default"].useReducer(reducer, _objectSpread$f(_objectSpread$f({}, initialState), {}, {
|
|
970
979
|
resourceType: props.resourceTypes[0]
|
|
971
980
|
})),
|
|
972
981
|
_React$useReducer2 = _slicedToArray(_React$useReducer, 2),
|
|
@@ -1106,13 +1115,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
1106
1115
|
return /*#__PURE__*/react.css(process.env.NODE_ENV === "production" ? "" : ";label:getDefaultDropWrapperStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyb3AtYXJlYS13cmFwcGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0QlkiLCJmaWxlIjoiZHJvcC1hcmVhLXdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBEcm9wem9uZVJvb3RQcm9wcyB9IGZyb20gJ3JlYWN0LWRyb3B6b25lJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IHN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuaW1wb3J0IHsgdHlwZSBEcm9wQXJlYVN0YXRlIH0gZnJvbSAnLi4vLi4vLi4vQHR5cGVzJ1xuXG5pbnRlcmZhY2UgRHJvcFdyYXBwZXJQcm9wcyBleHRlbmRzIERyb3B6b25lUm9vdFByb3BzIHtcbiAgZHJvcEFyZWFTdGF0ZTogRHJvcEFyZWFTdGF0ZVxufVxuZXhwb3J0IGNvbnN0IERyb3BXcmFwcGVyID0gc3R5bGVkLmRpdjxEcm9wV3JhcHBlclByb3BzPmBcbiAgJHtzdHlsZXMuYmFzZX1cbiAgJHsocHJvcHMpID0+IHtcbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2Rpc2FibGVkJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5kaXNhYmxlZFxuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ3JlYWR5LWZvci1kcm9wJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5yZWFkeUZvckRyb3BcbiAgICB9XG4gICAgaWYgKHByb3BzLmRyb3BBcmVhU3RhdGUgPT09ICdhY3RpdmUtZHJhZycpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuYWN0aXZlRHJhZ1xuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2ZpbGUtZHJvcHBlZCcpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuZmlsZURyb3BwZWRcbiAgICB9XG4gICAgcmV0dXJuIGdldERlZmF1bHREcm9wV3JhcHBlclN0eWxlcyhwcm9wcy5kcm9wQXJlYVN0YXRlKVxuICB9fVxuYFxuZnVuY3Rpb24gZ2V0RGVmYXVsdERyb3BXcmFwcGVyU3R5bGVzKF9kcm9wQXJlYVN0YXRlOiBuZXZlcikge1xuICByZXR1cm4gY3NzYGBcbn1cbiJdfQ== */");
|
|
1107
1116
|
}
|
|
1108
1117
|
|
|
1109
|
-
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-
|
|
1118
|
+
var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-bb4bbe27.cjs.dev.js'); }));
|
|
1110
1119
|
|
|
1111
|
-
var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-
|
|
1120
|
+
var DisabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./disabled-drop-area-a3d62583.cjs.dev.js'); }));
|
|
1112
1121
|
|
|
1113
|
-
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-
|
|
1122
|
+
var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-7cc66fc8.cjs.dev.js'); }));
|
|
1114
1123
|
|
|
1115
|
-
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-
|
|
1124
|
+
var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-e06176a3.cjs.dev.js'); }));
|
|
1116
1125
|
|
|
1117
1126
|
function getDropArea(_ref) {
|
|
1118
1127
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -1150,7 +1159,7 @@ function getDropAreaState(flags) {
|
|
|
1150
1159
|
return 'ready-for-drop';
|
|
1151
1160
|
}
|
|
1152
1161
|
|
|
1153
|
-
var messages$
|
|
1162
|
+
var messages$8 = reactIntl.defineMessages({
|
|
1154
1163
|
dragAndDropCSV: {
|
|
1155
1164
|
id: 'ImportResourcesModal.dragAndDropCSV',
|
|
1156
1165
|
description: 'The message telling the user to drag and drop CSV file in the file drop area',
|
|
@@ -1215,7 +1224,7 @@ function useImportResourcesContext() {
|
|
|
1215
1224
|
return context;
|
|
1216
1225
|
}
|
|
1217
1226
|
|
|
1218
|
-
var messages$
|
|
1227
|
+
var messages$7 = reactIntl.defineMessages({
|
|
1219
1228
|
fileSizeExceededTitle: {
|
|
1220
1229
|
id: 'ImportResourcesModal.sizeExceededTitle',
|
|
1221
1230
|
defaultMessage: 'File size exceeded'
|
|
@@ -1275,8 +1284,8 @@ var messages$6 = reactIntl.defineMessages({
|
|
|
1275
1284
|
}
|
|
1276
1285
|
});
|
|
1277
1286
|
|
|
1278
|
-
function ownKeys$
|
|
1279
|
-
function _objectSpread$
|
|
1287
|
+
function ownKeys$e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1288
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1280
1289
|
const useUpload = () => {
|
|
1281
1290
|
const intl = reactIntl.useIntl();
|
|
1282
1291
|
const projectKey = applicationShellConnectors.useApplicationContext(context => context.project?.key);
|
|
@@ -1294,25 +1303,25 @@ const useUpload = () => {
|
|
|
1294
1303
|
const errors = [];
|
|
1295
1304
|
const isDelimiterValid = await validateDelimiter(file);
|
|
1296
1305
|
if (!isDelimiterValid) errors.push({
|
|
1297
|
-
title: intl.formatMessage(messages$
|
|
1298
|
-
description: intl.formatMessage(messages$
|
|
1306
|
+
title: intl.formatMessage(messages$7.wrongSeparatorTitle),
|
|
1307
|
+
description: intl.formatMessage(messages$7.wrongSeparatorDescription, {
|
|
1299
1308
|
delimiterList: formatAllowedDelimitersForMessageDisplay(intl)
|
|
1300
1309
|
})
|
|
1301
1310
|
});
|
|
1302
1311
|
const rowCount = await getRowCount(file);
|
|
1303
1312
|
if (rowCount < 1) errors.push({
|
|
1304
|
-
title: intl.formatMessage(messages$
|
|
1305
|
-
description: intl.formatMessage(messages$
|
|
1313
|
+
title: intl.formatMessage(messages$7.dropAreaNotEnoughRowsTitle),
|
|
1314
|
+
description: intl.formatMessage(messages$7.dropAreaNotEnoughRowsDescription)
|
|
1306
1315
|
});
|
|
1307
1316
|
if (state.resourceType && file.size > toBytes(FILE_SIZE_LIMITS_MB[state.resourceType])) errors.push({
|
|
1308
|
-
title: intl.formatMessage(messages$
|
|
1309
|
-
description: intl.formatMessage(messages$
|
|
1317
|
+
title: intl.formatMessage(messages$7.fileSizeExceededTitle),
|
|
1318
|
+
description: intl.formatMessage(messages$7.fileSizeExceededDescription, {
|
|
1310
1319
|
fileSizeLimit: intl.formatNumber(FILE_SIZE_LIMITS_MB[state.resourceType])
|
|
1311
1320
|
})
|
|
1312
1321
|
});
|
|
1313
1322
|
if (state.resourceType && rowCount > ROW_LIMITS[state.resourceType]) errors.push({
|
|
1314
|
-
title: intl.formatMessage(messages$
|
|
1315
|
-
description: intl.formatMessage(messages$
|
|
1323
|
+
title: intl.formatMessage(messages$7.rowLimitExceededTitle),
|
|
1324
|
+
description: intl.formatMessage(messages$7.rowLimitExceededDescription, {
|
|
1316
1325
|
rowLimit: intl.formatNumber(ROW_LIMITS[state.resourceType])
|
|
1317
1326
|
})
|
|
1318
1327
|
});
|
|
@@ -1331,16 +1340,16 @@ const useUpload = () => {
|
|
|
1331
1340
|
if (error instanceof HttpError) {
|
|
1332
1341
|
if (error.errorData?.code === 'MISSING_KEY_ERROR') {
|
|
1333
1342
|
actions.setFileUploadErrors([{
|
|
1334
|
-
title: intl.formatMessage(messages$
|
|
1335
|
-
description: intl.formatMessage(messages$
|
|
1343
|
+
title: intl.formatMessage(messages$7.missingRequiredField),
|
|
1344
|
+
description: intl.formatMessage(messages$7.missingKeyError)
|
|
1336
1345
|
}]);
|
|
1337
1346
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1338
1347
|
} else if (error.errorData?.code === 'MissingCsvFieldIdentifier') {
|
|
1339
1348
|
const MissingCsvFieldIdentifierError = error.errorData;
|
|
1340
1349
|
const fieldNames = formatKeys(MissingCsvFieldIdentifierError.rowValue);
|
|
1341
1350
|
actions.setFileUploadErrors([{
|
|
1342
|
-
title: intl.formatMessage(messages$
|
|
1343
|
-
description: intl.formatMessage(messages$
|
|
1351
|
+
title: intl.formatMessage(messages$7.missingRequiredField),
|
|
1352
|
+
description: intl.formatMessage(messages$7.missingRequiredKeys, {
|
|
1344
1353
|
fieldNames
|
|
1345
1354
|
})
|
|
1346
1355
|
}]);
|
|
@@ -1353,7 +1362,7 @@ const useUpload = () => {
|
|
|
1353
1362
|
showNotification({
|
|
1354
1363
|
kind: 'error',
|
|
1355
1364
|
domain: constants.DOMAINS.PAGE,
|
|
1356
|
-
text: intl.formatMessage(messages$
|
|
1365
|
+
text: intl.formatMessage(messages$7.unexpectedError)
|
|
1357
1366
|
});
|
|
1358
1367
|
}
|
|
1359
1368
|
} else {
|
|
@@ -1382,21 +1391,21 @@ const useUpload = () => {
|
|
|
1382
1391
|
const containerKey = encodeFileNameWithTimestampToContainerKey(state.droppedFile.name);
|
|
1383
1392
|
actions.setContainerKey(containerKey);
|
|
1384
1393
|
try {
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
await createImportContainerForFileUpload(_objectSpread$d({
|
|
1394
|
+
const shouldApplyPublishSettings = state.resourceType === 'product';
|
|
1395
|
+
await createImportContainerForFileUpload({
|
|
1388
1396
|
key: containerKey,
|
|
1389
1397
|
resourceType: state.resourceType,
|
|
1390
|
-
tags: [TAG_KEY_SOURCE_FILE_UPLOAD]
|
|
1391
|
-
|
|
1392
|
-
settings: {
|
|
1393
|
-
resourceType: state.resourceType === 'product' ? 'product-draft' : state.resourceType,
|
|
1398
|
+
tags: [TAG_KEY_SOURCE_FILE_UPLOAD],
|
|
1399
|
+
settings: _objectSpread$e({
|
|
1394
1400
|
format: 'CSV',
|
|
1401
|
+
decimalSeparator: state.settings?.decimalSeparator
|
|
1402
|
+
}, shouldApplyPublishSettings ? {
|
|
1403
|
+
resourceType: state.resourceType === 'product' ? 'product-draft' : state.resourceType,
|
|
1395
1404
|
options: {
|
|
1396
1405
|
publishAllChanges: state.settings?.publish ?? false
|
|
1397
1406
|
}
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1407
|
+
} : {})
|
|
1408
|
+
}, projectKey, asyncDispatch);
|
|
1400
1409
|
const newAbortController = uploadFileForImport({
|
|
1401
1410
|
projectKey,
|
|
1402
1411
|
containerKey,
|
|
@@ -1474,8 +1483,8 @@ const useImportPermission = () => {
|
|
|
1474
1483
|
};
|
|
1475
1484
|
};
|
|
1476
1485
|
|
|
1477
|
-
function ownKeys$
|
|
1478
|
-
function _objectSpread$
|
|
1486
|
+
function ownKeys$d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1487
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$d(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$d(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1479
1488
|
const FileDropArea = () => {
|
|
1480
1489
|
const intl = reactIntl.useIntl();
|
|
1481
1490
|
const _useImportResourcesCo = useImportResourcesContext(),
|
|
@@ -1505,7 +1514,7 @@ const FileDropArea = () => {
|
|
|
1505
1514
|
showNotification({
|
|
1506
1515
|
kind: 'error',
|
|
1507
1516
|
domain: constants.DOMAINS.PAGE,
|
|
1508
|
-
text: intl.formatMessage(messages$
|
|
1517
|
+
text: intl.formatMessage(messages$8.tooManyFilesError)
|
|
1509
1518
|
});
|
|
1510
1519
|
return;
|
|
1511
1520
|
}
|
|
@@ -1513,13 +1522,13 @@ const FileDropArea = () => {
|
|
|
1513
1522
|
showNotification({
|
|
1514
1523
|
kind: 'error',
|
|
1515
1524
|
domain: constants.DOMAINS.PAGE,
|
|
1516
|
-
text: intl.formatMessage(messages$
|
|
1525
|
+
text: intl.formatMessage(messages$8.fileFormatNotSupported)
|
|
1517
1526
|
});
|
|
1518
1527
|
} else {
|
|
1519
1528
|
showNotification({
|
|
1520
1529
|
kind: 'error',
|
|
1521
1530
|
domain: constants.DOMAINS.PAGE,
|
|
1522
|
-
text: intl.formatMessage(messages$
|
|
1531
|
+
text: intl.formatMessage(messages$8.genericError)
|
|
1523
1532
|
});
|
|
1524
1533
|
}
|
|
1525
1534
|
}
|
|
@@ -1537,11 +1546,11 @@ const FileDropArea = () => {
|
|
|
1537
1546
|
resourceType: 'category',
|
|
1538
1547
|
isFileDropped: Boolean(state.droppedFile)
|
|
1539
1548
|
});
|
|
1540
|
-
return jsxRuntime.jsxs(DropWrapper, _objectSpread$
|
|
1549
|
+
return jsxRuntime.jsxs(DropWrapper, _objectSpread$d(_objectSpread$d({
|
|
1541
1550
|
role: "presentation"
|
|
1542
1551
|
}, getRootProps()), {}, {
|
|
1543
1552
|
dropAreaState: dropAreaState,
|
|
1544
|
-
children: [jsxRuntime.jsx("input", _objectSpread$
|
|
1553
|
+
children: [jsxRuntime.jsx("input", _objectSpread$d({
|
|
1545
1554
|
"data-testid": "file-input"
|
|
1546
1555
|
}, getInputProps())), jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
1547
1556
|
children: dropArea
|
|
@@ -1549,6 +1558,87 @@ const FileDropArea = () => {
|
|
|
1549
1558
|
}));
|
|
1550
1559
|
};
|
|
1551
1560
|
|
|
1561
|
+
var messages$6 = reactIntl.defineMessages({
|
|
1562
|
+
separatorTitle: {
|
|
1563
|
+
id: 'ImportResourcesModal.uploadSeparator.separatorTitle',
|
|
1564
|
+
description: 'Title for the separator selection',
|
|
1565
|
+
defaultMessage: 'Separator'
|
|
1566
|
+
},
|
|
1567
|
+
decimalsSeparatorDescription: {
|
|
1568
|
+
id: 'ImportResourcesModal.uploadSeparator.decimalsSeparatorDescription',
|
|
1569
|
+
description: 'Description for the decimals separator selection',
|
|
1570
|
+
defaultMessage: 'Select the decimals separator that match your CSV file. The column separator is automatically detected.'
|
|
1571
|
+
},
|
|
1572
|
+
decimalSeparatorPoint: {
|
|
1573
|
+
id: 'ImportResourcesModal.uploadSeparator.decimalSeparatorPoint',
|
|
1574
|
+
description: 'Label for point decimal separator option',
|
|
1575
|
+
defaultMessage: 'point (.)'
|
|
1576
|
+
},
|
|
1577
|
+
decimalSeparatorComma: {
|
|
1578
|
+
id: 'ImportResourcesModal.uploadSeparator.decimalSeparatorComma',
|
|
1579
|
+
description: 'Label for comma decimal separator option',
|
|
1580
|
+
defaultMessage: 'comma (,)'
|
|
1581
|
+
},
|
|
1582
|
+
decimals: {
|
|
1583
|
+
id: 'ImportResourcesModal.uploadSeparator.decimals',
|
|
1584
|
+
description: 'Label for decimal separator select',
|
|
1585
|
+
defaultMessage: 'Decimals'
|
|
1586
|
+
}
|
|
1587
|
+
});
|
|
1588
|
+
|
|
1589
|
+
function ownKeys$c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1590
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1591
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$2() { 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)."; }
|
|
1592
|
+
const DECIMAL_DELIMITER_OPTIONS = [{
|
|
1593
|
+
label: messages$6.decimalSeparatorPoint,
|
|
1594
|
+
value: DELIMITERS.POINT
|
|
1595
|
+
}, {
|
|
1596
|
+
label: messages$6.decimalSeparatorComma,
|
|
1597
|
+
value: DELIMITERS.COMMA
|
|
1598
|
+
}];
|
|
1599
|
+
const decimalSeparatorOptions = _mapInstanceProperty__default["default"](DECIMAL_DELIMITER_OPTIONS).call(DECIMAL_DELIMITER_OPTIONS, option => _objectSpread$c(_objectSpread$c({}, option), {}, {
|
|
1600
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$c({}, option.label))
|
|
1601
|
+
}));
|
|
1602
|
+
var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
1603
|
+
name: "lt3z56",
|
|
1604
|
+
styles: "width:calc(50% - 16px)"
|
|
1605
|
+
} : {
|
|
1606
|
+
name: "1vfe1dp-UploadSeparator",
|
|
1607
|
+
styles: "width:calc(50% - 16px);label:UploadSeparator;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVwbG9hZC1zZXBhcmF0b3IudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXNDZ0IiLCJmaWxlIjoidXBsb2FkLXNlcGFyYXRvci50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlLCB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCdcbmltcG9ydCB7IFNlbGVjdEZpZWxkLCBTcGFjaW5ncywgVGV4dCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCdcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnXG5pbXBvcnQgeyBERUxJTUlURVJTIH0gZnJvbSAnLi4vLi4vLi4vQGNvbnN0YW50cydcbmltcG9ydCB7IHVzZUltcG9ydFJlc291cmNlc0NvbnRleHQgfSBmcm9tICcuLi8uLi8uLi9AaG9va3MnXG5pbXBvcnQgeyB0eXBlIERlY2ltYWxTZXBhcmF0b3IgfSBmcm9tICcuLi8uLi8uLi9AdHlwZXMnXG5cbmV4cG9ydCBjb25zdCBERUNJTUFMX0RFTElNSVRFUl9PUFRJT05TID0gW1xuICB7XG4gICAgbGFiZWw6IG1lc3NhZ2VzLmRlY2ltYWxTZXBhcmF0b3JQb2ludCxcbiAgICB2YWx1ZTogREVMSU1JVEVSUy5QT0lOVCxcbiAgfSxcbiAge1xuICAgIGxhYmVsOiBtZXNzYWdlcy5kZWNpbWFsU2VwYXJhdG9yQ29tbWEsXG4gICAgdmFsdWU6IERFTElNSVRFUlMuQ09NTUEsXG4gIH0sXG5dXG5cbmNvbnN0IGRlY2ltYWxTZXBhcmF0b3JPcHRpb25zID0gREVDSU1BTF9ERUxJTUlURVJfT1BUSU9OUy5tYXAoKG9wdGlvbikgPT4gKHtcbiAgLi4ub3B0aW9uLFxuICBsYWJlbDogPEZvcm1hdHRlZE1lc3NhZ2Ugey4uLm9wdGlvbi5sYWJlbH0gLz4sXG59KSlcblxuZXhwb3J0IGNvbnN0IFVwbG9hZFNlcGFyYXRvciA9ICgpID0+IHtcbiAgY29uc3QgaW50bCA9IHVzZUludGwoKVxuICBjb25zdCB7IHN0YXRlLCBhY3Rpb25zIH0gPSB1c2VJbXBvcnRSZXNvdXJjZXNDb250ZXh0KClcblxuICByZXR1cm4gKFxuICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cIm1cIj5cbiAgICAgIDxkaXY+XG4gICAgICAgIDxUZXh0LlN1YmhlYWRsaW5lIGFzPVwiaDRcIiBpbnRsTWVzc2FnZT17bWVzc2FnZXMuc2VwYXJhdG9yVGl0bGV9IC8+XG4gICAgICAgIDxUZXh0LkNhcHRpb25cbiAgICAgICAgICB0b25lPVwidGVydGlhcnlcIlxuICAgICAgICAgIGludGxNZXNzYWdlPXttZXNzYWdlcy5kZWNpbWFsc1NlcGFyYXRvckRlc2NyaXB0aW9ufVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgICA8ZGl2XG4gICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgIHdpZHRoOiBjYWxjKDUwJSAtIDE2cHgpO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8U2VsZWN0RmllbGRcbiAgICAgICAgICB0aXRsZT17aW50bC5mb3JtYXRNZXNzYWdlKG1lc3NhZ2VzLmRlY2ltYWxzKX1cbiAgICAgICAgICBpc1NlYXJjaGFibGU9e2ZhbHNlfVxuICAgICAgICAgIG9wdGlvbnM9e2RlY2ltYWxTZXBhcmF0b3JPcHRpb25zfVxuICAgICAgICAgIHZhbHVlPXtzdGF0ZS5zZXR0aW5ncz8uZGVjaW1hbFNlcGFyYXRvcn1cbiAgICAgICAgICBvbkNoYW5nZT17KGUpID0+IHtcbiAgICAgICAgICAgIGFjdGlvbnMuc2V0VXBsb2FkU2V0dGluZ3Moe1xuICAgICAgICAgICAgICBkZWNpbWFsU2VwYXJhdG9yOiBlLnRhcmdldC52YWx1ZSBhcyBEZWNpbWFsU2VwYXJhdG9yLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9fVxuICAgICAgICAvPlxuICAgICAgPC9kaXY+XG4gICAgPC9TcGFjaW5ncy5TdGFjaz5cbiAgKVxufVxuIl19 */",
|
|
1608
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
1609
|
+
};
|
|
1610
|
+
const UploadSeparator = () => {
|
|
1611
|
+
const intl = reactIntl.useIntl();
|
|
1612
|
+
const _useImportResourcesCo = useImportResourcesContext(),
|
|
1613
|
+
state = _useImportResourcesCo.state,
|
|
1614
|
+
actions = _useImportResourcesCo.actions;
|
|
1615
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1616
|
+
scale: "m",
|
|
1617
|
+
children: [jsxRuntime.jsxs("div", {
|
|
1618
|
+
children: [jsxRuntime.jsx(uiKit.Text.Subheadline, {
|
|
1619
|
+
as: "h4",
|
|
1620
|
+
intlMessage: messages$6.separatorTitle
|
|
1621
|
+
}), jsxRuntime.jsx(uiKit.Text.Caption, {
|
|
1622
|
+
tone: "tertiary",
|
|
1623
|
+
intlMessage: messages$6.decimalsSeparatorDescription
|
|
1624
|
+
})]
|
|
1625
|
+
}), jsxRuntime.jsx("div", {
|
|
1626
|
+
css: _ref$1,
|
|
1627
|
+
children: jsxRuntime.jsx(uiKit.SelectField, {
|
|
1628
|
+
title: intl.formatMessage(messages$6.decimals),
|
|
1629
|
+
isSearchable: false,
|
|
1630
|
+
options: decimalSeparatorOptions,
|
|
1631
|
+
value: state.settings?.decimalSeparator,
|
|
1632
|
+
onChange: e => {
|
|
1633
|
+
actions.setUploadSettings({
|
|
1634
|
+
decimalSeparator: e.target.value
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1637
|
+
})
|
|
1638
|
+
})]
|
|
1639
|
+
});
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1552
1642
|
var messages$5 = reactIntl.defineMessages({
|
|
1553
1643
|
publishProducts: {
|
|
1554
1644
|
id: 'ImportResourcesModal.settings.publishProducts',
|
|
@@ -1612,28 +1702,28 @@ const Upload = () => {
|
|
|
1612
1702
|
},
|
|
1613
1703
|
children: jsxRuntime.jsx(fullstory.Masking.Unmask, {
|
|
1614
1704
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
1615
|
-
scale: "
|
|
1705
|
+
scale: "l",
|
|
1616
1706
|
children: [isMultipleResourceTypes ? jsxRuntime.jsxs(uiKit.Grid, {
|
|
1617
1707
|
gridRowGap: uiKit.designTokens.spacingL,
|
|
1618
1708
|
gridTemplateColumns: `calc(${uiKit.designTokens.constraint3} + ${uiKit.designTokens.spacingL}) auto`,
|
|
1619
1709
|
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1620
1710
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1621
1711
|
isBold: true,
|
|
1622
|
-
intlMessage: messages$
|
|
1712
|
+
intlMessage: messages$8.dataType
|
|
1623
1713
|
})
|
|
1624
1714
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1625
1715
|
children: jsxRuntime.jsx(ResourceTypeSelection, {})
|
|
1626
1716
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1627
1717
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1628
1718
|
isBold: true,
|
|
1629
|
-
intlMessage: messages$
|
|
1719
|
+
intlMessage: messages$8.instructions
|
|
1630
1720
|
})
|
|
1631
1721
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
1632
1722
|
children: jsxRuntime.jsx(Instructions, {})
|
|
1633
1723
|
})]
|
|
1634
1724
|
}) : jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1635
1725
|
children: jsxRuntime.jsx(Instructions, {})
|
|
1636
|
-
}), jsxRuntime.jsx(InfoBox, {}), jsxRuntime.jsx(fullstory.Masking.Mask, {
|
|
1726
|
+
}), jsxRuntime.jsx(InfoBox, {}), jsxRuntime.jsx(UploadSeparator, {}), jsxRuntime.jsx(fullstory.Masking.Mask, {
|
|
1637
1727
|
children: jsxRuntime.jsx(FileDropArea, {})
|
|
1638
1728
|
}), jsxRuntime.jsx(UploadSettings, {})]
|
|
1639
1729
|
})
|
|
@@ -2544,7 +2634,7 @@ const getChunkImport = locale => {
|
|
|
2544
2634
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
2545
2635
|
switch (intlLocale) {
|
|
2546
2636
|
case 'de':
|
|
2547
|
-
return Promise.resolve().then(function () { return require('./de-
|
|
2637
|
+
return Promise.resolve().then(function () { return require('./de-3e1e8435.cjs.dev.js'); });
|
|
2548
2638
|
case 'es':
|
|
2549
2639
|
return Promise.resolve().then(function () { return require('./es-68d1ba91.cjs.dev.js'); });
|
|
2550
2640
|
case 'fr-FR':
|
|
@@ -2638,6 +2728,6 @@ exports.EnabledDropArea = EnabledDropArea;
|
|
|
2638
2728
|
exports.FileDropped = FileDropped;
|
|
2639
2729
|
exports.FileIcon = FileIcon;
|
|
2640
2730
|
exports.ImportResourcesModal = ImportResourcesModal;
|
|
2641
|
-
exports.messages = messages$
|
|
2731
|
+
exports.messages = messages$8;
|
|
2642
2732
|
exports.useImportPermission = useImportPermission;
|
|
2643
2733
|
exports.useImportResourcesContext = useImportResourcesContext;
|