@pie-element/matrix 4.1.1-next.0 → 4.1.1-next.29
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 +98 -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 +80 -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
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import e from "./NumberInput.js";
|
|
2
|
-
import t from "./isNumeric.js";
|
|
3
|
-
import n, { ACTION_TYPE as r } from "./MatrixLabelEditableButton.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import i from "prop-types";
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
import s from "styled-components";
|
|
8
|
-
//#region src/author/MatrixValues.tsx
|
|
9
|
-
var c = "120px", l = s.div`
|
|
10
|
-
display: grid;
|
|
11
|
-
grid-template-columns: min-content min-content auto;
|
|
12
|
-
`, u = s.div`
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
padding: 5px;
|
|
16
|
-
`, d = s.div`
|
|
17
|
-
width: ${c};
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
`, f = s.div`
|
|
22
|
-
width: 200px;
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
`, p = s.div`
|
|
27
|
-
display: flex;
|
|
28
|
-
justify-content: space-between;
|
|
29
|
-
`, m = s.div`
|
|
30
|
-
width: ${c};
|
|
31
|
-
height: 50px;
|
|
32
|
-
margin: 1px;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
`, h = s.div`
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
justify-content: space-between;
|
|
40
|
-
padding: 5px;
|
|
41
|
-
`, g = s.div`
|
|
42
|
-
width: 60px;
|
|
43
|
-
justify-self: center;
|
|
44
|
-
align-self: center;
|
|
45
|
-
`, _ = s.div`
|
|
46
|
-
background: gray;
|
|
47
|
-
width: 100%;
|
|
48
|
-
height: 1px;
|
|
49
|
-
`, v = s.div`
|
|
50
|
-
background: gray;
|
|
51
|
-
width: 1px;
|
|
52
|
-
height: 100%;
|
|
53
|
-
`, y = s.div`
|
|
54
|
-
padding: 5px;
|
|
55
|
-
`, b = (i) => {
|
|
56
|
-
let { model: s, onChangeModel: c } = i, { rowLabels: b, columnLabels: x, matrixValues: S, spellCheckEnabled: C } = s, w = (e, n) => {
|
|
57
|
-
let r = { ...S };
|
|
58
|
-
t(n) ? r[e] = parseInt(n, 10) : delete r[e], c({
|
|
59
|
-
...s,
|
|
60
|
-
matrixValues: r
|
|
61
|
-
});
|
|
62
|
-
}, T = (e, t) => {
|
|
63
|
-
let n = [...x];
|
|
64
|
-
n[e] = t, c({
|
|
65
|
-
...s,
|
|
66
|
-
columnLabels: n
|
|
67
|
-
});
|
|
68
|
-
}, E = (e, t) => {
|
|
69
|
-
let n = [...b];
|
|
70
|
-
n[e] = t, c({
|
|
71
|
-
...s,
|
|
72
|
-
rowLabels: n
|
|
73
|
-
});
|
|
74
|
-
}, D = ({ resourceIndex: e, actionType: t, setValue: n }) => {
|
|
75
|
-
let i = e, a = { ...S };
|
|
76
|
-
b.forEach((e, o) => {
|
|
77
|
-
switch (t) {
|
|
78
|
-
case r.clear:
|
|
79
|
-
delete a[`${o}-${i}`];
|
|
80
|
-
break;
|
|
81
|
-
case r.sortAscending:
|
|
82
|
-
a[`${o}-${i}`] = o + 1;
|
|
83
|
-
break;
|
|
84
|
-
case r.sortDescending:
|
|
85
|
-
a[`${o}-${i}`] = b.length - o;
|
|
86
|
-
break;
|
|
87
|
-
case r.set:
|
|
88
|
-
a[`${o}-${i}`] = n;
|
|
89
|
-
break;
|
|
90
|
-
default: throw "Incorrect actionType";
|
|
91
|
-
}
|
|
92
|
-
}), c({
|
|
93
|
-
...s,
|
|
94
|
-
matrixValues: a
|
|
95
|
-
});
|
|
96
|
-
}, O = ({ resourceIndex: e, actionType: t, setValue: n }) => {
|
|
97
|
-
let i = e, a = { ...S };
|
|
98
|
-
x.forEach((e, o) => {
|
|
99
|
-
switch (t) {
|
|
100
|
-
case r.clear:
|
|
101
|
-
delete a[`${i}-${o}`];
|
|
102
|
-
break;
|
|
103
|
-
case r.sortAscending:
|
|
104
|
-
a[`${i}-${o}`] = i + 1;
|
|
105
|
-
break;
|
|
106
|
-
case r.sortDescending:
|
|
107
|
-
a[`${i}-${o}`] = b.length - i;
|
|
108
|
-
break;
|
|
109
|
-
case r.set:
|
|
110
|
-
a[`${i}-${o}`] = n;
|
|
111
|
-
break;
|
|
112
|
-
default: throw "Incorrect actionType";
|
|
113
|
-
}
|
|
114
|
-
}), c({
|
|
115
|
-
...s,
|
|
116
|
-
matrixValues: a
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
return /* @__PURE__ */ o(l, { children: [
|
|
120
|
-
/* @__PURE__ */ a("div", {}),
|
|
121
|
-
/* @__PURE__ */ a(v, {}),
|
|
122
|
-
/* @__PURE__ */ a(u, { children: x.map((e, t) => /* @__PURE__ */ a(d, { children: /* @__PURE__ */ a(n, {
|
|
123
|
-
resourceIndex: t,
|
|
124
|
-
onAction: D,
|
|
125
|
-
value: e,
|
|
126
|
-
onLabelUpdate: (e) => T(t, e),
|
|
127
|
-
spellCheck: C
|
|
128
|
-
}) }, t)) }),
|
|
129
|
-
/* @__PURE__ */ a(_, {}),
|
|
130
|
-
/* @__PURE__ */ a(v, {}),
|
|
131
|
-
/* @__PURE__ */ a(_, {}),
|
|
132
|
-
/* @__PURE__ */ a(h, { children: b.map((e, t) => /* @__PURE__ */ a(f, { children: /* @__PURE__ */ a(n, {
|
|
133
|
-
resourceIndex: t,
|
|
134
|
-
onAction: O,
|
|
135
|
-
value: e,
|
|
136
|
-
onLabelUpdate: (e) => E(t, e),
|
|
137
|
-
spellCheck: C
|
|
138
|
-
}) }, t)) }),
|
|
139
|
-
/* @__PURE__ */ a(v, {}),
|
|
140
|
-
/* @__PURE__ */ a(y, { children: b.map((n, r) => /* @__PURE__ */ a(p, { children: x.map((n, i) => {
|
|
141
|
-
let o = `${r}-${i}`;
|
|
142
|
-
return /* @__PURE__ */ a(m, { children: /* @__PURE__ */ a(g, { children: /* @__PURE__ */ a(e, {
|
|
143
|
-
onFieldUpdate: (e) => w(o, e),
|
|
144
|
-
name: o,
|
|
145
|
-
placeholder: "#",
|
|
146
|
-
fieldValue: { value: t(S[o]) ? S[o] : "" }
|
|
147
|
-
}) }) }, i);
|
|
148
|
-
}) }, r)) })
|
|
149
|
-
] });
|
|
150
|
-
};
|
|
151
|
-
b.propTypes = {
|
|
152
|
-
model: i.object.isRequired,
|
|
153
|
-
onChangeModel: i.func.isRequired
|
|
154
|
-
};
|
|
155
|
-
//#endregion
|
|
156
|
-
export { b as default };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/NumberInput.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 * as React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
declare const NumericInput: {
|
|
12
|
-
(props: any): React.JSX.Element;
|
|
13
|
-
propTypes: {
|
|
14
|
-
name: PropTypes.Validator<string>;
|
|
15
|
-
placeholder: PropTypes.Validator<string>;
|
|
16
|
-
fieldValue: PropTypes.Validator<object>;
|
|
17
|
-
onFieldUpdate: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export default NumericInput;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import e from "prop-types";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
import { styled as n } from "@mui/material/styles";
|
|
5
|
-
import { TextField as r } from "@mui/material";
|
|
6
|
-
//#region src/author/NumberInput.tsx
|
|
7
|
-
var i = n("div")`
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 100%;
|
|
10
|
-
input[type='number'] {
|
|
11
|
-
-moz-appearance: textfield;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
input::-webkit-outer-spin-button,
|
|
15
|
-
input::-webkit-inner-spin-button {
|
|
16
|
-
-webkit-appearance: none;
|
|
17
|
-
}
|
|
18
|
-
`, a = n(r)({
|
|
19
|
-
"& .MuiOutlinedInput-root": {
|
|
20
|
-
fontSize: "16px",
|
|
21
|
-
textAlign: "center!important",
|
|
22
|
-
padding: "0!important",
|
|
23
|
-
margin: "5px 0",
|
|
24
|
-
"&:hover .MuiOutlinedInput-notchedOutline": { borderColor: "gray !important" },
|
|
25
|
-
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
26
|
-
borderColor: "green !important",
|
|
27
|
-
borderWidth: "1px !important"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"& .MuiOutlinedInput-input": {
|
|
31
|
-
fontSize: "16px",
|
|
32
|
-
textAlign: "center",
|
|
33
|
-
padding: "0",
|
|
34
|
-
margin: "5px 0"
|
|
35
|
-
},
|
|
36
|
-
"& .MuiOutlinedInput-notchedOutline": {
|
|
37
|
-
borderWidth: "1px !important",
|
|
38
|
-
borderColor: "#d6d6d6 !important"
|
|
39
|
-
}
|
|
40
|
-
}), o = (e) => {
|
|
41
|
-
let { onFieldUpdate: n, name: r, placeholder: o, fieldValue: s } = e;
|
|
42
|
-
return /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(a, {
|
|
43
|
-
name: r,
|
|
44
|
-
value: s.value,
|
|
45
|
-
inputRef: s.ref,
|
|
46
|
-
type: "number",
|
|
47
|
-
placeholder: o,
|
|
48
|
-
onChange: (e) => {
|
|
49
|
-
n(e.target.value);
|
|
50
|
-
},
|
|
51
|
-
variant: "outlined"
|
|
52
|
-
}) });
|
|
53
|
-
};
|
|
54
|
-
o.propTypes = {
|
|
55
|
-
name: e.string.isRequired,
|
|
56
|
-
placeholder: e.string.isRequired,
|
|
57
|
-
fieldValue: e.object.isRequired,
|
|
58
|
-
onFieldUpdate: e.func.isRequired
|
|
59
|
-
};
|
|
60
|
-
//#endregion
|
|
61
|
-
export { o as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/columnLabelsGenerator.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 AGREEMENT_3: string[];
|
|
10
|
-
declare const generateColumnLabels: (labelType: any, size: any) => any;
|
|
11
|
-
export default generateColumnLabels;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
//#region src/author/columnLabelsGenerator.ts
|
|
2
|
-
var e = [
|
|
3
|
-
"Disagree",
|
|
4
|
-
"Unsure",
|
|
5
|
-
"Agree"
|
|
6
|
-
], t = [
|
|
7
|
-
"Strongly Disagree",
|
|
8
|
-
...e,
|
|
9
|
-
"Strongly Agree"
|
|
10
|
-
], n = [
|
|
11
|
-
"Extremely Disagree",
|
|
12
|
-
...t,
|
|
13
|
-
"Extremely Agree"
|
|
14
|
-
], r = [
|
|
15
|
-
"Infrequently",
|
|
16
|
-
"Unsure",
|
|
17
|
-
"Frequently"
|
|
18
|
-
], i = [
|
|
19
|
-
"Very Infrequently",
|
|
20
|
-
...r,
|
|
21
|
-
"Very Frequently"
|
|
22
|
-
], a = [
|
|
23
|
-
"Never",
|
|
24
|
-
...i,
|
|
25
|
-
"Always"
|
|
26
|
-
], o = [
|
|
27
|
-
"No",
|
|
28
|
-
"Unsure",
|
|
29
|
-
"Yes"
|
|
30
|
-
], s = [
|
|
31
|
-
"No",
|
|
32
|
-
"Not really",
|
|
33
|
-
"Unsure",
|
|
34
|
-
"Sometimes",
|
|
35
|
-
"Yes"
|
|
36
|
-
], c = [
|
|
37
|
-
"No",
|
|
38
|
-
"Rarely",
|
|
39
|
-
"Not really",
|
|
40
|
-
"Unsure",
|
|
41
|
-
"Sometimes",
|
|
42
|
-
"Very Often",
|
|
43
|
-
"Always"
|
|
44
|
-
], l = [
|
|
45
|
-
"Not Likely",
|
|
46
|
-
"Unsure",
|
|
47
|
-
"Likely"
|
|
48
|
-
], u = [
|
|
49
|
-
"Very Unlikely",
|
|
50
|
-
...l,
|
|
51
|
-
"Very Likely"
|
|
52
|
-
], d = [
|
|
53
|
-
"Extremely Unlikely",
|
|
54
|
-
...u,
|
|
55
|
-
"Extremely Likely"
|
|
56
|
-
], f = [
|
|
57
|
-
"Not Important",
|
|
58
|
-
"Unsure",
|
|
59
|
-
"Important"
|
|
60
|
-
], p = [
|
|
61
|
-
"Very Not Important",
|
|
62
|
-
...f,
|
|
63
|
-
"Very Important"
|
|
64
|
-
], m = [
|
|
65
|
-
"Extremely Not Important",
|
|
66
|
-
...p,
|
|
67
|
-
"Extremely Important"
|
|
68
|
-
], h = [
|
|
69
|
-
"Dislike",
|
|
70
|
-
"Unsure",
|
|
71
|
-
"Like"
|
|
72
|
-
], g = [
|
|
73
|
-
"Really Dislike",
|
|
74
|
-
...h,
|
|
75
|
-
"Really Like"
|
|
76
|
-
], _ = {
|
|
77
|
-
agreement_3: e,
|
|
78
|
-
agreement_5: t,
|
|
79
|
-
agreement_7: n,
|
|
80
|
-
frequency_3: r,
|
|
81
|
-
frequency_5: i,
|
|
82
|
-
frequency_7: a,
|
|
83
|
-
yesNo_3: o,
|
|
84
|
-
yesNo_5: s,
|
|
85
|
-
yesNo_7: c,
|
|
86
|
-
likelihood_3: l,
|
|
87
|
-
likelihood_5: u,
|
|
88
|
-
likelihood_7: d,
|
|
89
|
-
importance_3: f,
|
|
90
|
-
importance_5: p,
|
|
91
|
-
importance_7: m,
|
|
92
|
-
like_3: h,
|
|
93
|
-
like_5: g,
|
|
94
|
-
like_7: [
|
|
95
|
-
"Extremely Dislike",
|
|
96
|
-
...g,
|
|
97
|
-
"Extremely Like"
|
|
98
|
-
]
|
|
99
|
-
}, v = (e, t) => _[`${e}_${t}`];
|
|
100
|
-
//#endregion
|
|
101
|
-
export { v as default };
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/defaults.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
|
-
/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
|
|
10
|
-
* functionalities are not defined yet - the value for those can belong to
|
|
11
|
-
* model or to configure
|
|
12
|
-
*/
|
|
13
|
-
declare const _default: {
|
|
14
|
-
model: {
|
|
15
|
-
columnLabels: string[];
|
|
16
|
-
labelType: string;
|
|
17
|
-
matrixValues: {};
|
|
18
|
-
prompt: string;
|
|
19
|
-
promptEnabled: boolean;
|
|
20
|
-
rowLabels: string[];
|
|
21
|
-
teacherInstructions: string;
|
|
22
|
-
teacherInstructionsEnabled: boolean;
|
|
23
|
-
};
|
|
24
|
-
configuration: {
|
|
25
|
-
baseInputConfiguration: {
|
|
26
|
-
h3: {
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
};
|
|
29
|
-
audio: {
|
|
30
|
-
disabled: boolean;
|
|
31
|
-
};
|
|
32
|
-
video: {
|
|
33
|
-
disabled: boolean;
|
|
34
|
-
};
|
|
35
|
-
image: {
|
|
36
|
-
disabled: boolean;
|
|
37
|
-
};
|
|
38
|
-
textAlign: {
|
|
39
|
-
disabled: boolean;
|
|
40
|
-
};
|
|
41
|
-
showParagraphs: {
|
|
42
|
-
disabled: boolean;
|
|
43
|
-
};
|
|
44
|
-
separateParagraphs: {
|
|
45
|
-
disabled: boolean;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
prompt: {
|
|
49
|
-
settings: boolean;
|
|
50
|
-
label: string;
|
|
51
|
-
inputConfiguration: {
|
|
52
|
-
audio: {
|
|
53
|
-
disabled: boolean;
|
|
54
|
-
};
|
|
55
|
-
video: {
|
|
56
|
-
disabled: boolean;
|
|
57
|
-
};
|
|
58
|
-
image: {
|
|
59
|
-
disabled: boolean;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
required: boolean;
|
|
63
|
-
};
|
|
64
|
-
settingsPanelDisabled: boolean;
|
|
65
|
-
spellCheck: {
|
|
66
|
-
label: string;
|
|
67
|
-
settings: boolean;
|
|
68
|
-
enabled: boolean;
|
|
69
|
-
};
|
|
70
|
-
teacherInstructions: {
|
|
71
|
-
settings: boolean;
|
|
72
|
-
label: string;
|
|
73
|
-
inputConfiguration: {
|
|
74
|
-
audio: {
|
|
75
|
-
disabled: boolean;
|
|
76
|
-
};
|
|
77
|
-
video: {
|
|
78
|
-
disabled: boolean;
|
|
79
|
-
};
|
|
80
|
-
image: {
|
|
81
|
-
disabled: boolean;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
required: boolean;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
export default _default;
|
package/dist/author/defaults.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
//#region src/author/defaults.ts
|
|
2
|
-
var e = {
|
|
3
|
-
model: {
|
|
4
|
-
columnLabels: [
|
|
5
|
-
"COLUMN 1",
|
|
6
|
-
"COLUMN 2",
|
|
7
|
-
"COLUMN 3"
|
|
8
|
-
],
|
|
9
|
-
labelType: "agreement",
|
|
10
|
-
matrixValues: {},
|
|
11
|
-
prompt: "",
|
|
12
|
-
promptEnabled: !0,
|
|
13
|
-
rowLabels: ["STATEMENT 1", "STATEMENT 2"],
|
|
14
|
-
teacherInstructions: "",
|
|
15
|
-
teacherInstructionsEnabled: !0
|
|
16
|
-
},
|
|
17
|
-
configuration: {
|
|
18
|
-
baseInputConfiguration: {
|
|
19
|
-
h3: { disabled: !0 },
|
|
20
|
-
audio: { disabled: !1 },
|
|
21
|
-
video: { disabled: !1 },
|
|
22
|
-
image: { disabled: !1 },
|
|
23
|
-
textAlign: { disabled: !0 },
|
|
24
|
-
showParagraphs: { disabled: !1 },
|
|
25
|
-
separateParagraphs: { disabled: !0 }
|
|
26
|
-
},
|
|
27
|
-
prompt: {
|
|
28
|
-
settings: !0,
|
|
29
|
-
label: "Prompt",
|
|
30
|
-
inputConfiguration: {
|
|
31
|
-
audio: { disabled: !1 },
|
|
32
|
-
video: { disabled: !1 },
|
|
33
|
-
image: { disabled: !1 }
|
|
34
|
-
},
|
|
35
|
-
required: !1
|
|
36
|
-
},
|
|
37
|
-
settingsPanelDisabled: !1,
|
|
38
|
-
spellCheck: {
|
|
39
|
-
label: "Spellcheck",
|
|
40
|
-
settings: !1,
|
|
41
|
-
enabled: !0
|
|
42
|
-
},
|
|
43
|
-
teacherInstructions: {
|
|
44
|
-
settings: !0,
|
|
45
|
-
label: "Teacher Instructions",
|
|
46
|
-
inputConfiguration: {
|
|
47
|
-
audio: { disabled: !1 },
|
|
48
|
-
video: { disabled: !1 },
|
|
49
|
-
image: { disabled: !1 }
|
|
50
|
-
},
|
|
51
|
-
required: !1
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
//#endregion
|
|
56
|
-
export { e as default };
|
package/dist/author/index.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/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 default class Matrix extends HTMLElement {
|
|
10
|
-
static createDefaultModel: (model?: {}) => {
|
|
11
|
-
columnLabels: string[];
|
|
12
|
-
labelType: string;
|
|
13
|
-
matrixValues: {};
|
|
14
|
-
prompt: string;
|
|
15
|
-
promptEnabled: boolean;
|
|
16
|
-
rowLabels: string[];
|
|
17
|
-
teacherInstructions: string;
|
|
18
|
-
teacherInstructionsEnabled: boolean;
|
|
19
|
-
};
|
|
20
|
-
constructor();
|
|
21
|
-
set model(s: any);
|
|
22
|
-
set configuration(c: any);
|
|
23
|
-
set disableSidePanel(s: any);
|
|
24
|
-
dispatchModelUpdated(reset: any): void;
|
|
25
|
-
onModelChanged(m: any, reset: any): void;
|
|
26
|
-
onConfigurationChanged(c: any): void;
|
|
27
|
-
insertSound(handler: any): void;
|
|
28
|
-
onDeleteSound(src: any, done: any): void;
|
|
29
|
-
_render(): void;
|
|
30
|
-
disconnectedCallback(): void;
|
|
31
|
-
}
|
package/dist/author/index.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
|
|
2
|
-
import t from "./Main.js";
|
|
3
|
-
import n from "./defaults.js";
|
|
4
|
-
import r from "react";
|
|
5
|
-
import { createRoot as i } from "react-dom/client";
|
|
6
|
-
import a from "debug";
|
|
7
|
-
import { DeleteSoundEvent as o, InsertSoundEvent as s, ModelUpdatedEvent as c } from "@pie-element/shared-configure-events";
|
|
8
|
-
//#region src/author/index.ts
|
|
9
|
-
var l = a("matrix:configure"), u = (t, r) => ({
|
|
10
|
-
configuration: e(t, n.configuration),
|
|
11
|
-
model: r
|
|
12
|
-
}), d = class e extends HTMLElement {
|
|
13
|
-
static createDefaultModel = (e = {}) => ({
|
|
14
|
-
...n.model,
|
|
15
|
-
...e
|
|
16
|
-
});
|
|
17
|
-
constructor() {
|
|
18
|
-
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
19
|
-
}
|
|
20
|
-
set model(t) {
|
|
21
|
-
this._model = e.createDefaultModel(t), this._render();
|
|
22
|
-
}
|
|
23
|
-
set configuration(e) {
|
|
24
|
-
let t = u(e, this._model);
|
|
25
|
-
this.onModelChanged(t.model), this._configuration = t.configuration, this._render();
|
|
26
|
-
}
|
|
27
|
-
set disableSidePanel(e) {
|
|
28
|
-
this._disableSidePanel = e, this._render();
|
|
29
|
-
}
|
|
30
|
-
dispatchModelUpdated(e) {
|
|
31
|
-
let t = !!e;
|
|
32
|
-
this.dispatchEvent(new c(this._model, t));
|
|
33
|
-
}
|
|
34
|
-
onModelChanged(e, t) {
|
|
35
|
-
this._model = e, this._render(), this.dispatchModelUpdated(t);
|
|
36
|
-
}
|
|
37
|
-
onConfigurationChanged(e) {
|
|
38
|
-
this._configuration = u(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
|
|
39
|
-
}
|
|
40
|
-
insertSound(e) {
|
|
41
|
-
this.dispatchEvent(new s(e));
|
|
42
|
-
}
|
|
43
|
-
onDeleteSound(e, t) {
|
|
44
|
-
this.dispatchEvent(new o(e, t));
|
|
45
|
-
}
|
|
46
|
-
_render() {
|
|
47
|
-
l("_render");
|
|
48
|
-
let e = r.createElement(t, {
|
|
49
|
-
model: this._model,
|
|
50
|
-
configuration: this._configuration,
|
|
51
|
-
onModelChanged: this.onModelChanged,
|
|
52
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
53
|
-
disableSidePanel: this._disableSidePanel,
|
|
54
|
-
uploadSoundSupport: {
|
|
55
|
-
add: this.insertSound.bind(this),
|
|
56
|
-
delete: this.onDeleteSound.bind(this)
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
this._root ||= i(this), this._root.render(e);
|
|
60
|
-
}
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
this._root && this._root.unmount();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
//#endregion
|
|
66
|
-
export { d as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/isNumeric.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 const _default: (value: any) => boolean;
|
|
10
|
-
export default _default;
|
package/dist/author/isNumeric.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/matrixEntities.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 MATRIX_LABEL_TYPE: {
|
|
10
|
-
agreement: string;
|
|
11
|
-
frequency: string;
|
|
12
|
-
yesNo: string;
|
|
13
|
-
importance: string;
|
|
14
|
-
likelihood: string;
|
|
15
|
-
like: string;
|
|
16
|
-
custom: string;
|
|
17
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region src/author/matrixEntities.ts
|
|
2
|
-
var e = {
|
|
3
|
-
agreement: "agreement",
|
|
4
|
-
frequency: "frequency",
|
|
5
|
-
yesNo: "yesNo",
|
|
6
|
-
importance: "importance",
|
|
7
|
-
likelihood: "likelihood",
|
|
8
|
-
like: "like",
|
|
9
|
-
custom: "custom"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as MATRIX_LABEL_TYPE };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/controller/src/defaults.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 const _default: {
|
|
10
|
-
columnLabels: string[];
|
|
11
|
-
labelType: string;
|
|
12
|
-
matrixValues: {};
|
|
13
|
-
prompt: string;
|
|
14
|
-
promptEnabled: boolean;
|
|
15
|
-
rowLabels: string[];
|
|
16
|
-
teacherInstructions: string;
|
|
17
|
-
teacherInstructionsEnabled: boolean;
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
//#region src/controller/defaults.ts
|
|
2
|
-
var e = {
|
|
3
|
-
columnLabels: [
|
|
4
|
-
"COLUMN 1",
|
|
5
|
-
"COLUMN 2",
|
|
6
|
-
"COLUMN 3"
|
|
7
|
-
],
|
|
8
|
-
labelType: "agreement",
|
|
9
|
-
matrixValues: {},
|
|
10
|
-
prompt: "",
|
|
11
|
-
promptEnabled: !0,
|
|
12
|
-
rowLabels: ["STATEMENT 1", "STATEMENT 2"],
|
|
13
|
-
teacherInstructions: "",
|
|
14
|
-
teacherInstructionsEnabled: !0
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
export { e as default };
|