@pie-element/complex-rubric 1.2.5-next.5 → 1.2.5-next.57
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/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +5 -5
- package/configure/src/__tests__/index.test.js +4 -4
- package/configure/src/__tests__/main.test.jsx +13 -13
- package/configure/src/defaults.js +14 -15
- package/configure/src/index.js +12 -6
- package/configure/src/main.jsx +40 -42
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +2 -2
- package/controller/src/__tests__/index.test.js +8 -8
- package/controller/src/defaults.js +14 -14
- package/controller/src/index.js +27 -22
- package/docs/config-schema.json.md +1 -1
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +96 -24
- package/docs/demo/session.js +1 -1
- package/docs/pie-schema.json.md +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/index.test.js +98 -26
- package/src/index.js +9 -5
package/src/index.js
CHANGED
|
@@ -48,7 +48,7 @@ class ComplexRubric extends HTMLElement {
|
|
|
48
48
|
});
|
|
49
49
|
break;
|
|
50
50
|
case RUBRIC_TYPES.MULTI_TRAIT_RUBRIC:
|
|
51
|
-
customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() =>{
|
|
51
|
+
customElements.whenDefined(MULTI_TRAIT_RUBRIC_TAG_NAME).then(() => {
|
|
52
52
|
this.setMultiTraitRubricModel(this.multiTraitRubric);
|
|
53
53
|
});
|
|
54
54
|
break;
|
|
@@ -65,7 +65,7 @@ class ComplexRubric extends HTMLElement {
|
|
|
65
65
|
|
|
66
66
|
simpleRubric.model = {
|
|
67
67
|
...this._model.rubrics.simpleRubric,
|
|
68
|
-
mode
|
|
68
|
+
mode,
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -76,7 +76,7 @@ class ComplexRubric extends HTMLElement {
|
|
|
76
76
|
|
|
77
77
|
multiTraitRubric.model = {
|
|
78
78
|
...this._model.rubrics.multiTraitRubric,
|
|
79
|
-
mode
|
|
79
|
+
mode,
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -96,8 +96,12 @@ class ComplexRubric extends HTMLElement {
|
|
|
96
96
|
_render() {
|
|
97
97
|
this.innerHTML = `
|
|
98
98
|
<div>
|
|
99
|
-
<div style="${
|
|
100
|
-
|
|
99
|
+
<div style="${
|
|
100
|
+
this._type === RUBRIC_TYPES.SIMPLE_RUBRIC ? `visibility: visible` : `visibility: hidden`
|
|
101
|
+
}"><${RUBRIC_TAG_NAME} id="simpleRubric"></${RUBRIC_TAG_NAME}></div>
|
|
102
|
+
<div style="${
|
|
103
|
+
this._type !== RUBRIC_TYPES.SIMPLE_RUBRIC ? `visibility: visible` : `visibility: hidden`
|
|
104
|
+
}"> <${MULTI_TRAIT_RUBRIC_TAG_NAME} id="multiTraitRubric"></${MULTI_TRAIT_RUBRIC_TAG_NAME}></div>
|
|
101
105
|
</div>
|
|
102
106
|
`;
|
|
103
107
|
}
|