@pie-element/categorize 13.2.2-beta.5 → 13.2.2-beta.6
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.md +4 -0
- package/configure/CHANGELOG.md +4 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +4 -0
- package/controller/package.json +1 -1
- package/package.json +3 -3
- package/configure/lib/defaults.js +0 -220
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/design/builder.js +0 -55
- package/configure/lib/design/builder.js.map +0 -1
- package/configure/lib/design/buttons.js +0 -59
- package/configure/lib/design/buttons.js.map +0 -1
- package/configure/lib/design/categories/RowLabel.js +0 -66
- package/configure/lib/design/categories/RowLabel.js.map +0 -1
- package/configure/lib/design/categories/alternateResponses.js +0 -116
- package/configure/lib/design/categories/alternateResponses.js.map +0 -1
- package/configure/lib/design/categories/category.js +0 -153
- package/configure/lib/design/categories/category.js.map +0 -1
- package/configure/lib/design/categories/choice-preview.js +0 -79
- package/configure/lib/design/categories/choice-preview.js.map +0 -1
- package/configure/lib/design/categories/droppable-placeholder.js +0 -93
- package/configure/lib/design/categories/droppable-placeholder.js.map +0 -1
- package/configure/lib/design/categories/index.js +0 -256
- package/configure/lib/design/categories/index.js.map +0 -1
- package/configure/lib/design/choices/choice.js +0 -187
- package/configure/lib/design/choices/choice.js.map +0 -1
- package/configure/lib/design/choices/config.js +0 -58
- package/configure/lib/design/choices/config.js.map +0 -1
- package/configure/lib/design/choices/index.js +0 -197
- package/configure/lib/design/choices/index.js.map +0 -1
- package/configure/lib/design/header.js +0 -71
- package/configure/lib/design/header.js.map +0 -1
- package/configure/lib/design/index.js +0 -741
- package/configure/lib/design/index.js.map +0 -1
- package/configure/lib/design/input-header.js +0 -105
- package/configure/lib/design/input-header.js.map +0 -1
- package/configure/lib/design/utils.js +0 -12
- package/configure/lib/design/utils.js.map +0 -1
- package/configure/lib/index.js +0 -148
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -44
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/utils.js +0 -43
- package/configure/lib/utils.js.map +0 -1
- package/controller/lib/defaults.js +0 -31
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -506
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -69
- package/controller/lib/utils.js.map +0 -1
- package/lib/categorize/categories.js +0 -135
- package/lib/categorize/categories.js.map +0 -1
- package/lib/categorize/category.js +0 -67
- package/lib/categorize/category.js.map +0 -1
- package/lib/categorize/choice.js +0 -140
- package/lib/categorize/choice.js.map +0 -1
- package/lib/categorize/choices.js +0 -99
- package/lib/categorize/choices.js.map +0 -1
- package/lib/categorize/droppable-placeholder.js +0 -84
- package/lib/categorize/droppable-placeholder.js.map +0 -1
- package/lib/categorize/grid-content.js +0 -55
- package/lib/categorize/grid-content.js.map +0 -1
- package/lib/categorize/index.js +0 -450
- package/lib/categorize/index.js.map +0 -1
- package/lib/index.js +0 -316
- package/lib/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [13.2.2-beta.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.2-beta.5...@pie-element/categorize@13.2.2-beta.6) (2026-09-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
9
|
+
|
|
6
10
|
## [13.2.2-beta.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@13.2.2-beta.4...@pie-element/categorize@13.2.2-beta.5) (2026-09-17)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @pie-element/categorize
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [11.4.0-beta.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.11...@pie-element/categorize-configure@11.4.0-beta.12) (2026-09-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
9
|
+
|
|
6
10
|
# [11.4.0-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@11.4.0-beta.10...@pie-element/categorize-configure@11.4.0-beta.11) (2026-09-17)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @pie-element/categorize-configure
|
package/configure/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": true,
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "src/index.js",
|
|
6
|
-
"version": "11.4.0-beta.
|
|
6
|
+
"version": "11.4.0-beta.12",
|
|
7
7
|
"description": "",
|
|
8
8
|
"scripts": {},
|
|
9
9
|
"author": "pie framework developers",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@mui/material": "^7.3.4",
|
|
17
17
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
18
18
|
"@pie-lib/categorize": "2.0.2",
|
|
19
|
-
"@pie-lib/config-ui": "13.
|
|
19
|
+
"@pie-lib/config-ui": "13.0.22-beta.1",
|
|
20
20
|
"@pie-lib/drag": "4.0.6",
|
|
21
|
-
"@pie-lib/editable-html-tip-tap": "2.
|
|
21
|
+
"@pie-lib/editable-html-tip-tap": "2.1.20-beta.1",
|
|
22
22
|
"@pie-lib/math-rendering": "5.1.0",
|
|
23
23
|
"@pie-lib/render-ui": "6.1.3",
|
|
24
24
|
"@pie-lib/translator": "4.0.2",
|
package/controller/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [10.4.0-beta.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.11...@pie-element/categorize-controller@10.4.0-beta.12) (2026-09-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/categorize-controller
|
|
9
|
+
|
|
6
10
|
# [10.4.0-beta.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-controller@10.4.0-beta.10...@pie-element/categorize-controller@10.4.0-beta.11) (2026-09-17)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @pie-element/categorize-controller
|
package/controller/package.json
CHANGED
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "13.2.2-beta.
|
|
7
|
+
"version": "13.2.2-beta.6",
|
|
8
8
|
"description": "",
|
|
9
9
|
"author": "pie framework developers",
|
|
10
10
|
"license": "ISC",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@mui/material": "^7.3.4",
|
|
17
17
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
18
18
|
"@pie-lib/categorize": "2.0.2",
|
|
19
|
-
"@pie-lib/config-ui": "13.
|
|
19
|
+
"@pie-lib/config-ui": "13.0.22-beta.1",
|
|
20
20
|
"@pie-lib/correct-answer-toggle": "4.0.5",
|
|
21
21
|
"@pie-lib/drag": "4.0.6",
|
|
22
22
|
"@pie-lib/math-rendering": "5.1.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react": "18.3.1",
|
|
29
29
|
"react-dom": "18.3.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "c6bbb21417c58eaf8f617143437fb3ff85ae1cb4",
|
|
32
32
|
"scripts": {
|
|
33
33
|
"postpublish": "../../scripts/postpublish"
|
|
34
34
|
},
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = exports.default = {
|
|
8
|
-
model: {
|
|
9
|
-
allowAlternateEnabled: true,
|
|
10
|
-
allowMaxChoicesPerCategory: false,
|
|
11
|
-
alternates: [],
|
|
12
|
-
categories: [],
|
|
13
|
-
categoriesPerRow: 2,
|
|
14
|
-
choices: [],
|
|
15
|
-
choicesLabel: '',
|
|
16
|
-
choicesPosition: 'below',
|
|
17
|
-
correctResponse: [],
|
|
18
|
-
feedbackEnabled: false,
|
|
19
|
-
lockChoiceOrder: true,
|
|
20
|
-
maxAnswerChoices: 6,
|
|
21
|
-
maxChoicesPerCategory: 0,
|
|
22
|
-
partialScoring: true,
|
|
23
|
-
promptEnabled: true,
|
|
24
|
-
rationaleEnabled: true,
|
|
25
|
-
rowLabels: [''],
|
|
26
|
-
studentInstructionsEnabled: true,
|
|
27
|
-
teacherInstructionsEnabled: true,
|
|
28
|
-
toolbarEditorPosition: 'bottom',
|
|
29
|
-
minRowHeight: '80px'
|
|
30
|
-
},
|
|
31
|
-
configuration: {
|
|
32
|
-
baseInputConfiguration: {
|
|
33
|
-
h3: {
|
|
34
|
-
disabled: true
|
|
35
|
-
},
|
|
36
|
-
audio: {
|
|
37
|
-
disabled: false
|
|
38
|
-
},
|
|
39
|
-
video: {
|
|
40
|
-
disabled: false
|
|
41
|
-
},
|
|
42
|
-
image: {
|
|
43
|
-
disabled: false
|
|
44
|
-
},
|
|
45
|
-
textAlign: {
|
|
46
|
-
disabled: true
|
|
47
|
-
},
|
|
48
|
-
showParagraphs: {
|
|
49
|
-
disabled: false
|
|
50
|
-
},
|
|
51
|
-
separateParagraphs: {
|
|
52
|
-
disabled: true
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
spellCheck: {
|
|
56
|
-
label: 'Spellcheck',
|
|
57
|
-
settings: false,
|
|
58
|
-
enabled: true
|
|
59
|
-
},
|
|
60
|
-
feedback: {
|
|
61
|
-
settings: true,
|
|
62
|
-
label: 'Feedback',
|
|
63
|
-
enabled: true
|
|
64
|
-
},
|
|
65
|
-
lockChoiceOrder: {
|
|
66
|
-
settings: true,
|
|
67
|
-
label: 'Lock Choice Order'
|
|
68
|
-
},
|
|
69
|
-
choicesPosition: {
|
|
70
|
-
settings: true,
|
|
71
|
-
label: 'Choices Position'
|
|
72
|
-
},
|
|
73
|
-
allowMultiplePlacements: {
|
|
74
|
-
settings: true,
|
|
75
|
-
label: 'Allow Multiple Placements'
|
|
76
|
-
},
|
|
77
|
-
maxPlacements: {
|
|
78
|
-
settings: true,
|
|
79
|
-
label: 'Max choices per category'
|
|
80
|
-
},
|
|
81
|
-
allowAlternate: {
|
|
82
|
-
settings: true,
|
|
83
|
-
label: 'Allow Alternate Correct Answers'
|
|
84
|
-
},
|
|
85
|
-
categoriesPerRow: {
|
|
86
|
-
settings: true,
|
|
87
|
-
label: 'Categories per row'
|
|
88
|
-
},
|
|
89
|
-
partialScoring: {
|
|
90
|
-
settings: false,
|
|
91
|
-
label: 'Allow Partial Scoring'
|
|
92
|
-
},
|
|
93
|
-
prompt: {
|
|
94
|
-
settings: true,
|
|
95
|
-
label: 'Prompt',
|
|
96
|
-
required: false,
|
|
97
|
-
inputConfiguration: {
|
|
98
|
-
audio: {
|
|
99
|
-
disabled: false
|
|
100
|
-
},
|
|
101
|
-
video: {
|
|
102
|
-
disabled: false
|
|
103
|
-
},
|
|
104
|
-
image: {
|
|
105
|
-
disabled: false
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
rationale: {
|
|
110
|
-
settings: true,
|
|
111
|
-
label: 'Rationale',
|
|
112
|
-
required: false,
|
|
113
|
-
inputConfiguration: {
|
|
114
|
-
audio: {
|
|
115
|
-
disabled: false
|
|
116
|
-
},
|
|
117
|
-
video: {
|
|
118
|
-
disabled: false
|
|
119
|
-
},
|
|
120
|
-
image: {
|
|
121
|
-
disabled: false
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
scoringType: {
|
|
126
|
-
settings: false,
|
|
127
|
-
label: 'Scoring Type'
|
|
128
|
-
},
|
|
129
|
-
settingsPanelDisabled: false,
|
|
130
|
-
studentInstructions: {
|
|
131
|
-
settings: false,
|
|
132
|
-
label: 'Student Instructions'
|
|
133
|
-
},
|
|
134
|
-
teacherInstructions: {
|
|
135
|
-
settings: true,
|
|
136
|
-
label: 'Teacher Instructions',
|
|
137
|
-
required: false,
|
|
138
|
-
inputConfiguration: {
|
|
139
|
-
audio: {
|
|
140
|
-
disabled: false
|
|
141
|
-
},
|
|
142
|
-
video: {
|
|
143
|
-
disabled: false
|
|
144
|
-
},
|
|
145
|
-
image: {
|
|
146
|
-
disabled: false
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
headers: {
|
|
151
|
-
inputConfiguration: {
|
|
152
|
-
audio: {
|
|
153
|
-
disabled: true
|
|
154
|
-
},
|
|
155
|
-
video: {
|
|
156
|
-
disabled: true
|
|
157
|
-
},
|
|
158
|
-
image: {
|
|
159
|
-
disabled: false
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
rowLabels: {
|
|
164
|
-
inputConfiguration: {
|
|
165
|
-
audio: {
|
|
166
|
-
disabled: false
|
|
167
|
-
},
|
|
168
|
-
video: {
|
|
169
|
-
disabled: false
|
|
170
|
-
},
|
|
171
|
-
image: {
|
|
172
|
-
disabled: false
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
toolbarEditorPosition: {
|
|
177
|
-
settings: false,
|
|
178
|
-
label: 'Toolbar Editor Position'
|
|
179
|
-
},
|
|
180
|
-
maxImageWidth: {
|
|
181
|
-
teacherInstructions: 300,
|
|
182
|
-
prompt: 300,
|
|
183
|
-
rationale: 300,
|
|
184
|
-
rowLabel: 200,
|
|
185
|
-
categoryLabel: 260,
|
|
186
|
-
choices: 240
|
|
187
|
-
},
|
|
188
|
-
maxImageHeight: {
|
|
189
|
-
teacherInstructions: 300,
|
|
190
|
-
prompt: 300,
|
|
191
|
-
rationale: 300,
|
|
192
|
-
rowLabel: 100,
|
|
193
|
-
categoryLabel: 100,
|
|
194
|
-
choices: 150
|
|
195
|
-
},
|
|
196
|
-
withRubric: {
|
|
197
|
-
settings: false,
|
|
198
|
-
label: 'Add Rubric'
|
|
199
|
-
},
|
|
200
|
-
minCategoriesPerRow: 1,
|
|
201
|
-
allowMaxAnswerChoices: {
|
|
202
|
-
settings: true,
|
|
203
|
-
label: 'Max answer choices'
|
|
204
|
-
},
|
|
205
|
-
mathMlOptions: {
|
|
206
|
-
mmlOutput: false,
|
|
207
|
-
mmlEditing: false
|
|
208
|
-
},
|
|
209
|
-
language: {
|
|
210
|
-
settings: false,
|
|
211
|
-
label: 'Specify Language',
|
|
212
|
-
enabled: false
|
|
213
|
-
},
|
|
214
|
-
languageChoices: {
|
|
215
|
-
label: 'Language Choices',
|
|
216
|
-
options: []
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["model","allowAlternateEnabled","allowMaxChoicesPerCategory","alternates","categories","categoriesPerRow","choices","choicesLabel","choicesPosition","correctResponse","feedbackEnabled","lockChoiceOrder","maxAnswerChoices","maxChoicesPerCategory","partialScoring","promptEnabled","rationaleEnabled","rowLabels","studentInstructionsEnabled","teacherInstructionsEnabled","toolbarEditorPosition","minRowHeight","configuration","baseInputConfiguration","h3","disabled","audio","video","image","textAlign","showParagraphs","separateParagraphs","spellCheck","label","settings","enabled","feedback","allowMultiplePlacements","maxPlacements","allowAlternate","prompt","required","inputConfiguration","rationale","scoringType","settingsPanelDisabled","studentInstructions","teacherInstructions","headers","maxImageWidth","rowLabel","categoryLabel","maxImageHeight","withRubric","minCategoriesPerRow","allowMaxAnswerChoices","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n allowAlternateEnabled: true,\n allowMaxChoicesPerCategory: false,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n promptEnabled: true,\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n choicesPosition: {\n settings: true,\n label: 'Choices Position',\n },\n allowMultiplePlacements: {\n settings: true,\n label: 'Allow Multiple Placements',\n },\n maxPlacements: {\n settings: true,\n label: 'Max choices per category',\n },\n allowAlternate: {\n settings: true,\n label: 'Allow Alternate Correct Answers',\n },\n categoriesPerRow: {\n settings: true,\n label: 'Categories per row',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n settingsPanelDisabled: false,\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n headers: {\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: false },\n },\n },\n rowLabels: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 200,\n categoryLabel: 260,\n choices: 240,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 100,\n categoryLabel: 100,\n choices: 150,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n minCategoriesPerRow: 1,\n allowMaxAnswerChoices: {\n settings: true,\n label: 'Max answer choices',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,qBAAqB,EAAE,IAAI;IAC3BC,0BAA0B,EAAE,KAAK;IACjCC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,EAAE;IACdC,gBAAgB,EAAE,CAAC;IACnBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,OAAO;IACxBC,eAAe,EAAE,EAAE;IACnBC,eAAe,EAAE,KAAK;IACtBC,eAAe,EAAE,IAAI;IACrBC,gBAAgB,EAAE,CAAC;IACnBC,qBAAqB,EAAE,CAAC;IACxBC,cAAc,EAAE,IAAI;IACpBC,aAAa,EAAE,IAAI;IACnBC,gBAAgB,EAAE,IAAI;IACtBC,SAAS,EAAE,CAAC,E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|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.buildCategories = exports.buildAlternateResponses = void 0;
|
|
7
|
-
var _lodashEs = require("lodash-es");
|
|
8
|
-
const buildCategories = (categories, choices, correctResponse) => {
|
|
9
|
-
const clonedCategories = (0, _lodashEs.cloneDeep)(categories);
|
|
10
|
-
return clonedCategories.map(category => {
|
|
11
|
-
const cr = correctResponse.find(cr => cr.category === category.id);
|
|
12
|
-
if (cr) {
|
|
13
|
-
category.choices = (cr.choices || []).map(choiceId => {
|
|
14
|
-
const choice = choices.find(h => h.id === choiceId);
|
|
15
|
-
if (choice) {
|
|
16
|
-
return Object.assign({}, {
|
|
17
|
-
id: choice.id,
|
|
18
|
-
content: choice.content
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return category;
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
exports.buildCategories = buildCategories;
|
|
27
|
-
const getChoices = (cat, choices, index) => {
|
|
28
|
-
if (!cat.alternateResponses || cat.alternateResponses.length === 0) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
return (cat.alternateResponses[index] || []).map(alt => {
|
|
32
|
-
return choices.find(ch => ch.id === alt);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
const buildAlternateResponses = (categories, choices, correctResponse) => {
|
|
36
|
-
const mostAlternates = correctResponse.reduce((mostAlt, cat) => {
|
|
37
|
-
if (cat.alternateResponses && cat.alternateResponses.length >= mostAlt) {
|
|
38
|
-
return cat.alternateResponses.length;
|
|
39
|
-
}
|
|
40
|
-
return mostAlt;
|
|
41
|
-
}, 0);
|
|
42
|
-
const alternatesArray = new Array(mostAlternates).fill(0);
|
|
43
|
-
return alternatesArray.map((val, index) => {
|
|
44
|
-
return correctResponse.map((cat, catIndex) => {
|
|
45
|
-
const currentCategory = categories[catIndex];
|
|
46
|
-
return {
|
|
47
|
-
id: currentCategory.id,
|
|
48
|
-
label: currentCategory.label,
|
|
49
|
-
choices: getChoices(cat, choices, index)
|
|
50
|
-
};
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
exports.buildAlternateResponses = buildAlternateResponses;
|
|
55
|
-
//# sourceMappingURL=builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","names":["_lodashEs","require","buildCategories","categories","choices","correctResponse","clonedCategories","cloneDeep","map","category","cr","find","id","choiceId","choice","h","Object","assign","content","exports","getChoices","cat","index","alternateResponses","length","alt","ch","buildAlternateResponses","mostAlternates","reduce","mostAlt","alternatesArray","Array","fill","val","catIndex","currentCategory","label"],"sources":["../../src/design/builder.js"],"sourcesContent":["import { cloneDeep } from 'lodash-es';\n\nexport const buildCategories = (categories, choices, correctResponse) => {\n const clonedCategories = cloneDeep(categories);\n\n return clonedCategories.map((category) => {\n const cr = correctResponse.find((cr) => cr.category === category.id);\n\n if (cr) {\n category.choices = (cr.choices || []).map((choiceId) => {\n const choice = choices.find((h) => h.id === choiceId);\n if (choice) {\n return Object.assign({}, { id: choice.id, content: choice.content });\n }\n });\n }\n\n return category;\n });\n};\n\nconst getChoices = (cat, choices, index) => {\n if (!cat.alternateResponses || cat.alternateResponses.length === 0) {\n return [];\n }\n\n return (cat.alternateResponses[index] || []).map((alt) => {\n return choices.find((ch) => ch.id === alt);\n });\n};\n\nexport const buildAlternateResponses = (categories, choices, correctResponse) => {\n const mostAlternates = correctResponse.reduce((mostAlt, cat) => {\n if (cat.alternateResponses && cat.alternateResponses.length >= mostAlt) {\n return cat.alternateResponses.length;\n }\n\n return mostAlt;\n }, 0);\n const alternatesArray = new Array(mostAlternates).fill(0);\n\n return alternatesArray.map((val, index) => {\n return correctResponse.map((cat, catIndex) => {\n const currentCategory = categories[catIndex];\n\n return {\n id: currentCategory.id,\n label: currentCategory.label,\n choices: getChoices(cat, choices, index),\n };\n });\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAA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CAAC;AACJ,CAAC;AAEM,MAAME,uBAAuB,GAAGA,CAACxB,UAAU,EAAEC,OAAO,EAAEC,eAAe,KAAK;EAC/E,MAAMuB,cAAc,GAAGvB,eAAe,CAACwB,MAAM,CAAC,CAACC,OAAO,EAAET,GAAG,KAAK;IAC9D,IAAIA,GAAG,CAACE,kBAAkB,IAAIF,GAAG,CAACE,kBAAkB,CAACC,MAAM,IAAIM,OAAO,EAAE;MACtE,OAAOT,GAAG,CAACE,kBAAkB,CAACC,MAAM;IACtC;IAEA,OAAOM,OAAO;EAChB,CAAC,EAAE,CAAC,CAAC;EACL,MAAMC,eAAe,GAAG,IAAIC,KAAK,CAACJ,cAAc,CAAC,CAACK,IAAI,CAAC,CAAC,CAAC;EAEzD,OAAOF,eAAe,CAACvB,GAAG,CAAC,CAAC0B,GAAG,EAAEZ,KAAK,KAAK;IACzC,OAAOjB,eAAe,CAACG,GAAG,CAAC,CAACa,GAAG,EAAEc,QAAQ,KAAK;MAC5C,MAAMC,eAAe,GAAGjC,UAAU,CAACgC,QAAQ,CAAC;MAE5C,OAAO;QACLvB,EAAE,EAAEwB,eAAe,CAACxB,EAAE;QACtByB,KAAK,EAAED,eAAe,CAACC,KAAK;QAC5BjC,OAAO,EAAEgB,UAAU,CAACC,GAAG,EAAEjB,OAAO,EAAEkB,KAAK;MACzC,CAAC;IACH,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC;AAACH,OAAA,CAAAQ,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.RawAddButton = exports.DeleteButton = exports.AddButton = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _styles = require("@mui/material/styles");
|
|
12
|
-
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
13
|
-
const StyledAddButton = (0, _styles.styled)(_Button.default)(({
|
|
14
|
-
theme
|
|
15
|
-
}) => ({
|
|
16
|
-
height: theme.spacing(4)
|
|
17
|
-
}));
|
|
18
|
-
class RawAddButton extends _react.default.Component {
|
|
19
|
-
render() {
|
|
20
|
-
const {
|
|
21
|
-
label,
|
|
22
|
-
onClick,
|
|
23
|
-
disabled
|
|
24
|
-
} = this.props;
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(StyledAddButton, {
|
|
26
|
-
onClick: onClick,
|
|
27
|
-
disabled: disabled,
|
|
28
|
-
size: "small",
|
|
29
|
-
variant: "contained",
|
|
30
|
-
color: "primary"
|
|
31
|
-
}, label);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.RawAddButton = RawAddButton;
|
|
35
|
-
(0, _defineProperty2.default)(RawAddButton, "propTypes", {
|
|
36
|
-
label: _propTypes.default.string,
|
|
37
|
-
onClick: _propTypes.default.func,
|
|
38
|
-
disabled: _propTypes.default.bool
|
|
39
|
-
});
|
|
40
|
-
(0, _defineProperty2.default)(RawAddButton, "defaultProps", {
|
|
41
|
-
label: 'Add'
|
|
42
|
-
});
|
|
43
|
-
const AddButton = exports.AddButton = RawAddButton;
|
|
44
|
-
const StyledDeleteButton = (0, _styles.styled)(_Button.default)({
|
|
45
|
-
margin: 0,
|
|
46
|
-
padding: 0
|
|
47
|
-
});
|
|
48
|
-
const DeleteButton = ({
|
|
49
|
-
label,
|
|
50
|
-
onClick,
|
|
51
|
-
disabled
|
|
52
|
-
}) => /*#__PURE__*/_react.default.createElement(StyledDeleteButton, {
|
|
53
|
-
onClick: onClick,
|
|
54
|
-
size: "small",
|
|
55
|
-
color: "primary",
|
|
56
|
-
disabled: disabled
|
|
57
|
-
}, label);
|
|
58
|
-
exports.DeleteButton = DeleteButton;
|
|
59
|
-
//# sourceMappingURL=buttons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buttons.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Button","StyledAddButton","styled","Button","theme","height","spacing","RawAddButton","React","Component","render","label","onClick","disabled","props","default","createElement","size","variant","color","exports","_defineProperty2","PropTypes","string","func","bool","AddButton","StyledDeleteButton","margin","padding","DeleteButton"],"sources":["../../src/design/buttons.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\n\nconst StyledAddButton = styled(Button)(({ theme }) => ({\n height: theme.spacing(4),\n}));\n\nexport class RawAddButton extends React.Component {\n static propTypes = {\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n };\n\n static defaultProps = {\n label: 'Add',\n };\n\n render() {\n const { label, onClick, disabled } = this.props;\n return (\n <StyledAddButton\n onClick={onClick}\n disabled={disabled}\n size=\"small\"\n variant=\"contained\"\n color=\"primary\"\n >\n {label}\n </StyledAddButton>\n );\n }\n}\n\nconst AddButton = RawAddButton;\n\nconst StyledDeleteButton = styled(Button)({\n margin: 0,\n padding: 0,\n});\n\nconst DeleteButton = ({ label, onClick, disabled }) => (\n <StyledDeleteButton onClick={onClick} size=\"small\" color=\"primary\" disabled={disabled}>\n {label}\n </StyledDeleteButton>\n);\n\nexport { AddButton, DeleteButton };\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,MAAMI,eAAe,GAAG,IAAAC,cAAM,EAACC,eAAM,CAAC,CAAC,CAAC;EAAEC;AAAM,CAA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AA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.RowLabel = void 0;
|
|
8
|
-
var _utils = require("../utils");
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _styles = require("@mui/material/styles");
|
|
11
|
-
var _editableHtmlTipTap = _interopRequireDefault(require("@pie-lib/editable-html-tip-tap"));
|
|
12
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
13
|
-
const RowLabelContainer = (0, _styles.styled)(_renderUi.InputContainer)(({
|
|
14
|
-
theme
|
|
15
|
-
}) => ({
|
|
16
|
-
width: '100%',
|
|
17
|
-
paddingTop: theme.spacing(1),
|
|
18
|
-
marginTop: theme.spacing(1)
|
|
19
|
-
}));
|
|
20
|
-
const RowLabel = ({
|
|
21
|
-
categoriesPerRow,
|
|
22
|
-
configuration,
|
|
23
|
-
disabled,
|
|
24
|
-
markup,
|
|
25
|
-
imageSupport,
|
|
26
|
-
onChange,
|
|
27
|
-
toolbarOpts,
|
|
28
|
-
spellCheck,
|
|
29
|
-
maxImageWidth,
|
|
30
|
-
maxImageHeight,
|
|
31
|
-
uploadSoundSupport,
|
|
32
|
-
mathMlOptions = {}
|
|
33
|
-
}) => {
|
|
34
|
-
const {
|
|
35
|
-
rowLabels,
|
|
36
|
-
baseInputConfiguration
|
|
37
|
-
} = configuration;
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
-
style: {
|
|
40
|
-
gridColumn: `1/${categoriesPerRow + 1}`,
|
|
41
|
-
width: '100%'
|
|
42
|
-
}
|
|
43
|
-
}, /*#__PURE__*/_react.default.createElement(RowLabelContainer, {
|
|
44
|
-
label: "Row Label"
|
|
45
|
-
}, /*#__PURE__*/_react.default.createElement(_editableHtmlTipTap.default, {
|
|
46
|
-
disabled: disabled,
|
|
47
|
-
markup: markup,
|
|
48
|
-
onChange: onChange,
|
|
49
|
-
imageSupport: imageSupport,
|
|
50
|
-
nonEmpty: false,
|
|
51
|
-
toolbarOpts: toolbarOpts,
|
|
52
|
-
pluginProps: (0, _utils.getPluginProps)(rowLabels?.inputConfiguration, baseInputConfiguration),
|
|
53
|
-
spellCheck: spellCheck,
|
|
54
|
-
maxImageWidth: maxImageWidth,
|
|
55
|
-
maxImageHeight: maxImageHeight,
|
|
56
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
57
|
-
languageCharactersProps: [{
|
|
58
|
-
language: 'spanish'
|
|
59
|
-
}, {
|
|
60
|
-
language: 'special'
|
|
61
|
-
}],
|
|
62
|
-
mathMlOptions: mathMlOptions
|
|
63
|
-
})));
|
|
64
|
-
};
|
|
65
|
-
exports.RowLabel = RowLabel;
|
|
66
|
-
//# sourceMappingURL=RowLabel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RowLabel.js","names":["_utils","require","_react","_interopRequireDefault","_styles","_editableHtmlTipTap","_renderUi","RowLabelContainer","styled","InputContainer","theme","width","paddingTop","spacing","marginTop","RowLabel","categoriesPerRow","configuration","disabled","markup","imageSupport","onChange","toolbarOpts","spellCheck","maxImageWidth","maxImageHeight","uploadSoundSupport","mathMlOptions","rowLabels","baseInputConfiguration","default","createElement","style","gridColumn","label","nonEmpty","pluginProps","getPluginProps","inputConfiguration","languageCharactersProps","language","exports"],"sources":["../../../src/design/categories/RowLabel.jsx"],"sourcesContent":["import { getPluginProps } from '../utils';\nimport React from 'react';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { InputContainer } from '@pie-lib/render-ui';\n\nconst RowLabelContainer = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(1),\n}));\n\nexport const RowLabel = ({\n categoriesPerRow,\n configuration,\n disabled,\n markup,\n imageSupport,\n onChange,\n toolbarOpts,\n spellCheck,\n maxImageWidth,\n maxImageHeight,\n uploadSoundSupport,\n mathMlOptions = {},\n }) => {\n const { rowLabels, baseInputConfiguration } = configuration;\n\n return (\n <div\n style={{\n gridColumn: `1/${categoriesPerRow + 1}`,\n width: '100%',\n }}\n >\n <RowLabelContainer label=\"Row Label\">\n <EditableHtml\n disabled={disabled}\n markup={markup}\n onChange={onChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(rowLabels?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheck}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </RowLabelContainer>\n </div>\n );\n };\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,MAAMM,iBAAiB,GAAG,IAAAC,cAAM,EAACC,wBAAc,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC/DC,KAAK,EAAE,MAAM;EACbC,UAAU,EAAEF,KAAK,CAACG,OAAO,CAAC,CAAC,CAAC;EAC5BC,SAAS,EAAEJ,KAAK,CAACG,OAAO,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEI,MAAME,QAAQ,GAAGA,CAAC;EACrBC,gBAAgB;EAChBC,aAAa;EACbC,QAAQ;EACRC,MAAM;EACNC,YAAY;EACZC,QAAQ;EACRC,WAAW;EACXC,UAAU;EACVC,aAAa;EACbC,cAAc;EACdC,kBAAkB;EAClBC,aAAa,GAAG,CAAC;AACnB,CAAC,KAAK;EACJ,MAAM;IAAEC,SAAS;IAAEC;EAAuB,CAAC,GAAGZ,aAAa;EAE3D,oBACEf,MAAA,CAAA4B,OAAA,CAAAC,aAAA;IACEC,KAAK,EAAE;MACLC,UAAU,EAAE,KAAKjB,gBAAgB,GAAG,CAAC,EAAE;MACvCL,KAAK,EAAE;IACT;EAAE,gBAEFT,MAAA,CAAA4B,OAAA,CAAAC,aAAA,CAACxB,iBAAiB;IAAC2B,KAAK,EAAC;EAAW,gBAClChC,MAAA,CAAA4B,OAAA,CAAAC,aAAA,CAAC1B,mBAAA,CAAAyB,OAAY;IACXZ,QAAQ,EAAEA,QAAS;IACnBC,MAAM,EAAEA,MAAO;IACfE,QAAQ,EAAEA,QAAS;IACnBD,YAAY,EAAEA,YAAa;IAC3Be,QAAQ,EAAE,KAAM;IAChBb,WAAW,EAAEA,WAAY;IACzBc,WAAW,EAAE,IAAAC,qBAAc,EAACT,SAAS,EAAEU,kBAAkB,EAAET,sBAAsB,CAAE;IACnFN,UAAU,EAAEA,UAAW;IACvBC,aAAa,EAAEA,aAAc;IAC7BC,cAAc,EAAEA,cAAe;IAC/BC,kBAAkB,EAAEA,kBAAmB;IACvCa,uBAAuB,EAAE,CAAC;MAAEC,QAAQ,EAAE;IAAU,CAAC,EAAE;MAAEA,QAAQ,EAAE;IAAU,CAAC,CAAE;IAC5Eb,aAAa,EAAEA;EAAc,CAC9B,CACgB,CAChB,CAAC;AAEV,CAAC;AAACc,OAAA,CAAA1B,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.AlternateResponses = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _styles = require("@mui/material/styles");
|
|
12
|
-
var _categorize = require("@pie-lib/categorize");
|
|
13
|
-
var _category = _interopRequireDefault(require("./category"));
|
|
14
|
-
const CategoriesContainer = (0, _styles.styled)('div')(({
|
|
15
|
-
theme
|
|
16
|
-
}) => ({
|
|
17
|
-
marginBottom: theme.spacing(2.5)
|
|
18
|
-
}));
|
|
19
|
-
const CategoriesHolder = (0, _styles.styled)('div')(({
|
|
20
|
-
theme
|
|
21
|
-
}) => ({
|
|
22
|
-
display: 'grid',
|
|
23
|
-
gridRowGap: theme.spacing(1),
|
|
24
|
-
gridColumnGap: theme.spacing(1)
|
|
25
|
-
}));
|
|
26
|
-
const RowLabel = (0, _styles.styled)('div')({
|
|
27
|
-
gridColumn: '1 / 3'
|
|
28
|
-
});
|
|
29
|
-
class AlternateResponses extends _react.default.Component {
|
|
30
|
-
constructor(...args) {
|
|
31
|
-
super(...args);
|
|
32
|
-
(0, _defineProperty2.default)(this, "deleteChoiceFromCategory", (category, choice, choiceIndex) => {
|
|
33
|
-
const {
|
|
34
|
-
model,
|
|
35
|
-
altIndex,
|
|
36
|
-
onModelChanged
|
|
37
|
-
} = this.props;
|
|
38
|
-
const correctResponse = (0, _categorize.removeChoiceFromAlternate)(choice.id, category.id, choiceIndex, altIndex, model.correctResponse);
|
|
39
|
-
onModelChanged({
|
|
40
|
-
correctResponse
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
const {
|
|
46
|
-
altIndex,
|
|
47
|
-
model,
|
|
48
|
-
configuration,
|
|
49
|
-
categories,
|
|
50
|
-
imageSupport,
|
|
51
|
-
spellCheck,
|
|
52
|
-
uploadSoundSupport,
|
|
53
|
-
mathMlOptions = {}
|
|
54
|
-
} = this.props;
|
|
55
|
-
const {
|
|
56
|
-
categoriesPerRow,
|
|
57
|
-
errors,
|
|
58
|
-
rowLabels
|
|
59
|
-
} = model;
|
|
60
|
-
const {
|
|
61
|
-
duplicateAlternate
|
|
62
|
-
} = errors || {};
|
|
63
|
-
const holderStyle = {
|
|
64
|
-
gridTemplateColumns: `repeat(${categoriesPerRow}, 1fr)`
|
|
65
|
-
};
|
|
66
|
-
const isDuplicated = duplicateAlternate ? duplicateAlternate.index === altIndex : false;
|
|
67
|
-
return /*#__PURE__*/_react.default.createElement(CategoriesContainer, null, /*#__PURE__*/_react.default.createElement(CategoriesHolder, {
|
|
68
|
-
style: holderStyle
|
|
69
|
-
}, categories.map((category, index) => {
|
|
70
|
-
const hasRowLabel = index % categoriesPerRow === 0;
|
|
71
|
-
const rowIndex = index / categoriesPerRow;
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
73
|
-
key: index
|
|
74
|
-
}, hasRowLabel && /*#__PURE__*/_react.default.createElement(RowLabel, {
|
|
75
|
-
style: {
|
|
76
|
-
gridColumn: `1/${categoriesPerRow + 1}`,
|
|
77
|
-
width: '100%'
|
|
78
|
-
},
|
|
79
|
-
dangerouslySetInnerHTML: {
|
|
80
|
-
__html: rowLabels[rowIndex] || ''
|
|
81
|
-
}
|
|
82
|
-
}), /*#__PURE__*/_react.default.createElement(_category.default, {
|
|
83
|
-
key: index,
|
|
84
|
-
alternateResponseIndex: altIndex,
|
|
85
|
-
imageSupport: imageSupport,
|
|
86
|
-
isDuplicated: isDuplicated && duplicateAlternate.category === category.id,
|
|
87
|
-
category: category,
|
|
88
|
-
spellCheck: spellCheck,
|
|
89
|
-
onDeleteChoice: (choice, choiceIndex) => this.deleteChoiceFromCategory(category, choice, choiceIndex),
|
|
90
|
-
uploadSoundSupport: uploadSoundSupport,
|
|
91
|
-
mathMlOptions: mathMlOptions,
|
|
92
|
-
configuration: configuration,
|
|
93
|
-
isAlternate: true
|
|
94
|
-
}));
|
|
95
|
-
})));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.AlternateResponses = AlternateResponses;
|
|
99
|
-
(0, _defineProperty2.default)(AlternateResponses, "propTypes", {
|
|
100
|
-
altIndex: _propTypes.default.number.isRequired,
|
|
101
|
-
configuration: _propTypes.default.object,
|
|
102
|
-
imageSupport: _propTypes.default.shape({
|
|
103
|
-
add: _propTypes.default.func.isRequired,
|
|
104
|
-
delete: _propTypes.default.func.isRequired
|
|
105
|
-
}),
|
|
106
|
-
categories: _propTypes.default.array,
|
|
107
|
-
onModelChanged: _propTypes.default.func,
|
|
108
|
-
model: _propTypes.default.object.isRequired,
|
|
109
|
-
uploadSoundSupport: _propTypes.default.shape({
|
|
110
|
-
add: _propTypes.default.func.isRequired,
|
|
111
|
-
delete: _propTypes.default.func.isRequired
|
|
112
|
-
}),
|
|
113
|
-
spellCheck: _propTypes.default.bool
|
|
114
|
-
});
|
|
115
|
-
var _default = exports.default = AlternateResponses;
|
|
116
|
-
//# sourceMappingURL=alternateResponses.js.map
|