@pie-element/boilerplate-item-type 2.1.1-next.15 → 2.1.1

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 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.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/boilerplate-item-type@2.1.0...@pie-element/boilerplate-item-type@2.1.1) (2024-01-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-2068, PD-2060 ([e918850](https://github.com/pie-framework/pie-elements/commit/e9188502ffeaefe41bf0f23895d4bb2daf839364))
12
+ * update pie-lib/pie-toolbox PD-3037 ([b2f689a](https://github.com/pie-framework/pie-elements/commit/b2f689a416c2c39d7ed423a22db02dd32415ba82))
13
+
14
+
15
+
16
+
17
+
6
18
  # [2.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/boilerplate-item-type@2.0.3...@pie-element/boilerplate-item-type@2.1.0) (2023-12-19)
7
19
 
8
20
 
@@ -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.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/boilerplate-item-type-configure@2.1.0...@pie-element/boilerplate-item-type-configure@2.1.1) (2024-01-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-2068, PD-2060 ([e918850](https://github.com/pie-framework/pie-elements/commit/e9188502ffeaefe41bf0f23895d4bb2daf839364))
12
+ * update pie-lib/pie-toolbox PD-3037 ([b2f689a](https://github.com/pie-framework/pie-elements/commit/b2f689a416c2c39d7ed423a22db02dd32415ba82))
13
+
14
+
15
+
16
+
17
+
6
18
  # [2.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/boilerplate-item-type-configure@2.0.3...@pie-element/boilerplate-item-type-configure@2.1.0) (2023-12-19)
7
19
 
8
20
 
@@ -31,7 +31,7 @@ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
31
31
 
32
32
  var _configUi = require("@pie-lib/pie-toolbox/config-ui");
33
33
 
34
- var _editableHtml = require("@pie-lib/pie-toolbox/editable-html");
34
+ var _editableHtml = _interopRequireDefault(require("@pie-lib/pie-toolbox/editable-html"));
35
35
 
36
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
37
37
 
@@ -110,7 +110,7 @@ var Design = /*#__PURE__*/function (_React$Component) {
110
110
  }, promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
111
111
  label: prompt.label || '',
112
112
  className: classes.promptHolder
113
- }, /*#__PURE__*/_react["default"].createElement(_editableHtml.EditableHtml, {
113
+ }, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
114
114
  className: classes.prompt,
115
115
  markup: model.prompt,
116
116
  onChange: this.onPromptChanged,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/design.jsx"],"names":["Panel","settings","toggle","Design","prompt","props","onModelChanged","model","update","classes","configuration","imageSupport","onConfigurationChanged","uploadSoundSupport","contentDimensions","settingsPanelDisabled","promptEnabled","panelSettings","panelProperties","label","Settings","Properties","promptHolder","onPromptChanged","language","React","Component","PropTypes","object","isRequired","func","shape","add","theme","width","paddingTop","spacing","unit","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KA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AUG,IAAV,CAAeD;AAFK,GAAhB,CANG;AAUjBhB,EAAAA,kBAAkB,EAAEc,sBAAUC;AAVb,C;iCADRzB,M,kBAcW,E;;eA4DT,wBAAW,UAAC8B,KAAD;AAAA,SAAY;AACpCX,IAAAA,YAAY,EAAE;AACZY,MAAAA,KAAK,EAAE,MADK;AAEZC,MAAAA,UAAU,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAFrB;AAGZC,MAAAA,YAAY,EAAEL,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AAHvB;AADsB,GAAZ;AAAA,CAAX,EAMXlC,MANW,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { InputContainer, settings, layout } from '@pie-lib/pie-toolbox/config-ui';\nimport {EditableHtml} from '@pie-lib/pie-toolbox/editable-html';\n\nconst { Panel, toggle } = settings;\n\nexport class Design extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.object,\n };\n\n static defaultProps = {};\n\n onPromptChanged = (prompt) => {\n const { onModelChanged, model } = this.props;\n const update = cloneDeep(model);\n\n update.prompt = prompt;\n onModelChanged(update);\n };\n\n render() {\n const { classes, configuration, imageSupport, model, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n contentDimensions = {},\n prompt = {},\n settingsPanelDisabled,\n } = configuration || {};\n const { promptEnabled } = model || {};\n\n const panelSettings = {};\n\n const panelProperties = {\n promptEnabled: prompt.settings && toggle(prompt.label),\n };\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {promptEnabled && (\n <InputContainer label={prompt.label || ''} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles((theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n }\n}))(Design);\n"],"file":"design.js"}
1
+ {"version":3,"sources":["../src/design.jsx"],"names":["Panel","settings","toggle","Design","prompt","props","onModelChanged","model","update","classes","configuration","imageSupport","onConfigurationChanged","uploadSoundSupport","contentDimensions","settingsPanelDisabled","promptEnabled","panelSettings","panelProperties","label","Settings","Properties","promptHolder","onPromptChanged","language","React","Component","PropTypes","object","isRequired","func","shape","add","theme","width","paddingTop","spacing","unit","marginBottom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;IAEaC,M;;;;;;;;;;;;;;;wGAgBO,UAACC,MAAD,EAAY;AAC5B,wBAAkC,MAAKC,KAAvC;AAAA,UAAQC,cAAR,eAAQA,cAAR;AAAA,UAAwBC,KAAxB,eAAwBA,KAAxB;AACA,UAAMC,MAAM,GAAG,2BAAUD,KAAV,CAAf;AAEAC,MAAAA,MAAM,CAACJ,MAAP,GAAgBA,MAAhB;AACAE,MAAAA,cAAc,CAACE,MAAD,CAAd;AACD,K;;;;;;WAED,kBAAS;AAC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AAA,CAAX,EAMXlC,MANW,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport cloneDeep from 'lodash/cloneDeep';\nimport { InputContainer, settings, layout } from '@pie-lib/pie-toolbox/config-ui';\nimport EditableHtml from '@pie-lib/pie-toolbox/editable-html';\n\nconst { Panel, toggle } = settings;\n\nexport class Design extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.object,\n };\n\n static defaultProps = {};\n\n onPromptChanged = (prompt) => {\n const { onModelChanged, model } = this.props;\n const update = cloneDeep(model);\n\n update.prompt = prompt;\n onModelChanged(update);\n };\n\n render() {\n const { classes, configuration, imageSupport, model, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n contentDimensions = {},\n prompt = {},\n settingsPanelDisabled,\n } = configuration || {};\n const { promptEnabled } = model || {};\n\n const panelSettings = {};\n\n const panelProperties = {\n promptEnabled: prompt.settings && toggle(prompt.label),\n };\n\n return (\n <layout.ConfigLayout\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {promptEnabled && (\n <InputContainer label={prompt.label || ''} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles((theme) => ({\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n }\n}))(Design);\n"],"file":"design.js"}
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/boilerplate-item-type-configure",
3
3
  "private": true,
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "1.4.3",
11
+ "@pie-lib/pie-toolbox": "1.4.4",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "prop-types": "^15.6.2",
@@ -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.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/boilerplate-item-type-controller@2.1.0...@pie-element/boilerplate-item-type-controller@2.1.1) (2024-01-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-2068, PD-2060 ([e918850](https://github.com/pie-framework/pie-elements/commit/e9188502ffeaefe41bf0f23895d4bb2daf839364))
12
+ * update pie-lib/pie-toolbox PD-3037 ([b2f689a](https://github.com/pie-framework/pie-elements/commit/b2f689a416c2c39d7ed423a22db02dd32415ba82))
13
+
14
+
15
+
16
+
17
+
6
18
  # [2.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/boilerplate-item-type-controller@2.0.3...@pie-element/boilerplate-item-type-controller@2.1.0) (2023-12-19)
7
19
 
8
20
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pie-element/boilerplate-item-type-controller",
3
3
  "private": true,
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "dependencies": {
9
- "@pie-lib/pie-toolbox": "1.4.3",
9
+ "@pie-lib/pie-toolbox": "1.4.4",
10
10
  "debug": "^3.1.0",
11
11
  "lodash": "^4.17.15"
12
12
  },
package/lib/main.js CHANGED
@@ -43,7 +43,7 @@ var Main = /*#__PURE__*/function (_React$Component) {
43
43
  key: "render",
44
44
  value: function render() {
45
45
  var model = this.props.model;
46
- return /*#__PURE__*/_react["default"].createElement("div", null, model.prompt && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, "Boilerplate Item"), /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
46
+ return /*#__PURE__*/_react["default"].createElement("div", null, model.prompt && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
47
47
  prompt: model.prompt
48
48
  })));
49
49
  }
package/lib/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main.jsx"],"names":["Main","model","props","prompt","React","Component","PropTypes","object","session","onSessionChange","func","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;IAEqBA,I;;;;;;;;;;;;WASnB,kBAAS;AACP,UAAQC,KAAR,GAAkB,KAAKC,KAAvB,CAAQD,KAAR;AAEA,0BACE,6CACGA,KAAK,CAACE,MAAN,iBACC,0DACE,8DADF,eAEE,gCAAC,uBAAD;AAAe,QAAA,MAAM,EAAEF,KAAK,CAACE;AAA7B,QAFF,CAFJ,CADF;AAUD;;;EAtB+BC,kBAAMC,S;;;iCAAnBL,I,eACA;AACjBC,EAAAA,KAAK,EAAEK,sBAAUC,MADA;AAEjBC,EAAAA,OAAO,EAAEF,sBAAUC,MAFF;AAGjBE,EAAAA,eAAe,EAAEH,sBAAUI,IAAV,CAAeC;AAHf,C;iCADAX,I,kBAOG,E","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PreviewPrompt } from '@pie-lib/pie-toolbox/render-ui';\n\nexport default class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object,\n session: PropTypes.object,\n onSessionChange: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n render() {\n const { model } = this.props;\n\n return (\n <div>\n {model.prompt && (\n <div>\n <p>Boilerplate Item</p>\n <PreviewPrompt prompt={model.prompt}/>\n </div>\n )}\n </div>\n );\n }\n}\n"],"file":"main.js"}
1
+ {"version":3,"sources":["../src/main.jsx"],"names":["Main","model","props","prompt","React","Component","PropTypes","object","session","onSessionChange","func","isRequired"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;IAEqBA,I;;;;;;;;;;;;WASnB,kBAAS;AACP,UAAQC,KAAR,GAAkB,KAAKC,KAAvB,CAAQD,KAAR;AAEA,0BACE,6CACGA,KAAK,CAACE,MAAN,iBACC,0DACE,gCAAC,uBAAD;AAAe,QAAA,MAAM,EAAEF,KAAK,CAACE;AAA7B,QADF,CAFJ,CADF;AASD;;;EArB+BC,kBAAMC,S;;;iCAAnBL,I,eACA;AACjBC,EAAAA,KAAK,EAAEK,sBAAUC,MADA;AAEjBC,EAAAA,OAAO,EAAEF,sBAAUC,MAFF;AAGjBE,EAAAA,eAAe,EAAEH,sBAAUI,IAAV,CAAeC;AAHf,C;iCADAX,I,kBAOG,E","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { PreviewPrompt } from '@pie-lib/pie-toolbox/render-ui';\n\nexport default class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object,\n session: PropTypes.object,\n onSessionChange: PropTypes.func.isRequired,\n };\n\n static defaultProps = {};\n\n render() {\n const { model } = this.props;\n\n return (\n <div>\n {model.prompt && (\n <div>\n <PreviewPrompt prompt={model.prompt}/>\n </div>\n )}\n </div>\n );\n }\n}\n"],"file":"main.js"}
package/package.json CHANGED
@@ -4,26 +4,25 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "2.1.1-next.15+b63f78371",
7
+ "version": "2.1.1",
8
8
  "description": "",
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/pie-toolbox": "1.4.3",
12
+ "@pie-lib/pie-toolbox": "1.4.4",
13
13
  "prop-types": "^15.6.1",
14
14
  "react": "^16.8.1",
15
15
  "react-dom": "^16.8.1"
16
16
  },
17
17
  "author": "",
18
18
  "license": "ISC",
19
- "gitHead": "b63f78371452e265f31f721dcfa5f8ba9789089c",
19
+ "gitHead": "6ea9c10c7dd650e38b2f5a7921c48e1db3912233",
20
20
  "scripts": {
21
21
  "postpublish": "../../scripts/postpublish"
22
22
  },
23
23
  "main": "lib/index.js",
24
24
  "module": "src/index.js",
25
25
  "exports": {
26
- ".": "./src/index.js",
27
- "./print": "./src/print.js"
26
+ ".": "./src/index.js"
28
27
  }
29
28
  }
package/lib/print.js DELETED
@@ -1,109 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
15
-
16
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
-
18
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
19
-
20
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
21
-
22
- var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
23
-
24
- var _react = _interopRequireDefault(require("react"));
25
-
26
- var _reactDom = _interopRequireDefault(require("react-dom"));
27
-
28
- var _debounce = _interopRequireDefault(require("lodash/debounce"));
29
-
30
- var _main = _interopRequireDefault(require("./main"));
31
-
32
- var _mathRendering = require("@pie-lib/pie-toolbox/math-rendering");
33
-
34
- var _debug = _interopRequireDefault(require("debug"));
35
-
36
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
37
-
38
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
-
40
- var log = (0, _debug["default"])('pie-element:multiple-choice:print');
41
- /**
42
- * Live in same package as main element - so we can access some of the shared comps!
43
- *
44
- * - update pslb to build print if src/print.js is there
45
- * - update demo el
46
- * - get configure/controller building
47
- */
48
-
49
- var preparePrintModel = function preparePrintModel(model, opts) {
50
- return model;
51
- };
52
-
53
- var BoilerPlateItemTypePrint = /*#__PURE__*/function (_HTMLElement) {
54
- (0, _inherits2["default"])(BoilerPlateItemTypePrint, _HTMLElement);
55
-
56
- var _super = _createSuper(BoilerPlateItemTypePrint);
57
-
58
- function BoilerPlateItemTypePrint() {
59
- var _this;
60
-
61
- (0, _classCallCheck2["default"])(this, BoilerPlateItemTypePrint);
62
- _this = _super.call(this);
63
- _this._options = null;
64
- _this._model = null;
65
- _this._session = [];
66
- _this._rerender = (0, _debounce["default"])(function () {
67
- if (_this._model && _this._session) {
68
- var printModel = preparePrintModel(_this._model, _this._options);
69
-
70
- var element = _this._options && /*#__PURE__*/_react["default"].createElement(_main["default"], {
71
- model: printModel,
72
- session: {}
73
- });
74
-
75
- _reactDom["default"].render(element, (0, _assertThisInitialized2["default"])(_this), function () {
76
- log('render complete - render math');
77
- (0, _mathRendering.renderMath)((0, _assertThisInitialized2["default"])(_this));
78
- });
79
- } else {
80
- log('skip');
81
- }
82
- }, 50, {
83
- leading: false,
84
- trailing: true
85
- });
86
- return _this;
87
- }
88
-
89
- (0, _createClass2["default"])(BoilerPlateItemTypePrint, [{
90
- key: "options",
91
- set: function set(o) {
92
- this._options = o;
93
- }
94
- }, {
95
- key: "model",
96
- set: function set(s) {
97
- this._model = s;
98
-
99
- this._rerender();
100
- }
101
- }, {
102
- key: "connectedCallback",
103
- value: function connectedCallback() {}
104
- }]);
105
- return BoilerPlateItemTypePrint;
106
- }( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
107
-
108
- exports["default"] = BoilerPlateItemTypePrint;
109
- //# sourceMappingURL=print.js.map
package/lib/print.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/print.js"],"names":["log","preparePrintModel","model","opts","BoilerPlateItemTypePrint","_options","_model","_session","_rerender","printModel","element","React","createElement","Main","session","ReactDOM","render","leading","trailing","o","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,mCAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,KAAD,EAAQC,IAAR,EAAiB;AACzC,SAAOD,KAAP;AACD,CAFD;;IAIqBE,wB;;;;;AACnB,sCAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,QAAL,GAAgB,IAAhB;AACA,UAAKC,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,EAAhB;AACA,UAAKC,SAAL,GAAiB,0BACf,YAAM;AACJ,UAAI,MAAKF,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAME,UAAU,GAAGR,iBAAiB,CAAC,MAAKK,MAAN,EAAc,MAAKD,QAAnB,CAApC;;AAEA,YAAMK,OAAO,GACX,MAAKL,QAAL,iBACAM,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACxBX,UAAAA,KAAK,EAAEO,UADiB;AAExBK,UAAAA,OAAO,EAAE;AAFe,SAA1B,CAFF;;AAOAC,6BAASC,MAAT,CAAgBN,OAAhB,kDAA+B,YAAM;AACnCV,UAAAA,GAAG,CAAC,+BAAD,CAAH;AACA;AACD,SAHD;AAID,OAdD,MAcO;AACLA,QAAAA,GAAG,CAAC,MAAD,CAAH;AACD;AACF,KAnBc,EAoBf,EApBe,EAqBf;AAAEiB,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KArBe,CAAjB;AALY;AA4Bb;;;;SACD,aAAYC,CAAZ,EAAe;AACb,WAAKd,QAAL,GAAgBc,CAAhB;AACD;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKd,MAAL,GAAcc,CAAd;;AACA,WAAKZ,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDAvC8Ba,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport Main from './main';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering';\nimport debug from 'debug';\n\nconst log = debug('pie-element:multiple-choice:print');\n\n/**\n * Live in same package as main element - so we can access some of the shared comps!\n *\n * - update pslb to build print if src/print.js is there\n * - update demo el\n * - get configure/controller building\n */\n\nconst preparePrintModel = (model, opts) => {\n return model;\n};\n\nexport default class BoilerPlateItemTypePrint extends HTMLElement {\n constructor() {\n super();\n this._options = null;\n this._model = null;\n this._session = [];\n this._rerender = debounce(\n () => {\n if (this._model && this._session) {\n const printModel = preparePrintModel(this._model, this._options);\n\n const element =\n this._options &&\n React.createElement(Main, {\n model: printModel,\n session: {},\n });\n\n ReactDOM.render(element, this, () => {\n log('render complete - render math');\n renderMath(this);\n });\n } else {\n log('skip');\n }\n },\n 50,\n { leading: false, trailing: true },\n );\n }\n set options(o) {\n this._options = o;\n }\n\n set model(s) {\n this._model = s;\n this._rerender();\n }\n\n connectedCallback() {}\n}\n"],"file":"print.js"}