@bigbinary/neeto-commons-frontend 2.0.15 → 2.0.17
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 +67 -2
- package/initializers.js +67 -2
- package/package.json +3 -3
- package/pure.cjs.js +4 -0
- package/pure.d.ts +3 -0
- package/pure.js +4 -2
- package/react-utils.cjs.js +80211 -78769
- package/react-utils.d.ts +18 -0
- package/react-utils.js +80723 -79287
- 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.17"
|
|
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: {
|
|
@@ -474,6 +492,53 @@ var neetoCommons = {
|
|
|
474
492
|
cancel: "Cancel"
|
|
475
493
|
}
|
|
476
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
|
+
}
|
|
477
542
|
}
|
|
478
543
|
};
|
|
479
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: {
|
|
@@ -463,6 +481,53 @@ var neetoCommons = {
|
|
|
463
481
|
cancel: "Cancel"
|
|
464
482
|
}
|
|
465
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
|
+
}
|
|
466
531
|
}
|
|
467
532
|
};
|
|
468
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.17",
|
|
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>",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@babel/preset-env": "^7.17.10",
|
|
48
48
|
"@babel/preset-react": "^7.16.7",
|
|
49
49
|
"@bigbinary/neeto-icons": "^1.8.35",
|
|
50
|
-
"@bigbinary/neetoui": "^4.
|
|
50
|
+
"@bigbinary/neetoui": "^4.1.1",
|
|
51
51
|
"@honeybadger-io/react": "2.0.1",
|
|
52
52
|
"@rollup/plugin-alias": "^3.1.9",
|
|
53
53
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"dependencies": {},
|
|
103
103
|
"peerDependencies": {
|
|
104
104
|
"@bigbinary/neeto-icons": "^1.8.35",
|
|
105
|
-
"@bigbinary/neetoui": "^4.
|
|
105
|
+
"@bigbinary/neetoui": "^4.1.1",
|
|
106
106
|
"@honeybadger-io/react": "2.0.1",
|
|
107
107
|
"antd": "4.18.7",
|
|
108
108
|
"axios": "^0.27.2",
|
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 };
|