@orderingstack/front-hooks 2.2.0 → 3.0.0
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 +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +109 -66
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/useChannelAvailability.d.ts +6 -0
- package/dist/src/useChannelAvailability.d.ts.map +1 -0
- package/dist/src/useDisplayPrice.d.ts +1 -1
- package/dist/src/useGroupOrderLines.d.ts +4 -4
- package/dist/src/useGroupOrderLines.d.ts.map +1 -1
- package/dist/src/utils/timeAvailabilityFilter.d.ts +5 -4
- package/dist/src/utils/timeAvailabilityFilter.d.ts.map +1 -1
- package/package.json +45 -45
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -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"}
|
|
@@ -7,7 +7,7 @@ interface UseDisplayPriceProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const useDisplayPrice: ({ product, state, selected, cheapestGroupOptionsProduct, }: UseDisplayPriceProps) => {
|
|
9
9
|
displayPrice: number;
|
|
10
|
-
showAsMinPrice:
|
|
10
|
+
showAsMinPrice: any;
|
|
11
11
|
calculatedPriceDefaultProductState: number;
|
|
12
12
|
};
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function groupOrderLines(array:
|
|
3
|
-
export declare function useGroupOrderLines(array:
|
|
4
|
-
export declare function getGroupedBucketLines(buckets?:
|
|
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
5
|
//# sourceMappingURL=useGroupOrderLines.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGroupOrderLines.d.ts","sourceRoot":"","sources":["useGroupOrderLines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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,10 +1,11 @@
|
|
|
1
1
|
import { ConfigType } from 'dayjs';
|
|
2
|
-
import {
|
|
2
|
+
import { IProduct, SaleChannel } from '@orderingstack/ordering-types';
|
|
3
3
|
export declare const getHourAndMinutes: (text: string) => {
|
|
4
4
|
hour: number;
|
|
5
5
|
minutes: number;
|
|
6
6
|
};
|
|
7
|
-
export declare function isProductAvailable(item:
|
|
8
|
-
export declare const filterTimeAvailabilityOfItems: (items:
|
|
9
|
-
export declare const filterTimeAvailabilityOfProducts: (products:
|
|
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: 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,
|
|
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,WAAW,EAEZ,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,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,WAY7D"}
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@orderingstack/front-hooks",
|
|
3
|
-
"version": "
|
|
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.
|
|
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": "3.0.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": "^1.0.3",
|
|
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
|
+
}
|