@orderingstack/front-hooks 6.1.0-beta.4 → 6.1.0-beta.6
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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +617 -617
- package/dist/index.es.js.map +1 -1
- package/dist/packages/hooks/dist/index.cjs.d.ts +18 -18
- package/dist/packages/hooks/dist/index.cjs.d.ts.map +1 -1
- package/dist/packages/hooks/dist/index.es.d.ts +24 -24
- package/dist/types/useAvailability.d.ts +1 -1
- package/dist/types/useAvailability.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -3,8 +3,8 @@ declare let Ct: {
|
|
|
3
3
|
getInstance(): {};
|
|
4
4
|
instance: {} | undefined;
|
|
5
5
|
};
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
6
|
+
declare function Ur(t: any): number;
|
|
7
|
+
declare function ve(t: any, e: any): any;
|
|
8
8
|
declare function gg({ product: t, state: e, selected: r, cheapestGroupOptionsProduct: n, basePrice: i, dangerouslyOverwritePrice: a }: {
|
|
9
9
|
product: any;
|
|
10
10
|
state: any;
|
|
@@ -18,7 +18,7 @@ declare function gg({ product: t, state: e, selected: r, cheapestGroupOptionsPro
|
|
|
18
18
|
calculatedPriceDefaultProductState: any;
|
|
19
19
|
calculatedChildrensBasePrice: any;
|
|
20
20
|
};
|
|
21
|
-
declare function
|
|
21
|
+
declare function Rr(t: any, e?: undefined, r?: undefined, n?: boolean): any[];
|
|
22
22
|
declare function gs(t: any, e: any, r?: string, n?: number): string;
|
|
23
23
|
declare function kg(t: any): any[] | null;
|
|
24
24
|
declare function id({ items: t, locale: e, venue: r }: {
|
|
@@ -30,20 +30,20 @@ declare function Dt(t: any, e: any): any;
|
|
|
30
30
|
declare function ad(t: any, e: any, r: any): any;
|
|
31
31
|
declare function hn(t: any, e?: number): any;
|
|
32
32
|
declare function vs(t: any): any;
|
|
33
|
-
declare function
|
|
34
|
-
declare function
|
|
33
|
+
declare function pe(t: any, e: any): any;
|
|
34
|
+
declare function $e(t: any): any[];
|
|
35
35
|
declare function St(t: any): boolean;
|
|
36
36
|
declare function lt(t: any, e: any): any;
|
|
37
37
|
declare function ds(t: any, e: any): boolean;
|
|
38
38
|
declare function oe(t: any, e: any): any;
|
|
39
39
|
declare function It(t: any, e: any): void;
|
|
40
40
|
declare function hs(t: any): number;
|
|
41
|
-
declare function
|
|
41
|
+
declare function rn(t: any, e?: boolean, r?: undefined, n?: number): never[];
|
|
42
42
|
declare function Bt(t: any, e: number | undefined, r: boolean | undefined, n: any, i: any): {
|
|
43
43
|
value: any;
|
|
44
44
|
isError: boolean;
|
|
45
45
|
isLoading: boolean;
|
|
46
|
-
refresh: (
|
|
46
|
+
refresh: (c: any) => Promise<any>;
|
|
47
47
|
};
|
|
48
48
|
declare function sd({ id: t, intervalSeconds: e, withLocalStorage: r }: {
|
|
49
49
|
id: any;
|
|
@@ -53,7 +53,7 @@ declare function sd({ id: t, intervalSeconds: e, withLocalStorage: r }: {
|
|
|
53
53
|
value: any;
|
|
54
54
|
isError: boolean;
|
|
55
55
|
isLoading: boolean;
|
|
56
|
-
refresh: (
|
|
56
|
+
refresh: (c: any) => Promise<any>;
|
|
57
57
|
};
|
|
58
58
|
declare function an({ product: t, state: e, selected: r, cheapestGroupOptionsProduct: n, basePrice: i, dangerouslyOverwritePrice: a }: {
|
|
59
59
|
product: any;
|
|
@@ -75,7 +75,7 @@ declare function fd(t: any): {
|
|
|
75
75
|
takeAwayOpen: any;
|
|
76
76
|
loaded: boolean;
|
|
77
77
|
};
|
|
78
|
-
declare function
|
|
78
|
+
declare function cn({ kioskMediaId: t, kioskMediaType: e, intervalSeconds: r, withLocalStorage: n, baseUrl: i, tenant: a, venue: s, locale: u }: {
|
|
79
79
|
kioskMediaId: any;
|
|
80
80
|
kioskMediaType: any;
|
|
81
81
|
intervalSeconds?: number | undefined;
|
|
@@ -91,9 +91,9 @@ declare function un({ kioskMediaId: t, kioskMediaType: e, intervalSeconds: r, wi
|
|
|
91
91
|
isError: boolean;
|
|
92
92
|
isLoading: boolean;
|
|
93
93
|
imageDisplayTime: any;
|
|
94
|
-
refresh: (
|
|
94
|
+
refresh: (c: any) => Promise<any>;
|
|
95
95
|
};
|
|
96
|
-
declare function
|
|
96
|
+
declare function ud({ kioskMediaId: t, kioskMediaType: e, venue: r, language: n, intervalSeconds: i, withLocalStorage: a }: {
|
|
97
97
|
kioskMediaId: any;
|
|
98
98
|
kioskMediaType: any;
|
|
99
99
|
venue: any;
|
|
@@ -107,21 +107,21 @@ declare function cd({ kioskMediaId: t, kioskMediaType: e, venue: r, language: n,
|
|
|
107
107
|
isError: boolean;
|
|
108
108
|
isLoading: boolean;
|
|
109
109
|
imageDisplayTime: any;
|
|
110
|
-
refresh: (
|
|
110
|
+
refresh: (c: any) => Promise<any>;
|
|
111
111
|
};
|
|
112
112
|
declare function od(t: any, e: any, r: any, n?: number, i?: boolean): {
|
|
113
113
|
url: any;
|
|
114
114
|
fallbackUrl: any;
|
|
115
115
|
isError: boolean;
|
|
116
116
|
mediaType: any;
|
|
117
|
-
refresh: (
|
|
117
|
+
refresh: (c: any) => Promise<any>;
|
|
118
118
|
};
|
|
119
|
-
declare function
|
|
119
|
+
declare function un(t: any, e: any, r: any, n: number | undefined, i: boolean | undefined, a: any, s: any): {
|
|
120
120
|
url: any;
|
|
121
121
|
fallbackUrl: any;
|
|
122
122
|
isError: boolean;
|
|
123
123
|
mediaType: any;
|
|
124
|
-
refresh: (
|
|
124
|
+
refresh: (c: any) => Promise<any>;
|
|
125
125
|
};
|
|
126
126
|
declare function pd(t: any, e?: number): any;
|
|
127
127
|
declare function hg({ originalMenu: t, markOnly: e, timeZone: r, interval: n, enableKeys: i }: {
|
|
@@ -131,11 +131,11 @@ declare function hg({ originalMenu: t, markOnly: e, timeZone: r, interval: n, en
|
|
|
131
131
|
interval?: number | undefined;
|
|
132
132
|
enableKeys?: any[] | undefined;
|
|
133
133
|
}): never[];
|
|
134
|
-
declare function
|
|
134
|
+
declare function cd(t: any, e: any): void;
|
|
135
135
|
declare function on(t: any, e: number | undefined, r: boolean | undefined, n: any, i: any, a: any): {
|
|
136
136
|
value: any;
|
|
137
137
|
isError: boolean;
|
|
138
|
-
refresh: (
|
|
138
|
+
refresh: (c: any) => Promise<any>;
|
|
139
139
|
};
|
|
140
|
-
export { Ct as MediaProxy,
|
|
140
|
+
export { Ct as MediaProxy, Ur as addDiscounts, ve as availabilityCustomizer, gg as calculateDisplayPrice, Rr as filterTimeAvailabilityOfProducts, gs as formatPrice, kg as getGroupedBucketLines, id as getLocalizedVenueItem, Dt as getLocalizedVenueMediaFromArray, ad as getLocalizedVenueMediaUrl, hn as getMediaUrl, vs as getProductAcronym, pe as getUrlFromLocalizedVenueMedia, $e as groupOrderLines, St as isAvailable, lt as isChannelOpen, ds as isHiddenByEnableKey, oe as isProductEnabled, It as markHiddenByEnableKey, hs as summarizeLineDiscounts, rn as useAvailability, Bt as useCms, sd as useCmsInConfigContext, an as useDisplayPrice, Jg as useGroupOrderLines, wt as useInterval, fd as useKioskChannelsAvailability, cn as useKioskMediaCms, ud as useKioskMediaCmsWithContext, od as useLocalizedVenueMedia, un as useLocalizedVenueMediaLegacy, pd as useMediaUrl, hg as useMenu, cd as useOnClickOutside, on as useVenueCms };
|
|
141
141
|
//# sourceMappingURL=index.cjs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.d.ts","sourceRoot":"","sources":["../../../index.cjs.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.d.ts","sourceRoot":"","sources":["../../../index.cjs.js"],"names":[],"mappings":"AAAijsD;;;;EAAS;AAArsnC,oCAAkF;AAAkgd,yCAAsT;AAAqvH;;;;;;;;;;;;EAAg/C;AAAjjqB,8EAAymB;AAAid,oEAAuF;AAA4zrB,0CAAqE;AAA6+C;;;;QAA4Z;AAAt3B,yCAAua;AAAC,iDAAkD;AAAwoY,6CAAyD;AAAt2mC,iCAA4T;AAA+4sB,yCAAua;AAAh1E,mCAAqzB;AAA0nB,qCAA0f;AAA37uB,yCAAmJ;AAA6jB,6CAAgC;AAAzM,yCAAyK;AAAkhd,0CAAwK;AAAh+d,oCAAsC;AAAsuc,6EAAsP;AAAq4S;;;;;EAA2rC;AAAA;;;;;;;;;EAAkM;AAAvtN;;;;;;;;;;;;EAAg/C;AAAg4D,mCAA4B;AAAtiwC,gDAA0R;AAA+26C;;;;EAAoZ;AAA7oD;;;;;;;;;;;;;;;;;EAAgpB;AAAA;;;;;;;;;;;;;;;EAA0U;AAAzpD;;;;;;EAA2K;AAAA;;;;;;EAAohB;AAAy4S,6CAAoC;AAAhvpB;;;;;;YAA8H;AAA+pY,0CAA+R;AAAxxE;;;;EAAgW"}
|
|
@@ -3,9 +3,9 @@ declare let kt: {
|
|
|
3
3
|
getInstance(): {};
|
|
4
4
|
instance: {} | undefined;
|
|
5
5
|
};
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
6
|
+
declare function us(t: any): number;
|
|
7
|
+
declare function ke(t: any, r: any): any;
|
|
8
|
+
declare function d$({ product: t, state: r, selected: e, cheapestGroupOptionsProduct: n, basePrice: i, dangerouslyOverwritePrice: a }: {
|
|
9
9
|
product: any;
|
|
10
10
|
state: any;
|
|
11
11
|
selected: any;
|
|
@@ -18,34 +18,34 @@ declare function dv({ product: t, state: r, selected: e, cheapestGroupOptionsPro
|
|
|
18
18
|
calculatedPriceDefaultProductState: any;
|
|
19
19
|
calculatedChildrensBasePrice: any;
|
|
20
20
|
};
|
|
21
|
-
declare function
|
|
22
|
-
declare function
|
|
23
|
-
declare function
|
|
24
|
-
declare function
|
|
21
|
+
declare function os(t: any, r?: undefined, e?: undefined, n?: boolean): any[];
|
|
22
|
+
declare function h$(t: any, r: any, e?: string, n?: number): string;
|
|
23
|
+
declare function y$(t: any): any[] | null;
|
|
24
|
+
declare function b$({ items: t, locale: r, venue: e }: {
|
|
25
25
|
items: any;
|
|
26
26
|
locale: any;
|
|
27
27
|
venue: any;
|
|
28
28
|
}): any;
|
|
29
29
|
declare function Qt(t: any, r: any): any;
|
|
30
|
-
declare function
|
|
31
|
-
declare function
|
|
32
|
-
declare function
|
|
33
|
-
declare function
|
|
34
|
-
declare function
|
|
30
|
+
declare function _$(t: any, r: any, e: any): any;
|
|
31
|
+
declare function s$(t: any, r?: number): any;
|
|
32
|
+
declare function $$(t: any): any;
|
|
33
|
+
declare function nn(t: any, r: any): any;
|
|
34
|
+
declare function rn(t: any): any[];
|
|
35
35
|
declare function Jt(t: any): boolean;
|
|
36
36
|
declare function yt(t: any, r: any): any;
|
|
37
|
-
declare function
|
|
37
|
+
declare function g$(t: any, r: any): boolean;
|
|
38
38
|
declare function Le(t: any, r: any): any;
|
|
39
39
|
declare function Vt(t: any, r: any): void;
|
|
40
|
-
declare function
|
|
41
|
-
declare function
|
|
40
|
+
declare function l$(t: any): number;
|
|
41
|
+
declare function sg(t: any, r?: boolean, e?: undefined, n?: number): never[];
|
|
42
42
|
declare function dr(t: any, r: number | undefined, e: boolean | undefined, n: any, i: any): {
|
|
43
43
|
value: any;
|
|
44
44
|
isError: boolean;
|
|
45
45
|
isLoading: boolean;
|
|
46
46
|
refresh: (u: any) => Promise<boolean | void>;
|
|
47
47
|
};
|
|
48
|
-
declare function
|
|
48
|
+
declare function A$({ id: t, intervalSeconds: r, withLocalStorage: e }: {
|
|
49
49
|
id: any;
|
|
50
50
|
intervalSeconds: any;
|
|
51
51
|
withLocalStorage: any;
|
|
@@ -68,9 +68,9 @@ declare function og({ product: t, state: r, selected: e, cheapestGroupOptionsPro
|
|
|
68
68
|
calculatedPriceDefaultProductState: any;
|
|
69
69
|
calculatedChildrensBasePrice: any;
|
|
70
70
|
};
|
|
71
|
-
declare function
|
|
71
|
+
declare function p$(t: any): any[];
|
|
72
72
|
declare function er(t: any, r: any): () => void;
|
|
73
|
-
declare function
|
|
73
|
+
declare function I$(t: any): {
|
|
74
74
|
dineInOpen: any;
|
|
75
75
|
takeAwayOpen: any;
|
|
76
76
|
loaded: boolean;
|
|
@@ -93,7 +93,7 @@ declare function Xg({ kioskMediaId: t, kioskMediaType: r, intervalSeconds: e, wi
|
|
|
93
93
|
imageDisplayTime: any;
|
|
94
94
|
refresh: (u: any) => Promise<boolean | void>;
|
|
95
95
|
};
|
|
96
|
-
declare function
|
|
96
|
+
declare function T$({ kioskMediaId: t, kioskMediaType: r, venue: e, language: n, intervalSeconds: i, withLocalStorage: a }: {
|
|
97
97
|
kioskMediaId: any;
|
|
98
98
|
kioskMediaType: any;
|
|
99
99
|
venue: any;
|
|
@@ -109,7 +109,7 @@ declare function Tv({ kioskMediaId: t, kioskMediaType: r, venue: e, language: n,
|
|
|
109
109
|
imageDisplayTime: any;
|
|
110
110
|
refresh: (u: any) => Promise<boolean | void>;
|
|
111
111
|
};
|
|
112
|
-
declare function
|
|
112
|
+
declare function m$(t: any, r: any, e: any, n?: number, i?: boolean): {
|
|
113
113
|
url: any;
|
|
114
114
|
fallbackUrl: any;
|
|
115
115
|
isError: boolean;
|
|
@@ -123,19 +123,19 @@ declare function Qg(t: any, r: any, e: any, n: number | undefined, i: boolean |
|
|
|
123
123
|
mediaType: any;
|
|
124
124
|
refresh: (u: any) => Promise<boolean | void>;
|
|
125
125
|
};
|
|
126
|
-
declare function
|
|
127
|
-
declare function $
|
|
126
|
+
declare function O$(t: any, r?: number): any;
|
|
127
|
+
declare function v$({ originalMenu: t, markOnly: r, timeZone: e, interval: n, enableKeys: i }: {
|
|
128
128
|
originalMenu: any;
|
|
129
129
|
markOnly?: boolean | undefined;
|
|
130
130
|
timeZone: any;
|
|
131
131
|
interval?: number | undefined;
|
|
132
132
|
enableKeys?: any[] | undefined;
|
|
133
133
|
}): never[];
|
|
134
|
-
declare function
|
|
134
|
+
declare function E$(t: any, r: any): void;
|
|
135
135
|
declare function Jg(t: any, r: number | undefined, e: boolean | undefined, n: any, i: any, a: any): {
|
|
136
136
|
value: any;
|
|
137
137
|
isError: boolean;
|
|
138
138
|
refresh: (u: any) => Promise<boolean | void>;
|
|
139
139
|
};
|
|
140
|
-
export { kt as MediaProxy,
|
|
140
|
+
export { kt as MediaProxy, us as addDiscounts, ke as availabilityCustomizer, d$ as calculateDisplayPrice, os as filterTimeAvailabilityOfProducts, h$ as formatPrice, y$ as getGroupedBucketLines, b$ as getLocalizedVenueItem, Qt as getLocalizedVenueMediaFromArray, _$ as getLocalizedVenueMediaUrl, s$ as getMediaUrl, $$ as getProductAcronym, nn as getUrlFromLocalizedVenueMedia, rn as groupOrderLines, Jt as isAvailable, yt as isChannelOpen, g$ as isHiddenByEnableKey, Le as isProductEnabled, Vt as markHiddenByEnableKey, l$ as summarizeLineDiscounts, sg as useAvailability, dr as useCms, A$ as useCmsInConfigContext, og as useDisplayPrice, p$ as useGroupOrderLines, er as useInterval, I$ as useKioskChannelsAvailability, Xg as useKioskMediaCms, T$ as useKioskMediaCmsWithContext, m$ as useLocalizedVenueMedia, Qg as useLocalizedVenueMediaLegacy, O$ as useMediaUrl, v$ as useMenu, E$ as useOnClickOutside, Jg as useVenueCms };
|
|
141
141
|
//# sourceMappingURL=index.es.d.ts.map
|
|
@@ -8,7 +8,7 @@ import { IProduct } from '@orderingstack/ordering-types';
|
|
|
8
8
|
* @param interval - availability checking interval [seconds]
|
|
9
9
|
*/
|
|
10
10
|
export declare function useAvailability(originalMenu?: IProduct[], markOnly?: boolean, timeZone?: string | undefined, interval?: number): IProduct[] | undefined;
|
|
11
|
-
export declare function availabilityCustomizer(value: IProduct[] | IProduct, otherValue: IProduct[] | IProduct): boolean | undefined;
|
|
11
|
+
export declare function availabilityCustomizer(value: IProduct[] | IProduct, otherValue: IProduct[] | IProduct | undefined): boolean | undefined;
|
|
12
12
|
export declare function markHiddenByEnableKey(product?: IProduct | IProduct[], enableKeys?: string[]): void;
|
|
13
13
|
export declare function useMenu({ originalMenu, markOnly, timeZone, interval, enableKeys, }: {
|
|
14
14
|
originalMenu?: IProduct[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAvailability.d.ts","sourceRoot":"","sources":["../../../../src/useAvailability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAQzD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,YAAY,CAAC,EAAE,QAAQ,EAAE,EACzB,QAAQ,UAAQ,EAChB,QAAQ,GAAE,MAAM,GAAG,SAAqB,EACxC,QAAQ,SAAK,GACZ,QAAQ,EAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"useAvailability.d.ts","sourceRoot":"","sources":["../../../../src/useAvailability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAQzD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,YAAY,CAAC,EAAE,QAAQ,EAAE,EACzB,QAAQ,UAAQ,EAChB,QAAQ,GAAE,MAAM,GAAG,SAAqB,EACxC,QAAQ,SAAK,GACZ,QAAQ,EAAE,GAAG,SAAS,CA8BxB;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAC5B,UAAU,EAAE,QAAQ,EAAE,GAAG,QAAQ,GAAG,SAAS,GAC5C,OAAO,GAAG,SAAS,CAmBrB;AAED,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,EAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,IAAI,CAkBN;AAED,wBAAgB,OAAO,CAAC,EACtB,YAAY,EACZ,QAAgB,EAChB,QAAQ,EACR,QAAa,EACb,UAAe,GAChB,EAAE;IACD,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,0BAIA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orderingstack/front-hooks",
|
|
3
|
-
"version": "6.1.0-beta.
|
|
3
|
+
"version": "6.1.0-beta.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"packageManager": "pnpm@8.15.6",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"dev": "vite",
|
|
14
14
|
"build": "vite build",
|
|
15
|
-
"test": "
|
|
15
|
+
"test": "vitest"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@orderingstack/ordering-core": "^1.0.1",
|