@medusajs/draft-order 2.11.4-preview-20251105210139 → 2.11.4-preview-20251106000308
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 +26 -26
- package/.medusa/server/src/admin/index.mjs +26 -26
- package/package.json +16 -16
|
@@ -9758,6 +9758,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9758
9758
|
) });
|
|
9759
9759
|
};
|
|
9760
9760
|
const schema$5 = addressSchema;
|
|
9761
|
+
const CustomItems = () => {
|
|
9762
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9763
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9764
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9765
|
+
] });
|
|
9766
|
+
};
|
|
9767
|
+
const CustomItemsForm = () => {
|
|
9768
|
+
const form = reactHookForm.useForm({
|
|
9769
|
+
resolver: zod.zodResolver(schema$4)
|
|
9770
|
+
});
|
|
9771
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9772
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9773
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9774
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9775
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9776
|
+
] }) })
|
|
9777
|
+
] }) });
|
|
9778
|
+
};
|
|
9779
|
+
const schema$4 = objectType({
|
|
9780
|
+
email: stringType().email()
|
|
9781
|
+
});
|
|
9761
9782
|
const Email = () => {
|
|
9762
9783
|
const { id } = reactRouterDom.useParams();
|
|
9763
9784
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9780,7 +9801,7 @@ const EmailForm = ({ order }) => {
|
|
|
9780
9801
|
defaultValues: {
|
|
9781
9802
|
email: order.email ?? ""
|
|
9782
9803
|
},
|
|
9783
|
-
resolver: zod.zodResolver(schema$
|
|
9804
|
+
resolver: zod.zodResolver(schema$3)
|
|
9784
9805
|
});
|
|
9785
9806
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9786
9807
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9823,27 +9844,6 @@ const EmailForm = ({ order }) => {
|
|
|
9823
9844
|
}
|
|
9824
9845
|
) });
|
|
9825
9846
|
};
|
|
9826
|
-
const schema$4 = objectType({
|
|
9827
|
-
email: stringType().email()
|
|
9828
|
-
});
|
|
9829
|
-
const CustomItems = () => {
|
|
9830
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9831
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9832
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9833
|
-
] });
|
|
9834
|
-
};
|
|
9835
|
-
const CustomItemsForm = () => {
|
|
9836
|
-
const form = reactHookForm.useForm({
|
|
9837
|
-
resolver: zod.zodResolver(schema$3)
|
|
9838
|
-
});
|
|
9839
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9840
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9841
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9842
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9843
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9844
|
-
] }) })
|
|
9845
|
-
] }) });
|
|
9846
|
-
};
|
|
9847
9847
|
const schema$3 = objectType({
|
|
9848
9848
|
email: stringType().email()
|
|
9849
9849
|
});
|
|
@@ -13064,14 +13064,14 @@ const routeModule = {
|
|
|
13064
13064
|
Component: BillingAddress,
|
|
13065
13065
|
path: "/draft-orders/:id/billing-address"
|
|
13066
13066
|
},
|
|
13067
|
-
{
|
|
13068
|
-
Component: Email,
|
|
13069
|
-
path: "/draft-orders/:id/email"
|
|
13070
|
-
},
|
|
13071
13067
|
{
|
|
13072
13068
|
Component: CustomItems,
|
|
13073
13069
|
path: "/draft-orders/:id/custom-items"
|
|
13074
13070
|
},
|
|
13071
|
+
{
|
|
13072
|
+
Component: Email,
|
|
13073
|
+
path: "/draft-orders/:id/email"
|
|
13074
|
+
},
|
|
13075
13075
|
{
|
|
13076
13076
|
Component: Items,
|
|
13077
13077
|
path: "/draft-orders/:id/items"
|
|
@@ -9751,6 +9751,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9751
9751
|
) });
|
|
9752
9752
|
};
|
|
9753
9753
|
const schema$5 = addressSchema;
|
|
9754
|
+
const CustomItems = () => {
|
|
9755
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9756
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9757
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9758
|
+
] });
|
|
9759
|
+
};
|
|
9760
|
+
const CustomItemsForm = () => {
|
|
9761
|
+
const form = useForm({
|
|
9762
|
+
resolver: zodResolver(schema$4)
|
|
9763
|
+
});
|
|
9764
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9765
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9766
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9767
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9768
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9769
|
+
] }) })
|
|
9770
|
+
] }) });
|
|
9771
|
+
};
|
|
9772
|
+
const schema$4 = objectType({
|
|
9773
|
+
email: stringType().email()
|
|
9774
|
+
});
|
|
9754
9775
|
const Email = () => {
|
|
9755
9776
|
const { id } = useParams();
|
|
9756
9777
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9773,7 +9794,7 @@ const EmailForm = ({ order }) => {
|
|
|
9773
9794
|
defaultValues: {
|
|
9774
9795
|
email: order.email ?? ""
|
|
9775
9796
|
},
|
|
9776
|
-
resolver: zodResolver(schema$
|
|
9797
|
+
resolver: zodResolver(schema$3)
|
|
9777
9798
|
});
|
|
9778
9799
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9779
9800
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9816,27 +9837,6 @@ const EmailForm = ({ order }) => {
|
|
|
9816
9837
|
}
|
|
9817
9838
|
) });
|
|
9818
9839
|
};
|
|
9819
|
-
const schema$4 = objectType({
|
|
9820
|
-
email: stringType().email()
|
|
9821
|
-
});
|
|
9822
|
-
const CustomItems = () => {
|
|
9823
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9824
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9825
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9826
|
-
] });
|
|
9827
|
-
};
|
|
9828
|
-
const CustomItemsForm = () => {
|
|
9829
|
-
const form = useForm({
|
|
9830
|
-
resolver: zodResolver(schema$3)
|
|
9831
|
-
});
|
|
9832
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9833
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9834
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9835
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9836
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9837
|
-
] }) })
|
|
9838
|
-
] }) });
|
|
9839
|
-
};
|
|
9840
9840
|
const schema$3 = objectType({
|
|
9841
9841
|
email: stringType().email()
|
|
9842
9842
|
});
|
|
@@ -13057,14 +13057,14 @@ const routeModule = {
|
|
|
13057
13057
|
Component: BillingAddress,
|
|
13058
13058
|
path: "/draft-orders/:id/billing-address"
|
|
13059
13059
|
},
|
|
13060
|
-
{
|
|
13061
|
-
Component: Email,
|
|
13062
|
-
path: "/draft-orders/:id/email"
|
|
13063
|
-
},
|
|
13064
13060
|
{
|
|
13065
13061
|
Component: CustomItems,
|
|
13066
13062
|
path: "/draft-orders/:id/custom-items"
|
|
13067
13063
|
},
|
|
13064
|
+
{
|
|
13065
|
+
Component: Email,
|
|
13066
|
+
path: "/draft-orders/:id/email"
|
|
13067
|
+
},
|
|
13068
13068
|
{
|
|
13069
13069
|
Component: Items,
|
|
13070
13070
|
path: "/draft-orders/:id/items"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.11.4-preview-
|
|
3
|
+
"version": "2.11.4-preview-20251106000308",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ariakit/react": "^0.4.15",
|
|
38
38
|
"@babel/runtime": "^7.26.10",
|
|
39
39
|
"@hookform/resolvers": "3.4.2",
|
|
40
|
-
"@medusajs/js-sdk": "2.11.4-preview-
|
|
40
|
+
"@medusajs/js-sdk": "2.11.4-preview-20251106000308",
|
|
41
41
|
"@tanstack/react-query": "5.64.2",
|
|
42
42
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
43
43
|
"date-fns": "^3.6.0",
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
"react-hook-form": "7.49.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@medusajs/admin-sdk": "2.11.4-preview-
|
|
52
|
-
"@medusajs/cli": "2.11.4-preview-
|
|
53
|
-
"@medusajs/framework": "2.11.4-preview-
|
|
54
|
-
"@medusajs/icons": "2.11.4-preview-
|
|
55
|
-
"@medusajs/test-utils": "2.11.4-preview-
|
|
56
|
-
"@medusajs/types": "2.11.4-preview-
|
|
57
|
-
"@medusajs/ui": "4.0.28-preview-
|
|
58
|
-
"@medusajs/ui-preset": "2.11.4-preview-
|
|
51
|
+
"@medusajs/admin-sdk": "2.11.4-preview-20251106000308",
|
|
52
|
+
"@medusajs/cli": "2.11.4-preview-20251106000308",
|
|
53
|
+
"@medusajs/framework": "2.11.4-preview-20251106000308",
|
|
54
|
+
"@medusajs/icons": "2.11.4-preview-20251106000308",
|
|
55
|
+
"@medusajs/test-utils": "2.11.4-preview-20251106000308",
|
|
56
|
+
"@medusajs/types": "2.11.4-preview-20251106000308",
|
|
57
|
+
"@medusajs/ui": "4.0.28-preview-20251106000308",
|
|
58
|
+
"@medusajs/ui-preset": "2.11.4-preview-20251106000308"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@medusajs/admin-sdk": "2.11.4-preview-
|
|
62
|
-
"@medusajs/cli": "2.11.4-preview-
|
|
63
|
-
"@medusajs/framework": "2.11.4-preview-
|
|
64
|
-
"@medusajs/icons": "2.11.4-preview-
|
|
65
|
-
"@medusajs/test-utils": "2.11.4-preview-
|
|
66
|
-
"@medusajs/ui": "4.0.28-preview-
|
|
61
|
+
"@medusajs/admin-sdk": "2.11.4-preview-20251106000308",
|
|
62
|
+
"@medusajs/cli": "2.11.4-preview-20251106000308",
|
|
63
|
+
"@medusajs/framework": "2.11.4-preview-20251106000308",
|
|
64
|
+
"@medusajs/icons": "2.11.4-preview-20251106000308",
|
|
65
|
+
"@medusajs/test-utils": "2.11.4-preview-20251106000308",
|
|
66
|
+
"@medusajs/ui": "4.0.28-preview-20251106000308",
|
|
67
67
|
"react": "^18.3.1",
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
69
|
"react-router-dom": "6.20.1"
|