@medusajs/draft-order 2.15.1-preview-20260511183140 → 2.15.1

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.
@@ -10089,6 +10089,27 @@ const BillingAddressForm = ({ order }) => {
10089
10089
  ) });
10090
10090
  };
10091
10091
  const schema$5 = addressSchema;
10092
+ const CustomItems = () => {
10093
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
10094
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
10095
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
10096
+ ] });
10097
+ };
10098
+ const CustomItemsForm = () => {
10099
+ const form = reactHookForm.useForm({
10100
+ resolver: zod.zodResolver(schema$4)
10101
+ });
10102
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
10103
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
10104
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
10105
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
10106
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
10107
+ ] }) })
10108
+ ] }) });
10109
+ };
10110
+ const schema$4 = object({
10111
+ email: string().email()
10112
+ });
10092
10113
  const Email = () => {
10093
10114
  const { id } = reactRouterDom.useParams();
10094
10115
  const { order, isPending, isError, error } = useOrder(id, {
@@ -10111,7 +10132,7 @@ const EmailForm = ({ order }) => {
10111
10132
  defaultValues: {
10112
10133
  email: order.email ?? ""
10113
10134
  },
10114
- resolver: zod.zodResolver(schema$4)
10135
+ resolver: zod.zodResolver(schema$3)
10115
10136
  });
10116
10137
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
10117
10138
  const { handleSuccess } = useRouteModal();
@@ -10154,27 +10175,6 @@ const EmailForm = ({ order }) => {
10154
10175
  }
10155
10176
  ) });
10156
10177
  };
10157
- const schema$4 = object({
10158
- email: string().email()
10159
- });
10160
- const CustomItems = () => {
10161
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
10162
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
10163
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
10164
- ] });
10165
- };
10166
- const CustomItemsForm = () => {
10167
- const form = reactHookForm.useForm({
10168
- resolver: zod.zodResolver(schema$3)
10169
- });
10170
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
10171
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
10172
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
10173
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
10174
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
10175
- ] }) })
10176
- ] }) });
10177
- };
10178
10178
  const schema$3 = object({
10179
10179
  email: string().email()
10180
10180
  });
@@ -13395,14 +13395,14 @@ const routeModule = {
13395
13395
  Component: BillingAddress,
13396
13396
  path: "/draft-orders/:id/billing-address"
13397
13397
  },
13398
- {
13399
- Component: Email,
13400
- path: "/draft-orders/:id/email"
13401
- },
13402
13398
  {
13403
13399
  Component: CustomItems,
13404
13400
  path: "/draft-orders/:id/custom-items"
13405
13401
  },
13402
+ {
13403
+ Component: Email,
13404
+ path: "/draft-orders/:id/email"
13405
+ },
13406
13406
  {
13407
13407
  Component: Items,
13408
13408
  path: "/draft-orders/:id/items"
@@ -10082,6 +10082,27 @@ const BillingAddressForm = ({ order }) => {
10082
10082
  ) });
10083
10083
  };
10084
10084
  const schema$5 = addressSchema;
10085
+ const CustomItems = () => {
10086
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
10087
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
10088
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
10089
+ ] });
10090
+ };
10091
+ const CustomItemsForm = () => {
10092
+ const form = useForm({
10093
+ resolver: zodResolver(schema$4)
10094
+ });
10095
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
10096
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
10097
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
10098
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
10099
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
10100
+ ] }) })
10101
+ ] }) });
10102
+ };
10103
+ const schema$4 = object({
10104
+ email: string().email()
10105
+ });
10085
10106
  const Email = () => {
10086
10107
  const { id } = useParams();
10087
10108
  const { order, isPending, isError, error } = useOrder(id, {
@@ -10104,7 +10125,7 @@ const EmailForm = ({ order }) => {
10104
10125
  defaultValues: {
10105
10126
  email: order.email ?? ""
10106
10127
  },
10107
- resolver: zodResolver(schema$4)
10128
+ resolver: zodResolver(schema$3)
10108
10129
  });
10109
10130
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
10110
10131
  const { handleSuccess } = useRouteModal();
@@ -10147,27 +10168,6 @@ const EmailForm = ({ order }) => {
10147
10168
  }
10148
10169
  ) });
10149
10170
  };
10150
- const schema$4 = object({
10151
- email: string().email()
10152
- });
10153
- const CustomItems = () => {
10154
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
10155
- /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
10156
- /* @__PURE__ */ jsx(CustomItemsForm, {})
10157
- ] });
10158
- };
10159
- const CustomItemsForm = () => {
10160
- const form = useForm({
10161
- resolver: zodResolver(schema$3)
10162
- });
10163
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
10164
- /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
10165
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
10166
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
10167
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
10168
- ] }) })
10169
- ] }) });
10170
- };
10171
10171
  const schema$3 = object({
10172
10172
  email: string().email()
10173
10173
  });
@@ -13388,14 +13388,14 @@ const routeModule = {
13388
13388
  Component: BillingAddress,
13389
13389
  path: "/draft-orders/:id/billing-address"
13390
13390
  },
13391
- {
13392
- Component: Email,
13393
- path: "/draft-orders/:id/email"
13394
- },
13395
13391
  {
13396
13392
  Component: CustomItems,
13397
13393
  path: "/draft-orders/:id/custom-items"
13398
13394
  },
13395
+ {
13396
+ Component: Email,
13397
+ path: "/draft-orders/:id/email"
13398
+ },
13399
13399
  {
13400
13400
  Component: Items,
13401
13401
  path: "/draft-orders/:id/items"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.15.1-preview-20260511183140",
3
+ "version": "2.15.1",
4
4
  "description": "A draft order plugin for Medusa.",
5
5
  "author": "Medusa (https://medusajs.com)",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "@ariakit/react": "^0.4.15",
43
43
  "@babel/runtime": "^7.26.10",
44
44
  "@hookform/resolvers": "3.4.2",
45
- "@medusajs/js-sdk": "2.15.1-preview-20260511183140",
45
+ "@medusajs/js-sdk": "2.15.1",
46
46
  "@tanstack/react-query": "5.64.2",
47
47
  "@uiw/react-json-view": "^2.0.0-alpha.17",
48
48
  "date-fns": "^3.6.0",
@@ -53,22 +53,22 @@
53
53
  "react-hook-form": "7.49.1"
54
54
  },
55
55
  "devDependencies": {
56
- "@medusajs/admin-sdk": "2.15.1-preview-20260511183140",
57
- "@medusajs/cli": "2.15.1-preview-20260511183140",
58
- "@medusajs/framework": "2.15.1-preview-20260511183140",
59
- "@medusajs/icons": "2.15.1-preview-20260511183140",
60
- "@medusajs/test-utils": "2.15.1-preview-20260511183140",
61
- "@medusajs/types": "2.15.1-preview-20260511183140",
62
- "@medusajs/ui": "4.1.11-preview-20260511183140",
63
- "@medusajs/ui-preset": "2.15.1-preview-20260511183140"
56
+ "@medusajs/admin-sdk": "2.15.1",
57
+ "@medusajs/cli": "2.15.1",
58
+ "@medusajs/framework": "2.15.1",
59
+ "@medusajs/icons": "2.15.1",
60
+ "@medusajs/test-utils": "2.15.1",
61
+ "@medusajs/types": "2.15.1",
62
+ "@medusajs/ui": "4.1.11",
63
+ "@medusajs/ui-preset": "2.15.1"
64
64
  },
65
65
  "peerDependencies": {
66
- "@medusajs/admin-sdk": "2.15.1-preview-20260511183140",
67
- "@medusajs/cli": "2.15.1-preview-20260511183140",
68
- "@medusajs/framework": "2.15.1-preview-20260511183140",
69
- "@medusajs/icons": "2.15.1-preview-20260511183140",
70
- "@medusajs/test-utils": "2.15.1-preview-20260511183140",
71
- "@medusajs/ui": "4.1.11-preview-20260511183140",
66
+ "@medusajs/admin-sdk": "2.15.1",
67
+ "@medusajs/cli": "2.15.1",
68
+ "@medusajs/framework": "2.15.1",
69
+ "@medusajs/icons": "2.15.1",
70
+ "@medusajs/test-utils": "2.15.1",
71
+ "@medusajs/ui": "4.1.11",
72
72
  "react": "^18.3.1",
73
73
  "react-dom": "^18.3.1",
74
74
  "react-router-dom": "6.30.3"