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.mjs
CHANGED
|
@@ -1799,10 +1799,12 @@ var QuestionGroup = ({
|
|
|
1799
1799
|
showPreview = false,
|
|
1800
1800
|
markQuestionAsDisplayed
|
|
1801
1801
|
}) => {
|
|
1802
|
+
var _a;
|
|
1802
1803
|
if (!questions || questions.length === 0) {
|
|
1803
1804
|
return null;
|
|
1804
1805
|
}
|
|
1805
1806
|
const firstQuestion = questions[0];
|
|
1807
|
+
const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
|
|
1806
1808
|
useEffect10(() => {
|
|
1807
1809
|
questions.forEach((question) => {
|
|
1808
1810
|
if (question.visible && !question.isDisplayed) {
|
|
@@ -1833,7 +1835,10 @@ var QuestionGroup = ({
|
|
|
1833
1835
|
"aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
|
|
1834
1836
|
children: [
|
|
1835
1837
|
legendLabel && /* @__PURE__ */ jsxs11("legend", { children: [
|
|
1836
|
-
/* @__PURE__ */
|
|
1838
|
+
/* @__PURE__ */ jsxs11("span", { className: "pts-legend", children: [
|
|
1839
|
+
legendLabel,
|
|
1840
|
+
groupMandatory && /* @__PURE__ */ jsx13("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
|
|
1841
|
+
] }),
|
|
1837
1842
|
firstQuestion.hasValidationError && /* @__PURE__ */ jsxs11("span", { className: "sr-only", children: [
|
|
1838
1843
|
"Valideringsfel. ",
|
|
1839
1844
|
firstQuestion.validationDefaultMessesege
|