@pie-element/rubric 1.6.3-next.135 → 1.6.3-next.1357

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 CHANGED
@@ -3,6 +3,256 @@
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
+ ## [2.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@2.0.0...@pie-element/rubric@2.0.1) (2022-06-28)
7
+
8
+ **Note:** Version bump only for package @pie-element/rubric
9
+
10
+
11
+
12
+
13
+
14
+ # [2.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.11...@pie-element/rubric@2.0.0) (2022-06-28)
15
+
16
+
17
+ ### chore
18
+
19
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * Image percent buttons were removed from toolbar.
25
+ New properties maxImageWidth and maxImageHeight were added.
26
+
27
+
28
+
29
+
30
+
31
+ ## [1.8.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.10...@pie-element/rubric@1.8.11) (2022-06-13)
32
+
33
+ **Note:** Version bump only for package @pie-element/rubric
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.8.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.9...@pie-element/rubric@1.8.10) (2022-05-30)
40
+
41
+ **Note:** Version bump only for package @pie-element/rubric
42
+
43
+
44
+
45
+
46
+
47
+ ## [1.8.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.8...@pie-element/rubric@1.8.9) (2022-05-16)
48
+
49
+ **Note:** Version bump only for package @pie-element/rubric
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.8.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.7...@pie-element/rubric@1.8.8) (2022-05-09)
56
+
57
+ **Note:** Version bump only for package @pie-element/rubric
58
+
59
+
60
+
61
+
62
+
63
+ ## [1.8.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.6...@pie-element/rubric@1.8.7) (2022-05-03)
64
+
65
+ **Note:** Version bump only for package @pie-element/rubric
66
+
67
+
68
+
69
+
70
+
71
+ ## [1.8.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.5...@pie-element/rubric@1.8.6) (2022-04-12)
72
+
73
+ **Note:** Version bump only for package @pie-element/rubric
74
+
75
+
76
+
77
+
78
+
79
+ ## [1.8.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.4...@pie-element/rubric@1.8.5) (2022-03-22)
80
+
81
+ **Note:** Version bump only for package @pie-element/rubric
82
+
83
+
84
+
85
+
86
+
87
+ ## [1.8.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.3...@pie-element/rubric@1.8.4) (2022-03-08)
88
+
89
+ **Note:** Version bump only for package @pie-element/rubric
90
+
91
+
92
+
93
+
94
+
95
+ ## [1.8.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.2...@pie-element/rubric@1.8.3) (2022-03-08)
96
+
97
+ **Note:** Version bump only for package @pie-element/rubric
98
+
99
+
100
+
101
+
102
+
103
+ ## [1.8.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.1...@pie-element/rubric@1.8.2) (2022-02-21)
104
+
105
+ **Note:** Version bump only for package @pie-element/rubric
106
+
107
+
108
+
109
+
110
+
111
+ ## [1.8.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.8.0...@pie-element/rubric@1.8.1) (2022-02-04)
112
+
113
+ **Note:** Version bump only for package @pie-element/rubric
114
+
115
+
116
+
117
+
118
+
119
+ # [1.8.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.7.8...@pie-element/rubric@1.8.0) (2022-01-24)
120
+
121
+
122
+ ### Bug Fixes
123
+
124
+ * **rubric:** display rubric in reverse order in player PD-1375 ([0620538](https://github.com/pie-framework/pie-elements/commit/06205386a3d2c530378be2dccb7943cefa6f5c55))
125
+ * **rubric:** use singular 1PT instead of 1PTS, fix style in IBX PD-1373, PD-1374 ([0c27b32](https://github.com/pie-framework/pie-elements/commit/0c27b327e861831687576a639ba2b6101c7fc0ff))
126
+
127
+
128
+ ### Features
129
+
130
+ * **rubric:** Added Studio support: Treat 'null' as null value for sample answer PD-1313 ([04ea11d](https://github.com/pie-framework/pie-elements/commit/04ea11da0b4b2077693c7a22f63091eabdf09481))
131
+
132
+
133
+
134
+
135
+
136
+ ## [1.7.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.7.7...@pie-element/rubric@1.7.8) (2022-01-10)
137
+
138
+ **Note:** Version bump only for package @pie-element/rubric
139
+
140
+
141
+
142
+
143
+
144
+ ## [1.7.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.7.6...@pie-element/rubric@1.7.7) (2021-12-23)
145
+
146
+ **Note:** Version bump only for package @pie-element/rubric
147
+
148
+
149
+
150
+
151
+
152
+ ## [1.7.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.7.4...@pie-element/rubric@1.7.5) (2021-12-13)
153
+
154
+ **Note:** Version bump only for package @pie-element/rubric
155
+
156
+
157
+
158
+
159
+
160
+ ## [1.7.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.7.1...@pie-element/rubric@1.7.2) (2021-11-29)
161
+
162
+ **Note:** Version bump only for package @pie-element/rubric
163
+
164
+
165
+
166
+
167
+
168
+ ## [1.7.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.6...@pie-element/rubric@1.7.1) (2021-11-11)
169
+
170
+ **Note:** Version bump only for package @pie-element/rubric
171
+
172
+
173
+
174
+
175
+
176
+ # [1.7.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.2...@pie-element/rubric@1.7.0) (2021-11-11)
177
+
178
+
179
+ ### Bug Fixes
180
+
181
+ * **rubric:** display rubric in reverse order in player PD-1375 ([0620538](https://github.com/pie-framework/pie-elements/commit/06205386a3d2c530378be2dccb7943cefa6f5c55))
182
+ * **rubric:** use singular 1PT instead of 1PTS, fix style in IBX PD-1373, PD-1374 ([0c27b32](https://github.com/pie-framework/pie-elements/commit/0c27b327e861831687576a639ba2b6101c7fc0ff))
183
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
184
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
185
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
186
+
187
+
188
+ ### Features
189
+
190
+ * **rubric:** Added Studio support: Treat 'null' as null value for sample answer PD-1313 ([04ea11d](https://github.com/pie-framework/pie-elements/commit/04ea11da0b4b2077693c7a22f63091eabdf09481))
191
+
192
+
193
+
194
+
195
+
196
+
197
+ ## [1.6.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.5...@pie-element/rubric@1.6.6) (2021-11-01)
198
+
199
+ **Note:** Version bump only for package @pie-element/rubric
200
+
201
+
202
+
203
+
204
+
205
+ ## [1.6.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.4...@pie-element/rubric@1.6.5) (2021-10-04)
206
+
207
+ **Note:** Version bump only for package @pie-element/rubric
208
+
209
+
210
+
211
+
212
+
213
+ ## [1.6.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.3...@pie-element/rubric@1.6.4) (2021-09-20)
214
+
215
+
216
+ ### Bug Fixes
217
+
218
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
219
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
220
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
221
+
222
+
223
+
224
+
225
+
226
+ ## [1.6.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.2...@pie-element/rubric@1.6.3) (2021-08-05)
227
+
228
+ **Note:** Version bump only for package @pie-element/rubric
229
+
230
+
231
+
232
+
233
+
234
+ ## [1.6.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.6.0...@pie-element/rubric@1.6.2) (2021-08-05)
235
+
236
+
237
+ ### Bug Fixes
238
+
239
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
240
+
241
+
242
+
243
+
244
+
245
+ # [1.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.5.16...@pie-element/rubric@1.6.0) (2021-06-29)
246
+
247
+
248
+ ### Features
249
+
250
+ * **rubric:** Added sample answers to the model - PD-621 ([#559](https://github.com/pie-framework/pie-elements/issues/559)) ([d436b47](https://github.com/pie-framework/pie-elements/commit/d436b47b1cb8dd7cfbd82dbd2de4dd5eab36905c))
251
+
252
+
253
+
254
+
255
+
6
256
  ## [1.5.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric@1.5.15...@pie-element/rubric@1.5.16) (2021-04-07)
7
257
 
8
258
  **Note:** Version bump only for package @pie-element/rubric
@@ -3,6 +3,207 @@
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
+ ## [2.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@2.0.0...@pie-element/rubric-configure@2.0.1) (2022-06-28)
7
+
8
+ **Note:** Version bump only for package @pie-element/rubric-configure
9
+
10
+
11
+
12
+
13
+
14
+ # [2.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.47...@pie-element/rubric-configure@2.0.0) (2022-06-28)
15
+
16
+
17
+ ### chore
18
+
19
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
20
+
21
+
22
+ ### BREAKING CHANGES
23
+
24
+ * Image percent buttons were removed from toolbar.
25
+ New properties maxImageWidth and maxImageHeight were added.
26
+
27
+
28
+
29
+
30
+
31
+ ## [1.2.47](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.46...@pie-element/rubric-configure@1.2.47) (2022-06-13)
32
+
33
+ **Note:** Version bump only for package @pie-element/rubric-configure
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.2.46](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.45...@pie-element/rubric-configure@1.2.46) (2022-05-30)
40
+
41
+ **Note:** Version bump only for package @pie-element/rubric-configure
42
+
43
+
44
+
45
+
46
+
47
+ ## [1.2.45](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.44...@pie-element/rubric-configure@1.2.45) (2022-05-16)
48
+
49
+ **Note:** Version bump only for package @pie-element/rubric-configure
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.2.44](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.43...@pie-element/rubric-configure@1.2.44) (2022-05-09)
56
+
57
+ **Note:** Version bump only for package @pie-element/rubric-configure
58
+
59
+
60
+
61
+
62
+
63
+ ## [1.2.43](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.42...@pie-element/rubric-configure@1.2.43) (2022-05-03)
64
+
65
+ **Note:** Version bump only for package @pie-element/rubric-configure
66
+
67
+
68
+
69
+
70
+
71
+ ## [1.2.42](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.41...@pie-element/rubric-configure@1.2.42) (2022-04-12)
72
+
73
+ **Note:** Version bump only for package @pie-element/rubric-configure
74
+
75
+
76
+
77
+
78
+
79
+ ## [1.2.41](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.40...@pie-element/rubric-configure@1.2.41) (2022-03-22)
80
+
81
+ **Note:** Version bump only for package @pie-element/rubric-configure
82
+
83
+
84
+
85
+
86
+
87
+ ## [1.2.40](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.39...@pie-element/rubric-configure@1.2.40) (2022-03-08)
88
+
89
+ **Note:** Version bump only for package @pie-element/rubric-configure
90
+
91
+
92
+
93
+
94
+
95
+ ## [1.2.39](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.38...@pie-element/rubric-configure@1.2.39) (2022-03-08)
96
+
97
+ **Note:** Version bump only for package @pie-element/rubric-configure
98
+
99
+
100
+
101
+
102
+
103
+ ## [1.2.38](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.37...@pie-element/rubric-configure@1.2.38) (2022-02-21)
104
+
105
+ **Note:** Version bump only for package @pie-element/rubric-configure
106
+
107
+
108
+
109
+
110
+
111
+ ## [1.2.37](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.36...@pie-element/rubric-configure@1.2.37) (2022-02-04)
112
+
113
+ **Note:** Version bump only for package @pie-element/rubric-configure
114
+
115
+
116
+
117
+
118
+
119
+ ## [1.2.36](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.35...@pie-element/rubric-configure@1.2.36) (2022-01-24)
120
+
121
+ **Note:** Version bump only for package @pie-element/rubric-configure
122
+
123
+
124
+
125
+
126
+
127
+ ## [1.2.35](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.34...@pie-element/rubric-configure@1.2.35) (2022-01-10)
128
+
129
+ **Note:** Version bump only for package @pie-element/rubric-configure
130
+
131
+
132
+
133
+
134
+
135
+ ## [1.2.34](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.33...@pie-element/rubric-configure@1.2.34) (2021-12-23)
136
+
137
+ **Note:** Version bump only for package @pie-element/rubric-configure
138
+
139
+
140
+
141
+
142
+
143
+ ## [1.2.32](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.31...@pie-element/rubric-configure@1.2.32) (2021-12-13)
144
+
145
+ **Note:** Version bump only for package @pie-element/rubric-configure
146
+
147
+
148
+
149
+
150
+
151
+ ## [1.2.29](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.28...@pie-element/rubric-configure@1.2.29) (2021-11-29)
152
+
153
+ **Note:** Version bump only for package @pie-element/rubric-configure
154
+
155
+
156
+
157
+
158
+
159
+ ## [1.2.28](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.27...@pie-element/rubric-configure@1.2.28) (2021-10-04)
160
+
161
+ **Note:** Version bump only for package @pie-element/rubric-configure
162
+
163
+
164
+
165
+
166
+
167
+ ## [1.2.27](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.26...@pie-element/rubric-configure@1.2.27) (2021-09-20)
168
+
169
+
170
+ ### Bug Fixes
171
+
172
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
173
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
174
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
175
+
176
+
177
+
178
+
179
+
180
+ ## [1.2.26](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.25...@pie-element/rubric-configure@1.2.26) (2021-08-05)
181
+
182
+ **Note:** Version bump only for package @pie-element/rubric-configure
183
+
184
+
185
+
186
+
187
+
188
+ ## [1.2.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.23...@pie-element/rubric-configure@1.2.25) (2021-08-05)
189
+
190
+
191
+ ### Bug Fixes
192
+
193
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
194
+
195
+
196
+
197
+
198
+
199
+ ## [1.2.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.22...@pie-element/rubric-configure@1.2.23) (2021-06-29)
200
+
201
+ **Note:** Version bump only for package @pie-element/rubric-configure
202
+
203
+
204
+
205
+
206
+
6
207
  ## [1.2.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/rubric-configure@1.2.21...@pie-element/rubric-configure@1.2.22) (2021-04-07)
7
208
 
8
209
  **Note:** Version bump only for package @pie-element/rubric-configure
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {
8
+ model: {
9
+ points: ['', '', '', ''],
10
+ sampleAnswers: [null, null, null, null],
11
+ maxPoints: 4,
12
+ excludeZero: false,
13
+ excludeZeroEnabled: true,
14
+ maxPointsEnabled: true
15
+ },
16
+ configuration: {
17
+ showExcludeZero: {
18
+ settings: true,
19
+ label: 'Ability to exclude zero'
20
+ },
21
+ showMaxPoint: {
22
+ settings: true,
23
+ label: 'Show max points dropdown'
24
+ },
25
+ settingsPanelDisabled: false
26
+ }
27
+ };
28
+ exports["default"] = _default;
29
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","points","sampleAnswers","maxPoints","excludeZero","excludeZeroEnabled","maxPointsEnabled","configuration","showExcludeZero","settings","label","showMaxPoint","settingsPanelDisabled"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CAAC,EAAD,EAAK,EAAL,EAAS,EAAT,EAAa,EAAb,CADH;AAELC,IAAAA,aAAa,EAAE,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,CAFV;AAGLC,IAAAA,SAAS,EAAE,CAHN;AAILC,IAAAA,WAAW,EAAE,KAJR;AAKLC,IAAAA,kBAAkB,EAAE,IALf;AAMLC,IAAAA,gBAAgB,EAAE;AANb,GADM;AASbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,eAAe,EAAE;AACfC,MAAAA,QAAQ,EAAE,IADK;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KADJ;AAKbC,IAAAA,YAAY,EAAE;AACZF,MAAAA,QAAQ,EAAE,IADE;AAEZC,MAAAA,KAAK,EAAE;AAFK,KALD;AASbE,IAAAA,qBAAqB,EAAE;AATV;AATF,C","sourcesContent":["export default {\n model: {\n points: ['', '', '', ''],\n sampleAnswers: [null, null, null, null],\n maxPoints: 4,\n excludeZero: false,\n excludeZeroEnabled: true,\n maxPointsEnabled: true\n },\n configuration: {\n showExcludeZero: {\n settings: true,\n label: 'Ability to exclude zero',\n },\n showMaxPoint: {\n settings: true,\n label: 'Show max points dropdown'\n },\n settingsPanelDisabled: false\n }\n};\n"],"file":"defaults.js"}
@@ -21,19 +21,35 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
21
21
 
22
22
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
23
23
 
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
+
24
26
  var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
25
27
 
26
28
  var _react = _interopRequireDefault(require("react"));
27
29
 
28
30
  var _reactDom = _interopRequireDefault(require("react-dom"));
29
31
 
30
- var _rubric = require("@pie-lib/rubric");
31
-
32
32
  var _debug = _interopRequireDefault(require("debug"));
33
33
 
34
+ var _main = _interopRequireDefault(require("./main"));
35
+
36
+ var _defaults = _interopRequireDefault(require("./defaults"));
37
+
34
38
  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
39
 
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
40
+ 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; } }
41
+
42
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
43
+
44
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
45
+
46
+ var modelWithDefaults = function modelWithDefaults(m) {
47
+ return _objectSpread(_objectSpread({}, _defaults["default"].model), m);
48
+ };
49
+
50
+ var configurationWithDefaults = function configurationWithDefaults(c) {
51
+ return _objectSpread(_objectSpread({}, _defaults["default"].configuration), c);
52
+ };
37
53
 
38
54
  var RubricElement = /*#__PURE__*/function (_HTMLElement) {
39
55
  (0, _inherits2["default"])(RubricElement, _HTMLElement);
@@ -45,17 +61,36 @@ var RubricElement = /*#__PURE__*/function (_HTMLElement) {
45
61
 
46
62
  (0, _classCallCheck2["default"])(this, RubricElement);
47
63
  _this = _super.call(this);
64
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onConfigurationChanged", function (c) {
65
+ _this._configuration = configurationWithDefaults(c);
66
+
67
+ if (_this._model) {
68
+ _this.onModelChanged(_this._model);
69
+ }
70
+
71
+ _this._render();
72
+ });
48
73
 
49
74
  _debug["default"].log('constructor called');
50
75
 
76
+ _this._model = modelWithDefaults();
77
+ _this._configuration = configurationWithDefaults();
51
78
  _this.onModelChanged = _this.onModelChanged.bind((0, _assertThisInitialized2["default"])(_this));
79
+ _this.onConfigurationChanged = _this.onConfigurationChanged.bind((0, _assertThisInitialized2["default"])(_this));
52
80
  return _this;
53
81
  }
54
82
 
55
83
  (0, _createClass2["default"])(RubricElement, [{
56
84
  key: "model",
57
- set: function set(s) {
58
- this._model = s;
85
+ set: function set(m) {
86
+ this._model = modelWithDefaults(m);
87
+
88
+ this._render();
89
+ }
90
+ }, {
91
+ key: "configuration",
92
+ set: function set(c) {
93
+ this._configuration = configurationWithDefaults(c);
59
94
 
60
95
  this._render();
61
96
  }
@@ -77,12 +112,14 @@ var RubricElement = /*#__PURE__*/function (_HTMLElement) {
77
112
  key: "_render",
78
113
  value: function _render() {
79
114
  if (this._model) {
80
- var el = /*#__PURE__*/_react["default"].createElement(_rubric.Authoring, {
81
- value: this._model,
82
- onChange: this.onModelChanged
115
+ var element = /*#__PURE__*/_react["default"].createElement(_main["default"], {
116
+ model: this._model,
117
+ configuration: this._configuration,
118
+ onModelChanged: this.onModelChanged,
119
+ onConfigurationChanged: this.onConfigurationChanged
83
120
  });
84
121
 
85
- _reactDom["default"].render(el, this);
122
+ _reactDom["default"].render(element, this);
86
123
  }
87
124
  }
88
125
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["RubricElement","debug","log","onModelChanged","bind","s","_model","_render","m","dispatchEvent","ModelUpdatedEvent","el","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;;;;;IAEqBA,a;;;;;AACnB,2BAAc;AAAA;;AAAA;AACZ;;AACAC,sBAAMC,GAAN,CAAU,oBAAV;;AACA,UAAKC,cAAL,GAAsB,MAAKA,cAAL,CAAoBC,IAApB,gDAAtB;AAHY;AAIb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;;AACA,WAAKE,OAAL;AACD;;;WAED,wBAAeC,CAAf,EAAkB;AAChB,WAAKF,MAAL,GAAcE,CAAd;;AACA,WAAKD,OAAL;;AACA,WAAKE,aAAL,CAAmB,IAAIC,qCAAJ,CAAsB,KAAKJ,MAA3B,EAAmC,KAAnC,CAAnB;AACD;;;WAED,6BAAoB;AAClB,WAAKC,OAAL;AACD;;;WAED,mBAAU;AACR,UAAI,KAAKD,MAAT,EAAiB;AACf,YAAMK,EAAE,gBACN,gCAAC,iBAAD;AAAW,UAAA,KAAK,EAAE,KAAKL,MAAvB;AAA+B,UAAA,QAAQ,EAAE,KAAKH;AAA9C,UADF;;AAGAS,6BAASC,MAAT,CAAgBF,EAAhB,EAAoB,IAApB;AACD;AACF;;;kDA7BwCG,W","sourcesContent":["import { ModelUpdatedEvent } from '@pie-framework/pie-configure-events';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Authoring } from '@pie-lib/rubric';\nimport debug from 'debug';\n\nexport default class RubricElement extends HTMLElement {\n constructor() {\n super();\n debug.log('constructor called');\n this.onModelChanged = this.onModelChanged.bind(this);\n }\n\n set model(s) {\n this._model = s;\n this._render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this._render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model) {\n const el = (\n <Authoring value={this._model} onChange={this.onModelChanged} />\n );\n ReactDOM.render(el, this);\n }\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["modelWithDefaults","m","defaults","model","configurationWithDefaults","c","configuration","RubricElement","_configuration","_model","onModelChanged","_render","debug","log","bind","onConfigurationChanged","dispatchEvent","ModelUpdatedEvent","element","React","createElement","Main","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,CAAC;AAAA,yCAAUC,qBAASC,KAAnB,GAA6BF,CAA7B;AAAA,CAA3B;;AACA,IAAMG,yBAAyB,GAAG,SAA5BA,yBAA4B,CAAAC,CAAC;AAAA,yCAAUH,qBAASI,aAAnB,GAAqCD,CAArC;AAAA,CAAnC;;IAEqBE,a;;;;;AACnB,2BAAc;AAAA;;AAAA;AACZ;AADY,+GAyBW,UAACF,CAAD,EAAO;AAC9B,YAAKG,cAAL,GAAsBJ,yBAAyB,CAACC,CAAD,CAA/C;;AAEA,UAAI,MAAKI,MAAT,EAAiB;AACf,cAAKC,cAAL,CAAoB,MAAKD,MAAzB;AACD;;AAED,YAAKE,OAAL;AACD,KAjCa;;AAEZC,sBAAMC,GAAN,CAAU,oBAAV;;AACA,UAAKJ,MAAL,GAAcT,iBAAiB,EAA/B;AACA,UAAKQ,cAAL,GAAsBJ,yBAAyB,EAA/C;AACA,UAAKM,cAAL,GAAsB,MAAKA,cAAL,CAAoBI,IAApB,gDAAtB;AACA,UAAKC,sBAAL,GAA8B,MAAKA,sBAAL,CAA4BD,IAA5B,gDAA9B;AANY;AAOb;;;;SAED,aAAUb,CAAV,EAAa;AACX,WAAKQ,MAAL,GAAcT,iBAAiB,CAACC,CAAD,CAA/B;;AACA,WAAKU,OAAL;AACD;;;SAED,aAAkBN,CAAlB,EAAqB;AACnB,WAAKG,cAAL,GAAsBJ,yBAAyB,CAACC,CAAD,CAA/C;;AACA,WAAKM,OAAL;AACD;;;WAED,wBAAeV,CAAf,EAAkB;AAChB,WAAKQ,MAAL,GAAcR,CAAd;;AACA,WAAKU,OAAL;;AACA,WAAKK,aAAL,CAAmB,IAAIC,qCAAJ,CAAsB,KAAKR,MAA3B,EAAmC,KAAnC,CAAnB;AACD;;;WAYD,6BAAoB;AAClB,WAAKE,OAAL;AACD;;;WAED,mBAAU;AACR,UAAI,KAAKF,MAAT,EAAiB;AACf,YAAIS,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACtClB,UAAAA,KAAK,EAAE,KAAKM,MAD0B;AAEtCH,UAAAA,aAAa,EAAE,KAAKE,cAFkB;AAGtCE,UAAAA,cAAc,EAAE,KAAKA,cAHiB;AAItCK,UAAAA,sBAAsB,EAAE,KAAKA;AAJS,SAA1B,CAAd;;AAOAO,6BAASC,MAAT,CAAgBL,OAAhB,EAAyB,IAAzB;AACD;AACF;;;kDAnDwCM,W","sourcesContent":["import { DeleteSoundEvent, InsertSoundEvent, ModelUpdatedEvent } from '@pie-framework/pie-configure-events';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debug from 'debug';\n\nimport Main from './main';\nimport defaults from './defaults';\n\nconst modelWithDefaults = m => ({ ...defaults.model, ...m });\nconst configurationWithDefaults = c => ({ ...defaults.configuration, ...c });\n\nexport default class RubricElement extends HTMLElement {\n constructor() {\n super();\n debug.log('constructor called');\n this._model = modelWithDefaults();\n this._configuration = configurationWithDefaults();\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n set model(m) {\n this._model = modelWithDefaults(m);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = configurationWithDefaults(c);\n this._render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this._render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged = (c) => {\n this._configuration = configurationWithDefaults(c);\n\n if (this._model) {\n this.onModelChanged(this._model);\n }\n\n this._render();\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model) {\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n });\n\n ReactDOM.render(element, this);\n }\n }\n}\n"],"file":"index.js"}