@pie-element/likert 4.1.2-next.5 → 4.1.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/CHANGELOG.json +1 -0
- package/CHANGELOG.md +1468 -0
- package/LICENSE.md +5 -0
- package/configure/CHANGELOG.json +1 -0
- package/configure/CHANGELOG.md +1385 -0
- package/configure/lib/choiceGenerator.js +219 -0
- package/configure/lib/choiceGenerator.js.map +1 -0
- package/configure/lib/defaults.js +100 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +106 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/likertEntities.js +24 -0
- package/configure/lib/likertEntities.js.map +1 -0
- package/configure/lib/main.js +388 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/package.json +27 -0
- package/controller/CHANGELOG.json +1 -0
- package/controller/CHANGELOG.md +90 -0
- package/controller/lib/defaults.js +17 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +81 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/package.json +17 -0
- package/docs/config-schema.json +2011 -0
- package/docs/config-schema.json.md +1487 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +22 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +6 -0
- package/docs/pie-schema.json +966 -0
- package/docs/pie-schema.json.md +711 -0
- package/lib/choice-input.js +90 -0
- package/lib/choice-input.js.map +1 -0
- package/lib/index.js +64 -0
- package/lib/index.js.map +1 -0
- package/lib/likert.js +97 -0
- package/lib/likert.js.map +1 -0
- package/lib/likertEntities.js +11 -0
- package/lib/likertEntities.js.map +1 -0
- package/lib/main.js +42 -0
- package/lib/main.js.map +1 -0
- package/lib/session-updater.js +15 -0
- package/lib/session-updater.js.map +1 -0
- package/package.json +21 -83
- package/readme.md +55 -0
- package/configure.js +0 -2
- package/controller.js +0 -1
- package/dist/author/choiceGenerator.d.ts +0 -13
- package/dist/author/choiceGenerator.js +0 -255
- package/dist/author/defaults.d.ts +0 -102
- package/dist/author/defaults.js +0 -60
- package/dist/author/index.d.ts +0 -31
- package/dist/author/index.js +0 -73
- package/dist/author/likertEntities.d.ts +0 -25
- package/dist/author/likertEntities.js +0 -18
- package/dist/author/main.d.ts +0 -27
- package/dist/author/main.js +0 -298
- package/dist/browser/Radio-DABxV66W.js +0 -9454
- package/dist/browser/Radio-DABxV66W.js.map +0 -1
- package/dist/browser/author/index.js +0 -45281
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/controller/index.js +0 -51
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -219
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/likert.css +0 -2
- package/dist/controller/defaults.d.ts +0 -19
- package/dist/controller/defaults.js +0 -13
- package/dist/controller/index.d.ts +0 -19
- package/dist/controller/index.js +0 -41
- package/dist/delivery/choice-input.d.ts +0 -27
- package/dist/delivery/choice-input.js +0 -59
- package/dist/delivery/index.d.ts +0 -19
- package/dist/delivery/index.js +0 -44
- package/dist/delivery/likert.d.ts +0 -26
- package/dist/delivery/likert.js +0 -70
- package/dist/delivery/likertEntities.d.ts +0 -12
- package/dist/delivery/likertEntities.js +0 -7
- package/dist/delivery/main.d.ts +0 -23
- package/dist/delivery/main.js +0 -37
- package/dist/delivery/session-updater.d.ts +0 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -145
- package/dist/index.js +0 -2
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -12
|
@@ -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;
|
package/dist/author/defaults.js
DELETED
|
@@ -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 };
|
package/dist/author/index.d.ts
DELETED
|
@@ -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
|
-
}
|
package/dist/author/index.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import e from "./main.js";
|
|
2
|
-
import t from "./defaults.js";
|
|
3
|
-
import n from "react";
|
|
4
|
-
import { createRoot as r } from "react-dom/client";
|
|
5
|
-
import i from "debug";
|
|
6
|
-
import { DeleteSoundEvent as a, InsertSoundEvent as o, ModelUpdatedEvent as s } from "@pie-element/shared-configure-events";
|
|
7
|
-
import { defaults as c } from "@pie-element/shared-lodash";
|
|
8
|
-
//#region src/author/index.ts
|
|
9
|
-
var l = i("likert:configure"), u = (e, n) => ({
|
|
10
|
-
configuration: c(e, t.configuration),
|
|
11
|
-
model: n
|
|
12
|
-
}), d = class i extends HTMLElement {
|
|
13
|
-
static createDefaultModel = (e = {}) => ({
|
|
14
|
-
...t.model,
|
|
15
|
-
...e,
|
|
16
|
-
choices: e && e.choices || []
|
|
17
|
-
});
|
|
18
|
-
constructor() {
|
|
19
|
-
super(), this._root = null, this._model = i.createDefaultModel(), this._configuration = t.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
20
|
-
}
|
|
21
|
-
set model(e) {
|
|
22
|
-
this._model = i.createDefaultModel(e), 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 s(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 o(e));
|
|
49
|
-
}
|
|
50
|
-
onDeleteSound(e, t) {
|
|
51
|
-
this.dispatchEvent(new a(e, t));
|
|
52
|
-
}
|
|
53
|
-
_render() {
|
|
54
|
-
l("_render");
|
|
55
|
-
let t = n.createElement(e, {
|
|
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 ||= r(this), this._root.render(t);
|
|
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 };
|
package/dist/author/main.d.ts
DELETED
|
@@ -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;
|