@pie-lib/editable-html 8.1.0 → 9.0.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/lib/editor.js +84 -81
  3. package/lib/editor.js.map +1 -1
  4. package/lib/index.js +30 -42
  5. package/lib/index.js.map +1 -1
  6. package/lib/plugins/characters/custom-popover.js +8 -11
  7. package/lib/plugins/characters/custom-popover.js.map +1 -1
  8. package/lib/plugins/characters/index.js +14 -19
  9. package/lib/plugins/characters/index.js.map +1 -1
  10. package/lib/plugins/characters/utils.js +24 -4
  11. package/lib/plugins/characters/utils.js.map +1 -1
  12. package/lib/plugins/image/component.js +65 -54
  13. package/lib/plugins/image/component.js.map +1 -1
  14. package/lib/plugins/image/image-toolbar.js +65 -27
  15. package/lib/plugins/image/image-toolbar.js.map +1 -1
  16. package/lib/plugins/image/index.js +47 -12
  17. package/lib/plugins/image/index.js.map +1 -1
  18. package/lib/plugins/image/insert-image-handler.js +8 -12
  19. package/lib/plugins/image/insert-image-handler.js.map +1 -1
  20. package/lib/plugins/index.js +6 -15
  21. package/lib/plugins/index.js.map +1 -1
  22. package/lib/plugins/list/index.js +2 -2
  23. package/lib/plugins/list/index.js.map +1 -1
  24. package/lib/plugins/math/index.js +8 -8
  25. package/lib/plugins/math/index.js.map +1 -1
  26. package/lib/plugins/media/index.js +15 -20
  27. package/lib/plugins/media/index.js.map +1 -1
  28. package/lib/plugins/media/media-dialog.js +26 -41
  29. package/lib/plugins/media/media-dialog.js.map +1 -1
  30. package/lib/plugins/media/media-toolbar.js +15 -25
  31. package/lib/plugins/media/media-toolbar.js.map +1 -1
  32. package/lib/plugins/media/media-wrapper.js +22 -35
  33. package/lib/plugins/media/media-wrapper.js.map +1 -1
  34. package/lib/plugins/respArea/drag-in-the-blank/choice.js +24 -37
  35. package/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -1
  36. package/lib/plugins/respArea/drag-in-the-blank/index.js +8 -8
  37. package/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -1
  38. package/lib/plugins/respArea/explicit-constructed-response/index.js +5 -5
  39. package/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -1
  40. package/lib/plugins/respArea/icons/index.js +5 -5
  41. package/lib/plugins/respArea/icons/index.js.map +1 -1
  42. package/lib/plugins/respArea/index.js +7 -2
  43. package/lib/plugins/respArea/index.js.map +1 -1
  44. package/lib/plugins/respArea/inline-dropdown/index.js +5 -5
  45. package/lib/plugins/respArea/inline-dropdown/index.js.map +1 -1
  46. package/lib/plugins/respArea/utils.js +2 -2
  47. package/lib/plugins/respArea/utils.js.map +1 -1
  48. package/lib/plugins/table/icons/index.js +9 -9
  49. package/lib/plugins/table/icons/index.js.map +1 -1
  50. package/lib/plugins/table/index.js +15 -13
  51. package/lib/plugins/table/index.js.map +1 -1
  52. package/lib/plugins/table/table-toolbar.js +25 -36
  53. package/lib/plugins/table/table-toolbar.js.map +1 -1
  54. package/lib/plugins/toolbar/default-toolbar.js +5 -5
  55. package/lib/plugins/toolbar/default-toolbar.js.map +1 -1
  56. package/lib/plugins/toolbar/done-button.js +2 -2
  57. package/lib/plugins/toolbar/done-button.js.map +1 -1
  58. package/lib/plugins/toolbar/editor-and-toolbar.js +18 -30
  59. package/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -1
  60. package/lib/plugins/toolbar/index.js +5 -5
  61. package/lib/plugins/toolbar/index.js.map +1 -1
  62. package/lib/plugins/toolbar/toolbar-buttons.js +25 -43
  63. package/lib/plugins/toolbar/toolbar-buttons.js.map +1 -1
  64. package/lib/plugins/toolbar/toolbar.js +40 -52
  65. package/lib/plugins/toolbar/toolbar.js.map +1 -1
  66. package/lib/serialization.js +2 -2
  67. package/lib/serialization.js.map +1 -1
  68. package/package.json +5 -5
  69. package/src/editor.jsx +31 -6
  70. package/src/plugins/characters/index.jsx +7 -0
  71. package/src/plugins/characters/utils.js +8 -4
  72. package/src/plugins/image/component.jsx +49 -20
  73. package/src/plugins/image/image-toolbar.jsx +38 -2
  74. package/src/plugins/image/index.jsx +38 -9
  75. package/src/plugins/respArea/index.jsx +5 -0
  76. package/src/plugins/table/index.jsx +3 -3
  77. package/src/plugins/toolbar/toolbar.jsx +9 -2
@@ -1,42 +1,34 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
11
 
14
- var _styles = require("@material-ui/core/styles");
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
13
 
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
15
 
20
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
16
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
17
 
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
19
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
20
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
21
 
26
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
+ var _react = _interopRequireDefault(require("react"));
27
23
 
28
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
24
+ var _propTypes = _interopRequireDefault(require("prop-types"));
29
25
 
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
26
+ var _styles = require("@material-ui/core/styles");
31
27
 
32
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
+ 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
29
 
34
30
  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
31
 
36
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
37
-
38
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
-
40
32
  var useStyles = (0, _styles.withStyles)(function (theme) {
41
33
  return {
42
34
  root: {
@@ -65,17 +57,16 @@ var useStyles = (0, _styles.withStyles)(function (theme) {
65
57
  });
66
58
 
67
59
  var MediaToolbar = /*#__PURE__*/function (_React$Component) {
68
- _inherits(MediaToolbar, _React$Component);
60
+ (0, _inherits2["default"])(MediaToolbar, _React$Component);
69
61
 
70
62
  var _super = _createSuper(MediaToolbar);
71
63
 
72
64
  function MediaToolbar() {
73
- _classCallCheck(this, MediaToolbar);
74
-
65
+ (0, _classCallCheck2["default"])(this, MediaToolbar);
75
66
  return _super.apply(this, arguments);
76
67
  }
77
68
 
78
- _createClass(MediaToolbar, [{
69
+ (0, _createClass2["default"])(MediaToolbar, [{
79
70
  key: "render",
80
71
  value: function render() {
81
72
  var _this$props = this.props,
@@ -93,11 +84,10 @@ var MediaToolbar = /*#__PURE__*/function (_React$Component) {
93
84
  }, "Remove"));
94
85
  }
95
86
  }]);
96
-
97
87
  return MediaToolbar;
98
88
  }(_react["default"].Component);
99
89
 
100
- _defineProperty(MediaToolbar, "propTypes", {
90
+ (0, _defineProperty2["default"])(MediaToolbar, "propTypes", {
101
91
  classes: _propTypes["default"].object,
102
92
  onEdit: _propTypes["default"].func,
103
93
  onRemove: _propTypes["default"].func
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/media/media-toolbar.jsx"],"names":["useStyles","theme","root","position","bottom","left","width","background","display","padding","boxShadow","editContainer","cursor","flex","border","textAlign","borderWidth","marginRight","paddingRight","removeContainer","MediaToolbar","props","classes","onEdit","onRemove","React","Component","PropTypes","object","func"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,wBAAW,UAAAC,KAAK;AAAA,SAAK;AACrCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,UADN;AAEJC,MAAAA,MAAM,EAAE,KAFJ;AAGJC,MAAAA,IAAI,EAAE,CAHF;AAIJC,MAAAA,KAAK,EAAE,MAJH;AAKJC,MAAAA,UAAU,EAAE,OALR;AAMJC,MAAAA,OAAO,EAAE,aANL;AAOJC,MAAAA,OAAO,EAAE,KAPL;AAQJC,MAAAA,SAAS,EAAE;AARP,KAD+B;AAWrCC,IAAAA,aAAa,EAAE;AACbC,MAAAA,MAAM,EAAE,SADK;AAEbC,MAAAA,IAAI,EAAE,CAFO;AAGbC,MAAAA,MAAM,EAAE,aAHK;AAIbC,MAAAA,SAAS,EAAE,OAJE;AAKbC,MAAAA,WAAW,EAAE,WALA;AAMbC,MAAAA,WAAW,EAAE,KANA;AAObC,MAAAA,YAAY,EAAE;AAPD,KAXsB;AAoBrCC,IAAAA,eAAe,EAAE;AACfP,MAAAA,MAAM,EAAE;AADO;AApBoB,GAAL;AAAA,CAAhB,CAAlB;;IAyBMQ,Y;;;;;;;;;;;;;WAOJ,kBAAS;AACP,wBAAsC,KAAKC,KAA3C;AAAA,UAAQC,OAAR,eAAQA,OAAR;AAAA,UAAiBC,MAAjB,eAAiBA,MAAjB;AAAA,UAAyBC,QAAzB,eAAyBA,QAAzB;AAEA,0BACE;AAAM,QAAA,SAAS,EAAEF,OAAO,CAACpB;AAAzB,sBACE;AAAM,QAAA,SAAS,EAAEoB,OAAO,CAACX,aAAzB;AAAwC,QAAA,OAAO,EAAEY;AAAjD,yBADF,eAIE;AAAM,QAAA,SAAS,EAAED,OAAO,CAACH,eAAzB;AAA0C,QAAA,OAAO,EAAEK;AAAnD,kBAJF,CADF;AAUD;;;;EApBwBC,kBAAMC,S;;gBAA3BN,Y,eACe;AACjBE,EAAAA,OAAO,EAAEK,sBAAUC,MADF;AAEjBL,EAAAA,MAAM,EAAEI,sBAAUE,IAFD;AAGjBL,EAAAA,QAAQ,EAAEG,sBAAUE;AAHH,C;;eAsBN7B,SAAS,CAACoB,YAAD,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst useStyles = withStyles(theme => ({\n root: {\n position: 'relative',\n bottom: '5px',\n left: 0,\n width: '100%',\n background: 'white',\n display: 'inline-flex',\n padding: '5px',\n boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'\n },\n editContainer: {\n cursor: 'pointer',\n flex: 3,\n border: 'solid black',\n textAlign: 'right',\n borderWidth: '0 2px 0 0',\n marginRight: '5px',\n paddingRight: '5px'\n },\n removeContainer: {\n cursor: 'pointer'\n }\n}));\n\nclass MediaToolbar extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n onEdit: PropTypes.func,\n onRemove: PropTypes.func\n };\n\n render() {\n const { classes, onEdit, onRemove } = this.props;\n\n return (\n <span className={classes.root}>\n <span className={classes.editContainer} onClick={onEdit}>\n Edit Settings\n </span>\n <span className={classes.removeContainer} onClick={onRemove}>\n Remove\n </span>\n </span>\n );\n }\n}\n\nexport default useStyles(MediaToolbar);\n"],"file":"media-toolbar.js"}
1
+ {"version":3,"sources":["../../../src/plugins/media/media-toolbar.jsx"],"names":["useStyles","theme","root","position","bottom","left","width","background","display","padding","boxShadow","editContainer","cursor","flex","border","textAlign","borderWidth","marginRight","paddingRight","removeContainer","MediaToolbar","props","classes","onEdit","onRemove","React","Component","PropTypes","object","func"],"mappings":";;;;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AEK,sBAAUC,MADF;AAEjBL,EAAAA,MAAM,EAAEI,sBAAUE,IAFD;AAGjBL,EAAAA,QAAQ,EAAEG,sBAAUE;AAHH,C;;eAsBN7B,SAAS,CAACoB,YAAD,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst useStyles = withStyles(theme => ({\n root: {\n position: 'relative',\n bottom: '5px',\n left: 0,\n width: '100%',\n background: 'white',\n display: 'inline-flex',\n padding: '5px',\n boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'\n },\n editContainer: {\n cursor: 'pointer',\n flex: 3,\n border: 'solid black',\n textAlign: 'right',\n borderWidth: '0 2px 0 0',\n marginRight: '5px',\n paddingRight: '5px'\n },\n removeContainer: {\n cursor: 'pointer'\n }\n}));\n\nclass MediaToolbar extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n onEdit: PropTypes.func,\n onRemove: PropTypes.func\n };\n\n render() {\n const { classes, onEdit, onRemove } = this.props;\n\n return (\n <span className={classes.root}>\n <span className={classes.editContainer} onClick={onEdit}>\n Edit Settings\n </span>\n <span className={classes.removeContainer} onClick={onRemove}>\n Remove\n </span>\n </span>\n );\n }\n}\n\nexport default useStyles(MediaToolbar);\n"],"file":"media-toolbar.js"}
@@ -1,52 +1,42 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
- var _react = _interopRequireDefault(require("react"));
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
12
- var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
 
14
- var _classnames = _interopRequireDefault(require("classnames"));
14
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
15
 
16
- var _styles = require("@material-ui/core/styles");
16
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
17
 
18
- var _excluded = ["editor", "classes", "children", "width"];
18
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
19
 
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
21
 
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
23
 
24
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
25
 
26
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
-
28
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
-
30
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
31
-
32
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
26
+ var _react = _interopRequireDefault(require("react"));
33
27
 
34
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ var _propTypes = _interopRequireDefault(require("prop-types"));
35
29
 
36
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
30
+ var _classnames = _interopRequireDefault(require("classnames"));
37
31
 
38
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
32
+ var _styles = require("@material-ui/core/styles");
39
33
 
40
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
34
+ var _excluded = ["editor", "classes", "children", "width"];
41
35
 
42
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
36
+ 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); }; }
43
37
 
44
38
  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; } }
45
39
 
46
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
47
-
48
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
49
-
50
40
  var useStyles = (0, _styles.withStyles)(function () {
51
41
  return {
52
42
  root: {
@@ -60,17 +50,16 @@ var useStyles = (0, _styles.withStyles)(function () {
60
50
  });
61
51
 
62
52
  var MediaWrapper = /*#__PURE__*/function (_React$Component) {
63
- _inherits(MediaWrapper, _React$Component);
53
+ (0, _inherits2["default"])(MediaWrapper, _React$Component);
64
54
 
65
55
  var _super = _createSuper(MediaWrapper);
66
56
 
67
57
  function MediaWrapper() {
68
- _classCallCheck(this, MediaWrapper);
69
-
58
+ (0, _classCallCheck2["default"])(this, MediaWrapper);
70
59
  return _super.apply(this, arguments);
71
60
  }
72
61
 
73
- _createClass(MediaWrapper, [{
62
+ (0, _createClass2["default"])(MediaWrapper, [{
74
63
  key: "render",
75
64
  value: function render() {
76
65
  var _this$props = this.props,
@@ -78,10 +67,9 @@ var MediaWrapper = /*#__PURE__*/function (_React$Component) {
78
67
  classes = _this$props.classes,
79
68
  children = _this$props.children,
80
69
  width = _this$props.width,
81
- rest = _objectWithoutProperties(_this$props, _excluded);
82
-
83
- return /*#__PURE__*/_react["default"].createElement("span", _extends({
84
- className: (0, _classnames["default"])(classes.root, _defineProperty({}, classes.editor, editor))
70
+ rest = (0, _objectWithoutProperties2["default"])(_this$props, _excluded);
71
+ return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({
72
+ className: (0, _classnames["default"])(classes.root, (0, _defineProperty2["default"])({}, classes.editor, editor))
85
73
  }, rest, {
86
74
  style: {
87
75
  width: width || 300
@@ -89,11 +77,10 @@ var MediaWrapper = /*#__PURE__*/function (_React$Component) {
89
77
  }), children);
90
78
  }
91
79
  }]);
92
-
93
80
  return MediaWrapper;
94
81
  }(_react["default"].Component);
95
82
 
96
- _defineProperty(MediaWrapper, "propTypes", {
83
+ (0, _defineProperty2["default"])(MediaWrapper, "propTypes", {
97
84
  classes: _propTypes["default"].object,
98
85
  children: _propTypes["default"].array,
99
86
  editor: _propTypes["default"].bool,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/plugins/media/media-wrapper.jsx"],"names":["useStyles","root","position","editor","display","overflow","MediaWrapper","props","classes","children","width","rest","React","Component","PropTypes","object","array","bool","oneOfType","number","string"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,wBAAW;AAAA,SAAO;AAClCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE;AADN,KAD4B;AAIlCC,IAAAA,MAAM,EAAE;AACNC,MAAAA,OAAO,EAAE,cADH;AAENC,MAAAA,QAAQ,EAAE;AAFJ;AAJ0B,GAAP;AAAA,CAAX,CAAlB;;IAUMC,Y;;;;;;;;;;;;;WAQJ,kBAAS;AACP,wBAAsD,KAAKC,KAA3D;AAAA,UAAQJ,MAAR,eAAQA,MAAR;AAAA,UAAgBK,OAAhB,eAAgBA,OAAhB;AAAA,UAAyBC,QAAzB,eAAyBA,QAAzB;AAAA,UAAmCC,KAAnC,eAAmCA,KAAnC;AAAA,UAA6CC,IAA7C;;AAEA,0BACE;AACE,QAAA,SAAS,EAAE,4BAAWH,OAAO,CAACP,IAAnB,sBACRO,OAAO,CAACL,MADA,EACSA,MADT;AADb,SAIMQ,IAJN;AAKE,QAAA,KAAK,EAAE;AACLD,UAAAA,KAAK,EAAEA,KAAK,IAAI;AADX;AALT,UASGD,QATH,CADF;AAaD;;;;EAxBwBG,kBAAMC,S;;gBAA3BP,Y,eACe;AACjBE,EAAAA,OAAO,EAAEM,sBAAUC,MADF;AAEjBN,EAAAA,QAAQ,EAAEK,sBAAUE,KAFH;AAGjBb,EAAAA,MAAM,EAAEW,sBAAUG,IAHD;AAIjBP,EAAAA,KAAK,EAAEI,sBAAUI,SAAV,CAAoB,CAACJ,sBAAUK,MAAX,EAAmBL,sBAAUM,MAA7B,CAApB;AAJU,C;;eA0BNpB,SAAS,CAACM,YAAD,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst useStyles = withStyles(() => ({\n root: {\n position: 'relative'\n },\n editor: {\n display: 'inline-block',\n overflow: 'hidden'\n }\n}));\n\nclass MediaWrapper extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n children: PropTypes.array,\n editor: PropTypes.bool,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n };\n\n render() {\n const { editor, classes, children, width, ...rest } = this.props;\n\n return (\n <span\n className={classNames(classes.root, {\n [classes.editor]: editor\n })}\n {...rest}\n style={{\n width: width || 300\n }}\n >\n {children}\n </span>\n );\n }\n}\n\nexport default useStyles(MediaWrapper);\n"],"file":"media-wrapper.js"}
1
+ {"version":3,"sources":["../../../src/plugins/media/media-wrapper.jsx"],"names":["useStyles","root","position","editor","display","overflow","MediaWrapper","props","classes","children","width","rest","React","Component","PropTypes","object","array","bool","oneOfType","number","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAEA,IAAMA,SAAS,GAAG,wBAAW;AAAA,SAAO;AAClCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE;AADN,KAD4B;AAIlCC,IAAAA,MAAM,EAAE;AACNC,MAAAA,OAAO,EAAE,cADH;AAENC,MAAAA,QAAQ,EAAE;AAFJ;AAJ0B,GAAP;AAAA,CAAX,CAAlB;;IAUMC,Y;;;;;;;;;;;;WAQJ,kBAAS;AACP,wBAAsD,KAAKC,KAA3D;AAAA,UAAQJ,MAAR,eAAQA,MAAR;AAAA,UAAgBK,OAAhB,eAAgBA,OAAhB;AAAA,UAAyBC,QAAzB,eAAyBA,QAAzB;AAAA,UAAmCC,KAAnC,eAAmCA,KAAnC;AAAA,UAA6CC,IAA7C;AAEA,0BACE;AACE,QAAA,SAAS,EAAE,4BAAWH,OAAO,CAACP,IAAnB,uCACRO,OAAO,CAACL,MADA,EACSA,MADT;AADb,SAIMQ,IAJN;AAKE,QAAA,KAAK,EAAE;AACLD,UAAAA,KAAK,EAAEA,KAAK,IAAI;AADX;AALT,UASGD,QATH,CADF;AAaD;;;EAxBwBG,kBAAMC,S;;iCAA3BP,Y,eACe;AACjBE,EAAAA,OAAO,EAAEM,sBAAUC,MADF;AAEjBN,EAAAA,QAAQ,EAAEK,sBAAUE,KAFH;AAGjBb,EAAAA,MAAM,EAAEW,sBAAUG,IAHD;AAIjBP,EAAAA,KAAK,EAAEI,sBAAUI,SAAV,CAAoB,CAACJ,sBAAUK,MAAX,EAAmBL,sBAAUM,MAA7B,CAApB;AAJU,C;;eA0BNpB,SAAS,CAACM,YAAD,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst useStyles = withStyles(() => ({\n root: {\n position: 'relative'\n },\n editor: {\n display: 'inline-block',\n overflow: 'hidden'\n }\n}));\n\nclass MediaWrapper extends React.Component {\n static propTypes = {\n classes: PropTypes.object,\n children: PropTypes.array,\n editor: PropTypes.bool,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n };\n\n render() {\n const { editor, classes, children, width, ...rest } = this.props;\n\n return (\n <span\n className={classNames(classes.root, {\n [classes.editor]: editor\n })}\n {...rest}\n style={{\n width: width || 300\n }}\n >\n {children}\n </span>\n );\n }\n}\n\nexport default useStyles(MediaWrapper);\n"],"file":"media-wrapper.js"}
@@ -1,12 +1,28 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.tileTarget = exports.tileSource = exports["default"] = exports.BlankContent = void 0;
9
9
 
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
17
+
18
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
+
20
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
+
22
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
+
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
25
+
10
26
  var _react = _interopRequireDefault(require("react"));
11
27
 
12
28
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -27,34 +43,10 @@ var _icons = require("../icons");
27
43
 
28
44
  var _excluded = ["connectDropTarget", "connectDragSource"];
29
45
 
30
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
-
32
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
33
-
34
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
35
-
36
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
-
38
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
39
-
40
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
41
-
42
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
43
-
44
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
-
46
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
47
-
48
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
49
-
50
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
46
+ 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); }; }
51
47
 
52
48
  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; } }
53
49
 
54
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
55
-
56
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
57
-
58
50
  var useStyles = (0, _styles.withStyles)(function (theme) {
59
51
  return {
60
52
  content: {
@@ -76,21 +68,20 @@ var useStyles = (0, _styles.withStyles)(function (theme) {
76
68
  });
77
69
 
78
70
  var BlankContent = /*#__PURE__*/function (_React$Component) {
79
- _inherits(BlankContent, _React$Component);
71
+ (0, _inherits2["default"])(BlankContent, _React$Component);
80
72
 
81
73
  var _super = _createSuper(BlankContent);
82
74
 
83
75
  function BlankContent(props) {
84
76
  var _this;
85
77
 
86
- _classCallCheck(this, BlankContent);
87
-
78
+ (0, _classCallCheck2["default"])(this, BlankContent);
88
79
  _this = _super.call(this, props);
89
- _this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
80
+ _this.handleClick = _this.handleClick.bind((0, _assertThisInitialized2["default"])(_this));
90
81
  return _this;
91
82
  }
92
83
 
93
- _createClass(BlankContent, [{
84
+ (0, _createClass2["default"])(BlankContent, [{
94
85
  key: "componentDidMount",
95
86
  value: function componentDidMount() {
96
87
  document.addEventListener('click', this.handleClick);
@@ -164,13 +155,11 @@ var BlankContent = /*#__PURE__*/function (_React$Component) {
164
155
  }), children);
165
156
  }
166
157
  }]);
167
-
168
158
  return BlankContent;
169
159
  }(_react["default"].Component);
170
160
 
171
161
  exports.BlankContent = BlankContent;
172
-
173
- _defineProperty(BlankContent, "propTypes", {
162
+ (0, _defineProperty2["default"])(BlankContent, "propTypes", {
174
163
  n: _propTypes["default"].object,
175
164
  children: _propTypes["default"].func,
176
165
  isDragging: _propTypes["default"].bool,
@@ -179,13 +168,11 @@ _defineProperty(BlankContent, "propTypes", {
179
168
  value: _propTypes["default"].object,
180
169
  classes: _propTypes["default"].object
181
170
  });
182
-
183
171
  var StyledBlankContent = useStyles(BlankContent);
184
172
  var connectedBlankContent = useStyles(function (_ref2) {
185
173
  var connectDropTarget = _ref2.connectDropTarget,
186
174
  connectDragSource = _ref2.connectDragSource,
187
- props = _objectWithoutProperties(_ref2, _excluded);
188
-
175
+ props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
189
176
  var classes = props.classes,
190
177
  isOver = props.isOver,
191
178
  value = props.value;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/respArea/drag-in-the-blank/choice.jsx"],"names":["useStyles","theme","content","border","palette","primary","main","chip","minWidth","correct","incorrect","selected","color","primaryDark","BlankContent","props","handleClick","bind","document","addEventListener","removeEventListener","event","classes","elementRef","className","contains","target","n","children","isDragging","dragItem","isOver","value","label","finalLabel","hasGrip","ref","display","minHeight","background","boxSizing","borderRadius","overflow","position","padding","key","top","left","__html","React","Component","PropTypes","object","func","bool","StyledBlankContent","connectedBlankContent","connectDropTarget","connectDragSource","dragContent","dragEl","over","tileTarget","drop","monitor","draggedItem","getItem","shouldDrop","index","onChange","dropped","canDrop","instanceId","DropTile","connect","dropTarget","tileSource","canDrag","disabled","beginDrag","id","targetId","fromChoice","endDrag","dropResult","getDropResult","duplicates","removeResponse","dragSource"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,wBAAW,UAAAC,KAAK;AAAA,SAAK;AACrCC,IAAAA,OAAO,EAAE;AACPC,MAAAA,MAAM,sBAAeF,KAAK,CAACG,OAAN,CAAcC,OAAd,CAAsBC,IAArC;AADC,KAD4B;AAIrCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE;AADN,KAJ+B;AAOrCC,IAAAA,OAAO,EAAE;AACPN,MAAAA,MAAM,EAAE;AADD,KAP4B;AAUrCO,IAAAA,SAAS,EAAE;AACTP,MAAAA,MAAM,EAAE;AADC,KAV0B;AAarCQ,IAAAA,QAAQ,EAAE;AACRR,MAAAA,MAAM,sBAAeS,gBAAMC,WAAN,EAAf;AADE;AAb2B,GAAL;AAAA,CAAhB,CAAlB;;IAkBaC,Y;;;;;AAWX,wBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;AAEA,UAAKC,WAAL,GA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BuB,CAAnB;;;eA0BQ,sBAAW,0BAAX,EAAuC4C,UAAvC,EAAmD,UAACF,OAAD,EAAUV,OAAV;AAAA,SAAuB;AACvFN,IAAAA,iBAAiB,EAAEgB,OAAO,CAACc,UAAR,EADoE;AAEvF3D,IAAAA,UAAU,EAAEmC,OAAO,CAACnC,UAAR;AAF2E,GAAvB;AAAA,CAAnD,EAGX4C,QAHW,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isUndefined from 'lodash/isUndefined';\nimport { DragSource, DropTarget } from '@pie-lib/drag';\nimport { color } from '@pie-lib/render-ui';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { withStyles } from '@material-ui/core/styles';\nimport classnames from 'classnames';\n\nimport { GripIcon } from '../icons';\n\nconst useStyles = withStyles(theme => ({\n content: {\n border: `solid 0px ${theme.palette.primary.main}`\n },\n chip: {\n minWidth: '90px'\n },\n correct: {\n border: 'solid 1px green'\n },\n incorrect: {\n border: 'solid 1px red'\n },\n selected: {\n border: `2px solid ${color.primaryDark()} !important`\n }\n}));\n\nexport class BlankContent extends React.Component {\n static propTypes = {\n n: PropTypes.object,\n children: PropTypes.func,\n isDragging: PropTypes.bool,\n isOver: PropTypes.bool,\n dragItem: PropTypes.object,\n value: PropTypes.object,\n classes: PropTypes.object\n };\n\n constructor(props) {\n super(props);\n\n this.handleClick = this.handleClick.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener('click', this.handleClick);\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this.handleClick);\n }\n\n handleClick(event) {\n const { classes } = this.props;\n\n if (this.elementRef) {\n this.elementRef.className = this.elementRef.contains(event.target) ? classes.selected : '';\n }\n }\n\n componentDidUpdate() {\n if (this.elementRef) {\n renderMath(this.elementRef);\n }\n }\n\n render() {\n const { n, children, isDragging, dragItem, isOver, value } = this.props;\n\n const label = dragItem && isOver ? dragItem.value.value : value.value || '\\u00A0';\n const finalLabel = isDragging ? '\\u00A0' : label;\n const hasGrip = finalLabel !== '\\u00A0';\n\n return (\n <div\n ref={ref => (this.elementRef = ref)}\n style={{\n display: 'inline-flex',\n minWidth: '178px',\n minHeight: '36px',\n background: '#FFF',\n border: '1px solid #C0C3CF',\n boxSizing: 'border-box',\n borderRadius: '3px',\n overflow: 'hidden',\n position: 'relative',\n padding: '8px 8px 8px 35px'\n }}\n data-key={n.key}\n contentEditable={false}\n >\n {hasGrip && (\n <GripIcon\n style={{\n position: 'absolute',\n top: '6px',\n left: '15px',\n color: '#9B9B9B'\n }}\n contentEditable={false}\n />\n )}\n <span\n dangerouslySetInnerHTML={{\n __html: finalLabel\n }}\n />\n {children}\n </div>\n );\n }\n}\n\nconst StyledBlankContent = useStyles(BlankContent);\n\nconst connectedBlankContent = useStyles(({ connectDropTarget, connectDragSource, ...props }) => {\n const { classes, isOver, value } = props;\n const dragContent = <StyledBlankContent {...props} />;\n const dragEl = !value ? dragContent : connectDragSource(<span>{dragContent}</span>);\n const content = (\n <span className={classnames(classes.content, isOver && classes.over)}>{dragEl}</span>\n );\n\n return connectDropTarget ? connectDropTarget(content) : content;\n});\n\nexport const tileTarget = {\n drop(props, monitor) {\n const draggedItem = monitor.getItem();\n const shouldDrop =\n isUndefined(draggedItem.value.index) ||\n isUndefined(props.value.index) ||\n draggedItem.value.index !== props.value.index;\n\n if (shouldDrop) {\n props.onChange(draggedItem.value);\n }\n\n return {\n dropped: shouldDrop\n };\n },\n canDrop(props, monitor) {\n const draggedItem = monitor.getItem();\n\n return draggedItem.instanceId === props.instanceId;\n }\n};\n\nconst DropTile = DropTarget('drag-in-the-blank-choice', tileTarget, (connect, monitor) => ({\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n dragItem: monitor.getItem()\n}))(connectedBlankContent);\n\nexport const tileSource = {\n canDrag(props) {\n return !props.disabled && !!props.value;\n },\n beginDrag(props) {\n return {\n id: props.targetId,\n value: props.value,\n instanceId: props.instanceId,\n fromChoice: true\n };\n },\n endDrag(props, monitor) {\n // this will be null if it did not drop\n const dropResult = monitor.getDropResult();\n\n if (!dropResult || (dropResult.dropped && !props.duplicates)) {\n const draggedItem = monitor.getItem();\n\n if (draggedItem.fromChoice) {\n props.removeResponse(draggedItem.value);\n }\n }\n }\n};\n\nexport default DragSource('drag-in-the-blank-choice', tileSource, (connect, monitor) => ({\n connectDragSource: connect.dragSource(),\n isDragging: monitor.isDragging()\n}))(DropTile);\n"],"file":"choice.js"}
1
+ {"version":3,"sources":["../../../../src/plugins/respArea/drag-in-the-blank/choice.jsx"],"names":["useStyles","theme","content","border","palette","primary","main","chip","minWidth","correct","incorrect","selected","color","primaryDark","BlankContent","props","handleClick","bind","document","addEventListener","removeEventListener","event","classes","elementRef","className","contains","target","n","children","isDragging","dragItem","isOver","value","label","finalLabel","hasGrip","ref","display","minHeight","background","boxSizing","borderRadius","overflow","position","padding","key","top","left","__html","React","Component","PropTypes","object","func","bool","StyledBlankContent","connectedBlankContent","connectDropTarget","connectDragSource","dragContent","dragEl","over","tileTarget","drop","monitor","draggedItem","getItem","shouldDrop","index","onChange","dropped","canDrop","instanceId","DropTile","connect","dropTarget","tileSource","canDrag","disabled","beginDrag","id","targetId","fromChoice","endDrag","dropResult","getDropResult","duplicates","removeResponse","dragSource"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAEA,IAAMA,SAAS,GAAG,wBAAW,UAAAC,KAAK;AAAA,SAAK;AACrCC,IAAAA,OAAO,EAAE;AACPC,MAAAA,MAAM,sBAAeF,KAAK,CAACG,OAAN,CAAcC,OAAd,CAAsBC,IAArC;AADC,KAD4B;AAIrCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE;AADN,KAJ+B;AAOrCC,IAAAA,OAAO,EAAE;AACPN,MAAAA,MAAM,EAAE;AADD,KAP4B;AAUrCO,IAAAA,SAAS,EAAE;AACTP,MAAAA,MAAM,EAAE;AADC,KAV0B;AAarC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D,KAAK,CAACuE,UAAjD,EAA8D;AAC5D,UAAMrB,WAAW,GAAGD,OAAO,CAACE,OAAR,EAApB;;AAEA,UAAID,WAAW,CAACiB,UAAhB,EAA4B;AAC1BnE,QAAAA,KAAK,CAACwE,cAAN,CAAqBtB,WAAW,CAACjC,KAAjC;AACD;AACF;AACF;AAvBuB,CAAnB;;;eA0BQ,sBAAW,0BAAX,EAAuC4C,UAAvC,EAAmD,UAACF,OAAD,EAAUV,OAAV;AAAA,SAAuB;AACvFN,IAAAA,iBAAiB,EAAEgB,OAAO,CAACc,UAAR,EADoE;AAEvF3D,IAAAA,UAAU,EAAEmC,OAAO,CAACnC,UAAR;AAF2E,GAAvB;AAAA,CAAnD,EAGX4C,QAHW,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport isUndefined from 'lodash/isUndefined';\nimport { DragSource, DropTarget } from '@pie-lib/drag';\nimport { color } from '@pie-lib/render-ui';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { withStyles } from '@material-ui/core/styles';\nimport classnames from 'classnames';\n\nimport { GripIcon } from '../icons';\n\nconst useStyles = withStyles(theme => ({\n content: {\n border: `solid 0px ${theme.palette.primary.main}`\n },\n chip: {\n minWidth: '90px'\n },\n correct: {\n border: 'solid 1px green'\n },\n incorrect: {\n border: 'solid 1px red'\n },\n selected: {\n border: `2px solid ${color.primaryDark()} !important`\n }\n}));\n\nexport class BlankContent extends React.Component {\n static propTypes = {\n n: PropTypes.object,\n children: PropTypes.func,\n isDragging: PropTypes.bool,\n isOver: PropTypes.bool,\n dragItem: PropTypes.object,\n value: PropTypes.object,\n classes: PropTypes.object\n };\n\n constructor(props) {\n super(props);\n\n this.handleClick = this.handleClick.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener('click', this.handleClick);\n }\n\n componentWillUnmount() {\n document.removeEventListener('click', this.handleClick);\n }\n\n handleClick(event) {\n const { classes } = this.props;\n\n if (this.elementRef) {\n this.elementRef.className = this.elementRef.contains(event.target) ? classes.selected : '';\n }\n }\n\n componentDidUpdate() {\n if (this.elementRef) {\n renderMath(this.elementRef);\n }\n }\n\n render() {\n const { n, children, isDragging, dragItem, isOver, value } = this.props;\n\n const label = dragItem && isOver ? dragItem.value.value : value.value || '\\u00A0';\n const finalLabel = isDragging ? '\\u00A0' : label;\n const hasGrip = finalLabel !== '\\u00A0';\n\n return (\n <div\n ref={ref => (this.elementRef = ref)}\n style={{\n display: 'inline-flex',\n minWidth: '178px',\n minHeight: '36px',\n background: '#FFF',\n border: '1px solid #C0C3CF',\n boxSizing: 'border-box',\n borderRadius: '3px',\n overflow: 'hidden',\n position: 'relative',\n padding: '8px 8px 8px 35px'\n }}\n data-key={n.key}\n contentEditable={false}\n >\n {hasGrip && (\n <GripIcon\n style={{\n position: 'absolute',\n top: '6px',\n left: '15px',\n color: '#9B9B9B'\n }}\n contentEditable={false}\n />\n )}\n <span\n dangerouslySetInnerHTML={{\n __html: finalLabel\n }}\n />\n {children}\n </div>\n );\n }\n}\n\nconst StyledBlankContent = useStyles(BlankContent);\n\nconst connectedBlankContent = useStyles(({ connectDropTarget, connectDragSource, ...props }) => {\n const { classes, isOver, value } = props;\n const dragContent = <StyledBlankContent {...props} />;\n const dragEl = !value ? dragContent : connectDragSource(<span>{dragContent}</span>);\n const content = (\n <span className={classnames(classes.content, isOver && classes.over)}>{dragEl}</span>\n );\n\n return connectDropTarget ? connectDropTarget(content) : content;\n});\n\nexport const tileTarget = {\n drop(props, monitor) {\n const draggedItem = monitor.getItem();\n const shouldDrop =\n isUndefined(draggedItem.value.index) ||\n isUndefined(props.value.index) ||\n draggedItem.value.index !== props.value.index;\n\n if (shouldDrop) {\n props.onChange(draggedItem.value);\n }\n\n return {\n dropped: shouldDrop\n };\n },\n canDrop(props, monitor) {\n const draggedItem = monitor.getItem();\n\n return draggedItem.instanceId === props.instanceId;\n }\n};\n\nconst DropTile = DropTarget('drag-in-the-blank-choice', tileTarget, (connect, monitor) => ({\n connectDropTarget: connect.dropTarget(),\n isOver: monitor.isOver(),\n dragItem: monitor.getItem()\n}))(connectedBlankContent);\n\nexport const tileSource = {\n canDrag(props) {\n return !props.disabled && !!props.value;\n },\n beginDrag(props) {\n return {\n id: props.targetId,\n value: props.value,\n instanceId: props.instanceId,\n fromChoice: true\n };\n },\n endDrag(props, monitor) {\n // this will be null if it did not drop\n const dropResult = monitor.getDropResult();\n\n if (!dropResult || (dropResult.dropped && !props.duplicates)) {\n const draggedItem = monitor.getItem();\n\n if (draggedItem.fromChoice) {\n props.removeResponse(draggedItem.value);\n }\n }\n }\n};\n\nexport default DragSource('drag-in-the-blank-choice', tileSource, (connect, monitor) => ({\n connectDragSource: connect.dragSource(),\n isDragging: monitor.isDragging()\n}))(DropTile);\n"],"file":"choice.js"}
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.onValueChange = exports.onRemoveResponse = exports["default"] = void 0;
7
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
+
8
14
  var _react = _interopRequireDefault(require("react"));
9
15
 
10
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
17
 
12
18
  var _choice = _interopRequireDefault(require("./choice"));
13
19
 
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
-
16
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
20
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
21
 
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
23
 
24
24
  var onValueChange = function onValueChange(nodeProps, n, value) {
25
25
  var val = nodeProps.editor.value;
@@ -61,7 +61,7 @@ var DragDrop = function DragDrop(props) {
61
61
  nodeProps = props.nodeProps,
62
62
  opts = props.opts;
63
63
  var inTable = data.inTable;
64
- return /*#__PURE__*/_react["default"].createElement("span", _extends({}, attributes, {
64
+ return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({}, attributes, {
65
65
  style: {
66
66
  display: 'inline-flex',
67
67
  minHeight: '50px',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/respArea/drag-in-the-blank/index.jsx"],"names":["onValueChange","nodeProps","n","value","val","editor","change","setNodeByKey","key","data","index","get","props","onChange","onEditingDone","onRemoveResponse","dragInTheBlank","document","findDescendant","DragDrop","attributes","opts","inTable","display","minHeight","minWidth","position","margin","cursor","options","duplicates","children","propTypes","PropTypes","object"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,SAAD,EAAYC,CAAZ,EAAeC,KAAf,EAAyB;AACpD,MAAMC,GAAG,GAAGH,SAAS,CAACI,MAAV,CAAiBF,KAA7B;AACA,MAAMG,MAAM,GAAGF,GAAG,CAACE,MAAJ,EAAf;AAEAA,EAAAA,MAAM,CAACC,YAAP,CAAoBL,CAAC,CAACM,GAAtB,EAA2B;AACzBC,IAAAA,IAAI,kCACCN,KADD;AAEFO,MAAAA,KAAK,EAAER,CAAC,CAACO,IAAF,CAAOE,GAAP,CAAW,OAAX;AAFL;AADqB,GAA3B;AAOAV,EAAAA,SAAS,CAACI,MAAV,CAAiBO,KAAjB,CAAuBC,QAAvB,CAAgCP,MAAhC,EAAwC,YAAM;AAC5CL,IAAAA,SAAS,CAACI,MAAV,CAAiBO,KAAjB,CAAuBE,aAAvB;AACD,GAFD;AAGD,CAdM;;;;AAgBA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACd,SAAD,EAAYE,KAAZ,EAAsB;AACpD,MAAMC,GAAG,GAAGH,SAAS,CAACI,MAAV,CAAiBF,KAA7B;AACA,MAAMG,MAAM,GAAGF,GAAG,CAACE,MAAJ,EAAf;AACA,MAAMU,cAAc,GAAGZ,GAAG,CAACa,QAAJ,CAAaC,cAAb,CACrB,UAAAhB,CAAC;AAAA,WAAIA,CAAC,CAACO,IAAF,IAAUP,CAAC,CAACO,IAAF,CAAOE,GAAP,CAAW,OAAX,MAAwBR,KAAK,CAACO,KAA5C;AAAA,GADoB,CAAvB;AAIAJ,EAAAA,MAAM,CAACC,YAAP,CAAoBS,cAAc,CAACR,GAAnC,EAAwC;AACtCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,KAAK,EAAEM,cAAc,CAACP,IAAf,CAAoBE,GAApB,CAAwB,OAAxB;AADH;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CAACd,SAAD,EAAYE,KAAZ,CAApB;AAAA;AAPvB,KASGF,SAAS,CAAC8B,QATb,CAXF,CADF;AAyBD,CA7BD;;AA+BAZ,QAAQ,CAACa,SAAT,GAAqB;AACnBZ,EAAAA,UAAU,EAAEa,sBAAUC,MADH;AAEnBzB,EAAAA,IAAI,EAAEwB,sBAAUC,MAFG;AAGnBhC,EAAAA,CAAC,EAAE+B,sBAAUC,MAHM;AAInBjC,EAAAA,SAAS,EAAEgC,sBAAUC,MAJF;AAKnBb,EAAAA,IAAI,EAAEY,sBAAUC;AALG,CAArB;eAQef,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport DragDropTile from './choice';\n\nexport const onValueChange = (nodeProps, n, value) => {\n const val = nodeProps.editor.value;\n const change = val.change();\n\n change.setNodeByKey(n.key, {\n data: {\n ...value,\n index: n.data.get('index')\n }\n });\n\n nodeProps.editor.props.onChange(change, () => {\n nodeProps.editor.props.onEditingDone();\n });\n};\n\nexport const onRemoveResponse = (nodeProps, value) => {\n const val = nodeProps.editor.value;\n const change = val.change();\n const dragInTheBlank = val.document.findDescendant(\n n => n.data && n.data.get('index') === value.index\n );\n\n change.setNodeByKey(dragInTheBlank.key, {\n data: {\n index: dragInTheBlank.data.get('index')\n }\n });\n\n nodeProps.editor.props.onChange(change, () => {\n nodeProps.editor.props.onEditingDone();\n });\n};\n\nconst DragDrop = props => {\n const { attributes, data, n, nodeProps, opts } = props;\n const { inTable } = data;\n\n return (\n <span\n {...attributes}\n style={{\n display: 'inline-flex',\n minHeight: '50px',\n minWidth: '178px',\n position: 'relative',\n margin: inTable ? '10px' : '0 10px',\n cursor: 'pointer'\n }}\n >\n <DragDropTile\n n={n}\n dragKey={n.key}\n targetId=\"0\"\n value={data}\n duplicates={opts.options.duplicates}\n onChange={value => onValueChange(nodeProps, n, value)}\n removeResponse={value => onRemoveResponse(nodeProps, value)}\n >\n {nodeProps.children}\n </DragDropTile>\n </span>\n );\n};\n\nDragDrop.propTypes = {\n attributes: PropTypes.object,\n data: PropTypes.object,\n n: PropTypes.object,\n nodeProps: PropTypes.object,\n opts: PropTypes.object\n};\n\nexport default DragDrop;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/plugins/respArea/drag-in-the-blank/index.jsx"],"names":["onValueChange","nodeProps","n","value","val","editor","change","setNodeByKey","key","data","index","get","props","onChange","onEditingDone","onRemoveResponse","dragInTheBlank","document","findDescendant","DragDrop","attributes","opts","inTable","display","minHeight","minWidth","position","margin","cursor","options","duplicates","children","propTypes","PropTypes","object"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,SAAD,EAAYC,CAAZ,EAAeC,KAAf,EAAyB;AACpD,MAAMC,GAAG,GAAGH,SAAS,CAACI,MAAV,CAAiBF,KAA7B;AACA,MAAMG,MAAM,GAAGF,GAAG,CAACE,MAAJ,EAAf;AAEAA,EAAAA,MAAM,CAACC,YAAP,CAAoBL,CAAC,CAACM,GAAtB,EAA2B;AACzBC,IAAAA,IAAI,kCACCN,KADD;AAEFO,MAAAA,KAAK,EAAER,CAAC,CAACO,IAAF,CAAOE,GAAP,CAAW,OAAX;AAFL;AADqB,GAA3B;AAOAV,EAAAA,SAAS,CAACI,MAAV,CAAiBO,KAAjB,CAAuBC,QAAvB,CAAgCP,MAAhC,EAAwC,YAAM;AAC5CL,IAAAA,SAAS,CAACI,MAAV,CAAiBO,KAAjB,CAAuBE,aAAvB;AACD,GAFD;AAGD,CAdM;;;;AAgBA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACd,SAAD,EAAYE,KAAZ,EAAsB;AACpD,MAAMC,GAAG,GAAGH,SAAS,CAACI,MAAV,CAAiBF,KAA7B;AACA,MAAMG,MAAM,GAAGF,GAAG,CAACE,MAAJ,EAAf;AACA,MAAMU,cAAc,GAAGZ,GAAG,CAACa,QAAJ,CAAaC,cAAb,CACrB,UAAAhB,CAAC;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b;AAGE,IAAA,QAAQ,EAAC,GAHX;AAIE,IAAA,KAAK,EAAEC,IAJT;AAKE,IAAA,UAAU,EAAEY,IAAI,CAACQ,OAAL,CAAaC,UAL3B;AAME,IAAA,QAAQ,EAAE,kBAAA3B,KAAK;AAAA,aAAIH,aAAa,CAACC,SAAD,EAAYC,CAAZ,EAAeC,KAAf,CAAjB;AAAA,KANjB;AAOE,IAAA,cAAc,EAAE,wBAAAA,KAAK;AAAA,aAAIY,gBAAgB,CAACd,SAAD,EAAYE,KAAZ,CAApB;AAAA;AAPvB,KASGF,SAAS,CAAC8B,QATb,CAXF,CADF;AAyBD,CA7BD;;AA+BAZ,QAAQ,CAACa,SAAT,GAAqB;AACnBZ,EAAAA,UAAU,EAAEa,sBAAUC,MADH;AAEnBzB,EAAAA,IAAI,EAAEwB,sBAAUC,MAFG;AAGnBhC,EAAAA,CAAC,EAAE+B,sBAAUC,MAHM;AAInBjC,EAAAA,SAAS,EAAEgC,sBAAUC,MAJF;AAKnBb,EAAAA,IAAI,EAAEY,sBAAUC;AALG,CAArB;eAQef,Q","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport DragDropTile from './choice';\n\nexport const onValueChange = (nodeProps, n, value) => {\n const val = nodeProps.editor.value;\n const change = val.change();\n\n change.setNodeByKey(n.key, {\n data: {\n ...value,\n index: n.data.get('index')\n }\n });\n\n nodeProps.editor.props.onChange(change, () => {\n nodeProps.editor.props.onEditingDone();\n });\n};\n\nexport const onRemoveResponse = (nodeProps, value) => {\n const val = nodeProps.editor.value;\n const change = val.change();\n const dragInTheBlank = val.document.findDescendant(\n n => n.data && n.data.get('index') === value.index\n );\n\n change.setNodeByKey(dragInTheBlank.key, {\n data: {\n index: dragInTheBlank.data.get('index')\n }\n });\n\n nodeProps.editor.props.onChange(change, () => {\n nodeProps.editor.props.onEditingDone();\n });\n};\n\nconst DragDrop = props => {\n const { attributes, data, n, nodeProps, opts } = props;\n const { inTable } = data;\n\n return (\n <span\n {...attributes}\n style={{\n display: 'inline-flex',\n minHeight: '50px',\n minWidth: '178px',\n position: 'relative',\n margin: inTable ? '10px' : '0 10px',\n cursor: 'pointer'\n }}\n >\n <DragDropTile\n n={n}\n dragKey={n.key}\n targetId=\"0\"\n value={data}\n duplicates={opts.options.duplicates}\n onChange={value => onValueChange(nodeProps, n, value)}\n removeResponse={value => onRemoveResponse(nodeProps, value)}\n >\n {nodeProps.children}\n </DragDropTile>\n </span>\n );\n};\n\nDragDrop.propTypes = {\n attributes: PropTypes.object,\n data: PropTypes.object,\n n: PropTypes.object,\n nodeProps: PropTypes.object,\n opts: PropTypes.object\n};\n\nexport default DragDrop;\n"],"file":"index.js"}
@@ -1,23 +1,23 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = void 0;
7
9
 
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
8
12
  var _react = _interopRequireDefault(require("react"));
9
13
 
10
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
15
 
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
16
  var ExplicitConstructedResponse = function ExplicitConstructedResponse(props) {
17
17
  var attributes = props.attributes,
18
18
  value = props.value,
19
19
  error = props.error;
20
- return /*#__PURE__*/_react["default"].createElement("span", _extends({}, attributes, {
20
+ return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({}, attributes, {
21
21
  style: {
22
22
  display: 'inline-flex',
23
23
  minHeight: '50px',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/respArea/explicit-constructed-response/index.jsx"],"names":["ExplicitConstructedResponse","props","attributes","value","error","display","minHeight","minWidth","position","margin","cursor","height","background","border","boxSizing","borderRadius","overflow","padding","__html","propTypes","PropTypes","object","string"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAEA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA8B,CAAAC,KAAK,EAAI;AAC3C,MAAQC,UAAR,GAAqCD,KAArC,CAAQC,UAAR;AAAA,MAAoBC,KAApB,GAAqCF,KAArC,CAAoBE,KAApB;AAAA,MAA2BC,KAA3B,GAAqCH,KAArC,CAA2BG,KAA3B;AAEA,sBACE,qDACMF,UADN;AAEE,IAAA,KAAK,EAAE;AACLG,MAAAA,OAAO,EAAE,aADJ;AAELC,MAAAA,SAAS,EAAE,MAFN;AAGLC,MAAAA,QAAQ,EAAE,OAHL;AAILC,MAAAA,QAAQ,EAAE,UAJL;AAKLC,MAAAA,MAAM,EAAE,OALH;AAMLC,MAAAA,MAAM,EAAE;AANH;AAFT,mBAWE;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,OAAO,EAAE,aADJ;AAELE,MAAAA,QAAQ,EAAE,OAFL;AAGLD,MAAAA,SAAS,EAAE,MAHN;AAILK,MAAAA,MAAM,EAAE,MAJH;AAKLC,MAAAA,UAAU,EAAE,MALP;AAMLC,MAAAA,MAAM,sBAAeT,KAAK,GAAG,KAAH,GAAW,SAA/B,CAND;AAOLU,MAAAA,SAAS,EAAE,YAPN;AAQLC,MAAAA,YAAY,EAAE,KART;AASLC,MAAAA,QAAQ,EAAE,QATL;AAULC,MAAAA,OAAO,EAAE;AAVJ,KADT;AAaE,IAAA,uBAAuB,EAAE;AACvBC,MAAAA,MAAM,EAAEf,KAAK,IAAI;AADM;AAb3B,IAXF,CADF;AA+BD,CAlCD;;AAoCAH,2BAA2B,CAACmB,SAA5B,GAAwC;AACtCjB,EAAAA,UAAU,EAAEkB,sBAAUC,MADgB;AAEtClB,EAAAA,KAAK,EAAEiB,sBAAUE;AAFqB,CAAxC;eAKetB,2B","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ExplicitConstructedResponse = props => {\n const { attributes, value, error } = props;\n\n return (\n <span\n {...attributes}\n style={{\n display: 'inline-flex',\n minHeight: '50px',\n minWidth: '178px',\n position: 'relative',\n margin: '0 5px',\n cursor: 'pointer'\n }}\n >\n <div\n style={{\n display: 'inline-flex',\n minWidth: '178px',\n minHeight: '36px',\n height: '36px',\n background: '#FFF',\n border: `1px solid ${error ? 'red' : '#C0C3CF'}`,\n boxSizing: 'border-box',\n borderRadius: '3px',\n overflow: 'hidden',\n padding: '8px'\n }}\n dangerouslySetInnerHTML={{\n __html: value || '<div>&nbsp;</div>'\n }}\n />\n </span>\n );\n};\n\nExplicitConstructedResponse.propTypes = {\n attributes: PropTypes.object,\n value: PropTypes.string\n};\n\nexport default ExplicitConstructedResponse;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/plugins/respArea/explicit-constructed-response/index.jsx"],"names":["ExplicitConstructedResponse","props","attributes","value","error","display","minHeight","minWidth","position","margin","cursor","height","background","border","boxSizing","borderRadius","overflow","padding","__html","propTypes","PropTypes","object","string"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA8B,CAAAC,KAAK,EAAI;AAC3C,MAAQC,UAAR,GAAqCD,KAArC,CAAQC,UAAR;AAAA,MAAoBC,KAApB,GAAqCF,KAArC,CAAoBE,KAApB;AAAA,MAA2BC,KAA3B,GAAqCH,KAArC,CAA2BG,KAA3B;AAEA,sBACE,sEACMF,UADN;AAEE,IAAA,KAAK,EAAE;AACLG,MAAAA,OAAO,EAAE,aADJ;AAELC,MAAAA,SAAS,EAAE,MAFN;AAGLC,MAAAA,QAAQ,EAAE,OAHL;AAILC,MAAAA,QAAQ,EAAE,UAJL;AAKLC,MAAAA,MAAM,EAAE,OALH;AAMLC,MAAAA,MAAM,EAAE;AANH;AAFT,mBAWE;AACE,IAAA,KAAK,EAAE;AACLL,MAAAA,OAAO,EAAE,aADJ;AAELE,MAAAA,QAAQ,EAAE,OAFL;AAGLD,MAAAA,SAAS,EAAE,MAHN;AAILK,MAAAA,MAAM,EAAE,MAJH;AAKLC,MAAAA,UAAU,EAAE,MALP;AAMLC,MAAAA,MAAM,sBAAeT,KAAK,GAAG,KAAH,GAAW,SAA/B,CAND;AAOLU,MAAAA,SAAS,EAAE,YAPN;AAQLC,MAAAA,YAAY,EAAE,KART;AASLC,MAAAA,QAAQ,EAAE,QATL;AAULC,MAAAA,OAAO,EAAE;AAVJ,KADT;AAaE,IAAA,uBAAuB,EAAE;AACvBC,MAAAA,MAAM,EAAEf,KAAK,IAAI;AADM;AAb3B,IAXF,CADF;AA+BD,CAlCD;;AAoCAH,2BAA2B,CAACmB,SAA5B,GAAwC;AACtCjB,EAAAA,UAAU,EAAEkB,sBAAUC,MADgB;AAEtClB,EAAAA,KAAK,EAAEiB,sBAAUE;AAFqB,CAAxC;eAKetB,2B","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst ExplicitConstructedResponse = props => {\n const { attributes, value, error } = props;\n\n return (\n <span\n {...attributes}\n style={{\n display: 'inline-flex',\n minHeight: '50px',\n minWidth: '178px',\n position: 'relative',\n margin: '0 5px',\n cursor: 'pointer'\n }}\n >\n <div\n style={{\n display: 'inline-flex',\n minWidth: '178px',\n minHeight: '36px',\n height: '36px',\n background: '#FFF',\n border: `1px solid ${error ? 'red' : '#C0C3CF'}`,\n boxSizing: 'border-box',\n borderRadius: '3px',\n overflow: 'hidden',\n padding: '8px'\n }}\n dangerouslySetInnerHTML={{\n __html: value || '<div>&nbsp;</div>'\n }}\n />\n </span>\n );\n};\n\nExplicitConstructedResponse.propTypes = {\n attributes: PropTypes.object,\n value: PropTypes.string\n};\n\nexport default ExplicitConstructedResponse;\n"],"file":"index.js"}
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports.ToolbarIcon = exports.GripIcon = exports.Chevron = void 0;
7
9
 
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+
8
12
  var _react = _interopRequireDefault(require("react"));
9
13
 
10
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -15,13 +19,9 @@ var _MoreVert = _interopRequireDefault(require("@material-ui/icons/MoreVert"));
15
19
 
16
20
  var _styles = require("@material-ui/core/styles");
17
21
 
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
22
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
23
 
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
-
24
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
25
 
26
26
  var getRotate = function getRotate(direction) {
27
27
  switch (direction) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/plugins/respArea/icons/index.jsx"],"names":["getRotate","direction","Chevron","props","style","rotate","transform","propTypes","PropTypes","string","object","GripIcon","margin","ToolbarIcon","icon","fontFamily","fontSize","fontWeight","lineHeight","position","top","width","height","whiteSpace","classes"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAAAC,SAAS,EAAI;AAC7B,UAAQA,SAAR;AACE,SAAK,MAAL;AACE,aAAO,EAAP;;AACF,SAAK,IAAL;AACE,aAAO,CAAC,EAAR;;AACF,SAAK,MAAL;AACE,aAAO,GAAP;;AACF;AACE,aAAO,CAAP;AARJ;AAUD,CAXD;;AAaO,IAAMC,OAAO,GAAG,SAAVA,OAAU,CAAAC,KAAK,EAAI;AAC9B,MAAQF,SAAR,GAA6BE,KAA7B,CAAQF,SAAR;AAAA,MAAmBG,KAAnB,GAA6BD,KAA7B,CAAmBC,KAAnB;AACA,MAAMC,MAAM,GAAGL,SAAS,CAACC,SAAD,CAAxB;AAEA,sBACE,gCAAC,wBAAD;AACE,IAAA,KAAK;AACHK,MAAAA,SAAS,mBAAYD,MAAZ;AADN,OAEAD,KAFA;AADP,IADF;AAQD,CAZM;;;AAcPF,OAAO,CAACK,SAAR,GAAoB;AAClBN,EAAAA,SAAS,EAAEO,sBAAUC,MADH;AAElBL,EAAAA,KAAK,EAAEI,sBAAUE;AAFC,CAApB;;AAKO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,OAAe;AAAA,MAAZP,KAAY,QAAZA,KAAY;AACrC,sBACE;AAAM,IAAA,KAAK,EAAEA;AAAb,kBACE,gCAAC,oBAAD;AACE,IAAA,KAAK,EAAE;AACLQ,MAAAA,MAAM,EAAE;AADH;AADT,IADF,eAME,gCAAC,oBAAD,OANF,CADF;AAUD,CAXM;;;AAaPD,QAAQ,CAACJ,SAAT,GAAqB;AACnBH,EAAAA,KAAK,EAAEI,sBAAUE;AADE,CAArB;AAIO,IAAMG,WAAW,GAAG,wBAAW;AACpCC,EAAAA,IAAI,EAAE;AACJC,IAAAA,UAAU,EAAE,yBADR;AAEJC,IAAAA,QAAQ,EAAE,MAFN;AAGJC,IAAAA,UAAU,EAAE,MAHR;AAIJC,IAAAA,UAAU,EAAE,MAJR;AAKJC,IAAAA,QAAQ,EAAE,UALN;AAMJC,IAAAA,GAAG,EAAE,KAND;AAOJC,IAAAA,KAAK,EAAE,OAPH;AAQJC,IAAAA,MAAM,EAAE,MARJ;AASJC,IAAAA,UAAU,EAAE;AATR;AAD8B,CAAX,EAYxB;AAAA,MAAGC,OAAH,SAAGA,OAAH;AAAA,sBAAiB;AAAK,IAAA,SAAS,EAAEA,OAAO,CAACV;AAAxB,uBAAjB;AAAA,CAZwB,CAApB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ChevronRight from '@material-ui/icons/ChevronRight';\nimport MoreVert from '@material-ui/icons/MoreVert';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst getRotate = direction => {\n switch (direction) {\n case 'down':\n return 90;\n case 'up':\n return -90;\n case 'left':\n return 180;\n default:\n return 0;\n }\n};\n\nexport const Chevron = props => {\n const { direction, style } = props;\n const rotate = getRotate(direction);\n\n return (\n <ChevronRight\n style={{\n transform: `rotate(${rotate}deg)`,\n ...style\n }}\n />\n );\n};\n\nChevron.propTypes = {\n direction: PropTypes.string,\n style: PropTypes.object\n};\n\nexport const GripIcon = ({ style }) => {\n return (\n <span style={style}>\n <MoreVert\n style={{\n margin: '0 -16px'\n }}\n />\n <MoreVert />\n </span>\n );\n};\n\nGripIcon.propTypes = {\n style: PropTypes.object\n};\n\nexport const ToolbarIcon = withStyles({\n icon: {\n fontFamily: 'Cerebri Sans !important',\n fontSize: '14px',\n fontWeight: 'bold',\n lineHeight: '14px',\n position: 'relative',\n top: '7px',\n width: '110px',\n height: '28px',\n whiteSpace: 'nowrap'\n }\n})(({ classes }) => <div className={classes.icon}>+ Response Area</div>);\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/plugins/respArea/icons/index.jsx"],"names":["getRotate","direction","Chevron","props","style","rotate","transform","propTypes","PropTypes","string","object","GripIcon","margin","ToolbarIcon","icon","fontFamily","fontSize","fontWeight","lineHeight","position","top","width","height","whiteSpace","classes"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAAAC,SAAS,EAAI;AAC7B,UAAQA,SAAR;AACE,SAAK,MAAL;AACE,aAAO,EAAP;;AACF,SAAK,IAAL;AACE,aAAO,CAAC,EAAR;;AACF,SAAK,MAAL;AACE,aAAO,GAAP;;AACF;AACE,aAAO,CAAP;AARJ;AAUD,CAXD;;AAaO,IAAMC,OAAO,GAAG,SAAVA,OAAU,CAAAC,KAAK,EAAI;AAC9B,MAAQF,SAAR,GAA6BE,KAA7B,CAAQF,SAAR;AAAA,MAAmBG,KAAnB,GAA6BD,KAA7B,CAAmBC,KAAnB;AACA,MAAMC,MAAM,GAAGL,SAAS,CAACC,SAAD,CAAxB;AAEA,sBACE,gCAAC,wBAAD;AACE,IAAA,KAAK;AACHK,MAAAA,SAAS,mBAAYD,MAAZ;AADN,OAEAD,KAFA;AADP,IADF;AAQD,CAZM;;;AAcPF,OAAO,CAACK,SAAR,GAAoB;AAClBN,EAAAA,SAAS,EAAEO,sBAAUC,MADH;AAElBL,EAAAA,KAAK,EAAEI,sBAAUE;AAFC,CAApB;;AAKO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,OAAe;AAAA,MAAZP,KAAY,QAAZA,KAAY;AACrC,sBACE;AAAM,IAAA,KAAK,EAAEA;AAAb,kBACE,gCAAC,oBAAD;AACE,IAAA,KAAK,EAAE;AACLQ,MAAAA,MAAM,EAAE;AADH;AADT,IADF,eAME,gCAAC,oBAAD,OANF,CADF;AAUD,CAXM;;;AAaPD,QAAQ,CAACJ,SAAT,GAAqB;AACnBH,EAAAA,KAAK,EAAEI,sBAAUE;AADE,CAArB;AAIO,IAAMG,WAAW,GAAG,wBAAW;AACpCC,EAAAA,IAAI,EAAE;AACJC,IAAAA,UAAU,EAAE,yBADR;AAEJC,IAAAA,QAAQ,EAAE,MAFN;AAGJC,IAAAA,UAAU,EAAE,MAHR;AAIJC,IAAAA,UAAU,EAAE,MAJR;AAKJC,IAAAA,QAAQ,EAAE,UALN;AAMJC,IAAAA,GAAG,EAAE,KAND;AAOJC,IAAAA,KAAK,EAAE,OAPH;AAQJC,IAAAA,MAAM,EAAE,MARJ;AASJC,IAAAA,UAAU,EAAE;AATR;AAD8B,CAAX,EAYxB;AAAA,MAAGC,OAAH,SAAGA,OAAH;AAAA,sBAAiB;AAAK,IAAA,SAAS,EAAEA,OAAO,CAACV;AAAxB,uBAAjB;AAAA,CAZwB,CAApB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ChevronRight from '@material-ui/icons/ChevronRight';\nimport MoreVert from '@material-ui/icons/MoreVert';\nimport { withStyles } from '@material-ui/core/styles';\n\nconst getRotate = direction => {\n switch (direction) {\n case 'down':\n return 90;\n case 'up':\n return -90;\n case 'left':\n return 180;\n default:\n return 0;\n }\n};\n\nexport const Chevron = props => {\n const { direction, style } = props;\n const rotate = getRotate(direction);\n\n return (\n <ChevronRight\n style={{\n transform: `rotate(${rotate}deg)`,\n ...style\n }}\n />\n );\n};\n\nChevron.propTypes = {\n direction: PropTypes.string,\n style: PropTypes.object\n};\n\nexport const GripIcon = ({ style }) => {\n return (\n <span style={style}>\n <MoreVert\n style={{\n margin: '0 -16px'\n }}\n />\n <MoreVert />\n </span>\n );\n};\n\nGripIcon.propTypes = {\n style: PropTypes.object\n};\n\nexport const ToolbarIcon = withStyles({\n icon: {\n fontFamily: 'Cerebri Sans !important',\n fontSize: '14px',\n fontWeight: 'bold',\n lineHeight: '14px',\n position: 'relative',\n top: '7px',\n width: '110px',\n height: '28px',\n whiteSpace: 'nowrap'\n }\n})(({ classes }) => <div className={classes.icon}>+ Response Area</div>);\n"],"file":"index.js"}