@pie-element/likert 4.1.1 → 4.1.2-next.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.
Files changed (182) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/choiceGenerator.d.ts +13 -0
  4. package/dist/author/choiceGenerator.js +255 -0
  5. package/dist/author/defaults.d.ts +102 -0
  6. package/dist/author/defaults.js +60 -0
  7. package/dist/author/index.d.ts +31 -0
  8. package/dist/author/index.js +73 -0
  9. package/dist/author/likertEntities.d.ts +25 -0
  10. package/dist/author/likertEntities.js +18 -0
  11. package/dist/author/main.d.ts +27 -0
  12. package/dist/author/main.js +298 -0
  13. package/dist/browser/Radio-CAjl01LA.js +9438 -0
  14. package/dist/browser/Radio-CAjl01LA.js.map +1 -0
  15. package/dist/browser/author/index.js +40609 -0
  16. package/dist/browser/author/index.js.map +1 -0
  17. package/dist/browser/controller/index.js +51 -0
  18. package/dist/browser/controller/index.js.map +1 -0
  19. package/dist/browser/delivery/index.js +219 -0
  20. package/dist/browser/delivery/index.js.map +1 -0
  21. package/dist/browser/likert.css +2 -0
  22. package/dist/controller/defaults.d.ts +19 -0
  23. package/dist/controller/defaults.js +13 -0
  24. package/dist/controller/index.d.ts +19 -0
  25. package/dist/controller/index.js +41 -0
  26. package/dist/delivery/choice-input.d.ts +27 -0
  27. package/dist/delivery/choice-input.js +59 -0
  28. package/dist/delivery/index.d.ts +19 -0
  29. package/dist/delivery/index.js +44 -0
  30. package/dist/delivery/likert.d.ts +26 -0
  31. package/dist/delivery/likert.js +70 -0
  32. package/dist/delivery/likertEntities.d.ts +12 -0
  33. package/dist/delivery/likertEntities.js +7 -0
  34. package/dist/delivery/main.d.ts +23 -0
  35. package/dist/delivery/main.js +37 -0
  36. package/dist/delivery/session-updater.d.ts +9 -0
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.iife.d.ts +8 -0
  39. package/dist/index.iife.js +145 -0
  40. package/dist/index.js +2 -0
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +8 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +19 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +31 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +15 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +6 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +8 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +14 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +8 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +8 -0
  138. package/package.json +77 -19
  139. package/CHANGELOG.json +0 -1
  140. package/CHANGELOG.md +0 -1455
  141. package/LICENSE.md +0 -5
  142. package/configure/CHANGELOG.json +0 -1
  143. package/configure/CHANGELOG.md +0 -1373
  144. package/configure/lib/choiceGenerator.js +0 -219
  145. package/configure/lib/choiceGenerator.js.map +0 -1
  146. package/configure/lib/defaults.js +0 -100
  147. package/configure/lib/defaults.js.map +0 -1
  148. package/configure/lib/index.js +0 -106
  149. package/configure/lib/index.js.map +0 -1
  150. package/configure/lib/likertEntities.js +0 -24
  151. package/configure/lib/likertEntities.js.map +0 -1
  152. package/configure/lib/main.js +0 -388
  153. package/configure/lib/main.js.map +0 -1
  154. package/configure/package.json +0 -27
  155. package/controller/CHANGELOG.json +0 -1
  156. package/controller/CHANGELOG.md +0 -90
  157. package/controller/lib/defaults.js +0 -17
  158. package/controller/lib/defaults.js.map +0 -1
  159. package/controller/lib/index.js +0 -81
  160. package/controller/lib/index.js.map +0 -1
  161. package/controller/package.json +0 -17
  162. package/docs/config-schema.json +0 -2011
  163. package/docs/config-schema.json.md +0 -1487
  164. package/docs/demo/config.js +0 -8
  165. package/docs/demo/generate.js +0 -22
  166. package/docs/demo/index.html +0 -1
  167. package/docs/demo/session.js +0 -6
  168. package/docs/pie-schema.json +0 -966
  169. package/docs/pie-schema.json.md +0 -711
  170. package/lib/choice-input.js +0 -90
  171. package/lib/choice-input.js.map +0 -1
  172. package/lib/index.js +0 -64
  173. package/lib/index.js.map +0 -1
  174. package/lib/likert.js +0 -97
  175. package/lib/likert.js.map +0 -1
  176. package/lib/likertEntities.js +0 -11
  177. package/lib/likertEntities.js.map +0 -1
  178. package/lib/main.js +0 -42
  179. package/lib/main.js.map +0 -1
  180. package/lib/session-updater.js +0 -15
  181. package/lib/session-updater.js.map +0 -1
  182. package/readme.md +0 -55
@@ -0,0 +1,298 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js";
2
+ import { LIKERT_ORIENTATION as t, LIKERT_SCALE as n, LIKERT_TYPE as r } from "./likertEntities.js";
3
+ import i from "./choiceGenerator.js";
4
+ import a from "react";
5
+ import o from "prop-types";
6
+ import { color as s } from "@pie-lib/render-ui";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import u from "@mui/material/FormControlLabel";
9
+ import { styled as d } from "@mui/material/styles";
10
+ import f from "@mui/material/Radio";
11
+ import p from "@pie-lib/editable-html-tip-tap";
12
+ import m from "@mui/material/RadioGroup";
13
+ import { InputContainer as h, NumberTextField as g, layout as _, settings as v } from "@pie-lib/config-ui";
14
+ //#region src/author/main.tsx
15
+ var { Panel: y, toggle: b, radio: x } = v, S = d(h)(({ theme: e }) => ({
16
+ width: "100%",
17
+ paddingTop: e.spacing(2),
18
+ marginBottom: e.spacing(2)
19
+ })), C = d("div")({
20
+ display: "flex",
21
+ flexDirection: "column"
22
+ }), w = d("p")(({ theme: e }) => ({
23
+ color: e.palette.grey[400],
24
+ fontSize: e.typography.fontSize - 2
25
+ })), T = d("div")(({ theme: e }) => ({
26
+ display: "flex",
27
+ width: "100%",
28
+ alignItems: "flex-start",
29
+ marginBottom: e.spacing(2)
30
+ })), E = d("div")(({ theme: e }) => ({
31
+ display: "flex",
32
+ width: "100%",
33
+ justifyContent: "space-around",
34
+ marginBottom: e.spacing(2.5)
35
+ })), D = d(h)({
36
+ width: "calc(100% - 200px)",
37
+ marginRight: 0
38
+ }), O = d("p")(({ theme: e }) => ({
39
+ color: e.palette.error.main,
40
+ fontSize: e.typography.fontSize - 2
41
+ })), k = d(g)({ width: "100%" }), A = d("div")({
42
+ display: "flex",
43
+ flexDirection: "row"
44
+ }), j = d("div")(({ theme: e }) => ({
45
+ paddingLeft: e.spacing(2.5),
46
+ width: "150px"
47
+ })), M = d(p)(({ theme: e }) => ({ paddingTop: e.spacing(2) })), N = d("span")(({ theme: e }) => ({
48
+ width: "30px",
49
+ paddingTop: e.spacing(4)
50
+ })), P = d("div")(({ theme: e }) => ({
51
+ fontSize: e.typography.fontSize - 2,
52
+ color: e.palette.error.main,
53
+ paddingTop: e.spacing(1)
54
+ })), F = d(f)({ color: `${s.tertiary()} !important` }), I = (e) => {
55
+ let { model: n, onChangeModel: r } = e;
56
+ return /* @__PURE__ */ l(C, { children: [/* @__PURE__ */ c(w, { children: "Likert Orientation" }), /* @__PURE__ */ l(m, {
57
+ "aria-label": "likertOrientation",
58
+ name: "likertOrientation",
59
+ value: n.likertOrientation,
60
+ onChange: (e) => {
61
+ let t = e.target.value;
62
+ r({
63
+ ...n,
64
+ likertOrientation: t
65
+ });
66
+ },
67
+ children: [/* @__PURE__ */ c(u, {
68
+ value: t.horizontal,
69
+ control: /* @__PURE__ */ c(F, {}),
70
+ label: "Horizontal"
71
+ }), /* @__PURE__ */ c(u, {
72
+ value: t.vertical,
73
+ control: /* @__PURE__ */ c(F, {}),
74
+ label: "Vertical"
75
+ })]
76
+ })] });
77
+ }, L = (e) => {
78
+ let { model: t, onChangeModel: r } = e;
79
+ return /* @__PURE__ */ l(C, { children: [/* @__PURE__ */ c(w, { children: "Likert Scale" }), /* @__PURE__ */ l(m, {
80
+ "aria-label": "likertScale",
81
+ name: "likertScale",
82
+ value: t.likertScale,
83
+ onChange: (e) => {
84
+ let n = e.target.value;
85
+ r({
86
+ ...t,
87
+ likertScale: n,
88
+ choices: i(n, t.likertType)
89
+ });
90
+ },
91
+ children: [
92
+ /* @__PURE__ */ c(u, {
93
+ value: n.likert3,
94
+ control: /* @__PURE__ */ c(F, {}),
95
+ label: "Likert 3"
96
+ }),
97
+ /* @__PURE__ */ c(u, {
98
+ value: n.likert5,
99
+ control: /* @__PURE__ */ c(F, {}),
100
+ label: "Likert 5"
101
+ }),
102
+ /* @__PURE__ */ c(u, {
103
+ value: n.likert7,
104
+ control: /* @__PURE__ */ c(F, {}),
105
+ label: "Likert 7"
106
+ })
107
+ ]
108
+ })] });
109
+ }, R = (e) => {
110
+ let { model: t, onChangeModel: n } = e, a = (e) => {
111
+ let r = e.target.value;
112
+ n({
113
+ ...t,
114
+ likertType: r,
115
+ choices: i(t.likertScale, r)
116
+ });
117
+ };
118
+ return /* @__PURE__ */ l(C, { children: [/* @__PURE__ */ c(w, { children: "Label Type" }), /* @__PURE__ */ l(A, { children: [/* @__PURE__ */ l(m, {
119
+ "aria-label": "likertLabelType",
120
+ name: "likertLabelType",
121
+ value: t.likertType,
122
+ onChange: a,
123
+ children: [
124
+ /* @__PURE__ */ c(u, {
125
+ value: r.agreement,
126
+ control: /* @__PURE__ */ c(F, {}),
127
+ label: "Agreement"
128
+ }),
129
+ /* @__PURE__ */ c(u, {
130
+ value: r.frequency,
131
+ control: /* @__PURE__ */ c(F, {}),
132
+ label: "Frequency"
133
+ }),
134
+ /* @__PURE__ */ c(u, {
135
+ value: r.yesNo,
136
+ control: /* @__PURE__ */ c(F, {}),
137
+ label: "Yes/No"
138
+ })
139
+ ]
140
+ }), /* @__PURE__ */ l(m, {
141
+ "aria-label": "likertLabelType",
142
+ name: "likertLabelType",
143
+ value: t.likertType,
144
+ onChange: a,
145
+ children: [
146
+ /* @__PURE__ */ c(u, {
147
+ value: r.importance,
148
+ control: /* @__PURE__ */ c(F, {}),
149
+ label: "Importance"
150
+ }),
151
+ /* @__PURE__ */ c(u, {
152
+ value: r.likelihood,
153
+ control: /* @__PURE__ */ c(F, {}),
154
+ label: "Likelihood"
155
+ }),
156
+ /* @__PURE__ */ c(u, {
157
+ value: r.like,
158
+ control: /* @__PURE__ */ c(F, {}),
159
+ label: "Like"
160
+ })
161
+ ]
162
+ })] })] });
163
+ }, z = (e) => e.choices.reduce((e, t) => {
164
+ let n = { ...e }, r = parseInt(t.value);
165
+ return n[r] || (n[r] = 0), {
166
+ ...n,
167
+ [r]: n[r] + 1
168
+ };
169
+ }, {}), B = (e) => {
170
+ let { configuration: t, imageSupport: n, model: r, onChangeModel: i, onChoiceChanged: a, onConfigurationChanged: o, onPromptChanged: s, onTeacherInstructionsChanged: u, uploadSoundSupport: d } = e, { contentDimensions: f = {}, prompt: m = {}, scoringType: h = {}, settingsPanelDisabled: g, spellCheck: v = {}, teacherInstructions: C = {}, baseInputConfiguration: w = {}, likertChoice: A = {} } = t || {}, { errors: F = {}, extraCSSRules: B, spellCheckEnabled: V, teacherInstructionsEnabled: H } = r || {}, { prompt: U, teacherInstructions: W } = F, G = z(r), K = {
171
+ teacherInstructionsEnabled: C.settings && b(C.label),
172
+ spellCheckEnabled: v.settings && b(v.label),
173
+ scoringType: h.settings && x(h.label, ["auto", "rubric"])
174
+ }, q = (e = {}) => Object.assign({ ...w }, e || {});
175
+ return /* @__PURE__ */ l(_.ConfigLayout, {
176
+ extraCSSRules: B,
177
+ dimensions: f,
178
+ hideSettings: g,
179
+ settings: /* @__PURE__ */ c(y, {
180
+ model: r,
181
+ onChangeModel: i,
182
+ configuration: t,
183
+ onChangeConfiguration: o,
184
+ groups: { Properties: K }
185
+ }),
186
+ children: [
187
+ H && /* @__PURE__ */ l(S, {
188
+ label: C.label,
189
+ children: [/* @__PURE__ */ c(p, {
190
+ markup: r.teacherInstructions || "",
191
+ onChange: u,
192
+ imageSupport: n,
193
+ nonEmpty: !1,
194
+ error: W,
195
+ spellCheck: V,
196
+ uploadSoundSupport: d,
197
+ pluginProps: q(C?.inputConfiguration)
198
+ }), W && /* @__PURE__ */ c(P, { children: W })]
199
+ }),
200
+ /* @__PURE__ */ l(S, {
201
+ label: m.label,
202
+ children: [/* @__PURE__ */ c(p, {
203
+ markup: r.prompt,
204
+ onChange: s,
205
+ imageSupport: n,
206
+ nonEmpty: !1,
207
+ error: U,
208
+ spellCheck: V,
209
+ disableUnderline: !0,
210
+ uploadSoundSupport: d,
211
+ pluginProps: q(m?.inputConfiguration)
212
+ }), U && /* @__PURE__ */ c(P, { children: U })]
213
+ }),
214
+ /* @__PURE__ */ l(E, { children: [
215
+ /* @__PURE__ */ c(L, {
216
+ model: r,
217
+ onChangeModel: i
218
+ }),
219
+ /* @__PURE__ */ c(R, {
220
+ model: r,
221
+ onChangeModel: i
222
+ }),
223
+ /* @__PURE__ */ c(I, {
224
+ model: r,
225
+ onChangeModel: i
226
+ })
227
+ ] }),
228
+ r.choices.map((e, t) => /* @__PURE__ */ l(T, { children: [
229
+ /* @__PURE__ */ l(N, { children: [t + 1, "."] }),
230
+ /* @__PURE__ */ c(D, {
231
+ label: "Likert Label",
232
+ children: /* @__PURE__ */ c(M, {
233
+ markup: e.label || "",
234
+ onChange: (n) => a(t, {
235
+ ...e,
236
+ label: n
237
+ }),
238
+ imageSupport: n,
239
+ spellCheck: V,
240
+ uploadSoundSupport: d,
241
+ pluginProps: q(A?.inputConfiguration)
242
+ })
243
+ }, `likert-label-${t}`),
244
+ /* @__PURE__ */ l(j, { children: [/* @__PURE__ */ c(k, {
245
+ label: "Likert Value",
246
+ value: e.value,
247
+ max: 100,
248
+ min: -100,
249
+ onChange: (n, r) => {
250
+ a(t, {
251
+ ...e,
252
+ value: r
253
+ });
254
+ },
255
+ imageSupport: n
256
+ }), G[e.value] && G[e.value] > 1 && /* @__PURE__ */ c(O, { children: "Value should be unique" })] })
257
+ ] }, `choice-${t}`))
258
+ ]
259
+ });
260
+ }, V = class extends a.Component {
261
+ static propTypes = {
262
+ model: o.object.isRequired,
263
+ disableSidePanel: o.bool,
264
+ onModelChanged: o.func.isRequired,
265
+ onConfigurationChanged: o.func.isRequired,
266
+ imageSupport: o.shape({
267
+ add: o.func.isRequired,
268
+ delete: o.func.isRequired
269
+ })
270
+ };
271
+ onChoiceChanged = (t, n) => {
272
+ let { model: r, onModelChanged: i } = this.props;
273
+ r.choices = r.choices.map((t) => e({}, t)), r.choices.splice(t, 1, n), i(r);
274
+ };
275
+ onPromptChanged = (e) => {
276
+ this.props.onModelChanged({
277
+ ...this.props.model,
278
+ prompt: e
279
+ });
280
+ };
281
+ onTeacherInstructionsChanged = (e) => {
282
+ this.props.onModelChanged({
283
+ ...this.props.model,
284
+ teacherInstructions: e
285
+ });
286
+ };
287
+ render() {
288
+ return /* @__PURE__ */ c(B, {
289
+ ...this.props,
290
+ onChangeModel: this.props.onModelChanged,
291
+ onChoiceChanged: this.onChoiceChanged,
292
+ onPromptChanged: this.onPromptChanged,
293
+ onTeacherInstructionsChanged: this.onTeacherInstructionsChanged
294
+ });
295
+ }
296
+ };
297
+ //#endregion
298
+ export { V as default };