@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.
- package/dist/author/defaults.d.ts +232 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +177 -0
- package/dist/author/index.d.ts +35 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +86 -0
- package/dist/author/main.d.ts +24 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +106 -0
- package/dist/controller/defaults.d.ts +40 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +42 -0
- package/dist/controller/index.d.ts +26 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +107 -0
- package/dist/controller/utils.d.ts +10 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +4 -0
- package/dist/delivery/index.d.ts +24 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +96 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +145 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/print/index.d.ts +25 -0
- package/dist/print/index.d.ts.map +1 -0
- package/dist/print/index.js +84 -0
- package/package.json +65 -16
- package/src/author/defaults.tsx +223 -0
- package/{configure/src/index.js → src/author/index.ts} +69 -28
- package/src/author/main.tsx +172 -0
- package/src/controller/defaults.ts +49 -0
- package/src/controller/index.ts +230 -0
- package/src/controller/utils.ts +13 -0
- package/src/{index.js → delivery/index.ts} +65 -9
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
- package/src/print/index.ts +150 -0
- package/LICENSE.md +0 -5
- package/README.md +0 -3
- package/configure/lib/defaults.js +0 -99
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -232
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -165
- package/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.md +0 -376
- package/configure/node_modules/@pie-element/multi-trait-rubric/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +0 -55
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.md +0 -344
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -455
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +0 -82
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js +0 -112
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +0 -438
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +0 -324
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +0 -490
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +0 -334
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +0 -254
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +0 -29
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +0 -22
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.md +0 -66
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -9
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +0 -122
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -226
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -169
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +0 -108
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +0 -6
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +0 -282
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -189
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -85
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +0 -99
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +0 -209
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +0 -103
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/package.json +0 -24
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -731
- package/configure/node_modules/@pie-element/rubric/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/rubric/README.md +0 -3
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.md +0 -615
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -93
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -16
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -38
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -105
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -14
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -9
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -35
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -6
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -24
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -19
- package/configure/node_modules/@pie-element/rubric/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -3
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -62
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -35
- package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -88
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -171
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/package.json +0 -25
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -22767
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -48
- package/configure/node_modules/@pie-element/rubric/src/index.js +0 -38
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -117
- package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
- package/configure/package.json +0 -22
- package/configure/src/__tests__/__snapshots__/main.test.jsx.snap +0 -106
- package/configure/src/__tests__/index.test.js +0 -41
- package/configure/src/__tests__/main.test.jsx +0 -104
- package/configure/src/defaults.js +0 -122
- package/configure/src/main.jsx +0 -117
- package/controller/lib/defaults.js +0 -99
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -147
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -12
- package/controller/src/__tests__/index.test.js +0 -58
- package/controller/src/defaults.js +0 -121
- package/controller/src/index.js +0 -81
- package/docs/config-schema.json +0 -427
- package/docs/config-schema.json.md +0 -315
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -119
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -994
- package/docs/pie-schema.json.md +0 -660
- package/lib/index.js +0 -176
- package/lib/index.js.map +0 -1
- package/src/__tests__/index.test.js +0 -166
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/complex-rubric/controller/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
|
+
declare const RUBRIC_TYPES: {
|
|
10
|
+
SIMPLE_RUBRIC: string;
|
|
11
|
+
MULTI_TRAIT_RUBRIC: string;
|
|
12
|
+
rubricless: string;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: {
|
|
15
|
+
rubricType: string;
|
|
16
|
+
rubrics: {
|
|
17
|
+
[RUBRIC_TYPES.SIMPLE_RUBRIC]: {
|
|
18
|
+
points: string[];
|
|
19
|
+
sampleAnswers: null[];
|
|
20
|
+
maxPoints: number;
|
|
21
|
+
excludeZero: boolean;
|
|
22
|
+
};
|
|
23
|
+
[RUBRIC_TYPES.MULTI_TRAIT_RUBRIC]: {
|
|
24
|
+
description: boolean;
|
|
25
|
+
excludeZero: boolean;
|
|
26
|
+
halfScoring: boolean;
|
|
27
|
+
pointLabels: boolean;
|
|
28
|
+
scales: never[];
|
|
29
|
+
standards: boolean;
|
|
30
|
+
visibleToStudent: boolean;
|
|
31
|
+
};
|
|
32
|
+
[RUBRIC_TYPES.RUBRICLESS]: {
|
|
33
|
+
maxPoints: number;
|
|
34
|
+
excludeZero: boolean;
|
|
35
|
+
rubriclessInstructionEnabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default _default;
|
|
40
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/controller/defaults.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAIH,QAAA,MAAM,YAAY;;;;CAIjB,CAAC;;;;QA4BE,CAAC,YAAY,CAAC,aAAa,CAAC;;;;;UAAoB;QAChD,CAAC,YAAY,CAAC,kBAAkB,CAAC;;;;;;;;UAAwB;QACzD,CAAC,YAAY,CAAC,UAAU,CAAC;;;;UAAwB;;;AALrD,wBAOE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/controller/defaults.ts
|
|
2
|
+
var e = {
|
|
3
|
+
SIMPLE_RUBRIC: "simpleRubric",
|
|
4
|
+
MULTI_TRAIT_RUBRIC: "multiTraitRubric",
|
|
5
|
+
rubricless: "rubricless"
|
|
6
|
+
}, t = {
|
|
7
|
+
description: !1,
|
|
8
|
+
excludeZero: !1,
|
|
9
|
+
halfScoring: !1,
|
|
10
|
+
pointLabels: !0,
|
|
11
|
+
scales: [],
|
|
12
|
+
standards: !1,
|
|
13
|
+
visibleToStudent: !0
|
|
14
|
+
}, n = {
|
|
15
|
+
points: [
|
|
16
|
+
"",
|
|
17
|
+
"",
|
|
18
|
+
"",
|
|
19
|
+
""
|
|
20
|
+
],
|
|
21
|
+
sampleAnswers: [
|
|
22
|
+
null,
|
|
23
|
+
null,
|
|
24
|
+
null,
|
|
25
|
+
null
|
|
26
|
+
],
|
|
27
|
+
maxPoints: 3,
|
|
28
|
+
excludeZero: !1
|
|
29
|
+
}, r = {
|
|
30
|
+
maxPoints: 100,
|
|
31
|
+
excludeZero: !1,
|
|
32
|
+
rubriclessInstructionEnabled: !0
|
|
33
|
+
}, i = {
|
|
34
|
+
rubricType: "simpleRubric",
|
|
35
|
+
rubrics: {
|
|
36
|
+
[e.SIMPLE_RUBRIC]: n,
|
|
37
|
+
[e.MULTI_TRAIT_RUBRIC]: t,
|
|
38
|
+
[e.RUBRICLESS]: r
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { i as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/complex-rubric/controller/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 declare function createDefaultModel(model?: {}): Promise<unknown>;
|
|
10
|
+
export declare const normalize: (question: any) => any;
|
|
11
|
+
/**
|
|
12
|
+
* @param {*} question
|
|
13
|
+
* @param {*} session
|
|
14
|
+
* @param {*} env
|
|
15
|
+
*/
|
|
16
|
+
export declare function model(question: any, session: any, env: any): Promise<any>;
|
|
17
|
+
export declare const getScore: () => number;
|
|
18
|
+
/**
|
|
19
|
+
* @param {Object} model - the main model
|
|
20
|
+
* @param {*} session
|
|
21
|
+
* @param {Object} env
|
|
22
|
+
*/
|
|
23
|
+
export declare function outcome(): Promise<unknown>;
|
|
24
|
+
export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
|
|
25
|
+
export declare const validate: (model?: {}, config?: {}) => {};
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/controller/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAcH,wBAAgB,kBAAkB,CAAC,KAAK,KAAK,oBAE5C;AAED,eAAO,MAAM,SAAS,GAAI,aAAQ,QAAmC,CAAC;AAEtE;;;;GAIG;AACH,wBAAsB,KAAK,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA,EAAE,GAAG,KAAA,gBAwDjD;AAED,eAAO,MAAM,QAAQ,cAAU,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,OAAO,qBAEtB;AAED,eAAO,MAAM,4BAA4B,GAAI,aAAQ,EAAE,QAAG,qBAQzD,CAAC;AAuGF,eAAO,MAAM,QAAQ,GAAI,UAAU,EAAE,WAAW,OAgB/C,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import e from "./defaults.js";
|
|
2
|
+
import { markupToText as t } from "./utils.js";
|
|
3
|
+
//#region src/controller/index.ts
|
|
4
|
+
var n = {
|
|
5
|
+
SIMPLE_RUBRIC: "simpleRubric",
|
|
6
|
+
MULTI_TRAIT_RUBRIC: "multiTraitRubric",
|
|
7
|
+
rubricless: "rubricless"
|
|
8
|
+
};
|
|
9
|
+
function r(t = {}) {
|
|
10
|
+
return new Promise((n) => n({
|
|
11
|
+
...e,
|
|
12
|
+
...t
|
|
13
|
+
}));
|
|
14
|
+
}
|
|
15
|
+
var i = (t) => ({
|
|
16
|
+
...e,
|
|
17
|
+
...t
|
|
18
|
+
});
|
|
19
|
+
async function a(e, t, r) {
|
|
20
|
+
let a = i(e);
|
|
21
|
+
if (a.rubricType === n.SIMPLE_RUBRIC || a.rubricType === n.RUBRICLESS) return new Promise((e) => {
|
|
22
|
+
e(r && r.role && r.role === "instructor" ? {
|
|
23
|
+
...a,
|
|
24
|
+
rubrics: {
|
|
25
|
+
...a.rubrics,
|
|
26
|
+
multiTraitRubric: {
|
|
27
|
+
...a.rubrics.multiTraitRubric,
|
|
28
|
+
visible: !1
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
} : {});
|
|
32
|
+
});
|
|
33
|
+
{
|
|
34
|
+
!r.role || r.role === "student" && a.rubrics && a.rubrics.multiTraitRubric ? a.rubrics.multiTraitRubric.visible = a.visibleToStudent : a.rubrics.multiTraitRubric.visible = !0;
|
|
35
|
+
let { scales: e, excludeZero: t } = a.rubrics.multiTraitRubric || {}, n = (e || []).map((e) => ({
|
|
36
|
+
...e,
|
|
37
|
+
excludeZero: t
|
|
38
|
+
}));
|
|
39
|
+
return {
|
|
40
|
+
...a,
|
|
41
|
+
rubrics: {
|
|
42
|
+
...a.rubrics,
|
|
43
|
+
simpleRubric: {
|
|
44
|
+
...a.rubrics.simpleRubric,
|
|
45
|
+
visible: !1
|
|
46
|
+
},
|
|
47
|
+
rubricless: {
|
|
48
|
+
...a.rubrics.rubricless,
|
|
49
|
+
visible: !1
|
|
50
|
+
},
|
|
51
|
+
multiTraitRubric: {
|
|
52
|
+
...a.rubrics.multiTraitRubric,
|
|
53
|
+
scales: n
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
var o = () => 0;
|
|
60
|
+
function s() {
|
|
61
|
+
return new Promise((e) => e({
|
|
62
|
+
score: 0,
|
|
63
|
+
empty: !0
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
var c = (e, t) => new Promise((e) => {
|
|
67
|
+
t.mode !== "evaluate" && t.role === "instructor" ? e({ id: "1" }) : e(null);
|
|
68
|
+
}), l = (e) => {
|
|
69
|
+
let { points: n } = e, r = {}, i = {};
|
|
70
|
+
return (n || []).forEach((e, r) => {
|
|
71
|
+
!e || e === "<div></div>" ? i[r] = "Points descriptors cannot be empty." : n.slice(r + 1).some((n) => t(n) === t(e)) && (i[r] = "Points descriptors should be unique.");
|
|
72
|
+
}), Object.keys(i).length > 0 && (r.pointsDescriptorsErrors = i), r;
|
|
73
|
+
}, u = (e) => {
|
|
74
|
+
let { scales: n, description: r = !1, pointLabels: i = !1 } = e, a = {}, o = {}, s = {};
|
|
75
|
+
return (n || []).forEach((e, n) => {
|
|
76
|
+
let { traits: a = [] } = e, { scorePointsLabels: c = [] } = e, l = {}, u = {};
|
|
77
|
+
i && c.forEach((e, n) => {
|
|
78
|
+
!e || e === "<div></div>" ? u[n] = "Points labels should not be empty." : c.slice(n + 1).some((n) => t(n) === t(e)) && (u[n] = "Points labels should be unique.");
|
|
79
|
+
}), Object.keys(u).length > 0 && (s[n] = u), a.forEach((e, n) => {
|
|
80
|
+
if (!e.name || e.name === "<div></div>" ? l[n] = { name: "Trait names should not be empty." } : a.slice(n + 1).some((n) => t(n.name) === t(e.name)) && (l[n] = { name: "Trait names should be unique." }), r && (!e.description || e.description === "<div></div>")) l[n] = {
|
|
81
|
+
...l[n],
|
|
82
|
+
description: "Trait description should not be empty"
|
|
83
|
+
};
|
|
84
|
+
else {
|
|
85
|
+
let i = a.slice(n + 1).some((n) => t(n.description) === t(e.description));
|
|
86
|
+
r && i && (l[n] = {
|
|
87
|
+
...l[n],
|
|
88
|
+
description: "Trait descriptions should be unique."
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}), Object.keys(l).length > 0 && (o[n] = l);
|
|
92
|
+
}), Object.keys(o).length > 0 && (a.traitsErrors = o), Object.keys(s).length > 0 && (a.scorePointsErrors = s), a;
|
|
93
|
+
}, d = (e = {}, t = {}) => {
|
|
94
|
+
let { rubrics: r = {}, rubricType: i } = e, { multiTraitRubric: a = {}, simpleRubric: o = {} } = r, s = {};
|
|
95
|
+
switch (i) {
|
|
96
|
+
case n.SIMPLE_RUBRIC:
|
|
97
|
+
default:
|
|
98
|
+
s = l(o);
|
|
99
|
+
break;
|
|
100
|
+
case n.MULTI_TRAIT_RUBRIC:
|
|
101
|
+
s = u(a);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
return s;
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { c as createCorrectResponseSession, r as createDefaultModel, o as getScore, a as model, i as normalize, s as outcome, d as validate };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/complex-rubric/controller/src/utils.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 declare const markupToText: (s: any) => any;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/controller/utils.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,eAAO,MAAM,YAAY,GAAI,MAAC,QAE7B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/complex-rubric/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
|
+
declare class ComplexRubric extends HTMLElement {
|
|
10
|
+
constructor();
|
|
11
|
+
set type(t: any);
|
|
12
|
+
get type(): any;
|
|
13
|
+
set model(m: any);
|
|
14
|
+
setRubricModel(simpleRubric: any): void;
|
|
15
|
+
setMultiTraitRubricModel(multiTraitRubric: any): void;
|
|
16
|
+
setRubriclessModel(rubricless: any): void;
|
|
17
|
+
get multiTraitRubric(): Element | null;
|
|
18
|
+
get simpleRubric(): Element | null;
|
|
19
|
+
get rubricless(): Element | null;
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
_render(): void;
|
|
22
|
+
}
|
|
23
|
+
export default ComplexRubric;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAyBH,cAAM,aAAc,SAAQ,WAAW;;IAOrC,IAAI,IAAI,CAAC,CAAC,KAAA,EAET;IAED,IAAI,IAAI,QAEP;IAED,IAAI,KAAK,CAAC,CAAC,KAAA,EA2BV;IAED,cAAc,CAAC,YAAY,KAAA;IAW3B,wBAAwB,CAAC,gBAAgB,KAAA;IAWzC,kBAAkB,CAAC,UAAU,KAAA;IAW7B,IAAI,gBAAgB,mBAEnB;IAED,IAAI,YAAY,mBAEf;IAED,IAAI,UAAU,mBAEb;IAED,iBAAiB;IAIjB,OAAO;CAiCR;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import e from "@pie-element/rubric";
|
|
2
|
+
import t from "@pie-element/multi-trait-rubric";
|
|
3
|
+
import { RUBRIC_TYPES as n } from "@pie-lib/rubric";
|
|
4
|
+
//#region src/delivery/index.ts
|
|
5
|
+
var r = "complex-rubric-simple", i = "complex-rubric-multi-trait", a = class extends e {}, o = class extends t {};
|
|
6
|
+
customElements.get(r) || customElements.define(r, a), customElements.get(i) || customElements.define(i, o);
|
|
7
|
+
var s = class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(), this._model = {}, this._type = n.SIMPLE_RUBRIC;
|
|
10
|
+
}
|
|
11
|
+
set type(e) {
|
|
12
|
+
this._type = e;
|
|
13
|
+
}
|
|
14
|
+
get type() {
|
|
15
|
+
return this._type;
|
|
16
|
+
}
|
|
17
|
+
set model(e) {
|
|
18
|
+
this._model = e;
|
|
19
|
+
let t = this._type;
|
|
20
|
+
switch (this.type = e.rubricType, this._type) {
|
|
21
|
+
case n.SIMPLE_RUBRIC:
|
|
22
|
+
default:
|
|
23
|
+
customElements.whenDefined(r).then(() => {
|
|
24
|
+
this.setRubricModel(this.simpleRubric);
|
|
25
|
+
});
|
|
26
|
+
break;
|
|
27
|
+
case n.MULTI_TRAIT_RUBRIC:
|
|
28
|
+
customElements.whenDefined(i).then(() => {
|
|
29
|
+
this.setMultiTraitRubricModel(this.multiTraitRubric);
|
|
30
|
+
});
|
|
31
|
+
break;
|
|
32
|
+
case n.RUBRICLESS:
|
|
33
|
+
customElements.whenDefined(r).then(() => {
|
|
34
|
+
this.setRubriclessModel(this.rubricless);
|
|
35
|
+
});
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
t !== this.type && this._render();
|
|
39
|
+
}
|
|
40
|
+
setRubricModel(e) {
|
|
41
|
+
if (this._model && this._model.rubrics && this._model.rubrics.simpleRubric) {
|
|
42
|
+
let { mode: t } = this._model;
|
|
43
|
+
e.model = {
|
|
44
|
+
...this._model.rubrics.simpleRubric,
|
|
45
|
+
mode: t
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
setMultiTraitRubricModel(e) {
|
|
50
|
+
if (this._model && this._model.rubrics && this._model.rubrics.multiTraitRubric) {
|
|
51
|
+
let { mode: t } = this._model;
|
|
52
|
+
e.model = {
|
|
53
|
+
...this._model.rubrics.multiTraitRubric,
|
|
54
|
+
mode: t
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
setRubriclessModel(e) {
|
|
59
|
+
if (this._model && this._model.rubrics && this._model.rubrics.rubricless) {
|
|
60
|
+
let { mode: t } = this._model;
|
|
61
|
+
e.model = {
|
|
62
|
+
...this._model.rubrics.rubricless,
|
|
63
|
+
mode: t
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
get multiTraitRubric() {
|
|
68
|
+
return this.querySelector(`${i}#multiTraitRubric`);
|
|
69
|
+
}
|
|
70
|
+
get simpleRubric() {
|
|
71
|
+
return this.querySelector(`${r}#simpleRubric`);
|
|
72
|
+
}
|
|
73
|
+
get rubricless() {
|
|
74
|
+
return this.querySelector(`${r}#rubricless`);
|
|
75
|
+
}
|
|
76
|
+
connectedCallback() {
|
|
77
|
+
this._render();
|
|
78
|
+
}
|
|
79
|
+
_render() {
|
|
80
|
+
let e;
|
|
81
|
+
switch (e = this._type === n.SIMPLE_RUBRIC ? `<${r} id="simpleRubric" />` : this._type === n.RUBRICLESS ? `<${r} id="rubricless" />` : `<${i} id="multiTraitRubric" />`, this.innerHTML = e, this._type) {
|
|
82
|
+
case n.SIMPLE_RUBRIC:
|
|
83
|
+
default:
|
|
84
|
+
customElements.get(r) && this.setRubricModel(this.simpleRubric);
|
|
85
|
+
break;
|
|
86
|
+
case n.MULTI_TRAIT_RUBRIC:
|
|
87
|
+
customElements.get(i) && this.setMultiTraitRubricModel(this.multiTraitRubric);
|
|
88
|
+
break;
|
|
89
|
+
case n.RUBRICLESS:
|
|
90
|
+
customElements.get(r) && this.setRubriclessModel(this.rubricless);
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { s as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
import Element from './index.js';
|
|
8
|
+
export default Element;
|
|
9
|
+
//# sourceMappingURL=index.iife.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.iife.d.ts","sourceRoot":"","sources":["../src/index.iife.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,MAAM,YAAY,CAAC;AAQjC,eAAe,OAAO,CAAC"}
|