@bigbinary/neeto-commons-frontend 2.0.44 → 2.0.46

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.
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var common = require('constants/texts/common');
6
5
  var dayjs = require('dayjs');
7
6
 
8
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -190,6 +189,23 @@ var profileSelectors = {
190
189
  profileOptionsContainer: '[class="tippy-box sidebar-featured-tooltip__content"]'
191
190
  };
192
191
 
192
+ var commonTexts = {
193
+ activate: "Activate",
194
+ block: "Block",
195
+ copiedToClipboard: "Copied to clipboard!",
196
+ crossSiteScript: "<script>alert('XSS')</script>",
197
+ deactivate: "Deactivate",
198
+ "delete": "Delete",
199
+ edit: "Edit",
200
+ invalidEmailMessage: "Please enter a valid email.",
201
+ invalidSearchInput: "Invalid search input",
202
+ logout: "Log out",
203
+ "new": "New",
204
+ takeAction: "Take action",
205
+ unblock: "Unblock",
206
+ toastIcon: "👍"
207
+ };
208
+
193
209
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
194
210
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
195
211
  var initCustomCommands = function initCustomCommands() {
@@ -222,7 +238,7 @@ var initCustomCommands = function initCustomCommands() {
222
238
  cy.get(commonSelectors.toastMessage).should("not.exist");
223
239
  });
224
240
  Cypress.Commands.add("verifyToastIcon", function () {
225
- cy.get(commonSelectors.toastIcon).should("have.text", common.commonTexts.toastIcon);
241
+ cy.get(commonSelectors.toastIcon).should("have.text", commonTexts.toastIcon);
226
242
  cy.get(commonSelectors.toastCloseButton).click();
227
243
  cy.get(commonSelectors.toastIcon).should("not.exist");
228
244
  });
@@ -368,23 +384,6 @@ var signUpSelectors = {
368
384
  tryFreeButton: dataCy("neeto-auth-signup-link")
369
385
  };
370
386
 
371
- var commonTexts = {
372
- activate: "Activate",
373
- block: "Block",
374
- copiedToClipboard: "Copied to clipboard!",
375
- crossSiteScript: "<script>alert('XSS')</script>",
376
- deactivate: "Deactivate",
377
- "delete": "Delete",
378
- edit: "Edit",
379
- invalidEmailMessage: "Please enter a valid email.",
380
- invalidSearchInput: "Invalid search input",
381
- logout: "Log out",
382
- "new": "New",
383
- takeAction: "Take action",
384
- unblock: "Unblock",
385
- toastIcon: "👍"
386
- };
387
-
388
387
  var memberTexts = {
389
388
  addMember: "Add new member",
390
389
  admin: "Admin",
package/cypress-utils.js CHANGED
@@ -1,4 +1,3 @@
1
- import { commonTexts as commonTexts$1 } from 'constants/texts/common';
2
1
  import dayjs from 'dayjs';
3
2
 
4
3
  function _typeof(obj) {
@@ -182,6 +181,23 @@ var profileSelectors = {
182
181
  profileOptionsContainer: '[class="tippy-box sidebar-featured-tooltip__content"]'
183
182
  };
184
183
 
184
+ var commonTexts = {
185
+ activate: "Activate",
186
+ block: "Block",
187
+ copiedToClipboard: "Copied to clipboard!",
188
+ crossSiteScript: "<script>alert('XSS')</script>",
189
+ deactivate: "Deactivate",
190
+ "delete": "Delete",
191
+ edit: "Edit",
192
+ invalidEmailMessage: "Please enter a valid email.",
193
+ invalidSearchInput: "Invalid search input",
194
+ logout: "Log out",
195
+ "new": "New",
196
+ takeAction: "Take action",
197
+ unblock: "Unblock",
198
+ toastIcon: "👍"
199
+ };
200
+
185
201
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
186
202
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
187
203
  var initCustomCommands = function initCustomCommands() {
@@ -214,7 +230,7 @@ var initCustomCommands = function initCustomCommands() {
214
230
  cy.get(commonSelectors.toastMessage).should("not.exist");
215
231
  });
216
232
  Cypress.Commands.add("verifyToastIcon", function () {
217
- cy.get(commonSelectors.toastIcon).should("have.text", commonTexts$1.toastIcon);
233
+ cy.get(commonSelectors.toastIcon).should("have.text", commonTexts.toastIcon);
218
234
  cy.get(commonSelectors.toastCloseButton).click();
219
235
  cy.get(commonSelectors.toastIcon).should("not.exist");
220
236
  });
@@ -360,23 +376,6 @@ var signUpSelectors = {
360
376
  tryFreeButton: dataCy("neeto-auth-signup-link")
361
377
  };
362
378
 
363
- var commonTexts = {
364
- activate: "Activate",
365
- block: "Block",
366
- copiedToClipboard: "Copied to clipboard!",
367
- crossSiteScript: "<script>alert('XSS')</script>",
368
- deactivate: "Deactivate",
369
- "delete": "Delete",
370
- edit: "Edit",
371
- invalidEmailMessage: "Please enter a valid email.",
372
- invalidSearchInput: "Invalid search input",
373
- logout: "Log out",
374
- "new": "New",
375
- takeAction: "Take action",
376
- unblock: "Unblock",
377
- toastIcon: "👍"
378
- };
379
-
380
379
  var memberTexts = {
381
380
  addMember: "Add new member",
382
381
  admin: "Admin",
package/initializers.d.ts CHANGED
@@ -28,7 +28,7 @@ type Configurations = {
28
28
  };
29
29
 
30
30
  type GlobalPropsType = {
31
- nodeEnv: string;
31
+ railsEnv: string;
32
32
  honeybadgerApiKey: string;
33
33
  organization: {
34
34
  name: string;
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.46",
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 = {
@@ -36943,7 +36948,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
36943
36948
  });
36944
36949
  var honeybadger = react.Honeybadger.configure({
36945
36950
  apiKey: globalProps.honeybadgerApiKey,
36946
- environment: globalProps.nodeEnv,
36951
+ environment: globalProps.railsEnv,
36947
36952
  revision: process.env.HEROKU_SLUG_COMMIT,
36948
36953
  developmentEnvironments: ["development", "test"],
36949
36954
  enableUncaught: true,
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 = {
@@ -36905,7 +36910,7 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
36905
36910
  });
36906
36911
  var honeybadger = Honeybadger.configure({
36907
36912
  apiKey: globalProps.honeybadgerApiKey,
36908
- environment: globalProps.nodeEnv,
36913
+ environment: globalProps.railsEnv,
36909
36914
  revision: process.env.HEROKU_SLUG_COMMIT,
36910
36915
  developmentEnvironments: ["development", "test"],
36911
36916
  enableUncaught: true,