@pie-element/complex-rubric 7.1.0-next.28 → 7.1.1-next.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 +231 -0
- package/dist/author/defaults.js +177 -0
- package/dist/author/index.d.ts +34 -0
- package/dist/author/index.js +87 -0
- package/dist/author/main.d.ts +23 -0
- package/dist/author/main.js +106 -0
- package/dist/controller/defaults.d.ts +39 -0
- package/dist/controller/defaults.js +42 -0
- package/dist/controller/index.d.ts +25 -0
- package/dist/controller/index.js +107 -0
- package/dist/controller/utils.d.ts +9 -0
- package/dist/controller/utils.js +4 -0
- package/dist/delivery/index.d.ts +23 -0
- package/dist/delivery/index.js +96 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +145 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/print/index.d.ts +24 -0
- package/dist/print/index.js +84 -0
- package/package.json +58 -21
- package/CHANGELOG.md +0 -1431
- package/LICENSE.md +0 -5
- package/README.md +0 -3
- package/configure/CHANGELOG.md +0 -1085
- package/configure/lib/defaults.js +0 -271
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -150
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -172
- package/configure/lib/main.js.map +0 -1
- package/configure/package.json +0 -27
- package/configure/src/__tests__/index.test.js +0 -94
- package/configure/src/__tests__/main.test.jsx +0 -140
- package/configure/src/defaults.js +0 -213
- package/configure/src/index.js +0 -169
- package/configure/src/main.jsx +0 -162
- package/controller/CHANGELOG.md +0 -928
- package/controller/lib/defaults.js +0 -42
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -239
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -11
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -16
- package/controller/src/__tests__/index.test.js +0 -55
- package/controller/src/defaults.js +0 -39
- package/controller/src/index.js +0 -220
- package/controller/src/utils.js +0 -3
- package/docs/config-schema.json +0 -4255
- package/docs/config-schema.json.md +0 -3162
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -196
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -3302
- package/docs/pie-schema.json.md +0 -2364
- package/lib/index.js +0 -141
- package/lib/index.js.map +0 -1
- package/lib/print.js +0 -129
- package/lib/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -262
- package/module/demo.js +0 -221
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -22
- package/module/print-demo.js +0 -259
- package/module/print.html +0 -18
- package/module/print.js +0 -1
- package/src/__tests__/index.test.js +0 -256
- package/src/index.js +0 -152
- package/src/print.js +0 -140
|
@@ -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,25 @@
|
|
|
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?: {}) => {};
|
|
@@ -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,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,23 @@
|
|
|
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;
|
|
@@ -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
|
+
export { default } from './delivery/index.js';
|