@wix/headless-restaurants-olo 0.0.35 → 0.0.37

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
  /**
@@ -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.35",
3
+ "version": "0.0.37",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -57,7 +57,7 @@
57
57
  "@wix/auto_sdk_restaurants_items": "^1.0.48",
58
58
  "@wix/ecom": "^1.0.1461",
59
59
  "@wix/essentials": "^1.0.0",
60
- "@wix/headless-components": "0.0.33",
60
+ "@wix/headless-components": "0.0.34",
61
61
  "@wix/headless-media": "0.0.18",
62
62
  "@wix/headless-restaurants-menus": "0.0.22",
63
63
  "@wix/headless-utils": "0.0.8",
@@ -77,5 +77,5 @@
77
77
  "groupId": "com.wixpress.headless-components"
78
78
  }
79
79
  },
80
- "falconPackageHash": "8fef913fc66b2bade48d7c257f0f51bb8b909775971887e2af22001c"
80
+ "falconPackageHash": "d456fa7916d8a275f05e2a7002dc02a1f7cce909a6c03ef1b6bfafa4"
81
81
  }