@orderingstack/front-hooks 2.2.0 → 2.3.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.
@@ -4,4 +4,5 @@ export * from './useDisplayPrice';
4
4
  export * from './useGroupOrderLines';
5
5
  export * from './useCms';
6
6
  export * from './useOnClickOutside';
7
+ export * from './useChannelAvailability';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
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"}
@@ -0,0 +1,6 @@
1
+ import { EChannelName, SaleChannel } from '@orderingstack/ordering-types';
2
+ export declare function useKioskChannelsAvailability(channelConstrainst: Partial<Record<EChannelName, SaleChannel>> | undefined): {
3
+ dineInOpen: boolean;
4
+ takeAwayOpen: boolean;
5
+ };
6
+ //# sourceMappingURL=useChannelAvailability.d.ts.map
@@ -0,0 +1 @@
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,5 +1,5 @@
1
1
  import { ConfigType } from 'dayjs';
2
- import { Product } from '@orderingstack/ordering-types';
2
+ import { Product, SaleChannel } from '@orderingstack/ordering-types';
3
3
  export declare const getHourAndMinutes: (text: string) => {
4
4
  hour: number;
5
5
  minutes: number;
@@ -7,4 +7,5 @@ export declare const getHourAndMinutes: (text: string) => {
7
7
  export declare function isProductAvailable(item: Product, timeZone: string | undefined, dueTime: ConfigType): boolean;
8
8
  export declare const filterTimeAvailabilityOfItems: (items: Product[], timeZone?: string | undefined, dueTime?: ConfigType, markOnly?: boolean) => Product[];
9
9
  export declare const filterTimeAvailabilityOfProducts: (products: Product[], timeZone?: string | undefined, dueTime?: ConfigType, markOnly?: boolean) => Product[];
10
+ export declare function isChannelOpen(channel: SaleChannel | undefined): boolean;
10
11
  //# sourceMappingURL=timeAvailabilityFilter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"timeAvailabilityFilter.d.ts","sourceRoot":"","sources":["timeAvailabilityFilter.ts"],"names":[],"mappings":"AAGA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAgB,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAetE,eAAO,MAAM,iBAAiB,SAAU,MAAM;;;CAM7C,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,GAClB,OAAO,CAuBT;AAED,eAAO,MAAM,6BAA6B,UACjC,OAAO,EAAE,aACN,MAAM,GAAG,SAAS,YACnB,UAAU,yBAElB,OAAO,EAmCT,CAAC;AAEF,eAAO,MAAM,gCAAgC,aACjC,OAAO,EAAE,aACT,MAAM,GAAG,SAAS,YACnB,UAAU,kCAuCpB,CAAC"}
1
+ {"version":3,"file":"timeAvailabilityFilter.d.ts","sourceRoot":"","sources":["timeAvailabilityFilter.ts"],"names":[],"mappings":"AAGA,OAAc,EAAE,UAAU,EAAS,MAAM,OAAO,CAAC;AACjD,OAAO,EAEL,OAAO,EACP,WAAW,EAEZ,MAAM,+BAA+B,CAAC;AAevC,eAAO,MAAM,iBAAiB,SAAU,MAAM;;;CAM7C,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,GAClB,OAAO,CAuBT;AAED,eAAO,MAAM,6BAA6B,UACjC,OAAO,EAAE,aACN,MAAM,GAAG,SAAS,YACnB,UAAU,yBAElB,OAAO,EAmCT,CAAC;AAEF,eAAO,MAAM,gCAAgC,aACjC,OAAO,EAAE,aACT,MAAM,GAAG,SAAS,YACnB,UAAU,kCAuCpB,CAAC;AAEF,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,WAY7D"}
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "@orderingstack/front-hooks",
3
- "version": "2.2.0",
4
- "license": "MIT",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.es.js",
7
- "types": "dist/src/index.d.ts",
8
- "files": [
9
- "dist"
10
- ],
11
- "scripts": {
12
- "dev": "vite",
13
- "build": "vite build",
14
- "test": "jest",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "dependencies": {
18
- "@orderingstack/ordering-core": "^0.3.0",
19
- "@orderingstack/ordering-types": "^0.1.6",
20
- "dayjs": "^1.11.3",
21
- "lodash": "^4.17.21"
22
- },
23
- "peerDependencies": {
24
- "@orderingstack/ordering-core-react": "^0.4.0",
25
- "react": ">=16.8.0"
26
- },
27
- "devDependencies": {
28
- "@orderingstack/ordering-core-react": "^0.4.0",
29
- "@types/node": "^17.0.8",
30
- "@types/react": "^17.0.38",
31
- "@vitejs/plugin-react": "^1.1.4",
32
- "react": "^18.2.0",
33
- "typescript": "^4.5.4",
34
- "vite": "^2.7.10",
35
- "vite-plugin-dts": "^1.2.0",
36
- "vite-tsconfig-paths": "^3.3.17"
37
- },
38
- "browserslist": [
39
- "last 2 versions",
40
- "> 1%",
41
- "not dead",
42
- "not ie <= 11",
43
- "not op_mini all"
44
- ]
45
- }
1
+ {
2
+ "name": "@orderingstack/front-hooks",
3
+ "version": "2.3.1",
4
+ "license": "MIT",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.es.js",
7
+ "types": "dist/src/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "dev": "vite",
13
+ "build": "vite build",
14
+ "test": "jest",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "dependencies": {
18
+ "@orderingstack/ordering-core": "^0.3.0",
19
+ "@orderingstack/ordering-types": "^0.1.7",
20
+ "dayjs": "^1.11.3",
21
+ "lodash": "^4.17.21"
22
+ },
23
+ "peerDependencies": {
24
+ "@orderingstack/ordering-core-react": "^0.4.0",
25
+ "react": ">=16.8.0"
26
+ },
27
+ "devDependencies": {
28
+ "@orderingstack/ordering-core-react": "^0.4.0",
29
+ "@types/node": "^17.0.8",
30
+ "@types/react": "^17.0.38",
31
+ "@vitejs/plugin-react": "^1.1.4",
32
+ "react": "^18.2.0",
33
+ "typescript": "^4.5.4",
34
+ "vite": "^2.7.10",
35
+ "vite-plugin-dts": "^1.2.0",
36
+ "vite-tsconfig-paths": "^3.3.17"
37
+ },
38
+ "browserslist": [
39
+ "last 2 versions",
40
+ "> 1%",
41
+ "not dead",
42
+ "not ie <= 11",
43
+ "not op_mini all"
44
+ ]
45
+ }