@commercetools-frontend-extensions/unpublish-products-modal 1.5.1 → 1.6.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.
|
@@ -422,6 +422,11 @@ var messages$4 = reactIntl.defineMessages({
|
|
|
422
422
|
description: 'Generic notification message when file upload fails',
|
|
423
423
|
defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
|
|
424
424
|
},
|
|
425
|
+
uploadIsTakingTooLong: {
|
|
426
|
+
id: 'operations.import.resource.upload.uploadIsTakingTooLong',
|
|
427
|
+
description: 'Notification message when file upload is taking longer than expected',
|
|
428
|
+
defaultMessage: 'Upload timed out. Please reduce your file size or split the data into smaller files and try again.'
|
|
429
|
+
},
|
|
425
430
|
missingRequiredField: {
|
|
426
431
|
id: 'UnpublishProductsModal.missingRequiredField',
|
|
427
432
|
description: 'Error message displayed when a required field is missing',
|
|
@@ -525,6 +530,19 @@ const useUpload = () => {
|
|
|
525
530
|
} else if (error.errorData?.invalid > 0) {
|
|
526
531
|
actions.setUploadFileResponse(error.errorData);
|
|
527
532
|
actions.setCurrentStep('upload-error');
|
|
533
|
+
} else if (error.statusCode === 408) {
|
|
534
|
+
actions.cancelImport();
|
|
535
|
+
showNotification({
|
|
536
|
+
kind: 'error',
|
|
537
|
+
domain: constants.DOMAINS.PAGE,
|
|
538
|
+
text: intl.formatMessage(messages$4.uploadIsTakingTooLong)
|
|
539
|
+
});
|
|
540
|
+
sentry.reportErrorToSentry(new Error('Upload File Error: The upload request timed out (408 Request Timeout)'), {
|
|
541
|
+
extra: {
|
|
542
|
+
error,
|
|
543
|
+
fileSizeInBytes: state.droppedFile?.size
|
|
544
|
+
}
|
|
545
|
+
});
|
|
528
546
|
} else {
|
|
529
547
|
actions.cancelImport();
|
|
530
548
|
showNotification({
|
|
@@ -422,6 +422,11 @@ var messages$4 = reactIntl.defineMessages({
|
|
|
422
422
|
description: 'Generic notification message when file upload fails',
|
|
423
423
|
defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
|
|
424
424
|
},
|
|
425
|
+
uploadIsTakingTooLong: {
|
|
426
|
+
id: 'operations.import.resource.upload.uploadIsTakingTooLong',
|
|
427
|
+
description: 'Notification message when file upload is taking longer than expected',
|
|
428
|
+
defaultMessage: 'Upload timed out. Please reduce your file size or split the data into smaller files and try again.'
|
|
429
|
+
},
|
|
425
430
|
missingRequiredField: {
|
|
426
431
|
id: 'UnpublishProductsModal.missingRequiredField',
|
|
427
432
|
description: 'Error message displayed when a required field is missing',
|
|
@@ -525,6 +530,19 @@ const useUpload = () => {
|
|
|
525
530
|
} else if (error.errorData?.invalid > 0) {
|
|
526
531
|
actions.setUploadFileResponse(error.errorData);
|
|
527
532
|
actions.setCurrentStep('upload-error');
|
|
533
|
+
} else if (error.statusCode === 408) {
|
|
534
|
+
actions.cancelImport();
|
|
535
|
+
showNotification({
|
|
536
|
+
kind: 'error',
|
|
537
|
+
domain: constants.DOMAINS.PAGE,
|
|
538
|
+
text: intl.formatMessage(messages$4.uploadIsTakingTooLong)
|
|
539
|
+
});
|
|
540
|
+
sentry.reportErrorToSentry(new Error('Upload File Error: The upload request timed out (408 Request Timeout)'), {
|
|
541
|
+
extra: {
|
|
542
|
+
error,
|
|
543
|
+
fileSizeInBytes: state.droppedFile?.size
|
|
544
|
+
}
|
|
545
|
+
});
|
|
528
546
|
} else {
|
|
529
547
|
actions.cancelImport();
|
|
530
548
|
showNotification({
|
|
@@ -404,6 +404,11 @@ var messages$4 = defineMessages({
|
|
|
404
404
|
description: 'Generic notification message when file upload fails',
|
|
405
405
|
defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
|
|
406
406
|
},
|
|
407
|
+
uploadIsTakingTooLong: {
|
|
408
|
+
id: 'operations.import.resource.upload.uploadIsTakingTooLong',
|
|
409
|
+
description: 'Notification message when file upload is taking longer than expected',
|
|
410
|
+
defaultMessage: 'Upload timed out. Please reduce your file size or split the data into smaller files and try again.'
|
|
411
|
+
},
|
|
407
412
|
missingRequiredField: {
|
|
408
413
|
id: 'UnpublishProductsModal.missingRequiredField',
|
|
409
414
|
description: 'Error message displayed when a required field is missing',
|
|
@@ -507,6 +512,19 @@ const useUpload = () => {
|
|
|
507
512
|
} else if (error.errorData?.invalid > 0) {
|
|
508
513
|
actions.setUploadFileResponse(error.errorData);
|
|
509
514
|
actions.setCurrentStep('upload-error');
|
|
515
|
+
} else if (error.statusCode === 408) {
|
|
516
|
+
actions.cancelImport();
|
|
517
|
+
showNotification({
|
|
518
|
+
kind: 'error',
|
|
519
|
+
domain: DOMAINS.PAGE,
|
|
520
|
+
text: intl.formatMessage(messages$4.uploadIsTakingTooLong)
|
|
521
|
+
});
|
|
522
|
+
reportErrorToSentry(new Error('Upload File Error: The upload request timed out (408 Request Timeout)'), {
|
|
523
|
+
extra: {
|
|
524
|
+
error,
|
|
525
|
+
fileSizeInBytes: state.droppedFile?.size
|
|
526
|
+
}
|
|
527
|
+
});
|
|
510
528
|
} else {
|
|
511
529
|
actions.cancelImport();
|
|
512
530
|
showNotification({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend-extensions/unpublish-products-modal",
|
|
3
3
|
"description": "Shared import modal for unpublishing products",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@emotion/styled": "11.14.1",
|
|
23
23
|
"@formatjs/cli": "6.7.4",
|
|
24
24
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
25
|
-
"jest": "
|
|
25
|
+
"jest": "30.2.0",
|
|
26
26
|
"lodash": "4.17.21",
|
|
27
27
|
"lodash.truncate": "4.4.2",
|
|
28
28
|
"moment": "2.30.1",
|
|
@@ -31,27 +31,27 @@
|
|
|
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.
|
|
34
|
+
"@commercetools-frontend-extensions/operations": "3.4.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@commercetools-frontend/actions-global": "
|
|
38
|
-
"@commercetools-frontend/application-components": "
|
|
39
|
-
"@commercetools-frontend/application-shell": "
|
|
40
|
-
"@commercetools-frontend/application-shell-connectors": "
|
|
41
|
-
"@commercetools-frontend/constants": "
|
|
37
|
+
"@commercetools-frontend/actions-global": "25.1.0",
|
|
38
|
+
"@commercetools-frontend/application-components": "25.1.0",
|
|
39
|
+
"@commercetools-frontend/application-shell": "25.1.0",
|
|
40
|
+
"@commercetools-frontend/application-shell-connectors": "25.1.0",
|
|
41
|
+
"@commercetools-frontend/constants": "25.1.0",
|
|
42
42
|
"@commercetools-frontend/fullstory": "4.0.3",
|
|
43
|
-
"@commercetools-frontend/i18n": "
|
|
44
|
-
"@commercetools-frontend/jest-preset-mc-app": "
|
|
45
|
-
"@commercetools-frontend/permissions": "
|
|
46
|
-
"@commercetools-frontend/sdk": "
|
|
47
|
-
"@commercetools-frontend/sentry": "
|
|
43
|
+
"@commercetools-frontend/i18n": "25.1.0",
|
|
44
|
+
"@commercetools-frontend/jest-preset-mc-app": "25.1.0",
|
|
45
|
+
"@commercetools-frontend/permissions": "25.1.0",
|
|
46
|
+
"@commercetools-frontend/sdk": "25.1.0",
|
|
47
|
+
"@commercetools-frontend/sentry": "25.1.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",
|
|
51
51
|
"@commercetools-uikit/icons": "20.3.0",
|
|
52
52
|
"@commercetools-uikit/select-field": "20.3.0",
|
|
53
53
|
"@preconstruct/cli": "2.8.12",
|
|
54
|
-
"@types/jest": "
|
|
54
|
+
"@types/jest": "30.0.0",
|
|
55
55
|
"@types/lodash.truncate": "^4.4.7",
|
|
56
56
|
"@types/papaparse": "5.5.2",
|
|
57
57
|
"@types/pluralize": "0.0.33",
|
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
"rimraf": "6.1.2"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@commercetools-frontend/actions-global": "
|
|
68
|
-
"@commercetools-frontend/application-components": "
|
|
69
|
-
"@commercetools-frontend/application-shell": "
|
|
70
|
-
"@commercetools-frontend/application-shell-connectors": "
|
|
71
|
-
"@commercetools-frontend/constants": "
|
|
67
|
+
"@commercetools-frontend/actions-global": "24.x || 25.x",
|
|
68
|
+
"@commercetools-frontend/application-components": "24.x || 25.x",
|
|
69
|
+
"@commercetools-frontend/application-shell": "24.x || 25.x",
|
|
70
|
+
"@commercetools-frontend/application-shell-connectors": "24.x || 25.x",
|
|
71
|
+
"@commercetools-frontend/constants": "24.x || 25.x",
|
|
72
72
|
"@commercetools-frontend/fullstory": "2.x || 3.x || 4.x",
|
|
73
|
-
"@commercetools-frontend/i18n": "
|
|
74
|
-
"@commercetools-frontend/jest-preset-mc-app": "
|
|
75
|
-
"@commercetools-frontend/permissions": "
|
|
76
|
-
"@commercetools-frontend/sdk": "
|
|
77
|
-
"@commercetools-frontend/sentry": "
|
|
73
|
+
"@commercetools-frontend/i18n": "24.x || 25.x",
|
|
74
|
+
"@commercetools-frontend/jest-preset-mc-app": "24.x || 25.x",
|
|
75
|
+
"@commercetools-frontend/permissions": "24.x || 25.x",
|
|
76
|
+
"@commercetools-frontend/sdk": "24.x || 25.x",
|
|
77
|
+
"@commercetools-frontend/sentry": "24.x || 25.x",
|
|
78
78
|
"@commercetools-frontend/ui-kit": "19.x || 20.x",
|
|
79
79
|
"@commercetools-uikit/design-system": "19.x || 20.x",
|
|
80
80
|
"@commercetools-uikit/icons": "19.x || 20.x",
|