@pie-element/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 +18 -18
- package/dist/author/index.d.ts +15 -7
- package/dist/author/index.js +3 -0
- package/dist/author/main.d.ts +40 -2
- package/dist/author/main.js +1 -3
- package/dist/browser/author/index.js +12 -12
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +2 -2
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +12 -12
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +2 -2
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +3 -3
- package/dist/controller/index.d.ts +8 -2
- package/dist/controller/index.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +268 -0
- package/dist/schemas/model.schema.json +359 -0
- package/dist/schemas/session.schema.json +17 -0
- package/dist/types.d.ts +92 -0
- package/package.json +16 -12
|
@@ -3,59 +3,59 @@ declare const _default: {
|
|
|
3
3
|
points: string[];
|
|
4
4
|
sampleAnswers: null[];
|
|
5
5
|
maxPoints: number;
|
|
6
|
-
excludeZero:
|
|
7
|
-
excludeZeroEnabled:
|
|
8
|
-
maxPointsEnabled:
|
|
6
|
+
excludeZero: false;
|
|
7
|
+
excludeZeroEnabled: true;
|
|
8
|
+
maxPointsEnabled: true;
|
|
9
9
|
};
|
|
10
10
|
configuration: {
|
|
11
11
|
baseInputConfiguration: {
|
|
12
12
|
h3: {
|
|
13
|
-
disabled:
|
|
13
|
+
disabled: true;
|
|
14
14
|
};
|
|
15
15
|
audio: {
|
|
16
|
-
disabled:
|
|
16
|
+
disabled: false;
|
|
17
17
|
};
|
|
18
18
|
video: {
|
|
19
|
-
disabled:
|
|
19
|
+
disabled: false;
|
|
20
20
|
};
|
|
21
21
|
image: {
|
|
22
|
-
disabled:
|
|
22
|
+
disabled: false;
|
|
23
23
|
};
|
|
24
24
|
textAlign: {
|
|
25
|
-
disabled:
|
|
25
|
+
disabled: true;
|
|
26
26
|
};
|
|
27
27
|
showParagraphs: {
|
|
28
|
-
disabled:
|
|
28
|
+
disabled: false;
|
|
29
29
|
};
|
|
30
30
|
separateParagraphs: {
|
|
31
|
-
disabled:
|
|
31
|
+
disabled: true;
|
|
32
32
|
};
|
|
33
33
|
};
|
|
34
34
|
rubriclessInstruction: {
|
|
35
35
|
inputConfiguration: {
|
|
36
36
|
audio: {
|
|
37
|
-
disabled:
|
|
37
|
+
disabled: false;
|
|
38
38
|
};
|
|
39
39
|
video: {
|
|
40
|
-
disabled:
|
|
40
|
+
disabled: false;
|
|
41
41
|
};
|
|
42
42
|
image: {
|
|
43
|
-
disabled:
|
|
43
|
+
disabled: false;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
showExcludeZero: {
|
|
48
|
-
settings:
|
|
48
|
+
settings: true;
|
|
49
49
|
label: string;
|
|
50
50
|
};
|
|
51
51
|
showMaxPoint: {
|
|
52
|
-
settings:
|
|
52
|
+
settings: true;
|
|
53
53
|
label: string;
|
|
54
54
|
};
|
|
55
|
-
settingsPanelDisabled:
|
|
55
|
+
settingsPanelDisabled: false;
|
|
56
56
|
mathMlOptions: {
|
|
57
|
-
mmlOutput:
|
|
58
|
-
mmlEditing:
|
|
57
|
+
mmlOutput: false;
|
|
58
|
+
mmlEditing: false;
|
|
59
59
|
};
|
|
60
60
|
maxMaxPoints: number;
|
|
61
61
|
};
|
package/dist/author/index.d.ts
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
import { type DeleteDone, type ImageHandler } from '@pie-element/shared-configure-events';
|
|
2
|
+
import { type AuthorModel } from './main.js';
|
|
3
|
+
import type { RubricConfiguration, RubricModel } from '../types.js';
|
|
4
|
+
type ModelInput = Partial<RubricModel> & Pick<Partial<AuthorModel>, 'errors'>;
|
|
1
5
|
export default class RubricElement 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(m:
|
|
7
|
-
onConfigurationChanged:
|
|
8
|
-
insertImage(handler:
|
|
9
|
-
onDeleteImage(src:
|
|
10
|
+
updateModelAccordingToReceivedProps: (nextModel: AuthorModel) => AuthorModel;
|
|
11
|
+
set model(m: ModelInput);
|
|
12
|
+
set configuration(c: RubricConfiguration);
|
|
13
|
+
onModelChanged(m: AuthorModel): void;
|
|
14
|
+
onConfigurationChanged: (c: RubricConfiguration) => void;
|
|
15
|
+
insertImage(handler: ImageHandler): void;
|
|
16
|
+
onDeleteImage(src: string, done: DeleteDone): void;
|
|
10
17
|
connectedCallback(): void;
|
|
11
18
|
_render(): void;
|
|
12
19
|
disconnectedCallback(): void;
|
|
13
20
|
}
|
|
21
|
+
export {};
|
package/dist/author/index.js
CHANGED
|
@@ -12,6 +12,9 @@ var c = (e) => ({
|
|
|
12
12
|
...t.configuration,
|
|
13
13
|
...e
|
|
14
14
|
}), u = class extends HTMLElement {
|
|
15
|
+
_root;
|
|
16
|
+
_model;
|
|
17
|
+
_configuration;
|
|
15
18
|
constructor() {
|
|
16
19
|
super(), this._root = null, i.log("constructor called"), this._model = c(), this._configuration = l(), this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
17
20
|
}
|
package/dist/author/main.d.ts
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { DeleteDone, ImageHandler } from '@pie-element/shared-configure-events';
|
|
3
|
+
import type { EditableHtmlPluginConfigure } from '@pie-element/shared-types';
|
|
4
|
+
import type { RubricValidationErrors } from '../controller/index.js';
|
|
5
|
+
import type { RubricConfiguration, RubricModel } from '../types.js';
|
|
6
|
+
/** The model the author edits: the defaults supply `maxPoints`; a host sets `errors` from the controller's `validate()`. */
|
|
7
|
+
export type AuthorModel = Partial<RubricModel> & {
|
|
8
|
+
maxPoints: number;
|
|
9
|
+
errors?: RubricValidationErrors;
|
|
10
|
+
};
|
|
11
|
+
/** The configuration the author renders: the defaults supply `rubriclessInstruction`. */
|
|
12
|
+
export type AuthorConfiguration = RubricConfiguration & {
|
|
13
|
+
rubriclessInstruction: EditableHtmlPluginConfigure;
|
|
14
|
+
};
|
|
15
|
+
export type MainProps = {
|
|
16
|
+
model: AuthorModel;
|
|
17
|
+
configuration: AuthorConfiguration;
|
|
18
|
+
onModelChanged: (model: AuthorModel) => void;
|
|
19
|
+
onConfigurationChanged: (configuration: RubricConfiguration) => void;
|
|
20
|
+
imageSupport?: {
|
|
21
|
+
add: (handler: ImageHandler) => void;
|
|
22
|
+
delete: (src: string, done: DeleteDone) => void;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
declare class Main extends React.Component<MainProps> {
|
|
26
|
+
verifyRubriclessModel: (m: AuthorModel, config: RubricConfiguration) => {
|
|
27
|
+
maxPoints: number;
|
|
28
|
+
excludeZero?: boolean | undefined;
|
|
29
|
+
excludeZeros?: boolean | undefined;
|
|
30
|
+
excludeZeroEnabled?: boolean | undefined;
|
|
31
|
+
maxPointsEnabled?: boolean | undefined;
|
|
32
|
+
rubriclessInstructionEnabled?: boolean | undefined;
|
|
33
|
+
rubriclessInstruction?: string | undefined;
|
|
34
|
+
animationsDisabled?: boolean | undefined;
|
|
35
|
+
language?: string | undefined;
|
|
36
|
+
extraCSSRules?: import("@pie-element/shared-types").ExtraCSSRules | undefined;
|
|
37
|
+
id?: string | undefined;
|
|
38
|
+
element?: string | undefined;
|
|
39
|
+
accessibilityCatalogs?: import("@pie-element/shared-types").AccessibilityCatalog[] | undefined;
|
|
40
|
+
errors?: RubricValidationErrors;
|
|
41
|
+
};
|
|
4
42
|
render(): React.JSX.Element;
|
|
5
43
|
}
|
|
6
44
|
export default Main;
|
package/dist/author/main.js
CHANGED
|
@@ -28,9 +28,7 @@ var { Panel: o, toggle: s } = a, c = t("div")(({ theme: e, width: t }) => ({
|
|
|
28
28
|
onChangeModel: l,
|
|
29
29
|
configuration: t,
|
|
30
30
|
onChangeConfiguration: a,
|
|
31
|
-
|
|
32
|
-
groups: { Properties: S },
|
|
33
|
-
imageSupport: u
|
|
31
|
+
groups: { Properties: S }
|
|
34
32
|
}),
|
|
35
33
|
children: /* @__PURE__ */ n(c, {
|
|
36
34
|
width: y,
|
|
@@ -39876,15 +39876,12 @@ var f$ = class extends j.Component {
|
|
|
39876
39876
|
}), g$ = (e) => typeof e == "string" ? {
|
|
39877
39877
|
label: e,
|
|
39878
39878
|
value: e
|
|
39879
|
-
} : e, _$ =
|
|
39880
|
-
|
|
39881
|
-
|
|
39882
|
-
|
|
39883
|
-
|
|
39884
|
-
|
|
39885
|
-
isConfigProperty: n
|
|
39886
|
-
};
|
|
39887
|
-
}, v$ = (e, t, n = !1) => ({
|
|
39879
|
+
} : e, _$ = (e, t, n = !1) => ({
|
|
39880
|
+
type: "radio",
|
|
39881
|
+
label: e,
|
|
39882
|
+
choices: t && t.map((e) => g$(e)),
|
|
39883
|
+
isConfigProperty: n
|
|
39884
|
+
}), v$ = (e, t, n = !1) => ({
|
|
39888
39885
|
type: "dropdown",
|
|
39889
39886
|
label: e,
|
|
39890
39887
|
choices: t,
|
|
@@ -40190,6 +40187,8 @@ J$.propTypes = {
|
|
|
40190
40187
|
value: j$,
|
|
40191
40188
|
config: F.default.object,
|
|
40192
40189
|
pluginOpts: F.default.object,
|
|
40190
|
+
mathMlOptions: F.default.object,
|
|
40191
|
+
imageSupport: F.default.object,
|
|
40193
40192
|
rubricless: F.default.bool,
|
|
40194
40193
|
getIndex: F.default.func,
|
|
40195
40194
|
onChange: F.default.func
|
|
@@ -40220,9 +40219,7 @@ var { Panel: Y$, toggle: X$ } = p$, Z$ = D("div")(({ theme: e, width: t }) => ({
|
|
|
40220
40219
|
onChangeModel: r,
|
|
40221
40220
|
configuration: t,
|
|
40222
40221
|
onChangeConfiguration: n,
|
|
40223
|
-
|
|
40224
|
-
groups: { Properties: g },
|
|
40225
|
-
imageSupport: i
|
|
40222
|
+
groups: { Properties: g }
|
|
40226
40223
|
}),
|
|
40227
40224
|
children: /* @__PURE__ */ N(Z$, {
|
|
40228
40225
|
width: p,
|
|
@@ -40294,6 +40291,9 @@ var { Panel: Y$, toggle: X$ } = p$, Z$ = D("div")(({ theme: e, width: t }) => ({
|
|
|
40294
40291
|
...$$.configuration,
|
|
40295
40292
|
...e
|
|
40296
40293
|
}), n1 = class extends HTMLElement {
|
|
40294
|
+
_root;
|
|
40295
|
+
_model;
|
|
40296
|
+
_configuration;
|
|
40297
40297
|
constructor() {
|
|
40298
40298
|
super(), this._root = null, ip.log("constructor called"), this._model = e1(), this._configuration = t1(), this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
40299
40299
|
}
|