@pie-element/multi-trait-rubric 9.0.4-next.20261011174919 → 9.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 +42 -41
- package/dist/author/index.d.ts +17 -9
- package/dist/author/index.js +3 -0
- package/dist/author/main.d.ts +49 -23
- package/dist/author/main.js +36 -54
- package/dist/author/scale.d.ts +29 -1
- package/dist/browser/author/index.js +12 -32
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +9 -12
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +12 -32
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +9 -12
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +10 -9
- package/dist/controller/index.d.ts +78 -5
- package/dist/controller/index.js +9 -9
- package/dist/controller/utils.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +363 -0
- package/dist/schemas/model.schema.json +421 -0
- package/dist/schemas/session.schema.json +17 -0
- package/dist/types.d.ts +173 -0
- package/package.json +18 -14
|
@@ -1,68 +1,69 @@
|
|
|
1
|
+
import type { Scale } from '../types.js';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
model: {
|
|
3
|
-
addScaleEnabled:
|
|
4
|
-
description:
|
|
5
|
-
excludeZero:
|
|
6
|
-
halfScoring:
|
|
7
|
-
maxPointsEnabled:
|
|
8
|
-
pointLabels:
|
|
9
|
-
scales:
|
|
10
|
-
standards:
|
|
11
|
-
visibleToStudent:
|
|
4
|
+
addScaleEnabled: true;
|
|
5
|
+
description: false;
|
|
6
|
+
excludeZero: false;
|
|
7
|
+
halfScoring: false;
|
|
8
|
+
maxPointsEnabled: true;
|
|
9
|
+
pointLabels: true;
|
|
10
|
+
scales: Scale[];
|
|
11
|
+
standards: false;
|
|
12
|
+
visibleToStudent: true;
|
|
12
13
|
};
|
|
13
14
|
configuration: {
|
|
14
15
|
baseInputConfiguration: {
|
|
15
16
|
h3: {
|
|
16
|
-
disabled:
|
|
17
|
+
disabled: true;
|
|
17
18
|
};
|
|
18
19
|
audio: {
|
|
19
|
-
disabled:
|
|
20
|
+
disabled: false;
|
|
20
21
|
};
|
|
21
22
|
video: {
|
|
22
|
-
disabled:
|
|
23
|
+
disabled: false;
|
|
23
24
|
};
|
|
24
25
|
image: {
|
|
25
|
-
disabled:
|
|
26
|
+
disabled: false;
|
|
26
27
|
};
|
|
27
28
|
textAlign: {
|
|
28
|
-
disabled:
|
|
29
|
+
disabled: true;
|
|
29
30
|
};
|
|
30
31
|
showParagraphs: {
|
|
31
|
-
disabled:
|
|
32
|
+
disabled: false;
|
|
32
33
|
};
|
|
33
34
|
separateParagraphs: {
|
|
34
|
-
disabled:
|
|
35
|
+
disabled: true;
|
|
35
36
|
};
|
|
36
37
|
};
|
|
37
38
|
expandedInput: {
|
|
38
39
|
inputConfiguration: {
|
|
39
40
|
math: {
|
|
40
|
-
disabled:
|
|
41
|
+
disabled: true;
|
|
41
42
|
};
|
|
42
43
|
audio: {
|
|
43
|
-
disabled:
|
|
44
|
+
disabled: false;
|
|
44
45
|
};
|
|
45
46
|
video: {
|
|
46
|
-
disabled:
|
|
47
|
+
disabled: false;
|
|
47
48
|
};
|
|
48
49
|
image: {
|
|
49
|
-
disabled:
|
|
50
|
+
disabled: false;
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
53
|
};
|
|
53
54
|
labelInput: {
|
|
54
55
|
inputConfiguration: {
|
|
55
56
|
math: {
|
|
56
|
-
disabled:
|
|
57
|
+
disabled: true;
|
|
57
58
|
};
|
|
58
59
|
audio: {
|
|
59
|
-
disabled:
|
|
60
|
+
disabled: true;
|
|
60
61
|
};
|
|
61
62
|
video: {
|
|
62
|
-
disabled:
|
|
63
|
+
disabled: true;
|
|
63
64
|
};
|
|
64
65
|
image: {
|
|
65
|
-
disabled:
|
|
66
|
+
disabled: true;
|
|
66
67
|
};
|
|
67
68
|
};
|
|
68
69
|
};
|
|
@@ -82,52 +83,52 @@ declare const _default: {
|
|
|
82
83
|
title: string;
|
|
83
84
|
text: string;
|
|
84
85
|
};
|
|
85
|
-
settingsPanelDisabled:
|
|
86
|
+
settingsPanelDisabled: false;
|
|
86
87
|
spellCheck: {
|
|
87
88
|
label: string;
|
|
88
|
-
settings:
|
|
89
|
-
enabled:
|
|
89
|
+
settings: false;
|
|
90
|
+
enabled: true;
|
|
90
91
|
};
|
|
91
92
|
showExcludeZero: {
|
|
92
|
-
settings:
|
|
93
|
+
settings: true;
|
|
93
94
|
label: string;
|
|
94
95
|
};
|
|
95
96
|
showScorePointLabels: {
|
|
96
|
-
settings:
|
|
97
|
+
settings: true;
|
|
97
98
|
label: string;
|
|
98
99
|
};
|
|
99
100
|
showDescription: {
|
|
100
|
-
settings:
|
|
101
|
+
settings: true;
|
|
101
102
|
label: string;
|
|
102
103
|
};
|
|
103
104
|
showVisibleToStudent: {
|
|
104
|
-
settings:
|
|
105
|
+
settings: true;
|
|
105
106
|
label: string;
|
|
106
107
|
};
|
|
107
108
|
showHalfScoring: {
|
|
108
|
-
settings:
|
|
109
|
+
settings: true;
|
|
109
110
|
label: string;
|
|
110
111
|
};
|
|
111
112
|
showStandards: {
|
|
112
|
-
settings:
|
|
113
|
+
settings: false;
|
|
113
114
|
label: string;
|
|
114
115
|
};
|
|
115
116
|
showLevelTagInput: {
|
|
116
|
-
settings:
|
|
117
|
+
settings: false;
|
|
117
118
|
label: string;
|
|
118
|
-
enabled:
|
|
119
|
+
enabled: false;
|
|
119
120
|
};
|
|
120
121
|
dragAndDrop: {
|
|
121
|
-
settings:
|
|
122
|
+
settings: true;
|
|
122
123
|
label: string;
|
|
123
|
-
enabled:
|
|
124
|
+
enabled: false;
|
|
124
125
|
};
|
|
125
126
|
showMaxPoint: {
|
|
126
|
-
settings:
|
|
127
|
+
settings: true;
|
|
127
128
|
label: string;
|
|
128
129
|
};
|
|
129
130
|
addScale: {
|
|
130
|
-
settings:
|
|
131
|
+
settings: true;
|
|
131
132
|
label: string;
|
|
132
133
|
};
|
|
133
134
|
minNoOfTraits: number;
|
|
@@ -136,8 +137,8 @@ declare const _default: {
|
|
|
136
137
|
maxNoOfScales: number;
|
|
137
138
|
defaultTraitLabel: string;
|
|
138
139
|
mathMlOptions: {
|
|
139
|
-
mmlOutput:
|
|
140
|
-
mmlEditing:
|
|
140
|
+
mmlOutput: false;
|
|
141
|
+
mmlEditing: false;
|
|
141
142
|
};
|
|
142
143
|
maxMaxPoints: number;
|
|
143
144
|
};
|
package/dist/author/index.d.ts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
+
import { type DeleteDone, type ImageHandler, type SoundHandler } from '@pie-element/shared-configure-events';
|
|
2
|
+
import { type AuthorModel } from './main.js';
|
|
3
|
+
import type { MultiTraitRubricConfiguration, MultiTraitRubricModel } from '../types.js';
|
|
4
|
+
type ModelInput = Partial<MultiTraitRubricModel> & Pick<Partial<AuthorModel>, 'errors'>;
|
|
1
5
|
export default class MultiTraitRubricElement extends HTMLElement {
|
|
6
|
+
private _root;
|
|
7
|
+
private _model;
|
|
8
|
+
private _configuration;
|
|
2
9
|
constructor();
|
|
3
|
-
updateModelAccordingToReceivedProps:
|
|
4
|
-
set model(m:
|
|
5
|
-
set configuration(c:
|
|
6
|
-
onModelChanged:
|
|
7
|
-
onConfigurationChanged:
|
|
8
|
-
insertSound(handler:
|
|
9
|
-
onDeleteSound(src:
|
|
10
|
-
insertImage(handler:
|
|
11
|
-
onDeleteImage(src:
|
|
10
|
+
updateModelAccordingToReceivedProps: (m: AuthorModel) => AuthorModel;
|
|
11
|
+
set model(m: ModelInput);
|
|
12
|
+
set configuration(c: MultiTraitRubricConfiguration);
|
|
13
|
+
onModelChanged: (m: AuthorModel) => void;
|
|
14
|
+
onConfigurationChanged: (c: MultiTraitRubricConfiguration) => void;
|
|
15
|
+
insertSound(handler: SoundHandler): void;
|
|
16
|
+
onDeleteSound(src: string, done: DeleteDone): void;
|
|
17
|
+
insertImage(handler: ImageHandler): void;
|
|
18
|
+
onDeleteImage(src: string, done: DeleteDone): void;
|
|
12
19
|
_render(): void;
|
|
13
20
|
connectedCallback(): void;
|
|
14
21
|
disconnectedCallback(): void;
|
|
15
22
|
}
|
|
23
|
+
export {};
|
package/dist/author/index.js
CHANGED
package/dist/author/main.d.ts
CHANGED
|
@@ -1,35 +1,61 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import type { DeleteDone, ImageHandler, SoundHandler } from '@pie-element/shared-configure-events';
|
|
3
|
+
import type { MultiTraitRubricValidationErrors } from '../controller/index.js';
|
|
4
|
+
import type { MultiTraitRubricConfiguration, MultiTraitRubricModel, Scale as ScaleModel } from '../types.js';
|
|
5
|
+
/** The model the author edits: the defaults supply `scales`; a host sets `errors` from the controller's `validate()`. */
|
|
6
|
+
export type AuthorModel = Partial<MultiTraitRubricModel> & {
|
|
7
|
+
scales: ScaleModel[];
|
|
8
|
+
errors?: MultiTraitRubricValidationErrors;
|
|
9
|
+
};
|
|
10
|
+
/** The configuration the author renders: the defaults supply its Settings Panel controls. */
|
|
11
|
+
export type AuthorConfiguration = MultiTraitRubricConfiguration & Required<Pick<MultiTraitRubricConfiguration, 'addScale' | 'dragAndDrop' | 'showDescription' | 'showExcludeZero' | 'showHalfScoring' | 'showLevelTagInput' | 'showMaxPoint' | 'showScorePointLabels' | 'showStandards' | 'showVisibleToStudent'>>;
|
|
12
|
+
export type MainProps = {
|
|
13
|
+
model: AuthorModel;
|
|
14
|
+
configuration: AuthorConfiguration;
|
|
15
|
+
onModelChanged: (model: AuthorModel) => void;
|
|
16
|
+
onConfigurationChanged: (configuration: MultiTraitRubricConfiguration) => void;
|
|
17
|
+
uploadSoundSupport?: {
|
|
18
|
+
add: (handler: SoundHandler) => void;
|
|
19
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
13
20
|
};
|
|
21
|
+
imageSupport?: {
|
|
22
|
+
add: (handler: ImageHandler) => void;
|
|
23
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type MainState = {
|
|
27
|
+
showDecreaseMaxPointsDialog: boolean;
|
|
28
|
+
showDeleteScaleDialog: boolean;
|
|
29
|
+
showDeleteTraitDialog: boolean;
|
|
30
|
+
showExcludeZeroDialog: boolean;
|
|
31
|
+
showInfoDialog: boolean;
|
|
32
|
+
infoDialogText: string;
|
|
33
|
+
adjustedWidth: string | number;
|
|
34
|
+
initialUpdateCompleted: boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare class Main extends React.Component<MainProps, MainState> {
|
|
37
|
+
divRef: React.RefObject<HTMLDivElement>;
|
|
38
|
+
constructor(props: MainProps);
|
|
39
|
+
state: MainState;
|
|
14
40
|
componentDidMount(): void;
|
|
15
41
|
componentWillUnmount(): void;
|
|
16
42
|
componentDidUpdate(): void;
|
|
17
43
|
updateDivWidth(): void;
|
|
18
44
|
updateDivWidthDebounced: import("@pie-element/shared-lodash").CancelableFunction<() => void>;
|
|
19
|
-
onScaleAdded:
|
|
20
|
-
onScaleChanged:
|
|
21
|
-
onScaleRemoved:
|
|
22
|
-
onHalfScoringChanged:
|
|
23
|
-
onVisibleToStudentChanged:
|
|
24
|
-
set: (newState:
|
|
25
|
-
changeShowScorePointLabels:
|
|
26
|
-
changeShowDescription:
|
|
27
|
-
changeShowStandards:
|
|
45
|
+
onScaleAdded: () => false | undefined;
|
|
46
|
+
onScaleChanged: (scaleIndex: number, params: Partial<ScaleModel>) => false | undefined;
|
|
47
|
+
onScaleRemoved: (scaleIndex: number) => false | undefined;
|
|
48
|
+
onHalfScoringChanged: () => void;
|
|
49
|
+
onVisibleToStudentChanged: () => void;
|
|
50
|
+
set: <K extends keyof MainState>(newState: Pick<MainState, K>) => void;
|
|
51
|
+
changeShowScorePointLabels: () => void;
|
|
52
|
+
changeShowDescription: () => void;
|
|
53
|
+
changeShowStandards: () => void;
|
|
28
54
|
showToggleExcludeZeroModal: () => void;
|
|
29
|
-
hideToggleExcludeZeroModal:
|
|
55
|
+
hideToggleExcludeZeroModal: () => void;
|
|
30
56
|
onCloseInfoDialog: () => void;
|
|
31
|
-
changeExcludeZero:
|
|
32
|
-
onModelChanged:
|
|
57
|
+
changeExcludeZero: (excludeZeroType: string) => void;
|
|
58
|
+
onModelChanged: (updatedModel: AuthorModel, updatedProperty?: string) => void;
|
|
33
59
|
render(): React.JSX.Element;
|
|
34
60
|
}
|
|
35
61
|
export default Main;
|
package/dist/author/main.js
CHANGED
|
@@ -3,32 +3,25 @@ import { addOrRemoveScaleColumn as i } from "./utils.js";
|
|
|
3
3
|
import { MultiTraitButton as a } from "./common.js";
|
|
4
4
|
import { Scale as o } from "./scale.js";
|
|
5
5
|
import s from "react";
|
|
6
|
-
import c from "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { layout as h, settings as g } from "@pie-lib/config-ui";
|
|
6
|
+
import { styled as c } from "@mui/material/styles";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import { cloneDeep as d, debounce as f, isEmpty as p } from "@pie-element/shared-lodash";
|
|
9
|
+
import { layout as m, settings as h } from "@pie-lib/config-ui";
|
|
11
10
|
//#region src/author/main.tsx
|
|
12
|
-
var { Panel:
|
|
11
|
+
var { Panel: g, toggle: _ } = h, v = "650px", y = c("div")(({ theme: e }) => ({
|
|
13
12
|
fontFamily: "Cerebri Sans",
|
|
14
13
|
fontSize: e.typography.fontSize + 2,
|
|
15
14
|
padding: "16px 0"
|
|
16
|
-
})),
|
|
15
|
+
})), b = ({ showExcludeZeroDialog: n, excludeZero: r, changeExcludeZero: i, cancel: a }) => n && !r ? /* @__PURE__ */ l(e, {
|
|
17
16
|
open: n && !r,
|
|
18
17
|
changeExcludeZero: i,
|
|
19
18
|
cancel: a
|
|
20
|
-
}) : n && r ? /* @__PURE__ */
|
|
19
|
+
}) : n && r ? /* @__PURE__ */ l(t, {
|
|
21
20
|
open: n && r,
|
|
22
21
|
changeExcludeZero: i,
|
|
23
22
|
cancel: a
|
|
24
|
-
}) : null
|
|
25
|
-
|
|
26
|
-
showExcludeZeroDialog: c.bool,
|
|
27
|
-
excludeZero: c.bool,
|
|
28
|
-
changeExcludeZero: c.func,
|
|
29
|
-
cancel: c.func
|
|
30
|
-
};
|
|
31
|
-
var S = class extends s.Component {
|
|
23
|
+
}) : null, x = class extends s.Component {
|
|
24
|
+
divRef;
|
|
32
25
|
constructor(e) {
|
|
33
26
|
super(e), this.divRef = s.createRef(), this.updateDivWidth = this.updateDivWidth.bind(this);
|
|
34
27
|
}
|
|
@@ -39,7 +32,7 @@ var S = class extends s.Component {
|
|
|
39
32
|
showExcludeZeroDialog: !1,
|
|
40
33
|
showInfoDialog: !1,
|
|
41
34
|
infoDialogText: "",
|
|
42
|
-
adjustedWidth:
|
|
35
|
+
adjustedWidth: v,
|
|
43
36
|
initialUpdateCompleted: !1
|
|
44
37
|
};
|
|
45
38
|
componentDidMount() {
|
|
@@ -57,7 +50,7 @@ var S = class extends s.Component {
|
|
|
57
50
|
e !== this.state.adjustedWidth && this.set({ adjustedWidth: e });
|
|
58
51
|
}
|
|
59
52
|
}
|
|
60
|
-
updateDivWidthDebounced =
|
|
53
|
+
updateDivWidthDebounced = f(() => this.updateDivWidth(), 50);
|
|
61
54
|
onScaleAdded = () => {
|
|
62
55
|
let { model: e, onModelChanged: t, configuration: n } = this.props, { scales: r, excludeZero: i } = e || {}, { maxNoOfScales: a } = n || {}, { defaultTraitLabel: o } = n || "";
|
|
63
56
|
if (r.length || (r = []), o = typeof o == "string" ? o : r[0]?.traitLabel || "", r.length === a) return this.set({
|
|
@@ -75,8 +68,8 @@ var S = class extends s.Component {
|
|
|
75
68
|
});
|
|
76
69
|
};
|
|
77
70
|
onScaleChanged = (e, t) => {
|
|
78
|
-
let { model: n, onModelChanged: a } = this.props, o =
|
|
79
|
-
if (e < 0 || e >= o.length ||
|
|
71
|
+
let { model: n, onModelChanged: a } = this.props, o = d((n || {}).scales);
|
|
72
|
+
if (e < 0 || e >= o.length || p(t)) return !1;
|
|
80
73
|
Object.keys(t).forEach((n) => {
|
|
81
74
|
o[e][n] = t[n];
|
|
82
75
|
}), n.excludeZero && t.maxPoints === 1 && (n.excludeZero = !1, o = i(o, r.add0)), a({
|
|
@@ -153,25 +146,25 @@ var S = class extends s.Component {
|
|
|
153
146
|
t === "excludeZero" ? this.showToggleExcludeZeroModal() : n(e);
|
|
154
147
|
};
|
|
155
148
|
render() {
|
|
156
|
-
let { model: e, configuration: t, onConfigurationChanged: r, uploadSoundSupport: i, imageSupport: s } = this.props || {}, { addScale: c, baseInputConfiguration:
|
|
157
|
-
standards: S.settings &&
|
|
158
|
-
"showLevelTagInput.enabled":
|
|
159
|
-
visibleToStudent: E.settings &&
|
|
160
|
-
excludeZero:
|
|
161
|
-
halfScoring: C.settings &&
|
|
162
|
-
"dragAndDrop.enabled": f.settings &&
|
|
149
|
+
let { model: e, configuration: t, onConfigurationChanged: r, uploadSoundSupport: i, imageSupport: s } = this.props || {}, { addScale: c, baseInputConfiguration: d = {}, dragAndDrop: f, contentDimensions: p = {}, showDescription: h, showExcludeZero: v, showLevelTagInput: x, showStandards: S, showHalfScoring: C, showMaxPoint: w, showScorePointLabels: T, showVisibleToStudent: E, spellCheck: D = {}, settingsPanelDisabled: O, maxNoOfTraits: k, minNoOfTraits: A, width: j, mathMlOptions: M = {}, maxMaxPoints: N, expandedInput: P = {}, labelInput: F = {} } = t || {}, { errors: I, extraCSSRules: L, scales: R, excludeZero: z, description: B, pointLabels: V, standards: H, spellCheckEnabled: U, maxPointsEnabled: W, addScaleEnabled: G } = e || {}, { showExcludeZeroDialog: K, showInfoDialog: q, infoDialogText: J, adjustedWidth: Y } = this.state || {}, X = R?.some((e) => e.maxPoints === 1), Z = {
|
|
150
|
+
standards: S.settings && _(S.label),
|
|
151
|
+
"showLevelTagInput.enabled": x.settings && _(x.label, !0),
|
|
152
|
+
visibleToStudent: E.settings && _(E.label),
|
|
153
|
+
excludeZero: v.settings && _(v.label, !1, X),
|
|
154
|
+
halfScoring: C.settings && _(C.label),
|
|
155
|
+
"dragAndDrop.enabled": f.settings && _(f.label, !0)
|
|
163
156
|
}, Q = {
|
|
164
|
-
description:
|
|
165
|
-
pointLabels: T.settings &&
|
|
166
|
-
spellCheckEnabled: D.settings &&
|
|
167
|
-
maxPointsEnabled: w.settings &&
|
|
168
|
-
addScaleEnabled: c.settings &&
|
|
169
|
-
}, $ = (e) => Object.assign({ ...
|
|
170
|
-
return /* @__PURE__ */
|
|
157
|
+
description: h.settings && _(h.label),
|
|
158
|
+
pointLabels: T.settings && _(T.label),
|
|
159
|
+
spellCheckEnabled: D.settings && _(D.label),
|
|
160
|
+
maxPointsEnabled: w.settings && _(w.label),
|
|
161
|
+
addScaleEnabled: c.settings && _(c.label)
|
|
162
|
+
}, $ = (e) => Object.assign({ ...d }, e || {});
|
|
163
|
+
return /* @__PURE__ */ u(m.ConfigLayout, {
|
|
171
164
|
extraCSSRules: L,
|
|
172
165
|
dimensions: p,
|
|
173
166
|
hideSettings: O,
|
|
174
|
-
settings: /* @__PURE__ */
|
|
167
|
+
settings: /* @__PURE__ */ l(g, {
|
|
175
168
|
model: e,
|
|
176
169
|
onChangeModel: this.onModelChanged,
|
|
177
170
|
configuration: t,
|
|
@@ -180,7 +173,7 @@ var S = class extends s.Component {
|
|
|
180
173
|
Settings: Z,
|
|
181
174
|
Properties: Q
|
|
182
175
|
},
|
|
183
|
-
modal: /* @__PURE__ */
|
|
176
|
+
modal: /* @__PURE__ */ l(b, {
|
|
184
177
|
showExcludeZeroDialog: K,
|
|
185
178
|
excludeZero: z,
|
|
186
179
|
changeExcludeZero: this.changeExcludeZero,
|
|
@@ -188,13 +181,13 @@ var S = class extends s.Component {
|
|
|
188
181
|
})
|
|
189
182
|
}),
|
|
190
183
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ l("div", {
|
|
192
185
|
style: { width: "100%" },
|
|
193
186
|
ref: this.divRef
|
|
194
187
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ u(y, {
|
|
196
189
|
style: { width: j || Y },
|
|
197
|
-
children: [(R || []).map((e, t) => /* @__PURE__ */
|
|
190
|
+
children: [(R || []).map((e, t) => /* @__PURE__ */ l(o, {
|
|
198
191
|
scale: e,
|
|
199
192
|
scaleIndex: t,
|
|
200
193
|
errors: I,
|
|
@@ -203,7 +196,7 @@ var S = class extends s.Component {
|
|
|
203
196
|
showStandards: H,
|
|
204
197
|
showScorePointLabels: V,
|
|
205
198
|
showDescription: B,
|
|
206
|
-
showLevelTagInput:
|
|
199
|
+
showLevelTagInput: x.enabled,
|
|
207
200
|
excludeZero: z,
|
|
208
201
|
enableDragAndDrop: f.enabled,
|
|
209
202
|
spellCheck: U,
|
|
@@ -218,12 +211,12 @@ var S = class extends s.Component {
|
|
|
218
211
|
maxMaxPoints: N,
|
|
219
212
|
expandedPluginProps: $(P?.inputConfiguration),
|
|
220
213
|
labelPluginProps: $(F?.inputConfiguration)
|
|
221
|
-
}, `scale-${t}`)), G && /* @__PURE__ */
|
|
214
|
+
}, `scale-${t}`)), G && /* @__PURE__ */ l(a, {
|
|
222
215
|
onClick: this.onScaleAdded,
|
|
223
216
|
children: "Add Scale"
|
|
224
217
|
})]
|
|
225
218
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ l(n, {
|
|
227
220
|
open: q,
|
|
228
221
|
text: J,
|
|
229
222
|
onClose: () => this.set({ showInfoDialog: !1 })
|
|
@@ -232,16 +225,5 @@ var S = class extends s.Component {
|
|
|
232
225
|
});
|
|
233
226
|
}
|
|
234
227
|
};
|
|
235
|
-
S.propTypes = {
|
|
236
|
-
model: c.object,
|
|
237
|
-
uploadSoundSupport: c.object,
|
|
238
|
-
configuration: c.object,
|
|
239
|
-
onModelChanged: c.func,
|
|
240
|
-
onConfigurationChanged: c.func,
|
|
241
|
-
imageSupport: c.shape({
|
|
242
|
-
add: c.func.isRequired,
|
|
243
|
-
delete: c.func.isRequired
|
|
244
|
-
})
|
|
245
|
-
};
|
|
246
228
|
//#endregion
|
|
247
|
-
export {
|
|
229
|
+
export { x as Main, x as default };
|
package/dist/author/scale.d.ts
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { ConfigureMathMLProp, EditableHtmlConfigureProp } from '@pie-element/shared-types';
|
|
3
|
+
import type { MultiTraitRubricValidationErrors } from '../controller/index.js';
|
|
4
|
+
import type { Scale as ScaleModel } from '../types.js';
|
|
5
|
+
import type { MainProps } from './main.js';
|
|
6
|
+
export type ScaleProps = {
|
|
7
|
+
errors?: MultiTraitRubricValidationErrors;
|
|
8
|
+
scale: ScaleModel;
|
|
9
|
+
scaleIndex: number;
|
|
10
|
+
onScaleChanged: (scaleIndex: number, params: Partial<ScaleModel>) => void;
|
|
11
|
+
onScaleRemoved: (scaleIndex: number) => void;
|
|
12
|
+
showStandards?: boolean;
|
|
13
|
+
showScorePointLabels?: boolean;
|
|
14
|
+
showDescription?: boolean;
|
|
15
|
+
showLevelTagInput?: boolean;
|
|
16
|
+
excludeZero?: boolean;
|
|
17
|
+
enableDragAndDrop?: boolean;
|
|
18
|
+
spellCheck?: boolean;
|
|
19
|
+
width?: string | number;
|
|
20
|
+
uploadSoundSupport?: MainProps['uploadSoundSupport'];
|
|
21
|
+
imageSupport?: MainProps['imageSupport'];
|
|
22
|
+
maxPointsEnabled?: boolean;
|
|
23
|
+
maxNoOfTraits?: number;
|
|
24
|
+
minNoOfTraits?: number;
|
|
25
|
+
mathMlOptions?: ConfigureMathMLProp;
|
|
26
|
+
maxMaxPoints?: number;
|
|
27
|
+
expandedPluginProps?: EditableHtmlConfigureProp;
|
|
28
|
+
labelPluginProps?: EditableHtmlConfigureProp;
|
|
29
|
+
};
|
|
30
|
+
export declare class Scale extends React.Component<ScaleProps> {
|
|
3
31
|
state: {
|
|
4
32
|
showDecreaseMaxPointsDialog: boolean;
|
|
5
33
|
showDeleteScaleDialog: boolean;
|
|
@@ -36672,15 +36672,12 @@ var Bq = class extends N.Component {
|
|
|
36672
36672
|
}), Wq = (e) => typeof e == "string" ? {
|
|
36673
36673
|
label: e,
|
|
36674
36674
|
value: e
|
|
36675
|
-
} : e, Gq =
|
|
36676
|
-
|
|
36677
|
-
|
|
36678
|
-
|
|
36679
|
-
|
|
36680
|
-
|
|
36681
|
-
isConfigProperty: n
|
|
36682
|
-
};
|
|
36683
|
-
}, Kq = (e, t, n = !1) => ({
|
|
36675
|
+
} : e, Gq = (e, t, n = !1) => ({
|
|
36676
|
+
type: "radio",
|
|
36677
|
+
label: e,
|
|
36678
|
+
choices: t && t.map((e) => Wq(e)),
|
|
36679
|
+
isConfigProperty: n
|
|
36680
|
+
}), Kq = (e, t, n = !1) => ({
|
|
36684
36681
|
type: "dropdown",
|
|
36685
36682
|
label: e,
|
|
36686
36683
|
choices: t,
|
|
@@ -37953,14 +37950,8 @@ var { Panel: xY, toggle: SY } = Vq, CY = "650px", wY = A("div")(({ theme: e }) =
|
|
|
37953
37950
|
open: e && t,
|
|
37954
37951
|
changeExcludeZero: n,
|
|
37955
37952
|
cancel: r
|
|
37956
|
-
}) : null
|
|
37957
|
-
|
|
37958
|
-
showExcludeZeroDialog: L.default.bool,
|
|
37959
|
-
excludeZero: L.default.bool,
|
|
37960
|
-
changeExcludeZero: L.default.func,
|
|
37961
|
-
cancel: L.default.func
|
|
37962
|
-
};
|
|
37963
|
-
var EY = class extends N.Component {
|
|
37953
|
+
}) : null, EY = class extends N.Component {
|
|
37954
|
+
divRef;
|
|
37964
37955
|
constructor(e) {
|
|
37965
37956
|
super(e), this.divRef = N.createRef(), this.updateDivWidth = this.updateDivWidth.bind(this);
|
|
37966
37957
|
}
|
|
@@ -38163,27 +38154,16 @@ var EY = class extends N.Component {
|
|
|
38163
38154
|
]
|
|
38164
38155
|
});
|
|
38165
38156
|
}
|
|
38166
|
-
}
|
|
38167
|
-
EY.propTypes = {
|
|
38168
|
-
model: L.default.object,
|
|
38169
|
-
uploadSoundSupport: L.default.object,
|
|
38170
|
-
configuration: L.default.object,
|
|
38171
|
-
onModelChanged: L.default.func,
|
|
38172
|
-
onConfigurationChanged: L.default.func,
|
|
38173
|
-
imageSupport: L.default.shape({
|
|
38174
|
-
add: L.default.func.isRequired,
|
|
38175
|
-
delete: L.default.func.isRequired
|
|
38176
|
-
})
|
|
38177
|
-
};
|
|
38178
|
-
//#endregion
|
|
38179
|
-
//#region src/author/index.ts
|
|
38180
|
-
var DY = (e) => ({
|
|
38157
|
+
}, DY = (e) => ({
|
|
38181
38158
|
...Qq.model,
|
|
38182
38159
|
...e
|
|
38183
38160
|
}), OY = (e) => ({
|
|
38184
38161
|
...Qq.configuration,
|
|
38185
38162
|
...e
|
|
38186
38163
|
}), kY = class extends HTMLElement {
|
|
38164
|
+
_root;
|
|
38165
|
+
_model;
|
|
38166
|
+
_configuration;
|
|
38187
38167
|
constructor() {
|
|
38188
38168
|
super(), this._root = null, this._model = DY(), this._configuration = OY();
|
|
38189
38169
|
}
|