@medusajs/draft-order 2.11.3-preview-20251101090134 → 2.11.3-preview-20251101120144

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.
@@ -9572,6 +9572,27 @@ const ID = () => {
9572
9572
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
9573
9573
  ] });
9574
9574
  };
9575
+ const CustomItems = () => {
9576
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9577
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9578
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9579
+ ] });
9580
+ };
9581
+ const CustomItemsForm = () => {
9582
+ const form = reactHookForm.useForm({
9583
+ resolver: zod.zodResolver(schema$5)
9584
+ });
9585
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9586
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9587
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9588
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9589
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9590
+ ] }) })
9591
+ ] }) });
9592
+ };
9593
+ const schema$5 = objectType({
9594
+ email: stringType().email()
9595
+ });
9575
9596
  const BillingAddress = () => {
9576
9597
  const { id } = reactRouterDom.useParams();
9577
9598
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9604,7 +9625,7 @@ const BillingAddressForm = ({ order }) => {
9604
9625
  postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9605
9626
  phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9606
9627
  },
9607
- resolver: zod.zodResolver(schema$5)
9628
+ resolver: zod.zodResolver(schema$4)
9608
9629
  });
9609
9630
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9610
9631
  const { handleSuccess } = useRouteModal();
@@ -9761,28 +9782,7 @@ const BillingAddressForm = ({ order }) => {
9761
9782
  }
9762
9783
  ) });
9763
9784
  };
9764
- const schema$5 = addressSchema;
9765
- const CustomItems = () => {
9766
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9767
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9768
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9769
- ] });
9770
- };
9771
- const CustomItemsForm = () => {
9772
- const form = reactHookForm.useForm({
9773
- resolver: zod.zodResolver(schema$4)
9774
- });
9775
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9776
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9777
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9778
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9779
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9780
- ] }) })
9781
- ] }) });
9782
- };
9783
- const schema$4 = objectType({
9784
- email: stringType().email()
9785
- });
9785
+ const schema$4 = addressSchema;
9786
9786
  const Email = () => {
9787
9787
  const { id } = reactRouterDom.useParams();
9788
9788
  const { order, isPending, isError, error } = useOrder(id, {
@@ -13064,14 +13064,14 @@ const routeModule = {
13064
13064
  handle,
13065
13065
  loader,
13066
13066
  children: [
13067
- {
13068
- Component: BillingAddress,
13069
- path: "/draft-orders/:id/billing-address"
13070
- },
13071
13067
  {
13072
13068
  Component: CustomItems,
13073
13069
  path: "/draft-orders/:id/custom-items"
13074
13070
  },
13071
+ {
13072
+ Component: BillingAddress,
13073
+ path: "/draft-orders/:id/billing-address"
13074
+ },
13075
13075
  {
13076
13076
  Component: Email,
13077
13077
  path: "/draft-orders/:id/email"
@@ -9565,6 +9565,27 @@ const ID = () => {
9565
9565
  /* @__PURE__ */ jsx(Outlet, {})
9566
9566
  ] });
9567
9567
  };
9568
+ const CustomItems = () => {
9569
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9570
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
9571
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
9572
+ ] });
9573
+ };
9574
+ const CustomItemsForm = () => {
9575
+ const form = useForm({
9576
+ resolver: zodResolver(schema$5)
9577
+ });
9578
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9579
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
9580
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
9581
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9582
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
9583
+ ] }) })
9584
+ ] }) });
9585
+ };
9586
+ const schema$5 = objectType({
9587
+ email: stringType().email()
9588
+ });
9568
9589
  const BillingAddress = () => {
9569
9590
  const { id } = useParams();
9570
9591
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9597,7 +9618,7 @@ const BillingAddressForm = ({ order }) => {
9597
9618
  postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9598
9619
  phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9599
9620
  },
9600
- resolver: zodResolver(schema$5)
9621
+ resolver: zodResolver(schema$4)
9601
9622
  });
9602
9623
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9603
9624
  const { handleSuccess } = useRouteModal();
@@ -9754,28 +9775,7 @@ const BillingAddressForm = ({ order }) => {
9754
9775
  }
9755
9776
  ) });
9756
9777
  };
9757
- const schema$5 = addressSchema;
9758
- const CustomItems = () => {
9759
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9760
- /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
9761
- /* @__PURE__ */ jsx(CustomItemsForm, {})
9762
- ] });
9763
- };
9764
- const CustomItemsForm = () => {
9765
- const form = useForm({
9766
- resolver: zodResolver(schema$4)
9767
- });
9768
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9769
- /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
9770
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
9771
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9772
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
9773
- ] }) })
9774
- ] }) });
9775
- };
9776
- const schema$4 = objectType({
9777
- email: stringType().email()
9778
- });
9778
+ const schema$4 = addressSchema;
9779
9779
  const Email = () => {
9780
9780
  const { id } = useParams();
9781
9781
  const { order, isPending, isError, error } = useOrder(id, {
@@ -13057,14 +13057,14 @@ const routeModule = {
13057
13057
  handle,
13058
13058
  loader,
13059
13059
  children: [
13060
- {
13061
- Component: BillingAddress,
13062
- path: "/draft-orders/:id/billing-address"
13063
- },
13064
13060
  {
13065
13061
  Component: CustomItems,
13066
13062
  path: "/draft-orders/:id/custom-items"
13067
13063
  },
13064
+ {
13065
+ Component: BillingAddress,
13066
+ path: "/draft-orders/:id/billing-address"
13067
+ },
13068
13068
  {
13069
13069
  Component: Email,
13070
13070
  path: "/draft-orders/:id/email"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.11.3-preview-20251101090134",
3
+ "version": "2.11.3-preview-20251101120144",
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.3-preview-20251101090134",
40
+ "@medusajs/js-sdk": "2.11.3-preview-20251101120144",
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,14 +48,14 @@
48
48
  "react-hook-form": "7.49.1"
49
49
  },
50
50
  "devDependencies": {
51
- "@medusajs/admin-sdk": "2.11.3-preview-20251101090134",
52
- "@medusajs/cli": "2.11.3-preview-20251101090134",
53
- "@medusajs/framework": "2.11.3-preview-20251101090134",
54
- "@medusajs/icons": "2.11.3-preview-20251101090134",
55
- "@medusajs/test-utils": "2.11.3-preview-20251101090134",
56
- "@medusajs/types": "2.11.3-preview-20251101090134",
57
- "@medusajs/ui": "4.0.27-preview-20251101090134",
58
- "@medusajs/ui-preset": "2.11.3-preview-20251101090134",
51
+ "@medusajs/admin-sdk": "2.11.3-preview-20251101120144",
52
+ "@medusajs/cli": "2.11.3-preview-20251101120144",
53
+ "@medusajs/framework": "2.11.3-preview-20251101120144",
54
+ "@medusajs/icons": "2.11.3-preview-20251101120144",
55
+ "@medusajs/test-utils": "2.11.3-preview-20251101120144",
56
+ "@medusajs/types": "2.11.3-preview-20251101120144",
57
+ "@medusajs/ui": "4.0.27-preview-20251101120144",
58
+ "@medusajs/ui-preset": "2.11.3-preview-20251101120144",
59
59
  "@swc/core": "^1.7.28",
60
60
  "@types/lodash": "^4.17.15",
61
61
  "@types/lodash.debounce": "^4.0.9",
@@ -73,12 +73,12 @@
73
73
  "yalc": "^1.0.0-pre.53"
74
74
  },
75
75
  "peerDependencies": {
76
- "@medusajs/admin-sdk": "2.11.3-preview-20251101090134",
77
- "@medusajs/cli": "2.11.3-preview-20251101090134",
78
- "@medusajs/framework": "2.11.3-preview-20251101090134",
79
- "@medusajs/icons": "2.11.3-preview-20251101090134",
80
- "@medusajs/test-utils": "2.11.3-preview-20251101090134",
81
- "@medusajs/ui": "4.0.27-preview-20251101090134",
76
+ "@medusajs/admin-sdk": "2.11.3-preview-20251101120144",
77
+ "@medusajs/cli": "2.11.3-preview-20251101120144",
78
+ "@medusajs/framework": "2.11.3-preview-20251101120144",
79
+ "@medusajs/icons": "2.11.3-preview-20251101120144",
80
+ "@medusajs/test-utils": "2.11.3-preview-20251101120144",
81
+ "@medusajs/ui": "4.0.27-preview-20251101120144",
82
82
  "react": "^18.3.1",
83
83
  "react-dom": "^18.3.1",
84
84
  "react-router-dom": "6.20.1"