@pie-element/passage 2.18.4-next.24 → 2.18.4-next.5
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/lib/index.js +1 -7
- package/lib/index.js.map +1 -1
- package/module/element.js +2 -3
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -23,8 +23,6 @@ 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
|
-
|
|
28
26
|
var _react = _interopRequireDefault(require("react"));
|
|
29
27
|
|
|
30
28
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
@@ -84,8 +82,6 @@ var PiePassage = /*#__PURE__*/function (_HTMLElement) {
|
|
|
84
82
|
}, {
|
|
85
83
|
key: "_render",
|
|
86
84
|
value: function _render() {
|
|
87
|
-
var _this2 = this;
|
|
88
|
-
|
|
89
85
|
var _this$_model = this._model,
|
|
90
86
|
_this$_model$passages = _this$_model.passages,
|
|
91
87
|
passages = _this$_model$passages === void 0 ? [] : _this$_model$passages,
|
|
@@ -109,9 +105,7 @@ var PiePassage = /*#__PURE__*/function (_HTMLElement) {
|
|
|
109
105
|
showTeacherInstructions: showTeacherInstructions
|
|
110
106
|
});
|
|
111
107
|
|
|
112
|
-
_reactDom["default"].render(elem, this
|
|
113
|
-
return (0, _mathRenderingAccessible.renderMath)(_this2);
|
|
114
|
-
});
|
|
108
|
+
_reactDom["default"].render(elem, this);
|
|
115
109
|
}
|
|
116
110
|
}
|
|
117
111
|
}]);
|
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;;
|
|
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,IAAI,GAAGD,QAAQ,GAAGA,QAAQ,CAACE,KAAT,CAAe,CAAf,EAAkB,CAAlB,CAAH,GAA0B,IAA/C;AACA,WAAKC,YAAL,CAAkB,MAAlB,EAA0BF,IAA1B;AACD;;;SAED,aAAUG,CAAV,EAAa;AACX,WAAKP,MAAL,GAAcO,CAAd;AACA,WAAKC,aAAL,CAAmB,IAAIC,8BAAJ,CAAkB,KAAKC,OAAL,CAAaC,WAAb,EAAlB,EAA8C,KAAKT,QAAnD,EAA6D,CAAC,CAAC,KAAKF,MAApE,CAAnB;AACA,WAAKY,gBAAL;;AAEA,WAAKC,OAAL;AACD;;;SAED,aAAYN,CAAZ,EAAe;AACb,WAAKL,QAAL,GAAgBK,CAAhB;AACD;;;WAED,6BAAoB;AAClB,WAAKD,YAAL,CAAkB,YAAlB,EAAgC,SAAhC;AACA,WAAKA,YAAL,CAAkB,MAAlB,EAA0B,QAA1B;;AACA,WAAKO,OAAL;AACD;;;WAED,mBAAU;AACR,yBAA2D,KAAKb,MAAhE;AAAA,+CAAQC,QAAR;AAAA,UAAQA,QAAR,sCAAmB,EAAnB;AAAA,+CAAuBa,uBAAvB;AAAA,UAAuBA,uBAAvB,sCAAiD,KAAjD;;AAEA,UAAI,KAAKd,MAAL,CAAYC,QAAZ,CAAqBc,MAArB,GAA8B,CAAlC,EAAqC;AACnC,YAAMC,YAAY,GAAGf,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;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"}
|
package/module/element.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.18.2/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,7 +8881,6 @@ 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;
|
|
8885
8884
|
const React = _dll_react;
|
|
8886
8885
|
const ReactDOM = _dll_react_dom;
|
|
8887
8886
|
class PiePassage extends HTMLElement {
|
|
@@ -8926,7 +8925,7 @@ class PiePassage extends HTMLElement {
|
|
|
8926
8925
|
tabs: passagesTabs,
|
|
8927
8926
|
showTeacherInstructions
|
|
8928
8927
|
});
|
|
8929
|
-
ReactDOM.render(elem, this
|
|
8928
|
+
ReactDOM.render(elem, this);
|
|
8930
8929
|
}
|
|
8931
8930
|
}
|
|
8932
8931
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/passage",
|
|
3
|
-
"version": "2.18.4-next.
|
|
3
|
+
"version": "2.18.4-next.5+0f39c45ed",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"react": "^16.8.1",
|
|
18
18
|
"react-dom": "^16.8.1"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "0f39c45ed1bad8dc60eb9ccc992bafddc8781a31",
|
|
21
21
|
"scripts": {
|
|
22
22
|
"postpublish": "../../scripts/postpublish"
|
|
23
23
|
},
|