@mercurjs/vendor 2.2.1 → 2.3.0-canary.1

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 (217) hide show
  1. package/dist/[id]-3TCOLUQH.js +197 -0
  2. package/dist/{[id]-YB3DBBXT.js → [id]-4QVLDR3S.js} +13 -10
  3. package/dist/{[id]-RJRAZN3T.js → [id]-4VX7CTRZ.js} +8 -6
  4. package/dist/{[id]-OE5TUWNF.js → [id]-5FP6JZM3.js} +9 -7
  5. package/dist/[id]-6FEVCKQU.js +949 -0
  6. package/dist/{[id]-47SUX5X3.js → [id]-7QVJAIDU.js} +13 -10
  7. package/dist/{[id]-BHU5BSQT.js → [id]-CFVBH66J.js} +20 -17
  8. package/dist/{[id]-SKU5SFBG.js → [id]-HAJ3735Z.js} +137 -204
  9. package/dist/{[id]-NGRV5I2A.js → [id]-PBNGQSNY.js} +9 -7
  10. package/dist/[id]-QGZ26C6D.js +286 -0
  11. package/dist/{[id]-ZD5HBP2R.js → [id]-RAJUZUNH.js} +13 -10
  12. package/dist/[id]-RJ3MUR4M.js +697 -0
  13. package/dist/{[id]-PIB2DEVI.js → [id]-RRVYKA7U.js} +12 -9
  14. package/dist/{[id]-BPQNQFVE.js → [id]-Y4HRAAV2.js} +75 -124
  15. package/dist/{[province_id]-CUWKNPBW.js → [province_id]-VWN4OOGM.js} +9 -7
  16. package/dist/{add-MYV5IOGP.js → add-57LM6WKL.js} +157 -227
  17. package/dist/{add-YEUSE5QA.js → add-7HIVF77P.js} +10 -8
  18. package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-VJYI5J5Z.js} +8 -6
  19. package/dist/{add-products-WVNYODC6.js → add-products-XWU5ZUTZ.js} +13 -10
  20. package/dist/{add-promotions-F62YE3BE.js → add-promotions-DOJS6CEE.js} +27 -9
  21. package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
  22. package/dist/{address-ZMZ4ST5T.js → address-X4TXBPUG.js} +7 -5
  23. package/dist/{adjust-inventory-QUGKDXOC.js → adjust-inventory-2OKDFVLK.js} +2 -3
  24. package/dist/{allocate-items-7NSBGXSF.js → allocate-items-QAYROQMK.js} +4 -2
  25. package/dist/{areas-EJCZBY2E.js → areas-WQ44GWQO.js} +2 -2
  26. package/dist/{breadcrumb-M657ZCG6.js → breadcrumb-4I7MU2QY.js} +1 -1
  27. package/dist/{breadcrumb-KNBZ3JNR.js → breadcrumb-7ZFC43R4.js} +1 -1
  28. package/dist/{breadcrumb-C7M5PG2Q.js → breadcrumb-HMW2K4DW.js} +7 -5
  29. package/dist/{breadcrumb-KLNC72RI.js → breadcrumb-MH2L34OD.js} +2 -2
  30. package/dist/{breadcrumb-QPV566YX.js → breadcrumb-Q7FS3IDL.js} +8 -6
  31. package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
  32. package/dist/{breadcrumb-M6NW3DRQ.js → breadcrumb-WBUUK3AP.js} +1 -1
  33. package/dist/breadcrumb-XCPUUZUO.js +26 -0
  34. package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-Z2QUGZM3.js} +7 -5
  35. package/dist/{campaigns-BPLAE6QQ.js → campaigns-LIPKZKI7.js} +5 -4
  36. package/dist/{categories-H2XAJCGC.js → categories-D2U6VLH5.js} +2 -2
  37. package/dist/{chunk-4RVWITM2.js → chunk-3JWHERV7.js} +76 -23
  38. package/dist/{chunk-BCXREBMV.js → chunk-4ATO577Q.js} +1 -1
  39. package/dist/{chunk-VHFKJLDH.js → chunk-4JVORTN4.js} +1 -1
  40. package/dist/{chunk-HHD2VUED.js → chunk-4UKAKFKL.js} +1 -1
  41. package/dist/{chunk-3L7WHWKB.js → chunk-5DRYAIOY.js} +3 -3
  42. package/dist/{chunk-7TIZP4YG.js → chunk-5RWK4U4V.js} +26 -0
  43. package/dist/{chunk-XQUF3WIS.js → chunk-5ZHZVKNQ.js} +4 -0
  44. package/dist/{chunk-IWAL74YU.js → chunk-6GQLSWOO.js} +1 -1
  45. package/dist/{chunk-HCUIYIIY.js → chunk-6OZQTHCR.js} +1 -1
  46. package/dist/chunk-6XMUN2BZ.js +0 -0
  47. package/dist/{chunk-RLRWDHME.js → chunk-6YQR2AWM.js} +3 -20
  48. package/dist/{chunk-26OOAKQ6.js → chunk-7H6NMQ6U.js} +8 -1
  49. package/dist/{chunk-OKJHUQBY.js → chunk-7JVJIAWS.js} +17 -29
  50. package/dist/chunk-7LIENHWP.js +26 -0
  51. package/dist/{chunk-EPSRO7C5.js → chunk-7LIT4GXO.js} +2 -2
  52. package/dist/chunk-7POOMBIN.js +108 -0
  53. package/dist/{chunk-PF7R7LMW.js → chunk-AHR2FIMC.js} +22 -0
  54. package/dist/{chunk-EJBOBB4B.js → chunk-AQT2G6K2.js} +46 -46
  55. package/dist/{chunk-UEKRQS5Q.js → chunk-ATYOOL7K.js} +2 -2
  56. package/dist/chunk-BR6PEFXX.js +27 -0
  57. package/dist/{chunk-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
  58. package/dist/{chunk-3XW55FZY.js → chunk-CRVVPIFZ.js} +6 -6
  59. package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
  60. package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
  61. package/dist/{chunk-UUBGLS7U.js → chunk-EWJTXSKI.js} +211 -36
  62. package/dist/chunk-FKKI62AC.js +282 -0
  63. package/dist/{chunk-VBKW4GWP.js → chunk-FPBXQIFJ.js} +1 -1
  64. package/dist/{chunk-SI55QRZ4.js → chunk-G5NNOOHR.js} +59 -6
  65. package/dist/chunk-G6J5ZKM3.js +31 -0
  66. package/dist/{chunk-U5V6HNVW.js → chunk-GL3XVUAY.js} +1 -1
  67. package/dist/{chunk-RJE4MAYB.js → chunk-GYLRZXWS.js} +1 -1
  68. package/dist/{chunk-SVYBMLVN.js → chunk-HHCLMWXT.js} +1 -1
  69. package/dist/{chunk-YUQA6TUA.js → chunk-JOCO7JOB.js} +3 -3
  70. package/dist/{chunk-OGUTFP6B.js → chunk-JYUHDM23.js} +13 -51
  71. package/dist/{chunk-QB7BI4B7.js → chunk-K2DXXPNA.js} +153 -86
  72. package/dist/{chunk-XG76XXM2.js → chunk-KKMA6VPG.js} +1 -1
  73. package/dist/chunk-KVAD5JGS.js +11 -0
  74. package/dist/{chunk-YRZ53SAN.js → chunk-L26J5MO2.js} +2 -2
  75. package/dist/{chunk-63XYNXUL.js → chunk-LYP7XK5O.js} +1 -1
  76. package/dist/chunk-MVVFD2JT.js +51 -0
  77. package/dist/{chunk-RVFPWOR2.js → chunk-MY5H7C3A.js} +2 -2
  78. package/dist/{chunk-3GSR455R.js → chunk-NQMHP2LC.js} +1 -1
  79. package/dist/{chunk-2S2WK2OG.js → chunk-NV2RZAHW.js} +1 -10
  80. package/dist/{chunk-4IIATKG7.js → chunk-O7OWHKWA.js} +6 -6
  81. package/dist/{chunk-GIKVFOQL.js → chunk-OJCMHDZI.js} +2 -2
  82. package/dist/chunk-QLOJNFUE.js +53 -0
  83. package/dist/{chunk-GTNCNKTC.js → chunk-RBWIHKUF.js} +1 -1
  84. package/dist/{chunk-XVBONKRV.js → chunk-RCMKDW6O.js} +1 -1
  85. package/dist/{chunk-WJF24CGA.js → chunk-RDLVH6CM.js} +33 -5
  86. package/dist/chunk-SF5N2HX4.js +268 -0
  87. package/dist/{chunk-MQR26KYT.js → chunk-SYHA2RVL.js} +1 -1
  88. package/dist/{chunk-ZXDMPIXN.js → chunk-U3OEGBHH.js} +2 -2
  89. package/dist/chunk-UTGI6R2X.js +334 -0
  90. package/dist/{chunk-VBRTC2VU.js → chunk-VAFGNDAP.js} +4 -3
  91. package/dist/{chunk-4UQMRTSC.js → chunk-VH3TGSWE.js} +46 -2
  92. package/dist/{chunk-ZEKV7LGF.js → chunk-VV2K3EBF.js} +1 -1
  93. package/dist/{chunk-S2VYK3YC.js → chunk-WI2ZAFZF.js} +1 -1
  94. package/dist/chunk-WP3B4NEU.js +32 -0
  95. package/dist/{chunk-DY3XQPHC.js → chunk-WW2XYOHJ.js} +5 -3
  96. package/dist/{chunk-IVYIMGQC.js → chunk-X44P463Q.js} +45 -10
  97. package/dist/{chunk-FEVCBT24.js → chunk-X4G64W5Q.js} +2 -2
  98. package/dist/{chunk-R5KN6IFB.js → chunk-XHWBTV72.js} +2 -2
  99. package/dist/{chunk-OVHIUZ3K.js → chunk-XQ47NZJC.js} +1 -1
  100. package/dist/{chunk-LN7XHEPJ.js → chunk-YT4RAUWM.js} +2 -2
  101. package/dist/{chunk-6VKJM537.js → chunk-ZK4DIDXG.js} +1 -1
  102. package/dist/{collections-52DJLHWW.js → collections-5TH7H2QP.js} +14 -13
  103. package/dist/{configuration-UMRBE5RQ.js → configuration-QK2FW2CV.js} +2 -2
  104. package/dist/{configuration-QEDVL2WF.js → configuration-RYH3VUBV.js} +15 -48
  105. package/dist/{create-ALUKAFJS.js → create-5M66YUYY.js} +2 -2
  106. package/dist/{create-ABRPUMHQ.js → create-A6KZEZMH.js} +7 -6
  107. package/dist/{create-LYNWCP2N.js → create-BTODQ4T4.js} +6 -5
  108. package/dist/{create-2I3GAX4C.js → create-FI6H4AJE.js} +16 -7
  109. package/dist/{create-6IRD2CVC.js → create-GF76Z5I7.js} +15 -13
  110. package/dist/create-ICCAEOSA.js +343 -0
  111. package/dist/{create-NTZH45DW.js → create-JZLU44WB.js} +14 -12
  112. package/dist/{create-GEYXN6SW.js → create-ME43PNL6.js} +7 -5
  113. package/dist/{create-MFGMTZ5A.js → create-MIYJCLAJ.js} +8 -6
  114. package/dist/{create-7SJ5DSQK.js → create-PRDQJ5WI.js} +20 -17
  115. package/dist/{create-S7VYYTUD.js → create-Q6B6JR4K.js} +10 -8
  116. package/dist/{create-5RQ32XPT.js → create-SKQAJNDF.js} +287 -287
  117. package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
  118. package/dist/{create-H77ZUZG5.js → create-XBGN6XEF.js} +10 -8
  119. package/dist/{create-G76MVCJU.js → create-ZVGYET6W.js} +5 -4
  120. package/dist/customer-availability-VAOKKCTK.js +164 -0
  121. package/dist/{customer-group-add-customers-T7OYWJCB.js → customer-group-add-customers-BSMUKWVO.js} +1 -1
  122. package/dist/{customer-group-detail-E7HRZ3LE.js → customer-group-detail-QCPC2YWK.js} +2 -2
  123. package/dist/{customer-groups-26HJ55MF.js → customer-groups-6WGUNFHG.js} +2 -2
  124. package/dist/{customers-EXFRZX5F.js → customers-7OGYQSGA.js} +2 -2
  125. package/dist/edit-2BKYNGYL.js +262 -0
  126. package/dist/{edit-WHGYNDEB.js → edit-3S3EH372.js} +20 -17
  127. package/dist/{edit-MPOTIGUY.js → edit-4WP5SGH6.js} +23 -39
  128. package/dist/{edit-QBUYHSE7.js → edit-7D2OZBJS.js} +8 -6
  129. package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
  130. package/dist/edit-AK4E63X6.js +179 -0
  131. package/dist/{edit-NB5VN2E4.js → edit-DRT6VOAA.js} +5 -4
  132. package/dist/{edit-EGBVEWXS.js → edit-GBDHDJK4.js} +9 -7
  133. package/dist/{edit-TIBQEQVV.js → edit-P7FNRVGB.js} +10 -8
  134. package/dist/{edit-6VJWRZHQ.js → edit-PZN7UAJI.js} +7 -5
  135. package/dist/{edit-M4AP65HO.js → edit-RNSXXJVU.js} +8 -6
  136. package/dist/edit-SKRFQ4WN.js +81 -0
  137. package/dist/{edit-H5FJ45ZT.js → edit-ZM7NJVRE.js} +1 -1
  138. package/dist/{edit-budget-PYPHUJPW.js → edit-budget-MOZETGZV.js} +1 -1
  139. package/dist/{edit-inventory-item-BCVECCLT.js → edit-inventory-item-HFGHS732.js} +17 -14
  140. package/dist/{edit-inventory-item-attributes-GWEMP67O.js → edit-inventory-item-attributes-5ORZJF4I.js} +18 -1
  141. package/dist/{edit-price-GLAEAO7R.js → edit-price-KY7LX5QA.js} +2 -2
  142. package/dist/edit-reservation-LSYQUDYQ.js +294 -0
  143. package/dist/{edit-stock-E3PM2YOP.js → edit-stock-77VKJR4Z.js} +2 -2
  144. package/dist/extension-targets.d.ts +6 -3
  145. package/dist/{fulfillment-HDU7GATG.js → fulfillment-DEGKZL42.js} +7 -5
  146. package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-LDFPZGNX.js} +12 -11
  147. package/dist/index.css +17 -14
  148. package/dist/index.js +265 -155
  149. package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
  150. package/dist/{inventory-CKA34HWM.js → inventory-RKAUTQAU.js} +2 -2
  151. package/dist/{invite-755AJC3M.js → invite-KAHF2MCE.js} +7 -5
  152. package/dist/{invite-FD2TXZTW.js → invite-S5O7LFEY.js} +10 -8
  153. package/dist/{loader-UUSAVCK6.js → loader-3BXYSKPT.js} +1 -1
  154. package/dist/{loader-B4T2VBGV.js → loader-CF54CDM6.js} +2 -2
  155. package/dist/{login-UGKYRKMD.js → login-CRSALS6Y.js} +9 -7
  156. package/dist/manage-items-63FPRK7Z.js +302 -0
  157. package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
  158. package/dist/{media-TGFAHFBV.js → media-74PEXOLV.js} +8 -6
  159. package/dist/{media-2KEHXPRU.js → media-NKCXFG6X.js} +11 -9
  160. package/dist/{metadata-7JWZ4VFM.js → metadata-22BCBKVE.js} +7 -5
  161. package/dist/{metadata-BQQFHVKF.js → metadata-E3BDAMIO.js} +7 -5
  162. package/dist/{metadata-5TVRCKWX.js → metadata-FRXIY35J.js} +7 -5
  163. package/dist/{metadata-4ZZ4ZIWJ.js → metadata-L6IA2Z26.js} +7 -5
  164. package/dist/metadata-WN6Y35RV.js +69 -0
  165. package/dist/{metadata-G73TILNE.js → metadata-ZZMJNWS3.js} +7 -5
  166. package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-N5CKYGSS.js} +12 -9
  167. package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-AJG6TMJC.js} +3 -3
  168. package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-CEOS2MVM.js} +40 -8
  169. package/dist/{offers-7I67VSHI.js → offers-WFJ6UGVG.js} +15 -11
  170. package/dist/{onboarding-7MURQYXX.js → onboarding-2AZ2KEWJ.js} +7 -5
  171. package/dist/{orders-D7NZNDUS.js → orders-NWYLN6BE.js} +13 -12
  172. package/dist/{organization-T6ZTYMMW.js → organization-PAWIWKHV.js} +9 -7
  173. package/dist/pages/index.d.ts +9 -1
  174. package/dist/pages/index.js +57 -48
  175. package/dist/{payment-details-UQ65D5AY.js → payment-details-O57HNHWS.js} +7 -5
  176. package/dist/{payouts-A336D2HG.js → payouts-26ZOYDRP.js} +2 -2
  177. package/dist/{price-lists-3WRT4TR2.js → price-lists-U5ASDHMI.js} +5 -8
  178. package/dist/{pricing-3NLEJYRP.js → pricing-C425JTFQ.js} +2 -2
  179. package/dist/{pricing-CPPIL627.js → pricing-PDOCJEDS.js} +9 -7
  180. package/dist/{product-tags-7DTA73YT.js → product-tags-MMQ4ZR4W.js} +20 -17
  181. package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
  182. package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-D73ILATK.js} +7 -5
  183. package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-XN6WGKI2.js} +10 -8
  184. package/dist/{products-RYXTZFGT.js → products-OZJHGW2K.js} +19 -16
  185. package/dist/{products-GJ2KTGBZ.js → products-VWH5TAFY.js} +13 -10
  186. package/dist/{professional-details-UN5B4YDJ.js → professional-details-ZJT6YKZB.js} +7 -5
  187. package/dist/{profile-6MIDTK52.js → profile-EU46MXFW.js} +7 -5
  188. package/dist/{promotions-SQ47TCZL.js → promotions-ALWQ7J7A.js} +5 -5
  189. package/dist/{receive-ZG6FFN7H.js → receive-RRZK3FP2.js} +4 -3
  190. package/dist/{refund-KJX74N6T.js → refund-FLCZAMPR.js} +3 -2
  191. package/dist/{register-RDSK4E4D.js → register-C6ON6OL2.js} +9 -7
  192. package/dist/reservations-C326XEVA.js +350 -0
  193. package/dist/{reset-password-C462PDN2.js → reset-password-ASLKY3GK.js} +1 -1
  194. package/dist/respond-IPRDCH57.js +132 -0
  195. package/dist/{return-reasons-MY63HNF6.js → return-reasons-2BUKIQBO.js} +9 -7
  196. package/dist/reviews-LBLCFBRQ.js +14 -0
  197. package/dist/{settings-TJ6HPHMK.js → settings-Q5GAL2LK.js} +28 -25
  198. package/dist/{shipment-6CTA2GHU.js → shipment-XOU6F7AS.js} +7 -5
  199. package/dist/{shipping-TKKMYQHJ.js → shipping-IMCP7UDV.js} +2 -2
  200. package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
  201. package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-647FLCNK.js} +9 -7
  202. package/dist/{stock-465GEUY3.js → stock-D3HCV5UR.js} +22 -8
  203. package/dist/{store-2PQB2XWE.js → store-XBNFP6O4.js} +8 -6
  204. package/dist/{store-closure-DYW54VHB.js → store-closure-55EUSKE4.js} +7 -5
  205. package/dist/{store-select-6A5YR7WH.js → store-select-DEOEGT2O.js} +8 -6
  206. package/dist/{team-GXEBC57M.js → team-7MJ3NJUT.js} +10 -8
  207. package/package.json +12 -9
  208. package/dist/[id]-HEVGSOAV.js +0 -598
  209. package/dist/[id]-MU7A6SZO.js +0 -526
  210. package/dist/chunk-2ZFELO2L.js +0 -13
  211. package/dist/chunk-6IJMSVC6.js +0 -16
  212. package/dist/chunk-BNOKKKUU.js +0 -88
  213. package/dist/chunk-BX3JE7IE.js +0 -247
  214. package/dist/edit-4B364HGZ.js +0 -222
  215. package/dist/edit-735HBYH2.js +0 -103
  216. package/dist/edit-SQU5UOGE.js +0 -105
  217. package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
@@ -0,0 +1,697 @@
1
+ import {
2
+ BadgeListSummary
3
+ } from "./chunk-QLOJNFUE.js";
4
+ import {
5
+ DateRangeDisplay
6
+ } from "./chunk-BWGPN6XV.js";
7
+ import {
8
+ useDeletePriceListAction
9
+ } from "./chunk-6OZQTHCR.js";
10
+ import {
11
+ getPriceListStatus
12
+ } from "./chunk-KVAD5JGS.js";
13
+ import {
14
+ CategoryCell,
15
+ CategoryHeader,
16
+ ProductStatusCell,
17
+ ProductStatusHeader
18
+ } from "./chunk-WI2ZAFZF.js";
19
+ import {
20
+ ProductCell,
21
+ ProductHeader
22
+ } from "./chunk-FWPGOIFA.js";
23
+ import "./chunk-DB6ANJBO.js";
24
+ import {
25
+ PlaceholderCell
26
+ } from "./chunk-PHOCVOZ5.js";
27
+ import {
28
+ TwoColumnPage
29
+ } from "./chunk-YV6MK4PZ.js";
30
+ import "./chunk-FQERBIVS.js";
31
+ import {
32
+ _DataTable,
33
+ useDataTable
34
+ } from "./chunk-6GQLSWOO.js";
35
+ import "./chunk-YN3FGNJM.js";
36
+ import "./chunk-KCHYLLVG.js";
37
+ import {
38
+ NoRecords
39
+ } from "./chunk-3EF54XFY.js";
40
+ import {
41
+ useQueryParams
42
+ } from "./chunk-THHRRYRS.js";
43
+ import "./chunk-LRD242C7.js";
44
+ import "./chunk-VH3TGSWE.js";
45
+ import "./chunk-WIYFXWRI.js";
46
+ import {
47
+ Skeleton,
48
+ TwoColumnPageSkeleton
49
+ } from "./chunk-INNFZYX2.js";
50
+ import {
51
+ ActionMenu
52
+ } from "./chunk-BDGZ4EQO.js";
53
+ import "./chunk-LAVHRER2.js";
54
+ import "./chunk-QHQWEERJ.js";
55
+ import "./chunk-Y7QKP6QU.js";
56
+ import {
57
+ priceListsQueryKeys,
58
+ usePriceList,
59
+ usePriceListLinkProducts
60
+ } from "./chunk-NV2RZAHW.js";
61
+ import {
62
+ useCustomerGroups
63
+ } from "./chunk-II3CLUXA.js";
64
+ import {
65
+ useOffers
66
+ } from "./chunk-AHR2FIMC.js";
67
+ import "./chunk-EMUCGKHP.js";
68
+ import "./chunk-A5DJIOHN.js";
69
+ import {
70
+ queryClient
71
+ } from "./chunk-RHKRREUU.js";
72
+ import "./chunk-ZA2KFUFR.js";
73
+ import {
74
+ fetchQuery
75
+ } from "./chunk-DTGEFKK4.js";
76
+ import "./chunk-NBMM2TZK.js";
77
+
78
+ // src/pages/price-lists/[id]/loader.tsx
79
+ import { getLinkQuery } from "@mercurjs/dashboard-shared";
80
+ var pricingDetailQuery = (id) => {
81
+ const query = getLinkQuery("price_list");
82
+ return {
83
+ queryKey: priceListsQueryKeys.detail(id, query),
84
+ queryFn: async () => await fetchQuery(`/vendor/price-lists/${id}`, {
85
+ method: "GET",
86
+ query
87
+ })
88
+ };
89
+ };
90
+ var loader = async ({ params }) => {
91
+ const id = params.id;
92
+ const query = pricingDetailQuery(id);
93
+ return queryClient.ensureQueryData(query);
94
+ };
95
+
96
+ // src/pages/price-lists/[id]/price-list-detail-page.tsx
97
+ import { Children } from "react";
98
+ import { useLoaderData, useParams } from "react-router-dom";
99
+ import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
100
+
101
+ // src/pages/price-lists/[id]/_components/price-list-configuration-section/price-list-configuration-section.tsx
102
+ import { PencilSquare } from "@medusajs/icons";
103
+ import { Container, Heading } from "@medusajs/ui";
104
+ import { useTranslation } from "react-i18next";
105
+ import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
106
+ import { jsx, jsxs } from "react/jsx-runtime";
107
+ var PriceListConfigurationSection = ({
108
+ priceList
109
+ }) => {
110
+ const { t } = useTranslation();
111
+ return /* @__PURE__ */ jsxs(Container, { className: "flex flex-col gap-y-4", "data-testid": "price-list-configuration-section-container", children: [
112
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", "data-testid": "price-list-configuration-section-header", children: [
113
+ /* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "price-list-configuration-section-heading", children: t("priceLists.configuration.header") }),
114
+ /* @__PURE__ */ jsx(
115
+ ActionMenu,
116
+ {
117
+ groups: [
118
+ {
119
+ actions: [
120
+ {
121
+ label: t("actions.edit"),
122
+ to: "configuration",
123
+ icon: /* @__PURE__ */ jsx(PencilSquare, {})
124
+ }
125
+ ]
126
+ }
127
+ ]
128
+ }
129
+ )
130
+ ] }),
131
+ /* @__PURE__ */ jsx(
132
+ DateRangeDisplay,
133
+ {
134
+ endsAt: priceList.ends_at,
135
+ startsAt: priceList.starts_at,
136
+ showTime: true
137
+ }
138
+ ),
139
+ /* @__PURE__ */ jsx(
140
+ DisplayExtensionZone,
141
+ {
142
+ model: "price_list",
143
+ zone: "configuration",
144
+ data: priceList
145
+ }
146
+ )
147
+ ] });
148
+ };
149
+
150
+ // src/pages/price-lists/[id]/_components/price-list-customer-availability-section/price-list-customer-availability-section.tsx
151
+ import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
152
+ import { Badge, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
153
+ import { useTranslation as useTranslation2 } from "react-i18next";
154
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
155
+ var PriceListCustomerAvailabilitySection = ({
156
+ priceList
157
+ }) => {
158
+ const { t } = useTranslation2();
159
+ const customerGroupIds = priceList.rules?.["customer.groups.id"];
160
+ const { customer_groups, isPending, isError } = useCustomerGroups(
161
+ { id: customerGroupIds },
162
+ { enabled: !!customerGroupIds?.length }
163
+ );
164
+ const isEmpty = !customerGroupIds?.length || isError;
165
+ return /* @__PURE__ */ jsxs2(Container2, { className: "p-0", "data-testid": "price-list-customer-availability-section-container", children: [
166
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "price-list-customer-availability-section-header", children: [
167
+ /* @__PURE__ */ jsx2(Heading2, { level: "h2", "data-testid": "price-list-customer-availability-section-heading", children: t("priceLists.customerAvailability.header") }),
168
+ /* @__PURE__ */ jsx2(
169
+ ActionMenu,
170
+ {
171
+ groups: [
172
+ {
173
+ actions: [
174
+ {
175
+ label: t("actions.edit"),
176
+ to: "customer-availability",
177
+ icon: /* @__PURE__ */ jsx2(PencilSquare2, {})
178
+ }
179
+ ]
180
+ }
181
+ ]
182
+ }
183
+ )
184
+ ] }),
185
+ /* @__PURE__ */ jsx2("div", { className: "text-ui-fg-subtle flex flex-col gap-2 px-6 pb-4 pt-2", "data-testid": "price-list-customer-availability-section-content", children: isEmpty ? /* @__PURE__ */ jsx2(
186
+ NoRecords,
187
+ {
188
+ className: "h-[180px]",
189
+ icon: null,
190
+ title: t("priceLists.customerAvailability.list.noRecordsTitle"),
191
+ message: t("priceLists.customerAvailability.list.noRecordsMessage"),
192
+ action: {
193
+ to: "customer-availability",
194
+ label: t("priceLists.customerAvailability.add")
195
+ }
196
+ }
197
+ ) : isPending || !customer_groups ? /* @__PURE__ */ jsx2(Skeleton, { className: "h-5 w-full max-w-48" }) : /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-subtle shadow-borders-base align-center flex justify-around rounded-md p-2", children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle txt-compact-xsmall flex items-center whitespace-nowrap", children: [
198
+ /* @__PURE__ */ jsx2(
199
+ Badge,
200
+ {
201
+ size: "2xsmall",
202
+ className: "txt-compact-xsmall-plus tag-neutral-text mx-1 inline-block truncate",
203
+ children: t("priceLists.fields.customerAvailability.attribute")
204
+ }
205
+ ),
206
+ /* @__PURE__ */ jsx2("span", { className: "txt-compact-2xsmall mx-1 inline-block", children: t("operators.in") }),
207
+ /* @__PURE__ */ jsx2(
208
+ BadgeListSummary,
209
+ {
210
+ inline: true,
211
+ className: "!txt-compact-small-plus",
212
+ list: customer_groups.map((group) => group.name)
213
+ }
214
+ )
215
+ ] }) }) })
216
+ ] });
217
+ };
218
+
219
+ // src/pages/price-lists/[id]/_components/price-list-general-section/price-list-general-section.tsx
220
+ import { PencilSquare as PencilSquare3, Trash } from "@medusajs/icons";
221
+ import { Container as Container3, Heading as Heading3, StatusBadge, Text } from "@medusajs/ui";
222
+ import { useTranslation as useTranslation3 } from "react-i18next";
223
+ import { DisplayExtensionZone as DisplayExtensionZone2, DisplayField } from "@mercurjs/dashboard-shared";
224
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
225
+ var PriceListGeneralSection = ({
226
+ priceList
227
+ }) => {
228
+ const { t } = useTranslation3();
229
+ const overrideCount = priceList.prices?.length || 0;
230
+ const { color, text } = getPriceListStatus(t, priceList);
231
+ const handleDelete = useDeletePriceListAction({ priceList });
232
+ const type = priceList.type === "sale" ? t("priceLists.fields.type.options.sale.label") : t("priceLists.fields.type.options.override.label");
233
+ const GENERAL_FIELD_IDS = [
234
+ "title",
235
+ "status",
236
+ "type",
237
+ "description",
238
+ "price_overrides"
239
+ ];
240
+ return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", "data-testid": "price-list-general-section-container", children: [
241
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "price-list-general-section-header", children: [
242
+ /* @__PURE__ */ jsx3(DisplayField, { model: "price_list", zone: "general", id: "title", data: priceList, children: /* @__PURE__ */ jsx3(Heading3, { "data-testid": "price-list-general-section-title", children: priceList.title }) }),
243
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-4", children: [
244
+ /* @__PURE__ */ jsx3(DisplayField, { model: "price_list", zone: "general", id: "status", data: priceList, children: /* @__PURE__ */ jsx3(StatusBadge, { color, "data-testid": "price-list-general-section-status", children: text }) }),
245
+ /* @__PURE__ */ jsx3(
246
+ ActionMenu,
247
+ {
248
+ groups: [
249
+ {
250
+ actions: [
251
+ {
252
+ label: t("actions.edit"),
253
+ to: "edit",
254
+ icon: /* @__PURE__ */ jsx3(PencilSquare3, {})
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ actions: [
260
+ {
261
+ label: t("actions.delete"),
262
+ onClick: handleDelete,
263
+ icon: /* @__PURE__ */ jsx3(Trash, {})
264
+ }
265
+ ]
266
+ }
267
+ ]
268
+ }
269
+ )
270
+ ] })
271
+ ] }),
272
+ /* @__PURE__ */ jsx3(DisplayField, { model: "price_list", zone: "general", id: "type", data: priceList, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-type", children: [
273
+ /* @__PURE__ */ jsx3(Text, { leading: "compact", size: "small", weight: "plus", "data-testid": "price-list-general-section-type-label", children: t("fields.type") }),
274
+ /* @__PURE__ */ jsx3(Text, { size: "small", className: "text-pretty", "data-testid": "price-list-general-section-type-value", children: type })
275
+ ] }) }),
276
+ /* @__PURE__ */ jsx3(DisplayField, { model: "price_list", zone: "general", id: "description", data: priceList, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-description", children: [
277
+ /* @__PURE__ */ jsx3(Text, { leading: "compact", size: "small", weight: "plus", "data-testid": "price-list-general-section-description-label", children: t("fields.description") }),
278
+ /* @__PURE__ */ jsx3(Text, { size: "small", className: "text-pretty", "data-testid": "price-list-general-section-description-value", children: priceList.description })
279
+ ] }) }),
280
+ /* @__PURE__ */ jsx3(DisplayField, { model: "price_list", zone: "general", id: "price_overrides", data: priceList, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-price-overrides", children: [
281
+ /* @__PURE__ */ jsx3(Text, { leading: "compact", size: "small", weight: "plus", "data-testid": "price-list-general-section-price-overrides-label", children: t("priceLists.fields.priceOverrides.label") }),
282
+ /* @__PURE__ */ jsx3(Text, { size: "small", className: "text-pretty", "data-testid": "price-list-general-section-price-overrides-value", children: overrideCount || "-" })
283
+ ] }) }),
284
+ /* @__PURE__ */ jsx3(DisplayExtensionZone2, { model: "price_list", zone: "general", data: priceList, builtInFieldIds: GENERAL_FIELD_IDS })
285
+ ] });
286
+ };
287
+
288
+ // src/pages/price-lists/[id]/_components/price-list-product-section/price-list-product-section.tsx
289
+ import {
290
+ EllipsisHorizontal,
291
+ ExclamationCircle,
292
+ PencilSquare as PencilSquare4,
293
+ Trash as Trash2
294
+ } from "@medusajs/icons";
295
+ import {
296
+ Button,
297
+ Checkbox,
298
+ Container as Container4,
299
+ Heading as Heading4,
300
+ Text as Text2,
301
+ toast,
302
+ usePrompt
303
+ } from "@medusajs/ui";
304
+ import { keepPreviousData } from "@tanstack/react-query";
305
+ import {
306
+ createColumnHelper
307
+ } from "@tanstack/react-table";
308
+ import { useMemo, useRef, useState } from "react";
309
+ import { useTranslation as useTranslation4 } from "react-i18next";
310
+ import { Link, useNavigate } from "react-router-dom";
311
+ import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
312
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
313
+ var PAGE_SIZE = 10;
314
+ var PREFIX = "plo";
315
+ var OFFER_FIELDS = "id,variant_id,product_id,product.title,product.thumbnail,product.status,product.categories.id,product.categories.name,product.collection.id,product.collection.title";
316
+ var getPriceOfferId = (price) => {
317
+ const p = price;
318
+ if (p.rules?.offer_id) {
319
+ return p.rules.offer_id;
320
+ }
321
+ return p.price_rules?.find((rule) => rule.attribute === "offer_id")?.value;
322
+ };
323
+ var PriceListProductSection = ({
324
+ priceList
325
+ }) => {
326
+ const { t } = useTranslation4();
327
+ const navigate = useNavigate();
328
+ const prompt = usePrompt();
329
+ const [rowSelection, setRowSelection] = useState({});
330
+ const { price_list: pricedList } = usePriceList(priceList.id, {
331
+ fields: "id,+prices.price_rules.attribute,+prices.price_rules.value"
332
+ });
333
+ const offerIds = useMemo(() => {
334
+ const ids = /* @__PURE__ */ new Set();
335
+ for (const price of pricedList?.prices ?? []) {
336
+ const offerId = getPriceOfferId(price);
337
+ if (offerId) {
338
+ ids.add(offerId);
339
+ }
340
+ }
341
+ return Array.from(ids);
342
+ }, [pricedList]);
343
+ const raw = useQueryParams(
344
+ ["q", "order", "offset", "created_at", "updated_at"],
345
+ PREFIX
346
+ );
347
+ const { offers, isLoading, isError, error } = useOffers(
348
+ {
349
+ id: offerIds,
350
+ limit: offerIds.length || 1,
351
+ fields: OFFER_FIELDS,
352
+ order: raw.order,
353
+ ...raw.q ? { q: raw.q } : {},
354
+ ...raw.created_at ? { created_at: JSON.parse(raw.created_at) } : {},
355
+ ...raw.updated_at ? { updated_at: JSON.parse(raw.updated_at) } : {}
356
+ },
357
+ {
358
+ placeholderData: keepPreviousData,
359
+ enabled: offerIds.length > 0
360
+ }
361
+ );
362
+ const groupedOffers = useMemo(() => {
363
+ const groups = /* @__PURE__ */ new Map();
364
+ for (const offer of offers ?? []) {
365
+ const key = offer.product_id;
366
+ const existing = groups.get(key);
367
+ if (existing) {
368
+ existing.variant_count = (existing.variant_count ?? 0) + 1;
369
+ (existing.offer_ids ?? (existing.offer_ids = [])).push(offer.id);
370
+ } else {
371
+ groups.set(key, {
372
+ ...offer,
373
+ id: key,
374
+ variant_count: 1,
375
+ offer_ids: [offer.id]
376
+ });
377
+ }
378
+ }
379
+ return Array.from(groups.values());
380
+ }, [offers]);
381
+ const groupToProduct = useRef({});
382
+ for (const group of groupedOffers) {
383
+ groupToProduct.current[group.id] = group.product_id;
384
+ }
385
+ const selectedProductIds = () => Array.from(
386
+ new Set(
387
+ Object.keys(rowSelection).map((groupId) => groupToProduct.current[groupId]).filter(Boolean)
388
+ )
389
+ );
390
+ const columns = useColumns(priceList);
391
+ const filters = useOfferSectionFilters();
392
+ const { mutateAsync } = usePriceListLinkProducts(priceList.id);
393
+ const { table } = useDataTable({
394
+ data: groupedOffers,
395
+ count: groupedOffers.length,
396
+ columns,
397
+ enablePagination: true,
398
+ enableRowSelection: true,
399
+ pageSize: PAGE_SIZE,
400
+ getRowId: (row) => row.id,
401
+ rowSelection: {
402
+ state: rowSelection,
403
+ updater: setRowSelection
404
+ },
405
+ prefix: PREFIX
406
+ });
407
+ const handleDelete = async () => {
408
+ const productIds = selectedProductIds();
409
+ const res = await prompt({
410
+ title: t("general.areYouSure"),
411
+ description: t("priceLists.products.delete.confirmation", {
412
+ count: productIds.length
413
+ }),
414
+ confirmText: t("actions.remove"),
415
+ cancelText: t("actions.cancel")
416
+ });
417
+ if (!res) {
418
+ return;
419
+ }
420
+ mutateAsync(
421
+ { remove: productIds },
422
+ {
423
+ onSuccess: () => {
424
+ toast.success(
425
+ t("priceLists.products.delete.successToast", {
426
+ count: productIds.length
427
+ })
428
+ );
429
+ setRowSelection({});
430
+ },
431
+ onError: (e) => toast.error(e.message)
432
+ }
433
+ );
434
+ };
435
+ const handleEdit = async () => {
436
+ const ids = selectedProductIds().join(",");
437
+ navigate(`products/edit?ids[]=${ids}`);
438
+ };
439
+ return /* @__PURE__ */ jsxs4(Container4, { className: "divide-y p-0", "data-testid": "price-list-product-section-container", children: [
440
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "price-list-product-section-header", children: [
441
+ /* @__PURE__ */ jsx4(Heading4, { "data-testid": "price-list-product-section-heading", children: t("priceLists.products.header") }),
442
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
443
+ /* @__PURE__ */ jsx4(
444
+ ActionMenu,
445
+ {
446
+ groups: [
447
+ {
448
+ actions: [
449
+ {
450
+ label: t("priceLists.products.actions.editPrices"),
451
+ to: "products/edit",
452
+ icon: /* @__PURE__ */ jsx4(PencilSquare4, {}),
453
+ disabled: groupedOffers.length === 0,
454
+ disabledTooltip: t(
455
+ "priceLists.products.actions.editPricesDisabled"
456
+ )
457
+ }
458
+ ]
459
+ }
460
+ ],
461
+ children: /* @__PURE__ */ jsx4(
462
+ Button,
463
+ {
464
+ size: "small",
465
+ variant: "secondary",
466
+ className: "h-7 w-7 p-0",
467
+ "data-testid": "price-list-product-section-action-menu-trigger",
468
+ children: /* @__PURE__ */ jsx4(EllipsisHorizontal, {})
469
+ }
470
+ )
471
+ }
472
+ ),
473
+ /* @__PURE__ */ jsx4(
474
+ Button,
475
+ {
476
+ size: "small",
477
+ variant: "secondary",
478
+ asChild: true,
479
+ "data-testid": "price-list-product-section-add-button",
480
+ children: /* @__PURE__ */ jsx4(Link, { to: "products/add", children: t("actions.add") })
481
+ }
482
+ )
483
+ ] })
484
+ ] }),
485
+ isError ? /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2 px-6 py-4", "data-testid": "price-list-product-section-error", children: [
486
+ /* @__PURE__ */ jsx4(ExclamationCircle, { className: "text-ui-fg-subtle" }),
487
+ /* @__PURE__ */ jsx4(Text2, { size: "small", className: "text-ui-fg-subtle", children: error?.message || t("general.error") })
488
+ ] }) : /* @__PURE__ */ jsx4(
489
+ _DataTable,
490
+ {
491
+ table,
492
+ columns,
493
+ filters,
494
+ count: groupedOffers.length,
495
+ pageSize: PAGE_SIZE,
496
+ isLoading,
497
+ navigateTo: (row) => `/offers/${row.original.product_id}`,
498
+ orderBy: [
499
+ { key: "created_at", label: t("fields.createdAt") },
500
+ { key: "updated_at", label: t("fields.updatedAt") }
501
+ ],
502
+ commands: [
503
+ {
504
+ action: handleEdit,
505
+ label: t("priceLists.products.actions.editPrices"),
506
+ shortcut: "e"
507
+ },
508
+ {
509
+ action: handleDelete,
510
+ label: t("actions.remove"),
511
+ shortcut: "r"
512
+ }
513
+ ],
514
+ pagination: true,
515
+ search: true,
516
+ prefix: PREFIX,
517
+ queryObject: raw
518
+ }
519
+ ),
520
+ /* @__PURE__ */ jsx4(DisplayExtensionZone3, { model: "price_list", zone: "products", data: priceList })
521
+ ] });
522
+ };
523
+ var useOfferSectionFilters = () => {
524
+ const { t } = useTranslation4();
525
+ return [
526
+ { label: t("fields.createdAt"), key: "created_at", type: "date" },
527
+ { label: t("fields.updatedAt"), key: "updated_at", type: "date" }
528
+ ];
529
+ };
530
+ var OfferRowAction = ({
531
+ offer,
532
+ priceList
533
+ }) => {
534
+ const { t } = useTranslation4();
535
+ const prompt = usePrompt();
536
+ const { mutateAsync } = usePriceListLinkProducts(priceList.id);
537
+ const handleDelete = async () => {
538
+ const res = await prompt({
539
+ title: t("general.areYouSure"),
540
+ description: t("priceLists.products.delete.confirmation", { count: 1 }),
541
+ confirmText: t("actions.remove"),
542
+ cancelText: t("actions.cancel")
543
+ });
544
+ if (!res) {
545
+ return;
546
+ }
547
+ mutateAsync(
548
+ { remove: [offer.product_id] },
549
+ {
550
+ onSuccess: () => {
551
+ toast.success(
552
+ t("priceLists.products.delete.successToast", { count: 1 })
553
+ );
554
+ },
555
+ onError: (e) => toast.error(e.message)
556
+ }
557
+ );
558
+ };
559
+ return /* @__PURE__ */ jsx4(
560
+ ActionMenu,
561
+ {
562
+ groups: [
563
+ {
564
+ actions: [
565
+ {
566
+ icon: /* @__PURE__ */ jsx4(PencilSquare4, {}),
567
+ label: t("priceLists.products.actions.editPrices"),
568
+ to: `products/edit?ids[]=${offer.product_id}`
569
+ }
570
+ ]
571
+ },
572
+ {
573
+ actions: [
574
+ {
575
+ icon: /* @__PURE__ */ jsx4(Trash2, {}),
576
+ label: t("actions.remove"),
577
+ onClick: handleDelete
578
+ }
579
+ ]
580
+ }
581
+ ]
582
+ }
583
+ );
584
+ };
585
+ var columnHelper = createColumnHelper();
586
+ var useColumns = (priceList) => {
587
+ const { t } = useTranslation4();
588
+ return useMemo(
589
+ () => [
590
+ columnHelper.display({
591
+ id: "select",
592
+ header: ({ table }) => /* @__PURE__ */ jsx4(
593
+ Checkbox,
594
+ {
595
+ checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
596
+ onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
597
+ }
598
+ ),
599
+ cell: ({ row }) => /* @__PURE__ */ jsx4(
600
+ Checkbox,
601
+ {
602
+ checked: row.getIsSelected(),
603
+ onCheckedChange: (value) => row.toggleSelected(!!value),
604
+ onClick: (e) => e.stopPropagation()
605
+ }
606
+ )
607
+ }),
608
+ columnHelper.display({
609
+ id: "offer",
610
+ header: () => /* @__PURE__ */ jsx4(ProductHeader, {}),
611
+ cell: ({ row }) => /* @__PURE__ */ jsx4(
612
+ ProductCell,
613
+ {
614
+ product: {
615
+ title: row.original.product?.title ?? "",
616
+ thumbnail: row.original.product?.thumbnail ?? null
617
+ }
618
+ }
619
+ )
620
+ }),
621
+ columnHelper.display({
622
+ id: "category",
623
+ header: () => /* @__PURE__ */ jsx4(CategoryHeader, {}),
624
+ cell: ({ row }) => /* @__PURE__ */ jsx4(
625
+ CategoryCell,
626
+ {
627
+ categories: row.original.product?.categories ?? void 0
628
+ }
629
+ )
630
+ }),
631
+ columnHelper.display({
632
+ id: "variants",
633
+ header: () => /* @__PURE__ */ jsx4("div", { className: "flex h-full w-full items-center", children: /* @__PURE__ */ jsx4("span", { children: t("fields.variants") }) }),
634
+ cell: ({ row }) => {
635
+ const count = row.original.variant_count;
636
+ if (!count) {
637
+ return /* @__PURE__ */ jsx4(PlaceholderCell, {});
638
+ }
639
+ return /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", className: "truncate", children: t("offers.fields.variantsCount", { count }) });
640
+ }
641
+ }),
642
+ columnHelper.display({
643
+ id: "status",
644
+ header: () => /* @__PURE__ */ jsx4(ProductStatusHeader, {}),
645
+ cell: ({ row }) => {
646
+ const status = row.original.product?.status;
647
+ if (!status) {
648
+ return /* @__PURE__ */ jsx4(PlaceholderCell, {});
649
+ }
650
+ return /* @__PURE__ */ jsx4(ProductStatusCell, { status });
651
+ }
652
+ }),
653
+ columnHelper.display({
654
+ id: "actions",
655
+ cell: ({ row }) => /* @__PURE__ */ jsx4(OfferRowAction, { offer: row.original, priceList })
656
+ })
657
+ ],
658
+ [t, priceList]
659
+ );
660
+ };
661
+
662
+ // src/pages/price-lists/[id]/price-list-detail-page.tsx
663
+ import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
664
+ var Root = ({ children }) => {
665
+ const initialData = useLoaderData();
666
+ const { id } = useParams();
667
+ const linkQuery = useLinkQuery("price_list", "+prices.id");
668
+ const { price_list, isLoading, isError, error } = usePriceList(id, linkQuery, {
669
+ placeholderData: initialData
670
+ });
671
+ if (isLoading || !price_list) {
672
+ return /* @__PURE__ */ jsx5(TwoColumnPageSkeleton, { mainSections: 2, sidebarSections: 1, showJSON: true });
673
+ }
674
+ if (isError) {
675
+ throw error;
676
+ }
677
+ return /* @__PURE__ */ jsx5(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs5(TwoColumnPage, { hasOutlet: true, data: price_list, children: [
678
+ /* @__PURE__ */ jsx5(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "price-lists.detail.main", data: price_list, children: [
679
+ /* @__PURE__ */ jsx5(PriceListGeneralSection, { priceList: price_list }),
680
+ /* @__PURE__ */ jsx5(PriceListCustomerAvailabilitySection, { priceList: price_list }),
681
+ /* @__PURE__ */ jsx5(PriceListProductSection, { priceList: price_list })
682
+ ] }) }),
683
+ /* @__PURE__ */ jsx5(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx5(WidgetZone, { id: "price-lists.detail.side", data: price_list, children: /* @__PURE__ */ jsx5(PriceListConfigurationSection, { priceList: price_list }) }) })
684
+ ] }) });
685
+ };
686
+ var PriceListDetailPage = Object.assign(Root, {
687
+ Main: TwoColumnPage.Main,
688
+ Sidebar: TwoColumnPage.Sidebar,
689
+ MainGeneralSection: PriceListGeneralSection,
690
+ MainCustomerAvailabilitySection: PriceListCustomerAvailabilitySection,
691
+ MainProductSection: PriceListProductSection,
692
+ SidebarConfigurationSection: PriceListConfigurationSection
693
+ });
694
+ export {
695
+ PriceListDetailPage,
696
+ loader
697
+ };