optimized-react-component-library-xyz123 0.2.1 → 0.2.3
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.
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1877,10 +1877,12 @@ var QuestionGroup = ({
|
|
|
1877
1877
|
showPreview = false,
|
|
1878
1878
|
markQuestionAsDisplayed
|
|
1879
1879
|
}) => {
|
|
1880
|
+
var _a;
|
|
1880
1881
|
if (!questions || questions.length === 0) {
|
|
1881
1882
|
return null;
|
|
1882
1883
|
}
|
|
1883
1884
|
const firstQuestion = questions[0];
|
|
1885
|
+
const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
|
|
1884
1886
|
(0, import_react11.useEffect)(() => {
|
|
1885
1887
|
questions.forEach((question) => {
|
|
1886
1888
|
if (question.visible && !question.isDisplayed) {
|
|
@@ -1911,7 +1913,10 @@ var QuestionGroup = ({
|
|
|
1911
1913
|
"aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
|
|
1912
1914
|
children: [
|
|
1913
1915
|
legendLabel && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("legend", { children: [
|
|
1914
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.
|
|
1916
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "pts-legend", children: [
|
|
1917
|
+
legendLabel,
|
|
1918
|
+
groupMandatory && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
1919
|
+
] }),
|
|
1915
1920
|
firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "sr-only", children: [
|
|
1916
1921
|
"Valideringsfel. ",
|
|
1917
1922
|
firstQuestion.validationDefaultMessesege
|