@pie-element/drag-in-the-blank 6.4.1-next.7 → 6.5.0

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,22 @@
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
+ # [6.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank@6.4.0...@pie-element/drag-in-the-blank@6.5.0) (2025-01-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-4555, PD-4660, PD-4426, PD-4607, PD-4394, PD-4521 ([e4928b4](https://github.com/pie-framework/pie-elements/commit/e4928b4f9ac268a892b382045f76ae4eac6b458e))
12
+
13
+
14
+ ### Features
15
+
16
+ * add tests for session changed operation PD-4665 ([0a2d562](https://github.com/pie-framework/pie-elements/commit/0a2d562da49116a15baa47d0cbf7942eaddbf065))
17
+
18
+
19
+
20
+
21
+
6
22
  # [6.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank@6.3.3...@pie-element/drag-in-the-blank@6.4.0) (2024-12-20)
7
23
 
8
24
 
@@ -3,6 +3,17 @@
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
+ ## [6.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank-configure@6.1.7...@pie-element/drag-in-the-blank-configure@6.1.8) (2025-01-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-4555, PD-4660, PD-4426, PD-4607, PD-4394, PD-4521 ([e4928b4](https://github.com/pie-framework/pie-elements/commit/e4928b4f9ac268a892b382045f76ae4eac6b458e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [6.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank-configure@6.1.6...@pie-element/drag-in-the-blank-configure@6.1.7) (2024-12-20)
7
18
 
8
19
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/drag-in-the-blank-configure",
3
- "version": "6.1.7",
3
+ "version": "6.1.8",
4
4
  "private": true,
5
5
  "main": "lib/index.js",
6
6
  "module": "src/index.js",
@@ -8,7 +8,7 @@
8
8
  "@material-ui/core": "^3.9.2",
9
9
  "@material-ui/icons": "^3.0.1",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "2.5.0",
11
+ "@pie-lib/pie-toolbox": "2.6.0",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "prop-types": "^15.6.2",
@@ -3,6 +3,17 @@
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
+ ## [6.0.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank-controller@6.0.13...@pie-element/drag-in-the-blank-controller@6.0.14) (2025-01-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-lib/pie-toolbox PD-4555, PD-4660, PD-4426, PD-4607, PD-4394, PD-4521 ([e4928b4](https://github.com/pie-framework/pie-elements/commit/e4928b4f9ac268a892b382045f76ae4eac6b458e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [6.0.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/drag-in-the-blank-controller@6.0.12...@pie-element/drag-in-the-blank-controller@6.0.13) (2024-12-20)
7
18
 
8
19
 
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/drag-in-the-blank-controller",
3
3
  "private": true,
4
- "version": "6.0.13",
4
+ "version": "6.0.14",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@pie-lib/pie-toolbox": "2.5.0",
11
+ "@pie-lib/pie-toolbox": "2.6.0",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "type-of": "^2.0.1"
package/lib/index.js CHANGED
@@ -49,15 +49,15 @@ var isComplete = function isComplete(session, model) {
49
49
 
50
50
  exports.isComplete = isComplete;
51
51
 
52
- var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
53
- (0, _inherits2["default"])(InlineDropdown, _HTMLElement);
52
+ var DragInTheBlank = /*#__PURE__*/function (_HTMLElement) {
53
+ (0, _inherits2["default"])(DragInTheBlank, _HTMLElement);
54
54
 
55
- var _super = _createSuper(InlineDropdown);
55
+ var _super = _createSuper(DragInTheBlank);
56
56
 
57
- function InlineDropdown() {
57
+ function DragInTheBlank() {
58
58
  var _this;
59
59
 
60
- (0, _classCallCheck2["default"])(this, InlineDropdown);
60
+ (0, _classCallCheck2["default"])(this, DragInTheBlank);
61
61
  _this = _super.call(this);
62
62
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "_render", function () {
63
63
  if (_this._model && _this._session) {
@@ -87,7 +87,7 @@ var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
87
87
  return _this;
88
88
  }
89
89
 
90
- (0, _createClass2["default"])(InlineDropdown, [{
90
+ (0, _createClass2["default"])(DragInTheBlank, [{
91
91
  key: "model",
92
92
  set: function set(m) {
93
93
  this._model = m;
@@ -111,8 +111,8 @@ var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
111
111
  this._render();
112
112
  }
113
113
  }]);
114
- return InlineDropdown;
114
+ return DragInTheBlank;
115
115
  }( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
116
116
 
117
- exports["default"] = InlineDropdown;
117
+ exports["default"] = DragInTheBlank;
118
118
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["isComplete","session","model","value","Object","values","some","InlineDropdown","_model","_session","elem","React","createElement","Main","onChange","changeSession","ReactDOM","render","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","dispatchChangedEvent","_render","m","ModelSetEvent","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,OAAD,EAAUC,KAAV,EAAoB;AAC5C,MAAI,CAACD,OAAD,IAAY,CAACA,OAAO,CAACE,KAAzB,EAAgC;AAC9B,WAAO,KAAP;AACD;;AAED,SAAOC,MAAM,CAACC,MAAP,CAAcJ,OAAO,CAACE,KAAR,IAAiB,EAA/B,EAAmCG,IAAnC,CAAwC,UAACH,KAAD;AAAA,WAAW,CAAC,CAACA,KAAb;AAAA,GAAxC,CAAP;AACD,CANM;;;;IAQcI,c;;;;;AACnB,4BAAc;AAAA;;AAAA;AACZ;AADY,gGAsBJ,YAAM;AACd,UAAI,MAAKC,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAIC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCX,UAAAA,KAAK,EAAE,MAAKM,MADuB;AAEnCL,UAAAA,KAAK,EAAE,MAAKM,QAAL,CAAcN,KAFc;AAGnCW,UAAAA,QAAQ,EAAE,MAAKC;AAHoB,SAA1B,CAAX;;AAMAC,6BAASC,MAAT,CAAgBP,IAAhB,kDAA4B,YAAM;AAChC;AACD,SAFD;AAGD;AACF,KAlCa;AAAA,6GAoCS,YAAM;AAC3B,YAAKQ,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoDrB,UAAU,CAAC,MAAKS,QAAN,CAA9D,CAAnB;AACD,KAtCa;AAAA,sGAwCE,UAACN,KAAD,EAAW;AACzB,YAAKF,OAAL,CAAaE,KAAb,GAAqBA,KAArB;;AACA,YAAKmB,oBAAL;;AACA,YAAKC,OAAL;AACD,KA5Ca;AAEZ,UAAKf,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,IAAhB;AAHY;AAIb;;;;SAED,aAAUe,CAAV,EAAa;AACX,WAAKhB,MAAL,GAAcgB,CAAd;AACA,WAAKN,aAAL,CAAmB,IAAIO,8BAAJ,CAAkB,KAAKL,OAAL,CAAaC,WAAb,EAAlB,EAA8CrB,UAAU,CAAC,KAAKS,QAAN,CAAxD,EAAyE,CAAC,CAAC,KAAKD,MAAhF,CAAnB;;AAEA,WAAKe,OAAL;AACD;;;SAOD,eAAc;AACZ,aAAO,KAAKd,QAAZ;AACD,K;SAPD,aAAYiB,CAAZ,EAAe;AACb,WAAKjB,QAAL,GAAgBiB,CAAhB;;AACA,WAAKH,OAAL;AACD;;;WA8BD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;kDAjDyCI,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport Main from './main';\n\nexport const isComplete = (session, model) => {\n if (!session || !session.value) {\n return false;\n }\n\n return Object.values(session.value || {}).some((value) => !!value);\n};\n\nexport default class InlineDropdown extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), isComplete(this._session), !!this._model));\n\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 _render = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n model: this._model,\n value: this._session.value,\n onChange: this.changeSession,\n });\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), isComplete(this._session)));\n };\n\n changeSession = (value) => {\n this.session.value = value;\n this.dispatchChangedEvent();\n this._render();\n };\n\n connectedCallback() {\n this._render();\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["isComplete","session","model","value","Object","values","some","DragInTheBlank","_model","_session","elem","React","createElement","Main","onChange","changeSession","ReactDOM","render","dispatchEvent","SessionChangedEvent","tagName","toLowerCase","dispatchChangedEvent","_render","m","ModelSetEvent","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,OAAD,EAAUC,KAAV,EAAoB;AAC5C,MAAI,CAACD,OAAD,IAAY,CAACA,OAAO,CAACE,KAAzB,EAAgC;AAC9B,WAAO,KAAP;AACD;;AAED,SAAOC,MAAM,CAACC,MAAP,CAAcJ,OAAO,CAACE,KAAR,IAAiB,EAA/B,EAAmCG,IAAnC,CAAwC,UAACH,KAAD;AAAA,WAAW,CAAC,CAACA,KAAb;AAAA,GAAxC,CAAP;AACD,CANM;;;;IAQcI,c;;;;;AACnB,4BAAc;AAAA;;AAAA;AACZ;AADY,gGAsBJ,YAAM;AACd,UAAI,MAAKC,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAIC,IAAI,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACnCX,UAAAA,KAAK,EAAE,MAAKM,MADuB;AAEnCL,UAAAA,KAAK,EAAE,MAAKM,QAAL,CAAcN,KAFc;AAGnCW,UAAAA,QAAQ,EAAE,MAAKC;AAHoB,SAA1B,CAAX;;AAMAC,6BAASC,MAAT,CAAgBP,IAAhB,kDAA4B,YAAM;AAChC;AACD,SAFD;AAGD;AACF,KAlCa;AAAA,6GAoCS,YAAM;AAC3B,YAAKQ,aAAL,CAAmB,IAAIC,oCAAJ,CAAwB,MAAKC,OAAL,CAAaC,WAAb,EAAxB,EAAoDrB,UAAU,CAAC,MAAKS,QAAN,CAA9D,CAAnB;AACD,KAtCa;AAAA,sGAwCE,UAACN,KAAD,EAAW;AACzB,YAAKF,OAAL,CAAaE,KAAb,GAAqBA,KAArB;;AACA,YAAKmB,oBAAL;;AACA,YAAKC,OAAL;AACD,KA5Ca;AAEZ,UAAKf,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,IAAhB;AAHY;AAIb;;;;SAED,aAAUe,CAAV,EAAa;AACX,WAAKhB,MAAL,GAAcgB,CAAd;AACA,WAAKN,aAAL,CAAmB,IAAIO,8BAAJ,CAAkB,KAAKL,OAAL,CAAaC,WAAb,EAAlB,EAA8CrB,UAAU,CAAC,KAAKS,QAAN,CAAxD,EAAyE,CAAC,CAAC,KAAKD,MAAhF,CAAnB;;AAEA,WAAKe,OAAL;AACD;;;SAOD,eAAc;AACZ,aAAO,KAAKd,QAAZ;AACD,K;SAPD,aAAYiB,CAAZ,EAAe;AACb,WAAKjB,QAAL,GAAgBiB,CAAhB;;AACA,WAAKH,OAAL;AACD;;;WA8BD,6BAAoB;AAClB,WAAKA,OAAL;AACD;;;kDAjDyCI,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/pie-toolbox/math-rendering-accessible';\nimport { ModelSetEvent, SessionChangedEvent } from '@pie-framework/pie-player-events';\nimport Main from './main';\n\nexport const isComplete = (session, model) => {\n if (!session || !session.value) {\n return false;\n }\n\n return Object.values(session.value || {}).some((value) => !!value);\n};\n\nexport default class DragInTheBlank extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(new ModelSetEvent(this.tagName.toLowerCase(), isComplete(this._session), !!this._model));\n\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 _render = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n model: this._model,\n value: this._session.value,\n onChange: this.changeSession,\n });\n\n ReactDOM.render(elem, this, () => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), isComplete(this._session)));\n };\n\n changeSession = (value) => {\n this.session.value = value;\n this.dispatchChangedEvent();\n this._render();\n };\n\n connectedCallback() {\n this._render();\n }\n}\n"],"file":"index.js"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "6.4.1-next.7+b1fff343d",
7
+ "version": "6.5.0",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "postpublish": "../../scripts/postpublish"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@material-ui/core": "^3.9.2",
14
14
  "@pie-framework/pie-player-events": "^0.1.0",
15
- "@pie-lib/pie-toolbox": "2.5.0",
15
+ "@pie-lib/pie-toolbox": "2.6.0",
16
16
  "classnames": "^2.2.5",
17
17
  "lodash": "^4.17.10",
18
18
  "prop-types": "^15.6.1",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "",
23
23
  "license": "ISC",
24
- "gitHead": "b1fff343d21ce4961603c15c842d439dc47139b6",
24
+ "gitHead": "67c7ce92d1e5e2e3bba47606b7004e094caba59e",
25
25
  "main": "lib/index.js",
26
26
  "module": "src/index.js"
27
27
  }