@gamelearn/arcade-components 3.18.5 → 3.19.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.
@@ -58077,43 +58077,43 @@ function TestComponent({
58077
58077
  ] });
58078
58078
  }
58079
58079
  const OPTIONS = ["yes", "no"], LETTERS = ["A", "B"];
58080
- function ApplicableBox({ setSurveyData: l, survey: e, id: n, translate: t, changePage: s }) {
58081
- const o = (d) => {
58082
- l({ ...e, [n]: d }), s();
58080
+ function ApplicableBox({ setSurveyData: l, survey: e, id: n, translate: t }) {
58081
+ const s = (o) => {
58082
+ l({ ...e, [n]: o });
58083
58083
  };
58084
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--page__item", children: OPTIONS.map((d, f) => (
58084
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--page__item", children: OPTIONS.map((o, d) => (
58085
58085
  // TODO: convert this buttons to radiobutton and not agilize this question in order to A11y
58086
58086
  /* @__PURE__ */ jsxRuntimeExports.jsxs(
58087
58087
  "button",
58088
58088
  {
58089
- "data-testid": `applicablebox-${OPTIONS[f]}`,
58089
+ "data-testid": `applicablebox-${OPTIONS[d]}`,
58090
58090
  type: "button",
58091
- onClick: () => o(d),
58092
- className: `unset-button survey--response__item ${e[n] === d ? "selected" : ""}`,
58091
+ onClick: () => s(o),
58092
+ className: `unset-button survey--response__item ${e[n] === o ? "selected" : ""}`,
58093
58093
  children: [
58094
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--response__index", children: LETTERS[f] }),
58095
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--response__text", children: t(`survey.${d}`) })
58094
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--response__index", children: LETTERS[d] }),
58095
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--response__text", children: t(`survey.${o}`) })
58096
58096
  ]
58097
58097
  },
58098
- d
58098
+ o
58099
58099
  )
58100
58100
  )) });
58101
58101
  }
58102
58102
  const OPINION_OPTIONS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
58103
- function OpinionBox({ setSurveyData: l, survey: e, id: n, translate: t, changePage: s }) {
58104
- const o = (d) => {
58105
- l({ ...e, [n]: d }), s();
58103
+ function OpinionBox({ setSurveyData: l, survey: e, id: n, translate: t }) {
58104
+ const s = (o) => {
58105
+ l({ ...e, [n]: o });
58106
58106
  };
58107
58107
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "survey--page__item", "aria-label": "opinion box", children: [
58108
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--points", children: OPINION_OPTIONS.map((d) => /* @__PURE__ */ jsxRuntimeExports.jsx(
58108
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "survey--points", children: OPINION_OPTIONS.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsx(
58109
58109
  "button",
58110
58110
  {
58111
58111
  type: "button",
58112
- onClick: () => o(d),
58113
- className: `unset-button survey--points__item survey--points__item--colorized ${e[n] === d ? "selected" : ""}`,
58114
- children: d
58112
+ onClick: () => s(o),
58113
+ className: `unset-button survey--points__item survey--points__item--colorized ${e[n] === o ? "selected" : ""}`,
58114
+ children: o
58115
58115
  },
58116
- d
58116
+ o
58117
58117
  )) }),
58118
58118
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "survey--points__labels", children: [
58119
58119
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t("survey.bad") }),
@@ -58186,7 +58186,6 @@ function SurveyComponent({ emitEvent: l, soundActions: e }) {
58186
58186
  id: PAGES[s].id,
58187
58187
  survey: n,
58188
58188
  translate: u,
58189
- changePage: (T) => p(!1),
58190
58189
  literalLabel: u(`survey.question${s + 1}`, { ordinal: s + 1 })
58191
58190
  }
58192
58191
  )