@feedmepos/mf-common 1.29.35 → 1.29.36-dev.2

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.
Files changed (36) hide show
  1. package/dist/{CustomAttributesForm-ca38881a.js → CustomAttributesForm-d3091ffa.js} +1 -1
  2. package/dist/{ItemSelector-9c3692d5.js → ItemSelector-5ff6e919.js} +21791 -18283
  3. package/dist/{RestaurantSelector-350bc12f.js → RestaurantSelector-5cfbbb1d.js} +1 -1
  4. package/dist/api/index.d.ts +21 -0
  5. package/dist/api/index.d.ts.map +1 -1
  6. package/dist/{app-db99e674.js → app-176a4dba.js} +16483 -15792
  7. package/dist/app.d.ts +1 -1
  8. package/dist/app.d.ts.map +1 -1
  9. package/dist/app.js +32 -30
  10. package/dist/components/AllBusinessDialog.vue.d.ts.map +1 -1
  11. package/dist/components/FoodCourtSelectList.vue.d.ts +8 -0
  12. package/dist/components/FoodCourtSelectList.vue.d.ts.map +1 -0
  13. package/dist/components/MyFoodCourtDialog.vue.d.ts +15 -0
  14. package/dist/components/MyFoodCourtDialog.vue.d.ts.map +1 -0
  15. package/dist/components/Portal/BusinessDialogMobile.vue.d.ts.map +1 -1
  16. package/dist/components/Portal/PortalMobile.vue.d.ts.map +1 -1
  17. package/dist/components/Portal/index.vue.d.ts.map +1 -1
  18. package/dist/components/UserInfo/index.vue.d.ts.map +1 -1
  19. package/dist/composables/useContextSelector.d.ts +23 -0
  20. package/dist/composables/useContextSelector.d.ts.map +1 -0
  21. package/dist/composables/usePaginatedFoodCourts.d.ts +214 -0
  22. package/dist/composables/usePaginatedFoodCourts.d.ts.map +1 -0
  23. package/dist/i18n.d.ts +140 -0
  24. package/dist/i18n.d.ts.map +1 -1
  25. package/dist/router/context.d.ts +11 -0
  26. package/dist/router/context.d.ts.map +1 -0
  27. package/dist/router/query.d.ts.map +1 -1
  28. package/dist/store.d.ts +73 -5
  29. package/dist/store.d.ts.map +1 -1
  30. package/dist/style.css +1 -1
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/dist/utils/businessStorage.d.ts +17 -0
  33. package/dist/utils/businessStorage.d.ts.map +1 -1
  34. package/dist/utils/foodCourtMembers.d.ts +18 -0
  35. package/dist/utils/foodCourtMembers.d.ts.map +1 -0
  36. package/package.json +4 -3
package/dist/i18n.d.ts CHANGED
@@ -51,7 +51,9 @@ export declare const i18nMessages: {
51
51
  menu: {
52
52
  account: string;
53
53
  business: string;
54
+ foodCourt: string;
54
55
  myBusiness: string;
56
+ myFoodCourt: string;
55
57
  manageAccount: string;
56
58
  remy: string;
57
59
  country: {
@@ -128,6 +130,8 @@ export declare const i18nMessages: {
128
130
  businessCopySuccess: string;
129
131
  restaurantCopySuccess: string;
130
132
  loadError: string;
133
+ foodCourtLoadError: string;
134
+ foodCourtCopySuccess: string;
131
135
  };
132
136
  selectBusiness: {
133
137
  title: string;
@@ -136,10 +140,26 @@ export declare const i18nMessages: {
136
140
  noBusiness: string;
137
141
  noBusinessFound: string;
138
142
  };
143
+ selectContext: {
144
+ title: string;
145
+ tabBusiness: string;
146
+ tabFoodCourt: string;
147
+ searchFoodCourt: string;
148
+ noFoodCourtFound: string;
149
+ restaurantCount: string;
150
+ };
139
151
  myBusiness: {
140
152
  title: string;
141
153
  search_restaurants: string;
142
154
  };
155
+ myFoodCourt: {
156
+ title: string;
157
+ active: string;
158
+ invited: string;
159
+ hidden: string;
160
+ empty: string;
161
+ noRestaurantFound: string;
162
+ };
143
163
  debugUser: {
144
164
  title: string;
145
165
  subtitle: string;
@@ -271,7 +291,9 @@ export declare const i18nMessages: {
271
291
  menu: {
272
292
  account: string;
273
293
  business: string;
294
+ foodCourt: string;
274
295
  myBusiness: string;
296
+ myFoodCourt: string;
275
297
  manageAccount: string;
276
298
  remy: string;
277
299
  country: {
@@ -348,6 +370,8 @@ export declare const i18nMessages: {
348
370
  businessCopySuccess: string;
349
371
  restaurantCopySuccess: string;
350
372
  loadError: string;
373
+ foodCourtLoadError: string;
374
+ foodCourtCopySuccess: string;
351
375
  };
352
376
  selectBusiness: {
353
377
  title: string;
@@ -356,10 +380,26 @@ export declare const i18nMessages: {
356
380
  noBusiness: string;
357
381
  noBusinessFound: string;
358
382
  };
383
+ selectContext: {
384
+ title: string;
385
+ tabBusiness: string;
386
+ tabFoodCourt: string;
387
+ searchFoodCourt: string;
388
+ noFoodCourtFound: string;
389
+ restaurantCount: string;
390
+ };
359
391
  myBusiness: {
360
392
  title: string;
361
393
  search_restaurants: string;
362
394
  };
395
+ myFoodCourt: {
396
+ title: string;
397
+ active: string;
398
+ invited: string;
399
+ hidden: string;
400
+ empty: string;
401
+ noRestaurantFound: string;
402
+ };
363
403
  debugUser: {
364
404
  title: string;
365
405
  subtitle: string;
@@ -491,7 +531,9 @@ export declare const i18nMessages: {
491
531
  menu: {
492
532
  account: string;
493
533
  business: string;
534
+ foodCourt: string;
494
535
  myBusiness: string;
536
+ myFoodCourt: string;
495
537
  manageAccount: string;
496
538
  remy: string;
497
539
  country: {
@@ -568,6 +610,8 @@ export declare const i18nMessages: {
568
610
  businessCopySuccess: string;
569
611
  restaurantCopySuccess: string;
570
612
  loadError: string;
613
+ foodCourtLoadError: string;
614
+ foodCourtCopySuccess: string;
571
615
  };
572
616
  selectBusiness: {
573
617
  title: string;
@@ -576,10 +620,26 @@ export declare const i18nMessages: {
576
620
  noBusiness: string;
577
621
  noBusinessFound: string;
578
622
  };
623
+ selectContext: {
624
+ title: string;
625
+ tabBusiness: string;
626
+ tabFoodCourt: string;
627
+ searchFoodCourt: string;
628
+ noFoodCourtFound: string;
629
+ restaurantCount: string;
630
+ };
579
631
  myBusiness: {
580
632
  title: string;
581
633
  search_restaurants: string;
582
634
  };
635
+ myFoodCourt: {
636
+ title: string;
637
+ active: string;
638
+ invited: string;
639
+ hidden: string;
640
+ empty: string;
641
+ noRestaurantFound: string;
642
+ };
583
643
  debugUser: {
584
644
  title: string;
585
645
  subtitle: string;
@@ -711,7 +771,9 @@ export declare const i18nMessages: {
711
771
  menu: {
712
772
  account: string;
713
773
  business: string;
774
+ foodCourt: string;
714
775
  myBusiness: string;
776
+ myFoodCourt: string;
715
777
  manageAccount: string;
716
778
  remy: string;
717
779
  country: {
@@ -788,6 +850,8 @@ export declare const i18nMessages: {
788
850
  businessCopySuccess: string;
789
851
  restaurantCopySuccess: string;
790
852
  loadError: string;
853
+ foodCourtLoadError: string;
854
+ foodCourtCopySuccess: string;
791
855
  };
792
856
  selectBusiness: {
793
857
  title: string;
@@ -796,10 +860,26 @@ export declare const i18nMessages: {
796
860
  noBusiness: string;
797
861
  noBusinessFound: string;
798
862
  };
863
+ selectContext: {
864
+ title: string;
865
+ tabBusiness: string;
866
+ tabFoodCourt: string;
867
+ searchFoodCourt: string;
868
+ noFoodCourtFound: string;
869
+ restaurantCount: string;
870
+ };
799
871
  myBusiness: {
800
872
  title: string;
801
873
  search_restaurants: string;
802
874
  };
875
+ myFoodCourt: {
876
+ title: string;
877
+ active: string;
878
+ invited: string;
879
+ hidden: string;
880
+ empty: string;
881
+ noRestaurantFound: string;
882
+ };
803
883
  debugUser: {
804
884
  title: string;
805
885
  subtitle: string;
@@ -931,7 +1011,9 @@ export declare const i18nMessages: {
931
1011
  menu: {
932
1012
  account: string;
933
1013
  business: string;
1014
+ foodCourt: string;
934
1015
  myBusiness: string;
1016
+ myFoodCourt: string;
935
1017
  manageAccount: string;
936
1018
  remy: string;
937
1019
  country: {
@@ -1009,6 +1091,8 @@ export declare const i18nMessages: {
1009
1091
  businessCopySuccess: string;
1010
1092
  restaurantCopySuccess: string;
1011
1093
  loadError: string;
1094
+ foodCourtLoadError: string;
1095
+ foodCourtCopySuccess: string;
1012
1096
  };
1013
1097
  selectBusiness: {
1014
1098
  title: string;
@@ -1017,10 +1101,26 @@ export declare const i18nMessages: {
1017
1101
  noBusiness: string;
1018
1102
  noBusinessFound: string;
1019
1103
  };
1104
+ selectContext: {
1105
+ title: string;
1106
+ tabBusiness: string;
1107
+ tabFoodCourt: string;
1108
+ searchFoodCourt: string;
1109
+ noFoodCourtFound: string;
1110
+ restaurantCount: string;
1111
+ };
1020
1112
  myBusiness: {
1021
1113
  title: string;
1022
1114
  search_restaurants: string;
1023
1115
  };
1116
+ myFoodCourt: {
1117
+ title: string;
1118
+ active: string;
1119
+ invited: string;
1120
+ hidden: string;
1121
+ empty: string;
1122
+ noRestaurantFound: string;
1123
+ };
1024
1124
  debugUser: {
1025
1125
  title: string;
1026
1126
  subtitle: string;
@@ -1152,7 +1252,9 @@ export declare const i18nMessages: {
1152
1252
  menu: {
1153
1253
  account: string;
1154
1254
  business: string;
1255
+ foodCourt: string;
1155
1256
  myBusiness: string;
1257
+ myFoodCourt: string;
1156
1258
  manageAccount: string;
1157
1259
  remy: string;
1158
1260
  country: {
@@ -1230,6 +1332,8 @@ export declare const i18nMessages: {
1230
1332
  businessCopySuccess: string;
1231
1333
  restaurantCopySuccess: string;
1232
1334
  loadError: string;
1335
+ foodCourtLoadError: string;
1336
+ foodCourtCopySuccess: string;
1233
1337
  };
1234
1338
  selectBusiness: {
1235
1339
  title: string;
@@ -1238,10 +1342,26 @@ export declare const i18nMessages: {
1238
1342
  noBusiness: string;
1239
1343
  noBusinessFound: string;
1240
1344
  };
1345
+ selectContext: {
1346
+ title: string;
1347
+ tabBusiness: string;
1348
+ tabFoodCourt: string;
1349
+ searchFoodCourt: string;
1350
+ noFoodCourtFound: string;
1351
+ restaurantCount: string;
1352
+ };
1241
1353
  myBusiness: {
1242
1354
  title: string;
1243
1355
  search_restaurants: string;
1244
1356
  };
1357
+ myFoodCourt: {
1358
+ title: string;
1359
+ active: string;
1360
+ invited: string;
1361
+ hidden: string;
1362
+ empty: string;
1363
+ noRestaurantFound: string;
1364
+ };
1245
1365
  debugUser: {
1246
1366
  title: string;
1247
1367
  subtitle: string;
@@ -1373,7 +1493,9 @@ export declare const i18nMessages: {
1373
1493
  menu: {
1374
1494
  account: string;
1375
1495
  business: string;
1496
+ foodCourt: string;
1376
1497
  myBusiness: string;
1498
+ myFoodCourt: string;
1377
1499
  manageAccount: string;
1378
1500
  remy: string;
1379
1501
  country: {
@@ -1451,6 +1573,8 @@ export declare const i18nMessages: {
1451
1573
  businessCopySuccess: string;
1452
1574
  restaurantCopySuccess: string;
1453
1575
  loadError: string;
1576
+ foodCourtLoadError: string;
1577
+ foodCourtCopySuccess: string;
1454
1578
  };
1455
1579
  selectBusiness: {
1456
1580
  title: string;
@@ -1459,10 +1583,26 @@ export declare const i18nMessages: {
1459
1583
  noBusiness: string;
1460
1584
  noBusinessFound: string;
1461
1585
  };
1586
+ selectContext: {
1587
+ title: string;
1588
+ tabBusiness: string;
1589
+ tabFoodCourt: string;
1590
+ searchFoodCourt: string;
1591
+ noFoodCourtFound: string;
1592
+ restaurantCount: string;
1593
+ };
1462
1594
  myBusiness: {
1463
1595
  title: string;
1464
1596
  search_restaurants: string;
1465
1597
  };
1598
+ myFoodCourt: {
1599
+ title: string;
1600
+ active: string;
1601
+ invited: string;
1602
+ hidden: string;
1603
+ empty: string;
1604
+ noRestaurantFound: string;
1605
+ };
1466
1606
  debugUser: {
1467
1607
  title: string;
1468
1608
  subtitle: string;
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAyC,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAUhF,OAAO,eAAe,MAAM,kCAAkC,CAAA;AAQ9D,OAAO,EAAE,OAAO,EAAE,CAAA;AAClB,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,YAAY,EAAE,iBAAiB,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAElE,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQxB,CAAA;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,+DAW1D"}
@@ -0,0 +1,11 @@
1
+ import { type Router } from "vue-router";
2
+ /**
3
+ * Keeps navigation inside the apps the current context shows, so a bookmarked
4
+ * Menu link opened in a food court lands on the portal home instead.
5
+ *
6
+ * Once signed in, the store's context decides, since Back/Forward can rewrite the
7
+ * URL to an older context before guards run. Before sign-in has restored a
8
+ * context, it is inferred from the URL and cache instead.
9
+ */
10
+ export declare function installPortalContextGuard(router: Router): void;
11
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/router/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAKxC;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,QAMvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/router/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAMxC,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,QA0B7D"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/router/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,MAAM,EAAE,MAAM,YAAY,CAAA;AAY5D,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,QAmD7D"}
package/dist/store.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  import { type Component } from "vue";
2
2
  import { type FeedMeUser } from "@feedmepos/auth";
3
3
  import { F_COUNTRY, FdoBusiness, FdoPermissionRule, FdoRestaurant, type FdoCustomAttribute } from "@feedmepos/core/entity";
4
+ import type { FdoFoodCourtV2 } from "@feedmepos/entity/ordering";
4
5
  import { useI18n } from "@feedmepos/i18n";
5
6
  import type { Breakpoints } from "@feedmepos/ui-library/dist/composables/useBreakpoints";
6
7
  import { pushDataLayer } from "@feedmepos/vue-client-monitoring";
7
8
  import { type PublicSettingApi } from "./api";
9
+ import { type PortalContextType } from "./utils/businessStorage";
10
+ export type { PortalContextType };
8
11
  export declare const MENU_MODE: {
9
12
  readonly businessLevel: "businessLevel";
10
13
  readonly restaurantLevel: "restaurantLevel";
@@ -20,6 +23,10 @@ export interface FmpBusiness extends FdoBusiness {
20
23
  export interface FmpRestaurant extends FdoRestaurant {
21
24
  managable: boolean;
22
25
  }
26
+ /** A food court: a top-level context beside business, owning no restaurants of its own. */
27
+ export interface FmpFoodCourt extends FdoFoodCourtV2 {
28
+ id: string;
29
+ }
23
30
  export declare class FmpUser {
24
31
  id: string;
25
32
  email?: string | null;
@@ -62,6 +69,8 @@ export interface PortalApp {
62
69
  breakpoints?: Breakpoints[];
63
70
  hasPlatformLevelNavigation: boolean;
64
71
  external?: boolean;
72
+ /** Contexts the app is available in; every context when omitted. */
73
+ contexts?: PortalContextType[];
65
74
  }
66
75
  export interface AdConfig {
67
76
  imageUrl: string;
@@ -72,6 +81,24 @@ export interface PortalAdConfig {
72
81
  tablet?: AdConfig;
73
82
  mobile?: AdConfig;
74
83
  }
84
+ /**
85
+ * Every portal app, regardless of context. Use `getApps` from the store for the
86
+ * apps the current context shows.
87
+ */
88
+ export declare function buildPortalApps(_t?: ReturnType<typeof useI18n>["t"]): PortalApp[];
89
+ export declare function isAppInContext(app: PortalApp, context: PortalContextType): boolean;
90
+ export interface ActiveContext {
91
+ type: PortalContextType;
92
+ foodCourtId?: string;
93
+ }
94
+ /**
95
+ * The signed-in user's current context as the store holds it, or undefined until
96
+ * sign-in has restored one. Navigation guards trust this over the URL, which
97
+ * browser history can rewrite to an older context.
98
+ */
99
+ export declare function getActiveContext(): ActiveContext | undefined;
100
+ /** Whether a route path belongs to an app the given context shows. */
101
+ export declare function isPathAvailableInContext(path: string, context: PortalContextType): boolean;
75
102
  export declare const useCoreStore: () => {
76
103
  sessionUser: import("vue").Ref<{
77
104
  id: string;
@@ -293,6 +320,8 @@ export declare const useCoreStore: () => {
293
320
  menuVersion: string;
294
321
  }[]>;
295
322
  currentBusiness: import("vue").Ref<FmpBusiness | undefined, FmpBusiness | undefined>;
323
+ foodCourtTotal: import("vue").Ref<number, number>;
324
+ currentFoodCourt: import("vue").Ref<FmpFoodCourt | undefined, FmpFoodCourt | undefined>;
296
325
  restaurants: import("vue").Ref<{
297
326
  managable: boolean;
298
327
  channel?: string | null | undefined;
@@ -1178,6 +1207,7 @@ export declare const useCoreStore: () => {
1178
1207
  };
1179
1208
  } | null>;
1180
1209
  isRestaurantLevelMenu: import("vue").ComputedRef<boolean>;
1210
+ currentContextType: import("vue").ComputedRef<PortalContextType>;
1181
1211
  currentRestaurantSetting: import("vue").ComputedRef<{
1182
1212
  customAttributes?: Record<string, any> | null | undefined;
1183
1213
  takeaway?: {
@@ -1610,6 +1640,8 @@ export declare const useCoreStore: () => {
1610
1640
  menuVersion: string;
1611
1641
  }[];
1612
1642
  currentBusiness: FmpBusiness | undefined;
1643
+ foodCourtTotal: number;
1644
+ currentFoodCourt: FmpFoodCourt | undefined;
1613
1645
  restaurants: {
1614
1646
  managable: boolean;
1615
1647
  channel?: string | null | undefined;
@@ -2291,6 +2323,11 @@ export declare const useCoreStore: () => {
2291
2323
  readBusinesses: (forceUpdate?: boolean) => Promise<FmpBusiness | undefined>;
2292
2324
  setCachedBusiness: (id: string) => void;
2293
2325
  changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
2326
+ foodCourtTotal: import("vue").Ref<number, number>;
2327
+ currentFoodCourt: import("vue").Ref<FmpFoodCourt | undefined, FmpFoodCourt | undefined>;
2328
+ currentContextType: import("vue").ComputedRef<PortalContextType>;
2329
+ refreshFoodCourtTotal: () => Promise<number>;
2330
+ setCachedFoodCourt: (id: string) => void;
2294
2331
  restaurants: import("vue").Ref<{
2295
2332
  managable: boolean;
2296
2333
  channel?: string | null | undefined;
@@ -3859,7 +3896,7 @@ export declare const useCoreStore: () => {
3859
3896
  remyEnabled: import("vue").ComputedRef<boolean>;
3860
3897
  registerOnRemyClicked: (callback: () => void) => void;
3861
3898
  triggerRemyClicked: () => void;
3862
- }, "sessionUser" | "namespace" | "enabledCountries" | "currentCountry" | "businesses" | "currentBusiness" | "restaurants" | "currentRestaurant" | "selectedApp" | "hideSidebar" | "sidebarComponent" | "moduleHeaderComponent" | "isEmbedded" | "publicSetting">>;
3899
+ }, "sessionUser" | "namespace" | "enabledCountries" | "currentCountry" | "businesses" | "currentBusiness" | "foodCourtTotal" | "currentFoodCourt" | "restaurants" | "currentRestaurant" | "selectedApp" | "hideSidebar" | "sidebarComponent" | "moduleHeaderComponent" | "isEmbedded" | "publicSetting">>;
3863
3900
  $patch(partialState: import("pinia")._DeepPartial<{
3864
3901
  sessionUser: {
3865
3902
  id: string;
@@ -3974,6 +4011,8 @@ export declare const useCoreStore: () => {
3974
4011
  menuVersion: string;
3975
4012
  }[];
3976
4013
  currentBusiness: FmpBusiness | undefined;
4014
+ foodCourtTotal: number;
4015
+ currentFoodCourt: FmpFoodCourt | undefined;
3977
4016
  restaurants: {
3978
4017
  managable: boolean;
3979
4018
  channel?: string | null | undefined;
@@ -4535,6 +4574,8 @@ export declare const useCoreStore: () => {
4535
4574
  menuVersion: string;
4536
4575
  }[];
4537
4576
  currentBusiness: FmpBusiness | undefined;
4577
+ foodCourtTotal: number;
4578
+ currentFoodCourt: FmpFoodCourt | undefined;
4538
4579
  restaurants: {
4539
4580
  managable: boolean;
4540
4581
  channel?: string | null | undefined;
@@ -5218,6 +5259,11 @@ export declare const useCoreStore: () => {
5218
5259
  readBusinesses: (forceUpdate?: boolean) => Promise<FmpBusiness | undefined>;
5219
5260
  setCachedBusiness: (id: string) => void;
5220
5261
  changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
5262
+ foodCourtTotal: import("vue").Ref<number, number>;
5263
+ currentFoodCourt: import("vue").Ref<FmpFoodCourt | undefined, FmpFoodCourt | undefined>;
5264
+ currentContextType: import("vue").ComputedRef<PortalContextType>;
5265
+ refreshFoodCourtTotal: () => Promise<number>;
5266
+ setCachedFoodCourt: (id: string) => void;
5221
5267
  restaurants: import("vue").Ref<{
5222
5268
  managable: boolean;
5223
5269
  channel?: string | null | undefined;
@@ -6786,7 +6832,7 @@ export declare const useCoreStore: () => {
6786
6832
  remyEnabled: import("vue").ComputedRef<boolean>;
6787
6833
  registerOnRemyClicked: (callback: () => void) => void;
6788
6834
  triggerRemyClicked: () => void;
6789
- }, "sessionUser" | "namespace" | "enabledCountries" | "currentCountry" | "businesses" | "currentBusiness" | "restaurants" | "currentRestaurant" | "selectedApp" | "hideSidebar" | "sidebarComponent" | "moduleHeaderComponent" | "isEmbedded" | "publicSetting">>, options?: ({
6835
+ }, "sessionUser" | "namespace" | "enabledCountries" | "currentCountry" | "businesses" | "currentBusiness" | "foodCourtTotal" | "currentFoodCourt" | "restaurants" | "currentRestaurant" | "selectedApp" | "hideSidebar" | "sidebarComponent" | "moduleHeaderComponent" | "isEmbedded" | "publicSetting">>, options?: ({
6790
6836
  detached?: boolean | undefined;
6791
6837
  } & import("vue").WatchOptions<boolean>) | undefined): () => void;
6792
6838
  $onAction(callback: import("pinia").StoreOnActionListener<"portal-core", Pick<{
@@ -7024,6 +7070,11 @@ export declare const useCoreStore: () => {
7024
7070
  readBusinesses: (forceUpdate?: boolean) => Promise<FmpBusiness | undefined>;
7025
7071
  setCachedBusiness: (id: string) => void;
7026
7072
  changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
7073
+ foodCourtTotal: import("vue").Ref<number, number>;
7074
+ currentFoodCourt: import("vue").Ref<FmpFoodCourt | undefined, FmpFoodCourt | undefined>;
7075
+ currentContextType: import("vue").ComputedRef<PortalContextType>;
7076
+ refreshFoodCourtTotal: () => Promise<number>;
7077
+ setCachedFoodCourt: (id: string) => void;
7027
7078
  restaurants: import("vue").Ref<{
7028
7079
  managable: boolean;
7029
7080
  channel?: string | null | undefined;
@@ -8592,7 +8643,7 @@ export declare const useCoreStore: () => {
8592
8643
  remyEnabled: import("vue").ComputedRef<boolean>;
8593
8644
  registerOnRemyClicked: (callback: () => void) => void;
8594
8645
  triggerRemyClicked: () => void;
8595
- }, "sessionUser" | "namespace" | "enabledCountries" | "currentCountry" | "businesses" | "currentBusiness" | "restaurants" | "currentRestaurant" | "selectedApp" | "hideSidebar" | "sidebarComponent" | "moduleHeaderComponent" | "isEmbedded" | "publicSetting">, Pick<{
8646
+ }, "sessionUser" | "namespace" | "enabledCountries" | "currentCountry" | "businesses" | "currentBusiness" | "foodCourtTotal" | "currentFoodCourt" | "restaurants" | "currentRestaurant" | "selectedApp" | "hideSidebar" | "sidebarComponent" | "moduleHeaderComponent" | "isEmbedded" | "publicSetting">, Pick<{
8596
8647
  signIn: () => Promise<void>;
8597
8648
  signInWithToken: (user: FeedMeUser, token: string) => Promise<void>;
8598
8649
  signOut: () => Promise<void>;
@@ -8827,6 +8878,11 @@ export declare const useCoreStore: () => {
8827
8878
  readBusinesses: (forceUpdate?: boolean) => Promise<FmpBusiness | undefined>;
8828
8879
  setCachedBusiness: (id: string) => void;
8829
8880
  changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
8881
+ foodCourtTotal: import("vue").Ref<number, number>;
8882
+ currentFoodCourt: import("vue").Ref<FmpFoodCourt | undefined, FmpFoodCourt | undefined>;
8883
+ currentContextType: import("vue").ComputedRef<PortalContextType>;
8884
+ refreshFoodCourtTotal: () => Promise<number>;
8885
+ setCachedFoodCourt: (id: string) => void;
8830
8886
  restaurants: import("vue").Ref<{
8831
8887
  managable: boolean;
8832
8888
  channel?: string | null | undefined;
@@ -10395,7 +10451,7 @@ export declare const useCoreStore: () => {
10395
10451
  remyEnabled: import("vue").ComputedRef<boolean>;
10396
10452
  registerOnRemyClicked: (callback: () => void) => void;
10397
10453
  triggerRemyClicked: () => void;
10398
- }, "isRestaurantLevelMenu" | "currentRestaurantSetting" | "isInternalOrAgent" | "restaurantAttributeSettings" | "itemAttributeSettings" | "groupAttributeSettings" | "remyEnabled">, Pick<{
10454
+ }, "isRestaurantLevelMenu" | "currentContextType" | "currentRestaurantSetting" | "isInternalOrAgent" | "restaurantAttributeSettings" | "itemAttributeSettings" | "groupAttributeSettings" | "remyEnabled">, Pick<{
10399
10455
  signIn: () => Promise<void>;
10400
10456
  signInWithToken: (user: FeedMeUser, token: string) => Promise<void>;
10401
10457
  signOut: () => Promise<void>;
@@ -10630,6 +10686,11 @@ export declare const useCoreStore: () => {
10630
10686
  readBusinesses: (forceUpdate?: boolean) => Promise<FmpBusiness | undefined>;
10631
10687
  setCachedBusiness: (id: string) => void;
10632
10688
  changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
10689
+ foodCourtTotal: import("vue").Ref<number, number>;
10690
+ currentFoodCourt: import("vue").Ref<FmpFoodCourt | undefined, FmpFoodCourt | undefined>;
10691
+ currentContextType: import("vue").ComputedRef<PortalContextType>;
10692
+ refreshFoodCourtTotal: () => Promise<number>;
10693
+ setCachedFoodCourt: (id: string) => void;
10633
10694
  restaurants: import("vue").Ref<{
10634
10695
  managable: boolean;
10635
10696
  channel?: string | null | undefined;
@@ -12198,7 +12259,7 @@ export declare const useCoreStore: () => {
12198
12259
  remyEnabled: import("vue").ComputedRef<boolean>;
12199
12260
  registerOnRemyClicked: (callback: () => void) => void;
12200
12261
  triggerRemyClicked: () => void;
12201
- }, "triggerRemyClicked" | "signIn" | "signInWithToken" | "signOut" | "setUser" | "fetchUserAdminPermissions" | "fetchUserPermissions" | "setNamespace" | "setEnabledCountries" | "setCachedCountry" | "changeCountry" | "readBusinesses" | "setCachedBusiness" | "changeBusiness" | "readRestaurants" | "changeRestaurant" | "getApps" | "selectApp" | "getDeveloperApps" | "hideSidebarToggle" | "registerSidebarComponent" | "registerModuleHeaderComponent" | "setEmbdded" | "setEmbedded" | "readPublicSetting" | "updateAttributeSettings" | "pushDataLayer" | "registerOnRemyClicked">>, detached?: boolean | undefined): () => void;
12262
+ }, "triggerRemyClicked" | "signIn" | "signInWithToken" | "signOut" | "setUser" | "fetchUserAdminPermissions" | "fetchUserPermissions" | "setNamespace" | "setEnabledCountries" | "setCachedCountry" | "changeCountry" | "readBusinesses" | "setCachedBusiness" | "changeBusiness" | "refreshFoodCourtTotal" | "setCachedFoodCourt" | "readRestaurants" | "changeRestaurant" | "getApps" | "selectApp" | "getDeveloperApps" | "hideSidebarToggle" | "registerSidebarComponent" | "registerModuleHeaderComponent" | "setEmbdded" | "setEmbedded" | "readPublicSetting" | "updateAttributeSettings" | "pushDataLayer" | "registerOnRemyClicked">>, detached?: boolean | undefined): () => void;
12202
12263
  $dispose(): void;
12203
12264
  $id: "portal-core";
12204
12265
  _customProperties: Set<string>;
@@ -12216,6 +12277,8 @@ export declare const useCoreStore: () => {
12216
12277
  readBusinesses: (forceUpdate?: boolean) => Promise<FmpBusiness | undefined>;
12217
12278
  setCachedBusiness: (id: string) => void;
12218
12279
  changeBusiness: (business: FmpBusiness | undefined) => Promise<void>;
12280
+ refreshFoodCourtTotal: () => Promise<number>;
12281
+ setCachedFoodCourt: (id: string) => void;
12219
12282
  readRestaurants: () => Promise<{
12220
12283
  managable: boolean;
12221
12284
  channel?: string | null | undefined;
@@ -12578,6 +12641,11 @@ export declare const useCoreStore: () => {
12578
12641
  * @param immediate config to fire callback onMounted
12579
12642
  */
12580
12643
  export declare function onBusinessChanged(callback: (currentBusiness?: FmpBusiness) => Promise<void> | void, immediate?: boolean): void;
12644
+ /**
12645
+ * @param callback fire when the food court context is entered, left or switched
12646
+ * @param immediate config to fire callback onMounted
12647
+ */
12648
+ export declare function onFoodCourtChanged(callback: (currentFoodCourt?: FmpFoodCourt) => Promise<void> | void, immediate?: boolean): void;
12581
12649
  /**
12582
12650
  * @param callback fire when restaurant changed
12583
12651
  * @param immediate config to fire callback onMounted