@pie-element/matrix 4.1.1-next.0 → 4.1.1-next.101
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.json +1 -0
- package/CHANGELOG.md +1405 -0
- package/LICENSE.md +5 -0
- package/README.md +59 -0
- package/configure/CHANGELOG.json +1 -0
- package/configure/CHANGELOG.md +1331 -0
- package/configure/lib/HeaderCommon.js +28 -0
- package/configure/lib/HeaderCommon.js.map +1 -0
- package/configure/lib/Main.js +179 -0
- package/configure/lib/Main.js.map +1 -0
- package/configure/lib/MatrixColumnsSizeHeaderInput.js +56 -0
- package/configure/lib/MatrixColumnsSizeHeaderInput.js.map +1 -0
- package/configure/lib/MatrixLabelEditableButton.js +224 -0
- package/configure/lib/MatrixLabelEditableButton.js.map +1 -0
- package/configure/lib/MatrixLabelTypeHeaderInput.js +98 -0
- package/configure/lib/MatrixLabelTypeHeaderInput.js.map +1 -0
- package/configure/lib/MatrixRowsSizeHeaderInput.js +56 -0
- package/configure/lib/MatrixRowsSizeHeaderInput.js.map +1 -0
- package/configure/lib/MatrixValues.js +217 -0
- package/configure/lib/MatrixValues.js.map +1 -0
- package/configure/lib/NumberInput.js +77 -0
- package/configure/lib/NumberInput.js.map +1 -0
- package/configure/lib/columnLabelsGenerator.js +49 -0
- package/configure/lib/columnLabelsGenerator.js.map +1 -0
- package/configure/lib/defaults.js +86 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +102 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/isNumeric.js +11 -0
- package/configure/lib/isNumeric.js.map +1 -0
- package/configure/lib/matrixEntities.js +16 -0
- package/configure/lib/matrixEntities.js.map +1 -0
- package/configure/package.json +28 -0
- package/controller/CHANGELOG.json +1 -0
- package/controller/CHANGELOG.md +84 -0
- package/controller/lib/defaults.js +17 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +96 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/package.json +17 -0
- package/docs/config-schema.json +1475 -0
- package/docs/config-schema.json.md +1093 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +9 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +6 -0
- package/docs/pie-schema.json +1 -0
- package/docs/pie-schema.json.md +1 -0
- package/lib/ChoiceInput.js +59 -0
- package/lib/ChoiceInput.js.map +1 -0
- package/lib/Main.js +42 -0
- package/lib/Main.js.map +1 -0
- package/lib/Matrix.js +104 -0
- package/lib/Matrix.js.map +1 -0
- package/lib/index.js +81 -0
- package/lib/index.js.map +1 -0
- package/lib/session-updater.js +10 -0
- package/lib/session-updater.js.map +1 -0
- package/package.json +19 -56
- package/dist/author/HeaderCommon.d.ts +0 -12
- package/dist/author/HeaderCommon.js +0 -20
- package/dist/author/Main.d.ts +0 -27
- package/dist/author/Main.js +0 -134
- package/dist/author/MatrixColumnsSizeHeaderInput.d.ts +0 -21
- package/dist/author/MatrixColumnsSizeHeaderInput.js +0 -39
- package/dist/author/MatrixLabelEditableButton.d.ts +0 -27
- package/dist/author/MatrixLabelEditableButton.js +0 -191
- package/dist/author/MatrixLabelTypeHeaderInput.d.ts +0 -21
- package/dist/author/MatrixLabelTypeHeaderInput.js +0 -96
- package/dist/author/MatrixRowsSizeHeaderInput.d.ts +0 -21
- package/dist/author/MatrixRowsSizeHeaderInput.js +0 -39
- package/dist/author/MatrixValues.d.ts +0 -29
- package/dist/author/MatrixValues.js +0 -156
- package/dist/author/NumberInput.d.ts +0 -20
- package/dist/author/NumberInput.js +0 -61
- package/dist/author/columnLabelsGenerator.d.ts +0 -11
- package/dist/author/columnLabelsGenerator.js +0 -101
- package/dist/author/defaults.d.ts +0 -88
- package/dist/author/defaults.js +0 -56
- package/dist/author/index.d.ts +0 -31
- package/dist/author/index.js +0 -66
- package/dist/author/isNumeric.d.ts +0 -10
- package/dist/author/isNumeric.js +0 -4
- package/dist/author/matrixEntities.d.ts +0 -17
- package/dist/author/matrixEntities.js +0 -12
- package/dist/controller/defaults.d.ts +0 -19
- package/dist/controller/defaults.js +0 -17
- package/dist/controller/index.d.ts +0 -19
- package/dist/controller/index.js +0 -46
- package/dist/delivery/ChoiceInput.d.ts +0 -25
- package/dist/delivery/ChoiceInput.js +0 -36
- package/dist/delivery/Main.d.ts +0 -23
- package/dist/delivery/Main.js +0 -37
- package/dist/delivery/Matrix.d.ts +0 -29
- package/dist/delivery/Matrix.js +0 -81
- package/dist/delivery/index.d.ts +0 -22
- package/dist/delivery/index.js +0 -45
- package/dist/delivery/session-updater.d.ts +0 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -164
- package/dist/index.js +0 -2
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
package/dist/author/Main.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import e from "./MatrixColumnsSizeHeaderInput.js";
|
|
2
|
-
import t from "./MatrixRowsSizeHeaderInput.js";
|
|
3
|
-
import n from "./MatrixLabelTypeHeaderInput.js";
|
|
4
|
-
import r from "./MatrixValues.js";
|
|
5
|
-
import i from "react";
|
|
6
|
-
import a from "prop-types";
|
|
7
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
import { styled as c } from "@mui/material/styles";
|
|
9
|
-
import l from "@pie-lib/editable-html-tip-tap";
|
|
10
|
-
import { InputContainer as u, layout as d, settings as f } from "@pie-lib/config-ui";
|
|
11
|
-
//#region src/author/Main.tsx
|
|
12
|
-
var { Panel: p, toggle: m, radio: h } = f, g = c(u)(({ theme: e }) => ({
|
|
13
|
-
width: "100%",
|
|
14
|
-
paddingTop: e.spacing(1),
|
|
15
|
-
marginTop: e.spacing(2),
|
|
16
|
-
marginBottom: e.spacing(2)
|
|
17
|
-
})), _ = c("div")(({ theme: e }) => ({
|
|
18
|
-
display: "flex",
|
|
19
|
-
flexWrap: "wrap",
|
|
20
|
-
width: "100%",
|
|
21
|
-
paddingBottom: e.spacing(2.5),
|
|
22
|
-
justifyContent: "space-around"
|
|
23
|
-
})), v = c("div")(({ theme: e }) => ({
|
|
24
|
-
fontSize: e.typography.fontSize - 2,
|
|
25
|
-
color: e.palette.error.main,
|
|
26
|
-
paddingTop: e.spacing(1)
|
|
27
|
-
})), y = (i) => {
|
|
28
|
-
let { model: a, configuration: c, onPromptChanged: u, imageSupport: f, uploadSoundSupport: y, onChangeModel: b, onConfigurationChanged: x, onTeacherInstructionsChanged: S } = i, { baseInputConfiguration: C = {}, contentDimensions: w = {}, prompt: T = {}, scoringType: E = {}, settingsPanelDisabled: D, spellCheck: O = {}, teacherInstructions: k = {} } = c || {}, { errors: A = {}, extraCSSRules: j, teacherInstructionsEnabled: M, spellCheckEnabled: N } = a || {}, { prompt: P, teacherInstructions: F } = A, I = {
|
|
29
|
-
teacherInstructionsEnabled: k.settings && m(k.label),
|
|
30
|
-
spellCheckEnabled: O.settings && m(O.label),
|
|
31
|
-
scoringType: E.settings && h(E.label, ["auto", "rubric"])
|
|
32
|
-
}, L = (e = {}) => ({
|
|
33
|
-
...C,
|
|
34
|
-
...e
|
|
35
|
-
});
|
|
36
|
-
return /* @__PURE__ */ s(d.ConfigLayout, {
|
|
37
|
-
extraCSSRules: j,
|
|
38
|
-
dimensions: w,
|
|
39
|
-
hideSettings: D,
|
|
40
|
-
settings: /* @__PURE__ */ o(p, {
|
|
41
|
-
model: a,
|
|
42
|
-
onChangeModel: b,
|
|
43
|
-
configuration: c,
|
|
44
|
-
onChangeConfiguration: x,
|
|
45
|
-
groups: { Properties: I }
|
|
46
|
-
}),
|
|
47
|
-
children: [
|
|
48
|
-
M && /* @__PURE__ */ s(g, {
|
|
49
|
-
label: k.label,
|
|
50
|
-
children: [/* @__PURE__ */ o(l, {
|
|
51
|
-
markup: a.teacherInstructions || "",
|
|
52
|
-
onChange: S,
|
|
53
|
-
imageSupport: f,
|
|
54
|
-
error: F,
|
|
55
|
-
pluginProps: L(k?.inputConfiguration),
|
|
56
|
-
nonEmpty: !1,
|
|
57
|
-
spellCheck: N,
|
|
58
|
-
uploadSoundSupport: y
|
|
59
|
-
}), F && /* @__PURE__ */ o(v, { children: F })]
|
|
60
|
-
}),
|
|
61
|
-
/* @__PURE__ */ s(g, {
|
|
62
|
-
label: T.label,
|
|
63
|
-
children: [/* @__PURE__ */ o(l, {
|
|
64
|
-
markup: a.prompt,
|
|
65
|
-
onChange: u,
|
|
66
|
-
imageSupport: f,
|
|
67
|
-
error: P,
|
|
68
|
-
pluginProps: L(T?.inputConfiguration),
|
|
69
|
-
nonEmpty: !T.settings,
|
|
70
|
-
spellCheck: N,
|
|
71
|
-
uploadSoundSupport: y,
|
|
72
|
-
disableUnderline: !0
|
|
73
|
-
}), P && /* @__PURE__ */ o(v, { children: P })]
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ s(_, { children: [
|
|
76
|
-
/* @__PURE__ */ o(t, {
|
|
77
|
-
model: a,
|
|
78
|
-
onChangeModel: b
|
|
79
|
-
}),
|
|
80
|
-
/* @__PURE__ */ o(e, {
|
|
81
|
-
model: a,
|
|
82
|
-
onChangeModel: b
|
|
83
|
-
}),
|
|
84
|
-
/* @__PURE__ */ o(n, {
|
|
85
|
-
model: a,
|
|
86
|
-
onChangeModel: b
|
|
87
|
-
})
|
|
88
|
-
] }),
|
|
89
|
-
/* @__PURE__ */ o(r, {
|
|
90
|
-
model: a,
|
|
91
|
-
onChangeModel: b
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
}, b = class extends i.Component {
|
|
96
|
-
static propTypes = {
|
|
97
|
-
model: a.object.isRequired,
|
|
98
|
-
disableSidePanel: a.bool,
|
|
99
|
-
onModelChanged: a.func.isRequired,
|
|
100
|
-
onConfigurationChanged: a.func.isRequired,
|
|
101
|
-
imageSupport: a.shape({
|
|
102
|
-
add: a.func.isRequired,
|
|
103
|
-
delete: a.func.isRequired
|
|
104
|
-
})
|
|
105
|
-
};
|
|
106
|
-
onPromptChanged = (e) => {
|
|
107
|
-
this.props.onModelChanged({
|
|
108
|
-
...this.props.model,
|
|
109
|
-
prompt: e
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
onChangeModel = (e) => {
|
|
113
|
-
this.props.onModelChanged({
|
|
114
|
-
...this.props.model,
|
|
115
|
-
...e
|
|
116
|
-
});
|
|
117
|
-
};
|
|
118
|
-
onTeacherInstructionsChanged = (e) => {
|
|
119
|
-
this.props.onModelChanged({
|
|
120
|
-
...this.props.model,
|
|
121
|
-
teacherInstructions: e
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
render() {
|
|
125
|
-
return /* @__PURE__ */ o(y, {
|
|
126
|
-
...this.props,
|
|
127
|
-
onChangeModel: this.props.onModelChanged,
|
|
128
|
-
onPromptChanged: this.onPromptChanged,
|
|
129
|
-
onTeacherInstructionsChanged: this.onTeacherInstructionsChanged
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
//#endregion
|
|
134
|
-
export { b as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixColumnsSizeHeaderInput.jsx
|
|
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
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
declare const MatrixColumnsSizeHeaderInput: {
|
|
12
|
-
({ model, onChangeModel }: {
|
|
13
|
-
model: any;
|
|
14
|
-
onChangeModel: any;
|
|
15
|
-
}): React.JSX.Element;
|
|
16
|
-
propTypes: {
|
|
17
|
-
model: PropTypes.Validator<object>;
|
|
18
|
-
onChangeModel: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default MatrixColumnsSizeHeaderInput;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ColumnsHeader as e, ColumnsWrapper as t, IconWrapper as n, NumberInputFormGroupWrapper as r } from "./HeaderCommon.js";
|
|
2
|
-
import { MATRIX_LABEL_TYPE as i } from "./matrixEntities.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import a from "prop-types";
|
|
5
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
import c from "@mui/icons-material/Add";
|
|
7
|
-
import l from "@mui/icons-material/Remove";
|
|
8
|
-
//#region src/author/MatrixColumnsSizeHeaderInput.tsx
|
|
9
|
-
var u = ({ model: a, onChangeModel: u }) => /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(e, { children: "Matrix Columns" }), /* @__PURE__ */ s(r, { children: [
|
|
10
|
-
/* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(l, { onClick: () => {
|
|
11
|
-
let e = a.columnLabels.length;
|
|
12
|
-
if (e <= 1) return;
|
|
13
|
-
let t = [...a.columnLabels];
|
|
14
|
-
t.pop();
|
|
15
|
-
let n = { ...a.matrixValues };
|
|
16
|
-
a.rowLabels.forEach((t, r) => {
|
|
17
|
-
delete n[`${r}-${e - 1}`];
|
|
18
|
-
}), u({
|
|
19
|
-
...a,
|
|
20
|
-
columnLabels: t,
|
|
21
|
-
matrixValues: n,
|
|
22
|
-
labelType: i.custom
|
|
23
|
-
});
|
|
24
|
-
} }) }),
|
|
25
|
-
/* @__PURE__ */ o("p", { children: a.columnLabels.length }),
|
|
26
|
-
/* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(c, { onClick: () => {
|
|
27
|
-
u({
|
|
28
|
-
...a,
|
|
29
|
-
columnLabels: [...a.columnLabels, `COLUMN ${a.columnLabels.length + 1}`],
|
|
30
|
-
labelType: i.custom
|
|
31
|
-
});
|
|
32
|
-
} }) })
|
|
33
|
-
] })] });
|
|
34
|
-
u.propTypes = {
|
|
35
|
-
model: a.object.isRequired,
|
|
36
|
-
onChangeModel: a.func.isRequired
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { u as default };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixLabelEditableButton.jsx
|
|
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
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare const ACTION_TYPE: {
|
|
12
|
-
clear: string;
|
|
13
|
-
sortAscending: string;
|
|
14
|
-
sortDescending: string;
|
|
15
|
-
set: string;
|
|
16
|
-
};
|
|
17
|
-
declare const MatrixLabelEditableButton: {
|
|
18
|
-
(props: any): React.JSX.Element;
|
|
19
|
-
propTypes: {
|
|
20
|
-
value: PropTypes.Validator<string>;
|
|
21
|
-
resourceIndex: PropTypes.Validator<number>;
|
|
22
|
-
onLabelUpdate: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
onAction: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
-
spellCheck: PropTypes.Requireable<boolean>;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default MatrixLabelEditableButton;
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import e from "./NumberInput.js";
|
|
2
|
-
import t from "./isNumeric.js";
|
|
3
|
-
import n, { useState as r } from "react";
|
|
4
|
-
import i from "prop-types";
|
|
5
|
-
import * as a from "@pie-lib/render-ui";
|
|
6
|
-
import { InlineMenu as o } from "@pie-lib/render-ui";
|
|
7
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import l from "styled-components";
|
|
9
|
-
import u from "@mui/icons-material/KeyboardArrowDown";
|
|
10
|
-
import d from "@mui/material/MenuItem";
|
|
11
|
-
//#region src/author/MatrixLabelEditableButton.tsx
|
|
12
|
-
function f(e) {
|
|
13
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
14
|
-
}
|
|
15
|
-
function p(e, t) {
|
|
16
|
-
return !e || f(e) ? e : f(e.default) ? e.default : t && f(e[t]) ? e[t] : t && f(e[t]?.default) ? e[t].default : e;
|
|
17
|
-
}
|
|
18
|
-
var m = p(o, "InlineMenu") || p(_.InlineMenu, "InlineMenu"), h = a, g = h.default, _ = g && typeof g == "object" ? g : h, v = l.div`
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 50px;
|
|
21
|
-
margin: 1px;
|
|
22
|
-
background: #04b26e;
|
|
23
|
-
border-radius: 5px;
|
|
24
|
-
color: white;
|
|
25
|
-
font-size: 14px;
|
|
26
|
-
white-space: nowrap;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: space-between;
|
|
30
|
-
`, y = l.div`
|
|
31
|
-
padding: 0 5px 0 12px;
|
|
32
|
-
width: 100%;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
`, b = l.p`
|
|
37
|
-
margin: 0;
|
|
38
|
-
padding: 3px 0 3px 4px;
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
width: 100%;
|
|
41
|
-
|
|
42
|
-
white-space: nowrap;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
text-overflow: ellipsis;
|
|
45
|
-
|
|
46
|
-
:hover {
|
|
47
|
-
background: #00985d;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
transition: all 0.1s ease-in-out;
|
|
51
|
-
`, x = l.div`
|
|
52
|
-
padding: 0 3px;
|
|
53
|
-
height: 100%;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
border-left: 3px solid #00985d;
|
|
58
|
-
:hover {
|
|
59
|
-
background: #00985d;
|
|
60
|
-
border-top-right-radius: 5px;
|
|
61
|
-
border-bottom-right-radius: 5px;
|
|
62
|
-
}
|
|
63
|
-
transition: all 0.1s ease-in-out;
|
|
64
|
-
`, S = l.div`
|
|
65
|
-
font-size: 18px;
|
|
66
|
-
`, C = l.input`
|
|
67
|
-
margin: 0;
|
|
68
|
-
padding: 0 0 0 4px;
|
|
69
|
-
font-size: 14px;
|
|
70
|
-
border: none;
|
|
71
|
-
outline: none;
|
|
72
|
-
color: white;
|
|
73
|
-
width: 50px;
|
|
74
|
-
width: 100%;
|
|
75
|
-
background: #00985d;
|
|
76
|
-
height: 22px;
|
|
77
|
-
display: flex;
|
|
78
|
-
align-items: center;
|
|
79
|
-
`, w = l.div`
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
`, T = l.div`
|
|
83
|
-
width: 50px;
|
|
84
|
-
margin-left: 10px;
|
|
85
|
-
`, E = {
|
|
86
|
-
clear: "clear",
|
|
87
|
-
sortAscending: "sortAscending",
|
|
88
|
-
sortDescending: "sortDescending",
|
|
89
|
-
set: "set"
|
|
90
|
-
}, D = (i) => {
|
|
91
|
-
let { onLabelUpdate: a, value: o, resourceIndex: l, onAction: f, spellCheck: p } = i, [h, g] = r(null), [_, D] = r(""), [O, k] = r(!1), [A, j] = n.useState(null), [M] = n.useState(n.createRef()), N = !!A, P = (e) => {
|
|
92
|
-
j(e.currentTarget);
|
|
93
|
-
}, F = (e) => {
|
|
94
|
-
e.stopPropagation(), j(null), D("");
|
|
95
|
-
};
|
|
96
|
-
return /* @__PURE__ */ c(v, { children: [/* @__PURE__ */ s(y, { children: O ? /* @__PURE__ */ s(C, {
|
|
97
|
-
autoFocus: !0,
|
|
98
|
-
value: h,
|
|
99
|
-
onChange: (e) => g(e.target.value),
|
|
100
|
-
onBlur: () => {
|
|
101
|
-
let e = h.trim();
|
|
102
|
-
e && a(e), g(null), k(!1);
|
|
103
|
-
},
|
|
104
|
-
spellCheck: p
|
|
105
|
-
}) : /* @__PURE__ */ s(b, {
|
|
106
|
-
onClick: () => {
|
|
107
|
-
k(!0), g(o);
|
|
108
|
-
},
|
|
109
|
-
children: o
|
|
110
|
-
}) }), /* @__PURE__ */ c(x, {
|
|
111
|
-
onClick: P,
|
|
112
|
-
children: [/* @__PURE__ */ s(S, { children: /* @__PURE__ */ s(u, { fontSize: "inherit" }) }), /* @__PURE__ */ c(m, {
|
|
113
|
-
anchorEl: A,
|
|
114
|
-
open: N,
|
|
115
|
-
onClose: F,
|
|
116
|
-
transitionDuration: {
|
|
117
|
-
enter: 225,
|
|
118
|
-
exit: 195
|
|
119
|
-
},
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ s(d, {
|
|
122
|
-
selected: !1,
|
|
123
|
-
onClick: (e) => {
|
|
124
|
-
F(e), f({
|
|
125
|
-
resourceIndex: l,
|
|
126
|
-
actionType: E.clear
|
|
127
|
-
});
|
|
128
|
-
},
|
|
129
|
-
children: "Clear Scores"
|
|
130
|
-
}, "item1"),
|
|
131
|
-
/* @__PURE__ */ s(d, {
|
|
132
|
-
selected: !1,
|
|
133
|
-
onClick: (e) => {
|
|
134
|
-
F(e), f({
|
|
135
|
-
resourceIndex: l,
|
|
136
|
-
actionType: E.sortAscending
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
children: "Set Scores Ascending"
|
|
140
|
-
}, "item2"),
|
|
141
|
-
/* @__PURE__ */ s(d, {
|
|
142
|
-
selected: !1,
|
|
143
|
-
onClick: (e) => {
|
|
144
|
-
F(e), f({
|
|
145
|
-
resourceIndex: l,
|
|
146
|
-
actionType: E.sortDescending
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
children: "Set Scores Descending"
|
|
150
|
-
}, "item3"),
|
|
151
|
-
/* @__PURE__ */ s(d, {
|
|
152
|
-
selected: !1,
|
|
153
|
-
children: /* @__PURE__ */ c(w, { children: [/* @__PURE__ */ s("p", {
|
|
154
|
-
onClick: () => {
|
|
155
|
-
M.current.focus();
|
|
156
|
-
},
|
|
157
|
-
children: "Set Scores To"
|
|
158
|
-
}), /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(e, {
|
|
159
|
-
onFieldUpdate: (e) => {
|
|
160
|
-
if (!t(e)) {
|
|
161
|
-
D("");
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
let n = parseInt(e, 10);
|
|
165
|
-
D(n), f({
|
|
166
|
-
resourceIndex: l,
|
|
167
|
-
actionType: E.set,
|
|
168
|
-
setValue: n
|
|
169
|
-
});
|
|
170
|
-
},
|
|
171
|
-
name: "setScoreTo",
|
|
172
|
-
placeholder: "#",
|
|
173
|
-
fieldValue: {
|
|
174
|
-
value: _,
|
|
175
|
-
ref: M
|
|
176
|
-
}
|
|
177
|
-
}) })] })
|
|
178
|
-
}, "item4")
|
|
179
|
-
]
|
|
180
|
-
})]
|
|
181
|
-
})] });
|
|
182
|
-
};
|
|
183
|
-
D.propTypes = {
|
|
184
|
-
value: i.string.isRequired,
|
|
185
|
-
resourceIndex: i.number.isRequired,
|
|
186
|
-
onLabelUpdate: i.func.isRequired,
|
|
187
|
-
onAction: i.func.isRequired,
|
|
188
|
-
spellCheck: i.bool
|
|
189
|
-
};
|
|
190
|
-
//#endregion
|
|
191
|
-
export { E as ACTION_TYPE, D as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixLabelTypeHeaderInput.jsx
|
|
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
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
declare const MatrixLabelTypeHeaderInput: {
|
|
12
|
-
({ model, onChangeModel }: {
|
|
13
|
-
model: any;
|
|
14
|
-
onChangeModel: any;
|
|
15
|
-
}): React.JSX.Element;
|
|
16
|
-
propTypes: {
|
|
17
|
-
model: PropTypes.Validator<object>;
|
|
18
|
-
onChangeModel: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default MatrixLabelTypeHeaderInput;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { ColumnsHeader as e, ColumnsWrapper as t } from "./HeaderCommon.js";
|
|
2
|
-
import { MATRIX_LABEL_TYPE as n } from "./matrixEntities.js";
|
|
3
|
-
import r from "./columnLabelsGenerator.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import i from "prop-types";
|
|
6
|
-
import { color as a } from "@pie-lib/render-ui";
|
|
7
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
import { styled as c } from "@mui/material/styles";
|
|
9
|
-
import l from "@mui/material/Radio";
|
|
10
|
-
import u from "@mui/material/RadioGroup";
|
|
11
|
-
import d from "@mui/material/FormControlLabel";
|
|
12
|
-
//#region src/author/MatrixLabelTypeHeaderInput.tsx
|
|
13
|
-
var f = c("div")({ display: "flex" }), p = c(l)({ "&.MuiRadio-root": { color: `${a.tertiary()} !important` } }), m = ({ model: i, onChangeModel: a }) => {
|
|
14
|
-
let c = (e) => {
|
|
15
|
-
let t = e.target.value, o = {
|
|
16
|
-
...i,
|
|
17
|
-
labelType: t
|
|
18
|
-
};
|
|
19
|
-
t !== n.custom && (o.columnLabels = r(t, i.columnLabels.length)), a(o);
|
|
20
|
-
}, l = [
|
|
21
|
-
3,
|
|
22
|
-
5,
|
|
23
|
-
7
|
|
24
|
-
].includes(i.columnLabels.length);
|
|
25
|
-
return /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(e, { children: "Matrix Type" }), /* @__PURE__ */ s(f, { children: [
|
|
26
|
-
/* @__PURE__ */ s(u, {
|
|
27
|
-
"aria-label": "matrixLabelType",
|
|
28
|
-
name: "matrixLabelType",
|
|
29
|
-
value: i.labelType,
|
|
30
|
-
onChange: c,
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ o(d, {
|
|
33
|
-
disabled: !l,
|
|
34
|
-
value: n.agreement,
|
|
35
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
36
|
-
label: "Agreement"
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ o(d, {
|
|
39
|
-
disabled: !l,
|
|
40
|
-
value: n.frequency,
|
|
41
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
42
|
-
label: "Frequency"
|
|
43
|
-
}),
|
|
44
|
-
/* @__PURE__ */ o(d, {
|
|
45
|
-
disabled: !l,
|
|
46
|
-
value: n.yesNo,
|
|
47
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
48
|
-
label: "Yes/No"
|
|
49
|
-
})
|
|
50
|
-
]
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ s(u, {
|
|
53
|
-
"aria-label": "matrixLabelType",
|
|
54
|
-
name: "matrixLabelType",
|
|
55
|
-
value: i.labelType,
|
|
56
|
-
onChange: c,
|
|
57
|
-
children: [
|
|
58
|
-
/* @__PURE__ */ o(d, {
|
|
59
|
-
disabled: !l,
|
|
60
|
-
value: n.importance,
|
|
61
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
62
|
-
label: "Importance"
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ o(d, {
|
|
65
|
-
disabled: !l,
|
|
66
|
-
value: n.likelihood,
|
|
67
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
68
|
-
label: "Likelihood"
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ o(d, {
|
|
71
|
-
disabled: !l,
|
|
72
|
-
value: n.like,
|
|
73
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
74
|
-
label: "Like"
|
|
75
|
-
})
|
|
76
|
-
]
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ o(u, {
|
|
79
|
-
"aria-label": "matrixLabelType",
|
|
80
|
-
name: "matrixLabelType",
|
|
81
|
-
value: i.labelType,
|
|
82
|
-
onChange: c,
|
|
83
|
-
children: /* @__PURE__ */ o(d, {
|
|
84
|
-
value: n.custom,
|
|
85
|
-
control: /* @__PURE__ */ o(p, {}),
|
|
86
|
-
label: "Custom"
|
|
87
|
-
})
|
|
88
|
-
})
|
|
89
|
-
] })] });
|
|
90
|
-
};
|
|
91
|
-
m.propTypes = {
|
|
92
|
-
model: i.object.isRequired,
|
|
93
|
-
onChangeModel: i.func.isRequired
|
|
94
|
-
};
|
|
95
|
-
//#endregion
|
|
96
|
-
export { m as default };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixRowsSizeHeaderInput.jsx
|
|
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
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
declare const MatrixColumnsRowInput: {
|
|
12
|
-
({ model, onChangeModel }: {
|
|
13
|
-
model: any;
|
|
14
|
-
onChangeModel: any;
|
|
15
|
-
}): React.JSX.Element;
|
|
16
|
-
propTypes: {
|
|
17
|
-
model: PropTypes.Validator<object>;
|
|
18
|
-
onChangeModel: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default MatrixColumnsRowInput;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ColumnsHeader as e, ColumnsWrapper as t, IconWrapper as n, NumberInputFormGroupWrapper as r } from "./HeaderCommon.js";
|
|
2
|
-
import { MATRIX_LABEL_TYPE as i } from "./matrixEntities.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import a from "prop-types";
|
|
5
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
import c from "@mui/icons-material/Add";
|
|
7
|
-
import l from "@mui/icons-material/Remove";
|
|
8
|
-
//#region src/author/MatrixRowsSizeHeaderInput.tsx
|
|
9
|
-
var u = ({ model: a, onChangeModel: u }) => /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(e, { children: "Matrix Rows" }), /* @__PURE__ */ s(r, { children: [
|
|
10
|
-
/* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(l, { onClick: () => {
|
|
11
|
-
let e = a.rowLabels.length;
|
|
12
|
-
if (e <= 1) return;
|
|
13
|
-
let t = [...a.rowLabels];
|
|
14
|
-
t.pop();
|
|
15
|
-
let n = { ...a.matrixValues };
|
|
16
|
-
a.columnLabels.forEach((t, r) => {
|
|
17
|
-
delete n[`${e - 1}-${r}`];
|
|
18
|
-
}), u({
|
|
19
|
-
...a,
|
|
20
|
-
rowLabels: t,
|
|
21
|
-
matrixValues: n,
|
|
22
|
-
labelType: i.custom
|
|
23
|
-
});
|
|
24
|
-
} }) }),
|
|
25
|
-
/* @__PURE__ */ o("p", { children: a.rowLabels.length }),
|
|
26
|
-
/* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(c, { onClick: () => {
|
|
27
|
-
u({
|
|
28
|
-
...a,
|
|
29
|
-
rowLabels: [...a.rowLabels, `STATEMENT ${a.rowLabels.length + 1}`],
|
|
30
|
-
labelType: i.custom
|
|
31
|
-
});
|
|
32
|
-
} }) })
|
|
33
|
-
] })] });
|
|
34
|
-
u.propTypes = {
|
|
35
|
-
model: a.object.isRequired,
|
|
36
|
-
onChangeModel: a.func.isRequired
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { u as default };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixValues.jsx
|
|
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
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
export declare const ScoringContainer: any;
|
|
12
|
-
export declare const MatrixColumns: any;
|
|
13
|
-
export declare const ColumnLabelWrapper: any;
|
|
14
|
-
export declare const RowLabelWrapper: any;
|
|
15
|
-
export declare const ValueRowWrapper: any;
|
|
16
|
-
export declare const ValueItemWrapper: any;
|
|
17
|
-
export declare const ScoringRows: any;
|
|
18
|
-
export declare const ScoringNumberInputWrapper: any;
|
|
19
|
-
export declare const GridSeparatorHorizontal: any;
|
|
20
|
-
export declare const GridSeparatorVertical: any;
|
|
21
|
-
export declare const Content: any;
|
|
22
|
-
declare const MatrixValues: {
|
|
23
|
-
(props: any): React.JSX.Element;
|
|
24
|
-
propTypes: {
|
|
25
|
-
model: PropTypes.Validator<object>;
|
|
26
|
-
onChangeModel: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export default MatrixValues;
|