@redsift/products 12.5.0-muiv7 → 12.5.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.
|
@@ -1715,17 +1715,17 @@ function hasReportWarnings(dmarc) {
|
|
|
1715
1715
|
* On smaller viewports (≤765px) the boxes stack vertically.
|
|
1716
1716
|
*/
|
|
1717
1717
|
function DmarcSummaryBoxes(_ref2) {
|
|
1718
|
-
var _dmarc$policy$pct, _dmarc$policy2;
|
|
1718
|
+
var _dmarc$policy$pct, _dmarc$policy2, _dmarc$policy3, _dmarc$policy3$rua, _dmarc$raw2;
|
|
1719
1719
|
let {
|
|
1720
1720
|
dmarc,
|
|
1721
1721
|
isDomainAnalyzer = false,
|
|
1722
|
-
cardType,
|
|
1723
1722
|
t
|
|
1724
1723
|
} = _ref2;
|
|
1725
1724
|
const domainState = getDomainPolicyState(dmarc);
|
|
1726
1725
|
const emailState = isDomainAnalyzer ? null : getEmailComplianceState(dmarc);
|
|
1727
1726
|
const pct = (_dmarc$policy$pct = dmarc === null || dmarc === void 0 ? void 0 : (_dmarc$policy2 = dmarc.policy) === null || _dmarc$policy2 === void 0 ? void 0 : _dmarc$policy2.pct) !== null && _dmarc$policy$pct !== void 0 ? _dmarc$policy$pct : 100;
|
|
1728
1727
|
const reportWarnings = hasReportWarnings(dmarc);
|
|
1728
|
+
const hasRua = Boolean(dmarc === null || dmarc === void 0 ? void 0 : (_dmarc$policy3 = dmarc.policy) === null || _dmarc$policy3 === void 0 ? void 0 : (_dmarc$policy3$rua = _dmarc$policy3.rua) === null || _dmarc$policy3$rua === void 0 ? void 0 : _dmarc$policy3$rua.length) || /(?:^|;\s*)rua\s*=\s*mailto:/i.test((_dmarc$raw2 = dmarc === null || dmarc === void 0 ? void 0 : dmarc.raw) !== null && _dmarc$raw2 !== void 0 ? _dmarc$raw2 : '');
|
|
1729
1729
|
const getDomainBody = state => {
|
|
1730
1730
|
// When reject-full has report warnings, use a combined summary that replaces
|
|
1731
1731
|
// specific problem details with a concise impact statement.
|
|
@@ -1773,7 +1773,7 @@ function DmarcSummaryBoxes(_ref2) {
|
|
|
1773
1773
|
body = t('card.dmarc.summary-domain-no-record');
|
|
1774
1774
|
break;
|
|
1775
1775
|
case 'permerror':
|
|
1776
|
-
body =
|
|
1776
|
+
body = hasRua ? t('card.dmarc.summary-domain-permerror-rua-fallback') : t('card.dmarc.summary-domain-permerror');
|
|
1777
1777
|
break;
|
|
1778
1778
|
case 'temperror':
|
|
1779
1779
|
body = t('card.dmarc.summary-domain-temperror');
|
|
@@ -1819,7 +1819,7 @@ function DmarcSummaryBoxes(_ref2) {
|
|
|
1819
1819
|
}), /*#__PURE__*/React__default.createElement(SummaryBox, {
|
|
1820
1820
|
title: t('card.dmarc.summary-domain-title'),
|
|
1821
1821
|
body: getDomainBody(domainState),
|
|
1822
|
-
status: reportWarnings && DOMAIN_STATUS[domainState] === 'good' ? 'warning' : domainState === 'permerror' &&
|
|
1822
|
+
status: reportWarnings && DOMAIN_STATUS[domainState] === 'good' ? 'warning' : domainState === 'permerror' && hasRua ? 'warning' : DOMAIN_STATUS[domainState],
|
|
1823
1823
|
"data-testid": "dmarc-summary-domain"
|
|
1824
1824
|
}));
|
|
1825
1825
|
}
|