@pie-element/hotspot 4.10.1 → 4.10.6

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
+ ## [4.10.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@4.10.5...@pie-element/hotspot@4.10.6) (2021-12-13)
7
+
8
+ **Note:** Version bump only for package @pie-element/hotspot
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.10.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@4.10.2...@pie-element/hotspot@4.10.3) (2021-11-29)
15
+
16
+ **Note:** Version bump only for package @pie-element/hotspot
17
+
18
+
19
+
20
+
21
+
22
+ ## [4.10.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@4.10.1...@pie-element/hotspot@4.10.2) (2021-11-11)
23
+
24
+ **Note:** Version bump only for package @pie-element/hotspot
25
+
26
+
27
+
28
+
29
+
6
30
  ## [4.10.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot@4.10.0...@pie-element/hotspot@4.10.1) (2021-10-04)
7
31
 
8
32
  **Note:** Version bump only for package @pie-element/hotspot
@@ -25,7 +49,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
25
49
  ### Features
26
50
 
27
51
  * **hotspot:** add the possibility to paste image in authoring PD-478 ([16f1198](https://github.com/pie-framework/pie-elements/commit/16f1198ea5a839759f626927f1b65b5483a9aa85))
28
-
52
+ * **hotspot:** Added option to set toolbar editor position ([a36faea](https://github.com/pie-framework/pie-elements/commit/a36faea1cc0cb9ed5574fcb860941eea298b1cd3))
53
+ * **hotspot:** Added tooltip annotations to the icons PD-625 ([354a41e](https://github.com/pie-framework/pie-elements/commit/354a41ea2738d35fc09b1d7ab4bc7f796eb31c65))
54
+ * **hotspot:** set toolbar editor position to bottom ([3f3db3a](https://github.com/pie-framework/pie-elements/commit/3f3db3accdb1469f8b52535081da0cc339e43a48))
55
+ * **hotspot:** toolbar editor position - change double quotes into single quotes ([722ec64](https://github.com/pie-framework/pie-elements/commit/722ec64c1f87f69f2c086e80923d0c137b4aad39))
29
56
 
30
57
 
31
58
 
@@ -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
+ ## [4.6.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@4.6.4...@pie-element/hotspot-configure@4.6.5) (2021-12-13)
7
+
8
+ **Note:** Version bump only for package @pie-element/hotspot-configure
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.6.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@4.6.1...@pie-element/hotspot-configure@4.6.2) (2021-11-29)
15
+
16
+ **Note:** Version bump only for package @pie-element/hotspot-configure
17
+
18
+
19
+
20
+
21
+
6
22
  ## [4.6.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-configure@4.6.0...@pie-element/hotspot-configure@4.6.1) (2021-10-04)
7
23
 
8
24
  **Note:** Version bump only for package @pie-element/hotspot-configure
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot-configure",
3
3
  "private": true,
4
- "version": "4.6.1",
4
+ "version": "4.6.5",
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.2.0",
13
- "@pie-lib/config-ui": "^10.10.11",
14
- "@pie-lib/editable-html": "^7.17.11",
13
+ "@pie-lib/config-ui": "^10.10.13",
14
+ "@pie-lib/editable-html": "^7.17.13",
15
15
  "classnames": "^2.2.6",
16
16
  "debug": "^3.1.0",
17
17
  "konva": "^3.2.4",
@@ -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
+ ## [3.4.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-controller@3.4.3...@pie-element/hotspot-controller@3.4.5) (2021-11-11)
7
+
8
+ **Note:** Version bump only for package @pie-element/hotspot-controller
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.4.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-controller@3.4.3...@pie-element/hotspot-controller@3.4.4) (2021-11-11)
15
+
16
+ **Note:** Version bump only for package @pie-element/hotspot-controller
17
+
18
+
19
+
20
+
21
+
6
22
  ## [3.4.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/hotspot-controller@3.4.1...@pie-element/hotspot-controller@3.4.3) (2021-08-05)
7
23
 
8
24
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot-controller",
3
3
  "private": true,
4
- "version": "3.4.3",
4
+ "version": "3.4.7",
5
5
  "description": "",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -87,16 +87,12 @@ var HotspotComponent = /*#__PURE__*/function (_React$Component) {
87
87
  visible: 'Hide Teacher Instructions'
88
88
  },
89
89
  className: classes.collapsible
90
- }, /*#__PURE__*/_react["default"].createElement("div", {
91
- dangerouslySetInnerHTML: {
92
- __html: teacherInstructions
93
- }
90
+ }, /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
91
+ prompt: teacherInstructions
94
92
  })), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
95
93
  className: classes.prompt
96
- }, /*#__PURE__*/_react["default"].createElement("span", {
97
- dangerouslySetInnerHTML: {
98
- __html: prompt
99
- }
94
+ }, /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
95
+ prompt: prompt
100
96
  })), imageUrl ? /*#__PURE__*/_react["default"].createElement(_container["default"], {
101
97
  isEvaluateMode: isEvaluateMode,
102
98
  session: session,
@@ -115,10 +111,8 @@ var HotspotComponent = /*#__PURE__*/function (_React$Component) {
115
111
  visible: 'Hide Rationale'
116
112
  },
117
113
  className: classes.collapsible
118
- }, /*#__PURE__*/_react["default"].createElement("div", {
119
- dangerouslySetInnerHTML: {
120
- __html: rationale
121
- }
114
+ }, /*#__PURE__*/_react["default"].createElement(_renderUi.PreviewPrompt, {
115
+ prompt: rationale
122
116
  })));
123
117
  }
124
118
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hotspot/index.jsx"],"names":["HotspotComponent","props","showCorrect","state","setState","session","model","disabled","imageUrl","prompt","mode","multipleCorrect","shapes","outlineColor","hotspotColor","dimensions","rationale","teacherInstructions","strokeWidth","onSelectChoice","classes","isEvaluateMode","hidden","visible","collapsible","__html","React","Component","propTypes","PropTypes","object","isRequired","func","defaultProps","styles","theme","paddingTop","spacing","unit","paddingBottom","fontSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEMA,gB;;;;;AACJ,4BAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,iGAOR,YAAM;AACf,UAAQC,WAAR,GAAwB,MAAKC,KAA7B,CAAQD,WAAR;;AACA,YAAKE,QAAL,CAAc;AAAEF,QAAAA,WAAW,EAAE,CAACA;AAAhB,OAAd;AACD,KAVkB;AAEjB,UAAKC,KAAL,GAAa;AACXD,MAAAA,WAAW,EAAE;AADF,KAAb;AAFiB;AAKlB;;;;WAOD,kBAAS;AACP,wBAkBI,KAAKD,KAlBT;AAAA,UACEI,OADF,eACEA,OADF;AAAA,0CAEEC,KAFF;AAAA,UAGIC,QAHJ,qBAGIA,QAHJ;AAAA,UAIIC,QAJJ,qBAIIA,QAJJ;AAAA,UAKIC,MALJ,qBAKIA,MALJ;AAAA,UAMIC,IANJ,qBAMIA,IANJ;AAAA,UAOIC,eAPJ,qB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IA9BN,EAiCIF,SAAS,IAAI,uBAAQA,SAAR,CAAb,iBACE,gCAAC,qBAAD;AACE,QAAA,MAAM,EAAE;AAAEM,UAAAA,MAAM,EAAE,gBAAV;AAA4BC,UAAAA,OAAO,EAAE;AAArC,SADV;AAEE,QAAA,SAAS,EAAEH,OAAO,CAACI;AAFrB,sBAIE;AAAK,QAAA,uBAAuB,EAAE;AAAEC,UAAAA,MAAM,EAAET;AAAV;AAA9B,QAJF,CAlCN,CADF;AA8CD;;;EAlF4BU,kBAAMC,S;;AAqFrC3B,gBAAgB,CAAC4B,SAAjB,GAA6B;AAC3BR,EAAAA,OAAO,EAAES,sBAAUC,MADQ;AAE3BxB,EAAAA,KAAK,EAAEuB,sBAAUC,MAAV,CAAiBC,UAFG;AAG3BZ,EAAAA,cAAc,EAAEU,sBAAUG,IAAV,CAAeD,UAHJ;AAI3B1B,EAAAA,OAAO,EAAEwB,sBAAUC,MAAV,CAAiBC;AAJC,CAA7B;AAOA/B,gBAAgB,CAACiC,YAAjB,GAAgC;AAC9Bb,EAAAA,OAAO,EAAE;AADqB,CAAhC;;AAIA,IAAMc,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBX,IAAAA,WAAW,EAAE;AACXY,MAAAA,UAAU,EAAED,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CADtB;AAEXC,MAAAA,aAAa,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AAFzB,KADU;AAKvB7B,IAAAA,MAAM,EAAE;AACN+B,MAAAA,QAAQ,EAAE;AADJ;AALe,GAAL;AAAA,CAApB;;eAUe,wBAAWN,MAAX,EAAmBlC,gBAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport { Collapsible, hasText } from '@pie-lib/render-ui';\nimport Container from './container';\nimport { withStyles } from '@material-ui/core/styles';\n\nclass HotspotComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n showCorrect: false\n };\n }\n\n onToggle = () => {\n const { showCorrect } = this.state;\n this.setState({ showCorrect: !showCorrect });\n };\n\n render() {\n const {\n session,\n model: {\n disabled,\n imageUrl,\n prompt,\n mode,\n multipleCorrect,\n shapes,\n outlineColor,\n hotspotColor,\n dimensions,\n rationale,\n teacherInstructions,\n strokeWidth\n },\n onSelectChoice,\n classes\n } = this.props;\n\n const isEvaluateMode = mode === 'evaluate';\n\n return (\n <div>\n {\n teacherInstructions && hasText(teacherInstructions) && (\n <Collapsible\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n className={classes.collapsible}\n >\n <div dangerouslySetInnerHTML={{ __html: teacherInstructions }}/>\n </Collapsible>\n )\n }\n\n <Typography className={classes.prompt}>\n <span dangerouslySetInnerHTML={{ __html: prompt }} />\n </Typography>\n\n {imageUrl ? (\n <Container\n isEvaluateMode={isEvaluateMode}\n session={session}\n dimensions={dimensions}\n imageUrl={imageUrl}\n hotspotColor={hotspotColor}\n multipleCorrect={multipleCorrect}\n outlineColor={outlineColor}\n onSelectChoice={onSelectChoice}\n shapes={shapes}\n disabled={disabled}\n strokeWidth={strokeWidth}\n />\n ) : null}\n\n {\n rationale && hasText(rationale) && (\n <Collapsible\n labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}\n className={classes.collapsible}\n >\n <div dangerouslySetInnerHTML={{ __html: rationale }} />\n </Collapsible>\n )\n }\n\n </div>\n );\n }\n}\n\nHotspotComponent.propTypes = {\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n onSelectChoice: PropTypes.func.isRequired,\n session: PropTypes.object.isRequired\n};\n\nHotspotComponent.defaultProps = {\n classes: {}\n};\n\nconst styles = theme => ({\n collapsible: {\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n prompt: {\n fontSize: 'inherit'\n }\n});\n\nexport default withStyles(styles)(HotspotComponent);\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/hotspot/index.jsx"],"names":["HotspotComponent","props","showCorrect","state","setState","session","model","disabled","imageUrl","prompt","mode","multipleCorrect","shapes","outlineColor","hotspotColor","dimensions","rationale","teacherInstructions","strokeWidth","onSelectChoice","classes","isEvaluateMode","hidden","visible","collapsible","React","Component","propTypes","PropTypes","object","isRequired","func","defaultProps","styles","theme","paddingTop","spacing","unit","paddingBottom","fontSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;IAEMA,gB;;;;;AACJ,4BAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AADiB,iGAOR,YAAM;AACf,UAAQC,WAAR,GAAwB,MAAKC,KAA7B,CAAQD,WAAR;;AACA,YAAKE,QAAL,CAAc;AAAEF,QAAAA,WAAW,EAAE,CAACA;AAAhB,OAAd;AACD,KAVkB;AAEjB,UAAKC,KAAL,GAAa;AACXD,MAAAA,WAAW,EAAE;AADF,KAAb;AAFiB;AAKlB;;;;WAOD,kBAAS;AACP,wBAkBI,KAAKD,KAlBT;AAAA,UACEI,OADF,eACEA,OADF;AAAA,0CAEEC,KAFF;AAAA,UAGIC,QAHJ,qBAGIA,QAHJ;AAAA,UAIIC,QAJJ,qBAIIA,QAJJ;AAAA,UAKIC,MALJ,qBAKIA,MALJ;AAAA,UAMIC,IANJ,qBAMIA,IANJ;AAAA,UAOIC,eAPJ,qBAOIA,eAPJ;AAAA,UAQIC,MARJ,qBAQIA,MARJ;AAAA,UASIC,YATJ,qBASIA,YATJ;AAAA,UAUIC,YAVJ,qBAUIA,YAVJ;AAAA,UAWIC,UAXJ,qBAWIA,UAXJ;AAAA,UAYIC,SAZJ,qBAYIA,SAZJ;AAAA,UAaIC,mBAbJ,qBAaIA,mBAbJ;AAAA,UAcIC,WAdJ,qBAcIA,WAdJ;AAAA,UAgBEC,cAhBF,eAgBEA,cAhBF;AAAA,UAiBEC,OAjBF,eAiBEA,OAjBF;AAoBA,U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AUC,MADQ;AAE3BvB,EAAAA,KAAK,EAAEsB,sBAAUC,MAAV,CAAiBC,UAFG;AAG3BX,EAAAA,cAAc,EAAES,sBAAUG,IAAV,CAAeD,UAHJ;AAI3BzB,EAAAA,OAAO,EAAEuB,sBAAUC,MAAV,CAAiBC;AAJC,CAA7B;AAOA9B,gBAAgB,CAACgC,YAAjB,GAAgC;AAC9BZ,EAAAA,OAAO,EAAE;AADqB,CAAhC;;AAIA,IAAMa,MAAM,GAAG,SAATA,MAAS,CAAAC,KAAK;AAAA,SAAK;AACvBV,IAAAA,WAAW,EAAE;AACXW,MAAAA,UAAU,EAAED,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB,CADtB;AAEXC,MAAAA,aAAa,EAAEJ,KAAK,CAACE,OAAN,CAAcC,IAAd,GAAqB;AAFzB,KADU;AAKvB5B,IAAAA,MAAM,EAAE;AACN8B,MAAAA,QAAQ,EAAE;AADJ;AALe,GAAL;AAAA,CAApB;;eAUe,wBAAWN,MAAX,EAAmBjC,gBAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Typography from '@material-ui/core/Typography';\nimport {Collapsible, hasText, PreviewPrompt} from '@pie-lib/render-ui';\nimport Container from './container';\nimport { withStyles } from '@material-ui/core/styles';\n\nclass HotspotComponent extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n showCorrect: false\n };\n }\n\n onToggle = () => {\n const { showCorrect } = this.state;\n this.setState({ showCorrect: !showCorrect });\n };\n\n render() {\n const {\n session,\n model: {\n disabled,\n imageUrl,\n prompt,\n mode,\n multipleCorrect,\n shapes,\n outlineColor,\n hotspotColor,\n dimensions,\n rationale,\n teacherInstructions,\n strokeWidth\n },\n onSelectChoice,\n classes\n } = this.props;\n\n const isEvaluateMode = mode === 'evaluate';\n\n return (\n <div>\n {\n teacherInstructions && hasText(teacherInstructions) && (\n <Collapsible\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n className={classes.collapsible}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </Collapsible>\n )\n }\n\n <Typography className={classes.prompt}>\n <PreviewPrompt prompt={prompt} />\n </Typography>\n\n {imageUrl ? (\n <Container\n isEvaluateMode={isEvaluateMode}\n session={session}\n dimensions={dimensions}\n imageUrl={imageUrl}\n hotspotColor={hotspotColor}\n multipleCorrect={multipleCorrect}\n outlineColor={outlineColor}\n onSelectChoice={onSelectChoice}\n shapes={shapes}\n disabled={disabled}\n strokeWidth={strokeWidth}\n />\n ) : null}\n\n {\n rationale && hasText(rationale) && (\n <Collapsible\n labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}\n className={classes.collapsible}\n >\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )\n }\n\n </div>\n );\n }\n}\n\nHotspotComponent.propTypes = {\n classes: PropTypes.object,\n model: PropTypes.object.isRequired,\n onSelectChoice: PropTypes.func.isRequired,\n session: PropTypes.object.isRequired\n};\n\nHotspotComponent.defaultProps = {\n classes: {}\n};\n\nconst styles = theme => ({\n collapsible: {\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n prompt: {\n fontSize: 'inherit'\n }\n});\n\nexport default withStyles(styles)(HotspotComponent);\n"],"file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/hotspot",
3
- "version": "4.10.1",
3
+ "version": "4.10.6",
4
4
  "description": "",
5
5
  "repository": "pie-framework/pie-elements",
6
6
  "publishConfig": {
@@ -9,8 +9,8 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.3",
11
11
  "@pie-framework/pie-player-events": "^0.1.0",
12
- "@pie-lib/math-rendering": "^2.3.9",
13
- "@pie-lib/render-ui": "^4.12.0",
12
+ "@pie-lib/math-rendering": "^2.3.12",
13
+ "@pie-lib/render-ui": "^4.12.4",
14
14
  "konva": "^3.2.5",
15
15
  "prop-types": "^15.6.1",
16
16
  "react": "^16.8.1",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "author": "pie framework developers",
21
21
  "license": "ISC",
22
- "gitHead": "5df8639d9e81211ec961ca9847c07ae708ed4374",
22
+ "gitHead": "a1c13d49a8db2188145733261dd177cfb6b617fb",
23
23
  "scripts": {
24
24
  "postpublish": "../../scripts/postpublish"
25
25
  },
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import Typography from '@material-ui/core/Typography';
4
- import { Collapsible, hasText } from '@pie-lib/render-ui';
4
+ import {Collapsible, hasText, PreviewPrompt} from '@pie-lib/render-ui';
5
5
  import Container from './container';
6
6
  import { withStyles } from '@material-ui/core/styles';
7
7
 
@@ -49,13 +49,13 @@ class HotspotComponent extends React.Component {
49
49
  labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}
50
50
  className={classes.collapsible}
51
51
  >
52
- <div dangerouslySetInnerHTML={{ __html: teacherInstructions }}/>
52
+ <PreviewPrompt prompt={teacherInstructions} />
53
53
  </Collapsible>
54
54
  )
55
55
  }
56
56
 
57
57
  <Typography className={classes.prompt}>
58
- <span dangerouslySetInnerHTML={{ __html: prompt }} />
58
+ <PreviewPrompt prompt={prompt} />
59
59
  </Typography>
60
60
 
61
61
  {imageUrl ? (
@@ -80,7 +80,7 @@ class HotspotComponent extends React.Component {
80
80
  labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}
81
81
  className={classes.collapsible}
82
82
  >
83
- <div dangerouslySetInnerHTML={{ __html: rationale }} />
83
+ <PreviewPrompt prompt={rationale} />
84
84
  </Collapsible>
85
85
  )
86
86
  }