@commercetools-frontend-extensions/unpublish-products-modal 1.1.5 → 1.1.7

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.
@@ -416,11 +416,11 @@ function getDefaultDropWrapperStyles(_dropAreaState) {
416
416
  return /*#__PURE__*/react.css("" , "" );
417
417
  }
418
418
 
419
- var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-cb410640.cjs.prod.js' /* webpackChunkName: "active-drag-drop-area" */); }));
419
+ var ActiveDragDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./active-drag-drop-area-0fd690f1.cjs.prod.js' /* webpackChunkName: "active-drag-drop-area" */); }));
420
420
 
421
- var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-6625704b.cjs.prod.js' /* webpackChunkName: "enabled-drop-area" */); }));
421
+ var EnabledDropArea = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./enabled-drop-area-be9f12e6.cjs.prod.js' /* webpackChunkName: "enabled-drop-area" */); }));
422
422
 
423
- var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-81a018c7.cjs.prod.js' /* webpackChunkName: "filed-dropped-area" */); }));
423
+ var FileDropped = /*#__PURE__*/React.lazy(() => Promise.resolve().then(function () { return require('./file-dropped-area-4749e851.cjs.prod.js' /* webpackChunkName: "filed-dropped-area" */); }));
424
424
 
425
425
  function getDropArea(_ref) {
426
426
  let dropAreaState = _ref.dropAreaState,
@@ -453,48 +453,58 @@ function getDropAreaState(flags) {
453
453
 
454
454
  var messages$4 = reactIntl.defineMessages({
455
455
  dragAndDropCSV: {
456
- id: "UnpublishProductsModal.dragAndDropCSV",
457
- defaultMessage: "Drag and drop CSV"
456
+ id: 'UnpublishProductsModal.dragAndDropCSV',
457
+ description: 'The message telling the user to drag and drop CSV file in the file drop area',
458
+ defaultMessage: 'Drag and drop CSV'
458
459
  },
459
460
  or: {
460
- id: "UnpublishProductsModal.or",
461
- defaultMessage: "or"
461
+ id: 'UnpublishProductsModal.or',
462
+ description: 'The word "or" in the drag and drop message',
463
+ defaultMessage: 'or'
462
464
  },
463
465
  browseButton: {
464
- id: "UnpublishProductsModal.browseFile",
465
- defaultMessage: "Browse file"
466
+ id: 'UnpublishProductsModal.browseFile',
467
+ defaultMessage: 'Browse file'
466
468
  },
467
469
  uploadAndPreview: {
468
- id: "UnpublishProductsModal.uploadAndPreview",
469
- defaultMessage: "Upload and preview"
470
+ id: 'UnpublishProductsModal.uploadAndPreview',
471
+ description: 'Label for the button that uploads the file and shows the preview',
472
+ defaultMessage: 'Upload and preview'
470
473
  },
471
474
  chooseFile: {
472
- id: "UnpublishProductsModal.chooseFile",
473
- defaultMessage: "Choose file"
475
+ id: 'UnpublishProductsModal.chooseFile',
476
+ description: 'Label for a button on the file upload page, shown on ready to upload state',
477
+ defaultMessage: 'Choose file'
474
478
  },
475
479
  fileUploadFailed: {
476
- id: "UnpublishProductsModal.fileUploadFailed",
477
- defaultMessage: "File upload failed"
480
+ id: 'UnpublishProductsModal.fileUploadFailed',
481
+ description: 'A title on the file upload page, shown on file upload error state',
482
+ defaultMessage: 'File upload failed'
478
483
  },
479
484
  fileFormatNotSupported: {
480
- id: "UnpublishProductsModal.fileFormatNotSupported",
481
- defaultMessage: "Invalid file format: The file is not in CSV format and cannot be processed."
485
+ id: 'UnpublishProductsModal.fileFormatNotSupported',
486
+ description: 'Error message displayed when a user drags and drops a non-CSV file',
487
+ defaultMessage: 'Invalid file format: The file is not in CSV format and cannot be processed.'
482
488
  },
483
489
  tooManyFilesError: {
484
- id: "UnpublishProductsModal.tooManyFilesError",
485
- defaultMessage: "Multiple files detected: You can only drag and drop one file at a time."
490
+ id: 'UnpublishProductsModal.tooManyFilesError',
491
+ description: 'Error message displayed when a user drags and drops multiple files at once',
492
+ defaultMessage: 'Multiple files detected: You can only drag and drop one file at a time.'
486
493
  },
487
494
  genericError: {
488
- id: "UnpublishProductsModal.genericError",
489
- defaultMessage: "Error occurred: Please try uploading the file again or contact our support team for assistance."
495
+ id: 'UnpublishProductsModal.genericError',
496
+ description: 'Default error message for unexpected file upload issues (for unhandled cases)',
497
+ defaultMessage: 'Error occurred: Please try uploading the file again or contact our support team for assistance.'
490
498
  },
491
499
  dataType: {
492
- id: "UnpublishProductsModal.dataType",
493
- defaultMessage: "Data type"
500
+ id: 'UnpublishProductsModal.dataType',
501
+ description: 'Label for the data type selection dropdown',
502
+ defaultMessage: 'Data type'
494
503
  },
495
504
  instructions: {
496
- id: "UnpublishProductsModal.instructions",
497
- defaultMessage: "Instructions"
505
+ id: 'UnpublishProductsModal.instructions',
506
+ description: 'Label for the instructions section',
507
+ defaultMessage: 'Instructions'
498
508
  }
499
509
  });
500
510
 
@@ -540,47 +550,56 @@ const useUnpublishProductsContext = () => {
540
550
 
541
551
  var messages$3 = reactIntl.defineMessages({
542
552
  fileSizeExceededTitle: {
543
- id: "UnpublishProductsModal.sizeExceededTitle",
544
- defaultMessage: "File size exceeded"
553
+ id: 'UnpublishProductsModal.sizeExceededTitle',
554
+ defaultMessage: 'File size exceeded'
545
555
  },
546
556
  fileSizeExceededDescription: {
547
- id: "UnpublishProductsModal.sizeExceededDescription",
548
- defaultMessage: "The file exceeds the maximum allowed size of {fileSizeLimit} MB"
557
+ id: 'UnpublishProductsModal.sizeExceededDescription',
558
+ description: 'Error description when the file size exceeds the allowable limit',
559
+ defaultMessage: 'The file exceeds the maximum allowed size of {fileSizeLimit} MB'
549
560
  },
550
561
  rowLimitExceededTitle: {
551
- id: "UnpublishProductsModal.rowLimitExceededTitle",
552
- defaultMessage: "Row limit exceeded"
562
+ id: 'UnpublishProductsModal.rowLimitExceededTitle',
563
+ defaultMessage: 'Row limit exceeded'
553
564
  },
554
565
  rowLimitExceededDescription: {
555
- id: "UnpublishProductsModal.rowLimitExceededDescription",
556
- defaultMessage: "The file contains more than the allowable maximum of {rowLimit} rows"
566
+ id: 'UnpublishProductsModal.rowLimitExceededDescription',
567
+ description: 'Error description when the file contains more rows than the allowable maximum',
568
+ defaultMessage: 'The file contains more than the allowable maximum of {rowLimit} rows'
557
569
  },
558
570
  dropAreaNotEnoughRowsTitle: {
559
- id: "UnpublishProductsModal.dropAreaNotEnoughRowsTitle",
560
- defaultMessage: "Invalid CSV file"
571
+ id: 'UnpublishProductsModal.dropAreaNotEnoughRowsTitle',
572
+ description: 'Error title shown when the uploaded CSV file does not contain a header and at least one row of data',
573
+ defaultMessage: 'Invalid CSV file'
561
574
  },
562
575
  dropAreaNotEnoughRowsDescription: {
563
- id: "UnpublishProductsModal.dropAreaNotEnoughRowsDescription",
564
- defaultMessage: "Make sure the file contains a header and at least one row of data"
576
+ id: 'UnpublishProductsModal.dropAreaNotEnoughRowsDescription',
577
+ description: 'Error description shown when the uploaded CSV file does not contain a header and at least one row of data',
578
+ defaultMessage: 'Make sure the file contains a header and at least one row of data'
565
579
  },
566
580
  unexpectedError: {
567
- id: "UnpublishProductsModal.unexpectedError",
568
- defaultMessage: "An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again."
581
+ id: 'UnpublishProductsModal.unexpectedError',
582
+ description: 'Generic notification message when file upload fails',
583
+ defaultMessage: 'An unexpected error occurred during the file upload. Please try again, or contact support if this error occurs again.'
569
584
  },
570
585
  missingRequiredField: {
571
- id: "UnpublishProductsModal.missingRequiredField",
572
- defaultMessage: "Missing required field"
586
+ id: 'UnpublishProductsModal.missingRequiredField',
587
+ description: 'Error message displayed when a required field is missing',
588
+ defaultMessage: 'Missing required field'
573
589
  },
574
590
  missingKeyError: {
575
- id: "UnpublishProductsModal.missingKeyError",
591
+ id: 'UnpublishProductsModal.missingKeyError',
592
+ description: 'Error message displayed when the uploaded file is missing the key field',
576
593
  defaultMessage: "The 'key' field is missing or incomplete in some rows. Please ensure every row has a 'key' value."
577
594
  },
578
595
  csvFormatErrorTitle: {
579
- id: "UnpublishProductsModal.csvFormatErrorTitle",
580
- defaultMessage: "Invalid CSV file"
596
+ id: 'UnpublishProductsModal.csvFormatErrorTitle',
597
+ description: 'Error title shown when the uploaded CSV file is not formatted correctly',
598
+ defaultMessage: 'Invalid CSV file'
581
599
  },
582
600
  csvFormatErrorDescription: {
583
- id: "UnpublishProductsModal.csvFormatErrorDescription",
601
+ id: 'UnpublishProductsModal.csvFormatErrorDescription',
602
+ description: 'Error message displayed when the CSV file is not formatted correctly',
584
603
  defaultMessage: "Your CSV file is not formatted correctly. Make sure the file contains only one column named 'key', which includes the product keys"
585
604
  }
586
605
  });
@@ -883,22 +902,26 @@ const FileDropArea = () => {
883
902
 
884
903
  var sharedMessages = reactIntl.defineMessages({
885
904
  unpublishModalTitle: {
886
- id: "UnpublishProductsModal.unpublishModalTitle",
887
- defaultMessage: "Bulk unpublish via CSV"
905
+ id: 'UnpublishProductsModal.unpublishModalTitle',
906
+ description: 'The title of the modal',
907
+ defaultMessage: 'Bulk unpublish via CSV'
888
908
  },
889
909
  startBulkUnpublish: {
890
- id: "UnpublishProductsModal.startBulkUnpublish",
891
- defaultMessage: "Start bulk unpublish"
910
+ id: 'UnpublishProductsModal.startBulkUnpublish',
911
+ description: 'Start bulk unpublish button',
912
+ defaultMessage: 'Start bulk unpublish'
892
913
  },
893
914
  cancel: {
894
- id: "UnpublishProductsModal.cancel",
895
- defaultMessage: "Cancel"
915
+ id: 'UnpublishProductsModal.cancel',
916
+ description: 'The label for the cancel button',
917
+ defaultMessage: 'Cancel'
896
918
  }
897
919
  });
898
920
 
899
921
  var messages$2 = reactIntl.defineMessages({
900
922
  fileUploadInstructions: {
901
- id: "UnpublishProductsModal.fileUploadInstructions",
923
+ id: 'UnpublishProductsModal.fileUploadInstructions',
924
+ description: 'Instructions for uploading a CSV file with product keys to unpublish',
902
925
  defaultMessage: "The CSV file must contain the product keys to be unpublished under the header 'key'. Maximum file size is {maxFileSize} MB with a limit of {maxRowCount} rows. Download <csvTemplateLink>the CSV template</csvTemplateLink> or refer to <documentationLink>the documentation</documentationLink>."
903
926
  }
904
927
  });
@@ -917,13 +940,13 @@ const Instructions = () => {
917
940
  isExternal: true,
918
941
  to: TEMPLATE_DOWNLOAD_LINK,
919
942
  children: msg
920
- }),
943
+ }, "csvTemplateLink"),
921
944
  documentationLink: msg => jsxRuntime.jsx(uiKit.Link, {
922
945
  tone: "secondary",
923
946
  isExternal: true,
924
947
  to: DOCUMENTATION_LINK,
925
948
  children: msg
926
- })
949
+ }, "documentationLink")
927
950
  }
928
951
  })
929
952
  });
@@ -1045,20 +1068,23 @@ const Uploading = () => {
1045
1068
 
1046
1069
  var messages$1 = reactIntl.defineMessages({
1047
1070
  uploadNewFile: {
1048
- id: "UnpublishProductsModal.uploadNewFile",
1049
- defaultMessage: "Upload new file"
1071
+ id: 'UnpublishProductsModal.uploadNewFile',
1072
+ defaultMessage: 'Upload new file'
1050
1073
  },
1051
1074
  uploadErrorDescription: {
1052
- id: "UnpublishProductsModal.uploadError",
1053
- defaultMessage: "There {errorsCount, plural, one {is <b>1</b> error} other {are <b>{errorsCount}</b> errors}} detected while uploading the file \"{fileName}\"."
1075
+ id: 'UnpublishProductsModal.uploadError',
1076
+ description: 'Title when errors detected while uploading file',
1077
+ defaultMessage: 'There {errorsCount, plural, one {is <b>1</b> error} other {are <b>{errorsCount}</b> errors}} detected while uploading the file "{fileName}".'
1054
1078
  },
1055
1079
  errorType: {
1056
- id: "UnpublishProductsModal.errorType",
1057
- defaultMessage: "Error type"
1080
+ id: 'UnpublishProductsModal.errorType',
1081
+ description: 'Error type" column',
1082
+ defaultMessage: 'Error type'
1058
1083
  },
1059
1084
  details: {
1060
- id: "UnpublishProductsModal.details",
1061
- defaultMessage: "Details"
1085
+ id: 'UnpublishProductsModal.details',
1086
+ description: '"Details" column',
1087
+ defaultMessage: 'Details'
1062
1088
  }
1063
1089
  });
1064
1090
 
@@ -1163,47 +1189,54 @@ function getBold$2(msg) {
1163
1189
  as: "span",
1164
1190
  isBold: true,
1165
1191
  children: msg
1166
- });
1192
+ }, crypto.randomUUID());
1167
1193
  }
1168
1194
 
1169
1195
  var messages = reactIntl.defineMessages({
1170
1196
  continue: {
1171
- id: "UnpublishProductsModal.continue",
1172
- defaultMessage: "Continue"
1197
+ id: 'UnpublishProductsModal.continue',
1198
+ description: 'Continue button',
1199
+ defaultMessage: 'Continue'
1173
1200
  },
1174
1201
  heresAPreview: {
1175
- id: "UnpublishProductsModal.heresAPreview",
1202
+ id: 'UnpublishProductsModal.heresAPreview',
1203
+ description: 'Here is a preview',
1176
1204
  defaultMessage: "Here's a preview:"
1177
1205
  },
1178
1206
  productsToBeUnpublished: {
1179
- id: "UnpublishProductsModal.productsToBeUnpublished",
1180
- defaultMessage: "{count, plural, one {<b>{count}</b> product to be unpublished} other {<b>{count}</b> products to be unpublished}}"
1207
+ id: 'UnpublishProductsModal.productsToBeUnpublished',
1208
+ description: 'Products to be unpublished',
1209
+ defaultMessage: '{count, plural, one {<b>{count}</b> product to be unpublished} other {<b>{count}</b> products to be unpublished}}'
1181
1210
  },
1182
1211
  confirmationQuestion: {
1183
- id: "UnpublishProductsModal.confirmationQuestion",
1184
- defaultMessage: "Are you sure you want to unpublish the products?"
1212
+ id: 'UnpublishProductsModal.confirmationQuestion',
1213
+ description: 'Confirmation question',
1214
+ defaultMessage: 'Are you sure you want to unpublish the products? '
1185
1215
  },
1186
1216
  confirmationText: {
1187
- id: "UnpublishProductsModal.confirmationText",
1188
- defaultMessage: "{count, plural, one {You are about to unpublish <b>{count}</b> product in the project: <b>{projectName}</b>.} other {You are about to unpublish <b>{count}</b> products in the project: <b>{projectName}</b>.}}"
1217
+ id: 'UnpublishProductsModal.confirmationText',
1218
+ description: 'Confirmation text',
1219
+ defaultMessage: '{count, plural, one {You are about to unpublish <b>{count}</b> product in the project: <b>{projectName}</b>.} other {You are about to unpublish <b>{count}</b> products in the project: <b>{projectName}</b>.}}'
1189
1220
  },
1190
1221
  importStarted: {
1191
- id: "UnpublishProductsModal.importStarted",
1192
- defaultMessage: "<b>Your import for bulk unpublish has started.</b><newline></newline>Go to <logsLink>Import logs</logsLink> to view the progress."
1222
+ id: 'UnpublishProductsModal.importStarted',
1223
+ description: 'Import started',
1224
+ defaultMessage: '<b>Your import for bulk unpublish has started.</b><newline></newline>Go to <logsLink>Import logs</logsLink> to view the progress.'
1193
1225
  },
1194
1226
  preparingImport: {
1195
- id: "UnpublishProductsModal.preparingImport",
1196
- defaultMessage: "<b>Prepare bulk unpublish.</b><newline></newline>Once preparation is complete, you can track the progress <logsLink>in the Import logs</logsLink>. The data will be unpublished after the import is finalized."
1227
+ id: 'UnpublishProductsModal.preparingImport',
1228
+ description: 'Preparing import',
1229
+ defaultMessage: '<b>Prepare bulk unpublish.</b><newline></newline>Once preparation is complete, you can track the progress <logsLink>in the Import logs</logsLink>. The data will be unpublished after the import is finalized.'
1197
1230
  }
1198
1231
  });
1199
1232
 
1200
1233
  function ownKeys$2(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; }
1201
1234
  function _objectSpread$2(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$2(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$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1202
- const getNewLine = () => jsxRuntime.jsx("br", {});
1235
+ const getNewLine = () => jsxRuntime.jsx("br", {}, "break");
1203
1236
  const getImportLogsLink = (msg, projectKey) => jsxRuntime.jsx(uiKit.Link, {
1204
1237
  to: `/${projectKey}/operations/import/logs`,
1205
1238
  children: msg
1206
- });
1239
+ }, "link");
1207
1240
  var _ref2 = {
1208
1241
  name: "1vs9i7r",
1209
1242
  styles: "width:360px"
@@ -1331,7 +1364,7 @@ function getBold$1(msg) {
1331
1364
  as: "span",
1332
1365
  isBold: true,
1333
1366
  children: msg
1334
- });
1367
+ }, crypto.randomUUID());
1335
1368
  }
1336
1369
 
1337
1370
  function ownKeys$1(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; }
@@ -1386,7 +1419,7 @@ function getBold(msg) {
1386
1419
  as: "span",
1387
1420
  isBold: true,
1388
1421
  children: msg
1389
- });
1422
+ }, crypto.randomUUID());
1390
1423
  }
1391
1424
 
1392
1425
  const steps = {
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.1.5",
4
+ "version": "1.1.7",
5
5
  "license": "BSD-3-Clause",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "@babel/runtime": "7.26.0",
19
19
  "@babel/runtime-corejs3": "7.26.0",
20
20
  "@commercetools-frontend/fullstory": "2.5.1",
21
- "@commercetools-frontend/permissions": "22.38.1",
21
+ "@commercetools-frontend/permissions": "22.41.0",
22
22
  "@commercetools/importapi-sdk": "5.20.0",
23
23
  "@emotion/react": "11.14.0",
24
24
  "@emotion/styled": "11.14.0",
@@ -38,20 +38,20 @@
38
38
  "react-dropzone": "14.3.5"
39
39
  },
40
40
  "devDependencies": {
41
- "@commercetools-frontend/actions-global": "22.38.1",
42
- "@commercetools-frontend/application-components": "22.38.1",
43
- "@commercetools-frontend/application-shell": "22.38.1",
44
- "@commercetools-frontend/application-shell-connectors": "22.38.1",
45
- "@commercetools-frontend/constants": "22.38.1",
46
- "@commercetools-frontend/i18n": "22.38.1",
47
- "@commercetools-frontend/jest-preset-mc-app": "22.38.1",
48
- "@commercetools-frontend/sdk": "22.38.1",
49
- "@commercetools-frontend/sentry": "22.38.1",
50
- "@commercetools-frontend/ui-kit": "19.22.0",
51
- "@commercetools-uikit/data-table": "19.22.0",
52
- "@commercetools-uikit/design-system": "19.22.0",
53
- "@commercetools-uikit/icons": "19.22.0",
54
- "@commercetools-uikit/select-field": "19.22.0",
41
+ "@commercetools-frontend/actions-global": "22.41.0",
42
+ "@commercetools-frontend/application-components": "22.41.0",
43
+ "@commercetools-frontend/application-shell": "22.41.0",
44
+ "@commercetools-frontend/application-shell-connectors": "22.41.0",
45
+ "@commercetools-frontend/constants": "22.41.0",
46
+ "@commercetools-frontend/i18n": "22.41.0",
47
+ "@commercetools-frontend/jest-preset-mc-app": "22.41.0",
48
+ "@commercetools-frontend/sdk": "22.41.0",
49
+ "@commercetools-frontend/sentry": "22.41.0",
50
+ "@commercetools-frontend/ui-kit": "19.22.1",
51
+ "@commercetools-uikit/data-table": "19.22.1",
52
+ "@commercetools-uikit/design-system": "19.22.1",
53
+ "@commercetools-uikit/icons": "19.22.1",
54
+ "@commercetools-uikit/select-field": "19.22.1",
55
55
  "@preconstruct/cli": "2.8.10",
56
56
  "@types/jest": "29.5.14",
57
57
  "@types/lodash.truncate": "^4.4.7",