@capillarytech/cap-ui-utils 1.4.20 → 1.4.22
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 +6 -6
- package/utils/formatter.js +3 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/cap-ui-utils",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.22",
|
|
4
4
|
"description": "Utility functions shared accross all the modules",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
},
|
|
9
9
|
"author": "Rajshekar",
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"handlebars": "4.0.11",
|
|
12
|
+
"lodash": "4.17.11",
|
|
13
|
+
"moment-timezone": "^0.5.25",
|
|
11
14
|
"react": "^16.13.0",
|
|
12
15
|
"react-ga": "^2.7.0",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"react-intl": "2.7.2",
|
|
16
|
-
"lodash": "4.17.11",
|
|
17
|
-
"handlebars": "4.0.11"
|
|
16
|
+
"react-intl": "2.8.0",
|
|
17
|
+
"tti-polyfill": "^0.2.2"
|
|
18
18
|
}
|
|
19
19
|
}
|
package/utils/formatter.js
CHANGED
|
@@ -114,12 +114,9 @@ function truncateNumber(num, places) {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
export const getUserLocale = (currentOrgDetails) => {
|
|
117
|
-
const { basic_details } = currentOrgDetails;
|
|
118
|
-
const { base_country_code, base_language } = basic_details
|
|
119
|
-
|
|
120
|
-
return `${base_language}-${base_country_code}`;
|
|
121
|
-
// Returning en-US as default locale case
|
|
122
|
-
return "en-US";
|
|
117
|
+
const { basic_details = {} } = currentOrgDetails;
|
|
118
|
+
const { base_country_code = "US", base_language = "en" } = basic_details;
|
|
119
|
+
return `${base_language}-${base_country_code}`;
|
|
123
120
|
};
|
|
124
121
|
|
|
125
122
|
function localeBasedNumberFormatting(value, currentOrgDetails = {}) {
|