@orderingstack/front-hooks 5.3.4 → 5.4.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 +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +797 -789
- package/dist/index.es.js.map +1 -1
- package/dist/types/useCms.d.ts +5 -5
- package/dist/types/useDisplayPrice.d.ts +3 -2
- package/dist/types/useDisplayPrice.d.ts.map +1 -1
- package/dist/types/useMediaUrl.d.ts +1 -1
- package/dist/types/useMediaUrl.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/types/useCms.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function useCms<T>(id: string, intervalSeconds?: number, withLoca
|
|
|
6
6
|
value: T | null;
|
|
7
7
|
isError: boolean;
|
|
8
8
|
isLoading: boolean;
|
|
9
|
-
refresh: (abortSignal?: AbortSignal | undefined) => Promise<
|
|
9
|
+
refresh: (abortSignal?: AbortSignal | undefined) => Promise<boolean | undefined>;
|
|
10
10
|
};
|
|
11
11
|
export declare function useCmsInConfigContext<T>({ id, intervalSeconds, withLocalStorage, }: {
|
|
12
12
|
id: string;
|
|
@@ -16,12 +16,12 @@ export declare function useCmsInConfigContext<T>({ id, intervalSeconds, withLoca
|
|
|
16
16
|
value: T | null;
|
|
17
17
|
isError: boolean;
|
|
18
18
|
isLoading: boolean;
|
|
19
|
-
refresh: (abortSignal?: AbortSignal | undefined) => Promise<
|
|
19
|
+
refresh: (abortSignal?: AbortSignal | undefined) => Promise<boolean | undefined>;
|
|
20
20
|
};
|
|
21
21
|
export declare function useVenueCms<T extends IVenueId>(id: string, intervalSeconds?: number, withLocalStorage?: boolean, baseUrl?: string, tenant?: string, venue?: string): {
|
|
22
22
|
value: T | null;
|
|
23
23
|
isError: boolean;
|
|
24
|
-
refresh: (abortSignal?: AbortSignal | undefined) => Promise<
|
|
24
|
+
refresh: (abortSignal?: AbortSignal | undefined) => Promise<boolean | undefined>;
|
|
25
25
|
};
|
|
26
26
|
export declare function useLocalizedVenueMedia(id: string, venue: string, locale: string, intervalSeconds?: number, withLocalStorage?: boolean): {
|
|
27
27
|
isError?: boolean;
|
|
@@ -59,7 +59,7 @@ export declare function useKioskMediaCms({ kioskMediaId, kioskMediaType, interva
|
|
|
59
59
|
isError: boolean;
|
|
60
60
|
isLoading: boolean;
|
|
61
61
|
imageDisplayTime: number | undefined;
|
|
62
|
-
refresh: (abortSignal?: AbortSignal | undefined) => Promise<
|
|
62
|
+
refresh: (abortSignal?: AbortSignal | undefined) => Promise<boolean | undefined>;
|
|
63
63
|
};
|
|
64
64
|
export declare function useKioskMediaCmsWithContext({ kioskMediaId, kioskMediaType, venue, intervalSeconds, withLocalStorage, }: {
|
|
65
65
|
kioskMediaId: string;
|
|
@@ -74,7 +74,7 @@ export declare function useKioskMediaCmsWithContext({ kioskMediaId, kioskMediaTy
|
|
|
74
74
|
isError: boolean;
|
|
75
75
|
isLoading: boolean;
|
|
76
76
|
imageDisplayTime: number | undefined;
|
|
77
|
-
refresh: (abortSignal?: AbortSignal | undefined) => Promise<
|
|
77
|
+
refresh: (abortSignal?: AbortSignal | undefined) => Promise<boolean | undefined>;
|
|
78
78
|
};
|
|
79
79
|
export {};
|
|
80
80
|
//# sourceMappingURL=useCms.d.ts.map
|
|
@@ -5,14 +5,15 @@ interface UseDisplayPriceProps {
|
|
|
5
5
|
selected?: boolean;
|
|
6
6
|
cheapestGroupOptionsProduct?: number;
|
|
7
7
|
basePrice?: boolean;
|
|
8
|
+
dangerouslyOverwritePrice?: (product: IProduct) => number | undefined;
|
|
8
9
|
}
|
|
9
|
-
export declare const useDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, basePrice }: UseDisplayPriceProps) => {
|
|
10
|
+
export declare const useDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, basePrice, dangerouslyOverwritePrice }: UseDisplayPriceProps) => {
|
|
10
11
|
displayPrice: number;
|
|
11
12
|
showAsMinPrice: boolean | "" | undefined;
|
|
12
13
|
calculatedPriceDefaultProductState: number;
|
|
13
14
|
calculatedChildrensBasePrice: number | undefined;
|
|
14
15
|
};
|
|
15
|
-
export declare const calculateDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, basePrice }: UseDisplayPriceProps) => {
|
|
16
|
+
export declare const calculateDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, basePrice, dangerouslyOverwritePrice }: UseDisplayPriceProps) => {
|
|
16
17
|
displayPrice: number;
|
|
17
18
|
showAsMinPrice: boolean | "" | undefined;
|
|
18
19
|
calculatedPriceDefaultProductState: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDisplayPrice.d.ts","sourceRoot":"","sources":["useDisplayPrice.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,aAAa,EACd,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"useDisplayPrice.d.ts","sourceRoot":"","sources":["useDisplayPrice.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,aAAa,EACd,MAAM,+BAA+B,CAAC;AA8HvC,UAAU,oBAAoB;IAC5B,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,MAAM,GAAG,SAAS,CAAC;CACvE;AAED,eAAO,MAAM,eAAe,oGAOzB,oBAAoB;;;;;CA2BtB,CAAC;AAEF,eAAO,MAAM,qBAAqB,oGA7B/B,oBAAoB;;;;;CA6B6B,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare class MediaProxy {
|
|
|
6
6
|
private static interval;
|
|
7
7
|
static getInstance(): MediaProxy;
|
|
8
8
|
getUrl: (url: string, size?: 1000 | 600 | 300 | 100 | 48 | 57 | 70 | 160 | 250 | 500 | 900 | 1920 | 1080 | undefined) => string;
|
|
9
|
-
static getMediaToolsUrl: (url: string, size?:
|
|
9
|
+
static getMediaToolsUrl: (url: string, size?: TMediaSize) => string;
|
|
10
10
|
private static checkStatus;
|
|
11
11
|
static getStatus: () => boolean;
|
|
12
12
|
setProxyUrl: (url: string) => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMediaUrl.d.ts","sourceRoot":"","sources":["useMediaUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAa;IACpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6B;WAEtC,WAAW;IAOlB,MAAM,QAAS,MAAM,qGAAsB,MAAM,
|
|
1
|
+
{"version":3,"file":"useMediaUrl.d.ts","sourceRoot":"","sources":["useMediaUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAK3D,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAa;IACpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA6B;WAEtC,WAAW;IAOlB,MAAM,QAAS,MAAM,qGAAsB,MAAM,CAMtD;IAEF,OAAc,gBAAgB,QACvB,MAAM,SACL,UAAU,KACf,MAAM,CA8BP;IAEF,OAAO,CAAC,MAAM,CAAC,WAAW,CAUxB;IAEF,OAAc,SAAS,gBAA2B;IAG3C,WAAW,QAAe,MAAM,KAAG,QAAQ,OAAO,CAAC,CAUxD;CACH;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CAEvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CAEvE"}
|