@holmdigital/engine 3.3.5 → 3.3.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.
|
@@ -260,7 +260,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
260
260
|
return false;
|
|
261
261
|
}
|
|
262
262
|
function getEngineVersion() {
|
|
263
|
-
return "3.3.
|
|
263
|
+
return "3.3.7";
|
|
264
264
|
}
|
|
265
265
|
function getStandardsVersion() {
|
|
266
266
|
try {
|
|
@@ -894,7 +894,7 @@ function isBadgeWithheldByRobustness(noScript) {
|
|
|
894
894
|
import React from "react";
|
|
895
895
|
import { renderToStaticMarkup } from "react-dom/server";
|
|
896
896
|
import { AccessibilityStatement } from "@holmdigital/components";
|
|
897
|
-
import { getEnforcementBody,
|
|
897
|
+
import { getEnforcementBody, getNationalLawForSector, getNationalLaws } from "@holmdigital/standards";
|
|
898
898
|
import fs from "fs/promises";
|
|
899
899
|
import path from "path";
|
|
900
900
|
var EVALUATION_METHOD = {
|
|
@@ -969,12 +969,13 @@ var NATIONAL_LAW_FALLBACK = {
|
|
|
969
969
|
pl: "obowi\u0105zuj\u0105ce wymagania dost\u0119pno\u015Bci"
|
|
970
970
|
};
|
|
971
971
|
function resolveNationalLawReference(country, sector, lang = "en") {
|
|
972
|
+
const inForce = (law2) => !!law2 && law2.inForce !== false;
|
|
972
973
|
if (country === "AU") {
|
|
973
|
-
const ddaLaw =
|
|
974
|
+
const ddaLaw = getNationalLaws("AU").find((l) => l.euFramework === "DDA" && inForce(l));
|
|
974
975
|
return ddaLaw ? `${ddaLaw.fullName}` : "Disability Discrimination Act 1992 (Cth)";
|
|
975
976
|
}
|
|
976
977
|
if (country === "US") {
|
|
977
|
-
const usLaws = getNationalLaws("US");
|
|
978
|
+
const usLaws = getNationalLaws("US").filter(inForce);
|
|
978
979
|
const adaLaw = usLaws.find((l) => l.euFramework === "ADA" && l.scope === sector);
|
|
979
980
|
if (adaLaw) {
|
|
980
981
|
if (sector === "public") {
|
|
@@ -985,7 +986,7 @@ function resolveNationalLawReference(country, sector, lang = "en") {
|
|
|
985
986
|
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
986
987
|
}
|
|
987
988
|
}
|
|
988
|
-
const law =
|
|
989
|
+
const law = getNationalLawForSector(country, sector);
|
|
989
990
|
if (law) return `${law.fullName} (${law.law})`;
|
|
990
991
|
const langKey = lang.split("-")[0];
|
|
991
992
|
return NATIONAL_LAW_FALLBACK[langKey] ?? NATIONAL_LAW_FALLBACK.en;
|
|
@@ -1180,8 +1181,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
1180
1181
|
"{<third party>}": props.generatorTool?.name || "HolmDigital Engine",
|
|
1181
1182
|
"{<enforcement_body>}": (() => {
|
|
1182
1183
|
if (country === "US") {
|
|
1183
|
-
const adaLaw = getNationalLaws("US").find((l) => l.euFramework === "ADA" && l.scope === sector);
|
|
1184
|
-
if (adaLaw) return adaLaw.enforcement.authorityName;
|
|
1184
|
+
const adaLaw = getNationalLaws("US").find((l) => l.euFramework === "ADA" && l.scope === sector && l.inForce !== false);
|
|
1185
|
+
if (adaLaw?.enforcement) return adaLaw.enforcement.authorityName;
|
|
1185
1186
|
}
|
|
1186
1187
|
return getEnforcementBody(country, sector);
|
|
1187
1188
|
})(),
|
package/dist/cli/index.js
CHANGED
|
@@ -1620,7 +1620,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
1620
1620
|
return false;
|
|
1621
1621
|
}
|
|
1622
1622
|
function getEngineVersion() {
|
|
1623
|
-
return "3.3.
|
|
1623
|
+
return "3.3.7";
|
|
1624
1624
|
}
|
|
1625
1625
|
function getStandardsVersion() {
|
|
1626
1626
|
try {
|
|
@@ -3194,12 +3194,13 @@ var NATIONAL_LAW_FALLBACK = {
|
|
|
3194
3194
|
pl: "obowi\u0105zuj\u0105ce wymagania dost\u0119pno\u015Bci"
|
|
3195
3195
|
};
|
|
3196
3196
|
function resolveNationalLawReference(country, sector, lang = "en") {
|
|
3197
|
+
const inForce = (law2) => !!law2 && law2.inForce !== false;
|
|
3197
3198
|
if (country === "AU") {
|
|
3198
|
-
const ddaLaw = (0, import_standards3.
|
|
3199
|
+
const ddaLaw = (0, import_standards3.getNationalLaws)("AU").find((l) => l.euFramework === "DDA" && inForce(l));
|
|
3199
3200
|
return ddaLaw ? `${ddaLaw.fullName}` : "Disability Discrimination Act 1992 (Cth)";
|
|
3200
3201
|
}
|
|
3201
3202
|
if (country === "US") {
|
|
3202
|
-
const usLaws = (0, import_standards3.getNationalLaws)("US");
|
|
3203
|
+
const usLaws = (0, import_standards3.getNationalLaws)("US").filter(inForce);
|
|
3203
3204
|
const adaLaw = usLaws.find((l) => l.euFramework === "ADA" && l.scope === sector);
|
|
3204
3205
|
if (adaLaw) {
|
|
3205
3206
|
if (sector === "public") {
|
|
@@ -3210,7 +3211,7 @@ function resolveNationalLawReference(country, sector, lang = "en") {
|
|
|
3210
3211
|
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
3211
3212
|
}
|
|
3212
3213
|
}
|
|
3213
|
-
const law = (0, import_standards3.
|
|
3214
|
+
const law = (0, import_standards3.getNationalLawForSector)(country, sector);
|
|
3214
3215
|
if (law) return `${law.fullName} (${law.law})`;
|
|
3215
3216
|
const langKey = lang.split("-")[0];
|
|
3216
3217
|
return NATIONAL_LAW_FALLBACK[langKey] ?? NATIONAL_LAW_FALLBACK.en;
|
|
@@ -3405,8 +3406,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
3405
3406
|
"{<third party>}": props.generatorTool?.name || "HolmDigital Engine",
|
|
3406
3407
|
"{<enforcement_body>}": (() => {
|
|
3407
3408
|
if (country === "US") {
|
|
3408
|
-
const adaLaw = (0, import_standards3.getNationalLaws)("US").find((l) => l.euFramework === "ADA" && l.scope === sector);
|
|
3409
|
-
if (adaLaw) return adaLaw.enforcement.authorityName;
|
|
3409
|
+
const adaLaw = (0, import_standards3.getNationalLaws)("US").find((l) => l.euFramework === "ADA" && l.scope === sector && l.inForce !== false);
|
|
3410
|
+
if (adaLaw?.enforcement) return adaLaw.enforcement.authorityName;
|
|
3410
3411
|
}
|
|
3411
3412
|
return (0, import_standards3.getEnforcementBody)(country, sector);
|
|
3412
3413
|
})(),
|
package/dist/cli/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1228,7 +1228,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
1228
1228
|
return false;
|
|
1229
1229
|
}
|
|
1230
1230
|
function getEngineVersion() {
|
|
1231
|
-
return "3.3.
|
|
1231
|
+
return "3.3.7";
|
|
1232
1232
|
}
|
|
1233
1233
|
function getStandardsVersion() {
|
|
1234
1234
|
try {
|
|
@@ -1940,12 +1940,13 @@ var NATIONAL_LAW_FALLBACK = {
|
|
|
1940
1940
|
pl: "obowi\u0105zuj\u0105ce wymagania dost\u0119pno\u015Bci"
|
|
1941
1941
|
};
|
|
1942
1942
|
function resolveNationalLawReference(country, sector, lang = "en") {
|
|
1943
|
+
const inForce = (law2) => !!law2 && law2.inForce !== false;
|
|
1943
1944
|
if (country === "AU") {
|
|
1944
|
-
const ddaLaw = (0, import_standards.
|
|
1945
|
+
const ddaLaw = (0, import_standards.getNationalLaws)("AU").find((l) => l.euFramework === "DDA" && inForce(l));
|
|
1945
1946
|
return ddaLaw ? `${ddaLaw.fullName}` : "Disability Discrimination Act 1992 (Cth)";
|
|
1946
1947
|
}
|
|
1947
1948
|
if (country === "US") {
|
|
1948
|
-
const usLaws = (0, import_standards.getNationalLaws)("US");
|
|
1949
|
+
const usLaws = (0, import_standards.getNationalLaws)("US").filter(inForce);
|
|
1949
1950
|
const adaLaw = usLaws.find((l) => l.euFramework === "ADA" && l.scope === sector);
|
|
1950
1951
|
if (adaLaw) {
|
|
1951
1952
|
if (sector === "public") {
|
|
@@ -1956,7 +1957,7 @@ function resolveNationalLawReference(country, sector, lang = "en") {
|
|
|
1956
1957
|
return hhs504 ? `${adaLaw.fullName} (${adaLaw.law}) & ${hhs504.fullName} (${hhs504.law})` : `${adaLaw.fullName} (${adaLaw.law})`;
|
|
1957
1958
|
}
|
|
1958
1959
|
}
|
|
1959
|
-
const law = (0, import_standards.
|
|
1960
|
+
const law = (0, import_standards.getNationalLawForSector)(country, sector);
|
|
1960
1961
|
if (law) return `${law.fullName} (${law.law})`;
|
|
1961
1962
|
const langKey = lang.split("-")[0];
|
|
1962
1963
|
return NATIONAL_LAW_FALLBACK[langKey] ?? NATIONAL_LAW_FALLBACK.en;
|
|
@@ -2151,8 +2152,8 @@ async function generateStatementContent(result, lang = "en", format = "html", me
|
|
|
2151
2152
|
"{<third party>}": props.generatorTool?.name || "HolmDigital Engine",
|
|
2152
2153
|
"{<enforcement_body>}": (() => {
|
|
2153
2154
|
if (country === "US") {
|
|
2154
|
-
const adaLaw = (0, import_standards.getNationalLaws)("US").find((l) => l.euFramework === "ADA" && l.scope === sector);
|
|
2155
|
-
if (adaLaw) return adaLaw.enforcement.authorityName;
|
|
2155
|
+
const adaLaw = (0, import_standards.getNationalLaws)("US").find((l) => l.euFramework === "ADA" && l.scope === sector && l.inForce !== false);
|
|
2156
|
+
if (adaLaw?.enforcement) return adaLaw.enforcement.authorityName;
|
|
2156
2157
|
}
|
|
2157
2158
|
return (0, import_standards.getEnforcementBody)(country, sector);
|
|
2158
2159
|
})(),
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/engine",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"node": ">=22.22.0"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@holmdigital/components": "^4.0.
|
|
89
|
-
"@holmdigital/standards": "^
|
|
88
|
+
"@holmdigital/components": "^4.0.1",
|
|
89
|
+
"@holmdigital/standards": "^4.0.0",
|
|
90
90
|
"axe-core": "^4.13.0",
|
|
91
91
|
"chalk": "^6.0.0",
|
|
92
92
|
"commander": "^15.0.0",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/cosmiconfig": "^6.0.3",
|
|
103
|
-
"@types/node": "^26.
|
|
104
|
-
"@types/react": "^
|
|
105
|
-
"@types/react-dom": "^
|
|
103
|
+
"@types/node": "^26.4.1",
|
|
104
|
+
"@types/react": "^19.2.18",
|
|
105
|
+
"@types/react-dom": "^19.2.7",
|
|
106
106
|
"@types/ws": "^8.5.13",
|
|
107
107
|
"tsup": "^8.3.5",
|
|
108
108
|
"typescript": "^6.0.3",
|