@pie-element/matrix 5.0.1-next.20261002222413 → 5.0.1-next.20261003061051
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/HeaderCommon.d.ts +0 -8
- package/dist/author/Main.d.ts +0 -8
- package/dist/author/MatrixColumnsSizeHeaderInput.d.ts +0 -8
- package/dist/author/MatrixLabelEditableButton.d.ts +0 -8
- package/dist/author/MatrixLabelTypeHeaderInput.d.ts +0 -8
- package/dist/author/MatrixRowsSizeHeaderInput.d.ts +0 -8
- package/dist/author/MatrixValues.d.ts +0 -8
- package/dist/author/NumberInput.d.ts +0 -8
- package/dist/author/columnLabelsGenerator.d.ts +0 -8
- package/dist/author/defaults.d.ts +0 -8
- package/dist/author/index.d.ts +0 -8
- package/dist/author/isNumeric.d.ts +0 -8
- package/dist/author/matrixEntities.d.ts +0 -8
- package/dist/browser/author/index.js +37 -34
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +37 -34
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +0 -8
- package/dist/controller/index.d.ts +0 -8
- package/dist/delivery/ChoiceInput.d.ts +0 -8
- package/dist/delivery/Main.d.ts +0 -8
- package/dist/delivery/Matrix.d.ts +0 -8
- package/dist/delivery/index.d.ts +0 -8
- package/dist/index.iife.d.ts +0 -2
- package/package.json +5 -5
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/HeaderCommon.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
1
|
export declare const ColumnsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
10
2
|
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
11
3
|
}> & string;
|
package/dist/author/Main.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/Main.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
1
|
import React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
export declare class Main extends React.Component {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixColumnsSizeHeaderInput.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
1
|
import React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
declare const MatrixColumnsSizeHeaderInput: {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixLabelEditableButton.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
1
|
import React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
export declare const ACTION_TYPE: {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixLabelTypeHeaderInput.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
1
|
import React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
declare const MatrixLabelTypeHeaderInput: {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixRowsSizeHeaderInput.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
1
|
import React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
declare const MatrixColumnsRowInput: {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/MatrixValues.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
1
|
import React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
export declare const ScoringContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/NumberInput.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
1
|
import * as React from 'react';
|
|
10
2
|
import PropTypes from 'prop-types';
|
|
11
3
|
declare const NumericInput: {
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/columnLabelsGenerator.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
1
|
export declare const AGREEMENT_3: string[];
|
|
10
2
|
declare const generateColumnLabels: (labelType: any, size: any) => any;
|
|
11
3
|
export default generateColumnLabels;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/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
1
|
/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
|
|
10
2
|
* functionalities are not defined yet - the value for those can belong to
|
|
11
3
|
* model or to configure
|
package/dist/author/index.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/index.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
1
|
export default class Matrix extends HTMLElement {
|
|
10
2
|
static createDefaultModel: (model?: {}) => {
|
|
11
3
|
columnLabels: string[];
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/isNumeric.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
1
|
declare const _default: (value: any) => boolean;
|
|
10
2
|
export default _default;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/matrix/configure/src/matrixEntities.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
1
|
export declare const MATRIX_LABEL_TYPE: {
|
|
10
2
|
agreement: string;
|
|
11
3
|
frequency: string;
|
|
@@ -19515,11 +19515,20 @@ $T.propTypes = {
|
|
|
19515
19515
|
};
|
|
19516
19516
|
//#endregion
|
|
19517
19517
|
//#region ../../lib-react/editable-html-tip-tap/dist/extensions/responseArea.js
|
|
19518
|
-
var eE =
|
|
19518
|
+
var eE = (e) => String(e || "").replace(/-/g, "_"), tE = (e) => e && e.attrs && e.attrs.index != null ? String(e.attrs.index) : null, nE = (e, t) => {
|
|
19519
|
+
let n = 0;
|
|
19520
|
+
return e.descendants((e) => {
|
|
19521
|
+
if (e.type && e.type.name === t) {
|
|
19522
|
+
let t = parseInt(tE(e), 10);
|
|
19523
|
+
!Number.isNaN(t) && t > n && (n = t);
|
|
19524
|
+
}
|
|
19525
|
+
return !0;
|
|
19526
|
+
}), n;
|
|
19527
|
+
}, rE = (e, t) => {
|
|
19519
19528
|
let n = [];
|
|
19520
19529
|
return e.descendants((e, r) => {
|
|
19521
19530
|
if (e.type && e.type.name === t) {
|
|
19522
|
-
let t =
|
|
19531
|
+
let t = tE(e);
|
|
19523
19532
|
t != null && n.push({
|
|
19524
19533
|
index: t,
|
|
19525
19534
|
pos: r,
|
|
@@ -19552,59 +19561,53 @@ var eE = {}, tE = (e) => String(e || "").replace(/-/g, "_"), nE = (e) => e && e.
|
|
|
19552
19561
|
onHandleAreaChange: null
|
|
19553
19562
|
};
|
|
19554
19563
|
},
|
|
19564
|
+
addStorage() {
|
|
19565
|
+
return { lastIndexMap: {} };
|
|
19566
|
+
},
|
|
19555
19567
|
addProseMirrorPlugins() {
|
|
19556
19568
|
if (!this.options.type) return [];
|
|
19557
|
-
let e =
|
|
19569
|
+
let e = eE(this.options.type);
|
|
19558
19570
|
return [new ea({
|
|
19559
19571
|
key: new ra(`response-area-watcher:${e}`),
|
|
19560
|
-
view: (t) =>
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
|
|
19564
|
-
|
|
19565
|
-
|
|
19572
|
+
view: (t) => {
|
|
19573
|
+
let { lastIndexMap: n } = this.storage;
|
|
19574
|
+
return n[e] = Math.max(n[e] ?? 0, nE(t.state.doc, e)), { update: (t, n) => {
|
|
19575
|
+
let r = t.state;
|
|
19576
|
+
if (n.doc.eq(r.doc)) return;
|
|
19577
|
+
let i = rE(r.doc, e), a = rE(n.doc, e);
|
|
19578
|
+
if (this.options.toolbar && (this.options.toolbar.disabled = i.length >= this.options.maxResponseAreas), a.length > i.length) {
|
|
19579
|
+
let e = new Set(i.map((e) => e.index)), t = a.filter((t) => !e.has(t.index));
|
|
19580
|
+
t.length && typeof this.options.onHandleAreaChange == "function" && this.options.onHandleAreaChange(t);
|
|
19566
19581
|
}
|
|
19567
|
-
}
|
|
19568
|
-
|
|
19569
|
-
})), { update: (t, n) => {
|
|
19570
|
-
let r = t.state;
|
|
19571
|
-
if (n.doc.eq(r.doc)) return;
|
|
19572
|
-
let i = rE(r.doc, e), a = rE(n.doc, e);
|
|
19573
|
-
if (this.options.toolbar && (this.options.toolbar.disabled = i.length >= this.options.maxResponseAreas), a.length > i.length) {
|
|
19574
|
-
let e = new Set(i.map((e) => e.index)), t = a.filter((t) => !e.has(t.index));
|
|
19575
|
-
t.length && typeof this.options.onHandleAreaChange == "function" && this.options.onHandleAreaChange(t);
|
|
19576
|
-
}
|
|
19577
|
-
} })
|
|
19582
|
+
} };
|
|
19583
|
+
}
|
|
19578
19584
|
})];
|
|
19579
19585
|
},
|
|
19580
19586
|
addCommands() {
|
|
19581
19587
|
return {
|
|
19582
19588
|
insertResponseArea: (e) => ({ tr: t, state: n, dispatch: r, commands: i }) => {
|
|
19583
|
-
let a =
|
|
19589
|
+
let a = eE(e);
|
|
19584
19590
|
if (iE(n.doc, a) >= this.options.maxResponseAreas) return !1;
|
|
19585
|
-
|
|
19586
|
-
let o = eE[a] + 1;
|
|
19587
|
-
eE[a] += 1;
|
|
19588
|
-
let s = aE({
|
|
19591
|
+
let { lastIndexMap: o } = this.storage, s = Math.max(o[a] ?? 0, nE(n.doc, a)) + 1, c = aE({
|
|
19589
19592
|
schema: n.schema,
|
|
19590
19593
|
typeName: a,
|
|
19591
|
-
index:
|
|
19594
|
+
index: s
|
|
19592
19595
|
});
|
|
19593
|
-
if (!
|
|
19594
|
-
let { selection:
|
|
19596
|
+
if (!c) return !1;
|
|
19597
|
+
let { selection: l } = n, u = l.from, d = (e) => {
|
|
19595
19598
|
try {
|
|
19596
|
-
return t.insert(e,
|
|
19599
|
+
return t.insert(e, c), e;
|
|
19597
19600
|
} catch {
|
|
19598
19601
|
return null;
|
|
19599
19602
|
}
|
|
19600
|
-
},
|
|
19601
|
-
if (
|
|
19602
|
-
if (["inline_dropdown", "explicit_constructed_response"].includes(a)) t.setSelection(L.create(t.doc,
|
|
19603
|
+
}, f = d(u);
|
|
19604
|
+
if (f ??= d(t.doc.content.size), f == null) return !1;
|
|
19605
|
+
if (["inline_dropdown", "explicit_constructed_response"].includes(a)) t.setSelection(L.create(t.doc, f));
|
|
19603
19606
|
else {
|
|
19604
|
-
let e =
|
|
19607
|
+
let e = f + c.nodeSize;
|
|
19605
19608
|
t.setSelection(oE(t.doc, e));
|
|
19606
19609
|
}
|
|
19607
|
-
return r && (i.focus(), r(t)), !0;
|
|
19610
|
+
return r && (o[a] = s, i.focus(), r(t)), !0;
|
|
19608
19611
|
},
|
|
19609
19612
|
refreshResponseArea: () => ({ tr: e, state: t, commands: n, dispatch: r }) => {
|
|
19610
19613
|
let { selection: i } = t, a = i.$from.nodeAfter, o = i.from;
|