@pie-element/categorize 6.7.2 → 6.7.3-next.1008
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 +160 -0
- package/configure/CHANGELOG.md +117 -0
- package/configure/lib/defaults.js +11 -1
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/design/builder.js +1 -1
- package/configure/lib/design/buttons.js +6 -4
- package/configure/lib/design/buttons.js.map +1 -1
- package/configure/lib/design/categories/alternateResponses.js +4 -2
- package/configure/lib/design/categories/alternateResponses.js.map +1 -1
- package/configure/lib/design/categories/category.js +9 -4
- package/configure/lib/design/categories/category.js.map +1 -1
- package/configure/lib/design/categories/choice-preview.js +4 -4
- package/configure/lib/design/categories/choice-preview.js.map +1 -1
- package/configure/lib/design/categories/droppable-placeholder.js +3 -3
- package/configure/lib/design/categories/droppable-placeholder.js.map +1 -1
- package/configure/lib/design/categories/index.js +69 -10
- package/configure/lib/design/categories/index.js.map +1 -1
- package/configure/lib/design/choices/choice.js +21 -6
- package/configure/lib/design/choices/choice.js.map +1 -1
- package/configure/lib/design/choices/config.js +5 -3
- package/configure/lib/design/choices/config.js.map +1 -1
- package/configure/lib/design/choices/index.js +34 -8
- package/configure/lib/design/choices/index.js.map +1 -1
- package/configure/lib/design/header.js +15 -5
- package/configure/lib/design/header.js.map +1 -1
- package/configure/lib/design/index.js +41 -11
- package/configure/lib/design/index.js.map +1 -1
- package/configure/lib/design/input-header.js +12 -4
- package/configure/lib/design/input-header.js.map +1 -1
- package/configure/lib/index.js +3 -3
- package/configure/lib/main.js +1 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/utils.js +20 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +4 -4
- package/controller/CHANGELOG.md +16 -0
- package/controller/lib/index.js +83 -3
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/docs/config-schema.json +31 -0
- package/docs/config-schema.json.md +24 -0
- package/docs/demo/generate.js +1 -0
- package/docs/pie-schema.json +16 -0
- package/docs/pie-schema.json.md +15 -0
- package/lib/categorize/categories.js +9 -4
- package/lib/categorize/categories.js.map +1 -1
- package/lib/categorize/category.js +4 -4
- package/lib/categorize/category.js.map +1 -1
- package/lib/categorize/choice.js +5 -4
- package/lib/categorize/choice.js.map +1 -1
- package/lib/categorize/choices.js +12 -5
- package/lib/categorize/choices.js.map +1 -1
- package/lib/categorize/droppable-placeholder.js +2 -2
- package/lib/categorize/droppable-placeholder.js.map +1 -1
- package/lib/categorize/grid-content.js +3 -3
- package/lib/categorize/grid-content.js.map +1 -1
- package/lib/categorize/index.js +11 -15
- package/lib/categorize/index.js.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/docs/demo/.pie/.configure/package.json +0 -10
- package/docs/demo/.pie/.configure/yarn.lock +0 -1128
- package/docs/demo/.pie/.controllers/package.json +0 -10
- package/docs/demo/.pie/.controllers/yarn.lock +0 -43
- package/docs/demo/.pie/info.entry.js +0 -89
- package/docs/demo/.pie/info.webpack.config.js +0 -108
- package/docs/demo/.pie/package.json +0 -10
- package/docs/demo/.pie/yarn.lock +0 -579
- package/module/configure.js +0 -3155
- package/module/controller.js +0 -19950
- package/module/demo.js +0 -118
- package/module/element.js +0 -1470
- package/module/index.html +0 -16
- package/module/manifest.json +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,166 @@
|
|
|
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
|
+
## [6.9.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.14...@pie-element/categorize@6.9.15) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [6.9.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.13...@pie-element/categorize@6.9.14) (2022-03-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [6.9.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.12...@pie-element/categorize@6.9.13) (2022-03-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [6.9.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.11...@pie-element/categorize@6.9.12) (2022-03-08)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [6.9.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.10...@pie-element/categorize@6.9.11) (2022-02-21)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [6.9.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.9...@pie-element/categorize@6.9.10) (2022-02-04)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [6.9.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.8...@pie-element/categorize@6.9.9) (2022-01-24)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Bug Fixes
|
|
58
|
+
|
|
59
|
+
* use preview prompt for prompt, rationale and teacher instructions to fix table rendering PD-1456 ([f330601](https://github.com/pie-framework/pie-elements/commit/f3306019a2d1c8ce3e2783823dfe9ef0a0394e4f))
|
|
60
|
+
* **categorize:** fix layout issue and choice content direction PD-1420 ([f6f7a3c](https://github.com/pie-framework/pie-elements/commit/f6f7a3c50173669cf994a358eea58d97d9b1f507))
|
|
61
|
+
* **categorize:** render choicesLabel as Html ([ca8c542](https://github.com/pie-framework/pie-elements/commit/ca8c54297d8ab7370ea452a17f5be60f94b55843))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## [6.9.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.7...@pie-element/categorize@6.9.8) (2022-01-10)
|
|
68
|
+
|
|
69
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## [6.9.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.6...@pie-element/categorize@6.9.7) (2021-12-23)
|
|
76
|
+
|
|
77
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## [6.9.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.4...@pie-element/categorize@6.9.5) (2021-12-13)
|
|
84
|
+
|
|
85
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## [6.9.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.1...@pie-element/categorize@6.9.2) (2021-11-29)
|
|
92
|
+
|
|
93
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## [6.9.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.3...@pie-element/categorize@6.9.1) (2021-11-11)
|
|
100
|
+
|
|
101
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# [6.9.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.7.2...@pie-element/categorize@6.9.0) (2021-11-11)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Bug Fixes
|
|
111
|
+
|
|
112
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
113
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
114
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Features
|
|
118
|
+
|
|
119
|
+
* **categorize:** set toolbar editor position to bottom ([10da834](https://github.com/pie-framework/pie-elements/commit/10da834902b136aa4fa83e46315d9155d4308b5a))
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## [6.8.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.2...@pie-element/categorize@6.8.3) (2021-10-04)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## [6.8.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.1...@pie-element/categorize@6.8.2) (2021-09-20)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
### Bug Fixes
|
|
138
|
+
|
|
139
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
140
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
141
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
## [6.8.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.0...@pie-element/categorize@6.8.1) (2021-09-01)
|
|
148
|
+
|
|
149
|
+
**Note:** Version bump only for package @pie-element/categorize
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
# [6.8.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.7.2...@pie-element/categorize@6.8.0) (2021-08-05)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Features
|
|
159
|
+
|
|
160
|
+
* **categorize:** set toolbar editor position to bottom ([10da834](https://github.com/pie-framework/pie-elements/commit/10da834902b136aa4fa83e46315d9155d4308b5a))
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
6
166
|
## [6.7.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.7.0...@pie-element/categorize@6.7.2) (2021-08-05)
|
|
7
167
|
|
|
8
168
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,123 @@
|
|
|
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
|
+
## [5.4.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.18...@pie-element/categorize-configure@5.4.19) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [5.4.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.17...@pie-element/categorize-configure@5.4.18) (2022-03-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [5.4.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.16...@pie-element/categorize-configure@5.4.17) (2022-03-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [5.4.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.15...@pie-element/categorize-configure@5.4.16) (2022-03-08)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## [5.4.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.14...@pie-element/categorize-configure@5.4.15) (2022-02-21)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [5.4.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.13...@pie-element/categorize-configure@5.4.14) (2022-02-04)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## [5.4.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.12...@pie-element/categorize-configure@5.4.13) (2022-01-24)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## [5.4.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.11...@pie-element/categorize-configure@5.4.12) (2022-01-10)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [5.4.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.10...@pie-element/categorize-configure@5.4.11) (2021-12-23)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## [5.4.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.8...@pie-element/categorize-configure@5.4.9) (2021-12-13)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## [5.4.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.5...@pie-element/categorize-configure@5.4.6) (2021-11-29)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [5.4.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.4...@pie-element/categorize-configure@5.4.5) (2021-10-04)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## [5.4.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.3...@pie-element/categorize-configure@5.4.4) (2021-09-20)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Bug Fixes
|
|
106
|
+
|
|
107
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
108
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
109
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
## [5.4.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.2...@pie-element/categorize-configure@5.4.3) (2021-08-05)
|
|
116
|
+
|
|
117
|
+
**Note:** Version bump only for package @pie-element/categorize-configure
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
6
123
|
## [5.4.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.0...@pie-element/categorize-configure@5.4.2) (2021-08-05)
|
|
7
124
|
|
|
8
125
|
|
|
@@ -21,9 +21,15 @@ var _default = {
|
|
|
21
21
|
rationaleEnabled: true,
|
|
22
22
|
promptEnabled: true,
|
|
23
23
|
teacherInstructionsEnabled: true,
|
|
24
|
-
studentInstructionsEnabled: true
|
|
24
|
+
studentInstructionsEnabled: true,
|
|
25
|
+
toolbarEditorPosition: 'bottom'
|
|
25
26
|
},
|
|
26
27
|
configuration: {
|
|
28
|
+
spellCheck: {
|
|
29
|
+
label: 'Spellcheck',
|
|
30
|
+
settings: false,
|
|
31
|
+
enabled: true
|
|
32
|
+
},
|
|
27
33
|
feedback: {
|
|
28
34
|
settings: true,
|
|
29
35
|
label: 'Feedback',
|
|
@@ -56,6 +62,10 @@ var _default = {
|
|
|
56
62
|
teacherInstructions: {
|
|
57
63
|
settings: true,
|
|
58
64
|
label: 'Teacher Instructions'
|
|
65
|
+
},
|
|
66
|
+
toolbarEditorPosition: {
|
|
67
|
+
settings: false,
|
|
68
|
+
label: 'Toolbar Editor Position'
|
|
59
69
|
}
|
|
60
70
|
}
|
|
61
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","choices","choicesPosition","choicesLabel","lockChoiceOrder","removeTilesAfterPlacing","categoriesPerRow","categories","alternates","correctResponse","rowLabels","partialScoring","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","choices","choicesPosition","choicesLabel","lockChoiceOrder","removeTilesAfterPlacing","categoriesPerRow","categories","alternates","correctResponse","rowLabels","partialScoring","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","spellCheck","label","settings","enabled","feedback","prompt","rationale","scoringType","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,EADJ;AAELC,IAAAA,eAAe,EAAE,OAFZ;AAGLC,IAAAA,YAAY,EAAE,EAHT;AAILC,IAAAA,eAAe,EAAE,IAJZ;AAKLC,IAAAA,uBAAuB,EAAE,KALpB;AAMLC,IAAAA,gBAAgB,EAAE,CANb;AAOLC,IAAAA,UAAU,EAAE,EAPP;AAQLC,IAAAA,UAAU,EAAE,EARP;AASLC,IAAAA,eAAe,EAAE,EATZ;AAULC,IAAAA,SAAS,EAAE,CAAC,EAAD,CAVN;AAWLC,IAAAA,cAAc,EAAE,IAXX;AAYLC,IAAAA,eAAe,EAAE,IAZZ;AAaLC,IAAAA,gBAAgB,EAAE,IAbb;AAcLC,IAAAA,a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Content":["export default {\n model: {\n choices: [],\n choicesPosition: 'below',\n choicesLabel: '',\n lockChoiceOrder: true,\n removeTilesAfterPlacing: false,\n categoriesPerRow: 2,\n categories: [],\n alternates: [],\n correctResponse: [],\n rowLabels: [''],\n partialScoring: true,\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\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: false,\n label: 'Lock Choice Order'\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n rationale: {\n settings: true,\n label: 'Rationale'\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions'\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n toolbarEditorPosition:{\n settings: false,\n label: 'Toolbar Editor Position'\n },\n }\n};\n"],"file":"defaults.js"}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.buildCategories = exports.buildAlternateResponses = void 0;
|
|
9
9
|
|
|
10
10
|
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.RawAddButton = exports.Divider = exports.DeleteButton = exports.AddButton = void 0;
|
|
9
9
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
|
|
@@ -33,7 +33,7 @@ var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
|
|
|
33
33
|
|
|
34
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
35
35
|
|
|
36
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
|
|
38
38
|
var RawAddButton = /*#__PURE__*/function (_React$Component) {
|
|
39
39
|
(0, _inherits2["default"])(RawAddButton, _React$Component);
|
|
@@ -99,12 +99,14 @@ var DeleteButton = (0, _styles.withStyles)(function () {
|
|
|
99
99
|
})(function (_ref) {
|
|
100
100
|
var classes = _ref.classes,
|
|
101
101
|
label = _ref.label,
|
|
102
|
-
onClick = _ref.onClick
|
|
102
|
+
onClick = _ref.onClick,
|
|
103
|
+
disabled = _ref.disabled;
|
|
103
104
|
return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
104
105
|
className: classes.deleteButton,
|
|
105
106
|
onClick: onClick,
|
|
106
107
|
size: "small",
|
|
107
|
-
color: "primary"
|
|
108
|
+
color: "primary",
|
|
109
|
+
disabled: disabled
|
|
108
110
|
}, label);
|
|
109
111
|
});
|
|
110
112
|
exports.DeleteButton = DeleteButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/design/buttons.jsx"],"names":["RawAddButton","props","classes","className","label","onClick","disabled","addButton","React","Component","PropTypes","object","isRequired","string","func","bool","styles","theme","height","spacing","unit","AddButton","DeleteButton","deleteButton","margin","padding","Divider","divider","marginTop","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,Y;;;;;;;;;;;;WAaX,kBAAS;
|
|
1
|
+
{"version":3,"sources":["../../src/design/buttons.jsx"],"names":["RawAddButton","props","classes","className","label","onClick","disabled","addButton","React","Component","PropTypes","object","isRequired","string","func","bool","styles","theme","height","spacing","unit","AddButton","DeleteButton","deleteButton","margin","padding","Divider","divider","marginTop","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,Y;;;;;;;;;;;;WAaX,kBAAS;AACP,wBAAyD,KAAKC,KAA9D;AAAA,UAAQC,OAAR,eAAQA,OAAR;AAAA,UAAiBC,SAAjB,eAAiBA,SAAjB;AAAA,UAA4BC,KAA5B,eAA4BA,KAA5B;AAAA,UAAmCC,OAAnC,eAAmCA,OAAnC;AAAA,UAA4CC,QAA5C,eAA4CA,QAA5C;AACA,0BACE,gCAAC,kBAAD;AACE,QAAA,OAAO,EAAED,OADX;AAEE,QAAA,QAAQ,EAAEC,QAFZ;AAGE,QAAA,SAAS,EAAE,4BAAWJ,OAAO,CAACK,SAAnB,EAA8BJ,SAA9B,CAHb;AAIE,QAAA,IAAI,EAAC,OAJP;AAKE,QAAA,OAAO,EAAC,WALV;AAME,QAAA,KAAK,EAAC;AANR,SAQGC,KARH,CADF;AAYD;;;EA3B+BI,kBAAMC,S;;;iCAA3BT,Y,eACQ;AACjBE,EAAAA,OAAO,EAAEQ,sBAAUC,MAAV,CAAiBC,UADT;AAEjBT,EAAAA,SAAS,EAAEO,sBAAUG,MA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AAAA,MAAGlB,OAAH,SAAGA,OAAH;AAAA,sBAAiB,gCAAC,mBAAD;AAAY,IAAA,SAAS,EAAEA,OAAO,CAACyB;AAA/B,IAAjB;AAAA,CALY,CAAhB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport Button from '@material-ui/core/Button';\nimport MuiDivider from '@material-ui/core/Divider';\n\nexport class RawAddButton extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\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 { classes, className, label, onClick, disabled } = this.props;\n return (\n <Button\n onClick={onClick}\n disabled={disabled}\n className={classNames(classes.addButton, className)}\n size=\"small\"\n variant=\"contained\"\n color=\"primary\"\n >\n {label}\n </Button>\n );\n }\n}\nconst styles = theme => ({\n addButton: {\n height: theme.spacing.unit * 4\n }\n});\n\nconst AddButton = withStyles(styles)(RawAddButton);\n\nconst DeleteButton = withStyles(() => ({\n deleteButton: {\n margin: 0,\n padding: 0\n }\n}))(({ classes, label, onClick, disabled }) => (\n <Button\n className={classes.deleteButton}\n onClick={onClick}\n size=\"small\"\n color=\"primary\"\n disabled={disabled}\n >\n {label}\n </Button>\n));\n\nconst Divider = withStyles(theme => ({\n divider: {\n marginTop: 2 * theme.spacing.unit,\n marginBottom: 2 * theme.spacing.unit\n }\n}))(({ classes }) => <MuiDivider className={classes.divider} />);\n\nexport { AddButton, DeleteButton, Divider };\n"],"file":"buttons.js"}
|
|
@@ -33,7 +33,7 @@ var _category = _interopRequireDefault(require("./category"));
|
|
|
33
33
|
|
|
34
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
35
35
|
|
|
36
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
|
|
38
38
|
var styles = function styles(theme) {
|
|
39
39
|
return {
|
|
@@ -134,7 +134,8 @@ var AlternateResponses = /*#__PURE__*/function (_React$Component) {
|
|
|
134
134
|
classes = _this$props3.classes,
|
|
135
135
|
className = _this$props3.className,
|
|
136
136
|
categories = _this$props3.categories,
|
|
137
|
-
imageSupport = _this$props3.imageSupport
|
|
137
|
+
imageSupport = _this$props3.imageSupport,
|
|
138
|
+
spellCheck = _this$props3.spellCheck;
|
|
138
139
|
var categoriesPerRow = model.categoriesPerRow;
|
|
139
140
|
var holderStyle = {
|
|
140
141
|
gridTemplateColumns: "repeat(".concat(categoriesPerRow, ", 1fr)")
|
|
@@ -149,6 +150,7 @@ var AlternateResponses = /*#__PURE__*/function (_React$Component) {
|
|
|
149
150
|
key: index,
|
|
150
151
|
imageSupport: imageSupport,
|
|
151
152
|
category: category,
|
|
153
|
+
spellCheck: spellCheck,
|
|
152
154
|
onAddChoice: _this2.addChoiceToCategory,
|
|
153
155
|
onDeleteChoice: function onDeleteChoice(choice, choiceIndex) {
|
|
154
156
|
return _this2.deleteChoiceFromCategory(category, choice, choiceIndex);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/design/categories/alternateResponses.jsx"],"names":["styles","theme","categories","marginBottom","spacing","unit","categoriesHolder","display","gridRowGap","gridColumnGap","row","gridTemplateColumns","alignItems","width","marginTop","rowLabel","gridColumn","rowLabelHolder","AlternateResponses","choice","categoryId","props","altIndex","correctResponse","model","onModelChanged","forEach","a","category","alternateResponses","push","id","filter","altId","classes","className","imageSupport","categoriesPerRow","holderStyle","map","index","addChoiceToCategory","choiceIndex","deleteChoiceFromCategory","React","Component","PropTypes","number","isRequired","shape","add","func","object","string","array"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,YAAY,EAAEF,KAAK,CAACG,OAAN,CAAcC;AADlB,KADW;AAIvBC,IAAAA,gBAAgB,EAAE;AAChBC,MAAAA,OAAO,EAAE,MADO;AAEhBC,MAAAA,UAAU,YAAKP,KAAK,CAACG,OAAN,CAAcC,IAAnB,OAFM;AAGhBI,MAAAA,aAAa,YAAKR,KAAK,CAACG,OAAN,CAAcC,IAAnB;AAHG,KAJK;AASvBK,IAAAA,GAAG,EAAE;AACHH,MAAAA,OAAO,EAAE,MADN;AAEHI,MAAAA,mBAAmB,EAAE,gBAFlB;AAGHF,MAAAA,aAAa,YAAKR,KAAK,CAACG,OAAN,CAAcC,IAAnB,OAHV;AAIHO,MAAAA,UAAU,EAAE,UAJT;AAKHC,MAAAA,KAAK,EAAE,MALJ;AAMHC,MAAAA,SAAS,EAAEb,KAAK,CAACG,OAAN,CAAcC,IANtB;AAOHF,MAAAA,YAAY,EAAE,IAAIF,KAAK,CAACG,OAAN,CAAcC;AAP7B,KATkB;AAkBvBU,IAAAA,QAAQ,EAAE;AACRC,MAAAA,UAAU,EAAE;AADJ,KAlBa;AAqBvBC,IAAAA,cAAc,EAAE;AACdJ,MAAAA,KAAK,EAAE;AADO;AArBO,GAAL;AAAA,CAApB;;IA0BaK,kB;;;;;;;;;;;;;;;4GAcW,UAACC,MAAD,EAASC,UAAT,EAAwB;
|
|
1
|
+
{"version":3,"sources":["../../../src/design/categories/alternateResponses.jsx"],"names":["styles","theme","categories","marginBottom","spacing","unit","categoriesHolder","display","gridRowGap","gridColumnGap","row","gridTemplateColumns","alignItems","width","marginTop","rowLabel","gridColumn","rowLabelHolder","AlternateResponses","choice","categoryId","props","altIndex","correctResponse","model","onModelChanged","forEach","a","category","alternateResponses","push","id","filter","altId","classes","className","imageSupport","spellCheck","categoriesPerRow","holderStyle","map","index","addChoiceToCategory","choiceIndex","deleteChoiceFromCategory","React","Component","PropTypes","number","isRequired","shape","add","func","object","string","array"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBC,IAAAA,UAAU,EAAE;AACVC,MAAAA,YAAY,EAAEF,KAAK,CAACG,OAAN,CAAcC;AADlB,KADW;AAIvBC,IAAAA,gBAAgB,EAAE;AAChBC,MAAAA,OAAO,EAAE,MADO;AAEhBC,MAAAA,UAAU,YAAKP,KAAK,CAACG,OAAN,CAAcC,IAAnB,OAFM;AAGhBI,MAAAA,aAAa,YAAKR,KAAK,CAACG,OAAN,CAAcC,IAAnB;AAHG,KAJK;AASvBK,IAAAA,GAAG,EAAE;AACHH,MAAAA,OAAO,EAAE,MADN;AAEHI,MAAAA,mBAAmB,EAAE,gBAFlB;AAGHF,MAAAA,aAAa,YAAKR,KAAK,CAACG,OAAN,CAAcC,IAAnB,OAHV;AAIHO,MAAAA,UAAU,EAAE,UAJT;AAKHC,MAAAA,KAAK,EAAE,MALJ;AAMHC,MAAAA,SAAS,EAAEb,KAAK,CAACG,OAAN,CAAcC,IANtB;AAOHF,MAAAA,YAAY,EAAE,IAAIF,KAAK,CAACG,OAAN,CAAcC;AAP7B,KATkB;AAkBvBU,IAAAA,QAAQ,EAAE;AACRC,MAAAA,UAAU,EAAE;AADJ,KAlBa;AAqBvBC,IAAAA,cAAc,EAAE;AACd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D,CADc;AAAA;AANlB,UADc;AAAA,OAAf,CADH,CADF,CADF;AAkBD;;;EArFqCE,kBAAMC,S;;;iCAAjC5B,kB,eACQ;AACjBI,EAAAA,QAAQ,EAAEyB,sBAAUC,MAAV,CAAiBC,UADV;AAEjBb,EAAAA,YAAY,EAAEW,sBAAUG,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEJ,sBAAUK,IAAV,CAAeH,UADQ;AAE5B,cAAQF,sBAAUK,IAAV,CAAeH;AAFK,GAAhB,CAFG;AAMjBf,EAAAA,OAAO,EAAEa,sBAAUM,MAAV,CAAiBJ,UANT;AAOjBd,EAAAA,SAAS,EAAEY,sBAAUO,MAPJ;AAQjBpD,EAAAA,UAAU,EAAE6C,sBAAUQ,KARL;AASjB9B,EAAAA,cAAc,EAAEsB,sBAAUK,IATT;AAUjB5B,EAAAA,KAAK,EAAEuB,sBAAUM,MAAV,CAAiBJ;AAVP,C;;eAuFN,wBAAWjD,MAAX,EAAmBkB,kBAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport Category from './category';\n\nconst styles = theme => ({\n categories: {\n marginBottom: theme.spacing.unit\n },\n categoriesHolder: {\n display: 'grid',\n gridRowGap: `${theme.spacing.unit}px`,\n gridColumnGap: `${theme.spacing.unit}px`\n },\n row: {\n display: 'grid',\n gridTemplateColumns: 'repeat(2, 1fr)',\n gridColumnGap: `${theme.spacing.unit}px`,\n alignItems: 'baseline',\n width: '100%',\n marginTop: theme.spacing.unit,\n marginBottom: 2 * theme.spacing.unit\n },\n rowLabel: {\n gridColumn: '1/3'\n },\n rowLabelHolder: {\n width: '100%'\n }\n});\n\nexport class AlternateResponses extends React.Component {\n static propTypes = {\n altIndex: PropTypes.number.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired\n }),\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n categories: PropTypes.array,\n onModelChanged: PropTypes.func,\n model: PropTypes.object.isRequired\n };\n\n addChoiceToCategory = (choice, categoryId) => {\n const { altIndex, model: { correctResponse }, onModelChanged } = this.props;\n\n correctResponse.forEach(a => {\n if (a.category === categoryId) {\n a.alternateResponses = a.alternateResponses || [];\n\n if (!a.alternateResponses[altIndex]) {\n a.alternateResponses[altIndex] = [];\n }\n\n a.alternateResponses[altIndex].push(choice.id);\n\n return a;\n }\n\n return a;\n });\n\n onModelChanged({ correctResponse });\n };\n\n deleteChoiceFromCategory = (category, choice) => {\n const { altIndex, model: { correctResponse }, onModelChanged } = this.props;\n\n correctResponse.forEach(a => {\n if (a.category === category.id) {\n if (a.alternateResponses[altIndex]) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].filter(altId => altId !== choice.id);\n }\n }\n\n return a;\n });\n\n onModelChanged({ correctResponse });\n };\n\n render() {\n const {\n model,\n classes,\n className,\n categories,\n imageSupport,\n spellCheck\n } = this.props;\n const { categoriesPerRow } = model;\n\n const holderStyle = {\n gridTemplateColumns: `repeat(${categoriesPerRow}, 1fr)`\n };\n\n return (\n <div className={classNames(classes.categories, className)}>\n <div className={classes.categoriesHolder} style={holderStyle}>\n {categories.map((category, index) => (\n <Category\n key={index}\n imageSupport={imageSupport}\n category={category}\n spellCheck={spellCheck}\n onAddChoice={this.addChoiceToCategory}\n onDeleteChoice={(choice, choiceIndex) =>\n this.deleteChoiceFromCategory(category, choice, choiceIndex)\n }\n />\n ))}\n </div>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(AlternateResponses);\n"],"file":"alternateResponses.js"}
|
|
@@ -41,7 +41,7 @@ var _droppablePlaceholder = _interopRequireDefault(require("./droppable-placehol
|
|
|
41
41
|
|
|
42
42
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
43
43
|
|
|
44
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
44
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
45
45
|
|
|
46
46
|
var Category = /*#__PURE__*/function (_React$Component) {
|
|
47
47
|
(0, _inherits2["default"])(Category, _React$Component);
|
|
@@ -79,14 +79,18 @@ var Category = /*#__PURE__*/function (_React$Component) {
|
|
|
79
79
|
onDelete = _this$props2.onDelete,
|
|
80
80
|
onDeleteChoice = _this$props2.onDeleteChoice,
|
|
81
81
|
onAddChoice = _this$props2.onAddChoice,
|
|
82
|
-
imageSupport = _this$props2.imageSupport
|
|
82
|
+
imageSupport = _this$props2.imageSupport,
|
|
83
|
+
spellCheck = _this$props2.spellCheck,
|
|
84
|
+
toolbarOpts = _this$props2.toolbarOpts;
|
|
83
85
|
return /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
84
86
|
className: (0, _classnames["default"])(classes.category, className)
|
|
85
87
|
}, onChange && /*#__PURE__*/_react["default"].createElement(_inputHeader["default"], {
|
|
86
88
|
label: category.label,
|
|
87
89
|
onChange: this.changeLabel,
|
|
88
90
|
onDelete: onDelete,
|
|
89
|
-
imageSupport: imageSupport
|
|
91
|
+
imageSupport: imageSupport,
|
|
92
|
+
toolbarOpts: toolbarOpts,
|
|
93
|
+
spellCheck: spellCheck
|
|
90
94
|
}), /*#__PURE__*/_react["default"].createElement(_droppablePlaceholder["default"], {
|
|
91
95
|
className: classes.placeHolder,
|
|
92
96
|
choices: category.choices,
|
|
@@ -116,7 +120,8 @@ exports.Category = Category;
|
|
|
116
120
|
imageSupport: _propTypes["default"].shape({
|
|
117
121
|
add: _propTypes["default"].func.isRequired,
|
|
118
122
|
"delete": _propTypes["default"].func.isRequired
|
|
119
|
-
})
|
|
123
|
+
}),
|
|
124
|
+
toolbarOpts: _propTypes["default"].object
|
|
120
125
|
});
|
|
121
126
|
(0, _defineProperty2["default"])(Category, "defaultProps", {});
|
|
122
127
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/design/categories/category.jsx"],"names":["Category","l","props","category","onChange","label","classes","className","onDelete","onDeleteChoice","onAddChoice","imageSupport","changeLabel","placeHolder","choices","id","actions","React","Component","PropTypes","object","isRequired","string","func","shape","add","styles","theme","minHeight","deleteButton","margin","padding","paddingBottom","paddingTop","spacing","unit","iconButtonRoot","width","height","header","display","justifyContent","overflow","editor","flex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEaA,Q;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/design/categories/category.jsx"],"names":["Category","l","props","category","onChange","label","classes","className","onDelete","onDeleteChoice","onAddChoice","imageSupport","spellCheck","toolbarOpts","changeLabel","placeHolder","choices","id","actions","React","Component","PropTypes","object","isRequired","string","func","shape","add","styles","theme","minHeight","deleteButton","margin","padding","paddingBottom","paddingTop","spacing","unit","iconButtonRoot","width","height","header","display","justifyContent","overflow","editor","flex"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;IAEaA,Q;;;;;;;;;;;;;;;oGAkBG,UAAAC,CAAC,EAAI;AACjB,wBAA+B,MAAKC,KAApC;AAAA,UAAQC,QAAR,eAAQA,QAAR;AAAA,UAAkBC,QAAlB,eAAkBA,QAAlB;AACAD,MAAAA,QAAQ,CAACE,KAAT,GAAiBJ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ApBa;AAwBvBC,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAE,GADA;AAENZ,MAAAA,aAAa,EAAEL,KAAK,CAACO,OAAN,CAAcC,IAAd,GAAqB;AAF9B;AAxBe,GAAL;AAAA,CAApB;;eA6Be,wBAAWT,MAAX,EAAmB5B,QAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport Card from '@material-ui/core/Card';\nimport InputHeader from '../input-header';\nimport CardActions from '@material-ui/core/CardActions';\nimport { DeleteButton } from '../buttons';\n\nimport PlaceHolder from './droppable-placeholder';\n\nexport class Category extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n category: PropTypes.object.isRequired,\n onChange: PropTypes.func,\n onDelete: PropTypes.func,\n onDeleteChoice: PropTypes.func,\n onAddChoice: PropTypes.func,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired\n }),\n toolbarOpts: PropTypes.object\n };\n\n static defaultProps = {};\n\n changeLabel = l => {\n const { category, onChange } = this.props;\n category.label = l;\n onChange(category);\n };\n\n render() {\n const {\n category,\n classes,\n className,\n onChange,\n onDelete,\n onDeleteChoice,\n onAddChoice,\n imageSupport,\n spellCheck,\n toolbarOpts\n } = this.props;\n return (\n <Card className={classNames(classes.category, className)}>\n {\n onChange && (\n <InputHeader\n label={category.label}\n onChange={this.changeLabel}\n onDelete={onDelete}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n />\n )\n }\n <PlaceHolder\n className={classes.placeHolder}\n choices={category.choices}\n onDeleteChoice={onDeleteChoice}\n onDropChoice={onAddChoice}\n categoryId={category.id}\n />\n {\n onDelete && (\n <CardActions className={classes.actions}>\n <DeleteButton label={'delete'} onClick={onDelete} />\n </CardActions>\n )\n }\n </Card>\n );\n }\n}\nconst styles = theme => ({\n placeHolder: {\n minHeight: '100px'\n },\n deleteButton: {\n margin: 0\n },\n actions: {\n padding: 0,\n paddingBottom: 0,\n paddingTop: theme.spacing.unit\n },\n iconButtonRoot: {\n width: 'auto',\n height: 'auto'\n },\n header: {\n display: 'flex',\n justifyContent: 'space-between'\n },\n category: {\n padding: theme.spacing.unit,\n overflow: 'visible'\n },\n editor: {\n flex: '1',\n paddingBottom: theme.spacing.unit * 2\n }\n});\nexport default withStyles(styles)(Category);\n"],"file":"category.js"}
|
|
@@ -39,7 +39,7 @@ var _renderUi = require("@pie-lib/render-ui");
|
|
|
39
39
|
|
|
40
40
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
41
41
|
|
|
42
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
42
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
43
|
|
|
44
44
|
var ChoicePreview = /*#__PURE__*/function (_React$Component) {
|
|
45
45
|
(0, _inherits2["default"])(ChoicePreview, _React$Component);
|
|
@@ -74,14 +74,14 @@ var ChoicePreview = /*#__PURE__*/function (_React$Component) {
|
|
|
74
74
|
choice = _this$props2.choice;
|
|
75
75
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
76
76
|
className: (0, _classnames["default"])(classes.choicePreview, className)
|
|
77
|
-
}, /*#__PURE__*/_react["default"].createElement(_drag.Choice, null, /*#__PURE__*/_react["default"].createElement(_renderUi.HtmlAndMath, {
|
|
78
|
-
html: choice.content
|
|
77
|
+
}, choice ? /*#__PURE__*/_react["default"].createElement(_drag.Choice, null, /*#__PURE__*/_react["default"].createElement(_renderUi.HtmlAndMath, {
|
|
78
|
+
html: choice === null || choice === void 0 ? void 0 : choice.content
|
|
79
79
|
}), /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
80
80
|
color: "secondary",
|
|
81
81
|
"aria-label": "delete",
|
|
82
82
|
className: classes["delete"],
|
|
83
83
|
onClick: this["delete"]
|
|
84
|
-
}, /*#__PURE__*/_react["default"].createElement(_Delete["default"], null))));
|
|
84
|
+
}, /*#__PURE__*/_react["default"].createElement(_Delete["default"], null))) : null);
|
|
85
85
|
}
|
|
86
86
|
}]);
|
|
87
87
|
return ChoicePreview;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/design/categories/choice-preview.jsx"],"names":["ChoicePreview","props","onDelete","choice","classes","className","choicePreview","content","React","Component","PropTypes","object","isRequired","string","func","styles","position","right","top"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,a;;;;;;;;;;;;;;;+FASF,YAAM;
|
|
1
|
+
{"version":3,"sources":["../../../src/design/categories/choice-preview.jsx"],"names":["ChoicePreview","props","onDelete","choice","classes","className","choicePreview","content","React","Component","PropTypes","object","isRequired","string","func","styles","position","right","top"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,a;;;;;;;;;;;;;;;+FASF,YAAM;AACb,wBAA6B,MAAKC,KAAlC;AAAA,UAAQC,QAAR,eAAQA,QAAR;AAAA,UAAkBC,MAAlB,eAAkBA,MAAlB;AACAD,MAAAA,QAAQ,CAACC,MAAD,CAAR;AACD,K;;;;;;WAED,kBAAS;AACP,yBAAuC,KAAKF,KAA5C;AAAA,UAAQG,OAAR,gBAAQA,OAAR;AAAA,UAAiBC,SAAjB,gBAAiBA,SAAjB;AAAA,UAA4BF,MAA5B,gBAA4BA,MAA5B;AACA,0BACE;AAAK,QAAA,SAAS,EAAE,4BAAWC,OAAO,CAACE,aAAnB,EAAkCD,SAAlC;AAAhB,SAEIF,MAAM,gBAAG,gCAAC,YAAD,qBACP,gCAAC,qBAAD;AAAa,QAAA,IAAI,EAAEA,MAAF,aAAEA,MAAF,uBAAEA,MAAM,CAAEI;AAA3B,QADO,eAEP,gCAAC,sBAAD;AACE,QAAA,KAAK,EAAC,WADR;AAEE,sBAAW,QAFb;AAGE,QAAA,SAAS,EAAEH,OAAO,UAHpB;AAIE,QAAA,OAAO,EAAE;AAJX,sBAME,gCAAC,kBAAD,OANF,CAFO,CAAH,GAWF,IAbR,CADF;AAkBD;;;EAlCgCI,kBAAMC,S;;;iCAA5BT,a,eACQ;AACjBI,EAAAA,OAAO,EAAEM,sBAAUC,MAAV,CAAiBC,UADT;AAEjBP,EAAAA,SAAS,EAAEK,sBAAUG,MAFJ;AAGjBV,EAAAA,MAAM,EAAEO,sBAAUC,MAAV,CAAiBC,UAHR;AAIjBV,EAAAA,QAAQ,EAAEQ,sBAAUI,IAAV,CAAeF;AAJR,C;iCADRZ,a,kBAOW,E;;AA6BxB,IAAMe,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBT,IAAAA,aAAa,EAAE;AACbU,MAAAA,QAAQ,EAAE;AADG,KADK;AAIpB,cAAQ;AACNA,MAAAA,QAAQ,EAAE,UADJ;AAENC,MAAAA,KAAK,EAAE,CAFD;AAGNC,MAAAA,GAAG,EAAE;AAHC;AAJY,GAAP;AAAA,CAAf;;eAUe,wBAAWH,MAAX,EAAmBf,aAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { Choice } from '@pie-lib/drag';\nimport IconButton from '@material-ui/core/IconButton';\nimport Delete from '@material-ui/icons/Delete';\nimport { HtmlAndMath } from '@pie-lib/render-ui';\n\nexport class ChoicePreview extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n choice: PropTypes.object.isRequired,\n onDelete: PropTypes.func.isRequired\n };\n static defaultProps = {};\n\n delete = () => {\n const { onDelete, choice } = this.props;\n onDelete(choice);\n };\n\n render() {\n const { classes, className, choice } = this.props;\n return (\n <div className={classNames(classes.choicePreview, className)}>\n {\n choice ? <Choice>\n <HtmlAndMath html={choice?.content} />\n <IconButton\n color=\"secondary\"\n aria-label=\"delete\"\n className={classes.delete}\n onClick={this.delete}\n >\n <Delete />\n </IconButton>\n </Choice>\n : null\n }\n </div>\n );\n }\n}\nconst styles = () => ({\n choicePreview: {\n position: 'relative'\n },\n delete: {\n position: 'absolute',\n right: 0,\n top: 0\n }\n});\nexport default withStyles(styles)(ChoicePreview);\n"],"file":"choice-preview.js"}
|