@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/utils.cjs.js
CHANGED
|
@@ -2774,6 +2774,12 @@ var buildUrl = function buildUrl(route, params) {
|
|
|
2774
2774
|
var queryParams = ramda.pipe(ramda.omit(placeHolders), preprocessForSerialization, lib.stringify)(params);
|
|
2775
2775
|
return ramda.isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
|
|
2776
2776
|
};
|
|
2777
|
+
var toLocale = function toLocale(number) {
|
|
2778
|
+
var _window$globalProps, _window$globalProps$u;
|
|
2779
|
+
|
|
2780
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
2781
|
+
return Number(number).toLocaleString(((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.locale) || navigator.language || navigator.languages[0], options);
|
|
2782
|
+
};
|
|
2777
2783
|
|
|
2778
2784
|
dayjs__default["default"].extend(relativeTime__default["default"]);
|
|
2779
2785
|
dayjs__default["default"].extend(updateLocale__default["default"]);
|
|
@@ -2814,4 +2820,5 @@ exports.getSubdomain = getSubdomain;
|
|
|
2814
2820
|
exports.resetAuthTokens = resetAuthTokens;
|
|
2815
2821
|
exports.simulateApiCall = simulateApiCall;
|
|
2816
2822
|
exports.timeFormat = timeFormat;
|
|
2823
|
+
exports.toLocale = toLocale;
|
|
2817
2824
|
exports.withEventTargetValue = withEventTargetValue;
|
package/utils.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -2761,6 +2761,12 @@ var buildUrl = function buildUrl(route, params) {
|
|
|
2761
2761
|
var queryParams = pipe(omit(placeHolders), preprocessForSerialization, lib.stringify)(params);
|
|
2762
2762
|
return isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
|
|
2763
2763
|
};
|
|
2764
|
+
var toLocale = function toLocale(number) {
|
|
2765
|
+
var _window$globalProps, _window$globalProps$u;
|
|
2766
|
+
|
|
2767
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
2768
|
+
return Number(number).toLocaleString(((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.locale) || navigator.language || navigator.languages[0], options);
|
|
2769
|
+
};
|
|
2764
2770
|
|
|
2765
2771
|
dayjs.extend(relativeTime);
|
|
2766
2772
|
dayjs.extend(updateLocale);
|
|
@@ -2794,4 +2800,4 @@ var timeFormat = {
|
|
|
2794
2800
|
};
|
|
2795
2801
|
var dateFormat = timeFormat;
|
|
2796
2802
|
|
|
2797
|
-
export { buildUrl, copyToClipboard, dateFormat, getSubdomain, resetAuthTokens, simulateApiCall, timeFormat, withEventTargetValue };
|
|
2803
|
+
export { buildUrl, copyToClipboard, dateFormat, getSubdomain, resetAuthTokens, simulateApiCall, timeFormat, toLocale, withEventTargetValue };
|