@bigbinary/neeto-commons-frontend 2.0.42 → 2.0.44
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/README.md +1 -0
- package/cypress-commands.d.ts +1 -0
- package/cypress-utils.cjs.js +135 -121
- package/cypress-utils.d.ts +3 -1
- package/cypress-utils.js +135 -122
- package/initializers.cjs.js +32 -1
- package/initializers.js +32 -1
- package/package.json +6 -5
- package/react-utils.cjs.js +32878 -331
- package/react-utils.d.ts +23 -0
- package/react-utils.js +32884 -340
package/cypress-utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { commonTexts as commonTexts$1 } from 'constants/texts/common';
|
|
1
2
|
import dayjs from 'dayjs';
|
|
2
3
|
|
|
3
4
|
function _typeof(obj) {
|
|
@@ -163,7 +164,8 @@ var commonSelectors = {
|
|
|
163
164
|
toastMessage: dataCy("toastr-message-container"),
|
|
164
165
|
toastCloseButton: ".neeto-ui-toastr__close-button",
|
|
165
166
|
windowAlert: "#alert-box",
|
|
166
|
-
body: "body"
|
|
167
|
+
body: "body",
|
|
168
|
+
toastIcon: ".Toastify__toast-icon"
|
|
167
169
|
};
|
|
168
170
|
var tableSelectors = {
|
|
169
171
|
nthColumn: function nthColumn(n) {
|
|
@@ -182,126 +184,132 @@ var profileSelectors = {
|
|
|
182
184
|
|
|
183
185
|
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; }
|
|
184
186
|
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; }
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
Cypress.Commands.add("clearAndTypeFast", function (selector, text) {
|
|
189
|
-
cy.get(selector).clear().type(text, {
|
|
190
|
-
delay: 0
|
|
187
|
+
var initCustomCommands = function initCustomCommands() {
|
|
188
|
+
Cypress.Commands.add("clearAndType", function (selector, text) {
|
|
189
|
+
cy.get(selector).clear().type(text);
|
|
191
190
|
});
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
Cypress.Commands.add("clearAndTypeFast", function (selector, text) {
|
|
192
|
+
cy.get(selector).clear().type(text, {
|
|
193
|
+
delay: 0
|
|
194
|
+
});
|
|
196
195
|
});
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
Cypress.Commands.add("clearByClickAndTypeFast", function (selector, text) {
|
|
197
|
+
cy.get(selector).click().clear().type(text, {
|
|
198
|
+
delay: 0
|
|
199
|
+
});
|
|
201
200
|
});
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
|
|
201
|
+
Cypress.Commands.add("typeFast", function (selector, text) {
|
|
202
|
+
cy.get(selector).type(text, {
|
|
203
|
+
delay: 0
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
Cypress.Commands.add("typeAndEnter", function (selector, text) {
|
|
207
|
+
cy.get(selector).clear().type("".concat(text, "{enter}"));
|
|
208
|
+
});
|
|
209
|
+
Cypress.Commands.add("verifyToastMessage", function (message) {
|
|
210
|
+
cy.get(commonSelectors.toastMessage).should("be.visible").should("have.text", message);
|
|
208
211
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
213
|
-
Cypress.Commands.add("continueOnAlert", function (args) {
|
|
214
|
-
var props = _typeof(args) === "object" ? args : {
|
|
215
|
-
alias: args
|
|
216
|
-
};
|
|
217
|
-
var alias = props.alias,
|
|
218
|
-
title = props.title,
|
|
219
|
-
description = props.description,
|
|
220
|
-
_props$requestCount = props.requestCount,
|
|
221
|
-
requestCount = _props$requestCount === void 0 ? 1 : _props$requestCount,
|
|
222
|
-
toastMessage = props.toastMessage;
|
|
223
|
-
var hasMoreThanOneRequest = requestCount > 1;
|
|
224
|
-
title && cy.get(commonSelectors.alertTitle).should("have.text", title);
|
|
225
|
-
description && cy.get(commonSelectors.alertModalMessage).should("have.text", description);
|
|
226
|
-
cy.interceptApi(alias, requestCount);
|
|
227
|
-
cy.get(commonSelectors.alertModalSubmitButton).click();
|
|
228
|
-
cy.wait("@".concat(alias));
|
|
229
|
-
toastMessage && cy.verifyToastMessage(toastMessage);
|
|
230
|
-
hasMoreThanOneRequest && cy.waitForMultipleRequest("@".concat(alias), requestCount - 1);
|
|
231
|
-
});
|
|
232
|
-
Cypress.Commands.add("interceptApi", function (alias) {
|
|
233
|
-
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
234
|
-
return cy.intercept({
|
|
235
|
-
url: requestApis.allPath,
|
|
236
|
-
times: times
|
|
237
|
-
}).as(alias);
|
|
238
|
-
});
|
|
239
|
-
Cypress.Commands.add("waitForMultipleRequest", function (alias) {
|
|
240
|
-
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
241
|
-
return cy.wrap(_toConsumableArray(new Array(times))).each(function () {
|
|
242
|
-
return cy.wait(alias);
|
|
212
|
+
// close toast message
|
|
213
|
+
cy.get(commonSelectors.toastCloseButton).click();
|
|
214
|
+
cy.get(commonSelectors.toastMessage).should("not.exist");
|
|
243
215
|
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
headers: requestHeaders
|
|
249
|
-
})) : cy.log("No request headers found");
|
|
216
|
+
Cypress.Commands.add("verifyToastIcon", function () {
|
|
217
|
+
cy.get(commonSelectors.toastIcon).should("have.text", commonTexts$1.toastIcon);
|
|
218
|
+
cy.get(commonSelectors.toastCloseButton).click();
|
|
219
|
+
cy.get(commonSelectors.toastIcon).should("not.exist");
|
|
250
220
|
});
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
});
|
|
270
|
-
Cypress.Commands.add("
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
alias = _ref.alias,
|
|
282
|
-
selector = _ref.selector;
|
|
283
|
-
cy.window().then(function (win) {
|
|
284
|
-
cy.stub(win, "open").as(alias).callsFake(function (newUrl) {
|
|
285
|
-
return win.location.href = newUrl;
|
|
221
|
+
Cypress.Commands.add("continueOnAlert", function (args) {
|
|
222
|
+
var props = _typeof(args) === "object" ? args : {
|
|
223
|
+
alias: args
|
|
224
|
+
};
|
|
225
|
+
var alias = props.alias,
|
|
226
|
+
title = props.title,
|
|
227
|
+
_props$requestCount = props.requestCount,
|
|
228
|
+
requestCount = _props$requestCount === void 0 ? 1 : _props$requestCount,
|
|
229
|
+
verifyToastIcon = props.verifyToastIcon,
|
|
230
|
+
toastMessage = props.toastMessage;
|
|
231
|
+
var hasMoreThanOneRequest = requestCount > 1;
|
|
232
|
+
title && cy.get(commonSelectors.alertTitle).should("have.text", title);
|
|
233
|
+
cy.interceptApi(alias, requestCount);
|
|
234
|
+
cy.get(commonSelectors.alertModalSubmitButton).click();
|
|
235
|
+
cy.wait("@".concat(alias));
|
|
236
|
+
verifyToastIcon && cy.verifyToastIcon();
|
|
237
|
+
toastMessage && cy.verifyToastMessage(toastMessage);
|
|
238
|
+
hasMoreThanOneRequest && cy.waitForMultipleRequest("@".concat(alias), requestCount - 1);
|
|
239
|
+
});
|
|
240
|
+
Cypress.Commands.add("interceptApi", function (alias) {
|
|
241
|
+
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
242
|
+
return cy.intercept({
|
|
243
|
+
url: requestApis.allPath,
|
|
244
|
+
times: times
|
|
245
|
+
}).as(alias);
|
|
246
|
+
});
|
|
247
|
+
Cypress.Commands.add("waitForMultipleRequest", function (alias) {
|
|
248
|
+
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
249
|
+
return cy.wrap(_toConsumableArray(new Array(times))).each(function () {
|
|
250
|
+
return cy.wait(alias);
|
|
286
251
|
});
|
|
287
252
|
});
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
});
|
|
295
|
-
Cypress.Commands.add("ifExist", function (selector, callback) {
|
|
296
|
-
cy.get(commonSelectors.body).then(function ($body) {
|
|
297
|
-
if ($body.find(selector).length) callback();
|
|
253
|
+
Cypress.Commands.add("apiRequest", function (options) {
|
|
254
|
+
return cy.get("@requestHeaders").then(function (requestHeaders) {
|
|
255
|
+
return requestHeaders ? cy.request(_objectSpread(_objectSpread({}, options), {}, {
|
|
256
|
+
headers: requestHeaders
|
|
257
|
+
})) : cy.log("No request headers found");
|
|
258
|
+
});
|
|
298
259
|
});
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
260
|
+
Cypress.Commands.add("reloadAndWait", function () {
|
|
261
|
+
var requestCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
262
|
+
if (requestCount > 0) {
|
|
263
|
+
cy.interceptApi("reloadAllRequests", requestCount);
|
|
264
|
+
cy.reload();
|
|
265
|
+
cy.waitForMultipleRequest("@reloadAllRequests", requestCount);
|
|
266
|
+
}
|
|
303
267
|
});
|
|
304
|
-
|
|
268
|
+
Cypress.Commands.add("selectOption", function (containerSelector, optionText) {
|
|
269
|
+
cy.get(containerSelector).click().type(optionText);
|
|
270
|
+
cy.contains(commonSelectors.selectOption, optionText).invoke("click");
|
|
271
|
+
});
|
|
272
|
+
Cypress.Commands.add("clickDropdownOption", function (optionText) {
|
|
273
|
+
var dropdownSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : commonSelectors.dropdownIcon;
|
|
274
|
+
cy.get(dropdownSelector).click();
|
|
275
|
+
cy.get(commonSelectors.dropdownContainer).contains(optionText).invoke("click");
|
|
276
|
+
});
|
|
277
|
+
Cypress.Commands.add("getText", function (selector) {
|
|
278
|
+
return cy.get(selector).invoke("text");
|
|
279
|
+
});
|
|
280
|
+
Cypress.Commands.add("getValue", function (selector) {
|
|
281
|
+
return cy.get(selector).invoke("val");
|
|
282
|
+
});
|
|
283
|
+
Cypress.Commands.add("getIframe", function (iframeSelector) {
|
|
284
|
+
return cy.get(iframeSelector).its("0.contentDocument.body").should("not.be.empty");
|
|
285
|
+
});
|
|
286
|
+
Cypress.Commands.add("openInSameTabOnClick", function (_ref) {
|
|
287
|
+
var url = _ref.url,
|
|
288
|
+
alias = _ref.alias,
|
|
289
|
+
selector = _ref.selector;
|
|
290
|
+
cy.window().then(function (win) {
|
|
291
|
+
cy.stub(win, "open").as(alias).callsFake(function (newUrl) {
|
|
292
|
+
return win.location.href = newUrl;
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
cy.get(selector).click();
|
|
296
|
+
cy.get("@".concat(alias)).should("be.called");
|
|
297
|
+
cy.url().should("include", url);
|
|
298
|
+
});
|
|
299
|
+
Cypress.Commands.add("globalState", function (key) {
|
|
300
|
+
return cy.task("getGlobalState", key);
|
|
301
|
+
});
|
|
302
|
+
Cypress.Commands.add("ifExist", function (selector, callback) {
|
|
303
|
+
cy.get(commonSelectors.body).then(function ($body) {
|
|
304
|
+
if ($body.find(selector).length) callback();
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
Cypress.Commands.add("ifNotExist", function (selector, callback) {
|
|
308
|
+
cy.get(commonSelectors.body).then(function ($body) {
|
|
309
|
+
if (!$body.find(selector).length) callback();
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
};
|
|
305
313
|
|
|
306
314
|
var loginSelectors = {
|
|
307
315
|
appleAuthenticationButton: dataCy("apple-authentication-button"),
|
|
@@ -348,7 +356,8 @@ var signUpSelectors = {
|
|
|
348
356
|
signupViaEmailButton: dataCy("signup-via-email-button"),
|
|
349
357
|
submitButton: dataCy("signup-email-submit-button"),
|
|
350
358
|
subdomainNameTextField: dataCy("signup-organization-subdomain-text-field"),
|
|
351
|
-
subdomainError: dataCy("subdomain-input-error")
|
|
359
|
+
subdomainError: dataCy("subdomain-input-error"),
|
|
360
|
+
tryFreeButton: dataCy("neeto-auth-signup-link")
|
|
352
361
|
};
|
|
353
362
|
|
|
354
363
|
var commonTexts = {
|
|
@@ -364,7 +373,8 @@ var commonTexts = {
|
|
|
364
373
|
logout: "Log out",
|
|
365
374
|
"new": "New",
|
|
366
375
|
takeAction: "Take action",
|
|
367
|
-
unblock: "Unblock"
|
|
376
|
+
unblock: "Unblock",
|
|
377
|
+
toastIcon: "👍"
|
|
368
378
|
};
|
|
369
379
|
|
|
370
380
|
var memberTexts = {
|
|
@@ -687,7 +697,7 @@ var memberUtils = {
|
|
|
687
697
|
verifyMemberDetails: verifyMemberDetails
|
|
688
698
|
};
|
|
689
699
|
|
|
690
|
-
var updateSubdmainIfExit = function updateSubdmainIfExit(subdomainName) {
|
|
700
|
+
var updateSubdmainIfExit = function updateSubdmainIfExit(appName, subdomainName) {
|
|
691
701
|
cy.ifExist(signUpSelectors.subdomainError, function () {
|
|
692
702
|
var lastDigit = Number(subdomainName.charAt(subdomainName.length - 1));
|
|
693
703
|
var newOrganizationName = subdomainName.slice(0, -1) + (lastDigit + 1);
|
|
@@ -706,9 +716,7 @@ var updateSubdmainIfExit = function updateSubdmainIfExit(subdomainName) {
|
|
|
706
716
|
key: "businessName",
|
|
707
717
|
value: newOrganizationName
|
|
708
718
|
});
|
|
709
|
-
var
|
|
710
|
-
var domain = baseUrl.split(".")[1];
|
|
711
|
-
var newBaseUrl = "https://".concat(newOrganizationName, ".").concat(domain, ".net");
|
|
719
|
+
var newBaseUrl = "https://".concat(newOrganizationName, ".").concat(appName, ".net");
|
|
712
720
|
Cypress.config("baseUrl", newBaseUrl);
|
|
713
721
|
cy.clearAndType(signUpSelectors.organizationNameTextField, newOrganizationName);
|
|
714
722
|
});
|
|
@@ -723,10 +731,15 @@ var createOrganization = function createOrganization(_ref) {
|
|
|
723
731
|
subdomainName = _ref.subdomainName,
|
|
724
732
|
firstName = _ref.firstName,
|
|
725
733
|
lastName = _ref.lastName,
|
|
726
|
-
|
|
734
|
+
appName = _ref.appName;
|
|
727
735
|
var otp = "123456";
|
|
728
|
-
|
|
729
|
-
|
|
736
|
+
var appNameInLowerCase = appName.toLowerCase();
|
|
737
|
+
var isNeetoAuth = appNameInLowerCase === "neetoauth";
|
|
738
|
+
if (isNeetoAuth) cy.visit("https://app.neetoauth.net/signups/new");else {
|
|
739
|
+
var startingUrl = "https://www.neeto.com/".concat(appNameInLowerCase, "?env=staging");
|
|
740
|
+
cy.visit(startingUrl);
|
|
741
|
+
cy.get(signUpSelectors.tryFreeButton).invoke("removeAttr", "target").click();
|
|
742
|
+
}
|
|
730
743
|
cy.get(signUpSelectors.signupViaEmailButton).should("contain.text", signUpTexts.email).click();
|
|
731
744
|
cy.clearAndType(signUpSelectors.emailTextField, email);
|
|
732
745
|
cy.intercept({
|
|
@@ -744,7 +757,7 @@ var createOrganization = function createOrganization(_ref) {
|
|
|
744
757
|
cy.clearAndType(signUpSelectors.organizationNameTextField, businessName);
|
|
745
758
|
cy.clearAndType(signUpSelectors.subdomainNameTextField, subdomainName);
|
|
746
759
|
cy.wait("@subdomainRequest");
|
|
747
|
-
updateSubdmainIfExit(subdomainName);
|
|
760
|
+
updateSubdmainIfExit(appNameInLowerCase, subdomainName);
|
|
748
761
|
cy.intercept({
|
|
749
762
|
url: requestApis.signUp,
|
|
750
763
|
times: 1
|
|
@@ -777,4 +790,4 @@ var verifyCrossSiteScript = function verifyCrossSiteScript(inputSelector, submit
|
|
|
777
790
|
cy.get(commonSelectors.windowAlert).should("not.exist");
|
|
778
791
|
};
|
|
779
792
|
|
|
780
|
-
export { authUtils, commonSelectors, commonTexts, createOrganization, dataCy, dateUtils, environment, getTestTitle, getUrl, initializeCredentials, isStagingEnv, joinHyphenCase, loginSelectors, memberFormSelectors, memberSelectors, memberTableTexts, memberTexts, memberUtils, profileSelectors, setListCount, signUpSelectors, signUpTexts, tableSelectors, verifyCrossSiteScript, verifyListCount };
|
|
793
|
+
export { authUtils, commonSelectors, commonTexts, createOrganization, dataCy, dateUtils, environment, getTestTitle, getUrl, initCustomCommands, initializeCredentials, isStagingEnv, joinHyphenCase, loginSelectors, memberFormSelectors, memberSelectors, memberTableTexts, memberTexts, memberUtils, profileSelectors, setListCount, signUpSelectors, signUpTexts, tableSelectors, verifyCrossSiteScript, verifyListCount };
|
package/initializers.cjs.js
CHANGED
|
@@ -509,6 +509,21 @@ var neetoCommons = {
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
},
|
|
512
|
+
dateRangeFilter: {
|
|
513
|
+
timePeriodOptions: {
|
|
514
|
+
last7Days: "Last 7 days",
|
|
515
|
+
last30Days: "Last 30 days",
|
|
516
|
+
last24Hours: "Last 24 hours",
|
|
517
|
+
thisMonth: "This month",
|
|
518
|
+
lastMonth: "Last month",
|
|
519
|
+
thisQuarter: "This quarter",
|
|
520
|
+
lastQuarter: "Last quarter",
|
|
521
|
+
thisWeek: "This week",
|
|
522
|
+
lastWeek: "Last week",
|
|
523
|
+
allTime: "All time",
|
|
524
|
+
customDuration: "Custom duration"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
512
527
|
browserSupport: {
|
|
513
528
|
unsupportedBrowserVersion: "You are using {{browserName}} {{browserVersion}}. neeto requires {{browserName}} {{requiredMinBrowserVersion}} or later to perform reliably. <downloadLink></downloadLink><contactUs></contactUs>",
|
|
514
529
|
unsupportedBrowser: "You are using {{browserName}} {{browserVersion}}. neeto requires a modern browser to perform reliably. <contactUs></contactUs>",
|
|
@@ -569,9 +584,16 @@ var neetoCommons = {
|
|
|
569
584
|
openKeyboardShortcutsPane: "Open the keyboard shortcuts pane",
|
|
570
585
|
close: "Close modals, panes"
|
|
571
586
|
}
|
|
587
|
+
},
|
|
588
|
+
emailPreview: {
|
|
589
|
+
to: "To",
|
|
590
|
+
from: "From",
|
|
591
|
+
subject: "Subject",
|
|
592
|
+
poweredBy: "Powered by neeto",
|
|
593
|
+
logoAltText: "Logo"
|
|
572
594
|
}
|
|
573
595
|
};
|
|
574
|
-
var
|
|
596
|
+
var commonsEn = {
|
|
575
597
|
generic: generic,
|
|
576
598
|
authentication: authentication,
|
|
577
599
|
authorization: authorization,
|
|
@@ -588,6 +610,15 @@ var en = {
|
|
|
588
610
|
neetoCommons: neetoCommons
|
|
589
611
|
};
|
|
590
612
|
|
|
613
|
+
var loadEn = function loadEn(pkgName) {
|
|
614
|
+
try {
|
|
615
|
+
return require("../".concat(pkgName, "/src/translations/en.json"));
|
|
616
|
+
} catch (_unused) {
|
|
617
|
+
return {};
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
var moleculesEn = loadEn("neeto-molecules");
|
|
621
|
+
var en = ramda.mergeDeepLeft(commonsEn, moleculesEn);
|
|
591
622
|
var initializeI18n = function initializeI18n(resources) {
|
|
592
623
|
i18next__default["default"].use(reactI18next.initReactI18next).init({
|
|
593
624
|
resources: ramda.mergeDeepLeft(resources, {
|
package/initializers.js
CHANGED
|
@@ -499,6 +499,21 @@ var neetoCommons = {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
},
|
|
502
|
+
dateRangeFilter: {
|
|
503
|
+
timePeriodOptions: {
|
|
504
|
+
last7Days: "Last 7 days",
|
|
505
|
+
last30Days: "Last 30 days",
|
|
506
|
+
last24Hours: "Last 24 hours",
|
|
507
|
+
thisMonth: "This month",
|
|
508
|
+
lastMonth: "Last month",
|
|
509
|
+
thisQuarter: "This quarter",
|
|
510
|
+
lastQuarter: "Last quarter",
|
|
511
|
+
thisWeek: "This week",
|
|
512
|
+
lastWeek: "Last week",
|
|
513
|
+
allTime: "All time",
|
|
514
|
+
customDuration: "Custom duration"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
502
517
|
browserSupport: {
|
|
503
518
|
unsupportedBrowserVersion: "You are using {{browserName}} {{browserVersion}}. neeto requires {{browserName}} {{requiredMinBrowserVersion}} or later to perform reliably. <downloadLink></downloadLink><contactUs></contactUs>",
|
|
504
519
|
unsupportedBrowser: "You are using {{browserName}} {{browserVersion}}. neeto requires a modern browser to perform reliably. <contactUs></contactUs>",
|
|
@@ -559,9 +574,16 @@ var neetoCommons = {
|
|
|
559
574
|
openKeyboardShortcutsPane: "Open the keyboard shortcuts pane",
|
|
560
575
|
close: "Close modals, panes"
|
|
561
576
|
}
|
|
577
|
+
},
|
|
578
|
+
emailPreview: {
|
|
579
|
+
to: "To",
|
|
580
|
+
from: "From",
|
|
581
|
+
subject: "Subject",
|
|
582
|
+
poweredBy: "Powered by neeto",
|
|
583
|
+
logoAltText: "Logo"
|
|
562
584
|
}
|
|
563
585
|
};
|
|
564
|
-
var
|
|
586
|
+
var commonsEn = {
|
|
565
587
|
generic: generic,
|
|
566
588
|
authentication: authentication,
|
|
567
589
|
authorization: authorization,
|
|
@@ -578,6 +600,15 @@ var en = {
|
|
|
578
600
|
neetoCommons: neetoCommons
|
|
579
601
|
};
|
|
580
602
|
|
|
603
|
+
var loadEn = function loadEn(pkgName) {
|
|
604
|
+
try {
|
|
605
|
+
return require("../".concat(pkgName, "/src/translations/en.json"));
|
|
606
|
+
} catch (_unused) {
|
|
607
|
+
return {};
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
var moleculesEn = loadEn("neeto-molecules");
|
|
611
|
+
var en = mergeDeepLeft(commonsEn, moleculesEn);
|
|
581
612
|
var initializeI18n = function initializeI18n(resources) {
|
|
582
613
|
i18next.use(initReactI18next).init({
|
|
583
614
|
resources: mergeDeepLeft(resources, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.44",
|
|
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>",
|
|
@@ -56,8 +56,9 @@
|
|
|
56
56
|
"@babel/preset-env": "^7.17.10",
|
|
57
57
|
"@babel/preset-react": "^7.16.7",
|
|
58
58
|
"@bigbinary/neeto-commons-frontend": "latest",
|
|
59
|
-
"@bigbinary/neeto-
|
|
60
|
-
"@bigbinary/
|
|
59
|
+
"@bigbinary/neeto-editor": "1.23.3",
|
|
60
|
+
"@bigbinary/neeto-icons": "^1.9.15",
|
|
61
|
+
"@bigbinary/neetoui": "4.4.3",
|
|
61
62
|
"@honeybadger-io/react": "2.0.1",
|
|
62
63
|
"@rollup/plugin-alias": "^3.1.9",
|
|
63
64
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -135,8 +136,8 @@
|
|
|
135
136
|
"dependencies": {},
|
|
136
137
|
"peerDependencies": {
|
|
137
138
|
"@bigbinary/neeto-commons-frontend": "latest",
|
|
138
|
-
"@bigbinary/neeto-icons": "^1.9.
|
|
139
|
-
"@bigbinary/neetoui": "^4.
|
|
139
|
+
"@bigbinary/neeto-icons": "^1.9.15",
|
|
140
|
+
"@bigbinary/neetoui": "^4.4.3",
|
|
140
141
|
"@honeybadger-io/react": "2.0.1",
|
|
141
142
|
"@svgr/webpack": "^6.5.1",
|
|
142
143
|
"antd": "4.18.7",
|