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

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.
@@ -9592,6 +9592,264 @@ const CustomItemsForm = () => {
9592
9592
  const schema$5 = objectType({
9593
9593
  email: stringType().email()
9594
9594
  });
9595
+ const BillingAddress = () => {
9596
+ const { id } = reactRouterDom.useParams();
9597
+ const { order, isPending, isError, error } = useOrder(id, {
9598
+ fields: "+billing_address"
9599
+ });
9600
+ if (isError) {
9601
+ throw error;
9602
+ }
9603
+ const isReady = !isPending && !!order;
9604
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9605
+ /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
9606
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
9607
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
9608
+ ] }),
9609
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
9610
+ ] });
9611
+ };
9612
+ const BillingAddressForm = ({ order }) => {
9613
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
9614
+ const form = reactHookForm.useForm({
9615
+ defaultValues: {
9616
+ first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
9617
+ last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
9618
+ company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
9619
+ address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
9620
+ address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
9621
+ city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
9622
+ province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
9623
+ country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
9624
+ postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9625
+ phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9626
+ },
9627
+ resolver: zod.zodResolver(schema$4)
9628
+ });
9629
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9630
+ const { handleSuccess } = useRouteModal();
9631
+ const onSubmit = form.handleSubmit(async (data) => {
9632
+ await mutateAsync(
9633
+ { billing_address: data },
9634
+ {
9635
+ onSuccess: () => {
9636
+ handleSuccess();
9637
+ },
9638
+ onError: (error) => {
9639
+ ui.toast.error(error.message);
9640
+ }
9641
+ }
9642
+ );
9643
+ });
9644
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
9645
+ KeyboundForm,
9646
+ {
9647
+ className: "flex flex-1 flex-col overflow-hidden",
9648
+ onSubmit,
9649
+ children: [
9650
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-4", children: [
9651
+ /* @__PURE__ */ jsxRuntime.jsx(
9652
+ Form$2.Field,
9653
+ {
9654
+ control: form.control,
9655
+ name: "country_code",
9656
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9657
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
9658
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
9659
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9660
+ ] })
9661
+ }
9662
+ ),
9663
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9664
+ /* @__PURE__ */ jsxRuntime.jsx(
9665
+ Form$2.Field,
9666
+ {
9667
+ control: form.control,
9668
+ name: "first_name",
9669
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9670
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
9671
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9672
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9673
+ ] })
9674
+ }
9675
+ ),
9676
+ /* @__PURE__ */ jsxRuntime.jsx(
9677
+ Form$2.Field,
9678
+ {
9679
+ control: form.control,
9680
+ name: "last_name",
9681
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9682
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
9683
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9684
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9685
+ ] })
9686
+ }
9687
+ )
9688
+ ] }),
9689
+ /* @__PURE__ */ jsxRuntime.jsx(
9690
+ Form$2.Field,
9691
+ {
9692
+ control: form.control,
9693
+ name: "company",
9694
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9695
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
9696
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9697
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9698
+ ] })
9699
+ }
9700
+ ),
9701
+ /* @__PURE__ */ jsxRuntime.jsx(
9702
+ Form$2.Field,
9703
+ {
9704
+ control: form.control,
9705
+ name: "address_1",
9706
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9707
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
9708
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9709
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9710
+ ] })
9711
+ }
9712
+ ),
9713
+ /* @__PURE__ */ jsxRuntime.jsx(
9714
+ Form$2.Field,
9715
+ {
9716
+ control: form.control,
9717
+ name: "address_2",
9718
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9719
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
9720
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9721
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9722
+ ] })
9723
+ }
9724
+ ),
9725
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9726
+ /* @__PURE__ */ jsxRuntime.jsx(
9727
+ Form$2.Field,
9728
+ {
9729
+ control: form.control,
9730
+ name: "postal_code",
9731
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9732
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
9733
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9734
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9735
+ ] })
9736
+ }
9737
+ ),
9738
+ /* @__PURE__ */ jsxRuntime.jsx(
9739
+ Form$2.Field,
9740
+ {
9741
+ control: form.control,
9742
+ name: "city",
9743
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9744
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
9745
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9746
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9747
+ ] })
9748
+ }
9749
+ )
9750
+ ] }),
9751
+ /* @__PURE__ */ jsxRuntime.jsx(
9752
+ Form$2.Field,
9753
+ {
9754
+ control: form.control,
9755
+ name: "province",
9756
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9757
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
9758
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9759
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9760
+ ] })
9761
+ }
9762
+ ),
9763
+ /* @__PURE__ */ jsxRuntime.jsx(
9764
+ Form$2.Field,
9765
+ {
9766
+ control: form.control,
9767
+ name: "phone",
9768
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9769
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
9770
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9771
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9772
+ ] })
9773
+ }
9774
+ )
9775
+ ] }) }),
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", isLoading: isPending, children: "Save" })
9779
+ ] }) })
9780
+ ]
9781
+ }
9782
+ ) });
9783
+ };
9784
+ const schema$4 = addressSchema;
9785
+ const Email = () => {
9786
+ const { id } = reactRouterDom.useParams();
9787
+ const { order, isPending, isError, error } = useOrder(id, {
9788
+ fields: "+email"
9789
+ });
9790
+ if (isError) {
9791
+ throw error;
9792
+ }
9793
+ const isReady = !isPending && !!order;
9794
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9795
+ /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
9796
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Email" }) }),
9797
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
9798
+ ] }),
9799
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(EmailForm, { order })
9800
+ ] });
9801
+ };
9802
+ const EmailForm = ({ order }) => {
9803
+ const form = reactHookForm.useForm({
9804
+ defaultValues: {
9805
+ email: order.email ?? ""
9806
+ },
9807
+ resolver: zod.zodResolver(schema$3)
9808
+ });
9809
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9810
+ const { handleSuccess } = useRouteModal();
9811
+ const onSubmit = form.handleSubmit(async (data) => {
9812
+ await mutateAsync(
9813
+ { email: data.email },
9814
+ {
9815
+ onSuccess: () => {
9816
+ handleSuccess();
9817
+ },
9818
+ onError: (error) => {
9819
+ ui.toast.error(error.message);
9820
+ }
9821
+ }
9822
+ );
9823
+ });
9824
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
9825
+ KeyboundForm,
9826
+ {
9827
+ className: "flex flex-1 flex-col overflow-hidden",
9828
+ onSubmit,
9829
+ children: [
9830
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
9831
+ Form$2.Field,
9832
+ {
9833
+ control: form.control,
9834
+ name: "email",
9835
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9836
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Email" }),
9837
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9838
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9839
+ ] })
9840
+ }
9841
+ ) }),
9842
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9843
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9844
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
9845
+ ] }) })
9846
+ ]
9847
+ }
9848
+ ) });
9849
+ };
9850
+ const schema$3 = objectType({
9851
+ email: stringType().email()
9852
+ });
9595
9853
  const NumberInput = React.forwardRef(
9596
9854
  ({
9597
9855
  value,
@@ -11175,92 +11433,24 @@ function getPromotionIds(items, shippingMethods) {
11175
11433
  const promotionIds = /* @__PURE__ */ new Set();
11176
11434
  for (const item of items) {
11177
11435
  if (item.adjustments) {
11178
- for (const adjustment of item.adjustments) {
11179
- if (adjustment.promotion_id) {
11180
- promotionIds.add(adjustment.promotion_id);
11181
- }
11182
- }
11183
- }
11184
- }
11185
- for (const shippingMethod of shippingMethods) {
11186
- if (shippingMethod.adjustments) {
11187
- for (const adjustment of shippingMethod.adjustments) {
11188
- if (adjustment.promotion_id) {
11189
- promotionIds.add(adjustment.promotion_id);
11190
- }
11191
- }
11192
- }
11193
- }
11194
- return Array.from(promotionIds);
11195
- }
11196
- const Email = () => {
11197
- const { id } = reactRouterDom.useParams();
11198
- const { order, isPending, isError, error } = useOrder(id, {
11199
- fields: "+email"
11200
- });
11201
- if (isError) {
11202
- throw error;
11203
- }
11204
- const isReady = !isPending && !!order;
11205
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
11206
- /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
11207
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Email" }) }),
11208
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
11209
- ] }),
11210
- isReady && /* @__PURE__ */ jsxRuntime.jsx(EmailForm, { order })
11211
- ] });
11212
- };
11213
- const EmailForm = ({ order }) => {
11214
- const form = reactHookForm.useForm({
11215
- defaultValues: {
11216
- email: order.email ?? ""
11217
- },
11218
- resolver: zod.zodResolver(schema$4)
11219
- });
11220
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11221
- const { handleSuccess } = useRouteModal();
11222
- const onSubmit = form.handleSubmit(async (data) => {
11223
- await mutateAsync(
11224
- { email: data.email },
11225
- {
11226
- onSuccess: () => {
11227
- handleSuccess();
11228
- },
11229
- onError: (error) => {
11230
- ui.toast.error(error.message);
11436
+ for (const adjustment of item.adjustments) {
11437
+ if (adjustment.promotion_id) {
11438
+ promotionIds.add(adjustment.promotion_id);
11231
11439
  }
11232
11440
  }
11233
- );
11234
- });
11235
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
11236
- KeyboundForm,
11237
- {
11238
- className: "flex flex-1 flex-col overflow-hidden",
11239
- onSubmit,
11240
- children: [
11241
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
11242
- Form$2.Field,
11243
- {
11244
- control: form.control,
11245
- name: "email",
11246
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11247
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Email" }),
11248
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11249
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11250
- ] })
11251
- }
11252
- ) }),
11253
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
11254
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11255
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11256
- ] }) })
11257
- ]
11258
11441
  }
11259
- ) });
11260
- };
11261
- const schema$4 = objectType({
11262
- email: stringType().email()
11263
- });
11442
+ }
11443
+ for (const shippingMethod of shippingMethods) {
11444
+ if (shippingMethod.adjustments) {
11445
+ for (const adjustment of shippingMethod.adjustments) {
11446
+ if (adjustment.promotion_id) {
11447
+ promotionIds.add(adjustment.promotion_id);
11448
+ }
11449
+ }
11450
+ }
11451
+ }
11452
+ return Array.from(promotionIds);
11453
+ }
11264
11454
  const SalesChannel = () => {
11265
11455
  const { id } = reactRouterDom.useParams();
11266
11456
  const { draft_order, isPending, isError, error } = useDraftOrder(
@@ -11289,7 +11479,7 @@ const SalesChannelForm = ({ order }) => {
11289
11479
  defaultValues: {
11290
11480
  sales_channel_id: order.sales_channel_id || ""
11291
11481
  },
11292
- resolver: zod.zodResolver(schema$3)
11482
+ resolver: zod.zodResolver(schema$2)
11293
11483
  });
11294
11484
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11295
11485
  const { handleSuccess } = useRouteModal();
@@ -11364,7 +11554,7 @@ const SalesChannelField = ({ control, order }) => {
11364
11554
  }
11365
11555
  );
11366
11556
  };
11367
- const schema$3 = objectType({
11557
+ const schema$2 = objectType({
11368
11558
  sales_channel_id: stringType().min(1)
11369
11559
  });
11370
11560
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12206,7 +12396,7 @@ const ShippingAddressForm = ({ order }) => {
12206
12396
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12207
12397
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12208
12398
  },
12209
- resolver: zod.zodResolver(schema$2)
12399
+ resolver: zod.zodResolver(schema$1)
12210
12400
  });
12211
12401
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12212
12402
  const { handleSuccess } = useRouteModal();
@@ -12376,7 +12566,7 @@ const ShippingAddressForm = ({ order }) => {
12376
12566
  }
12377
12567
  ) });
12378
12568
  };
12379
- const schema$2 = addressSchema;
12569
+ const schema$1 = addressSchema;
12380
12570
  const TransferOwnership = () => {
12381
12571
  const { id } = reactRouterDom.useParams();
12382
12572
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12400,7 +12590,7 @@ const TransferOwnershipForm = ({ order }) => {
12400
12590
  defaultValues: {
12401
12591
  customer_id: order.customer_id || ""
12402
12592
  },
12403
- resolver: zod.zodResolver(schema$1)
12593
+ resolver: zod.zodResolver(schema)
12404
12594
  });
12405
12595
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12406
12596
  const { handleSuccess } = useRouteModal();
@@ -12850,199 +13040,9 @@ const Illustration = () => {
12850
13040
  }
12851
13041
  );
12852
13042
  };
12853
- const schema$1 = objectType({
13043
+ const schema = objectType({
12854
13044
  customer_id: stringType().min(1)
12855
13045
  });
12856
- const BillingAddress = () => {
12857
- const { id } = reactRouterDom.useParams();
12858
- const { order, isPending, isError, error } = useOrder(id, {
12859
- fields: "+billing_address"
12860
- });
12861
- if (isError) {
12862
- throw error;
12863
- }
12864
- const isReady = !isPending && !!order;
12865
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
12866
- /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
12867
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
12868
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
12869
- ] }),
12870
- isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
12871
- ] });
12872
- };
12873
- const BillingAddressForm = ({ order }) => {
12874
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12875
- const form = reactHookForm.useForm({
12876
- defaultValues: {
12877
- first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
12878
- last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
12879
- company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
12880
- address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
12881
- address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
12882
- city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
12883
- province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
12884
- country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
12885
- postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
12886
- phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
12887
- },
12888
- resolver: zod.zodResolver(schema)
12889
- });
12890
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12891
- const { handleSuccess } = useRouteModal();
12892
- const onSubmit = form.handleSubmit(async (data) => {
12893
- await mutateAsync(
12894
- { billing_address: data },
12895
- {
12896
- onSuccess: () => {
12897
- handleSuccess();
12898
- },
12899
- onError: (error) => {
12900
- ui.toast.error(error.message);
12901
- }
12902
- }
12903
- );
12904
- });
12905
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
12906
- KeyboundForm,
12907
- {
12908
- className: "flex flex-1 flex-col overflow-hidden",
12909
- onSubmit,
12910
- children: [
12911
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-4", children: [
12912
- /* @__PURE__ */ jsxRuntime.jsx(
12913
- Form$2.Field,
12914
- {
12915
- control: form.control,
12916
- name: "country_code",
12917
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12918
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
12919
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
12920
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12921
- ] })
12922
- }
12923
- ),
12924
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12925
- /* @__PURE__ */ jsxRuntime.jsx(
12926
- Form$2.Field,
12927
- {
12928
- control: form.control,
12929
- name: "first_name",
12930
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12931
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
12932
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12933
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12934
- ] })
12935
- }
12936
- ),
12937
- /* @__PURE__ */ jsxRuntime.jsx(
12938
- Form$2.Field,
12939
- {
12940
- control: form.control,
12941
- name: "last_name",
12942
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12943
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
12944
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12945
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12946
- ] })
12947
- }
12948
- )
12949
- ] }),
12950
- /* @__PURE__ */ jsxRuntime.jsx(
12951
- Form$2.Field,
12952
- {
12953
- control: form.control,
12954
- name: "company",
12955
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12956
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
12957
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12958
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12959
- ] })
12960
- }
12961
- ),
12962
- /* @__PURE__ */ jsxRuntime.jsx(
12963
- Form$2.Field,
12964
- {
12965
- control: form.control,
12966
- name: "address_1",
12967
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12968
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
12969
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12970
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12971
- ] })
12972
- }
12973
- ),
12974
- /* @__PURE__ */ jsxRuntime.jsx(
12975
- Form$2.Field,
12976
- {
12977
- control: form.control,
12978
- name: "address_2",
12979
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12980
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12981
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12982
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12983
- ] })
12984
- }
12985
- ),
12986
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12987
- /* @__PURE__ */ jsxRuntime.jsx(
12988
- Form$2.Field,
12989
- {
12990
- control: form.control,
12991
- name: "postal_code",
12992
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12993
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
12994
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12995
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12996
- ] })
12997
- }
12998
- ),
12999
- /* @__PURE__ */ jsxRuntime.jsx(
13000
- Form$2.Field,
13001
- {
13002
- control: form.control,
13003
- name: "city",
13004
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
13005
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
13006
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
13007
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
13008
- ] })
13009
- }
13010
- )
13011
- ] }),
13012
- /* @__PURE__ */ jsxRuntime.jsx(
13013
- Form$2.Field,
13014
- {
13015
- control: form.control,
13016
- name: "province",
13017
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
13018
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
13019
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
13020
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
13021
- ] })
13022
- }
13023
- ),
13024
- /* @__PURE__ */ jsxRuntime.jsx(
13025
- Form$2.Field,
13026
- {
13027
- control: form.control,
13028
- name: "phone",
13029
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
13030
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
13031
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
13032
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
13033
- ] })
13034
- }
13035
- )
13036
- ] }) }),
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", isLoading: isPending, children: "Save" })
13040
- ] }) })
13041
- ]
13042
- }
13043
- ) });
13044
- };
13045
- const schema = addressSchema;
13046
13046
  const widgetModule = { widgets: [] };
13047
13047
  const routeModule = {
13048
13048
  routes: [
@@ -13067,6 +13067,14 @@ const routeModule = {
13067
13067
  Component: CustomItems,
13068
13068
  path: "/draft-orders/:id/custom-items"
13069
13069
  },
13070
+ {
13071
+ Component: BillingAddress,
13072
+ path: "/draft-orders/:id/billing-address"
13073
+ },
13074
+ {
13075
+ Component: Email,
13076
+ path: "/draft-orders/:id/email"
13077
+ },
13070
13078
  {
13071
13079
  Component: Items,
13072
13080
  path: "/draft-orders/:id/items"
@@ -13079,10 +13087,6 @@ const routeModule = {
13079
13087
  Component: Promotions,
13080
13088
  path: "/draft-orders/:id/promotions"
13081
13089
  },
13082
- {
13083
- Component: Email,
13084
- path: "/draft-orders/:id/email"
13085
- },
13086
13090
  {
13087
13091
  Component: SalesChannel,
13088
13092
  path: "/draft-orders/:id/sales-channel"
@@ -13098,10 +13102,6 @@ const routeModule = {
13098
13102
  {
13099
13103
  Component: TransferOwnership,
13100
13104
  path: "/draft-orders/:id/transfer-ownership"
13101
- },
13102
- {
13103
- Component: BillingAddress,
13104
- path: "/draft-orders/:id/billing-address"
13105
13105
  }
13106
13106
  ]
13107
13107
  }
@@ -9586,6 +9586,264 @@ const CustomItemsForm = () => {
9586
9586
  const schema$5 = objectType({
9587
9587
  email: stringType().email()
9588
9588
  });
9589
+ const BillingAddress = () => {
9590
+ const { id } = useParams();
9591
+ const { order, isPending, isError, error } = useOrder(id, {
9592
+ fields: "+billing_address"
9593
+ });
9594
+ if (isError) {
9595
+ throw error;
9596
+ }
9597
+ const isReady = !isPending && !!order;
9598
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9599
+ /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
9600
+ /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Billing Address" }) }),
9601
+ /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
9602
+ ] }),
9603
+ isReady && /* @__PURE__ */ jsx(BillingAddressForm, { order })
9604
+ ] });
9605
+ };
9606
+ const BillingAddressForm = ({ order }) => {
9607
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
9608
+ const form = useForm({
9609
+ defaultValues: {
9610
+ first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
9611
+ last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
9612
+ company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
9613
+ address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
9614
+ address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
9615
+ city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
9616
+ province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
9617
+ country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
9618
+ postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9619
+ phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9620
+ },
9621
+ resolver: zodResolver(schema$4)
9622
+ });
9623
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9624
+ const { handleSuccess } = useRouteModal();
9625
+ const onSubmit = form.handleSubmit(async (data) => {
9626
+ await mutateAsync(
9627
+ { billing_address: data },
9628
+ {
9629
+ onSuccess: () => {
9630
+ handleSuccess();
9631
+ },
9632
+ onError: (error) => {
9633
+ toast.error(error.message);
9634
+ }
9635
+ }
9636
+ );
9637
+ });
9638
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
9639
+ KeyboundForm,
9640
+ {
9641
+ className: "flex flex-1 flex-col overflow-hidden",
9642
+ onSubmit,
9643
+ children: [
9644
+ /* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4", children: [
9645
+ /* @__PURE__ */ jsx(
9646
+ Form$2.Field,
9647
+ {
9648
+ control: form.control,
9649
+ name: "country_code",
9650
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9651
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
9652
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
9653
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9654
+ ] })
9655
+ }
9656
+ ),
9657
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9658
+ /* @__PURE__ */ jsx(
9659
+ Form$2.Field,
9660
+ {
9661
+ control: form.control,
9662
+ name: "first_name",
9663
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9664
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
9665
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9666
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9667
+ ] })
9668
+ }
9669
+ ),
9670
+ /* @__PURE__ */ jsx(
9671
+ Form$2.Field,
9672
+ {
9673
+ control: form.control,
9674
+ name: "last_name",
9675
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9676
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
9677
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9678
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9679
+ ] })
9680
+ }
9681
+ )
9682
+ ] }),
9683
+ /* @__PURE__ */ jsx(
9684
+ Form$2.Field,
9685
+ {
9686
+ control: form.control,
9687
+ name: "company",
9688
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9689
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
9690
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9691
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9692
+ ] })
9693
+ }
9694
+ ),
9695
+ /* @__PURE__ */ jsx(
9696
+ Form$2.Field,
9697
+ {
9698
+ control: form.control,
9699
+ name: "address_1",
9700
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9701
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
9702
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9703
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9704
+ ] })
9705
+ }
9706
+ ),
9707
+ /* @__PURE__ */ jsx(
9708
+ Form$2.Field,
9709
+ {
9710
+ control: form.control,
9711
+ name: "address_2",
9712
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9713
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
9714
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9715
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9716
+ ] })
9717
+ }
9718
+ ),
9719
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9720
+ /* @__PURE__ */ jsx(
9721
+ Form$2.Field,
9722
+ {
9723
+ control: form.control,
9724
+ name: "postal_code",
9725
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9726
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
9727
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9728
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9729
+ ] })
9730
+ }
9731
+ ),
9732
+ /* @__PURE__ */ jsx(
9733
+ Form$2.Field,
9734
+ {
9735
+ control: form.control,
9736
+ name: "city",
9737
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9738
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
9739
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9740
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9741
+ ] })
9742
+ }
9743
+ )
9744
+ ] }),
9745
+ /* @__PURE__ */ jsx(
9746
+ Form$2.Field,
9747
+ {
9748
+ control: form.control,
9749
+ name: "province",
9750
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9751
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
9752
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9753
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9754
+ ] })
9755
+ }
9756
+ ),
9757
+ /* @__PURE__ */ jsx(
9758
+ Form$2.Field,
9759
+ {
9760
+ control: form.control,
9761
+ name: "phone",
9762
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9763
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
9764
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9765
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9766
+ ] })
9767
+ }
9768
+ )
9769
+ ] }) }),
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", isLoading: isPending, children: "Save" })
9773
+ ] }) })
9774
+ ]
9775
+ }
9776
+ ) });
9777
+ };
9778
+ const schema$4 = addressSchema;
9779
+ const Email = () => {
9780
+ const { id } = useParams();
9781
+ const { order, isPending, isError, error } = useOrder(id, {
9782
+ fields: "+email"
9783
+ });
9784
+ if (isError) {
9785
+ throw error;
9786
+ }
9787
+ const isReady = !isPending && !!order;
9788
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
9789
+ /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
9790
+ /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Email" }) }),
9791
+ /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
9792
+ ] }),
9793
+ isReady && /* @__PURE__ */ jsx(EmailForm, { order })
9794
+ ] });
9795
+ };
9796
+ const EmailForm = ({ order }) => {
9797
+ const form = useForm({
9798
+ defaultValues: {
9799
+ email: order.email ?? ""
9800
+ },
9801
+ resolver: zodResolver(schema$3)
9802
+ });
9803
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9804
+ const { handleSuccess } = useRouteModal();
9805
+ const onSubmit = form.handleSubmit(async (data) => {
9806
+ await mutateAsync(
9807
+ { email: data.email },
9808
+ {
9809
+ onSuccess: () => {
9810
+ handleSuccess();
9811
+ },
9812
+ onError: (error) => {
9813
+ toast.error(error.message);
9814
+ }
9815
+ }
9816
+ );
9817
+ });
9818
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
9819
+ KeyboundForm,
9820
+ {
9821
+ className: "flex flex-1 flex-col overflow-hidden",
9822
+ onSubmit,
9823
+ children: [
9824
+ /* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsx(
9825
+ Form$2.Field,
9826
+ {
9827
+ control: form.control,
9828
+ name: "email",
9829
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
9830
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Email" }),
9831
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
9832
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
9833
+ ] })
9834
+ }
9835
+ ) }),
9836
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
9837
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9838
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
9839
+ ] }) })
9840
+ ]
9841
+ }
9842
+ ) });
9843
+ };
9844
+ const schema$3 = objectType({
9845
+ email: stringType().email()
9846
+ });
9589
9847
  const NumberInput = forwardRef(
9590
9848
  ({
9591
9849
  value,
@@ -11169,92 +11427,24 @@ function getPromotionIds(items, shippingMethods) {
11169
11427
  const promotionIds = /* @__PURE__ */ new Set();
11170
11428
  for (const item of items) {
11171
11429
  if (item.adjustments) {
11172
- for (const adjustment of item.adjustments) {
11173
- if (adjustment.promotion_id) {
11174
- promotionIds.add(adjustment.promotion_id);
11175
- }
11176
- }
11177
- }
11178
- }
11179
- for (const shippingMethod of shippingMethods) {
11180
- if (shippingMethod.adjustments) {
11181
- for (const adjustment of shippingMethod.adjustments) {
11182
- if (adjustment.promotion_id) {
11183
- promotionIds.add(adjustment.promotion_id);
11184
- }
11185
- }
11186
- }
11187
- }
11188
- return Array.from(promotionIds);
11189
- }
11190
- const Email = () => {
11191
- const { id } = useParams();
11192
- const { order, isPending, isError, error } = useOrder(id, {
11193
- fields: "+email"
11194
- });
11195
- if (isError) {
11196
- throw error;
11197
- }
11198
- const isReady = !isPending && !!order;
11199
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
11200
- /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
11201
- /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Email" }) }),
11202
- /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the email for the draft order" }) })
11203
- ] }),
11204
- isReady && /* @__PURE__ */ jsx(EmailForm, { order })
11205
- ] });
11206
- };
11207
- const EmailForm = ({ order }) => {
11208
- const form = useForm({
11209
- defaultValues: {
11210
- email: order.email ?? ""
11211
- },
11212
- resolver: zodResolver(schema$4)
11213
- });
11214
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11215
- const { handleSuccess } = useRouteModal();
11216
- const onSubmit = form.handleSubmit(async (data) => {
11217
- await mutateAsync(
11218
- { email: data.email },
11219
- {
11220
- onSuccess: () => {
11221
- handleSuccess();
11222
- },
11223
- onError: (error) => {
11224
- toast.error(error.message);
11430
+ for (const adjustment of item.adjustments) {
11431
+ if (adjustment.promotion_id) {
11432
+ promotionIds.add(adjustment.promotion_id);
11225
11433
  }
11226
11434
  }
11227
- );
11228
- });
11229
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
11230
- KeyboundForm,
11231
- {
11232
- className: "flex flex-1 flex-col overflow-hidden",
11233
- onSubmit,
11234
- children: [
11235
- /* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsx(
11236
- Form$2.Field,
11237
- {
11238
- control: form.control,
11239
- name: "email",
11240
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11241
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Email" }),
11242
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11243
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11244
- ] })
11245
- }
11246
- ) }),
11247
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
11248
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11249
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11250
- ] }) })
11251
- ]
11252
11435
  }
11253
- ) });
11254
- };
11255
- const schema$4 = objectType({
11256
- email: stringType().email()
11257
- });
11436
+ }
11437
+ for (const shippingMethod of shippingMethods) {
11438
+ if (shippingMethod.adjustments) {
11439
+ for (const adjustment of shippingMethod.adjustments) {
11440
+ if (adjustment.promotion_id) {
11441
+ promotionIds.add(adjustment.promotion_id);
11442
+ }
11443
+ }
11444
+ }
11445
+ }
11446
+ return Array.from(promotionIds);
11447
+ }
11258
11448
  const SalesChannel = () => {
11259
11449
  const { id } = useParams();
11260
11450
  const { draft_order, isPending, isError, error } = useDraftOrder(
@@ -11283,7 +11473,7 @@ const SalesChannelForm = ({ order }) => {
11283
11473
  defaultValues: {
11284
11474
  sales_channel_id: order.sales_channel_id || ""
11285
11475
  },
11286
- resolver: zodResolver(schema$3)
11476
+ resolver: zodResolver(schema$2)
11287
11477
  });
11288
11478
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11289
11479
  const { handleSuccess } = useRouteModal();
@@ -11358,7 +11548,7 @@ const SalesChannelField = ({ control, order }) => {
11358
11548
  }
11359
11549
  );
11360
11550
  };
11361
- const schema$3 = objectType({
11551
+ const schema$2 = objectType({
11362
11552
  sales_channel_id: stringType().min(1)
11363
11553
  });
11364
11554
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
@@ -12200,7 +12390,7 @@ const ShippingAddressForm = ({ order }) => {
12200
12390
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12201
12391
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12202
12392
  },
12203
- resolver: zodResolver(schema$2)
12393
+ resolver: zodResolver(schema$1)
12204
12394
  });
12205
12395
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12206
12396
  const { handleSuccess } = useRouteModal();
@@ -12370,7 +12560,7 @@ const ShippingAddressForm = ({ order }) => {
12370
12560
  }
12371
12561
  ) });
12372
12562
  };
12373
- const schema$2 = addressSchema;
12563
+ const schema$1 = addressSchema;
12374
12564
  const TransferOwnership = () => {
12375
12565
  const { id } = useParams();
12376
12566
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12394,7 +12584,7 @@ const TransferOwnershipForm = ({ order }) => {
12394
12584
  defaultValues: {
12395
12585
  customer_id: order.customer_id || ""
12396
12586
  },
12397
- resolver: zodResolver(schema$1)
12587
+ resolver: zodResolver(schema)
12398
12588
  });
12399
12589
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12400
12590
  const { handleSuccess } = useRouteModal();
@@ -12844,199 +13034,9 @@ const Illustration = () => {
12844
13034
  }
12845
13035
  );
12846
13036
  };
12847
- const schema$1 = objectType({
13037
+ const schema = objectType({
12848
13038
  customer_id: stringType().min(1)
12849
13039
  });
12850
- const BillingAddress = () => {
12851
- const { id } = useParams();
12852
- const { order, isPending, isError, error } = useOrder(id, {
12853
- fields: "+billing_address"
12854
- });
12855
- if (isError) {
12856
- throw error;
12857
- }
12858
- const isReady = !isPending && !!order;
12859
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
12860
- /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
12861
- /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Billing Address" }) }),
12862
- /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
12863
- ] }),
12864
- isReady && /* @__PURE__ */ jsx(BillingAddressForm, { order })
12865
- ] });
12866
- };
12867
- const BillingAddressForm = ({ order }) => {
12868
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12869
- const form = useForm({
12870
- defaultValues: {
12871
- first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
12872
- last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
12873
- company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
12874
- address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
12875
- address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
12876
- city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
12877
- province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
12878
- country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
12879
- postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
12880
- phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
12881
- },
12882
- resolver: zodResolver(schema)
12883
- });
12884
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12885
- const { handleSuccess } = useRouteModal();
12886
- const onSubmit = form.handleSubmit(async (data) => {
12887
- await mutateAsync(
12888
- { billing_address: data },
12889
- {
12890
- onSuccess: () => {
12891
- handleSuccess();
12892
- },
12893
- onError: (error) => {
12894
- toast.error(error.message);
12895
- }
12896
- }
12897
- );
12898
- });
12899
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
12900
- KeyboundForm,
12901
- {
12902
- className: "flex flex-1 flex-col overflow-hidden",
12903
- onSubmit,
12904
- children: [
12905
- /* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4", children: [
12906
- /* @__PURE__ */ jsx(
12907
- Form$2.Field,
12908
- {
12909
- control: form.control,
12910
- name: "country_code",
12911
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12912
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
12913
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
12914
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12915
- ] })
12916
- }
12917
- ),
12918
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12919
- /* @__PURE__ */ jsx(
12920
- Form$2.Field,
12921
- {
12922
- control: form.control,
12923
- name: "first_name",
12924
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12925
- /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
12926
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12927
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12928
- ] })
12929
- }
12930
- ),
12931
- /* @__PURE__ */ jsx(
12932
- Form$2.Field,
12933
- {
12934
- control: form.control,
12935
- name: "last_name",
12936
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12937
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
12938
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12939
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12940
- ] })
12941
- }
12942
- )
12943
- ] }),
12944
- /* @__PURE__ */ jsx(
12945
- Form$2.Field,
12946
- {
12947
- control: form.control,
12948
- name: "company",
12949
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12950
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
12951
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12952
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12953
- ] })
12954
- }
12955
- ),
12956
- /* @__PURE__ */ jsx(
12957
- Form$2.Field,
12958
- {
12959
- control: form.control,
12960
- name: "address_1",
12961
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12962
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
12963
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12964
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12965
- ] })
12966
- }
12967
- ),
12968
- /* @__PURE__ */ jsx(
12969
- Form$2.Field,
12970
- {
12971
- control: form.control,
12972
- name: "address_2",
12973
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12974
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12975
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12976
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12977
- ] })
12978
- }
12979
- ),
12980
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12981
- /* @__PURE__ */ jsx(
12982
- Form$2.Field,
12983
- {
12984
- control: form.control,
12985
- name: "postal_code",
12986
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12987
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
12988
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12989
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12990
- ] })
12991
- }
12992
- ),
12993
- /* @__PURE__ */ jsx(
12994
- Form$2.Field,
12995
- {
12996
- control: form.control,
12997
- name: "city",
12998
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12999
- /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
13000
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
13001
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
13002
- ] })
13003
- }
13004
- )
13005
- ] }),
13006
- /* @__PURE__ */ jsx(
13007
- Form$2.Field,
13008
- {
13009
- control: form.control,
13010
- name: "province",
13011
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
13012
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
13013
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
13014
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
13015
- ] })
13016
- }
13017
- ),
13018
- /* @__PURE__ */ jsx(
13019
- Form$2.Field,
13020
- {
13021
- control: form.control,
13022
- name: "phone",
13023
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
13024
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
13025
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
13026
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
13027
- ] })
13028
- }
13029
- )
13030
- ] }) }),
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", isLoading: isPending, children: "Save" })
13034
- ] }) })
13035
- ]
13036
- }
13037
- ) });
13038
- };
13039
- const schema = addressSchema;
13040
13040
  const widgetModule = { widgets: [] };
13041
13041
  const routeModule = {
13042
13042
  routes: [
@@ -13061,6 +13061,14 @@ const routeModule = {
13061
13061
  Component: CustomItems,
13062
13062
  path: "/draft-orders/:id/custom-items"
13063
13063
  },
13064
+ {
13065
+ Component: BillingAddress,
13066
+ path: "/draft-orders/:id/billing-address"
13067
+ },
13068
+ {
13069
+ Component: Email,
13070
+ path: "/draft-orders/:id/email"
13071
+ },
13064
13072
  {
13065
13073
  Component: Items,
13066
13074
  path: "/draft-orders/:id/items"
@@ -13073,10 +13081,6 @@ const routeModule = {
13073
13081
  Component: Promotions,
13074
13082
  path: "/draft-orders/:id/promotions"
13075
13083
  },
13076
- {
13077
- Component: Email,
13078
- path: "/draft-orders/:id/email"
13079
- },
13080
13084
  {
13081
13085
  Component: SalesChannel,
13082
13086
  path: "/draft-orders/:id/sales-channel"
@@ -13092,10 +13096,6 @@ const routeModule = {
13092
13096
  {
13093
13097
  Component: TransferOwnership,
13094
13098
  path: "/draft-orders/:id/transfer-ownership"
13095
- },
13096
- {
13097
- Component: BillingAddress,
13098
- path: "/draft-orders/:id/billing-address"
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-20251024150200",
3
+ "version": "2.11.1-preview-20251024180211",
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-20251024150200",
39
+ "@medusajs/js-sdk": "2.11.1-preview-20251024180211",
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-20251024150200",
49
- "@medusajs/cli": "2.11.1-preview-20251024150200",
50
- "@medusajs/framework": "2.11.1-preview-20251024150200",
51
- "@medusajs/icons": "2.11.1-preview-20251024150200",
52
- "@medusajs/test-utils": "2.11.1-preview-20251024150200",
53
- "@medusajs/types": "2.11.1-preview-20251024150200",
54
- "@medusajs/ui": "4.0.25-preview-20251024150200",
55
- "@medusajs/ui-preset": "2.11.1-preview-20251024150200",
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",
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-20251024150200",
73
- "@medusajs/cli": "2.11.1-preview-20251024150200",
74
- "@medusajs/framework": "2.11.1-preview-20251024150200",
75
- "@medusajs/icons": "2.11.1-preview-20251024150200",
76
- "@medusajs/test-utils": "2.11.1-preview-20251024150200",
77
- "@medusajs/ui": "4.0.25-preview-20251024150200",
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",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },