@medusajs/draft-order 2.11.1-preview-20251024180211 → 2.11.1-preview-20251024210158

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.
@@ -9571,27 +9571,6 @@ const ID = () => {
9571
9571
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
9572
9572
  ] });
9573
9573
  };
9574
- const CustomItems = () => {
9575
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9576
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9577
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9578
- ] });
9579
- };
9580
- const CustomItemsForm = () => {
9581
- const form = reactHookForm.useForm({
9582
- resolver: zod.zodResolver(schema$5)
9583
- });
9584
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9585
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9586
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9587
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9588
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9589
- ] }) })
9590
- ] }) });
9591
- };
9592
- const schema$5 = objectType({
9593
- email: stringType().email()
9594
- });
9595
9574
  const BillingAddress = () => {
9596
9575
  const { id } = reactRouterDom.useParams();
9597
9576
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9624,7 +9603,7 @@ const BillingAddressForm = ({ order }) => {
9624
9603
  postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9625
9604
  phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9626
9605
  },
9627
- resolver: zod.zodResolver(schema$4)
9606
+ resolver: zod.zodResolver(schema$5)
9628
9607
  });
9629
9608
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9630
9609
  const { handleSuccess } = useRouteModal();
@@ -9781,7 +9760,7 @@ const BillingAddressForm = ({ order }) => {
9781
9760
  }
9782
9761
  ) });
9783
9762
  };
9784
- const schema$4 = addressSchema;
9763
+ const schema$5 = addressSchema;
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: [
@@ -13063,10 +13063,6 @@ const routeModule = {
13063
13063
  handle,
13064
13064
  loader,
13065
13065
  children: [
13066
- {
13067
- Component: CustomItems,
13068
- path: "/draft-orders/:id/custom-items"
13069
- },
13070
13066
  {
13071
13067
  Component: BillingAddress,
13072
13068
  path: "/draft-orders/:id/billing-address"
@@ -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
  }
@@ -9565,27 +9565,6 @@ 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
- });
9589
9568
  const BillingAddress = () => {
9590
9569
  const { id } = useParams();
9591
9570
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9618,7 +9597,7 @@ const BillingAddressForm = ({ order }) => {
9618
9597
  postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9619
9598
  phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9620
9599
  },
9621
- resolver: zodResolver(schema$4)
9600
+ resolver: zodResolver(schema$5)
9622
9601
  });
9623
9602
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9624
9603
  const { handleSuccess } = useRouteModal();
@@ -9775,7 +9754,7 @@ const BillingAddressForm = ({ order }) => {
9775
9754
  }
9776
9755
  ) });
9777
9756
  };
9778
- const schema$4 = addressSchema;
9757
+ const schema$5 = addressSchema;
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: [
@@ -13057,10 +13057,6 @@ const routeModule = {
13057
13057
  handle,
13058
13058
  loader,
13059
13059
  children: [
13060
- {
13061
- Component: CustomItems,
13062
- path: "/draft-orders/:id/custom-items"
13063
- },
13064
13060
  {
13065
13061
  Component: BillingAddress,
13066
13062
  path: "/draft-orders/:id/billing-address"
@@ -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.1-preview-20251024180211",
3
+ "version": "2.11.1-preview-20251024210158",
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.1-preview-20251024180211",
39
+ "@medusajs/js-sdk": "2.11.1-preview-20251024210158",
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.1-preview-20251024180211",
49
- "@medusajs/cli": "2.11.1-preview-20251024180211",
50
- "@medusajs/framework": "2.11.1-preview-20251024180211",
51
- "@medusajs/icons": "2.11.1-preview-20251024180211",
52
- "@medusajs/test-utils": "2.11.1-preview-20251024180211",
53
- "@medusajs/types": "2.11.1-preview-20251024180211",
54
- "@medusajs/ui": "4.0.25-preview-20251024180211",
55
- "@medusajs/ui-preset": "2.11.1-preview-20251024180211",
48
+ "@medusajs/admin-sdk": "2.11.1-preview-20251024210158",
49
+ "@medusajs/cli": "2.11.1-preview-20251024210158",
50
+ "@medusajs/framework": "2.11.1-preview-20251024210158",
51
+ "@medusajs/icons": "2.11.1-preview-20251024210158",
52
+ "@medusajs/test-utils": "2.11.1-preview-20251024210158",
53
+ "@medusajs/types": "2.11.1-preview-20251024210158",
54
+ "@medusajs/ui": "4.0.25-preview-20251024210158",
55
+ "@medusajs/ui-preset": "2.11.1-preview-20251024210158",
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.1-preview-20251024180211",
73
- "@medusajs/cli": "2.11.1-preview-20251024180211",
74
- "@medusajs/framework": "2.11.1-preview-20251024180211",
75
- "@medusajs/icons": "2.11.1-preview-20251024180211",
76
- "@medusajs/test-utils": "2.11.1-preview-20251024180211",
77
- "@medusajs/ui": "4.0.25-preview-20251024180211",
72
+ "@medusajs/admin-sdk": "2.11.1-preview-20251024210158",
73
+ "@medusajs/cli": "2.11.1-preview-20251024210158",
74
+ "@medusajs/framework": "2.11.1-preview-20251024210158",
75
+ "@medusajs/icons": "2.11.1-preview-20251024210158",
76
+ "@medusajs/test-utils": "2.11.1-preview-20251024210158",
77
+ "@medusajs/ui": "4.0.25-preview-20251024210158",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },