@bigbinary/neeto-commons-frontend 2.0.14 → 2.0.16
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 -1
- package/initializers.cjs.js +83 -6
- package/initializers.js +83 -6
- package/package.json +1 -1
- package/pure.cjs.js +4 -0
- package/pure.d.ts +3 -0
- package/pure.js +4 -2
- package/react-utils.cjs.js +81235 -79706
- package/react-utils.d.ts +18 -0
- package/react-utils.js +81028 -79505
- package/utils.cjs.js +7 -0
- package/utils.d.ts +5 -0
- package/utils.js +7 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ The commons frontend library for Neeto Applications.
|
|
|
7
7
|
Install from npm:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
yarn add "@bigbinary/neeto-commons-frontend@2.0.
|
|
10
|
+
yarn add "@bigbinary/neeto-commons-frontend@2.0.16"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This package relies on the host project's tailwind configuration. So add
|
package/initializers.cjs.js
CHANGED
|
@@ -414,10 +414,28 @@ var neetoCommons = {
|
|
|
414
414
|
common: {
|
|
415
415
|
actions: {
|
|
416
416
|
cancel: "Cancel",
|
|
417
|
-
save: "Save"
|
|
417
|
+
save: "Save",
|
|
418
|
+
edit: "Edit",
|
|
419
|
+
"delete": "Delete",
|
|
420
|
+
add: "Add {{entity}}",
|
|
421
|
+
reset: "Reset",
|
|
422
|
+
saveChanges: "Save changes"
|
|
418
423
|
},
|
|
419
424
|
andSentence: "{{first}} {{and}} {{last}}",
|
|
420
|
-
and: "and"
|
|
425
|
+
and: "and",
|
|
426
|
+
name: "name",
|
|
427
|
+
value: "value",
|
|
428
|
+
search: "Search {{entity}}",
|
|
429
|
+
notFound: {
|
|
430
|
+
desc: "We couldn't find any {{entity}}. Try creating one.",
|
|
431
|
+
title: "No {{entity}} found"
|
|
432
|
+
},
|
|
433
|
+
status: "status",
|
|
434
|
+
deleteAlert: {
|
|
435
|
+
title: "Delete {{entity}}?",
|
|
436
|
+
yes: "Yes, delete",
|
|
437
|
+
no: "No, cancel"
|
|
438
|
+
}
|
|
421
439
|
},
|
|
422
440
|
toastr: {
|
|
423
441
|
success: {
|
|
@@ -436,11 +454,13 @@ var neetoCommons = {
|
|
|
436
454
|
snippet: {
|
|
437
455
|
copied: "Copied to clipboard!",
|
|
438
456
|
copy: "Copy",
|
|
439
|
-
sendViaEmail: "Send
|
|
457
|
+
sendViaEmail: "Send via email",
|
|
440
458
|
disabledError: "Please enable atleast 1 widget."
|
|
441
459
|
},
|
|
442
460
|
instructions: {
|
|
443
|
-
placement: "Place the embed code in your HTML file. This will embed <fontBold>{{selectedWidgets}}</fontBold> in your website."
|
|
461
|
+
placement: "Place the embed code in your HTML file. This will embed <fontBold>{{selectedWidgets}}</fontBold> in your website.",
|
|
462
|
+
userIdentity: "Specify user identity information. This information is used to classify neetoChat conversations and neetoReplay sessions.",
|
|
463
|
+
sessionContext: "Save contextual data for the neetoReplay sessions. Sessions can be filtered by this data."
|
|
444
464
|
}
|
|
445
465
|
},
|
|
446
466
|
email: {
|
|
@@ -453,15 +473,72 @@ var neetoCommons = {
|
|
|
453
473
|
},
|
|
454
474
|
subject: {
|
|
455
475
|
label: "Subject",
|
|
456
|
-
|
|
476
|
+
values: {
|
|
477
|
+
embedCode: "neetoWidget script for installing {{selectedWidgets}}",
|
|
478
|
+
userIdentity: "neetoWidget user identity object to specify user details",
|
|
479
|
+
sessionContext: "neetoReplay session context object to save contextual information"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
body: {
|
|
484
|
+
values: {
|
|
485
|
+
embedCode: "Hey there. We're going to use {{selectedWidgets}} on our website and I was hoping you could help us with the installation steps. Please find the code snippet for widget installation attached below. You can find the documentation at - {{neetoKbUrl}}.",
|
|
486
|
+
userIdentity: "Hey there. This is the object structure that you can use to specify the user identity for neetoWidget. You can find the documentation at - {{userIdentityKbUrl}}.",
|
|
487
|
+
sessionContext: "Hey there. This is the object structure that you can use to specify the contextual values for neetoReplay sessions. You can find the documentation at - {{sessionContextKbUrl}}."
|
|
457
488
|
}
|
|
458
489
|
},
|
|
459
|
-
body: "Hey there, We're going to use {{selectedWidgets}} on our website and I was hoping you could help us with the installation steps. Please find the code snippet for widget installation attached below.",
|
|
460
490
|
actions: {
|
|
461
491
|
send: "Send",
|
|
462
492
|
cancel: "Cancel"
|
|
463
493
|
}
|
|
464
494
|
}
|
|
495
|
+
},
|
|
496
|
+
customDomain: {
|
|
497
|
+
customDomain_one: "custom domain",
|
|
498
|
+
customDomain_other: "custom domains",
|
|
499
|
+
customDomainWithCount_one: "{{count}} custom domain",
|
|
500
|
+
customDomainWithCount_other: "{{count}} custom domains",
|
|
501
|
+
placeholder: "Type domain here...",
|
|
502
|
+
validation: {
|
|
503
|
+
buttonLabel: "Validate domain",
|
|
504
|
+
desc: {
|
|
505
|
+
txt: "Please add following {{record}} record in your domain’s DNS dashboard and then request for domain validation.",
|
|
506
|
+
cname: "Please add following {{record}} record in your domain’s DNS dashboard."
|
|
507
|
+
},
|
|
508
|
+
record: "{{record}} record {{type}}"
|
|
509
|
+
},
|
|
510
|
+
alertMessage: "You're about to delete the custom domain <strong>{{hostname}}</strong>. This action will permanently delete the domain and <strong>{{hostname}}</strong> will no longer point to your default domain.",
|
|
511
|
+
formikValidation: {
|
|
512
|
+
required: "Custom domain is required",
|
|
513
|
+
valid: "Please add valid custom domain"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
schedule: {
|
|
517
|
+
weeklyHours: "Weekly hours",
|
|
518
|
+
unavailable: "Unavailable",
|
|
519
|
+
startTime: "Start time",
|
|
520
|
+
endTime: "End time",
|
|
521
|
+
copySchedule: "Copy schedule to..",
|
|
522
|
+
copyScheduleTooltip: "Copy this schedule to another day",
|
|
523
|
+
addNewPeriod: "Add new period",
|
|
524
|
+
days: {
|
|
525
|
+
monday: "Monday",
|
|
526
|
+
tuesday: "Tuesday",
|
|
527
|
+
wednesday: "Wednesday",
|
|
528
|
+
thursday: "Thursday",
|
|
529
|
+
friday: "Friday",
|
|
530
|
+
saturday: "Saturday",
|
|
531
|
+
sunday: "Sunday"
|
|
532
|
+
},
|
|
533
|
+
errors: {
|
|
534
|
+
period: {
|
|
535
|
+
startTime: "Start time is required",
|
|
536
|
+
endTime: "End time is required",
|
|
537
|
+
isBehind: "Period's end time must not be before the start time",
|
|
538
|
+
overlap: "This period is overlapping with ({{ start }}-{{ end }})",
|
|
539
|
+
sameTime: "Periods start and end time cannot be same"
|
|
540
|
+
}
|
|
541
|
+
}
|
|
465
542
|
}
|
|
466
543
|
};
|
|
467
544
|
var en = {
|
package/initializers.js
CHANGED
|
@@ -403,10 +403,28 @@ var neetoCommons = {
|
|
|
403
403
|
common: {
|
|
404
404
|
actions: {
|
|
405
405
|
cancel: "Cancel",
|
|
406
|
-
save: "Save"
|
|
406
|
+
save: "Save",
|
|
407
|
+
edit: "Edit",
|
|
408
|
+
"delete": "Delete",
|
|
409
|
+
add: "Add {{entity}}",
|
|
410
|
+
reset: "Reset",
|
|
411
|
+
saveChanges: "Save changes"
|
|
407
412
|
},
|
|
408
413
|
andSentence: "{{first}} {{and}} {{last}}",
|
|
409
|
-
and: "and"
|
|
414
|
+
and: "and",
|
|
415
|
+
name: "name",
|
|
416
|
+
value: "value",
|
|
417
|
+
search: "Search {{entity}}",
|
|
418
|
+
notFound: {
|
|
419
|
+
desc: "We couldn't find any {{entity}}. Try creating one.",
|
|
420
|
+
title: "No {{entity}} found"
|
|
421
|
+
},
|
|
422
|
+
status: "status",
|
|
423
|
+
deleteAlert: {
|
|
424
|
+
title: "Delete {{entity}}?",
|
|
425
|
+
yes: "Yes, delete",
|
|
426
|
+
no: "No, cancel"
|
|
427
|
+
}
|
|
410
428
|
},
|
|
411
429
|
toastr: {
|
|
412
430
|
success: {
|
|
@@ -425,11 +443,13 @@ var neetoCommons = {
|
|
|
425
443
|
snippet: {
|
|
426
444
|
copied: "Copied to clipboard!",
|
|
427
445
|
copy: "Copy",
|
|
428
|
-
sendViaEmail: "Send
|
|
446
|
+
sendViaEmail: "Send via email",
|
|
429
447
|
disabledError: "Please enable atleast 1 widget."
|
|
430
448
|
},
|
|
431
449
|
instructions: {
|
|
432
|
-
placement: "Place the embed code in your HTML file. This will embed <fontBold>{{selectedWidgets}}</fontBold> in your website."
|
|
450
|
+
placement: "Place the embed code in your HTML file. This will embed <fontBold>{{selectedWidgets}}</fontBold> in your website.",
|
|
451
|
+
userIdentity: "Specify user identity information. This information is used to classify neetoChat conversations and neetoReplay sessions.",
|
|
452
|
+
sessionContext: "Save contextual data for the neetoReplay sessions. Sessions can be filtered by this data."
|
|
433
453
|
}
|
|
434
454
|
},
|
|
435
455
|
email: {
|
|
@@ -442,15 +462,72 @@ var neetoCommons = {
|
|
|
442
462
|
},
|
|
443
463
|
subject: {
|
|
444
464
|
label: "Subject",
|
|
445
|
-
|
|
465
|
+
values: {
|
|
466
|
+
embedCode: "neetoWidget script for installing {{selectedWidgets}}",
|
|
467
|
+
userIdentity: "neetoWidget user identity object to specify user details",
|
|
468
|
+
sessionContext: "neetoReplay session context object to save contextual information"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
body: {
|
|
473
|
+
values: {
|
|
474
|
+
embedCode: "Hey there. We're going to use {{selectedWidgets}} on our website and I was hoping you could help us with the installation steps. Please find the code snippet for widget installation attached below. You can find the documentation at - {{neetoKbUrl}}.",
|
|
475
|
+
userIdentity: "Hey there. This is the object structure that you can use to specify the user identity for neetoWidget. You can find the documentation at - {{userIdentityKbUrl}}.",
|
|
476
|
+
sessionContext: "Hey there. This is the object structure that you can use to specify the contextual values for neetoReplay sessions. You can find the documentation at - {{sessionContextKbUrl}}."
|
|
446
477
|
}
|
|
447
478
|
},
|
|
448
|
-
body: "Hey there, We're going to use {{selectedWidgets}} on our website and I was hoping you could help us with the installation steps. Please find the code snippet for widget installation attached below.",
|
|
449
479
|
actions: {
|
|
450
480
|
send: "Send",
|
|
451
481
|
cancel: "Cancel"
|
|
452
482
|
}
|
|
453
483
|
}
|
|
484
|
+
},
|
|
485
|
+
customDomain: {
|
|
486
|
+
customDomain_one: "custom domain",
|
|
487
|
+
customDomain_other: "custom domains",
|
|
488
|
+
customDomainWithCount_one: "{{count}} custom domain",
|
|
489
|
+
customDomainWithCount_other: "{{count}} custom domains",
|
|
490
|
+
placeholder: "Type domain here...",
|
|
491
|
+
validation: {
|
|
492
|
+
buttonLabel: "Validate domain",
|
|
493
|
+
desc: {
|
|
494
|
+
txt: "Please add following {{record}} record in your domain’s DNS dashboard and then request for domain validation.",
|
|
495
|
+
cname: "Please add following {{record}} record in your domain’s DNS dashboard."
|
|
496
|
+
},
|
|
497
|
+
record: "{{record}} record {{type}}"
|
|
498
|
+
},
|
|
499
|
+
alertMessage: "You're about to delete the custom domain <strong>{{hostname}}</strong>. This action will permanently delete the domain and <strong>{{hostname}}</strong> will no longer point to your default domain.",
|
|
500
|
+
formikValidation: {
|
|
501
|
+
required: "Custom domain is required",
|
|
502
|
+
valid: "Please add valid custom domain"
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
schedule: {
|
|
506
|
+
weeklyHours: "Weekly hours",
|
|
507
|
+
unavailable: "Unavailable",
|
|
508
|
+
startTime: "Start time",
|
|
509
|
+
endTime: "End time",
|
|
510
|
+
copySchedule: "Copy schedule to..",
|
|
511
|
+
copyScheduleTooltip: "Copy this schedule to another day",
|
|
512
|
+
addNewPeriod: "Add new period",
|
|
513
|
+
days: {
|
|
514
|
+
monday: "Monday",
|
|
515
|
+
tuesday: "Tuesday",
|
|
516
|
+
wednesday: "Wednesday",
|
|
517
|
+
thursday: "Thursday",
|
|
518
|
+
friday: "Friday",
|
|
519
|
+
saturday: "Saturday",
|
|
520
|
+
sunday: "Sunday"
|
|
521
|
+
},
|
|
522
|
+
errors: {
|
|
523
|
+
period: {
|
|
524
|
+
startTime: "Start time is required",
|
|
525
|
+
endTime: "End time is required",
|
|
526
|
+
isBehind: "Period's end time must not be before the start time",
|
|
527
|
+
overlap: "This period is overlapping with ({{ start }}-{{ end }})",
|
|
528
|
+
sameTime: "Periods start and end time cannot be same"
|
|
529
|
+
}
|
|
530
|
+
}
|
|
454
531
|
}
|
|
455
532
|
};
|
|
456
533
|
var en = {
|
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.16",
|
|
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>",
|
package/pure.cjs.js
CHANGED
|
@@ -133,6 +133,8 @@ var notEquals = /*#__PURE__*/ramda.curry(function (x, y) {
|
|
|
133
133
|
return x !== y;
|
|
134
134
|
});
|
|
135
135
|
var isNot = notEquals;
|
|
136
|
+
var isNotPresent = /*#__PURE__*/ramda.either(ramda.isNil, ramda.isEmpty);
|
|
137
|
+
var isPresent = /*#__PURE__*/ramda.complement(isNotPresent);
|
|
136
138
|
var notEqualsDeep = /*#__PURE__*/ramda.complement(ramda.equals);
|
|
137
139
|
var isNotEqualDeep = notEqualsDeep;
|
|
138
140
|
|
|
@@ -465,6 +467,8 @@ exports.isNot = isNot;
|
|
|
465
467
|
exports.isNotEmpty = isNotEmpty;
|
|
466
468
|
exports.isNotEqualDeep = isNotEqualDeep;
|
|
467
469
|
exports.isNotNil = isNotNil;
|
|
470
|
+
exports.isNotPresent = isNotPresent;
|
|
471
|
+
exports.isPresent = isPresent;
|
|
468
472
|
exports.keysToCamelCase = keysToCamelCase;
|
|
469
473
|
exports.keysToSnakeCase = keysToSnakeCase;
|
|
470
474
|
exports.matches = matches;
|
package/pure.d.ts
CHANGED
|
@@ -340,3 +340,6 @@ export function truncate(string: NilOr<string>, length: number): NilOr<string>;
|
|
|
340
340
|
export function nullSafe<T extends Function>(
|
|
341
341
|
func: T
|
|
342
342
|
): (...args: any) => ReturnType<T>;
|
|
343
|
+
|
|
344
|
+
export function isNotPresent(object: any): boolean;
|
|
345
|
+
export function isPresent(object: any): boolean;
|
package/pure.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { curryN, isNil, complement, isEmpty, curry, equals, concat, slice, findLast, findLastIndex, count, fromPairs, toPairs, path } from 'ramda';
|
|
1
|
+
import { curryN, isNil, complement, isEmpty, curry, either, equals, concat, slice, findLast, findLastIndex, count, fromPairs, toPairs, path } from 'ramda';
|
|
2
2
|
|
|
3
3
|
function _arrayWithHoles(arr) {
|
|
4
4
|
if (Array.isArray(arr)) return arr;
|
|
@@ -129,6 +129,8 @@ var notEquals = /*#__PURE__*/curry(function (x, y) {
|
|
|
129
129
|
return x !== y;
|
|
130
130
|
});
|
|
131
131
|
var isNot = notEquals;
|
|
132
|
+
var isNotPresent = /*#__PURE__*/either(isNil, isEmpty);
|
|
133
|
+
var isPresent = /*#__PURE__*/complement(isNotPresent);
|
|
132
134
|
var notEqualsDeep = /*#__PURE__*/complement(equals);
|
|
133
135
|
var isNotEqualDeep = notEqualsDeep;
|
|
134
136
|
|
|
@@ -412,4 +414,4 @@ var _copyKeys = /*#__PURE__*/nullSafe(copyKeys);
|
|
|
412
414
|
var _renameKeys = /*#__PURE__*/nullSafe(renameKeys);
|
|
413
415
|
var _copyKeysDeep = /*#__PURE__*/nullSafe(copyKeysDeep);
|
|
414
416
|
|
|
415
|
-
export { _camelToSnakeCase, _capitalize, _copyKeys, _copyKeysDeep, _countBy, _existsBy, _existsById, _filterBy, _filterNonNull, _findBy, _findById, _findIndexBy, _findIndexById, _findLastBy, _findLastIndexBy, _humanize, _modifyBy, _modifyById, _removeBy, _removeById, _renameKeys, _replaceBy, _replaceById, _slugify, _snakeToCamelCase, _truncate, camelToSnakeCase, capitalize, copyKeys, copyKeysDeep, countBy, deepFreezeObject, dynamicArray, existsBy, existsById, filterBy, filterNonNull, findBy, findById, findIndexBy, findIndexById, findLastBy, findLastIndexBy, getRandomInt, humanize, isNot, isNotEmpty, isNotEqualDeep, isNotNil, keysToCamelCase, keysToSnakeCase, matches, modifyBy, modifyById, noop, notEquals, notEqualsDeep, nullSafe, preprocessForSerialization, randomPick, removeBy, removeById, renameKeys, replaceBy, replaceById, serializeKeysToSnakeCase, slugify, snakeToCamelCase, toLabelAndValue, transformObjectDeep, truncate };
|
|
417
|
+
export { _camelToSnakeCase, _capitalize, _copyKeys, _copyKeysDeep, _countBy, _existsBy, _existsById, _filterBy, _filterNonNull, _findBy, _findById, _findIndexBy, _findIndexById, _findLastBy, _findLastIndexBy, _humanize, _modifyBy, _modifyById, _removeBy, _removeById, _renameKeys, _replaceBy, _replaceById, _slugify, _snakeToCamelCase, _truncate, camelToSnakeCase, capitalize, copyKeys, copyKeysDeep, countBy, deepFreezeObject, dynamicArray, existsBy, existsById, filterBy, filterNonNull, findBy, findById, findIndexBy, findIndexById, findLastBy, findLastIndexBy, getRandomInt, humanize, isNot, isNotEmpty, isNotEqualDeep, isNotNil, isNotPresent, isPresent, keysToCamelCase, keysToSnakeCase, matches, modifyBy, modifyById, noop, notEquals, notEqualsDeep, nullSafe, preprocessForSerialization, randomPick, removeBy, removeById, renameKeys, replaceBy, replaceById, serializeKeysToSnakeCase, slugify, snakeToCamelCase, toLabelAndValue, transformObjectDeep, truncate };
|