@pie-element/complex-rubric 0.0.2-next.4424 → 0.1.0

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.
Files changed (204) hide show
  1. package/dist/author/defaults.d.ts +232 -0
  2. package/dist/author/defaults.d.ts.map +1 -0
  3. package/dist/author/defaults.js +177 -0
  4. package/dist/author/index.d.ts +35 -0
  5. package/dist/author/index.d.ts.map +1 -0
  6. package/dist/author/index.js +86 -0
  7. package/dist/author/main.d.ts +24 -0
  8. package/dist/author/main.d.ts.map +1 -0
  9. package/dist/author/main.js +106 -0
  10. package/dist/controller/defaults.d.ts +40 -0
  11. package/dist/controller/defaults.d.ts.map +1 -0
  12. package/dist/controller/defaults.js +42 -0
  13. package/dist/controller/index.d.ts +26 -0
  14. package/dist/controller/index.d.ts.map +1 -0
  15. package/dist/controller/index.js +107 -0
  16. package/dist/controller/utils.d.ts +10 -0
  17. package/dist/controller/utils.d.ts.map +1 -0
  18. package/dist/controller/utils.js +4 -0
  19. package/dist/delivery/index.d.ts +24 -0
  20. package/dist/delivery/index.d.ts.map +1 -0
  21. package/dist/delivery/index.js +96 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.iife.d.ts +9 -0
  25. package/dist/index.iife.d.ts.map +1 -0
  26. package/dist/index.iife.js +145 -0
  27. package/dist/index.js +2 -0
  28. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
  29. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
  30. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  31. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
  32. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
  33. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
  34. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  35. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
  36. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
  37. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
  38. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
  39. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
  40. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
  41. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
  42. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
  43. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
  44. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
  45. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
  46. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
  47. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
  48. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
  49. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
  50. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  51. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
  52. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
  53. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
  54. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
  55. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
  56. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
  57. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
  58. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
  59. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
  60. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
  61. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
  62. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
  63. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
  64. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
  65. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
  66. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
  67. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
  68. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
  69. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
  70. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
  71. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
  72. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
  73. package/dist/print/index.d.ts +25 -0
  74. package/dist/print/index.d.ts.map +1 -0
  75. package/dist/print/index.js +84 -0
  76. package/package.json +65 -16
  77. package/src/author/defaults.tsx +223 -0
  78. package/{configure/src/index.js → src/author/index.ts} +69 -28
  79. package/src/author/main.tsx +172 -0
  80. package/src/controller/defaults.ts +49 -0
  81. package/src/controller/index.ts +230 -0
  82. package/src/controller/utils.ts +13 -0
  83. package/src/{index.js → delivery/index.ts} +65 -9
  84. package/src/index.iife.ts +16 -0
  85. package/src/index.ts +1 -0
  86. package/src/print/index.ts +150 -0
  87. package/LICENSE.md +0 -5
  88. package/README.md +0 -3
  89. package/configure/lib/defaults.js +0 -99
  90. package/configure/lib/defaults.js.map +0 -1
  91. package/configure/lib/index.js +0 -232
  92. package/configure/lib/index.js.map +0 -1
  93. package/configure/lib/main.js +0 -165
  94. package/configure/lib/main.js.map +0 -1
  95. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +0 -1
  96. package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +0 -376
  97. package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +0 -5
  98. package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +0 -55
  99. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +0 -1
  100. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +0 -344
  101. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -455
  102. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +0 -1
  103. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +0 -82
  104. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +0 -1
  105. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +0 -112
  106. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +0 -1
  107. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +0 -438
  108. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +0 -1
  109. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +0 -324
  110. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +0 -1
  111. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +0 -490
  112. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +0 -1
  113. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +0 -334
  114. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +0 -1
  115. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +0 -254
  116. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +0 -1
  117. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +0 -29
  118. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +0 -1
  119. package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +0 -22
  120. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +0 -1
  121. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +0 -66
  122. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -9
  123. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +0 -1
  124. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +0 -122
  125. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +0 -1
  126. package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -15
  127. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -226
  128. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -169
  129. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +0 -8
  130. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +0 -108
  131. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +0 -1
  132. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +0 -6
  133. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +0 -282
  134. package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -189
  135. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -85
  136. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +0 -1
  137. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +0 -99
  138. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +0 -1
  139. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +0 -209
  140. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +0 -1
  141. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +0 -103
  142. package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +0 -1
  143. package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +0 -24
  144. package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
  145. package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -731
  146. package/configure/node_modules/@pie-element/rubric/LICENSE.md +0 -5
  147. package/configure/node_modules/@pie-element/rubric/README.md +0 -3
  148. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
  149. package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +0 -615
  150. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -93
  151. package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
  152. package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -16
  153. package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -38
  154. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
  155. package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -105
  156. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -14
  157. package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
  158. package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -9
  159. package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -35
  160. package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -6
  161. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -24
  162. package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -19
  163. package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +0 -8
  164. package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
  165. package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -3
  166. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -62
  167. package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -35
  168. package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -88
  169. package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
  170. package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -171
  171. package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
  172. package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
  173. package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
  174. package/configure/node_modules/@pie-element/rubric/package.json +0 -25
  175. package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -22767
  176. package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -48
  177. package/configure/node_modules/@pie-element/rubric/src/index.js +0 -38
  178. package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -117
  179. package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
  180. package/configure/package.json +0 -22
  181. package/configure/src/__tests__/__snapshots__/main.test.jsx.snap +0 -106
  182. package/configure/src/__tests__/index.test.js +0 -41
  183. package/configure/src/__tests__/main.test.jsx +0 -104
  184. package/configure/src/defaults.js +0 -122
  185. package/configure/src/main.jsx +0 -117
  186. package/controller/lib/defaults.js +0 -99
  187. package/controller/lib/defaults.js.map +0 -1
  188. package/controller/lib/index.js +0 -147
  189. package/controller/lib/index.js.map +0 -1
  190. package/controller/package.json +0 -12
  191. package/controller/src/__tests__/index.test.js +0 -58
  192. package/controller/src/defaults.js +0 -121
  193. package/controller/src/index.js +0 -81
  194. package/docs/config-schema.json +0 -427
  195. package/docs/config-schema.json.md +0 -315
  196. package/docs/demo/config.js +0 -8
  197. package/docs/demo/generate.js +0 -119
  198. package/docs/demo/index.html +0 -1
  199. package/docs/demo/session.js +0 -6
  200. package/docs/pie-schema.json +0 -994
  201. package/docs/pie-schema.json.md +0 -660
  202. package/lib/index.js +0 -176
  203. package/lib/index.js.map +0 -1
  204. package/src/__tests__/index.test.js +0 -166
@@ -0,0 +1,230 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/complex-rubric/controller/src/index.js
4
+ * @auto-generated
5
+ *
6
+ * This file is automatically synced from pie-elements and converted to TypeScript.
7
+ * Manual edits will be overwritten on next sync.
8
+ * To make changes, edit the upstream JavaScript file and run sync again.
9
+ */
10
+
11
+ import defaults from './defaults.js';
12
+ import { markupToText } from './utils.js';
13
+
14
+
15
+ // todo the import from pie-lib/rubric WILL break pslb
16
+ // so don't use it unless you also test "yarn build"
17
+ const RUBRIC_TYPES = {
18
+ SIMPLE_RUBRIC: 'simpleRubric',
19
+ MULTI_TRAIT_RUBRIC: 'multiTraitRubric',
20
+ 'rubricless': 'rubricless',
21
+ };
22
+
23
+ export function createDefaultModel(model = {}) {
24
+ return new Promise((resolve) => resolve({ ...defaults, ...model }));
25
+ }
26
+
27
+ export const normalize = (question) => ({ ...defaults, ...question });
28
+
29
+ /**
30
+ * @param {*} question
31
+ * @param {*} session
32
+ * @param {*} env
33
+ */
34
+ export async function model(question, session, env) {
35
+ const normalizedQuestion = normalize(question);
36
+
37
+ if (
38
+ normalizedQuestion.rubricType === RUBRIC_TYPES.SIMPLE_RUBRIC ||
39
+ normalizedQuestion.rubricType === RUBRIC_TYPES.RUBRICLESS
40
+ ) {
41
+ return new Promise((resolve) => {
42
+ resolve(
43
+ env && env.role && env.role === 'instructor'
44
+ ? {
45
+ ...normalizedQuestion,
46
+ rubrics: {
47
+ ...normalizedQuestion.rubrics,
48
+ multiTraitRubric: {
49
+ ...normalizedQuestion.rubrics.multiTraitRubric,
50
+ visible: false,
51
+ },
52
+ },
53
+ }
54
+ : {},
55
+ );
56
+ });
57
+ } else {
58
+ if (
59
+ !env.role ||
60
+ (env.role === 'student' && normalizedQuestion.rubrics && normalizedQuestion.rubrics.multiTraitRubric)
61
+ ) {
62
+ normalizedQuestion.rubrics.multiTraitRubric.visible = normalizedQuestion.visibleToStudent;
63
+ } else {
64
+ normalizedQuestion.rubrics.multiTraitRubric.visible = true;
65
+ }
66
+
67
+ // todo update pie-ui instead of parsing this here:
68
+ const { scales, excludeZero } = normalizedQuestion.rubrics.multiTraitRubric || {};
69
+ const parsedScales = (scales || []).map((scale) => ({ ...scale, excludeZero }));
70
+
71
+ return {
72
+ ...normalizedQuestion,
73
+ rubrics: {
74
+ ...normalizedQuestion.rubrics,
75
+ simpleRubric: {
76
+ ...normalizedQuestion.rubrics.simpleRubric,
77
+ visible: false,
78
+ },
79
+ rubricless: {
80
+ ...normalizedQuestion.rubrics.rubricless,
81
+ visible: false,
82
+ },
83
+ multiTraitRubric: {
84
+ ...normalizedQuestion.rubrics.multiTraitRubric,
85
+ scales: parsedScales,
86
+ },
87
+ },
88
+ };
89
+ }
90
+ }
91
+
92
+ export const getScore = () => 0;
93
+
94
+ /**
95
+ * @param {Object} model - the main model
96
+ * @param {*} session
97
+ * @param {Object} env
98
+ */
99
+ export function outcome() {
100
+ return new Promise((resolve) => resolve({ score: 0, empty: true }));
101
+ }
102
+
103
+ export const createCorrectResponseSession = (question, env) => {
104
+ return new Promise((resolve) => {
105
+ if (env.mode !== 'evaluate' && env.role === 'instructor') {
106
+ resolve({ id: '1' });
107
+ } else {
108
+ resolve(null);
109
+ }
110
+ });
111
+ };
112
+
113
+ // IMPORTANT! This function is a duplicate of rubric/controller/validate function!
114
+ // If you make any changes to this function, please make sure you also update rubric/controller/validate function!“.
115
+ const validateSimpleRubric = (model) => {
116
+ const { points } = model;
117
+ const errors = {};
118
+ const pointsDescriptorsErrors = {};
119
+
120
+ (points || []).forEach((point, index) => {
121
+
122
+ if (!point || point === '<div></div>') {
123
+ pointsDescriptorsErrors[index] = 'Points descriptors cannot be empty.';
124
+ } else {
125
+ const identicalPointDescr = points.slice(index + 1).some((p) => markupToText(p) === markupToText(point));
126
+
127
+ if (identicalPointDescr) {
128
+ pointsDescriptorsErrors[index] = 'Points descriptors should be unique.';
129
+ }
130
+ }
131
+ });
132
+
133
+ if (Object.keys(pointsDescriptorsErrors).length > 0) {
134
+ errors.pointsDescriptorsErrors = pointsDescriptorsErrors;
135
+ }
136
+
137
+ return errors;
138
+ };
139
+
140
+ // IMPORTANT! This function is a duplicate of multi-trait-rubric/controller/validate function!
141
+ // If you make any changes to this function, please make sure you also update multi-trait-rubric/controller/validate function!“.
142
+ const validateMultiTraitRubric = (model) => {
143
+ const { scales, description = false, pointLabels = false } = model;
144
+ const errors = {};
145
+ const traitsErrors = {};
146
+ const scorePointsErrors = {};
147
+
148
+ (scales || []).forEach((scale, scaleIndex) => {
149
+ const { traits = [] } = scale;
150
+ const { scorePointsLabels = [] } = scale;
151
+ const scaleErrors = {};
152
+ const scorePointsLabelsErrors = {};
153
+
154
+ if (pointLabels) {
155
+ scorePointsLabels.forEach((scorePointLabel, scoreIndex) => {
156
+ if (!scorePointLabel || scorePointLabel === '<div></div>') {
157
+ scorePointsLabelsErrors[scoreIndex] = 'Points labels should not be empty.';
158
+ } else {
159
+ const identicalScorePointLabel = scorePointsLabels
160
+ .slice(scoreIndex + 1)
161
+ .some((s) => markupToText(s) === markupToText(scorePointLabel));
162
+
163
+ if (identicalScorePointLabel) {
164
+ scorePointsLabelsErrors[scoreIndex] = 'Points labels should be unique.';
165
+ }
166
+ }
167
+ });
168
+ }
169
+
170
+ if (Object.keys(scorePointsLabelsErrors).length > 0) {
171
+ scorePointsErrors[scaleIndex] = scorePointsLabelsErrors;
172
+ }
173
+
174
+ traits.forEach((trait, traitIndex) => {
175
+ if (!trait.name || trait.name === '<div></div>') {
176
+ scaleErrors[traitIndex] = { name: 'Trait names should not be empty.' };
177
+ } else {
178
+ const identicalTraitName = traits
179
+ .slice(traitIndex + 1)
180
+ .some((t) => markupToText(t.name) === markupToText(trait.name));
181
+
182
+ if (identicalTraitName) {
183
+ scaleErrors[traitIndex] = { name: 'Trait names should be unique.' };
184
+ }
185
+ }
186
+ if (description && (!trait.description || trait.description === '<div></div>')) {
187
+ scaleErrors[traitIndex] = { ...scaleErrors[traitIndex], description: 'Trait description should not be empty' };
188
+ } else {
189
+ const identicalTraitDescr = traits
190
+ .slice(traitIndex + 1)
191
+ .some((t) => markupToText(t.description) === markupToText(trait.description));
192
+
193
+ if (description && identicalTraitDescr) {
194
+ scaleErrors[traitIndex] = { ...scaleErrors[traitIndex], description: 'Trait descriptions should be unique.' };
195
+ }
196
+ }
197
+ });
198
+ if (Object.keys(scaleErrors).length > 0) {
199
+ traitsErrors[scaleIndex] = scaleErrors;
200
+ }
201
+ });
202
+
203
+ if (Object.keys(traitsErrors).length > 0) {
204
+ errors.traitsErrors = traitsErrors;
205
+ }
206
+
207
+ if (Object.keys(scorePointsErrors).length > 0) {
208
+ errors.scorePointsErrors = scorePointsErrors;
209
+ }
210
+
211
+ return errors;
212
+ };
213
+
214
+ export const validate = (model = {}, config = {}) => {
215
+ const { rubrics = {}, rubricType } = model;
216
+ const { multiTraitRubric = {}, simpleRubric = {} } = rubrics;
217
+ let errors = {};
218
+
219
+ switch (rubricType) {
220
+ case RUBRIC_TYPES.SIMPLE_RUBRIC:
221
+ default:
222
+ errors = validateSimpleRubric(simpleRubric);
223
+ break;
224
+ case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
225
+ errors = validateMultiTraitRubric(multiTraitRubric);
226
+ break;
227
+ }
228
+
229
+ return errors;
230
+ };
@@ -0,0 +1,13 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/complex-rubric/controller/src/utils.js
4
+ * @auto-generated
5
+ *
6
+ * This file is automatically synced from pie-elements and converted to TypeScript.
7
+ * Manual edits will be overwritten on next sync.
8
+ * To make changes, edit the upstream JavaScript file and run sync again.
9
+ */
10
+
11
+ export const markupToText = (s) => {
12
+ return (s || '').replace(/(<([^>]+)>)/ig, '');
13
+ };
@@ -1,3 +1,13 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/complex-rubric/src/index.js
4
+ * @auto-generated
5
+ *
6
+ * This file is automatically synced from pie-elements and converted to TypeScript.
7
+ * Manual edits will be overwritten on next sync.
8
+ * To make changes, edit the upstream JavaScript file and run sync again.
9
+ */
10
+
1
11
  import Rubric from '@pie-element/rubric';
2
12
  import MultiTraitRubric from '@pie-element/multi-trait-rubric';
3
13
  import { RUBRIC_TYPES } from '@pie-lib/rubric';
@@ -6,6 +16,7 @@ const RUBRIC_TAG_NAME = 'complex-rubric-simple';
6
16
  const MULTI_TRAIT_RUBRIC_TAG_NAME = 'complex-rubric-multi-trait';
7
17
 
8
18
  class ComplexRubricSimple extends Rubric {}
19
+
9
20
  class ComplexRubricMultiTrait extends MultiTraitRubric {}
10
21
 
11
22
  const defineRubrics = () => {
@@ -48,10 +59,15 @@ class ComplexRubric extends HTMLElement {
48
59
  });
49
60
  break;
50
61
  case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
51
- customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() =>{
62
+ customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() => {
52
63
  this.setMultiTraitRubricModel(this.multiTraitRubric);
53
64
  });
54
65
  break;
66
+ case RUBRIC_TYPES.RUBRICLESS:
67
+ customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {
68
+ this.setRubriclessModel(this.rubricless);
69
+ });
70
+ break;
55
71
  }
56
72
 
57
73
  if (oldType !== this.type) {
@@ -65,7 +81,7 @@ class ComplexRubric extends HTMLElement {
65
81
 
66
82
  simpleRubric.model = {
67
83
  ...this._model.rubrics.simpleRubric,
68
- mode
84
+ mode,
69
85
  };
70
86
  }
71
87
  }
@@ -76,7 +92,18 @@ class ComplexRubric extends HTMLElement {
76
92
 
77
93
  multiTraitRubric.model = {
78
94
  ...this._model.rubrics.multiTraitRubric,
79
- mode
95
+ mode,
96
+ };
97
+ }
98
+ }
99
+
100
+ setRubriclessModel(rubricless) {
101
+ if (this._model && this._model.rubrics && this._model.rubrics.rubricless) {
102
+ const { mode } = this._model;
103
+
104
+ rubricless.model = {
105
+ ...this._model.rubrics.rubricless,
106
+ mode,
80
107
  };
81
108
  }
82
109
  }
@@ -89,17 +116,46 @@ class ComplexRubric extends HTMLElement {
89
116
  return this.querySelector(`${RUBRIC_TAG_NAME}#simpleRubric`);
90
117
  }
91
118
 
119
+ get rubricless() {
120
+ return this.querySelector(`${RUBRIC_TAG_NAME}#rubricless`);
121
+ }
122
+
92
123
  connectedCallback() {
93
124
  this._render();
94
125
  }
95
126
 
96
127
  _render() {
97
- this.innerHTML = `
98
- <div>
99
- <div style="${this._type === RUBRIC_TYPES.SIMPLE_RUBRIC ? `visibility: visible` : `visibility: hidden`}"><${RUBRIC_TAG_NAME} id="simpleRubric"></${RUBRIC_TAG_NAME}></div>
100
- <div style="${this._type !== RUBRIC_TYPES.SIMPLE_RUBRIC ? `visibility: visible` : `visibility: hidden`}"> <${MULTI_TRAIT_RUBRIC_TAG_NAME} id="multiTraitRubric"></${MULTI_TRAIT_RUBRIC_TAG_NAME}></div>
101
- </div>
102
- `;
128
+ let rubricTag;
129
+ if (this._type === RUBRIC_TYPES.SIMPLE_RUBRIC) {
130
+ rubricTag = `<${RUBRIC_TAG_NAME} id="simpleRubric" />`;
131
+ } else if (this._type === RUBRIC_TYPES.RUBRICLESS) {
132
+ rubricTag = `<${RUBRIC_TAG_NAME} id="rubricless" />`;
133
+ } else {
134
+ rubricTag = `<${MULTI_TRAIT_RUBRIC_TAG_NAME} id="multiTraitRubric" />`;
135
+ }
136
+
137
+ this.innerHTML = rubricTag;
138
+
139
+ // when item is re-rendered (due to connectedCallback), if the custom element is already defined,
140
+ // we need to set the model and session, otherwise the setters are not reached again
141
+ switch (this._type) {
142
+ case RUBRIC_TYPES.SIMPLE_RUBRIC:
143
+ default:
144
+ if (customElements.get(RUBRIC_TAG_NAME)) {
145
+ this.setRubricModel(this.simpleRubric);
146
+ }
147
+ break;
148
+ case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
149
+ if (customElements.get(MULTI_TRAIT_RUBRIC_TAG_NAME)) {
150
+ this.setMultiTraitRubricModel(this.multiTraitRubric);
151
+ }
152
+ break;
153
+ case RUBRIC_TYPES.RUBRICLESS:
154
+ if (customElements.get(RUBRIC_TAG_NAME)) {
155
+ this.setRubriclessModel(this.rubricless);
156
+ }
157
+ break;
158
+ }
103
159
  }
104
160
  }
105
161
 
@@ -0,0 +1,16 @@
1
+ /**
2
+ * IIFE entry point for complex-rubric element
3
+ * This file is only used for IIFE builds and includes auto-registration
4
+ *
5
+ * @sync-generated - Auto-generated during sync from pie-elements
6
+ */
7
+
8
+ import Element from './index.js';
9
+
10
+ // Auto-register the custom element for IIFE mode
11
+ if (typeof window !== 'undefined' && !customElements.get('complex-rubric-element')) {
12
+ customElements.define('complex-rubric-element', Element);
13
+ }
14
+
15
+ // Export for IIFE global
16
+ export default Element;
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default } from './delivery/index.js';
@@ -0,0 +1,150 @@
1
+ // @ts-nocheck
2
+ /**
3
+ * @synced-from pie-elements/packages/complex-rubric/src/print.js
4
+ * @auto-generated
5
+ *
6
+ * This file is automatically synced from pie-elements and converted to TypeScript.
7
+ * Manual edits will be overwritten on next sync.
8
+ * To make changes, edit the upstream JavaScript file and run sync again.
9
+ */
10
+
11
+ // here it is actually using rubric/src/index.js, instead of using rubric/src/print.js
12
+ import Rubric from '@pie-element/rubric';
13
+ // here it is actually using multi-trait-rubric/src/index.js, instead of using multi-trait-rubric/src/print.js
14
+ import MultiTraitRubric from '@pie-element/multi-trait-rubric';
15
+ import { RUBRIC_TYPES } from '@pie-lib/rubric';
16
+
17
+ const RUBRIC_TAG_NAME = 'complex-rubric-simple';
18
+ const MULTI_TRAIT_RUBRIC_TAG_NAME = 'complex-rubric-multi-trait';
19
+
20
+ class ComplexRubricSimple extends Rubric {}
21
+ class ComplexRubricMultiTrait extends MultiTraitRubric {}
22
+
23
+ const rubricTags = {
24
+ [RUBRIC_TYPES.SIMPLE_RUBRIC]: `<${RUBRIC_TAG_NAME} id="simpleRubric" />`,
25
+ [RUBRIC_TYPES.RUBRICLESS]: `<${RUBRIC_TAG_NAME} id="rubricless" />`,
26
+ [RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: `<${MULTI_TRAIT_RUBRIC_TAG_NAME} id="multiTraitRubric" />`,
27
+ };
28
+
29
+ const preparePrintModel = (model, opts) => {
30
+ const instr = opts.role === 'instructor';
31
+
32
+ if (!instr) {
33
+ return {};
34
+ }
35
+
36
+ model.mode = 'evaluate';
37
+ model.animationsDisabled = true;
38
+
39
+ return model;
40
+ };
41
+
42
+ const defineRubrics = () => {
43
+ if (!customElements.get(RUBRIC_TAG_NAME)) {
44
+ customElements.define(RUBRIC_TAG_NAME, ComplexRubricSimple);
45
+ }
46
+
47
+ if (!customElements.get(MULTI_TRAIT_RUBRIC_TAG_NAME)) {
48
+ customElements.define(MULTI_TRAIT_RUBRIC_TAG_NAME, ComplexRubricMultiTrait);
49
+ }
50
+ };
51
+
52
+ defineRubrics();
53
+
54
+ class ComplexRubricPrint extends HTMLElement {
55
+ constructor() {
56
+ super();
57
+ this._model = {};
58
+ this._type = RUBRIC_TYPES.SIMPLE_RUBRIC;
59
+ this._options = null;
60
+ }
61
+
62
+ set type(t) {
63
+ this._type = t;
64
+ }
65
+
66
+ get type() {
67
+ return this._type;
68
+ }
69
+
70
+ set model(m) {
71
+ this._model = m;
72
+ const oldType = this._type;
73
+ this.type = m.rubricType;
74
+
75
+ switch (this._type) {
76
+ case RUBRIC_TYPES.SIMPLE_RUBRIC:
77
+ default:
78
+ customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {
79
+ this.setRubricModel(this.simpleRubric);
80
+ });
81
+ break;
82
+ case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
83
+ customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() => {
84
+ this.setMultiTraitRubricModel(this.multiTraitRubric);
85
+ });
86
+ break;
87
+ case RUBRIC_TYPES.RUBRICLESS:
88
+ customElements.whenDefined(RUBRIC_TAG_NAME).then(() => {
89
+ this.setRubriclessModel(this.rubricless);
90
+ });
91
+ break;
92
+ }
93
+
94
+ if (oldType !== this.type) {
95
+ this._render();
96
+ }
97
+ }
98
+
99
+ setRubricModel(simpleRubric) {
100
+ if (this._model && this._model.rubrics && this._model.rubrics.simpleRubric) {
101
+ simpleRubric.model = preparePrintModel(this._model.rubrics.simpleRubric, this._options);
102
+ }
103
+ }
104
+
105
+ setMultiTraitRubricModel(multiTraitRubric) {
106
+ if (this._model && this._model.rubrics && this._model.rubrics.multiTraitRubric) {
107
+ const { scales, excludeZero } = this._model.rubrics.multiTraitRubric || {};
108
+ const parsedScales = (scales || []).map((scale) => ({ ...scale, excludeZero }));
109
+
110
+ multiTraitRubric.model = {
111
+ ...preparePrintModel(this._model.rubrics.multiTraitRubric, this._options),
112
+ visible: true,
113
+ arrowsDisabled: true,
114
+ scales: parsedScales,
115
+ };
116
+ }
117
+ }
118
+
119
+ setRubriclessModel(rubricless) {
120
+ if (this._model && this._model.rubrics && this._model.rubrics.rubricless) {
121
+ rubricless.model = preparePrintModel(this._model.rubrics.rubricless, this._options);
122
+ }
123
+ }
124
+
125
+ set options(o) {
126
+ this._options = o;
127
+ }
128
+
129
+ get multiTraitRubric() {
130
+ return this.querySelector(`${MULTI_TRAIT_RUBRIC_TAG_NAME}#multiTraitRubric`);
131
+ }
132
+
133
+ get simpleRubric() {
134
+ return this.querySelector(`${RUBRIC_TAG_NAME}#simpleRubric`);
135
+ }
136
+
137
+ get rubricless() {
138
+ return this.querySelector(`${RUBRIC_TAG_NAME}#rubricless`);
139
+ }
140
+
141
+ connectedCallback() {
142
+ this._render();
143
+ }
144
+
145
+ _render() {
146
+ this.innerHTML = rubricTags[this._type] || '';
147
+ }
148
+ }
149
+
150
+ export default ComplexRubricPrint;
package/LICENSE.md DELETED
@@ -1,5 +0,0 @@
1
- Copyright 2019 CoreSpring Inc
2
-
3
- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4
-
5
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Complex Rubric
2
-
3
- Interaction for authoring and scoring items with a complex rubric.
@@ -1,99 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var multiTraitDefaultModel = {
8
- visibleToStudent: true,
9
- halfScoring: false,
10
- pointLabels: true,
11
- description: false,
12
- standards: false,
13
- scales: [],
14
- excludeZero: false
15
- };
16
- var rubricDefaultModel = {
17
- points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],
18
- sampleAnswers: [null, 'just right', 'not left', null],
19
- maxPoints: 4,
20
- excludeZero: false
21
- };
22
- var multiTraitDefaultConfiguration = {
23
- settingsPanelDisabled: true,
24
- excludeZeroDialogBoxContent: {
25
- title: 'Exclude 0 (Zero) from Score Point Values.',
26
- 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>"
27
- },
28
- includeZeroDialogBoxContent: {
29
- title: 'Include 0 (Zero) in Score Point Values.',
30
- 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>"
31
- },
32
- deleteTraitDialogBoxContent: {
33
- title: 'Delete Trait',
34
- text: 'Are you sure you want to delete this trait?'
35
- },
36
- deleteScaleDialogBoxContent: {
37
- title: 'Delete Scale',
38
- text: 'Are you sure you want to delete this scale?'
39
- },
40
- maxPointsDialogBoxContent: {
41
- title: 'Decreasing Max Points.',
42
- 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."
43
- },
44
- spellCheck: {
45
- label: 'Spellcheck',
46
- settings: false,
47
- enabled: true
48
- },
49
- showExcludeZero: {
50
- settings: true,
51
- label: 'Exclude Zero'
52
- },
53
- showScorePointLabels: {
54
- settings: true,
55
- label: 'Show Score Point Labels'
56
- },
57
- showDescription: {
58
- settings: true,
59
- label: 'Show Description'
60
- },
61
- showVisibleToStudent: {
62
- settings: true,
63
- label: 'Visible to Student'
64
- },
65
- showHalfScoring: {
66
- settings: true,
67
- label: 'Half Scoring'
68
- },
69
- width: '900px',
70
- // these should not be set to true (should not be used) for now
71
- showStandards: {
72
- settings: false,
73
- label: 'Show Standards'
74
- },
75
- showLevelTagInput: {
76
- settings: false,
77
- label: 'Show Level Tag Input',
78
- enabled: false
79
- },
80
- dragAndDrop: {
81
- settings: true,
82
- label: 'Enable Drag and Drop',
83
- enabled: false
84
- }
85
- };
86
- var _default = {
87
- model: {
88
- rubricType: 'simpleRubric',
89
- rubrics: {
90
- simpleRubric: rubricDefaultModel,
91
- multiTraitRubric: multiTraitDefaultModel
92
- }
93
- },
94
- configuration: {
95
- multiTraitRubric: multiTraitDefaultConfiguration
96
- }
97
- };
98
- exports["default"] = _default;
99
- //# sourceMappingURL=defaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["multiTraitDefaultModel","visibleToStudent","halfScoring","pointLabels","description","standards","scales","excludeZero","rubricDefaultModel","points","sampleAnswers","maxPoints","multiTraitDefaultConfiguration","settingsPanelDisabled","excludeZeroDialogBoxContent","title","text","includeZeroDialogBoxContent","deleteTraitDialogBoxContent","deleteScaleDialogBoxContent","maxPointsDialogBoxContent","spellCheck","label","settings","enabled","showExcludeZero","showScorePointLabels","showDescription","showVisibleToStudent","showHalfScoring","width","showStandards","showLevelTagInput","dragAndDrop","model","rubricType","rubrics","simpleRubric","multiTraitRubric","configuration"],"mappings":"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","sourcesContent":["const multiTraitDefaultModel = {\n visibleToStudent: true,\n halfScoring: false,\n pointLabels: true,\n description: false,\n standards: false,\n scales: [],\n excludeZero: false,\n};\n\nconst rubricDefaultModel = {\n points: ['nothing right', 'a teeny bit right', 'mostly right', 'bingo'],\n sampleAnswers: [null, 'just right', 'not left', null],\n maxPoints: 4,\n excludeZero: false\n};\n\nconst multiTraitDefaultConfiguration = {\n settingsPanelDisabled: true,\n excludeZeroDialogBoxContent: {\n title: 'Exclude 0 (Zero) from Score Point Values.',\n 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>`\n },\n includeZeroDialogBoxContent: {\n title: 'Include 0 (Zero) in Score Point Values.',\n 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>`\n },\n deleteTraitDialogBoxContent: {\n title: 'Delete Trait',\n text: 'Are you sure you want to delete this trait?'\n },\n deleteScaleDialogBoxContent: {\n title: 'Delete Scale',\n text: 'Are you sure you want to delete this scale?'\n },\n maxPointsDialogBoxContent: {\n title: 'Decreasing Max Points.',\n 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.`\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true\n },\n showExcludeZero: {\n settings: true,\n label: 'Exclude Zero',\n },\n showScorePointLabels: {\n settings: true,\n label: 'Show Score Point Labels',\n },\n showDescription: {\n settings: true,\n label: 'Show Description',\n },\n showVisibleToStudent: {\n settings: true,\n label: 'Visible to Student',\n },\n showHalfScoring: {\n settings: true,\n label: 'Half Scoring',\n },\n width: '900px',\n // these should not be set to true (should not be used) for now\n showStandards: {\n settings: false,\n label: 'Show Standards',\n },\n showLevelTagInput: {\n settings: false,\n label: 'Show Level Tag Input',\n enabled: false\n },\n dragAndDrop: {\n settings: true,\n label: 'Enable Drag and Drop',\n enabled: false,\n }\n};\n\nexport default {\n model: {\n rubricType: 'simpleRubric',\n rubrics: { simpleRubric: rubricDefaultModel, multiTraitRubric: multiTraitDefaultModel }\n },\n configuration: {\n multiTraitRubric: multiTraitDefaultConfiguration\n }\n};\n\n"],"file":"defaults.js"}