@zohodesk/components 1.2.9 → 1.2.10

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 (40) hide show
  1. package/README.md +8 -0
  2. package/coverage/Button/Button.js.html +1 -1
  3. package/coverage/Button/css/Button.module.css.html +1 -1
  4. package/coverage/Button/css/cssJSLogic.js.html +1 -1
  5. package/coverage/Button/css/index.html +1 -1
  6. package/coverage/Button/index.html +1 -1
  7. package/coverage/Button/props/defaultProps.js.html +1 -1
  8. package/coverage/Button/props/index.html +1 -1
  9. package/coverage/Button/props/propTypes.js.html +1 -1
  10. package/coverage/Buttongroup/Buttongroup.js.html +1 -1
  11. package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
  12. package/coverage/Buttongroup/index.html +1 -1
  13. package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
  14. package/coverage/Buttongroup/props/index.html +1 -1
  15. package/coverage/Buttongroup/props/propTypes.js.html +1 -1
  16. package/coverage/index.html +1 -1
  17. package/coverage/utils/dummyFunction.js.html +1 -1
  18. package/coverage/utils/index.html +1 -1
  19. package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
  20. package/es/DateTime/dateFormatUtils/index.js +1 -1
  21. package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
  22. package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
  23. package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
  24. package/es/Select/GroupSelect.js +2 -5
  25. package/es/Select/Select.js +2 -5
  26. package/es/utils/Common.js +3 -0
  27. package/es/v1/Select/GroupSelect.js +2 -5
  28. package/es/v1/Select/Select.js +2 -5
  29. package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
  30. package/lib/DateTime/dateFormatUtils/index.js +1 -1
  31. package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
  32. package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
  33. package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
  34. package/lib/Select/GroupSelect.js +1 -2
  35. package/lib/Select/Select.js +1 -2
  36. package/lib/utils/Common.js +5 -0
  37. package/lib/v1/Select/GroupSelect.js +1 -2
  38. package/lib/v1/Select/Select.js +1 -2
  39. package/package.json +1 -1
  40. package/result.json +1 -1
package/README.md CHANGED
@@ -32,6 +32,14 @@ In this Package, we Provide Some Basic Components to Build Web App
32
32
  - TextBoxIcon
33
33
  - Tooltip
34
34
 
35
+ # 1.2.10
36
+
37
+ - **Common utils** - `getKeyValue` method added to get keyValue of current pressed key.
38
+
39
+ - **DateTime** - Numpad key issue fixed.
40
+
41
+ - **Select, GroupSelect** - getting key value from key event method changed.
42
+
35
43
  # 1.2.9
36
44
 
37
45
  - Package version merge fix update.
@@ -298,7 +298,7 @@ Button.propTypes = propTypes;
298
298
  <div class='footer quiet pad2 space-top1 center small'>
299
299
  Code coverage generated by
300
300
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
301
- at 2023-08-31T14:24:42.936Z
301
+ at 2023-09-08T06:15:06.429Z
302
302
  </div>
303
303
  <script src="../prettify.js"></script>
304
304
  <script>
@@ -1426,7 +1426,7 @@
1426
1426
  <div class='footer quiet pad2 space-top1 center small'>
1427
1427
  Code coverage generated by
1428
1428
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1429
- at 2023-08-31T14:24:42.936Z
1429
+ at 2023-09-08T06:15:06.429Z
1430
1430
  </div>
1431
1431
  <script src="../../prettify.js"></script>
1432
1432
  <script>
@@ -199,7 +199,7 @@ export default function cssJSLogic({ props, style }) {
199
199
  <div class='footer quiet pad2 space-top1 center small'>
200
200
  Code coverage generated by
201
201
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
202
- at 2023-08-31T14:24:42.936Z
202
+ at 2023-09-08T06:15:06.429Z
203
203
  </div>
204
204
  <script src="../../prettify.js"></script>
205
205
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2023-08-31T14:24:42.936Z
119
+ at 2023-09-08T06:15:06.429Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2023-08-31T14:24:42.936Z
104
+ at 2023-09-08T06:15:06.429Z
105
105
  </div>
106
106
  <script src="../prettify.js"></script>
107
107
  <script>
@@ -127,7 +127,7 @@ export const defaultProps = {
127
127
  <div class='footer quiet pad2 space-top1 center small'>
128
128
  Code coverage generated by
129
129
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
130
- at 2023-08-31T14:24:42.936Z
130
+ at 2023-09-08T06:15:06.429Z
131
131
  </div>
132
132
  <script src="../../prettify.js"></script>
133
133
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2023-08-31T14:24:42.936Z
119
+ at 2023-09-08T06:15:06.429Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -193,7 +193,7 @@ export default propTypes;
193
193
  <div class='footer quiet pad2 space-top1 center small'>
194
194
  Code coverage generated by
195
195
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
196
- at 2023-08-31T14:24:42.936Z
196
+ at 2023-09-08T06:15:06.429Z
197
197
  </div>
198
198
  <script src="../../prettify.js"></script>
199
199
  <script>
@@ -205,7 +205,7 @@ Buttongroup.propTypes = propTypes;
205
205
  <div class='footer quiet pad2 space-top1 center small'>
206
206
  Code coverage generated by
207
207
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
208
- at 2023-08-31T14:24:42.936Z
208
+ at 2023-09-08T06:15:06.429Z
209
209
  </div>
210
210
  <script src="../prettify.js"></script>
211
211
  <script>
@@ -283,7 +283,7 @@
283
283
  <div class='footer quiet pad2 space-top1 center small'>
284
284
  Code coverage generated by
285
285
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
286
- at 2023-08-31T14:24:42.936Z
286
+ at 2023-09-08T06:15:06.429Z
287
287
  </div>
288
288
  <script src="../prettify.js"></script>
289
289
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2023-08-31T14:24:42.936Z
119
+ at 2023-09-08T06:15:06.429Z
120
120
  </div>
121
121
  <script src="../prettify.js"></script>
122
122
  <script>
@@ -88,7 +88,7 @@
88
88
  <div class='footer quiet pad2 space-top1 center small'>
89
89
  Code coverage generated by
90
90
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
91
- at 2023-08-31T14:24:42.936Z
91
+ at 2023-09-08T06:15:06.429Z
92
92
  </div>
93
93
  <script src="../../prettify.js"></script>
94
94
  <script>
@@ -116,7 +116,7 @@
116
116
  <div class='footer quiet pad2 space-top1 center small'>
117
117
  Code coverage generated by
118
118
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
119
- at 2023-08-31T14:24:42.936Z
119
+ at 2023-09-08T06:15:06.429Z
120
120
  </div>
121
121
  <script src="../../prettify.js"></script>
122
122
  <script>
@@ -100,7 +100,7 @@ export const propTypes = {
100
100
  <div class='footer quiet pad2 space-top1 center small'>
101
101
  Code coverage generated by
102
102
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
103
- at 2023-08-31T14:24:42.936Z
103
+ at 2023-09-08T06:15:06.429Z
104
104
  </div>
105
105
  <script src="../../prettify.js"></script>
106
106
  <script>
@@ -176,7 +176,7 @@
176
176
  <div class='footer quiet pad2 space-top1 center small'>
177
177
  Code coverage generated by
178
178
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
179
- at 2023-08-31T14:24:42.936Z
179
+ at 2023-09-08T06:15:06.429Z
180
180
  </div>
181
181
  <script src="prettify.js"></script>
182
182
  <script>
@@ -73,7 +73,7 @@
73
73
  <div class='footer quiet pad2 space-top1 center small'>
74
74
  Code coverage generated by
75
75
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
76
- at 2023-08-31T14:24:42.936Z
76
+ at 2023-09-08T06:15:06.429Z
77
77
  </div>
78
78
  <script src="../prettify.js"></script>
79
79
  <script>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at 2023-08-31T14:24:42.936Z
104
+ at 2023-09-08T06:15:06.429Z
105
105
  </div>
106
106
  <script src="../prettify.js"></script>
107
107
  <script>
@@ -1,5 +1,6 @@
1
1
  /** * Methods ** */
2
2
  import { getIsNewValueType, getDayDetails, getIsNumberTyped, getIsDeleteTyped } from './index';
3
+ import { getKeyValue } from '../../utils/Common';
3
4
  export function getChangedDay(values, event, focusOrders, keyActions) {
4
5
  const {
5
6
  keyCode,
@@ -45,7 +46,7 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
45
46
  newDay -= 1;
46
47
  }
47
48
  } else if (getIsNumberTyped(event)) {
48
- const keyString = String.fromCharCode(which);
49
+ const keyString = getKeyValue(event);
49
50
  let newValue = isNewType ? keyString : day.toString() + keyString;
50
51
  newValue = Number.parseInt(newValue);
51
52
 
@@ -46,7 +46,7 @@ export function getIsNumberTyped(event) {
46
46
  shiftKey
47
47
  } = event;
48
48
 
49
- if (keyCode >= 48 && keyCode <= 57 && !ctrlKey && !metaKey && !shiftKey) {
49
+ if ((keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) && !ctrlKey && !metaKey && !shiftKey) {
50
50
  return true;
51
51
  }
52
52
 
@@ -1,5 +1,6 @@
1
1
  /** * Methods ** */
2
2
  import { getIsNewValueType, getIsNumberTyped, getIsDeleteTyped, getMonthDetails, getDayEnd } from './index';
3
+ import { getKeyValue } from '../../utils/Common';
3
4
  export function getChangedMonth(values, event, focusOrders, keyActions) {
4
5
  const {
5
6
  keyCode,
@@ -43,7 +44,7 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
43
44
  newMonth -= 1;
44
45
  }
45
46
  } else if (getIsNumberTyped(event)) {
46
- const keyString = String.fromCharCode(which);
47
+ const keyString = getKeyValue(event);
47
48
  let newValue = isNewType ? keyString : month.toString() + keyString;
48
49
  newValue = Number.parseInt(newValue);
49
50
 
@@ -1,6 +1,6 @@
1
1
  /** * Methods ** */
2
2
  import { getIsNewValueType, getIsNumberTyped, getIsDeleteTyped, getHourDetails, getMinuteDetails, getNoonDetails, getIsNoonValueTyped, getIsEmptyHour } from './index';
3
- import { getIsEmptyValue } from '../../utils/Common';
3
+ import { getKeyValue, getIsEmptyValue } from '../../utils/Common';
4
4
  export function getChangedHour(values, event, focusOrders, keyActions) {
5
5
  let {
6
6
  is24Hour = false
@@ -43,7 +43,7 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
43
43
  newHour -= 1;
44
44
  }
45
45
  } else if (getIsNumberTyped(event)) {
46
- const keyString = String.fromCharCode(which);
46
+ const keyString = getKeyValue(event);
47
47
  let newValue = isNewType ? keyString : hour.toString() + keyString;
48
48
  newValue = Number.parseInt(newValue);
49
49
 
@@ -118,7 +118,7 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
118
118
  newMinute -= 1;
119
119
  }
120
120
  } else if (getIsNumberTyped(event)) {
121
- const keyString = String.fromCharCode(which);
121
+ const keyString = getKeyValue(event);
122
122
  let newValue = isNewType ? keyString : minute.toString() + keyString;
123
123
  newValue = Number.parseInt(newValue);
124
124
 
@@ -194,7 +194,7 @@ export function getChangedNoon(values, event, focusOrders
194
194
  newNoon = allowedValues[currentNoonIndex - 1];
195
195
  }
196
196
  } else if (getIsNoonValueTyped(event)) {
197
- const keyString = String.fromCharCode(which); // let newValue = isNewType ? keyString : noon.toString() + keyString;
197
+ const keyString = getKeyValue(event).toUpperCase(); // let newValue = isNewType ? keyString : noon.toString() + keyString;
198
198
 
199
199
  const newValue = keyString;
200
200
  const needChangeNoon = newNoon.indexOf(newValue) === -1 ? true : false;
@@ -1,5 +1,6 @@
1
1
  /** * Methods ** */
2
2
  import { getIsNewValueType, getIsNumberTyped, getIsDeleteTyped, getDayEnd, convertYearToTwoDigit, getYearDetails, convertTwoDigitToYear, getIsEmptyYear } from './index';
3
+ import { getKeyValue } from '../../utils/Common';
3
4
  export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
4
5
  let {
5
6
  yearInfo
@@ -65,7 +66,7 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
65
66
  newYear -= 1;
66
67
  }
67
68
  } else if (getIsNumberTyped(event)) {
68
- const keyString = String.fromCharCode(which);
69
+ const keyString = getKeyValue(event);
69
70
  let newValue = isNewType ? keyString : year.toString() + keyString;
70
71
  const newValueString = newValue || '';
71
72
  newValue = Number.parseInt(newValue);
@@ -21,7 +21,7 @@ import style from './Select.module.css';
21
21
  /**** Methods ****/
22
22
 
23
23
  import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId } from '../utils/dropDownUtils';
24
- import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd } from '../utils/Common';
24
+ import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd, getKeyValue } from '../utils/Common';
25
25
  /* eslint-disable react/no-unused-prop-types */
26
26
 
27
27
  /* eslint-disable react/sort-prop-types */
@@ -425,10 +425,7 @@ export class GroupSelectComponent extends PureComponent {
425
425
  }
426
426
 
427
427
  handleValueInputChange(e) {
428
- let {
429
- which
430
- } = e;
431
- let typeString = String.fromCharCode(which);
428
+ let typeString = getKeyValue(e);
432
429
  let {
433
430
  isPopupOpen,
434
431
  autoSelectOnType
@@ -21,7 +21,7 @@ import Loader from '@zohodesk/svg/lib/Loader/Loader';
21
21
  /**** Methods ****/
22
22
 
23
23
  import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetSelectedValueText as makeGetSelectedValue } from '../utils/dropDownUtils';
24
- import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd } from '../utils/Common.js';
24
+ import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd, getKeyValue } from '../utils/Common.js';
25
25
  /**** CSS ****/
26
26
 
27
27
  import style from './Select.module.css';
@@ -564,10 +564,7 @@ export class SelectComponent extends Component {
564
564
  }
565
565
 
566
566
  handleValueInputChange(e) {
567
- let {
568
- which
569
- } = e;
570
- let typeString = String.fromCharCode(which);
567
+ let typeString = getKeyValue(e);
571
568
  let {
572
569
  isPopupOpen,
573
570
  autoSelectOnType
@@ -20,6 +20,9 @@ export const stopAllEventPropagation = e => {
20
20
  export function cancelBubblingEffect(e) {
21
21
  e && e.stopPropagation && e.stopPropagation();
22
22
  e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
23
+ }
24
+ export function getKeyValue(event) {
25
+ return event && event.key && event.key;
23
26
  } // export function getCommentsDetails(
24
27
  // commentIds = [],
25
28
  // comments = {},
@@ -21,7 +21,7 @@ import style from '../../Select/Select.module.css';
21
21
  /**** Methods ****/
22
22
 
23
23
  import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId } from '../../utils/dropDownUtils';
24
- import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd } from '../../utils/Common';
24
+ import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd, getKeyValue } from '../../utils/Common';
25
25
  /* eslint-disable react/no-unused-prop-types */
26
26
 
27
27
  /* eslint-disable react/sort-prop-types */
@@ -427,10 +427,7 @@ export class GroupSelectComponent extends PureComponent {
427
427
  }
428
428
 
429
429
  handleValueInputChange(e) {
430
- let {
431
- which
432
- } = e;
433
- let typeString = String.fromCharCode(which);
430
+ let typeString = getKeyValue(e);
434
431
  let {
435
432
  isPopupOpen,
436
433
  autoSelectOnType
@@ -21,7 +21,7 @@ import Loader from '@zohodesk/svg/lib/Loader/Loader';
21
21
  /**** Methods ****/
22
22
 
23
23
  import { makeFormatOptions, makeGetMultiSelectFilterSuggestions as makeGetFilterSuggestions, makeGetSelectedValueText as makeGetSelectedValue } from '../../utils/dropDownUtils';
24
- import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd } from '../../utils/Common.js';
24
+ import { debounce, scrollTo, getIsEmptyValue, getSearchString, findScrollEnd, getKeyValue } from '../../utils/Common.js';
25
25
  /**** CSS ****/
26
26
 
27
27
  import style from '../../Select/Select.module.css';
@@ -566,10 +566,7 @@ export class SelectComponent extends Component {
566
566
  }
567
567
 
568
568
  handleValueInputChange(e) {
569
- let {
570
- which
571
- } = e;
572
- let typeString = String.fromCharCode(which);
569
+ let typeString = getKeyValue(e);
573
570
  let {
574
571
  isPopupOpen,
575
572
  autoSelectOnType
@@ -7,6 +7,8 @@ exports.getChangedDay = getChangedDay;
7
7
 
8
8
  var _index = require("./index");
9
9
 
10
+ var _Common = require("../../utils/Common");
11
+
10
12
  /** * Methods ** */
11
13
  function getChangedDay(values, event, focusOrders, keyActions) {
12
14
  var keyCode = event.keyCode,
@@ -44,7 +46,7 @@ function getChangedDay(values, event, focusOrders, keyActions) {
44
46
  newDay -= 1;
45
47
  }
46
48
  } else if ((0, _index.getIsNumberTyped)(event)) {
47
- var keyString = String.fromCharCode(which);
49
+ var keyString = (0, _Common.getKeyValue)(event);
48
50
  var newValue = isNewType ? keyString : day.toString() + keyString;
49
51
  newValue = Number.parseInt(newValue);
50
52
 
@@ -81,7 +81,7 @@ function getIsNumberTyped(event) {
81
81
  metaKey = event.metaKey,
82
82
  shiftKey = event.shiftKey;
83
83
 
84
- if (keyCode >= 48 && keyCode <= 57 && !ctrlKey && !metaKey && !shiftKey) {
84
+ if ((keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) && !ctrlKey && !metaKey && !shiftKey) {
85
85
  return true;
86
86
  }
87
87
 
@@ -7,6 +7,8 @@ exports.getChangedMonth = getChangedMonth;
7
7
 
8
8
  var _index = require("./index");
9
9
 
10
+ var _Common = require("../../utils/Common");
11
+
10
12
  /** * Methods ** */
11
13
  function getChangedMonth(values, event, focusOrders, keyActions) {
12
14
  var keyCode = event.keyCode,
@@ -48,7 +50,7 @@ function getChangedMonth(values, event, focusOrders, keyActions) {
48
50
  newMonth -= 1;
49
51
  }
50
52
  } else if ((0, _index.getIsNumberTyped)(event)) {
51
- var keyString = String.fromCharCode(which);
53
+ var keyString = (0, _Common.getKeyValue)(event);
52
54
  var newValue = isNewType ? keyString : month.toString() + keyString;
53
55
  newValue = Number.parseInt(newValue);
54
56
 
@@ -61,7 +61,7 @@ function getChangedHour(values, event, focusOrders, keyActions) {
61
61
  newHour -= 1;
62
62
  }
63
63
  } else if ((0, _index.getIsNumberTyped)(event)) {
64
- var keyString = String.fromCharCode(which);
64
+ var keyString = (0, _Common.getKeyValue)(event);
65
65
  var newValue = isNewType ? keyString : hour.toString() + keyString;
66
66
  newValue = Number.parseInt(newValue);
67
67
 
@@ -132,7 +132,7 @@ function getChangedMinute(values, event, focusOrders, keyActions) {
132
132
  newMinute -= 1;
133
133
  }
134
134
  } else if ((0, _index.getIsNumberTyped)(event)) {
135
- var keyString = String.fromCharCode(which);
135
+ var keyString = (0, _Common.getKeyValue)(event);
136
136
  var newValue = isNewType ? keyString : minute.toString() + keyString;
137
137
  newValue = Number.parseInt(newValue);
138
138
 
@@ -206,7 +206,7 @@ function getChangedNoon(values, event, focusOrders
206
206
  newNoon = allowedValues[currentNoonIndex - 1];
207
207
  }
208
208
  } else if ((0, _index.getIsNoonValueTyped)(event)) {
209
- var keyString = String.fromCharCode(which); // let newValue = isNewType ? keyString : noon.toString() + keyString;
209
+ var keyString = (0, _Common.getKeyValue)(event).toUpperCase(); // let newValue = isNewType ? keyString : noon.toString() + keyString;
210
210
 
211
211
  var newValue = keyString;
212
212
  var needChangeNoon = newNoon.indexOf(newValue) === -1 ? true : false;
@@ -7,6 +7,8 @@ exports.getChangedYear = getChangedYear;
7
7
 
8
8
  var _index = require("./index");
9
9
 
10
+ var _Common = require("../../utils/Common");
11
+
10
12
  /** * Methods ** */
11
13
  function getChangedYear(values, event, focusOrders, keyActions, _ref) {
12
14
  var yearInfo = _ref.yearInfo;
@@ -64,7 +66,7 @@ function getChangedYear(values, event, focusOrders, keyActions, _ref) {
64
66
  newYear -= 1;
65
67
  }
66
68
  } else if ((0, _index.getIsNumberTyped)(event)) {
67
- var keyString = String.fromCharCode(which);
69
+ var keyString = (0, _Common.getKeyValue)(event);
68
70
  var newValue = isNewType ? keyString : year.toString() + keyString;
69
71
  var newValueString = newValue || '';
70
72
  newValue = Number.parseInt(newValue);
@@ -497,8 +497,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
497
497
  }, {
498
498
  key: "handleValueInputChange",
499
499
  value: function handleValueInputChange(e) {
500
- var which = e.which;
501
- var typeString = String.fromCharCode(which);
500
+ var typeString = (0, _Common.getKeyValue)(e);
502
501
  var _this$props7 = this.props,
503
502
  isPopupOpen = _this$props7.isPopupOpen,
504
503
  autoSelectOnType = _this$props7.autoSelectOnType;
@@ -606,8 +606,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
606
606
  }, {
607
607
  key: "handleValueInputChange",
608
608
  value: function handleValueInputChange(e) {
609
- var which = e.which;
610
- var typeString = String.fromCharCode(which);
609
+ var typeString = (0, _Common.getKeyValue)(e);
611
610
  var _this$props8 = this.props,
612
611
  isPopupOpen = _this$props8.isPopupOpen,
613
612
  autoSelectOnType = _this$props8.autoSelectOnType;
@@ -20,6 +20,7 @@ exports.getElementSpace = getElementSpace;
20
20
  exports.getFullDateString = getFullDateString;
21
21
  exports.getFullName = getFullName;
22
22
  exports.getIsEmptyValue = void 0;
23
+ exports.getKeyValue = getKeyValue;
23
24
  exports.getListOfDetails = getListOfDetails;
24
25
  exports.getMemSize = getMemSize;
25
26
  exports.getPortalName = getPortalName;
@@ -80,6 +81,10 @@ exports.stopAllEventPropagation = stopAllEventPropagation;
80
81
  function cancelBubblingEffect(e) {
81
82
  e && e.stopPropagation && e.stopPropagation();
82
83
  e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
84
+ }
85
+
86
+ function getKeyValue(event) {
87
+ return event && event.key && event.key;
83
88
  } // export function getCommentsDetails(
84
89
  // commentIds = [],
85
90
  // comments = {},
@@ -499,8 +499,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
499
499
  }, {
500
500
  key: "handleValueInputChange",
501
501
  value: function handleValueInputChange(e) {
502
- var which = e.which;
503
- var typeString = String.fromCharCode(which);
502
+ var typeString = (0, _Common.getKeyValue)(e);
504
503
  var _this$props7 = this.props,
505
504
  isPopupOpen = _this$props7.isPopupOpen,
506
505
  autoSelectOnType = _this$props7.autoSelectOnType;
@@ -609,8 +609,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
609
609
  }, {
610
610
  key: "handleValueInputChange",
611
611
  value: function handleValueInputChange(e) {
612
- var which = e.which;
613
- var typeString = String.fromCharCode(which);
612
+ var typeString = (0, _Common.getKeyValue)(e);
614
613
  var _this$props8 = this.props,
615
614
  isPopupOpen = _this$props8.isPopupOpen,
616
615
  autoSelectOnType = _this$props8.autoSelectOnType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/components",
3
- "version": "1.2.9",
3
+ "version": "1.2.10",
4
4
  "main": "es/index.js",
5
5
  "module": "es/index.js",
6
6
  "private": false,
package/result.json CHANGED
@@ -1 +1 @@
1
- {"jobDetails":{"isRunByLocal":true,"hostName":"lakshmi-zt257","platForm":"Darwin","branchName":"LibraryNavigation"},"tests":{"unitCase":{"isExecuted":"Yes","numberOfSuccess":36,"numberOfFails":0,"numberOfCases":36,"numberOfSuites":2,"endTime":1693491882958,"startTime":1693491878876,"coverageDetail":{"codeCoveragePercentage":98.86,"fileCoveragePercentage":0},"fileDetails":[{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}}]}}}
1
+ {"jobDetails":{"isRunByLocal":true,"hostName":"lakshmi-zt257","platForm":"Darwin","branchName":"LibraryNavigation"},"tests":{"unitCase":{"isExecuted":"Yes","numberOfSuccess":36,"numberOfFails":0,"numberOfCases":36,"numberOfSuites":2,"endTime":1694153706450,"startTime":1694153702460,"coverageDetail":{"codeCoveragePercentage":98.86,"fileCoveragePercentage":0},"fileDetails":[{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Buttongroup/__tests__/Buttongroup.spec.js","CaseList":{"passedCaseList":["rendering the default props","rendering the \"buttonPosition\" to - left","rendering the \"buttonPosition\" to - right","rendering the \"buttonPosition\" to - center","Checking the \"customclass\"","rendering the \"type\" - footer","rendering the \"type\" - header","rendering the \"type\" - tab"],"failedCaseList":[]}},{"fileName":"/Users/lakshmi-zt257/Documents/Git/Library/jsapps/dot/components/src/Button/__tests__/Button.spec.js","CaseList":{"passedCaseList":["Should be render with the basic set of default props","Should render palette of buttons - plainPrimary","Should render palette of buttons - plainSecondary","Should render palette of buttons - primary","Should render palette of buttons - primaryFilled","Should render palette of buttons - dangerFilled","Should render palette of buttons - secondary","Should render palette of buttons - secondaryFilled","Should render palette of buttons - successFilled","Should render palette of buttons - info","Should render palette of buttons - tertiaryFilled","Should render Sizes of buttons - small","Should render Sizes of buttons - medium","Should render Sizes of buttons - large","Should render Sizes of buttons - xlarge","Should render Status of buttons - loading","Should render Status of buttons - success","Should render Status of buttons - none","Should render CustomStatusclassname of buttons - loading","Should render CustomStatusclassname of buttons - success","Should be render with the basic set of default props with disabled is true","Should be render with the basic set of default props with isBold is false","Should be render with the basic set of default props with rounded is true","Should be render with the basic set of default props with needAppearance is false","Should be render with the basic set customButtonclass with buttonClass ","Should be render with the basic set customstatusSize props with buttonClass ","Should be render with the basic set customstyle ","Should be render with the customstyle with medium "],"failedCaseList":[]}}]}}}