@pie-element/math-inline 8.0.2-next.7 → 8.1.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
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
+ # [8.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@8.0.1...@pie-element/math-inline@8.1.0) (2024-10-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([ddb9d44](https://github.com/pie-framework/pie-elements/commit/ddb9d444243b881b3a468ecfb5bab551511a2495))
12
+ * **math-inline:** resolve issue where math editor closes when interacting with the keypad PD-4155 DNA-22415 ([b7c9aef](https://github.com/pie-framework/pie-elements/commit/b7c9aef112982eff1cbb5a4ba8b32b039000f3d3))
13
+
14
+
15
+ ### Features
16
+
17
+ * update documentation (languageCharachters -> characters inside inputConfiguration object ([9e7dceb](https://github.com/pie-framework/pie-elements/commit/9e7dceb5291be261df0eb0bebe1e04f932dc327d))
18
+
19
+
20
+
21
+
22
+
6
23
  ## [8.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline@8.0.0...@pie-element/math-inline@8.0.1) (2024-09-26)
7
24
 
8
25
 
@@ -3,6 +3,17 @@
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
+ ## [8.0.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@8.0.1...@pie-element/math-inline-configure@8.0.2) (2024-10-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([ddb9d44](https://github.com/pie-framework/pie-elements/commit/ddb9d444243b881b3a468ecfb5bab551511a2495))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [8.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-configure@8.0.0...@pie-element/math-inline-configure@8.0.1) (2024-09-26)
7
18
 
8
19
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/math-inline-configure",
3
3
  "private": true,
4
- "version": "8.0.1",
4
+ "version": "8.0.2",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -11,7 +11,7 @@
11
11
  "@material-ui/icons": "^3.0.1",
12
12
  "@pie-framework/mathquill": "^1.1.3",
13
13
  "@pie-framework/pie-configure-events": "^1.3.0",
14
- "@pie-lib/pie-toolbox": "2.0.8",
14
+ "@pie-lib/pie-toolbox": "2.0.9",
15
15
  "classnames": "^2.2.5",
16
16
  "debug": "^3.1.0",
17
17
  "prop-types": "^15.6.2",
@@ -3,6 +3,17 @@
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
+ ## [7.0.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-controller@7.0.1...@pie-element/math-inline-controller@7.0.2) (2024-10-01)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update pie-toolbox and @pie-lib/pie-toolbox-module ([ddb9d44](https://github.com/pie-framework/pie-elements/commit/ddb9d444243b881b3a468ecfb5bab551511a2495))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [7.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/math-inline-controller@7.0.0...@pie-element/math-inline-controller@7.0.1) (2024-09-26)
7
18
 
8
19
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/math-inline-controller",
3
3
  "private": true,
4
- "version": "7.0.1",
4
+ "version": "7.0.2",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@pie-framework/math-validation": "^1.2.2",
13
- "@pie-lib/pie-toolbox": "2.0.8",
13
+ "@pie-lib/pie-toolbox": "2.0.9",
14
14
  "debug": "^3.1.0",
15
15
  "lodash": "^4.17.15"
16
16
  },
@@ -110,7 +110,7 @@
110
110
  }
111
111
  }
112
112
  },
113
- "languageCharacters": {
113
+ "characters": {
114
114
  "title": "EditableHtmlButtonConfigure",
115
115
  "type": "object",
116
116
  "properties": {
@@ -366,7 +366,7 @@
366
366
  }
367
367
  }
368
368
  },
369
- "languageCharacters": {
369
+ "characters": {
370
370
  "title": "EditableHtmlButtonConfigure",
371
371
  "type": "object",
372
372
  "properties": {
@@ -671,7 +671,7 @@
671
671
  }
672
672
  }
673
673
  },
674
- "languageCharacters": {
674
+ "characters": {
675
675
  "title": "EditableHtmlButtonConfigure",
676
676
  "type": "object",
677
677
  "properties": {
@@ -997,7 +997,7 @@
997
997
  }
998
998
  }
999
999
  },
1000
- "languageCharacters": {
1000
+ "characters": {
1001
1001
  "title": "EditableHtmlButtonConfigure",
1002
1002
  "type": "object",
1003
1003
  "properties": {
@@ -1511,7 +1511,7 @@
1511
1511
  }
1512
1512
  }
1513
1513
  },
1514
- "languageCharacters": {
1514
+ "characters": {
1515
1515
  "title": "EditableHtmlButtonConfigure",
1516
1516
  "type": "object",
1517
1517
  "properties": {
@@ -1810,7 +1810,7 @@
1810
1810
  }
1811
1811
  }
1812
1812
  },
1813
- "languageCharacters": {
1813
+ "characters": {
1814
1814
  "title": "EditableHtmlButtonConfigure",
1815
1815
  "type": "object",
1816
1816
  "properties": {
@@ -83,9 +83,9 @@ Properties of the `h3` object:
83
83
 
84
84
  Indicates if the plugin is disabled or not
85
85
 
86
- ## `languageCharacters` (object)
86
+ ## `characters` (object)
87
87
 
88
- Properties of the `languageCharacters` object:
88
+ Properties of the `characters` object:
89
89
 
90
90
  ### `disabled` (boolean)
91
91
 
@@ -272,9 +272,9 @@ Properties of the `h3` object:
272
272
 
273
273
  Indicates if the plugin is disabled or not
274
274
 
275
- ### `languageCharacters` (object)
275
+ ### `characters` (object)
276
276
 
277
- Properties of the `languageCharacters` object:
277
+ Properties of the `characters` object:
278
278
 
279
279
  #### `disabled` (boolean)
280
280
 
@@ -497,9 +497,9 @@ Properties of the `h3` object:
497
497
 
498
498
  Indicates if the plugin is disabled or not
499
499
 
500
- ### `languageCharacters` (object)
500
+ ### `characters` (object)
501
501
 
502
- Properties of the `languageCharacters` object:
502
+ Properties of the `characters` object:
503
503
 
504
504
  #### `disabled` (boolean)
505
505
 
@@ -738,9 +738,9 @@ Properties of the `h3` object:
738
738
 
739
739
  Indicates if the plugin is disabled or not
740
740
 
741
- ### `languageCharacters` (object)
741
+ ### `characters` (object)
742
742
 
743
- Properties of the `languageCharacters` object:
743
+ Properties of the `characters` object:
744
744
 
745
745
  #### `disabled` (boolean)
746
746
 
@@ -1127,9 +1127,9 @@ Properties of the `h3` object:
1127
1127
 
1128
1128
  Indicates if the plugin is disabled or not
1129
1129
 
1130
- ### `languageCharacters` (object)
1130
+ ### `characters` (object)
1131
1131
 
1132
- Properties of the `languageCharacters` object:
1132
+ Properties of the `characters` object:
1133
1133
 
1134
1134
  #### `disabled` (boolean)
1135
1135
 
@@ -1347,9 +1347,9 @@ Properties of the `h3` object:
1347
1347
 
1348
1348
  Indicates if the plugin is disabled or not
1349
1349
 
1350
- #### `languageCharacters` (object)
1350
+ #### `characters` (object)
1351
1351
 
1352
- Properties of the `languageCharacters` object:
1352
+ Properties of the `characters` object:
1353
1353
 
1354
1354
  ##### `disabled` (boolean)
1355
1355
 
@@ -603,7 +603,7 @@
603
603
  }
604
604
  }
605
605
  },
606
- "languageCharacters": {
606
+ "characters": {
607
607
  "title": "EditableHtmlButtonConfigure",
608
608
  "type": "object",
609
609
  "properties": {
@@ -902,7 +902,7 @@
902
902
  }
903
903
  }
904
904
  },
905
- "languageCharacters": {
905
+ "characters": {
906
906
  "title": "EditableHtmlButtonConfigure",
907
907
  "type": "object",
908
908
  "properties": {
@@ -338,9 +338,9 @@ Properties of the `h3` object:
338
338
 
339
339
  Indicates if the plugin is disabled or not
340
340
 
341
- ### `languageCharacters` (object)
341
+ ### `characters` (object)
342
342
 
343
- Properties of the `languageCharacters` object:
343
+ Properties of the `characters` object:
344
344
 
345
345
  #### `disabled` (boolean)
346
346
 
@@ -558,9 +558,9 @@ Properties of the `h3` object:
558
558
 
559
559
  Indicates if the plugin is disabled or not
560
560
 
561
- #### `languageCharacters` (object)
561
+ #### `characters` (object)
562
562
 
563
- Properties of the `languageCharacters` object:
563
+ Properties of the `characters` object:
564
564
 
565
565
  ##### `disabled` (boolean)
566
566
 
package/lib/main.js CHANGED
@@ -236,16 +236,16 @@ var Main = /*#__PURE__*/function (_React$Component) {
236
236
  var isClickOrTouchEvent = event.type === 'click' || event.type === 'touchstart';
237
237
 
238
238
  if (isAnswerInputFocused && (event.key === 'ArrowDown' || isClickOrTouchEvent)) {
239
- _this.setState({
240
- activeAnswerBlock: id
241
- }, function () {
242
- if (event.key === 'ArrowDown') {
243
- _this.focusFirstKeypadElement();
244
- }
245
- });
246
- }
239
+ if (_this.state.activeAnswerBlock !== id) {
240
+ _this.setState({
241
+ activeAnswerBlock: id
242
+ });
243
+ }
247
244
 
248
- if (!isAnswerInputFocused && isClickOrTouchEvent || event.key === 'Escape') {
245
+ if (event.key === 'ArrowDown') {
246
+ _this.focusFirstKeypadElement();
247
+ }
248
+ } else if (event.key === 'Escape') {
249
249
  _this.setState({
250
250
  activeAnswerBlock: ''
251
251
  });
@@ -256,14 +256,18 @@ var Main = /*#__PURE__*/function (_React$Component) {
256
256
  _this.handleKeyDown(event, id);
257
257
  };
258
258
 
259
+ _this.handleEvent = handleEvent;
259
260
  document.addEventListener('keydown', handleEvent);
260
261
  document.addEventListener('click', handleEvent);
261
262
  document.addEventListener('touchstart', handleEvent);
262
263
  });
263
264
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "cleanupKeyDownListener", function () {
264
- document.removeEventListener('keydown', _this.handleEvent);
265
- document.removeEventListener('click', _this.handleEvent);
266
- document.removeEventListener('touchstart', _this.handleEvent);
265
+ if (_this.handleEvent) {
266
+ document.removeEventListener('keydown', _this.handleEvent);
267
+ document.removeEventListener('click', _this.handleEvent);
268
+ document.removeEventListener('touchstart', _this.handleEvent);
269
+ _this.handleEvent = null;
270
+ }
267
271
  });
268
272
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDone", function () {});
269
273
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onSimpleResponseChange", function (response) {