@pie-element/charting 13.0.4-next.20261010144103 → 13.0.4-next.20261011221311
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/dist/author/charting-config.d.ts +19 -4
- package/dist/author/configure.d.ts +39 -16
- package/dist/author/configure.js +76 -87
- package/dist/author/correct-response.d.ts +18 -1
- package/dist/author/defaults.d.ts +60 -58
- package/dist/author/index.d.ts +15 -38
- package/dist/author/index.js +12 -4
- package/dist/browser/author/index.js +27 -32
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{chart-C4BMr69M.js → chart-iA2IzHQS.js} +6 -6
- package/dist/browser/{chart-C4BMr69M.js.map → chart-iA2IzHQS.js.map} +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +45 -45
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +27 -32
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/{chart-CRV6NJJk.js → chart-BXcMGVUe.js} +6 -6
- package/dist/browser/editor-runtime/{chart-CRV6NJJk.js.map → chart-BXcMGVUe.js.map} +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +45 -45
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +14 -13
- package/dist/controller/index.d.ts +113 -11
- package/dist/delivery/main.js +16 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.js +2 -2
- package/dist/schemas/configuration.schema.json +571 -0
- package/dist/schemas/model.schema.json +594 -0
- package/dist/schemas/session.schema.json +86 -0
- package/dist/types.d.ts +333 -0
- package/package.json +13 -9
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
import type { ConfigureMathMLProp, ConfigureProp } from '@pie-element/shared-types';
|
|
4
|
+
import type { AuthorModel, ChartDefinition } from './configure.js';
|
|
5
|
+
import type { ChartingAuthorNewCategoryDefaults, ChartingLabelsPlaceholders, ChartingOptions } from '../types.js';
|
|
6
|
+
type ChartingConfigProps = {
|
|
7
|
+
model: AuthorModel;
|
|
8
|
+
onChange: (model: AuthorModel) => void;
|
|
9
|
+
charts?: ChartDefinition[];
|
|
10
|
+
labelsPlaceholders?: ChartingLabelsPlaceholders;
|
|
11
|
+
titlePlaceholder?: ConfigureProp;
|
|
12
|
+
showPixelGuides?: boolean;
|
|
13
|
+
authorNewCategoryDefaults?: ChartingAuthorNewCategoryDefaults;
|
|
14
|
+
chartingOptions?: ChartingOptions;
|
|
15
|
+
mathMlOptions?: ConfigureMathMLProp;
|
|
16
|
+
labelsCharactersLimit?: number;
|
|
17
|
+
};
|
|
18
|
+
export declare class ChartingConfig extends React.Component<ChartingConfigProps> {
|
|
4
19
|
static propTypes: {
|
|
5
20
|
model: PropTypes.Validator<object>;
|
|
6
21
|
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
@@ -13,10 +28,10 @@ export declare class ChartingConfig extends React.Component {
|
|
|
13
28
|
};
|
|
14
29
|
constructor(props: any);
|
|
15
30
|
handleAlertDialog: (open: any, callback: any) => void;
|
|
16
|
-
changeData: (data: any) =>
|
|
31
|
+
changeData: (data: any) => void;
|
|
17
32
|
changeAddRemoveEnabled: any;
|
|
18
|
-
changeTitle: (title: any) =>
|
|
19
|
-
changeLabel: (type: any, label: any) =>
|
|
33
|
+
changeTitle: (title: any) => void;
|
|
34
|
+
changeLabel: (type: any, label: any) => void;
|
|
20
35
|
render(): React.JSX.Element;
|
|
21
36
|
}
|
|
22
37
|
export default ChartingConfig;
|
|
@@ -1,21 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { chartTypes } from '@pie-lib/charting';
|
|
3
|
+
import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
|
|
4
|
+
import type { ChartingValidationErrors } from '../controller/index.js';
|
|
5
|
+
import type { ChartingConfiguration, ChartingGraph, ChartingModel } from '../types.js';
|
|
6
|
+
/** A chart type the author offers: its id, label and the component that draws it */
|
|
7
|
+
export type ChartDefinition = ReturnType<(typeof chartTypes)['Bar']>;
|
|
8
|
+
/** The model the author edits; `createDefaultModel()` fills it from the defaults, and the host sets `errors` from the controller's `validate()`. */
|
|
9
|
+
export type AuthorModel = Partial<ChartingModel> & {
|
|
10
|
+
graph: ChartingGraph;
|
|
11
|
+
errors?: ChartingValidationErrors;
|
|
12
|
+
};
|
|
13
|
+
type MediaSupport<Handler> = {
|
|
14
|
+
add: (handler: Handler) => void;
|
|
15
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
16
|
+
};
|
|
17
|
+
export type ConfigureProps = {
|
|
18
|
+
model: AuthorModel;
|
|
19
|
+
configuration: ChartingConfiguration;
|
|
20
|
+
onModelChanged: (model: AuthorModel) => void;
|
|
21
|
+
onConfigurationChanged: (configuration: ChartingConfiguration) => void;
|
|
22
|
+
imageSupport: MediaSupport<ImageHandler>;
|
|
23
|
+
uploadSoundSupport: MediaSupport<SoundHandler>;
|
|
24
|
+
};
|
|
25
|
+
type State = {
|
|
26
|
+
/** Steps the range can take at the chart's height */
|
|
27
|
+
gridValues: {
|
|
28
|
+
range: number[];
|
|
12
29
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
/** Label steps the range's step allows */
|
|
31
|
+
labelValues: {
|
|
32
|
+
range: number[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare class Configure extends React.Component<ConfigureProps, State> {
|
|
36
|
+
constructor(props: ConfigureProps);
|
|
37
|
+
onRationaleChange: (rationale: string) => void;
|
|
38
|
+
onPromptChange: (prompt: string) => void;
|
|
39
|
+
onTeacherInstructionsChange: (teacherInstructions: string) => void;
|
|
40
|
+
onChartTypeChange: (chartType: ChartingModel["chartType"]) => void;
|
|
41
|
+
onConfigChange: (config: Partial<AuthorModel>) => void;
|
|
19
42
|
render(): React.JSX.Element;
|
|
20
43
|
}
|
|
21
44
|
export default Configure;
|
package/dist/author/configure.js
CHANGED
|
@@ -2,40 +2,30 @@ import { ChartingConfig as e } from "./charting-config.js";
|
|
|
2
2
|
import { CorrectResponse as t } from "./correct-response.js";
|
|
3
3
|
import { applyConstraints as n, getGridValues as r, getLabelValues as i } from "./utils.js";
|
|
4
4
|
import a from "react";
|
|
5
|
-
import o from "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import f from "
|
|
10
|
-
import { InputContainer as p, layout as ee, settings as m } from "@pie-lib/config-ui";
|
|
5
|
+
import { styled as o } from "@mui/material/styles";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { ConfigureChartPanel as l, chartTypes as u } from "@pie-lib/charting";
|
|
8
|
+
import d from "debug";
|
|
9
|
+
import { InputContainer as f, layout as p, settings as m } from "@pie-lib/config-ui";
|
|
11
10
|
import h from "@mui/material/Typography";
|
|
12
11
|
import g from "@pie-lib/editable-html-tip-tap";
|
|
13
12
|
//#region src/author/configure.tsx
|
|
14
|
-
var _ =
|
|
13
|
+
var _ = d("@pie-element:graphing:configure"), { Panel: ee, toggle: v, radio: te, dropdown: ne, textField: re } = m, y = o(f)(({ theme: e }) => ({
|
|
15
14
|
width: "100%",
|
|
16
15
|
paddingTop: e.spacing(2),
|
|
17
16
|
marginBottom: e.spacing(2)
|
|
18
|
-
})), b =
|
|
17
|
+
})), b = o(h)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), x = o("div")(({ theme: e }) => ({
|
|
19
18
|
fontSize: e.typography.fontSize - 2,
|
|
20
19
|
color: e.palette.error.main,
|
|
21
20
|
paddingTop: e.spacing(1)
|
|
22
21
|
})), S = [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
u.Bar(),
|
|
23
|
+
u.Histogram(),
|
|
24
|
+
u.LineDot(),
|
|
25
|
+
u.LineCross(),
|
|
26
|
+
u.DotPlot(),
|
|
27
|
+
u.LinePlot()
|
|
29
28
|
], C = class extends a.Component {
|
|
30
|
-
static propTypes = {
|
|
31
|
-
onModelChanged: o.func,
|
|
32
|
-
onConfigurationChanged: o.func,
|
|
33
|
-
imageSupport: o.object,
|
|
34
|
-
uploadSoundSupport: o.object,
|
|
35
|
-
model: o.object.isRequired,
|
|
36
|
-
configuration: o.object.isRequired,
|
|
37
|
-
chartingOptions: o.object
|
|
38
|
-
};
|
|
39
29
|
constructor(e) {
|
|
40
30
|
super(e);
|
|
41
31
|
let { range: t = {}, graph: n } = e.model || {}, a = { range: r(t, n.height, !0) }, o = { range: i(t.step || 1) };
|
|
@@ -64,39 +54,39 @@ var _ = f("@pie-element:graphing:configure"), { Panel: te, toggle: v, radio: ne,
|
|
|
64
54
|
let { model: t, onModelChanged: r } = this.props, { gridValues: i, labelValues: a } = this.state, o = {
|
|
65
55
|
...t,
|
|
66
56
|
...e
|
|
67
|
-
}, { graph: s, range: c } = o, l =
|
|
68
|
-
|
|
69
|
-
gridValues:
|
|
70
|
-
labelValues:
|
|
57
|
+
}, { graph: s, range: c } = o, l = n(c, s.height, i.range, a.range), u = { range: l.gridValues }, d = { range: l.labelValues };
|
|
58
|
+
this.setState({
|
|
59
|
+
gridValues: u,
|
|
60
|
+
labelValues: d
|
|
71
61
|
}), r(o);
|
|
72
62
|
};
|
|
73
63
|
render() {
|
|
74
|
-
let { configuration: n, imageSupport: r, model: i, onConfigurationChanged: a, onModelChanged: o, uploadSoundSupport:
|
|
64
|
+
let { configuration: n, imageSupport: r, model: i, onConfigurationChanged: a, onModelChanged: o, uploadSoundSupport: u } = this.props;
|
|
75
65
|
_("[render] model", i);
|
|
76
|
-
let { graph: d } = i, { baseInputConfiguration: f = {}, contentDimensions:
|
|
77
|
-
changeInteractiveEnabled:
|
|
78
|
-
changeEditableEnabled:
|
|
79
|
-
changeAddCategoryEnabled:
|
|
66
|
+
let { graph: d } = i, { baseInputConfiguration: f = {}, contentDimensions: m = {}, chartDimensions: h = {}, authorNewCategoryDefaults: C = {}, labelsPlaceholders: w = {}, instruction: T = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, prompt: O = {}, rationale: k = {}, scoringType: A = {}, settingsPanelDisabled: j, spellCheck: M = {}, studentInstructions: N = {}, teacherInstructions: P = {}, titlePlaceholder: ie = {}, withRubric: F = {}, chartingOptions: I = {}, availableChartTypes: ae = {}, mathMlOptions: L = {}, chartTypeLabel: oe, language: R = {}, languageChoices: z = {}, labelsCharactersLimit: B } = n || {}, { errors: V, extraCSSRules: H, promptEnabled: U, rationaleEnabled: W, spellCheckEnabled: G, teacherInstructionsEnabled: K, studentNewCategoryDefaultLabel: q } = i || {}, { categoryErrors: se, correctAnswerErrors: ce, prompt: J, rationale: Y, teacherInstructions: X } = V || {}, { gridValues: le, labelValues: ue } = this.state, de = h.showInConfigPanel || !0, Z = E && E.prompt, Q = D && D.prompt, fe = {
|
|
67
|
+
changeInteractiveEnabled: I.changeInteractive?.settings && v(I.changeInteractive.settingsLabel),
|
|
68
|
+
changeEditableEnabled: I.changeEditable?.settings && v(I.changeEditable.settingsLabel),
|
|
69
|
+
changeAddCategoryEnabled: I.addCategory?.settings && v(I.addCategory.settingsLabel)
|
|
80
70
|
}, pe = {
|
|
81
|
-
teacherInstructionsEnabled:
|
|
82
|
-
studentInstructionsEnabled:
|
|
83
|
-
rationaleEnabled:
|
|
84
|
-
spellCheckEnabled:
|
|
85
|
-
promptEnabled:
|
|
86
|
-
scoringType:
|
|
87
|
-
rubricEnabled:
|
|
88
|
-
"language.enabled":
|
|
89
|
-
language:
|
|
90
|
-
instruction:
|
|
71
|
+
teacherInstructionsEnabled: P.settings && v(P.label),
|
|
72
|
+
studentInstructionsEnabled: N.settings && v(N.label),
|
|
73
|
+
rationaleEnabled: k.settings && v(k.label),
|
|
74
|
+
spellCheckEnabled: M.settings && v(M.label),
|
|
75
|
+
promptEnabled: O.settings && v(O.label),
|
|
76
|
+
scoringType: A.settings && te(A.label, ["all or nothing", "partial scoring"]),
|
|
77
|
+
rubricEnabled: F?.settings && v(F?.label),
|
|
78
|
+
"language.enabled": R.settings && v(R.label, !0),
|
|
79
|
+
language: R.settings && R.enabled && ne(z.label, z.options),
|
|
80
|
+
instruction: T.settings && re(T.label)
|
|
91
81
|
}, $ = (e = {}) => ({
|
|
92
82
|
...f,
|
|
93
83
|
...e
|
|
94
84
|
});
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
extraCSSRules:
|
|
97
|
-
dimensions:
|
|
98
|
-
hideSettings:
|
|
99
|
-
settings: /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ c(p.ConfigLayout, {
|
|
86
|
+
extraCSSRules: H,
|
|
87
|
+
dimensions: m,
|
|
88
|
+
hideSettings: j,
|
|
89
|
+
settings: /* @__PURE__ */ s(ee, {
|
|
100
90
|
model: i,
|
|
101
91
|
configuration: n,
|
|
102
92
|
onChangeModel: o,
|
|
@@ -107,70 +97,69 @@ var _ = f("@pie-element:graphing:configure"), { Panel: te, toggle: v, radio: ne,
|
|
|
107
97
|
}
|
|
108
98
|
}),
|
|
109
99
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ s(b, {
|
|
111
101
|
component: "div",
|
|
112
102
|
type: "body1",
|
|
113
|
-
children:
|
|
103
|
+
children: T?.label || ""
|
|
114
104
|
}),
|
|
115
|
-
|
|
116
|
-
label:
|
|
117
|
-
children: [/* @__PURE__ */
|
|
105
|
+
K && /* @__PURE__ */ c(y, {
|
|
106
|
+
label: P.label,
|
|
107
|
+
children: [/* @__PURE__ */ s(g, {
|
|
118
108
|
markup: i.teacherInstructions || "",
|
|
119
109
|
onChange: this.onTeacherInstructionsChange,
|
|
120
110
|
imageSupport: r,
|
|
121
111
|
nonEmpty: !1,
|
|
122
112
|
error: X,
|
|
123
|
-
spellCheck:
|
|
124
|
-
pluginProps: $(
|
|
125
|
-
maxImageWidth:
|
|
126
|
-
maxImageHeight:
|
|
127
|
-
uploadSoundSupport:
|
|
113
|
+
spellCheck: G,
|
|
114
|
+
pluginProps: $(P?.inputConfiguration),
|
|
115
|
+
maxImageWidth: E && E.teacherInstructions || Z,
|
|
116
|
+
maxImageHeight: D && D.teacherInstructions || Q,
|
|
117
|
+
uploadSoundSupport: u,
|
|
128
118
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
129
119
|
mathMlOptions: L
|
|
130
|
-
}), X && /* @__PURE__ */
|
|
120
|
+
}), X && /* @__PURE__ */ s(x, { children: X })]
|
|
131
121
|
}),
|
|
132
|
-
|
|
133
|
-
label:
|
|
134
|
-
children: [/* @__PURE__ */
|
|
122
|
+
U && /* @__PURE__ */ c(y, {
|
|
123
|
+
label: O.label,
|
|
124
|
+
children: [/* @__PURE__ */ s(g, {
|
|
135
125
|
markup: i.prompt,
|
|
136
126
|
onChange: this.onPromptChange,
|
|
137
127
|
imageSupport: r,
|
|
138
128
|
nonEmpty: !1,
|
|
139
129
|
error: J,
|
|
140
|
-
spellCheck:
|
|
130
|
+
spellCheck: G,
|
|
141
131
|
disableUnderline: !0,
|
|
142
|
-
pluginProps: $(
|
|
132
|
+
pluginProps: $(O?.inputConfiguration),
|
|
143
133
|
maxImageWidth: Z,
|
|
144
134
|
maxImageHeight: Q,
|
|
145
|
-
uploadSoundSupport:
|
|
135
|
+
uploadSoundSupport: u,
|
|
146
136
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
147
137
|
mathMlOptions: L
|
|
148
|
-
}), J && /* @__PURE__ */
|
|
138
|
+
}), J && /* @__PURE__ */ s(x, { children: J })]
|
|
149
139
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ s(l, {
|
|
151
141
|
model: i,
|
|
152
142
|
onChange: this.onConfigChange,
|
|
153
143
|
gridValues: le,
|
|
154
144
|
labelValues: ue,
|
|
155
|
-
chartDimensions:
|
|
156
|
-
charts: S,
|
|
145
|
+
chartDimensions: h,
|
|
157
146
|
studentNewCategoryDefaultLabel: q,
|
|
158
|
-
availableChartTypes:
|
|
159
|
-
chartTypeLabel:
|
|
147
|
+
availableChartTypes: ae,
|
|
148
|
+
chartTypeLabel: oe
|
|
160
149
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ s(e, {
|
|
162
151
|
model: i,
|
|
163
152
|
onChange: o,
|
|
164
153
|
charts: S,
|
|
165
|
-
labelsPlaceholders:
|
|
166
|
-
titlePlaceholder:
|
|
154
|
+
labelsPlaceholders: w,
|
|
155
|
+
titlePlaceholder: ie,
|
|
167
156
|
showPixelGuides: de,
|
|
168
|
-
authorNewCategoryDefaults:
|
|
169
|
-
chartingOptions:
|
|
157
|
+
authorNewCategoryDefaults: C,
|
|
158
|
+
chartingOptions: I,
|
|
170
159
|
mathMlOptions: L,
|
|
171
|
-
labelsCharactersLimit:
|
|
160
|
+
labelsCharactersLimit: B
|
|
172
161
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ s(t, {
|
|
174
163
|
config: d,
|
|
175
164
|
model: i,
|
|
176
165
|
onChange: o,
|
|
@@ -179,23 +168,23 @@ var _ = f("@pie-element:graphing:configure"), { Panel: te, toggle: v, radio: ne,
|
|
|
179
168
|
correctAnswerErrors: ce,
|
|
180
169
|
studentNewCategoryDefaultLabel: q,
|
|
181
170
|
mathMlOptions: L,
|
|
182
|
-
labelsPlaceholders:
|
|
171
|
+
labelsPlaceholders: w
|
|
183
172
|
}),
|
|
184
|
-
|
|
185
|
-
label:
|
|
186
|
-
children: [/* @__PURE__ */
|
|
173
|
+
W && /* @__PURE__ */ c(y, {
|
|
174
|
+
label: k.label || "Rationale",
|
|
175
|
+
children: [/* @__PURE__ */ s(g, {
|
|
187
176
|
markup: i.rationale || "",
|
|
188
177
|
onChange: this.onRationaleChange,
|
|
189
178
|
imageSupport: r,
|
|
190
179
|
error: Y,
|
|
191
|
-
spellCheck:
|
|
192
|
-
pluginProps: $(
|
|
193
|
-
maxImageWidth:
|
|
194
|
-
maxImageHeight:
|
|
195
|
-
uploadSoundSupport:
|
|
180
|
+
spellCheck: G,
|
|
181
|
+
pluginProps: $(k?.inputConfiguration),
|
|
182
|
+
maxImageWidth: E && E.rationale || Z,
|
|
183
|
+
maxImageHeight: D && D.rationale || Q,
|
|
184
|
+
uploadSoundSupport: u,
|
|
196
185
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
197
186
|
mathMlOptions: L
|
|
198
|
-
}), Y && /* @__PURE__ */
|
|
187
|
+
}), Y && /* @__PURE__ */ s(x, { children: Y })]
|
|
199
188
|
})
|
|
200
189
|
]
|
|
201
190
|
});
|
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import type { ConfigureMathMLProp } from '@pie-element/shared-types';
|
|
4
|
+
import type { AuthorModel, ChartDefinition } from './configure.js';
|
|
5
|
+
import type { ChartingValidationErrors } from '../controller/index.js';
|
|
6
|
+
import type { ChartingGraph, ChartingLabelsPlaceholders } from '../types.js';
|
|
7
|
+
type CorrectResponseProps = {
|
|
8
|
+
model: AuthorModel;
|
|
9
|
+
onChange: (model: AuthorModel) => void;
|
|
10
|
+
charts?: ChartDefinition[];
|
|
11
|
+
/** Category errors of the correct answer, keyed by category position; the chart shows each under its category */
|
|
12
|
+
error?: ChartingValidationErrors['categoryErrors'];
|
|
13
|
+
correctAnswerErrors?: ChartingValidationErrors['correctAnswerErrors'];
|
|
14
|
+
studentNewCategoryDefaultLabel?: string;
|
|
15
|
+
mathMlOptions?: ConfigureMathMLProp;
|
|
16
|
+
labelsPlaceholders?: ChartingLabelsPlaceholders;
|
|
17
|
+
/** Not read */
|
|
18
|
+
config?: ChartingGraph;
|
|
19
|
+
};
|
|
3
20
|
export declare const getUpdatedCategories: (nextProps: any, prevProps: any, prevState: any) => any;
|
|
4
|
-
export declare class CorrectResponse extends React.Component {
|
|
21
|
+
export declare class CorrectResponse extends React.Component<CorrectResponseProps> {
|
|
5
22
|
static propTypes: {
|
|
6
23
|
correctAnswerErrors: PropTypes.Requireable<object>;
|
|
7
24
|
studentNewCategoryDefaultLabel: PropTypes.Requireable<string>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ConfigureLanguageOptionsProp } from '@pie-element/shared-types';
|
|
2
|
+
import type { ChartingCategory, ChartingCorrectAnswer, ChartingDomain } from '../types.js';
|
|
1
3
|
/**
|
|
2
4
|
* NOTE: There's no functionality described for graphTitle,
|
|
3
5
|
* rationale, scoringType, studentInstructions, teacherInstructions
|
|
@@ -5,20 +7,20 @@
|
|
|
5
7
|
*/
|
|
6
8
|
declare const _default: {
|
|
7
9
|
model: {
|
|
8
|
-
addCategoryEnabled:
|
|
9
|
-
changeAddCategoryEnabled:
|
|
10
|
-
changeEditableEnabled:
|
|
11
|
-
changeInteractiveEnabled:
|
|
12
|
-
chartType:
|
|
13
|
-
correctAnswer:
|
|
14
|
-
data:
|
|
15
|
-
domain:
|
|
10
|
+
addCategoryEnabled: true;
|
|
11
|
+
changeAddCategoryEnabled: false;
|
|
12
|
+
changeEditableEnabled: false;
|
|
13
|
+
changeInteractiveEnabled: false;
|
|
14
|
+
chartType: "lineCross";
|
|
15
|
+
correctAnswer: ChartingCorrectAnswer;
|
|
16
|
+
data: ChartingCategory[];
|
|
17
|
+
domain: ChartingDomain;
|
|
16
18
|
graph: {
|
|
17
19
|
width: number;
|
|
18
20
|
height: number;
|
|
19
21
|
};
|
|
20
22
|
prompt: string;
|
|
21
|
-
promptEnabled:
|
|
23
|
+
promptEnabled: true;
|
|
22
24
|
range: {
|
|
23
25
|
label: string;
|
|
24
26
|
max: number;
|
|
@@ -26,47 +28,47 @@ declare const _default: {
|
|
|
26
28
|
labelStep: number;
|
|
27
29
|
};
|
|
28
30
|
rationale: string;
|
|
29
|
-
rationaleEnabled:
|
|
30
|
-
scoringType:
|
|
31
|
-
studentInstructionsEnabled:
|
|
31
|
+
rationaleEnabled: true;
|
|
32
|
+
scoringType: "all or nothing";
|
|
33
|
+
studentInstructionsEnabled: true;
|
|
32
34
|
studentNewCategoryDefaultLabel: string;
|
|
33
35
|
teacherInstructions: string;
|
|
34
|
-
teacherInstructionsEnabled:
|
|
36
|
+
teacherInstructionsEnabled: true;
|
|
35
37
|
title: string;
|
|
36
38
|
};
|
|
37
39
|
configuration: {
|
|
38
40
|
baseInputConfiguration: {
|
|
39
41
|
h3: {
|
|
40
|
-
disabled:
|
|
42
|
+
disabled: true;
|
|
41
43
|
};
|
|
42
44
|
audio: {
|
|
43
|
-
disabled:
|
|
45
|
+
disabled: false;
|
|
44
46
|
};
|
|
45
47
|
video: {
|
|
46
|
-
disabled:
|
|
48
|
+
disabled: false;
|
|
47
49
|
};
|
|
48
50
|
image: {
|
|
49
|
-
disabled:
|
|
51
|
+
disabled: false;
|
|
50
52
|
};
|
|
51
53
|
textAlign: {
|
|
52
|
-
disabled:
|
|
54
|
+
disabled: true;
|
|
53
55
|
};
|
|
54
56
|
showParagraphs: {
|
|
55
|
-
disabled:
|
|
57
|
+
disabled: false;
|
|
56
58
|
};
|
|
57
59
|
separateParagraphs: {
|
|
58
|
-
disabled:
|
|
60
|
+
disabled: true;
|
|
59
61
|
};
|
|
60
62
|
};
|
|
61
63
|
spellCheck: {
|
|
62
64
|
label: string;
|
|
63
|
-
settings:
|
|
64
|
-
enabled:
|
|
65
|
+
settings: false;
|
|
66
|
+
enabled: true;
|
|
65
67
|
};
|
|
66
68
|
chartDimensions: {
|
|
67
|
-
settings:
|
|
69
|
+
settings: false;
|
|
68
70
|
label: string;
|
|
69
|
-
showInConfigPanel:
|
|
71
|
+
showInConfigPanel: true;
|
|
70
72
|
width: {
|
|
71
73
|
min: number;
|
|
72
74
|
max: number;
|
|
@@ -79,10 +81,10 @@ declare const _default: {
|
|
|
79
81
|
};
|
|
80
82
|
};
|
|
81
83
|
authorNewCategoryDefaults: {
|
|
82
|
-
settings:
|
|
84
|
+
settings: false;
|
|
83
85
|
label: string;
|
|
84
|
-
interactive:
|
|
85
|
-
editable:
|
|
86
|
+
interactive: true;
|
|
87
|
+
editable: false;
|
|
86
88
|
};
|
|
87
89
|
availableChartTypes: {
|
|
88
90
|
bar: string;
|
|
@@ -94,76 +96,76 @@ declare const _default: {
|
|
|
94
96
|
};
|
|
95
97
|
chartTypeLabel: string;
|
|
96
98
|
studentNewCategoryDefaultLabel: {
|
|
97
|
-
settings:
|
|
99
|
+
settings: false;
|
|
98
100
|
label: string;
|
|
99
101
|
};
|
|
100
102
|
prompt: {
|
|
101
|
-
settings:
|
|
103
|
+
settings: true;
|
|
102
104
|
label: string;
|
|
103
|
-
required:
|
|
105
|
+
required: false;
|
|
104
106
|
inputConfiguration: {
|
|
105
107
|
audio: {
|
|
106
|
-
disabled:
|
|
108
|
+
disabled: false;
|
|
107
109
|
};
|
|
108
110
|
video: {
|
|
109
|
-
disabled:
|
|
111
|
+
disabled: false;
|
|
110
112
|
};
|
|
111
113
|
image: {
|
|
112
|
-
disabled:
|
|
114
|
+
disabled: false;
|
|
113
115
|
};
|
|
114
116
|
};
|
|
115
117
|
};
|
|
116
118
|
rationale: {
|
|
117
|
-
settings:
|
|
119
|
+
settings: true;
|
|
118
120
|
label: string;
|
|
119
|
-
required:
|
|
121
|
+
required: false;
|
|
120
122
|
inputConfiguration: {
|
|
121
123
|
audio: {
|
|
122
|
-
disabled:
|
|
124
|
+
disabled: false;
|
|
123
125
|
};
|
|
124
126
|
video: {
|
|
125
|
-
disabled:
|
|
127
|
+
disabled: false;
|
|
126
128
|
};
|
|
127
129
|
image: {
|
|
128
|
-
disabled:
|
|
130
|
+
disabled: false;
|
|
129
131
|
};
|
|
130
132
|
};
|
|
131
133
|
};
|
|
132
134
|
scoringType: {
|
|
133
|
-
settings:
|
|
135
|
+
settings: false;
|
|
134
136
|
label: string;
|
|
135
137
|
};
|
|
136
|
-
settingsPanelDisabled:
|
|
138
|
+
settingsPanelDisabled: false;
|
|
137
139
|
studentInstructions: {
|
|
138
|
-
settings:
|
|
140
|
+
settings: false;
|
|
139
141
|
label: string;
|
|
140
142
|
};
|
|
141
143
|
teacherInstructions: {
|
|
142
|
-
settings:
|
|
144
|
+
settings: true;
|
|
143
145
|
label: string;
|
|
144
|
-
required:
|
|
146
|
+
required: false;
|
|
145
147
|
inputConfiguration: {
|
|
146
148
|
audio: {
|
|
147
|
-
disabled:
|
|
149
|
+
disabled: false;
|
|
148
150
|
};
|
|
149
151
|
video: {
|
|
150
|
-
disabled:
|
|
152
|
+
disabled: false;
|
|
151
153
|
};
|
|
152
154
|
image: {
|
|
153
|
-
disabled:
|
|
155
|
+
disabled: false;
|
|
154
156
|
};
|
|
155
157
|
};
|
|
156
158
|
};
|
|
157
159
|
title: {
|
|
158
|
-
settings:
|
|
160
|
+
settings: false;
|
|
159
161
|
label: string;
|
|
160
162
|
};
|
|
161
163
|
instruction: {
|
|
162
|
-
settings:
|
|
164
|
+
settings: false;
|
|
163
165
|
label: string;
|
|
164
166
|
};
|
|
165
167
|
titlePlaceholder: {
|
|
166
|
-
settings:
|
|
168
|
+
settings: false;
|
|
167
169
|
label: string;
|
|
168
170
|
};
|
|
169
171
|
labelsPlaceholders: {
|
|
@@ -183,37 +185,37 @@ declare const _default: {
|
|
|
183
185
|
rationale: number;
|
|
184
186
|
};
|
|
185
187
|
withRubric: {
|
|
186
|
-
settings:
|
|
188
|
+
settings: false;
|
|
187
189
|
label: string;
|
|
188
190
|
};
|
|
189
191
|
language: {
|
|
190
|
-
settings:
|
|
192
|
+
settings: false;
|
|
191
193
|
label: string;
|
|
192
|
-
enabled:
|
|
194
|
+
enabled: false;
|
|
193
195
|
};
|
|
194
196
|
languageChoices: {
|
|
195
197
|
label: string;
|
|
196
|
-
options:
|
|
198
|
+
options: ConfigureLanguageOptionsProp[];
|
|
197
199
|
};
|
|
198
200
|
chartingOptions: {
|
|
199
201
|
changeInteractive: {
|
|
200
|
-
settings:
|
|
202
|
+
settings: false;
|
|
201
203
|
authoringLabel: string;
|
|
202
204
|
settingsLabel: string;
|
|
203
205
|
};
|
|
204
206
|
changeEditable: {
|
|
205
|
-
settings:
|
|
207
|
+
settings: false;
|
|
206
208
|
authoringLabel: string;
|
|
207
209
|
settingsLabel: string;
|
|
208
210
|
};
|
|
209
211
|
addCategory: {
|
|
210
|
-
settings:
|
|
212
|
+
settings: false;
|
|
211
213
|
authoringLabel: string;
|
|
212
214
|
settingsLabel: string;
|
|
213
215
|
};
|
|
214
216
|
mathMlOptions: {
|
|
215
|
-
mmlOutput:
|
|
216
|
-
mmlEditing:
|
|
217
|
+
mmlOutput: false;
|
|
218
|
+
mmlEditing: false;
|
|
217
219
|
};
|
|
218
220
|
};
|
|
219
221
|
};
|