@pie-element/passage 7.1.1-next.11 → 7.1.2-next.0
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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/common.d.ts +36 -0
- package/dist/author/common.js +56 -0
- package/dist/author/defaults.d.ts +175 -0
- package/dist/author/defaults.js +113 -0
- package/dist/author/design.d.ts +28 -0
- package/dist/author/design.js +120 -0
- package/dist/author/index.d.ts +36 -0
- package/dist/author/index.js +66 -0
- package/dist/author/passage.d.ts +27 -0
- package/dist/author/passage.js +127 -0
- package/dist/browser/author/index.js +39774 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +64 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/debounce-CUPmq2t-.js +86 -0
- package/dist/browser/debounce-CUPmq2t-.js.map +1 -0
- package/dist/browser/delivery/index.js +117 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/dist-C_PfhNd9.js +9602 -0
- package/dist/browser/dist-C_PfhNd9.js.map +1 -0
- package/dist/browser/isEmpty-xEtDXvJL.js +143 -0
- package/dist/browser/isEmpty-xEtDXvJL.js.map +1 -0
- package/dist/browser/isObjectLike-qb18ZQkj.js +38 -0
- package/dist/browser/isObjectLike-qb18ZQkj.js.map +1 -0
- package/dist/browser/passage.css +2 -0
- package/dist/browser/print/index.js +48 -0
- package/dist/browser/print/index.js.map +1 -0
- package/dist/browser/stimulus-tabs-CMox8txJ.js +218 -0
- package/dist/browser/stimulus-tabs-CMox8txJ.js.map +1 -0
- package/dist/controller/defaults.d.ts +23 -0
- package/dist/controller/defaults.js +17 -0
- package/dist/controller/index.d.ts +18 -0
- package/dist/controller/index.js +50 -0
- package/dist/delivery/index.d.ts +22 -0
- package/dist/delivery/index.js +83 -0
- package/dist/delivery/stimulus-tabs.d.ts +21 -0
- package/dist/delivery/stimulus-tabs.js +220 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +145 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/print/index.d.ts +15 -0
- package/dist/print/index.js +47 -0
- package/package.json +83 -19
- package/CHANGELOG.json +0 -227
- package/CHANGELOG.md +0 -1452
- package/LICENSE.md +0 -5
- package/README.md +0 -3
- package/configure/CHANGELOG.md +0 -672
- package/configure/lib/common.js +0 -74
- package/configure/lib/common.js.map +0 -1
- package/configure/lib/defaults.js +0 -174
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/design.js +0 -185
- package/configure/lib/design.js.map +0 -1
- package/configure/lib/index.js +0 -86
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/passage.js +0 -194
- package/configure/lib/passage.js.map +0 -1
- package/configure/package.json +0 -23
- package/controller/CHANGELOG.json +0 -1
- package/controller/CHANGELOG.md +0 -109
- package/controller/lib/defaults.js +0 -23
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -80
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -13
- package/docs/config-schema.json +0 -1325
- package/docs/config-schema.json.md +0 -974
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -32
- package/docs/demo/index.html +0 -1
- package/docs/pie-schema.json +0 -775
- package/docs/pie-schema.json.md +0 -561
- package/lib/index.js +0 -143
- package/lib/index.js.map +0 -1
- package/lib/print.js +0 -78
- package/lib/print.js.map +0 -1
- package/lib/stimulus-tabs.js +0 -323
- package/lib/stimulus-tabs.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -920
- package/module/demo.js +0 -57
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -10
- package/module/print-demo.js +0 -95
- package/module/print.html +0 -18
- package/module/print.js +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { InputContainer as a } from "@pie-lib/config-ui";
|
|
6
|
+
import o, { ALL_PLUGINS as s } from "@pie-lib/editable-html-tip-tap";
|
|
7
|
+
//#region src/author/passage.tsx
|
|
8
|
+
var c = n(a)(({ theme: e }) => ({
|
|
9
|
+
paddingTop: e.spacing(2),
|
|
10
|
+
marginBottom: e.spacing(2),
|
|
11
|
+
width: "100%"
|
|
12
|
+
})), l = n("div")(({ theme: e }) => ({
|
|
13
|
+
fontSize: e.typography.fontSize - 2,
|
|
14
|
+
color: e.palette.error.main,
|
|
15
|
+
paddingTop: e.spacing(1)
|
|
16
|
+
})), u = class extends e.Component {
|
|
17
|
+
static propTypes = {
|
|
18
|
+
onModelChanged: t.func.isRequired,
|
|
19
|
+
model: t.object.isRequired,
|
|
20
|
+
configuration: t.object.isRequired,
|
|
21
|
+
imageSupport: t.object.isRequired,
|
|
22
|
+
passageIndex: t.number.isRequired,
|
|
23
|
+
uploadSoundSupport: t.object.isRequired
|
|
24
|
+
};
|
|
25
|
+
static defaultProps = { passageIndex: 0 };
|
|
26
|
+
constructor(e) {
|
|
27
|
+
super(e);
|
|
28
|
+
}
|
|
29
|
+
handleChange = (e, t) => {
|
|
30
|
+
let { model: n, onModelChanged: r, passageIndex: i } = this.props;
|
|
31
|
+
if (!n.passages || i < 0 || i >= n.passages.length) return;
|
|
32
|
+
let a = [...n.passages];
|
|
33
|
+
a[i] = {
|
|
34
|
+
...a[i],
|
|
35
|
+
[e]: t
|
|
36
|
+
}, r({
|
|
37
|
+
...n,
|
|
38
|
+
passages: a
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
render() {
|
|
42
|
+
let { model: t, configuration: n, imageSupport: a, passageIndex: u, uploadSoundSupport: d } = this.props, { maxImageWidth: f = {}, maxImageHeight: p = {}, mathMlOptions: m = {}, baseInputConfiguration: h = {}, teacherInstructions: g = {}, title: _ = {}, subtitle: v = {}, text: y = {}, author: b = {} } = n || {}, { errors: x = {}, passages: S = [], teacherInstructionsEnabled: C, titleEnabled: w, subtitleEnabled: T, authorEnabled: E, textEnabled: D } = t || {}, { passages: O } = x || {}, { teacherInstructions: k, title: A, subtitle: j, author: M, text: N } = O && O[u] || {}, P = f && f.prompt, F = p && p.prompt, I = (e) => ({
|
|
43
|
+
...h,
|
|
44
|
+
...e
|
|
45
|
+
}), L = (s || []).filter((e) => ![
|
|
46
|
+
"math",
|
|
47
|
+
"table",
|
|
48
|
+
"bulleted-list",
|
|
49
|
+
"numbered-list"
|
|
50
|
+
].includes(e));
|
|
51
|
+
return /* @__PURE__ */ i(e.Fragment, { children: [
|
|
52
|
+
C && /* @__PURE__ */ i(c, {
|
|
53
|
+
label: g.label,
|
|
54
|
+
children: [/* @__PURE__ */ r(o, {
|
|
55
|
+
activePlugins: s,
|
|
56
|
+
markup: S[u].teacherInstructions || "",
|
|
57
|
+
onChange: (e) => this.handleChange("teacherInstructions", e),
|
|
58
|
+
nonEmpty: !1,
|
|
59
|
+
error: k,
|
|
60
|
+
maxImageWidth: f && f.teacherInstructions || P,
|
|
61
|
+
maxImageHeight: p && p.teacherInstructions || F,
|
|
62
|
+
mathMlOptions: m,
|
|
63
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
64
|
+
pluginProps: I(g?.inputConfiguration)
|
|
65
|
+
}), k && /* @__PURE__ */ r(l, { children: k })]
|
|
66
|
+
}),
|
|
67
|
+
w && /* @__PURE__ */ i(c, {
|
|
68
|
+
label: _.label,
|
|
69
|
+
children: [/* @__PURE__ */ r(o, {
|
|
70
|
+
activePlugins: L,
|
|
71
|
+
markup: S[u].title || "",
|
|
72
|
+
onChange: (e) => this.handleChange("title", e),
|
|
73
|
+
nonEmpty: !1,
|
|
74
|
+
error: A,
|
|
75
|
+
mathMlOptions: m,
|
|
76
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
77
|
+
pluginProps: I(_?.inputConfiguration)
|
|
78
|
+
}), A && /* @__PURE__ */ r(l, { children: A })]
|
|
79
|
+
}),
|
|
80
|
+
T && /* @__PURE__ */ i(c, {
|
|
81
|
+
label: v.label,
|
|
82
|
+
children: [/* @__PURE__ */ r(o, {
|
|
83
|
+
activePlugins: L,
|
|
84
|
+
markup: S[u].subtitle || "",
|
|
85
|
+
onChange: (e) => this.handleChange("subtitle", e),
|
|
86
|
+
nonEmpty: !1,
|
|
87
|
+
error: j,
|
|
88
|
+
mathMlOptions: m,
|
|
89
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
90
|
+
pluginProps: I(v?.inputConfiguration)
|
|
91
|
+
}), j && /* @__PURE__ */ r(l, { children: j })]
|
|
92
|
+
}),
|
|
93
|
+
E && /* @__PURE__ */ i(c, {
|
|
94
|
+
label: b.label,
|
|
95
|
+
children: [/* @__PURE__ */ r(o, {
|
|
96
|
+
activePlugins: L,
|
|
97
|
+
markup: S[u].author || "",
|
|
98
|
+
onChange: (e) => this.handleChange("author", e),
|
|
99
|
+
nonEmpty: !1,
|
|
100
|
+
error: M,
|
|
101
|
+
mathMlOptions: m,
|
|
102
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
103
|
+
pluginProps: I(b?.inputConfiguration)
|
|
104
|
+
}), M && /* @__PURE__ */ r(l, { children: M })]
|
|
105
|
+
}),
|
|
106
|
+
D && /* @__PURE__ */ i(c, {
|
|
107
|
+
label: y.label,
|
|
108
|
+
children: [/* @__PURE__ */ r(o, {
|
|
109
|
+
activePlugins: s,
|
|
110
|
+
markup: S[u].text || "",
|
|
111
|
+
onChange: (e) => this.handleChange("text", e),
|
|
112
|
+
imageSupport: a,
|
|
113
|
+
uploadSoundSupport: d,
|
|
114
|
+
nonEmpty: !1,
|
|
115
|
+
error: N,
|
|
116
|
+
maxImageWidth: f && f.text || P,
|
|
117
|
+
maxImageHeight: p && p.text || F,
|
|
118
|
+
mathMlOptions: m,
|
|
119
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
120
|
+
pluginProps: I(y?.inputConfiguration)
|
|
121
|
+
}), N && /* @__PURE__ */ r(l, { children: N })]
|
|
122
|
+
})
|
|
123
|
+
] });
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
//#endregion
|
|
127
|
+
export { u as default };
|