@pie-element/passage 2.18.4-next.9 → 2.18.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/CHANGELOG.md +12 -0
- package/configure/CHANGELOG.md +11 -0
- package/configure/package.json +2 -2
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/module/configure.js +1 -1
- package/module/element.js +3 -2
- package/module/manifest.json +1 -1
- package/module/print.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.18.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@2.18.3...@pie-element/passage@2.18.4) (2024-07-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* udate pie-lib/pie-toolbox PD-3622, PD-3627, PD-3629, PD-3630, PD-3631 ([1e50c85](https://github.com/pie-framework/pie-elements/commit/1e50c859e2b5133e1ff9ef81f4169e49e76d9e4b))
|
|
12
|
+
* **passage:** render math content in student side PD-3885 ([36207b8](https://github.com/pie-framework/pie-elements/commit/36207b8b28f0cdea42e881124cf0d0f79294cb7c))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [2.18.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@2.18.2...@pie-element/passage@2.18.3) (2024-07-10)
|
|
7
19
|
|
|
8
20
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.3.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage-configure@1.3.3...@pie-element/passage-configure@1.3.4) (2024-07-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* udate pie-lib/pie-toolbox PD-3622, PD-3627, PD-3629, PD-3630, PD-3631 ([1e50c85](https://github.com/pie-framework/pie-elements/commit/1e50c859e2b5133e1ff9ef81f4169e49e76d9e4b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage-configure@1.3.2...@pie-element/passage-configure@1.3.3) (2024-07-10)
|
|
7
18
|
|
|
8
19
|
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/passage-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.4",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@material-ui/core": "^3.9.2",
|
|
12
12
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
13
|
-
"@pie-lib/pie-toolbox": "1.
|
|
13
|
+
"@pie-lib/pie-toolbox": "1.26.0",
|
|
14
14
|
"lodash": "^4.17.15",
|
|
15
15
|
"prop-types": "^15.6.2",
|
|
16
16
|
"react": "^16.8.1",
|
package/lib/index.js
CHANGED
|
@@ -23,6 +23,8 @@ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/w
|
|
|
23
23
|
|
|
24
24
|
var _piePlayerEvents = require("@pie-framework/pie-player-events");
|
|
25
25
|
|
|
26
|
+
var _mathRenderingAccessible = require("@pie-lib/pie-toolbox/math-rendering-accessible");
|
|
27
|
+
|
|
26
28
|
var _react = _interopRequireDefault(require("react"));
|
|
27
29
|
|
|
28
30
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
@@ -82,6 +84,8 @@ var PiePassage = /*#__PURE__*/function (_HTMLElement) {
|
|
|
82
84
|
}, {
|
|
83
85
|
key: "_render",
|
|
84
86
|
value: function _render() {
|
|
87
|
+
var _this2 = this;
|
|
88
|
+
|
|
85
89
|
var _this$_model = this._model,
|
|
86
90
|
_this$_model$passages = _this$_model.passages,
|
|
87
91
|
passages = _this$_model$passages === void 0 ? [] : _this$_model$passages,
|
|
@@ -105,7 +109,9 @@ var PiePassage = /*#__PURE__*/function (_HTMLElement) {
|
|
|
105
109
|
showTeacherInstructions: showTeacherInstructions
|
|
106
110
|
});
|
|
107
111
|
|
|
108
|
-
_reactDom["default"].render(elem, this)
|
|
112
|
+
_reactDom["default"].render(elem, this, function () {
|
|
113
|
+
return (0, _mathRenderingAccessible.renderMath)(_this2);
|
|
114
|
+
});
|
|
109
115
|
}
|
|
110
116
|
}
|
|
111
117
|
}]);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["PiePassage","_model","passages","_session","language","lang","slice","setAttribute","s","dispatchEvent","ModelSetEvent","tagName","toLowerCase","setLangAttribute","_render","showTeacherInstructions","length","passagesTabs","map","passage","index","id","title","subtitle","author","text","teacherInstructions","elem","React","createElement","StimulusTabs","tabs","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;IAEqBA,U;;;;;AACnB,wBAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAc;AACZC,MAAAA,QAAQ,EAAE;AADE,KAAd;AAGA,UAAKC,QAAL,GAAgB,IAAhB;AALY;AAMb;;;;WAED,4BAAmB;AACjB,UAAMC,QAAQ,GAAG,KAAKH,MAAL,6BAAsB,KAAKA,MAAL,CAAYG,QAAlC,IAA6C,KAAKH,MAAL,CAAYG,QAAzD,GAAoE,EAArF;AACA,UAAMC,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B;;AAQA,YAAMC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,wBAApB,EAAkC;AAC7CC,UAAAA,IAAI,EAAEd,YADuC;AAE7CF,UAAAA,uBAAuB,EAAvBA;AAF6C,SAAlC,CAAb;;AAKAiB,6BAASC,MAAT,CAAgBN,IAAhB,EAAsB,IAAtB;AACD;AACF;;;kDApDqCO,W","sourcesContent":["import { ModelSetEvent } from '@pie-framework/pie-player-events';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport StimulusTabs from './stimulus-tabs';\n\nexport default class PiePassage extends HTMLElement {\n constructor() {\n super();\n this._model = {\n passages: [],\n };\n this._session = null;\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n }\n\n set model(s) {\n this._model = s;\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this._session, !!this._model));\n this.setLangAttribute();\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n }\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Passage');\n this.setAttribute('role', 'region');\n this._render();\n }\n\n _render() {\n const { passages = [], showTeacherInstructions = false } = this._model;\n\n if (this._model.passages.length > 0) {\n const passagesTabs = passages.map((passage, index) => ({\n id: index,\n title: passage.title,\n subtitle: passage.subtitle,\n author: passage.author,\n text: passage.text,\n teacherInstructions: passage.teacherInstructions || '',\n }));\n const elem = React.createElement(StimulusTabs, {\n tabs: passagesTabs,\n showTeacherInstructions,\n });\n\n ReactDOM.render(elem, this);\n }\n }\n}\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["PiePassage","_model","passages","_session","language","lang","slice","setAttribute","s","dispatchEvent","ModelSetEvent","tagName","toLowerCase","setLangAttribute","_render","showTeacherInstructions","length","passagesTabs","map","passage","index","id","title","subtitle","author","text","teacherInstructions","elem","React","createElement","StimulusTabs","tabs","ReactDOM","render","HTMLElement"],"mappings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AGf,QAAQ,CAACgB,GAAT,CAAa,UAACC,OAAD,EAAUC,KAAV;AAAA,iBAAqB;AACrDC,YAAAA,EAAE,EAAED,KADiD;AAErDE,YAAAA,KAAK,EAAEH,OAAO,CAACG,KAFsC;AAGrDC,YAAAA,QAAQ,EAAEJ,OAAO,CAACI,QAHmC;AAIrDC,YAAAA,MAAM,EAAEL,OAAO,CAACK,MAJqC;AAKrDC,YAAAA,IAAI,EAAEN,OAAO,CAACM,IALuC;AAMrDC,YAAAA,mBAAmB,EAAEP,OAAO,CAACO,mBAAR,IAA+B;AANC,WAArB;AAAA,SAAb,CAArB;;AAQA,YAAMC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,wBAApB,EAAkC;AAC7CC,UAAAA,IAAI,EAAEd,YADuC;AAE7CF,UAAAA,uBAAuB,EAAvBA;AAF6C,SAAlC,CAAb;;AAKAiB,6BAASC,MAAT,CAAgBN,IAAhB,EAAsB,IAAtB,EAA4B;AAAA,iBAAM,yCAAW,MAAX,CAAN;AAAA,SAA5B;AACD;AACF;;;kDApDqCO,W","sourcesContent":["import { ModelSetEvent } from '@pie-framework/pie-player-events';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport StimulusTabs from './stimulus-tabs';\n\nexport default class PiePassage extends HTMLElement {\n constructor() {\n super();\n this._model = {\n passages: [],\n };\n this._session = null;\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n }\n\n set model(s) {\n this._model = s;\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), this._session, !!this._model));\n this.setLangAttribute();\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n }\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Passage');\n this.setAttribute('role', 'region');\n this._render();\n }\n\n _render() {\n const { passages = [], showTeacherInstructions = false } = this._model;\n\n if (this._model.passages.length > 0) {\n const passagesTabs = passages.map((passage, index) => ({\n id: index,\n title: passage.title,\n subtitle: passage.subtitle,\n author: passage.author,\n text: passage.text,\n teacherInstructions: passage.teacherInstructions || '',\n }));\n const elem = React.createElement(StimulusTabs, {\n tabs: passagesTabs,\n showTeacherInstructions,\n });\n\n ReactDOM.render(elem, this, () => renderMath(this));\n }\n }\n}\n"],"file":"index.js"}
|
package/module/configure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.3/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
package/module/element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.3/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
@@ -8881,6 +8881,7 @@ StimulusTabs.propTypes = {
|
|
|
8881
8881
|
showTeacherInstructions: PropTypes.bool
|
|
8882
8882
|
};
|
|
8883
8883
|
var StimulusTabs$1 = styles$1.withStyles(styles)(StimulusTabs);
|
|
8884
|
+
const {renderMath: renderMath} = _dll_pie_lib__pie_toolbox_math_rendering_accessible;
|
|
8884
8885
|
const React = _dll_react;
|
|
8885
8886
|
const ReactDOM = _dll_react_dom;
|
|
8886
8887
|
class PiePassage extends HTMLElement {
|
|
@@ -8925,7 +8926,7 @@ class PiePassage extends HTMLElement {
|
|
|
8925
8926
|
tabs: passagesTabs,
|
|
8926
8927
|
showTeacherInstructions
|
|
8927
8928
|
});
|
|
8928
|
-
ReactDOM.render(elem, this);
|
|
8929
|
+
ReactDOM.render(elem, this, () => renderMath(this));
|
|
8929
8930
|
}
|
|
8930
8931
|
}
|
|
8931
8932
|
}
|
package/module/manifest.json
CHANGED
package/module/print.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.3/module/index.js";
|
|
2
2
|
import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.12.0/module/index.js";
|
|
3
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/passage",
|
|
3
|
-
"version": "2.18.4
|
|
3
|
+
"version": "2.18.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
13
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
14
|
-
"@pie-lib/pie-toolbox": "1.
|
|
14
|
+
"@pie-lib/pie-toolbox": "1.26.0",
|
|
15
15
|
"classnames": "^2.2.5",
|
|
16
16
|
"prop-types": "^15.6.1",
|
|
17
17
|
"react": "^16.8.1",
|
|
18
18
|
"react-dom": "^16.8.1"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "05ed7189a4a6490fb74c4acf0a8bfcb164336391",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"postpublish": "../../scripts/postpublish"
|
|
23
23
|
},
|