@medusajs/draft-order 2.10.2-preview-20250904210158 → 2.10.2-preview-20250905000310

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.
@@ -9560,27 +9560,6 @@ const ID = () => {
9560
9560
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
9561
9561
  ] });
9562
9562
  };
9563
- const CustomItems = () => {
9564
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9565
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9566
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9567
- ] });
9568
- };
9569
- const CustomItemsForm = () => {
9570
- const form = reactHookForm.useForm({
9571
- resolver: zod.zodResolver(schema$5)
9572
- });
9573
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9574
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9575
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9576
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9577
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9578
- ] }) })
9579
- ] }) });
9580
- };
9581
- const schema$5 = objectType({
9582
- email: stringType().email()
9583
- });
9584
9563
  const Email = () => {
9585
9564
  const { id } = reactRouterDom.useParams();
9586
9565
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9603,7 +9582,7 @@ const EmailForm = ({ order }) => {
9603
9582
  defaultValues: {
9604
9583
  email: order.email ?? ""
9605
9584
  },
9606
- resolver: zod.zodResolver(schema$4)
9585
+ resolver: zod.zodResolver(schema$5)
9607
9586
  });
9608
9587
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9609
9588
  const { handleSuccess } = useRouteModal();
@@ -9646,7 +9625,7 @@ const EmailForm = ({ order }) => {
9646
9625
  }
9647
9626
  ) });
9648
9627
  };
9649
- const schema$4 = objectType({
9628
+ const schema$5 = objectType({
9650
9629
  email: stringType().email()
9651
9630
  });
9652
9631
  const NumberInput = React.forwardRef(
@@ -11278,7 +11257,7 @@ const SalesChannelForm = ({ order }) => {
11278
11257
  defaultValues: {
11279
11258
  sales_channel_id: order.sales_channel_id || ""
11280
11259
  },
11281
- resolver: zod.zodResolver(schema$3)
11260
+ resolver: zod.zodResolver(schema$4)
11282
11261
  });
11283
11262
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11284
11263
  const { handleSuccess } = useRouteModal();
@@ -11353,7 +11332,7 @@ const SalesChannelField = ({ control, order }) => {
11353
11332
  }
11354
11333
  );
11355
11334
  };
11356
- const schema$3 = objectType({
11335
+ const schema$4 = objectType({
11357
11336
  sales_channel_id: stringType().min(1)
11358
11337
  });
11359
11338
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12195,7 +12174,7 @@ const ShippingAddressForm = ({ order }) => {
12195
12174
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12196
12175
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12197
12176
  },
12198
- resolver: zod.zodResolver(schema$2)
12177
+ resolver: zod.zodResolver(schema$3)
12199
12178
  });
12200
12179
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12201
12180
  const { handleSuccess } = useRouteModal();
@@ -12365,7 +12344,7 @@ const ShippingAddressForm = ({ order }) => {
12365
12344
  }
12366
12345
  ) });
12367
12346
  };
12368
- const schema$2 = addressSchema;
12347
+ const schema$3 = addressSchema;
12369
12348
  const TransferOwnership = () => {
12370
12349
  const { id } = reactRouterDom.useParams();
12371
12350
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12389,7 +12368,7 @@ const TransferOwnershipForm = ({ order }) => {
12389
12368
  defaultValues: {
12390
12369
  customer_id: order.customer_id || ""
12391
12370
  },
12392
- resolver: zod.zodResolver(schema$1)
12371
+ resolver: zod.zodResolver(schema$2)
12393
12372
  });
12394
12373
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12395
12374
  const { handleSuccess } = useRouteModal();
@@ -12839,9 +12818,30 @@ const Illustration = () => {
12839
12818
  }
12840
12819
  );
12841
12820
  };
12842
- const schema$1 = objectType({
12821
+ const schema$2 = objectType({
12843
12822
  customer_id: stringType().min(1)
12844
12823
  });
12824
+ const CustomItems = () => {
12825
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
12826
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
12827
+ /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
12828
+ ] });
12829
+ };
12830
+ const CustomItemsForm = () => {
12831
+ const form = reactHookForm.useForm({
12832
+ resolver: zod.zodResolver(schema$1)
12833
+ });
12834
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
12835
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
12836
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
12837
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12838
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
12839
+ ] }) })
12840
+ ] }) });
12841
+ };
12842
+ const schema$1 = objectType({
12843
+ email: stringType().email()
12844
+ });
12845
12845
  const BillingAddress = () => {
12846
12846
  const { id } = reactRouterDom.useParams();
12847
12847
  const { order, isPending, isError, error } = useOrder(id, {
@@ -13052,10 +13052,6 @@ const routeModule = {
13052
13052
  handle,
13053
13053
  loader,
13054
13054
  children: [
13055
- {
13056
- Component: CustomItems,
13057
- path: "/draft-orders/:id/custom-items"
13058
- },
13059
13055
  {
13060
13056
  Component: Email,
13061
13057
  path: "/draft-orders/:id/email"
@@ -13088,6 +13084,10 @@ const routeModule = {
13088
13084
  Component: TransferOwnership,
13089
13085
  path: "/draft-orders/:id/transfer-ownership"
13090
13086
  },
13087
+ {
13088
+ Component: CustomItems,
13089
+ path: "/draft-orders/:id/custom-items"
13090
+ },
13091
13091
  {
13092
13092
  Component: BillingAddress,
13093
13093
  path: "/draft-orders/:id/billing-address"
@@ -9554,27 +9554,6 @@ const ID = () => {
9554
9554
  /* @__PURE__ */ jsx(Outlet, {})
9555
9555
  ] });
9556
9556
  };
9557
- const CustomItems = () => {
9558
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9559
- /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
9560
- /* @__PURE__ */ jsx(CustomItemsForm, {})
9561
- ] });
9562
- };
9563
- const CustomItemsForm = () => {
9564
- const form = useForm({
9565
- resolver: zodResolver(schema$5)
9566
- });
9567
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9568
- /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
9569
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
9570
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9571
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
9572
- ] }) })
9573
- ] }) });
9574
- };
9575
- const schema$5 = objectType({
9576
- email: stringType().email()
9577
- });
9578
9557
  const Email = () => {
9579
9558
  const { id } = useParams();
9580
9559
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9597,7 +9576,7 @@ const EmailForm = ({ order }) => {
9597
9576
  defaultValues: {
9598
9577
  email: order.email ?? ""
9599
9578
  },
9600
- resolver: zodResolver(schema$4)
9579
+ resolver: zodResolver(schema$5)
9601
9580
  });
9602
9581
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9603
9582
  const { handleSuccess } = useRouteModal();
@@ -9640,7 +9619,7 @@ const EmailForm = ({ order }) => {
9640
9619
  }
9641
9620
  ) });
9642
9621
  };
9643
- const schema$4 = objectType({
9622
+ const schema$5 = objectType({
9644
9623
  email: stringType().email()
9645
9624
  });
9646
9625
  const NumberInput = forwardRef(
@@ -11272,7 +11251,7 @@ const SalesChannelForm = ({ order }) => {
11272
11251
  defaultValues: {
11273
11252
  sales_channel_id: order.sales_channel_id || ""
11274
11253
  },
11275
- resolver: zodResolver(schema$3)
11254
+ resolver: zodResolver(schema$4)
11276
11255
  });
11277
11256
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11278
11257
  const { handleSuccess } = useRouteModal();
@@ -11347,7 +11326,7 @@ const SalesChannelField = ({ control, order }) => {
11347
11326
  }
11348
11327
  );
11349
11328
  };
11350
- const schema$3 = objectType({
11329
+ const schema$4 = objectType({
11351
11330
  sales_channel_id: stringType().min(1)
11352
11331
  });
11353
11332
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12189,7 +12168,7 @@ const ShippingAddressForm = ({ order }) => {
12189
12168
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12190
12169
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12191
12170
  },
12192
- resolver: zodResolver(schema$2)
12171
+ resolver: zodResolver(schema$3)
12193
12172
  });
12194
12173
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12195
12174
  const { handleSuccess } = useRouteModal();
@@ -12359,7 +12338,7 @@ const ShippingAddressForm = ({ order }) => {
12359
12338
  }
12360
12339
  ) });
12361
12340
  };
12362
- const schema$2 = addressSchema;
12341
+ const schema$3 = addressSchema;
12363
12342
  const TransferOwnership = () => {
12364
12343
  const { id } = useParams();
12365
12344
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12383,7 +12362,7 @@ const TransferOwnershipForm = ({ order }) => {
12383
12362
  defaultValues: {
12384
12363
  customer_id: order.customer_id || ""
12385
12364
  },
12386
- resolver: zodResolver(schema$1)
12365
+ resolver: zodResolver(schema$2)
12387
12366
  });
12388
12367
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12389
12368
  const { handleSuccess } = useRouteModal();
@@ -12833,9 +12812,30 @@ const Illustration = () => {
12833
12812
  }
12834
12813
  );
12835
12814
  };
12836
- const schema$1 = objectType({
12815
+ const schema$2 = objectType({
12837
12816
  customer_id: stringType().min(1)
12838
12817
  });
12818
+ const CustomItems = () => {
12819
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
12820
+ /* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
12821
+ /* @__PURE__ */ jsx(CustomItemsForm, {})
12822
+ ] });
12823
+ };
12824
+ const CustomItemsForm = () => {
12825
+ const form = useForm({
12826
+ resolver: zodResolver(schema$1)
12827
+ });
12828
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
12829
+ /* @__PURE__ */ jsx(RouteDrawer.Body, {}),
12830
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
12831
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12832
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
12833
+ ] }) })
12834
+ ] }) });
12835
+ };
12836
+ const schema$1 = objectType({
12837
+ email: stringType().email()
12838
+ });
12839
12839
  const BillingAddress = () => {
12840
12840
  const { id } = useParams();
12841
12841
  const { order, isPending, isError, error } = useOrder(id, {
@@ -13046,10 +13046,6 @@ const routeModule = {
13046
13046
  handle,
13047
13047
  loader,
13048
13048
  children: [
13049
- {
13050
- Component: CustomItems,
13051
- path: "/draft-orders/:id/custom-items"
13052
- },
13053
13049
  {
13054
13050
  Component: Email,
13055
13051
  path: "/draft-orders/:id/email"
@@ -13082,6 +13078,10 @@ const routeModule = {
13082
13078
  Component: TransferOwnership,
13083
13079
  path: "/draft-orders/:id/transfer-ownership"
13084
13080
  },
13081
+ {
13082
+ Component: CustomItems,
13083
+ path: "/draft-orders/:id/custom-items"
13084
+ },
13085
13085
  {
13086
13086
  Component: BillingAddress,
13087
13087
  path: "/draft-orders/:id/billing-address"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.10.2-preview-20250904210158",
3
+ "version": "2.10.2-preview-20250905000310",
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.2-preview-20250904210158",
39
+ "@medusajs/js-sdk": "2.10.2-preview-20250905000310",
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.2-preview-20250904210158",
49
- "@medusajs/cli": "2.10.2-preview-20250904210158",
50
- "@medusajs/framework": "2.10.2-preview-20250904210158",
51
- "@medusajs/icons": "2.10.2-preview-20250904210158",
52
- "@medusajs/test-utils": "2.10.2-preview-20250904210158",
53
- "@medusajs/types": "2.10.2-preview-20250904210158",
54
- "@medusajs/ui": "4.0.22-preview-20250904210158",
55
- "@medusajs/ui-preset": "2.10.2-preview-20250904210158",
48
+ "@medusajs/admin-sdk": "2.10.2-preview-20250905000310",
49
+ "@medusajs/cli": "2.10.2-preview-20250905000310",
50
+ "@medusajs/framework": "2.10.2-preview-20250905000310",
51
+ "@medusajs/icons": "2.10.2-preview-20250905000310",
52
+ "@medusajs/test-utils": "2.10.2-preview-20250905000310",
53
+ "@medusajs/types": "2.10.2-preview-20250905000310",
54
+ "@medusajs/ui": "4.0.22-preview-20250905000310",
55
+ "@medusajs/ui-preset": "2.10.2-preview-20250905000310",
56
56
  "@mikro-orm/cli": "6.4.3",
57
57
  "@mikro-orm/core": "6.4.3",
58
58
  "@mikro-orm/knex": "6.4.3",
@@ -76,12 +76,12 @@
76
76
  "yalc": "^1.0.0-pre.53"
77
77
  },
78
78
  "peerDependencies": {
79
- "@medusajs/admin-sdk": "2.10.2-preview-20250904210158",
80
- "@medusajs/cli": "2.10.2-preview-20250904210158",
81
- "@medusajs/framework": "2.10.2-preview-20250904210158",
82
- "@medusajs/icons": "2.10.2-preview-20250904210158",
83
- "@medusajs/test-utils": "2.10.2-preview-20250904210158",
84
- "@medusajs/ui": "4.0.22-preview-20250904210158",
79
+ "@medusajs/admin-sdk": "2.10.2-preview-20250905000310",
80
+ "@medusajs/cli": "2.10.2-preview-20250905000310",
81
+ "@medusajs/framework": "2.10.2-preview-20250905000310",
82
+ "@medusajs/icons": "2.10.2-preview-20250905000310",
83
+ "@medusajs/test-utils": "2.10.2-preview-20250905000310",
84
+ "@medusajs/ui": "4.0.22-preview-20250905000310",
85
85
  "@mikro-orm/cli": "6.4.3",
86
86
  "@mikro-orm/core": "6.4.3",
87
87
  "@mikro-orm/knex": "6.4.3",