@medusajs/draft-order 2.10.2-preview-20250904180154 → 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,217 +9560,6 @@ const ID = () => {
9560
9560
  /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
9561
9561
  ] });
9562
9562
  };
9563
- const BillingAddress = () => {
9564
- const { id } = reactRouterDom.useParams();
9565
- const { order, isPending, isError, error } = useOrder(id, {
9566
- fields: "+billing_address"
9567
- });
9568
- if (isError) {
9569
- throw error;
9570
- }
9571
- const isReady = !isPending && !!order;
9572
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9573
- /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
9574
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
9575
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
9576
- ] }),
9577
- isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
9578
- ] });
9579
- };
9580
- const BillingAddressForm = ({ order }) => {
9581
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
9582
- const form = reactHookForm.useForm({
9583
- defaultValues: {
9584
- first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
9585
- last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
9586
- company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
9587
- address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
9588
- address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
9589
- city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
9590
- province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
9591
- country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
9592
- postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
9593
- phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
9594
- },
9595
- resolver: zod.zodResolver(schema$5)
9596
- });
9597
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9598
- const { handleSuccess } = useRouteModal();
9599
- const onSubmit = form.handleSubmit(async (data) => {
9600
- await mutateAsync(
9601
- { billing_address: data },
9602
- {
9603
- onSuccess: () => {
9604
- handleSuccess();
9605
- },
9606
- onError: (error) => {
9607
- ui.toast.error(error.message);
9608
- }
9609
- }
9610
- );
9611
- });
9612
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
9613
- KeyboundForm,
9614
- {
9615
- className: "flex flex-1 flex-col overflow-hidden",
9616
- onSubmit,
9617
- children: [
9618
- /* @__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: [
9619
- /* @__PURE__ */ jsxRuntime.jsx(
9620
- Form$2.Field,
9621
- {
9622
- control: form.control,
9623
- name: "country_code",
9624
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9625
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
9626
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
9627
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9628
- ] })
9629
- }
9630
- ),
9631
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9632
- /* @__PURE__ */ jsxRuntime.jsx(
9633
- Form$2.Field,
9634
- {
9635
- control: form.control,
9636
- name: "first_name",
9637
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9638
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
9639
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9640
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9641
- ] })
9642
- }
9643
- ),
9644
- /* @__PURE__ */ jsxRuntime.jsx(
9645
- Form$2.Field,
9646
- {
9647
- control: form.control,
9648
- name: "last_name",
9649
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9650
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
9651
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9652
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9653
- ] })
9654
- }
9655
- )
9656
- ] }),
9657
- /* @__PURE__ */ jsxRuntime.jsx(
9658
- Form$2.Field,
9659
- {
9660
- control: form.control,
9661
- name: "company",
9662
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9663
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
9664
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9665
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9666
- ] })
9667
- }
9668
- ),
9669
- /* @__PURE__ */ jsxRuntime.jsx(
9670
- Form$2.Field,
9671
- {
9672
- control: form.control,
9673
- name: "address_1",
9674
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9675
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
9676
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9677
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9678
- ] })
9679
- }
9680
- ),
9681
- /* @__PURE__ */ jsxRuntime.jsx(
9682
- Form$2.Field,
9683
- {
9684
- control: form.control,
9685
- name: "address_2",
9686
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9687
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
9688
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9689
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9690
- ] })
9691
- }
9692
- ),
9693
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
9694
- /* @__PURE__ */ jsxRuntime.jsx(
9695
- Form$2.Field,
9696
- {
9697
- control: form.control,
9698
- name: "postal_code",
9699
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9700
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
9701
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9702
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9703
- ] })
9704
- }
9705
- ),
9706
- /* @__PURE__ */ jsxRuntime.jsx(
9707
- Form$2.Field,
9708
- {
9709
- control: form.control,
9710
- name: "city",
9711
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9712
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
9713
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9714
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9715
- ] })
9716
- }
9717
- )
9718
- ] }),
9719
- /* @__PURE__ */ jsxRuntime.jsx(
9720
- Form$2.Field,
9721
- {
9722
- control: form.control,
9723
- name: "province",
9724
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9725
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
9726
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9727
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9728
- ] })
9729
- }
9730
- ),
9731
- /* @__PURE__ */ jsxRuntime.jsx(
9732
- Form$2.Field,
9733
- {
9734
- control: form.control,
9735
- name: "phone",
9736
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
9737
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
9738
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
9739
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
9740
- ] })
9741
- }
9742
- )
9743
- ] }) }),
9744
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9745
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9746
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
9747
- ] }) })
9748
- ]
9749
- }
9750
- ) });
9751
- };
9752
- const schema$5 = addressSchema;
9753
- const CustomItems = () => {
9754
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
9755
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
9756
- /* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
9757
- ] });
9758
- };
9759
- const CustomItemsForm = () => {
9760
- const form = reactHookForm.useForm({
9761
- resolver: zod.zodResolver(schema$4)
9762
- });
9763
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
9764
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
9765
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
9766
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
9767
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
9768
- ] }) })
9769
- ] }) });
9770
- };
9771
- const schema$4 = objectType({
9772
- email: stringType().email()
9773
- });
9774
9563
  const Email = () => {
9775
9564
  const { id } = reactRouterDom.useParams();
9776
9565
  const { order, isPending, isError, error } = useOrder(id, {
@@ -9793,7 +9582,7 @@ const EmailForm = ({ order }) => {
9793
9582
  defaultValues: {
9794
9583
  email: order.email ?? ""
9795
9584
  },
9796
- resolver: zod.zodResolver(schema$3)
9585
+ resolver: zod.zodResolver(schema$5)
9797
9586
  });
9798
9587
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
9799
9588
  const { handleSuccess } = useRouteModal();
@@ -9836,7 +9625,7 @@ const EmailForm = ({ order }) => {
9836
9625
  }
9837
9626
  ) });
9838
9627
  };
9839
- const schema$3 = objectType({
9628
+ const schema$5 = objectType({
9840
9629
  email: stringType().email()
9841
9630
  });
9842
9631
  const NumberInput = React.forwardRef(
@@ -11440,44 +11229,150 @@ function getPromotionCodes(items, shippingMethods) {
11440
11229
  }
11441
11230
  return Array.from(codes);
11442
11231
  }
11443
- const STACKED_FOCUS_MODAL_ID = "shipping-form";
11444
- const Shipping = () => {
11445
- var _a;
11232
+ const SalesChannel = () => {
11446
11233
  const { id } = reactRouterDom.useParams();
11447
- const { order, isPending, isError, error } = useOrder(id, {
11448
- fields: "+items.*,+items.variant.*,+items.variant.product.*,+items.variant.product.shipping_profile.*,+currency_code"
11449
- });
11450
- const {
11451
- order: preview,
11452
- isPending: isPreviewPending,
11453
- isError: isPreviewError,
11454
- error: previewError
11455
- } = useOrderPreview(id);
11456
- useInitiateOrderEdit({ preview });
11457
- const { onCancel } = useCancelOrderEdit({ preview });
11234
+ const { draft_order, isPending, isError, error } = useDraftOrder(
11235
+ id,
11236
+ {
11237
+ fields: "+sales_channel_id"
11238
+ },
11239
+ {
11240
+ enabled: !!id
11241
+ }
11242
+ );
11458
11243
  if (isError) {
11459
11244
  throw error;
11460
11245
  }
11461
- if (isPreviewError) {
11462
- throw previewError;
11463
- }
11464
- const orderHasItems = (((_a = order == null ? void 0 : order.items) == null ? void 0 : _a.length) || 0) > 0;
11465
- const isReady = preview && !isPreviewPending && order && !isPending;
11466
- return /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal, { onClose: onCancel, children: !orderHasItems ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col overflow-hidden ", children: [
11467
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Header, {}),
11468
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Body, { className: "flex flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col items-center overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-[720px] flex-col gap-y-6 py-16 px-6", children: [
11469
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Shipping" }) }),
11470
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "small", className: "text-ui-fg-subtle", children: "This draft order currently has no items. Add items to the order before adding shipping." }) })
11471
- ] }) }) }),
11472
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", type: "button", children: "Cancel" }) }) })
11473
- ] }) : isReady ? /* @__PURE__ */ jsxRuntime.jsx(ShippingForm, { preview, order }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11474
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit Shipping" }) }),
11475
- /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading data for the draft order, please wait..." }) })
11476
- ] }) });
11477
- };
11478
- const ShippingForm = ({ preview, order }) => {
11479
- var _a;
11480
- const { setIsOpen } = useStackedModal();
11246
+ const ISrEADY = !!draft_order && !isPending;
11247
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
11248
+ /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
11249
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Sales Channel" }) }),
11250
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Update which sales channel the draft order is associated with" }) })
11251
+ ] }),
11252
+ ISrEADY && /* @__PURE__ */ jsxRuntime.jsx(SalesChannelForm, { order: draft_order })
11253
+ ] });
11254
+ };
11255
+ const SalesChannelForm = ({ order }) => {
11256
+ const form = reactHookForm.useForm({
11257
+ defaultValues: {
11258
+ sales_channel_id: order.sales_channel_id || ""
11259
+ },
11260
+ resolver: zod.zodResolver(schema$4)
11261
+ });
11262
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11263
+ const { handleSuccess } = useRouteModal();
11264
+ const onSubmit = form.handleSubmit(async (data) => {
11265
+ await mutateAsync(
11266
+ {
11267
+ sales_channel_id: data.sales_channel_id
11268
+ },
11269
+ {
11270
+ onSuccess: () => {
11271
+ ui.toast.success("Sales channel updated");
11272
+ handleSuccess();
11273
+ },
11274
+ onError: (error) => {
11275
+ ui.toast.error(error.message);
11276
+ }
11277
+ }
11278
+ );
11279
+ });
11280
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
11281
+ KeyboundForm,
11282
+ {
11283
+ className: "flex flex-1 flex-col overflow-hidden",
11284
+ onSubmit,
11285
+ children: [
11286
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(SalesChannelField, { control: form.control, order }) }),
11287
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
11288
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11289
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11290
+ ] }) })
11291
+ ]
11292
+ }
11293
+ ) });
11294
+ };
11295
+ const SalesChannelField = ({ control, order }) => {
11296
+ const salesChannels = useComboboxData({
11297
+ queryFn: async (params) => {
11298
+ return await sdk.admin.salesChannel.list(params);
11299
+ },
11300
+ queryKey: ["sales-channels"],
11301
+ getOptions: (data) => {
11302
+ return data.sales_channels.map((salesChannel) => ({
11303
+ label: salesChannel.name,
11304
+ value: salesChannel.id
11305
+ }));
11306
+ },
11307
+ defaultValue: order.sales_channel_id || void 0
11308
+ });
11309
+ return /* @__PURE__ */ jsxRuntime.jsx(
11310
+ Form$2.Field,
11311
+ {
11312
+ control,
11313
+ name: "sales_channel_id",
11314
+ render: ({ field }) => {
11315
+ return /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11316
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Sales Channel" }),
11317
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(
11318
+ Combobox,
11319
+ {
11320
+ options: salesChannels.options,
11321
+ fetchNextPage: salesChannels.fetchNextPage,
11322
+ isFetchingNextPage: salesChannels.isFetchingNextPage,
11323
+ searchValue: salesChannels.searchValue,
11324
+ onSearchValueChange: salesChannels.onSearchValueChange,
11325
+ placeholder: "Select sales channel",
11326
+ ...field
11327
+ }
11328
+ ) }),
11329
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11330
+ ] });
11331
+ }
11332
+ }
11333
+ );
11334
+ };
11335
+ const schema$4 = objectType({
11336
+ sales_channel_id: stringType().min(1)
11337
+ });
11338
+ const STACKED_FOCUS_MODAL_ID = "shipping-form";
11339
+ const Shipping = () => {
11340
+ var _a;
11341
+ const { id } = reactRouterDom.useParams();
11342
+ const { order, isPending, isError, error } = useOrder(id, {
11343
+ fields: "+items.*,+items.variant.*,+items.variant.product.*,+items.variant.product.shipping_profile.*,+currency_code"
11344
+ });
11345
+ const {
11346
+ order: preview,
11347
+ isPending: isPreviewPending,
11348
+ isError: isPreviewError,
11349
+ error: previewError
11350
+ } = useOrderPreview(id);
11351
+ useInitiateOrderEdit({ preview });
11352
+ const { onCancel } = useCancelOrderEdit({ preview });
11353
+ if (isError) {
11354
+ throw error;
11355
+ }
11356
+ if (isPreviewError) {
11357
+ throw previewError;
11358
+ }
11359
+ const orderHasItems = (((_a = order == null ? void 0 : order.items) == null ? void 0 : _a.length) || 0) > 0;
11360
+ const isReady = preview && !isPreviewPending && order && !isPending;
11361
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal, { onClose: onCancel, children: !orderHasItems ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col overflow-hidden ", children: [
11362
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Header, {}),
11363
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Body, { className: "flex flex-1 flex-col overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col items-center overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-[720px] flex-col gap-y-6 py-16 px-6", children: [
11364
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Shipping" }) }),
11365
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "small", className: "text-ui-fg-subtle", children: "This draft order currently has no items. Add items to the order before adding shipping." }) })
11366
+ ] }) }) }),
11367
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", type: "button", children: "Cancel" }) }) })
11368
+ ] }) : isReady ? /* @__PURE__ */ jsxRuntime.jsx(ShippingForm, { preview, order }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11369
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit Shipping" }) }),
11370
+ /* @__PURE__ */ jsxRuntime.jsx(RouteFocusModal.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Loading data for the draft order, please wait..." }) })
11371
+ ] }) });
11372
+ };
11373
+ const ShippingForm = ({ preview, order }) => {
11374
+ var _a;
11375
+ const { setIsOpen } = useStackedModal();
11481
11376
  const [isSubmitting, setIsSubmitting] = React.useState(false);
11482
11377
  const [data, setData] = React.useState(null);
11483
11378
  const appliedShippingOptionIds = (_a = preview.shipping_methods) == null ? void 0 : _a.map((method) => method.shipping_option_id).filter(Boolean);
@@ -12279,7 +12174,7 @@ const ShippingAddressForm = ({ order }) => {
12279
12174
  postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12280
12175
  phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12281
12176
  },
12282
- resolver: zod.zodResolver(schema$2)
12177
+ resolver: zod.zodResolver(schema$3)
12283
12178
  });
12284
12179
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12285
12180
  const { handleSuccess } = useRouteModal();
@@ -12449,7 +12344,7 @@ const ShippingAddressForm = ({ order }) => {
12449
12344
  }
12450
12345
  ) });
12451
12346
  };
12452
- const schema$2 = addressSchema;
12347
+ const schema$3 = addressSchema;
12453
12348
  const TransferOwnership = () => {
12454
12349
  const { id } = reactRouterDom.useParams();
12455
12350
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -12473,7 +12368,7 @@ const TransferOwnershipForm = ({ order }) => {
12473
12368
  defaultValues: {
12474
12369
  customer_id: order.customer_id || ""
12475
12370
  },
12476
- resolver: zod.zodResolver(schema$1)
12371
+ resolver: zod.zodResolver(schema$2)
12477
12372
  });
12478
12373
  const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12479
12374
  const { handleSuccess } = useRouteModal();
@@ -12923,36 +12818,61 @@ const Illustration = () => {
12923
12818
  }
12924
12819
  );
12925
12820
  };
12926
- const schema$1 = objectType({
12821
+ const schema$2 = objectType({
12927
12822
  customer_id: stringType().min(1)
12928
12823
  });
12929
- const SalesChannel = () => {
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
+ const BillingAddress = () => {
12930
12846
  const { id } = reactRouterDom.useParams();
12931
- const { draft_order, isPending, isError, error } = useDraftOrder(
12932
- id,
12933
- {
12934
- fields: "+sales_channel_id"
12935
- },
12936
- {
12937
- enabled: !!id
12938
- }
12939
- );
12847
+ const { order, isPending, isError, error } = useOrder(id, {
12848
+ fields: "+billing_address"
12849
+ });
12940
12850
  if (isError) {
12941
12851
  throw error;
12942
12852
  }
12943
- const ISrEADY = !!draft_order && !isPending;
12853
+ const isReady = !isPending && !!order;
12944
12854
  return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
12945
12855
  /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
12946
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Sales Channel" }) }),
12947
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Update which sales channel the draft order is associated with" }) })
12856
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Billing Address" }) }),
12857
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the billing address for the draft order" }) })
12948
12858
  ] }),
12949
- ISrEADY && /* @__PURE__ */ jsxRuntime.jsx(SalesChannelForm, { order: draft_order })
12859
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(BillingAddressForm, { order })
12950
12860
  ] });
12951
12861
  };
12952
- const SalesChannelForm = ({ order }) => {
12862
+ const BillingAddressForm = ({ order }) => {
12863
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12953
12864
  const form = reactHookForm.useForm({
12954
12865
  defaultValues: {
12955
- sales_channel_id: order.sales_channel_id || ""
12866
+ first_name: ((_a = order.billing_address) == null ? void 0 : _a.first_name) ?? "",
12867
+ last_name: ((_b = order.billing_address) == null ? void 0 : _b.last_name) ?? "",
12868
+ company: ((_c = order.billing_address) == null ? void 0 : _c.company) ?? "",
12869
+ address_1: ((_d = order.billing_address) == null ? void 0 : _d.address_1) ?? "",
12870
+ address_2: ((_e = order.billing_address) == null ? void 0 : _e.address_2) ?? "",
12871
+ city: ((_f = order.billing_address) == null ? void 0 : _f.city) ?? "",
12872
+ province: ((_g = order.billing_address) == null ? void 0 : _g.province) ?? "",
12873
+ country_code: ((_h = order.billing_address) == null ? void 0 : _h.country_code) ?? "",
12874
+ postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
12875
+ phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
12956
12876
  },
12957
12877
  resolver: zod.zodResolver(schema)
12958
12878
  });
@@ -12960,12 +12880,9 @@ const SalesChannelForm = ({ order }) => {
12960
12880
  const { handleSuccess } = useRouteModal();
12961
12881
  const onSubmit = form.handleSubmit(async (data) => {
12962
12882
  await mutateAsync(
12963
- {
12964
- sales_channel_id: data.sales_channel_id
12965
- },
12883
+ { billing_address: data },
12966
12884
  {
12967
12885
  onSuccess: () => {
12968
- ui.toast.success("Sales channel updated");
12969
12886
  handleSuccess();
12970
12887
  },
12971
12888
  onError: (error) => {
@@ -12980,7 +12897,132 @@ const SalesChannelForm = ({ order }) => {
12980
12897
  className: "flex flex-1 flex-col overflow-hidden",
12981
12898
  onSubmit,
12982
12899
  children: [
12983
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, { className: "flex flex-col gap-y-6 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(SalesChannelField, { control: form.control, order }) }),
12900
+ /* @__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: [
12901
+ /* @__PURE__ */ jsxRuntime.jsx(
12902
+ Form$2.Field,
12903
+ {
12904
+ control: form.control,
12905
+ name: "country_code",
12906
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12907
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
12908
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
12909
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12910
+ ] })
12911
+ }
12912
+ ),
12913
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12914
+ /* @__PURE__ */ jsxRuntime.jsx(
12915
+ Form$2.Field,
12916
+ {
12917
+ control: form.control,
12918
+ name: "first_name",
12919
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12920
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
12921
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12922
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12923
+ ] })
12924
+ }
12925
+ ),
12926
+ /* @__PURE__ */ jsxRuntime.jsx(
12927
+ Form$2.Field,
12928
+ {
12929
+ control: form.control,
12930
+ name: "last_name",
12931
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12932
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
12933
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12934
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12935
+ ] })
12936
+ }
12937
+ )
12938
+ ] }),
12939
+ /* @__PURE__ */ jsxRuntime.jsx(
12940
+ Form$2.Field,
12941
+ {
12942
+ control: form.control,
12943
+ name: "company",
12944
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12945
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
12946
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12947
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12948
+ ] })
12949
+ }
12950
+ ),
12951
+ /* @__PURE__ */ jsxRuntime.jsx(
12952
+ Form$2.Field,
12953
+ {
12954
+ control: form.control,
12955
+ name: "address_1",
12956
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12957
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
12958
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12959
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12960
+ ] })
12961
+ }
12962
+ ),
12963
+ /* @__PURE__ */ jsxRuntime.jsx(
12964
+ Form$2.Field,
12965
+ {
12966
+ control: form.control,
12967
+ name: "address_2",
12968
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12969
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12970
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12971
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12972
+ ] })
12973
+ }
12974
+ ),
12975
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12976
+ /* @__PURE__ */ jsxRuntime.jsx(
12977
+ Form$2.Field,
12978
+ {
12979
+ control: form.control,
12980
+ name: "postal_code",
12981
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12982
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
12983
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12984
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12985
+ ] })
12986
+ }
12987
+ ),
12988
+ /* @__PURE__ */ jsxRuntime.jsx(
12989
+ Form$2.Field,
12990
+ {
12991
+ control: form.control,
12992
+ name: "city",
12993
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12994
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
12995
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12996
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12997
+ ] })
12998
+ }
12999
+ )
13000
+ ] }),
13001
+ /* @__PURE__ */ jsxRuntime.jsx(
13002
+ Form$2.Field,
13003
+ {
13004
+ control: form.control,
13005
+ name: "province",
13006
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
13007
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
13008
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
13009
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
13010
+ ] })
13011
+ }
13012
+ ),
13013
+ /* @__PURE__ */ jsxRuntime.jsx(
13014
+ Form$2.Field,
13015
+ {
13016
+ control: form.control,
13017
+ name: "phone",
13018
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
13019
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
13020
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
13021
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
13022
+ ] })
13023
+ }
13024
+ )
13025
+ ] }) }),
12984
13026
  /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
12985
13027
  /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12986
13028
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
@@ -12989,49 +13031,7 @@ const SalesChannelForm = ({ order }) => {
12989
13031
  }
12990
13032
  ) });
12991
13033
  };
12992
- const SalesChannelField = ({ control, order }) => {
12993
- const salesChannels = useComboboxData({
12994
- queryFn: async (params) => {
12995
- return await sdk.admin.salesChannel.list(params);
12996
- },
12997
- queryKey: ["sales-channels"],
12998
- getOptions: (data) => {
12999
- return data.sales_channels.map((salesChannel) => ({
13000
- label: salesChannel.name,
13001
- value: salesChannel.id
13002
- }));
13003
- },
13004
- defaultValue: order.sales_channel_id || void 0
13005
- });
13006
- return /* @__PURE__ */ jsxRuntime.jsx(
13007
- Form$2.Field,
13008
- {
13009
- control,
13010
- name: "sales_channel_id",
13011
- render: ({ field }) => {
13012
- return /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
13013
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Sales Channel" }),
13014
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(
13015
- Combobox,
13016
- {
13017
- options: salesChannels.options,
13018
- fetchNextPage: salesChannels.fetchNextPage,
13019
- isFetchingNextPage: salesChannels.isFetchingNextPage,
13020
- searchValue: salesChannels.searchValue,
13021
- onSearchValueChange: salesChannels.onSearchValueChange,
13022
- placeholder: "Select sales channel",
13023
- ...field
13024
- }
13025
- ) }),
13026
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
13027
- ] });
13028
- }
13029
- }
13030
- );
13031
- };
13032
- const schema = objectType({
13033
- sales_channel_id: stringType().min(1)
13034
- });
13034
+ const schema = addressSchema;
13035
13035
  const widgetModule = { widgets: [] };
13036
13036
  const routeModule = {
13037
13037
  routes: [
@@ -13052,14 +13052,6 @@ const routeModule = {
13052
13052
  handle,
13053
13053
  loader,
13054
13054
  children: [
13055
- {
13056
- Component: BillingAddress,
13057
- path: "/draft-orders/:id/billing-address"
13058
- },
13059
- {
13060
- Component: CustomItems,
13061
- path: "/draft-orders/:id/custom-items"
13062
- },
13063
13055
  {
13064
13056
  Component: Email,
13065
13057
  path: "/draft-orders/:id/email"
@@ -13076,6 +13068,10 @@ const routeModule = {
13076
13068
  Component: Promotions,
13077
13069
  path: "/draft-orders/:id/promotions"
13078
13070
  },
13071
+ {
13072
+ Component: SalesChannel,
13073
+ path: "/draft-orders/:id/sales-channel"
13074
+ },
13079
13075
  {
13080
13076
  Component: Shipping,
13081
13077
  path: "/draft-orders/:id/shipping"
@@ -13089,8 +13085,12 @@ const routeModule = {
13089
13085
  path: "/draft-orders/:id/transfer-ownership"
13090
13086
  },
13091
13087
  {
13092
- Component: SalesChannel,
13093
- path: "/draft-orders/:id/sales-channel"
13088
+ Component: CustomItems,
13089
+ path: "/draft-orders/:id/custom-items"
13090
+ },
13091
+ {
13092
+ Component: BillingAddress,
13093
+ path: "/draft-orders/:id/billing-address"
13094
13094
  }
13095
13095
  ]
13096
13096
  }