@pie-element/hotspot 5.7.0 → 5.7.1-beta.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.
Files changed (51) hide show
  1. package/configure/package.json +3 -3
  2. package/configure/src/defaults.js +2 -2
  3. package/configure/src/root.jsx +1 -1
  4. package/controller/package.json +2 -2
  5. package/controller/src/defaults.js +2 -2
  6. package/docs/demo/generate.js +7 -2
  7. package/package.json +7 -6
  8. package/configure/lib/button.js +0 -61
  9. package/configure/lib/button.js.map +0 -1
  10. package/configure/lib/defaults.js +0 -82
  11. package/configure/lib/defaults.js.map +0 -1
  12. package/configure/lib/hotspot-container.js +0 -398
  13. package/configure/lib/hotspot-container.js.map +0 -1
  14. package/configure/lib/hotspot-drawable.js +0 -445
  15. package/configure/lib/hotspot-drawable.js.map +0 -1
  16. package/configure/lib/hotspot-palette.js +0 -154
  17. package/configure/lib/hotspot-palette.js.map +0 -1
  18. package/configure/lib/hotspot-polygon.js +0 -202
  19. package/configure/lib/hotspot-polygon.js.map +0 -1
  20. package/configure/lib/hotspot-rectangle.js +0 -150
  21. package/configure/lib/hotspot-rectangle.js.map +0 -1
  22. package/configure/lib/index.js +0 -212
  23. package/configure/lib/index.js.map +0 -1
  24. package/configure/lib/root.js +0 -401
  25. package/configure/lib/root.js.map +0 -1
  26. package/configure/lib/upload-control.js +0 -68
  27. package/configure/lib/upload-control.js.map +0 -1
  28. package/configure/lib/utils.js +0 -160
  29. package/configure/lib/utils.js.map +0 -1
  30. package/controller/lib/defaults.js +0 -26
  31. package/controller/lib/defaults.js.map +0 -1
  32. package/controller/lib/index.js +0 -263
  33. package/controller/lib/index.js.map +0 -1
  34. package/controller/lib/utils.js +0 -50
  35. package/controller/lib/utils.js.map +0 -1
  36. package/lib/hotspot/container.js +0 -246
  37. package/lib/hotspot/container.js.map +0 -1
  38. package/lib/hotspot/icons.js +0 -8
  39. package/lib/hotspot/icons.js.map +0 -1
  40. package/lib/hotspot/image.js +0 -133
  41. package/lib/hotspot/image.js.map +0 -1
  42. package/lib/hotspot/index.js +0 -207
  43. package/lib/hotspot/index.js.map +0 -1
  44. package/lib/hotspot/polygon.js +0 -225
  45. package/lib/hotspot/polygon.js.map +0 -1
  46. package/lib/hotspot/rectangle.js +0 -207
  47. package/lib/hotspot/rectangle.js.map +0 -1
  48. package/lib/index.js +0 -114
  49. package/lib/index.js.map +0 -1
  50. package/lib/session-updater.js +0 -30
  51. package/lib/session-updater.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot-configure",
3
3
  "private": true,
4
- "version": "5.4.0",
4
+ "version": "5.4.1-beta.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,8 +10,8 @@
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@material-ui/icons": "^3.0.2",
12
12
  "@pie-framework/pie-configure-events": "^1.3.0",
13
- "@pie-lib/config-ui": "^11.3.0",
14
- "@pie-lib/editable-html": "^9.5.0",
13
+ "@pie-lib/config-ui": "12.0.0-beta.4",
14
+ "@pie-lib/editable-html": "10.0.0-beta.5",
15
15
  "classnames": "^2.2.6",
16
16
  "debug": "^3.1.0",
17
17
  "konva": "^3.2.4",
@@ -14,8 +14,8 @@ export default {
14
14
  height: 0,
15
15
  width: 0,
16
16
  },
17
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
18
- hotspotList: ['rgba(137, 183, 244, 0.65)'],
17
+ hotspotColor: 'rgba(137, 183, 244, 0.25)',
18
+ hotspotList: ['rgba(137, 183, 244, 0.25)'],
19
19
  outlineColor: 'blue',
20
20
  outlineList: ['blue'],
21
21
  rationaleEnabled: true,
@@ -295,7 +295,7 @@ const styles = (theme) => ({
295
295
  },
296
296
  errorText: {
297
297
  fontSize: '12px',
298
- color: 'red',
298
+ color: theme.palette.error.main,
299
299
  paddingTop: theme.spacing.unit,
300
300
  },
301
301
  });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot-controller",
3
3
  "private": true,
4
- "version": "3.5.1",
4
+ "version": "3.5.2-beta.0",
5
5
  "description": "",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -11,7 +11,7 @@
11
11
  "main": "lib/index.js",
12
12
  "module": "src/index.js",
13
13
  "dependencies": {
14
- "@pie-lib/controller-utils": "^0.2.27",
14
+ "@pie-lib/controller-utils": "^0.2.42",
15
15
  "debug": "^4.1.1",
16
16
  "lodash": "^4.17.15"
17
17
  }
@@ -11,8 +11,8 @@ export default {
11
11
  height: 0,
12
12
  width: 0,
13
13
  },
14
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
15
- hotspotList: ['rgba(137, 183, 244, 0.65)'],
14
+ hotspotColor: 'rgba(137, 183, 244, 0.25)',
15
+ hotspotList: ['rgba(137, 183, 244, 0.25)'],
16
16
  outlineColor: 'blue',
17
17
  outlineList: ['blue'],
18
18
  };
@@ -6,8 +6,13 @@ exports.model = (id, element) => ({
6
6
  dimensions: { height: 291, width: 410 },
7
7
  imageUrl:
8
8
  'https://store-images.s-microsoft.com/image/apps.2544.13768621950225582.167ba0c8-6eb8-47bb-96fe-278c89bf0dc9.ea440c13-fd1d-4705-b62c-9bfd9054b8b3?w=672&h=378&q=80&mode=letterbox&background=%23FFE4E4E4&format=jpg',
9
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
10
- hotspotList: ['rgba(137, 183, 244, 0.65)', 'rgba(217, 30, 24, 0.65)', 'rgba(254, 241, 96, 0.65)'],
9
+ hotspotColor: 'rgba(137, 183, 244, 0.25)',
10
+ hotspotList: [
11
+ 'rgba(137, 183, 244, 0.25)',
12
+ 'rgba(217, 30, 24, 0.25)',
13
+ 'rgba(254, 241, 96, 0.25)',
14
+ 'rgba(0, 0, 0, 0.1)',
15
+ ],
11
16
  outlineColor: 'blue',
12
17
  outlineList: ['blue', 'red', 'yellow'],
13
18
  multipleCorrect: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot",
3
- "version": "5.7.0",
3
+ "version": "5.7.1-beta.1+73223f303",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -9,10 +9,11 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.3",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/correct-answer-toggle": "^2.3.47",
13
- "@pie-lib/math-rendering": "^2.5.1",
14
- "@pie-lib/render-ui": "^4.13.7",
15
- "@pie-lib/test-utils": "^0.2.20",
12
+ "@pie-lib/correct-answer-toggle": "^2.3.62",
13
+ "@pie-lib/math-rendering": "^2.5.12",
14
+ "@pie-lib/render-ui": "^4.14.12",
15
+ "@pie-lib/test-utils": "^0.2.32",
16
+ "is-plain-object": "^5.0.0",
16
17
  "konva": "^3.2.5",
17
18
  "prop-types": "^15.6.1",
18
19
  "react": "^16.8.1",
@@ -21,7 +22,7 @@
21
22
  },
22
23
  "author": "pie framework developers",
23
24
  "license": "ISC",
24
- "gitHead": "7fcbba0ed99ce1db1e66598ea6865b4a2425d0a4",
25
+ "gitHead": "73223f303ea31ca510b096d77e6fb06382b0f0c6",
25
26
  "scripts": {
26
27
  "postpublish": "../../scripts/postpublish"
27
28
  },
@@ -1,61 +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 _react = _interopRequireDefault(require("react"));
11
-
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
- var _styles = require("@material-ui/core/styles");
15
-
16
- var _classnames = _interopRequireDefault(require("classnames"));
17
-
18
- var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
19
-
20
- var RawButton = function RawButton(_ref) {
21
- var classes = _ref.classes,
22
- className = _ref.className,
23
- label = _ref.label,
24
- onClick = _ref.onClick,
25
- disabled = _ref.disabled;
26
- return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
27
- onClick: onClick,
28
- disabled: disabled,
29
- className: (0, _classnames["default"])(classes.addButton, className),
30
- size: "small",
31
- variant: "contained",
32
- color: "default"
33
- }, label);
34
- };
35
-
36
- RawButton.propTypes = {
37
- classes: _propTypes["default"].object.isRequired,
38
- className: _propTypes["default"].string,
39
- disabled: _propTypes["default"].bool,
40
- label: _propTypes["default"].string,
41
- onClick: _propTypes["default"].func
42
- };
43
- RawButton.defaultProps = {
44
- className: '',
45
- disabled: false,
46
- label: 'Add',
47
- onClick: function onClick() {}
48
- };
49
-
50
- var styles = function styles() {
51
- return {
52
- addButton: {
53
- marginLeft: 8
54
- }
55
- };
56
- };
57
-
58
- var ButtonStyled = (0, _styles.withStyles)(styles)(RawButton);
59
- var _default = ButtonStyled;
60
- exports["default"] = _default;
61
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/button.jsx"],"names":["RawButton","classes","className","label","onClick","disabled","addButton","propTypes","PropTypes","object","isRequired","string","bool","func","defaultProps","styles","marginLeft","ButtonStyled"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,SAAZ,QAAYA,SAAZ;AAAA,MAAuBC,KAAvB,QAAuBA,KAAvB;AAAA,MAA8BC,OAA9B,QAA8BA,OAA9B;AAAA,MAAuCC,QAAvC,QAAuCA,QAAvC;AAAA,sBAChB,gCAAC,kBAAD;AACE,IAAA,OAAO,EAAED,OADX;AAEE,IAAA,QAAQ,EAAEC,QAFZ;AAGE,IAAA,SAAS,EAAE,4BAAWJ,OAAO,CAACK,SAAnB,EAA8BJ,SAA9B,CAHb;AAIE,IAAA,IAAI,EAAC,OAJP;AAKE,IAAA,OAAO,EAAC,WALV;AAME,IAAA,KAAK,EAAC;AANR,KAQGC,KARH,CADgB;AAAA,CAAlB;;AAaAH,SAAS,CAACO,SAAV,GAAsB;AACpBN,EAAAA,OAAO,EAAEO,sBAAUC,MAAV,CAAiBC,UADN;AAEpBR,EAAAA,SAAS,EAAEM,sBAAUG,MAFD;AAGpBN,EAAAA,QAAQ,EAAEG,sBAAUI,IAHA;AAIpBT,EAAAA,KAAK,EAAEK,sBAAUG,MAJG;AAKpBP,EAAAA,OAAO,EAAEI,sBAAUK;AALC,CAAtB;AAQAb,SAAS,CAACc,YAAV,GAAyB;AACvBZ,EAAAA,SAAS,EAAE,EADY;AAEvBG,EAAAA,QAAQ,EAAE,KAFa;AAGvBF,EAAAA,KAAK,EAAE,KAHgB;AAIvBC,EAAAA,OAAO,EAAE,mBAAM,CAAE;AAJM,CAAzB;;AAOA,IAAMW,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBT,IAAAA,SAAS,EAAE;AACTU,MAAAA,UAAU,EAAE;AADH;AADS,GAAP;AAAA,CAAf;;AAMA,IAAMC,YAAY,GAAG,wBAAWF,MAAX,EAAmBf,SAAnB,CAArB;eAEeiB,Y","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport Button from '@material-ui/core/Button';\n\nconst RawButton = ({ classes, className, label, onClick, disabled }) => (\n <Button\n onClick={onClick}\n disabled={disabled}\n className={classNames(classes.addButton, className)}\n size=\"small\"\n variant=\"contained\"\n color=\"default\"\n >\n {label}\n </Button>\n);\n\nRawButton.propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string,\n onClick: PropTypes.func,\n};\n\nRawButton.defaultProps = {\n className: '',\n disabled: false,\n label: 'Add',\n onClick: () => {},\n};\n\nconst styles = () => ({\n addButton: {\n marginLeft: 8,\n },\n});\n\nconst ButtonStyled = withStyles(styles)(RawButton);\n\nexport default ButtonStyled;\n"],"file":"button.js"}
@@ -1,82 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _default = {
8
- model: {
9
- prompt: 'This is the question prompt',
10
- toolbarEditorPosition: 'bottom',
11
- promptEnabled: true,
12
- imageUrl: '',
13
- shapes: {
14
- rectangles: [],
15
- polygons: []
16
- },
17
- multipleCorrect: true,
18
- partialScoring: false,
19
- dimensions: {
20
- height: 0,
21
- width: 0
22
- },
23
- hotspotColor: 'rgba(137, 183, 244, 0.65)',
24
- hotspotList: ['rgba(137, 183, 244, 0.65)'],
25
- outlineColor: 'blue',
26
- outlineList: ['blue'],
27
- rationaleEnabled: true,
28
- teacherInstructionsEnabled: true,
29
- studentInstructionsEnabled: true,
30
- strokeWidth: 5
31
- },
32
- configuration: {
33
- multipleCorrect: {
34
- settings: true,
35
- label: 'Multiple Correct Responses'
36
- },
37
- partialScoring: {
38
- settings: false,
39
- label: 'Allow Partial Scoring'
40
- },
41
- rationale: {
42
- settings: true,
43
- label: 'Rationale'
44
- },
45
- prompt: {
46
- settings: true,
47
- label: 'Prompt'
48
- },
49
- settingsPanelDisabled: false,
50
- spellCheck: {
51
- label: 'Spellcheck',
52
- settings: false,
53
- enabled: true
54
- },
55
- teacherInstructions: {
56
- settings: true,
57
- label: 'Teacher Instructions'
58
- },
59
- preserveAspectRatio: {
60
- settings: false,
61
- enabled: true,
62
- label: 'Preserve aspect ratio'
63
- },
64
- minShapes: 2,
65
- maxImageWidth: {
66
- teacherInstructions: 300,
67
- prompt: 300,
68
- rationale: 300
69
- },
70
- maxImageHeight: {
71
- teacherInstructions: 300,
72
- prompt: 300,
73
- rationale: 300
74
- },
75
- withRubric: {
76
- settings: false,
77
- label: 'Add Rubric'
78
- }
79
- }
80
- };
81
- exports["default"] = _default;
82
- //# sourceMappingURL=defaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","toolbarEditorPosition","promptEnabled","imageUrl","shapes","rectangles","polygons","multipleCorrect","partialScoring","dimensions","height","width","hotspotColor","hotspotList","outlineColor","outlineList","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","strokeWidth","configuration","settings","label","rationale","settingsPanelDisabled","spellCheck","enabled","teacherInstructions","preserveAspectRatio","minShapes","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BADH;AAELC,IAAAA,qBAAqB,EAAE,QAFlB;AAGLC,IAAAA,aAAa,EAAE,IAHV;AAILC,IAAAA,QAAQ,EAAE,EAJL;AAKLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,UAAU,EAAE,EADN;AAENC,MAAAA,QAAQ,EAAE;AAFJ,KALH;AASLC,IAAAA,eAAe,EAAE,IATZ;AAULC,IAAAA,cAAc,EAAE,KAVX;AAWLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,CADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KAXP;AAeLC,IAAAA,YAAY,EAAE,2BAfT;AAgBLC,IAAAA,WAAW,EAAE,CAAC,2BAAD,CAhBR;AAiBLC,IAAAA,YAAY,EAAE,MAjBT;AAkBLC,IAAAA,WAAW,EAAE,CAAC,MAAD,CAlBR;AAmBLC,IAAAA,gBAAgB,EAAE,IAnBb;AAoBLC,IAAAA,0BAA0B,EAAE,IApBvB;AAqBLC,IAAAA,0BAA0B,EAAE,IArBvB;AAsBLC,IAAAA,WAAW,EAAE;AAtBR,GADM;AAyBbC,EAAAA,aAAa,EAAE;AACbb,IAAAA,eAAe,EAAE;AACfc,MAAAA,QAAQ,EAAE,IADK;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KADJ;AAKbd,IAAAA,cAAc,EAAE;AACda,MAAAA,QAAQ,EAAE,KADI;AAEdC,MAAAA,KAAK,EAAE;AAFO,KALH;AASbC,IAAAA,SAAS,EAAE;AACTF,MAAAA,QAAQ,EAAE,IADD;AAETC,MAAAA,KAAK,EAAE;AAFE,KATE;AAabtB,IAAAA,MAAM,EAAE;AACNqB,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KAbK;AAiBbE,IAAAA,qBAAqB,EAAE,KAjBV;AAkBbC,IAAAA,UAAU,EAAE;AACVH,MAAAA,KAAK,EAAE,YADG;AAEVD,MAAAA,QAAQ,EAAE,KAFA;AAGVK,MAAAA,OAAO,EAAE;AAHC,KAlBC;AAuBbC,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KAvBR;AA2BbM,IAAAA,mBAAmB,EAAE;AACnBP,MAAAA,QAAQ,EAAE,KADS;AAEnBK,MAAAA,OAAO,EAAE,IAFU;AAGnBJ,MAAAA,KAAK,EAAE;AAHY,KA3BR;AAgCbO,IAAAA,SAAS,EAAE,CAhCE;AAiCbC,IAAAA,aAAa,EAAE;AACbH,MAAAA,mBAAmB,EAAE,GADR;AAEb3B,MAAAA,MAAM,EAAE,GAFK;AAGbuB,MAAAA,SAAS,EAAE;AAHE,KAjCF;AAsCbQ,IAAAA,cAAc,EAAE;AACdJ,MAAAA,mBAAmB,EAAE,GADP;AAEd3B,MAAAA,MAAM,EAAE,GAFM;AAGduB,MAAAA,SAAS,EAAE;AAHG,KAtCH;AA2CbS,IAAAA,UAAU,EAAE;AACVX,MAAAA,QAAQ,EAAE,KADA;AAEVC,MAAAA,KAAK,EAAE;AAFG;AA3CC;AAzBF,C","sourcesContent":["export default {\n model: {\n prompt: 'This is the question prompt',\n toolbarEditorPosition: 'bottom',\n promptEnabled: true,\n imageUrl: '',\n shapes: {\n rectangles: [],\n polygons: [],\n },\n multipleCorrect: true,\n partialScoring: false,\n dimensions: {\n height: 0,\n width: 0,\n },\n hotspotColor: 'rgba(137, 183, 244, 0.65)',\n hotspotList: ['rgba(137, 183, 244, 0.65)'],\n outlineColor: 'blue',\n outlineList: ['blue'],\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n strokeWidth: 5,\n },\n configuration: {\n multipleCorrect: {\n settings: true,\n label: 'Multiple Correct Responses',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n preserveAspectRatio: {\n settings: false,\n enabled: true,\n label: 'Preserve aspect ratio',\n },\n minShapes: 2,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n },\n};\n"],"file":"defaults.js"}