@medusajs/draft-order 2.10.4-snapshot-20251008113737 → 2.10.4-snapshot-20251008131841

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.
@@ -11369,209 +11369,6 @@ const SalesChannelField = ({ control, order }) => {
11369
11369
  const schema$3 = objectType({
11370
11370
  sales_channel_id: stringType().min(1)
11371
11371
  });
11372
- const ShippingAddress = () => {
11373
- const { id } = reactRouterDom.useParams();
11374
- const { order, isPending, isError, error } = useOrder(id, {
11375
- fields: "+shipping_address"
11376
- });
11377
- if (isError) {
11378
- throw error;
11379
- }
11380
- const isReady = !isPending && !!order;
11381
- return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
11382
- /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
11383
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Shipping Address" }) }),
11384
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
11385
- ] }),
11386
- isReady && /* @__PURE__ */ jsxRuntime.jsx(ShippingAddressForm, { order })
11387
- ] });
11388
- };
11389
- const ShippingAddressForm = ({ order }) => {
11390
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
11391
- const form = reactHookForm.useForm({
11392
- defaultValues: {
11393
- first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
11394
- last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
11395
- company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
11396
- address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
11397
- address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
11398
- city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
11399
- province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
11400
- country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
11401
- postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
11402
- phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
11403
- },
11404
- resolver: zod.zodResolver(schema$2)
11405
- });
11406
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11407
- const { handleSuccess } = useRouteModal();
11408
- const onSubmit = form.handleSubmit(async (data) => {
11409
- await mutateAsync(
11410
- {
11411
- shipping_address: {
11412
- first_name: data.first_name,
11413
- last_name: data.last_name,
11414
- company: data.company,
11415
- address_1: data.address_1,
11416
- address_2: data.address_2,
11417
- city: data.city,
11418
- province: data.province,
11419
- country_code: data.country_code,
11420
- postal_code: data.postal_code,
11421
- phone: data.phone
11422
- }
11423
- },
11424
- {
11425
- onSuccess: () => {
11426
- handleSuccess();
11427
- },
11428
- onError: (error) => {
11429
- ui.toast.error(error.message);
11430
- }
11431
- }
11432
- );
11433
- });
11434
- return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
11435
- KeyboundForm,
11436
- {
11437
- className: "flex flex-1 flex-col overflow-hidden",
11438
- onSubmit,
11439
- children: [
11440
- /* @__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: [
11441
- /* @__PURE__ */ jsxRuntime.jsx(
11442
- Form$2.Field,
11443
- {
11444
- control: form.control,
11445
- name: "country_code",
11446
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11447
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
11448
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
11449
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11450
- ] })
11451
- }
11452
- ),
11453
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11454
- /* @__PURE__ */ jsxRuntime.jsx(
11455
- Form$2.Field,
11456
- {
11457
- control: form.control,
11458
- name: "first_name",
11459
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11460
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
11461
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11462
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11463
- ] })
11464
- }
11465
- ),
11466
- /* @__PURE__ */ jsxRuntime.jsx(
11467
- Form$2.Field,
11468
- {
11469
- control: form.control,
11470
- name: "last_name",
11471
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11472
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
11473
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11474
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11475
- ] })
11476
- }
11477
- )
11478
- ] }),
11479
- /* @__PURE__ */ jsxRuntime.jsx(
11480
- Form$2.Field,
11481
- {
11482
- control: form.control,
11483
- name: "company",
11484
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11485
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
11486
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11487
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11488
- ] })
11489
- }
11490
- ),
11491
- /* @__PURE__ */ jsxRuntime.jsx(
11492
- Form$2.Field,
11493
- {
11494
- control: form.control,
11495
- name: "address_1",
11496
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11497
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
11498
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11499
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11500
- ] })
11501
- }
11502
- ),
11503
- /* @__PURE__ */ jsxRuntime.jsx(
11504
- Form$2.Field,
11505
- {
11506
- control: form.control,
11507
- name: "address_2",
11508
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11509
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
11510
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11511
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11512
- ] })
11513
- }
11514
- ),
11515
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11516
- /* @__PURE__ */ jsxRuntime.jsx(
11517
- Form$2.Field,
11518
- {
11519
- control: form.control,
11520
- name: "postal_code",
11521
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11522
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
11523
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11524
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11525
- ] })
11526
- }
11527
- ),
11528
- /* @__PURE__ */ jsxRuntime.jsx(
11529
- Form$2.Field,
11530
- {
11531
- control: form.control,
11532
- name: "city",
11533
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11534
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
11535
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11536
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11537
- ] })
11538
- }
11539
- )
11540
- ] }),
11541
- /* @__PURE__ */ jsxRuntime.jsx(
11542
- Form$2.Field,
11543
- {
11544
- control: form.control,
11545
- name: "province",
11546
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11547
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
11548
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11549
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11550
- ] })
11551
- }
11552
- ),
11553
- /* @__PURE__ */ jsxRuntime.jsx(
11554
- Form$2.Field,
11555
- {
11556
- control: form.control,
11557
- name: "phone",
11558
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
11559
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
11560
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
11561
- /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
11562
- ] })
11563
- }
11564
- )
11565
- ] }) }),
11566
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
11567
- /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11568
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11569
- ] }) })
11570
- ]
11571
- }
11572
- ) });
11573
- };
11574
- const schema$2 = addressSchema;
11575
11372
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11576
11373
  const Shipping = () => {
11577
11374
  var _a;
@@ -12379,6 +12176,209 @@ const CustomAmountField = ({
12379
12176
  }
12380
12177
  );
12381
12178
  };
12179
+ const ShippingAddress = () => {
12180
+ const { id } = reactRouterDom.useParams();
12181
+ const { order, isPending, isError, error } = useOrder(id, {
12182
+ fields: "+shipping_address"
12183
+ });
12184
+ if (isError) {
12185
+ throw error;
12186
+ }
12187
+ const isReady = !isPending && !!order;
12188
+ return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
12189
+ /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer.Header, { children: [
12190
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Shipping Address" }) }),
12191
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
12192
+ ] }),
12193
+ isReady && /* @__PURE__ */ jsxRuntime.jsx(ShippingAddressForm, { order })
12194
+ ] });
12195
+ };
12196
+ const ShippingAddressForm = ({ order }) => {
12197
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12198
+ const form = reactHookForm.useForm({
12199
+ defaultValues: {
12200
+ first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
12201
+ last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
12202
+ company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
12203
+ address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
12204
+ address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
12205
+ city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
12206
+ province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
12207
+ country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
12208
+ postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12209
+ phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12210
+ },
12211
+ resolver: zod.zodResolver(schema$2)
12212
+ });
12213
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12214
+ const { handleSuccess } = useRouteModal();
12215
+ const onSubmit = form.handleSubmit(async (data) => {
12216
+ await mutateAsync(
12217
+ {
12218
+ shipping_address: {
12219
+ first_name: data.first_name,
12220
+ last_name: data.last_name,
12221
+ company: data.company,
12222
+ address_1: data.address_1,
12223
+ address_2: data.address_2,
12224
+ city: data.city,
12225
+ province: data.province,
12226
+ country_code: data.country_code,
12227
+ postal_code: data.postal_code,
12228
+ phone: data.phone
12229
+ }
12230
+ },
12231
+ {
12232
+ onSuccess: () => {
12233
+ handleSuccess();
12234
+ },
12235
+ onError: (error) => {
12236
+ ui.toast.error(error.message);
12237
+ }
12238
+ }
12239
+ );
12240
+ });
12241
+ return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(
12242
+ KeyboundForm,
12243
+ {
12244
+ className: "flex flex-1 flex-col overflow-hidden",
12245
+ onSubmit,
12246
+ children: [
12247
+ /* @__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: [
12248
+ /* @__PURE__ */ jsxRuntime.jsx(
12249
+ Form$2.Field,
12250
+ {
12251
+ control: form.control,
12252
+ name: "country_code",
12253
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12254
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Country" }),
12255
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, { ...field }) }),
12256
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12257
+ ] })
12258
+ }
12259
+ ),
12260
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12261
+ /* @__PURE__ */ jsxRuntime.jsx(
12262
+ Form$2.Field,
12263
+ {
12264
+ control: form.control,
12265
+ name: "first_name",
12266
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12267
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "First name" }),
12268
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12269
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12270
+ ] })
12271
+ }
12272
+ ),
12273
+ /* @__PURE__ */ jsxRuntime.jsx(
12274
+ Form$2.Field,
12275
+ {
12276
+ control: form.control,
12277
+ name: "last_name",
12278
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12279
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Last name" }),
12280
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12281
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12282
+ ] })
12283
+ }
12284
+ )
12285
+ ] }),
12286
+ /* @__PURE__ */ jsxRuntime.jsx(
12287
+ Form$2.Field,
12288
+ {
12289
+ control: form.control,
12290
+ name: "company",
12291
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12292
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Company" }),
12293
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12294
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12295
+ ] })
12296
+ }
12297
+ ),
12298
+ /* @__PURE__ */ jsxRuntime.jsx(
12299
+ Form$2.Field,
12300
+ {
12301
+ control: form.control,
12302
+ name: "address_1",
12303
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12304
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Address" }),
12305
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12306
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12307
+ ] })
12308
+ }
12309
+ ),
12310
+ /* @__PURE__ */ jsxRuntime.jsx(
12311
+ Form$2.Field,
12312
+ {
12313
+ control: form.control,
12314
+ name: "address_2",
12315
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12316
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12317
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12318
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12319
+ ] })
12320
+ }
12321
+ ),
12322
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12323
+ /* @__PURE__ */ jsxRuntime.jsx(
12324
+ Form$2.Field,
12325
+ {
12326
+ control: form.control,
12327
+ name: "postal_code",
12328
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12329
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "Postal code" }),
12330
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12331
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12332
+ ] })
12333
+ }
12334
+ ),
12335
+ /* @__PURE__ */ jsxRuntime.jsx(
12336
+ Form$2.Field,
12337
+ {
12338
+ control: form.control,
12339
+ name: "city",
12340
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12341
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { children: "City" }),
12342
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12343
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12344
+ ] })
12345
+ }
12346
+ )
12347
+ ] }),
12348
+ /* @__PURE__ */ jsxRuntime.jsx(
12349
+ Form$2.Field,
12350
+ {
12351
+ control: form.control,
12352
+ name: "province",
12353
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12354
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Province / State" }),
12355
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12356
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12357
+ ] })
12358
+ }
12359
+ ),
12360
+ /* @__PURE__ */ jsxRuntime.jsx(
12361
+ Form$2.Field,
12362
+ {
12363
+ control: form.control,
12364
+ name: "phone",
12365
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(Form$2.Item, { children: [
12366
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Label, { optional: true, children: "Phone" }),
12367
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.Control, { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Input, { ...field }) }),
12368
+ /* @__PURE__ */ jsxRuntime.jsx(Form$2.ErrorMessage, {})
12369
+ ] })
12370
+ }
12371
+ )
12372
+ ] }) }),
12373
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
12374
+ /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12375
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
12376
+ ] }) })
12377
+ ]
12378
+ }
12379
+ ) });
12380
+ };
12381
+ const schema$2 = addressSchema;
12382
12382
  const TransferOwnership = () => {
12383
12383
  const { id } = reactRouterDom.useParams();
12384
12384
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -13089,14 +13089,14 @@ const routeModule = {
13089
13089
  Component: SalesChannel,
13090
13090
  path: "/draft-orders/:id/sales-channel"
13091
13091
  },
13092
- {
13093
- Component: ShippingAddress,
13094
- path: "/draft-orders/:id/shipping-address"
13095
- },
13096
13092
  {
13097
13093
  Component: Shipping,
13098
13094
  path: "/draft-orders/:id/shipping"
13099
13095
  },
13096
+ {
13097
+ Component: ShippingAddress,
13098
+ path: "/draft-orders/:id/shipping-address"
13099
+ },
13100
13100
  {
13101
13101
  Component: TransferOwnership,
13102
13102
  path: "/draft-orders/:id/transfer-ownership"
@@ -11363,209 +11363,6 @@ const SalesChannelField = ({ control, order }) => {
11363
11363
  const schema$3 = objectType({
11364
11364
  sales_channel_id: stringType().min(1)
11365
11365
  });
11366
- const ShippingAddress = () => {
11367
- const { id } = useParams();
11368
- const { order, isPending, isError, error } = useOrder(id, {
11369
- fields: "+shipping_address"
11370
- });
11371
- if (isError) {
11372
- throw error;
11373
- }
11374
- const isReady = !isPending && !!order;
11375
- return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
11376
- /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
11377
- /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" }) }),
11378
- /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
11379
- ] }),
11380
- isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })
11381
- ] });
11382
- };
11383
- const ShippingAddressForm = ({ order }) => {
11384
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
11385
- const form = useForm({
11386
- defaultValues: {
11387
- first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
11388
- last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
11389
- company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
11390
- address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
11391
- address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
11392
- city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
11393
- province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
11394
- country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
11395
- postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
11396
- phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
11397
- },
11398
- resolver: zodResolver(schema$2)
11399
- });
11400
- const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
11401
- const { handleSuccess } = useRouteModal();
11402
- const onSubmit = form.handleSubmit(async (data) => {
11403
- await mutateAsync(
11404
- {
11405
- shipping_address: {
11406
- first_name: data.first_name,
11407
- last_name: data.last_name,
11408
- company: data.company,
11409
- address_1: data.address_1,
11410
- address_2: data.address_2,
11411
- city: data.city,
11412
- province: data.province,
11413
- country_code: data.country_code,
11414
- postal_code: data.postal_code,
11415
- phone: data.phone
11416
- }
11417
- },
11418
- {
11419
- onSuccess: () => {
11420
- handleSuccess();
11421
- },
11422
- onError: (error) => {
11423
- toast.error(error.message);
11424
- }
11425
- }
11426
- );
11427
- });
11428
- return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
11429
- KeyboundForm,
11430
- {
11431
- className: "flex flex-1 flex-col overflow-hidden",
11432
- onSubmit,
11433
- children: [
11434
- /* @__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: [
11435
- /* @__PURE__ */ jsx(
11436
- Form$2.Field,
11437
- {
11438
- control: form.control,
11439
- name: "country_code",
11440
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11441
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
11442
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
11443
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11444
- ] })
11445
- }
11446
- ),
11447
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11448
- /* @__PURE__ */ jsx(
11449
- Form$2.Field,
11450
- {
11451
- control: form.control,
11452
- name: "first_name",
11453
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11454
- /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
11455
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11456
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11457
- ] })
11458
- }
11459
- ),
11460
- /* @__PURE__ */ jsx(
11461
- Form$2.Field,
11462
- {
11463
- control: form.control,
11464
- name: "last_name",
11465
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11466
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
11467
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11468
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11469
- ] })
11470
- }
11471
- )
11472
- ] }),
11473
- /* @__PURE__ */ jsx(
11474
- Form$2.Field,
11475
- {
11476
- control: form.control,
11477
- name: "company",
11478
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11479
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
11480
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11481
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11482
- ] })
11483
- }
11484
- ),
11485
- /* @__PURE__ */ jsx(
11486
- Form$2.Field,
11487
- {
11488
- control: form.control,
11489
- name: "address_1",
11490
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11491
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
11492
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11493
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11494
- ] })
11495
- }
11496
- ),
11497
- /* @__PURE__ */ jsx(
11498
- Form$2.Field,
11499
- {
11500
- control: form.control,
11501
- name: "address_2",
11502
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11503
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
11504
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11505
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11506
- ] })
11507
- }
11508
- ),
11509
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
11510
- /* @__PURE__ */ jsx(
11511
- Form$2.Field,
11512
- {
11513
- control: form.control,
11514
- name: "postal_code",
11515
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11516
- /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
11517
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11518
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11519
- ] })
11520
- }
11521
- ),
11522
- /* @__PURE__ */ jsx(
11523
- Form$2.Field,
11524
- {
11525
- control: form.control,
11526
- name: "city",
11527
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11528
- /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
11529
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11530
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11531
- ] })
11532
- }
11533
- )
11534
- ] }),
11535
- /* @__PURE__ */ jsx(
11536
- Form$2.Field,
11537
- {
11538
- control: form.control,
11539
- name: "province",
11540
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11541
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
11542
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11543
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11544
- ] })
11545
- }
11546
- ),
11547
- /* @__PURE__ */ jsx(
11548
- Form$2.Field,
11549
- {
11550
- control: form.control,
11551
- name: "phone",
11552
- render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
11553
- /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
11554
- /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
11555
- /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
11556
- ] })
11557
- }
11558
- )
11559
- ] }) }),
11560
- /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
11561
- /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
11562
- /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
11563
- ] }) })
11564
- ]
11565
- }
11566
- ) });
11567
- };
11568
- const schema$2 = addressSchema;
11569
11366
  const STACKED_FOCUS_MODAL_ID = "shipping-form";
11570
11367
  const Shipping = () => {
11571
11368
  var _a;
@@ -12373,6 +12170,209 @@ const CustomAmountField = ({
12373
12170
  }
12374
12171
  );
12375
12172
  };
12173
+ const ShippingAddress = () => {
12174
+ const { id } = useParams();
12175
+ const { order, isPending, isError, error } = useOrder(id, {
12176
+ fields: "+shipping_address"
12177
+ });
12178
+ if (isError) {
12179
+ throw error;
12180
+ }
12181
+ const isReady = !isPending && !!order;
12182
+ return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
12183
+ /* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [
12184
+ /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" }) }),
12185
+ /* @__PURE__ */ jsx(RouteDrawer.Description, { asChild: true, children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Edit the shipping address for the draft order" }) })
12186
+ ] }),
12187
+ isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })
12188
+ ] });
12189
+ };
12190
+ const ShippingAddressForm = ({ order }) => {
12191
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
12192
+ const form = useForm({
12193
+ defaultValues: {
12194
+ first_name: ((_a = order.shipping_address) == null ? void 0 : _a.first_name) ?? "",
12195
+ last_name: ((_b = order.shipping_address) == null ? void 0 : _b.last_name) ?? "",
12196
+ company: ((_c = order.shipping_address) == null ? void 0 : _c.company) ?? "",
12197
+ address_1: ((_d = order.shipping_address) == null ? void 0 : _d.address_1) ?? "",
12198
+ address_2: ((_e = order.shipping_address) == null ? void 0 : _e.address_2) ?? "",
12199
+ city: ((_f = order.shipping_address) == null ? void 0 : _f.city) ?? "",
12200
+ province: ((_g = order.shipping_address) == null ? void 0 : _g.province) ?? "",
12201
+ country_code: ((_h = order.shipping_address) == null ? void 0 : _h.country_code) ?? "",
12202
+ postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
12203
+ phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
12204
+ },
12205
+ resolver: zodResolver(schema$2)
12206
+ });
12207
+ const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
12208
+ const { handleSuccess } = useRouteModal();
12209
+ const onSubmit = form.handleSubmit(async (data) => {
12210
+ await mutateAsync(
12211
+ {
12212
+ shipping_address: {
12213
+ first_name: data.first_name,
12214
+ last_name: data.last_name,
12215
+ company: data.company,
12216
+ address_1: data.address_1,
12217
+ address_2: data.address_2,
12218
+ city: data.city,
12219
+ province: data.province,
12220
+ country_code: data.country_code,
12221
+ postal_code: data.postal_code,
12222
+ phone: data.phone
12223
+ }
12224
+ },
12225
+ {
12226
+ onSuccess: () => {
12227
+ handleSuccess();
12228
+ },
12229
+ onError: (error) => {
12230
+ toast.error(error.message);
12231
+ }
12232
+ }
12233
+ );
12234
+ });
12235
+ return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(
12236
+ KeyboundForm,
12237
+ {
12238
+ className: "flex flex-1 flex-col overflow-hidden",
12239
+ onSubmit,
12240
+ children: [
12241
+ /* @__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: [
12242
+ /* @__PURE__ */ jsx(
12243
+ Form$2.Field,
12244
+ {
12245
+ control: form.control,
12246
+ name: "country_code",
12247
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12248
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
12249
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
12250
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12251
+ ] })
12252
+ }
12253
+ ),
12254
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12255
+ /* @__PURE__ */ jsx(
12256
+ Form$2.Field,
12257
+ {
12258
+ control: form.control,
12259
+ name: "first_name",
12260
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12261
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
12262
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12263
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12264
+ ] })
12265
+ }
12266
+ ),
12267
+ /* @__PURE__ */ jsx(
12268
+ Form$2.Field,
12269
+ {
12270
+ control: form.control,
12271
+ name: "last_name",
12272
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12273
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
12274
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12275
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12276
+ ] })
12277
+ }
12278
+ )
12279
+ ] }),
12280
+ /* @__PURE__ */ jsx(
12281
+ Form$2.Field,
12282
+ {
12283
+ control: form.control,
12284
+ name: "company",
12285
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12286
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Company" }),
12287
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12288
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12289
+ ] })
12290
+ }
12291
+ ),
12292
+ /* @__PURE__ */ jsx(
12293
+ Form$2.Field,
12294
+ {
12295
+ control: form.control,
12296
+ name: "address_1",
12297
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12298
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
12299
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12300
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12301
+ ] })
12302
+ }
12303
+ ),
12304
+ /* @__PURE__ */ jsx(
12305
+ Form$2.Field,
12306
+ {
12307
+ control: form.control,
12308
+ name: "address_2",
12309
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12310
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Apartment, suite, etc." }),
12311
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12312
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12313
+ ] })
12314
+ }
12315
+ ),
12316
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
12317
+ /* @__PURE__ */ jsx(
12318
+ Form$2.Field,
12319
+ {
12320
+ control: form.control,
12321
+ name: "postal_code",
12322
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12323
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
12324
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12325
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12326
+ ] })
12327
+ }
12328
+ ),
12329
+ /* @__PURE__ */ jsx(
12330
+ Form$2.Field,
12331
+ {
12332
+ control: form.control,
12333
+ name: "city",
12334
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12335
+ /* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
12336
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12337
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12338
+ ] })
12339
+ }
12340
+ )
12341
+ ] }),
12342
+ /* @__PURE__ */ jsx(
12343
+ Form$2.Field,
12344
+ {
12345
+ control: form.control,
12346
+ name: "province",
12347
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12348
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Province / State" }),
12349
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12350
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12351
+ ] })
12352
+ }
12353
+ ),
12354
+ /* @__PURE__ */ jsx(
12355
+ Form$2.Field,
12356
+ {
12357
+ control: form.control,
12358
+ name: "phone",
12359
+ render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
12360
+ /* @__PURE__ */ jsx(Form$2.Label, { optional: true, children: "Phone" }),
12361
+ /* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
12362
+ /* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
12363
+ ] })
12364
+ }
12365
+ )
12366
+ ] }) }),
12367
+ /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
12368
+ /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
12369
+ /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: "Save" })
12370
+ ] }) })
12371
+ ]
12372
+ }
12373
+ ) });
12374
+ };
12375
+ const schema$2 = addressSchema;
12376
12376
  const TransferOwnership = () => {
12377
12377
  const { id } = useParams();
12378
12378
  const { draft_order, isPending, isError, error } = useDraftOrder(id, {
@@ -13083,14 +13083,14 @@ const routeModule = {
13083
13083
  Component: SalesChannel,
13084
13084
  path: "/draft-orders/:id/sales-channel"
13085
13085
  },
13086
- {
13087
- Component: ShippingAddress,
13088
- path: "/draft-orders/:id/shipping-address"
13089
- },
13090
13086
  {
13091
13087
  Component: Shipping,
13092
13088
  path: "/draft-orders/:id/shipping"
13093
13089
  },
13090
+ {
13091
+ Component: ShippingAddress,
13092
+ path: "/draft-orders/:id/shipping-address"
13093
+ },
13094
13094
  {
13095
13095
  Component: TransferOwnership,
13096
13096
  path: "/draft-orders/:id/transfer-ownership"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/draft-order",
3
- "version": "2.10.4-snapshot-20251008113737",
3
+ "version": "2.10.4-snapshot-20251008131841",
4
4
  "description": "A starter for Medusa plugins.",
5
5
  "author": "Medusa (https://medusajs.com)",
6
6
  "license": "MIT",
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@ariakit/react": "^0.4.15",
38
38
  "@hookform/resolvers": "3.4.2",
39
- "@medusajs/js-sdk": "2.10.4-snapshot-20251008113737",
39
+ "@medusajs/js-sdk": "2.10.4-snapshot-20251008131841",
40
40
  "@tanstack/react-query": "5.64.2",
41
41
  "@uiw/react-json-view": "^2.0.0-alpha.17",
42
42
  "date-fns": "^3.6.0",
@@ -45,14 +45,14 @@
45
45
  "react-hook-form": "7.49.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@medusajs/admin-sdk": "2.10.4-snapshot-20251008113737",
49
- "@medusajs/cli": "2.10.4-snapshot-20251008113737",
50
- "@medusajs/framework": "2.10.4-snapshot-20251008113737",
51
- "@medusajs/icons": "2.10.4-snapshot-20251008113737",
52
- "@medusajs/test-utils": "2.10.4-snapshot-20251008113737",
53
- "@medusajs/types": "2.10.4-snapshot-20251008113737",
54
- "@medusajs/ui": "4.0.24-snapshot-20251008113737",
55
- "@medusajs/ui-preset": "2.10.4-snapshot-20251008113737",
48
+ "@medusajs/admin-sdk": "2.10.4-snapshot-20251008131841",
49
+ "@medusajs/cli": "2.10.4-snapshot-20251008131841",
50
+ "@medusajs/framework": "2.10.4-snapshot-20251008131841",
51
+ "@medusajs/icons": "2.10.4-snapshot-20251008131841",
52
+ "@medusajs/test-utils": "2.10.4-snapshot-20251008131841",
53
+ "@medusajs/types": "2.10.4-snapshot-20251008131841",
54
+ "@medusajs/ui": "4.0.24-snapshot-20251008131841",
55
+ "@medusajs/ui-preset": "2.10.4-snapshot-20251008131841",
56
56
  "@swc/core": "1.5.7",
57
57
  "@types/lodash": "^4.17.15",
58
58
  "@types/node": "^20.0.0",
@@ -69,12 +69,12 @@
69
69
  "yalc": "^1.0.0-pre.53"
70
70
  },
71
71
  "peerDependencies": {
72
- "@medusajs/admin-sdk": "2.10.4-snapshot-20251008113737",
73
- "@medusajs/cli": "2.10.4-snapshot-20251008113737",
74
- "@medusajs/framework": "2.10.4-snapshot-20251008113737",
75
- "@medusajs/icons": "2.10.4-snapshot-20251008113737",
76
- "@medusajs/test-utils": "2.10.4-snapshot-20251008113737",
77
- "@medusajs/ui": "4.0.24-snapshot-20251008113737",
72
+ "@medusajs/admin-sdk": "2.10.4-snapshot-20251008131841",
73
+ "@medusajs/cli": "2.10.4-snapshot-20251008131841",
74
+ "@medusajs/framework": "2.10.4-snapshot-20251008131841",
75
+ "@medusajs/icons": "2.10.4-snapshot-20251008131841",
76
+ "@medusajs/test-utils": "2.10.4-snapshot-20251008131841",
77
+ "@medusajs/ui": "4.0.24-snapshot-20251008131841",
78
78
  "lodash": "^4.17.21",
79
79
  "react-router-dom": "6.20.1"
80
80
  },