@pie-element/likert 5.0.4-next.20261011174919 → 5.0.4
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/defaults.d.ts +30 -29
- package/dist/author/index.d.ts +18 -18
- package/dist/author/index.js +4 -0
- package/dist/author/main.d.ts +25 -15
- package/dist/author/main.js +84 -95
- package/dist/browser/author/index.js +10 -19
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +10 -19
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +7 -6
- package/dist/controller/index.d.ts +67 -5
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +284 -0
- package/dist/schemas/model.schema.json +397 -0
- package/dist/schemas/session.schema.json +23 -0
- package/dist/types.d.ts +97 -0
- package/package.json +17 -13
|
@@ -1,91 +1,92 @@
|
|
|
1
|
+
import type { LikertChoice } from '../types.js';
|
|
1
2
|
/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
|
|
2
3
|
* functionalities are not defined yet - the value for those can belong to
|
|
3
4
|
* model or to configure
|
|
4
5
|
*/
|
|
5
6
|
declare const _default: {
|
|
6
7
|
model: {
|
|
7
|
-
choices:
|
|
8
|
-
likertOrientation:
|
|
9
|
-
likertScale:
|
|
10
|
-
likertType:
|
|
8
|
+
choices: LikertChoice[];
|
|
9
|
+
likertOrientation: "horizontal";
|
|
10
|
+
likertScale: "likert3";
|
|
11
|
+
likertType: "agreement";
|
|
11
12
|
prompt: string;
|
|
12
|
-
promptEnabled:
|
|
13
|
+
promptEnabled: true;
|
|
13
14
|
teacherInstructions: string;
|
|
14
|
-
teacherInstructionsEnabled:
|
|
15
|
+
teacherInstructionsEnabled: true;
|
|
15
16
|
};
|
|
16
17
|
configuration: {
|
|
17
18
|
baseInputConfiguration: {
|
|
18
19
|
h3: {
|
|
19
|
-
disabled:
|
|
20
|
+
disabled: true;
|
|
20
21
|
};
|
|
21
22
|
audio: {
|
|
22
|
-
disabled:
|
|
23
|
+
disabled: false;
|
|
23
24
|
};
|
|
24
25
|
video: {
|
|
25
|
-
disabled:
|
|
26
|
+
disabled: false;
|
|
26
27
|
};
|
|
27
28
|
image: {
|
|
28
|
-
disabled:
|
|
29
|
+
disabled: false;
|
|
29
30
|
};
|
|
30
31
|
textAlign: {
|
|
31
|
-
disabled:
|
|
32
|
+
disabled: true;
|
|
32
33
|
};
|
|
33
34
|
showParagraphs: {
|
|
34
|
-
disabled:
|
|
35
|
+
disabled: false;
|
|
35
36
|
};
|
|
36
37
|
separateParagraphs: {
|
|
37
|
-
disabled:
|
|
38
|
+
disabled: true;
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
prompt: {
|
|
41
|
-
settings:
|
|
42
|
+
settings: true;
|
|
42
43
|
label: string;
|
|
43
44
|
inputConfiguration: {
|
|
44
45
|
audio: {
|
|
45
|
-
disabled:
|
|
46
|
+
disabled: false;
|
|
46
47
|
};
|
|
47
48
|
video: {
|
|
48
|
-
disabled:
|
|
49
|
+
disabled: false;
|
|
49
50
|
};
|
|
50
51
|
image: {
|
|
51
|
-
disabled:
|
|
52
|
+
disabled: false;
|
|
52
53
|
};
|
|
53
54
|
};
|
|
54
|
-
required:
|
|
55
|
+
required: false;
|
|
55
56
|
};
|
|
56
|
-
settingsPanelDisabled:
|
|
57
|
+
settingsPanelDisabled: false;
|
|
57
58
|
spellCheck: {
|
|
58
59
|
label: string;
|
|
59
|
-
settings:
|
|
60
|
-
enabled:
|
|
60
|
+
settings: false;
|
|
61
|
+
enabled: true;
|
|
61
62
|
};
|
|
62
63
|
teacherInstructions: {
|
|
63
|
-
settings:
|
|
64
|
+
settings: true;
|
|
64
65
|
label: string;
|
|
65
66
|
inputConfiguration: {
|
|
66
67
|
audio: {
|
|
67
|
-
disabled:
|
|
68
|
+
disabled: false;
|
|
68
69
|
};
|
|
69
70
|
video: {
|
|
70
|
-
disabled:
|
|
71
|
+
disabled: false;
|
|
71
72
|
};
|
|
72
73
|
image: {
|
|
73
|
-
disabled:
|
|
74
|
+
disabled: false;
|
|
74
75
|
};
|
|
75
76
|
};
|
|
76
|
-
required:
|
|
77
|
+
required: false;
|
|
77
78
|
};
|
|
78
79
|
likertChoice: {
|
|
79
80
|
label: string;
|
|
80
81
|
inputConfiguration: {
|
|
81
82
|
audio: {
|
|
82
|
-
disabled:
|
|
83
|
+
disabled: false;
|
|
83
84
|
};
|
|
84
85
|
video: {
|
|
85
|
-
disabled:
|
|
86
|
+
disabled: false;
|
|
86
87
|
};
|
|
87
88
|
image: {
|
|
88
|
-
disabled:
|
|
89
|
+
disabled: false;
|
|
89
90
|
};
|
|
90
91
|
};
|
|
91
92
|
};
|
package/dist/author/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
+
import { type DeleteDone, type SoundHandler } from '@pie-element/shared-configure-events';
|
|
2
|
+
import { type AuthorModel } from './main.js';
|
|
3
|
+
import type { LikertConfiguration, LikertModel } from '../types.js';
|
|
4
|
+
type ModelInput = Partial<LikertModel> & Pick<Partial<AuthorModel>, 'errors'>;
|
|
1
5
|
export default class Likert extends HTMLElement {
|
|
2
|
-
static createDefaultModel: (model?:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
prompt: string;
|
|
8
|
-
promptEnabled: boolean;
|
|
9
|
-
teacherInstructions: string;
|
|
10
|
-
teacherInstructionsEnabled: boolean;
|
|
11
|
-
};
|
|
6
|
+
static createDefaultModel: (model?: ModelInput) => AuthorModel;
|
|
7
|
+
private _root;
|
|
8
|
+
private _model;
|
|
9
|
+
private _configuration;
|
|
10
|
+
private _disableSidePanel?;
|
|
12
11
|
constructor();
|
|
13
|
-
set model(s:
|
|
14
|
-
set configuration(c:
|
|
15
|
-
set disableSidePanel(s:
|
|
16
|
-
dispatchModelUpdated(reset
|
|
17
|
-
onModelChanged(m:
|
|
18
|
-
onConfigurationChanged(c:
|
|
19
|
-
insertSound(handler:
|
|
20
|
-
onDeleteSound(src:
|
|
12
|
+
set model(s: ModelInput);
|
|
13
|
+
set configuration(c: LikertConfiguration);
|
|
14
|
+
set disableSidePanel(s: boolean | undefined);
|
|
15
|
+
dispatchModelUpdated(reset?: boolean): void;
|
|
16
|
+
onModelChanged(m: AuthorModel, reset?: boolean): void;
|
|
17
|
+
onConfigurationChanged(c: LikertConfiguration): void;
|
|
18
|
+
insertSound(handler: SoundHandler): void;
|
|
19
|
+
onDeleteSound(src: string, done: DeleteDone): void;
|
|
21
20
|
_render(): void;
|
|
22
21
|
connectedCallback(): void;
|
|
23
22
|
disconnectedCallback(): void;
|
|
24
23
|
}
|
|
24
|
+
export {};
|
package/dist/author/index.js
CHANGED
|
@@ -15,6 +15,10 @@ var l = i("likert:configure"), u = (e, n) => ({
|
|
|
15
15
|
...e,
|
|
16
16
|
choices: e && e.choices || []
|
|
17
17
|
});
|
|
18
|
+
_root;
|
|
19
|
+
_model;
|
|
20
|
+
_configuration;
|
|
21
|
+
_disableSidePanel;
|
|
18
22
|
constructor() {
|
|
19
23
|
super(), this._root = null, this._model = i.createDefaultModel(), this._configuration = t.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
20
24
|
}
|
package/dist/author/main.d.ts
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
|
|
3
|
+
import type { LikertValidationErrors } from '../controller/index.js';
|
|
4
|
+
import type { LikertChoice, LikertConfiguration, LikertModel } from '../types.js';
|
|
5
|
+
/** The model the author edits; the host sets `errors` from the controller's `validate()`. */
|
|
6
|
+
export type AuthorModel = Partial<LikertModel> & {
|
|
7
|
+
choices: LikertChoice[];
|
|
8
|
+
errors?: LikertValidationErrors;
|
|
9
|
+
};
|
|
10
|
+
type MediaSupport<Handler> = {
|
|
11
|
+
add: (handler: Handler) => void;
|
|
12
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
13
|
+
};
|
|
14
|
+
export type MainProps = {
|
|
15
|
+
model: AuthorModel;
|
|
16
|
+
configuration: LikertConfiguration;
|
|
17
|
+
disableSidePanel?: boolean;
|
|
18
|
+
onModelChanged: (model: AuthorModel, reset?: boolean) => void;
|
|
19
|
+
onConfigurationChanged: (configuration: LikertConfiguration) => void;
|
|
20
|
+
imageSupport?: MediaSupport<ImageHandler>;
|
|
21
|
+
uploadSoundSupport?: MediaSupport<SoundHandler>;
|
|
22
|
+
};
|
|
23
|
+
export declare class Main extends React.Component<MainProps> {
|
|
24
|
+
onChoiceChanged: (index: number, choice: LikertChoice) => void;
|
|
25
|
+
onPromptChanged: (prompt: string) => void;
|
|
26
|
+
onTeacherInstructionsChanged: (teacherInstructions: string) => void;
|
|
17
27
|
render(): React.JSX.Element;
|
|
18
28
|
}
|
|
19
29
|
export default Main;
|
package/dist/author/main.js
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
import { LIKERT_ORIENTATION as e, LIKERT_SCALE as t, LIKERT_TYPE as n } from "./likertEntities.js";
|
|
2
2
|
import r from "./choiceGenerator.js";
|
|
3
3
|
import i from "react";
|
|
4
|
-
import a from "
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import l from "@mui/material/
|
|
8
|
-
import
|
|
9
|
-
import d from "@
|
|
10
|
-
import f from "@
|
|
11
|
-
import p from "@
|
|
12
|
-
import {
|
|
13
|
-
import { merge as v } from "@pie-element/shared-lodash";
|
|
4
|
+
import { color as a } from "@pie-lib/render-ui";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import c from "@mui/material/FormControlLabel";
|
|
7
|
+
import { styled as l } from "@mui/material/styles";
|
|
8
|
+
import u from "@mui/material/Radio";
|
|
9
|
+
import d from "@pie-lib/editable-html-tip-tap";
|
|
10
|
+
import f from "@mui/material/RadioGroup";
|
|
11
|
+
import { InputContainer as p, NumberTextField as m, layout as h, settings as g } from "@pie-lib/config-ui";
|
|
12
|
+
import { merge as _ } from "@pie-element/shared-lodash";
|
|
14
13
|
//#region src/author/main.tsx
|
|
15
|
-
var { Panel:
|
|
14
|
+
var { Panel: v, toggle: y, radio: b } = g, x = l(p)(({ theme: e }) => ({
|
|
16
15
|
width: "100%",
|
|
17
16
|
paddingTop: e.spacing(2),
|
|
18
17
|
marginBottom: e.spacing(2)
|
|
19
|
-
})),
|
|
18
|
+
})), S = l("div")({
|
|
20
19
|
display: "flex",
|
|
21
20
|
flexDirection: "column"
|
|
22
|
-
}),
|
|
23
|
-
color:
|
|
21
|
+
}), C = l("p")(({ theme: e }) => ({
|
|
22
|
+
color: a.text(),
|
|
24
23
|
fontSize: e.typography.fontSize - 2
|
|
25
|
-
})),
|
|
24
|
+
})), w = l("div")(({ theme: e }) => ({
|
|
26
25
|
display: "flex",
|
|
27
26
|
width: "100%",
|
|
28
27
|
alignItems: "flex-start",
|
|
29
28
|
marginBottom: e.spacing(2)
|
|
30
|
-
})),
|
|
29
|
+
})), T = l("div")(({ theme: e }) => ({
|
|
31
30
|
display: "flex",
|
|
32
31
|
width: "100%",
|
|
33
32
|
justifyContent: "space-around",
|
|
34
33
|
marginBottom: e.spacing(2.5)
|
|
35
|
-
})),
|
|
34
|
+
})), E = l(p)({
|
|
36
35
|
width: "calc(100% - 200px)",
|
|
37
36
|
marginRight: 0
|
|
38
|
-
}),
|
|
37
|
+
}), D = l("p")(({ theme: e }) => ({
|
|
39
38
|
color: e.palette.error.main,
|
|
40
39
|
fontSize: e.typography.fontSize - 2
|
|
41
|
-
})),
|
|
40
|
+
})), O = l(m)({ width: "100%" }), k = l("div")({
|
|
42
41
|
display: "flex",
|
|
43
42
|
flexDirection: "row"
|
|
44
|
-
}),
|
|
43
|
+
}), A = l("div")(({ theme: e }) => ({
|
|
45
44
|
paddingLeft: e.spacing(2.5),
|
|
46
45
|
width: "150px"
|
|
47
|
-
})),
|
|
46
|
+
})), j = l(d)(({ theme: e }) => ({ paddingTop: e.spacing(2) })), M = l("span")(({ theme: e }) => ({
|
|
48
47
|
width: "30px",
|
|
49
48
|
paddingTop: e.spacing(4)
|
|
50
|
-
})),
|
|
49
|
+
})), N = l("div")(({ theme: e }) => ({
|
|
51
50
|
fontSize: e.typography.fontSize - 2,
|
|
52
51
|
color: e.palette.error.main,
|
|
53
52
|
paddingTop: e.spacing(1)
|
|
54
|
-
})),
|
|
53
|
+
})), P = l(u)({ color: `${a.tertiary()} !important` }), F = (t) => {
|
|
55
54
|
let { model: n, onChangeModel: r } = t;
|
|
56
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ s(S, { children: [/* @__PURE__ */ o(C, { children: "Likert Orientation" }), /* @__PURE__ */ s(f, {
|
|
57
56
|
"aria-label": "likertOrientation",
|
|
58
57
|
name: "likertOrientation",
|
|
59
58
|
value: n.likertOrientation,
|
|
@@ -64,19 +63,19 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
64
63
|
likertOrientation: t
|
|
65
64
|
});
|
|
66
65
|
},
|
|
67
|
-
children: [/* @__PURE__ */
|
|
66
|
+
children: [/* @__PURE__ */ o(c, {
|
|
68
67
|
value: e.horizontal,
|
|
69
|
-
control: /* @__PURE__ */
|
|
68
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
70
69
|
label: "Horizontal"
|
|
71
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ o(c, {
|
|
72
71
|
value: e.vertical,
|
|
73
|
-
control: /* @__PURE__ */
|
|
72
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
74
73
|
label: "Vertical"
|
|
75
74
|
})]
|
|
76
75
|
})] });
|
|
77
|
-
},
|
|
76
|
+
}, I = (e) => {
|
|
78
77
|
let { model: n, onChangeModel: i } = e;
|
|
79
|
-
return /* @__PURE__ */
|
|
78
|
+
return /* @__PURE__ */ s(S, { children: [/* @__PURE__ */ o(C, { children: "Likert Scale" }), /* @__PURE__ */ s(f, {
|
|
80
79
|
"aria-label": "likertScale",
|
|
81
80
|
name: "likertScale",
|
|
82
81
|
value: n.likertScale,
|
|
@@ -89,24 +88,24 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
89
88
|
});
|
|
90
89
|
},
|
|
91
90
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ o(c, {
|
|
93
92
|
value: t.likert3,
|
|
94
|
-
control: /* @__PURE__ */
|
|
93
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
95
94
|
label: "Likert 3"
|
|
96
95
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ o(c, {
|
|
98
97
|
value: t.likert5,
|
|
99
|
-
control: /* @__PURE__ */
|
|
98
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
100
99
|
label: "Likert 5"
|
|
101
100
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ o(c, {
|
|
103
102
|
value: t.likert7,
|
|
104
|
-
control: /* @__PURE__ */
|
|
103
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
105
104
|
label: "Likert 7"
|
|
106
105
|
})
|
|
107
106
|
]
|
|
108
107
|
})] });
|
|
109
|
-
},
|
|
108
|
+
}, L = (e) => {
|
|
110
109
|
let { model: t, onChangeModel: i } = e, a = (e) => {
|
|
111
110
|
let n = e.target.value;
|
|
112
111
|
i({
|
|
@@ -115,91 +114,91 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
115
114
|
choices: r(t.likertScale, n)
|
|
116
115
|
});
|
|
117
116
|
};
|
|
118
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ s(S, { children: [/* @__PURE__ */ o(C, { children: "Label Type" }), /* @__PURE__ */ s(k, { children: [/* @__PURE__ */ s(f, {
|
|
119
118
|
"aria-label": "likertLabelType",
|
|
120
119
|
name: "likertLabelType",
|
|
121
120
|
value: t.likertType,
|
|
122
121
|
onChange: a,
|
|
123
122
|
children: [
|
|
124
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ o(c, {
|
|
125
124
|
value: n.agreement,
|
|
126
|
-
control: /* @__PURE__ */
|
|
125
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
127
126
|
label: "Agreement"
|
|
128
127
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ o(c, {
|
|
130
129
|
value: n.frequency,
|
|
131
|
-
control: /* @__PURE__ */
|
|
130
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
132
131
|
label: "Frequency"
|
|
133
132
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ o(c, {
|
|
135
134
|
value: n.yesNo,
|
|
136
|
-
control: /* @__PURE__ */
|
|
135
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
137
136
|
label: "Yes/No"
|
|
138
137
|
})
|
|
139
138
|
]
|
|
140
|
-
}), /* @__PURE__ */
|
|
139
|
+
}), /* @__PURE__ */ s(f, {
|
|
141
140
|
"aria-label": "likertLabelType",
|
|
142
141
|
name: "likertLabelType",
|
|
143
142
|
value: t.likertType,
|
|
144
143
|
onChange: a,
|
|
145
144
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ o(c, {
|
|
147
146
|
value: n.importance,
|
|
148
|
-
control: /* @__PURE__ */
|
|
147
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
149
148
|
label: "Importance"
|
|
150
149
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ o(c, {
|
|
152
151
|
value: n.likelihood,
|
|
153
|
-
control: /* @__PURE__ */
|
|
152
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
154
153
|
label: "Likelihood"
|
|
155
154
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ o(c, {
|
|
157
156
|
value: n.like,
|
|
158
|
-
control: /* @__PURE__ */
|
|
157
|
+
control: /* @__PURE__ */ o(P, {}),
|
|
159
158
|
label: "Like"
|
|
160
159
|
})
|
|
161
160
|
]
|
|
162
161
|
})] })] });
|
|
163
|
-
},
|
|
162
|
+
}, R = (e) => e.choices.reduce((e, t) => {
|
|
164
163
|
let n = { ...e }, r = parseInt(t.value);
|
|
165
164
|
return n[r] || (n[r] = 0), {
|
|
166
165
|
...n,
|
|
167
166
|
[r]: n[r] + 1
|
|
168
167
|
};
|
|
169
|
-
}, {}),
|
|
170
|
-
let { configuration: t, imageSupport: n, model: r, onChangeModel: i, onChoiceChanged: a, onConfigurationChanged:
|
|
171
|
-
teacherInstructionsEnabled: C.settings &&
|
|
172
|
-
spellCheckEnabled:
|
|
173
|
-
scoringType:
|
|
174
|
-
}, q = (e = {}) => Object.assign({ ...
|
|
175
|
-
return /* @__PURE__ */
|
|
168
|
+
}, {}), z = (e) => {
|
|
169
|
+
let { configuration: t, imageSupport: n, model: r, onChangeModel: i, onChoiceChanged: a, onConfigurationChanged: c, onPromptChanged: l, onTeacherInstructionsChanged: u, uploadSoundSupport: f } = e, { contentDimensions: p = {}, prompt: m = {}, scoringType: g = {}, settingsPanelDisabled: _, spellCheck: S = {}, teacherInstructions: C = {}, baseInputConfiguration: k = {}, likertChoice: P = {} } = t || {}, { errors: z = {}, extraCSSRules: B, spellCheckEnabled: V, teacherInstructionsEnabled: H } = r || {}, { prompt: U, teacherInstructions: W } = z, G = R(r), K = {
|
|
170
|
+
teacherInstructionsEnabled: C.settings && y(C.label),
|
|
171
|
+
spellCheckEnabled: S.settings && y(S.label),
|
|
172
|
+
scoringType: g.settings && b(g.label, ["auto", "rubric"])
|
|
173
|
+
}, q = (e = {}) => Object.assign({ ...k }, e || {});
|
|
174
|
+
return /* @__PURE__ */ s(h.ConfigLayout, {
|
|
176
175
|
extraCSSRules: B,
|
|
177
176
|
dimensions: p,
|
|
178
177
|
hideSettings: _,
|
|
179
|
-
settings: /* @__PURE__ */
|
|
178
|
+
settings: /* @__PURE__ */ o(v, {
|
|
180
179
|
model: r,
|
|
181
180
|
onChangeModel: i,
|
|
182
181
|
configuration: t,
|
|
183
|
-
onChangeConfiguration:
|
|
182
|
+
onChangeConfiguration: c,
|
|
184
183
|
groups: { Properties: K }
|
|
185
184
|
}),
|
|
186
185
|
children: [
|
|
187
|
-
H && /* @__PURE__ */
|
|
186
|
+
H && /* @__PURE__ */ s(x, {
|
|
188
187
|
label: C.label,
|
|
189
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ o(d, {
|
|
190
189
|
markup: r.teacherInstructions || "",
|
|
191
190
|
onChange: u,
|
|
192
191
|
imageSupport: n,
|
|
193
192
|
nonEmpty: !1,
|
|
194
193
|
error: W,
|
|
195
194
|
spellCheck: V,
|
|
196
|
-
uploadSoundSupport:
|
|
195
|
+
uploadSoundSupport: f,
|
|
197
196
|
pluginProps: q(C?.inputConfiguration)
|
|
198
|
-
}), W && /* @__PURE__ */
|
|
197
|
+
}), W && /* @__PURE__ */ o(N, { children: W })]
|
|
199
198
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ s(x, {
|
|
201
200
|
label: m.label,
|
|
202
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ o(d, {
|
|
203
202
|
markup: r.prompt,
|
|
204
203
|
onChange: l,
|
|
205
204
|
imageSupport: n,
|
|
@@ -207,29 +206,29 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
207
206
|
error: U,
|
|
208
207
|
spellCheck: V,
|
|
209
208
|
disableUnderline: !0,
|
|
210
|
-
uploadSoundSupport:
|
|
209
|
+
uploadSoundSupport: f,
|
|
211
210
|
pluginProps: q(m?.inputConfiguration)
|
|
212
|
-
}), U && /* @__PURE__ */
|
|
211
|
+
}), U && /* @__PURE__ */ o(N, { children: U })]
|
|
213
212
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ s(T, { children: [
|
|
214
|
+
/* @__PURE__ */ o(I, {
|
|
216
215
|
model: r,
|
|
217
216
|
onChangeModel: i
|
|
218
217
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ o(L, {
|
|
220
219
|
model: r,
|
|
221
220
|
onChangeModel: i
|
|
222
221
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ o(F, {
|
|
224
223
|
model: r,
|
|
225
224
|
onChangeModel: i
|
|
226
225
|
})
|
|
227
226
|
] }),
|
|
228
|
-
r.choices.map((e, t) => /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
227
|
+
r.choices.map((e, t) => /* @__PURE__ */ s(w, { children: [
|
|
228
|
+
/* @__PURE__ */ s(M, { children: [t + 1, "."] }),
|
|
229
|
+
/* @__PURE__ */ o(E, {
|
|
231
230
|
label: "Likert Label",
|
|
232
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ o(j, {
|
|
233
232
|
markup: e.label || "",
|
|
234
233
|
onChange: (n) => a(t, {
|
|
235
234
|
...e,
|
|
@@ -237,11 +236,11 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
237
236
|
}),
|
|
238
237
|
imageSupport: n,
|
|
239
238
|
spellCheck: V,
|
|
240
|
-
uploadSoundSupport:
|
|
241
|
-
pluginProps: q(
|
|
239
|
+
uploadSoundSupport: f,
|
|
240
|
+
pluginProps: q(P?.inputConfiguration)
|
|
242
241
|
})
|
|
243
242
|
}, `likert-label-${t}`),
|
|
244
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ s(A, { children: [/* @__PURE__ */ o(O, {
|
|
245
244
|
label: "Likert Value",
|
|
246
245
|
value: e.value,
|
|
247
246
|
max: 100,
|
|
@@ -253,24 +252,14 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
253
252
|
});
|
|
254
253
|
},
|
|
255
254
|
imageSupport: n
|
|
256
|
-
}), G[e.value] && G[e.value] > 1 && /* @__PURE__ */
|
|
255
|
+
}), G[e.value] && G[e.value] > 1 && /* @__PURE__ */ o(D, { children: "Value should be unique" })] })
|
|
257
256
|
] }, `choice-${t}`))
|
|
258
257
|
]
|
|
259
258
|
});
|
|
260
|
-
},
|
|
261
|
-
static propTypes = {
|
|
262
|
-
model: a.object.isRequired,
|
|
263
|
-
disableSidePanel: a.bool,
|
|
264
|
-
onModelChanged: a.func.isRequired,
|
|
265
|
-
onConfigurationChanged: a.func.isRequired,
|
|
266
|
-
imageSupport: a.shape({
|
|
267
|
-
add: a.func.isRequired,
|
|
268
|
-
delete: a.func.isRequired
|
|
269
|
-
})
|
|
270
|
-
};
|
|
259
|
+
}, B = class extends i.Component {
|
|
271
260
|
onChoiceChanged = (e, t) => {
|
|
272
261
|
let { model: n, onModelChanged: r } = this.props;
|
|
273
|
-
n.choices = n.choices.map((e) =>
|
|
262
|
+
n.choices = n.choices.map((e) => _({}, e)), n.choices.splice(e, 1, t), r(n);
|
|
274
263
|
};
|
|
275
264
|
onPromptChanged = (e) => {
|
|
276
265
|
this.props.onModelChanged({
|
|
@@ -285,7 +274,7 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
285
274
|
});
|
|
286
275
|
};
|
|
287
276
|
render() {
|
|
288
|
-
return /* @__PURE__ */
|
|
277
|
+
return /* @__PURE__ */ o(z, {
|
|
289
278
|
...this.props,
|
|
290
279
|
onChangeModel: this.props.onModelChanged,
|
|
291
280
|
onChoiceChanged: this.onChoiceChanged,
|
|
@@ -295,4 +284,4 @@ var { Panel: y, toggle: b, radio: x } = _, S = u(m)(({ theme: e }) => ({
|
|
|
295
284
|
}
|
|
296
285
|
};
|
|
297
286
|
//#endregion
|
|
298
|
-
export {
|
|
287
|
+
export { B as Main, B as default };
|
|
@@ -35220,15 +35220,12 @@ var eK = class extends et.Component {
|
|
|
35220
35220
|
}), iK = (e) => typeof e == "string" ? {
|
|
35221
35221
|
label: e,
|
|
35222
35222
|
value: e
|
|
35223
|
-
} : e, aK =
|
|
35224
|
-
|
|
35225
|
-
|
|
35226
|
-
|
|
35227
|
-
|
|
35228
|
-
|
|
35229
|
-
isConfigProperty: n
|
|
35230
|
-
};
|
|
35231
|
-
}, oK = (e, t, n = !1) => ({
|
|
35223
|
+
} : e, aK = (e, t, n = !1) => ({
|
|
35224
|
+
type: "radio",
|
|
35225
|
+
label: e,
|
|
35226
|
+
choices: t && t.map((e) => iK(e)),
|
|
35227
|
+
isConfigProperty: n
|
|
35228
|
+
}), oK = (e, t, n = !1) => ({
|
|
35232
35229
|
type: "dropdown",
|
|
35233
35230
|
label: e,
|
|
35234
35231
|
choices: t,
|
|
@@ -35774,16 +35771,6 @@ var pK = Ne, mK = pK.default, hK = mK && typeof mK == "object" ? mK : pK, gK = f
|
|
|
35774
35771
|
]
|
|
35775
35772
|
});
|
|
35776
35773
|
}, sq = class extends et.Component {
|
|
35777
|
-
static propTypes = {
|
|
35778
|
-
model: z.default.object.isRequired,
|
|
35779
|
-
disableSidePanel: z.default.bool,
|
|
35780
|
-
onModelChanged: z.default.func.isRequired,
|
|
35781
|
-
onConfigurationChanged: z.default.func.isRequired,
|
|
35782
|
-
imageSupport: z.default.shape({
|
|
35783
|
-
add: z.default.func.isRequired,
|
|
35784
|
-
delete: z.default.func.isRequired
|
|
35785
|
-
})
|
|
35786
|
-
};
|
|
35787
35774
|
onChoiceChanged = (e, t) => {
|
|
35788
35775
|
let { model: n, onModelChanged: r } = this.props;
|
|
35789
35776
|
n.choices = n.choices.map((e) => ei({}, e)), n.choices.splice(e, 1, t), r(n);
|
|
@@ -35874,6 +35861,10 @@ var pK = Ne, mK = pK.default, hK = mK && typeof mK == "object" ? mK : pK, gK = f
|
|
|
35874
35861
|
...e,
|
|
35875
35862
|
choices: e && e.choices || []
|
|
35876
35863
|
});
|
|
35864
|
+
_root;
|
|
35865
|
+
_model;
|
|
35866
|
+
_configuration;
|
|
35867
|
+
_disableSidePanel;
|
|
35877
35868
|
constructor() {
|
|
35878
35869
|
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = cq.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
35879
35870
|
}
|