@orderingstack/front-hooks 4.1.1 → 5.0.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.
Files changed (37) hide show
  1. package/dist/index.es.js +2040 -6221
  2. package/dist/index.es.js.map +1 -1
  3. package/package.json +2 -6
  4. package/dist/index.cjs.js +0 -16
  5. package/dist/index.cjs.js.map +0 -1
  6. package/dist/types/index.d.ts +0 -13
  7. package/dist/types/index.d.ts.map +0 -1
  8. package/dist/types/pkce.d.ts +0 -14
  9. package/dist/types/pkce.d.ts.map +0 -1
  10. package/dist/types/secureStorage.d.ts +0 -13
  11. package/dist/types/secureStorage.d.ts.map +0 -1
  12. package/dist/types/useAvailability.d.ts +0 -17
  13. package/dist/types/useAvailability.d.ts.map +0 -1
  14. package/dist/types/useChannelAvailability.d.ts +0 -7
  15. package/dist/types/useChannelAvailability.d.ts.map +0 -1
  16. package/dist/types/useCms.d.ts +0 -74
  17. package/dist/types/useCms.d.ts.map +0 -1
  18. package/dist/types/useDisplayPrice.d.ts +0 -19
  19. package/dist/types/useDisplayPrice.d.ts.map +0 -1
  20. package/dist/types/useGroupOrderLines.d.ts +0 -5
  21. package/dist/types/useGroupOrderLines.d.ts.map +0 -1
  22. package/dist/types/useInterval.d.ts +0 -2
  23. package/dist/types/useInterval.d.ts.map +0 -1
  24. package/dist/types/useMediaUrl.d.ts +0 -12
  25. package/dist/types/useMediaUrl.d.ts.map +0 -1
  26. package/dist/types/useOnClickOutside.d.ts +0 -3
  27. package/dist/types/useOnClickOutside.d.ts.map +0 -1
  28. package/dist/types/utils/cms.d.ts +0 -12
  29. package/dist/types/utils/cms.d.ts.map +0 -1
  30. package/dist/types/utils/timeAvailabilityFilter.d.ts +0 -11
  31. package/dist/types/utils/timeAvailabilityFilter.d.ts.map +0 -1
  32. package/dist/types/utils.d.ts +0 -7
  33. package/dist/types/utils.d.ts.map +0 -1
  34. package/dist/web-09a5bf51.mjs +0 -34
  35. package/dist/web-09a5bf51.mjs.map +0 -1
  36. package/dist/web-a769eb78.js +0 -2
  37. package/dist/web-a769eb78.js.map +0 -1
@@ -1,13 +0,0 @@
1
- export * from './useAvailability';
2
- export * from './useInterval';
3
- export * from './useDisplayPrice';
4
- export * from './useGroupOrderLines';
5
- export * from './useCms';
6
- export * from './useOnClickOutside';
7
- export * from './useChannelAvailability';
8
- export * from './useMediaUrl';
9
- export * from './utils';
10
- export { isChannelOpen } from './utils/timeAvailabilityFilter';
11
- export * from './pkce';
12
- export * from './secureStorage';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC"}
@@ -1,14 +0,0 @@
1
- export declare function getRandomValues(size: number): number[];
2
- export declare function generateCodeVerifier(size: number): string;
3
- export declare enum CodeChallengeEncoding {
4
- Base64Url = 0,
5
- UriEncodedBase64 = 1
6
- }
7
- export declare function generateCodeChallenge(code_verifier: string, encoding: CodeChallengeEncoding): string;
8
- export declare type PkceChallenge = {
9
- code_verifier: string;
10
- code_challenge: string;
11
- };
12
- export declare function generatePkceChallenge(encoding?: CodeChallengeEncoding, length?: number): PkceChallenge;
13
- export declare function verifyChallenge(code_verifier: string, code_challenge: string, encoding: CodeChallengeEncoding): boolean;
14
- //# sourceMappingURL=pkce.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pkce.d.ts","sourceRoot":"","sources":["pkce.ts"],"names":[],"mappings":"AAWA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,YAQ3C;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,oBAAY,qBAAqB;IAC/B,SAAS,IAAA;IACT,gBAAgB,IAAA;CACjB;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,qBAAqB,GAC9B,MAAM,CAMR;AAED,oBAAY,aAAa,GAAG;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,QAAQ,GAAE,qBAAuD,EACjE,MAAM,SAAM,GACX,aAAa,CAQf;AAED,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,qBAAqB,WAGhC"}
@@ -1,13 +0,0 @@
1
- import { IRefreshTokenStorageHandler } from '@orderingstack/ordering-core';
2
- export interface IStorage {
3
- get: (key: string) => Promise<string | null>;
4
- set: (key: string, value: string) => Promise<void | {
5
- value: boolean;
6
- }> | void;
7
- remove: (key: string) => Promise<void | {
8
- value: boolean;
9
- }> | void;
10
- }
11
- export declare const secureStorage: IStorage;
12
- export declare const tokenStorageHandler: IRefreshTokenStorageHandler;
13
- //# sourceMappingURL=secureStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"secureStorage.d.ts","sourceRoot":"","sources":["secureStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAI3E,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,GAAG,EAAE,CACH,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,GAAG;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;IAC/C,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,GAAG;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,IAAI,CAAC;CACpE;AAqBD,eAAO,MAAM,aAAa,EAAE,QAU3B,CAAC;AAWF,eAAO,MAAM,mBAAmB,EAAE,2BAKjC,CAAC"}
@@ -1,17 +0,0 @@
1
- import { IProduct } from '@orderingstack/ordering-types';
2
- /**
3
- *
4
- * @param originalMenu
5
- * @param markOnly - boolean to only mark products with "outsideAvailabilitySlot" flag, if false removes products
6
- * @param timeZone - venue timezone
7
- * @param interval - availability checking interval [seconds]
8
- */
9
- export declare function useAvailability(originalMenu?: IProduct[], markOnly?: boolean, timeZone?: string | undefined, interval?: number): IProduct[] | undefined;
10
- export declare function useMenu({ originalMenu, markOnly, timeZone, interval, enableKeys, }: {
11
- originalMenu?: IProduct[];
12
- markOnly: boolean;
13
- timeZone?: string;
14
- interval?: number;
15
- enableKeys?: string[];
16
- }): IProduct[] | undefined;
17
- //# sourceMappingURL=useAvailability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAvailability.d.ts","sourceRoot":"","sources":["useAvailability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAOzD;;;;;;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,CAiCxB;AA6BD,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,0BAGA"}
@@ -1,7 +0,0 @@
1
- import { EChannelName, SaleChannel } from '@orderingstack/ordering-types';
2
- export declare function useKioskChannelsAvailability(channelConstraints: Partial<Record<EChannelName, SaleChannel>> | undefined): {
3
- dineInOpen: boolean;
4
- takeAwayOpen: boolean;
5
- loaded: boolean;
6
- };
7
- //# sourceMappingURL=useChannelAvailability.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useChannelAvailability.d.ts","sourceRoot":"","sources":["useChannelAvailability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAK1E,wBAAgB,4BAA4B,CAC1C,kBAAkB,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,GAAG,SAAS;;;;EA8B3E"}
@@ -1,74 +0,0 @@
1
- import { LocalizedVenueMedia } from './utils/cms';
2
- interface IVenueId {
3
- venue: string;
4
- }
5
- export declare function useCms<T>(id: string, intervalSeconds?: number, withLocalStorage?: boolean, baseUrl?: string, tenant?: string): {
6
- value: T | null;
7
- isError: boolean;
8
- isLoading: boolean;
9
- };
10
- export declare function useCmsInConfigContext<T>({ id, intervalSeconds, withLocalStorage, }: {
11
- id: string;
12
- intervalSeconds?: number;
13
- withLocalStorage?: boolean;
14
- }): {
15
- value: T | null;
16
- isError: boolean;
17
- isLoading: boolean;
18
- };
19
- export declare function useVenueCms<T extends IVenueId>(id: string, intervalSeconds?: number, withLocalStorage?: boolean, baseUrl?: string, tenant?: string, venue?: string): {
20
- value: T | null;
21
- isError: boolean;
22
- };
23
- export declare function useLocalizedVenueMedia(id: string, venue: string, locale: string, intervalSeconds?: number, withLocalStorage?: boolean): {
24
- isError?: boolean;
25
- url: string | string[] | null;
26
- fallbackUrl: string | string[] | null;
27
- mediaType?: LocalizedVenueMedia['mediaType'];
28
- };
29
- export declare function useLocalizedVenueMediaLegacy(id: string, venue: string, locale: string, intervalSeconds?: number, withLocalStorage?: boolean, baseUrl?: string, tenant?: string): {
30
- isError?: boolean;
31
- url: string | string[] | null;
32
- fallbackUrl: string | string[] | null;
33
- mediaType?: LocalizedVenueMedia['mediaType'];
34
- };
35
- interface KioskMedia {
36
- introScreen: LocalizedVenueMedia[];
37
- orderStartScreen: LocalizedVenueMedia[];
38
- inactiveScreen: LocalizedVenueMedia[];
39
- disabledScreen: LocalizedVenueMedia[];
40
- }
41
- export declare function useKioskMediaCms({ kioskMediaId, kioskMediaType, intervalSeconds, withLocalStorage, baseUrl, tenant, venue, locale, }: {
42
- kioskMediaId: string;
43
- kioskMediaType: keyof KioskMedia;
44
- intervalSeconds?: number;
45
- withLocalStorage?: boolean;
46
- baseUrl: string;
47
- tenant: string;
48
- venue: string;
49
- locale: string;
50
- imageDisplayTime?: number;
51
- }): {
52
- url: string | string[] | null;
53
- fallbackUrl: string | string[] | null;
54
- mediaType: "IMAGE" | "VIDEO" | undefined;
55
- isError: boolean;
56
- isLoading: boolean;
57
- imageDisplayTime: number | undefined;
58
- };
59
- export declare function useKioskMediaCmsWithContext({ kioskMediaId, kioskMediaType, venue, intervalSeconds, withLocalStorage, }: {
60
- kioskMediaId: string;
61
- kioskMediaType: keyof KioskMedia;
62
- venue: string;
63
- intervalSeconds?: number;
64
- withLocalStorage?: boolean;
65
- }): {
66
- url: string | string[] | null;
67
- fallbackUrl: string | string[] | null;
68
- mediaType: "IMAGE" | "VIDEO" | undefined;
69
- isError: boolean;
70
- isLoading: boolean;
71
- imageDisplayTime: number | undefined;
72
- };
73
- export {};
74
- //# sourceMappingURL=useCms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCms.d.ts","sourceRoot":"","sources":["useCms.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,mBAAmB,EACp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OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAC;CAC9C,CA8BA;AAED,UAAU,UAAU;IAClB,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;IACxC,cAAc,EAAE,mBAAmB,EAAE,CAAC;IACtC,cAAc,EAAE,mBAAmB,EAAE,CAAC;CACvC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAY,EACZ,cAAc,EACd,eAAqB,EACrB,gBAAuB,EACvB,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,GACP,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,UAAU,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;;;;;;;EAkCA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,YAAY,EACZ,cAAc,EACd,KAAK,EACL,eAAqB,EACrB,gBAAuB,GACxB,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,UAAU,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;;;;;;;EAsBA"}
@@ -1,19 +0,0 @@
1
- import { IProduct, IProductState } from '@orderingstack/ordering-types';
2
- interface UseDisplayPriceProps {
3
- product: IProduct;
4
- state?: IProductState;
5
- selected?: boolean;
6
- cheapestGroupOptionsProduct?: number;
7
- }
8
- export declare const useDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, }: UseDisplayPriceProps) => {
9
- displayPrice: number;
10
- showAsMinPrice: boolean | "" | undefined;
11
- calculatedPriceDefaultProductState: number;
12
- };
13
- export declare const calculateDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, }: UseDisplayPriceProps) => {
14
- displayPrice: number;
15
- showAsMinPrice: boolean | "" | undefined;
16
- calculatedPriceDefaultProductState: number;
17
- };
18
- export {};
19
- //# sourceMappingURL=useDisplayPrice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDisplayPrice.d.ts","sourceRoot":"","sources":["useDisplayPrice.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,aAAa,EACd,MAAM,+BAA+B,CAAC;AA8EvC,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;CACtC;AAED,eAAO,MAAM,eAAe,+DAKzB,oBAAoB;;;;CAsBtB,CAAC;AAEF,eAAO,MAAM,qBAAqB,+DAxB/B,oBAAoB;;;;CAwB6B,CAAC"}
@@ -1,5 +0,0 @@
1
- import { IOrderInBucket, IOrderLine } from '@orderingstack/ordering-types';
2
- export declare function groupOrderLines(array: IOrderLine[]): IOrderLine[];
3
- export declare function useGroupOrderLines(array: IOrderLine[]): IOrderLine[];
4
- export declare function getGroupedBucketLines(buckets?: IOrderInBucket[]): IOrderLine[] | null;
5
- //# sourceMappingURL=useGroupOrderLines.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useGroupOrderLines.d.ts","sourceRoot":"","sources":["useGroupOrderLines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3E,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,gBAqClD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,EAAE,gBAErD;AAED,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,cAAc,EAAE,GACzB,UAAU,EAAE,GAAG,IAAI,CAKrB"}
@@ -1,2 +0,0 @@
1
- export declare function useInterval(callback: Function, delay: number): () => void;
2
- //# sourceMappingURL=useInterval.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInterval.d.ts","sourceRoot":"","sources":["useInterval.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cA6B5D"}
@@ -1,12 +0,0 @@
1
- import { TMediaSize } from '@orderingstack/ordering-types';
2
- /**
3
- * @function getMediaUrl
4
- * Checks if given url is a supported image format from orderingstackmedia azure blob and returns resized image url OR original url. Defaults to 500px.
5
- */
6
- export declare function getMediaUrl(url: string, size?: TMediaSize): string;
7
- /**
8
- * @function useMediaUrl
9
- * Checks if given url is a supported image format from orderingstackmedia azure blob and returns resized image url OR original url. Defaults to 500px.
10
- */
11
- export declare function useMediaUrl(url: string, size?: TMediaSize): string;
12
- //# sourceMappingURL=useMediaUrl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMediaUrl.d.ts","sourceRoot":"","sources":["useMediaUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CA8BvE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,UAAgB,GAAG,MAAM,CAEvE"}
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare function useOnClickOutside(ref: React.RefObject<any>, handler: (event: MouseEvent | TouchEvent) => void): void;
3
- //# sourceMappingURL=useOnClickOutside.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnClickOutside.d.ts","sourceRoot":"","sources":["useOnClickOutside.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,EACzB,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,QA0BlD"}
@@ -1,12 +0,0 @@
1
- export interface LocalizedVenueMedia {
2
- mediaType: 'IMAGE' | 'VIDEO';
3
- url: {
4
- locale: string;
5
- value: string | string[];
6
- }[];
7
- venue: string;
8
- imageDisplayTime?: number;
9
- }
10
- export declare const getUrlFromLocalizedVenueMedia: (localizedVenueMedia: LocalizedVenueMedia | undefined, locale: string) => string | string[] | null;
11
- export declare const getLocalizedVenueMediaFromArray: (localizedVenueMedia: LocalizedVenueMedia[], venue: string) => LocalizedVenueMedia | undefined;
12
- //# sourceMappingURL=cms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["cms.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,GAAG,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,6BAA6B,wBACnB,mBAAmB,GAAG,SAAS,UAC5C,MAAM,6BAUf,CAAC;AAEF,eAAO,MAAM,+BAA+B,wBACrB,mBAAmB,EAAE,SACnC,MAAM,oCAMd,CAAC"}
@@ -1,11 +0,0 @@
1
- import { ConfigType } from 'dayjs';
2
- import { IProduct, ISaleChannel } from '@orderingstack/ordering-types';
3
- export declare const getHourAndMinutes: (text: string) => {
4
- hour: number;
5
- minutes: number;
6
- };
7
- export declare function isProductAvailable(item: IProduct, timeZone: string | undefined, dueTime: ConfigType): boolean;
8
- export declare const filterTimeAvailabilityOfItems: (items: IProduct[], timeZone?: string | undefined, dueTime?: ConfigType, markOnly?: boolean) => IProduct[];
9
- export declare const filterTimeAvailabilityOfProducts: (products: IProduct[], timeZone?: string | undefined, dueTime?: ConfigType, markOnly?: boolean) => IProduct[];
10
- export declare function isChannelOpen(channel: ISaleChannel | undefined, timezone: string | undefined): boolean;
11
- //# sourceMappingURL=timeAvailabilityFilter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeAvailabilityFilter.d.ts","sourceRoot":"","sources":["timeAvailabilityFilter.ts"],"names":[],"mappings":"AAGA,OAAc,EAAE,UAAU,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,EAEL,QAAQ,EACR,YAAY,EAEb,MAAM,+BAA+B,CAAC;AAevC,eAAO,MAAM,iBAAiB,SAAU,MAAM;;;CAM7C,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,GAClB,OAAO,CAuBT;AAED,eAAO,MAAM,6BAA6B,UACjC,QAAQ,EAAE,aACP,MAAM,GAAG,SAAS,YACnB,UAAU,yBAElB,QAAQ,EAmCV,CAAC;AAEF,eAAO,MAAM,gCAAgC,aACjC,QAAQ,EAAE,aACV,MAAM,GAAG,SAAS,YACnB,UAAU,mCAuCpB,CAAC;AAEF,wBAAgB,aAAa,CAC3B,OAAO,EAAE,YAAY,GAAG,SAAS,EACjC,QAAQ,EAAE,MAAM,GAAG,SAAS,WAa7B"}
@@ -1,7 +0,0 @@
1
- import { IOrderLine, IDiscount, IProduct } from '@orderingstack/ordering-types';
2
- export declare function addDiscounts(discounts: IDiscount[] | undefined): number;
3
- export declare function summarizeLineDiscounts(line: IOrderLine): number;
4
- export declare function formatPrice(value: string | number, currency?: string | null, separator?: string, decimals?: number): string;
5
- export declare function isProductEnabled(item: IProduct, enableKeys?: string[]): boolean;
6
- export declare function getProductAcronym(product: IProduct): string;
7
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEhF,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,GAAG,MAAM,CAIvE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE/D;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,SAAM,EACf,QAAQ,SAAI,GACX,MAAM,CAKR;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EACd,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAQT;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,MAAM,CAY3D"}
@@ -1,34 +0,0 @@
1
- import { WebPlugin as t } from "@capacitor/core";
2
- class i extends t {
3
- constructor() {
4
- super(...arguments), this.PREFIX = "cap_sec_", this.addPrefix = (e) => this.PREFIX + e, this.removePrefix = (e) => e.replace(this.PREFIX, "");
5
- }
6
- get(e) {
7
- const r = localStorage.getItem(this.addPrefix(e.key));
8
- return r !== null ? Promise.resolve({
9
- value: atob(r)
10
- }) : Promise.reject("Item with given key does not exist");
11
- }
12
- set(e) {
13
- return localStorage.setItem(this.addPrefix(e.key), btoa(e.value)), Promise.resolve({ value: !0 });
14
- }
15
- remove(e) {
16
- return localStorage.getItem(this.addPrefix(e.key)) ? (localStorage.removeItem(this.addPrefix(e.key)), Promise.resolve({ value: !0 })) : Promise.reject("Item with given key does not exist");
17
- }
18
- clear() {
19
- for (const e in localStorage)
20
- e.indexOf(this.PREFIX) === 0 && localStorage.removeItem(e);
21
- return Promise.resolve({ value: !0 });
22
- }
23
- keys() {
24
- const e = Object.keys(localStorage).filter((r) => r.indexOf(this.PREFIX) === 0).map(this.removePrefix);
25
- return Promise.resolve({ value: e });
26
- }
27
- getPlatform() {
28
- return Promise.resolve({ value: "web" });
29
- }
30
- }
31
- export {
32
- i as SecureStoragePluginWeb
33
- };
34
- //# sourceMappingURL=web-09a5bf51.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-09a5bf51.mjs","sources":["../node_modules/capacitor-secure-storage-plugin/dist/esm/web.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class SecureStoragePluginWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.PREFIX = 'cap_sec_';\n this.addPrefix = (key) => this.PREFIX + key;\n this.removePrefix = (key) => key.replace(this.PREFIX, '');\n }\n get(options) {\n const value = localStorage.getItem(this.addPrefix(options.key));\n return value !== null\n ? Promise.resolve({\n value: atob(value),\n })\n : Promise.reject('Item with given key does not exist');\n }\n set(options) {\n localStorage.setItem(this.addPrefix(options.key), btoa(options.value));\n return Promise.resolve({ value: true });\n }\n remove(options) {\n if (localStorage.getItem(this.addPrefix(options.key))) {\n localStorage.removeItem(this.addPrefix(options.key));\n return Promise.resolve({ value: true });\n }\n else {\n return Promise.reject('Item with given key does not exist');\n }\n }\n clear() {\n for (const key in localStorage) {\n if (key.indexOf(this.PREFIX) === 0) {\n localStorage.removeItem(key);\n }\n }\n return Promise.resolve({ value: true });\n }\n keys() {\n const keys = Object.keys(localStorage)\n .filter(k => k.indexOf(this.PREFIX) === 0)\n .map(this.removePrefix);\n return Promise.resolve({ value: keys });\n }\n getPlatform() {\n return Promise.resolve({ value: 'web' });\n }\n}\n//# sourceMappingUR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EACzC;AAAA,EACD,cAAc;AACV,WAAO,QAAQ,QAAQ,EAAE,OAAO,MAAO,CAAA;AAAA,EAC1C;AACL;","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@capacitor/core");class o extends t.WebPlugin{constructor(){super(...arguments),this.PREFIX="cap_sec_",this.addPrefix=e=>this.PREFIX+e,this.removePrefix=e=>e.replace(this.PREFIX,"")}get(e){const r=localStorage.getItem(this.addPrefix(e.key));return r!==null?Promise.resolve({value:atob(r)}):Promise.reject("Item with given key does not exist")}set(e){return localStorage.setItem(this.addPrefix(e.key),btoa(e.value)),Promise.resolve({value:!0})}remove(e){return localStorage.getItem(this.addPrefix(e.key))?(localStorage.removeItem(this.addPrefix(e.key)),Promise.resolve({value:!0})):Promise.reject("Item with given key does not exist")}clear(){for(const e in localStorage)e.indexOf(this.PREFIX)===0&&localStorage.removeItem(e);return Promise.resolve({value:!0})}keys(){const e=Object.keys(localStorage).filter(r=>r.indexOf(this.PREFIX)===0).map(this.removePrefix);return Promise.resolve({value:e})}getPlatform(){return Promise.resolve({value:"web"})}}exports.SecureStoragePluginWeb=o;
2
- //# sourceMappingURL=web-a769eb78.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-a769eb78.js","sources":["../node_modules/capacitor-secure-storage-plugin/dist/esm/web.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class SecureStoragePluginWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.PREFIX = 'cap_sec_';\n this.addPrefix = (key) => this.PREFIX + key;\n this.removePrefix = (key) => key.replace(this.PREFIX, '');\n }\n get(options) {\n const value = localStorage.getItem(this.addPrefix(options.key));\n return value !== null\n ? Promise.resolve({\n value: atob(value),\n })\n : Promise.reject('Item with given key does not exist');\n }\n set(options) {\n localStorage.setItem(this.addPrefix(options.key), btoa(options.value));\n return Promise.resolve({ value: true });\n }\n remove(options) {\n if (localStorage.getItem(this.addPrefix(options.key))) {\n localStorage.removeItem(this.addPrefix(options.key));\n return Promise.resolve({ value: true });\n }\n else {\n return Promise.reject('Item with given key does not exist');\n }\n }\n clear() {\n for (const key in localStorage) {\n if (key.indexOf(this.PREFIX) === 0) {\n localStorage.removeItem(key);\n }\n }\n return Promise.resolve({ value: true });\n }\n keys() {\n const keys = Object.keys(localStorage)\n .filter(k => k.indexOf(this.PREFIX) === 0)\n .map(this.removePrefix);\n return Promise.resolve({ value: keys });\n }\n getPlatform() {\n return Promise.resolve({ value: 'web' });\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["SecureStoragePluginWeb","WebPlugin","key","options","value","keys","k"],"mappings":"mHACO,MAAMA,UAA+BC,EAAAA,SAAU,CAClD,aAAc,CACV,MAAM,GAAG,SAAS,EAClB,KAAK,OAAS,WACd,KAAK,UAAaC,GAAQ,KAAK,OAASA,EACxC,KAAK,aAAgBA,GAAQA,EAAI,QAAQ,KAAK,OAAQ,EAAE,CAC3D,CACD,IAAIC,EAAS,CACT,MAAMC,EAAQ,aAAa,QAAQ,KAAK,UAAUD,EAAQ,GAAG,CAAC,EAC9D,OAAOC,IAAU,KACX,QAAQ,QAAQ,CACd,MAAO,KAAKA,CAAK,CACjC,CAAa,EACC,QAAQ,OAAO,oCAAoC,CAC5D,CACD,IAAID,EAAS,CACT,oBAAa,QAAQ,KAAK,UAAUA,EAAQ,GAAG,EAAG,KAAKA,EAAQ,KAAK,CAAC,EAC9D,QAAQ,QAAQ,CAAE,MAAO,EAAM,CAAA,CACzC,CACD,OAAOA,EAAS,CACZ,OAAI,aAAa,QAAQ,KAAK,UAAUA,EAAQ,GAAG,CAAC,GAChD,aAAa,WAAW,KAAK,UAAUA,EAAQ,GAAG,CAAC,EAC5C,QAAQ,QAAQ,CAAE,MAAO,EAAM,CAAA,GAG/B,QAAQ,OAAO,oCAAoC,CAEjE,CACD,OAAQ,CACJ,UAAWD,KAAO,aACVA,EAAI,QAAQ,KAAK,MAAM,IAAM,G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