@medusajs/draft-order 2.10.2-preview-20250904120155 → 2.10.2-preview-20250904150154

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.
@@ -9560,27 +9560,6 @@ const ID = () => {
9560
9560
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
9561
9561
  ] });
9562
9562
  };
9563
- const CustomItems = () => {
9564
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9565
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9566
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9567
- ] });
9568
- };
9569
- const CustomItemsForm = () => {
9570
- const form = reactHookForm.useForm({
9571
- resolver: zod.zodResolver(schema$5)
9572
- });
9573
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9574
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9575
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9576
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9577
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9578
- ] }) })
9579
- ] }) });
9580
- };
9581
- const schema$5 = objectType({
9582
- email: stringType().email()
9583
- });
9584
9563
  const BillingAddress = () => {
9585
9564
  const { id } = reactRouterDom.useParams();
9586
9565
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9613,7 +9592,7 @@ const BillingAddressForm = ({ order }) => {
9613
9592
  postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9614
9593
  phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9615
9594
  },
9616
- resolver: zod.zodResolver(schema$4)
9595
+ resolver: zod.zodResolver(schema$5)
9617
9596
  });
9618
9597
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9619
9598
  const { handleSuccess } = useRouteModal();
@@ -9770,7 +9749,28 @@ const BillingAddressForm = ({ order }) => {
9770
9749
  }
9771
9750
  ) });
9772
9751
  };
9773
- const schema$4 = addressSchema;
9752
+ const schema$5 = addressSchema;
9753
+ const CustomItems = () => {
9754
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9755
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9756
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9757
+ ] });
9758
+ };
9759
+ const CustomItemsForm = () => {
9760
+ const form = reactHookForm.useForm({
9761
+ resolver: zod.zodResolver(schema$4)
9762
+ });
9763
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9764
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9765
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9766
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9767
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9768
+ ] }) })
9769
+ ] }) });
9770
+ };
9771
+ const schema$4 = objectType({
9772
+ email: stringType().email()
9773
+ });
9774
9774
  const Email = () => {
9775
9775
  const { id } = reactRouterDom.useParams();
9776
9776
  const { order, isPending, isError, error } = useOrder(id, {
@@ -13052,14 +13052,14 @@ const routeModule = {
13052
13052
  handle,
13053
13053
  loader,
13054
13054
  children: [
13055
- {
13056
- Component: CustomItems,
13057
- path: "/draft-orders/:id/custom-items"
13058
- },
13059
13055
  {
13060
13056
  Component: BillingAddress,
13061
13057
  path: "/draft-orders/:id/billing-address"
13062
13058
  },
13059
+ {
13060
+ Component: CustomItems,
13061
+ path: "/draft-orders/:id/custom-items"
13062
+ },
13063
13063
  {
13064
13064
  Component: Email,
13065
13065
  path: "/draft-orders/:id/email"
@@ -9554,27 +9554,6 @@ const ID = () => {
9554
9554
  /* @__PURE__ */ jsx(Outlet, {})
9555
9555
  ] });
9556
9556
  };
9557
- const CustomItems = () => {
9558
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9559
- /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
9560
- /* @__PURE__ */ jsx(CustomItemsForm, {})
9561
- ] });
9562
- };
9563
- const CustomItemsForm = () => {
9564
- const form = useForm({
9565
- resolver: zodResolver(schema$5)
9566
- });
9567
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9568
- /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
9569
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
9570
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9571
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
9572
- ] }) })
9573
- ] }) });
9574
- };
9575
- const schema$5 = objectType({
9576
- email: stringType().email()
9577
- });
9578
9557
  const BillingAddress = () => {
9579
9558
  const { id } = useParams();
9580
9559
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9607,7 +9586,7 @@ const BillingAddressForm = ({ order }) => {
9607
9586
  postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9608
9587
  phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9609
9588
  },
9610
- resolver: zodResolver(schema$4)
9589
+ resolver: zodResolver(schema$5)
9611
9590
  });
9612
9591
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9613
9592
  const { handleSuccess } = useRouteModal();
@@ -9764,7 +9743,28 @@ const BillingAddressForm = ({ order }) => {
9764
9743
  }
9765
9744
  ) });
9766
9745
  };
9767
- const schema$4 = addressSchema;
9746
+ const schema$5 = addressSchema;
9747
+ const CustomItems = () => {
9748
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9749
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
9750
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
9751
+ ] });
9752
+ };
9753
+ const CustomItemsForm = () => {
9754
+ const form = useForm({
9755
+ resolver: zodResolver(schema$4)
9756
+ });
9757
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9758
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
9759
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
9760
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9761
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
9762
+ ] }) })
9763
+ ] }) });
9764
+ };
9765
+ const schema$4 = objectType({
9766
+ email: stringType().email()
9767
+ });
9768
9768
  const Email = () => {
9769
9769
  const { id } = useParams();
9770
9770
  const { order, isPending, isError, error } = useOrder(id, {
@@ -13046,14 +13046,14 @@ const routeModule = {
13046
13046
  handle,
13047
13047
  loader,
13048
13048
  children: [
13049
- {
13050
- Component: CustomItems,
13051
- path: "/draft-orders/:id/custom-items"
13052
- },
13053
13049
  {
13054
13050
  Component: BillingAddress,
13055
13051
  path: "/draft-orders/:id/billing-address"
13056
13052
  },
13053
+ {
13054
+ Component: CustomItems,
13055
+ path: "/draft-orders/:id/custom-items"
13056
+ },
13057
13057
  {
13058
13058
  Component: Email,
13059
13059
  path: "/draft-orders/:id/email"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.10.2-preview-20250904120155",
3
+ "version": "2.10.2-preview-20250904150154",
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.2-preview-20250904120155",
39
+ "@medusajs/js-sdk": "2.10.2-preview-20250904150154",
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.2-preview-20250904120155",
49
- "@medusajs/cli": "2.10.2-preview-20250904120155",
50
- "@medusajs/framework": "2.10.2-preview-20250904120155",
51
- "@medusajs/icons": "2.10.2-preview-20250904120155",
52
- "@medusajs/test-utils": "2.10.2-preview-20250904120155",
53
- "@medusajs/types": "2.10.2-preview-20250904120155",
54
- "@medusajs/ui": "4.0.22-preview-20250904120155",
55
- "@medusajs/ui-preset": "2.10.2-preview-20250904120155",
48
+ "@medusajs/admin-sdk": "2.10.2-preview-20250904150154",
49
+ "@medusajs/cli": "2.10.2-preview-20250904150154",
50
+ "@medusajs/framework": "2.10.2-preview-20250904150154",
51
+ "@medusajs/icons": "2.10.2-preview-20250904150154",
52
+ "@medusajs/test-utils": "2.10.2-preview-20250904150154",
53
+ "@medusajs/types": "2.10.2-preview-20250904150154",
54
+ "@medusajs/ui": "4.0.22-preview-20250904150154",
55
+ "@medusajs/ui-preset": "2.10.2-preview-20250904150154",
56
56
  "@mikro-orm/cli": "6.4.3",
57
57
  "@mikro-orm/core": "6.4.3",
58
58
  "@mikro-orm/knex": "6.4.3",
@@ -76,12 +76,12 @@
76
76
  "yalc": "^1.0.0-pre.53"
77
77
  },
78
78
  "peerDependencies": {
79
- "@medusajs/admin-sdk": "2.10.2-preview-20250904120155",
80
- "@medusajs/cli": "2.10.2-preview-20250904120155",
81
- "@medusajs/framework": "2.10.2-preview-20250904120155",
82
- "@medusajs/icons": "2.10.2-preview-20250904120155",
83
- "@medusajs/test-utils": "2.10.2-preview-20250904120155",
84
- "@medusajs/ui": "4.0.22-preview-20250904120155",
79
+ "@medusajs/admin-sdk": "2.10.2-preview-20250904150154",
80
+ "@medusajs/cli": "2.10.2-preview-20250904150154",
81
+ "@medusajs/framework": "2.10.2-preview-20250904150154",
82
+ "@medusajs/icons": "2.10.2-preview-20250904150154",
83
+ "@medusajs/test-utils": "2.10.2-preview-20250904150154",
84
+ "@medusajs/ui": "4.0.22-preview-20250904150154",
85
85
  "@mikro-orm/cli": "6.4.3",
86
86
  "@mikro-orm/core": "6.4.3",
87
87
  "@mikro-orm/knex": "6.4.3",