@pie-element/categorize 6.7.2 → 6.7.3-next.1016
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 +160 -0
- package/configure/CHANGELOG.md +117 -0
- package/configure/lib/defaults.js +27 -1
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/design/builder.js +1 -1
- package/configure/lib/design/buttons.js +6 -4
- package/configure/lib/design/buttons.js.map +1 -1
- package/configure/lib/design/categories/alternateResponses.js +4 -2
- package/configure/lib/design/categories/alternateResponses.js.map +1 -1
- package/configure/lib/design/categories/category.js +13 -4
- package/configure/lib/design/categories/category.js.map +1 -1
- package/configure/lib/design/categories/choice-preview.js +4 -4
- package/configure/lib/design/categories/choice-preview.js.map +1 -1
- package/configure/lib/design/categories/droppable-placeholder.js +3 -3
- package/configure/lib/design/categories/droppable-placeholder.js.map +1 -1
- package/configure/lib/design/categories/index.js +84 -11
- package/configure/lib/design/categories/index.js.map +1 -1
- package/configure/lib/design/choices/choice.js +25 -6
- package/configure/lib/design/choices/choice.js.map +1 -1
- package/configure/lib/design/choices/config.js +5 -3
- package/configure/lib/design/choices/config.js.map +1 -1
- package/configure/lib/design/choices/index.js +42 -8
- package/configure/lib/design/choices/index.js.map +1 -1
- package/configure/lib/design/header.js +15 -5
- package/configure/lib/design/header.js.map +1 -1
- package/configure/lib/design/index.js +57 -11
- package/configure/lib/design/index.js.map +1 -1
- package/configure/lib/design/input-header.js +16 -4
- package/configure/lib/design/input-header.js.map +1 -1
- package/configure/lib/index.js +3 -3
- package/configure/lib/main.js +1 -1
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/utils.js +20 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +4 -4
- package/controller/CHANGELOG.md +16 -0
- package/controller/lib/index.js +83 -3
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/docs/config-schema.json +139 -0
- package/docs/config-schema.json.md +109 -1
- package/docs/demo/generate.js +1 -0
- package/docs/pie-schema.json +52 -0
- package/docs/pie-schema.json.md +43 -0
- package/lib/categorize/categories.js +9 -4
- package/lib/categorize/categories.js.map +1 -1
- package/lib/categorize/category.js +4 -4
- package/lib/categorize/category.js.map +1 -1
- package/lib/categorize/choice.js +5 -4
- package/lib/categorize/choice.js.map +1 -1
- package/lib/categorize/choices.js +12 -5
- package/lib/categorize/choices.js.map +1 -1
- package/lib/categorize/droppable-placeholder.js +2 -2
- package/lib/categorize/droppable-placeholder.js.map +1 -1
- package/lib/categorize/grid-content.js +3 -3
- package/lib/categorize/grid-content.js.map +1 -1
- package/lib/categorize/index.js +11 -15
- package/lib/categorize/index.js.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/docs/demo/.pie/.configure/package.json +0 -10
- package/docs/demo/.pie/.configure/yarn.lock +0 -1128
- package/docs/demo/.pie/.controllers/package.json +0 -10
- package/docs/demo/.pie/.controllers/yarn.lock +0 -43
- package/docs/demo/.pie/info.entry.js +0 -89
- package/docs/demo/.pie/info.webpack.config.js +0 -108
- package/docs/demo/.pie/package.json +0 -10
- package/docs/demo/.pie/yarn.lock +0 -579
- package/module/configure.js +0 -3155
- package/module/controller.js +0 -19950
- package/module/demo.js +0 -118
- package/module/element.js +0 -1470
- package/module/index.html +0 -16
- package/module/manifest.json +0 -10
package/lib/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var _categorize = _interopRequireDefault(require("./categorize"));
|
|
|
31
31
|
|
|
32
32
|
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); }; }
|
|
33
33
|
|
|
34
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
34
|
+
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; } }
|
|
35
35
|
|
|
36
36
|
var Categorize = /*#__PURE__*/function (_HTMLElement) {
|
|
37
37
|
(0, _inherits2["default"])(Categorize, _HTMLElement);
|
|
@@ -61,6 +61,9 @@ var Categorize = /*#__PURE__*/function (_HTMLElement) {
|
|
|
61
61
|
}
|
|
62
62
|
}, {
|
|
63
63
|
key: "session",
|
|
64
|
+
get: function get() {
|
|
65
|
+
return this._session;
|
|
66
|
+
},
|
|
64
67
|
set: function set(s) {
|
|
65
68
|
if (s && !s.answers) {
|
|
66
69
|
s.answers = [];
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["Categorize","m","_model","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","render","_session","Array","isArray","answers","length","s","SessionChangedEvent","el","React","createElement","CategorizeComponent","model","session","onAnswersChange","changeAnswers","bind","onShowCorrectToggle","ReactDOM","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;;;;;IAEqBA,U;;;;;;;;;;;;SACnB,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;AAEA,WAAKE,aAAL,CACE,IAAIC,8BAAJ,CACE,KAAKC,OAAL,CAAaC,WAAb,EADF,EAEE,KAAKC,UAAL,EAFF,EAGE,CAAC,CAAC,KAAKL,MAHT,CADF;AAOA,WAAKM,MAAL;AACD;;;WAED,sBAAa;AACX,UAAI,CAAC,KAAKC,QAAV,EAAoB;AAClB,eAAO,KAAP;AACD;;AAED,aACEC,KAAK,CAACC,OAAN,CAAc,KAAKF,QAAL,CAAcG,OAA5B,KAAwC,KAAKH,QAAL,CAAcG,OAAd,CAAsBC,MAAtB,GAA+B,CADzE;AAGD;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["Categorize","m","_model","dispatchEvent","ModelSetEvent","tagName","toLowerCase","isComplete","render","_session","Array","isArray","answers","length","s","SessionChangedEvent","el","React","createElement","CategorizeComponent","model","session","onAnswersChange","changeAnswers","bind","onShowCorrectToggle","ReactDOM","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;;;;;IAEqBA,U;;;;;;;;;;;;SACnB,aAAUC,CAAV,EAAa;AACX,WAAKC,MAAL,GAAcD,CAAd;AAEA,WAAKE,aAAL,CACE,IAAIC,8BAAJ,CACE,KAAKC,OAAL,CAAaC,WAAb,EADF,EAEE,KAAKC,UAAL,EAFF,EAGE,CAAC,CAAC,KAAKL,MAHT,CADF;AAOA,WAAKM,MAAL;AACD;;;WAED,sBAAa;AACX,UAAI,CAAC,KAAKC,QAAV,EAAoB;AAClB,eAAO,KAAP;AACD;;AAED,aACEC,KAAK,CAACC,OAAN,CAAc,KAAKF,QAAL,CAAcG,OAA5B,KAAwC,KAAKH,QAAL,CAAcG,OAAd,CAAsBC,MAAtB,GAA+B,CADzE;AAGD;;;SAWD,eAAc;AACZ,aAAO,KAAKJ,QAAZ;AACD,K;SAXD,aAAYK,CAAZ,EAAe;AACb,UAAIA,CAAC,IAAI,CAACA,CAAC,CAACF,OAAZ,EAAqB;AACnBE,QAAAA,CAAC,CAACF,OAAF,GAAY,EAAZ;AACD;;AAED,WAAKH,QAAL,GAAgBK,CAAhB;AACA,WAAKN,MAAL;AACD;;;WAMD,uBAAcI,OAAd,EAAuB;AACrB,WAAKH,QAAL,CAAcG,OAAd,GAAwBA,OAAxB;AAEA,WAAKT,aAAL,CACE,IAAIY,oCAAJ,CAAwB,KAAKV,OAAL,CAAaC,WAAb,EAAxB,EAAoD,KAAKC,UAAL,EAApD,CADF;AAIA,WAAKC,MAAL;AACD;;;WAED,+BAAsB;AACpB,qCAAW,IAAX;AACD;;;WAED,kBAAS;AAAA;;AACP,UAAI,KAAKN,MAAL,IAAe,KAAKO,QAAxB,EAAkC;AAChC,YAAMO,EAAE,gBAAGC,kBAAMC,aAAN,CAAoBC,sBAApB,EAAyC;AAClDC,UAAAA,KAAK,EAAE,KAAKlB,MADsC;AAElDmB,UAAAA,OAAO,EAAE,KAAKZ,QAFoC;AAGlDa,UAAAA,eAAe,EAAE,KAAKC,aAAL,CAAmBC,IAAnB,CAAwB,IAAxB,CAHiC;AAIlDC,UAAAA,mBAAmB,EAAE,KAAKA,mBAAL,CAAyBD,IAAzB,CAA8B,IAA9B;AAJ6B,SAAzC,CAAX;;AAOAE,6BAASlB,MAAT,CAAgBQ,EAAhB,EAAoB,IAApB,EAA0B,YAAM;AAC9B,yCAAW,KAAX;AACD,SAFD;AAGD;AACF;;;kDAhEqCW,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport {\n SessionChangedEvent,\n ModelSetEvent\n} from '@pie-framework/pie-player-events';\nimport CategorizeComponent from './categorize';\n\nexport default class Categorize 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 changeAnswers(answers) {\n this._session.answers = answers;\n\n this.dispatchEvent(\n new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete())\n );\n\n this.render();\n }\n\n onShowCorrectToggle() {\n renderMath(this);\n }\n\n render() {\n if (this._model && this._session) {\n const el = React.createElement(CategorizeComponent, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers.bind(this),\n onShowCorrectToggle: this.onShowCorrectToggle.bind(this),\n });\n\n ReactDOM.render(el, this, () => {\n renderMath(this);\n });\n }\n }\n}\n"],"file":"index.js"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "6.7.
|
|
7
|
+
"version": "6.7.3-next.1016+1dc291af4",
|
|
8
8
|
"description": "",
|
|
9
9
|
"author": "pie framework developers",
|
|
10
10
|
"license": "ISC",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"@material-ui/core": "^3.9.2",
|
|
13
13
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
14
14
|
"@pie-lib/categorize": "^0.6.24",
|
|
15
|
-
"@pie-lib/correct-answer-toggle": "^2.3.
|
|
15
|
+
"@pie-lib/correct-answer-toggle": "^2.3.39",
|
|
16
16
|
"@pie-lib/drag": "^1.1.52",
|
|
17
|
-
"@pie-lib/math-rendering": "^2.3
|
|
18
|
-
"@pie-lib/render-ui": "^4.
|
|
17
|
+
"@pie-lib/math-rendering": "^2.4.3",
|
|
18
|
+
"@pie-lib/render-ui": "^4.12.9",
|
|
19
19
|
"classnames": "^2.2.5",
|
|
20
20
|
"debug": "^4.1.1",
|
|
21
21
|
"lodash": "^4.17.15",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react-dnd": "^9.3.2",
|
|
25
25
|
"react-dom": "^16.8.1"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "1dc291af490cf91cc86a6a7c8d0eb0fdf184232b",
|
|
28
28
|
"scripts": {
|
|
29
29
|
"postpublish": "../../scripts/postpublish"
|
|
30
30
|
},
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "auto generated package.json",
|
|
3
|
-
"license": "MIT",
|
|
4
|
-
"name": "configure-generated-pkg",
|
|
5
|
-
"private": true,
|
|
6
|
-
"version": "0.0.1",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@pie-element/categorize-configure": "file:../node_modules/@pie-element/categorize/configure"
|
|
9
|
-
}
|
|
10
|
-
}
|