@pie-element/complex-rubric 6.0.0-beta.1 → 6.0.0-beta.2
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/CHANGELOG.md +0 -11
- package/configure/CHANGELOG.md +0 -11
- package/configure/package.json +6 -6
- package/configure/src/__tests__/index.test.js +15 -0
- package/configure/src/__tests__/main.test.jsx +7 -0
- package/package.json +5 -5
- 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 -2491
- 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 -2333
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +0 -429
- 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 -181
- 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 -157
- 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 -455
- 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 -206
- 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 -451
- 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 -275
- 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 -233
- 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 -87
- 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 -24
- 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 -1571
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js +0 -18
- 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 -158
- 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/lib/utils.js +0 -11
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +0 -14
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +0 -1628
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +0 -1202
- 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 -117
- 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 -861
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json.md +0 -614
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js +0 -54
- 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 -123
- 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 -248
- 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 -83
- 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 -32
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.md +0 -2774
- 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 -2541
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +0 -67
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js +0 -135
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +0 -103
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -24
- package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +0 -178
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +0 -42
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -139
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +0 -87
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.md +0 -1564
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js +0 -15
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -46
- 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 -12
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -33
- package/configure/node_modules/@pie-element/rubric/controller/src/defaults.js +0 -8
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -41
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -712
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json.md +0 -532
- 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 -2
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -391
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -281
- package/configure/node_modules/@pie-element/rubric/lib/index.js +0 -52
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -210
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -71
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/package.json +0 -30
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -2641
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -49
- package/configure/node_modules/@pie-element/rubric/src/index.js +0 -48
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -226
- package/configure/node_modules/@pie-element/rubric/src/print.js +0 -74
- package/configure/node_modules/clsx/clsx.d.ts +0 -6
- package/configure/node_modules/clsx/dist/clsx.js +0 -1
- package/configure/node_modules/clsx/dist/clsx.m.js +0 -1
- package/configure/node_modules/clsx/dist/clsx.min.js +0 -1
- package/configure/node_modules/clsx/license +0 -9
- package/configure/node_modules/clsx/package.json +0 -37
- package/configure/node_modules/clsx/readme.md +0 -88
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.filteredDefaultPlugins = exports.addOrRemoveScaleColumn = void 0;
|
|
7
|
-
var _editableHtml = require("@pie-lib/editable-html");
|
|
8
|
-
var _modals = require("./modals");
|
|
9
|
-
const filteredDefaultPlugins = exports.filteredDefaultPlugins = (_editableHtml.DEFAULT_PLUGINS || []).filter(p => p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list');
|
|
10
|
-
const addOrRemoveScaleColumn = (scales, excludeZeroType) => {
|
|
11
|
-
if (!scales || !scales.length) {
|
|
12
|
-
return [];
|
|
13
|
-
}
|
|
14
|
-
return scales.reduce((acc, scale) => {
|
|
15
|
-
let {
|
|
16
|
-
scorePointsLabels,
|
|
17
|
-
traits
|
|
18
|
-
} = scale || {};
|
|
19
|
-
if (scorePointsLabels.length < 1) {
|
|
20
|
-
return acc;
|
|
21
|
-
}
|
|
22
|
-
switch (excludeZeroType) {
|
|
23
|
-
case _modals.excludeZeroTypes.remove0:
|
|
24
|
-
{
|
|
25
|
-
// removes column 0
|
|
26
|
-
scorePointsLabels = scorePointsLabels.slice(1);
|
|
27
|
-
traits = traits.map(({
|
|
28
|
-
scorePointsDescriptors,
|
|
29
|
-
...trait
|
|
30
|
-
}) => ({
|
|
31
|
-
...trait,
|
|
32
|
-
scorePointsDescriptors: scorePointsDescriptors.slice(1)
|
|
33
|
-
}));
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
case _modals.excludeZeroTypes.add0:
|
|
37
|
-
{
|
|
38
|
-
// adds empty column at start
|
|
39
|
-
scorePointsLabels = ['', ...scorePointsLabels];
|
|
40
|
-
traits = traits.map(({
|
|
41
|
-
scorePointsDescriptors,
|
|
42
|
-
...trait
|
|
43
|
-
}) => ({
|
|
44
|
-
...trait,
|
|
45
|
-
scorePointsDescriptors: ['', ...scorePointsDescriptors]
|
|
46
|
-
}));
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
case _modals.excludeZeroTypes.shiftLeft:
|
|
50
|
-
{
|
|
51
|
-
// removes last column
|
|
52
|
-
scorePointsLabels = scorePointsLabels.slice(0, -1);
|
|
53
|
-
traits = traits.map(({
|
|
54
|
-
scorePointsDescriptors,
|
|
55
|
-
...trait
|
|
56
|
-
}) => ({
|
|
57
|
-
...trait,
|
|
58
|
-
scorePointsDescriptors: scorePointsDescriptors.slice(0, -1)
|
|
59
|
-
}));
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
case _modals.excludeZeroTypes.shiftRight:
|
|
63
|
-
{
|
|
64
|
-
// adds empty column at end
|
|
65
|
-
scorePointsLabels = [...scorePointsLabels, ''];
|
|
66
|
-
traits = traits.map(({
|
|
67
|
-
scorePointsDescriptors,
|
|
68
|
-
...trait
|
|
69
|
-
}) => ({
|
|
70
|
-
...trait,
|
|
71
|
-
scorePointsDescriptors: [...scorePointsDescriptors, '']
|
|
72
|
-
}));
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
default:
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
acc.push({
|
|
79
|
-
...scale,
|
|
80
|
-
scorePointsLabels,
|
|
81
|
-
traits
|
|
82
|
-
});
|
|
83
|
-
return acc;
|
|
84
|
-
}, []);
|
|
85
|
-
};
|
|
86
|
-
exports.addOrRemoveScaleColumn = addOrRemoveScaleColumn;
|
|
87
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_editableHtml","require","_modals","filteredDefaultPlugins","exports","DEFAULT_PLUGINS","filter","p","addOrRemoveScaleColumn","scales","excludeZeroType","length","reduce","acc","scale","scorePointsLabels","traits","excludeZeroTypes","remove0","slice","map","scorePointsDescriptors","trait","add0","shiftLeft","shiftRight","push"],"sources":["../src/utils.js"],"sourcesContent":["import { DEFAULT_PLUGINS } from '@pie-lib/editable-html';\nimport { excludeZeroTypes } from './modals';\n\nexport const filteredDefaultPlugins = (DEFAULT_PLUGINS || []).filter(\n (p) => p !== 'table' && p !== 'bulleted-list' && p !== 'numbered-list',\n);\n\nexport const addOrRemoveScaleColumn = (scales, excludeZeroType) => {\n if (!scales || !scales.length) {\n return [];\n }\n\n return scales.reduce((acc, scale) => {\n let { scorePointsLabels, traits } = scale || {};\n\n if (scorePointsLabels.length < 1) {\n return acc;\n }\n\n switch (excludeZeroType) {\n case excludeZeroTypes.remove0: {\n // removes column 0\n scorePointsLabels = scorePointsLabels.slice(1);\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: scorePointsDescriptors.slice(1),\n }));\n\n break;\n }\n\n case excludeZeroTypes.add0: {\n // adds empty column at start\n scorePointsLabels = ['', ...scorePointsLabels];\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: ['', ...scorePointsDescriptors],\n }));\n\n break;\n }\n\n case excludeZeroTypes.shiftLeft: {\n // removes last column\n scorePointsLabels = scorePointsLabels.slice(0, -1);\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: scorePointsDescriptors.slice(0, -1),\n }));\n\n break;\n }\n\n case excludeZeroTypes.shiftRight: {\n // adds empty column at end\n scorePointsLabels = [...scorePointsLabels, ''];\n traits = traits.map(({ scorePointsDescriptors, ...trait }) => ({\n ...trait,\n scorePointsDescriptors: [...scorePointsDescriptors, ''],\n }));\n\n break;\n }\n\n default:\n break;\n }\n\n acc.push({ ...scale, scorePointsLabels, traits });\n\n return acc;\n }, []);\n};\n"],"mappings":";;;;;;AAAA,I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xD,CAAC,CAAC,CAAC;UAEH;QACF;MAEA,KAAKJ,wBAAgB,CAACO,SAAS;QAAE;UAC/B;UACAT,iBAAiB,GAAGA,iBAAiB,CAACI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;UAClDH,MAAM,GAAGA,MAAM,CAACI,GAAG,CAAC,CAAC;YAAEC,sBAAsB;YAAE,GAAGC;UAAM,CAAC,MAAM;YAC7D,GAAGA,KAAK;YACRD,sBAAsB,EAAEA,sBAAsB,CAACF,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;UAC5D,CAAC,CAAC,CAAC;UAEH;QACF;MAEA,KAAKF,wBAAgB,CAACQ,UAAU;QAAE;UAChC;UACAV,iBAAiB,GAAG,CAAC,GAAGA,iBAAiB,EAAE,EAAE,CAAC;UAC9CC,MAAM,GAAGA,MAAM,CAACI,GAAG,CAAC,CAAC;YAAEC,sBAAsB;YAAE,GAAGC;UAAM,CAAC,MAAM;YAC7D,GAAGA,KAAK;YACRD,sBAAsB,EAAE,CAAC,GAAGA,sBAAsB,EAAE,EAAE;UACxD,CAAC,CAAC,CAAC;UAEH;QACF;MAEA;QACE;IACJ;IAEAR,GAAG,CAACa,IAAI,CAAC;MAAE,GAAGZ,KAAK;MAAEC,iBAAiB;MAAEC;IAAO,CAAC,CAAC;IAEjD,OAAOH,GAAG;EACZ,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAACT,OAAA,CAAAI,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-element/multi-trait-rubric-configure",
|
|
3
|
-
"version": "5.2.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"module": "src/index.js",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@emotion/react": "^11.14.0",
|
|
9
|
-
"@emotion/style": "^0.8.0",
|
|
10
|
-
"@mui/icons-material": "^7.3.4",
|
|
11
|
-
"@mui/material": "^7.3.4",
|
|
12
|
-
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
13
|
-
"@pie-lib/config-ui": "11.36.1-mui-update.0",
|
|
14
|
-
"@pie-lib/drag": "2.29.1-mui-update.0",
|
|
15
|
-
"@pie-lib/editable-html": "11.28.1-mui-update.0",
|
|
16
|
-
"@pie-lib/render-ui": "4.42.1-mui-update.0",
|
|
17
|
-
"debug": "^3.1.0",
|
|
18
|
-
"lodash": "^4.17.15",
|
|
19
|
-
"prop-types": "^15.6.2",
|
|
20
|
-
"react": "18.2.0",
|
|
21
|
-
"react-dom": "18.2.0",
|
|
22
|
-
"@dnd-kit/core": "6.1.0"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[]
|