@medusajs/draft-order 2.10.3-snapshot-20250917163143 → 2.10.3-snapshot-20250918083457

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.
@@ -9763,27 +9763,6 @@ 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
- });
9787
9766
  const Email = () => {
9788
9767
  const { id } = reactRouterDom.useParams();
9789
9768
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9806,7 +9785,7 @@ const EmailForm = ({ order }) => {
9806
9785
  defaultValues: {
9807
9786
  email: order.email ?? ""
9808
9787
  },
9809
- resolver: zod.zodResolver(schema$3)
9788
+ resolver: zod.zodResolver(schema$4)
9810
9789
  });
9811
9790
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9812
9791
  const { handleSuccess } = useRouteModal();
@@ -9849,7 +9828,7 @@ const EmailForm = ({ order }) => {
9849
9828
  }
9850
9829
  ) });
9851
9830
  };
9852
- const schema$3 = objectType({
9831
+ const schema$4 = objectType({
9853
9832
  email: stringType().email()
9854
9833
  });
9855
9834
  const NumberInput = React.forwardRef(
@@ -11481,7 +11460,7 @@ const SalesChannelForm = ({ order }) => {
11481
11460
  defaultValues: {
11482
11461
  sales_channel_id: order.sales_channel_id || ""
11483
11462
  },
11484
- resolver: zod.zodResolver(schema$2)
11463
+ resolver: zod.zodResolver(schema$3)
11485
11464
  });
11486
11465
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11487
11466
  const { handleSuccess } = useRouteModal();
@@ -11556,9 +11535,30 @@ const SalesChannelField = ({ control, order }) => {
11556
11535
  }
11557
11536
  );
11558
11537
  };
11559
- const schema$2 = objectType({
11538
+ const schema$3 = objectType({
11560
11539
  sales_channel_id: stringType().min(1)
11561
11540
  });
11541
+ const CustomItems = () => {
11542
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
11543
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
11544
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
11545
+ ] });
11546
+ };
11547
+ const CustomItemsForm = () => {
11548
+ const form = reactHookForm.useForm({
11549
+ resolver: zod.zodResolver(schema$2)
11550
+ });
11551
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
11552
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
11553
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
11554
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11555
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
11556
+ ] }) })
11557
+ ] }) });
11558
+ };
11559
+ const schema$2 = objectType({
11560
+ email: stringType().email()
11561
+ });
11562
11562
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11563
11563
  const Shipping = () => {
11564
11564
  var _a;
@@ -13069,10 +13069,6 @@ 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
- },
13076
13072
  {
13077
13073
  Component: Email,
13078
13074
  path: "/draft-orders/:id/email"
@@ -13093,6 +13089,10 @@ const routeModule = {
13093
13089
  Component: SalesChannel,
13094
13090
  path: "/draft-orders/:id/sales-channel"
13095
13091
  },
13092
+ {
13093
+ Component: CustomItems,
13094
+ path: "/draft-orders/:id/custom-items"
13095
+ },
13096
13096
  {
13097
13097
  Component: Shipping,
13098
13098
  path: "/draft-orders/:id/shipping"
@@ -9757,27 +9757,6 @@ 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
- });
9781
9760
  const Email = () => {
9782
9761
  const { id } = useParams();
9783
9762
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9800,7 +9779,7 @@ const EmailForm = ({ order }) => {
9800
9779
  defaultValues: {
9801
9780
  email: order.email ?? ""
9802
9781
  },
9803
- resolver: zodResolver(schema$3)
9782
+ resolver: zodResolver(schema$4)
9804
9783
  });
9805
9784
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9806
9785
  const { handleSuccess } = useRouteModal();
@@ -9843,7 +9822,7 @@ const EmailForm = ({ order }) => {
9843
9822
  }
9844
9823
  ) });
9845
9824
  };
9846
- const schema$3 = objectType({
9825
+ const schema$4 = objectType({
9847
9826
  email: stringType().email()
9848
9827
  });
9849
9828
  const NumberInput = forwardRef(
@@ -11475,7 +11454,7 @@ const SalesChannelForm = ({ order }) => {
11475
11454
  defaultValues: {
11476
11455
  sales_channel_id: order.sales_channel_id || ""
11477
11456
  },
11478
- resolver: zodResolver(schema$2)
11457
+ resolver: zodResolver(schema$3)
11479
11458
  });
11480
11459
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11481
11460
  const { handleSuccess } = useRouteModal();
@@ -11550,9 +11529,30 @@ const SalesChannelField = ({ control, order }) => {
11550
11529
  }
11551
11530
  );
11552
11531
  };
11553
- const schema$2 = objectType({
11532
+ const schema$3 = objectType({
11554
11533
  sales_channel_id: stringType().min(1)
11555
11534
  });
11535
+ const CustomItems = () => {
11536
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
11537
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
11538
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
11539
+ ] });
11540
+ };
11541
+ const CustomItemsForm = () => {
11542
+ const form = useForm({
11543
+ resolver: zodResolver(schema$2)
11544
+ });
11545
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
11546
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
11547
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
11548
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11549
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
11550
+ ] }) })
11551
+ ] }) });
11552
+ };
11553
+ const schema$2 = objectType({
11554
+ email: stringType().email()
11555
+ });
11556
11556
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11557
11557
  const Shipping = () => {
11558
11558
  var _a;
@@ -13063,10 +13063,6 @@ 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
- },
13070
13066
  {
13071
13067
  Component: Email,
13072
13068
  path: "/draft-orders/:id/email"
@@ -13087,6 +13083,10 @@ const routeModule = {
13087
13083
  Component: SalesChannel,
13088
13084
  path: "/draft-orders/:id/sales-channel"
13089
13085
  },
13086
+ {
13087
+ Component: CustomItems,
13088
+ path: "/draft-orders/:id/custom-items"
13089
+ },
13090
13090
  {
13091
13091
  Component: Shipping,
13092
13092
  path: "/draft-orders/:id/shipping"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.10.3-snapshot-20250917163143",
3
+ "version": "2.10.3-snapshot-20250918083457",
4
4
  "description": "A starter for Medusa plugins.",
5
5
  "author": "Medusa (https://medusajs.com)",
6
6
  "license": "MIT",
@@ -27,16 +27,10 @@
27
27
  "medusa-plugin",
28
28
  "medusa-v2"
29
29
  ],
30
- "scripts": {
31
- "build": "medusa plugin:build",
32
- "dev": "medusa plugin:develop",
33
- "prepare": "cross-env NODE_ENV=production yarn run build",
34
- "link:watch": "medusa plugin:publish && medusa plugin:develop"
35
- },
36
30
  "dependencies": {
37
31
  "@ariakit/react": "^0.4.15",
38
32
  "@hookform/resolvers": "3.4.2",
39
- "@medusajs/js-sdk": "2.10.3-snapshot-20250917163143",
33
+ "@medusajs/js-sdk": "2.10.3-snapshot-20250918083457",
40
34
  "@tanstack/react-query": "5.64.2",
41
35
  "@uiw/react-json-view": "^2.0.0-alpha.17",
42
36
  "date-fns": "^3.6.0",
@@ -45,14 +39,14 @@
45
39
  "react-hook-form": "7.49.1"
46
40
  },
47
41
  "devDependencies": {
48
- "@medusajs/admin-sdk": "2.10.3-snapshot-20250917163143",
49
- "@medusajs/cli": "2.10.3-snapshot-20250917163143",
50
- "@medusajs/framework": "2.10.3-snapshot-20250917163143",
51
- "@medusajs/icons": "2.10.3-snapshot-20250917163143",
52
- "@medusajs/test-utils": "2.10.3-snapshot-20250917163143",
53
- "@medusajs/types": "2.10.3-snapshot-20250917163143",
54
- "@medusajs/ui": "4.0.23-snapshot-20250917163143",
55
- "@medusajs/ui-preset": "2.10.3-snapshot-20250917163143",
42
+ "@medusajs/admin-sdk": "2.10.3-snapshot-20250918083457",
43
+ "@medusajs/cli": "2.10.3-snapshot-20250918083457",
44
+ "@medusajs/framework": "2.10.3-snapshot-20250918083457",
45
+ "@medusajs/icons": "2.10.3-snapshot-20250918083457",
46
+ "@medusajs/test-utils": "2.10.3-snapshot-20250918083457",
47
+ "@medusajs/types": "2.10.3-snapshot-20250918083457",
48
+ "@medusajs/ui": "4.0.23-snapshot-20250918083457",
49
+ "@medusajs/ui-preset": "2.10.3-snapshot-20250918083457",
56
50
  "@mikro-orm/cli": "6.4.3",
57
51
  "@mikro-orm/core": "6.4.3",
58
52
  "@mikro-orm/knex": "6.4.3",
@@ -76,12 +70,12 @@
76
70
  "yalc": "^1.0.0-pre.53"
77
71
  },
78
72
  "peerDependencies": {
79
- "@medusajs/admin-sdk": "2.10.3-snapshot-20250917163143",
80
- "@medusajs/cli": "2.10.3-snapshot-20250917163143",
81
- "@medusajs/framework": "2.10.3-snapshot-20250917163143",
82
- "@medusajs/icons": "2.10.3-snapshot-20250917163143",
83
- "@medusajs/test-utils": "2.10.3-snapshot-20250917163143",
84
- "@medusajs/ui": "4.0.23-snapshot-20250917163143",
73
+ "@medusajs/admin-sdk": "2.10.3-snapshot-20250918083457",
74
+ "@medusajs/cli": "2.10.3-snapshot-20250918083457",
75
+ "@medusajs/framework": "2.10.3-snapshot-20250918083457",
76
+ "@medusajs/icons": "2.10.3-snapshot-20250918083457",
77
+ "@medusajs/test-utils": "2.10.3-snapshot-20250918083457",
78
+ "@medusajs/ui": "4.0.23-snapshot-20250918083457",
85
79
  "@mikro-orm/cli": "6.4.3",
86
80
  "@mikro-orm/core": "6.4.3",
87
81
  "@mikro-orm/knex": "6.4.3",
@@ -95,5 +89,10 @@
95
89
  "engines": {
96
90
  "node": ">=20"
97
91
  },
98
- "packageManager": "yarn@3.2.1"
99
- }
92
+ "packageManager": "yarn@3.2.1",
93
+ "scripts": {
94
+ "build": "medusa plugin:build",
95
+ "dev": "medusa plugin:develop",
96
+ "link:watch": "medusa plugin:publish && medusa plugin:develop"
97
+ }
98
+ }