@pie-element/complex-rubric 7.1.2-next.5 → 7.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1455 -0
- package/LICENSE.md +5 -0
- package/README.md +3 -0
- package/configure/CHANGELOG.md +1109 -0
- package/configure/lib/defaults.js +271 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +150 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +172 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/package.json +27 -0
- package/configure/src/__tests__/index.test.js +94 -0
- package/configure/src/__tests__/main.test.jsx +140 -0
- package/configure/src/defaults.js +213 -0
- package/configure/src/index.js +169 -0
- package/configure/src/main.jsx +162 -0
- package/controller/CHANGELOG.md +936 -0
- package/controller/lib/defaults.js +42 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +239 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/utils.js +11 -0
- package/controller/lib/utils.js.map +1 -0
- package/controller/package.json +16 -0
- package/controller/src/__tests__/index.test.js +55 -0
- package/controller/src/defaults.js +39 -0
- package/controller/src/index.js +220 -0
- package/controller/src/utils.js +3 -0
- package/docs/config-schema.json +4255 -0
- package/docs/config-schema.json.md +3162 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +196 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +6 -0
- package/docs/pie-schema.json +3302 -0
- package/docs/pie-schema.json.md +2364 -0
- package/lib/index.js +141 -0
- package/lib/index.js.map +1 -0
- package/lib/print.js +129 -0
- package/lib/print.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +262 -0
- package/module/demo.js +221 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +22 -0
- package/module/print-demo.js +259 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +22 -89
- package/src/__tests__/index.test.js +256 -0
- package/src/index.js +152 -0
- package/src/print.js +140 -0
- package/configure.js +0 -2
- package/controller.js +0 -1
- package/dist/author/defaults.d.ts +0 -231
- package/dist/author/defaults.js +0 -177
- package/dist/author/index.d.ts +0 -34
- package/dist/author/index.js +0 -90
- package/dist/author/main.d.ts +0 -25
- package/dist/author/main.js +0 -109
- package/dist/browser/author/index.js +0 -2138
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/complex-rubric.css +0 -2
- package/dist/browser/controller/index.js +0 -145
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -97
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/delivery-DROj6gHl.js +0 -691
- package/dist/browser/delivery-DROj6gHl.js.map +0 -1
- package/dist/browser/print/index.js +0 -85
- package/dist/browser/print/index.js.map +0 -1
- package/dist/browser/private-tags-C6RA489_.js +0 -60411
- package/dist/browser/private-tags-C6RA489_.js.map +0 -1
- package/dist/controller/defaults.d.ts +0 -39
- package/dist/controller/defaults.js +0 -42
- package/dist/controller/index.d.ts +0 -25
- package/dist/controller/index.js +0 -107
- package/dist/controller/utils.d.ts +0 -9
- package/dist/controller/utils.js +0 -4
- package/dist/delivery/index.d.ts +0 -23
- package/dist/delivery/index.js +0 -97
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -145
- package/dist/index.js +0 -2
- package/dist/print/index.d.ts +0 -24
- package/dist/print/index.js +0 -85
- package/dist/private-tags.d.ts +0 -4
- package/dist/private-tags.js +0 -3
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -12
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/complex-rubric/configure/src/defaults.js
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
import { RUBRIC_TYPES } from '@pie-lib/rubric';
|
|
10
|
-
declare const _default: {
|
|
11
|
-
model: {
|
|
12
|
-
rubricType: string;
|
|
13
|
-
rubrics: {
|
|
14
|
-
[RUBRIC_TYPES.SIMPLE_RUBRIC]: {
|
|
15
|
-
points: string[];
|
|
16
|
-
sampleAnswers: null[];
|
|
17
|
-
maxPoints: number;
|
|
18
|
-
excludeZero: boolean;
|
|
19
|
-
};
|
|
20
|
-
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: {
|
|
21
|
-
description: boolean;
|
|
22
|
-
excludeZero: boolean;
|
|
23
|
-
halfScoring: boolean;
|
|
24
|
-
pointLabels: boolean;
|
|
25
|
-
scales: never[];
|
|
26
|
-
standards: boolean;
|
|
27
|
-
visibleToStudent: boolean;
|
|
28
|
-
};
|
|
29
|
-
[RUBRIC_TYPES.RUBRICLESS]: {
|
|
30
|
-
maxPoints: number;
|
|
31
|
-
excludeZero: boolean;
|
|
32
|
-
rubriclessInstructionEnabled: boolean;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
configuration: {
|
|
37
|
-
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: {
|
|
38
|
-
baseInputConfiguration: {
|
|
39
|
-
h3: {
|
|
40
|
-
disabled: boolean;
|
|
41
|
-
};
|
|
42
|
-
audio: {
|
|
43
|
-
disabled: boolean;
|
|
44
|
-
};
|
|
45
|
-
video: {
|
|
46
|
-
disabled: boolean;
|
|
47
|
-
};
|
|
48
|
-
image: {
|
|
49
|
-
disabled: boolean;
|
|
50
|
-
};
|
|
51
|
-
textAlign: {
|
|
52
|
-
disabled: boolean;
|
|
53
|
-
};
|
|
54
|
-
showParagraphs: {
|
|
55
|
-
disabled: boolean;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
expandedInput: {
|
|
59
|
-
inputConfiguration: {
|
|
60
|
-
math: {
|
|
61
|
-
disabled: boolean;
|
|
62
|
-
};
|
|
63
|
-
audio: {
|
|
64
|
-
disabled: boolean;
|
|
65
|
-
};
|
|
66
|
-
video: {
|
|
67
|
-
disabled: boolean;
|
|
68
|
-
};
|
|
69
|
-
image: {
|
|
70
|
-
disabled: boolean;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
labelInput: {
|
|
75
|
-
inputConfiguration: {
|
|
76
|
-
math: {
|
|
77
|
-
disabled: boolean;
|
|
78
|
-
};
|
|
79
|
-
audio: {
|
|
80
|
-
disabled: boolean;
|
|
81
|
-
};
|
|
82
|
-
video: {
|
|
83
|
-
disabled: boolean;
|
|
84
|
-
};
|
|
85
|
-
image: {
|
|
86
|
-
disabled: boolean;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
settingsPanelDisabled: boolean;
|
|
91
|
-
excludeZeroDialogBoxContent: {
|
|
92
|
-
title: string;
|
|
93
|
-
text: string;
|
|
94
|
-
};
|
|
95
|
-
includeZeroDialogBoxContent: {
|
|
96
|
-
title: string;
|
|
97
|
-
text: string;
|
|
98
|
-
};
|
|
99
|
-
deleteScaleDialogBoxContent: {
|
|
100
|
-
title: string;
|
|
101
|
-
text: string;
|
|
102
|
-
};
|
|
103
|
-
maxPointsDialogBoxContent: {
|
|
104
|
-
title: string;
|
|
105
|
-
text: string;
|
|
106
|
-
};
|
|
107
|
-
spellCheck: {
|
|
108
|
-
label: string;
|
|
109
|
-
settings: boolean;
|
|
110
|
-
enabled: boolean;
|
|
111
|
-
};
|
|
112
|
-
showExcludeZero: {
|
|
113
|
-
settings: boolean;
|
|
114
|
-
label: string;
|
|
115
|
-
};
|
|
116
|
-
showScorePointLabels: {
|
|
117
|
-
settings: boolean;
|
|
118
|
-
label: string;
|
|
119
|
-
};
|
|
120
|
-
showDescription: {
|
|
121
|
-
settings: boolean;
|
|
122
|
-
label: string;
|
|
123
|
-
};
|
|
124
|
-
showVisibleToStudent: {
|
|
125
|
-
settings: boolean;
|
|
126
|
-
label: string;
|
|
127
|
-
};
|
|
128
|
-
showHalfScoring: {
|
|
129
|
-
settings: boolean;
|
|
130
|
-
label: string;
|
|
131
|
-
};
|
|
132
|
-
showStandards: {
|
|
133
|
-
settings: boolean;
|
|
134
|
-
label: string;
|
|
135
|
-
};
|
|
136
|
-
showLevelTagInput: {
|
|
137
|
-
settings: boolean;
|
|
138
|
-
label: string;
|
|
139
|
-
enabled: boolean;
|
|
140
|
-
};
|
|
141
|
-
dragAndDrop: {
|
|
142
|
-
settings: boolean;
|
|
143
|
-
label: string;
|
|
144
|
-
enabled: boolean;
|
|
145
|
-
};
|
|
146
|
-
maxMaxPoints: number;
|
|
147
|
-
};
|
|
148
|
-
[RUBRIC_TYPES.SIMPLE_RUBRIC]: {
|
|
149
|
-
baseInputConfiguration: {
|
|
150
|
-
h3: {
|
|
151
|
-
disabled: boolean;
|
|
152
|
-
};
|
|
153
|
-
audio: {
|
|
154
|
-
disabled: boolean;
|
|
155
|
-
};
|
|
156
|
-
video: {
|
|
157
|
-
disabled: boolean;
|
|
158
|
-
};
|
|
159
|
-
image: {
|
|
160
|
-
disabled: boolean;
|
|
161
|
-
};
|
|
162
|
-
textAlign: {
|
|
163
|
-
disabled: boolean;
|
|
164
|
-
};
|
|
165
|
-
showParagraphs: {
|
|
166
|
-
disabled: boolean;
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
showExcludeZero: {
|
|
170
|
-
settings: boolean;
|
|
171
|
-
label: string;
|
|
172
|
-
};
|
|
173
|
-
showMaxPoint: {
|
|
174
|
-
settings: boolean;
|
|
175
|
-
label: string;
|
|
176
|
-
};
|
|
177
|
-
settingsPanelDisabled: boolean;
|
|
178
|
-
maxMaxPoints: number;
|
|
179
|
-
};
|
|
180
|
-
[RUBRIC_TYPES.RUBRICLESS]: {
|
|
181
|
-
baseInputConfiguration: {
|
|
182
|
-
h3: {
|
|
183
|
-
disabled: boolean;
|
|
184
|
-
};
|
|
185
|
-
audio: {
|
|
186
|
-
disabled: boolean;
|
|
187
|
-
};
|
|
188
|
-
video: {
|
|
189
|
-
disabled: boolean;
|
|
190
|
-
};
|
|
191
|
-
image: {
|
|
192
|
-
disabled: boolean;
|
|
193
|
-
};
|
|
194
|
-
textAlign: {
|
|
195
|
-
disabled: boolean;
|
|
196
|
-
};
|
|
197
|
-
showParagraphs: {
|
|
198
|
-
disabled: boolean;
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
showExcludeZero: {
|
|
202
|
-
settings: boolean;
|
|
203
|
-
label: string;
|
|
204
|
-
};
|
|
205
|
-
showMaxPoint: {
|
|
206
|
-
settings: boolean;
|
|
207
|
-
label: string;
|
|
208
|
-
};
|
|
209
|
-
settingsPanelDisabled: boolean;
|
|
210
|
-
rubricless: boolean;
|
|
211
|
-
rubriclessInstruction: {
|
|
212
|
-
settings: boolean;
|
|
213
|
-
label: string;
|
|
214
|
-
inputConfiguration: {
|
|
215
|
-
audio: {
|
|
216
|
-
disabled: boolean;
|
|
217
|
-
};
|
|
218
|
-
video: {
|
|
219
|
-
disabled: boolean;
|
|
220
|
-
};
|
|
221
|
-
image: {
|
|
222
|
-
disabled: boolean;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
maxMaxPoints: number;
|
|
227
|
-
};
|
|
228
|
-
rubricOptions: string[];
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
export default _default;
|
package/dist/author/defaults.js
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { RUBRIC_TYPES as e } from "@pie-lib/rubric";
|
|
2
|
-
//#region src/author/defaults.tsx
|
|
3
|
-
var t = {
|
|
4
|
-
description: !1,
|
|
5
|
-
excludeZero: !1,
|
|
6
|
-
halfScoring: !1,
|
|
7
|
-
pointLabels: !0,
|
|
8
|
-
scales: [],
|
|
9
|
-
standards: !1,
|
|
10
|
-
visibleToStudent: !0
|
|
11
|
-
}, n = {
|
|
12
|
-
points: [
|
|
13
|
-
"",
|
|
14
|
-
"",
|
|
15
|
-
"",
|
|
16
|
-
""
|
|
17
|
-
],
|
|
18
|
-
sampleAnswers: [
|
|
19
|
-
null,
|
|
20
|
-
null,
|
|
21
|
-
null,
|
|
22
|
-
null
|
|
23
|
-
],
|
|
24
|
-
maxPoints: 3,
|
|
25
|
-
excludeZero: !1
|
|
26
|
-
}, r = {
|
|
27
|
-
maxPoints: 100,
|
|
28
|
-
excludeZero: !1,
|
|
29
|
-
rubriclessInstructionEnabled: !0
|
|
30
|
-
}, i = {
|
|
31
|
-
baseInputConfiguration: {
|
|
32
|
-
h3: { disabled: !0 },
|
|
33
|
-
audio: { disabled: !1 },
|
|
34
|
-
video: { disabled: !1 },
|
|
35
|
-
image: { disabled: !1 },
|
|
36
|
-
textAlign: { disabled: !0 },
|
|
37
|
-
showParagraphs: { disabled: !1 }
|
|
38
|
-
},
|
|
39
|
-
expandedInput: { inputConfiguration: {
|
|
40
|
-
math: { disabled: !0 },
|
|
41
|
-
audio: { disabled: !1 },
|
|
42
|
-
video: { disabled: !1 },
|
|
43
|
-
image: { disabled: !1 }
|
|
44
|
-
} },
|
|
45
|
-
labelInput: { inputConfiguration: {
|
|
46
|
-
math: { disabled: !0 },
|
|
47
|
-
audio: { disabled: !0 },
|
|
48
|
-
video: { disabled: !0 },
|
|
49
|
-
image: { disabled: !0 }
|
|
50
|
-
} },
|
|
51
|
-
settingsPanelDisabled: !1,
|
|
52
|
-
excludeZeroDialogBoxContent: {
|
|
53
|
-
title: "Exclude 0 (Zero) from Score Point Values.",
|
|
54
|
-
text: "<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"
|
|
55
|
-
},
|
|
56
|
-
includeZeroDialogBoxContent: {
|
|
57
|
-
title: "Include 0 (Zero) in Score Point Values.",
|
|
58
|
-
text: "<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"
|
|
59
|
-
},
|
|
60
|
-
deleteScaleDialogBoxContent: {
|
|
61
|
-
title: "Delete Scale",
|
|
62
|
-
text: "Are you sure you want to delete this scale?"
|
|
63
|
-
},
|
|
64
|
-
maxPointsDialogBoxContent: {
|
|
65
|
-
title: "Decreasing Max Points.",
|
|
66
|
-
text: " You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."
|
|
67
|
-
},
|
|
68
|
-
spellCheck: {
|
|
69
|
-
label: "Spellcheck",
|
|
70
|
-
settings: !1,
|
|
71
|
-
enabled: !0
|
|
72
|
-
},
|
|
73
|
-
showExcludeZero: {
|
|
74
|
-
settings: !0,
|
|
75
|
-
label: "Exclude Zero"
|
|
76
|
-
},
|
|
77
|
-
showScorePointLabels: {
|
|
78
|
-
settings: !0,
|
|
79
|
-
label: "Show Score Point Labels"
|
|
80
|
-
},
|
|
81
|
-
showDescription: {
|
|
82
|
-
settings: !0,
|
|
83
|
-
label: "Show Description"
|
|
84
|
-
},
|
|
85
|
-
showVisibleToStudent: {
|
|
86
|
-
settings: !0,
|
|
87
|
-
label: "Visible to Student"
|
|
88
|
-
},
|
|
89
|
-
showHalfScoring: {
|
|
90
|
-
settings: !0,
|
|
91
|
-
label: "Half Scoring"
|
|
92
|
-
},
|
|
93
|
-
showStandards: {
|
|
94
|
-
settings: !1,
|
|
95
|
-
label: "Show Standards"
|
|
96
|
-
},
|
|
97
|
-
showLevelTagInput: {
|
|
98
|
-
settings: !1,
|
|
99
|
-
label: "Show Level Tag Input",
|
|
100
|
-
enabled: !1
|
|
101
|
-
},
|
|
102
|
-
dragAndDrop: {
|
|
103
|
-
settings: !0,
|
|
104
|
-
label: "Enable Drag and Drop",
|
|
105
|
-
enabled: !1
|
|
106
|
-
},
|
|
107
|
-
maxMaxPoints: 9
|
|
108
|
-
}, a = {
|
|
109
|
-
baseInputConfiguration: {
|
|
110
|
-
h3: { disabled: !0 },
|
|
111
|
-
audio: { disabled: !1 },
|
|
112
|
-
video: { disabled: !1 },
|
|
113
|
-
image: { disabled: !1 },
|
|
114
|
-
textAlign: { disabled: !0 },
|
|
115
|
-
showParagraphs: { disabled: !1 }
|
|
116
|
-
},
|
|
117
|
-
showExcludeZero: {
|
|
118
|
-
settings: !0,
|
|
119
|
-
label: "Ability to exclude zero"
|
|
120
|
-
},
|
|
121
|
-
showMaxPoint: {
|
|
122
|
-
settings: !0,
|
|
123
|
-
label: "Show max points dropdown"
|
|
124
|
-
},
|
|
125
|
-
settingsPanelDisabled: !1,
|
|
126
|
-
maxMaxPoints: 9
|
|
127
|
-
}, o = {
|
|
128
|
-
baseInputConfiguration: {
|
|
129
|
-
h3: { disabled: !0 },
|
|
130
|
-
audio: { disabled: !1 },
|
|
131
|
-
video: { disabled: !1 },
|
|
132
|
-
image: { disabled: !1 },
|
|
133
|
-
textAlign: { disabled: !0 },
|
|
134
|
-
showParagraphs: { disabled: !1 }
|
|
135
|
-
},
|
|
136
|
-
showExcludeZero: {
|
|
137
|
-
settings: !0,
|
|
138
|
-
label: "Ability to exclude zero"
|
|
139
|
-
},
|
|
140
|
-
showMaxPoint: {
|
|
141
|
-
settings: !0,
|
|
142
|
-
label: "Show max points dropdown"
|
|
143
|
-
},
|
|
144
|
-
settingsPanelDisabled: !1,
|
|
145
|
-
rubricless: !0,
|
|
146
|
-
rubriclessInstruction: {
|
|
147
|
-
settings: !0,
|
|
148
|
-
label: "Instruction",
|
|
149
|
-
inputConfiguration: {
|
|
150
|
-
audio: { disabled: !1 },
|
|
151
|
-
video: { disabled: !1 },
|
|
152
|
-
image: { disabled: !1 }
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
maxMaxPoints: 100
|
|
156
|
-
}, s = {
|
|
157
|
-
model: {
|
|
158
|
-
rubricType: "simpleRubric",
|
|
159
|
-
rubrics: {
|
|
160
|
-
[e.SIMPLE_RUBRIC]: n,
|
|
161
|
-
[e.MULTI_TRAIT_RUBRIC]: t,
|
|
162
|
-
[e.RUBRICLESS]: r
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
configuration: {
|
|
166
|
-
rubricOptions: [
|
|
167
|
-
"simpleRubric",
|
|
168
|
-
"multiTraitRubric",
|
|
169
|
-
"rubricless"
|
|
170
|
-
],
|
|
171
|
-
[e.MULTI_TRAIT_RUBRIC]: i,
|
|
172
|
-
[e.SIMPLE_RUBRIC]: a,
|
|
173
|
-
[e.RUBRICLESS]: o
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
//#endregion
|
|
177
|
-
export { s as default };
|
package/dist/author/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/complex-rubric/configure/src/index.js
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
export default class ComplexRubricConfigureElement extends HTMLElement {
|
|
10
|
-
static createDefaultModel: ({ rubrics: { simpleRubric, rubricless, multiTraitRubric }, ...model }?: {
|
|
11
|
-
rubrics?: {
|
|
12
|
-
simpleRubric?: {};
|
|
13
|
-
rubricless?: {};
|
|
14
|
-
multiTraitRubric?: {};
|
|
15
|
-
} | undefined;
|
|
16
|
-
}, currentModel?: {}) => {
|
|
17
|
-
rubrics: {
|
|
18
|
-
simpleRubric: any;
|
|
19
|
-
multiTraitRubric: any;
|
|
20
|
-
rubricless: any;
|
|
21
|
-
};
|
|
22
|
-
rubricType: string;
|
|
23
|
-
};
|
|
24
|
-
constructor();
|
|
25
|
-
set model(m: any);
|
|
26
|
-
dispatchModelUpdated(reset: any): void;
|
|
27
|
-
onModelChanged: any;
|
|
28
|
-
set configuration(c: any);
|
|
29
|
-
onConfigurationChanged(c: any): void;
|
|
30
|
-
onModelUpdated: any;
|
|
31
|
-
connectedCallback(): void;
|
|
32
|
-
_render(): void;
|
|
33
|
-
disconnectedCallback(): void;
|
|
34
|
-
}
|
package/dist/author/index.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { COMPLEX_RUBRIC_MULTI_TRAIT_CONFIGURE_TAG as e, COMPLEX_RUBRIC_SIMPLE_CONFIGURE_TAG as t } from "../private-tags.js";
|
|
2
|
-
import n from "./main.js";
|
|
3
|
-
import r from "./defaults.js";
|
|
4
|
-
import { ModelUpdatedEvent as i } from "@pie-element/shared-configure-events";
|
|
5
|
-
import a from "react";
|
|
6
|
-
import { createRoot as o } from "react-dom/client";
|
|
7
|
-
import s from "@pie-element/rubric/author";
|
|
8
|
-
import c from "@pie-element/multi-trait-rubric/author";
|
|
9
|
-
import l from "debug";
|
|
10
|
-
import { defaults as u } from "@pie-element/shared-lodash";
|
|
11
|
-
//#region src/author/index.ts
|
|
12
|
-
var d = i.TYPE, f = t, p = e, m = class extends s {}, h = class extends c {};
|
|
13
|
-
customElements.get(f) || customElements.define(f, m), customElements.get(p) || customElements.define(p, h);
|
|
14
|
-
var g = (e, t) => ({
|
|
15
|
-
configuration: u(e, r.configuration),
|
|
16
|
-
model: t
|
|
17
|
-
}), _ = class e extends HTMLElement {
|
|
18
|
-
static createDefaultModel = ({ rubrics: { simpleRubric: e = {}, rubricless: t = {}, multiTraitRubric: n = {} } = {
|
|
19
|
-
simpleRubric: {},
|
|
20
|
-
rubricless: {},
|
|
21
|
-
multiTraitRubric: {}
|
|
22
|
-
}, ...i } = {}, a = {}) => ({
|
|
23
|
-
...r?.model || {},
|
|
24
|
-
...a,
|
|
25
|
-
...i,
|
|
26
|
-
rubrics: {
|
|
27
|
-
simpleRubric: {
|
|
28
|
-
...(r?.model?.rubrics || {}).simpleRubric,
|
|
29
|
-
...(a.rubrics || {}).simpleRubric,
|
|
30
|
-
...e
|
|
31
|
-
},
|
|
32
|
-
multiTraitRubric: {
|
|
33
|
-
...(r?.model?.rubrics || {}).multiTraitRubric,
|
|
34
|
-
...(a.rubrics || {}).multiTraitRubric,
|
|
35
|
-
...n
|
|
36
|
-
},
|
|
37
|
-
rubricless: {
|
|
38
|
-
...(r?.model?.rubrics || {}).rubricless,
|
|
39
|
-
...(a.rubrics || {}).rubricless,
|
|
40
|
-
...t
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
constructor() {
|
|
45
|
-
super(), this._root = null, this.canUpdateModel = !1, l.log("constructor called"), this._model = e.createDefaultModel(), this._configuration = r.configuration, this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
46
|
-
}
|
|
47
|
-
set model(t) {
|
|
48
|
-
this._model = e.createDefaultModel(t, this._model), this.canUpdateModel = !0, this._render();
|
|
49
|
-
}
|
|
50
|
-
dispatchModelUpdated(e) {
|
|
51
|
-
let t = !!e;
|
|
52
|
-
this.dispatchEvent(new i(this._model, t));
|
|
53
|
-
}
|
|
54
|
-
onModelChanged = (t, n) => {
|
|
55
|
-
this._model = e.createDefaultModel(t, this._model), this.dispatchModelUpdated(n), this._render();
|
|
56
|
-
};
|
|
57
|
-
set configuration(e) {
|
|
58
|
-
let t = g(e, this._model);
|
|
59
|
-
this._configuration = t.configuration, this._render();
|
|
60
|
-
}
|
|
61
|
-
onConfigurationChanged(e) {
|
|
62
|
-
this._configuration = g(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
|
|
63
|
-
}
|
|
64
|
-
onModelUpdated = (e) => {
|
|
65
|
-
if (e.target === this) return;
|
|
66
|
-
e.preventDefault(), e.stopImmediatePropagation();
|
|
67
|
-
let t = e.target && e.target.getAttribute("id");
|
|
68
|
-
t && (e.update && (this._model.rubrics[t] = e.update), this.dispatchEvent(new i(this._model)));
|
|
69
|
-
};
|
|
70
|
-
connectedCallback() {
|
|
71
|
-
this.addEventListener(d, this.onModelUpdated), this._render();
|
|
72
|
-
}
|
|
73
|
-
_render() {
|
|
74
|
-
let e = a.createElement(n, {
|
|
75
|
-
model: this._model,
|
|
76
|
-
configuration: this._configuration,
|
|
77
|
-
multiTraitRubricTagName: p,
|
|
78
|
-
onModelChanged: this.onModelChanged,
|
|
79
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
80
|
-
simpleRubricTagName: f,
|
|
81
|
-
canUpdateModel: this.canUpdateModel
|
|
82
|
-
});
|
|
83
|
-
this._root ||= o(this), this._root.render(e);
|
|
84
|
-
}
|
|
85
|
-
disconnectedCallback() {
|
|
86
|
-
this.removeEventListener(d, this.onModelUpdated), this._root && this._root.unmount();
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
//#endregion
|
|
90
|
-
export { _ as default };
|
package/dist/author/main.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/complex-rubric/configure/src/main.jsx
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare class Main extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
canUpdateModel: PropTypes.Requireable<boolean>;
|
|
14
|
-
configuration: PropTypes.Requireable<object>;
|
|
15
|
-
multiTraitRubricTagName: PropTypes.Requireable<string>;
|
|
16
|
-
model: PropTypes.Requireable<object>;
|
|
17
|
-
onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
-
onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
-
simpleRubricTagName: PropTypes.Requireable<string>;
|
|
20
|
-
};
|
|
21
|
-
onModelChanged: any;
|
|
22
|
-
onChangeRubricType: any;
|
|
23
|
-
render(): React.JSX.Element;
|
|
24
|
-
}
|
|
25
|
-
export default Main;
|
package/dist/author/main.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { COMPLEX_RUBRIC_MULTI_TRAIT_CONFIGURE_TAG as e, COMPLEX_RUBRIC_SIMPLE_CONFIGURE_TAG as t } from "../private-tags.js";
|
|
2
|
-
import { RUBRIC_TYPES as n } from "@pie-lib/rubric";
|
|
3
|
-
import r from "react";
|
|
4
|
-
import i from "prop-types";
|
|
5
|
-
import { layout as a } from "@pie-lib/config-ui";
|
|
6
|
-
import o from "@mui/material/Radio";
|
|
7
|
-
import s from "@mui/material/RadioGroup";
|
|
8
|
-
import c from "@mui/material/FormControlLabel";
|
|
9
|
-
import { styled as l } from "@mui/material/styles";
|
|
10
|
-
import { color as u } from "@pie-lib/render-ui";
|
|
11
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
-
//#region src/author/main.tsx
|
|
13
|
-
var p = l(c)({ "&.MuiFormControlLabel-root": {
|
|
14
|
-
width: "fit-content",
|
|
15
|
-
paddingRight: "24px",
|
|
16
|
-
boxSizing: "border-box",
|
|
17
|
-
"&:hover": { background: "var(--pie-secondary-background, rgba(241,241,241,1))" }
|
|
18
|
-
} }), m = l(o)({ "&.MuiRadio-root": { color: `${u.tertiary()} !important` } }), h = {
|
|
19
|
-
[n.MULTI_TRAIT_RUBRIC]: "Multi Trait Rubric",
|
|
20
|
-
[n.SIMPLE_RUBRIC]: "Simple Rubric",
|
|
21
|
-
[n.RUBRICLESS]: "Rubricless"
|
|
22
|
-
}, g = class extends r.Component {
|
|
23
|
-
static propTypes = {
|
|
24
|
-
canUpdateModel: i.bool,
|
|
25
|
-
configuration: i.object,
|
|
26
|
-
multiTraitRubricTagName: i.string,
|
|
27
|
-
model: i.object,
|
|
28
|
-
onModelChanged: i.func,
|
|
29
|
-
onConfigurationChanged: i.func,
|
|
30
|
-
simpleRubricTagName: i.string
|
|
31
|
-
};
|
|
32
|
-
onModelChanged = (e) => {
|
|
33
|
-
let { onModelChanged: t } = this.props;
|
|
34
|
-
return t(e);
|
|
35
|
-
};
|
|
36
|
-
onChangeRubricType = (e) => {
|
|
37
|
-
let { model: t } = this.props, n = e.target.value;
|
|
38
|
-
this.onModelChanged({
|
|
39
|
-
...t,
|
|
40
|
-
rubricType: n
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
render() {
|
|
44
|
-
let { model: r, configuration: i, canUpdateModel: o, multiTraitRubricTagName: c = e, simpleRubricTagName: l = t } = this.props, u = c, g = l, { extraCSSRules: _, rubrics: v = {} } = r || {}, { rubricType: y } = r, { contentDimensions: b = {}, rubricOptions: x = [], multiTraitRubric: S, simpleRubric: C, rubricless: w, width: T } = i, E = "";
|
|
45
|
-
y ||= n.SIMPLE_RUBRIC;
|
|
46
|
-
let D = x.indexOf(y) > -1;
|
|
47
|
-
if (o) switch (y) {
|
|
48
|
-
case n.SIMPLE_RUBRIC:
|
|
49
|
-
default:
|
|
50
|
-
E = /* @__PURE__ */ d(g, {
|
|
51
|
-
id: "simpleRubric",
|
|
52
|
-
ref: (e) => {
|
|
53
|
-
e && (this.simpleRubric = e, this.simpleRubric.model = {
|
|
54
|
-
...v.simpleRubric,
|
|
55
|
-
errors: r.errors || {}
|
|
56
|
-
}, this.simpleRubric.configuration = {
|
|
57
|
-
...C,
|
|
58
|
-
width: T
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}, "simple-rubric");
|
|
62
|
-
break;
|
|
63
|
-
case n.MULTI_TRAIT_RUBRIC:
|
|
64
|
-
E = /* @__PURE__ */ d(u, {
|
|
65
|
-
id: "multiTraitRubric",
|
|
66
|
-
ref: (e) => {
|
|
67
|
-
e && (this.multiTraitRubric = e, this.multiTraitRubric.model = {
|
|
68
|
-
...v.multiTraitRubric,
|
|
69
|
-
errors: r.errors || {}
|
|
70
|
-
}, this.multiTraitRubric.configuration = {
|
|
71
|
-
...S,
|
|
72
|
-
width: T || S.width
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}, "multi-trait-rubric");
|
|
76
|
-
break;
|
|
77
|
-
case n.RUBRICLESS:
|
|
78
|
-
E = /* @__PURE__ */ d(g, {
|
|
79
|
-
id: "rubricless",
|
|
80
|
-
ref: (e) => {
|
|
81
|
-
e && (this.rubricless = e, this.rubricless.model = v.rubricless, this.rubricless.configuration = {
|
|
82
|
-
...w,
|
|
83
|
-
width: T
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}, "rubricless");
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
return /* @__PURE__ */ f(a.ConfigLayout, {
|
|
90
|
-
extraCSSRules: _,
|
|
91
|
-
dimensions: b,
|
|
92
|
-
hideSettings: !0,
|
|
93
|
-
settings: null,
|
|
94
|
-
children: [/* @__PURE__ */ d(s, {
|
|
95
|
-
"aria-label": "rubric-type",
|
|
96
|
-
name: "rubricType",
|
|
97
|
-
value: r.rubricType,
|
|
98
|
-
onChange: this.onChangeRubricType,
|
|
99
|
-
children: x.length > 1 && x.map((e, t) => /* @__PURE__ */ d(p, {
|
|
100
|
-
value: e,
|
|
101
|
-
control: /* @__PURE__ */ d(m, { checked: y === e }),
|
|
102
|
-
label: h[e]
|
|
103
|
-
}, t))
|
|
104
|
-
}), D && E]
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
//#endregion
|
|
109
|
-
export { g as default };
|