@medusajs/draft-order 2.10.4-preview-20250928000328 → 2.10.4-preview-20250928031806
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/.medusa/server/src/admin/index.js +27 -27
- package/.medusa/server/src/admin/index.mjs +27 -27
- package/package.json +16 -16
|
@@ -9763,6 +9763,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9763
9763
|
) });
|
|
9764
9764
|
};
|
|
9765
9765
|
const schema$5 = addressSchema;
|
|
9766
|
+
const CustomItems = () => {
|
|
9767
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9768
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9769
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9770
|
+
] });
|
|
9771
|
+
};
|
|
9772
|
+
const CustomItemsForm = () => {
|
|
9773
|
+
const form = reactHookForm.useForm({
|
|
9774
|
+
resolver: zod.zodResolver(schema$4)
|
|
9775
|
+
});
|
|
9776
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9777
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9778
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9779
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9780
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9781
|
+
] }) })
|
|
9782
|
+
] }) });
|
|
9783
|
+
};
|
|
9784
|
+
const schema$4 = objectType({
|
|
9785
|
+
email: stringType().email()
|
|
9786
|
+
});
|
|
9766
9787
|
const Email = () => {
|
|
9767
9788
|
const { id } = reactRouterDom.useParams();
|
|
9768
9789
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9785,7 +9806,7 @@ const EmailForm = ({ order }) => {
|
|
|
9785
9806
|
defaultValues: {
|
|
9786
9807
|
email: order.email ?? ""
|
|
9787
9808
|
},
|
|
9788
|
-
resolver: zod.zodResolver(schema$
|
|
9809
|
+
resolver: zod.zodResolver(schema$3)
|
|
9789
9810
|
});
|
|
9790
9811
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9791
9812
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9828,7 +9849,7 @@ const EmailForm = ({ order }) => {
|
|
|
9828
9849
|
}
|
|
9829
9850
|
) });
|
|
9830
9851
|
};
|
|
9831
|
-
const schema$
|
|
9852
|
+
const schema$3 = objectType({
|
|
9832
9853
|
email: stringType().email()
|
|
9833
9854
|
});
|
|
9834
9855
|
const NumberInput = React.forwardRef(
|
|
@@ -10805,27 +10826,6 @@ const customItemSchema = objectType({
|
|
|
10805
10826
|
quantity: numberType(),
|
|
10806
10827
|
unit_price: unionType([numberType(), stringType()])
|
|
10807
10828
|
});
|
|
10808
|
-
const CustomItems = () => {
|
|
10809
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
10810
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
10811
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
10812
|
-
] });
|
|
10813
|
-
};
|
|
10814
|
-
const CustomItemsForm = () => {
|
|
10815
|
-
const form = reactHookForm.useForm({
|
|
10816
|
-
resolver: zod.zodResolver(schema$3)
|
|
10817
|
-
});
|
|
10818
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
10819
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
10820
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10821
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10822
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
10823
|
-
] }) })
|
|
10824
|
-
] }) });
|
|
10825
|
-
};
|
|
10826
|
-
const schema$3 = objectType({
|
|
10827
|
-
email: stringType().email()
|
|
10828
|
-
});
|
|
10829
10829
|
const InlineTip = React.forwardRef(
|
|
10830
10830
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
10831
10831
|
const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
|
|
@@ -13069,6 +13069,10 @@ const routeModule = {
|
|
|
13069
13069
|
Component: BillingAddress,
|
|
13070
13070
|
path: "/draft-orders/:id/billing-address"
|
|
13071
13071
|
},
|
|
13072
|
+
{
|
|
13073
|
+
Component: CustomItems,
|
|
13074
|
+
path: "/draft-orders/:id/custom-items"
|
|
13075
|
+
},
|
|
13072
13076
|
{
|
|
13073
13077
|
Component: Email,
|
|
13074
13078
|
path: "/draft-orders/:id/email"
|
|
@@ -13077,10 +13081,6 @@ const routeModule = {
|
|
|
13077
13081
|
Component: Items,
|
|
13078
13082
|
path: "/draft-orders/:id/items"
|
|
13079
13083
|
},
|
|
13080
|
-
{
|
|
13081
|
-
Component: CustomItems,
|
|
13082
|
-
path: "/draft-orders/:id/custom-items"
|
|
13083
|
-
},
|
|
13084
13084
|
{
|
|
13085
13085
|
Component: Metadata,
|
|
13086
13086
|
path: "/draft-orders/:id/metadata"
|
|
@@ -9757,6 +9757,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9757
9757
|
) });
|
|
9758
9758
|
};
|
|
9759
9759
|
const schema$5 = addressSchema;
|
|
9760
|
+
const CustomItems = () => {
|
|
9761
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9762
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9763
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9764
|
+
] });
|
|
9765
|
+
};
|
|
9766
|
+
const CustomItemsForm = () => {
|
|
9767
|
+
const form = useForm({
|
|
9768
|
+
resolver: zodResolver(schema$4)
|
|
9769
|
+
});
|
|
9770
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9771
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9772
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9773
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9774
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9775
|
+
] }) })
|
|
9776
|
+
] }) });
|
|
9777
|
+
};
|
|
9778
|
+
const schema$4 = objectType({
|
|
9779
|
+
email: stringType().email()
|
|
9780
|
+
});
|
|
9760
9781
|
const Email = () => {
|
|
9761
9782
|
const { id } = useParams();
|
|
9762
9783
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9779,7 +9800,7 @@ const EmailForm = ({ order }) => {
|
|
|
9779
9800
|
defaultValues: {
|
|
9780
9801
|
email: order.email ?? ""
|
|
9781
9802
|
},
|
|
9782
|
-
resolver: zodResolver(schema$
|
|
9803
|
+
resolver: zodResolver(schema$3)
|
|
9783
9804
|
});
|
|
9784
9805
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9785
9806
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9822,7 +9843,7 @@ const EmailForm = ({ order }) => {
|
|
|
9822
9843
|
}
|
|
9823
9844
|
) });
|
|
9824
9845
|
};
|
|
9825
|
-
const schema$
|
|
9846
|
+
const schema$3 = objectType({
|
|
9826
9847
|
email: stringType().email()
|
|
9827
9848
|
});
|
|
9828
9849
|
const NumberInput = forwardRef(
|
|
@@ -10799,27 +10820,6 @@ const customItemSchema = objectType({
|
|
|
10799
10820
|
quantity: numberType(),
|
|
10800
10821
|
unit_price: unionType([numberType(), stringType()])
|
|
10801
10822
|
});
|
|
10802
|
-
const CustomItems = () => {
|
|
10803
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
10804
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
10805
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
10806
|
-
] });
|
|
10807
|
-
};
|
|
10808
|
-
const CustomItemsForm = () => {
|
|
10809
|
-
const form = useForm({
|
|
10810
|
-
resolver: zodResolver(schema$3)
|
|
10811
|
-
});
|
|
10812
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
10813
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
10814
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10815
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10816
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
10817
|
-
] }) })
|
|
10818
|
-
] }) });
|
|
10819
|
-
};
|
|
10820
|
-
const schema$3 = objectType({
|
|
10821
|
-
email: stringType().email()
|
|
10822
|
-
});
|
|
10823
10823
|
const InlineTip = forwardRef(
|
|
10824
10824
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
10825
10825
|
const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
|
|
@@ -13063,6 +13063,10 @@ const routeModule = {
|
|
|
13063
13063
|
Component: BillingAddress,
|
|
13064
13064
|
path: "/draft-orders/:id/billing-address"
|
|
13065
13065
|
},
|
|
13066
|
+
{
|
|
13067
|
+
Component: CustomItems,
|
|
13068
|
+
path: "/draft-orders/:id/custom-items"
|
|
13069
|
+
},
|
|
13066
13070
|
{
|
|
13067
13071
|
Component: Email,
|
|
13068
13072
|
path: "/draft-orders/:id/email"
|
|
@@ -13071,10 +13075,6 @@ const routeModule = {
|
|
|
13071
13075
|
Component: Items,
|
|
13072
13076
|
path: "/draft-orders/:id/items"
|
|
13073
13077
|
},
|
|
13074
|
-
{
|
|
13075
|
-
Component: CustomItems,
|
|
13076
|
-
path: "/draft-orders/:id/custom-items"
|
|
13077
|
-
},
|
|
13078
13078
|
{
|
|
13079
13079
|
Component: Metadata,
|
|
13080
13080
|
path: "/draft-orders/:id/metadata"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.10.4-preview-
|
|
3
|
+
"version": "2.10.4-preview-20250928031806",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@ariakit/react": "^0.4.15",
|
|
38
38
|
"@hookform/resolvers": "3.4.2",
|
|
39
|
-
"@medusajs/js-sdk": "2.10.4-preview-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.4-preview-20250928031806",
|
|
40
40
|
"@tanstack/react-query": "5.64.2",
|
|
41
41
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
42
42
|
"date-fns": "^3.6.0",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"react-hook-form": "7.49.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@medusajs/admin-sdk": "2.10.4-preview-
|
|
49
|
-
"@medusajs/cli": "2.10.4-preview-
|
|
50
|
-
"@medusajs/framework": "2.10.4-preview-
|
|
51
|
-
"@medusajs/icons": "2.10.4-preview-
|
|
52
|
-
"@medusajs/test-utils": "2.10.4-preview-
|
|
53
|
-
"@medusajs/types": "2.10.4-preview-
|
|
54
|
-
"@medusajs/ui": "4.0.24-preview-
|
|
55
|
-
"@medusajs/ui-preset": "2.10.4-preview-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.4-preview-20250928031806",
|
|
49
|
+
"@medusajs/cli": "2.10.4-preview-20250928031806",
|
|
50
|
+
"@medusajs/framework": "2.10.4-preview-20250928031806",
|
|
51
|
+
"@medusajs/icons": "2.10.4-preview-20250928031806",
|
|
52
|
+
"@medusajs/test-utils": "2.10.4-preview-20250928031806",
|
|
53
|
+
"@medusajs/types": "2.10.4-preview-20250928031806",
|
|
54
|
+
"@medusajs/ui": "4.0.24-preview-20250928031806",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.4-preview-20250928031806",
|
|
56
56
|
"@swc/core": "1.5.7",
|
|
57
57
|
"@types/lodash": "^4.17.15",
|
|
58
58
|
"@types/node": "^20.0.0",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"yalc": "^1.0.0-pre.53"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@medusajs/admin-sdk": "2.10.4-preview-
|
|
73
|
-
"@medusajs/cli": "2.10.4-preview-
|
|
74
|
-
"@medusajs/framework": "2.10.4-preview-
|
|
75
|
-
"@medusajs/icons": "2.10.4-preview-
|
|
76
|
-
"@medusajs/test-utils": "2.10.4-preview-
|
|
77
|
-
"@medusajs/ui": "4.0.24-preview-
|
|
72
|
+
"@medusajs/admin-sdk": "2.10.4-preview-20250928031806",
|
|
73
|
+
"@medusajs/cli": "2.10.4-preview-20250928031806",
|
|
74
|
+
"@medusajs/framework": "2.10.4-preview-20250928031806",
|
|
75
|
+
"@medusajs/icons": "2.10.4-preview-20250928031806",
|
|
76
|
+
"@medusajs/test-utils": "2.10.4-preview-20250928031806",
|
|
77
|
+
"@medusajs/ui": "4.0.24-preview-20250928031806",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"react-router-dom": "6.20.1"
|
|
80
80
|
},
|