optimized-react-component-library-xyz123 0.30.2 → 0.30.4

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.d.mts CHANGED
@@ -187,6 +187,7 @@ interface InfoTextStandardProps {
187
187
  activatedLanguage?: string;
188
188
  questionId: string;
189
189
  connectedToSelect?: boolean;
190
+ hideStepperButtons?: boolean;
190
191
  }
191
192
 
192
193
  declare const InfoTextStandard: FC<InfoTextStandardProps>;
@@ -668,7 +669,7 @@ declare const useCookieConsent: ({ cookieName, choiceKey, expiryYears, onConsent
668
669
  };
669
670
 
670
671
  interface QuestionRendererProps {
671
- question: any;
672
+ question: IQuestion;
672
673
  handleQuestionInputChange: (question: any, event: React$1.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
673
674
  activatedLanguage?: string;
674
675
  showPreview?: boolean;
package/dist/index.d.ts CHANGED
@@ -187,6 +187,7 @@ interface InfoTextStandardProps {
187
187
  activatedLanguage?: string;
188
188
  questionId: string;
189
189
  connectedToSelect?: boolean;
190
+ hideStepperButtons?: boolean;
190
191
  }
191
192
 
192
193
  declare const InfoTextStandard: FC<InfoTextStandardProps>;
@@ -668,7 +669,7 @@ declare const useCookieConsent: ({ cookieName, choiceKey, expiryYears, onConsent
668
669
  };
669
670
 
670
671
  interface QuestionRendererProps {
671
- question: any;
672
+ question: IQuestion;
672
673
  handleQuestionInputChange: (question: any, event: React$1.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
673
674
  activatedLanguage?: string;
674
675
  showPreview?: boolean;
package/dist/index.js CHANGED
@@ -93,9 +93,10 @@ var InfoTextStandard = ({
93
93
  selectedValue,
94
94
  questionId,
95
95
  activatedLanguage,
96
- connectedToSelect = false
96
+ connectedToSelect = false,
97
+ hideStepperButtons = false
97
98
  }) => {
98
- const infoTextId = "infotext" + questionId;
99
+ const infoTextId = "infotext-" + questionId;
99
100
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
101
  "div",
101
102
  {
@@ -136,9 +137,7 @@ var InputRadio = ({
136
137
  const e = { target: { value: event.target.value } };
137
138
  handleQuestionInputChange(e, question);
138
139
  };
139
- const languageObj = question.languageSupport[0];
140
140
  const optionsInfoText = getInfoTextConnectionList(question.languageSupport, activatedLanguage);
141
- console.log(optionsInfoText);
142
141
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
143
142
  !showPreview && question.visible && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "pts-root-question pts-radioMultiple-container", id: questionId, children: [
144
143
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
@@ -179,10 +178,11 @@ var InputRadio = ({
179
178
  optionsInfoText.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
180
179
  InfoTextStandard_default,
181
180
  {
182
- infoText: (_c = (_b = optionsInfoText.find((op) => op.selectedValue === question.answer)) == null ? void 0 : _b.infoText) != null ? _c : "",
181
+ infoText: (_c = (_b = optionsInfoText.find((optionI) => optionI.selectedValue === question.answer)) == null ? void 0 : _b.infoText) != null ? _c : "",
183
182
  selectedValue: (_d = question.answer) != null ? _d : "",
184
183
  questionId,
185
- activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv"
184
+ activatedLanguage: activatedLanguage != null ? activatedLanguage : "sv",
185
+ connectedToSelect: true
186
186
  }
187
187
  )
188
188
  ] }),
@@ -1955,6 +1955,7 @@ var QuestionRenderer = ({
1955
1955
  activatedLanguage = "sv",
1956
1956
  showPreview = false
1957
1957
  }) => {
1958
+ var _a, _b, _c;
1958
1959
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
1959
1960
  question.questionType === "Radio" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1960
1961
  RadioMultipleStandard_default,
@@ -2021,9 +2022,10 @@ var QuestionRenderer = ({
2021
2022
  question.questionType === "InfoText" && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2022
2023
  InfoTextStandard_default,
2023
2024
  {
2024
- infoText: question.aboutText,
2025
+ infoText: (_a = question == null ? void 0 : question.aboutText) != null ? _a : "",
2025
2026
  selectedValue: "",
2026
- questionId: question.id
2027
+ questionId: (_c = (_b = question == null ? void 0 : question.id) == null ? void 0 : _b.toString()) != null ? _c : "",
2028
+ activatedLanguage
2027
2029
  }
2028
2030
  )
2029
2031
  ] });