@commercetools-frontend-extensions/import-resources-modal 1.13.2 → 1.14.1
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/commercetools-frontend-extensions-import-resources-modal.cjs.dev.js +8 -30
- package/dist/commercetools-frontend-extensions-import-resources-modal.cjs.prod.js +8 -30
- package/dist/commercetools-frontend-extensions-import-resources-modal.esm.js +9 -31
- package/dist/{de-ba5c0732.esm.js → de-b047bec2.esm.js} +3 -0
- package/dist/{de-3cd0305d.cjs.prod.js → de-c827452a.cjs.prod.js} +3 -0
- package/dist/{de-f0dfd9fd.cjs.dev.js → de-ead5c57a.cjs.dev.js} +3 -0
- package/dist/declarations/src/@components/import-resources-modal-provider/import-resources-modal-provider.d.ts +0 -1
- package/dist/declarations/src/@components/import-resources-modal-provider/reducer.d.ts +0 -5
- package/dist/{en-7d070d59.cjs.prod.js → en-9d2e9c08.cjs.prod.js} +3 -0
- package/dist/{en-30a40b0e.esm.js → en-ae4043c4.esm.js} +3 -0
- package/dist/{en-306cd014.cjs.dev.js → en-f79b9fc3.cjs.dev.js} +3 -0
- package/dist/{es-44c7763d.esm.js → es-8097b07a.esm.js} +3 -0
- package/dist/{es-030fcde4.cjs.prod.js → es-a51dcb64.cjs.dev.js} +3 -0
- package/dist/{es-82c0874c.cjs.dev.js → es-c255427d.cjs.prod.js} +3 -0
- package/dist/{fr-FR-58d893b4.esm.js → fr-FR-102534f6.esm.js} +3 -0
- package/dist/{fr-FR-c66b401e.cjs.prod.js → fr-FR-2a5d9ac4.cjs.dev.js} +3 -0
- package/dist/{fr-FR-9b22c2c4.cjs.dev.js → fr-FR-bc7717d4.cjs.prod.js} +3 -0
- package/dist/{pt-BR-8830908d.cjs.dev.js → pt-BR-482ef868.cjs.dev.js} +3 -0
- package/dist/{pt-BR-365e883e.esm.js → pt-BR-6733e100.esm.js} +3 -0
- package/dist/{pt-BR-36893abd.cjs.prod.js → pt-BR-fd80a27f.cjs.prod.js} +3 -0
- package/package.json +16 -16
|
@@ -92,7 +92,6 @@ function reducer(state, action) {
|
|
|
92
92
|
droppedFile: undefined,
|
|
93
93
|
dropAreaState: 'disabled',
|
|
94
94
|
progress: 0,
|
|
95
|
-
totalResourceCount: undefined,
|
|
96
95
|
validationProcessed: undefined,
|
|
97
96
|
isValidating: false
|
|
98
97
|
});
|
|
@@ -105,7 +104,6 @@ function reducer(state, action) {
|
|
|
105
104
|
droppedFile: undefined,
|
|
106
105
|
dropAreaState: 'ready-for-drop',
|
|
107
106
|
progress: 0,
|
|
108
|
-
totalResourceCount: undefined,
|
|
109
107
|
validationProcessed: undefined,
|
|
110
108
|
isValidating: false
|
|
111
109
|
});
|
|
@@ -139,11 +137,6 @@ function reducer(state, action) {
|
|
|
139
137
|
jobId: action.jobId
|
|
140
138
|
});
|
|
141
139
|
}
|
|
142
|
-
if (action.type === 'setTotalResourceCount') {
|
|
143
|
-
return _objectSpread$b(_objectSpread$b({}, state), {}, {
|
|
144
|
-
totalResourceCount: action.totalResourceCount
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
140
|
if (action.type === 'setValidationProgress') {
|
|
148
141
|
return _objectSpread$b(_objectSpread$b({}, state), {}, {
|
|
149
142
|
validationProcessed: action.validationProcessed,
|
|
@@ -168,7 +161,6 @@ const initialState = {
|
|
|
168
161
|
settings: {
|
|
169
162
|
decimalSeparator: '.'
|
|
170
163
|
},
|
|
171
|
-
totalResourceCount: undefined,
|
|
172
164
|
validationProcessed: undefined,
|
|
173
165
|
isValidating: false
|
|
174
166
|
};
|
|
@@ -209,9 +201,6 @@ const initialActions = {
|
|
|
209
201
|
setJobId(_jobId) {
|
|
210
202
|
/**/
|
|
211
203
|
},
|
|
212
|
-
setTotalResourceCount(_totalResourceCount) {
|
|
213
|
-
/**/
|
|
214
|
-
},
|
|
215
204
|
setValidationProgress(_params) {
|
|
216
205
|
/**/
|
|
217
206
|
}
|
|
@@ -285,10 +274,6 @@ const ImportResourcesProvider = props => {
|
|
|
285
274
|
type: 'setJobId',
|
|
286
275
|
jobId
|
|
287
276
|
});
|
|
288
|
-
const setTotalResourceCount = totalResourceCount => dispatch({
|
|
289
|
-
type: 'setTotalResourceCount',
|
|
290
|
-
totalResourceCount
|
|
291
|
-
});
|
|
292
277
|
const setValidationProgress = _ref => {
|
|
293
278
|
let processed = _ref.processed,
|
|
294
279
|
isValidating = _ref.isValidating;
|
|
@@ -331,7 +316,6 @@ const ImportResourcesProvider = props => {
|
|
|
331
316
|
setFileUploadErrors,
|
|
332
317
|
setProgress,
|
|
333
318
|
setUploadSettings,
|
|
334
|
-
setTotalResourceCount,
|
|
335
319
|
setValidationProgress
|
|
336
320
|
}
|
|
337
321
|
},
|
|
@@ -1016,10 +1000,6 @@ const useUpload = () => {
|
|
|
1016
1000
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1017
1001
|
return false;
|
|
1018
1002
|
}
|
|
1019
|
-
if (isFileImportJobFlowEnabled) {
|
|
1020
|
-
const resourceCount = await operations.countUniqueResourcesInCsv(file);
|
|
1021
|
-
actions.setTotalResourceCount(resourceCount);
|
|
1022
|
-
}
|
|
1023
1003
|
return true;
|
|
1024
1004
|
};
|
|
1025
1005
|
const handleUploadError = error => {
|
|
@@ -2066,7 +2046,7 @@ const UploadResult = () => {
|
|
|
2066
2046
|
var messages$2 = reactIntl.defineMessages({
|
|
2067
2047
|
validatingResources: {
|
|
2068
2048
|
id: 'ImportResourcesModal.Uploading.validatingResources',
|
|
2069
|
-
defaultMessage: '
|
|
2049
|
+
defaultMessage: '{processed} validated resources'
|
|
2070
2050
|
}
|
|
2071
2051
|
});
|
|
2072
2052
|
|
|
@@ -2077,11 +2057,9 @@ const Uploading = () => {
|
|
|
2077
2057
|
actions = _useImportResourcesCo.actions,
|
|
2078
2058
|
onClose = _useImportResourcesCo.onClose;
|
|
2079
2059
|
if (!state.droppedFile?.name) return null;
|
|
2080
|
-
const showValidationProgress = state.isValidating && state.validationProcessed && state.validationProcessed > 0 && state.
|
|
2060
|
+
const showValidationProgress = state.isValidating && state.validationProcessed && state.validationProcessed > 0 && state.resourceType;
|
|
2081
2061
|
const statusMessage = showValidationProgress ? intl.formatMessage(messages$2.validatingResources, {
|
|
2082
|
-
processed: intl.formatNumber(state.validationProcessed)
|
|
2083
|
-
total: intl.formatNumber(state.totalResourceCount),
|
|
2084
|
-
resourceType: intl.formatMessage(resourceTypeToPluralMessage(state.resourceType))
|
|
2062
|
+
processed: intl.formatNumber(state.validationProcessed)
|
|
2085
2063
|
}) : undefined;
|
|
2086
2064
|
return jsxRuntime.jsx(operations.UploadingModal, {
|
|
2087
2065
|
isOpen: true,
|
|
@@ -2211,17 +2189,17 @@ const getChunkImport = locale => {
|
|
|
2211
2189
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
2212
2190
|
switch (intlLocale) {
|
|
2213
2191
|
case 'de':
|
|
2214
|
-
return Promise.resolve().then(function () { return require('./de-
|
|
2192
|
+
return Promise.resolve().then(function () { return require('./de-ead5c57a.cjs.dev.js'); });
|
|
2215
2193
|
case 'es':
|
|
2216
|
-
return Promise.resolve().then(function () { return require('./es-
|
|
2194
|
+
return Promise.resolve().then(function () { return require('./es-a51dcb64.cjs.dev.js'); });
|
|
2217
2195
|
case 'fr-FR':
|
|
2218
|
-
return Promise.resolve().then(function () { return require('./fr-FR-
|
|
2196
|
+
return Promise.resolve().then(function () { return require('./fr-FR-2a5d9ac4.cjs.dev.js'); });
|
|
2219
2197
|
case 'ja':
|
|
2220
2198
|
return Promise.resolve().then(function () { return require('./ja-9bd5f452.cjs.dev.js'); });
|
|
2221
2199
|
case 'pt-BR':
|
|
2222
|
-
return Promise.resolve().then(function () { return require('./pt-BR-
|
|
2200
|
+
return Promise.resolve().then(function () { return require('./pt-BR-482ef868.cjs.dev.js'); });
|
|
2223
2201
|
default:
|
|
2224
|
-
return Promise.resolve().then(function () { return require('./en-
|
|
2202
|
+
return Promise.resolve().then(function () { return require('./en-f79b9fc3.cjs.dev.js'); });
|
|
2225
2203
|
}
|
|
2226
2204
|
};
|
|
2227
2205
|
const loadMessages = async locale => {
|
|
@@ -92,7 +92,6 @@ function reducer(state, action) {
|
|
|
92
92
|
droppedFile: undefined,
|
|
93
93
|
dropAreaState: 'disabled',
|
|
94
94
|
progress: 0,
|
|
95
|
-
totalResourceCount: undefined,
|
|
96
95
|
validationProcessed: undefined,
|
|
97
96
|
isValidating: false
|
|
98
97
|
});
|
|
@@ -105,7 +104,6 @@ function reducer(state, action) {
|
|
|
105
104
|
droppedFile: undefined,
|
|
106
105
|
dropAreaState: 'ready-for-drop',
|
|
107
106
|
progress: 0,
|
|
108
|
-
totalResourceCount: undefined,
|
|
109
107
|
validationProcessed: undefined,
|
|
110
108
|
isValidating: false
|
|
111
109
|
});
|
|
@@ -139,11 +137,6 @@ function reducer(state, action) {
|
|
|
139
137
|
jobId: action.jobId
|
|
140
138
|
});
|
|
141
139
|
}
|
|
142
|
-
if (action.type === 'setTotalResourceCount') {
|
|
143
|
-
return _objectSpread$b(_objectSpread$b({}, state), {}, {
|
|
144
|
-
totalResourceCount: action.totalResourceCount
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
140
|
if (action.type === 'setValidationProgress') {
|
|
148
141
|
return _objectSpread$b(_objectSpread$b({}, state), {}, {
|
|
149
142
|
validationProcessed: action.validationProcessed,
|
|
@@ -168,7 +161,6 @@ const initialState = {
|
|
|
168
161
|
settings: {
|
|
169
162
|
decimalSeparator: '.'
|
|
170
163
|
},
|
|
171
|
-
totalResourceCount: undefined,
|
|
172
164
|
validationProcessed: undefined,
|
|
173
165
|
isValidating: false
|
|
174
166
|
};
|
|
@@ -209,9 +201,6 @@ const initialActions = {
|
|
|
209
201
|
setJobId(_jobId) {
|
|
210
202
|
/**/
|
|
211
203
|
},
|
|
212
|
-
setTotalResourceCount(_totalResourceCount) {
|
|
213
|
-
/**/
|
|
214
|
-
},
|
|
215
204
|
setValidationProgress(_params) {
|
|
216
205
|
/**/
|
|
217
206
|
}
|
|
@@ -285,10 +274,6 @@ const ImportResourcesProvider = props => {
|
|
|
285
274
|
type: 'setJobId',
|
|
286
275
|
jobId
|
|
287
276
|
});
|
|
288
|
-
const setTotalResourceCount = totalResourceCount => dispatch({
|
|
289
|
-
type: 'setTotalResourceCount',
|
|
290
|
-
totalResourceCount
|
|
291
|
-
});
|
|
292
277
|
const setValidationProgress = _ref => {
|
|
293
278
|
let processed = _ref.processed,
|
|
294
279
|
isValidating = _ref.isValidating;
|
|
@@ -331,7 +316,6 @@ const ImportResourcesProvider = props => {
|
|
|
331
316
|
setFileUploadErrors,
|
|
332
317
|
setProgress,
|
|
333
318
|
setUploadSettings,
|
|
334
|
-
setTotalResourceCount,
|
|
335
319
|
setValidationProgress
|
|
336
320
|
}
|
|
337
321
|
},
|
|
@@ -1016,10 +1000,6 @@ const useUpload = () => {
|
|
|
1016
1000
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
1017
1001
|
return false;
|
|
1018
1002
|
}
|
|
1019
|
-
if (isFileImportJobFlowEnabled) {
|
|
1020
|
-
const resourceCount = await operations.countUniqueResourcesInCsv(file);
|
|
1021
|
-
actions.setTotalResourceCount(resourceCount);
|
|
1022
|
-
}
|
|
1023
1003
|
return true;
|
|
1024
1004
|
};
|
|
1025
1005
|
const handleUploadError = error => {
|
|
@@ -2042,7 +2022,7 @@ const UploadResult = () => {
|
|
|
2042
2022
|
var messages$2 = reactIntl.defineMessages({
|
|
2043
2023
|
validatingResources: {
|
|
2044
2024
|
id: 'ImportResourcesModal.Uploading.validatingResources',
|
|
2045
|
-
defaultMessage: '
|
|
2025
|
+
defaultMessage: '{processed} validated resources'
|
|
2046
2026
|
}
|
|
2047
2027
|
});
|
|
2048
2028
|
|
|
@@ -2053,11 +2033,9 @@ const Uploading = () => {
|
|
|
2053
2033
|
actions = _useImportResourcesCo.actions,
|
|
2054
2034
|
onClose = _useImportResourcesCo.onClose;
|
|
2055
2035
|
if (!state.droppedFile?.name) return null;
|
|
2056
|
-
const showValidationProgress = state.isValidating && state.validationProcessed && state.validationProcessed > 0 && state.
|
|
2036
|
+
const showValidationProgress = state.isValidating && state.validationProcessed && state.validationProcessed > 0 && state.resourceType;
|
|
2057
2037
|
const statusMessage = showValidationProgress ? intl.formatMessage(messages$2.validatingResources, {
|
|
2058
|
-
processed: intl.formatNumber(state.validationProcessed)
|
|
2059
|
-
total: intl.formatNumber(state.totalResourceCount),
|
|
2060
|
-
resourceType: intl.formatMessage(resourceTypeToPluralMessage(state.resourceType))
|
|
2038
|
+
processed: intl.formatNumber(state.validationProcessed)
|
|
2061
2039
|
}) : undefined;
|
|
2062
2040
|
return jsxRuntime.jsx(operations.UploadingModal, {
|
|
2063
2041
|
isOpen: true,
|
|
@@ -2187,17 +2165,17 @@ const getChunkImport = locale => {
|
|
|
2187
2165
|
const intlLocale = i18n.mapLocaleToIntlLocale(locale);
|
|
2188
2166
|
switch (intlLocale) {
|
|
2189
2167
|
case 'de':
|
|
2190
|
-
return Promise.resolve().then(function () { return require('./de-
|
|
2168
|
+
return Promise.resolve().then(function () { return require('./de-c827452a.cjs.prod.js'); });
|
|
2191
2169
|
case 'es':
|
|
2192
|
-
return Promise.resolve().then(function () { return require('./es-
|
|
2170
|
+
return Promise.resolve().then(function () { return require('./es-c255427d.cjs.prod.js'); });
|
|
2193
2171
|
case 'fr-FR':
|
|
2194
|
-
return Promise.resolve().then(function () { return require('./fr-FR-
|
|
2172
|
+
return Promise.resolve().then(function () { return require('./fr-FR-bc7717d4.cjs.prod.js'); });
|
|
2195
2173
|
case 'ja':
|
|
2196
2174
|
return Promise.resolve().then(function () { return require('./ja-37632763.cjs.prod.js'); });
|
|
2197
2175
|
case 'pt-BR':
|
|
2198
|
-
return Promise.resolve().then(function () { return require('./pt-BR-
|
|
2176
|
+
return Promise.resolve().then(function () { return require('./pt-BR-fd80a27f.cjs.prod.js'); });
|
|
2199
2177
|
default:
|
|
2200
|
-
return Promise.resolve().then(function () { return require('./en-
|
|
2178
|
+
return Promise.resolve().then(function () { return require('./en-9d2e9c08.cjs.prod.js'); });
|
|
2201
2179
|
}
|
|
2202
2180
|
};
|
|
2203
2181
|
const loadMessages = async locale => {
|
|
@@ -10,7 +10,7 @@ import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
|
10
10
|
import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
11
11
|
import { defineMessages, useIntl, FormattedMessage, IntlProvider } from 'react-intl';
|
|
12
12
|
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
13
|
-
import { deleteImportContainer, FileDroppedArea, DisabledDropArea, EnabledDropArea, ActiveDragDropArea, COLUMN_DELIMITERS, useFileUpload, validateDelimiter, getRowCount, toBytes,
|
|
13
|
+
import { deleteImportContainer, FileDroppedArea, DisabledDropArea, EnabledDropArea, ActiveDragDropArea, COLUMN_DELIMITERS, useFileUpload, validateDelimiter, getRowCount, toBytes, isAbortError, HttpError, formatKeys, isError, IMPORT_MAX_FILE_SIZE_MB, IMPORT_LEGACY_MAX_FILE_SIZE_MB, IMPORT_MAX_ITEM_COUNT, IMPORT_LEGACY_MAX_ROW_COUNT, assertResourceType, FileDropArea as FileDropArea$1, InfoBox, CT_API_DOCS_URL, UploadSeparator, UploadSettings, useFetchFileImportJobRecords, mapUploadFileErrorsResponseToUploadFileErrorRows, UnexpectedColumnError, extractErrorDescriptionFromValidationMessage, formatErrorCode, getFileUploadErrorsCount, RESOURCE_TYPE_DOCUMENTATION_LINKS, mapFileUploadErrorsToUploadFileErrorRows, getValidatedColumns, processFileImportJob, processUploadedFile, UploadingModal, UnexpectedResourceTypeError as UnexpectedResourceTypeError$1, RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS, isResourceType } from '@commercetools-frontend-extensions/operations';
|
|
14
14
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
15
15
|
import React, { useContext, useMemo, useState, useEffect } from 'react';
|
|
16
16
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
@@ -71,7 +71,6 @@ function reducer(state, action) {
|
|
|
71
71
|
droppedFile: undefined,
|
|
72
72
|
dropAreaState: 'disabled',
|
|
73
73
|
progress: 0,
|
|
74
|
-
totalResourceCount: undefined,
|
|
75
74
|
validationProcessed: undefined,
|
|
76
75
|
isValidating: false
|
|
77
76
|
});
|
|
@@ -84,7 +83,6 @@ function reducer(state, action) {
|
|
|
84
83
|
droppedFile: undefined,
|
|
85
84
|
dropAreaState: 'ready-for-drop',
|
|
86
85
|
progress: 0,
|
|
87
|
-
totalResourceCount: undefined,
|
|
88
86
|
validationProcessed: undefined,
|
|
89
87
|
isValidating: false
|
|
90
88
|
});
|
|
@@ -118,11 +116,6 @@ function reducer(state, action) {
|
|
|
118
116
|
jobId: action.jobId
|
|
119
117
|
});
|
|
120
118
|
}
|
|
121
|
-
if (action.type === 'setTotalResourceCount') {
|
|
122
|
-
return _objectSpread$b(_objectSpread$b({}, state), {}, {
|
|
123
|
-
totalResourceCount: action.totalResourceCount
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
119
|
if (action.type === 'setValidationProgress') {
|
|
127
120
|
return _objectSpread$b(_objectSpread$b({}, state), {}, {
|
|
128
121
|
validationProcessed: action.validationProcessed,
|
|
@@ -147,7 +140,6 @@ const initialState = {
|
|
|
147
140
|
settings: {
|
|
148
141
|
decimalSeparator: '.'
|
|
149
142
|
},
|
|
150
|
-
totalResourceCount: undefined,
|
|
151
143
|
validationProcessed: undefined,
|
|
152
144
|
isValidating: false
|
|
153
145
|
};
|
|
@@ -188,9 +180,6 @@ const initialActions = {
|
|
|
188
180
|
setJobId(_jobId) {
|
|
189
181
|
/**/
|
|
190
182
|
},
|
|
191
|
-
setTotalResourceCount(_totalResourceCount) {
|
|
192
|
-
/**/
|
|
193
|
-
},
|
|
194
183
|
setValidationProgress(_params) {
|
|
195
184
|
/**/
|
|
196
185
|
}
|
|
@@ -264,10 +253,6 @@ const ImportResourcesProvider = props => {
|
|
|
264
253
|
type: 'setJobId',
|
|
265
254
|
jobId
|
|
266
255
|
});
|
|
267
|
-
const setTotalResourceCount = totalResourceCount => dispatch({
|
|
268
|
-
type: 'setTotalResourceCount',
|
|
269
|
-
totalResourceCount
|
|
270
|
-
});
|
|
271
256
|
const setValidationProgress = _ref => {
|
|
272
257
|
let processed = _ref.processed,
|
|
273
258
|
isValidating = _ref.isValidating;
|
|
@@ -310,7 +295,6 @@ const ImportResourcesProvider = props => {
|
|
|
310
295
|
setFileUploadErrors,
|
|
311
296
|
setProgress,
|
|
312
297
|
setUploadSettings,
|
|
313
|
-
setTotalResourceCount,
|
|
314
298
|
setValidationProgress
|
|
315
299
|
}
|
|
316
300
|
},
|
|
@@ -995,10 +979,6 @@ const useUpload = () => {
|
|
|
995
979
|
actions.setCurrentStep(CurrentStep$1.UploadResult);
|
|
996
980
|
return false;
|
|
997
981
|
}
|
|
998
|
-
if (isFileImportJobFlowEnabled) {
|
|
999
|
-
const resourceCount = await countUniqueResourcesInCsv(file);
|
|
1000
|
-
actions.setTotalResourceCount(resourceCount);
|
|
1001
|
-
}
|
|
1002
982
|
return true;
|
|
1003
983
|
};
|
|
1004
984
|
const handleUploadError = error => {
|
|
@@ -2045,7 +2025,7 @@ const UploadResult = () => {
|
|
|
2045
2025
|
var messages$2 = defineMessages({
|
|
2046
2026
|
validatingResources: {
|
|
2047
2027
|
id: 'ImportResourcesModal.Uploading.validatingResources',
|
|
2048
|
-
defaultMessage: '
|
|
2028
|
+
defaultMessage: '{processed} validated resources'
|
|
2049
2029
|
}
|
|
2050
2030
|
});
|
|
2051
2031
|
|
|
@@ -2056,11 +2036,9 @@ const Uploading = () => {
|
|
|
2056
2036
|
actions = _useImportResourcesCo.actions,
|
|
2057
2037
|
onClose = _useImportResourcesCo.onClose;
|
|
2058
2038
|
if (!state.droppedFile?.name) return null;
|
|
2059
|
-
const showValidationProgress = state.isValidating && state.validationProcessed && state.validationProcessed > 0 && state.
|
|
2039
|
+
const showValidationProgress = state.isValidating && state.validationProcessed && state.validationProcessed > 0 && state.resourceType;
|
|
2060
2040
|
const statusMessage = showValidationProgress ? intl.formatMessage(messages$2.validatingResources, {
|
|
2061
|
-
processed: intl.formatNumber(state.validationProcessed)
|
|
2062
|
-
total: intl.formatNumber(state.totalResourceCount),
|
|
2063
|
-
resourceType: intl.formatMessage(resourceTypeToPluralMessage(state.resourceType))
|
|
2041
|
+
processed: intl.formatNumber(state.validationProcessed)
|
|
2064
2042
|
}) : undefined;
|
|
2065
2043
|
return jsx(UploadingModal, {
|
|
2066
2044
|
isOpen: true,
|
|
@@ -2190,17 +2168,17 @@ const getChunkImport = locale => {
|
|
|
2190
2168
|
const intlLocale = mapLocaleToIntlLocale(locale);
|
|
2191
2169
|
switch (intlLocale) {
|
|
2192
2170
|
case 'de':
|
|
2193
|
-
return import('./de-
|
|
2171
|
+
return import('./de-b047bec2.esm.js');
|
|
2194
2172
|
case 'es':
|
|
2195
|
-
return import('./es-
|
|
2173
|
+
return import('./es-8097b07a.esm.js');
|
|
2196
2174
|
case 'fr-FR':
|
|
2197
|
-
return import('./fr-FR-
|
|
2175
|
+
return import('./fr-FR-102534f6.esm.js');
|
|
2198
2176
|
case 'ja':
|
|
2199
2177
|
return import('./ja-73c088a7.esm.js');
|
|
2200
2178
|
case 'pt-BR':
|
|
2201
|
-
return import('./pt-BR-
|
|
2179
|
+
return import('./pt-BR-6733e100.esm.js');
|
|
2202
2180
|
default:
|
|
2203
|
-
return import('./en-
|
|
2181
|
+
return import('./en-ae4043c4.esm.js');
|
|
2204
2182
|
}
|
|
2205
2183
|
};
|
|
2206
2184
|
const loadMessages = async locale => {
|
|
@@ -23,7 +23,6 @@ export type ImportResourcesContextValue = {
|
|
|
23
23
|
setFileUploadErrors: (fileUploadErrors: Array<FileUploadError>) => void;
|
|
24
24
|
setProgress: (progress: number) => void;
|
|
25
25
|
setUploadSettings: (settings: UploadSettings) => void;
|
|
26
|
-
setTotalResourceCount: (totalResourceCount: number) => void;
|
|
27
26
|
setValidationProgress: (params: {
|
|
28
27
|
processed: number;
|
|
29
28
|
isValidating: boolean;
|
|
@@ -17,7 +17,6 @@ export type State = {
|
|
|
17
17
|
jobId?: string;
|
|
18
18
|
progress?: number;
|
|
19
19
|
settings?: UploadSettings;
|
|
20
|
-
totalResourceCount?: number;
|
|
21
20
|
validationProcessed?: number;
|
|
22
21
|
isValidating?: boolean;
|
|
23
22
|
};
|
|
@@ -55,9 +54,6 @@ export type Action = {
|
|
|
55
54
|
} | {
|
|
56
55
|
type: 'setJobId';
|
|
57
56
|
jobId: string;
|
|
58
|
-
} | {
|
|
59
|
-
type: 'setTotalResourceCount';
|
|
60
|
-
totalResourceCount: number;
|
|
61
57
|
} | {
|
|
62
58
|
type: 'setValidationProgress';
|
|
63
59
|
validationProcessed: number;
|
|
@@ -78,7 +74,6 @@ export declare const initialActions: {
|
|
|
78
74
|
setUploadSettings(_settings: UploadSettings): void;
|
|
79
75
|
setProgress(_progress: number): void;
|
|
80
76
|
setJobId(_jobId: string): void;
|
|
81
|
-
setTotalResourceCount(_totalResourceCount: number): void;
|
|
82
77
|
setValidationProgress(_params: {
|
|
83
78
|
processed: number;
|
|
84
79
|
isValidating: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/import-resources-modal",
|
|
3
3
|
"description": "Shared import modal for importing resources",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.14.1",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"pluralize": "8.0.0",
|
|
32
32
|
"prop-types": "15.8.1",
|
|
33
33
|
"ramda": "^0.32.0",
|
|
34
|
-
"@commercetools-frontend-extensions/operations": "3.1
|
|
34
|
+
"@commercetools-frontend-extensions/operations": "3.2.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@commercetools-frontend/actions-global": "24.
|
|
38
|
-
"@commercetools-frontend/application-components": "24.
|
|
39
|
-
"@commercetools-frontend/application-shell": "24.
|
|
40
|
-
"@commercetools-frontend/application-shell-connectors": "24.
|
|
41
|
-
"@commercetools-frontend/constants": "24.
|
|
37
|
+
"@commercetools-frontend/actions-global": "24.13.0",
|
|
38
|
+
"@commercetools-frontend/application-components": "24.13.0",
|
|
39
|
+
"@commercetools-frontend/application-shell": "24.13.0",
|
|
40
|
+
"@commercetools-frontend/application-shell-connectors": "24.13.0",
|
|
41
|
+
"@commercetools-frontend/constants": "24.13.0",
|
|
42
42
|
"@commercetools-frontend/fullstory": "4.0.3",
|
|
43
|
-
"@commercetools-frontend/i18n": "24.
|
|
44
|
-
"@commercetools-frontend/jest-preset-mc-app": "24.
|
|
45
|
-
"@commercetools-frontend/permissions": "24.
|
|
46
|
-
"@commercetools-frontend/sdk": "24.
|
|
47
|
-
"@commercetools-frontend/sentry": "24.
|
|
43
|
+
"@commercetools-frontend/i18n": "24.13.0",
|
|
44
|
+
"@commercetools-frontend/jest-preset-mc-app": "24.13.0",
|
|
45
|
+
"@commercetools-frontend/permissions": "24.13.0",
|
|
46
|
+
"@commercetools-frontend/sdk": "24.13.0",
|
|
47
|
+
"@commercetools-frontend/sentry": "24.13.0",
|
|
48
48
|
"@commercetools-frontend/ui-kit": "20.3.0",
|
|
49
49
|
"@commercetools-uikit/data-table": "20.3.0",
|
|
50
50
|
"@commercetools-uikit/design-system": "20.3.0",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"msw": "1.3.5",
|
|
59
59
|
"react": "19.2.0",
|
|
60
60
|
"react-intl": "7.1.4",
|
|
61
|
-
"react-redux": "
|
|
62
|
-
"redux": "
|
|
61
|
+
"react-redux": "9.2.0",
|
|
62
|
+
"redux": "5.0.1",
|
|
63
63
|
"rimraf": "6.1.2"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@commercetools-uikit/icons": "19.x || 20.x",
|
|
80
80
|
"react": "17.x || 19.x",
|
|
81
81
|
"react-intl": "6.x || 7.x",
|
|
82
|
-
"react-redux": "7.x",
|
|
83
|
-
"redux": "4.x"
|
|
82
|
+
"react-redux": "7.x || 9.x",
|
|
83
|
+
"redux": "4.x || 5.x"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "rimraf dist && preconstruct build",
|