@orderingstack/front-hooks 2.3.1 → 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.
@@ -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: boolean | "" | undefined;
10
+ showAsMinPrice: any;
11
11
  calculatedPriceDefaultProductState: number;
12
12
  };
13
13
  export {};
@@ -1,5 +1,5 @@
1
- import { OrderInBucket, OrderLine } from '@orderingstack/ordering-types';
2
- export declare function groupOrderLines(array: OrderLine[]): OrderLine[];
3
- export declare function useGroupOrderLines(array: OrderLine[]): OrderLine[];
4
- export declare function getGroupedBucketLines(buckets?: OrderInBucket[]): OrderLine[] | null;
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,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,EAAE,eAqCjD;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,eAEpD;AAED,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,aAAa,EAAE,GACxB,SAAS,EAAE,GAAG,IAAI,CAKpB"}
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,11 +1,11 @@
1
1
  import { ConfigType } from 'dayjs';
2
- import { Product, SaleChannel } from '@orderingstack/ordering-types';
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: Product, timeZone: string | undefined, dueTime: ConfigType): boolean;
8
- export declare const filterTimeAvailabilityOfItems: (items: Product[], timeZone?: string | undefined, dueTime?: ConfigType, markOnly?: boolean) => Product[];
9
- export declare const filterTimeAvailabilityOfProducts: (products: Product[], timeZone?: string | undefined, dueTime?: ConfigType, markOnly?: boolean) => Product[];
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
10
  export declare function isChannelOpen(channel: SaleChannel | undefined): boolean;
11
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,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"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/front-hooks",
3
- "version": "2.3.1",
3
+ "version": "3.0.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@orderingstack/ordering-core": "^0.3.0",
19
- "@orderingstack/ordering-types": "^0.1.7",
19
+ "@orderingstack/ordering-types": "^1.0.3",
20
20
  "dayjs": "^1.11.3",
21
21
  "lodash": "^4.17.21"
22
22
  },