@pie-lib/mask-markup 1.33.3-next.0 → 1.33.3-next.162

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 (58) hide show
  1. package/CHANGELOG.md +13 -67
  2. package/esm/package.json +3 -0
  3. package/lib/choices/choice.js +98 -203
  4. package/lib/choices/choice.js.map +1 -1
  5. package/lib/choices/index.js +21 -53
  6. package/lib/choices/index.js.map +1 -1
  7. package/lib/componentize.js +1 -5
  8. package/lib/componentize.js.map +1 -1
  9. package/lib/components/blank.js +303 -361
  10. package/lib/components/blank.js.map +1 -1
  11. package/lib/components/correct-input.js +41 -65
  12. package/lib/components/correct-input.js.map +1 -1
  13. package/lib/components/dropdown.js +218 -257
  14. package/lib/components/dropdown.js.map +1 -1
  15. package/lib/components/input.js +10 -17
  16. package/lib/components/input.js.map +1 -1
  17. package/lib/constructed-response.js +38 -52
  18. package/lib/constructed-response.js.map +1 -1
  19. package/lib/customizable.js +5 -9
  20. package/lib/customizable.js.map +1 -1
  21. package/lib/drag-in-the-blank.js +140 -105
  22. package/lib/drag-in-the-blank.js.map +1 -1
  23. package/lib/index.js +0 -7
  24. package/lib/index.js.map +1 -1
  25. package/lib/inline-dropdown.js +4 -12
  26. package/lib/inline-dropdown.js.map +1 -1
  27. package/lib/mask.js +60 -118
  28. package/lib/mask.js.map +1 -1
  29. package/lib/serialization.js +8 -48
  30. package/lib/serialization.js.map +1 -1
  31. package/lib/with-mask.js +30 -58
  32. package/lib/with-mask.js.map +1 -1
  33. package/package.json +20 -12
  34. package/src/__tests__/drag-in-the-blank.test.js +66 -26
  35. package/src/__tests__/mask.test.js +147 -112
  36. package/src/__tests__/with-mask.test.js +44 -19
  37. package/src/choices/__tests__/index.test.js +38 -25
  38. package/src/choices/choice.jsx +86 -153
  39. package/src/choices/index.jsx +9 -3
  40. package/src/components/__tests__/blank.test.js +92 -156
  41. package/src/components/__tests__/correct-input.test.js +60 -19
  42. package/src/components/__tests__/dropdown.test.js +61 -19
  43. package/src/components/__tests__/input.test.js +72 -20
  44. package/src/components/blank.jsx +273 -272
  45. package/src/components/correct-input.jsx +33 -39
  46. package/src/components/dropdown.jsx +173 -161
  47. package/src/constructed-response.jsx +22 -18
  48. package/src/drag-in-the-blank.jsx +131 -42
  49. package/src/mask.jsx +38 -29
  50. package/src/with-mask.jsx +7 -4
  51. package/src/__tests__/__snapshots__/drag-in-the-blank.test.js.snap +0 -316
  52. package/src/__tests__/__snapshots__/mask.test.js.snap +0 -55
  53. package/src/__tests__/__snapshots__/with-mask.test.js.snap +0 -62
  54. package/src/choices/__tests__/__snapshots__/index.test.js.snap +0 -209
  55. package/src/components/__tests__/__snapshots__/blank.test.js.snap +0 -111
  56. package/src/components/__tests__/__snapshots__/correct-input.test.js.snap +0 -64
  57. package/src/components/__tests__/__snapshots__/dropdown.test.js.snap +0 -136
  58. package/src/components/__tests__/__snapshots__/input.test.js.snap +0 -34
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
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
- ## [1.33.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.33.1...@pie-lib/mask-markup@1.33.2) (2025-11-27)
6
+ # [2.0.0-next.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.33.3-next.0...@pie-lib/mask-markup@2.0.0-next.0) (2026-01-19)
7
7
 
8
8
  **Note:** Version bump only for package @pie-lib/mask-markup
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [1.33.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.2...@pie-lib/mask-markup@1.33.1) (2025-10-22)
14
+ ## [1.33.3-next.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.47.0-mui-update.0...@pie-lib/mask-markup@1.33.3-next.0) (2026-01-19)
15
15
 
16
16
  **Note:** Version bump only for package @pie-lib/mask-markup
17
17
 
@@ -19,141 +19,87 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- # [1.33.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.32.0...@pie-lib/mask-markup@1.33.0) (2025-10-16)
22
+ ## [1.33.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.33.1...@pie-lib/mask-markup@1.33.2) (2025-11-27)
23
23
 
24
24
  **Note:** Version bump only for package @pie-lib/mask-markup
25
25
 
26
+ ## [1.33.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.2...@pie-lib/mask-markup@1.33.1) (2025-10-22)
26
27
 
28
+ **Note:** Version bump only for package @pie-lib/mask-markup
27
29
 
30
+ # [1.33.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.32.0...@pie-lib/mask-markup@1.33.0) (2025-10-16)
28
31
 
32
+ **Note:** Version bump only for package @pie-lib/mask-markup
29
33
 
30
34
  # [1.32.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.0...@pie-lib/mask-markup@1.32.0) (2025-10-16)
31
35
 
32
36
  **Note:** Version bump only for package @pie-lib/mask-markup
33
37
 
34
-
35
-
36
-
37
-
38
38
  # [1.31.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.0...@pie-lib/mask-markup@1.31.0) (2025-10-16)
39
39
 
40
40
  **Note:** Version bump only for package @pie-lib/mask-markup
41
41
 
42
-
43
-
44
-
45
-
46
42
  # [1.30.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.0...@pie-lib/mask-markup@1.30.0) (2025-10-16)
47
43
 
48
44
  **Note:** Version bump only for package @pie-lib/mask-markup
49
45
 
50
-
51
-
52
-
53
-
54
46
  ## [1.29.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.1...@pie-lib/mask-markup@1.29.2) (2025-10-14)
55
47
 
56
48
  **Note:** Version bump only for package @pie-lib/mask-markup
57
49
 
58
-
59
-
60
-
61
-
62
50
  ## [1.29.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.29.0...@pie-lib/mask-markup@1.29.1) (2025-10-09)
63
51
 
64
52
  **Note:** Version bump only for package @pie-lib/mask-markup
65
53
 
66
-
67
-
68
-
69
-
70
54
  # [1.29.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.13.46...@pie-lib/mask-markup@1.29.0) (2025-09-25)
71
55
 
72
-
73
56
  ### Bug Fixes
74
57
 
75
- * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
76
-
58
+ - fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
77
59
 
78
60
  ### Features
79
61
 
80
- * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
81
-
82
-
83
-
84
-
62
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
85
63
 
86
64
  # [1.28.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.27.0...@pie-lib/mask-markup@1.28.0) (2025-09-18)
87
65
 
88
66
  **Note:** Version bump only for package @pie-lib/mask-markup
89
67
 
90
-
91
-
92
-
93
-
94
68
  # [1.27.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.26.0...@pie-lib/mask-markup@1.27.0) (2025-09-18)
95
69
 
96
70
  **Note:** Version bump only for package @pie-lib/mask-markup
97
71
 
98
-
99
-
100
-
101
-
102
72
  # [1.26.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.13.46...@pie-lib/mask-markup@1.26.0) (2025-09-18)
103
73
 
104
-
105
74
  ### Bug Fixes
106
75
 
107
- * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
108
-
76
+ - fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
109
77
 
110
78
  ### Features
111
79
 
112
- * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
113
-
114
-
115
-
116
-
80
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
117
81
 
118
82
  # [1.25.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.24.0...@pie-lib/mask-markup@1.25.0) (2025-09-17)
119
83
 
120
84
  **Note:** Version bump only for package @pie-lib/mask-markup
121
85
 
122
-
123
-
124
-
125
-
126
86
  # [1.24.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.23.0...@pie-lib/mask-markup@1.24.0) (2025-09-17)
127
87
 
128
88
  **Note:** Version bump only for package @pie-lib/mask-markup
129
89
 
130
-
131
-
132
-
133
-
134
90
  # [1.23.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.22.1...@pie-lib/mask-markup@1.23.0) (2025-09-17)
135
91
 
136
92
  **Note:** Version bump only for package @pie-lib/mask-markup
137
93
 
138
-
139
-
140
-
141
-
142
94
  ## [1.22.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.13.46...@pie-lib/mask-markup@1.22.1) (2025-08-11)
143
95
 
144
-
145
96
  ### Bug Fixes
146
97
 
147
- * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
148
-
98
+ - fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
149
99
 
150
100
  ### Features
151
101
 
152
- * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
153
-
154
-
155
-
156
-
102
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
157
103
 
158
104
  # [1.22.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.13.46...@pie-lib/mask-markup@1.22.0) (2025-08-07)
159
105
 
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -1,221 +1,116 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = exports.DRAG_TYPE = exports.BlankContent = void 0;
9
-
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
-
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
-
14
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
15
-
16
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
-
18
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
19
-
20
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
21
-
8
+ exports.DRAG_TYPE = void 0;
9
+ exports["default"] = Choice;
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
22
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
23
-
24
- var _react = _interopRequireDefault(require("react"));
25
-
26
- var _reactDom = _interopRequireDefault(require("react-dom"));
27
-
12
+ var _react = _interopRequireWildcard(require("react"));
28
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
29
-
30
- var _styles = require("@material-ui/core/styles");
31
-
32
- var _Chip = _interopRequireDefault(require("@material-ui/core/Chip"));
33
-
34
- var _classnames = _interopRequireDefault(require("classnames"));
35
-
14
+ var _core = require("@dnd-kit/core");
15
+ var _styles = require("@mui/material/styles");
16
+ var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
36
17
  var _mathRendering = require("@pie-lib/math-rendering");
37
-
38
18
  var _renderUi = require("@pie-lib/render-ui");
39
-
40
- var _drag = require("@pie-lib/drag");
41
-
42
- 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
-
44
- 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
-
46
- var DRAG_TYPE = 'MaskBlank';
47
- exports.DRAG_TYPE = DRAG_TYPE;
48
-
49
- var BlankContentComp = /*#__PURE__*/function (_React$Component) {
50
- (0, _inherits2["default"])(BlankContentComp, _React$Component);
51
-
52
- var _super = _createSuper(BlankContentComp);
53
-
54
- function BlankContentComp() {
55
- var _this;
56
-
57
- (0, _classCallCheck2["default"])(this, BlankContentComp);
58
-
59
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
60
- args[_key] = arguments[_key];
61
- }
62
-
63
- _this = _super.call.apply(_super, [this].concat(args));
64
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "startDrag", function () {
65
- var _this$props = _this.props,
66
- connectDragSource = _this$props.connectDragSource,
67
- disabled = _this$props.disabled;
68
-
69
- if (!disabled) {
70
- connectDragSource(_this.dragContainerRef);
71
- }
72
- });
73
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTouchStart", function (e) {
74
- e.preventDefault();
75
- _this.longPressTimer = setTimeout(function () {
76
- _this.startDrag(e);
77
- }, 500);
78
- });
79
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTouchEnd", function () {
80
- clearTimeout(_this.longPressTimer);
81
- });
82
- (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTouchMove", function () {
83
- clearTimeout(_this.longPressTimer);
84
- });
85
- return _this;
86
- }
87
-
88
- (0, _createClass2["default"])(BlankContentComp, [{
89
- key: "componentDidMount",
90
- value: function componentDidMount() {
91
- if (this.dragContainerRef) {
92
- this.dragContainerRef.addEventListener('touchstart', this.handleTouchStart, {
93
- passive: false
94
- });
95
- this.dragContainerRef.addEventListener('touchend', this.handleTouchEnd);
96
- this.dragContainerRef.addEventListener('touchmove', this.handleTouchMove);
97
- }
98
- }
99
- }, {
100
- key: "componentWillUnmount",
101
- value: function componentWillUnmount() {
102
- if (this.dragContainerRef) {
103
- this.dragContainerRef.removeEventListener('touchstart', this.handleTouchStart);
104
- this.dragContainerRef.removeEventListener('touchend', this.handleTouchEnd);
105
- this.dragContainerRef.removeEventListener('touchmove', this.handleTouchMove);
106
- }
107
- }
108
- }, {
109
- key: "componentDidUpdate",
110
- value: function componentDidUpdate() {
111
- (0, _mathRendering.renderMath)(this.rootRef);
112
- }
113
- }, {
114
- key: "render",
115
- value: function render() {
116
- var _this2 = this;
117
-
118
- var _this$props2 = this.props,
119
- connectDragSource = _this$props2.connectDragSource,
120
- choice = _this$props2.choice,
121
- classes = _this$props2.classes,
122
- disabled = _this$props2.disabled; // TODO the Chip element is causing drag problems on touch devices. Avoid using Chip and consider refactoring the code. Keep in mind that Chip is a span with a button role, which interferes with seamless touch device dragging.
123
-
124
- return connectDragSource( /*#__PURE__*/_react["default"].createElement("span", {
125
- className: (0, _classnames["default"])(classes.choice, disabled && classes.disabled),
126
- ref: function ref(_ref3) {
127
- //eslint-disable-next-line
128
- _this2.dragContainerRef = _reactDom["default"].findDOMNode(_ref3);
129
- }
130
- }, /*#__PURE__*/_react["default"].createElement(_Chip["default"], {
131
- clickable: false,
132
- disabled: true,
133
- ref: function ref(_ref2) {
134
- //eslint-disable-next-line
135
- _this2.rootRef = _reactDom["default"].findDOMNode(_ref2);
136
- },
137
- className: classes.chip,
138
- label: /*#__PURE__*/_react["default"].createElement("span", {
139
- className: classes.chipLabel,
140
- ref: function ref(_ref) {
141
- if (_ref) {
142
- _ref.innerHTML = choice.value || ' ';
143
- }
144
- }
145
- }, ' '),
146
- variant: disabled ? 'outlined' : undefined
147
- })), {});
19
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
+ var DRAG_TYPE = exports.DRAG_TYPE = 'MaskBlank';
23
+ var StyledChoice = (0, _styles.styled)('span')(function (_ref) {
24
+ var theme = _ref.theme,
25
+ disabled = _ref.disabled;
26
+ return _objectSpread({
27
+ border: "solid 0px ".concat(theme.palette.primary.main),
28
+ borderRadius: theme.spacing(2),
29
+ margin: theme.spacing(0.5),
30
+ transform: 'translate(0, 0)',
31
+ display: 'inline-flex'
32
+ }, disabled && {});
33
+ });
34
+ var StyledChip = (0, _styles.styled)(_Chip["default"])(function () {
35
+ return {
36
+ backgroundColor: _renderUi.color.white(),
37
+ border: "1px solid ".concat(_renderUi.color.text()),
38
+ color: _renderUi.color.text(),
39
+ alignItems: 'center',
40
+ display: 'inline-flex',
41
+ height: 'initial',
42
+ minHeight: '32px',
43
+ fontSize: 'inherit',
44
+ whiteSpace: 'pre-wrap',
45
+ maxWidth: '374px',
46
+ // Added for touch devices, for image content.
47
+ // This will prevent the context menu from appearing and not allowing other interactions with the image.
48
+ // If interactions with the image in the token will be requested we should handle only the context Menu.
49
+ pointerEvents: 'none',
50
+ borderRadius: '3px',
51
+ paddingTop: '12px',
52
+ paddingBottom: '12px',
53
+ '&.Mui-disabled': {
54
+ opacity: 1
148
55
  }
149
- }]);
150
- return BlankContentComp;
151
- }(_react["default"].Component);
152
-
153
- (0, _defineProperty2["default"])(BlankContentComp, "propTypes", {
154
- disabled: _propTypes["default"].bool,
155
- choice: _propTypes["default"].object,
156
- classes: _propTypes["default"].object,
157
- connectDragSource: _propTypes["default"].func
56
+ };
158
57
  });
159
- var BlankContent = (0, _styles.withStyles)(function (theme) {
58
+ var StyledChipLabel = (0, _styles.styled)('span')(function () {
160
59
  return {
161
- choice: {
162
- border: "solid 0px ".concat(theme.palette.primary.main),
163
- borderRadius: theme.spacing.unit * 2,
164
- margin: theme.spacing.unit / 2,
165
- transform: 'translate(0, 0)'
166
- },
167
- chip: {
168
- backgroundColor: _renderUi.color.white(),
169
- border: "1px solid ".concat(_renderUi.color.text()),
170
- color: _renderUi.color.text(),
171
- alignItems: 'center',
172
- display: 'inline-flex',
173
- height: 'initial',
174
- minHeight: '32px',
175
- fontSize: 'inherit',
176
- whiteSpace: 'pre-wrap',
177
- maxWidth: '374px',
178
- // Added for touch devices, for image content.
179
- // This will prevent the context menu from appearing and not allowing other interactions with the image.
180
- // If interactions with the image in the token will be requested we should handle only the context Menu.
181
- pointerEvents: 'none',
182
- borderRadius: '3px',
183
- paddingTop: '12px',
184
- paddingBottom: '12px'
185
- },
186
- chipLabel: {
187
- whiteSpace: 'normal',
188
- '& img': {
189
- display: 'block',
190
- padding: '2px 0'
191
- },
192
- '& mjx-frac': {
193
- fontSize: '120% !important'
194
- }
60
+ whiteSpace: 'normal',
61
+ '& img': {
62
+ display: 'block',
63
+ padding: '2px 0'
195
64
  },
196
- disabled: {
197
- opacity: 0.6
65
+ '& mjx-frac': {
66
+ fontSize: '120% !important'
198
67
  }
199
68
  };
200
- })(BlankContentComp);
201
- exports.BlankContent = BlankContent;
202
- var tileSource = {
203
- canDrag: function canDrag(props) {
204
- return !props.disabled;
205
- },
206
- beginDrag: function beginDrag(props) {
207
- return {
208
- choice: props.choice,
209
- instanceId: props.instanceId
210
- };
211
- }
69
+ });
70
+ function Choice(_ref2) {
71
+ var _rootRef$current, _rootRef$current2;
72
+ var choice = _ref2.choice,
73
+ disabled = _ref2.disabled,
74
+ instanceId = _ref2.instanceId;
75
+ var rootRef = (0, _react.useRef)(null);
76
+ var _useDraggable = (0, _core.useDraggable)({
77
+ id: "choice-".concat(choice.id),
78
+ data: {
79
+ choice: choice,
80
+ instanceId: instanceId,
81
+ fromChoice: true,
82
+ type: DRAG_TYPE
83
+ },
84
+ disabled: disabled
85
+ }),
86
+ attributes = _useDraggable.attributes,
87
+ listeners = _useDraggable.listeners,
88
+ setNodeRef = _useDraggable.setNodeRef,
89
+ isDragging = _useDraggable.isDragging;
90
+ (0, _react.useEffect)(function () {
91
+ (0, _mathRendering.renderMath)(rootRef.current);
92
+ }, [choice.value]);
93
+ return /*#__PURE__*/_react["default"].createElement(StyledChoice, (0, _extends2["default"])({
94
+ ref: setNodeRef,
95
+ style: isDragging ? {
96
+ width: (_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.offsetWidth,
97
+ height: (_rootRef$current2 = rootRef.current) === null || _rootRef$current2 === void 0 ? void 0 : _rootRef$current2.offsetHeight
98
+ } : {},
99
+ disabled: disabled
100
+ }, listeners, attributes), /*#__PURE__*/_react["default"].createElement(StyledChip, {
101
+ clickable: false,
102
+ disabled: disabled,
103
+ ref: rootRef,
104
+ label: /*#__PURE__*/_react["default"].createElement(StyledChipLabel, {
105
+ dangerouslySetInnerHTML: {
106
+ __html: choice.value
107
+ }
108
+ })
109
+ }));
110
+ }
111
+ Choice.propTypes = {
112
+ choice: _propTypes["default"].object.isRequired,
113
+ disabled: _propTypes["default"].bool,
114
+ instanceId: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number])
212
115
  };
213
- var DragDropTile = (0, _drag.DragSource)(DRAG_TYPE, tileSource, function (connect, monitor) {
214
- return {
215
- connectDragSource: connect.dragSource(),
216
- isDragging: monitor.isDragging()
217
- };
218
- })(BlankContent);
219
- var _default = DragDropTile;
220
- exports["default"] = _default;
221
116
  //# sourceMappingURL=choice.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/choices/choice.jsx"],"names":["DRAG_TYPE","BlankContentComp","props","connectDragSource","disabled","dragContainerRef","e","preventDefault","longPressTimer","setTimeout","startDrag","clearTimeout","addEventListener","handleTouchStart","passive","handleTouchEnd","handleTouchMove","removeEventListener","rootRef","choice","classes","ref","ReactDOM","findDOMNode","chip","chipLabel","innerHTML","value","undefined","React","Component","PropTypes","bool","object","func","BlankContent","theme","border","palette","primary","main","borderRadius","spacing","unit","margin","transform","backgroundColor","color","white","text","alignItems","display","height","minHeight","fontSize","whiteSpace","maxWidth","pointerEvents","paddingTop","paddingBottom","padding","opacity","tileSource","canDrag","beginDrag","instanceId","DragDropTile","connect","monitor","dragSource","isDragging"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;AAEO,IAAMA,SAAS,GAAG,WAAlB;;;IAEDC,gB;;;;;;;;;;;;;;;kGAQQ,YAAM;AAChB,wBAAwC,MAAKC,KAA7C;AAAA,UAAQC,iBAAR,eAAQA,iBAAR;AAAA,UAA2BC,QAA3B,eAA2BA,QAA3B;;AACA,UAAI,CAACA,QAAL,EAAe;AACbD,QAAAA,iBAAiB,CAAC,MAAKE,gBAAN,CAAjB;AACD;AACF,K;yGAGkB,UAACC,CAAD,EAAO;AACxBA,MAAAA,CAAC,CAACC,cAAF;AACA,YAAKC,cAAL,GAAsBC,UAAU,CAAC,YAAM;AACrC,cAAKC,SAAL,CAAeJ,CAAf;AACD,OAF+B,EAE7B,GAF6B,CAAhC;AAGD,K;uGAEgB,YAAM;AACrBK,MAAAA,YAAY,CAAC,MAAKH,cAAN,CAAZ;AACD,K;wGAEiB,YAAM;AACtBG,MAAAA,YAAY,CAAC,MAAKH,cAAN,CAAZ;AACD,K;;;;;;WAED,6BAAoB;AAClB,UAAI,KAAKH,gBAAT,EAA2B;AACzB,aAAKA,gBAAL,CAAsBO,gBAAtB,CAAuC,YAAvC,EAAqD,KAAKC,gBAA1D,EAA4E;AAAEC,UAAAA,OAAO,EAAE;AAAX,SAA5E;AACA,aAAKT,gBAAL,CAAsBO,gBAA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AAE,UATR;AAUJC,MAAAA,QAAQ,EAAE,OAVN;AAWJ;AACA;AACA;AACAC,MAAAA,aAAa,EAAE,MAdX;AAeJhB,MAAAA,YAAY,EAAE,KAfV;AAgBJiB,MAAAA,UAAU,EAAE,MAhBR;AAiBJC,MAAAA,aAAa,EAAE;AAjBX,KAP2C;AA0BjDlC,IAAAA,SAAS,EAAE;AACT8B,MAAAA,UAAU,EAAE,QADH;AAET,eAAS;AACPJ,QAAAA,OAAO,EAAE,OADF;AAEPS,QAAAA,OAAO,EAAE;AAFF,OAFA;AAMT,oBAAc;AACZN,QAAAA,QAAQ,EAAE;AADE;AANL,KA1BsC;AAoCjDlD,IAAAA,QAAQ,EAAE;AACRyD,MAAAA,OAAO,EAAE;AADD;AApCuC,GAAZ;AAAA,CAAX,EAuCxB5D,gBAvCwB,CAArB;;AAyCP,IAAM6D,UAAU,GAAG;AACjBC,EAAAA,OADiB,mBACT7D,KADS,EACF;AACb,WAAO,CAACA,KAAK,CAACE,QAAd;AACD,GAHgB;AAIjB4D,EAAAA,SAJiB,qBAIP9D,KAJO,EAIA;AACf,WAAO;AACLiB,MAAAA,MAAM,EAAEjB,KAAK,CAACiB,MADT;AAEL8C,MAAAA,UAAU,EAAE/D,KAAK,CAAC+D;AAFb,KAAP;AAID;AATgB,CAAnB;AAYA,IAAMC,YAAY,GAAG,sBAAWlE,SAAX,EAAsB8D,UAAtB,EAAkC,UAACK,OAAD,EAAUC,OAAV;AAAA,SAAuB;AAC5EjE,IAAAA,iBAAiB,EAAEgE,OAAO,CAACE,UAAR,EADyD;AAE5EC,IAAAA,UAAU,EAAEF,OAAO,CAACE,UAAR;AAFgE,GAAvB;AAAA,CAAlC,EAGjBnC,YAHiB,CAArB;eAKe+B,Y","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport Chip from '@material-ui/core/Chip';\nimport classnames from 'classnames';\n\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { color } from '@pie-lib/render-ui';\nimport { DragSource } from '@pie-lib/drag';\n\nexport const DRAG_TYPE = 'MaskBlank';\n\nclass BlankContentComp extends React.Component {\n static propTypes = {\n disabled: PropTypes.bool,\n choice: PropTypes.object,\n classes: PropTypes.object,\n connectDragSource: PropTypes.func,\n };\n\n startDrag = () => {\n const { connectDragSource, disabled } = this.props;\n if (!disabled) {\n connectDragSource(this.dragContainerRef);\n }\n };\n\n // start drag after 500ms (touch and hold duration) for chromebooks and other touch devices PD-4888\n handleTouchStart = (e) => {\n e.preventDefault();\n this.longPressTimer = setTimeout(() => {\n this.startDrag(e);\n }, 500);\n };\n\n handleTouchEnd = () => {\n clearTimeout(this.longPressTimer);\n };\n\n handleTouchMove = () => {\n clearTimeout(this.longPressTimer);\n };\n\n componentDidMount() {\n if (this.dragContainerRef) {\n this.dragContainerRef.addEventListener('touchstart', this.handleTouchStart, { passive: false });\n this.dragContainerRef.addEventListener('touchend', this.handleTouchEnd);\n this.dragContainerRef.addEventListener('touchmove', this.handleTouchMove);\n }\n }\n\n componentWillUnmount() {\n if (this.dragContainerRef) {\n this.dragContainerRef.removeEventListener('touchstart', this.handleTouchStart);\n this.dragContainerRef.removeEventListener('touchend', this.handleTouchEnd);\n this.dragContainerRef.removeEventListener('touchmove', this.handleTouchMove);\n }\n }\n\n componentDidUpdate() {\n renderMath(this.rootRef);\n }\n\n render() {\n const { connectDragSource, choice, classes, disabled } = this.props;\n\n // TODO the Chip element is causing drag problems on touch devices. Avoid using Chip and consider refactoring the code. Keep in mind that Chip is a span with a button role, which interferes with seamless touch device dragging.\n\n return connectDragSource(\n <span\n className={classnames(classes.choice, disabled && classes.disabled)}\n ref={(ref) => {\n //eslint-disable-next-line\n this.dragContainerRef = ReactDOM.findDOMNode(ref);\n }}\n >\n <Chip\n clickable={false}\n disabled={true}\n ref={(ref) => {\n //eslint-disable-next-line\n this.rootRef = ReactDOM.findDOMNode(ref);\n }}\n className={classes.chip}\n label={\n <span\n className={classes.chipLabel}\n ref={(ref) => {\n if (ref) {\n ref.innerHTML = choice.value || ' ';\n }\n }}\n >\n {' '}\n </span>\n }\n variant={disabled ? 'outlined' : undefined}\n />\n </span>,\n {},\n );\n }\n}\n\nexport const BlankContent = withStyles((theme) => ({\n choice: {\n border: `solid 0px ${theme.palette.primary.main}`,\n borderRadius: theme.spacing.unit * 2,\n margin: theme.spacing.unit / 2,\n transform: 'translate(0, 0)',\n },\n chip: {\n backgroundColor: color.white(),\n border: `1px solid ${color.text()}`,\n color: color.text(),\n alignItems: 'center',\n display: 'inline-flex',\n height: 'initial',\n minHeight: '32px',\n fontSize: 'inherit',\n whiteSpace: 'pre-wrap',\n maxWidth: '374px',\n // Added for touch devices, for image content.\n // This will prevent the context menu from appearing and not allowing other interactions with the image.\n // If interactions with the image in the token will be requested we should handle only the context Menu.\n pointerEvents: 'none',\n borderRadius: '3px',\n paddingTop: '12px',\n paddingBottom: '12px',\n },\n chipLabel: {\n whiteSpace: 'normal',\n '& img': {\n display: 'block',\n padding: '2px 0',\n },\n '& mjx-frac': {\n fontSize: '120% !important',\n },\n },\n disabled: {\n opacity: 0.6,\n },\n}))(BlankContentComp);\n\nconst tileSource = {\n canDrag(props) {\n return !props.disabled;\n },\n beginDrag(props) {\n return {\n choice: props.choice,\n instanceId: props.instanceId,\n };\n },\n};\n\nconst DragDropTile = DragSource(DRAG_TYPE, tileSource, (connect, monitor) => ({\n connectDragSource: connect.dragSource(),\n isDragging: monitor.isDragging(),\n}))(BlankContent);\n\nexport default DragDropTile;\n"],"file":"choice.js"}
1
+ {"version":3,"file":"choice.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_core","_styles","_Chip","_mathRendering","_renderUi","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","DRAG_TYPE","exports","StyledChoice","styled","_ref","theme","disabled","border","concat","palette","primary","main","borderRadius","spacing","margin","transform","display","StyledChip","Chip","backgroundColor","color","white","text","alignItems","height","minHeight","fontSize","whiteSpace","maxWidth","pointerEvents","paddingTop","paddingBottom","opacity","StyledChipLabel","padding","Choice","_ref2","_rootRef$current","_rootRef$current2","choice","instanceId","rootRef","useRef","_useDraggable","useDraggable","id","data","fromChoice","type","attributes","listeners","setNodeRef","isDragging","useEffect","renderMath","current","value","createElement","_extends2","ref","style","width","offsetWidth","offsetHeight","clickable","label","dangerouslySetInnerHTML","__html","propTypes","PropTypes","object","isRequired","bool","oneOfType","string","number"],"sources":["../../src/choices/choice.jsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { useDraggable } from '@dnd-kit/core';\nimport { styled } from '@mui/material/styles';\nimport Chip from '@mui/material/Chip';\nimport { renderMath } from '@pie-lib/math-rendering';\nimport { color } from '@pie-lib/render-ui';\n\nexport const DRAG_TYPE = 'MaskBlank';\n\nconst StyledChoice = styled('span')(({ theme, disabled }) => ({\n border: `solid 0px ${theme.palette.primary.main}`,\n borderRadius: theme.spacing(2),\n margin: theme.spacing(0.5),\n transform: 'translate(0, 0)',\n display: 'inline-flex',\n ...(disabled && {}),\n}));\n\nconst StyledChip = styled(Chip)(() => ({\n backgroundColor: color.white(),\n border: `1px solid ${color.text()}`,\n color: color.text(),\n alignItems: 'center',\n display: 'inline-flex',\n height: 'initial',\n minHeight: '32px',\n fontSize: 'inherit',\n whiteSpace: 'pre-wrap',\n maxWidth: '374px',\n // Added for touch devices, for image content.\n // This will prevent the context menu from appearing and not allowing other interactions with the image.\n // If interactions with the image in the token will be requested we should handle only the context Menu.\n pointerEvents: 'none',\n borderRadius: '3px',\n paddingTop: '12px',\n paddingBottom: '12px',\n\n '&.Mui-disabled': {\n opacity: 1,\n },\n}));\n\nconst StyledChipLabel = styled('span')(() => ({\n whiteSpace: 'normal',\n '& img': {\n display: 'block',\n padding: '2px 0',\n },\n '& mjx-frac': {\n fontSize: '120% !important',\n },\n}));\n\nexport default function Choice({ choice, disabled, instanceId }) {\n const rootRef = useRef(null);\n\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id: `choice-${choice.id}`,\n data: { choice, instanceId, fromChoice: true, type: DRAG_TYPE },\n disabled,\n });\n\n useEffect(() => {\n renderMath(rootRef.current);\n }, [choice.value]);\n\n return (\n <StyledChoice\n ref={setNodeRef}\n style={\n isDragging\n ? {\n width: rootRef.current?.offsetWidth,\n height: rootRef.current?.offsetHeight,\n }\n : {}\n }\n disabled={disabled}\n {...listeners}\n {...attributes}\n >\n <StyledChip\n clickable={false}\n disabled={disabled}\n ref={rootRef}\n label={<StyledChipLabel dangerouslySetInnerHTML={{ __html: choice.value }} />}\n />\n </StyledChoice>\n );\n}\n\nChoice.propTypes = {\n choice: PropTypes.object.isRequired,\n disabled: PropTypes.bool,\n instanceId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n};\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAA2C,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,wBAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,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