@medusajs/draft-order 2.10.4-snapshot-20251008074348 → 2.10.4-snapshot-20251008094822

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.
@@ -10805,6 +10805,27 @@ const customItemSchema = objectType({
10805
10805
  quantity: numberType(),
10806
10806
  unit_price: unionType([numberType(), stringType()])
10807
10807
  });
10808
+ const CustomItems = () => {
10809
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
10810
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
10811
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
10812
+ ] });
10813
+ };
10814
+ const CustomItemsForm = () => {
10815
+ const form = reactHookForm.useForm({
10816
+ resolver: zod.zodResolver(schema$3)
10817
+ });
10818
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
10819
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
10820
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
10821
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
10822
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
10823
+ ] }) })
10824
+ ] }) });
10825
+ };
10826
+ const schema$3 = objectType({
10827
+ email: stringType().email()
10828
+ });
10808
10829
  const InlineTip = React.forwardRef(
10809
10830
  ({ variant = "tip", label, className, children, ...props }, ref) => {
10810
10831
  const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
@@ -11460,7 +11481,7 @@ const SalesChannelForm = ({ order }) => {
11460
11481
  defaultValues: {
11461
11482
  sales_channel_id: order.sales_channel_id || ""
11462
11483
  },
11463
- resolver: zod.zodResolver(schema$3)
11484
+ resolver: zod.zodResolver(schema$2)
11464
11485
  });
11465
11486
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11466
11487
  const { handleSuccess } = useRouteModal();
@@ -11535,7 +11556,7 @@ const SalesChannelField = ({ control, order }) => {
11535
11556
  }
11536
11557
  );
11537
11558
  };
11538
- const schema$3 = objectType({
11559
+ const schema$2 = objectType({
11539
11560
  sales_channel_id: stringType().min(1)
11540
11561
  });
11541
11562
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12377,7 +12398,7 @@ const ShippingAddressForm = ({ order }) => {
12377
12398
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12378
12399
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12379
12400
  },
12380
- resolver: zod.zodResolver(schema$2)
12401
+ resolver: zod.zodResolver(schema$1)
12381
12402
  });
12382
12403
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12383
12404
  const { handleSuccess } = useRouteModal();
@@ -12547,7 +12568,7 @@ const ShippingAddressForm = ({ order }) => {
12547
12568
  }
12548
12569
  ) });
12549
12570
  };
12550
- const schema$2 = addressSchema;
12571
+ const schema$1 = addressSchema;
12551
12572
  const TransferOwnership = () => {
12552
12573
  const { id } = reactRouterDom.useParams();
12553
12574
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12571,7 +12592,7 @@ const TransferOwnershipForm = ({ order }) => {
12571
12592
  defaultValues: {
12572
12593
  customer_id: order.customer_id || ""
12573
12594
  },
12574
- resolver: zod.zodResolver(schema$1)
12595
+ resolver: zod.zodResolver(schema)
12575
12596
  });
12576
12597
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12577
12598
  const { handleSuccess } = useRouteModal();
@@ -13021,29 +13042,8 @@ const Illustration = () => {
13021
13042
  }
13022
13043
  );
13023
13044
  };
13024
- const schema$1 = objectType({
13025
- customer_id: stringType().min(1)
13026
- });
13027
- const CustomItems = () => {
13028
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
13029
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
13030
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
13031
- ] });
13032
- };
13033
- const CustomItemsForm = () => {
13034
- const form = reactHookForm.useForm({
13035
- resolver: zod.zodResolver(schema)
13036
- });
13037
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
13038
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
13039
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
13040
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
13041
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
13042
- ] }) })
13043
- ] }) });
13044
- };
13045
13045
  const schema = objectType({
13046
- email: stringType().email()
13046
+ customer_id: stringType().min(1)
13047
13047
  });
13048
13048
  const widgetModule = { widgets: [] };
13049
13049
  const routeModule = {
@@ -13077,6 +13077,10 @@ const routeModule = {
13077
13077
  Component: Items,
13078
13078
  path: "/draft-orders/:id/items"
13079
13079
  },
13080
+ {
13081
+ Component: CustomItems,
13082
+ path: "/draft-orders/:id/custom-items"
13083
+ },
13080
13084
  {
13081
13085
  Component: Metadata,
13082
13086
  path: "/draft-orders/:id/metadata"
@@ -13100,10 +13104,6 @@ const routeModule = {
13100
13104
  {
13101
13105
  Component: TransferOwnership,
13102
13106
  path: "/draft-orders/:id/transfer-ownership"
13103
- },
13104
- {
13105
- Component: CustomItems,
13106
- path: "/draft-orders/:id/custom-items"
13107
13107
  }
13108
13108
  ]
13109
13109
  }
@@ -10799,6 +10799,27 @@ const customItemSchema = objectType({
10799
10799
  quantity: numberType(),
10800
10800
  unit_price: unionType([numberType(), stringType()])
10801
10801
  });
10802
+ const CustomItems = () => {
10803
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
10804
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
10805
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
10806
+ ] });
10807
+ };
10808
+ const CustomItemsForm = () => {
10809
+ const form = useForm({
10810
+ resolver: zodResolver(schema$3)
10811
+ });
10812
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
10813
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
10814
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
10815
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
10816
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
10817
+ ] }) })
10818
+ ] }) });
10819
+ };
10820
+ const schema$3 = objectType({
10821
+ email: stringType().email()
10822
+ });
10802
10823
  const InlineTip = forwardRef(
10803
10824
  ({ variant = "tip", label, className, children, ...props }, ref) => {
10804
10825
  const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
@@ -11454,7 +11475,7 @@ const SalesChannelForm = ({ order }) => {
11454
11475
  defaultValues: {
11455
11476
  sales_channel_id: order.sales_channel_id || ""
11456
11477
  },
11457
- resolver: zodResolver(schema$3)
11478
+ resolver: zodResolver(schema$2)
11458
11479
  });
11459
11480
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11460
11481
  const { handleSuccess } = useRouteModal();
@@ -11529,7 +11550,7 @@ const SalesChannelField = ({ control, order }) => {
11529
11550
  }
11530
11551
  );
11531
11552
  };
11532
- const schema$3 = objectType({
11553
+ const schema$2 = objectType({
11533
11554
  sales_channel_id: stringType().min(1)
11534
11555
  });
11535
11556
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12371,7 +12392,7 @@ const ShippingAddressForm = ({ order }) => {
12371
12392
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12372
12393
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12373
12394
  },
12374
- resolver: zodResolver(schema$2)
12395
+ resolver: zodResolver(schema$1)
12375
12396
  });
12376
12397
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12377
12398
  const { handleSuccess } = useRouteModal();
@@ -12541,7 +12562,7 @@ const ShippingAddressForm = ({ order }) => {
12541
12562
  }
12542
12563
  ) });
12543
12564
  };
12544
- const schema$2 = addressSchema;
12565
+ const schema$1 = addressSchema;
12545
12566
  const TransferOwnership = () => {
12546
12567
  const { id } = useParams();
12547
12568
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12565,7 +12586,7 @@ const TransferOwnershipForm = ({ order }) => {
12565
12586
  defaultValues: {
12566
12587
  customer_id: order.customer_id || ""
12567
12588
  },
12568
- resolver: zodResolver(schema$1)
12589
+ resolver: zodResolver(schema)
12569
12590
  });
12570
12591
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12571
12592
  const { handleSuccess } = useRouteModal();
@@ -13015,29 +13036,8 @@ const Illustration = () => {
13015
13036
  }
13016
13037
  );
13017
13038
  };
13018
- const schema$1 = objectType({
13019
- customer_id: stringType().min(1)
13020
- });
13021
- const CustomItems = () => {
13022
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
13023
- /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
13024
- /* @__PURE__ */ jsx(CustomItemsForm, {})
13025
- ] });
13026
- };
13027
- const CustomItemsForm = () => {
13028
- const form = useForm({
13029
- resolver: zodResolver(schema)
13030
- });
13031
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
13032
- /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
13033
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
13034
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
13035
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
13036
- ] }) })
13037
- ] }) });
13038
- };
13039
13039
  const schema = objectType({
13040
- email: stringType().email()
13040
+ customer_id: stringType().min(1)
13041
13041
  });
13042
13042
  const widgetModule = { widgets: [] };
13043
13043
  const routeModule = {
@@ -13071,6 +13071,10 @@ const routeModule = {
13071
13071
  Component: Items,
13072
13072
  path: "/draft-orders/:id/items"
13073
13073
  },
13074
+ {
13075
+ Component: CustomItems,
13076
+ path: "/draft-orders/:id/custom-items"
13077
+ },
13074
13078
  {
13075
13079
  Component: Metadata,
13076
13080
  path: "/draft-orders/:id/metadata"
@@ -13094,10 +13098,6 @@ const routeModule = {
13094
13098
  {
13095
13099
  Component: TransferOwnership,
13096
13100
  path: "/draft-orders/:id/transfer-ownership"
13097
- },
13098
- {
13099
- Component: CustomItems,
13100
- path: "/draft-orders/:id/custom-items"
13101
13101
  }
13102
13102
  ]
13103
13103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.10.4-snapshot-20251008074348",
3
+ "version": "2.10.4-snapshot-20251008094822",
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.4-snapshot-20251008074348",
39
+ "@medusajs/js-sdk": "2.10.4-snapshot-20251008094822",
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.4-snapshot-20251008074348",
49
- "@medusajs/cli": "2.10.4-snapshot-20251008074348",
50
- "@medusajs/framework": "2.10.4-snapshot-20251008074348",
51
- "@medusajs/icons": "2.10.4-snapshot-20251008074348",
52
- "@medusajs/test-utils": "2.10.4-snapshot-20251008074348",
53
- "@medusajs/types": "2.10.4-snapshot-20251008074348",
54
- "@medusajs/ui": "4.0.24-snapshot-20251008074348",
55
- "@medusajs/ui-preset": "2.10.4-snapshot-20251008074348",
48
+ "@medusajs/admin-sdk": "2.10.4-snapshot-20251008094822",
49
+ "@medusajs/cli": "2.10.4-snapshot-20251008094822",
50
+ "@medusajs/framework": "2.10.4-snapshot-20251008094822",
51
+ "@medusajs/icons": "2.10.4-snapshot-20251008094822",
52
+ "@medusajs/test-utils": "2.10.4-snapshot-20251008094822",
53
+ "@medusajs/types": "2.10.4-snapshot-20251008094822",
54
+ "@medusajs/ui": "4.0.24-snapshot-20251008094822",
55
+ "@medusajs/ui-preset": "2.10.4-snapshot-20251008094822",
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.10.4-snapshot-20251008074348",
73
- "@medusajs/cli": "2.10.4-snapshot-20251008074348",
74
- "@medusajs/framework": "2.10.4-snapshot-20251008074348",
75
- "@medusajs/icons": "2.10.4-snapshot-20251008074348",
76
- "@medusajs/test-utils": "2.10.4-snapshot-20251008074348",
77
- "@medusajs/ui": "4.0.24-snapshot-20251008074348",
72
+ "@medusajs/admin-sdk": "2.10.4-snapshot-20251008094822",
73
+ "@medusajs/cli": "2.10.4-snapshot-20251008094822",
74
+ "@medusajs/framework": "2.10.4-snapshot-20251008094822",
75
+ "@medusajs/icons": "2.10.4-snapshot-20251008094822",
76
+ "@medusajs/test-utils": "2.10.4-snapshot-20251008094822",
77
+ "@medusajs/ui": "4.0.24-snapshot-20251008094822",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },