@pie-lib/scoring-config 3.6.66-next.0 → 3.7.0-beta.2
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 +17 -101
- package/NEXT.CHANGELOG.json +1 -0
- package/package.json +5 -4
- package/src/__tests__/__snapshots__/index.test.jsx.snap +59 -0
- package/src/__tests__/index.test.jsx +11 -0
- package/.travis.yml +0 -7
- package/README.md +0 -23
- package/lib/index.js +0 -105
- package/lib/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
+
# [3.7.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.65...@pie-lib/scoring-config@3.7.0-beta.2) (2025-07-20)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
# [3.7.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.65...@pie-lib/scoring-config@3.7.0-beta.1) (2025-07-20)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
# [3.7.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.65...@pie-lib/scoring-config@3.7.0-beta.1) (2025-07-20)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
# [3.7.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.65...@pie-lib/scoring-config@3.7.0-beta.0) (2025-07-20)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
33
33
|
|
|
@@ -35,214 +35,130 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
# [3.8.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.65...@pie-lib/scoring-config@3.8.0-beta.0) (2025-07-15)
|
|
39
39
|
|
|
40
40
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
41
41
|
|
|
42
|
+
# [3.7.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.65...@pie-lib/scoring-config@3.7.0-beta.0) (2025-07-15)
|
|
42
43
|
|
|
44
|
+
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## [3.6.60](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.59...@pie-lib/scoring-config@3.6.60) (2023-09-27)
|
|
46
|
+
## [3.6.64](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.63...@pie-lib/scoring-config@3.6.64) (2023-10-16)
|
|
47
47
|
|
|
48
48
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
49
49
|
|
|
50
|
+
## [3.6.63](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.62...@pie-lib/scoring-config@3.6.63) (2023-10-16)
|
|
50
51
|
|
|
52
|
+
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
51
53
|
|
|
54
|
+
## [3.6.62](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.61...@pie-lib/scoring-config@3.6.62) (2023-10-03)
|
|
52
55
|
|
|
56
|
+
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
53
57
|
|
|
54
|
-
## [3.6.
|
|
58
|
+
## [3.6.61](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.60...@pie-lib/scoring-config@3.6.61) (2023-10-01)
|
|
55
59
|
|
|
56
60
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
57
61
|
|
|
62
|
+
## [3.6.60](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.59...@pie-lib/scoring-config@3.6.60) (2023-09-27)
|
|
58
63
|
|
|
64
|
+
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
59
65
|
|
|
66
|
+
## [3.6.59](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.58...@pie-lib/scoring-config@3.6.59) (2023-09-27)
|
|
60
67
|
|
|
68
|
+
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
61
69
|
|
|
62
70
|
## [3.6.58](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.57...@pie-lib/scoring-config@3.6.58) (2023-09-27)
|
|
63
71
|
|
|
64
72
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
65
73
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
74
|
## [3.6.57](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.56...@pie-lib/scoring-config@3.6.57) (2023-09-26)
|
|
71
75
|
|
|
72
76
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
73
77
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
78
|
## [3.6.56](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.55...@pie-lib/scoring-config@3.6.56) (2023-09-25)
|
|
79
79
|
|
|
80
80
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
82
|
## [3.6.55](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.54...@pie-lib/scoring-config@3.6.55) (2023-09-20)
|
|
87
83
|
|
|
88
84
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
89
85
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
86
|
## [3.6.54](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.53...@pie-lib/scoring-config@3.6.54) (2023-09-20)
|
|
95
87
|
|
|
96
88
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
97
89
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
90
|
## [3.6.53](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.52...@pie-lib/scoring-config@3.6.53) (2023-09-18)
|
|
103
91
|
|
|
104
92
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
105
93
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
94
|
## [3.6.52](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.51...@pie-lib/scoring-config@3.6.52) (2023-09-14)
|
|
111
95
|
|
|
112
96
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
98
|
## [3.6.51](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.50...@pie-lib/scoring-config@3.6.51) (2023-09-14)
|
|
119
99
|
|
|
120
100
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
121
101
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
102
|
## [3.6.50](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.49...@pie-lib/scoring-config@3.6.50) (2023-09-14)
|
|
127
103
|
|
|
128
104
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
129
105
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
106
|
## [3.6.49](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.48...@pie-lib/scoring-config@3.6.49) (2023-09-05)
|
|
135
107
|
|
|
136
108
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
137
109
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
110
|
## [3.6.48](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.47...@pie-lib/scoring-config@3.6.48) (2023-09-02)
|
|
143
111
|
|
|
144
112
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
145
113
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
114
|
## [3.6.47](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.46...@pie-lib/scoring-config@3.6.47) (2023-09-02)
|
|
151
115
|
|
|
152
116
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
153
117
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
118
|
## [3.6.46](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.45...@pie-lib/scoring-config@3.6.46) (2023-08-30)
|
|
159
119
|
|
|
160
120
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
161
121
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
122
|
## [3.6.45](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.44...@pie-lib/scoring-config@3.6.45) (2023-08-21)
|
|
167
123
|
|
|
168
124
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
169
125
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
126
|
## [3.6.44](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.43...@pie-lib/scoring-config@3.6.44) (2023-08-21)
|
|
175
127
|
|
|
176
128
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
177
129
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
130
|
## [3.6.43](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.42...@pie-lib/scoring-config@3.6.43) (2023-08-15)
|
|
183
131
|
|
|
184
132
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
185
133
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
134
|
## [3.6.42](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.41...@pie-lib/scoring-config@3.6.42) (2023-08-07)
|
|
191
135
|
|
|
192
136
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
193
137
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
138
|
## [3.6.41](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.40...@pie-lib/scoring-config@3.6.41) (2023-07-31)
|
|
199
139
|
|
|
200
140
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
201
141
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
142
|
## [3.6.40](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.39...@pie-lib/scoring-config@3.6.40) (2023-07-24)
|
|
207
143
|
|
|
208
144
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
209
145
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
146
|
## [3.6.39](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.38...@pie-lib/scoring-config@3.6.39) (2023-07-04)
|
|
215
147
|
|
|
216
148
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
217
149
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
150
|
## [3.6.38](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.37...@pie-lib/scoring-config@3.6.38) (2023-06-24)
|
|
223
151
|
|
|
224
152
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
225
153
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
154
|
## [3.6.37](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.36...@pie-lib/scoring-config@3.6.37) (2023-06-23)
|
|
231
155
|
|
|
232
156
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
233
157
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
158
|
## [3.6.36](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.35...@pie-lib/scoring-config@3.6.36) (2023-06-13)
|
|
239
159
|
|
|
240
160
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
241
161
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
162
|
## [3.6.35](https://github.com/pie-framework/pie-lib/compare/@pie-lib/scoring-config@3.6.34...@pie-lib/scoring-config@3.6.35) (2023-06-12)
|
|
247
163
|
|
|
248
164
|
**Note:** Version bump only for package @pie-lib/scoring-config
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/scoring-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.jsx",
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@material-ui/core": "^3.8.3",
|
|
15
15
|
"@material-ui/icons": "^3.0.2",
|
|
16
|
-
"@pie-lib/config-ui": "
|
|
16
|
+
"@pie-lib/config-ui": "beta",
|
|
17
17
|
"classnames": "^2.2.6",
|
|
18
18
|
"debug": "^4.1.1",
|
|
19
|
-
"lodash": "^4.17.11"
|
|
19
|
+
"lodash": "^4.17.11",
|
|
20
|
+
"prop-types": "^15.7.2"
|
|
20
21
|
},
|
|
21
22
|
"peerDependencies": {
|
|
22
23
|
"react": "^16.8.1"
|
|
@@ -25,5 +26,5 @@
|
|
|
25
26
|
"react": "^16.8.1",
|
|
26
27
|
"react-dom": "^16.9.0"
|
|
27
28
|
},
|
|
28
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "e2aa3ddac60f49bcb8c2562370f496323642f453"
|
|
29
30
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`index empty - renders snapshots 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<p
|
|
6
|
+
className="MuiTypography-root-1 MuiTypography-body1-10"
|
|
7
|
+
type="subheading"
|
|
8
|
+
>
|
|
9
|
+
Partial Scoring Rules
|
|
10
|
+
</p>
|
|
11
|
+
<br />
|
|
12
|
+
<p
|
|
13
|
+
className="MuiTypography-root-1 MuiTypography-body1-10"
|
|
14
|
+
>
|
|
15
|
+
Each correct response is worth 1/X where X is the number of correct answer selections.
|
|
16
|
+
</p>
|
|
17
|
+
<span
|
|
18
|
+
className="MuiButtonBase-root-53 MuiIconButton-root-47 MuiPrivateSwitchBase-root-43 MuiCheckbox-root-37 MuiCheckbox-colorSecondary-42"
|
|
19
|
+
label=""
|
|
20
|
+
onBlur={[Function]}
|
|
21
|
+
onContextMenu={[Function]}
|
|
22
|
+
onFocus={[Function]}
|
|
23
|
+
onKeyDown={[Function]}
|
|
24
|
+
onKeyUp={[Function]}
|
|
25
|
+
onMouseDown={[Function]}
|
|
26
|
+
onMouseLeave={[Function]}
|
|
27
|
+
onMouseUp={[Function]}
|
|
28
|
+
onTouchEnd={[Function]}
|
|
29
|
+
onTouchMove={[Function]}
|
|
30
|
+
onTouchStart={[Function]}
|
|
31
|
+
tabIndex={null}
|
|
32
|
+
>
|
|
33
|
+
<span
|
|
34
|
+
className="MuiIconButton-label-52"
|
|
35
|
+
>
|
|
36
|
+
<svg
|
|
37
|
+
aria-hidden="true"
|
|
38
|
+
className="MuiSvgIcon-root-56"
|
|
39
|
+
focusable="false"
|
|
40
|
+
role="presentation"
|
|
41
|
+
viewBox="0 0 24 24"
|
|
42
|
+
>
|
|
43
|
+
<path
|
|
44
|
+
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
45
|
+
/>
|
|
46
|
+
</svg>
|
|
47
|
+
<input
|
|
48
|
+
className="MuiPrivateSwitchBase-input-46"
|
|
49
|
+
data-indeterminate={false}
|
|
50
|
+
onChange={[Function]}
|
|
51
|
+
type="checkbox"
|
|
52
|
+
/>
|
|
53
|
+
</span>
|
|
54
|
+
<span
|
|
55
|
+
className="MuiTouchRipple-root-65"
|
|
56
|
+
/>
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { PartialScoringConfig } from '../index';
|
|
5
|
+
|
|
6
|
+
describe('index', () => {
|
|
7
|
+
it('empty - renders snapshots', () => {
|
|
8
|
+
const tree = renderer.create(<PartialScoringConfig classes={{}} />).toJSON();
|
|
9
|
+
expect(tree).toMatchSnapshot();
|
|
10
|
+
});
|
|
11
|
+
});
|
package/.travis.yml
DELETED
package/README.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# scoring-config
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
`scoring-config` is a panel that allows for the editing of scoring properties, for use within PIE configuration panels.
|
|
5
|
-
|
|
6
|
-
## Usage
|
|
7
|
-
|
|
8
|
-
### Install
|
|
9
|
-
|
|
10
|
-
npm install --save @pie-lib/scoring-config
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### Import
|
|
14
|
-
|
|
15
|
-
import PartialScoringConfig from '@pie-lib/scoring-config/src/index.jsx';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Element
|
|
19
|
-
|
|
20
|
-
<PartialScoringConfig
|
|
21
|
-
numberOfCorrectResponses={this._sumCorrectAnswers()}
|
|
22
|
-
partialScoring={this.props.model.partialScoring}
|
|
23
|
-
onPartialScoringChange={this.onPartialScoringChange.bind(this)} />
|
package/lib/index.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.PartialScoringConfig = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
|
|
27
|
-
|
|
28
|
-
var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox"));
|
|
29
|
-
|
|
30
|
-
var _styles = require("@material-ui/core/styles");
|
|
31
|
-
|
|
32
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
var PartialScoringConfig = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
(0, _inherits2["default"])(PartialScoringConfig, _React$Component);
|
|
40
|
-
|
|
41
|
-
var _super = _createSuper(PartialScoringConfig);
|
|
42
|
-
|
|
43
|
-
function PartialScoringConfig(props) {
|
|
44
|
-
var _this;
|
|
45
|
-
|
|
46
|
-
(0, _classCallCheck2["default"])(this, PartialScoringConfig);
|
|
47
|
-
_this = _super.call(this, props);
|
|
48
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
49
|
-
checked: false
|
|
50
|
-
});
|
|
51
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onCheckboxChanged", function () {
|
|
52
|
-
var checked = !_this.state.checked;
|
|
53
|
-
var onChange = _this.props.onChange;
|
|
54
|
-
|
|
55
|
-
_this.setState({
|
|
56
|
-
checked: checked
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
onChange(checked);
|
|
60
|
-
});
|
|
61
|
-
var partialScoring = props.partialScoring;
|
|
62
|
-
_this.state.checked = partialScoring;
|
|
63
|
-
return _this;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
(0, _createClass2["default"])(PartialScoringConfig, [{
|
|
67
|
-
key: "render",
|
|
68
|
-
value: function render() {
|
|
69
|
-
var _this$props = this.props,
|
|
70
|
-
classes = _this$props.classes,
|
|
71
|
-
label = _this$props.label;
|
|
72
|
-
var checked = this.state.checked;
|
|
73
|
-
var textLabel = label || 'Each correct response is worth 1/X where X is the number of correct answer selections.';
|
|
74
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
-
className: classes.scoringConfig
|
|
76
|
-
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
77
|
-
type: "subheading"
|
|
78
|
-
}, "Partial Scoring Rules"), /*#__PURE__*/_react["default"].createElement("br", null), /*#__PURE__*/_react["default"].createElement(_Typography["default"], null, textLabel), /*#__PURE__*/_react["default"].createElement(_Checkbox["default"], {
|
|
79
|
-
checked: checked,
|
|
80
|
-
onChange: this.onCheckboxChanged,
|
|
81
|
-
label: ''
|
|
82
|
-
}));
|
|
83
|
-
}
|
|
84
|
-
}]);
|
|
85
|
-
return PartialScoringConfig;
|
|
86
|
-
}(_react["default"].Component);
|
|
87
|
-
|
|
88
|
-
exports.PartialScoringConfig = PartialScoringConfig;
|
|
89
|
-
(0, _defineProperty2["default"])(PartialScoringConfig, "propTypes", {
|
|
90
|
-
label: _propTypes["default"].string,
|
|
91
|
-
partialScoring: _propTypes["default"].bool,
|
|
92
|
-
classes: _propTypes["default"].object.isRequired,
|
|
93
|
-
onChange: _propTypes["default"].func
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
var _default = (0, _styles.withStyles)(function (theme) {
|
|
97
|
-
return {
|
|
98
|
-
scoringConfig: {
|
|
99
|
-
paddingTop: theme.spacing.unit
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
})(PartialScoringConfig);
|
|
103
|
-
|
|
104
|
-
exports["default"] = _default;
|
|
105
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.jsx"],"names":["PartialScoringConfig","props","checked","state","onChange","setState","partialScoring","classes","label","textLabel","scoringConfig","onCheckboxChanged","React","Component","PropTypes","string","bool","object","isRequired","func","theme","paddingTop","spacing","unit"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEaA,oB;;;;;AAYX,gCAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,8FAJX;AACNC,MAAAA,OAAO,EAAE;AADH,KAIW;AAAA,0GAQC,YAAM;AACxB,UAAMA,OAAO,GAAG,CAAC,MAAKC,KAAL,CAAWD,OAA5B;AACA,UAAQE,QAAR,GAAqB,MAAKH,KAA1B,CAAQG,QAAR;;AAEA,YAAKC,QAAL,CAAc;AACZH,QAAAA,OAAO,EAAPA;AADY,OAAd;;AAGAE,MAAAA,QAAQ,CAACF,OAAD,CAAR;AACD,KAhBkB;AAGjB,QAAQI,cAAR,GAA2BL,KAA3B,CAAQK,cAAR;AAEA,UAAKH,KAAL,CAAWD,OAAX,GAAqBI,cAArB;AALiB;AAMlB;;;;WAYD,kBAAS;AACP,wBAA2B,KAAKL,KAAhC;AAAA,UAAQM,OAAR,eAAQA,OAAR;AAAA,UAAiBC,KAAjB,eAAiBA,KAAjB;AACA,UAAQN,OAAR,GAAoB,KAAKC,KAAzB,CAAQD,OAAR;AACA,UAAMO,SAAS,GAAGD,KAAK,IAAI,wFAA3B;AAEA,0BACE;AAAK,QAAA,SAAS,EAAED,OAAO,CAACG;AAAxB,sBACE,gCAAC,sBAAD;AAAY,QAAA,IAAI,EAAC;AAAjB,iCADF,eAEE,2CAFF,eAGE,gCAAC,sBAAD,QAAaD,SAAb,CAHF,eAIE,gCAAC,oBAAD;AAAU,QAAA,OAAO,EAAEP,OAAnB;AAA4B,QAAA,QAAQ,EAAE,KAAKS,iBAA3C;AAA8D,QAAA,KAAK,EAAE;AAArE,QAJF,CADF;AAQD;;;EA3CuCC,kBAAMC,S;;;iCAAnCb,oB,eACQ;AACjBQ,EAAAA,KAAK,EAAEM,sBAAUC,MADA;AAEjBT,EAAAA,cAAc,EAAEQ,sBAAUE,IAFT;AAGjBT,EAAAA,OAAO,EAAEO,sBAAUG,MAAV,CAAiBC,UAHT;AAIjBd,EAAAA,QAAQ,EAAEU,sBAAUK;AAJH,C;;eA6CN,wBAAW,UAACC,KAAD;AAAA,SAAY;AACpCV,IAAAA,aAAa,EAAE;AACbW,MAAAA,UAAU,EAAED,KAAK,CAACE,OAAN,CAAcC;AADb;AADqB,GAAZ;AAAA,CAAX,EAIXvB,oBAJW,C","sourcesContent":["import React from 'react';\nimport Typography from '@material-ui/core/Typography';\nimport Checkbox from '@material-ui/core/Checkbox';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\n\nexport class PartialScoringConfig extends React.Component {\n static propTypes = {\n label: PropTypes.string,\n partialScoring: PropTypes.bool,\n classes: PropTypes.object.isRequired,\n onChange: PropTypes.func,\n };\n\n state = {\n checked: false,\n };\n\n constructor(props) {\n super(props);\n\n const { partialScoring } = props;\n\n this.state.checked = partialScoring;\n }\n\n onCheckboxChanged = () => {\n const checked = !this.state.checked;\n const { onChange } = this.props;\n\n this.setState({\n checked,\n });\n onChange(checked);\n };\n\n render() {\n const { classes, label } = this.props;\n const { checked } = this.state;\n const textLabel = label || 'Each correct response is worth 1/X where X is the number of correct answer selections.';\n\n return (\n <div className={classes.scoringConfig}>\n <Typography type=\"subheading\">Partial Scoring Rules</Typography>\n <br />\n <Typography>{textLabel}</Typography>\n <Checkbox checked={checked} onChange={this.onCheckboxChanged} label={''} />\n </div>\n );\n }\n}\n\nexport default withStyles((theme) => ({\n scoringConfig: {\n paddingTop: theme.spacing.unit,\n },\n}))(PartialScoringConfig);\n"],"file":"index.js"}
|