@haus-storefront-react/order-lines 0.0.7-7 → 0.0.7
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/CHANGELOG.md +10 -0
- package/{browser-ponyfill-DFz-3q6m.js → browser-ponyfill-DicrKK9y.js} +1 -1
- package/{browser-ponyfill-B_yI7w9n.mjs → browser-ponyfill-DvWJIATn.mjs} +1 -1
- package/{index-DAbK1bQ6.mjs → index-7xbm4Bku.mjs} +1632 -1615
- package/index-Ce7xqKjB.js +118 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/lib/use-order-lines-props.d.ts +8 -7
- package/package.json +6 -6
- package/index-JMFYzKY3.js +0 -118
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Ce7xqKjB.js");exports.OrderLines=e.OrderLines;exports.createOrderLinesScope=e.createOrderLinesScope;exports.useOrderLinesProps=e.useOrderLinesProps;
|
package/index.mjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { Maybe, OrderLine } from '@haus-storefront-react/shared-types';
|
|
1
|
+
import { Maybe, Order, OrderLine } from '@haus-storefront-react/shared-types';
|
|
2
2
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
-
import {
|
|
4
|
-
export type UseOrderLinesResult = UseQueryResult<Maybe<
|
|
3
|
+
import { WebButtonProps, NativeButtonProps, WebInputProps, NativeInputProps } from '@haus-storefront-react/common-utils';
|
|
4
|
+
export type UseOrderLinesResult = UseQueryResult<Maybe<Order>, Error> & {
|
|
5
|
+
orderLines: OrderLine[] | undefined;
|
|
5
6
|
adjustOrderLine: (orderLineId: string, quantity: number) => Promise<unknown>;
|
|
6
7
|
removeOrderLine: (lineId: string) => Promise<unknown>;
|
|
7
8
|
adjustError: Error | null;
|
|
8
9
|
removeError: Error | null;
|
|
9
10
|
isAdjusting: boolean;
|
|
10
11
|
isRemoving: boolean;
|
|
11
|
-
getRemoveProps: (props?:
|
|
12
|
-
getAdjustProps: (props?:
|
|
13
|
-
getDecrementProps: (props?:
|
|
14
|
-
getIncrementProps: (props?:
|
|
12
|
+
getRemoveProps: (orderLineId: string, props?: object) => WebButtonProps | NativeButtonProps;
|
|
13
|
+
getAdjustProps: (orderLineId: string, props?: object) => WebInputProps | NativeInputProps;
|
|
14
|
+
getDecrementProps: (orderLineId: string, props?: object) => WebButtonProps | NativeButtonProps;
|
|
15
|
+
getIncrementProps: (orderLineId: string, props?: object) => WebButtonProps | NativeButtonProps;
|
|
15
16
|
};
|
|
16
17
|
interface UseOrderLinesOptions {
|
|
17
18
|
orderCode?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haus-storefront-react/order-lines",
|
|
3
|
-
"version": "0.0.7
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@haus-storefront-react/common-ui": "0.0.7
|
|
15
|
-
"@haus-storefront-react/common-utils": "0.0.7
|
|
16
|
-
"@haus-storefront-react/core": "0.0.7
|
|
17
|
-
"@haus-storefront-react/hooks": "0.0.7
|
|
18
|
-
"@haus-storefront-react/shared-types": "0.0.7
|
|
14
|
+
"@haus-storefront-react/common-ui": "0.0.7",
|
|
15
|
+
"@haus-storefront-react/common-utils": "0.0.7",
|
|
16
|
+
"@haus-storefront-react/core": "0.0.7",
|
|
17
|
+
"@haus-storefront-react/hooks": "0.0.7",
|
|
18
|
+
"@haus-storefront-react/shared-types": "0.0.7"
|
|
19
19
|
}
|
|
20
20
|
}
|