@pie-element/likert 4.1.1-next.0 → 4.1.1-next.29

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 (171) hide show
  1. package/CHANGELOG.json +1 -0
  2. package/CHANGELOG.md +1451 -0
  3. package/LICENSE.md +5 -0
  4. package/configure/CHANGELOG.json +1 -0
  5. package/configure/CHANGELOG.md +1369 -0
  6. package/configure/lib/choiceGenerator.js +219 -0
  7. package/configure/lib/choiceGenerator.js.map +1 -0
  8. package/configure/lib/defaults.js +100 -0
  9. package/configure/lib/defaults.js.map +1 -0
  10. package/configure/lib/index.js +106 -0
  11. package/configure/lib/index.js.map +1 -0
  12. package/configure/lib/likertEntities.js +24 -0
  13. package/configure/lib/likertEntities.js.map +1 -0
  14. package/configure/lib/main.js +388 -0
  15. package/configure/lib/main.js.map +1 -0
  16. package/configure/package.json +27 -0
  17. package/controller/CHANGELOG.json +1 -0
  18. package/controller/CHANGELOG.md +86 -0
  19. package/controller/lib/defaults.js +17 -0
  20. package/controller/lib/defaults.js.map +1 -0
  21. package/controller/lib/index.js +81 -0
  22. package/controller/lib/index.js.map +1 -0
  23. package/controller/package.json +17 -0
  24. package/docs/config-schema.json +2011 -0
  25. package/docs/config-schema.json.md +1487 -0
  26. package/docs/demo/config.js +8 -0
  27. package/docs/demo/generate.js +22 -0
  28. package/docs/demo/index.html +1 -0
  29. package/docs/demo/session.js +6 -0
  30. package/docs/pie-schema.json +966 -0
  31. package/docs/pie-schema.json.md +711 -0
  32. package/lib/choice-input.js +90 -0
  33. package/lib/choice-input.js.map +1 -0
  34. package/lib/index.js +64 -0
  35. package/lib/index.js.map +1 -0
  36. package/lib/likert.js +97 -0
  37. package/lib/likert.js.map +1 -0
  38. package/lib/likertEntities.js +11 -0
  39. package/lib/likertEntities.js.map +1 -0
  40. package/lib/main.js +42 -0
  41. package/lib/main.js.map +1 -0
  42. package/lib/session-updater.js +15 -0
  43. package/lib/session-updater.js.map +1 -0
  44. package/package.json +19 -54
  45. package/readme.md +55 -0
  46. package/dist/author/choiceGenerator.d.ts +0 -13
  47. package/dist/author/choiceGenerator.js +0 -255
  48. package/dist/author/defaults.d.ts +0 -102
  49. package/dist/author/defaults.js +0 -60
  50. package/dist/author/index.d.ts +0 -31
  51. package/dist/author/index.js +0 -73
  52. package/dist/author/likertEntities.d.ts +0 -25
  53. package/dist/author/likertEntities.js +0 -18
  54. package/dist/author/main.d.ts +0 -27
  55. package/dist/author/main.js +0 -298
  56. package/dist/controller/defaults.d.ts +0 -19
  57. package/dist/controller/defaults.js +0 -13
  58. package/dist/controller/index.d.ts +0 -19
  59. package/dist/controller/index.js +0 -41
  60. package/dist/delivery/choice-input.d.ts +0 -27
  61. package/dist/delivery/choice-input.js +0 -59
  62. package/dist/delivery/index.d.ts +0 -19
  63. package/dist/delivery/index.js +0 -44
  64. package/dist/delivery/likert.d.ts +0 -26
  65. package/dist/delivery/likert.js +0 -70
  66. package/dist/delivery/likertEntities.d.ts +0 -12
  67. package/dist/delivery/likertEntities.js +0 -7
  68. package/dist/delivery/main.d.ts +0 -23
  69. package/dist/delivery/main.js +0 -37
  70. package/dist/delivery/session-updater.d.ts +0 -9
  71. package/dist/index.d.ts +0 -1
  72. package/dist/index.iife.d.ts +0 -8
  73. package/dist/index.iife.js +0 -145
  74. package/dist/index.js +0 -2
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +0 -8
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js +0 -19
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js +0 -6
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isPlainObject.js +0 -14
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/merge.js +0 -8
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +0 -8
@@ -1,255 +0,0 @@
1
- import { LIKERT_SCALE as e, LIKERT_TYPE as t } from "./likertEntities.js";
2
- //#region src/author/choiceGenerator.ts
3
- var n = [
4
- {
5
- label: "Disagree",
6
- value: -1
7
- },
8
- {
9
- label: "Unsure",
10
- value: 0
11
- },
12
- {
13
- label: "Agree",
14
- value: 1
15
- }
16
- ], r = [
17
- {
18
- label: "Strongly Disagree",
19
- value: -2
20
- },
21
- ...n,
22
- {
23
- label: "Strongly Agree",
24
- value: 2
25
- }
26
- ], i = [
27
- {
28
- label: "Extremely Disagree",
29
- value: -3
30
- },
31
- ...r,
32
- {
33
- label: "Extremely Agree",
34
- value: 3
35
- }
36
- ], a = [
37
- {
38
- label: "Infrequently",
39
- value: -1
40
- },
41
- {
42
- label: "Unsure",
43
- value: 0
44
- },
45
- {
46
- label: "Frequently",
47
- value: 1
48
- }
49
- ], o = [
50
- {
51
- label: "Very Infrequently",
52
- value: -2
53
- },
54
- ...a,
55
- {
56
- label: "Very Frequently",
57
- value: 2
58
- }
59
- ], s = [
60
- {
61
- label: "Never",
62
- value: -3
63
- },
64
- ...o,
65
- {
66
- label: "Always",
67
- value: 3
68
- }
69
- ], c = [
70
- {
71
- label: "No",
72
- value: -1
73
- },
74
- {
75
- label: "Unsure",
76
- value: 0
77
- },
78
- {
79
- label: "Yes",
80
- value: 1
81
- }
82
- ], l = [
83
- {
84
- label: "No",
85
- value: -2
86
- },
87
- {
88
- label: "Not really",
89
- value: -1
90
- },
91
- {
92
- label: "Unsure",
93
- value: 0
94
- },
95
- {
96
- label: "Sometimes",
97
- value: 1
98
- },
99
- {
100
- label: "Yes",
101
- value: 2
102
- }
103
- ], u = [
104
- {
105
- label: "No",
106
- value: -3
107
- },
108
- {
109
- label: "Rarely",
110
- value: -2
111
- },
112
- {
113
- label: "Not really",
114
- value: -1
115
- },
116
- {
117
- label: "Unsure",
118
- value: 0
119
- },
120
- {
121
- label: "Sometimes",
122
- value: 1
123
- },
124
- {
125
- label: "Very Often",
126
- value: 2
127
- },
128
- {
129
- label: "Always",
130
- value: 3
131
- }
132
- ], d = [
133
- {
134
- label: "Not Likely",
135
- value: -1
136
- },
137
- {
138
- label: "Unsure",
139
- value: 0
140
- },
141
- {
142
- label: "Likely",
143
- value: 1
144
- }
145
- ], f = [
146
- {
147
- label: "Very Unlikely",
148
- value: -2
149
- },
150
- ...d,
151
- {
152
- label: "Very Likely",
153
- value: 2
154
- }
155
- ], p = [
156
- {
157
- label: "Extremely Unlikely",
158
- value: -3
159
- },
160
- ...f,
161
- {
162
- label: "Extremely Likely",
163
- value: 3
164
- }
165
- ], m = [
166
- {
167
- label: "Not Important",
168
- value: -1
169
- },
170
- {
171
- label: "Unsure",
172
- value: 0
173
- },
174
- {
175
- label: "Important",
176
- value: 1
177
- }
178
- ], h = [
179
- {
180
- label: "Very Not Important",
181
- value: -2
182
- },
183
- ...m,
184
- {
185
- label: "Very Important",
186
- value: 2
187
- }
188
- ], g = [
189
- {
190
- label: "Extremely Not Important",
191
- value: -3
192
- },
193
- ...h,
194
- {
195
- label: "Extremely Important",
196
- value: 3
197
- }
198
- ], _ = [
199
- {
200
- label: "Dislike",
201
- value: -1
202
- },
203
- {
204
- label: "Unsure",
205
- value: 0
206
- },
207
- {
208
- label: "Like",
209
- value: 1
210
- }
211
- ], v = [
212
- {
213
- label: "Really Dislike",
214
- value: -2
215
- },
216
- ..._,
217
- {
218
- label: "Really Like",
219
- value: 2
220
- }
221
- ], y = [
222
- {
223
- label: "Extremely Dislike",
224
- value: -3
225
- },
226
- ...v,
227
- {
228
- label: "Extremely Like",
229
- value: 3
230
- }
231
- ], b = (b, x) => {
232
- switch (`${b}-${x}`) {
233
- case `${e.likert3}-${t.agreement}`: return [...n];
234
- case `${e.likert5}-${t.agreement}`: return [...r];
235
- case `${e.likert7}-${t.agreement}`: return [...i];
236
- case `${e.likert3}-${t.frequency}`: return [...a];
237
- case `${e.likert5}-${t.frequency}`: return [...o];
238
- case `${e.likert7}-${t.frequency}`: return [...s];
239
- case `${e.likert3}-${t.yesNo}`: return [...c];
240
- case `${e.likert5}-${t.yesNo}`: return [...l];
241
- case `${e.likert7}-${t.yesNo}`: return [...u];
242
- case `${e.likert3}-${t.likelihood}`: return [...d];
243
- case `${e.likert5}-${t.likelihood}`: return [...f];
244
- case `${e.likert7}-${t.likelihood}`: return [...p];
245
- case `${e.likert3}-${t.importance}`: return [...m];
246
- case `${e.likert5}-${t.importance}`: return [...h];
247
- case `${e.likert7}-${t.importance}`: return [...g];
248
- case `${e.likert3}-${t.like}`: return [..._];
249
- case `${e.likert5}-${t.like}`: return [...v];
250
- case `${e.likert7}-${t.like}`: return [...y];
251
- default: return [];
252
- }
253
- };
254
- //#endregion
255
- export { b as default };
@@ -1,102 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/likert/configure/src/defaults.js
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- /** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
10
- * functionalities are not defined yet - the value for those can belong to
11
- * model or to configure
12
- */
13
- declare const _default: {
14
- model: {
15
- choices: never[];
16
- likertOrientation: string;
17
- likertScale: string;
18
- likertType: string;
19
- prompt: string;
20
- promptEnabled: boolean;
21
- teacherInstructions: string;
22
- teacherInstructionsEnabled: boolean;
23
- };
24
- configuration: {
25
- baseInputConfiguration: {
26
- h3: {
27
- disabled: boolean;
28
- };
29
- audio: {
30
- disabled: boolean;
31
- };
32
- video: {
33
- disabled: boolean;
34
- };
35
- image: {
36
- disabled: boolean;
37
- };
38
- textAlign: {
39
- disabled: boolean;
40
- };
41
- showParagraphs: {
42
- disabled: boolean;
43
- };
44
- separateParagraphs: {
45
- disabled: boolean;
46
- };
47
- };
48
- prompt: {
49
- settings: boolean;
50
- label: string;
51
- inputConfiguration: {
52
- audio: {
53
- disabled: boolean;
54
- };
55
- video: {
56
- disabled: boolean;
57
- };
58
- image: {
59
- disabled: boolean;
60
- };
61
- };
62
- required: boolean;
63
- };
64
- settingsPanelDisabled: boolean;
65
- spellCheck: {
66
- label: string;
67
- settings: boolean;
68
- enabled: boolean;
69
- };
70
- teacherInstructions: {
71
- settings: boolean;
72
- label: string;
73
- inputConfiguration: {
74
- audio: {
75
- disabled: boolean;
76
- };
77
- video: {
78
- disabled: boolean;
79
- };
80
- image: {
81
- disabled: boolean;
82
- };
83
- };
84
- required: boolean;
85
- };
86
- likertChoice: {
87
- label: string;
88
- inputConfiguration: {
89
- audio: {
90
- disabled: boolean;
91
- };
92
- video: {
93
- disabled: boolean;
94
- };
95
- image: {
96
- disabled: boolean;
97
- };
98
- };
99
- };
100
- };
101
- };
102
- export default _default;
@@ -1,60 +0,0 @@
1
- //#region src/author/defaults.ts
2
- var e = {
3
- model: {
4
- choices: [],
5
- likertOrientation: "horizontal",
6
- likertScale: "likert3",
7
- likertType: "agreement",
8
- prompt: "",
9
- promptEnabled: !0,
10
- teacherInstructions: "",
11
- teacherInstructionsEnabled: !0
12
- },
13
- configuration: {
14
- baseInputConfiguration: {
15
- h3: { disabled: !0 },
16
- audio: { disabled: !1 },
17
- video: { disabled: !1 },
18
- image: { disabled: !1 },
19
- textAlign: { disabled: !0 },
20
- showParagraphs: { disabled: !1 },
21
- separateParagraphs: { disabled: !0 }
22
- },
23
- prompt: {
24
- settings: !0,
25
- label: "Prompt",
26
- inputConfiguration: {
27
- audio: { disabled: !1 },
28
- video: { disabled: !1 },
29
- image: { disabled: !1 }
30
- },
31
- required: !1
32
- },
33
- settingsPanelDisabled: !1,
34
- spellCheck: {
35
- label: "Spellcheck",
36
- settings: !1,
37
- enabled: !0
38
- },
39
- teacherInstructions: {
40
- settings: !0,
41
- label: "Teacher Instructions",
42
- inputConfiguration: {
43
- audio: { disabled: !1 },
44
- video: { disabled: !1 },
45
- image: { disabled: !1 }
46
- },
47
- required: !1
48
- },
49
- likertChoice: {
50
- label: "Choice",
51
- inputConfiguration: {
52
- audio: { disabled: !1 },
53
- video: { disabled: !1 },
54
- image: { disabled: !1 }
55
- }
56
- }
57
- }
58
- };
59
- //#endregion
60
- export { e as default };
@@ -1,31 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/likert/configure/src/index.js
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- export default class Likert extends HTMLElement {
10
- static createDefaultModel: (model?: {}) => {
11
- choices: any;
12
- likertOrientation: string;
13
- likertScale: string;
14
- likertType: string;
15
- prompt: string;
16
- promptEnabled: boolean;
17
- teacherInstructions: string;
18
- teacherInstructionsEnabled: boolean;
19
- };
20
- constructor();
21
- set model(s: any);
22
- set configuration(c: any);
23
- set disableSidePanel(s: any);
24
- dispatchModelUpdated(reset: any): void;
25
- onModelChanged(m: any, reset: any): void;
26
- onConfigurationChanged(c: any): void;
27
- insertSound(handler: any): void;
28
- onDeleteSound(src: any, done: any): void;
29
- _render(): void;
30
- disconnectedCallback(): void;
31
- }
@@ -1,73 +0,0 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
2
- import t from "./main.js";
3
- import n from "./defaults.js";
4
- import r from "react";
5
- import { createRoot as i } from "react-dom/client";
6
- import a from "debug";
7
- import { DeleteSoundEvent as o, InsertSoundEvent as s, ModelUpdatedEvent as c } from "@pie-element/shared-configure-events";
8
- //#region src/author/index.ts
9
- var l = a("likert:configure"), u = (t, r) => ({
10
- configuration: e(t, n.configuration),
11
- model: r
12
- }), d = class e extends HTMLElement {
13
- static createDefaultModel = (e = {}) => ({
14
- ...n.model,
15
- ...e,
16
- choices: e && e.choices || []
17
- });
18
- constructor() {
19
- super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
20
- }
21
- set model(t) {
22
- this._model = e.createDefaultModel(t), this._model = {
23
- ...this._model,
24
- choices: this._model.choices.map((e) => ({
25
- ...e,
26
- value: parseInt(e.value)
27
- }))
28
- }, this._render();
29
- }
30
- set configuration(e) {
31
- let t = u(e, this._model);
32
- this.onModelChanged(t.model), this._configuration = t.configuration, this._render();
33
- }
34
- set disableSidePanel(e) {
35
- this._disableSidePanel = e, this._render();
36
- }
37
- dispatchModelUpdated(e) {
38
- let t = !!e;
39
- this.dispatchEvent(new c(this._model, t));
40
- }
41
- onModelChanged(e, t) {
42
- this._model = e, this._render(), this.dispatchModelUpdated(t);
43
- }
44
- onConfigurationChanged(e) {
45
- this._configuration = u(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
46
- }
47
- insertSound(e) {
48
- this.dispatchEvent(new s(e));
49
- }
50
- onDeleteSound(e, t) {
51
- this.dispatchEvent(new o(e, t));
52
- }
53
- _render() {
54
- l("_render");
55
- let e = r.createElement(t, {
56
- model: this._model,
57
- configuration: this._configuration,
58
- onModelChanged: this.onModelChanged,
59
- onConfigurationChanged: this.onConfigurationChanged,
60
- disableSidePanel: this._disableSidePanel,
61
- uploadSoundSupport: {
62
- add: this.insertSound.bind(this),
63
- delete: this.onDeleteSound.bind(this)
64
- }
65
- });
66
- this._root ||= i(this), this._root.render(e);
67
- }
68
- disconnectedCallback() {
69
- this._root && this._root.unmount();
70
- }
71
- };
72
- //#endregion
73
- export { d as default };
@@ -1,25 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/likert/configure/src/likertEntities.js
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- export declare const LIKERT_SCALE: {
10
- likert3: string;
11
- likert5: string;
12
- likert7: string;
13
- };
14
- export declare const LIKERT_TYPE: {
15
- agreement: string;
16
- frequency: string;
17
- yesNo: string;
18
- importance: string;
19
- likelihood: string;
20
- like: string;
21
- };
22
- export declare const LIKERT_ORIENTATION: {
23
- horizontal: string;
24
- vertical: string;
25
- };
@@ -1,18 +0,0 @@
1
- //#region src/author/likertEntities.ts
2
- var e = {
3
- likert3: "likert3",
4
- likert5: "likert5",
5
- likert7: "likert7"
6
- }, t = {
7
- agreement: "agreement",
8
- frequency: "frequency",
9
- yesNo: "yesNo",
10
- importance: "importance",
11
- likelihood: "likelihood",
12
- like: "like"
13
- }, n = {
14
- horizontal: "horizontal",
15
- vertical: "vertical"
16
- };
17
- //#endregion
18
- export { n as LIKERT_ORIENTATION, e as LIKERT_SCALE, t as LIKERT_TYPE };
@@ -1,27 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/likert/configure/src/main.jsx
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- import React from 'react';
10
- import PropTypes from 'prop-types';
11
- export declare class Main extends React.Component {
12
- static propTypes: {
13
- model: PropTypes.Validator<object>;
14
- disableSidePanel: PropTypes.Requireable<boolean>;
15
- onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
16
- onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
17
- imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
18
- add: PropTypes.Validator<(...args: any[]) => any>;
19
- delete: PropTypes.Validator<(...args: any[]) => any>;
20
- }>>;
21
- };
22
- onChoiceChanged: any;
23
- onPromptChanged: any;
24
- onTeacherInstructionsChanged: any;
25
- render(): React.JSX.Element;
26
- }
27
- export default Main;