@wix/headless-restaurants-olo 0.0.35 → 0.0.36
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.
|
@@ -2,10 +2,7 @@ import { EntitiesDayOfWeek as DayOfWeek, } from '@wix/auto_sdk_restaurants_fulfi
|
|
|
2
2
|
import { i18n, settings } from '@wix/essentials';
|
|
3
3
|
// Re-export types for convenience
|
|
4
4
|
export { DayOfWeek };
|
|
5
|
-
const dateConfig = {
|
|
6
|
-
timezone: settings.getTimezone(),
|
|
7
|
-
locale: i18n.getLocale(),
|
|
8
|
-
};
|
|
5
|
+
const dateConfig = {};
|
|
9
6
|
/**
|
|
10
7
|
* Get the current locale
|
|
11
8
|
* Uses the configured locale, falls back to i18n.getLocale()
|
|
@@ -13,6 +10,9 @@ const dateConfig = {
|
|
|
13
10
|
* @returns The current locale string
|
|
14
11
|
*/
|
|
15
12
|
export const getLocale = () => {
|
|
13
|
+
if (!dateConfig.locale) {
|
|
14
|
+
dateConfig.locale = i18n.getLocale();
|
|
15
|
+
}
|
|
16
16
|
return dateConfig.locale;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
@@ -22,6 +22,9 @@ export const getLocale = () => {
|
|
|
22
22
|
* @returns The current timezone string or undefined
|
|
23
23
|
*/
|
|
24
24
|
export const getTimezone = () => {
|
|
25
|
+
if (!dateConfig.timezone) {
|
|
26
|
+
dateConfig.timezone = settings.getTimezone();
|
|
27
|
+
}
|
|
25
28
|
return dateConfig.timezone;
|
|
26
29
|
};
|
|
27
30
|
/**
|
package/dist/utils/date-utils.js
CHANGED
|
@@ -2,10 +2,7 @@ import { EntitiesDayOfWeek as DayOfWeek, } from '@wix/auto_sdk_restaurants_fulfi
|
|
|
2
2
|
import { i18n, settings } from '@wix/essentials';
|
|
3
3
|
// Re-export types for convenience
|
|
4
4
|
export { DayOfWeek };
|
|
5
|
-
const dateConfig = {
|
|
6
|
-
timezone: settings.getTimezone(),
|
|
7
|
-
locale: i18n.getLocale(),
|
|
8
|
-
};
|
|
5
|
+
const dateConfig = {};
|
|
9
6
|
/**
|
|
10
7
|
* Get the current locale
|
|
11
8
|
* Uses the configured locale, falls back to i18n.getLocale()
|
|
@@ -13,6 +10,9 @@ const dateConfig = {
|
|
|
13
10
|
* @returns The current locale string
|
|
14
11
|
*/
|
|
15
12
|
export const getLocale = () => {
|
|
13
|
+
if (!dateConfig.locale) {
|
|
14
|
+
dateConfig.locale = i18n.getLocale();
|
|
15
|
+
}
|
|
16
16
|
return dateConfig.locale;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
@@ -22,6 +22,9 @@ export const getLocale = () => {
|
|
|
22
22
|
* @returns The current timezone string or undefined
|
|
23
23
|
*/
|
|
24
24
|
export const getTimezone = () => {
|
|
25
|
+
if (!dateConfig.timezone) {
|
|
26
|
+
dateConfig.timezone = settings.getTimezone();
|
|
27
|
+
}
|
|
25
28
|
return dateConfig.timezone;
|
|
26
29
|
};
|
|
27
30
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-restaurants-olo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.36",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"groupId": "com.wixpress.headless-components"
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
"falconPackageHash": "
|
|
80
|
+
"falconPackageHash": "b9de67bb1e314822c9e98cb5ea99e73f213afdea93a81a94339a628e"
|
|
81
81
|
}
|