@pie-element/complex-rubric 7.1.1-next.11 → 7.1.2-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/configure.js +2 -0
- package/controller.js +1 -0
- 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/browser/author/index.js +7646 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +145 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +96 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-DJUOd5EZ.js +19 -0
- package/dist/browser/dist-DJUOd5EZ.js.map +1 -0
- package/dist/browser/print/index.js +84 -0
- package/dist/browser/print/index.js.map +1 -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 +84 -20
- package/CHANGELOG.md +0 -1439
- package/LICENSE.md +0 -5
- package/README.md +0 -3
- package/configure/CHANGELOG.md +0 -1093
- 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 -932
- 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,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';
|