@bigbinary/neeto-commons-frontend 2.0.44 → 2.0.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "2.0.44",
3
+ "version": "2.0.45",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -3504,19 +3504,24 @@ var OS$1 = {
3504
3504
  windows: "Windows"
3505
3505
  };
3506
3506
 
3507
- var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
3508
- var _platformInfo$os, _platformInfo$os$fami;
3509
- var platformInfo = platform.parse(navigator.userAgent);
3510
- var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS$1.mac);
3511
- if (isOSX) return hotkey;
3512
- var hotkeyForWindows = hotkey;
3507
+ var convertHotKeyToWindows = function convertHotKeyToWindows(hotkey) {
3513
3508
  ramda.toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(function (_ref) {
3514
3509
  var _ref2 = _slicedToArray(_ref, 2),
3515
3510
  macKey = _ref2[0],
3516
3511
  windowsKey = _ref2[1];
3517
- hotkeyForWindows = hotkeyForWindows.replaceAll(macKey, windowsKey);
3512
+ hotkey = hotkey.replaceAll(macKey, windowsKey);
3518
3513
  });
3519
- return hotkeyForWindows;
3514
+ return hotkey;
3515
+ };
3516
+ var replaceDeleteKeyWithBackspace = function replaceDeleteKeyWithBackspace(hotkey) {
3517
+ return hotkey.replaceAll("delete", "backspace");
3518
+ };
3519
+ var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
3520
+ var _platformInfo$os, _platformInfo$os$fami;
3521
+ var platformInfo = platform.parse(navigator.userAgent);
3522
+ var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS$1.mac);
3523
+ if (isOSX) return replaceDeleteKeyWithBackspace(hotkey);
3524
+ return convertHotKeyToWindows(hotkey);
3520
3525
  };
3521
3526
 
3522
3527
  var MODES$1 = {
package/react-utils.js CHANGED
@@ -3466,19 +3466,24 @@ var OS$1 = {
3466
3466
  windows: "Windows"
3467
3467
  };
3468
3468
 
3469
- var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
3470
- var _platformInfo$os, _platformInfo$os$fami;
3471
- var platformInfo = platform.parse(navigator.userAgent);
3472
- var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS$1.mac);
3473
- if (isOSX) return hotkey;
3474
- var hotkeyForWindows = hotkey;
3469
+ var convertHotKeyToWindows = function convertHotKeyToWindows(hotkey) {
3475
3470
  toPairs(MAC_TO_WINDOWS_KEYS_MAP).forEach(function (_ref) {
3476
3471
  var _ref2 = _slicedToArray(_ref, 2),
3477
3472
  macKey = _ref2[0],
3478
3473
  windowsKey = _ref2[1];
3479
- hotkeyForWindows = hotkeyForWindows.replaceAll(macKey, windowsKey);
3474
+ hotkey = hotkey.replaceAll(macKey, windowsKey);
3480
3475
  });
3481
- return hotkeyForWindows;
3476
+ return hotkey;
3477
+ };
3478
+ var replaceDeleteKeyWithBackspace = function replaceDeleteKeyWithBackspace(hotkey) {
3479
+ return hotkey.replaceAll("delete", "backspace");
3480
+ };
3481
+ var convertHotkeyToUsersPlatform = function convertHotkeyToUsersPlatform(hotkey) {
3482
+ var _platformInfo$os, _platformInfo$os$fami;
3483
+ var platformInfo = platform.parse(navigator.userAgent);
3484
+ var isOSX = (_platformInfo$os = platformInfo.os) === null || _platformInfo$os === void 0 ? void 0 : (_platformInfo$os$fami = _platformInfo$os.family) === null || _platformInfo$os$fami === void 0 ? void 0 : _platformInfo$os$fami.includes(OS$1.mac);
3485
+ if (isOSX) return replaceDeleteKeyWithBackspace(hotkey);
3486
+ return convertHotKeyToWindows(hotkey);
3482
3487
  };
3483
3488
 
3484
3489
  var MODES$1 = {