@medusajs/draft-order 2.11.2-preview-20251028180205 → 2.11.2-preview-20251028210149

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.
@@ -9761,27 +9761,6 @@ const BillingAddressForm = ({ order }) => {
9761
9761
  ) });
9762
9762
  };
9763
9763
  const schema$5 = addressSchema;
9764
- const CustomItems = () => {
9765
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9766
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9767
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9768
- ] });
9769
- };
9770
- const CustomItemsForm = () => {
9771
- const form = reactHookForm.useForm({
9772
- resolver: zod.zodResolver(schema$4)
9773
- });
9774
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9775
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9776
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9777
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9778
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9779
- ] }) })
9780
- ] }) });
9781
- };
9782
- const schema$4 = objectType({
9783
- email: stringType().email()
9784
- });
9785
9764
  const Email = () => {
9786
9765
  const { id } = reactRouterDom.useParams();
9787
9766
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9804,7 +9783,7 @@ const EmailForm = ({ order }) => {
9804
9783
  defaultValues: {
9805
9784
  email: order.email ?? ""
9806
9785
  },
9807
- resolver: zod.zodResolver(schema$3)
9786
+ resolver: zod.zodResolver(schema$4)
9808
9787
  });
9809
9788
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9810
9789
  const { handleSuccess } = useRouteModal();
@@ -9847,7 +9826,7 @@ const EmailForm = ({ order }) => {
9847
9826
  }
9848
9827
  ) });
9849
9828
  };
9850
- const schema$3 = objectType({
9829
+ const schema$4 = objectType({
9851
9830
  email: stringType().email()
9852
9831
  });
9853
9832
  const NumberInput = React.forwardRef(
@@ -11479,7 +11458,7 @@ const SalesChannelForm = ({ order }) => {
11479
11458
  defaultValues: {
11480
11459
  sales_channel_id: order.sales_channel_id || ""
11481
11460
  },
11482
- resolver: zod.zodResolver(schema$2)
11461
+ resolver: zod.zodResolver(schema$3)
11483
11462
  });
11484
11463
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11485
11464
  const { handleSuccess } = useRouteModal();
@@ -11554,7 +11533,7 @@ const SalesChannelField = ({ control, order }) => {
11554
11533
  }
11555
11534
  );
11556
11535
  };
11557
- const schema$2 = objectType({
11536
+ const schema$3 = objectType({
11558
11537
  sales_channel_id: stringType().min(1)
11559
11538
  });
11560
11539
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12396,7 +12375,7 @@ const ShippingAddressForm = ({ order }) => {
12396
12375
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12397
12376
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12398
12377
  },
12399
- resolver: zod.zodResolver(schema$1)
12378
+ resolver: zod.zodResolver(schema$2)
12400
12379
  });
12401
12380
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12402
12381
  const { handleSuccess } = useRouteModal();
@@ -12566,7 +12545,7 @@ const ShippingAddressForm = ({ order }) => {
12566
12545
  }
12567
12546
  ) });
12568
12547
  };
12569
- const schema$1 = addressSchema;
12548
+ const schema$2 = addressSchema;
12570
12549
  const TransferOwnership = () => {
12571
12550
  const { id } = reactRouterDom.useParams();
12572
12551
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12590,7 +12569,7 @@ const TransferOwnershipForm = ({ order }) => {
12590
12569
  defaultValues: {
12591
12570
  customer_id: order.customer_id || ""
12592
12571
  },
12593
- resolver: zod.zodResolver(schema)
12572
+ resolver: zod.zodResolver(schema$1)
12594
12573
  });
12595
12574
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12596
12575
  const { handleSuccess } = useRouteModal();
@@ -13040,9 +13019,30 @@ const Illustration = () => {
13040
13019
  }
13041
13020
  );
13042
13021
  };
13043
- const schema = objectType({
13022
+ const schema$1 = objectType({
13044
13023
  customer_id: stringType().min(1)
13045
13024
  });
13025
+ const CustomItems = () => {
13026
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
13027
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
13028
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
13029
+ ] });
13030
+ };
13031
+ const CustomItemsForm = () => {
13032
+ const form = reactHookForm.useForm({
13033
+ resolver: zod.zodResolver(schema)
13034
+ });
13035
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
13036
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
13037
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
13038
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
13039
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
13040
+ ] }) })
13041
+ ] }) });
13042
+ };
13043
+ const schema = objectType({
13044
+ email: stringType().email()
13045
+ });
13046
13046
  const widgetModule = { widgets: [] };
13047
13047
  const routeModule = {
13048
13048
  routes: [
@@ -13067,10 +13067,6 @@ const routeModule = {
13067
13067
  Component: BillingAddress,
13068
13068
  path: "/draft-orders/:id/billing-address"
13069
13069
  },
13070
- {
13071
- Component: CustomItems,
13072
- path: "/draft-orders/:id/custom-items"
13073
- },
13074
13070
  {
13075
13071
  Component: Email,
13076
13072
  path: "/draft-orders/:id/email"
@@ -13102,6 +13098,10 @@ const routeModule = {
13102
13098
  {
13103
13099
  Component: TransferOwnership,
13104
13100
  path: "/draft-orders/:id/transfer-ownership"
13101
+ },
13102
+ {
13103
+ Component: CustomItems,
13104
+ path: "/draft-orders/:id/custom-items"
13105
13105
  }
13106
13106
  ]
13107
13107
  }
@@ -9755,27 +9755,6 @@ const BillingAddressForm = ({ order }) => {
9755
9755
  ) });
9756
9756
  };
9757
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
- });
9779
9758
  const Email = () => {
9780
9759
  const { id } = useParams();
9781
9760
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9798,7 +9777,7 @@ const EmailForm = ({ order }) => {
9798
9777
  defaultValues: {
9799
9778
  email: order.email ?? ""
9800
9779
  },
9801
- resolver: zodResolver(schema$3)
9780
+ resolver: zodResolver(schema$4)
9802
9781
  });
9803
9782
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9804
9783
  const { handleSuccess } = useRouteModal();
@@ -9841,7 +9820,7 @@ const EmailForm = ({ order }) => {
9841
9820
  }
9842
9821
  ) });
9843
9822
  };
9844
- const schema$3 = objectType({
9823
+ const schema$4 = objectType({
9845
9824
  email: stringType().email()
9846
9825
  });
9847
9826
  const NumberInput = forwardRef(
@@ -11473,7 +11452,7 @@ const SalesChannelForm = ({ order }) => {
11473
11452
  defaultValues: {
11474
11453
  sales_channel_id: order.sales_channel_id || ""
11475
11454
  },
11476
- resolver: zodResolver(schema$2)
11455
+ resolver: zodResolver(schema$3)
11477
11456
  });
11478
11457
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11479
11458
  const { handleSuccess } = useRouteModal();
@@ -11548,7 +11527,7 @@ const SalesChannelField = ({ control, order }) => {
11548
11527
  }
11549
11528
  );
11550
11529
  };
11551
- const schema$2 = objectType({
11530
+ const schema$3 = objectType({
11552
11531
  sales_channel_id: stringType().min(1)
11553
11532
  });
11554
11533
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12390,7 +12369,7 @@ const ShippingAddressForm = ({ order }) => {
12390
12369
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12391
12370
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12392
12371
  },
12393
- resolver: zodResolver(schema$1)
12372
+ resolver: zodResolver(schema$2)
12394
12373
  });
12395
12374
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12396
12375
  const { handleSuccess } = useRouteModal();
@@ -12560,7 +12539,7 @@ const ShippingAddressForm = ({ order }) => {
12560
12539
  }
12561
12540
  ) });
12562
12541
  };
12563
- const schema$1 = addressSchema;
12542
+ const schema$2 = addressSchema;
12564
12543
  const TransferOwnership = () => {
12565
12544
  const { id } = useParams();
12566
12545
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12584,7 +12563,7 @@ const TransferOwnershipForm = ({ order }) => {
12584
12563
  defaultValues: {
12585
12564
  customer_id: order.customer_id || ""
12586
12565
  },
12587
- resolver: zodResolver(schema)
12566
+ resolver: zodResolver(schema$1)
12588
12567
  });
12589
12568
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12590
12569
  const { handleSuccess } = useRouteModal();
@@ -13034,9 +13013,30 @@ const Illustration = () => {
13034
13013
  }
13035
13014
  );
13036
13015
  };
13037
- const schema = objectType({
13016
+ const schema$1 = objectType({
13038
13017
  customer_id: stringType().min(1)
13039
13018
  });
13019
+ const CustomItems = () => {
13020
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
13021
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
13022
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
13023
+ ] });
13024
+ };
13025
+ const CustomItemsForm = () => {
13026
+ const form = useForm({
13027
+ resolver: zodResolver(schema)
13028
+ });
13029
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
13030
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
13031
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
13032
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
13033
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
13034
+ ] }) })
13035
+ ] }) });
13036
+ };
13037
+ const schema = objectType({
13038
+ email: stringType().email()
13039
+ });
13040
13040
  const widgetModule = { widgets: [] };
13041
13041
  const routeModule = {
13042
13042
  routes: [
@@ -13061,10 +13061,6 @@ const routeModule = {
13061
13061
  Component: BillingAddress,
13062
13062
  path: "/draft-orders/:id/billing-address"
13063
13063
  },
13064
- {
13065
- Component: CustomItems,
13066
- path: "/draft-orders/:id/custom-items"
13067
- },
13068
13064
  {
13069
13065
  Component: Email,
13070
13066
  path: "/draft-orders/:id/email"
@@ -13096,6 +13092,10 @@ const routeModule = {
13096
13092
  {
13097
13093
  Component: TransferOwnership,
13098
13094
  path: "/draft-orders/:id/transfer-ownership"
13095
+ },
13096
+ {
13097
+ Component: CustomItems,
13098
+ path: "/draft-orders/:id/custom-items"
13099
13099
  }
13100
13100
  ]
13101
13101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.11.2-preview-20251028180205",
3
+ "version": "2.11.2-preview-20251028210149",
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.11.2-preview-20251028180205",
39
+ "@medusajs/js-sdk": "2.11.2-preview-20251028210149",
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.11.2-preview-20251028180205",
49
- "@medusajs/cli": "2.11.2-preview-20251028180205",
50
- "@medusajs/framework": "2.11.2-preview-20251028180205",
51
- "@medusajs/icons": "2.11.2-preview-20251028180205",
52
- "@medusajs/test-utils": "2.11.2-preview-20251028180205",
53
- "@medusajs/types": "2.11.2-preview-20251028180205",
54
- "@medusajs/ui": "4.0.26-preview-20251028180205",
55
- "@medusajs/ui-preset": "2.11.2-preview-20251028180205",
48
+ "@medusajs/admin-sdk": "2.11.2-preview-20251028210149",
49
+ "@medusajs/cli": "2.11.2-preview-20251028210149",
50
+ "@medusajs/framework": "2.11.2-preview-20251028210149",
51
+ "@medusajs/icons": "2.11.2-preview-20251028210149",
52
+ "@medusajs/test-utils": "2.11.2-preview-20251028210149",
53
+ "@medusajs/types": "2.11.2-preview-20251028210149",
54
+ "@medusajs/ui": "4.0.26-preview-20251028210149",
55
+ "@medusajs/ui-preset": "2.11.2-preview-20251028210149",
56
56
  "@swc/core": "1.5.7",
57
57
  "@types/lodash": "^4.17.15",
58
58
  "@types/node": "^20.0.0",
@@ -69,12 +69,12 @@
69
69
  "yalc": "^1.0.0-pre.53"
70
70
  },
71
71
  "peerDependencies": {
72
- "@medusajs/admin-sdk": "2.11.2-preview-20251028180205",
73
- "@medusajs/cli": "2.11.2-preview-20251028180205",
74
- "@medusajs/framework": "2.11.2-preview-20251028180205",
75
- "@medusajs/icons": "2.11.2-preview-20251028180205",
76
- "@medusajs/test-utils": "2.11.2-preview-20251028180205",
77
- "@medusajs/ui": "4.0.26-preview-20251028180205",
72
+ "@medusajs/admin-sdk": "2.11.2-preview-20251028210149",
73
+ "@medusajs/cli": "2.11.2-preview-20251028210149",
74
+ "@medusajs/framework": "2.11.2-preview-20251028210149",
75
+ "@medusajs/icons": "2.11.2-preview-20251028210149",
76
+ "@medusajs/test-utils": "2.11.2-preview-20251028210149",
77
+ "@medusajs/ui": "4.0.26-preview-20251028210149",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },