@mercurjs/vendor 2.2.0-canary.11 → 2.2.0-canary.13

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.
Files changed (121) hide show
  1. package/dist/{[id]-EKLRGVBA.js → [id]-ET35KT2M.js} +3 -3
  2. package/dist/{[id]-A55T2ORL.js → [id]-FALIOGXK.js} +3 -4
  3. package/dist/{[id]-GC3ZYPK4.js → [id]-GY5R652O.js} +5 -6
  4. package/dist/{[id]-GBT6VB4S.js → [id]-IGQTT3AM.js} +4 -5
  5. package/dist/{[id]-SHAJTJNZ.js → [id]-IW2AZE77.js} +5 -6
  6. package/dist/{[id]-FE5GYYVZ.js → [id]-OTK2NOXT.js} +3 -4
  7. package/dist/{[id]-U5KZEQDR.js → [id]-PEUI67SP.js} +2 -2
  8. package/dist/{[id]-T5ECVBPF.js → [id]-RFEYRBLI.js} +4 -5
  9. package/dist/{[id]-B4YZTANM.js → [id]-US6IULL2.js} +205 -484
  10. package/dist/{[id]-QOEO3JOV.js → [id]-YZSVSJWU.js} +3 -4
  11. package/dist/{[id]-QQU5HVFU.js → [id]-ZMLS73X5.js} +4 -5
  12. package/dist/{[province_id]-6GUA4PV5.js → [province_id]-J3OB2LZ4.js} +5 -6
  13. package/dist/{add-NTRYWOJF.js → add-XEUXK63F.js} +6 -7
  14. package/dist/{add-customer-groups-U5RZWW4B.js → add-customer-groups-HZNWWRVG.js} +3 -4
  15. package/dist/{add-products-Q4MMDQKT.js → add-products-E5GULF6B.js} +4 -5
  16. package/dist/{add-promotions-3AYXQXTP.js → add-promotions-KW5YZHLS.js} +3 -3
  17. package/dist/{address-77Y3AOQ3.js → address-6T4H6P7O.js} +3 -4
  18. package/dist/{breadcrumb-EVZIOB2G.js → breadcrumb-5HYIEPCL.js} +3 -4
  19. package/dist/{breadcrumb-TNJSGX4T.js → breadcrumb-HL7NKNX4.js} +3 -4
  20. package/dist/{breadcrumb-THJ2HPRB.js → breadcrumb-L3MFH4I2.js} +9 -8
  21. package/dist/{breadcrumb-5NP23D6X.js → breadcrumb-LKLWHB63.js} +4 -5
  22. package/dist/breadcrumb-ZMACILH3.js +28 -0
  23. package/dist/chunk-4WCPN4OA.js +315 -0
  24. package/dist/{chunk-LDZCCWJB.js → chunk-5YCDZ4AU.js} +1 -1
  25. package/dist/{chunk-OYKUQXJX.js → chunk-A6QH53CS.js} +21 -10
  26. package/dist/{chunk-GN6KB75Z.js → chunk-AQTEEQWX.js} +1 -1
  27. package/dist/{chunk-K6LOZ4S3.js → chunk-DEJIBIQZ.js} +1 -1
  28. package/dist/{chunk-4LVP635F.js → chunk-DNEPOMOX.js} +125 -125
  29. package/dist/{chunk-25E4KME5.js → chunk-J7ZU2HZZ.js} +1 -1
  30. package/dist/{chunk-OZ44ATGE.js → chunk-KJWVLGXG.js} +2 -2
  31. package/dist/{chunk-LKUW5SV4.js → chunk-LDX23XPT.js} +1 -1
  32. package/dist/{chunk-XP23ZVQT.js → chunk-MVYAN2RR.js} +4 -4
  33. package/dist/{chunk-TBYCZRZ7.js → chunk-R5QZO3QY.js} +14 -5
  34. package/dist/{chunk-UORPTGV2.js → chunk-SIEEMXNZ.js} +10 -14
  35. package/dist/chunk-SJT6A4AV.js +354 -0
  36. package/dist/{chunk-FWS4YJ4B.js → chunk-STWHJLVV.js} +1 -1
  37. package/dist/{chunk-TYESCFYW.js → chunk-UDOBGAP7.js} +1 -1
  38. package/dist/{chunk-6K6EQOJF.js → chunk-VAOJVT7R.js} +1 -1
  39. package/dist/{chunk-VCOQ7WQ2.js → chunk-VMFC2UDJ.js} +1 -1
  40. package/dist/chunk-XQUF3WIS.js +159 -0
  41. package/dist/{chunk-7IPCLQ5V.js → chunk-YPTJETJQ.js} +2 -2
  42. package/dist/{chunk-X4GWB6AT.js → chunk-ZBSFGCWY.js} +2 -2
  43. package/dist/{chunk-YGJCJBPM.js → chunk-ZPH3WXJ6.js} +1 -1
  44. package/dist/{collections-URH2TCWJ.js → collections-HO2F62RN.js} +4 -5
  45. package/dist/{create-FKRYB7ZS.js → create-7EVR4N6N.js} +1 -1
  46. package/dist/{create-JF2OUZQA.js → create-DB4EYPJ5.js} +3 -4
  47. package/dist/{create-JGYG5SBM.js → create-EFMCNOR5.js} +6 -7
  48. package/dist/{create-MS6KKFSV.js → create-FBPPNBLQ.js} +3 -4
  49. package/dist/{create-ODOFJF5N.js → create-J5OLH7OJ.js} +7 -8
  50. package/dist/{create-O35JRZEF.js → create-QAEOARJO.js} +4 -5
  51. package/dist/{create-HVZYJ3YC.js → create-QZBCYHHQ.js} +8 -9
  52. package/dist/{create-A7B3MLJX.js → create-SLJ2BMH7.js} +5 -6
  53. package/dist/{create-7R6CZU53.js → create-WBZJFMA7.js} +12 -3
  54. package/dist/{create-GGACODDN.js → create-WQ5TM5IZ.js} +1 -1
  55. package/dist/{edit-4G5D7TES.js → edit-3O6WVIMM.js} +5 -6
  56. package/dist/{edit-VVLITC2E.js → edit-G57GESSR.js} +1 -1
  57. package/dist/edit-PUZ23M7V.js +102 -0
  58. package/dist/{edit-G2E5SNGU.js → edit-PVJ3S4TW.js} +3 -4
  59. package/dist/{edit-2R5QCPTB.js → edit-RJE7L3PH.js} +3 -4
  60. package/dist/{edit-HTLLYECP.js → edit-TIRMXOLT.js} +6 -7
  61. package/dist/{edit-5CROKEJE.js → edit-W6WKYNOG.js} +5 -6
  62. package/dist/{edit-OKU6FMHJ.js → edit-WPX2ANVI.js} +3 -4
  63. package/dist/{edit-3E4ZO7HT.js → edit-YW4RBDPH.js} +6 -7
  64. package/dist/edit-price-5ICQPJ42.js +196 -0
  65. package/dist/edit-stock-KS2NFC2Z.js +229 -0
  66. package/dist/{fulfillment-76IVZ266.js → fulfillment-ZV2R43N2.js} +3 -4
  67. package/dist/{fulfillment-providers-G2L6LEVO.js → fulfillment-providers-KKCL25KA.js} +4 -5
  68. package/dist/index.css +6 -6
  69. package/dist/index.js +142 -106
  70. package/dist/{offer-inventory-batch-page-BD6PMDLW.js → inventory-5UNDKYDL.js} +12 -12
  71. package/dist/{invite-2673PU4I.js → invite-KKIJNMER.js} +6 -7
  72. package/dist/{invite-HRXZ5YBP.js → invite-P7I5BGOJ.js} +3 -4
  73. package/dist/loader-UZTTBKYF.js +33 -0
  74. package/dist/loader-WEJZTX5Q.js +34 -0
  75. package/dist/{login-TWUBU6I6.js → login-A65IAXSI.js} +4 -5
  76. package/dist/{media-Z4N5MKFG.js → media-EM3K4AWO.js} +6 -7
  77. package/dist/{metadata-Q74OJWUD.js → metadata-A5XZKPL4.js} +4 -5
  78. package/dist/{metadata-D6M66NQK.js → metadata-JFLFWXOS.js} +3 -4
  79. package/dist/{metadata-YVHJPDLD.js → metadata-SFO3J5O5.js} +3 -4
  80. package/dist/{metadata-NIDIBXJT.js → metadata-USXOQUIX.js} +3 -4
  81. package/dist/{metadata-REQIFWWH.js → metadata-WJ4CNB6I.js} +3 -4
  82. package/dist/{offer-create-page-E4FLSDJQ.js → offer-create-page-3PIJXHWZ.js} +169 -173
  83. package/dist/offer-detail-page-SPHP3XKC.js +580 -0
  84. package/dist/{offer-detail-page-6SIBQTLP.js → offer-variant-detail-page-KTHKV6WW.js} +144 -215
  85. package/dist/offers-GWMIEPCM.js +54 -0
  86. package/dist/{onboarding-MK2RIFD4.js → onboarding-JOGRNDPI.js} +3 -4
  87. package/dist/{orders-TVQDR4OJ.js → orders-Q2IKEJIM.js} +4 -5
  88. package/dist/{organization-XO3T2K2X.js → organization-HRYDC66D.js} +3 -4
  89. package/dist/pages/index.js +25 -27
  90. package/dist/{payment-details-CFTX3QDL.js → payment-details-YLPIR52N.js} +3 -4
  91. package/dist/{pricing-ECXV6K7G.js → pricing-ECJH4VXZ.js} +5 -6
  92. package/dist/{offer-pricing-edit-page-4TINK42V.js → pricing-EPNQ63NT.js} +15 -13
  93. package/dist/{product-tags-5O7ZG6SA.js → product-tags-WMC7G3C4.js} +5 -6
  94. package/dist/{product-variant-detail-PUWOMVHQ.js → product-variant-detail-BQL2NGVE.js} +3 -4
  95. package/dist/{product-variant-edit-WZNO4CQX.js → product-variant-edit-GACQHD46.js} +9 -20
  96. package/dist/{products-CPTRYL2Z.js → products-LGQMESEZ.js} +10 -11
  97. package/dist/{products-BM3IIH5P.js → products-PQ3FG5KC.js} +4 -5
  98. package/dist/{professional-details-ED4HNYXY.js → professional-details-AASVGTUO.js} +3 -4
  99. package/dist/{profile-6TGCNNUU.js → profile-ZNQEDSDM.js} +3 -4
  100. package/dist/{promotions-4336KI7E.js → promotions-MFAFFHF3.js} +4 -4
  101. package/dist/{register-OZ5CRANZ.js → register-3A6G6QNI.js} +5 -6
  102. package/dist/{reset-password-5UHZU4D3.js → reset-password-FV5762CA.js} +1 -1
  103. package/dist/{settings-2GCQQTO6.js → settings-OKNGWUKL.js} +12 -13
  104. package/dist/{shipment-HWQHMX2L.js → shipment-ZF7IRKKS.js} +3 -4
  105. package/dist/shipping-HWJPX34K.js +113 -0
  106. package/dist/{shipping-profile-ZP7M6VSS.js → shipping-profile-3QKTQI6L.js} +2 -6
  107. package/dist/{shipping-profiles-C5WBXWZ2.js → shipping-profiles-FZCKGCBU.js} +3 -4
  108. package/dist/{stock-MQA7PRO6.js → stock-FI5WXVWN.js} +4 -5
  109. package/dist/{store-5ZHZR4JI.js → store-VFRKJYMD.js} +3 -4
  110. package/dist/{store-closure-H5WHV3LA.js → store-closure-WZIWGESD.js} +3 -4
  111. package/dist/{store-select-PZS556FB.js → store-select-GKRDFGEY.js} +4 -5
  112. package/dist/{team-CLKJCZNH.js → team-CXEAYN7O.js} +3 -4
  113. package/package.json +1 -1
  114. package/dist/chunk-27KRIXMQ.js +0 -71
  115. package/dist/chunk-CFRWIQIZ.js +0 -43
  116. package/dist/chunk-RXV7INUV.js +0 -426
  117. package/dist/chunk-T6LHVNWO.js +0 -27
  118. package/dist/loader-VDYPD3RI.js +0 -31
  119. package/dist/offer-edit-page-3MO566RP.js +0 -151
  120. package/dist/offers-GVN5LCK6.js +0 -32
  121. package/dist/{chunk-SPOHNK4X.js → chunk-BPVMJN2D.js} +3 -3
@@ -1,9 +1,6 @@
1
1
  import {
2
- useDeleteOfferAction
3
- } from "./chunk-CFRWIQIZ.js";
4
- import {
5
- OFFER_DETAIL_FIELDS
6
- } from "./chunk-27KRIXMQ.js";
2
+ OFFER_VARIANT_DETAIL_FIELDS
3
+ } from "./chunk-XQUF3WIS.js";
7
4
  import {
8
5
  getLocaleAmount
9
6
  } from "./chunk-3BXCPHN6.js";
@@ -28,128 +25,36 @@ import {
28
25
  TwoColumnPage
29
26
  } from "./chunk-YV6MK4PZ.js";
30
27
  import "./chunk-LRD242C7.js";
31
- import {
32
- Thumbnail
33
- } from "./chunk-WIYFXWRI.js";
34
28
  import {
35
29
  TwoColumnPageSkeleton
36
30
  } from "./chunk-INNFZYX2.js";
37
31
  import {
38
32
  useOffer
39
- } from "./chunk-UORPTGV2.js";
33
+ } from "./chunk-SIEEMXNZ.js";
40
34
  import {
41
35
  ActionMenu
42
36
  } from "./chunk-BDGZ4EQO.js";
43
37
  import "./chunk-LAVHRER2.js";
44
38
  import "./chunk-QHQWEERJ.js";
45
39
  import "./chunk-Y7QKP6QU.js";
40
+ import "./chunk-JAUZ73XE.js";
41
+ import "./chunk-A5DJIOHN.js";
46
42
  import "./chunk-RHKRREUU.js";
47
43
  import "./chunk-ZA2KFUFR.js";
48
44
  import "./chunk-RIN4CBRB.js";
49
45
  import "./chunk-NBMM2TZK.js";
50
46
 
51
- // src/pages/offers/[id]/offer-detail-page.tsx
47
+ // src/pages/offers/[id]/variants/[offer_id]/offer-variant-detail-page.tsx
52
48
  import { Children } from "react";
53
49
  import { useLoaderData, useParams } from "react-router-dom";
54
50
 
55
- // src/pages/offers/[id]/_components/offer-general-section.tsx
56
- import { Component, PencilSquare, Trash } from "@medusajs/icons";
57
- import { Container, Heading } from "@medusajs/ui";
58
- import { useTranslation } from "react-i18next";
59
- import { jsx, jsxs } from "react/jsx-runtime";
60
- var formatDate = (value) => {
61
- if (!value) return "-";
62
- try {
63
- return new Intl.DateTimeFormat(void 0, {
64
- dateStyle: "medium",
65
- timeStyle: "short"
66
- }).format(new Date(value));
67
- } catch {
68
- return "-";
69
- }
70
- };
71
- var OfferGeneralSection = ({ offer }) => {
72
- const { t } = useTranslation();
73
- const handleDelete = useDeleteOfferAction({
74
- id: offer.id,
75
- sku: offer.sku ?? "",
76
- redirectOnSuccess: true
77
- });
78
- const hasKit = (offer.inventory_item_link?.length ?? 0) > 1;
79
- const variantTitle = offer.product_variant?.title ?? "";
80
- return /* @__PURE__ */ jsxs(
81
- Container,
82
- {
83
- className: "divide-y p-0",
84
- "data-testid": "offer-detail-general-section",
85
- children: [
86
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
87
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
88
- /* @__PURE__ */ jsx(Heading, { title: variantTitle, children: variantTitle }),
89
- hasKit && /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted font-normal", children: /* @__PURE__ */ jsx(Component, {}) })
90
- ] }),
91
- /* @__PURE__ */ jsx(
92
- ActionMenu,
93
- {
94
- groups: [
95
- {
96
- actions: [
97
- {
98
- icon: /* @__PURE__ */ jsx(PencilSquare, {}),
99
- label: t("actions.edit"),
100
- to: "edit"
101
- }
102
- ]
103
- },
104
- {
105
- actions: [
106
- {
107
- icon: /* @__PURE__ */ jsx(Trash, {}),
108
- label: t("actions.delete"),
109
- onClick: handleDelete
110
- }
111
- ]
112
- }
113
- ]
114
- }
115
- )
116
- ] }),
117
- /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.sku"), value: offer.sku ?? "-" }),
118
- /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.ean"), value: offer.ean ?? "-" }),
119
- /* @__PURE__ */ jsx(SectionRow, { title: t("offers.fields.upc"), value: offer.upc ?? "-" }),
120
- /* @__PURE__ */ jsx(
121
- SectionRow,
122
- {
123
- title: t("shippingProfile.domain"),
124
- value: offer.shipping_profile?.name ?? "-"
125
- }
126
- ),
127
- /* @__PURE__ */ jsx(
128
- SectionRow,
129
- {
130
- title: t("fields.createdAt"),
131
- value: formatDate(offer.created_at)
132
- }
133
- ),
134
- /* @__PURE__ */ jsx(
135
- SectionRow,
136
- {
137
- title: t("fields.updatedAt"),
138
- value: formatDate(offer.updated_at)
139
- }
140
- )
141
- ]
142
- }
143
- );
144
- };
145
-
146
51
  // src/pages/offers/[id]/_components/offer-inventory-section.tsx
147
- import { Buildings, Component as Component2 } from "@medusajs/icons";
148
- import { Container as Container2, Heading as Heading2, Text } from "@medusajs/ui";
52
+ import { Buildings, Component } from "@medusajs/icons";
53
+ import { Container, Heading, Text } from "@medusajs/ui";
149
54
  import { createColumnHelper } from "@tanstack/react-table";
150
55
  import { useMemo } from "react";
151
- import { useTranslation as useTranslation2 } from "react-i18next";
152
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
56
+ import { useTranslation } from "react-i18next";
57
+ import { jsx, jsxs } from "react/jsx-runtime";
153
58
  var columnHelper = createColumnHelper();
154
59
  var PAGE_SIZE = 20;
155
60
  var computeAvailable = (row) => {
@@ -169,15 +74,15 @@ var computeAvailable = (row) => {
169
74
  return { quantity, locations };
170
75
  };
171
76
  var InventoryActions = ({ item }) => {
172
- const { t } = useTranslation2();
173
- return /* @__PURE__ */ jsx2(
77
+ const { t } = useTranslation();
78
+ return /* @__PURE__ */ jsx(
174
79
  ActionMenu,
175
80
  {
176
81
  groups: [
177
82
  {
178
83
  actions: [
179
84
  {
180
- icon: /* @__PURE__ */ jsx2(Buildings, {}),
85
+ icon: /* @__PURE__ */ jsx(Buildings, {}),
181
86
  label: t("offers.detail.goToInventoryItem"),
182
87
  to: `/inventory/${item.id}`
183
88
  }
@@ -188,7 +93,7 @@ var InventoryActions = ({ item }) => {
188
93
  );
189
94
  };
190
95
  var OfferInventorySection = ({ offer }) => {
191
- const { t } = useTranslation2();
96
+ const { t } = useTranslation();
192
97
  const inventoryItems = useMemo(() => {
193
98
  const links = offer.inventory_item_link ?? [];
194
99
  return links.map((link) => {
@@ -209,24 +114,24 @@ var OfferInventorySection = ({ offer }) => {
209
114
  header: t("fields.title"),
210
115
  cell: ({ getValue }) => {
211
116
  const title = getValue();
212
- if (!title) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
213
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: title }) });
117
+ if (!title) return /* @__PURE__ */ jsx(PlaceholderCell, {});
118
+ return /* @__PURE__ */ jsx("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "truncate", children: title }) });
214
119
  }
215
120
  }),
216
121
  columnHelper.accessor("sku", {
217
122
  header: t("offers.fields.sku"),
218
123
  cell: ({ getValue }) => {
219
124
  const sku = getValue();
220
- if (!sku) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
221
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: sku }) });
125
+ if (!sku) return /* @__PURE__ */ jsx(PlaceholderCell, {});
126
+ return /* @__PURE__ */ jsx("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "truncate", children: sku }) });
222
127
  }
223
128
  }),
224
129
  columnHelper.accessor("required_quantity", {
225
130
  header: t("offers.fields.requiredQuantity"),
226
131
  cell: ({ getValue }) => {
227
132
  const value = getValue();
228
- if (value == null) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
229
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2("span", { className: "truncate", children: value }) });
133
+ if (value == null) return /* @__PURE__ */ jsx(PlaceholderCell, {});
134
+ return /* @__PURE__ */ jsx("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx("span", { className: "truncate", children: value }) });
230
135
  }
231
136
  }),
232
137
  columnHelper.display({
@@ -234,9 +139,9 @@ var OfferInventorySection = ({ offer }) => {
234
139
  header: t("fields.inventory"),
235
140
  cell: ({ row }) => {
236
141
  const { quantity, locations } = computeAvailable(row.original);
237
- if (locations === 0) return /* @__PURE__ */ jsx2(PlaceholderCell, {});
142
+ if (locations === 0) return /* @__PURE__ */ jsx(PlaceholderCell, {});
238
143
  const text = `${quantity} available at ${locations} ${locations === 1 ? "location" : "locations"}`;
239
- return /* @__PURE__ */ jsx2("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx2(
144
+ return /* @__PURE__ */ jsx("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx(
240
145
  Text,
241
146
  {
242
147
  size: "small",
@@ -248,7 +153,7 @@ var OfferInventorySection = ({ offer }) => {
248
153
  }),
249
154
  columnHelper.display({
250
155
  id: "actions",
251
- cell: ({ row }) => /* @__PURE__ */ jsx2(InventoryActions, { item: row.original })
156
+ cell: ({ row }) => /* @__PURE__ */ jsx(InventoryActions, { item: row.original })
252
157
  })
253
158
  ],
254
159
  [t]
@@ -262,22 +167,22 @@ var OfferInventorySection = ({ offer }) => {
262
167
  pageSize: PAGE_SIZE
263
168
  });
264
169
  const hasKit = inventoryItems.length > 1;
265
- return /* @__PURE__ */ jsxs2(
266
- Container2,
170
+ return /* @__PURE__ */ jsxs(
171
+ Container,
267
172
  {
268
173
  className: "divide-y p-0",
269
174
  "data-testid": "offer-detail-inventory-section",
270
175
  children: [
271
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
272
- /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("offers.detail.inventoryItems") }),
273
- /* @__PURE__ */ jsx2(
176
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
177
+ /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("offers.detail.inventoryItems") }),
178
+ /* @__PURE__ */ jsx(
274
179
  ActionMenu,
275
180
  {
276
181
  groups: [
277
182
  {
278
183
  actions: [
279
184
  {
280
- icon: hasKit ? /* @__PURE__ */ jsx2(Component2, {}) : /* @__PURE__ */ jsx2(Buildings, {}),
185
+ icon: hasKit ? /* @__PURE__ */ jsx(Component, {}) : /* @__PURE__ */ jsx(Buildings, {}),
281
186
  label: hasKit ? t("offers.detail.manageKit") : t("offers.actions.manage_inventory"),
282
187
  to: "inventory"
283
188
  }
@@ -287,7 +192,7 @@ var OfferInventorySection = ({ offer }) => {
287
192
  }
288
193
  )
289
194
  ] }),
290
- inventoryItems.length === 0 ? /* @__PURE__ */ jsx2("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsx2(Text, { size: "small", className: "text-ui-fg-subtle", children: t("offers.detail.noInventoryItems") }) }) : /* @__PURE__ */ jsx2(
195
+ inventoryItems.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-6 py-8", children: /* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-subtle", children: t("offers.detail.noInventoryItems") }) }) : /* @__PURE__ */ jsx(
291
196
  _DataTable,
292
197
  {
293
198
  table,
@@ -304,10 +209,10 @@ var OfferInventorySection = ({ offer }) => {
304
209
 
305
210
  // src/pages/offers/[id]/_components/offer-pricing-section.tsx
306
211
  import { CurrencyDollar } from "@medusajs/icons";
307
- import { Button, Container as Container3, Heading as Heading3 } from "@medusajs/ui";
212
+ import { Button, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
308
213
  import { useState } from "react";
309
- import { useTranslation as useTranslation3 } from "react-i18next";
310
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
214
+ import { useTranslation as useTranslation2 } from "react-i18next";
215
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
311
216
  var PAGE_STEP = 3;
312
217
  var isBaseRow = (price) => {
313
218
  const rules = price.price_rules ?? [];
@@ -315,20 +220,20 @@ var isBaseRow = (price) => {
315
220
  return extraRules.length === 0;
316
221
  };
317
222
  var OfferPricingSection = ({ offer }) => {
318
- const { t } = useTranslation3();
223
+ const { t } = useTranslation2();
319
224
  const prices = (offer.prices ?? []).filter(isBaseRow).sort((a, b) => (a.currency_code ?? "").localeCompare(b.currency_code ?? ""));
320
225
  const hasPrices = prices.length > 0;
321
226
  const [pageSize, setPageSize] = useState(PAGE_STEP);
322
227
  const displayPrices = prices.slice(0, pageSize);
323
- return /* @__PURE__ */ jsxs3(
324
- Container3,
228
+ return /* @__PURE__ */ jsxs2(
229
+ Container2,
325
230
  {
326
231
  className: "flex flex-col divide-y p-0",
327
232
  "data-testid": "offer-detail-prices-section",
328
233
  children: [
329
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
330
- /* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("labels.prices") }),
331
- /* @__PURE__ */ jsx3(
234
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
235
+ /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("labels.prices") }),
236
+ /* @__PURE__ */ jsx2(
332
237
  ActionMenu,
333
238
  {
334
239
  groups: [
@@ -336,7 +241,7 @@ var OfferPricingSection = ({ offer }) => {
336
241
  actions: [
337
242
  {
338
243
  label: t("actions.edit"),
339
- icon: /* @__PURE__ */ jsx3(CurrencyDollar, {}),
244
+ icon: /* @__PURE__ */ jsx2(CurrencyDollar, {}),
340
245
  to: "pricing"
341
246
  }
342
247
  ]
@@ -345,19 +250,19 @@ var OfferPricingSection = ({ offer }) => {
345
250
  }
346
251
  )
347
252
  ] }),
348
- !hasPrices && /* @__PURE__ */ jsx3(NoRecords, { className: "h-60" }),
349
- displayPrices.map((price) => /* @__PURE__ */ jsxs3(
253
+ !hasPrices && /* @__PURE__ */ jsx2(NoRecords, { className: "h-60" }),
254
+ displayPrices.map((price) => /* @__PURE__ */ jsxs2(
350
255
  "div",
351
256
  {
352
257
  className: "txt-small text-ui-fg-subtle flex justify-between px-6 py-4",
353
258
  children: [
354
- /* @__PURE__ */ jsx3("span", { className: "font-medium", children: price.currency_code.toUpperCase() }),
355
- /* @__PURE__ */ jsx3("span", { children: getLocaleAmount(price.amount, price.currency_code) })
259
+ /* @__PURE__ */ jsx2("span", { className: "font-medium", children: price.currency_code.toUpperCase() }),
260
+ /* @__PURE__ */ jsx2("span", { children: getLocaleAmount(price.amount, price.currency_code) })
356
261
  ]
357
262
  },
358
263
  price.id ?? `${price.currency_code}-${price.amount}`
359
264
  )),
360
- hasPrices && prices.length > PAGE_STEP && /* @__PURE__ */ jsx3("div", { className: "txt-small text-ui-fg-subtle flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx3(
265
+ hasPrices && prices.length > PAGE_STEP && /* @__PURE__ */ jsx2("div", { className: "txt-small text-ui-fg-subtle flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx2(
361
266
  Button,
362
267
  {
363
268
  onClick: () => setPageSize((p) => p + PAGE_STEP),
@@ -372,76 +277,106 @@ var OfferPricingSection = ({ offer }) => {
372
277
  );
373
278
  };
374
279
 
375
- // src/pages/offers/[id]/_components/offer-variant-section.tsx
376
- import { TriangleRightMini } from "@medusajs/icons";
280
+ // src/pages/offers/[id]/variants/[offer_id]/_components/offer-variant-general-section.tsx
281
+ import { PencilSquare } from "@medusajs/icons";
282
+ import { Badge, Container as Container3, Heading as Heading3, Text as Text2 } from "@medusajs/ui";
283
+ import { useTranslation as useTranslation3 } from "react-i18next";
284
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
285
+ var OfferVariantGeneralSection = ({
286
+ offer
287
+ }) => {
288
+ const { t } = useTranslation3();
289
+ const variant = offer.product_variant;
290
+ const options = variant?.options ?? [];
291
+ return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
292
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-between px-6 py-4", children: [
293
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col", children: [
294
+ /* @__PURE__ */ jsx3(Heading3, { children: variant?.title ?? "-" }),
295
+ /* @__PURE__ */ jsx3(Text2, { size: "small", className: "text-ui-fg-subtle", children: t("offers.detail.offerVariant") })
296
+ ] }),
297
+ /* @__PURE__ */ jsx3(
298
+ ActionMenu,
299
+ {
300
+ groups: [
301
+ {
302
+ actions: [
303
+ {
304
+ label: t("actions.edit"),
305
+ to: "edit",
306
+ icon: /* @__PURE__ */ jsx3(PencilSquare, {})
307
+ }
308
+ ]
309
+ }
310
+ ]
311
+ }
312
+ )
313
+ ] }),
314
+ /* @__PURE__ */ jsx3(SectionRow, { title: t("offers.fields.sku"), value: offer.sku ?? "-" }),
315
+ options.map((opt) => /* @__PURE__ */ jsx3(
316
+ SectionRow,
317
+ {
318
+ title: opt.option?.title ?? "-",
319
+ value: opt.value ? /* @__PURE__ */ jsx3(Badge, { size: "2xsmall", children: opt.value }) : "-"
320
+ },
321
+ opt.id ?? opt.option?.id ?? opt.value ?? ""
322
+ ))
323
+ ] });
324
+ };
325
+
326
+ // src/pages/offers/[id]/variants/[offer_id]/_components/offer-variant-shipping-section.tsx
327
+ import { Buildings as Buildings2, PencilSquare as PencilSquare2, TriangleRightMini } from "@medusajs/icons";
377
328
  import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
378
329
  import { useTranslation as useTranslation4 } from "react-i18next";
379
330
  import { Link } from "react-router-dom";
380
331
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
381
- var OfferVariantSection = ({ offer }) => {
332
+ var OfferVariantShippingSection = ({
333
+ offer
334
+ }) => {
382
335
  const { t } = useTranslation4();
383
- const variant = offer.product_variant;
384
- if (!variant?.id) {
385
- return null;
386
- }
387
- const productId = variant.product_id ?? variant.product?.id;
388
- const link = productId ? `/products/${productId}/variants/${variant.id}` : null;
389
- const title = variant.product?.title ?? variant.title ?? variant.id;
390
- const subtitle = variant.title ?? "";
391
- const Inner = /* @__PURE__ */ jsx4(
392
- "div",
393
- {
394
- className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors",
395
- "data-testid": "offer-detail-variant",
396
- children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
397
- /* @__PURE__ */ jsx4(
398
- "div",
399
- {
400
- className: "shadow-elevation-card-rest rounded-md",
401
- "data-testid": "offer-detail-variant-thumbnail",
402
- children: /* @__PURE__ */ jsx4(Thumbnail, { src: variant.product?.thumbnail ?? null })
403
- }
404
- ),
405
- /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col", children: [
406
- /* @__PURE__ */ jsx4(
407
- "span",
408
- {
409
- className: "text-ui-fg-base font-medium",
410
- "data-testid": "offer-detail-variant-title",
411
- children: title
412
- }
413
- ),
414
- /* @__PURE__ */ jsx4(
415
- "span",
336
+ const profile = offer.shipping_profile;
337
+ return /* @__PURE__ */ jsxs4(Container4, { className: "p-0", children: [
338
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
339
+ /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t("offers.detail.shippingConfiguration") }),
340
+ /* @__PURE__ */ jsx4(
341
+ ActionMenu,
342
+ {
343
+ groups: [
416
344
  {
417
- className: "text-ui-fg-subtle",
418
- "data-testid": "offer-detail-variant-subtitle",
419
- children: subtitle
345
+ actions: [
346
+ {
347
+ label: t("actions.edit"),
348
+ to: "shipping",
349
+ icon: /* @__PURE__ */ jsx4(PencilSquare2, {})
350
+ }
351
+ ]
420
352
  }
421
- )
422
- ] }),
423
- /* @__PURE__ */ jsx4("div", { className: "size-7 flex items-center justify-center", children: /* @__PURE__ */ jsx4(TriangleRightMini, { className: "text-ui-fg-muted rtl:rotate-180" }) })
424
- ] })
425
- }
426
- );
427
- return /* @__PURE__ */ jsxs4(Container4, { className: "p-0", "data-testid": "offer-detail-variant-section", children: [
428
- /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t("offers.detail.productVariant") }) }),
429
- /* @__PURE__ */ jsx4("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: link ? /* @__PURE__ */ jsx4(
353
+ ]
354
+ }
355
+ )
356
+ ] }),
357
+ profile?.name ? /* @__PURE__ */ jsx4("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx4(
430
358
  Link,
431
359
  {
432
- to: link,
360
+ to: "shipping",
433
361
  className: "outline-none focus-within:shadow-borders-interactive-with-focus rounded-md [&:hover>div]:bg-ui-bg-component-hover",
434
- "data-testid": "offer-detail-variant-link",
435
- children: Inner
362
+ "data-testid": "offer-variant-shipping-link",
363
+ children: /* @__PURE__ */ jsx4("div", { className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
364
+ /* @__PURE__ */ jsx4("div", { className: "shadow-elevation-card-rest text-ui-fg-subtle flex size-7 items-center justify-center rounded-md", children: /* @__PURE__ */ jsx4(Buildings2, {}) }),
365
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
366
+ /* @__PURE__ */ jsx4("span", { className: "text-ui-fg-base truncate font-medium", children: profile.name }),
367
+ profile.type && /* @__PURE__ */ jsx4("span", { className: "text-ui-fg-subtle truncate", children: profile.type })
368
+ ] }),
369
+ /* @__PURE__ */ jsx4("div", { className: "size-7 flex items-center justify-center", children: /* @__PURE__ */ jsx4(TriangleRightMini, { className: "text-ui-fg-muted rtl:rotate-180" }) })
370
+ ] }) })
436
371
  }
437
- ) : /* @__PURE__ */ jsx4("div", { children: Inner }) })
372
+ ) }) : /* @__PURE__ */ jsx4(NoRecords, { className: "h-40" })
438
373
  ] });
439
374
  };
440
375
 
441
- // src/pages/offers/[id]/offer-detail-page.tsx
376
+ // src/pages/offers/[id]/variants/[offer_id]/offer-variant-detail-page.tsx
442
377
  import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
443
378
  var Root = ({ children }) => {
444
- const { id } = useParams();
379
+ const { offer_id } = useParams();
445
380
  const initialData = useLoaderData();
446
381
  const {
447
382
  offer,
@@ -449,44 +384,38 @@ var Root = ({ children }) => {
449
384
  isError,
450
385
  error
451
386
  } = useOffer(
452
- id,
453
- { fields: OFFER_DETAIL_FIELDS },
387
+ offer_id,
388
+ { fields: OFFER_VARIANT_DETAIL_FIELDS },
454
389
  { initialData }
455
390
  );
456
391
  if (isError) {
457
392
  throw error;
458
393
  }
459
394
  if (isLoading || !offer) {
460
- return /* @__PURE__ */ jsx5(
461
- TwoColumnPageSkeleton,
462
- {
463
- mainSections: 2,
464
- sidebarSections: 2
465
- }
466
- );
395
+ return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 2, sidebarSections: 2 });
467
396
  }
468
- const typedOffer = offer;
469
- return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: typedOffer, hasOutlet: true, children: [
397
+ const typed = offer;
398
+ return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: typed, hasOutlet: true, children: [
470
399
  /* @__PURE__ */ jsxs5(TwoColumnPage.Main, { children: [
471
- /* @__PURE__ */ jsx5(OfferGeneralSection, { offer: typedOffer }),
472
- /* @__PURE__ */ jsx5(OfferInventorySection, { offer: typedOffer })
400
+ /* @__PURE__ */ jsx5(OfferVariantGeneralSection, { offer: typed }),
401
+ /* @__PURE__ */ jsx5(OfferInventorySection, { offer: typed })
473
402
  ] }),
474
403
  /* @__PURE__ */ jsxs5(TwoColumnPage.Sidebar, { children: [
475
- /* @__PURE__ */ jsx5(OfferVariantSection, { offer: typedOffer }),
476
- /* @__PURE__ */ jsx5(OfferPricingSection, { offer: typedOffer })
404
+ /* @__PURE__ */ jsx5(OfferVariantShippingSection, { offer: typed }),
405
+ /* @__PURE__ */ jsx5(OfferPricingSection, { offer: typed })
477
406
  ] })
478
407
  ] }) });
479
408
  };
480
- var OfferDetailPage = Object.assign(Root, {
409
+ var OfferVariantDetailPage = Object.assign(Root, {
481
410
  Main: TwoColumnPage.Main,
482
411
  Sidebar: TwoColumnPage.Sidebar,
483
- General: OfferGeneralSection,
412
+ General: OfferVariantGeneralSection,
484
413
  Inventory: OfferInventorySection,
485
- Variant: OfferVariantSection,
414
+ Shipping: OfferVariantShippingSection,
486
415
  Pricing: OfferPricingSection
487
416
  });
488
- var Component3 = Root;
417
+ var Component2 = Root;
489
418
  export {
490
- Component3 as Component,
491
- OfferDetailPage
419
+ Component2 as Component,
420
+ OfferVariantDetailPage
492
421
  };
@@ -0,0 +1,54 @@
1
+ import {
2
+ OfferListPage
3
+ } from "./chunk-SJT6A4AV.js";
4
+ import "./chunk-XQUF3WIS.js";
5
+ import "./chunk-U5G3AVED.js";
6
+ import "./chunk-FWPGOIFA.js";
7
+ import "./chunk-FQERBIVS.js";
8
+ import "./chunk-DEJIBIQZ.js";
9
+ import "./chunk-DB6ANJBO.js";
10
+ import "./chunk-PHOCVOZ5.js";
11
+ import "./chunk-SSUUT5LK.js";
12
+ import "./chunk-YN3FGNJM.js";
13
+ import "./chunk-6OUPJNYO.js";
14
+ import "./chunk-3EF54XFY.js";
15
+ import "./chunk-YV6MK4PZ.js";
16
+ import "./chunk-THHRRYRS.js";
17
+ import "./chunk-LRD242C7.js";
18
+ import "./chunk-UCYSCKZV.js";
19
+ import "./chunk-WIYFXWRI.js";
20
+ import "./chunk-INNFZYX2.js";
21
+ import "./chunk-R5QZO3QY.js";
22
+ import "./chunk-F4OJN2F2.js";
23
+ import "./chunk-LRARA622.js";
24
+ import "./chunk-M6N4ISXL.js";
25
+ import "./chunk-S7EKBD2C.js";
26
+ import "./chunk-VV6IKGCN.js";
27
+ import "./chunk-BXRNZS5K.js";
28
+ import "./chunk-BOZJOOGW.js";
29
+ import "./chunk-IQWK723D.js";
30
+ import "./chunk-4S6XGIC6.js";
31
+ import "./chunk-S23FD6FA.js";
32
+ import "./chunk-DDJQRV6E.js";
33
+ import "./chunk-LWJF63JW.js";
34
+ import "./chunk-VXWN37PT.js";
35
+ import "./chunk-5QI3NDJG.js";
36
+ import "./chunk-VZUA5SRD.js";
37
+ import "./chunk-VXMOPVRH.js";
38
+ import "./chunk-NBPMNUKZ.js";
39
+ import "./chunk-SIEEMXNZ.js";
40
+ import "./chunk-Y2MQ5EMD.js";
41
+ import "./chunk-3B34B2M2.js";
42
+ import "./chunk-BDGZ4EQO.js";
43
+ import "./chunk-LAVHRER2.js";
44
+ import "./chunk-QHQWEERJ.js";
45
+ import "./chunk-Y7QKP6QU.js";
46
+ import "./chunk-JAUZ73XE.js";
47
+ import "./chunk-A5DJIOHN.js";
48
+ import "./chunk-RHKRREUU.js";
49
+ import "./chunk-ZA2KFUFR.js";
50
+ import "./chunk-RIN4CBRB.js";
51
+ import "./chunk-NBMM2TZK.js";
52
+ export {
53
+ OfferListPage
54
+ };
@@ -15,7 +15,7 @@ import {
15
15
  retrieveActiveStore,
16
16
  storeQueryKeys,
17
17
  useStore
18
- } from "./chunk-TBYCZRZ7.js";
18
+ } from "./chunk-R5QZO3QY.js";
19
19
  import {
20
20
  useLogout
21
21
  } from "./chunk-F4OJN2F2.js";
@@ -25,13 +25,12 @@ import "./chunk-S7EKBD2C.js";
25
25
  import "./chunk-VV6IKGCN.js";
26
26
  import "./chunk-BXRNZS5K.js";
27
27
  import "./chunk-BOZJOOGW.js";
28
- import "./chunk-T6LHVNWO.js";
28
+ import "./chunk-IQWK723D.js";
29
29
  import "./chunk-4S6XGIC6.js";
30
30
  import {
31
31
  useCreateSellerAccount,
32
32
  useSellers
33
33
  } from "./chunk-S23FD6FA.js";
34
- import "./chunk-IQWK723D.js";
35
34
  import "./chunk-DDJQRV6E.js";
36
35
  import "./chunk-LWJF63JW.js";
37
36
  import "./chunk-VXWN37PT.js";
@@ -39,7 +38,7 @@ import "./chunk-5QI3NDJG.js";
39
38
  import "./chunk-VZUA5SRD.js";
40
39
  import "./chunk-VXMOPVRH.js";
41
40
  import "./chunk-NBPMNUKZ.js";
42
- import "./chunk-UORPTGV2.js";
41
+ import "./chunk-SIEEMXNZ.js";
43
42
  import "./chunk-Y2MQ5EMD.js";
44
43
  import "./chunk-3B34B2M2.js";
45
44
  import "./chunk-JAUZ73XE.js";