@mercurjs/admin 2.2.0-canary.38 → 2.2.0-canary.39

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 (152) hide show
  1. package/dist/{add-campaign-promotions-FWYK3JCR.js → add-campaign-promotions-NT4LQZQJ.js} +3 -3
  2. package/dist/{adjust-inventory-TECW4NNX.js → adjust-inventory-X45NEQFK.js} +1 -1
  3. package/dist/{api-key-management-detail-2LYSINFY.js → api-key-management-detail-HKNZPPR2.js} +3 -4
  4. package/dist/{api-key-management-sales-channels-EEM7UDTZ.js → api-key-management-sales-channels-4GLVMHU6.js} +1 -2
  5. package/dist/{attribute-create-HSR7XVKG.js → attribute-create-D4RUU5OT.js} +1 -1
  6. package/dist/{attribute-detail-7EBAQ26V.js → attribute-detail-OU6557XI.js} +10 -1
  7. package/dist/{attribute-list-G73VHMFA.js → attribute-list-5LGYNGO7.js} +1 -1
  8. package/dist/{breadcrumb-DZTALOFP.js → breadcrumb-GHBR74WM.js} +2 -2
  9. package/dist/{breadcrumb-EPNBJF4V.js → breadcrumb-IEEJTH47.js} +1 -1
  10. package/dist/{campaign-detail-I6KGCHUL.js → campaign-detail-EHNTH6A7.js} +5 -5
  11. package/dist/{categories-metadata-SWFS4FL4.js → categories-metadata-EKY6TSUK.js} +1 -1
  12. package/dist/{category-detail-ZEOXQF7F.js → category-detail-HCRJDDA2.js} +1 -1
  13. package/dist/{category-products-UFKHB7YL.js → category-products-LZQATT5Z.js} +1 -1
  14. package/dist/{chunk-6FNIEKSN.js → chunk-325DZAT2.js} +1 -1
  15. package/dist/{chunk-IRX6RBTE.js → chunk-3SHHDCA6.js} +2 -2
  16. package/dist/{chunk-CB7DBYH4.js → chunk-4C7L7TJT.js} +1 -13
  17. package/dist/{chunk-Y5JQAKX7.js → chunk-4NAIC6RG.js} +1 -1
  18. package/dist/{chunk-4JUT54KO.js → chunk-73Y6HKIG.js} +1 -1
  19. package/dist/{chunk-RWAEZQCV.js → chunk-7OKYEA6I.js} +96 -6
  20. package/dist/{chunk-72SDBLWQ.js → chunk-7TWARCNU.js} +1 -1
  21. package/dist/{chunk-VPPUFVFJ.js → chunk-AVATBB62.js} +2 -1
  22. package/dist/{chunk-NS3GQ2J6.js → chunk-BILFRATX.js} +0 -9
  23. package/dist/{chunk-NKV5XPNS.js → chunk-BO4V6CQN.js} +1 -2
  24. package/dist/{chunk-FBDAKD4B.js → chunk-CN4FCZPK.js} +1 -1
  25. package/dist/{chunk-SIOKPEVN.js → chunk-EUXCKJPT.js} +1 -1
  26. package/dist/{chunk-TAM24IMD.js → chunk-FLPKTLXN.js} +1 -1
  27. package/dist/{chunk-OI4DJXUL.js → chunk-FMJBQE56.js} +1 -1
  28. package/dist/{chunk-ZHT3Y47H.js → chunk-FNJEXQ2Z.js} +1 -1
  29. package/dist/{chunk-EJYLSQVT.js → chunk-FZPSX44L.js} +1 -1
  30. package/dist/{chunk-TG5BBZ3B.js → chunk-HI7NZVSJ.js} +1 -1
  31. package/dist/{chunk-S6A4FVM2.js → chunk-IWBQZK6E.js} +0 -4
  32. package/dist/{chunk-LBLWPBST.js → chunk-IZDTQFCP.js} +3 -1
  33. package/dist/{chunk-PNZI5C5A.js → chunk-LZEEPVQY.js} +59 -55
  34. package/dist/{chunk-7DHSWPU2.js → chunk-PRSTCHB5.js} +1 -1
  35. package/dist/{chunk-45O5MFCT.js → chunk-PSGHE5YJ.js} +1 -1
  36. package/dist/{chunk-3OD3YOA3.js → chunk-RIURQMDE.js} +1 -1
  37. package/dist/{chunk-THNFAN23.js → chunk-VGXJXU7X.js} +1 -1
  38. package/dist/{offers-3HP7SICL.js → chunk-VSLKILOI.js} +124 -253
  39. package/dist/{chunk-QAWWIM4I.js → chunk-WKR3Y2KD.js} +1 -1
  40. package/dist/{chunk-CIKPTKSX.js → chunk-WNTHKSLS.js} +1 -1
  41. package/dist/{chunk-KRECA22N.js → chunk-YUUDST4E.js} +1 -1
  42. package/dist/{chunk-ZPEMWHUW.js → chunk-ZO3OJ2UQ.js} +1 -1
  43. package/dist/{collection-add-products-MJYMPNLP.js → collection-add-products-QIEQCILA.js} +1 -1
  44. package/dist/{collection-detail-C4ZCH55B.js → collection-detail-PTVRSXT3.js} +1 -1
  45. package/dist/{collection-list-4UX2LLQV.js → collection-list-O5XBGFTN.js} +2 -2
  46. package/dist/{collection-metadata-UEYHULPR.js → collection-metadata-TOHJL5WW.js} +1 -1
  47. package/dist/{commission-rule-detail-RO5KXLGT.js → commission-rule-detail-VTP2JKEG.js} +3 -3
  48. package/dist/{commissions-list-MZY7KOP5.js → commissions-list-T7735Y35.js} +3 -3
  49. package/dist/{customer-detail-FRGVVWTZ.js → customer-detail-IPM3SBHE.js} +4 -4
  50. package/dist/{customer-group-detail-KIC2TWZ3.js → customer-group-detail-3HV3BJOU.js} +1 -1
  51. package/dist/{customer-group-list-BRH6SWRD.js → customer-group-list-IR6CW36P.js} +3 -3
  52. package/dist/{customer-group-metadata-S6NJRGYO.js → customer-group-metadata-4W32YXXP.js} +1 -1
  53. package/dist/{customer-metadata-C66G3AS7.js → customer-metadata-L622ZJ43.js} +1 -1
  54. package/dist/{customers-add-customer-group-C4Y6P45C.js → customers-add-customer-group-PWKJZJBP.js} +2 -2
  55. package/dist/{edit-inventory-item-IIJH26PK.js → edit-inventory-item-73BY4I5T.js} +1 -1
  56. package/dist/{edit-inventory-item-attributes-KTMOGG4V.js → edit-inventory-item-attributes-ZMB343AB.js} +1 -1
  57. package/dist/{edit-rules-WOQNXKZZ.js → edit-rules-OK44K33O.js} +1 -1
  58. package/dist/index.css +3 -0
  59. package/dist/index.js +146 -146
  60. package/dist/{inventory-create-M3YBQVNG.js → inventory-create-66YM6FST.js} +1 -1
  61. package/dist/{inventory-detail-6PAVKSOK.js → inventory-detail-RYFIUKTJ.js} +1 -1
  62. package/dist/{inventory-metadata-OS6KHY52.js → inventory-metadata-W6Z6J2Z2.js} +1 -1
  63. package/dist/{inventory-stock-XQWWFVQ3.js → inventory-stock-A3TSIGMD.js} +1 -1
  64. package/dist/loader-HRFMJ5TM.js +36 -0
  65. package/dist/{loader-P2HT7LSL.js → loader-TIPLOZF7.js} +2 -2
  66. package/dist/{location-detail-LK736WHY.js → location-detail-CNETNX3M.js} +1 -1
  67. package/dist/{location-fulfillment-providers-Z3PR4MQI.js → location-fulfillment-providers-TMPZH2KQ.js} +2 -2
  68. package/dist/{location-list-HFVPD3JF.js → location-list-RHUT7IRA.js} +1 -1
  69. package/dist/{location-sales-channels-WZJ3JWQF.js → location-sales-channels-ZQBQ3VDH.js} +1 -2
  70. package/dist/{location-service-zone-shipping-option-create-NFKZT2HM.js → location-service-zone-shipping-option-create-3PQ2EYD7.js} +1 -1
  71. package/dist/{login-IOW5R2ZZ.js → login-OKBXMSKY.js} +1 -1
  72. package/dist/{marketplace-detail-X5AQWO7P.js → marketplace-detail-KBJSCI2N.js} +1 -1
  73. package/dist/{marketplace-metadata-RNNA4S3F.js → marketplace-metadata-VXFQ3JZW.js} +1 -1
  74. package/dist/{offer-detail-page-4GNU35AH.js → offer-detail-page-D3J547CC.js} +134 -121
  75. package/dist/{offer-variant-detail-page-FFPV7N7Y.js → offer-variant-detail-page-P4CKF442.js} +4 -4
  76. package/dist/offers-7JTHN6FI.js +183 -0
  77. package/dist/{order-create-claim-MEXSDGHW.js → order-create-claim-CHXOZH2C.js} +3 -3
  78. package/dist/{order-create-edit-M2F6CG3M.js → order-create-edit-O4AOAOF7.js} +3 -3
  79. package/dist/{order-create-exchange-HTWFKJOM.js → order-create-exchange-CG3ODKTK.js} +4 -4
  80. package/dist/{order-create-refund-DWIGXSYJ.js → order-create-refund-4ZO73NWS.js} +1 -1
  81. package/dist/{order-detail-QYZGM7OO.js → order-detail-V6AL4RWB.js} +1 -1
  82. package/dist/{order-edit-billing-address-JHJ7PCPC.js → order-edit-billing-address-KVX4EPM7.js} +2 -2
  83. package/dist/{order-edit-email-OAU3YX45.js → order-edit-email-GLAQZCIT.js} +1 -1
  84. package/dist/{order-edit-shipping-address-RAO5IKGM.js → order-edit-shipping-address-PF54SFAG.js} +1 -1
  85. package/dist/{order-list-5PVFAFJT.js → order-list-WHZJ6B4G.js} +3 -3
  86. package/dist/{order-metadata-IUBTCJQW.js → order-metadata-L6SCT4MO.js} +1 -1
  87. package/dist/{order-request-transfer-2J4CN5JP.js → order-request-transfer-BLQQ66IF.js} +1 -1
  88. package/dist/pages/index.d.ts +9 -9
  89. package/dist/pages/index.js +27 -26
  90. package/dist/{price-list-configuration-BIHWXMYS.js → price-list-configuration-OTSYJ3AQ.js} +3 -3
  91. package/dist/{price-list-create-XV6OY4A2.js → price-list-create-2422HUBU.js} +4 -4
  92. package/dist/{price-list-detail-IUZU5OA7.js → price-list-detail-CL3FMPVN.js} +1 -1
  93. package/dist/{price-list-prices-add-KUBO4DCC.js → price-list-prices-add-OOG6526Y.js} +1 -1
  94. package/dist/{price-list-prices-edit-PJ4CPB5I.js → price-list-prices-edit-ZQE3Z3NK.js} +1 -1
  95. package/dist/{product-add-existing-attributes-3BJ5KV2V.js → product-add-existing-attributes-DKKPTZMB.js} +1 -1
  96. package/dist/{product-create-EGL6UJKX.js → product-create-IX4TOFNU.js} +4 -4
  97. package/dist/{product-detail-SNS2DQ6Q.js → product-detail-BLZYOXLS.js} +2 -2
  98. package/dist/{product-list-LGS3O2OJ.js → product-list-PLXUL3YW.js} +1 -1
  99. package/dist/{product-media-JKUDYI32.js → product-media-TDEPDO3W.js} +2 -2
  100. package/dist/{product-metadata-4O5YDITE.js → product-metadata-KBT4QGRF.js} +1 -1
  101. package/dist/{product-organization-AIM3LNQ6.js → product-organization-HFC44AOV.js} +1 -1
  102. package/dist/{product-sales-channels-73JEGJIY.js → product-sales-channels-C6UUHWGB.js} +1 -2
  103. package/dist/{product-tag-create-PSLHVOED.js → product-tag-create-AHG3Y4GE.js} +1 -1
  104. package/dist/{product-tag-detail-MI7B2MPH.js → product-tag-detail-222RARIO.js} +2 -2
  105. package/dist/{product-tag-edit-7RYZN7ZP.js → product-tag-edit-ACHNVZZP.js} +1 -1
  106. package/dist/{product-tag-list-7CE4KJ3G.js → product-tag-list-EZ4JUW4U.js} +2 -2
  107. package/dist/{product-tag-metadata-Z26DWSRN.js → product-tag-metadata-4EUBENJ6.js} +1 -1
  108. package/dist/{product-type-detail-O2WGGFRT.js → product-type-detail-SSMTOG47.js} +1 -1
  109. package/dist/{product-type-metadata-2YKEGWRE.js → product-type-metadata-RAVB4BK2.js} +1 -1
  110. package/dist/{product-variant-detail-OZYQPDVX.js → product-variant-detail-7CFNAI3A.js} +1 -1
  111. package/dist/{product-variant-edit-M74OAUM5.js → product-variant-edit-QJK2CLID.js} +1 -1
  112. package/dist/{product-variant-metadata-VA4NDA53.js → product-variant-metadata-7VHJ4U6L.js} +1 -1
  113. package/dist/{promotion-create-TOOHWR6S.js → promotion-create-AWZ7YA5T.js} +1 -1
  114. package/dist/{promotion-detail-WFB2ZFPH.js → promotion-detail-EEDQ3GQD.js} +4 -4
  115. package/dist/{promotion-list-VLCRCI2K.js → promotion-list-SXUXYV6R.js} +4 -4
  116. package/dist/{refund-reason-create-NA42SWWI.js → refund-reason-create-UA3XS6DP.js} +1 -1
  117. package/dist/{refund-reason-edit-WMKHZ6SN.js → refund-reason-edit-3TAGKV3U.js} +1 -1
  118. package/dist/{refund-reason-list-XMDZO34F.js → refund-reason-list-OVTNXVLP.js} +1 -1
  119. package/dist/{region-metadata-GWN4DS4V.js → region-metadata-3KASKFZ3.js} +1 -1
  120. package/dist/{reservation-detail-JSLACR7K.js → reservation-detail-MAWHNY2H.js} +1 -1
  121. package/dist/{reservation-metadata-YNCMFQIX.js → reservation-metadata-ENY4V2ED.js} +1 -1
  122. package/dist/{reset-password-OL6EA5F2.js → reset-password-UIDUOHVW.js} +1 -1
  123. package/dist/{sales-channel-add-products-ZZPVF5CH.js → sales-channel-add-products-ZCUVTJQN.js} +1 -1
  124. package/dist/{sales-channel-detail-DNZXUBSN.js → sales-channel-detail-EZVCWMMS.js} +1 -1
  125. package/dist/{sales-channel-list-PPESHWHA.js → sales-channel-list-LVW7XE7K.js} +3 -4
  126. package/dist/{sales-channel-metadata-7HVLURGB.js → sales-channel-metadata-RXC4IDD3.js} +1 -1
  127. package/dist/{shipping-option-type-create-UFXLX52L.js → shipping-option-type-create-GHOCZT64.js} +1 -1
  128. package/dist/{shipping-option-type-detail-OCOL5H4I.js → shipping-option-type-detail-W32EHTBS.js} +1 -1
  129. package/dist/{shipping-option-type-edit-2WVBG2XS.js → shipping-option-type-edit-KRIP6HTC.js} +1 -1
  130. package/dist/{shipping-option-type-list-AW2ZA4V5.js → shipping-option-type-list-Y43XD2XM.js} +1 -1
  131. package/dist/{shipping-profile-metadata-N2AXNBZT.js → shipping-profile-metadata-HMQZ6LGB.js} +1 -1
  132. package/dist/{store-address-edit-KITVKFMG.js → store-address-edit-B4LWVP73.js} +1 -1
  133. package/dist/{store-bulk-edit-SZ3UEDWJ.js → store-bulk-edit-IXWGUFY2.js} +1 -1
  134. package/dist/{store-closure-edit-MMGDJGV3.js → store-closure-edit-H3EKROXP.js} +1 -1
  135. package/dist/{store-create-QUGCV5IG.js → store-create-PL2XGIR5.js} +1 -1
  136. package/dist/{store-details-4XVEWNIX.js → store-details-4DAUF3CD.js} +4 -4
  137. package/dist/{store-edit-KJTO3ZUP.js → store-edit-ESFC2UXE.js} +3 -3
  138. package/dist/{store-list-LSADPRI2.js → store-list-KANREHW5.js} +3 -3
  139. package/dist/{store-member-invite-3G4PCBJ2.js → store-member-invite-U4UQS5VC.js} +1 -1
  140. package/dist/{store-payment-details-edit-5LT4OIMA.js → store-payment-details-edit-ERRJDLBO.js} +1 -1
  141. package/dist/{store-professional-details-edit-ARR5WRGC.js → store-professional-details-edit-VD2J4VYV.js} +1 -1
  142. package/dist/{tax-region-create-MPKY5KXL.js → tax-region-create-4YEJ3HFY.js} +2 -2
  143. package/dist/{tax-region-detail-Q3NZI26Z.js → tax-region-detail-L7STT6C7.js} +1 -1
  144. package/dist/{tax-region-edit-UMPFELDL.js → tax-region-edit-6JOV3POI.js} +1 -1
  145. package/dist/{tax-region-metadata-UAGL3HYV.js → tax-region-metadata-N3QNTXME.js} +1 -1
  146. package/dist/{tax-region-province-detail-JQQQXONY.js → tax-region-province-detail-2GRPOSWS.js} +1 -1
  147. package/dist/{tax-region-tax-override-create-X3WQVHYV.js → tax-region-tax-override-create-JZHOHCXF.js} +2 -2
  148. package/dist/{tax-region-tax-override-edit-SYK2O5BK.js → tax-region-tax-override-edit-SZRD23P4.js} +2 -2
  149. package/dist/{user-metadata-EKIWOTII.js → user-metadata-BD73LJWB.js} +1 -1
  150. package/package.json +6 -6
  151. package/dist/chunk-DGCPYCHU.js +0 -98
  152. package/dist/loader-DHCULYGY.js +0 -32
@@ -41,7 +41,7 @@ import "./chunk-VXW3BCN2.js";
41
41
  import "./chunk-GLZLBHFC.js";
42
42
  import "./chunk-WF3ZDT5Z.js";
43
43
  import "./chunk-PYF5EER5.js";
44
- import "./chunk-NS3GQ2J6.js";
44
+ import "./chunk-BILFRATX.js";
45
45
  import "./chunk-RGS5ZOY7.js";
46
46
  import "./chunk-MW47LDBT.js";
47
47
  import "./chunk-JZJT26E3.js";
@@ -46,7 +46,7 @@ import "./chunk-VXW3BCN2.js";
46
46
  import "./chunk-GLZLBHFC.js";
47
47
  import "./chunk-WF3ZDT5Z.js";
48
48
  import "./chunk-PYF5EER5.js";
49
- import "./chunk-NS3GQ2J6.js";
49
+ import "./chunk-BILFRATX.js";
50
50
  import "./chunk-RGS5ZOY7.js";
51
51
  import "./chunk-BDGZ4EQO.js";
52
52
  import "./chunk-MW47LDBT.js";
@@ -34,7 +34,7 @@ import "./chunk-VXW3BCN2.js";
34
34
  import "./chunk-GLZLBHFC.js";
35
35
  import "./chunk-WF3ZDT5Z.js";
36
36
  import "./chunk-PYF5EER5.js";
37
- import "./chunk-NS3GQ2J6.js";
37
+ import "./chunk-BILFRATX.js";
38
38
  import "./chunk-RGS5ZOY7.js";
39
39
  import "./chunk-MW47LDBT.js";
40
40
  import "./chunk-JZJT26E3.js";
@@ -51,7 +51,7 @@ import {
51
51
  import "./chunk-GLZLBHFC.js";
52
52
  import "./chunk-WF3ZDT5Z.js";
53
53
  import "./chunk-PYF5EER5.js";
54
- import "./chunk-NS3GQ2J6.js";
54
+ import "./chunk-BILFRATX.js";
55
55
  import "./chunk-RGS5ZOY7.js";
56
56
  import "./chunk-MW47LDBT.js";
57
57
  import "./chunk-JZJT26E3.js";
@@ -0,0 +1,36 @@
1
+ import {
2
+ OFFER_PRODUCT_DETAIL_FIELDS
3
+ } from "./chunk-IWBQZK6E.js";
4
+ import {
5
+ productsQueryKeys
6
+ } from "./chunk-ZKHF75MZ.js";
7
+ import {
8
+ queryClient
9
+ } from "./chunk-RHKRREUU.js";
10
+ import "./chunk-ZA2KFUFR.js";
11
+ import {
12
+ sdk
13
+ } from "./chunk-LXZXXOJ3.js";
14
+ import "./chunk-NBMM2TZK.js";
15
+
16
+ // src/pages/offers/[id]/loader.ts
17
+ var offerProductDetailQuery = (id, sellerId) => ({
18
+ queryKey: productsQueryKeys.detail(id, {
19
+ fields: OFFER_PRODUCT_DETAIL_FIELDS,
20
+ seller_id: sellerId
21
+ }),
22
+ queryFn: async () => sdk.admin.products.$id.query({
23
+ $id: id,
24
+ fields: OFFER_PRODUCT_DETAIL_FIELDS,
25
+ ...sellerId ? { seller_id: sellerId } : {}
26
+ })
27
+ });
28
+ var loader = async ({ params, request }) => {
29
+ const id = params.id;
30
+ const sellerId = new URL(request.url).searchParams.get("seller_id") ?? void 0;
31
+ return queryClient.ensureQueryData(offerProductDetailQuery(id, sellerId));
32
+ };
33
+ export {
34
+ loader,
35
+ offerProductDetailQuery
36
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  OFFER_VARIANT_DETAIL_FIELDS
3
- } from "./chunk-S6A4FVM2.js";
3
+ } from "./chunk-IWBQZK6E.js";
4
4
  import {
5
5
  offerQueryKeys
6
- } from "./chunk-LBLWPBST.js";
6
+ } from "./chunk-IZDTQFCP.js";
7
7
  import {
8
8
  queryClient
9
9
  } from "./chunk-RHKRREUU.js";
@@ -42,7 +42,7 @@ import {
42
42
  import "./chunk-GLZLBHFC.js";
43
43
  import "./chunk-WF3ZDT5Z.js";
44
44
  import "./chunk-PYF5EER5.js";
45
- import "./chunk-NS3GQ2J6.js";
45
+ import "./chunk-BILFRATX.js";
46
46
  import "./chunk-RGS5ZOY7.js";
47
47
  import "./chunk-BDGZ4EQO.js";
48
48
  import "./chunk-MW47LDBT.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-26OOAKQ6.js";
6
6
  import "./chunk-ZQZHFMD7.js";
7
7
  import "./chunk-4BCUGMOR.js";
8
- import "./chunk-OI4DJXUL.js";
8
+ import "./chunk-FMJBQE56.js";
9
9
  import "./chunk-HGTPUAHD.js";
10
10
  import "./chunk-S2WEYEQR.js";
11
11
  import {
@@ -71,7 +71,7 @@ import {
71
71
  import "./chunk-GLZLBHFC.js";
72
72
  import "./chunk-WF3ZDT5Z.js";
73
73
  import "./chunk-PYF5EER5.js";
74
- import "./chunk-NS3GQ2J6.js";
74
+ import "./chunk-BILFRATX.js";
75
75
  import "./chunk-RGS5ZOY7.js";
76
76
  import "./chunk-MW47LDBT.js";
77
77
  import "./chunk-JZJT26E3.js";
@@ -37,7 +37,7 @@ import "./chunk-VXW3BCN2.js";
37
37
  import "./chunk-GLZLBHFC.js";
38
38
  import "./chunk-WF3ZDT5Z.js";
39
39
  import "./chunk-PYF5EER5.js";
40
- import "./chunk-NS3GQ2J6.js";
40
+ import "./chunk-BILFRATX.js";
41
41
  import "./chunk-RGS5ZOY7.js";
42
42
  import "./chunk-BDGZ4EQO.js";
43
43
  import "./chunk-MW47LDBT.js";
@@ -6,8 +6,7 @@ import {
6
6
  useSalesChannelTableEmptyState,
7
7
  useSalesChannelTableFilters,
8
8
  useSalesChannelTableQuery
9
- } from "./chunk-RWAEZQCV.js";
10
- import "./chunk-DGCPYCHU.js";
9
+ } from "./chunk-7OKYEA6I.js";
11
10
  import "./chunk-MDABSESI.js";
12
11
  import {
13
12
  DataTable
@@ -43,7 +43,7 @@ import "./chunk-VXW3BCN2.js";
43
43
  import "./chunk-GLZLBHFC.js";
44
44
  import "./chunk-WF3ZDT5Z.js";
45
45
  import "./chunk-PYF5EER5.js";
46
- import "./chunk-NS3GQ2J6.js";
46
+ import "./chunk-BILFRATX.js";
47
47
  import "./chunk-RGS5ZOY7.js";
48
48
  import "./chunk-MW47LDBT.js";
49
49
  import "./chunk-JZJT26E3.js";
@@ -36,7 +36,7 @@ import "./chunk-VXW3BCN2.js";
36
36
  import "./chunk-GLZLBHFC.js";
37
37
  import "./chunk-WF3ZDT5Z.js";
38
38
  import "./chunk-PYF5EER5.js";
39
- import "./chunk-NS3GQ2J6.js";
39
+ import "./chunk-BILFRATX.js";
40
40
  import "./chunk-RGS5ZOY7.js";
41
41
  import "./chunk-MW47LDBT.js";
42
42
  import "./chunk-JZJT26E3.js";
@@ -44,7 +44,7 @@ import "./chunk-VXW3BCN2.js";
44
44
  import "./chunk-GLZLBHFC.js";
45
45
  import "./chunk-WF3ZDT5Z.js";
46
46
  import "./chunk-PYF5EER5.js";
47
- import "./chunk-NS3GQ2J6.js";
47
+ import "./chunk-BILFRATX.js";
48
48
  import "./chunk-RGS5ZOY7.js";
49
49
  import "./chunk-BDGZ4EQO.js";
50
50
  import "./chunk-MW47LDBT.js";
@@ -37,7 +37,7 @@ import "./chunk-VXW3BCN2.js";
37
37
  import "./chunk-GLZLBHFC.js";
38
38
  import "./chunk-WF3ZDT5Z.js";
39
39
  import "./chunk-PYF5EER5.js";
40
- import "./chunk-NS3GQ2J6.js";
40
+ import "./chunk-BILFRATX.js";
41
41
  import "./chunk-RGS5ZOY7.js";
42
42
  import "./chunk-MW47LDBT.js";
43
43
  import "./chunk-JZJT26E3.js";
@@ -1,18 +1,14 @@
1
- import "./chunk-NKV5XPNS.js";
1
+ import {
2
+ OfferStoreSidebar
3
+ } from "./chunk-BO4V6CQN.js";
2
4
  import {
3
5
  OFFER_PRODUCT_DETAIL_FIELDS
4
- } from "./chunk-S6A4FVM2.js";
6
+ } from "./chunk-IWBQZK6E.js";
5
7
  import {
6
8
  useBulkDeleteOffers
7
- } from "./chunk-LBLWPBST.js";
9
+ } from "./chunk-IZDTQFCP.js";
8
10
  import "./chunk-PXYDR7WQ.js";
9
- import {
10
- useDataTableDateFilters
11
- } from "./chunk-DGCPYCHU.js";
12
11
  import "./chunk-PHOCVOZ5.js";
13
- import {
14
- DataTable
15
- } from "./chunk-C4XKPQ6T.js";
16
12
  import "./chunk-IQPN4PZJ.js";
17
13
  import {
18
14
  ProductMediaSection
@@ -28,18 +24,22 @@ import {
28
24
  Thumbnail
29
25
  } from "./chunk-WIYFXWRI.js";
30
26
  import "./chunk-FQERBIVS.js";
31
- import "./chunk-HSL5IICN.js";
27
+ import {
28
+ _DataTable,
29
+ useDataTable
30
+ } from "./chunk-HSL5IICN.js";
32
31
  import "./chunk-YN3FGNJM.js";
33
32
  import "./chunk-ZAOEFQ6K.js";
34
33
  import "./chunk-PAYQJPGK.js";
35
34
  import "./chunk-H6MYB7GB.js";
36
- import {
37
- useDate
38
- } from "./chunk-UZWFZMOX.js";
35
+ import "./chunk-UZWFZMOX.js";
39
36
  import "./chunk-XQNVC4Q7.js";
40
37
  import {
41
38
  useQueryParams
42
39
  } from "./chunk-THHRRYRS.js";
40
+ import {
41
+ useSeller
42
+ } from "./chunk-BILFRATX.js";
43
43
  import {
44
44
  ActionMenu
45
45
  } from "./chunk-BDGZ4EQO.js";
@@ -58,7 +58,7 @@ import "./chunk-NBMM2TZK.js";
58
58
 
59
59
  // src/pages/offers/[id]/offer-detail-page.tsx
60
60
  import { Children } from "react";
61
- import { useLoaderData, useParams } from "react-router-dom";
61
+ import { useLoaderData, useParams, useSearchParams } from "react-router-dom";
62
62
 
63
63
  // src/pages/offers/[id]/_components/offer-detail-general-section.tsx
64
64
  import { Trash } from "@medusajs/icons";
@@ -171,12 +171,12 @@ import {
171
171
  Badge,
172
172
  clx,
173
173
  Container as Container2,
174
- createDataTableColumnHelper,
175
174
  Heading as Heading2,
176
175
  toast as toast2,
177
176
  Tooltip,
178
177
  usePrompt as usePrompt2
179
178
  } from "@medusajs/ui";
179
+ import { createColumnHelper } from "@tanstack/react-table";
180
180
  import { useCallback, useMemo } from "react";
181
181
  import { useTranslation as useTranslation2 } from "react-i18next";
182
182
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
@@ -219,48 +219,33 @@ var matchesDateFilter = (value, filter) => {
219
219
  }
220
220
  return true;
221
221
  };
222
- var columnHelper = createDataTableColumnHelper();
222
+ var columnHelper = createColumnHelper();
223
223
  var useColumns = ({
224
224
  optionTitles,
225
225
  thumbnail,
226
- getActions
226
+ onDelete
227
227
  }) => {
228
228
  const { t } = useTranslation2();
229
- const { getFullDate } = useDate();
230
229
  return useMemo(
231
230
  () => [
232
- columnHelper.display({
233
- id: "thumbnail",
234
- header: "",
235
- // Variant-level images aren't carried by the `withOffers` wrap, so
236
- // every row falls back to the product thumbnail.
237
- cell: () => /* @__PURE__ */ jsx2("div", { className: "flex items-center", children: /* @__PURE__ */ jsx2(Thumbnail, { src: thumbnail ?? null }) })
238
- }),
239
- // Admin-only Store column — rows can span sellers on the platform-wide
240
- // offer surface, so the store disambiguates them.
241
- columnHelper.accessor((row) => row.offer.seller?.name ?? "", {
242
- id: "store",
243
- header: t("offers.fields.store"),
244
- enableSorting: true,
245
- sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
246
- sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
247
- cell: ({ getValue }) => getValue() || /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
248
- }),
249
231
  columnHelper.accessor((row) => row.variant.title ?? "", {
250
232
  id: "title",
251
233
  header: t("fields.title"),
252
- enableSorting: true,
253
- sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
254
- sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
255
- cell: ({ getValue }) => getValue() || /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
234
+ cell: ({ getValue }) => {
235
+ const value = getValue();
236
+ return /* @__PURE__ */ jsxs2("div", { className: "flex h-full w-[220px] items-center gap-x-3 overflow-hidden", children: [
237
+ /* @__PURE__ */ jsx2("div", { className: "w-fit flex-shrink-0", children: /* @__PURE__ */ jsx2(Thumbnail, { src: thumbnail ?? null }) }),
238
+ value ? /* @__PURE__ */ jsx2("span", { title: value, className: "truncate", children: value }) : /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
239
+ ] });
240
+ }
256
241
  }),
257
242
  columnHelper.accessor((row) => skuOf(row), {
258
243
  id: "sku",
259
244
  header: t("fields.sku"),
260
- enableSorting: true,
261
- sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
262
- sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
263
- cell: ({ getValue }) => getValue() || /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
245
+ cell: ({ getValue }) => {
246
+ const value = getValue();
247
+ return /* @__PURE__ */ jsx2("div", { className: "w-[140px] truncate whitespace-nowrap", children: value ? value : /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" }) });
248
+ }
264
249
  }),
265
250
  ...optionTitles.map(
266
251
  (title) => columnHelper.display({
@@ -270,7 +255,18 @@ var useColumns = ({
270
255
  const opt = row.original.variant.options?.find(
271
256
  (o) => o.option?.title === title
272
257
  );
273
- return opt?.value ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: opt.value }) : /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
258
+ if (!opt?.value) {
259
+ return /* @__PURE__ */ jsx2("div", { className: "w-[120px]", children: /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" }) });
260
+ }
261
+ return /* @__PURE__ */ jsx2("div", { className: "flex w-[120px] items-center gap-1", children: /* @__PURE__ */ jsx2(Tooltip, { content: opt.value, children: /* @__PURE__ */ jsx2(
262
+ Badge,
263
+ {
264
+ size: "2xsmall",
265
+ title: opt.value,
266
+ className: "inline-flex min-w-[20px] max-w-[140px] items-center justify-center overflow-hidden truncate",
267
+ children: opt.value
268
+ }
269
+ ) }) });
274
270
  }
275
271
  })
276
272
  ),
@@ -282,14 +278,14 @@ var useColumns = ({
282
278
  row.original.offer
283
279
  );
284
280
  if (!hasItems) {
285
- return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
281
+ return /* @__PURE__ */ jsx2("div", { className: "w-[160px]", children: /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" }) });
286
282
  }
287
283
  const text = t("products.variant.tableItem", {
288
284
  availableCount: available,
289
285
  locationCount,
290
286
  count: locationCount
291
287
  });
292
- return /* @__PURE__ */ jsx2(Tooltip, { content: text, children: /* @__PURE__ */ jsxs2("div", { className: "flex h-full w-full items-center gap-2 overflow-hidden", children: [
288
+ return /* @__PURE__ */ jsx2(Tooltip, { content: text, children: /* @__PURE__ */ jsxs2("div", { className: "flex h-full w-[160px] items-center gap-2 overflow-hidden", children: [
293
289
  isKit && /* @__PURE__ */ jsx2(Component, { className: "text-ui-fg-subtle" }),
294
290
  /* @__PURE__ */ jsx2(
295
291
  "span",
@@ -303,37 +299,27 @@ var useColumns = ({
303
299
  ] }) });
304
300
  }
305
301
  }),
306
- columnHelper.accessor((row) => row.offer.created_at, {
307
- id: "created_at",
308
- header: t("fields.createdAt"),
309
- enableSorting: true,
310
- sortAscLabel: t("filters.sorting.dateAsc"),
311
- sortDescLabel: t("filters.sorting.dateDesc"),
312
- cell: ({ getValue }) => {
313
- const date = getValue();
314
- if (!date) {
315
- return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
316
- }
317
- return /* @__PURE__ */ jsx2(Tooltip, { content: getFullDate({ date, includeTime: true }), children: /* @__PURE__ */ jsx2("span", { children: getFullDate({ date }) }) });
318
- }
319
- }),
320
- columnHelper.accessor((row) => row.offer.updated_at, {
321
- id: "updated_at",
322
- header: t("fields.updatedAt"),
323
- enableSorting: true,
324
- sortAscLabel: t("filters.sorting.dateAsc"),
325
- sortDescLabel: t("filters.sorting.dateDesc"),
326
- cell: ({ getValue }) => {
327
- const date = getValue();
328
- if (!date) {
329
- return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
302
+ columnHelper.display({
303
+ id: "actions",
304
+ cell: ({ row }) => /* @__PURE__ */ jsx2(
305
+ ActionMenu,
306
+ {
307
+ groups: [
308
+ {
309
+ actions: [
310
+ {
311
+ icon: /* @__PURE__ */ jsx2(Trash2, {}),
312
+ label: t("actions.delete"),
313
+ onClick: () => onDelete(row.original.offer.id, skuOf(row.original))
314
+ }
315
+ ]
316
+ }
317
+ ]
330
318
  }
331
- return /* @__PURE__ */ jsx2(Tooltip, { content: getFullDate({ date, includeTime: true }), children: /* @__PURE__ */ jsx2("span", { children: getFullDate({ date }) }) });
332
- }
333
- }),
334
- columnHelper.action({ actions: getActions })
319
+ )
320
+ })
335
321
  ],
336
- [t, optionTitles, thumbnail, getActions, getFullDate]
322
+ [t, optionTitles, thumbnail, onDelete]
337
323
  );
338
324
  };
339
325
  var OfferVariantsSection = ({
@@ -374,8 +360,7 @@ var OfferVariantsSection = ({
374
360
  if (search) {
375
361
  rows = rows.filter((row) => {
376
362
  const title = (row.variant.title ?? "").toLowerCase();
377
- const store = (row.offer.seller?.name ?? "").toLowerCase();
378
- return title.includes(search) || store.includes(search) || skuOf(row).toLowerCase().includes(search);
363
+ return title.includes(search) || skuOf(row).toLowerCase().includes(search);
379
364
  });
380
365
  }
381
366
  const createdFilter = created_at ? JSON.parse(created_at) : null;
@@ -400,8 +385,6 @@ var OfferVariantsSection = ({
400
385
  const key = desc ? order.slice(1) : order;
401
386
  const valueOf = (row) => {
402
387
  switch (key) {
403
- case "store":
404
- return row.offer.seller?.name ?? "";
405
388
  case "title":
406
389
  return row.variant.title ?? "";
407
390
  case "sku":
@@ -445,51 +428,61 @@ var OfferVariantsSection = ({
445
428
  },
446
429
  [prompt, bulkDelete, t]
447
430
  );
448
- const getActions = useCallback(
449
- (ctx) => {
450
- const row = ctx.row.original;
451
- return [
452
- [
453
- {
454
- icon: /* @__PURE__ */ jsx2(Trash2, {}),
455
- label: t("actions.delete"),
456
- onClick: () => handleDelete(row.offer.id, skuOf(row))
457
- }
458
- ]
459
- ];
460
- },
461
- [handleDelete, t]
462
- );
463
- const columns = useColumns({ optionTitles, thumbnail, getActions });
464
- const filters = useDataTableDateFilters();
431
+ const columns = useColumns({ optionTitles, thumbnail, onDelete: handleDelete });
432
+ const filters = useFilters();
433
+ const orderBy = useOrderBy();
434
+ const { table } = useDataTable({
435
+ data: pageRows,
436
+ columns,
437
+ count: sortedRows.length,
438
+ pageSize: PAGE_SIZE,
439
+ getRowId: (row) => row.id,
440
+ prefix: PREFIX
441
+ });
465
442
  return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "offer-variants-section", children: [
466
443
  /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("offers.fields.variants") }) }),
467
444
  /* @__PURE__ */ jsx2(
468
- DataTable,
445
+ _DataTable,
469
446
  {
470
- data: pageRows,
447
+ table,
471
448
  columns,
472
- filters,
473
- getRowId: (row) => row.id,
474
- rowHref: (row) => `variants/${row.id}`,
475
- rowCount: sortedRows.length,
449
+ count: sortedRows.length,
476
450
  pageSize: PAGE_SIZE,
451
+ filters,
452
+ search: true,
453
+ pagination: true,
454
+ orderBy,
477
455
  prefix: PREFIX,
478
- compact: true,
479
- emptyState: {
480
- empty: {
481
- heading: t("offers.empty.heading"),
482
- description: t("offers.empty.description")
483
- },
484
- filtered: {
485
- heading: t("offers.filtered.heading"),
486
- description: t("offers.filtered.description")
487
- }
456
+ queryObject: { q, order, created_at, updated_at },
457
+ navigateTo: (row) => `variants/${row.original.id}`,
458
+ noRecords: {
459
+ title: t("offers.empty.heading"),
460
+ message: t("offers.empty.description")
488
461
  }
489
462
  }
490
463
  )
491
464
  ] });
492
465
  };
466
+ var useFilters = () => {
467
+ const { t } = useTranslation2();
468
+ return useMemo(
469
+ () => [
470
+ { key: "created_at", label: t("fields.createdAt"), type: "date" },
471
+ { key: "updated_at", label: t("fields.updatedAt"), type: "date" }
472
+ ],
473
+ [t]
474
+ );
475
+ };
476
+ var useOrderBy = () => {
477
+ const { t } = useTranslation2();
478
+ return useMemo(
479
+ () => [
480
+ { key: "title", label: t("fields.title") },
481
+ { key: "sku", label: t("fields.sku") }
482
+ ],
483
+ [t]
484
+ );
485
+ };
493
486
 
494
487
  // src/pages/offers/[id]/_components/offer-associated-product-section.tsx
495
488
  import { TriangleRightMini } from "@medusajs/icons";
@@ -525,28 +518,44 @@ var OfferAssociatedProductSection = ({
525
518
  ] });
526
519
  };
527
520
 
521
+ // src/pages/offers/[id]/_components/offer-detail-store-section.tsx
522
+ import { jsx as jsx4 } from "react/jsx-runtime";
523
+ var OfferDetailStoreSection = ({
524
+ sellerId
525
+ }) => {
526
+ const { seller } = useSeller(sellerId ?? "", void 0, {
527
+ enabled: !!sellerId
528
+ });
529
+ if (!sellerId) {
530
+ return null;
531
+ }
532
+ return /* @__PURE__ */ jsx4(OfferStoreSidebar, { seller });
533
+ };
534
+
528
535
  // src/pages/offers/[id]/offer-detail-page.tsx
529
- import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
536
+ import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
530
537
  var Root = ({ children }) => {
531
538
  const { id } = useParams();
539
+ const [searchParams] = useSearchParams();
540
+ const sellerId = searchParams.get("seller_id") ?? void 0;
532
541
  const initialData = useLoaderData();
533
542
  const { product, isLoading, isError, error } = useProduct(
534
543
  id,
535
- { fields: OFFER_PRODUCT_DETAIL_FIELDS },
544
+ { fields: OFFER_PRODUCT_DETAIL_FIELDS, seller_id: sellerId },
536
545
  { initialData }
537
546
  );
538
547
  if (isError) {
539
548
  throw error;
540
549
  }
541
550
  if (isLoading || !product) {
542
- return /* @__PURE__ */ jsx4(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1 });
551
+ return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1 });
543
552
  }
544
553
  const typed = product;
545
- return /* @__PURE__ */ jsx4(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs4(TwoColumnPage, { data: typed, hasOutlet: true, children: [
554
+ return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs4(TwoColumnPage, { data: typed, hasOutlet: true, children: [
546
555
  /* @__PURE__ */ jsxs4(TwoColumnPage.Main, { children: [
547
- /* @__PURE__ */ jsx4(OfferDetailGeneralSection, { product: typed }),
548
- /* @__PURE__ */ jsx4(ProductMediaSection, { product: typed, readOnly: true }),
549
- /* @__PURE__ */ jsx4(
556
+ /* @__PURE__ */ jsx5(OfferDetailGeneralSection, { product: typed }),
557
+ /* @__PURE__ */ jsx5(ProductMediaSection, { product: typed, readOnly: true }),
558
+ /* @__PURE__ */ jsx5(
550
559
  OfferVariantsSection,
551
560
  {
552
561
  variants: typed.variants,
@@ -554,7 +563,10 @@ var Root = ({ children }) => {
554
563
  }
555
564
  )
556
565
  ] }),
557
- /* @__PURE__ */ jsx4(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx4(OfferAssociatedProductSection, { product: typed }) })
566
+ /* @__PURE__ */ jsxs4(TwoColumnPage.Sidebar, { children: [
567
+ /* @__PURE__ */ jsx5(OfferAssociatedProductSection, { product: typed }),
568
+ /* @__PURE__ */ jsx5(OfferDetailStoreSection, { sellerId })
569
+ ] })
558
570
  ] }) });
559
571
  };
560
572
  var OfferDetailPage = Object.assign(Root, {
@@ -563,7 +575,8 @@ var OfferDetailPage = Object.assign(Root, {
563
575
  General: OfferDetailGeneralSection,
564
576
  Media: ProductMediaSection,
565
577
  Variants: OfferVariantsSection,
566
- AssociatedProduct: OfferAssociatedProductSection
578
+ AssociatedProduct: OfferAssociatedProductSection,
579
+ Store: OfferDetailStoreSection
567
580
  });
568
581
  var Component2 = Root;
569
582
  export {
@@ -2,13 +2,13 @@ import {
2
2
  OfferInventorySection,
3
3
  OfferPricingSection,
4
4
  OfferStoreSidebar
5
- } from "./chunk-NKV5XPNS.js";
5
+ } from "./chunk-BO4V6CQN.js";
6
6
  import {
7
7
  OFFER_VARIANT_DETAIL_FIELDS
8
- } from "./chunk-S6A4FVM2.js";
8
+ } from "./chunk-IWBQZK6E.js";
9
9
  import {
10
10
  useOffer
11
- } from "./chunk-LBLWPBST.js";
11
+ } from "./chunk-IZDTQFCP.js";
12
12
  import "./chunk-PXYDR7WQ.js";
13
13
  import "./chunk-PHOCVOZ5.js";
14
14
  import "./chunk-IQPN4PZJ.js";
@@ -123,7 +123,7 @@ var Root = ({ children }) => {
123
123
  /* @__PURE__ */ jsxs3(TwoColumnPage.Sidebar, { children: [
124
124
  /* @__PURE__ */ jsx3(OfferVariantShippingSection, { offer: typed }),
125
125
  /* @__PURE__ */ jsx3(OfferPricingSection, { offer: typed }),
126
- /* @__PURE__ */ jsx3(OfferStoreSidebar, { offer: typed })
126
+ /* @__PURE__ */ jsx3(OfferStoreSidebar, { seller: typed.seller })
127
127
  ] })
128
128
  ] }) });
129
129
  };