@pie-element/math-inline 5.6.4-next.760 → 5.6.4-next.762
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 +6 -3
- package/lib/index.js.map +1 -1
- package/module/element.js +6 -3
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -56,8 +56,8 @@ var MathInline = /*#__PURE__*/function (_HTMLElement) {
|
|
|
56
56
|
(0, _classCallCheck2["default"])(this, MathInline);
|
|
57
57
|
_this = _super.call(this);
|
|
58
58
|
_this._configuration = _defaults["default"].configuration;
|
|
59
|
-
_this.sessionChangedEventCaller = _lodash["default"].debounce(function (
|
|
60
|
-
_this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(
|
|
59
|
+
_this.sessionChangedEventCaller = _lodash["default"].debounce(function () {
|
|
60
|
+
_this.dispatchEvent(new _piePlayerEvents.SessionChangedEvent(_this.tagName.toLowerCase(), true));
|
|
61
61
|
}, 1000);
|
|
62
62
|
return _this;
|
|
63
63
|
}
|
|
@@ -72,6 +72,9 @@ var MathInline = /*#__PURE__*/function (_HTMLElement) {
|
|
|
72
72
|
}
|
|
73
73
|
}, {
|
|
74
74
|
key: "session",
|
|
75
|
+
get: function get() {
|
|
76
|
+
return this._session;
|
|
77
|
+
},
|
|
75
78
|
set: function set(s) {
|
|
76
79
|
this._session = s;
|
|
77
80
|
|
|
@@ -92,7 +95,7 @@ var MathInline = /*#__PURE__*/function (_HTMLElement) {
|
|
|
92
95
|
Object.keys(s).map(function (key) {
|
|
93
96
|
_this2._session[key] = s[key];
|
|
94
97
|
});
|
|
95
|
-
this.sessionChangedEventCaller(
|
|
98
|
+
this.sessionChangedEventCaller();
|
|
96
99
|
log('session: ', this._session);
|
|
97
100
|
}
|
|
98
101
|
}, {
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["log","MathInline","_configuration","defaults","configuration","sessionChangedEventCaller","_","debounce","
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["log","MathInline","_configuration","defaults","configuration","sessionChangedEventCaller","_","debounce","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","m","_model","ModelSetEvent","_render","_session","s","c","Object","keys","map","key","el","React","createElement","Main","model","session","onSessionChange","sessionChanged","bind","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAIA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,oBAAN,CAAZ;;IAIqBC,U;;;;;AACnB,wBAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,cAAL,GAAsBC,qBAASC,aAA/B;AACA,UAAKC,yBAAL,GAAiCC,mBAAEC,QAAF,CAAW,YAAM;AAChD,YAAKC,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoD,IAApD,CAAnB;AACD,KAFgC,EAE9B,IAF8B,CAAjC;AAHY;AAMb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;AACA,WAAKJ,aAAL,CAAmB,IAAIM,8BAAJ,CAAkB,KAAKD,MAAvB,EAA+B,IAA/B,EAAqC,CAAC,CAAC,KAAKA,MAA5C,CAAnB;;AACA,WAAKE,OAAL;AACD;;;SAOD,eAAc;AACZ,aAAO,KAAKC,QAAZ;AACD,K;SAPD,aAAYC,CAAZ,EAAe;AACb,WAAKD,QAAL,GAAgBC,CAAhB;;AACA,WAAKF,OAAL;AACD;;;SAMD,aAAkBG,CAAlB,EAAqB;AACnB,WAAKhB,cAAL,GAAsBgB,CAAtB;;AACA,WAAKH,OAAL;AACD;;;WAED,wBAAeE,CAAf,EAAkB;AAAA;;AAChBE,MAAAA,MAAM,CAACC,IAAP,CAAYH,CAAZ,EAAeI,GAAf,CAAmB,UAAAC,GAAG,EAAI;AACxB,QAAA,MAAI,CAACN,QAAL,CAAcM,GAAd,IAAqBL,CAAC,CAACK,GAAD,CAAtB;AACD,OAFD;AAIA,WAAKjB,yBAAL;AACAL,MAAAA,GAAG,CAAC,WAAD,EAAc,KAAKgB,QAAnB,CAAH;AACD;;;WAED,6BAAoB;AAClB,WAAKD,OAAL;AACD;;;WAED,mBAAU;AACR,UAAI,CAAC,KAAKF,MAAN,IAAgB,CAAC,KAAKG,QAA1B,EAAoC;AAClC;AACD;;AAED,UAAMO,EAAE,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCC,QAAAA,KAAK,EAAE,KAAKd,MADuB;AAEnCe,QAAAA,OAAO,EAAE,KAAKZ,QAFqB;AAGnCZ,QAAAA,aAAa,EAAE,KAAKF,cAHe;AAInC2B,QAAAA,eAAe,EAAE,KAAKC,cAAL,CAAoBC,IAApB,CAAyB,IAAzB;AAJkB,OAA1B,CAAX;;AAOAC,2BAASC,MAAT,CAAgBV,EAAhB,EAAoB,IAApB;AACD;;;kDAvDqCW,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Main from './main';\nimport debug from 'debug';\nimport _ from 'lodash';\n\nimport {\n ModelSetEvent,\n SessionChangedEvent,\n} from '@pie-framework/pie-player-events';\nimport defaults from '../configure/lib/defaults';\n\nconst log = debug('pie-ui:math-inline');\n\nexport { Main as Component };\n\nexport default class MathInline extends HTMLElement {\n constructor() {\n super();\n this._configuration = defaults.configuration;\n this.sessionChangedEventCaller = _.debounce(() => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), true));\n }, 1000);\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(new ModelSetEvent(this._model, true, !!this._model));\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n set configuration(c) {\n this._configuration = c;\n this._render();\n }\n\n sessionChanged(s) {\n Object.keys(s).map(key => {\n this._session[key] = s[key];\n });\n\n this.sessionChangedEventCaller();\n log('session: ', this._session);\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n configuration: this._configuration,\n onSessionChange: this.sessionChanged.bind(this),\n });\n\n ReactDOM.render(el, this);\n }\n}\n"],"file":"index.js"}
|
package/module/element.js
CHANGED
|
@@ -1199,8 +1199,8 @@ class MathInline extends HTMLElement {
|
|
|
1199
1199
|
constructor() {
|
|
1200
1200
|
super();
|
|
1201
1201
|
this._configuration = defaults.configuration;
|
|
1202
|
-
this.sessionChangedEventCaller = _.debounce(
|
|
1203
|
-
this.dispatchEvent(new SessionChangedEvent_1(
|
|
1202
|
+
this.sessionChangedEventCaller = _.debounce(() => {
|
|
1203
|
+
this.dispatchEvent(new SessionChangedEvent_1(this.tagName.toLowerCase(), true));
|
|
1204
1204
|
}, 1000);
|
|
1205
1205
|
}
|
|
1206
1206
|
set model(m) {
|
|
@@ -1212,6 +1212,9 @@ class MathInline extends HTMLElement {
|
|
|
1212
1212
|
this._session = s;
|
|
1213
1213
|
this._render();
|
|
1214
1214
|
}
|
|
1215
|
+
get session() {
|
|
1216
|
+
return this._session;
|
|
1217
|
+
}
|
|
1215
1218
|
set configuration(c) {
|
|
1216
1219
|
this._configuration = c;
|
|
1217
1220
|
this._render();
|
|
@@ -1220,7 +1223,7 @@ class MathInline extends HTMLElement {
|
|
|
1220
1223
|
Object.keys(s).map(key => {
|
|
1221
1224
|
this._session[key] = s[key];
|
|
1222
1225
|
});
|
|
1223
|
-
this.sessionChangedEventCaller(
|
|
1226
|
+
this.sessionChangedEventCaller();
|
|
1224
1227
|
log('session: ', this._session);
|
|
1225
1228
|
}
|
|
1226
1229
|
connectedCallback() {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "5.6.4-next.
|
|
7
|
+
"version": "5.6.4-next.762+33790d251",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"description": "",
|
|
10
10
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"author": "",
|
|
30
30
|
"license": "ISC",
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "33790d25127d4a1f58ca56a6d07a1a8a89be05f8",
|
|
32
32
|
"module": "src/index.js",
|
|
33
33
|
"exports": {
|
|
34
34
|
".": "./src/index.js",
|