@pie-element/placement-ordering 14.1.2-next.5 → 14.1.3
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 +1312 -0
- package/CHANGELOG.md +2444 -0
- package/LICENSE.md +5 -0
- package/README.md +57 -0
- package/configure/CHANGELOG.json +952 -0
- package/configure/CHANGELOG.md +2139 -0
- package/configure/lib/choice-editor.js +252 -0
- package/configure/lib/choice-editor.js.map +1 -0
- package/configure/lib/choice-tile.js +205 -0
- package/configure/lib/choice-tile.js.map +1 -0
- package/configure/lib/defaults.js +211 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/design.js +427 -0
- package/configure/lib/design.js.map +1 -0
- package/configure/lib/help.js +14 -0
- package/configure/lib/help.js.map +1 -0
- package/configure/lib/index.js +155 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/utils.js +108 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +26 -0
- package/controller/CHANGELOG.json +517 -0
- package/controller/CHANGELOG.md +1518 -0
- package/controller/lib/defaults.js +29 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +285 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/scoring.js +109 -0
- package/controller/lib/scoring.js.map +1 -0
- package/controller/package.json +15 -0
- package/docs/config-schema.json +2964 -0
- package/docs/config-schema.json.md +2190 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +50 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +7 -0
- package/docs/pie-schema.json +1613 -0
- package/docs/pie-schema.json.md +973 -0
- package/icon.png +0 -0
- package/lib/index.js +122 -0
- package/lib/index.js.map +1 -0
- package/lib/main.js +32 -0
- package/lib/main.js.map +1 -0
- package/lib/ordering.js +165 -0
- package/lib/ordering.js.map +1 -0
- package/lib/placement-ordering.js +419 -0
- package/lib/placement-ordering.js.map +1 -0
- package/lib/tile.js +259 -0
- package/lib/tile.js.map +1 -0
- package/lib/tiler.js +165 -0
- package/lib/tiler.js.map +1 -0
- package/lib/utils.js +18 -0
- package/lib/utils.js.map +1 -0
- package/package.json +21 -88
- package/configure.js +0 -2
- package/controller.js +0 -1
- package/dist/author/choice-editor.d.ts +0 -39
- package/dist/author/choice-editor.js +0 -156
- package/dist/author/choice-tile.d.ts +0 -40
- package/dist/author/choice-tile.js +0 -132
- package/dist/author/defaults.d.ts +0 -213
- package/dist/author/defaults.js +0 -159
- package/dist/author/design.d.ts +0 -21
- package/dist/author/design.js +0 -273
- package/dist/author/help.d.ts +0 -11
- package/dist/author/index.d.ts +0 -45
- package/dist/author/index.js +0 -85
- package/dist/author/utils.d.ts +0 -15
- package/dist/author/utils.js +0 -62
- package/dist/browser/author/index.js +0 -46600
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/browser-DHPggtaA.js +0 -376
- package/dist/browser/browser-DHPggtaA.js.map +0 -1
- package/dist/browser/controller/index.js +0 -242
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -1035
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/dist-D9ARZhQk.js +0 -1426
- package/dist/browser/dist-D9ARZhQk.js.map +0 -1
- package/dist/browser/drag-provider-C1slTlsc.js +0 -10555
- package/dist/browser/drag-provider-C1slTlsc.js.map +0 -1
- package/dist/browser/placement-ordering.css +0 -2
- package/dist/controller/defaults.d.ts +0 -31
- package/dist/controller/defaults.js +0 -25
- package/dist/controller/index.d.ts +0 -29
- package/dist/controller/index.js +0 -123
- package/dist/controller/scoring.d.ts +0 -27
- package/dist/controller/scoring.js +0 -30
- package/dist/delivery/index.d.ts +0 -26
- package/dist/delivery/index.js +0 -70
- package/dist/delivery/main.d.ts +0 -19
- package/dist/delivery/main.js +0 -22
- package/dist/delivery/ordering.d.ts +0 -18
- package/dist/delivery/ordering.js +0 -93
- package/dist/delivery/placement-ordering.d.ts +0 -28
- package/dist/delivery/placement-ordering.js +0 -213
- package/dist/delivery/tile.d.ts +0 -28
- package/dist/delivery/tile.js +0 -165
- package/dist/delivery/tiler.d.ts +0 -42
- package/dist/delivery/tiler.js +0 -89
- package/dist/delivery/utils.d.ts +0 -9
- package/dist/delivery/utils.js +0 -8
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -152
- package/dist/index.js +0 -2
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -12
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/placement-ordering/configure/src/choice-editor.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 PropTypes from 'prop-types';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
declare class ChoiceEditor extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
correctResponse: PropTypes.Validator<any[]>;
|
|
14
|
-
choices: PropTypes.Validator<any[]>;
|
|
15
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
-
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
-
}>>;
|
|
20
|
-
maxImageHeight: PropTypes.Requireable<object>;
|
|
21
|
-
maxImageWidth: PropTypes.Requireable<object>;
|
|
22
|
-
toolbarOpts: PropTypes.Requireable<object>;
|
|
23
|
-
pluginProps: PropTypes.Requireable<object>;
|
|
24
|
-
placementArea: PropTypes.Requireable<boolean>;
|
|
25
|
-
singularChoiceLabel: PropTypes.Requireable<string>;
|
|
26
|
-
pluralChoiceLabel: PropTypes.Requireable<string>;
|
|
27
|
-
choicesLabel: PropTypes.Requireable<string>;
|
|
28
|
-
errors: PropTypes.Requireable<object>;
|
|
29
|
-
spellCheck: PropTypes.Requireable<boolean>;
|
|
30
|
-
};
|
|
31
|
-
state: {
|
|
32
|
-
warning: {
|
|
33
|
-
open: boolean;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
constructor(props: any);
|
|
37
|
-
render(): React.JSX.Element;
|
|
38
|
-
}
|
|
39
|
-
export default ChoiceEditor;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import e from "./choice-tile.js";
|
|
2
|
-
import t from "react";
|
|
3
|
-
import { isEqual as n, shuffle as r } from "@pie-element/shared-lodash";
|
|
4
|
-
import i from "debug";
|
|
5
|
-
import a from "prop-types";
|
|
6
|
-
import { styled as o } from "@mui/material/styles";
|
|
7
|
-
import * as s from "@pie-lib/render-ui";
|
|
8
|
-
import { InputContainer as c } from "@pie-lib/render-ui";
|
|
9
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
-
import { AlertDialog as d } from "@pie-lib/config-ui";
|
|
11
|
-
import f from "@mui/material/Button";
|
|
12
|
-
//#region src/author/choice-editor.tsx
|
|
13
|
-
function p(e) {
|
|
14
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
15
|
-
}
|
|
16
|
-
function m(e, t) {
|
|
17
|
-
return !e || p(e) ? e : p(e.default) ? e.default : t && p(e[t]) ? e[t] : t && p(e[t]?.default) ? e[t].default : e;
|
|
18
|
-
}
|
|
19
|
-
var h = m(c, "InputContainer") || m(v.InputContainer, "InputContainer"), g = s, _ = g.default, v = _ && typeof _ == "object" ? _ : g;
|
|
20
|
-
function y(e) {
|
|
21
|
-
let t = 1, n = e.map((e) => e.id);
|
|
22
|
-
for (; n.includes(`c${t}`);) t++;
|
|
23
|
-
return t;
|
|
24
|
-
}
|
|
25
|
-
i("@pie-element:placement-ordering:configure:choice-editor");
|
|
26
|
-
var b = o("div")({
|
|
27
|
-
display: "flex",
|
|
28
|
-
alignItems: "center",
|
|
29
|
-
justifyContent: "space-between"
|
|
30
|
-
}), x = o(f)(({ theme: e }) => ({
|
|
31
|
-
marginTop: e.spacing(2.5),
|
|
32
|
-
paddingLeft: e.spacing(1.5),
|
|
33
|
-
paddingRight: e.spacing(1.5),
|
|
34
|
-
"& .MuiButton-label": {
|
|
35
|
-
transition: "opacity 200ms linear",
|
|
36
|
-
"&:hover": { opacity: .3 }
|
|
37
|
-
}
|
|
38
|
-
})), S = o("div")({
|
|
39
|
-
gridAutoFlow: "column",
|
|
40
|
-
display: "grid",
|
|
41
|
-
gridGap: "10px",
|
|
42
|
-
alignItems: "center"
|
|
43
|
-
}), C = o(h)(({ theme: e }) => ({
|
|
44
|
-
width: "100%",
|
|
45
|
-
paddingTop: e.spacing(2)
|
|
46
|
-
})), w = o("div")(({ theme: e }) => ({
|
|
47
|
-
fontSize: e.typography.fontSize - 2,
|
|
48
|
-
color: e.palette.error.main,
|
|
49
|
-
paddingTop: e.spacing(1)
|
|
50
|
-
})), T = class extends t.Component {
|
|
51
|
-
static propTypes = {
|
|
52
|
-
correctResponse: a.array.isRequired,
|
|
53
|
-
choices: a.array.isRequired,
|
|
54
|
-
onChange: a.func.isRequired,
|
|
55
|
-
imageSupport: a.shape({
|
|
56
|
-
add: a.func.isRequired,
|
|
57
|
-
delete: a.func.isRequired
|
|
58
|
-
}),
|
|
59
|
-
maxImageHeight: a.object,
|
|
60
|
-
maxImageWidth: a.object,
|
|
61
|
-
toolbarOpts: a.object,
|
|
62
|
-
pluginProps: a.object,
|
|
63
|
-
placementArea: a.bool,
|
|
64
|
-
singularChoiceLabel: a.string,
|
|
65
|
-
pluralChoiceLabel: a.string,
|
|
66
|
-
choicesLabel: a.string,
|
|
67
|
-
errors: a.object,
|
|
68
|
-
spellCheck: a.bool
|
|
69
|
-
};
|
|
70
|
-
state = { warning: { open: !1 } };
|
|
71
|
-
constructor(e) {
|
|
72
|
-
super(e), this.onChoiceChange = (e) => {
|
|
73
|
-
let { choices: t, onChange: n, correctResponse: r } = this.props, i = t.findIndex((t) => t.id === e.id);
|
|
74
|
-
t.splice(i, 1, {
|
|
75
|
-
...t[i],
|
|
76
|
-
label: e.label
|
|
77
|
-
}), n(t, r);
|
|
78
|
-
}, this.onDelete = (e) => {
|
|
79
|
-
let { choices: t, onChange: n, correctResponse: r, choicesLabel: i } = this.props;
|
|
80
|
-
t && t.length === 3 ? this.setState({ warning: {
|
|
81
|
-
open: !0,
|
|
82
|
-
text: `There have to be at least 3 ${i}.`
|
|
83
|
-
} }) : n(t.filter((t) => t.id !== e.id), r.filter((t) => t.id !== e.id));
|
|
84
|
-
}, this.addChoice = () => {
|
|
85
|
-
let { choices: e, correctResponse: t, onChange: n, choicesLabel: r } = this.props;
|
|
86
|
-
if (e && e.length === 10) this.setState({ warning: {
|
|
87
|
-
open: !0,
|
|
88
|
-
text: `There can be maximum 10 ${r}.`
|
|
89
|
-
} });
|
|
90
|
-
else {
|
|
91
|
-
let r = `c${y(e)}`, i = {
|
|
92
|
-
id: r,
|
|
93
|
-
label: ""
|
|
94
|
-
}, a = {
|
|
95
|
-
id: r,
|
|
96
|
-
weight: 0
|
|
97
|
-
};
|
|
98
|
-
n(e.concat([i]), t.concat([a]));
|
|
99
|
-
}
|
|
100
|
-
}, this.shuffleChoices = () => {
|
|
101
|
-
let { onChange: e, choices: t, correctResponse: i, placementArea: a } = this.props, o = r(t);
|
|
102
|
-
!a && n(o.map((e) => e.id), i.map((e) => e.id)) ? e(r(o), i) : e(o, i);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
render() {
|
|
106
|
-
let { correctResponse: t, choices: n, imageSupport: r, toolbarOpts: i, pluginProps: a, singularChoiceLabel: o, pluralChoiceLabel: s, choicesLabel: c, spellCheck: f, maxImageWidth: p, maxImageHeight: m, errors: h, mathMlOptions: g = {}, ordering: _ } = this.props, { warning: v } = this.state, { choicesErrors: y, orderError: T } = h || {}, E = {
|
|
107
|
-
gridTemplateColumns: "repeat(2, 1fr)",
|
|
108
|
-
gridTemplateRows: `repeat(${n.length}, 1fr)`
|
|
109
|
-
};
|
|
110
|
-
return /* @__PURE__ */ u("div", { children: [
|
|
111
|
-
/* @__PURE__ */ u(S, {
|
|
112
|
-
style: { gridTemplateColumns: "repeat(2, 1fr)" },
|
|
113
|
-
children: [/* @__PURE__ */ l(C, { label: `Student ${c || "Choices"}` }), /* @__PURE__ */ l(C, { label: "Correct Order" })]
|
|
114
|
-
}),
|
|
115
|
-
/* @__PURE__ */ l(S, {
|
|
116
|
-
style: E,
|
|
117
|
-
children: _.tiles.map((t, o) => /* @__PURE__ */ l(e, {
|
|
118
|
-
choice: t,
|
|
119
|
-
index: o,
|
|
120
|
-
imageSupport: r,
|
|
121
|
-
onDelete: this.onDelete.bind(this, t),
|
|
122
|
-
onChoiceChange: this.onChoiceChange,
|
|
123
|
-
toolbarOpts: i,
|
|
124
|
-
pluginProps: a,
|
|
125
|
-
choices: n,
|
|
126
|
-
choicesLabel: c,
|
|
127
|
-
spellCheck: f,
|
|
128
|
-
maxImageWidth: p,
|
|
129
|
-
maxImageHeight: m,
|
|
130
|
-
error: y?.[t.id] || T && " " || null,
|
|
131
|
-
mathMlOptions: g
|
|
132
|
-
}, `${t.type}-${t.id}`))
|
|
133
|
-
}),
|
|
134
|
-
T && /* @__PURE__ */ l(w, { children: T }),
|
|
135
|
-
/* @__PURE__ */ u(b, { children: [/* @__PURE__ */ l(x, {
|
|
136
|
-
onClick: this.shuffleChoices,
|
|
137
|
-
size: "small",
|
|
138
|
-
variant: "contained",
|
|
139
|
-
children: `SHUFFLE ${s}`.toUpperCase()
|
|
140
|
-
}), /* @__PURE__ */ l(x, {
|
|
141
|
-
onClick: this.addChoice,
|
|
142
|
-
size: "small",
|
|
143
|
-
variant: "contained",
|
|
144
|
-
children: `ADD ${o}`.toUpperCase()
|
|
145
|
-
})] }),
|
|
146
|
-
/* @__PURE__ */ l(d, {
|
|
147
|
-
open: v.open,
|
|
148
|
-
title: "Warning",
|
|
149
|
-
text: v.text,
|
|
150
|
-
onConfirm: () => this.setState({ warning: { open: !1 } })
|
|
151
|
-
})
|
|
152
|
-
] });
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
//#endregion
|
|
156
|
-
export { T as default };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/placement-ordering/configure/src/choice-tile.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 ChoiceTile: {
|
|
12
|
-
(props: any): React.JSX.Element;
|
|
13
|
-
propTypes: {
|
|
14
|
-
id: PropTypes.Requireable<any>;
|
|
15
|
-
maxImageHeight: PropTypes.Requireable<object>;
|
|
16
|
-
maxImageWidth: PropTypes.Requireable<object>;
|
|
17
|
-
label: PropTypes.Requireable<string>;
|
|
18
|
-
isOver: PropTypes.Requireable<boolean>;
|
|
19
|
-
type: PropTypes.Requireable<string>;
|
|
20
|
-
empty: PropTypes.Requireable<boolean>;
|
|
21
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
22
|
-
outcome: PropTypes.Requireable<object>;
|
|
23
|
-
index: PropTypes.Requireable<number>;
|
|
24
|
-
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
27
|
-
}>>;
|
|
28
|
-
choice: PropTypes.Requireable<object>;
|
|
29
|
-
choices: PropTypes.Validator<any[]>;
|
|
30
|
-
onChoiceChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
-
onDelete: PropTypes.Validator<(...args: any[]) => any>;
|
|
32
|
-
toolbarOpts: PropTypes.Requireable<object>;
|
|
33
|
-
pluginProps: PropTypes.Requireable<object>;
|
|
34
|
-
choicesLabel: PropTypes.Requireable<string>;
|
|
35
|
-
error: PropTypes.Requireable<string>;
|
|
36
|
-
spellCheck: PropTypes.Requireable<boolean>;
|
|
37
|
-
mathMlOptions: PropTypes.Requireable<object>;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export default ChoiceTile;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import "react";
|
|
2
|
-
import e from "debug";
|
|
3
|
-
import t from "prop-types";
|
|
4
|
-
import { styled as n } from "@mui/material/styles";
|
|
5
|
-
import { useDraggable as r, useDroppable as i } from "@dnd-kit/core";
|
|
6
|
-
import { color as a } from "@pie-lib/render-ui";
|
|
7
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
import c, { DEFAULT_PLUGINS as l } from "@pie-lib/editable-html-tip-tap";
|
|
9
|
-
import u from "@mui/material/CardActions";
|
|
10
|
-
import d from "@mui/icons-material/DragHandle";
|
|
11
|
-
import f from "@mui/material/IconButton";
|
|
12
|
-
import p from "@mui/icons-material/RemoveCircle";
|
|
13
|
-
//#region src/author/choice-tile.tsx
|
|
14
|
-
e("@pie-element:placement-ordering:configure:choice-tile");
|
|
15
|
-
var m = n("div")(({ theme: e }) => ({
|
|
16
|
-
margin: `${e.spacing(1)} 0`,
|
|
17
|
-
backgroundColor: e.palette.background.paper,
|
|
18
|
-
display: "flex",
|
|
19
|
-
flexDirection: "column",
|
|
20
|
-
cursor: "move",
|
|
21
|
-
touchAction: "none"
|
|
22
|
-
})), h = n(c)(({ theme: e, isTargetPrompt: t }) => ({
|
|
23
|
-
width: "80%",
|
|
24
|
-
borderRadius: "4px",
|
|
25
|
-
...t && { backgroundColor: e.palette.error.light }
|
|
26
|
-
})), g = n("div")(() => ({
|
|
27
|
-
display: "flex",
|
|
28
|
-
justifyContent: "flex-end"
|
|
29
|
-
})), _ = n(d)(({ theme: e }) => ({ color: e.palette.error[400] })), v = n("div")(({ theme: e }) => ({
|
|
30
|
-
fontSize: e.typography.fontSize - 2,
|
|
31
|
-
color: e.palette.error.main,
|
|
32
|
-
marginLeft: e.spacing(5),
|
|
33
|
-
marginTop: e.spacing(1)
|
|
34
|
-
})), y = n(p)(({ theme: e }) => ({ fill: e.palette.error[500] })), b = n(f)({ color: `${a.tertiary()} !important` }), x = (e) => {
|
|
35
|
-
let { choice: t, index: n, onChoiceChange: a, onDelete: c, imageSupport: d, spellCheck: f, toolbarOpts: p, pluginProps: x, maxImageWidth: S, maxImageHeight: C, error: w, mathMlOptions: T = {} } = e, { label: E, editable: D, type: O } = t, k = `${O}-${t.id}`, A = `${O}-drop-${t.id}`, { attributes: j, listeners: M, setNodeRef: N, transform: P, isDragging: F } = r({
|
|
36
|
-
id: k,
|
|
37
|
-
data: {
|
|
38
|
-
id: t.id,
|
|
39
|
-
index: n,
|
|
40
|
-
type: O
|
|
41
|
-
}
|
|
42
|
-
}), { setNodeRef: I } = i({
|
|
43
|
-
id: A,
|
|
44
|
-
data: {
|
|
45
|
-
id: t.id,
|
|
46
|
-
index: n,
|
|
47
|
-
type: O
|
|
48
|
-
}
|
|
49
|
-
}), L = (e) => {
|
|
50
|
-
t.label = e, a(t);
|
|
51
|
-
}, R = {
|
|
52
|
-
transform: P ? `translate3d(${P.x}px, ${P.y}px, 0)` : void 0,
|
|
53
|
-
opacity: F ? .5 : 1,
|
|
54
|
-
width: "100%"
|
|
55
|
-
}, z = (l || []).filter((e) => e !== "bulleted-list" && e !== "numbered-list"), B = (e) => e.closest("[contenteditable]") || e.closest("input") || e.closest("textarea") || e.isContentEditable;
|
|
56
|
-
return /* @__PURE__ */ o("div", {
|
|
57
|
-
ref: I,
|
|
58
|
-
children: /* @__PURE__ */ o("div", {
|
|
59
|
-
ref: N,
|
|
60
|
-
...M,
|
|
61
|
-
onKeyDown: (e) => {
|
|
62
|
-
B(e.target) || M?.onKeyDown?.(e);
|
|
63
|
-
},
|
|
64
|
-
onPointerDown: (e) => {
|
|
65
|
-
B(e.target) || M?.onPointerDown?.(e);
|
|
66
|
-
},
|
|
67
|
-
...j,
|
|
68
|
-
children: /* @__PURE__ */ s(m, {
|
|
69
|
-
style: R,
|
|
70
|
-
children: [/* @__PURE__ */ s("div", {
|
|
71
|
-
style: {
|
|
72
|
-
width: "100%",
|
|
73
|
-
display: "flex"
|
|
74
|
-
},
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(_, {}) }),
|
|
77
|
-
/* @__PURE__ */ o(h, {
|
|
78
|
-
disabled: !D,
|
|
79
|
-
placeholder: O !== "target" && !E.includes("data-latex") ? "Enter a choice" : "",
|
|
80
|
-
markup: E,
|
|
81
|
-
imageSupport: d || void 0,
|
|
82
|
-
onChange: L,
|
|
83
|
-
pluginProps: x,
|
|
84
|
-
toolbarOpts: p,
|
|
85
|
-
activePlugins: z,
|
|
86
|
-
spellCheck: f,
|
|
87
|
-
autoWidthToolbar: !0,
|
|
88
|
-
maxImageWidth: S,
|
|
89
|
-
maxImageHeight: C,
|
|
90
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
91
|
-
error: D && w,
|
|
92
|
-
mathMlOptions: T
|
|
93
|
-
}),
|
|
94
|
-
D && /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(b, {
|
|
95
|
-
onClick: c,
|
|
96
|
-
size: "large",
|
|
97
|
-
children: /* @__PURE__ */ o(y, {})
|
|
98
|
-
}) })
|
|
99
|
-
]
|
|
100
|
-
}), D && w && /* @__PURE__ */ o(v, { children: w })]
|
|
101
|
-
})
|
|
102
|
-
})
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
x.propTypes = {
|
|
106
|
-
id: t.any,
|
|
107
|
-
maxImageHeight: t.object,
|
|
108
|
-
maxImageWidth: t.object,
|
|
109
|
-
label: t.string,
|
|
110
|
-
isOver: t.bool,
|
|
111
|
-
type: t.string,
|
|
112
|
-
empty: t.bool,
|
|
113
|
-
disabled: t.bool,
|
|
114
|
-
outcome: t.object,
|
|
115
|
-
index: t.number,
|
|
116
|
-
imageSupport: t.shape({
|
|
117
|
-
add: t.func.isRequired,
|
|
118
|
-
delete: t.func.isRequired
|
|
119
|
-
}),
|
|
120
|
-
choice: t.object,
|
|
121
|
-
choices: t.array.isRequired,
|
|
122
|
-
onChoiceChange: t.func.isRequired,
|
|
123
|
-
onDelete: t.func.isRequired,
|
|
124
|
-
toolbarOpts: t.object,
|
|
125
|
-
pluginProps: t.object,
|
|
126
|
-
choicesLabel: t.string,
|
|
127
|
-
error: t.string,
|
|
128
|
-
spellCheck: t.bool,
|
|
129
|
-
mathMlOptions: t.object
|
|
130
|
-
};
|
|
131
|
-
//#endregion
|
|
132
|
-
export { x as default };
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/placement-ordering/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 configuration
|
|
12
|
-
*/
|
|
13
|
-
declare const _default: {
|
|
14
|
-
model: {
|
|
15
|
-
choiceLabel: string;
|
|
16
|
-
choiceLabelEnabled: boolean;
|
|
17
|
-
choices: never[];
|
|
18
|
-
correctResponse: never[];
|
|
19
|
-
feedbackEnabled: boolean;
|
|
20
|
-
numberedGuides: boolean;
|
|
21
|
-
orientation: string;
|
|
22
|
-
partialScoring: boolean;
|
|
23
|
-
placementArea: boolean;
|
|
24
|
-
prompt: string;
|
|
25
|
-
promptEnabled: boolean;
|
|
26
|
-
rationale: string;
|
|
27
|
-
rationaleEnabled: boolean;
|
|
28
|
-
removeTilesAfterPlacing: boolean;
|
|
29
|
-
scoringType: string;
|
|
30
|
-
studentInstructionsEnabled: boolean;
|
|
31
|
-
targetLabel: string;
|
|
32
|
-
teacherInstructions: string;
|
|
33
|
-
teacherInstructionsEnabled: boolean;
|
|
34
|
-
toolbarEditorPosition: string;
|
|
35
|
-
};
|
|
36
|
-
configuration: {
|
|
37
|
-
baseInputConfiguration: {
|
|
38
|
-
h3: {
|
|
39
|
-
disabled: boolean;
|
|
40
|
-
};
|
|
41
|
-
audio: {
|
|
42
|
-
disabled: boolean;
|
|
43
|
-
};
|
|
44
|
-
video: {
|
|
45
|
-
disabled: boolean;
|
|
46
|
-
};
|
|
47
|
-
image: {
|
|
48
|
-
disabled: boolean;
|
|
49
|
-
};
|
|
50
|
-
textAlign: {
|
|
51
|
-
disabled: boolean;
|
|
52
|
-
};
|
|
53
|
-
showParagraphs: {
|
|
54
|
-
disabled: boolean;
|
|
55
|
-
};
|
|
56
|
-
separateParagraphs: {
|
|
57
|
-
disabled: boolean;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
choiceLabel: {
|
|
61
|
-
settings: boolean;
|
|
62
|
-
label: string;
|
|
63
|
-
inputConfiguration: {
|
|
64
|
-
audio: {
|
|
65
|
-
disabled: boolean;
|
|
66
|
-
};
|
|
67
|
-
video: {
|
|
68
|
-
disabled: boolean;
|
|
69
|
-
};
|
|
70
|
-
image: {
|
|
71
|
-
disabled: boolean;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
choices: {
|
|
76
|
-
settings: boolean;
|
|
77
|
-
label: string;
|
|
78
|
-
inputConfiguration: {
|
|
79
|
-
audio: {
|
|
80
|
-
disabled: boolean;
|
|
81
|
-
};
|
|
82
|
-
video: {
|
|
83
|
-
disabled: boolean;
|
|
84
|
-
};
|
|
85
|
-
image: {
|
|
86
|
-
disabled: boolean;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
feedback: {
|
|
91
|
-
settings: boolean;
|
|
92
|
-
label: string;
|
|
93
|
-
enabled: boolean;
|
|
94
|
-
};
|
|
95
|
-
prompt: {
|
|
96
|
-
settings: boolean;
|
|
97
|
-
label: string;
|
|
98
|
-
required: boolean;
|
|
99
|
-
inputConfiguration: {
|
|
100
|
-
audio: {
|
|
101
|
-
disabled: boolean;
|
|
102
|
-
};
|
|
103
|
-
video: {
|
|
104
|
-
disabled: boolean;
|
|
105
|
-
};
|
|
106
|
-
image: {
|
|
107
|
-
disabled: boolean;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
numberedGuides: {
|
|
112
|
-
settings: boolean;
|
|
113
|
-
label: string;
|
|
114
|
-
};
|
|
115
|
-
orientation: {
|
|
116
|
-
settings: boolean;
|
|
117
|
-
label: string;
|
|
118
|
-
};
|
|
119
|
-
partialScoring: {
|
|
120
|
-
settings: boolean;
|
|
121
|
-
label: string;
|
|
122
|
-
};
|
|
123
|
-
placementArea: {
|
|
124
|
-
settings: boolean;
|
|
125
|
-
label: string;
|
|
126
|
-
};
|
|
127
|
-
rationale: {
|
|
128
|
-
settings: boolean;
|
|
129
|
-
label: string;
|
|
130
|
-
required: boolean;
|
|
131
|
-
inputConfiguration: {
|
|
132
|
-
audio: {
|
|
133
|
-
disabled: boolean;
|
|
134
|
-
};
|
|
135
|
-
video: {
|
|
136
|
-
disabled: boolean;
|
|
137
|
-
};
|
|
138
|
-
image: {
|
|
139
|
-
disabled: boolean;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
removeTilesAfterPlacing: {
|
|
144
|
-
settings: boolean;
|
|
145
|
-
label: string;
|
|
146
|
-
};
|
|
147
|
-
settingsPanelDisabled: boolean;
|
|
148
|
-
scoringType: {
|
|
149
|
-
settings: boolean;
|
|
150
|
-
label: string;
|
|
151
|
-
};
|
|
152
|
-
studentInstructions: {
|
|
153
|
-
settings: boolean;
|
|
154
|
-
label: string;
|
|
155
|
-
};
|
|
156
|
-
targetLabel: {
|
|
157
|
-
settings: boolean;
|
|
158
|
-
label: string;
|
|
159
|
-
};
|
|
160
|
-
spellCheck: {
|
|
161
|
-
label: string;
|
|
162
|
-
settings: boolean;
|
|
163
|
-
enabled: boolean;
|
|
164
|
-
};
|
|
165
|
-
teacherInstructions: {
|
|
166
|
-
settings: boolean;
|
|
167
|
-
label: string;
|
|
168
|
-
required: boolean;
|
|
169
|
-
inputConfiguration: {
|
|
170
|
-
audio: {
|
|
171
|
-
disabled: boolean;
|
|
172
|
-
};
|
|
173
|
-
video: {
|
|
174
|
-
disabled: boolean;
|
|
175
|
-
};
|
|
176
|
-
image: {
|
|
177
|
-
disabled: boolean;
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
maxImageWidth: {
|
|
182
|
-
teacherInstructions: number;
|
|
183
|
-
prompt: number;
|
|
184
|
-
rationale: number;
|
|
185
|
-
choicesWithPlacementArea: number;
|
|
186
|
-
choicesWithoutPlacementArea: number;
|
|
187
|
-
};
|
|
188
|
-
maxImageHeight: {
|
|
189
|
-
teacherInstructions: number;
|
|
190
|
-
prompt: number;
|
|
191
|
-
rationale: number;
|
|
192
|
-
choices: number;
|
|
193
|
-
};
|
|
194
|
-
withRubric: {
|
|
195
|
-
settings: boolean;
|
|
196
|
-
label: string;
|
|
197
|
-
};
|
|
198
|
-
mathMlOptions: {
|
|
199
|
-
mmlOutput: boolean;
|
|
200
|
-
mmlEditing: boolean;
|
|
201
|
-
};
|
|
202
|
-
language: {
|
|
203
|
-
settings: boolean;
|
|
204
|
-
label: string;
|
|
205
|
-
enabled: boolean;
|
|
206
|
-
};
|
|
207
|
-
languageChoices: {
|
|
208
|
-
label: string;
|
|
209
|
-
options: never[];
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
export default _default;
|