@pie-element/image-cloze-association 3.6.25 → 3.6.28

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,30 @@
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
+ ## [3.6.28](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.27...@pie-element/image-cloze-association@3.6.28) (2022-05-09)
7
+
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.6.27](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.26...@pie-element/image-cloze-association@3.6.27) (2022-05-03)
15
+
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.6.26](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.25...@pie-element/image-cloze-association@3.6.26) (2022-04-12)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association
25
+
26
+
27
+
28
+
29
+
6
30
  ## [3.6.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.24...@pie-element/image-cloze-association@3.6.25) (2022-03-28)
7
31
 
8
32
  **Note:** Version bump only for package @pie-element/image-cloze-association
@@ -3,6 +3,30 @@
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
+ ## [3.1.46](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.45...@pie-element/image-cloze-association-configure@3.1.46) (2022-05-09)
7
+
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.1.45](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.44...@pie-element/image-cloze-association-configure@3.1.45) (2022-05-03)
15
+
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.1.44](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.43...@pie-element/image-cloze-association-configure@3.1.44) (2022-04-12)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
25
+
26
+
27
+
28
+
29
+
6
30
  ## [3.1.43](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association-configure@3.1.42...@pie-element/image-cloze-association-configure@3.1.43) (2022-03-28)
7
31
 
8
32
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association-configure",
3
3
  "private": true,
4
- "version": "3.1.43",
4
+ "version": "3.1.46",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-configure-events": "^1.2.0",
12
- "@pie-lib/config-ui": "^10.10.24",
12
+ "@pie-lib/config-ui": "^10.12.2",
13
13
  "debug": "^3.1.0",
14
14
  "prop-types": "^15.7.2",
15
15
  "react": "^16.8.6",
package/lib/index.js CHANGED
@@ -62,6 +62,9 @@ var ImageClozeAssociation = /*#__PURE__*/function (_HTMLElement) {
62
62
  }
63
63
  }, {
64
64
  key: "session",
65
+ get: function get() {
66
+ return this._session;
67
+ },
65
68
  set: function set(s) {
66
69
  if (s && !s.answers) {
67
70
  s.answers = [];
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["ImageClozeAssociation","m","_model","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_render","_session","Array","isArray","answers","length","s","data","SessionChangedEvent","el","React","createElement","ImageClozeAssociationComponent","model","session","updateAnswer","bind","ReactDOM","render","HTMLElement"],"m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,CAAkBC,IAAlB,CAAuB,IAAvB;AAH+C,SAApD,CAAX;;AAKAC,6BAASC,MAAT,CAAgBT,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,KAAX;AACD,SAFD;AAGD;AACF;;;kDA1DgDU,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport {\n ModelSetEvent,\n SessionChangedEvent\n} from '@pie-framework/pie-player-events';\n\nimport ImageClozeAssociationComponent from './root';\n\nexport default class ImageClozeAssociation extends HTMLElement {\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(\n new ModelSetEvent(\n this.tagName.toLowerCase(),\n this.isComplete(),\n !!this._model\n )\n );\n this._render();\n }\n\n isComplete() {\n if (!this._session) {\n return false;\n }\n\n return (\n Array.isArray(this._session.answers) && this._session.answers.length > 0\n );\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this._render();\n }\n\n updateAnswer(data) {\n this._session.answers = data;\n\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete())\n );\n\n this._render();\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(ImageClozeAssociationComponent, {\n model: this._model,\n session: this._session,\n updateAnswer: this.updateAnswer.bind(this)\n });\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["ImageClozeAssociation","m","_model","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","_render","_session","Array","isArray","answers","length","s","data","SessionChangedEvent","el","React","createElement","ImageClozeAssociationComponent","model","session","updateAnswer","bind","ReactDOM","render","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;;;;;IAEqBA,qB;;;;;;;;;;;;SACnB,aAAUC,CAAV,EAAa;AACX,W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AAgBT,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,KAAX;AACD,SAFD;AAGD;AACF;;;kDA/DgDU,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport {\n ModelSetEvent,\n SessionChangedEvent\n} from '@pie-framework/pie-player-events';\n\nimport ImageClozeAssociationComponent from './root';\n\nexport default class ImageClozeAssociation extends HTMLElement {\n set model(m) {\n this._model = m;\n\n this.dispatchEvent(\n new ModelSetEvent(\n this.tagName.toLowerCase(),\n this.isComplete(),\n !!this._model\n )\n );\n this._render();\n }\n\n isComplete() {\n if (!this._session) {\n return false;\n }\n\n return (\n Array.isArray(this._session.answers) && this._session.answers.length > 0\n );\n }\n\n set session(s) {\n if (s && !s.answers) {\n s.answers = [];\n }\n\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n updateAnswer(data) {\n this._session.answers = data;\n\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete())\n );\n\n this._render();\n }\n\n connectedCallback() {\n this._render();\n }\n\n _render() {\n if (this._model && this._session) {\n const el = React.createElement(ImageClozeAssociationComponent, {\n model: this._model,\n session: this._session,\n updateAnswer: this.updateAnswer.bind(this)\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association",
3
- "version": "3.6.25",
3
+ "version": "3.6.28",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -10,10 +10,10 @@
10
10
  "@material-ui/core": "^3.9.3",
11
11
  "@material-ui/icons": "^3.0.1",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
- "@pie-lib/correct-answer-toggle": "^2.3.35",
13
+ "@pie-lib/correct-answer-toggle": "^2.3.36",
14
14
  "@pie-lib/drag": "^1.1.52",
15
- "@pie-lib/math-rendering": "^2.3.13",
16
- "@pie-lib/render-ui": "^4.12.5",
15
+ "@pie-lib/math-rendering": "^2.4.0",
16
+ "@pie-lib/render-ui": "^4.12.6",
17
17
  "classnames": "^2.2.6",
18
18
  "prop-types": "^15.6.1",
19
19
  "react": "^16.8.1",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "pie framework developers",
23
23
  "license": "ISC",
24
- "gitHead": "92cd24e6736b2eed8f82ac44ba775ad4f2080ade",
24
+ "gitHead": "43f534de577f1eb49e63c8dc43d5519754d4df93",
25
25
  "scripts": {
26
26
  "postpublish": "../../scripts/postpublish"
27
27
  },
package/src/index.js CHANGED
@@ -41,6 +41,10 @@ export default class ImageClozeAssociation extends HTMLElement {
41
41
  this._render();
42
42
  }
43
43
 
44
+ get session() {
45
+ return this._session;
46
+ }
47
+
44
48
  updateAnswer(data) {
45
49
  this._session.answers = data;
46
50
 
@@ -62,6 +66,7 @@ export default class ImageClozeAssociation extends HTMLElement {
62
66
  session: this._session,
63
67
  updateAnswer: this.updateAnswer.bind(this)
64
68
  });
69
+
65
70
  ReactDOM.render(el, this, () => {
66
71
  renderMath(this);
67
72
  });