@orderingstack/front-hooks 6.4.0 → 6.5.0-beta.1
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 +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3094 -2993
- package/dist/index.es.js.map +1 -1
- package/dist/packages/hooks/dist/index.cjs.d.ts +156 -0
- package/dist/packages/hooks/dist/index.cjs.d.ts.map +1 -0
- package/dist/packages/hooks/dist/index.es.d.ts +156 -0
- package/dist/packages/hooks/dist/index.es.d.ts.map +1 -0
- package/dist/types/utils.d.ts +23 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
declare let ri: {
|
|
2
|
+
new (): {};
|
|
3
|
+
getInstance(): {};
|
|
4
|
+
instance: {} | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare function lc(r: any): number;
|
|
7
|
+
declare function _a(r: any, a: any): any;
|
|
8
|
+
declare function xI({ product: r, state: a, selected: i, cheapestGroupOptionsProduct: c, basePrice: p, dangerouslyOverwritePrice: g }: {
|
|
9
|
+
product: any;
|
|
10
|
+
state: any;
|
|
11
|
+
selected: any;
|
|
12
|
+
cheapestGroupOptionsProduct: any;
|
|
13
|
+
basePrice: any;
|
|
14
|
+
dangerouslyOverwritePrice: any;
|
|
15
|
+
}): {
|
|
16
|
+
displayPrice: any;
|
|
17
|
+
showAsMinPrice: any;
|
|
18
|
+
calculatedPriceDefaultProductState: any;
|
|
19
|
+
calculatedChildrensBasePrice: any;
|
|
20
|
+
};
|
|
21
|
+
declare function hc(r: any, a: any): void;
|
|
22
|
+
declare function cc(r: any, a?: undefined, i?: undefined, c?: boolean): any[];
|
|
23
|
+
declare function OA(r: any, a: any, i?: string, c?: number): string;
|
|
24
|
+
declare function gO(r: any): any[] | null;
|
|
25
|
+
declare function mO({ items: r, locale: a, venue: i }: {
|
|
26
|
+
items: any;
|
|
27
|
+
locale: any;
|
|
28
|
+
venue: any;
|
|
29
|
+
}): any;
|
|
30
|
+
declare function Je(r: any, a: any): any;
|
|
31
|
+
declare function $O(r: any, a: any, i: any): any;
|
|
32
|
+
declare function Kc(r: any, a?: number): any;
|
|
33
|
+
declare function LA(r: any, a: any): any;
|
|
34
|
+
declare function xA(r: any): any;
|
|
35
|
+
declare function RA(r: any, a: any): any;
|
|
36
|
+
declare function CA(r: any): any[] | undefined;
|
|
37
|
+
declare function da(r: any, a: any): any;
|
|
38
|
+
declare function va(r: any): any[];
|
|
39
|
+
declare function ei(r: any): boolean;
|
|
40
|
+
declare function ze(r: any, a: any): any;
|
|
41
|
+
declare function ra(r: any, a: any): any;
|
|
42
|
+
declare function SA(r: any, a: any): boolean;
|
|
43
|
+
declare function ia(r: any, a: any): any;
|
|
44
|
+
declare function aa(r: any): boolean;
|
|
45
|
+
declare function ua(r: any): boolean;
|
|
46
|
+
declare function ta(r: any, a: any): any;
|
|
47
|
+
declare function sa(r: any): boolean;
|
|
48
|
+
declare function Xe(r: any, a: any): void;
|
|
49
|
+
declare function SI(r: any, a: any): void;
|
|
50
|
+
declare function ea(r: any, a: any, i?: number): any;
|
|
51
|
+
declare function gc(r: any, a: any, i?: number): {
|
|
52
|
+
modified: boolean;
|
|
53
|
+
product: any;
|
|
54
|
+
};
|
|
55
|
+
declare function IA(r: any): number;
|
|
56
|
+
declare function Pc(r: any, a?: boolean, i?: undefined, c?: number): never[];
|
|
57
|
+
declare function pi(r: any, a: number | undefined, i: boolean | undefined, c: any, p: any): {
|
|
58
|
+
value: any;
|
|
59
|
+
isError: boolean;
|
|
60
|
+
isLoading: boolean;
|
|
61
|
+
refresh: (b: any) => Promise<any>;
|
|
62
|
+
};
|
|
63
|
+
declare function bO({ id: r, intervalSeconds: a, withLocalStorage: i }: {
|
|
64
|
+
id: any;
|
|
65
|
+
intervalSeconds: any;
|
|
66
|
+
withLocalStorage: any;
|
|
67
|
+
}): {
|
|
68
|
+
value: any;
|
|
69
|
+
isError: boolean;
|
|
70
|
+
isLoading: boolean;
|
|
71
|
+
refresh: (b: any) => Promise<any>;
|
|
72
|
+
};
|
|
73
|
+
declare function Uc({ product: r, state: a, selected: i, cheapestGroupOptionsProduct: c, basePrice: p, dangerouslyOverwritePrice: g }: {
|
|
74
|
+
product: any;
|
|
75
|
+
state: any;
|
|
76
|
+
selected: any;
|
|
77
|
+
cheapestGroupOptionsProduct: any;
|
|
78
|
+
basePrice: any;
|
|
79
|
+
dangerouslyOverwritePrice: any;
|
|
80
|
+
}): {
|
|
81
|
+
displayPrice: any;
|
|
82
|
+
showAsMinPrice: any;
|
|
83
|
+
calculatedPriceDefaultProductState: any;
|
|
84
|
+
calculatedChildrensBasePrice: any;
|
|
85
|
+
};
|
|
86
|
+
declare function hO(r: any): any[];
|
|
87
|
+
declare function ii(r: any, a: any): () => void;
|
|
88
|
+
declare function IO(r: any): {
|
|
89
|
+
dineInOpen: any;
|
|
90
|
+
takeAwayOpen: any;
|
|
91
|
+
loaded: boolean;
|
|
92
|
+
};
|
|
93
|
+
declare function Wc({ kioskMediaId: r, kioskMediaType: a, intervalSeconds: i, withLocalStorage: c, baseUrl: p, tenant: g, venue: _, locale: $ }: {
|
|
94
|
+
kioskMediaId: any;
|
|
95
|
+
kioskMediaType: any;
|
|
96
|
+
intervalSeconds?: number | undefined;
|
|
97
|
+
withLocalStorage?: boolean | undefined;
|
|
98
|
+
baseUrl: any;
|
|
99
|
+
tenant: any;
|
|
100
|
+
venue: any;
|
|
101
|
+
locale: any;
|
|
102
|
+
}): {
|
|
103
|
+
url: any;
|
|
104
|
+
fallbackUrl: any;
|
|
105
|
+
mediaType: any;
|
|
106
|
+
isError: boolean;
|
|
107
|
+
isLoading: boolean;
|
|
108
|
+
imageDisplayTime: any;
|
|
109
|
+
refresh: (b: any) => Promise<any>;
|
|
110
|
+
};
|
|
111
|
+
declare function TO({ kioskMediaId: r, kioskMediaType: a, venue: i, language: c, intervalSeconds: p, withLocalStorage: g }: {
|
|
112
|
+
kioskMediaId: any;
|
|
113
|
+
kioskMediaType: any;
|
|
114
|
+
venue: any;
|
|
115
|
+
language: any;
|
|
116
|
+
intervalSeconds?: number | undefined;
|
|
117
|
+
withLocalStorage?: boolean | undefined;
|
|
118
|
+
}): {
|
|
119
|
+
url: any;
|
|
120
|
+
fallbackUrl: any;
|
|
121
|
+
mediaType: any;
|
|
122
|
+
isError: boolean;
|
|
123
|
+
isLoading: boolean;
|
|
124
|
+
imageDisplayTime: any;
|
|
125
|
+
refresh: (b: any) => Promise<any>;
|
|
126
|
+
};
|
|
127
|
+
declare function EO(r: any, a: any, i: any, c?: number, p?: boolean): {
|
|
128
|
+
url: any;
|
|
129
|
+
fallbackUrl: any;
|
|
130
|
+
isError: boolean;
|
|
131
|
+
mediaType: any;
|
|
132
|
+
refresh: (b: any) => Promise<any>;
|
|
133
|
+
};
|
|
134
|
+
declare function Bc(r: any, a: any, i: any, c: number | undefined, p: boolean | undefined, g: any, _: any): {
|
|
135
|
+
url: any;
|
|
136
|
+
fallbackUrl: any;
|
|
137
|
+
isError: boolean;
|
|
138
|
+
mediaType: any;
|
|
139
|
+
refresh: (b: any) => Promise<any>;
|
|
140
|
+
};
|
|
141
|
+
declare function PO(r: any, a?: number): any;
|
|
142
|
+
declare function OI({ originalMenu: r, markOnly: a, timeZone: i, interval: c, enableKeys: p }: {
|
|
143
|
+
originalMenu: any;
|
|
144
|
+
markOnly?: boolean | undefined;
|
|
145
|
+
timeZone: any;
|
|
146
|
+
interval?: number | undefined;
|
|
147
|
+
enableKeys?: any[] | undefined;
|
|
148
|
+
}): never[];
|
|
149
|
+
declare function wO(r: any, a: any): void;
|
|
150
|
+
declare function Fc(r: any, a: number | undefined, i: boolean | undefined, c: any, p: any, g: any): {
|
|
151
|
+
value: any;
|
|
152
|
+
isError: boolean;
|
|
153
|
+
refresh: (b: any) => Promise<any>;
|
|
154
|
+
};
|
|
155
|
+
export { ri as MediaProxy, lc as addDiscounts, _a as availabilityCustomizer, xI as calculateDisplayPrice, hc as extractLiteralsByLanguage, cc as filterTimeAvailabilityOfProducts, OA as formatPrice, gO as getGroupedBucketLines, mO as getLocalizedVenueItem, Je as getLocalizedVenueMediaFromArray, $O as getLocalizedVenueMediaUrl, Kc as getMediaUrl, LA as getMenuItemsWithProcessLocks, xA as getProductAcronym, RA as getReadOnlyMenuItemsWithProcessLocks, CA as getUnusedCouponsKeysFromOrder, da as getUrlFromLocalizedVenueMedia, va as groupOrderLines, ei as isAvailable, ze as isChannelOpen, ra as isFreeForLocks, SA as isHiddenByEnableKey, ia as isLocked, aa as isOptionGroup, ua as isProduct, ta as isProductEnabled, sa as isVitalOptionGroup, Xe as markHiddenByEnableKey, SI as markItemsHiddenByEnableKey, ea as processLocks, gc as processReadOnlyProductWithLocks, IA as summarizeLineDiscounts, Pc as useAvailability, pi as useCms, bO as useCmsInConfigContext, Uc as useDisplayPrice, hO as useGroupOrderLines, ii as useInterval, IO as useKioskChannelsAvailability, Wc as useKioskMediaCms, TO as useKioskMediaCmsWithContext, EO as useLocalizedVenueMedia, Bc as useLocalizedVenueMediaLegacy, PO as useMediaUrl, OI as useMenu, wO as useOnClickOutside, Fc as useVenueCms };
|
|
156
|
+
//# sourceMappingURL=index.cjs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.d.ts","sourceRoot":"","sources":["../../../index.cjs.js"],"names":[],"mappings":"AA0Bmq8C;;;;EAAU;AAA/omC,oCAAkF;AAAq7hB,yCAA6W;AAAirB;;;;;;;;;;;;EAAg/C;AAA3wkB,0CAAmc;AA1BwqK,8EAAymB;AA0Bt2O,oEAAuF;AAAmuqB,0CAAqE;AAAy6C;;;;QAA4Z;AAAt3B,yCAAua;AAAC,iDAAkD;AAA+uY,6CAAyD;AAA3/iC,yCAAuE;AAA53C,iCAA4T;AAA6zC,yCAAkI;AAA/7C,+CAAsjB;AAA4rqB,yCAAua;AAA5wE,mCAAqzB;AAA8nB,qCAAkb;AA1Bv+d,yCAAoJ;AA0B79J,yCAA2H;AAAz5E,6CAAgC;AAAy3E,yCAAgI;AAA0D,qCAA0D;AAApH,qCAA0D;AAA5vF,yCAAyK;AAA6oF,qCAAkF;AAA6xc,0CAAwK;AAAxK,0CAAwK;AAAxwf,qDAA6P;AAAkI;;;EAAmgB;AAApkF,oCAAsC;AAAwohB,6EAAuQ;AAAqzM;;;;;EAA+rC;AAAA;;;;;;;;;EAAmM;AAAzpN;;;;;;;;;;;;EAAg/C;AAAi4D,mCAA4B;AA1BpngC,gDAA8R;AA0Bu6qC;;;;EAAuZ;AAA5rD;;;;;;;;;;;;;;;;;EAA0rB;AAAA;;;;;;;;;;;;;;;EAA2U;AAArsD;;;;;;EAA4K;AAAA;;;;;;EAAohB;AAA0+S,6CAAoC;AAAhtjB;;;;;;YAA8H;AAAykS,0CAAgS;AAAr0E;;;;EAAgW"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
declare let Zu: {
|
|
2
|
+
new (): {};
|
|
3
|
+
getInstance(): {};
|
|
4
|
+
instance: {} | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare function my(r: any): number;
|
|
7
|
+
declare function xc(r: any, a: any): any;
|
|
8
|
+
declare function RS({ product: r, state: a, selected: i, cheapestGroupOptionsProduct: c, basePrice: _, dangerouslyOverwritePrice: g }: {
|
|
9
|
+
product: any;
|
|
10
|
+
state: any;
|
|
11
|
+
selected: any;
|
|
12
|
+
cheapestGroupOptionsProduct: any;
|
|
13
|
+
basePrice: any;
|
|
14
|
+
dangerouslyOverwritePrice: any;
|
|
15
|
+
}): {
|
|
16
|
+
displayPrice: any;
|
|
17
|
+
showAsMinPrice: any;
|
|
18
|
+
calculatedPriceDefaultProductState: any;
|
|
19
|
+
calculatedChildrensBasePrice: any;
|
|
20
|
+
};
|
|
21
|
+
declare function by(r: any, a: any): void;
|
|
22
|
+
declare function yy(r: any, a?: undefined, i?: undefined, c?: boolean): any[];
|
|
23
|
+
declare function ES(r: any, a: any, i?: string, c?: number): string;
|
|
24
|
+
declare function NS(r: any): any[] | null;
|
|
25
|
+
declare function US({ items: r, locale: a, venue: i }: {
|
|
26
|
+
items: any;
|
|
27
|
+
locale: any;
|
|
28
|
+
venue: any;
|
|
29
|
+
}): any;
|
|
30
|
+
declare function Zr(r: any, a: any): any;
|
|
31
|
+
declare function PS(r: any, a: any, i: any): any;
|
|
32
|
+
declare function AS(r: any, a?: number): any;
|
|
33
|
+
declare function OS(r: any, a: any): any;
|
|
34
|
+
declare function IS(r: any): any;
|
|
35
|
+
declare function xS(r: any, a: any): any;
|
|
36
|
+
declare function SS(r: any): any[] | undefined;
|
|
37
|
+
declare function Dc(r: any, a: any): any;
|
|
38
|
+
declare function Lc(r: any): any[];
|
|
39
|
+
declare function qu(r: any): boolean;
|
|
40
|
+
declare function Kr(r: any, a: any): any;
|
|
41
|
+
declare function ic(r: any, a: any): any;
|
|
42
|
+
declare function wS(r: any, a: any): boolean;
|
|
43
|
+
declare function uc(r: any, a: any): any;
|
|
44
|
+
declare function fc(r: any): boolean;
|
|
45
|
+
declare function ac(r: any): boolean;
|
|
46
|
+
declare function ec(r: any, a: any): any;
|
|
47
|
+
declare function sc(r: any): boolean;
|
|
48
|
+
declare function ni(r: any, a: any): void;
|
|
49
|
+
declare function LS(r: any, a: any): void;
|
|
50
|
+
declare function rc(r: any, a: any, i?: number): any;
|
|
51
|
+
declare function Ty(r: any, a: any, i?: number): {
|
|
52
|
+
modified: boolean;
|
|
53
|
+
product: any;
|
|
54
|
+
};
|
|
55
|
+
declare function TS(r: any): number;
|
|
56
|
+
declare function AI(r: any, a?: boolean, i?: undefined, c?: number): never[];
|
|
57
|
+
declare function oa(r: any, a: number | undefined, i: boolean | undefined, c: any, _: any): {
|
|
58
|
+
value: any;
|
|
59
|
+
isError: boolean;
|
|
60
|
+
isLoading: boolean;
|
|
61
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
62
|
+
};
|
|
63
|
+
declare function MS({ id: r, intervalSeconds: a, withLocalStorage: i }: {
|
|
64
|
+
id: any;
|
|
65
|
+
intervalSeconds: any;
|
|
66
|
+
withLocalStorage: any;
|
|
67
|
+
}): {
|
|
68
|
+
value: any;
|
|
69
|
+
isError: boolean;
|
|
70
|
+
isLoading: boolean;
|
|
71
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
72
|
+
};
|
|
73
|
+
declare function yI({ product: r, state: a, selected: i, cheapestGroupOptionsProduct: c, basePrice: _, dangerouslyOverwritePrice: g }: {
|
|
74
|
+
product: any;
|
|
75
|
+
state: any;
|
|
76
|
+
selected: any;
|
|
77
|
+
cheapestGroupOptionsProduct: any;
|
|
78
|
+
basePrice: any;
|
|
79
|
+
dangerouslyOverwritePrice: any;
|
|
80
|
+
}): {
|
|
81
|
+
displayPrice: any;
|
|
82
|
+
showAsMinPrice: any;
|
|
83
|
+
calculatedPriceDefaultProductState: any;
|
|
84
|
+
calculatedChildrensBasePrice: any;
|
|
85
|
+
};
|
|
86
|
+
declare function DS(r: any): any[];
|
|
87
|
+
declare function Xu(r: any, a: any): () => void;
|
|
88
|
+
declare function GS(r: any): {
|
|
89
|
+
dineInOpen: any;
|
|
90
|
+
takeAwayOpen: any;
|
|
91
|
+
loaded: boolean;
|
|
92
|
+
};
|
|
93
|
+
declare function cS({ kioskMediaId: r, kioskMediaType: a, intervalSeconds: i, withLocalStorage: c, baseUrl: _, tenant: g, venue: p, locale: $ }: {
|
|
94
|
+
kioskMediaId: any;
|
|
95
|
+
kioskMediaType: any;
|
|
96
|
+
intervalSeconds?: number | undefined;
|
|
97
|
+
withLocalStorage?: boolean | undefined;
|
|
98
|
+
baseUrl: any;
|
|
99
|
+
tenant: any;
|
|
100
|
+
venue: any;
|
|
101
|
+
locale: any;
|
|
102
|
+
}): {
|
|
103
|
+
url: any;
|
|
104
|
+
fallbackUrl: any;
|
|
105
|
+
mediaType: any;
|
|
106
|
+
isError: boolean;
|
|
107
|
+
isLoading: boolean;
|
|
108
|
+
imageDisplayTime: any;
|
|
109
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
110
|
+
};
|
|
111
|
+
declare function BS({ kioskMediaId: r, kioskMediaType: a, venue: i, language: c, intervalSeconds: _, withLocalStorage: g }: {
|
|
112
|
+
kioskMediaId: any;
|
|
113
|
+
kioskMediaType: any;
|
|
114
|
+
venue: any;
|
|
115
|
+
language: any;
|
|
116
|
+
intervalSeconds?: number | undefined;
|
|
117
|
+
withLocalStorage?: boolean | undefined;
|
|
118
|
+
}): {
|
|
119
|
+
url: any;
|
|
120
|
+
fallbackUrl: any;
|
|
121
|
+
mediaType: any;
|
|
122
|
+
isError: boolean;
|
|
123
|
+
isLoading: boolean;
|
|
124
|
+
imageDisplayTime: any;
|
|
125
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
126
|
+
};
|
|
127
|
+
declare function FS(r: any, a: any, i: any, c?: number, _?: boolean): {
|
|
128
|
+
url: any;
|
|
129
|
+
fallbackUrl: any;
|
|
130
|
+
isError: boolean;
|
|
131
|
+
mediaType: any;
|
|
132
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
133
|
+
};
|
|
134
|
+
declare function oS(r: any, a: any, i: any, c: number | undefined, _: boolean | undefined, g: any, p: any): {
|
|
135
|
+
url: any;
|
|
136
|
+
fallbackUrl: any;
|
|
137
|
+
isError: boolean;
|
|
138
|
+
mediaType: any;
|
|
139
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
140
|
+
};
|
|
141
|
+
declare function HS(r: any, a?: number): any;
|
|
142
|
+
declare function CS({ originalMenu: r, markOnly: a, timeZone: i, interval: c, enableKeys: _ }: {
|
|
143
|
+
originalMenu: any;
|
|
144
|
+
markOnly?: boolean | undefined;
|
|
145
|
+
timeZone: any;
|
|
146
|
+
interval?: number | undefined;
|
|
147
|
+
enableKeys?: any[] | undefined;
|
|
148
|
+
}): never[];
|
|
149
|
+
declare function WS(r: any, a: any): void;
|
|
150
|
+
declare function sS(r: any, a: number | undefined, i: boolean | undefined, c: any, _: any, g: any): {
|
|
151
|
+
value: any;
|
|
152
|
+
isError: boolean;
|
|
153
|
+
refresh: (b: any) => Promise<boolean | void>;
|
|
154
|
+
};
|
|
155
|
+
export { Zu as MediaProxy, my as addDiscounts, xc as availabilityCustomizer, RS as calculateDisplayPrice, by as extractLiteralsByLanguage, yy as filterTimeAvailabilityOfProducts, ES as formatPrice, NS as getGroupedBucketLines, US as getLocalizedVenueItem, Zr as getLocalizedVenueMediaFromArray, PS as getLocalizedVenueMediaUrl, AS as getMediaUrl, OS as getMenuItemsWithProcessLocks, IS as getProductAcronym, xS as getReadOnlyMenuItemsWithProcessLocks, SS as getUnusedCouponsKeysFromOrder, Dc as getUrlFromLocalizedVenueMedia, Lc as groupOrderLines, qu as isAvailable, Kr as isChannelOpen, ic as isFreeForLocks, wS as isHiddenByEnableKey, uc as isLocked, fc as isOptionGroup, ac as isProduct, ec as isProductEnabled, sc as isVitalOptionGroup, ni as markHiddenByEnableKey, LS as markItemsHiddenByEnableKey, rc as processLocks, Ty as processReadOnlyProductWithLocks, TS as summarizeLineDiscounts, AI as useAvailability, oa as useCms, MS as useCmsInConfigContext, yI as useDisplayPrice, DS as useGroupOrderLines, Xu as useInterval, GS as useKioskChannelsAvailability, cS as useKioskMediaCms, BS as useKioskMediaCmsWithContext, FS as useLocalizedVenueMedia, oS as useLocalizedVenueMediaLegacy, HS as useMediaUrl, CS as useMenu, WS as useOnClickOutside, sS as useVenueCms };
|
|
156
|
+
//# sourceMappingURL=index.es.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.d.ts","sourceRoot":"","sources":["../../../index.es.js"],"names":[],"mappings":"AA27LA;;;;EAAY;AA9kDZ,oCAGC;AAkxBD,yCASC;AAuCD;;;;;;;;;;;;EA4DU;AA11BV,0CAcC;AA3vHD,8EAsCC;AAuqHD,oEAEC;AA89BD,0CAEC;AAqDD;;;;QAcC;AA5BD,yCASC;AACD,iDAGC;AAkjBD,6CAEC;AA3hDD,yCAEC;AAtCD,iCAIC;AAoDD,yCASC;AA5DD,+CAeC;AA0+BD,yCASC;AAlFD,mCA4BC;AA8BD,qCAcC;AA9qJD,yCAMC;AAuwHD,yCAGC;AAlGD,6CAEC;AAiGD,yCAKC;AAID,qCAEC;AALD,qCAEC;AAhHD,yCAIC;AAgHD,qCAGC;AA8pBD,0CASC;AATD,0CASC;AA/uBD,qDAgBC;AAWD;;;EAyBC;AAzGD,oCAEC;AA+vBD,6EAeC;AAyRD;;;;;EAsDC;AACD;;;;;;;;;EAeC;AA9SD;;;;;;;;;;;;EA4DU;AAmGV,mCAEC;AA70KD,gDAkBC;AAylLD;;;;EAaC;AAzGD;;;;;;;;;;;;;;;;;EAkDC;AACD;;;;;;;;;;;;;;;EAqBC;AA3GD;;;;;;EAaC;AACD;;;;;;EAoBC;AA2aD,6CAEC;AA3yBD;;;;;;YASC;AA+bD,0CAkBC;AA/ID;;;;EAgBC"}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IOrderLine, IDiscount, IProduct, IOrder, IOrderCoupon } from '@orderingstack/ordering-types';
|
|
1
|
+
import { IOrderLine, IDiscount, IProduct, IOrder, IOrderCoupon, EChannelName } from '@orderingstack/ordering-types';
|
|
2
2
|
|
|
3
3
|
export declare function addDiscounts(discounts: IDiscount[] | undefined): number;
|
|
4
4
|
export declare function summarizeLineDiscounts(line: IOrderLine): number;
|
|
@@ -7,4 +7,26 @@ export declare function isProductEnabled(item: IProduct, enableKeys?: string[]):
|
|
|
7
7
|
export declare function isHiddenByEnableKey(item: IProduct, enableKeys?: string[]): boolean;
|
|
8
8
|
export declare function getProductAcronym(product: IProduct): string;
|
|
9
9
|
export declare function getUnusedCouponsKeysFromOrder(order: IOrder): IOrderCoupon[] | undefined;
|
|
10
|
+
export declare function extractLiteralsByLanguage(product: IProduct, lang: string): void;
|
|
11
|
+
export interface IMenuLock {
|
|
12
|
+
id: string;
|
|
13
|
+
products?: string[];
|
|
14
|
+
instances?: string[];
|
|
15
|
+
lockedInChannel?: Record<EChannelName, boolean>;
|
|
16
|
+
description?: string;
|
|
17
|
+
plannedLockExpirationDate?: string;
|
|
18
|
+
lockReason?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function getMenuItemsWithProcessLocks(items: IProduct[], locks?: IMenuLock[]): IProduct[];
|
|
21
|
+
export declare function processLocks(product: IProduct, locks: IMenuLock[], nestedLvl?: number): IProduct | null;
|
|
22
|
+
export declare function getReadOnlyMenuItemsWithProcessLocks(items: IProduct[], locks?: IMenuLock[]): IProduct[];
|
|
23
|
+
export declare function processReadOnlyProductWithLocks(product: IProduct, locks: IMenuLock[], nestedLvl?: number): {
|
|
24
|
+
modified: boolean;
|
|
25
|
+
product: IProduct | null;
|
|
26
|
+
};
|
|
27
|
+
export declare function isFreeForLocks(product: IProduct, locks: IMenuLock[]): any;
|
|
28
|
+
export declare function isLocked(product: IProduct, locks: IMenuLock[]): boolean | IProduct;
|
|
29
|
+
export declare function isProduct(product: IProduct): boolean;
|
|
30
|
+
export declare function isOptionGroup(product: IProduct): boolean;
|
|
31
|
+
export declare function isVitalOptionGroup(product: IProduct): boolean;
|
|
10
32
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAgB,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlI,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,GAAG,MAAM,CAIv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