@redsift/products 12.2.1-muiv7 → 12.2.2-muiv5

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.
@@ -560,6 +560,7 @@ var enUS = {
560
560
  "investigate.card.bimi.record-no-cert_md": "**[](BIMI_RECORD#:glossary)** **Certificate not found**",
561
561
  "investigate.card.bimi.cert-forbidden_md": "Your certificate appears to be behind an anti-bot protection system. [Find out more and how to resolve the issue](https://knowledge.ondmarc.redsift.com/en/articles/8047013-ondmarc-cannot-fetch-my-bimi-logo-or-certificate)",
562
562
  "investigate.card.bimi.record-failed_md": "**[](BIMI_RECORD#:glossary)** **Present** but with errors",
563
+ "investigate.card.bimi.record-unknown-error_md": "**[](BIMI_RECORD#:glossary)** **Present with errors**",
563
564
  "investigate.card.bimi.record-missing_md": "**[](BIMI_RECORD#:glossary)** **Missing.** [Learn how to fix it](https://community.redsift.com/s/article/000001130)",
564
565
  "investigate.card.bimi.could-not-fetch_md": "Failed to fetch **[](BIMI_RECORD#:glossary)**",
565
566
  "investigate.card.bimi.record-svg-added-from-itag-valid_md": "**[](BIMI_RECORD#:glossary)** successfully added from \n **[](ITAG#:glossary)** [svg-url]({url})",
@@ -1481,6 +1482,7 @@ var frFR = {
1481
1482
  "investigate.card.bimi.record-no-cert_md": "**[](BIMI_RECORD#:glossary)** **Certificat non trouvé**",
1482
1483
  "investigate.card.bimi.cert-forbidden_md": "Votre certificat semble être derrière un système de protection anti-bot. [En savoir plus et comment résoudre le problème](https://knowledge.ondmarc.redsift.com/en/articles/8047013-ondmarc-cannot-fetch-my-bimi-logo-or-certificate)",
1483
1484
  "investigate.card.bimi.record-failed_md": "**[](BIMI_RECORD#:glossary)** **Présent** mais avec des erreurs",
1485
+ "investigate.card.bimi.record-unknown-error_md": "**[](BIMI_RECORD#:glossary)** **Présent avec des erreurs**",
1484
1486
  "investigate.card.bimi.record-missing_md": "**[](BIMI_RECORD#:glossary)** **Missing.** [Learn how to fix it](https://community.redsift.com/s/article/000001130)",
1485
1487
  "investigate.card.bimi.could-not-fetch_md": "Échec de la récupération de **[](BIMI_RECORD#:glossary)**",
1486
1488
  "investigate.card.bimi.record-svg-added-from-itag-valid_md": "**[](BIMI_RECORD#:glossary)** ajouté avec succès à partir de \n **[](ITAG#:glossary)** [svg-url]({url})",
@@ -2858,6 +2860,7 @@ let BimiRecordStatus = /*#__PURE__*/function (BimiRecordStatus) {
2858
2860
  BimiRecordStatus["CertInvalid"] = "certInvalid";
2859
2861
  BimiRecordStatus["CertForbidden"] = "certForbidden";
2860
2862
  BimiRecordStatus["NotVMC"] = "notVMC";
2863
+ BimiRecordStatus["UnknownError"] = "unknown-error";
2861
2864
  return BimiRecordStatus;
2862
2865
  }({});
2863
2866
 
@@ -3172,6 +3175,7 @@ const recordStatus = {
3172
3175
  NOT_VMC: BimiRecordStatus.NotVMC,
3173
3176
  CERTIFICATE_FORBIDDEN: BimiRecordStatus.CertForbidden,
3174
3177
  DECLINATION_TO_PUBLISH: BimiRecordStatus.DeclinationToPublish,
3178
+ UNKNOWN_ERROR: BimiRecordStatus.UnknownError,
3175
3179
  FAILED_TO_FETCH: undefined
3176
3180
  };
3177
3181
  function getCardType$2() {
@@ -3221,7 +3225,7 @@ function getCardType$2() {
3221
3225
  if (!dmarcCompliant) {
3222
3226
  return applyReportNewStatus(CARD_STATUS$1.DANGER);
3223
3227
  }
3224
- if (bimiRecordStatus === recordStatus.INVALID_RECORD_TXT || bimiRecordStatus === recordStatus.FAILED_TO_FETCH || bimiRecordStatus === recordStatus.CERT_INVALID || bimiRecordStatus === recordStatus.NOT_VMC || bimiRecordStatus === recordStatus.WITH_ERRORS || bimiRecordStatus === recordStatus.CERT_NOT_FOUND || bimiRecordStatus === recordStatus.CERTIFICATE_FORBIDDEN) {
3228
+ if (bimiRecordStatus === recordStatus.INVALID_RECORD_TXT || bimiRecordStatus === recordStatus.FAILED_TO_FETCH || bimiRecordStatus === recordStatus.CERT_INVALID || bimiRecordStatus === recordStatus.NOT_VMC || bimiRecordStatus === recordStatus.WITH_ERRORS || bimiRecordStatus === recordStatus.CERT_NOT_FOUND || bimiRecordStatus === recordStatus.CERTIFICATE_FORBIDDEN || bimiRecordStatus === recordStatus.UNKNOWN_ERROR) {
3225
3229
  return applyReportNewStatus(CARD_STATUS$1.DANGER);
3226
3230
  }
3227
3231
 
@@ -7176,6 +7180,13 @@ function getBimiItems(bimiRecordStatus, recordValidationErrors, reportNew, bimiR
7176
7180
  'data-testid': 'bimi-record-cert-forbidden'
7177
7181
  });
7178
7182
  break;
7183
+ case recordStatus.UNKNOWN_ERROR:
7184
+ items.push({
7185
+ text: t('card.bimi.record-unknown-error_md'),
7186
+ type: 'danger',
7187
+ 'data-testid': 'bimi-record-unknown-error'
7188
+ });
7189
+ break;
7179
7190
  case recordStatus.FAILED_TO_FETCH:
7180
7191
  items.push({
7181
7192
  text: t('card.bimi.could-not-fetch_md'),
@@ -7293,14 +7304,20 @@ function getSafeSVG() {
7293
7304
  imageUrl,
7294
7305
  bimiRecordStatus,
7295
7306
  svgErrors = [],
7296
- vmc
7307
+ vmc,
7308
+ logo
7297
7309
  } = bimi;
7298
7310
  const assertionMarkType = getAssertionMarkType(vmc);
7299
7311
  if (bimiRecordStatus === recordStatus.FAILED_TO_FETCH || bimiRecordStatus === recordStatus.NO_RECORD_TXT) {
7300
7312
  return null;
7301
7313
  }
7314
+
7315
+ // Check both svgErrors and logo.errors for validation issues
7316
+ const logoErrors = (logo === null || logo === void 0 ? void 0 : logo.errors) || [];
7317
+ const allErrors = [...svgErrors, ...logoErrors];
7318
+ const hasErrors = allErrors.length > 0;
7302
7319
  const imageAdded = Boolean(imageUrl);
7303
- const validSvg = svgErrors.length === 0;
7320
+ const validSvg = !hasErrors;
7304
7321
  let textItem;
7305
7322
  let svgItem;
7306
7323
  if (imageAdded) {
@@ -7311,12 +7328,15 @@ function getSafeSVG() {
7311
7328
  }),
7312
7329
  type: validSvg ? 'good' : 'danger'
7313
7330
  };
7314
- svgItem = {
7315
- text: /*#__PURE__*/React__default.createElement(SVGLogo$1, {
7316
- svgUrl: imageUrl
7317
- }),
7318
- type: 'image'
7319
- };
7331
+ // Only show logo thumbnail if there are no validation errors
7332
+ if (!hasErrors) {
7333
+ svgItem = {
7334
+ text: /*#__PURE__*/React__default.createElement(SVGLogo$1, {
7335
+ svgUrl: imageUrl
7336
+ }),
7337
+ type: 'image'
7338
+ };
7339
+ }
7320
7340
  } else {
7321
7341
  textItem = {
7322
7342
  text: t('card.bimi.svg-missing-title_md'),
@@ -7327,11 +7347,26 @@ function getSafeSVG() {
7327
7347
  type: 'image'
7328
7348
  };
7329
7349
  }
7330
- const items = [textItem, svgItem];
7350
+ const items = [textItem];
7351
+ if (svgItem) {
7352
+ items.push(svgItem);
7353
+ }
7354
+
7355
+ // Add specific logo.errors first (e.g., "URI scheme must be HTTPS")
7356
+ if (logoErrors.length > 0 && imageAdded) {
7357
+ logoErrors.forEach(error => {
7358
+ if (error.message) {
7359
+ items.push({
7360
+ text: error.message,
7361
+ type: 'danger'
7362
+ });
7363
+ }
7364
+ });
7365
+ }
7331
7366
 
7332
7367
  // Only show svgErrors when imageUrl exists - if imageUrl is null, the "Logo missing" message is sufficient
7333
7368
  // Raw API errors like "can't fetch SVG from null: Get 'null': unsupported protocol scheme" are confusing
7334
- if (!validSvg && imageAdded) {
7369
+ if (svgErrors.length > 0 && imageAdded) {
7335
7370
  svgErrors.forEach(msg => {
7336
7371
  const translationKey = `card.bimi.logoErrors.${msg}_md`;
7337
7372
  const translatedText = t(translationKey);