@orderingstack/ordering-types 1.0.11 → 1.0.12

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.
@@ -101,7 +101,7 @@ export interface IProduct {
101
101
  attrs?: Record<string, string | boolean>;
102
102
  }
103
103
  export interface IProductState {
104
- selected: IProductStateFilter;
104
+ selected: IProductStateSelected;
105
105
  filter: IProductStateFilter;
106
106
  }
107
107
  export interface IProductStateFilter {
@@ -1,7 +1,7 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { UseFormRegisterReturn } from "react-hook-form";
3
3
  import { UseTransitionProps } from "react-spring";
4
- import { IProduct, IOrder } from "./index";
4
+ import { IProduct, IOrder, IProductStateSelected, IProductStateFilter } from "./index";
5
5
  import { IOrderLine } from "./index";
6
6
  export declare enum EPaymentStatus {
7
7
  UNINITIALIZED = "UNINITIALIZED",
@@ -88,10 +88,16 @@ export interface IProductConfiguratorProps {
88
88
  isOpen?: boolean;
89
89
  showDebugState?: boolean;
90
90
  lang?: string;
91
- handleAddToCart: (obj: any) => void;
91
+ handleAddToCart: (data: IAddToCartData) => void;
92
92
  handleGoBack: () => void;
93
93
  handleClose?: () => void;
94
94
  }
95
+ export interface IAddToCartData {
96
+ price: string;
97
+ quantity: number;
98
+ selected: IProductStateSelected;
99
+ filter: IProductStateFilter;
100
+ }
95
101
  export interface IProductConfiguratorComponents {
96
102
  MenuProductRootUI?: React.FC<IMenuProductRootUIProps>;
97
103
  MenuItemsUI?: React.FC<IMenuItemsUIProps>;
@@ -114,7 +120,7 @@ export interface IMenuProductRootUIProps {
114
120
  export interface IMenuOptionsUIProps {
115
121
  optionsItem: IProduct;
116
122
  parentSelCtx: string;
117
- selected: any;
123
+ selected: IProductStateSelected;
118
124
  isOnSubmitted: boolean;
119
125
  actualQtyCnt: number;
120
126
  actualSelCnt: number;
@@ -101,7 +101,7 @@ export interface IProduct {
101
101
  attrs?: Record<string, string | boolean>;
102
102
  }
103
103
  export interface IProductState {
104
- selected: IProductStateFilter;
104
+ selected: IProductStateSelected;
105
105
  filter: IProductStateFilter;
106
106
  }
107
107
  export interface IProductStateFilter {
@@ -1,7 +1,7 @@
1
1
  import React, { ReactElement } from "react";
2
2
  import { UseFormRegisterReturn } from "react-hook-form";
3
3
  import { UseTransitionProps } from "react-spring";
4
- import { IProduct, IOrder } from "./index";
4
+ import { IProduct, IOrder, IProductStateSelected, IProductStateFilter } from "./index";
5
5
  import { IOrderLine } from "./index";
6
6
  export declare enum EPaymentStatus {
7
7
  UNINITIALIZED = "UNINITIALIZED",
@@ -88,10 +88,16 @@ export interface IProductConfiguratorProps {
88
88
  isOpen?: boolean;
89
89
  showDebugState?: boolean;
90
90
  lang?: string;
91
- handleAddToCart: (obj: any) => void;
91
+ handleAddToCart: (data: IAddToCartData) => void;
92
92
  handleGoBack: () => void;
93
93
  handleClose?: () => void;
94
94
  }
95
+ export interface IAddToCartData {
96
+ price: string;
97
+ quantity: number;
98
+ selected: IProductStateSelected;
99
+ filter: IProductStateFilter;
100
+ }
95
101
  export interface IProductConfiguratorComponents {
96
102
  MenuProductRootUI?: React.FC<IMenuProductRootUIProps>;
97
103
  MenuItemsUI?: React.FC<IMenuItemsUIProps>;
@@ -114,7 +120,7 @@ export interface IMenuProductRootUIProps {
114
120
  export interface IMenuOptionsUIProps {
115
121
  optionsItem: IProduct;
116
122
  parentSelCtx: string;
117
- selected: any;
123
+ selected: IProductStateSelected;
118
124
  isOnSubmitted: boolean;
119
125
  actualQtyCnt: number;
120
126
  actualSelCnt: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orderingstack/ordering-types",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Typescript types for @orderingstack",
5
5
  "types": "dist/esm/index.d.ts",
6
6
  "main": "dist/cjs/index.js",