@pie-element/math-inline 5.9.6 → 5.9.7
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 +8 -0
- package/configure/CHANGELOG.md +8 -0
- package/configure/package.json +5 -5
- package/lib/index.js +6 -3
- package/lib/index.js.map +1 -1
- package/module/configure.js +4 -4
- package/module/element.js +2240 -17
- package/module/index.html +1 -1
- package/module/manifest.json +4 -4
- package/module/print.html +1 -1
- package/module/print.js +2234 -14
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [5.9.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@5.9.6...@pie-element/math-inline@5.9.7) (2022-04-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/math-inline
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [5.9.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@5.9.5...@pie-element/math-inline@5.9.6) (2022-03-28)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/math-inline
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [5.6.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@5.6.15...@pie-element/math-inline-configure@5.6.16) (2022-04-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-element/math-inline-configure
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [5.6.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@5.6.14...@pie-element/math-inline-configure@5.6.15) (2022-03-28)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @pie-element/math-inline-configure
|
package/configure/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/math-inline-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "5.6.
|
|
4
|
+
"version": "5.6.16",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"@material-ui/icons": "^3.0.1",
|
|
12
12
|
"@pie-framework/mathquill": "^1.1.0",
|
|
13
13
|
"@pie-framework/pie-configure-events": "^1.2.0",
|
|
14
|
-
"@pie-lib/config-ui": "^10.
|
|
15
|
-
"@pie-lib/editable-html": "^7.
|
|
16
|
-
"@pie-lib/math-input": "^6.6.
|
|
17
|
-
"@pie-lib/math-toolbar": "^1.8.
|
|
14
|
+
"@pie-lib/config-ui": "^10.11.0",
|
|
15
|
+
"@pie-lib/editable-html": "^7.20.0",
|
|
16
|
+
"@pie-lib/math-input": "^6.6.9",
|
|
17
|
+
"@pie-lib/math-toolbar": "^1.8.9",
|
|
18
18
|
"classnames": "^2.2.5",
|
|
19
19
|
"debug": "^3.1.0",
|
|
20
20
|
"prop-types": "^15.6.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,aAA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AAyB,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/configure.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_classnames, _dll_lodash, _dll_debug, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.
|
|
2
|
-
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.
|
|
3
|
-
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.
|
|
4
|
-
import {_dll_pie_lib__math_toolbar, _dll_pie_framework__mathquill} from "../../../@pie-lib/math-edit-module@^1.1.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_material_ui__core, _dll_material_ui__core_styles, _dll_classnames, _dll_lodash, _dll_debug, _dll_react_dom} from "../../../@pie-lib/shared-module@^1.4.10/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__config_ui} from "../../../@pie-lib/config-module@^1.0.33/module/index.js";
|
|
3
|
+
import {_dll_pie_lib__editable_html} from "../../../@pie-lib/editable-html-module@^1.2.9/module/index.js";
|
|
4
|
+
import {_dll_pie_lib__math_toolbar, _dll_pie_framework__mathquill} from "../../../@pie-lib/math-edit-module@^1.1.31/module/index.js";
|
|
5
5
|
const React$3 = _dll_react;
|
|
6
6
|
const PropTypes$2 = _dll_prop_types;
|
|
7
7
|
const {Card: Card} = _dll_material_ui__core;
|