@medusajs/draft-order 2.11.2-snapshot-20251029124358 → 2.11.2-snapshot-20251029131556

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,6 +9761,27 @@ 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
+ });
9764
9785
  const Email = () => {
9765
9786
  const { id } = reactRouterDom.useParams();
9766
9787
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9783,7 +9804,7 @@ const EmailForm = ({ order }) => {
9783
9804
  defaultValues: {
9784
9805
  email: order.email ?? ""
9785
9806
  },
9786
- resolver: zod.zodResolver(schema$4)
9807
+ resolver: zod.zodResolver(schema$3)
9787
9808
  });
9788
9809
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9789
9810
  const { handleSuccess } = useRouteModal();
@@ -9826,7 +9847,7 @@ const EmailForm = ({ order }) => {
9826
9847
  }
9827
9848
  ) });
9828
9849
  };
9829
- const schema$4 = objectType({
9850
+ const schema$3 = objectType({
9830
9851
  email: stringType().email()
9831
9852
  });
9832
9853
  const NumberInput = React.forwardRef(
@@ -11458,7 +11479,7 @@ const SalesChannelForm = ({ order }) => {
11458
11479
  defaultValues: {
11459
11480
  sales_channel_id: order.sales_channel_id || ""
11460
11481
  },
11461
- resolver: zod.zodResolver(schema$3)
11482
+ resolver: zod.zodResolver(schema$2)
11462
11483
  });
11463
11484
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11464
11485
  const { handleSuccess } = useRouteModal();
@@ -11533,7 +11554,7 @@ const SalesChannelField = ({ control, order }) => {
11533
11554
  }
11534
11555
  );
11535
11556
  };
11536
- const schema$3 = objectType({
11557
+ const schema$2 = objectType({
11537
11558
  sales_channel_id: stringType().min(1)
11538
11559
  });
11539
11560
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12375,7 +12396,7 @@ const ShippingAddressForm = ({ order }) => {
12375
12396
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12376
12397
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12377
12398
  },
12378
- resolver: zod.zodResolver(schema$2)
12399
+ resolver: zod.zodResolver(schema$1)
12379
12400
  });
12380
12401
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12381
12402
  const { handleSuccess } = useRouteModal();
@@ -12545,7 +12566,7 @@ const ShippingAddressForm = ({ order }) => {
12545
12566
  }
12546
12567
  ) });
12547
12568
  };
12548
- const schema$2 = addressSchema;
12569
+ const schema$1 = addressSchema;
12549
12570
  const TransferOwnership = () => {
12550
12571
  const { id } = reactRouterDom.useParams();
12551
12572
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12569,7 +12590,7 @@ const TransferOwnershipForm = ({ order }) => {
12569
12590
  defaultValues: {
12570
12591
  customer_id: order.customer_id || ""
12571
12592
  },
12572
- resolver: zod.zodResolver(schema$1)
12593
+ resolver: zod.zodResolver(schema)
12573
12594
  });
12574
12595
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12575
12596
  const { handleSuccess } = useRouteModal();
@@ -13019,29 +13040,8 @@ const Illustration = () => {
13019
13040
  }
13020
13041
  );
13021
13042
  };
13022
- const schema$1 = objectType({
13023
- customer_id: stringType().min(1)
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
13043
  const schema = objectType({
13044
- email: stringType().email()
13044
+ customer_id: stringType().min(1)
13045
13045
  });
13046
13046
  const widgetModule = { widgets: [] };
13047
13047
  const routeModule = {
@@ -13067,6 +13067,10 @@ 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
+ },
13070
13074
  {
13071
13075
  Component: Email,
13072
13076
  path: "/draft-orders/:id/email"
@@ -13098,10 +13102,6 @@ const routeModule = {
13098
13102
  {
13099
13103
  Component: TransferOwnership,
13100
13104
  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,6 +9755,27 @@ 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
+ });
9758
9779
  const Email = () => {
9759
9780
  const { id } = useParams();
9760
9781
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9777,7 +9798,7 @@ const EmailForm = ({ order }) => {
9777
9798
  defaultValues: {
9778
9799
  email: order.email ?? ""
9779
9800
  },
9780
- resolver: zodResolver(schema$4)
9801
+ resolver: zodResolver(schema$3)
9781
9802
  });
9782
9803
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9783
9804
  const { handleSuccess } = useRouteModal();
@@ -9820,7 +9841,7 @@ const EmailForm = ({ order }) => {
9820
9841
  }
9821
9842
  ) });
9822
9843
  };
9823
- const schema$4 = objectType({
9844
+ const schema$3 = objectType({
9824
9845
  email: stringType().email()
9825
9846
  });
9826
9847
  const NumberInput = forwardRef(
@@ -11452,7 +11473,7 @@ const SalesChannelForm = ({ order }) => {
11452
11473
  defaultValues: {
11453
11474
  sales_channel_id: order.sales_channel_id || ""
11454
11475
  },
11455
- resolver: zodResolver(schema$3)
11476
+ resolver: zodResolver(schema$2)
11456
11477
  });
11457
11478
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11458
11479
  const { handleSuccess } = useRouteModal();
@@ -11527,7 +11548,7 @@ const SalesChannelField = ({ control, order }) => {
11527
11548
  }
11528
11549
  );
11529
11550
  };
11530
- const schema$3 = objectType({
11551
+ const schema$2 = objectType({
11531
11552
  sales_channel_id: stringType().min(1)
11532
11553
  });
11533
11554
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12369,7 +12390,7 @@ const ShippingAddressForm = ({ order }) => {
12369
12390
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12370
12391
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12371
12392
  },
12372
- resolver: zodResolver(schema$2)
12393
+ resolver: zodResolver(schema$1)
12373
12394
  });
12374
12395
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12375
12396
  const { handleSuccess } = useRouteModal();
@@ -12539,7 +12560,7 @@ const ShippingAddressForm = ({ order }) => {
12539
12560
  }
12540
12561
  ) });
12541
12562
  };
12542
- const schema$2 = addressSchema;
12563
+ const schema$1 = addressSchema;
12543
12564
  const TransferOwnership = () => {
12544
12565
  const { id } = useParams();
12545
12566
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12563,7 +12584,7 @@ const TransferOwnershipForm = ({ order }) => {
12563
12584
  defaultValues: {
12564
12585
  customer_id: order.customer_id || ""
12565
12586
  },
12566
- resolver: zodResolver(schema$1)
12587
+ resolver: zodResolver(schema)
12567
12588
  });
12568
12589
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12569
12590
  const { handleSuccess } = useRouteModal();
@@ -13013,29 +13034,8 @@ const Illustration = () => {
13013
13034
  }
13014
13035
  );
13015
13036
  };
13016
- const schema$1 = objectType({
13017
- customer_id: stringType().min(1)
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
13037
  const schema = objectType({
13038
- email: stringType().email()
13038
+ customer_id: stringType().min(1)
13039
13039
  });
13040
13040
  const widgetModule = { widgets: [] };
13041
13041
  const routeModule = {
@@ -13061,6 +13061,10 @@ 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
+ },
13064
13068
  {
13065
13069
  Component: Email,
13066
13070
  path: "/draft-orders/:id/email"
@@ -13092,10 +13096,6 @@ const routeModule = {
13092
13096
  {
13093
13097
  Component: TransferOwnership,
13094
13098
  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-snapshot-20251029124358",
3
+ "version": "2.11.2-snapshot-20251029131556",
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-snapshot-20251029124358",
39
+ "@medusajs/js-sdk": "2.11.2-snapshot-20251029131556",
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-snapshot-20251029124358",
49
- "@medusajs/cli": "2.11.2-snapshot-20251029124358",
50
- "@medusajs/framework": "2.11.2-snapshot-20251029124358",
51
- "@medusajs/icons": "2.11.2-snapshot-20251029124358",
52
- "@medusajs/test-utils": "2.11.2-snapshot-20251029124358",
53
- "@medusajs/types": "2.11.2-snapshot-20251029124358",
54
- "@medusajs/ui": "4.0.26-snapshot-20251029124358",
55
- "@medusajs/ui-preset": "2.11.2-snapshot-20251029124358",
48
+ "@medusajs/admin-sdk": "2.11.2-snapshot-20251029131556",
49
+ "@medusajs/cli": "2.11.2-snapshot-20251029131556",
50
+ "@medusajs/framework": "2.11.2-snapshot-20251029131556",
51
+ "@medusajs/icons": "2.11.2-snapshot-20251029131556",
52
+ "@medusajs/test-utils": "2.11.2-snapshot-20251029131556",
53
+ "@medusajs/types": "2.11.2-snapshot-20251029131556",
54
+ "@medusajs/ui": "4.0.26-snapshot-20251029131556",
55
+ "@medusajs/ui-preset": "2.11.2-snapshot-20251029131556",
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-snapshot-20251029124358",
73
- "@medusajs/cli": "2.11.2-snapshot-20251029124358",
74
- "@medusajs/framework": "2.11.2-snapshot-20251029124358",
75
- "@medusajs/icons": "2.11.2-snapshot-20251029124358",
76
- "@medusajs/test-utils": "2.11.2-snapshot-20251029124358",
77
- "@medusajs/ui": "4.0.26-snapshot-20251029124358",
72
+ "@medusajs/admin-sdk": "2.11.2-snapshot-20251029131556",
73
+ "@medusajs/cli": "2.11.2-snapshot-20251029131556",
74
+ "@medusajs/framework": "2.11.2-snapshot-20251029131556",
75
+ "@medusajs/icons": "2.11.2-snapshot-20251029131556",
76
+ "@medusajs/test-utils": "2.11.2-snapshot-20251029131556",
77
+ "@medusajs/ui": "4.0.26-snapshot-20251029131556",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },