@commercetools-frontend-extensions/import-resources-modal 1.3.18 → 1.4.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-2070870c.esm.js → active-drag-drop-area-02862be1.esm.js} +2 -1
- package/dist/{active-drag-drop-area-7223062d.cjs.prod.js → active-drag-drop-area-3353cf7c.cjs.prod.js} +2 -1
- package/dist/{active-drag-drop-area-71b18c95.cjs.dev.js → active-drag-drop-area-9097bdc0.cjs.dev.js} +2 -1
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.dev.js +9 -7
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.prod.js +8 -6
- package/dist/commercetools-frontend-extensions-import-resources-modal.esm.js +8 -7
- package/dist/de-22a8eb66.cjs.prod.js +246 -0
- package/dist/de-3d74f145.esm.js +244 -0
- package/dist/de-fd3b70e4.cjs.dev.js +246 -0
- package/dist/declarations/src/@hooks/index.d.ts +3 -0
- package/dist/declarations/src/@hooks/use-import-permission.d.ts +7 -0
- package/dist/declarations/src/@hooks/use-import-resources-context.d.ts +1 -0
- package/dist/declarations/src/@hooks/use-upload.d.ts +3 -0
- package/dist/declarations/src/@types/import-container.d.ts +14 -0
- package/dist/declarations/src/index.d.ts +1 -0
- package/dist/en-0b96b221.cjs.dev.js +246 -0
- package/dist/en-8d84a827.cjs.prod.js +246 -0
- package/dist/en-bfc8cfec.esm.js +244 -0
- package/dist/{enabled-drop-area-f7df6932.cjs.prod.js → enabled-drop-area-71390280.cjs.prod.js} +2 -1
- package/dist/{enabled-drop-area-30f931be.esm.js → enabled-drop-area-cecad6d0.esm.js} +2 -1
- package/dist/{enabled-drop-area-b0e2ad4d.cjs.dev.js → enabled-drop-area-dff17a22.cjs.dev.js} +2 -1
- package/dist/{es-9821e666.cjs.prod.js → es-01b24cea.cjs.prod.js} +9 -9
- package/dist/{es-c6b4310c.esm.js → es-561e774f.esm.js} +9 -9
- package/dist/{es-c3c63de8.cjs.dev.js → es-a45120de.cjs.dev.js} +9 -9
- package/dist/{file-dropped-area-a1b8bc83.cjs.dev.js → file-dropped-area-30e0efb8.cjs.prod.js} +10 -9
- package/dist/{file-dropped-area-0856e6fe.esm.js → file-dropped-area-70859cc8.esm.js} +10 -9
- package/dist/{file-dropped-area-b394c5b4.cjs.prod.js → file-dropped-area-85c3b3a4.cjs.dev.js} +10 -9
- package/dist/fr-FR-1c33adf1.esm.js +244 -0
- package/dist/fr-FR-2a0f5518.cjs.prod.js +246 -0
- package/dist/fr-FR-d51f6a8e.cjs.dev.js +246 -0
- package/dist/{index-fb10311d.cjs.dev.js → index-120dc76b.cjs.dev.js} +262 -129
- package/dist/{index-ed334c08.cjs.prod.js → index-169848a9.cjs.prod.js} +247 -128
- package/dist/{index-bbcef105.esm.js → index-fd6bbcc5.esm.js} +263 -131
- package/dist/pt-BR-6b7a389e.cjs.prod.js +246 -0
- package/dist/pt-BR-8b999c2f.cjs.dev.js +246 -0
- package/dist/pt-BR-c09d735f.esm.js +244 -0
- package/package.json +25 -23
- package/dist/de-a34c5dd4.cjs.dev.js +0 -6
- package/dist/de-cd6c45d3.esm.js +0 -4
- package/dist/de-d954fe3d.cjs.prod.js +0 -6
- package/dist/en-3a9aa2d4.esm.js +0 -4
- package/dist/en-6b3694f6.cjs.dev.js +0 -6
- package/dist/en-c7757448.cjs.prod.js +0 -6
- package/dist/fr-FR-9d9081ee.esm.js +0 -4
- package/dist/fr-FR-e7126fcc.cjs.dev.js +0 -6
- package/dist/fr-FR-fce1ca96.cjs.prod.js +0 -6
- package/dist/pt-BR-b37d730b.esm.js +0 -4
- package/dist/pt-BR-ea6b3251.cjs.dev.js +0 -6
- package/dist/pt-BR-ec2a1a11.cjs.prod.js +0 -6
|
@@ -11,7 +11,7 @@ import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instan
|
|
|
11
11
|
import { defineMessages, useIntl, FormattedMessage, IntlProvider } from 'react-intl';
|
|
12
12
|
import { oidcStorage, useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
13
13
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
14
|
-
import React, { lazy, useContext, useState, useEffect } from 'react';
|
|
14
|
+
import React, { lazy, useContext, useMemo, useState, useEffect } from 'react';
|
|
15
15
|
import { actions, useAsyncDispatch } from '@commercetools-frontend/sdk';
|
|
16
16
|
import { MC_API_PROXY_TARGETS, DOMAINS } from '@commercetools-frontend/constants';
|
|
17
17
|
import { createHttpClientOptions, buildApiUrl } from '@commercetools-frontend/application-shell';
|
|
@@ -39,33 +39,37 @@ import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
|
39
39
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
40
40
|
import { FormDialog, InfoDialog, PageContentNarrow, ConfirmationDialog } from '@commercetools-frontend/application-components';
|
|
41
41
|
import { Masking } from '@commercetools-frontend/fullstory';
|
|
42
|
-
import { customProperties, Constraints, Spacings, Grid, designTokens, Text, usePaginationState, PageNavigator, Stamp, SecondaryButton, PrimaryButton, ImportIcon, Link, Card, CheckBoldIcon, EyeCrossedIcon, ProgressBar, RadioInput, ContentNotification } from '@commercetools-frontend/ui-kit';
|
|
42
|
+
import { customProperties, Constraints, CheckboxInput, Spacings, Grid, designTokens, Text, usePaginationState, PageNavigator, Stamp, SecondaryButton, PrimaryButton, ImportIcon, Link, TagList, Card, CheckBoldIcon, EyeCrossedIcon, ProgressBar, RadioInput, ContentNotification } from '@commercetools-frontend/ui-kit';
|
|
43
43
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
44
44
|
import { useDropzone } from 'react-dropzone';
|
|
45
45
|
import { useShowNotification } from '@commercetools-frontend/actions-global';
|
|
46
46
|
import _styled from '@emotion/styled/base';
|
|
47
47
|
import { css } from '@emotion/react';
|
|
48
48
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
49
|
+
import { useIsAuthorized } from '@commercetools-frontend/permissions';
|
|
49
50
|
import DataTable from '@commercetools-uikit/data-table';
|
|
50
51
|
import { parseChunkImport, mapLocaleToIntlLocale } from '@commercetools-frontend/i18n';
|
|
51
52
|
|
|
52
|
-
function ownKeys$
|
|
53
|
-
function _objectSpread$
|
|
53
|
+
function ownKeys$i(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; }
|
|
54
|
+
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(_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
55
|
+
// TODO: make this resource type specific
|
|
56
|
+
|
|
54
57
|
function reducer(state, action) {
|
|
55
|
-
if (action.type === 'setCurrentStep') return _objectSpread$
|
|
58
|
+
if (action.type === 'setCurrentStep') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
56
59
|
currentStep: action.currentStep,
|
|
57
60
|
progress: 0
|
|
58
61
|
});
|
|
59
|
-
if (action.type === 'setUploadFileResponse') return _objectSpread$
|
|
62
|
+
if (action.type === 'setUploadFileResponse') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
60
63
|
uploadFileResponse: action.uploadFileResponse
|
|
61
64
|
});
|
|
62
|
-
if (action.type === 'setResourceType') return _objectSpread$
|
|
65
|
+
if (action.type === 'setResourceType') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
66
|
+
settings: undefined,
|
|
63
67
|
resourceType: action.resourceType
|
|
64
68
|
});
|
|
65
|
-
if (action.type === 'setContainerKey') return _objectSpread$
|
|
69
|
+
if (action.type === 'setContainerKey') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
66
70
|
containerKey: action.containerKey
|
|
67
71
|
});
|
|
68
|
-
if (action.type === 'cancelImport') return _objectSpread$
|
|
72
|
+
if (action.type === 'cancelImport') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
69
73
|
currentStep: 1,
|
|
70
74
|
containerKey: undefined,
|
|
71
75
|
fileUploadErrors: [],
|
|
@@ -74,7 +78,7 @@ function reducer(state, action) {
|
|
|
74
78
|
dropAreaState: 'disabled',
|
|
75
79
|
progress: 0
|
|
76
80
|
});
|
|
77
|
-
if (action.type === 'uploadNewFile') return _objectSpread$
|
|
81
|
+
if (action.type === 'uploadNewFile') return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
78
82
|
currentStep: 1,
|
|
79
83
|
containerKey: undefined,
|
|
80
84
|
fileUploadErrors: [],
|
|
@@ -84,25 +88,30 @@ function reducer(state, action) {
|
|
|
84
88
|
progress: 0
|
|
85
89
|
});
|
|
86
90
|
if (action.type === 'setDroppedFile') {
|
|
87
|
-
return _objectSpread$
|
|
91
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
88
92
|
droppedFile: action.droppedFile
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
95
|
if (action.type === 'setFileUploadErrors') {
|
|
92
|
-
return _objectSpread$
|
|
96
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
93
97
|
fileUploadErrors: action.fileUploadErrors
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
100
|
if (action.type === 'setAbortController') {
|
|
97
|
-
return _objectSpread$
|
|
101
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
98
102
|
abortController: action.abortController
|
|
99
103
|
});
|
|
100
104
|
}
|
|
101
105
|
if (action.type === 'setProgress') {
|
|
102
|
-
return _objectSpread$
|
|
106
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
103
107
|
progress: action.progress
|
|
104
108
|
});
|
|
105
109
|
}
|
|
110
|
+
if (action.type === 'setUploadSettings') {
|
|
111
|
+
return _objectSpread$i(_objectSpread$i({}, state), {}, {
|
|
112
|
+
settings: _objectSpread$i(_objectSpread$i({}, state.settings), action.settings)
|
|
113
|
+
});
|
|
114
|
+
}
|
|
106
115
|
throw new Error(getUnknownActionError(action));
|
|
107
116
|
}
|
|
108
117
|
function getUnknownActionError(actionType) {
|
|
@@ -165,8 +174,8 @@ let HttpError = /*#__PURE__*/function (_Error) {
|
|
|
165
174
|
return _createClass(HttpError);
|
|
166
175
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
167
176
|
|
|
168
|
-
function ownKeys$
|
|
169
|
-
function _objectSpread$
|
|
177
|
+
function ownKeys$h(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; }
|
|
178
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$h(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$h(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
170
179
|
const addProxyPrefixToUrl = (uri, proxy) => {
|
|
171
180
|
return proxy ? `/proxy/${proxy}${uri}` : uri;
|
|
172
181
|
};
|
|
@@ -178,7 +187,7 @@ const fetchUsingXhr = _ref2 => {
|
|
|
178
187
|
onSuccess = _ref2.onSuccess,
|
|
179
188
|
onError = _ref2.onError;
|
|
180
189
|
const options = createHttpClientOptions({
|
|
181
|
-
headers: _objectSpread$
|
|
190
|
+
headers: _objectSpread$h({
|
|
182
191
|
'Content-Type': 'application/json'
|
|
183
192
|
}, config?.headers)
|
|
184
193
|
});
|
|
@@ -281,8 +290,39 @@ const RESOURCE_TYPE_DOCUMENTATION_LINKS = {
|
|
|
281
290
|
|
|
282
291
|
const CT__API_DOCS_URL = 'https://docs.commercetools.com/api/';
|
|
283
292
|
|
|
284
|
-
|
|
285
|
-
|
|
293
|
+
const PERMISSIONS = {
|
|
294
|
+
// Categories
|
|
295
|
+
ManageCategories: 'ManageCategories',
|
|
296
|
+
ViewCategories: 'ViewCategories',
|
|
297
|
+
// Products
|
|
298
|
+
ManageProducts: 'ManageProducts',
|
|
299
|
+
ViewProducts: 'ViewProducts',
|
|
300
|
+
// ProductTypes
|
|
301
|
+
ManageProductTypes: 'ManageProductTypes',
|
|
302
|
+
ViewProductTypes: 'ViewProductTypes',
|
|
303
|
+
// DiscountCodes
|
|
304
|
+
ManageDiscountCodes: 'ManageDiscountCodes',
|
|
305
|
+
ViewDiscountCodes: 'ViewDiscountCodes'
|
|
306
|
+
};
|
|
307
|
+
const ACTION_RIGHTS = {
|
|
308
|
+
PublishProducts: {
|
|
309
|
+
group: 'products',
|
|
310
|
+
name: 'PublishProducts'
|
|
311
|
+
},
|
|
312
|
+
UnpublishProducts: {
|
|
313
|
+
group: 'products',
|
|
314
|
+
name: 'UnpublishProducts'
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
function ownKeys$g(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; }
|
|
319
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
320
|
+
const DEFAULT_SHORT_LIVED_FLAGS = {};
|
|
321
|
+
const DEFAULT_LONG_LIVED_FLAGS = {};
|
|
322
|
+
_objectSpread$g(_objectSpread$g({}, DEFAULT_SHORT_LIVED_FLAGS), DEFAULT_LONG_LIVED_FLAGS);
|
|
323
|
+
|
|
324
|
+
function ownKeys$f(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; }
|
|
325
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$f(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$f(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
286
326
|
/**
|
|
287
327
|
* This function checks if the provided `expectedDelimiter` is used consistently in the first 10 lines of a CSV file.
|
|
288
328
|
* Returns a Promise that resolves to an object containing a boolean `isValid` property and the detected delimiter `delimiter`.
|
|
@@ -337,7 +377,7 @@ const mapUploadFileErrorsResponseToUploadFileErrorRows = uploadFileErrorsRespons
|
|
|
337
377
|
};
|
|
338
378
|
const mapFileUploadErrorsToUploadFileErrorRows = uploadFileErrors => {
|
|
339
379
|
let idCounter = 1;
|
|
340
|
-
return _mapInstanceProperty(uploadFileErrors).call(uploadFileErrors, uploadFileError => _objectSpread$
|
|
380
|
+
return _mapInstanceProperty(uploadFileErrors).call(uploadFileErrors, uploadFileError => _objectSpread$f(_objectSpread$f({}, uploadFileError), {}, {
|
|
341
381
|
id: String(idCounter++)
|
|
342
382
|
}));
|
|
343
383
|
};
|
|
@@ -482,8 +522,6 @@ function uploadFileForImport(_ref) {
|
|
|
482
522
|
});
|
|
483
523
|
}
|
|
484
524
|
|
|
485
|
-
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; }
|
|
486
|
-
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$d(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$d(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
487
525
|
function createImportContainerForFileUpload(importContainerDraft, projectKey, asyncDispatch) {
|
|
488
526
|
return asyncDispatch(actions.post({
|
|
489
527
|
mcApiProxyTarget: MC_API_PROXY_TARGETS.IMPORT,
|
|
@@ -492,9 +530,7 @@ function createImportContainerForFileUpload(importContainerDraft, projectKey, as
|
|
|
492
530
|
accept: 'application/json',
|
|
493
531
|
'Content-Type': 'application/json'
|
|
494
532
|
},
|
|
495
|
-
payload: _JSON$stringify(
|
|
496
|
-
tags: [TAG_KEY_SOURCE_FILE_UPLOAD]
|
|
497
|
-
}))
|
|
533
|
+
payload: _JSON$stringify(importContainerDraft)
|
|
498
534
|
}));
|
|
499
535
|
}
|
|
500
536
|
function deleteImportContainer(projectKey, containerKey, asyncDispatch) {
|
|
@@ -531,8 +567,8 @@ function assertProcessFileResponse(maybeProcessFileResponse) {
|
|
|
531
567
|
throw new Error('Invalid response');
|
|
532
568
|
}
|
|
533
569
|
|
|
534
|
-
function ownKeys$
|
|
535
|
-
function _objectSpread$
|
|
570
|
+
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; }
|
|
571
|
+
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(_context = ownKeys$e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$e(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
536
572
|
const ImportResourcesContext = /*#__PURE__*/React.createContext();
|
|
537
573
|
const ImportResourcesProvider = props => {
|
|
538
574
|
const _useApplicationContex = useApplicationContext(context => ({
|
|
@@ -540,7 +576,7 @@ const ImportResourcesProvider = props => {
|
|
|
540
576
|
})),
|
|
541
577
|
projectKey = _useApplicationContex.projectKey;
|
|
542
578
|
const asyncDispatch = useAsyncDispatch();
|
|
543
|
-
const _React$useReducer = React.useReducer(reducer, _objectSpread$
|
|
579
|
+
const _React$useReducer = React.useReducer(reducer, _objectSpread$e(_objectSpread$e({}, initialState), {}, {
|
|
544
580
|
resourceType: props.resourceTypes[0]
|
|
545
581
|
})),
|
|
546
582
|
_React$useReducer2 = _slicedToArray(_React$useReducer, 2),
|
|
@@ -584,6 +620,12 @@ const ImportResourcesProvider = props => {
|
|
|
584
620
|
type: 'setProgress',
|
|
585
621
|
progress
|
|
586
622
|
});
|
|
623
|
+
const setUploadSettings = nextSettings => {
|
|
624
|
+
dispatch({
|
|
625
|
+
type: 'setUploadSettings',
|
|
626
|
+
settings: nextSettings
|
|
627
|
+
});
|
|
628
|
+
};
|
|
587
629
|
const handleClose = function () {
|
|
588
630
|
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
589
631
|
shouldDeleteImportContainer = _ref.shouldDeleteImportContainer;
|
|
@@ -611,7 +653,8 @@ const ImportResourcesProvider = props => {
|
|
|
611
653
|
setContainerKey,
|
|
612
654
|
setAbortController,
|
|
613
655
|
setFileUploadErrors,
|
|
614
|
-
setProgress
|
|
656
|
+
setProgress,
|
|
657
|
+
setUploadSettings
|
|
615
658
|
}
|
|
616
659
|
},
|
|
617
660
|
children: props.children
|
|
@@ -673,13 +716,13 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
|
|
|
673
716
|
return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? "" : ";label:getDefaultDropWrapperStyles;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyb3AtYXJlYS13cmFwcGVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0QlkiLCJmaWxlIjoiZHJvcC1hcmVhLXdyYXBwZXIudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBEcm9wem9uZVJvb3RQcm9wcyB9IGZyb20gJ3JlYWN0LWRyb3B6b25lJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IHN0eWxlcyB9IGZyb20gJy4vc3R5bGVzJ1xuaW1wb3J0IHsgdHlwZSBEcm9wQXJlYVN0YXRlIH0gZnJvbSAnLi4vLi4vLi4vQHR5cGVzJ1xuXG5pbnRlcmZhY2UgRHJvcFdyYXBwZXJQcm9wcyBleHRlbmRzIERyb3B6b25lUm9vdFByb3BzIHtcbiAgZHJvcEFyZWFTdGF0ZTogRHJvcEFyZWFTdGF0ZVxufVxuZXhwb3J0IGNvbnN0IERyb3BXcmFwcGVyID0gc3R5bGVkLmRpdjxEcm9wV3JhcHBlclByb3BzPmBcbiAgJHtzdHlsZXMuYmFzZX1cbiAgJHsocHJvcHMpID0+IHtcbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2Rpc2FibGVkJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5kaXNhYmxlZFxuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ3JlYWR5LWZvci1kcm9wJykge1xuICAgICAgcmV0dXJuIHN0eWxlcy5yZWFkeUZvckRyb3BcbiAgICB9XG4gICAgaWYgKHByb3BzLmRyb3BBcmVhU3RhdGUgPT09ICdhY3RpdmUtZHJhZycpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuYWN0aXZlRHJhZ1xuICAgIH1cbiAgICBpZiAocHJvcHMuZHJvcEFyZWFTdGF0ZSA9PT0gJ2ZpbGUtZHJvcHBlZCcpIHtcbiAgICAgIHJldHVybiBzdHlsZXMuZmlsZURyb3BwZWRcbiAgICB9XG4gICAgcmV0dXJuIGdldERlZmF1bHREcm9wV3JhcHBlclN0eWxlcyhwcm9wcy5kcm9wQXJlYVN0YXRlKVxuICB9fVxuYFxuZnVuY3Rpb24gZ2V0RGVmYXVsdERyb3BXcmFwcGVyU3R5bGVzKF9kcm9wQXJlYVN0YXRlOiBuZXZlcikge1xuICByZXR1cm4gY3NzYGBcbn1cbiJdfQ== */");
|
|
674
717
|
}
|
|
675
718
|
|
|
676
|
-
var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-
|
|
719
|
+
var ActiveDragDropArea = /*#__PURE__*/lazy(() => import('./active-drag-drop-area-02862be1.esm.js' /* webpackChunkName: "active-drag-drop-area" */));
|
|
677
720
|
|
|
678
721
|
var DisabledDropArea = /*#__PURE__*/lazy(() => import('./disabled-drop-area-2c088477.esm.js' /* webpackChunkName: "disabled-drop-area" */));
|
|
679
722
|
|
|
680
|
-
var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-
|
|
723
|
+
var EnabledDropArea = /*#__PURE__*/lazy(() => import('./enabled-drop-area-cecad6d0.esm.js' /* webpackChunkName: "enabled-drop-area" */));
|
|
681
724
|
|
|
682
|
-
var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-
|
|
725
|
+
var FileDropped = /*#__PURE__*/lazy(() => import('./file-dropped-area-70859cc8.esm.js' /* webpackChunkName: "filed-dropped-area" */));
|
|
683
726
|
|
|
684
727
|
function getDropArea(_ref) {
|
|
685
728
|
let dropAreaState = _ref.dropAreaState,
|
|
@@ -717,7 +760,7 @@ function getDropAreaState(flags) {
|
|
|
717
760
|
return 'ready-for-drop';
|
|
718
761
|
}
|
|
719
762
|
|
|
720
|
-
var messages$
|
|
763
|
+
var messages$7 = defineMessages({
|
|
721
764
|
dragAndDropCSV: {
|
|
722
765
|
id: 'ImportResourcesModal.dragAndDropCSV',
|
|
723
766
|
description: 'The message telling the user to drag and drop CSV file in the file drop area',
|
|
@@ -782,7 +825,7 @@ function useImportResourcesContext() {
|
|
|
782
825
|
return context;
|
|
783
826
|
}
|
|
784
827
|
|
|
785
|
-
var messages$
|
|
828
|
+
var messages$6 = defineMessages({
|
|
786
829
|
fileSizeExceededTitle: {
|
|
787
830
|
id: 'ImportResourcesModal.sizeExceededTitle',
|
|
788
831
|
defaultMessage: 'File size exceeded'
|
|
@@ -842,6 +885,8 @@ var messages$5 = defineMessages({
|
|
|
842
885
|
}
|
|
843
886
|
});
|
|
844
887
|
|
|
888
|
+
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; }
|
|
889
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$d(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
845
890
|
const useUpload = () => {
|
|
846
891
|
const intl = useIntl();
|
|
847
892
|
const projectKey = useApplicationContext(context => context.project?.key);
|
|
@@ -859,23 +904,23 @@ const useUpload = () => {
|
|
|
859
904
|
const errors = [];
|
|
860
905
|
const delimiterCheck = await checkDelimiter(file);
|
|
861
906
|
if (!delimiterCheck.isValid) errors.push({
|
|
862
|
-
title: intl.formatMessage(messages$
|
|
863
|
-
description: intl.formatMessage(messages$
|
|
907
|
+
title: intl.formatMessage(messages$6.dropAreaWrongDelimiterTitle),
|
|
908
|
+
description: intl.formatMessage(messages$6.dropAreaWrongDelimiterDescription)
|
|
864
909
|
});
|
|
865
910
|
const rowCount = await getRowCount(file);
|
|
866
911
|
if (rowCount < 1) errors.push({
|
|
867
|
-
title: intl.formatMessage(messages$
|
|
868
|
-
description: intl.formatMessage(messages$
|
|
912
|
+
title: intl.formatMessage(messages$6.dropAreaNotEnoughRowsTitle),
|
|
913
|
+
description: intl.formatMessage(messages$6.dropAreaNotEnoughRowsDescription)
|
|
869
914
|
});
|
|
870
915
|
if (state.resourceType && file.size > toBytes(FILE_SIZE_LIMITS_MB[state.resourceType])) errors.push({
|
|
871
|
-
title: intl.formatMessage(messages$
|
|
872
|
-
description: intl.formatMessage(messages$
|
|
916
|
+
title: intl.formatMessage(messages$6.fileSizeExceededTitle),
|
|
917
|
+
description: intl.formatMessage(messages$6.fileSizeExceededDescription, {
|
|
873
918
|
fileSizeLimit: intl.formatNumber(FILE_SIZE_LIMITS_MB[state.resourceType])
|
|
874
919
|
})
|
|
875
920
|
});
|
|
876
921
|
if (state.resourceType && rowCount > ROW_LIMITS[state.resourceType]) errors.push({
|
|
877
|
-
title: intl.formatMessage(messages$
|
|
878
|
-
description: intl.formatMessage(messages$
|
|
922
|
+
title: intl.formatMessage(messages$6.rowLimitExceededTitle),
|
|
923
|
+
description: intl.formatMessage(messages$6.rowLimitExceededDescription, {
|
|
879
924
|
rowLimit: intl.formatNumber(ROW_LIMITS[state.resourceType])
|
|
880
925
|
})
|
|
881
926
|
});
|
|
@@ -894,16 +939,16 @@ const useUpload = () => {
|
|
|
894
939
|
if (error instanceof HttpError) {
|
|
895
940
|
if (error.errorData?.code === 'MISSING_KEY_ERROR') {
|
|
896
941
|
actions.setFileUploadErrors([{
|
|
897
|
-
title: intl.formatMessage(messages$
|
|
898
|
-
description: intl.formatMessage(messages$
|
|
942
|
+
title: intl.formatMessage(messages$6.missingRequiredField),
|
|
943
|
+
description: intl.formatMessage(messages$6.missingKeyError)
|
|
899
944
|
}]);
|
|
900
945
|
actions.setCurrentStep(3);
|
|
901
946
|
} else if (error.errorData?.code === 'MissingCsvFieldIdentifier') {
|
|
902
947
|
const MissingCsvFieldIdentifierError = error.errorData;
|
|
903
948
|
const fieldNames = formatKeys(MissingCsvFieldIdentifierError.rowValue);
|
|
904
949
|
actions.setFileUploadErrors([{
|
|
905
|
-
title: intl.formatMessage(messages$
|
|
906
|
-
description: intl.formatMessage(messages$
|
|
950
|
+
title: intl.formatMessage(messages$6.missingRequiredField),
|
|
951
|
+
description: intl.formatMessage(messages$6.missingRequiredKeys, {
|
|
907
952
|
fieldNames
|
|
908
953
|
})
|
|
909
954
|
}]);
|
|
@@ -916,7 +961,7 @@ const useUpload = () => {
|
|
|
916
961
|
showNotification({
|
|
917
962
|
kind: 'error',
|
|
918
963
|
domain: DOMAINS.PAGE,
|
|
919
|
-
text: intl.formatMessage(messages$
|
|
964
|
+
text: intl.formatMessage(messages$6.unexpectedError)
|
|
920
965
|
});
|
|
921
966
|
}
|
|
922
967
|
} else {
|
|
@@ -945,10 +990,21 @@ const useUpload = () => {
|
|
|
945
990
|
const containerKey = encodeFileNameWithTimestampToContainerKey(state.droppedFile.name);
|
|
946
991
|
actions.setContainerKey(containerKey);
|
|
947
992
|
try {
|
|
948
|
-
|
|
993
|
+
// TODO: Temporarily apply settings only for products
|
|
994
|
+
const shouldApplySettings = state.resourceType === 'product';
|
|
995
|
+
await createImportContainerForFileUpload(_objectSpread$d({
|
|
949
996
|
key: containerKey,
|
|
950
|
-
resourceType: state.resourceType
|
|
951
|
-
|
|
997
|
+
resourceType: state.resourceType,
|
|
998
|
+
tags: [TAG_KEY_SOURCE_FILE_UPLOAD]
|
|
999
|
+
}, shouldApplySettings ? {
|
|
1000
|
+
settings: {
|
|
1001
|
+
resourceType: state.resourceType === 'product' ? 'product-draft' : state.resourceType,
|
|
1002
|
+
format: 'CSV',
|
|
1003
|
+
options: {
|
|
1004
|
+
publishAllChanges: state.settings?.publish ?? false
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
} : {}), projectKey, asyncDispatch);
|
|
952
1008
|
const newAbortController = uploadFileForImport({
|
|
953
1009
|
projectKey,
|
|
954
1010
|
containerKey,
|
|
@@ -978,8 +1034,39 @@ const useUpload = () => {
|
|
|
978
1034
|
};
|
|
979
1035
|
};
|
|
980
1036
|
|
|
981
|
-
|
|
982
|
-
|
|
1037
|
+
const useImportPermission = () => {
|
|
1038
|
+
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
1039
|
+
actionRights: applicationContext.actionRights?.products
|
|
1040
|
+
})),
|
|
1041
|
+
actionRights = _useApplicationContex.actionRights;
|
|
1042
|
+
const canManageProducts = useIsAuthorized({
|
|
1043
|
+
demandedPermissions: [PERMISSIONS.ManageProducts]
|
|
1044
|
+
});
|
|
1045
|
+
const canImportCategories = useIsAuthorized({
|
|
1046
|
+
demandedPermissions: [PERMISSIONS.ManageCategories]
|
|
1047
|
+
});
|
|
1048
|
+
const canImportDiscountCodes = useIsAuthorized({
|
|
1049
|
+
demandedPermissions: [PERMISSIONS.ManageDiscountCodes]
|
|
1050
|
+
});
|
|
1051
|
+
const canImportProducts = useMemo(() => {
|
|
1052
|
+
if (!actionRights) return false;
|
|
1053
|
+
const canAddPrices = actionRights.canAddPrices,
|
|
1054
|
+
canAddProducts = actionRights.canAddProducts,
|
|
1055
|
+
canEditAttributesAll = actionRights['canEditAttributes:all'],
|
|
1056
|
+
canEditPrices = actionRights.canEditPrices;
|
|
1057
|
+
return canManageProducts && canAddPrices && canAddProducts && canEditAttributesAll && canEditPrices;
|
|
1058
|
+
}, [canManageProducts, actionRights]);
|
|
1059
|
+
return {
|
|
1060
|
+
canImportProducts,
|
|
1061
|
+
canImportCategories,
|
|
1062
|
+
canImportDiscountCodes,
|
|
1063
|
+
canImportInventories: canManageProducts,
|
|
1064
|
+
canImportProductTypes: canManageProducts
|
|
1065
|
+
};
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
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; }
|
|
1069
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$c(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$c(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
983
1070
|
const FileDropArea = () => {
|
|
984
1071
|
const intl = useIntl();
|
|
985
1072
|
const _useImportResourcesCo = useImportResourcesContext(),
|
|
@@ -1009,7 +1096,7 @@ const FileDropArea = () => {
|
|
|
1009
1096
|
showNotification({
|
|
1010
1097
|
kind: 'error',
|
|
1011
1098
|
domain: DOMAINS.PAGE,
|
|
1012
|
-
text: intl.formatMessage(messages$
|
|
1099
|
+
text: intl.formatMessage(messages$7.tooManyFilesError)
|
|
1013
1100
|
});
|
|
1014
1101
|
return;
|
|
1015
1102
|
}
|
|
@@ -1017,13 +1104,13 @@ const FileDropArea = () => {
|
|
|
1017
1104
|
showNotification({
|
|
1018
1105
|
kind: 'error',
|
|
1019
1106
|
domain: DOMAINS.PAGE,
|
|
1020
|
-
text: intl.formatMessage(messages$
|
|
1107
|
+
text: intl.formatMessage(messages$7.fileFormatNotSupported)
|
|
1021
1108
|
});
|
|
1022
1109
|
} else {
|
|
1023
1110
|
showNotification({
|
|
1024
1111
|
kind: 'error',
|
|
1025
1112
|
domain: DOMAINS.PAGE,
|
|
1026
|
-
text: intl.formatMessage(messages$
|
|
1113
|
+
text: intl.formatMessage(messages$7.genericError)
|
|
1027
1114
|
});
|
|
1028
1115
|
}
|
|
1029
1116
|
}
|
|
@@ -1041,11 +1128,11 @@ const FileDropArea = () => {
|
|
|
1041
1128
|
resourceType: 'category',
|
|
1042
1129
|
isFileDropped: Boolean(state.droppedFile)
|
|
1043
1130
|
});
|
|
1044
|
-
return jsxs(DropWrapper, _objectSpread$
|
|
1131
|
+
return jsxs(DropWrapper, _objectSpread$c(_objectSpread$c({
|
|
1045
1132
|
role: "presentation"
|
|
1046
1133
|
}, getRootProps()), {}, {
|
|
1047
1134
|
dropAreaState: dropAreaState,
|
|
1048
|
-
children: [jsx("input", _objectSpread$
|
|
1135
|
+
children: [jsx("input", _objectSpread$c({
|
|
1049
1136
|
"data-testid": "file-input"
|
|
1050
1137
|
}, getInputProps())), jsx(Constraints.Horizontal, {
|
|
1051
1138
|
children: dropArea
|
|
@@ -1053,6 +1140,41 @@ const FileDropArea = () => {
|
|
|
1053
1140
|
}));
|
|
1054
1141
|
};
|
|
1055
1142
|
|
|
1143
|
+
var messages$5 = defineMessages({
|
|
1144
|
+
publishProducts: {
|
|
1145
|
+
id: 'ImportResourcesModal.settings.publishProducts',
|
|
1146
|
+
description: 'Label for the publish products checkbox',
|
|
1147
|
+
defaultMessage: 'Publish all products in the file'
|
|
1148
|
+
}
|
|
1149
|
+
});
|
|
1150
|
+
|
|
1151
|
+
function ownKeys$b(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; }
|
|
1152
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$b(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1153
|
+
const UploadProductSettings = () => {
|
|
1154
|
+
const _useImportResourcesCo = useImportResourcesContext(),
|
|
1155
|
+
state = _useImportResourcesCo.state,
|
|
1156
|
+
actions = _useImportResourcesCo.actions;
|
|
1157
|
+
return jsx(CheckboxInput, {
|
|
1158
|
+
isChecked: state.settings?.publish,
|
|
1159
|
+
onChange: e => {
|
|
1160
|
+
actions.setUploadSettings({
|
|
1161
|
+
publish: e.target.checked
|
|
1162
|
+
});
|
|
1163
|
+
},
|
|
1164
|
+
children: jsx(FormattedMessage, _objectSpread$b({}, messages$5.publishProducts))
|
|
1165
|
+
});
|
|
1166
|
+
};
|
|
1167
|
+
const UploadSettings = () => {
|
|
1168
|
+
const _useImportResourcesCo2 = useImportResourcesContext(),
|
|
1169
|
+
state = _useImportResourcesCo2.state;
|
|
1170
|
+
const canPublishProducts = useIsAuthorized({
|
|
1171
|
+
demandedPermissions: [PERMISSIONS.ManageProducts],
|
|
1172
|
+
demandedActionRights: [ACTION_RIGHTS.PublishProducts]
|
|
1173
|
+
});
|
|
1174
|
+
if (state.resourceType === 'product' && canPublishProducts) return jsx(UploadProductSettings, {});
|
|
1175
|
+
return null;
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1056
1178
|
var sharedMessages = defineMessages({
|
|
1057
1179
|
[`modalTitle.${IMPORTABLE_RESOURCES.CATEGORY}`]: {
|
|
1058
1180
|
id: 'ImportResourcesModal.modalTitle.category',
|
|
@@ -1137,21 +1259,23 @@ const Upload = () => {
|
|
|
1137
1259
|
children: [jsx(Grid.Item, {
|
|
1138
1260
|
children: jsx(Text.Body, {
|
|
1139
1261
|
isBold: true,
|
|
1140
|
-
intlMessage: messages$
|
|
1262
|
+
intlMessage: messages$7.dataType
|
|
1141
1263
|
})
|
|
1142
1264
|
}), jsx(Grid.Item, {
|
|
1143
1265
|
children: jsx(ResourceTypeSelection, {})
|
|
1144
1266
|
}), jsx(Grid.Item, {
|
|
1145
1267
|
children: jsx(Text.Body, {
|
|
1146
1268
|
isBold: true,
|
|
1147
|
-
intlMessage: messages$
|
|
1269
|
+
intlMessage: messages$7.instructions
|
|
1148
1270
|
})
|
|
1149
1271
|
}), jsx(Grid.Item, {
|
|
1150
1272
|
children: jsx(Instructions, {})
|
|
1151
1273
|
})]
|
|
1152
|
-
}) : jsx(
|
|
1274
|
+
}) : jsx(Fragment, {
|
|
1275
|
+
children: jsx(Instructions, {})
|
|
1276
|
+
}), jsx(InfoBox, {}), jsx(Masking.Mask, {
|
|
1153
1277
|
children: jsx(FileDropArea, {})
|
|
1154
|
-
})]
|
|
1278
|
+
}), jsx(UploadSettings, {})]
|
|
1155
1279
|
})
|
|
1156
1280
|
})
|
|
1157
1281
|
});
|
|
@@ -1431,21 +1555,6 @@ var messages$3 = defineMessages({
|
|
|
1431
1555
|
description: 'Label for the modal Start import button',
|
|
1432
1556
|
defaultMessage: 'Start import'
|
|
1433
1557
|
},
|
|
1434
|
-
BodyText: {
|
|
1435
|
-
id: 'ImportResourcesModal.BodyText',
|
|
1436
|
-
description: 'Confirmation dialog text',
|
|
1437
|
-
defaultMessage: 'You are about to import <bold>{count}</bold> rows to the project: <bold>{projectName}</bold>.'
|
|
1438
|
-
},
|
|
1439
|
-
BodyNote: {
|
|
1440
|
-
id: 'ImportResourcesModal.BodyNote',
|
|
1441
|
-
description: 'Confirmation dialog text',
|
|
1442
|
-
defaultMessage: 'Please be aware that existing values with the same keys will be overwritten by the data included in the CSV.'
|
|
1443
|
-
},
|
|
1444
|
-
BodyQuestion: {
|
|
1445
|
-
id: 'ImportResourcesModal.BodyQuestion',
|
|
1446
|
-
description: 'Confirmation question',
|
|
1447
|
-
defaultMessage: 'Proceed with the import?'
|
|
1448
|
-
},
|
|
1449
1558
|
importNotificationSuccessMessage: {
|
|
1450
1559
|
id: 'ImportResourcesModal.successMessage',
|
|
1451
1560
|
description: 'Notification success message',
|
|
@@ -1464,7 +1573,7 @@ var messages$3 = defineMessages({
|
|
|
1464
1573
|
rowsToBeImported: {
|
|
1465
1574
|
id: 'ImportResourcesModal.rowsToBeImported',
|
|
1466
1575
|
description: 'This message indicates the number of rows that are ready to be imported into the system.',
|
|
1467
|
-
defaultMessage: '<b>{rowCount}</b> rows to be imported'
|
|
1576
|
+
defaultMessage: '{rowCount, plural, one {<b>1</b> row to be imported} other {<b>{rowCount}</b> rows to be imported}}{publish, select, true { and published} other {}}'
|
|
1468
1577
|
},
|
|
1469
1578
|
columnsToBeImported: {
|
|
1470
1579
|
id: 'ImportResourcesModal.columnsToBeImported',
|
|
@@ -1494,7 +1603,7 @@ var messages$3 = defineMessages({
|
|
|
1494
1603
|
confirmationBodyText: {
|
|
1495
1604
|
id: 'ImportResourcesModal.confirmationBodyText',
|
|
1496
1605
|
description: 'Confirmation dialog text',
|
|
1497
|
-
defaultMessage: 'You are about to import <bold>{count}</bold> rows
|
|
1606
|
+
defaultMessage: 'You are about to import {count, plural, one {<bold>1</bold> row} other {<bold>{count}</bold> rows}} in the project: <bold>{projectName}</bold>.'
|
|
1498
1607
|
},
|
|
1499
1608
|
confirmationBodyNote: {
|
|
1500
1609
|
id: 'ImportResourcesModal.confirmationBodyNote',
|
|
@@ -1509,38 +1618,57 @@ var messages$3 = defineMessages({
|
|
|
1509
1618
|
});
|
|
1510
1619
|
|
|
1511
1620
|
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; }
|
|
1512
|
-
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1621
|
+
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; }
|
|
1622
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { 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)."; }
|
|
1623
|
+
const AlignedContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
1624
|
+
target: "e1amawj91"
|
|
1625
|
+
} : {
|
|
1626
|
+
target: "e1amawj91",
|
|
1627
|
+
label: "AlignedContainer"
|
|
1628
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
1629
|
+
name: "1x0d6yz",
|
|
1630
|
+
styles: "padding-top:5px"
|
|
1631
|
+
} : {
|
|
1632
|
+
name: "1x0d6yz",
|
|
1633
|
+
styles: "padding-top:5px",
|
|
1634
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbHVtbi1saXN0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXMEMiLCJmaWxlIjoiY29sdW1uLWxpc3QudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgRm9ybWF0dGVkTWVzc2FnZSB9IGZyb20gJ3JlYWN0LWludGwnXG5pbXBvcnQgeyBMaW5rLCBTdGFtcCwgVGFnTGlzdCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCdcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnXG5pbXBvcnQgeyBJTklUSUFMX0NPTFVNTl9ESVNQTEFZX0NPVU5UIH0gZnJvbSAnLi4vLi4vQGNvbnN0YW50cydcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgY29sdW1uczogQXJyYXk8c3RyaW5nPlxufVxuXG5leHBvcnQgY29uc3QgQWxpZ25lZENvbnRhaW5lciA9IHN0eWxlZC5kaXZgXG4gIHBhZGRpbmctdG9wOiA1cHg7XG5gXG5cbmV4cG9ydCBjb25zdCBNb2RpZmllZFRhZ0xpc3QgPSBzdHlsZWQoVGFnTGlzdClgXG4gID4gZGl2IHtcbiAgICBtYXJnaW46IDhweCA4cHggMCAwO1xuICB9XG5gXG5cbmV4cG9ydCBjb25zdCBDb2x1bW5MaXN0ID0gKHByb3BzOiBSZWFjdC5Qcm9wc1dpdGhDaGlsZHJlbjxQcm9wcz4pID0+IHtcbiAgY29uc3QgW2lzRXhwYW5kZWQsIHNldElzRXhwYW5kZWRdID0gUmVhY3QudXNlU3RhdGUoZmFsc2UpXG4gIGNvbnN0IHNob3VsZFNob3dFeHBhbmRCdXR0b24gPVxuICAgIHByb3BzLmNvbHVtbnMubGVuZ3RoID4gSU5JVElBTF9DT0xVTU5fRElTUExBWV9DT1VOVFxuICBjb25zdCBmaW5hbENvbHVtbnMgPSBpc0V4cGFuZGVkXG4gICAgPyBwcm9wcy5jb2x1bW5zXG4gICAgOiBwcm9wcy5jb2x1bW5zLnNsaWNlKDAsIElOSVRJQUxfQ09MVU1OX0RJU1BMQVlfQ09VTlQpXG5cbiAgcmV0dXJuIChcbiAgICA8TW9kaWZpZWRUYWdMaXN0PlxuICAgICAge2ZpbmFsQ29sdW1ucy5tYXAoKGNvbHVtbjogc3RyaW5nLCBpbmRleDogbnVtYmVyKSA9PiAoXG4gICAgICAgIDxTdGFtcCBrZXk9e2luZGV4fSBsYWJlbD17Y29sdW1ufSB0b25lPVwic2Vjb25kYXJ5XCIgLz5cbiAgICAgICkpfVxuICAgICAge3Nob3VsZFNob3dFeHBhbmRCdXR0b24gJiYgKFxuICAgICAgICA8QWxpZ25lZENvbnRhaW5lcj5cbiAgICAgICAgICA8TGlua1xuICAgICAgICAgICAgdG89XCJcIlxuICAgICAgICAgICAgdG9uZT1cInNlY29uZGFyeVwiXG4gICAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KClcbiAgICAgICAgICAgICAgc2V0SXNFeHBhbmRlZCghaXNFeHBhbmRlZClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAge2lzRXhwYW5kZWQgPyAoXG4gICAgICAgICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlIHsuLi5tZXNzYWdlcy5zaG93TGVzc30gLz5cbiAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlIHsuLi5tZXNzYWdlcy5zaG93TW9yZX0gLz5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9MaW5rPlxuICAgICAgICA8L0FsaWduZWRDb250YWluZXI+XG4gICAgICApfVxuICAgIDwvTW9kaWZpZWRUYWdMaXN0PlxuICApXG59XG4iXX0= */",
|
|
1635
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
1636
|
+
});
|
|
1637
|
+
const ModifiedTagList = /*#__PURE__*/_styled(TagList, process.env.NODE_ENV === "production" ? {
|
|
1517
1638
|
target: "e1amawj90"
|
|
1518
1639
|
} : {
|
|
1519
1640
|
target: "e1amawj90",
|
|
1520
|
-
label: "
|
|
1521
|
-
})(
|
|
1641
|
+
label: "ModifiedTagList"
|
|
1642
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
1643
|
+
name: "u9abxe",
|
|
1644
|
+
styles: ">div{margin:8px 8px 0 0;}"
|
|
1645
|
+
} : {
|
|
1646
|
+
name: "u9abxe",
|
|
1647
|
+
styles: ">div{margin:8px 8px 0 0;}",
|
|
1648
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbHVtbi1saXN0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlOEMiLCJmaWxlIjoiY29sdW1uLWxpc3QudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgRm9ybWF0dGVkTWVzc2FnZSB9IGZyb20gJ3JlYWN0LWludGwnXG5pbXBvcnQgeyBMaW5rLCBTdGFtcCwgVGFnTGlzdCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCdcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnXG5pbXBvcnQgeyBJTklUSUFMX0NPTFVNTl9ESVNQTEFZX0NPVU5UIH0gZnJvbSAnLi4vLi4vQGNvbnN0YW50cydcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgY29sdW1uczogQXJyYXk8c3RyaW5nPlxufVxuXG5leHBvcnQgY29uc3QgQWxpZ25lZENvbnRhaW5lciA9IHN0eWxlZC5kaXZgXG4gIHBhZGRpbmctdG9wOiA1cHg7XG5gXG5cbmV4cG9ydCBjb25zdCBNb2RpZmllZFRhZ0xpc3QgPSBzdHlsZWQoVGFnTGlzdClgXG4gID4gZGl2IHtcbiAgICBtYXJnaW46IDhweCA4cHggMCAwO1xuICB9XG5gXG5cbmV4cG9ydCBjb25zdCBDb2x1bW5MaXN0ID0gKHByb3BzOiBSZWFjdC5Qcm9wc1dpdGhDaGlsZHJlbjxQcm9wcz4pID0+IHtcbiAgY29uc3QgW2lzRXhwYW5kZWQsIHNldElzRXhwYW5kZWRdID0gUmVhY3QudXNlU3RhdGUoZmFsc2UpXG4gIGNvbnN0IHNob3VsZFNob3dFeHBhbmRCdXR0b24gPVxuICAgIHByb3BzLmNvbHVtbnMubGVuZ3RoID4gSU5JVElBTF9DT0xVTU5fRElTUExBWV9DT1VOVFxuICBjb25zdCBmaW5hbENvbHVtbnMgPSBpc0V4cGFuZGVkXG4gICAgPyBwcm9wcy5jb2x1bW5zXG4gICAgOiBwcm9wcy5jb2x1bW5zLnNsaWNlKDAsIElOSVRJQUxfQ09MVU1OX0RJU1BMQVlfQ09VTlQpXG5cbiAgcmV0dXJuIChcbiAgICA8TW9kaWZpZWRUYWdMaXN0PlxuICAgICAge2ZpbmFsQ29sdW1ucy5tYXAoKGNvbHVtbjogc3RyaW5nLCBpbmRleDogbnVtYmVyKSA9PiAoXG4gICAgICAgIDxTdGFtcCBrZXk9e2luZGV4fSBsYWJlbD17Y29sdW1ufSB0b25lPVwic2Vjb25kYXJ5XCIgLz5cbiAgICAgICkpfVxuICAgICAge3Nob3VsZFNob3dFeHBhbmRCdXR0b24gJiYgKFxuICAgICAgICA8QWxpZ25lZENvbnRhaW5lcj5cbiAgICAgICAgICA8TGlua1xuICAgICAgICAgICAgdG89XCJcIlxuICAgICAgICAgICAgdG9uZT1cInNlY29uZGFyeVwiXG4gICAgICAgICAgICBvbkNsaWNrPXsoZSkgPT4ge1xuICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KClcbiAgICAgICAgICAgICAgc2V0SXNFeHBhbmRlZCghaXNFeHBhbmRlZClcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAge2lzRXhwYW5kZWQgPyAoXG4gICAgICAgICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlIHsuLi5tZXNzYWdlcy5zaG93TGVzc30gLz5cbiAgICAgICAgICAgICkgOiAoXG4gICAgICAgICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlIHsuLi5tZXNzYWdlcy5zaG93TW9yZX0gLz5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9MaW5rPlxuICAgICAgICA8L0FsaWduZWRDb250YWluZXI+XG4gICAgICApfVxuICAgIDwvTW9kaWZpZWRUYWdMaXN0PlxuICApXG59XG4iXX0= */",
|
|
1649
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
1650
|
+
});
|
|
1522
1651
|
const ColumnList = props => {
|
|
1652
|
+
var _context;
|
|
1523
1653
|
const _React$useState = React.useState(false),
|
|
1524
1654
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
1525
1655
|
isExpanded = _React$useState2[0],
|
|
1526
1656
|
setIsExpanded = _React$useState2[1];
|
|
1527
1657
|
const shouldShowExpandButton = props.columns.length > INITIAL_COLUMN_DISPLAY_COUNT;
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
children: [
|
|
1531
|
-
|
|
1658
|
+
const finalColumns = isExpanded ? props.columns : _sliceInstanceProperty(_context = props.columns).call(_context, 0, INITIAL_COLUMN_DISPLAY_COUNT);
|
|
1659
|
+
return jsxs(ModifiedTagList, {
|
|
1660
|
+
children: [_mapInstanceProperty(finalColumns).call(finalColumns, (column, index) => jsx(Stamp, {
|
|
1661
|
+
label: column,
|
|
1662
|
+
tone: "secondary"
|
|
1663
|
+
}, index)), shouldShowExpandButton && jsx(AlignedContainer, {
|
|
1664
|
+
children: jsx(Link, {
|
|
1665
|
+
to: "",
|
|
1532
1666
|
tone: "secondary",
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
e.preventDefault();
|
|
1539
|
-
setIsExpanded(!isExpanded);
|
|
1540
|
-
},
|
|
1541
|
-
children: isExpanded ? jsx(FormattedMessage, _objectSpread$6({}, messages$3.showLess)) : jsx(FormattedMessage, _objectSpread$6({}, messages$3.showMore))
|
|
1542
|
-
})
|
|
1543
|
-
})]
|
|
1667
|
+
onClick: e => {
|
|
1668
|
+
e.preventDefault();
|
|
1669
|
+
setIsExpanded(!isExpanded);
|
|
1670
|
+
},
|
|
1671
|
+
children: isExpanded ? jsx(FormattedMessage, _objectSpread$6({}, messages$3.showLess)) : jsx(FormattedMessage, _objectSpread$6({}, messages$3.showMore))
|
|
1544
1672
|
})
|
|
1545
1673
|
})]
|
|
1546
1674
|
});
|
|
@@ -1585,30 +1713,34 @@ function UploadPreviewModal() {
|
|
|
1585
1713
|
}), jsx(Card, {
|
|
1586
1714
|
insetScale: "xl",
|
|
1587
1715
|
children: jsxs(Spacings.Stack, {
|
|
1588
|
-
scale: "
|
|
1589
|
-
children: [jsxs(Spacings.
|
|
1590
|
-
|
|
1591
|
-
children: [
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1716
|
+
scale: "s",
|
|
1717
|
+
children: [jsxs(Spacings.Stack, {
|
|
1718
|
+
scale: "xs",
|
|
1719
|
+
children: [jsxs(Spacings.Inline, {
|
|
1720
|
+
alignItems: "center",
|
|
1721
|
+
children: [jsx(CheckBoldIcon, {
|
|
1722
|
+
color: "success"
|
|
1723
|
+
}), jsx(Text.Body, {
|
|
1724
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$3.rowsToBeImported), {}, {
|
|
1725
|
+
values: {
|
|
1726
|
+
rowCount: intl.formatNumber(state.uploadFileResponse.rowsCount),
|
|
1727
|
+
publish: state.resourceType === 'product' && state.settings?.publish,
|
|
1728
|
+
b: getBold$1
|
|
1729
|
+
}
|
|
1730
|
+
})
|
|
1731
|
+
})]
|
|
1732
|
+
}), jsxs(Spacings.Inline, {
|
|
1733
|
+
alignItems: "center",
|
|
1734
|
+
children: [jsx(CheckBoldIcon, {
|
|
1735
|
+
color: "success"
|
|
1736
|
+
}), jsx(Text.Body, {
|
|
1737
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$3.columnsToBeImported), {}, {
|
|
1738
|
+
values: {
|
|
1739
|
+
columnCount: intl.formatNumber(validatedColumns.length),
|
|
1740
|
+
b: getBold$1
|
|
1741
|
+
}
|
|
1742
|
+
})
|
|
1743
|
+
})]
|
|
1612
1744
|
})]
|
|
1613
1745
|
}), jsx(ColumnList, {
|
|
1614
1746
|
columns: validatedColumns
|
|
@@ -1617,7 +1749,7 @@ function UploadPreviewModal() {
|
|
|
1617
1749
|
}), ignoredColumns.length > 0 && jsx(Card, {
|
|
1618
1750
|
insetScale: "xl",
|
|
1619
1751
|
children: jsxs(Spacings.Stack, {
|
|
1620
|
-
scale: "
|
|
1752
|
+
scale: "s",
|
|
1621
1753
|
children: [jsxs(Spacings.Inline, {
|
|
1622
1754
|
alignItems: "center",
|
|
1623
1755
|
children: [jsx(EyeCrossedIcon, {
|
|
@@ -2049,19 +2181,19 @@ const getChunkImport = locale => {
|
|
|
2049
2181
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
2050
2182
|
switch (intlLocale) {
|
|
2051
2183
|
case 'de':
|
|
2052
|
-
return import(/* webpackChunkName: "import-resources-modal-i18n-de" */'./de-
|
|
2184
|
+
return import(/* webpackChunkName: "import-resources-modal-i18n-de" */'./de-3d74f145.esm.js');
|
|
2053
2185
|
case 'es':
|
|
2054
|
-
return import(/* webpackChunkName: "import-resources-modal-i18n-es" */'./es-
|
|
2186
|
+
return import(/* webpackChunkName: "import-resources-modal-i18n-es" */'./es-561e774f.esm.js');
|
|
2055
2187
|
case 'fr-FR':
|
|
2056
|
-
return import(/* webpackChunkName: "import-resources-modal-i18n-fr-FR" */'./fr-FR-
|
|
2188
|
+
return import(/* webpackChunkName: "import-resources-modal-i18n-fr-FR" */'./fr-FR-1c33adf1.esm.js');
|
|
2057
2189
|
case 'zh-CN':
|
|
2058
2190
|
return import(/* webpackChunkName: "import-resources-modal-i18n-zh-CN" */'./zh-CN-4780d88e.esm.js');
|
|
2059
2191
|
case 'ja':
|
|
2060
2192
|
return import(/* webpackChunkName: "import-resources-modal-i18n-ja" */'./ja-73c088a7.esm.js');
|
|
2061
2193
|
case 'pt-BR':
|
|
2062
|
-
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-
|
|
2194
|
+
return import(/* webpackChunkName: "change-history-i18n-pt-BR" */'./pt-BR-c09d735f.esm.js');
|
|
2063
2195
|
default:
|
|
2064
|
-
return import(/* webpackChunkName: "import-resources-modal-i18n-en" */'./en-
|
|
2196
|
+
return import(/* webpackChunkName: "import-resources-modal-i18n-en" */'./en-bfc8cfec.esm.js');
|
|
2065
2197
|
}
|
|
2066
2198
|
};
|
|
2067
2199
|
const loadMessages = async locale => {
|
|
@@ -2141,4 +2273,4 @@ const ImportResourcesModal = props => {
|
|
|
2141
2273
|
};
|
|
2142
2274
|
ImportResourcesModal.displayName = 'ImportResourcesModal';
|
|
2143
2275
|
|
|
2144
|
-
export { EnabledDropArea as E, FileDropped as F, ImportResourcesModal as I, messages$
|
|
2276
|
+
export { EnabledDropArea as E, FileDropped as F, ImportResourcesModal as I, useImportPermission as a, messages$7 as m, useImportResourcesContext as u };
|