@acmekit/dashboard 2.13.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 (2066) hide show
  1. package/README.md +30 -0
  2. package/dist/Inter-Medium-RUQTUVA3.ttf +0 -0
  3. package/dist/Inter-Regular-CKBOXRQ3.ttf +0 -0
  4. package/dist/RobotoMono-Medium-LUNBMOOH.ttf +0 -0
  5. package/dist/RobotoMono-Regular-27MA6W2G.ttf +0 -0
  6. package/dist/add-campaign-promotions-GV3D3N2X.mjs +263 -0
  7. package/dist/add-locales-WQDGU5A2.mjs +82 -0
  8. package/dist/adjust-inventory-CSOFODJL.mjs +217 -0
  9. package/dist/api-key-management-create-JUXDTSXT.mjs +176 -0
  10. package/dist/api-key-management-detail-7TKDKAYS.mjs +493 -0
  11. package/dist/api-key-management-edit-ZWOCXPXV.mjs +110 -0
  12. package/dist/api-key-management-list-C6BVUVSI.mjs +356 -0
  13. package/dist/api-key-management-sales-channels-B2HCUBX7.mjs +206 -0
  14. package/dist/app.css +5330 -0
  15. package/dist/app.js +195968 -0
  16. package/dist/app.mjs +81 -0
  17. package/dist/campaign-budget-edit-OHOU27NN.mjs +147 -0
  18. package/dist/campaign-configuration-MZHTGODE.mjs +154 -0
  19. package/dist/campaign-create-VAJXI544.mjs +31 -0
  20. package/dist/campaign-detail-MWRQ5LSR.mjs +677 -0
  21. package/dist/campaign-edit-Z2KT7NZD.mjs +206 -0
  22. package/dist/campaign-list-HOAE6MXC.mjs +192 -0
  23. package/dist/categories-metadata-OESX2QXC.mjs +74 -0
  24. package/dist/category-create-AIVN7H3A.mjs +423 -0
  25. package/dist/category-detail-PDRC4NHH.mjs +579 -0
  26. package/dist/category-edit-7OLII5PI.mjs +224 -0
  27. package/dist/category-list-SYODXAV7.mjs +309 -0
  28. package/dist/category-organize-C3IUWW33.mjs +113 -0
  29. package/dist/category-products-GA4KP7EC.mjs +284 -0
  30. package/dist/chunk-22YYMH6M.mjs +382 -0
  31. package/dist/chunk-2PCPX3L2.mjs +92 -0
  32. package/dist/chunk-2V4DS7AE.mjs +49 -0
  33. package/dist/chunk-3C6WQ7NH.mjs +46 -0
  34. package/dist/chunk-3ISBJK7K.mjs +45 -0
  35. package/dist/chunk-3TAD7FW4.mjs +431 -0
  36. package/dist/chunk-3TZOFKX2.mjs +110 -0
  37. package/dist/chunk-3VXYG7KG.mjs +64 -0
  38. package/dist/chunk-3WPRVYF6.mjs +122 -0
  39. package/dist/chunk-452UKZW6.mjs +471 -0
  40. package/dist/chunk-4DFGIDVN.mjs +117 -0
  41. package/dist/chunk-4FM6S5CX.mjs +17 -0
  42. package/dist/chunk-4GQOUCX6.mjs +0 -0
  43. package/dist/chunk-4UTXEJBF.mjs +128 -0
  44. package/dist/chunk-4XSXVVYD.mjs +18 -0
  45. package/dist/chunk-535OVBXR.mjs +226 -0
  46. package/dist/chunk-54IEHX46.mjs +116 -0
  47. package/dist/chunk-5DXB7NNX.mjs +221 -0
  48. package/dist/chunk-5Q74GF5H.mjs +94 -0
  49. package/dist/chunk-5SAFO54D.mjs +56 -0
  50. package/dist/chunk-6GU6IDUA.mjs +8 -0
  51. package/dist/chunk-6HTZNHPT.mjs +34 -0
  52. package/dist/chunk-6T6CP246.mjs +340 -0
  53. package/dist/chunk-774WSTCC.mjs +19 -0
  54. package/dist/chunk-7AXHHXCX.mjs +4 -0
  55. package/dist/chunk-7M2A645H.mjs +63 -0
  56. package/dist/chunk-7PCPPVXC.mjs +175 -0
  57. package/dist/chunk-AM2BU2RH.mjs +6 -0
  58. package/dist/chunk-B2FDWFGX.mjs +171 -0
  59. package/dist/chunk-B4QEDA23.mjs +97 -0
  60. package/dist/chunk-B6ZOPCPA.mjs +73 -0
  61. package/dist/chunk-BALV2UTZ.mjs +24 -0
  62. package/dist/chunk-BBP7EYBG.mjs +260 -0
  63. package/dist/chunk-BCEWAWGA.mjs +39 -0
  64. package/dist/chunk-BD3XDAG5.mjs +401 -0
  65. package/dist/chunk-BGATYAVC.mjs +47 -0
  66. package/dist/chunk-BZ3BUDOK.mjs +4113 -0
  67. package/dist/chunk-C5P5PL3E.mjs +31 -0
  68. package/dist/chunk-C76H5USB.mjs +16 -0
  69. package/dist/chunk-C7F7MMXS.mjs +68 -0
  70. package/dist/chunk-CABJXU6D.mjs +302 -0
  71. package/dist/chunk-CBSCX7RE.mjs +13 -0
  72. package/dist/chunk-CG3YNOEK.mjs +144 -0
  73. package/dist/chunk-CNZM6RE7.mjs +610 -0
  74. package/dist/chunk-CQWBG33R.mjs +30 -0
  75. package/dist/chunk-CRBKNYSH.mjs +275 -0
  76. package/dist/chunk-D3YQN7HV.mjs +30 -0
  77. package/dist/chunk-DFFLVEZ5.mjs +40 -0
  78. package/dist/chunk-DG7J63J2.mjs +1764 -0
  79. package/dist/chunk-DHF3B6D2.mjs +9 -0
  80. package/dist/chunk-DK4WIVY6.mjs +749 -0
  81. package/dist/chunk-DKOD27V5.mjs +175 -0
  82. package/dist/chunk-DLZWPHHO.mjs +20 -0
  83. package/dist/chunk-DTY37DDZ.mjs +20 -0
  84. package/dist/chunk-DXWAKJTM.mjs +108 -0
  85. package/dist/chunk-EAZDQKZL.mjs +259 -0
  86. package/dist/chunk-EFEGJQI5.mjs +34 -0
  87. package/dist/chunk-EG5MMCD4.mjs +50 -0
  88. package/dist/chunk-EHAU7SOS.mjs +1280 -0
  89. package/dist/chunk-EKFF2W4G.mjs +124 -0
  90. package/dist/chunk-EN5J6OFE.mjs +41 -0
  91. package/dist/chunk-EO7CNFE6.mjs +265 -0
  92. package/dist/chunk-EVPLJRXF.mjs +123 -0
  93. package/dist/chunk-EVY7AHQA.mjs +50 -0
  94. package/dist/chunk-EZGBAGIR.mjs +310 -0
  95. package/dist/chunk-F57Z263P.mjs +36 -0
  96. package/dist/chunk-F6ZOHZVB.mjs +9 -0
  97. package/dist/chunk-FA2DYBNX.mjs +6 -0
  98. package/dist/chunk-FHSC5X62.mjs +31 -0
  99. package/dist/chunk-FUDIA3GL.mjs +39 -0
  100. package/dist/chunk-FVMHCXYX.mjs +106 -0
  101. package/dist/chunk-FX5GXN2P.mjs +164 -0
  102. package/dist/chunk-FXYH54JP.mjs +16 -0
  103. package/dist/chunk-G22WWLPG.mjs +44 -0
  104. package/dist/chunk-G2GBTFKW.mjs +522 -0
  105. package/dist/chunk-G2J2T2QU.mjs +85 -0
  106. package/dist/chunk-G2VJOHHV.mjs +32 -0
  107. package/dist/chunk-G4M37GFI.mjs +98061 -0
  108. package/dist/chunk-G57B6U6Y.mjs +41 -0
  109. package/dist/chunk-GBFVWROS.mjs +58 -0
  110. package/dist/chunk-GF7N2AY2.mjs +79 -0
  111. package/dist/chunk-GGTFPFCV.mjs +1150 -0
  112. package/dist/chunk-HE77DA46.mjs +108 -0
  113. package/dist/chunk-HKYVPRUA.mjs +182 -0
  114. package/dist/chunk-HVQIZLNB.mjs +108 -0
  115. package/dist/chunk-I2GUUJVE.mjs +127 -0
  116. package/dist/chunk-IR5DHEKS.mjs +9 -0
  117. package/dist/chunk-IU262EDH.mjs +495 -0
  118. package/dist/chunk-IUCDCPJU.mjs +0 -0
  119. package/dist/chunk-IW4TACOD.mjs +55 -0
  120. package/dist/chunk-IXXG72CP.mjs +422 -0
  121. package/dist/chunk-JHATTPS3.mjs +6 -0
  122. package/dist/chunk-JO7JAVWB.mjs +170 -0
  123. package/dist/chunk-JQ67EF5F.mjs +101 -0
  124. package/dist/chunk-K5DSJBZS.mjs +556 -0
  125. package/dist/chunk-KA4KBTUN.mjs +29 -0
  126. package/dist/chunk-KIASDQKH.mjs +51 -0
  127. package/dist/chunk-KPLL3ATX.mjs +97 -0
  128. package/dist/chunk-L7YA4D55.mjs +61 -0
  129. package/dist/chunk-LEYWBRRG.mjs +225 -0
  130. package/dist/chunk-LKWTBYYC.mjs +35 -0
  131. package/dist/chunk-LLJB2TFN.mjs +50 -0
  132. package/dist/chunk-LQTHYS2Z.mjs +0 -0
  133. package/dist/chunk-LSEYENCI.mjs +14 -0
  134. package/dist/chunk-LT4MVCA7.mjs +19 -0
  135. package/dist/chunk-LWUDSTVZ.mjs +128 -0
  136. package/dist/chunk-LXIJHOSW.mjs +43 -0
  137. package/dist/chunk-LZX5TJ65.mjs +42 -0
  138. package/dist/chunk-MFALVTRQ.mjs +181 -0
  139. package/dist/chunk-MKJPYPAH.mjs +516 -0
  140. package/dist/chunk-MOSRJHJ3.mjs +31 -0
  141. package/dist/chunk-N7BIDSR6.mjs +45 -0
  142. package/dist/chunk-ND3ODI36.mjs +161 -0
  143. package/dist/chunk-NOAFLTPV.mjs +99 -0
  144. package/dist/chunk-NPOS27VN.mjs +29 -0
  145. package/dist/chunk-NQMO3WSW.mjs +98 -0
  146. package/dist/chunk-NSKLCNSB.mjs +1106 -0
  147. package/dist/chunk-NTEWUH4C.mjs +65 -0
  148. package/dist/chunk-NUHHTFNL.mjs +1144 -0
  149. package/dist/chunk-OAHCJFG3.mjs +17 -0
  150. package/dist/chunk-OK4NIKP5.mjs +84 -0
  151. package/dist/chunk-OMC5JCQH.mjs +31 -0
  152. package/dist/chunk-OWHSIJ2H.mjs +37 -0
  153. package/dist/chunk-P3DRE4IY.mjs +39 -0
  154. package/dist/chunk-P3UUX2T6.mjs +9 -0
  155. package/dist/chunk-P3VJXF6S.mjs +345 -0
  156. package/dist/chunk-PB5SVVN2.mjs +117 -0
  157. package/dist/chunk-PEZUM4LH.mjs +174 -0
  158. package/dist/chunk-PMA2D6IL.mjs +49 -0
  159. package/dist/chunk-PQGZLPCG.mjs +61 -0
  160. package/dist/chunk-PXZ7QYKX.mjs +14 -0
  161. package/dist/chunk-PYIO3TDQ.mjs +18 -0
  162. package/dist/chunk-QAFVGV7P.mjs +47 -0
  163. package/dist/chunk-QDRW4DAC.mjs +363 -0
  164. package/dist/chunk-QJ6SBVJ2.mjs +17 -0
  165. package/dist/chunk-QKARRHBY.mjs +146 -0
  166. package/dist/chunk-QNGB3OCG.mjs +391 -0
  167. package/dist/chunk-QVJ6Q4XS.mjs +157 -0
  168. package/dist/chunk-QZ5QAA5L.mjs +89 -0
  169. package/dist/chunk-QZ7TP4HQ.mjs +7 -0
  170. package/dist/chunk-R65S6ZZV.mjs +70 -0
  171. package/dist/chunk-RIV7FKGN.mjs +31 -0
  172. package/dist/chunk-RPAL6FHW.mjs +73 -0
  173. package/dist/chunk-RREPQMYC.mjs +116 -0
  174. package/dist/chunk-S3REQHPQ.mjs +86 -0
  175. package/dist/chunk-S4DMV3ZT.mjs +35 -0
  176. package/dist/chunk-SC6BSTC7.mjs +38 -0
  177. package/dist/chunk-SLYFSTN7.mjs +824 -0
  178. package/dist/chunk-SZXVOG6N.mjs +42 -0
  179. package/dist/chunk-T7THKDM2.mjs +132 -0
  180. package/dist/chunk-TCNCAWYD.mjs +9 -0
  181. package/dist/chunk-TDK3JDOB.mjs +31 -0
  182. package/dist/chunk-TNJMHOGZ.mjs +34 -0
  183. package/dist/chunk-TU3OVBKQ.mjs +87 -0
  184. package/dist/chunk-TXO6ZWHH.mjs +79 -0
  185. package/dist/chunk-U7I66IFZ.mjs +88 -0
  186. package/dist/chunk-UC26CCHZ.mjs +45 -0
  187. package/dist/chunk-UCZNM66J.mjs +22 -0
  188. package/dist/chunk-ULSPL3DR.mjs +126 -0
  189. package/dist/chunk-UVPCTLA2.mjs +79 -0
  190. package/dist/chunk-V7OUZM56.mjs +83 -0
  191. package/dist/chunk-VAO4P4YN.mjs +44 -0
  192. package/dist/chunk-W4OT76ZB.mjs +23 -0
  193. package/dist/chunk-W7625H47.mjs +18 -0
  194. package/dist/chunk-WATKBUHQ.mjs +12 -0
  195. package/dist/chunk-WILMJYUB.mjs +35 -0
  196. package/dist/chunk-WJ4YB5O4.mjs +87 -0
  197. package/dist/chunk-WKOPGFW5.mjs +8 -0
  198. package/dist/chunk-WMOGMKQN.mjs +0 -0
  199. package/dist/chunk-WRSGHGAT.mjs +41 -0
  200. package/dist/chunk-X4LMDPH5.mjs +52 -0
  201. package/dist/chunk-X6BAAGCL.mjs +48 -0
  202. package/dist/chunk-XIM7X4FB.mjs +83 -0
  203. package/dist/chunk-XIWUBH6W.mjs +37 -0
  204. package/dist/chunk-XJYL2XTV.mjs +280 -0
  205. package/dist/chunk-XP4VHZBM.mjs +162 -0
  206. package/dist/chunk-XR4GEMGR.mjs +31 -0
  207. package/dist/chunk-XRTVFYCW.mjs +0 -0
  208. package/dist/chunk-XU4GD2XM.mjs +360 -0
  209. package/dist/chunk-XUQVQCAO.mjs +16 -0
  210. package/dist/chunk-YF6NQZGM.mjs +78 -0
  211. package/dist/chunk-YOYOJU5D.mjs +0 -0
  212. package/dist/chunk-YVPTNVHA.mjs +792 -0
  213. package/dist/chunk-YWU55M6Z.mjs +183 -0
  214. package/dist/chunk-Z5LP57ST.mjs +160 -0
  215. package/dist/chunk-ZFCG2354.mjs +98 -0
  216. package/dist/chunk-ZGI57SVH.mjs +49 -0
  217. package/dist/chunk-ZNSZ45XP.mjs +193 -0
  218. package/dist/chunk-ZQRKUG6J.mjs +72 -0
  219. package/dist/collection-add-products-IY6FQ72Q.mjs +287 -0
  220. package/dist/collection-create-HT3M5GN2.mjs +134 -0
  221. package/dist/collection-detail-B2ITEYFM.mjs +469 -0
  222. package/dist/collection-edit-XFZ2MCJM.mjs +125 -0
  223. package/dist/collection-list-XOQQ2LT2.mjs +257 -0
  224. package/dist/collection-metadata-3EZ5FMJI.mjs +73 -0
  225. package/dist/customer-create-PGX4DCTL.mjs +183 -0
  226. package/dist/customer-create-address-QOU74N6J.mjs +293 -0
  227. package/dist/customer-detail-HUXNR3Y5.mjs +706 -0
  228. package/dist/customer-edit-T4TG2APF.mjs +194 -0
  229. package/dist/customer-group-add-customers-62EAFEKD.mjs +244 -0
  230. package/dist/customer-group-create-QE5D76WG.mjs +113 -0
  231. package/dist/customer-group-detail-PE3DCMPC.mjs +437 -0
  232. package/dist/customer-group-edit-O3TX6KF5.mjs +110 -0
  233. package/dist/customer-group-list-IXQNLETU.mjs +268 -0
  234. package/dist/customer-group-metadata-FKKGWCL3.mjs +44 -0
  235. package/dist/customer-list-M7XWLNDQ.mjs +163 -0
  236. package/dist/customer-metadata-72M7HMZU.mjs +44 -0
  237. package/dist/customers-add-customer-group-B6KORLWA.mjs +279 -0
  238. package/dist/edit-inventory-item-44J2OXJL.mjs +130 -0
  239. package/dist/edit-inventory-item-attributes-S3HC6QLQ.mjs +297 -0
  240. package/dist/edit-reservation-LOB3RJ7B.mjs +249 -0
  241. package/dist/edit-rules-HUMVN4MD.mjs +272 -0
  242. package/dist/en.json +3311 -0
  243. package/dist/home-KFQGXKRT.mjs +16 -0
  244. package/dist/index.d.ts +10 -0
  245. package/dist/inventory-create-ZPUOJP7S.mjs +599 -0
  246. package/dist/inventory-detail-IBGA6OJ5.mjs +751 -0
  247. package/dist/inventory-list-4C5Z7CC5.mjs +413 -0
  248. package/dist/inventory-metadata-774S7FV4.mjs +74 -0
  249. package/dist/inventory-stock-RBIJMUBV.mjs +293 -0
  250. package/dist/invite-3KUCHUTF.mjs +362 -0
  251. package/dist/location-create-YRQYKOVU.mjs +240 -0
  252. package/dist/location-detail-F6MVSFSE.mjs +823 -0
  253. package/dist/location-edit-RZAKOXKH.mjs +256 -0
  254. package/dist/location-fulfillment-providers-3ODKOKQV.mjs +291 -0
  255. package/dist/location-list-C4EDJMIE.mjs +323 -0
  256. package/dist/location-sales-channels-NFDU7PBR.mjs +189 -0
  257. package/dist/location-service-zone-create-KFEG2FP7.mjs +174 -0
  258. package/dist/location-service-zone-edit-RWWWYJ7O.mjs +137 -0
  259. package/dist/location-service-zone-manage-areas-GPWFFIBT.mjs +155 -0
  260. package/dist/location-service-zone-shipping-option-create-PB4OXW3T.mjs +796 -0
  261. package/dist/location-service-zone-shipping-option-edit-7ME3GVRL.mjs +368 -0
  262. package/dist/location-service-zone-shipping-option-pricing-E24IAV36.mjs +357 -0
  263. package/dist/login-WSXW2XIW.mjs +325 -0
  264. package/dist/manage-locations-4DGVNLYL.mjs +250 -0
  265. package/dist/no-match-4YRQTKJD.mjs +33 -0
  266. package/dist/order-allocate-items-LSVBTKPE.mjs +558 -0
  267. package/dist/order-create-claim-BS7QRFZT.mjs +2143 -0
  268. package/dist/order-create-edit-BNIKKD6R.mjs +772 -0
  269. package/dist/order-create-exchange-LZZOJKHY.mjs +2144 -0
  270. package/dist/order-create-fulfillment-YWEDORGR.mjs +610 -0
  271. package/dist/order-create-refund-J5FTOWGJ.mjs +690 -0
  272. package/dist/order-create-return-SI4UJIK5.mjs +1288 -0
  273. package/dist/order-create-shipment-M2TDSJP6.mjs +284 -0
  274. package/dist/order-detail-WTAGF6K5.mjs +3553 -0
  275. package/dist/order-edit-billing-address-RYPXALHJ.mjs +300 -0
  276. package/dist/order-edit-email-Y5YD24FI.mjs +148 -0
  277. package/dist/order-edit-shipping-address-5G5S5JG2.mjs +297 -0
  278. package/dist/order-export-HCIPFZXG.mjs +131 -0
  279. package/dist/order-list-4JYZ5PVV.mjs +330 -0
  280. package/dist/order-metadata-IG4BXARU.mjs +73 -0
  281. package/dist/order-receive-return-I6LBDB3Q.mjs +554 -0
  282. package/dist/order-request-transfer-EMUBP52T.mjs +575 -0
  283. package/dist/price-list-configuration-HAVZ2V7E.mjs +355 -0
  284. package/dist/price-list-create-RAZUHESH.mjs +960 -0
  285. package/dist/price-list-detail-TNP75PRJ.mjs +559 -0
  286. package/dist/price-list-edit-7SW7BUF4.mjs +227 -0
  287. package/dist/price-list-list-5N5HJPM3.mjs +251 -0
  288. package/dist/price-list-prices-add-7IEBI6VR.mjs +615 -0
  289. package/dist/price-list-prices-edit-JHHVHIK3.mjs +313 -0
  290. package/dist/product-attributes-FZN5FBTN.mjs +340 -0
  291. package/dist/product-create-KOARKVLW.mjs +2231 -0
  292. package/dist/product-create-option-NPEDGHZE.mjs +151 -0
  293. package/dist/product-create-variant-43Y5RF3E.mjs +823 -0
  294. package/dist/product-detail-IN2O5DEF.mjs +1256 -0
  295. package/dist/product-edit-RLW4J3UB.mjs +313 -0
  296. package/dist/product-edit-option-66YVWG6O.mjs +157 -0
  297. package/dist/product-export-YAB56R6E.mjs +131 -0
  298. package/dist/product-image-variants-edit-LUKL275V.mjs +334 -0
  299. package/dist/product-import-AX6Q42LM.mjs +268 -0
  300. package/dist/product-list-TF24QRNG.mjs +459 -0
  301. package/dist/product-media-3DQ2LIUB.mjs +701 -0
  302. package/dist/product-metadata-7SAZ35AT.mjs +74 -0
  303. package/dist/product-organization-YN7YXIWS.mjs +281 -0
  304. package/dist/product-prices-LOUY77V4.mjs +227 -0
  305. package/dist/product-sales-channels-S2OD4436.mjs +165 -0
  306. package/dist/product-shipping-profile-WD6LOI4M.mjs +145 -0
  307. package/dist/product-stock-HZRHSEDF.mjs +545 -0
  308. package/dist/product-tag-create-UUM4ZE2M.mjs +127 -0
  309. package/dist/product-tag-detail-W6M2LEQR.mjs +304 -0
  310. package/dist/product-tag-edit-674OSZZH.mjs +140 -0
  311. package/dist/product-tag-list-RXZFET7E.mjs +282 -0
  312. package/dist/product-tag-metadata-GRLX3C2Q.mjs +73 -0
  313. package/dist/product-type-create-XY5BE533.mjs +103 -0
  314. package/dist/product-type-detail-22ZHL6DS.mjs +265 -0
  315. package/dist/product-type-edit-M2U7YUJD.mjs +117 -0
  316. package/dist/product-type-list-3JY7CTAA.mjs +201 -0
  317. package/dist/product-type-metadata-PSRCZKDV.mjs +73 -0
  318. package/dist/product-variant-detail-4F6IX6MM.mjs +571 -0
  319. package/dist/product-variant-edit-IRUNIAYG.mjs +539 -0
  320. package/dist/product-variant-manage-inventory-items-ET6YPQP3.mjs +343 -0
  321. package/dist/product-variant-media-DRT5DE5P.mjs +376 -0
  322. package/dist/product-variant-metadata-HRVK7DEZ.mjs +77 -0
  323. package/dist/profile-detail-VNUJILTO.mjs +96 -0
  324. package/dist/profile-edit-TFV42P22.mjs +177 -0
  325. package/dist/promotion-add-campaign-HB2IHPPX.mjs +45 -0
  326. package/dist/promotion-create-S6FP2NTH.mjs +1227 -0
  327. package/dist/promotion-detail-AECYBJWT.mjs +509 -0
  328. package/dist/promotion-edit-details-2UNVLLBP.mjs +498 -0
  329. package/dist/promotion-list-PYMKNPW3.mjs +216 -0
  330. package/dist/refund-reason-create-75WFVL5X.mjs +195 -0
  331. package/dist/refund-reason-edit-JLIAOA54.mjs +196 -0
  332. package/dist/refund-reason-list-EWXWKRUP.mjs +246 -0
  333. package/dist/region-add-countries-FH7WTMU5.mjs +223 -0
  334. package/dist/region-create-2T4MWC4Z.mjs +497 -0
  335. package/dist/region-detail-B3GUB37B.mjs +494 -0
  336. package/dist/region-edit-2FSEVLOP.mjs +310 -0
  337. package/dist/region-list-QEADKLOY.mjs +215 -0
  338. package/dist/region-metadata-NFYAHB2F.mjs +74 -0
  339. package/dist/reservation-create-ND6DSNKT.mjs +312 -0
  340. package/dist/reservation-detail-YBOFICEP.mjs +235 -0
  341. package/dist/reservation-list-K44BOK7R.mjs +302 -0
  342. package/dist/reservation-metadata-PDKWSVYX.mjs +74 -0
  343. package/dist/reset-password-E7TYBPPE.mjs +381 -0
  344. package/dist/return-reason-create-MGNM7VYN.mjs +163 -0
  345. package/dist/return-reason-edit-OM3Y5MMI.mjs +168 -0
  346. package/dist/return-reason-list-7SNQPIIW.mjs +245 -0
  347. package/dist/sales-channel-add-products-ZHJ3AGRH.mjs +274 -0
  348. package/dist/sales-channel-create-XG3PEX3G.mjs +156 -0
  349. package/dist/sales-channel-detail-XFSOLMFO.mjs +442 -0
  350. package/dist/sales-channel-edit-DG27YNYG.mjs +166 -0
  351. package/dist/sales-channel-list-AJ6P4KAT.mjs +207 -0
  352. package/dist/sales-channel-metadata-BA3SFE2P.mjs +79 -0
  353. package/dist/settings-FKUZ6EYT.mjs +19 -0
  354. package/dist/settings-KJGPXBDJ.mjs +549 -0
  355. package/dist/shipping-option-type-create-HDNTVL56.mjs +198 -0
  356. package/dist/shipping-option-type-detail-RLTKAAQK.mjs +180 -0
  357. package/dist/shipping-option-type-edit-KEDMAP7J.mjs +197 -0
  358. package/dist/shipping-option-type-list-L5PZ7ZFM.mjs +279 -0
  359. package/dist/shipping-profile-create-Z7XRDHU3.mjs +125 -0
  360. package/dist/shipping-profile-detail-AYYBFPSQ.mjs +165 -0
  361. package/dist/shipping-profile-metadata-35WEIPZB.mjs +75 -0
  362. package/dist/shipping-profiles-list-YSYM46QD.mjs +251 -0
  363. package/dist/store-add-currencies-QGLOAIJO.mjs +300 -0
  364. package/dist/store-add-locales-72674T3W.mjs +82 -0
  365. package/dist/store-detail-VKOWH3SL.mjs +781 -0
  366. package/dist/store-edit-XCBTEI35.mjs +247 -0
  367. package/dist/store-metadata-V4SGUYKY.mjs +72 -0
  368. package/dist/tax-region-create-G3BOD6C5.mjs +301 -0
  369. package/dist/tax-region-detail-FS6ZNEAI.mjs +388 -0
  370. package/dist/tax-region-edit-INVOVYED.mjs +167 -0
  371. package/dist/tax-region-list-KQP4Q3E5.mjs +100 -0
  372. package/dist/tax-region-province-create-OFPOZSXU.mjs +312 -0
  373. package/dist/tax-region-province-detail-RN64NGAZ.mjs +280 -0
  374. package/dist/tax-region-tax-override-create-3Q56UJRX.mjs +681 -0
  375. package/dist/tax-region-tax-override-edit-LJ7AI3XV.mjs +273 -0
  376. package/dist/tax-region-tax-rate-create-VXJ3UZTT.mjs +195 -0
  377. package/dist/tax-region-tax-rate-edit-PBFVAWDZ.mjs +195 -0
  378. package/dist/translation-list-77WQA3S6.mjs +582 -0
  379. package/dist/translations-edit-2ASRTZ77.mjs +674 -0
  380. package/dist/user-detail-PHL64WWP.mjs +172 -0
  381. package/dist/user-edit-33WO64ER.mjs +118 -0
  382. package/dist/user-invite-F5D5RCWB.mjs +343 -0
  383. package/dist/user-list-IL65REDJ.mjs +165 -0
  384. package/dist/user-metadata-OUQI74YV.mjs +74 -0
  385. package/dist/workflow-execution-detail-7U67F575.mjs +840 -0
  386. package/dist/workflow-execution-list-54WC7PFS.mjs +179 -0
  387. package/package.json +89 -0
  388. package/src/app.tsx +34 -0
  389. package/src/assets/fonts/Inter-Medium.ttf +0 -0
  390. package/src/assets/fonts/Inter-Regular.ttf +0 -0
  391. package/src/assets/fonts/RobotoMono-Medium.ttf +0 -0
  392. package/src/assets/fonts/RobotoMono-Regular.ttf +0 -0
  393. package/src/components/authentication/protected-route/index.ts +1 -0
  394. package/src/components/authentication/protected-route/protected-route.tsx +30 -0
  395. package/src/components/common/action-menu/action-menu.tsx +125 -0
  396. package/src/components/common/action-menu/index.ts +1 -0
  397. package/src/components/common/badge-list-summary/badge-list-summary.tsx +81 -0
  398. package/src/components/common/badge-list-summary/index.ts +1 -0
  399. package/src/components/common/chip-group/chip-group.tsx +111 -0
  400. package/src/components/common/chip-group/index.ts +1 -0
  401. package/src/components/common/conditional-tooltip/conditional-tooltip.tsx +20 -0
  402. package/src/components/common/conditional-tooltip/index.ts +1 -0
  403. package/src/components/common/customer-info/customer-info.tsx +202 -0
  404. package/src/components/common/customer-info/index.ts +1 -0
  405. package/src/components/common/date-range-display/date-range-display.tsx +73 -0
  406. package/src/components/common/date-range-display/index.ts +1 -0
  407. package/src/components/common/display-id/display-id.tsx +30 -0
  408. package/src/components/common/display-id/index.ts +1 -0
  409. package/src/components/common/empty-table-content/empty-table-content.tsx +106 -0
  410. package/src/components/common/empty-table-content/index.ts +1 -0
  411. package/src/components/common/file-preview/file-preview.tsx +130 -0
  412. package/src/components/common/file-preview/index.ts +1 -0
  413. package/src/components/common/file-upload/file-upload.tsx +156 -0
  414. package/src/components/common/file-upload/index.ts +1 -0
  415. package/src/components/common/form/form.tsx +222 -0
  416. package/src/components/common/form/index.ts +1 -0
  417. package/src/components/common/icon-avatar/icon-avatar.tsx +42 -0
  418. package/src/components/common/icon-avatar/index.ts +1 -0
  419. package/src/components/common/infinite-list/index.ts +1 -0
  420. package/src/components/common/infinite-list/infinite-list.tsx +156 -0
  421. package/src/components/common/json-view-section/index.ts +1 -0
  422. package/src/components/common/json-view-section/json-view-section.tsx +201 -0
  423. package/src/components/common/link-button/index.ts +1 -0
  424. package/src/components/common/link-button/link-button.tsx +29 -0
  425. package/src/components/common/list-summary/index.ts +1 -0
  426. package/src/components/common/list-summary/list-summary.tsx +70 -0
  427. package/src/components/common/listicle/index.ts +1 -0
  428. package/src/components/common/listicle/listicle.tsx +34 -0
  429. package/src/components/common/logo-box/avatar-box.tsx +87 -0
  430. package/src/components/common/logo-box/index.ts +2 -0
  431. package/src/components/common/logo-box/logo-box.tsx +74 -0
  432. package/src/components/common/metadata-section/index.ts +1 -0
  433. package/src/components/common/metadata-section/metadata-section.tsx +49 -0
  434. package/src/components/common/progress-bar/index.ts +1 -0
  435. package/src/components/common/progress-bar/progress-bar.tsx +33 -0
  436. package/src/components/common/section/index.ts +1 -0
  437. package/src/components/common/section/section-row.tsx +41 -0
  438. package/src/components/common/segmented-control/index.ts +2 -0
  439. package/src/components/common/segmented-control/segmented-control.tsx +53 -0
  440. package/src/components/common/sidebar-link/indext.ts +1 -0
  441. package/src/components/common/sidebar-link/sidebar-link.tsx +47 -0
  442. package/src/components/common/skeleton/index.ts +1 -0
  443. package/src/components/common/skeleton/skeleton.tsx +327 -0
  444. package/src/components/common/sortable-list/index.ts +1 -0
  445. package/src/components/common/sortable-list/sortable-list.tsx +228 -0
  446. package/src/components/common/sortable-tree/index.ts +1 -0
  447. package/src/components/common/sortable-tree/keyboard-coordinates.ts +156 -0
  448. package/src/components/common/sortable-tree/sortable-tree-item.tsx +62 -0
  449. package/src/components/common/sortable-tree/sortable-tree.tsx +379 -0
  450. package/src/components/common/sortable-tree/tree-item.tsx +207 -0
  451. package/src/components/common/sortable-tree/types.ts +23 -0
  452. package/src/components/common/sortable-tree/utils.ts +299 -0
  453. package/src/components/common/switch-box/index.ts +1 -0
  454. package/src/components/common/switch-box/switch-box.tsx +76 -0
  455. package/src/components/common/tax-badge/tax-badge.tsx +30 -0
  456. package/src/components/common/thumbnail/index.ts +1 -0
  457. package/src/components/common/thumbnail/thumbnail.tsx +32 -0
  458. package/src/components/common/user-link/index.ts +1 -0
  459. package/src/components/common/user-link/user-link.tsx +45 -0
  460. package/src/components/data-grid/components/data-grid-boolean-cell.tsx +71 -0
  461. package/src/components/data-grid/components/data-grid-cell-container.tsx +97 -0
  462. package/src/components/data-grid/components/data-grid-country-select-cell.tsx +149 -0
  463. package/src/components/data-grid/components/data-grid-currency-cell.tsx +140 -0
  464. package/src/components/data-grid/components/data-grid-duplicate-cell.tsx +21 -0
  465. package/src/components/data-grid/components/data-grid-keyboard-shortcut-modal.tsx +245 -0
  466. package/src/components/data-grid/components/data-grid-multiline-cell.tsx +103 -0
  467. package/src/components/data-grid/components/data-grid-number-cell.tsx +94 -0
  468. package/src/components/data-grid/components/data-grid-readonly-cell.tsx +43 -0
  469. package/src/components/data-grid/components/data-grid-root.tsx +1156 -0
  470. package/src/components/data-grid/components/data-grid-row-error-indicator.tsx +55 -0
  471. package/src/components/data-grid/components/data-grid-select-cell.tsx +55 -0
  472. package/src/components/data-grid/components/data-grid-skeleton.tsx +63 -0
  473. package/src/components/data-grid/components/data-grid-text-cell.tsx +75 -0
  474. package/src/components/data-grid/components/data-grid-textarea-modal-cell.tsx +233 -0
  475. package/src/components/data-grid/components/data-grid-toggleable-number-cell.tsx +206 -0
  476. package/src/components/data-grid/components/index.ts +9 -0
  477. package/src/components/data-grid/context/data-grid-context.tsx +45 -0
  478. package/src/components/data-grid/context/index.ts +2 -0
  479. package/src/components/data-grid/context/use-data-grid-context.tsx +14 -0
  480. package/src/components/data-grid/data-grid.tsx +56 -0
  481. package/src/components/data-grid/helpers/create-data-grid-column-helper.ts +93 -0
  482. package/src/components/data-grid/helpers/create-data-grid-price-columns.tsx +136 -0
  483. package/src/components/data-grid/helpers/index.ts +2 -0
  484. package/src/components/data-grid/hooks/index.ts +14 -0
  485. package/src/components/data-grid/hooks/use-data-grid-cell-error.tsx +78 -0
  486. package/src/components/data-grid/hooks/use-data-grid-cell-handlers.tsx +162 -0
  487. package/src/components/data-grid/hooks/use-data-grid-cell-metadata.tsx +75 -0
  488. package/src/components/data-grid/hooks/use-data-grid-cell-snapshot.tsx +75 -0
  489. package/src/components/data-grid/hooks/use-data-grid-cell.tsx +257 -0
  490. package/src/components/data-grid/hooks/use-data-grid-clipboard-events.tsx +105 -0
  491. package/src/components/data-grid/hooks/use-data-grid-column-visibility.tsx +68 -0
  492. package/src/components/data-grid/hooks/use-data-grid-duplicate-cell.tsx +18 -0
  493. package/src/components/data-grid/hooks/use-data-grid-error-highlighting.tsx +133 -0
  494. package/src/components/data-grid/hooks/use-data-grid-form-handlers.tsx +237 -0
  495. package/src/components/data-grid/hooks/use-data-grid-keydown-event.tsx +732 -0
  496. package/src/components/data-grid/hooks/use-data-grid-mouse-up-event.tsx +96 -0
  497. package/src/components/data-grid/hooks/use-data-grid-navigation.tsx +113 -0
  498. package/src/components/data-grid/hooks/use-data-grid-query-tool.tsx +15 -0
  499. package/src/components/data-grid/index.ts +2 -0
  500. package/src/components/data-grid/models/data-grid-bulk-update-command.ts +38 -0
  501. package/src/components/data-grid/models/data-grid-matrix.ts +421 -0
  502. package/src/components/data-grid/models/data-grid-query-tool.ts +74 -0
  503. package/src/components/data-grid/models/data-grid-update-command.ts +33 -0
  504. package/src/components/data-grid/models/index.ts +5 -0
  505. package/src/components/data-grid/types.ts +173 -0
  506. package/src/components/data-grid/utils.ts +28 -0
  507. package/src/components/data-table/components/data-table-status-cell/data-table-status-cell.tsx +35 -0
  508. package/src/components/data-table/data-table.tsx +545 -0
  509. package/src/components/data-table/helpers/general/use-data-table-date-columns.tsx +61 -0
  510. package/src/components/data-table/helpers/general/use-data-table-date-filters.tsx +95 -0
  511. package/src/components/data-table/helpers/sales-channels/index.ts +4 -0
  512. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.tsx +61 -0
  513. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.tsx +22 -0
  514. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.tsx +33 -0
  515. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-query.tsx +30 -0
  516. package/src/components/data-table/index.ts +1 -0
  517. package/src/components/filtering/filter-group/filter-group.tsx +58 -0
  518. package/src/components/filtering/filter-group/index.ts +1 -0
  519. package/src/components/filtering/order-by/index.ts +1 -0
  520. package/src/components/filtering/order-by/order-by.tsx +151 -0
  521. package/src/components/filtering/query/index.ts +1 -0
  522. package/src/components/filtering/query/query.tsx +57 -0
  523. package/src/components/forms/address-form/address-form.tsx +228 -0
  524. package/src/components/forms/address-form/index.ts +1 -0
  525. package/src/components/forms/email-form/email-form.tsx +42 -0
  526. package/src/components/forms/email-form/index.ts +1 -0
  527. package/src/components/forms/metadata-form/index.ts +1 -0
  528. package/src/components/forms/metadata-form/metadata-form.tsx +438 -0
  529. package/src/components/inputs/chip-input/chip-input.tsx +191 -0
  530. package/src/components/inputs/chip-input/index.ts +1 -0
  531. package/src/components/inputs/combobox/combobox.tsx +422 -0
  532. package/src/components/inputs/combobox/index.ts +1 -0
  533. package/src/components/inputs/country-select/country-select.tsx +53 -0
  534. package/src/components/inputs/country-select/index.ts +1 -0
  535. package/src/components/inputs/handle-input/handle-input.tsx +24 -0
  536. package/src/components/inputs/handle-input/index.ts +1 -0
  537. package/src/components/inputs/percentage-input/index.ts +1 -0
  538. package/src/components/inputs/percentage-input/percentage-input.tsx +105 -0
  539. package/src/components/inputs/province-select/index.ts +1 -0
  540. package/src/components/inputs/province-select/province-select.tsx +91 -0
  541. package/src/components/layout/main-layout/index.ts +1 -0
  542. package/src/components/layout/main-layout/main-layout.tsx +389 -0
  543. package/src/components/layout/nav-item/index.ts +1 -0
  544. package/src/components/layout/nav-item/nav-item.tsx +254 -0
  545. package/src/components/layout/notifications/index.ts +1 -0
  546. package/src/components/layout/notifications/notifications.tsx +232 -0
  547. package/src/components/layout/pages/index.ts +2 -0
  548. package/src/components/layout/pages/single-column-page/index.ts +1 -0
  549. package/src/components/layout/pages/single-column-page/single-column-page.tsx +63 -0
  550. package/src/components/layout/pages/two-column-page/index.ts +1 -0
  551. package/src/components/layout/pages/two-column-page/two-column-page.tsx +141 -0
  552. package/src/components/layout/pages/types.ts +15 -0
  553. package/src/components/layout/public-layout/index.ts +1 -0
  554. package/src/components/layout/public-layout/public-layout.tsx +5 -0
  555. package/src/components/layout/settings-layout/index.ts +1 -0
  556. package/src/components/layout/settings-layout/settings-layout.tsx +266 -0
  557. package/src/components/layout/shell/index.ts +1 -0
  558. package/src/components/layout/shell/shell.tsx +263 -0
  559. package/src/components/layout/user-menu/index.ts +1 -0
  560. package/src/components/layout/user-menu/user-menu.tsx +344 -0
  561. package/src/components/localization/localized-table-pagination/index.ts +1 -0
  562. package/src/components/localization/localized-table-pagination/localized-table-pagination.tsx +26 -0
  563. package/src/components/modals/hooks/use-state-aware-to.tsx +32 -0
  564. package/src/components/modals/index.ts +7 -0
  565. package/src/components/modals/route-drawer/index.ts +1 -0
  566. package/src/components/modals/route-drawer/route-drawer.tsx +82 -0
  567. package/src/components/modals/route-focus-modal/index.ts +1 -0
  568. package/src/components/modals/route-focus-modal/route-focus-modal.tsx +109 -0
  569. package/src/components/modals/route-modal-form/index.ts +1 -0
  570. package/src/components/modals/route-modal-form/route-modal-form.tsx +93 -0
  571. package/src/components/modals/route-modal-provider/index.ts +2 -0
  572. package/src/components/modals/route-modal-provider/route-modal-context.tsx +12 -0
  573. package/src/components/modals/route-modal-provider/route-provider.tsx +51 -0
  574. package/src/components/modals/route-modal-provider/use-route-modal.tsx +12 -0
  575. package/src/components/modals/stacked-drawer/index.ts +1 -0
  576. package/src/components/modals/stacked-drawer/stacked-drawer.tsx +85 -0
  577. package/src/components/modals/stacked-focus-modal/index.ts +1 -0
  578. package/src/components/modals/stacked-focus-modal/stacked-focus-modal.tsx +98 -0
  579. package/src/components/modals/stacked-modal-provider/index.ts +2 -0
  580. package/src/components/modals/stacked-modal-provider/stacked-modal-context.tsx +10 -0
  581. package/src/components/modals/stacked-modal-provider/stacked-modal-provider.tsx +54 -0
  582. package/src/components/modals/stacked-modal-provider/use-stacked-modal.ts +14 -0
  583. package/src/components/search/constants.ts +30 -0
  584. package/src/components/search/index.ts +1 -0
  585. package/src/components/search/search.tsx +576 -0
  586. package/src/components/search/types.ts +20 -0
  587. package/src/components/search/use-search-results.tsx +752 -0
  588. package/src/components/table/configurable-data-table/configurable-data-table.tsx +240 -0
  589. package/src/components/table/configurable-data-table/index.ts +3 -0
  590. package/src/components/table/configurable-data-table/save-view-dropdown.tsx +87 -0
  591. package/src/components/table/data-table/data-table-filter/context.tsx +19 -0
  592. package/src/components/table/data-table/data-table-filter/data-table-filter.tsx +296 -0
  593. package/src/components/table/data-table/data-table-filter/date-filter.tsx +328 -0
  594. package/src/components/table/data-table/data-table-filter/filter-chip.tsx +97 -0
  595. package/src/components/table/data-table/data-table-filter/index.ts +1 -0
  596. package/src/components/table/data-table/data-table-filter/number-filter.tsx +316 -0
  597. package/src/components/table/data-table/data-table-filter/select-filter.tsx +201 -0
  598. package/src/components/table/data-table/data-table-filter/string-filter.tsx +125 -0
  599. package/src/components/table/data-table/data-table-filter/types.ts +9 -0
  600. package/src/components/table/data-table/data-table-order-by/data-table-order-by.tsx +153 -0
  601. package/src/components/table/data-table/data-table-order-by/index.ts +1 -0
  602. package/src/components/table/data-table/data-table-query/data-table-query.tsx +39 -0
  603. package/src/components/table/data-table/data-table-query/index.ts +1 -0
  604. package/src/components/table/data-table/data-table-root/data-table-root.tsx +382 -0
  605. package/src/components/table/data-table/data-table-root/index.ts +1 -0
  606. package/src/components/table/data-table/data-table-search/data-table-search.tsx +61 -0
  607. package/src/components/table/data-table/data-table-search/index.ts +1 -0
  608. package/src/components/table/data-table/data-table.tsx +96 -0
  609. package/src/components/table/data-table/hooks.tsx +73 -0
  610. package/src/components/table/data-table/index.ts +2 -0
  611. package/src/components/table/save-view-dialog/index.ts +1 -0
  612. package/src/components/table/save-view-dialog/save-view-dialog.tsx +163 -0
  613. package/src/components/table/save-view-dropdown/index.ts +1 -0
  614. package/src/components/table/save-view-dropdown/save-view-dropdown.tsx +88 -0
  615. package/src/components/table/table-cells/common/code-cell/code-cell.tsx +27 -0
  616. package/src/components/table/table-cells/common/code-cell/index.ts +1 -0
  617. package/src/components/table/table-cells/common/created-at-cell/created-at-cell.tsx +44 -0
  618. package/src/components/table/table-cells/common/created-at-cell/index.ts +1 -0
  619. package/src/components/table/table-cells/common/date-cell/date-cell.tsx +44 -0
  620. package/src/components/table/table-cells/common/date-cell/index.ts +1 -0
  621. package/src/components/table/table-cells/common/email-cell/email-cell.tsx +28 -0
  622. package/src/components/table/table-cells/common/email-cell/index.ts +1 -0
  623. package/src/components/table/table-cells/common/money-amount-cell/index.ts +1 -0
  624. package/src/components/table/table-cells/common/money-amount-cell/money-amount-cell.tsx +38 -0
  625. package/src/components/table/table-cells/common/name-cell/index.ts +1 -0
  626. package/src/components/table/table-cells/common/name-cell/name-cell.tsx +31 -0
  627. package/src/components/table/table-cells/common/placeholder-cell/index.ts +1 -0
  628. package/src/components/table/table-cells/common/placeholder-cell/placeholder-cell.tsx +7 -0
  629. package/src/components/table/table-cells/common/status-cell/index.ts +1 -0
  630. package/src/components/table/table-cells/common/status-cell/status-cell.tsx +35 -0
  631. package/src/components/table/table-cells/common/text-cell/index.ts +1 -0
  632. package/src/components/table/table-cells/common/text-cell/text-cell.tsx +49 -0
  633. package/src/components/table/table-cells/customer/account-cell/account-cell.tsx +27 -0
  634. package/src/components/table/table-cells/customer/first-seen-cell/first-seen-cell.tsx +25 -0
  635. package/src/components/table/table-cells/customer/first-seen-cell/index.ts +1 -0
  636. package/src/components/table/table-cells/order/country-cell/country-cell.tsx +36 -0
  637. package/src/components/table/table-cells/order/country-cell/index.ts +1 -0
  638. package/src/components/table/table-cells/order/customer-cell/customer-cell.tsx +31 -0
  639. package/src/components/table/table-cells/order/customer-cell/index.ts +1 -0
  640. package/src/components/table/table-cells/order/display-id-cell/display-id-cell.tsx +24 -0
  641. package/src/components/table/table-cells/order/display-id-cell/index.ts +1 -0
  642. package/src/components/table/table-cells/order/fulfillment-status-cell/fulfillment-status-cell.tsx +35 -0
  643. package/src/components/table/table-cells/order/fulfillment-status-cell/index.ts +1 -0
  644. package/src/components/table/table-cells/order/payment-status-cell/index.ts +1 -0
  645. package/src/components/table/table-cells/order/payment-status-cell/payment-status-cell.tsx +26 -0
  646. package/src/components/table/table-cells/order/sales-channel-cell/index.ts +1 -0
  647. package/src/components/table/table-cells/order/sales-channel-cell/sales-channel-cell.tsx +30 -0
  648. package/src/components/table/table-cells/order/total-cell/index.ts +1 -0
  649. package/src/components/table/table-cells/order/total-cell/total-cell.tsx +29 -0
  650. package/src/components/table/table-cells/product/collection-cell/collection-cell.tsx +30 -0
  651. package/src/components/table/table-cells/product/collection-cell/index.ts +1 -0
  652. package/src/components/table/table-cells/product/product-cell/index.ts +1 -0
  653. package/src/components/table/table-cells/product/product-cell/product-cell.tsx +31 -0
  654. package/src/components/table/table-cells/product/product-status-cell/index.ts +1 -0
  655. package/src/components/table/table-cells/product/product-status-cell/product-status-cell.tsx +31 -0
  656. package/src/components/table/table-cells/product/sales-channels-cell/index.ts +1 -0
  657. package/src/components/table/table-cells/product/sales-channels-cell/sales-channels-cell.tsx +67 -0
  658. package/src/components/table/table-cells/product/variant-cell/index.ts +1 -0
  659. package/src/components/table/table-cells/product/variant-cell/variant-cell.tsx +34 -0
  660. package/src/components/table/table-cells/promotion/status-cell/index.ts +1 -0
  661. package/src/components/table/table-cells/promotion/status-cell/status-cell.tsx +13 -0
  662. package/src/components/table/table-cells/region/countries-cell/countries-cell.tsx +39 -0
  663. package/src/components/table/table-cells/region/countries-cell/index.ts +1 -0
  664. package/src/components/table/table-cells/region/fulfillment-providers-cell/fulfillment-providers-cell.tsx +49 -0
  665. package/src/components/table/table-cells/region/fulfillment-providers-cell/index.ts +1 -0
  666. package/src/components/table/table-cells/region/payment-providers-cell/index.ts +1 -0
  667. package/src/components/table/table-cells/region/payment-providers-cell/payment-providers-cell.tsx +36 -0
  668. package/src/components/table/table-cells/region/region-cell/index.ts +1 -0
  669. package/src/components/table/table-cells/region/region-cell/region-cell.tsx +23 -0
  670. package/src/components/table/table-cells/sales-channel/description-cell/description-cell.tsx +28 -0
  671. package/src/components/table/table-cells/sales-channel/description-cell/index.ts +1 -0
  672. package/src/components/table/table-cells/sales-channel/name-cell/index.ts +1 -0
  673. package/src/components/table/table-cells/sales-channel/name-cell/name-cell.tsx +28 -0
  674. package/src/components/table/table-cells/shipping-option/admin-only-cell/admin-only-cell.tsx +25 -0
  675. package/src/components/table/table-cells/shipping-option/admin-only-cell/index.ts +1 -0
  676. package/src/components/table/table-cells/shipping-option/is-return-cell/index.ts +1 -0
  677. package/src/components/table/table-cells/shipping-option/is-return-cell/is-return-cell.tsx +27 -0
  678. package/src/components/table/table-cells/shipping-option/price-type-cell/index.ts +1 -0
  679. package/src/components/table/table-cells/shipping-option/price-type-cell/price-type-cell.tsx +34 -0
  680. package/src/components/table/table-cells/shipping-option/shipping-option-cell/index.ts +1 -0
  681. package/src/components/table/table-cells/shipping-option/shipping-option-cell/shipping-option-cell.tsx +28 -0
  682. package/src/components/table/table-cells/shipping-option/shipping-price-cell/shipping-price-cell.tsx +31 -0
  683. package/src/components/table/table-cells/taxes/type-cell/index.ts +1 -0
  684. package/src/components/table/table-cells/taxes/type-cell/type-cell.tsx +33 -0
  685. package/src/components/table/view-selector/index.ts +2 -0
  686. package/src/components/table/view-selector/view-pills.tsx +265 -0
  687. package/src/components/table/view-selector/view-selector.tsx +253 -0
  688. package/src/components/utilities/error-boundary/error-boundary.tsx +75 -0
  689. package/src/components/utilities/error-boundary/index.ts +1 -0
  690. package/src/components/utilities/generic-forward-ref/generic-forward-ref.tsx +7 -0
  691. package/src/components/utilities/generic-forward-ref/index.ts +1 -0
  692. package/src/components/utilities/i18n/i18n.tsx +33 -0
  693. package/src/components/utilities/i18n/index.ts +1 -0
  694. package/src/components/utilities/keybound-form/index.ts +1 -0
  695. package/src/components/utilities/keybound-form/keybound-form.tsx +42 -0
  696. package/src/components/utilities/visually-hidden/index.ts +1 -0
  697. package/src/components/utilities/visually-hidden/visually-hidden.tsx +5 -0
  698. package/src/dashboard-app/__tests__/sort-menu-items-by-rank.spec.ts +169 -0
  699. package/src/dashboard-app/dashboard-app.tsx +499 -0
  700. package/src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx +116 -0
  701. package/src/dashboard-app/forms/form-extension-zone/index.ts +1 -0
  702. package/src/dashboard-app/forms/form-extension-zone/types.ts +1 -0
  703. package/src/dashboard-app/forms/form-extension-zone/utils.ts +66 -0
  704. package/src/dashboard-app/forms/hooks.tsx +86 -0
  705. package/src/dashboard-app/forms/index.ts +2 -0
  706. package/src/dashboard-app/index.ts +12 -0
  707. package/src/dashboard-app/links/utils.ts +20 -0
  708. package/src/dashboard-app/routes/get-route.map.tsx +1904 -0
  709. package/src/dashboard-app/routes/utils.ts +229 -0
  710. package/src/dashboard-app/types.ts +143 -0
  711. package/src/dashboard-app/utils/sort-menu-items-by-rank.ts +43 -0
  712. package/src/hooks/api/api-keys.tsx +179 -0
  713. package/src/hooks/api/auth.tsx +75 -0
  714. package/src/hooks/api/campaigns.tsx +138 -0
  715. package/src/hooks/api/categories.tsx +186 -0
  716. package/src/hooks/api/claims.tsx +593 -0
  717. package/src/hooks/api/cloud.tsx +41 -0
  718. package/src/hooks/api/collections.tsx +180 -0
  719. package/src/hooks/api/currencies.tsx +52 -0
  720. package/src/hooks/api/customer-groups.tsx +207 -0
  721. package/src/hooks/api/customers.tsx +263 -0
  722. package/src/hooks/api/exchanges.tsx +475 -0
  723. package/src/hooks/api/feature-flags.tsx +26 -0
  724. package/src/hooks/api/fulfillment-providers.tsx +59 -0
  725. package/src/hooks/api/fulfillment-sets.tsx +180 -0
  726. package/src/hooks/api/fulfillment.tsx +66 -0
  727. package/src/hooks/api/index.ts +41 -0
  728. package/src/hooks/api/inventory.tsx +274 -0
  729. package/src/hooks/api/invites.tsx +135 -0
  730. package/src/hooks/api/locales.tsx +52 -0
  731. package/src/hooks/api/notification.tsx +52 -0
  732. package/src/hooks/api/order-edits.tsx +242 -0
  733. package/src/hooks/api/orders.tsx +457 -0
  734. package/src/hooks/api/payment-collections.tsx +104 -0
  735. package/src/hooks/api/payments.tsx +116 -0
  736. package/src/hooks/api/plugins.tsx +28 -0
  737. package/src/hooks/api/price-lists.tsx +199 -0
  738. package/src/hooks/api/price-preferences.tsx +113 -0
  739. package/src/hooks/api/product-types.tsx +152 -0
  740. package/src/hooks/api/product-variants.tsx +69 -0
  741. package/src/hooks/api/products.tsx +508 -0
  742. package/src/hooks/api/promotions.tsx +286 -0
  743. package/src/hooks/api/refund-reasons.tsx +124 -0
  744. package/src/hooks/api/regions.tsx +131 -0
  745. package/src/hooks/api/reservations.tsx +149 -0
  746. package/src/hooks/api/return-reasons.tsx +132 -0
  747. package/src/hooks/api/returns.tsx +651 -0
  748. package/src/hooks/api/sales-channels.tsx +236 -0
  749. package/src/hooks/api/shipping-option-types.tsx +128 -0
  750. package/src/hooks/api/shipping-options.tsx +128 -0
  751. package/src/hooks/api/shipping-profiles.tsx +131 -0
  752. package/src/hooks/api/stock-locations.tsx +202 -0
  753. package/src/hooks/api/store.tsx +83 -0
  754. package/src/hooks/api/tags.tsx +160 -0
  755. package/src/hooks/api/tax-rates.tsx +127 -0
  756. package/src/hooks/api/tax-regions.tsx +124 -0
  757. package/src/hooks/api/translations.tsx +241 -0
  758. package/src/hooks/api/users.tsx +150 -0
  759. package/src/hooks/api/views.tsx +244 -0
  760. package/src/hooks/api/workflow-executions.tsx +52 -0
  761. package/src/hooks/table/columns/index.ts +12 -0
  762. package/src/hooks/table/columns/use-campaign-table-columns.tsx +73 -0
  763. package/src/hooks/table/columns/use-collection-table-columns.tsx +33 -0
  764. package/src/hooks/table/columns/use-column-state.ts +209 -0
  765. package/src/hooks/table/columns/use-configurable-table-columns.tsx +109 -0
  766. package/src/hooks/table/columns/use-customer-group-table-columns.tsx +33 -0
  767. package/src/hooks/table/columns/use-customer-table-columns.tsx +51 -0
  768. package/src/hooks/table/columns/use-fulfillment-provider-table-columns.tsx +25 -0
  769. package/src/hooks/table/columns/use-order-data-table-columns.tsx +234 -0
  770. package/src/hooks/table/columns/use-order-table-columns.tsx +162 -0
  771. package/src/hooks/table/columns/use-product-table-columns.tsx +59 -0
  772. package/src/hooks/table/columns/use-product-tag-table-columns.tsx +35 -0
  773. package/src/hooks/table/columns/use-product-type-table-columns.tsx +36 -0
  774. package/src/hooks/table/columns/use-promotion-table-columns.tsx +49 -0
  775. package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +39 -0
  776. package/src/hooks/table/columns/use-region-table-columns.tsx +40 -0
  777. package/src/hooks/table/columns/use-return-reason-table-columns.tsx +32 -0
  778. package/src/hooks/table/columns/use-shipping-option-table-columns.tsx +89 -0
  779. package/src/hooks/table/columns/use-shipping-option-type-table-columns.tsx +44 -0
  780. package/src/hooks/table/columns/use-tax-rates-table-columns.tsx +55 -0
  781. package/src/hooks/table/filters/index.ts +12 -0
  782. package/src/hooks/table/filters/use-collection-table-filters.tsx +7 -0
  783. package/src/hooks/table/filters/use-customer-group-table-filters.tsx +21 -0
  784. package/src/hooks/table/filters/use-customer-table-filters.tsx +68 -0
  785. package/src/hooks/table/filters/use-date-table-filters.tsx +17 -0
  786. package/src/hooks/table/filters/use-order-table-filters.tsx +158 -0
  787. package/src/hooks/table/filters/use-product-table-filters.tsx +212 -0
  788. package/src/hooks/table/filters/use-product-tag-table-filters.tsx +7 -0
  789. package/src/hooks/table/filters/use-product-type-table-filters.tsx +7 -0
  790. package/src/hooks/table/filters/use-promotion-table-filters.tsx +13 -0
  791. package/src/hooks/table/filters/use-region-table-filters.tsx +19 -0
  792. package/src/hooks/table/filters/use-shipping-option-table-filters.tsx +30 -0
  793. package/src/hooks/table/filters/use-shipping-option-type-table-filters.tsx +5 -0
  794. package/src/hooks/table/filters/use-tax-rate-table-filters.tsx +19 -0
  795. package/src/hooks/table/query/index.ts +15 -0
  796. package/src/hooks/table/query/use-campaign-table-query.tsx +31 -0
  797. package/src/hooks/table/query/use-collection-table-query.tsx +33 -0
  798. package/src/hooks/table/query/use-customer-group-table-query.tsx +33 -0
  799. package/src/hooks/table/query/use-customer-table-query.tsx +44 -0
  800. package/src/hooks/table/query/use-fulfillment-providers-table-query.tsx +31 -0
  801. package/src/hooks/table/query/use-order-table-query.tsx +57 -0
  802. package/src/hooks/table/query/use-product-table-query.tsx +72 -0
  803. package/src/hooks/table/query/use-product-tag-table-query.tsx +32 -0
  804. package/src/hooks/table/query/use-product-type-table-query.tsx +32 -0
  805. package/src/hooks/table/query/use-product-variant-table-query.tsx +32 -0
  806. package/src/hooks/table/query/use-promotion-table-query.tsx +33 -0
  807. package/src/hooks/table/query/use-refund-reason-table-query.tsx +32 -0
  808. package/src/hooks/table/query/use-region-table-query.tsx +33 -0
  809. package/src/hooks/table/query/use-return-reason-table-query.tsx +32 -0
  810. package/src/hooks/table/query/use-shipping-option-table-query.tsx +61 -0
  811. package/src/hooks/table/query/use-shipping-option-type-table-query.tsx +32 -0
  812. package/src/hooks/table/query/use-tax-rate-table-query.tsx +33 -0
  813. package/src/hooks/table/query/use-tax-region-table-query.tsx +32 -0
  814. package/src/hooks/table/query/use-user-invite-table-query.tsx +32 -0
  815. package/src/hooks/table/use-table-configuration.tsx +287 -0
  816. package/src/hooks/use-combined-refs.tsx +19 -0
  817. package/src/hooks/use-combobox-data.tsx +123 -0
  818. package/src/hooks/use-command-history.tsx +67 -0
  819. package/src/hooks/use-data-table.tsx +132 -0
  820. package/src/hooks/use-date.tsx +48 -0
  821. package/src/hooks/use-debounced-search.tsx +29 -0
  822. package/src/hooks/use-document-direction.tsx +54 -0
  823. package/src/hooks/use-handle-table-scroll.tsx +24 -0
  824. package/src/hooks/use-infinite-list.tsx +92 -0
  825. package/src/hooks/use-media-query.tsx +14 -0
  826. package/src/hooks/use-query-params.tsx +24 -0
  827. package/src/hooks/use-view-configurations.tsx +102 -0
  828. package/src/i18n/config.ts +16 -0
  829. package/src/i18n/languages.ts +223 -0
  830. package/src/i18n/translations/$schema.json +12399 -0
  831. package/src/i18n/translations/__tests__/validate-translations.spec.ts +67 -0
  832. package/src/i18n/translations/ar.json +2956 -0
  833. package/src/i18n/translations/bg.json +2987 -0
  834. package/src/i18n/translations/bs.json +3016 -0
  835. package/src/i18n/translations/cs.json +3050 -0
  836. package/src/i18n/translations/de.json +2792 -0
  837. package/src/i18n/translations/el.json +2960 -0
  838. package/src/i18n/translations/en.json +3311 -0
  839. package/src/i18n/translations/es.json +3167 -0
  840. package/src/i18n/translations/fa.json +2932 -0
  841. package/src/i18n/translations/fr.json +2791 -0
  842. package/src/i18n/translations/he.json +3017 -0
  843. package/src/i18n/translations/hu.json +3005 -0
  844. package/src/i18n/translations/id.json +3020 -0
  845. package/src/i18n/translations/index.ts +126 -0
  846. package/src/i18n/translations/it.json +2805 -0
  847. package/src/i18n/translations/ja.json +2821 -0
  848. package/src/i18n/translations/ko.json +3026 -0
  849. package/src/i18n/translations/lt.json +3007 -0
  850. package/src/i18n/translations/mk.json +2925 -0
  851. package/src/i18n/translations/mn.json +2922 -0
  852. package/src/i18n/translations/nl.json +3005 -0
  853. package/src/i18n/translations/pl.json +3227 -0
  854. package/src/i18n/translations/ptBR.json +2789 -0
  855. package/src/i18n/translations/ptPT.json +3219 -0
  856. package/src/i18n/translations/ro.json +2935 -0
  857. package/src/i18n/translations/ru.json +2936 -0
  858. package/src/i18n/translations/th.json +2792 -0
  859. package/src/i18n/translations/tr.json +2961 -0
  860. package/src/i18n/translations/uk.json +2856 -0
  861. package/src/i18n/translations/vi.json +3051 -0
  862. package/src/i18n/translations/zhCN.json +3017 -0
  863. package/src/i18n/translations/zhTW.json +3249 -0
  864. package/src/i18n/types.ts +15 -0
  865. package/src/i18next.d.ts +7 -0
  866. package/src/index.css +48 -0
  867. package/src/index.ts +2 -0
  868. package/src/lib/addresses.ts +97 -0
  869. package/src/lib/cast-number.ts +6 -0
  870. package/src/lib/client/client.ts +18 -0
  871. package/src/lib/client/index.ts +1 -0
  872. package/src/lib/common.ts +45 -0
  873. package/src/lib/credit-line.ts +8 -0
  874. package/src/lib/data/countries.ts +1767 -0
  875. package/src/lib/data/country-states.ts +1311 -0
  876. package/src/lib/data/currencies.ts +752 -0
  877. package/src/lib/form-helpers.ts +69 -0
  878. package/src/lib/format-currency.ts +7 -0
  879. package/src/lib/format-provider.ts +18 -0
  880. package/src/lib/is-fetch-error.ts +5 -0
  881. package/src/lib/money-amount-helpers.ts +75 -0
  882. package/src/lib/number-helper.ts +19 -0
  883. package/src/lib/order-helpers.ts +74 -0
  884. package/src/lib/order-item.ts +5 -0
  885. package/src/lib/orders.ts +23 -0
  886. package/src/lib/payment.ts +23 -0
  887. package/src/lib/percentage-helpers.ts +28 -0
  888. package/src/lib/plugins.ts +7 -0
  889. package/src/lib/promotions.ts +51 -0
  890. package/src/lib/query-client.ts +13 -0
  891. package/src/lib/query-key-factory.ts +53 -0
  892. package/src/lib/rma.ts +17 -0
  893. package/src/lib/schemas.ts +36 -0
  894. package/src/lib/shipping-options.ts +62 -0
  895. package/src/lib/storefront.ts +2 -0
  896. package/src/lib/table/cell-renderers.tsx +332 -0
  897. package/src/lib/table/entity-adapters.tsx +138 -0
  898. package/src/lib/table/entity-defaults.ts +73 -0
  899. package/src/lib/table/field-utils.ts +75 -0
  900. package/src/lib/table/table-adapters.ts +94 -0
  901. package/src/lib/table-display-utils.tsx +372 -0
  902. package/src/lib/validation.ts +101 -0
  903. package/src/main.tsx +9 -0
  904. package/src/module.d.ts +41 -0
  905. package/src/providers/extension-provider/extension-context.tsx +8 -0
  906. package/src/providers/extension-provider/extension-provider.tsx +18 -0
  907. package/src/providers/extension-provider/index.ts +2 -0
  908. package/src/providers/extension-provider/use-extension.tsx +10 -0
  909. package/src/providers/feature-flag-provider/index.tsx +46 -0
  910. package/src/providers/i18n-provider/i18n-provider.tsx +25 -0
  911. package/src/providers/i18n-provider/index.ts +1 -0
  912. package/src/providers/index.ts +1 -0
  913. package/src/providers/keybind-provider/hooks.tsx +319 -0
  914. package/src/providers/keybind-provider/index.ts +3 -0
  915. package/src/providers/keybind-provider/keybind-context.tsx +4 -0
  916. package/src/providers/keybind-provider/keybind-provider.tsx +64 -0
  917. package/src/providers/keybind-provider/types.ts +28 -0
  918. package/src/providers/keybind-provider/utils.ts +92 -0
  919. package/src/providers/providers.tsx +34 -0
  920. package/src/providers/search-provider/index.ts +2 -0
  921. package/src/providers/search-provider/search-context.tsx +9 -0
  922. package/src/providers/search-provider/search-provider.tsx +50 -0
  923. package/src/providers/search-provider/use-search.tsx +10 -0
  924. package/src/providers/sidebar-provider/index.ts +2 -0
  925. package/src/providers/sidebar-provider/sidebar-context.tsx +9 -0
  926. package/src/providers/sidebar-provider/sidebar-provider.tsx +31 -0
  927. package/src/providers/sidebar-provider/use-sidebar.tsx +12 -0
  928. package/src/providers/theme-provider/index.ts +3 -0
  929. package/src/providers/theme-provider/theme-context.tsx +11 -0
  930. package/src/providers/theme-provider/theme-provider.tsx +84 -0
  931. package/src/providers/theme-provider/use-theme.tsx +10 -0
  932. package/src/routes/api-key-management/api-key-management-create/api-key-management-create.tsx +15 -0
  933. package/src/routes/api-key-management/api-key-management-create/components/api-key-create-form/api-key-create-form.tsx +205 -0
  934. package/src/routes/api-key-management/api-key-management-create/components/api-key-create-form/index.ts +1 -0
  935. package/src/routes/api-key-management/api-key-management-create/index.ts +1 -0
  936. package/src/routes/api-key-management/api-key-management-detail/api-key-management-detail.tsx +48 -0
  937. package/src/routes/api-key-management/api-key-management-detail/breadcrumb.tsx +24 -0
  938. package/src/routes/api-key-management/api-key-management-detail/components/api-key-general-section/api-key-general-section.tsx +249 -0
  939. package/src/routes/api-key-management/api-key-management-detail/components/api-key-general-section/index.ts +1 -0
  940. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +206 -0
  941. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +1 -0
  942. package/src/routes/api-key-management/api-key-management-detail/index.ts +3 -0
  943. package/src/routes/api-key-management/api-key-management-detail/loader.ts +17 -0
  944. package/src/routes/api-key-management/api-key-management-edit/api-key-management-edit.tsx +34 -0
  945. package/src/routes/api-key-management/api-key-management-edit/components/edit-api-key-form/edit-api-key-form.tsx +87 -0
  946. package/src/routes/api-key-management/api-key-management-edit/components/edit-api-key-form/index.ts +1 -0
  947. package/src/routes/api-key-management/api-key-management-edit/index.ts +1 -0
  948. package/src/routes/api-key-management/api-key-management-list/api-key-management-list.tsx +25 -0
  949. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-management-list-table.tsx +93 -0
  950. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/api-key-row-actions.tsx +123 -0
  951. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/index.ts +1 -0
  952. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-columns.tsx +80 -0
  953. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-filters.tsx +18 -0
  954. package/src/routes/api-key-management/api-key-management-list/components/api-key-management-list-table/use-api-key-management-table-query.tsx +34 -0
  955. package/src/routes/api-key-management/api-key-management-list/index.ts +1 -0
  956. package/src/routes/api-key-management/api-key-management-sales-channels/api-key-management-sales-channels.tsx +32 -0
  957. package/src/routes/api-key-management/api-key-management-sales-channels/components/api-key-sales-channels-form/api-key-sales-channels-form.tsx +202 -0
  958. package/src/routes/api-key-management/api-key-management-sales-channels/components/api-key-sales-channels-form/index.ts +1 -0
  959. package/src/routes/api-key-management/api-key-management-sales-channels/index.ts +1 -0
  960. package/src/routes/api-key-management/common/constants.ts +4 -0
  961. package/src/routes/api-key-management/common/utils.ts +62 -0
  962. package/src/routes/campaigns/add-campaign-promotions/add-campaign-promotions.tsx +19 -0
  963. package/src/routes/campaigns/add-campaign-promotions/components/add-campaign-promotions-form.tsx +260 -0
  964. package/src/routes/campaigns/add-campaign-promotions/components/index.ts +1 -0
  965. package/src/routes/campaigns/add-campaign-promotions/index.ts +1 -0
  966. package/src/routes/campaigns/campaign-budget-edit/campaign-budget-edit.tsx +29 -0
  967. package/src/routes/campaigns/campaign-budget-edit/components/edit-campaign-budget-form/edit-campaign-budget-form.tsx +138 -0
  968. package/src/routes/campaigns/campaign-budget-edit/components/edit-campaign-budget-form/index.ts +1 -0
  969. package/src/routes/campaigns/campaign-budget-edit/index.ts +1 -0
  970. package/src/routes/campaigns/campaign-configuration/campaign-configuration.tsx +33 -0
  971. package/src/routes/campaigns/campaign-configuration/components/campaign-configuration-form/campaign-configuration-form.tsx +134 -0
  972. package/src/routes/campaigns/campaign-configuration/components/campaign-configuration-form/index.ts +1 -0
  973. package/src/routes/campaigns/campaign-configuration/index.ts +1 -0
  974. package/src/routes/campaigns/campaign-create/campaign-create.tsx +10 -0
  975. package/src/routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx +113 -0
  976. package/src/routes/campaigns/campaign-create/components/create-campaign-form/index.ts +1 -0
  977. package/src/routes/campaigns/campaign-create/index.ts +1 -0
  978. package/src/routes/campaigns/campaign-detail/breadcrumb.tsx +29 -0
  979. package/src/routes/campaigns/campaign-detail/campaign-detail.tsx +69 -0
  980. package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +88 -0
  981. package/src/routes/campaigns/campaign-detail/components/campaign-budget/index.ts +1 -0
  982. package/src/routes/campaigns/campaign-detail/components/campaign-configuration-section/campaign-configuration-section.tsx +43 -0
  983. package/src/routes/campaigns/campaign-detail/components/campaign-configuration-section/index.ts +1 -0
  984. package/src/routes/campaigns/campaign-detail/components/campaign-general-section/campaign-general-section.tsx +137 -0
  985. package/src/routes/campaigns/campaign-detail/components/campaign-general-section/index.ts +1 -0
  986. package/src/routes/campaigns/campaign-detail/components/campaign-promotion-section/campaign-promotion-section.tsx +237 -0
  987. package/src/routes/campaigns/campaign-detail/components/campaign-promotion-section/index.ts +1 -0
  988. package/src/routes/campaigns/campaign-detail/components/campaign-spend/campaign-spend.tsx +61 -0
  989. package/src/routes/campaigns/campaign-detail/components/campaign-spend/index.ts +1 -0
  990. package/src/routes/campaigns/campaign-detail/constants.ts +1 -0
  991. package/src/routes/campaigns/campaign-detail/index.ts +3 -0
  992. package/src/routes/campaigns/campaign-detail/loader.ts +21 -0
  993. package/src/routes/campaigns/campaign-edit/campaign-edit.tsx +33 -0
  994. package/src/routes/campaigns/campaign-edit/components/edit-campaign-form/edit-campaign-form.tsx +194 -0
  995. package/src/routes/campaigns/campaign-edit/components/edit-campaign-form/index.ts +1 -0
  996. package/src/routes/campaigns/campaign-edit/index.ts +1 -0
  997. package/src/routes/campaigns/campaign-list/campaign-list.tsx +19 -0
  998. package/src/routes/campaigns/campaign-list/components/campaign-list-table.tsx +157 -0
  999. package/src/routes/campaigns/campaign-list/components/index.ts +1 -0
  1000. package/src/routes/campaigns/campaign-list/index.ts +1 -0
  1001. package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +402 -0
  1002. package/src/routes/campaigns/common/components/create-campaign-form-fields/index.ts +1 -0
  1003. package/src/routes/campaigns/common/constants.ts +15 -0
  1004. package/src/routes/campaigns/common/utils/campaign-status.ts +31 -0
  1005. package/src/routes/categories/categories-metadata/categories-metadata.tsx +30 -0
  1006. package/src/routes/categories/categories-metadata/index.ts +1 -0
  1007. package/src/routes/categories/category-create/category-create.tsx +16 -0
  1008. package/src/routes/categories/category-create/components/create-category-form/create-category-details.tsx +144 -0
  1009. package/src/routes/categories/category-create/components/create-category-form/create-category-form.tsx +209 -0
  1010. package/src/routes/categories/category-create/components/create-category-form/create-category-nesting.tsx +114 -0
  1011. package/src/routes/categories/category-create/components/create-category-form/index.ts +1 -0
  1012. package/src/routes/categories/category-create/components/create-category-form/schema.ts +17 -0
  1013. package/src/routes/categories/category-create/index.ts +1 -0
  1014. package/src/routes/categories/category-detail/breadcrumb.tsx +29 -0
  1015. package/src/routes/categories/category-detail/category-detail.tsx +65 -0
  1016. package/src/routes/categories/category-detail/components/category-general-section/category-general-section.tsx +93 -0
  1017. package/src/routes/categories/category-detail/components/category-general-section/index.ts +1 -0
  1018. package/src/routes/categories/category-detail/components/category-organize-section/category-organize-section.tsx +216 -0
  1019. package/src/routes/categories/category-detail/components/category-organize-section/index.ts +1 -0
  1020. package/src/routes/categories/category-detail/components/category-product-section/category-product-section.tsx +204 -0
  1021. package/src/routes/categories/category-detail/components/category-product-section/index.ts +1 -0
  1022. package/src/routes/categories/category-detail/index.ts +3 -0
  1023. package/src/routes/categories/category-detail/loader.ts +17 -0
  1024. package/src/routes/categories/category-edit/category-edit.tsx +36 -0
  1025. package/src/routes/categories/category-edit/components/edit-category-form/edit-category-form.tsx +204 -0
  1026. package/src/routes/categories/category-edit/components/edit-category-form/index.ts +1 -0
  1027. package/src/routes/categories/category-edit/index.ts +1 -0
  1028. package/src/routes/categories/category-list/category-list.tsx +19 -0
  1029. package/src/routes/categories/category-list/components/category-list-table/category-list-table.tsx +169 -0
  1030. package/src/routes/categories/category-list/components/category-list-table/index.ts +1 -0
  1031. package/src/routes/categories/category-list/components/category-list-table/use-category-table-columns.tsx +116 -0
  1032. package/src/routes/categories/category-list/components/category-list-table/use-category-table-query.tsx +23 -0
  1033. package/src/routes/categories/category-list/index.ts +1 -0
  1034. package/src/routes/categories/category-organize/category-organize.tsx +10 -0
  1035. package/src/routes/categories/category-organize/components/organize-category-form/index.ts +1 -0
  1036. package/src/routes/categories/category-organize/components/organize-category-form/organize-category-form.tsx +131 -0
  1037. package/src/routes/categories/category-organize/index.ts +1 -0
  1038. package/src/routes/categories/category-products/category-products.tsx +30 -0
  1039. package/src/routes/categories/category-products/components/edit-category-products-form/edit-category-products-form.tsx +245 -0
  1040. package/src/routes/categories/category-products/components/edit-category-products-form/index.ts +1 -0
  1041. package/src/routes/categories/category-products/index.ts +1 -0
  1042. package/src/routes/categories/common/components/category-tree/category-tree.tsx +55 -0
  1043. package/src/routes/categories/common/components/category-tree/index.ts +1 -0
  1044. package/src/routes/categories/common/hooks/use-delete-product-category-action.tsx +49 -0
  1045. package/src/routes/categories/common/types.ts +7 -0
  1046. package/src/routes/categories/common/utils.ts +157 -0
  1047. package/src/routes/collections/collection-add-products/collection-add-products.tsx +22 -0
  1048. package/src/routes/collections/collection-add-products/components/add-products-to-collection-form/add-products-to-collection-form.tsx +259 -0
  1049. package/src/routes/collections/collection-add-products/components/add-products-to-collection-form/index.ts +1 -0
  1050. package/src/routes/collections/collection-add-products/index.ts +1 -0
  1051. package/src/routes/collections/collection-create/collection-create.tsx +10 -0
  1052. package/src/routes/collections/collection-create/components/create-collection-form/create-collection-form.tsx +120 -0
  1053. package/src/routes/collections/collection-create/components/create-collection-form/index.ts +1 -0
  1054. package/src/routes/collections/collection-create/index.ts +1 -0
  1055. package/src/routes/collections/collection-detail/breadcrumb.tsx +23 -0
  1056. package/src/routes/collections/collection-detail/collection-detail.tsx +45 -0
  1057. package/src/routes/collections/collection-detail/components/collection-general-section/collection-general-section.tsx +91 -0
  1058. package/src/routes/collections/collection-detail/components/collection-general-section/index.ts +1 -0
  1059. package/src/routes/collections/collection-detail/components/collection-product-section/collection-product-section.tsx +272 -0
  1060. package/src/routes/collections/collection-detail/components/collection-product-section/index.ts +1 -0
  1061. package/src/routes/collections/collection-detail/index.ts +3 -0
  1062. package/src/routes/collections/collection-detail/loader.ts +17 -0
  1063. package/src/routes/collections/collection-edit/collection-edit.tsx +27 -0
  1064. package/src/routes/collections/collection-edit/components/edit-collection-form/edit-collection-form.tsx +110 -0
  1065. package/src/routes/collections/collection-edit/components/edit-collection-form/index.ts +1 -0
  1066. package/src/routes/collections/collection-edit/index.ts +1 -0
  1067. package/src/routes/collections/collection-list/collection-list.tsx +18 -0
  1068. package/src/routes/collections/collection-list/components/collection-list-table/collection-list-table.tsx +99 -0
  1069. package/src/routes/collections/collection-list/components/collection-list-table/collection-row-actions.tsx +78 -0
  1070. package/src/routes/collections/collection-list/components/collection-list-table/index.ts +1 -0
  1071. package/src/routes/collections/collection-list/index.ts +1 -0
  1072. package/src/routes/collections/collection-metadata/collection-metadata.tsx +26 -0
  1073. package/src/routes/collections/collection-metadata/index.ts +1 -0
  1074. package/src/routes/customer-groups/customer-group-add-customers/components/add-customers-form/add-customers-form.tsx +245 -0
  1075. package/src/routes/customer-groups/customer-group-add-customers/components/add-customers-form/index.ts +1 -0
  1076. package/src/routes/customer-groups/customer-group-add-customers/customer-group-add-customers.tsx +13 -0
  1077. package/src/routes/customer-groups/customer-group-add-customers/index.ts +1 -0
  1078. package/src/routes/customer-groups/customer-group-create/components/create-customer-group-form/create-customer-group-form.tsx +110 -0
  1079. package/src/routes/customer-groups/customer-group-create/components/create-customer-group-form/index.ts +1 -0
  1080. package/src/routes/customer-groups/customer-group-create/customer-group-create.tsx +10 -0
  1081. package/src/routes/customer-groups/customer-group-create/index.ts +1 -0
  1082. package/src/routes/customer-groups/customer-group-detail/breadcrumb.tsx +31 -0
  1083. package/src/routes/customer-groups/customer-group-detail/components/customer-group-customer-section/customer-group-customer-section.tsx +243 -0
  1084. package/src/routes/customer-groups/customer-group-detail/components/customer-group-customer-section/index.ts +1 -0
  1085. package/src/routes/customer-groups/customer-group-detail/components/customer-group-general-section/customer-group-general-section.tsx +90 -0
  1086. package/src/routes/customer-groups/customer-group-detail/components/customer-group-general-section/index.ts +1 -0
  1087. package/src/routes/customer-groups/customer-group-detail/constants.ts +1 -0
  1088. package/src/routes/customer-groups/customer-group-detail/customer-group-detail.tsx +51 -0
  1089. package/src/routes/customer-groups/customer-group-detail/index.ts +3 -0
  1090. package/src/routes/customer-groups/customer-group-detail/loader.ts +20 -0
  1091. package/src/routes/customer-groups/customer-group-edit/components/edit-customer-group-form/edit-customer-group-form.tsx +90 -0
  1092. package/src/routes/customer-groups/customer-group-edit/components/edit-customer-group-form/index.ts +1 -0
  1093. package/src/routes/customer-groups/customer-group-edit/customer-group-edit.tsx +28 -0
  1094. package/src/routes/customer-groups/customer-group-edit/index.ts +1 -0
  1095. package/src/routes/customer-groups/customer-group-list/components/customer-group-list-table/customer-group-list-table.tsx +223 -0
  1096. package/src/routes/customer-groups/customer-group-list/components/customer-group-list-table/index.ts +1 -0
  1097. package/src/routes/customer-groups/customer-group-list/customer-group-list.tsx +18 -0
  1098. package/src/routes/customer-groups/customer-group-list/index.ts +1 -0
  1099. package/src/routes/customer-groups/customer-group-metadata/customer-metadata.tsx +26 -0
  1100. package/src/routes/customer-groups/customer-group-metadata/index.ts +1 -0
  1101. package/src/routes/customers/customer-create/components/create-customer-form/create-customer-form.tsx +179 -0
  1102. package/src/routes/customers/customer-create/components/create-customer-form/index.ts +1 -0
  1103. package/src/routes/customers/customer-create/customer-create.tsx +10 -0
  1104. package/src/routes/customers/customer-create/index.ts +1 -0
  1105. package/src/routes/customers/customer-create-address/components/create-customer-address-form/create-customer-address-form.tsx +282 -0
  1106. package/src/routes/customers/customer-create-address/components/create-customer-address-form/index.ts +1 -0
  1107. package/src/routes/customers/customer-create-address/customer-create-address.tsx +10 -0
  1108. package/src/routes/customers/customer-create-address/index.ts +1 -0
  1109. package/src/routes/customers/customer-detail/breadcrumb.tsx +29 -0
  1110. package/src/routes/customers/customer-detail/components/customer-address-section/customer-address-section.tsx +104 -0
  1111. package/src/routes/customers/customer-detail/components/customer-address-section/index.ts +1 -0
  1112. package/src/routes/customers/customer-detail/components/customer-general-section/customer-general-section.tsx +127 -0
  1113. package/src/routes/customers/customer-detail/components/customer-general-section/index.ts +1 -0
  1114. package/src/routes/customers/customer-detail/components/customer-group-section/customer-group-section.tsx +269 -0
  1115. package/src/routes/customers/customer-detail/components/customer-group-section/index.ts +1 -0
  1116. package/src/routes/customers/customer-detail/components/customer-order-section/customer-order-section.tsx +130 -0
  1117. package/src/routes/customers/customer-detail/components/customer-order-section/index.ts +1 -0
  1118. package/src/routes/customers/customer-detail/customer-detail.tsx +58 -0
  1119. package/src/routes/customers/customer-detail/index.ts +3 -0
  1120. package/src/routes/customers/customer-detail/loader.ts +19 -0
  1121. package/src/routes/customers/customer-edit/components/edit-customer-form/edit-customer-form.tsx +178 -0
  1122. package/src/routes/customers/customer-edit/components/edit-customer-form/index.ts +1 -0
  1123. package/src/routes/customers/customer-edit/customer-edit.tsx +26 -0
  1124. package/src/routes/customers/customer-edit/index.ts +1 -0
  1125. package/src/routes/customers/customer-list/components/customer-list-table/customer-list-table.tsx +124 -0
  1126. package/src/routes/customers/customer-list/components/customer-list-table/index.ts +1 -0
  1127. package/src/routes/customers/customer-list/customer-list.tsx +18 -0
  1128. package/src/routes/customers/customer-list/index.ts +1 -0
  1129. package/src/routes/customers/customer-metadata/customer-metadata.tsx +23 -0
  1130. package/src/routes/customers/customer-metadata/index.ts +1 -0
  1131. package/src/routes/customers/customers-add-customer-group/components/add-customers-form/add-customer-groups-form.tsx +257 -0
  1132. package/src/routes/customers/customers-add-customer-group/components/add-customers-form/index.ts +1 -0
  1133. package/src/routes/customers/customers-add-customer-group/customer-add-customer-groups.tsx +13 -0
  1134. package/src/routes/customers/customers-add-customer-group/index.ts +1 -0
  1135. package/src/routes/home/home.tsx +12 -0
  1136. package/src/routes/home/index.ts +1 -0
  1137. package/src/routes/inventory/common/constants.ts +1 -0
  1138. package/src/routes/inventory/inventory-create/components/inventory-create-form/index.ts +1 -0
  1139. package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-availability-form.tsx +78 -0
  1140. package/src/routes/inventory/inventory-create/components/inventory-create-form/inventory-create-form.tsx +517 -0
  1141. package/src/routes/inventory/inventory-create/components/inventory-create-form/schema.ts +23 -0
  1142. package/src/routes/inventory/inventory-create/index.ts +1 -0
  1143. package/src/routes/inventory/inventory-create/inventory-create.tsx +21 -0
  1144. package/src/routes/inventory/inventory-detail/breadcrumb.tsx +31 -0
  1145. package/src/routes/inventory/inventory-detail/components/adjust-inventory/adjust-inventory-drawer.tsx +55 -0
  1146. package/src/routes/inventory/inventory-detail/components/adjust-inventory/components/adjust-inventory-form.tsx +178 -0
  1147. package/src/routes/inventory/inventory-detail/components/adjust-inventory/index.ts +1 -0
  1148. package/src/routes/inventory/inventory-detail/components/edit-inventory-item/components/edit-item-form.tsx +105 -0
  1149. package/src/routes/inventory/inventory-detail/components/edit-inventory-item/edit-item-drawer.tsx +33 -0
  1150. package/src/routes/inventory/inventory-detail/components/edit-inventory-item/index.ts +1 -0
  1151. package/src/routes/inventory/inventory-detail/components/edit-inventory-item-attributes/components/edit-item-attributes-form.tsx +270 -0
  1152. package/src/routes/inventory/inventory-detail/components/edit-inventory-item-attributes/edit-item-attributes-drawer.tsx +33 -0
  1153. package/src/routes/inventory/inventory-detail/components/edit-inventory-item-attributes/index.ts +1 -0
  1154. package/src/routes/inventory/inventory-detail/components/inventory-item-attributes/attributes-section.tsx +50 -0
  1155. package/src/routes/inventory/inventory-detail/components/inventory-item-general-section.tsx +65 -0
  1156. package/src/routes/inventory/inventory-detail/components/inventory-item-location-levels.tsx +26 -0
  1157. package/src/routes/inventory/inventory-detail/components/inventory-item-reservations.tsx +28 -0
  1158. package/src/routes/inventory/inventory-detail/components/inventory-item-variants/variants-section.tsx +72 -0
  1159. package/src/routes/inventory/inventory-detail/components/location-levels-table/location-list-table.tsx +49 -0
  1160. package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-columns.tsx +170 -0
  1161. package/src/routes/inventory/inventory-detail/components/location-levels-table/use-location-list-table-query.tsx +32 -0
  1162. package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-item.tsx +51 -0
  1163. package/src/routes/inventory/inventory-detail/components/manage-locations/components/location-search-input.tsx +34 -0
  1164. package/src/routes/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx +183 -0
  1165. package/src/routes/inventory/inventory-detail/components/manage-locations/index.ts +1 -0
  1166. package/src/routes/inventory/inventory-detail/components/manage-locations/manage-locations-drawer.tsx +40 -0
  1167. package/src/routes/inventory/inventory-detail/components/reservations-table/reservation-actions.tsx +64 -0
  1168. package/src/routes/inventory/inventory-detail/components/reservations-table/reservation-list-table.tsx +70 -0
  1169. package/src/routes/inventory/inventory-detail/components/reservations-table/use-reservation-list-table-columns.tsx +93 -0
  1170. package/src/routes/inventory/inventory-detail/components/reservations-table/use-reservation-list-table-query.tsx +35 -0
  1171. package/src/routes/inventory/inventory-detail/constants.ts +2 -0
  1172. package/src/routes/inventory/inventory-detail/index.ts +3 -0
  1173. package/src/routes/inventory/inventory-detail/inventory-detail.tsx +80 -0
  1174. package/src/routes/inventory/inventory-detail/loader.ts +21 -0
  1175. package/src/routes/inventory/inventory-list/components/inventory-actions.tsx +53 -0
  1176. package/src/routes/inventory/inventory-list/components/inventory-list-table.tsx +105 -0
  1177. package/src/routes/inventory/inventory-list/components/use-inventory-table-columns.tsx +125 -0
  1178. package/src/routes/inventory/inventory-list/components/use-inventory-table-filters.tsx +82 -0
  1179. package/src/routes/inventory/inventory-list/components/use-inventory-table-query.tsx +70 -0
  1180. package/src/routes/inventory/inventory-list/index.ts +1 -0
  1181. package/src/routes/inventory/inventory-list/inventory-list.tsx +18 -0
  1182. package/src/routes/inventory/inventory-metadata/index.ts +1 -0
  1183. package/src/routes/inventory/inventory-metadata/inventory-metadata.tsx +27 -0
  1184. package/src/routes/inventory/inventory-stock/components/inventory-stock-form/index.ts +1 -0
  1185. package/src/routes/inventory/inventory-stock/components/inventory-stock-form/inventory-stock-form.tsx +163 -0
  1186. package/src/routes/inventory/inventory-stock/hooks/use-inventory-stock-columns.tsx +76 -0
  1187. package/src/routes/inventory/inventory-stock/index.ts +1 -0
  1188. package/src/routes/inventory/inventory-stock/inventory-stock.tsx +58 -0
  1189. package/src/routes/inventory/inventory-stock/schema.ts +22 -0
  1190. package/src/routes/invite/index.ts +1 -0
  1191. package/src/routes/invite/invite.tsx +416 -0
  1192. package/src/routes/locations/common/components/conditional-price-form/conditional-price-form.tsx +713 -0
  1193. package/src/routes/locations/common/components/conditional-price-form/index.ts +1 -0
  1194. package/src/routes/locations/common/components/geo-zone-form/geo-zone-form.tsx +327 -0
  1195. package/src/routes/locations/common/components/geo-zone-form/index.ts +1 -0
  1196. package/src/routes/locations/common/components/shipping-option-price-cell/index.ts +1 -0
  1197. package/src/routes/locations/common/components/shipping-option-price-cell/shipping-option-price-cell.tsx +261 -0
  1198. package/src/routes/locations/common/components/shipping-option-price-provider/index.ts +2 -0
  1199. package/src/routes/locations/common/components/shipping-option-price-provider/shipping-option-price-context.tsx +10 -0
  1200. package/src/routes/locations/common/components/shipping-option-price-provider/shipping-option-price-provider.tsx +23 -0
  1201. package/src/routes/locations/common/components/shipping-option-price-provider/use-shipping-option-price.tsx +14 -0
  1202. package/src/routes/locations/common/constants.ts +16 -0
  1203. package/src/routes/locations/common/hooks/use-shipping-option-price-columns.tsx +174 -0
  1204. package/src/routes/locations/common/schema.ts +192 -0
  1205. package/src/routes/locations/common/types.ts +12 -0
  1206. package/src/routes/locations/common/utils/get-custom-shipping-option-price-field-info.ts +19 -0
  1207. package/src/routes/locations/common/utils/price-rule-helpers.ts +41 -0
  1208. package/src/routes/locations/location-create/components/create-location-form/create-location-form.tsx +248 -0
  1209. package/src/routes/locations/location-create/components/create-location-form/index.ts +1 -0
  1210. package/src/routes/locations/location-create/index.ts +1 -0
  1211. package/src/routes/locations/location-create/location-create.tsx +10 -0
  1212. package/src/routes/locations/location-detail/breadcrumb.tsx +31 -0
  1213. package/src/routes/locations/location-detail/components/location-fulfillment-providers-section/index.ts +1 -0
  1214. package/src/routes/locations/location-detail/components/location-fulfillment-providers-section/location-fulfillment-providers-section.tsx +81 -0
  1215. package/src/routes/locations/location-detail/components/location-general-section/index.ts +1 -0
  1216. package/src/routes/locations/location-detail/components/location-general-section/location-general-section.tsx +661 -0
  1217. package/src/routes/locations/location-detail/components/location-sales-channels-section/index.ts +1 -0
  1218. package/src/routes/locations/location-detail/components/location-sales-channels-section/locations-sales-channels-section.tsx +76 -0
  1219. package/src/routes/locations/location-detail/constants.ts +2 -0
  1220. package/src/routes/locations/location-detail/index.ts +3 -0
  1221. package/src/routes/locations/location-detail/loader.ts +23 -0
  1222. package/src/routes/locations/location-detail/location-detail.tsx +64 -0
  1223. package/src/routes/locations/location-edit/components/edit-location-form/edit-location-form.tsx +234 -0
  1224. package/src/routes/locations/location-edit/components/edit-location-form/index.ts +1 -0
  1225. package/src/routes/locations/location-edit/index.ts +1 -0
  1226. package/src/routes/locations/location-edit/location-edit.tsx +33 -0
  1227. package/src/routes/locations/location-fulfillment-providers/components/edit-fulfillment-providers-form/edit-fulfillment-providers-form.tsx +207 -0
  1228. package/src/routes/locations/location-fulfillment-providers/components/edit-fulfillment-providers-form/index.ts +1 -0
  1229. package/src/routes/locations/location-fulfillment-providers/index.ts +1 -0
  1230. package/src/routes/locations/location-fulfillment-providers/location-fulfillment-providers.tsx +27 -0
  1231. package/src/routes/locations/location-list/components/location-list-item/index.ts +1 -0
  1232. package/src/routes/locations/location-list/components/location-list-item/location-list-item.tsx +186 -0
  1233. package/src/routes/locations/location-list/constants.ts +3 -0
  1234. package/src/routes/locations/location-list/index.ts +1 -0
  1235. package/src/routes/locations/location-list/location-list.tsx +128 -0
  1236. package/src/routes/locations/location-list/use-location-list-table-columns.tsx +185 -0
  1237. package/src/routes/locations/location-list/use-location-list-table-query.tsx +22 -0
  1238. package/src/routes/locations/location-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +177 -0
  1239. package/src/routes/locations/location-sales-channels/components/edit-sales-channels-form/index.ts +1 -0
  1240. package/src/routes/locations/location-sales-channels/index.ts +1 -0
  1241. package/src/routes/locations/location-sales-channels/location-sales-channels.tsx +27 -0
  1242. package/src/routes/locations/location-service-zone-create/components/create-service-zone-form/create-service-zone-form.tsx +146 -0
  1243. package/src/routes/locations/location-service-zone-create/components/create-service-zone-form/index.ts +1 -0
  1244. package/src/routes/locations/location-service-zone-create/index.ts +1 -0
  1245. package/src/routes/locations/location-service-zone-create/location-service-zone-create.tsx +47 -0
  1246. package/src/routes/locations/location-service-zone-edit/components/edit-region-form/edit-service-zone-form.tsx +105 -0
  1247. package/src/routes/locations/location-service-zone-edit/components/edit-region-form/index.ts +1 -0
  1248. package/src/routes/locations/location-service-zone-edit/index.ts +1 -0
  1249. package/src/routes/locations/location-service-zone-edit/location-service-zone-edit.tsx +47 -0
  1250. package/src/routes/locations/location-service-zone-manage-areas/components/edit-region-areas-form/edit-service-zone-areas-form.tsx +120 -0
  1251. package/src/routes/locations/location-service-zone-manage-areas/components/edit-region-areas-form/index.ts +1 -0
  1252. package/src/routes/locations/location-service-zone-manage-areas/index.ts +1 -0
  1253. package/src/routes/locations/location-service-zone-manage-areas/location-service-zone-manage-areas.tsx +41 -0
  1254. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-option-details-form.tsx +297 -0
  1255. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-form.tsx +359 -0
  1256. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-prices-form.tsx +145 -0
  1257. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/index.ts +1 -0
  1258. package/src/routes/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/schema.ts +44 -0
  1259. package/src/routes/locations/location-service-zone-shipping-option-create/constants.ts +2 -0
  1260. package/src/routes/locations/location-service-zone-shipping-option-create/index.ts +1 -0
  1261. package/src/routes/locations/location-service-zone-shipping-option-create/location-service-zone-shipping-option-create.tsx +55 -0
  1262. package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/edit-shipping-option-form.tsx +314 -0
  1263. package/src/routes/locations/location-service-zone-shipping-option-edit/components/edit-region-form/index.ts +1 -0
  1264. package/src/routes/locations/location-service-zone-shipping-option-edit/index.ts +1 -0
  1265. package/src/routes/locations/location-service-zone-shipping-option-edit/location-service-zone-shipping-option-edit.tsx +59 -0
  1266. package/src/routes/locations/location-service-zone-shipping-option-pricing/components/create-shipping-options-form/edit-shipping-options-pricing-form.tsx +384 -0
  1267. package/src/routes/locations/location-service-zone-shipping-option-pricing/components/create-shipping-options-form/index.ts +1 -0
  1268. package/src/routes/locations/location-service-zone-shipping-option-pricing/index.ts +1 -0
  1269. package/src/routes/locations/location-service-zone-shipping-option-pricing/location-service-zone-shipping-option-pricing.tsx +36 -0
  1270. package/src/routes/login/components/cloud-auth-login.tsx +166 -0
  1271. package/src/routes/login/index.ts +1 -0
  1272. package/src/routes/login/login.tsx +175 -0
  1273. package/src/routes/no-match/index.ts +1 -0
  1274. package/src/routes/no-match/no-match.tsx +36 -0
  1275. package/src/routes/orders/common/placeholders.tsx +48 -0
  1276. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/constants.ts +6 -0
  1277. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/index.ts +1 -0
  1278. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-form.tsx +349 -0
  1279. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/order-allocate-items-item.tsx +346 -0
  1280. package/src/routes/orders/order-allocate-items/components/order-create-fulfillment-form/utils.ts +28 -0
  1281. package/src/routes/orders/order-allocate-items/index.ts +1 -0
  1282. package/src/routes/orders/order-allocate-items/order-allocate-items.tsx +26 -0
  1283. package/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/index.ts +1 -0
  1284. package/src/routes/orders/order-balance-settlement/components/order-balance-settlement-form/order-balance-settlement-form.tsx +396 -0
  1285. package/src/routes/orders/order-balance-settlement/index.ts +1 -0
  1286. package/src/routes/orders/order-create-claim/claim-create.tsx +84 -0
  1287. package/src/routes/orders/order-create-claim/components/add-claim-items-table/add-claim-items-table.tsx +283 -0
  1288. package/src/routes/orders/order-create-claim/components/add-claim-items-table/index.ts +1 -0
  1289. package/src/routes/orders/order-create-claim/components/add-claim-items-table/use-claim-item-table-columns.tsx +103 -0
  1290. package/src/routes/orders/order-create-claim/components/add-claim-items-table/use-claim-item-table-filters.tsx +32 -0
  1291. package/src/routes/orders/order-create-claim/components/add-claim-items-table/use-claim-item-table-query.tsx +61 -0
  1292. package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/add-claim-outbound-items-table.tsx +94 -0
  1293. package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/index.ts +1 -0
  1294. package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-columns.tsx +68 -0
  1295. package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-filters.tsx +22 -0
  1296. package/src/routes/orders/order-create-claim/components/add-claim-outbound-items-table/use-claim-outbound-item-table-query.tsx +40 -0
  1297. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-create-form.tsx +1092 -0
  1298. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-inbound-item.tsx +244 -0
  1299. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-outbound-item.tsx +121 -0
  1300. package/src/routes/orders/order-create-claim/components/claim-create-form/claim-outbound-section.tsx +442 -0
  1301. package/src/routes/orders/order-create-claim/components/claim-create-form/index.ts +1 -0
  1302. package/src/routes/orders/order-create-claim/components/claim-create-form/item-placeholder.tsx +11 -0
  1303. package/src/routes/orders/order-create-claim/components/claim-create-form/schema.ts +24 -0
  1304. package/src/routes/orders/order-create-claim/index.ts +1 -0
  1305. package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/add-order-edit-items-table.tsx +87 -0
  1306. package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/index.ts +1 -0
  1307. package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/use-order-edit-item-table-columns.tsx +68 -0
  1308. package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/use-order-edit-item-table-filters.tsx +22 -0
  1309. package/src/routes/orders/order-create-edit/components/add-order-edit-items-table/use-order-edit-item-table-query.tsx +26 -0
  1310. package/src/routes/orders/order-create-edit/components/order-edit-create-form/index.ts +1 -0
  1311. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-create-form.tsx +231 -0
  1312. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-item.tsx +257 -0
  1313. package/src/routes/orders/order-create-edit/components/order-edit-create-form/order-edit-items-section.tsx +145 -0
  1314. package/src/routes/orders/order-create-edit/components/order-edit-create-form/schema.ts +8 -0
  1315. package/src/routes/orders/order-create-edit/index.ts +1 -0
  1316. package/src/routes/orders/order-create-edit/order-edit-create.tsx +65 -0
  1317. package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/add-exchange-inbound-items-table.tsx +193 -0
  1318. package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/index.ts +1 -0
  1319. package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/use-exchange-item-table-columns.tsx +103 -0
  1320. package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/use-exchange-item-table-filters.tsx +22 -0
  1321. package/src/routes/orders/order-create-exchange/components/add-exchange-inbound-items-table/use-exchange-item-table-query.tsx +26 -0
  1322. package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/add-exchange-outbound-items-table.tsx +94 -0
  1323. package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/index.ts +1 -0
  1324. package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-columns.tsx +68 -0
  1325. package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-filters.tsx +22 -0
  1326. package/src/routes/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-query.tsx +26 -0
  1327. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx +652 -0
  1328. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-item.tsx +269 -0
  1329. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-section.tsx +546 -0
  1330. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-item.tsx +140 -0
  1331. package/src/routes/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-section.tsx +450 -0
  1332. package/src/routes/orders/order-create-exchange/components/exchange-create-form/index.ts +1 -0
  1333. package/src/routes/orders/order-create-exchange/components/exchange-create-form/schema.ts +25 -0
  1334. package/src/routes/orders/order-create-exchange/exchange-create.tsx +84 -0
  1335. package/src/routes/orders/order-create-exchange/index.ts +1 -0
  1336. package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/constants.ts +8 -0
  1337. package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/index.ts +1 -0
  1338. package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-form.tsx +437 -0
  1339. package/src/routes/orders/order-create-fulfillment/components/order-create-fulfillment-form/order-create-fulfillment-item.tsx +250 -0
  1340. package/src/routes/orders/order-create-fulfillment/index.ts +1 -0
  1341. package/src/routes/orders/order-create-fulfillment/order-create-fulfillments.tsx +33 -0
  1342. package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +306 -0
  1343. package/src/routes/orders/order-create-refund/components/create-refund-form/index.ts +1 -0
  1344. package/src/routes/orders/order-create-refund/index.ts +1 -0
  1345. package/src/routes/orders/order-create-refund/order-create-refund.tsx +31 -0
  1346. package/src/routes/orders/order-create-return/components/add-return-items-table/add-return-items-table.tsx +284 -0
  1347. package/src/routes/orders/order-create-return/components/add-return-items-table/index.ts +1 -0
  1348. package/src/routes/orders/order-create-return/components/add-return-items-table/use-return-item-table-columns.tsx +103 -0
  1349. package/src/routes/orders/order-create-return/components/add-return-items-table/use-return-item-table-filters.tsx +32 -0
  1350. package/src/routes/orders/order-create-return/components/add-return-items-table/use-return-item-table-query.tsx +61 -0
  1351. package/src/routes/orders/order-create-return/components/return-create-form/index.ts +1 -0
  1352. package/src/routes/orders/order-create-return/components/return-create-form/return-create-form.tsx +785 -0
  1353. package/src/routes/orders/order-create-return/components/return-create-form/return-item.tsx +246 -0
  1354. package/src/routes/orders/order-create-return/components/return-create-form/schema.ts +19 -0
  1355. package/src/routes/orders/order-create-return/index.ts +1 -0
  1356. package/src/routes/orders/order-create-return/return-create.tsx +80 -0
  1357. package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/constants.ts +13 -0
  1358. package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/index.ts +1 -0
  1359. package/src/routes/orders/order-create-shipment/components/order-create-shipment-form/order-create-shipment-form.tsx +234 -0
  1360. package/src/routes/orders/order-create-shipment/index.ts +1 -0
  1361. package/src/routes/orders/order-create-shipment/order-create-shipment.tsx +30 -0
  1362. package/src/routes/orders/order-detail/breadcrumb.tsx +27 -0
  1363. package/src/routes/orders/order-detail/components/active-order-claim-section/active-order-claim-section.tsx +79 -0
  1364. package/src/routes/orders/order-detail/components/active-order-claim-section/index.ts +1 -0
  1365. package/src/routes/orders/order-detail/components/active-order-exchange-section/active-order-exchange-section.tsx +83 -0
  1366. package/src/routes/orders/order-detail/components/active-order-exchange-section/index.ts +1 -0
  1367. package/src/routes/orders/order-detail/components/active-order-return-section/active-order-return-section.tsx +82 -0
  1368. package/src/routes/orders/order-detail/components/active-order-return-section/index.ts +1 -0
  1369. package/src/routes/orders/order-detail/components/copy-payment-link/copy-payment-link.tsx +80 -0
  1370. package/src/routes/orders/order-detail/components/copy-payment-link/index.ts +1 -0
  1371. package/src/routes/orders/order-detail/components/order-active-edit-section/index.ts +1 -0
  1372. package/src/routes/orders/order-detail/components/order-active-edit-section/order-active-edit-section.tsx +199 -0
  1373. package/src/routes/orders/order-detail/components/order-activity-section/activity-items.tsx +125 -0
  1374. package/src/routes/orders/order-detail/components/order-activity-section/change-details-tooltip.tsx +74 -0
  1375. package/src/routes/orders/order-detail/components/order-activity-section/index.ts +1 -0
  1376. package/src/routes/orders/order-detail/components/order-activity-section/order-activity-section.tsx +25 -0
  1377. package/src/routes/orders/order-detail/components/order-activity-section/order-note-form.tsx +112 -0
  1378. package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +1121 -0
  1379. package/src/routes/orders/order-detail/components/order-customer-section/index.ts +1 -0
  1380. package/src/routes/orders/order-detail/components/order-customer-section/order-customer-section.tsx +68 -0
  1381. package/src/routes/orders/order-detail/components/order-fulfillment-section/index.ts +1 -0
  1382. package/src/routes/orders/order-detail/components/order-fulfillment-section/order-fulfillment-section.tsx +489 -0
  1383. package/src/routes/orders/order-detail/components/order-general-section/index.ts +1 -0
  1384. package/src/routes/orders/order-detail/components/order-general-section/order-general-section.tsx +136 -0
  1385. package/src/routes/orders/order-detail/components/order-payment-section/index.ts +1 -0
  1386. package/src/routes/orders/order-detail/components/order-payment-section/order-payment-section.tsx +465 -0
  1387. package/src/routes/orders/order-detail/components/order-summary-section/index.ts +1 -0
  1388. package/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +1270 -0
  1389. package/src/routes/orders/order-detail/components/order-summary-section/return-info-popover.tsx +90 -0
  1390. package/src/routes/orders/order-detail/components/order-summary-section/shipping-info-popover.tsx +48 -0
  1391. package/src/routes/orders/order-detail/constants.ts +64 -0
  1392. package/src/routes/orders/order-detail/index.ts +3 -0
  1393. package/src/routes/orders/order-detail/loader.ts +21 -0
  1394. package/src/routes/orders/order-detail/order-detail.tsx +96 -0
  1395. package/src/routes/orders/order-edit-billing-address/components/edit-order-billing-address-form/edit-order-billing-address-form.tsx +250 -0
  1396. package/src/routes/orders/order-edit-billing-address/components/edit-order-billing-address-form/index.ts +1 -0
  1397. package/src/routes/orders/order-edit-billing-address/index.ts +1 -0
  1398. package/src/routes/orders/order-edit-billing-address/order-edit-billing-address.tsx +31 -0
  1399. package/src/routes/orders/order-edit-email/components/edit-order-email-form/edit-order-email-form.tsx +95 -0
  1400. package/src/routes/orders/order-edit-email/components/edit-order-email-form/index.ts +1 -0
  1401. package/src/routes/orders/order-edit-email/index.ts +1 -0
  1402. package/src/routes/orders/order-edit-email/order-edit-email.tsx +31 -0
  1403. package/src/routes/orders/order-edit-shipping-address/components/edit-order-shipping-address-form/edit-order-shipping-address-form.tsx +247 -0
  1404. package/src/routes/orders/order-edit-shipping-address/components/edit-order-shipping-address-form/index.ts +1 -0
  1405. package/src/routes/orders/order-edit-shipping-address/index.ts +1 -0
  1406. package/src/routes/orders/order-edit-shipping-address/order-edit-shipping-address.tsx +31 -0
  1407. package/src/routes/orders/order-export/components/export-filters.tsx +22 -0
  1408. package/src/routes/orders/order-export/index.ts +1 -0
  1409. package/src/routes/orders/order-export/order-export.tsx +66 -0
  1410. package/src/routes/orders/order-list/components/order-list-table/components/save-view-dropdown.tsx +81 -0
  1411. package/src/routes/orders/order-list/components/order-list-table/configurable-order-list-table.tsx +24 -0
  1412. package/src/routes/orders/order-list/components/order-list-table/constants.ts +14 -0
  1413. package/src/routes/orders/order-list/components/order-list-table/hooks/use-order-data-table-columns.tsx +153 -0
  1414. package/src/routes/orders/order-list/components/order-list-table/index.ts +1 -0
  1415. package/src/routes/orders/order-list/components/order-list-table/order-list-table.tsx +89 -0
  1416. package/src/routes/orders/order-list/components/order-list-table/order-table-adapter.tsx +133 -0
  1417. package/src/routes/orders/order-list/const.ts +18 -0
  1418. package/src/routes/orders/order-list/index.ts +1 -0
  1419. package/src/routes/orders/order-list/order-list.tsx +20 -0
  1420. package/src/routes/orders/order-metadata/index.ts +1 -0
  1421. package/src/routes/orders/order-metadata/order-metadata.tsx +26 -0
  1422. package/src/routes/orders/order-receive-return/components/order-receive-return-form/constants.ts +12 -0
  1423. package/src/routes/orders/order-receive-return/components/order-receive-return-form/dismissed-quantity.tsx +167 -0
  1424. package/src/routes/orders/order-receive-return/components/order-receive-return-form/index.ts +1 -0
  1425. package/src/routes/orders/order-receive-return/components/order-receive-return-form/order-receive-return-form.tsx +386 -0
  1426. package/src/routes/orders/order-receive-return/index.ts +1 -0
  1427. package/src/routes/orders/order-receive-return/order-receive-return.tsx +96 -0
  1428. package/src/routes/orders/order-request-transfer/components/create-order-transfer-form/create-order-transfer-form.tsx +152 -0
  1429. package/src/routes/orders/order-request-transfer/components/create-order-transfer-form/index.ts +1 -0
  1430. package/src/routes/orders/order-request-transfer/components/create-order-transfer-form/transfer-header.tsx +299 -0
  1431. package/src/routes/orders/order-request-transfer/index.ts +1 -0
  1432. package/src/routes/orders/order-request-transfer/order-request-transfer.tsx +34 -0
  1433. package/src/routes/price-lists/common/components/price-list-customer-group-rule-form/index.ts +1 -0
  1434. package/src/routes/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx +194 -0
  1435. package/src/routes/price-lists/common/constants.ts +20 -0
  1436. package/src/routes/price-lists/common/hooks/use-delete-price-list-action.tsx +50 -0
  1437. package/src/routes/price-lists/common/hooks/use-price-list-currency-data.tsx +79 -0
  1438. package/src/routes/price-lists/common/hooks/use-price-list-grid-columns.tsx +91 -0
  1439. package/src/routes/price-lists/common/schemas.ts +96 -0
  1440. package/src/routes/price-lists/common/utils.ts +123 -0
  1441. package/src/routes/price-lists/price-list-configuration/components/price-list-configuration-form/index.ts +1 -0
  1442. package/src/routes/price-lists/price-list-configuration/components/price-list-configuration-form/price-list-configuration-form.tsx +311 -0
  1443. package/src/routes/price-lists/price-list-configuration/index.ts +1 -0
  1444. package/src/routes/price-lists/price-list-configuration/price-list-configuration.tsx +68 -0
  1445. package/src/routes/price-lists/price-list-create/components/price-list-create-form/index.ts +1 -0
  1446. package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx +364 -0
  1447. package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-details-form.tsx +331 -0
  1448. package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-prices-form.tsx +96 -0
  1449. package/src/routes/price-lists/price-list-create/components/price-list-create-form/price-list-products-form.tsx +187 -0
  1450. package/src/routes/price-lists/price-list-create/components/price-list-create-form/schema.ts +59 -0
  1451. package/src/routes/price-lists/price-list-create/index.ts +1 -0
  1452. package/src/routes/price-lists/price-list-create/price-list-create.tsx +20 -0
  1453. package/src/routes/price-lists/price-list-detail/breadcrumb.tsx +23 -0
  1454. package/src/routes/price-lists/price-list-detail/components/price-list-configuration-section/index.ts +1 -0
  1455. package/src/routes/price-lists/price-list-detail/components/price-list-configuration-section/price-list-configuration-section.tsx +96 -0
  1456. package/src/routes/price-lists/price-list-detail/components/price-list-general-section/index.ts +1 -0
  1457. package/src/routes/price-lists/price-list-detail/components/price-list-general-section/price-list-general-section.tsx +94 -0
  1458. package/src/routes/price-lists/price-list-detail/components/price-list-product-section/index.ts +1 -0
  1459. package/src/routes/price-lists/price-list-detail/components/price-list-product-section/price-list-product-section.tsx +285 -0
  1460. package/src/routes/price-lists/price-list-detail/index.ts +3 -0
  1461. package/src/routes/price-lists/price-list-detail/loader.ts +16 -0
  1462. package/src/routes/price-lists/price-list-detail/price-list-detail.tsx +48 -0
  1463. package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/edit-price-list-form.tsx +193 -0
  1464. package/src/routes/price-lists/price-list-edit/components/price-list-edit-form/index.ts +1 -0
  1465. package/src/routes/price-lists/price-list-edit/index.ts +1 -0
  1466. package/src/routes/price-lists/price-list-edit/price-list-edit.tsx +28 -0
  1467. package/src/routes/price-lists/price-list-list/components/price-list-list-table/index.ts +1 -0
  1468. package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-count-cell.tsx +19 -0
  1469. package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-list-list-table-actions.tsx +42 -0
  1470. package/src/routes/price-lists/price-list-list/components/price-list-list-table/price-list-list-table.tsx +76 -0
  1471. package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-columns.tsx +45 -0
  1472. package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-filters.tsx +7 -0
  1473. package/src/routes/price-lists/price-list-list/components/price-list-list-table/use-pricing-table-query.tsx +25 -0
  1474. package/src/routes/price-lists/price-list-list/index.ts +1 -0
  1475. package/src/routes/price-lists/price-list-list/price-list-list.tsx +18 -0
  1476. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/index.ts +1 -0
  1477. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx +305 -0
  1478. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-prices-form.tsx +97 -0
  1479. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-product-ids-form.tsx +231 -0
  1480. package/src/routes/price-lists/price-list-prices-add/components/price-list-prices-add-form/schema.ts +27 -0
  1481. package/src/routes/price-lists/price-list-prices-add/index.ts +1 -0
  1482. package/src/routes/price-lists/price-list-prices-add/price-list-prices-add.tsx +35 -0
  1483. package/src/routes/price-lists/price-list-prices-edit/components/price-list-prices-edit-form/index.ts +1 -0
  1484. package/src/routes/price-lists/price-list-prices-edit/components/price-list-prices-edit-form/price-list-prices-edit-form.tsx +313 -0
  1485. package/src/routes/price-lists/price-list-prices-edit/index.ts +1 -0
  1486. package/src/routes/price-lists/price-list-prices-edit/price-list-prices-edit.tsx +65 -0
  1487. package/src/routes/product-tags/common/hooks/use-delete-product-tag-action.tsx +52 -0
  1488. package/src/routes/product-tags/product-tag-create/components/product-tag-create-form/index.ts +1 -0
  1489. package/src/routes/product-tags/product-tag-create/components/product-tag-create-form/product-tag-create-form.tsx +100 -0
  1490. package/src/routes/product-tags/product-tag-create/index.ts +1 -0
  1491. package/src/routes/product-tags/product-tag-create/product-tag-create.tsx +10 -0
  1492. package/src/routes/product-tags/product-tag-detail/breadcrumb.tsx +23 -0
  1493. package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/index.ts +1 -0
  1494. package/src/routes/product-tags/product-tag-detail/components/product-tag-general-section/product-tag-general-section.tsx +63 -0
  1495. package/src/routes/product-tags/product-tag-detail/components/product-tag-product-section/index.ts +1 -0
  1496. package/src/routes/product-tags/product-tag-detail/components/product-tag-product-section/product-tag-product-section.tsx +74 -0
  1497. package/src/routes/product-tags/product-tag-detail/index.ts +3 -0
  1498. package/src/routes/product-tags/product-tag-detail/loader.ts +17 -0
  1499. package/src/routes/product-tags/product-tag-detail/product-tag-detail.tsx +50 -0
  1500. package/src/routes/product-tags/product-tag-edit/components/product-tag-edit-form/index.ts +1 -0
  1501. package/src/routes/product-tags/product-tag-edit/components/product-tag-edit-form/product-tag-edit-form.tsx +88 -0
  1502. package/src/routes/product-tags/product-tag-edit/index.ts +1 -0
  1503. package/src/routes/product-tags/product-tag-edit/product-tag-edit.tsx +33 -0
  1504. package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/index.ts +1 -0
  1505. package/src/routes/product-tags/product-tag-list/components/product-tag-list-table/product-tag-list-table.tsx +148 -0
  1506. package/src/routes/product-tags/product-tag-list/index.ts +2 -0
  1507. package/src/routes/product-tags/product-tag-list/loader.ts +34 -0
  1508. package/src/routes/product-tags/product-tag-list/product-tag-list.tsx +21 -0
  1509. package/src/routes/product-tags/product-tag-metadata/index.ts +1 -0
  1510. package/src/routes/product-tags/product-tag-metadata/product-tag-metadata.tsx +26 -0
  1511. package/src/routes/product-types/common/hooks/use-delete-product-type-action.tsx +38 -0
  1512. package/src/routes/product-types/product-type-create/components/create-product-type-form/create-product-type-form.tsx +100 -0
  1513. package/src/routes/product-types/product-type-create/components/create-product-type-form/index.ts +1 -0
  1514. package/src/routes/product-types/product-type-create/index.ts +1 -0
  1515. package/src/routes/product-types/product-type-create/product-type-create.tsx +10 -0
  1516. package/src/routes/product-types/product-type-detail/breadcrumb.tsx +24 -0
  1517. package/src/routes/product-types/product-type-detail/components/product-type-general-section/index.ts +1 -0
  1518. package/src/routes/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx +63 -0
  1519. package/src/routes/product-types/product-type-detail/components/product-type-product-section/index.ts +1 -0
  1520. package/src/routes/product-types/product-type-detail/components/product-type-product-section/product-type-product-section.tsx +70 -0
  1521. package/src/routes/product-types/product-type-detail/index.ts +3 -0
  1522. package/src/routes/product-types/product-type-detail/loader.ts +17 -0
  1523. package/src/routes/product-types/product-type-detail/product-type-detail.tsx +49 -0
  1524. package/src/routes/product-types/product-type-edit/components/edit-product-type-form/edit-product-type-form.tsx +94 -0
  1525. package/src/routes/product-types/product-type-edit/components/edit-product-type-form/index.ts +1 -0
  1526. package/src/routes/product-types/product-type-edit/index.ts +1 -0
  1527. package/src/routes/product-types/product-type-edit/product-type-edit.tsx +28 -0
  1528. package/src/routes/product-types/product-type-list/components/product-type-list-table/index.ts +1 -0
  1529. package/src/routes/product-types/product-type-list/components/product-type-list-table/product-table-row-actions.tsx +59 -0
  1530. package/src/routes/product-types/product-type-list/components/product-type-list-table/product-type-list-table.tsx +98 -0
  1531. package/src/routes/product-types/product-type-list/index.ts +1 -0
  1532. package/src/routes/product-types/product-type-list/product-type-list.tsx +18 -0
  1533. package/src/routes/product-types/product-type-metadata/index.ts +1 -0
  1534. package/src/routes/product-types/product-type-metadata/product-type-metadata.tsx +26 -0
  1535. package/src/routes/product-variants/product-variant-detail/breadcrumb.tsx +31 -0
  1536. package/src/routes/product-variants/product-variant-detail/components/variant-general-section/index.ts +1 -0
  1537. package/src/routes/product-variants/product-variant-detail/components/variant-general-section/variant-general-section.tsx +112 -0
  1538. package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/index.ts +1 -0
  1539. package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/inventory-actions.tsx +26 -0
  1540. package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/use-inventory-table-columns.tsx +104 -0
  1541. package/src/routes/product-variants/product-variant-detail/components/variant-inventory-section/variant-inventory-section.tsx +94 -0
  1542. package/src/routes/product-variants/product-variant-detail/components/variant-media-section/index.ts +1 -0
  1543. package/src/routes/product-variants/product-variant-detail/components/variant-media-section/variant-media-section.tsx +77 -0
  1544. package/src/routes/product-variants/product-variant-detail/components/variant-prices-section/index.ts +1 -0
  1545. package/src/routes/product-variants/product-variant-detail/components/variant-prices-section/variant-prices-section.tsx +82 -0
  1546. package/src/routes/product-variants/product-variant-detail/constants.ts +2 -0
  1547. package/src/routes/product-variants/product-variant-detail/index.ts +3 -0
  1548. package/src/routes/product-variants/product-variant-detail/loader.ts +25 -0
  1549. package/src/routes/product-variants/product-variant-detail/product-variant-detail.tsx +85 -0
  1550. package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/index.ts +1 -0
  1551. package/src/routes/product-variants/product-variant-edit/components/product-edit-variant-form/product-edit-variant-form.tsx +447 -0
  1552. package/src/routes/product-variants/product-variant-edit/index.ts +2 -0
  1553. package/src/routes/product-variants/product-variant-edit/loader.ts +33 -0
  1554. package/src/routes/product-variants/product-variant-edit/product-variant-edit.tsx +62 -0
  1555. package/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/index.ts +1 -0
  1556. package/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx +376 -0
  1557. package/src/routes/product-variants/product-variant-manage-inventory-items/index.ts +1 -0
  1558. package/src/routes/product-variants/product-variant-manage-inventory-items/product-variant-manage-inventory-items.tsx +31 -0
  1559. package/src/routes/product-variants/product-variant-media/components/edit-product-variant-media-form/edit-product-variant-media-form.tsx +434 -0
  1560. package/src/routes/product-variants/product-variant-media/components/edit-product-variant-media-form/index.ts +1 -0
  1561. package/src/routes/product-variants/product-variant-media/index.ts +1 -0
  1562. package/src/routes/product-variants/product-variant-media/product-variant-media.tsx +38 -0
  1563. package/src/routes/product-variants/product-variant-metadata/index.ts +1 -0
  1564. package/src/routes/product-variants/product-variant-metadata/product-variant-metadata.tsx +30 -0
  1565. package/src/routes/products/common/components/category-combobox/category-combobox.tsx +499 -0
  1566. package/src/routes/products/common/components/category-combobox/index.ts +1 -0
  1567. package/src/routes/products/common/components/upload-media-form-item/index.ts +1 -0
  1568. package/src/routes/products/common/components/upload-media-form-item/upload-media-form-item.tsx +134 -0
  1569. package/src/routes/products/common/constants.ts +1 -0
  1570. package/src/routes/products/common/variant-pricing-form.tsx +99 -0
  1571. package/src/routes/products/product-attributes/components/product-attributes-form/index.ts +1 -0
  1572. package/src/routes/products/product-attributes/components/product-attributes-form/product-attributes-form.tsx +277 -0
  1573. package/src/routes/products/product-attributes/index.ts +1 -0
  1574. package/src/routes/products/product-attributes/product-attributes.tsx +33 -0
  1575. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/index.ts +1 -0
  1576. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +91 -0
  1577. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/index.ts +1 -0
  1578. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-media-section/product-create-details-media-section.tsx +338 -0
  1579. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/index.ts +1 -0
  1580. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +528 -0
  1581. package/src/routes/products/product-create/components/product-create-details-form/index.ts +1 -0
  1582. package/src/routes/products/product-create/components/product-create-details-form/product-create-details-form.tsx +44 -0
  1583. package/src/routes/products/product-create/components/product-create-form/index.ts +1 -0
  1584. package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +404 -0
  1585. package/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/index.ts +1 -0
  1586. package/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx +248 -0
  1587. package/src/routes/products/product-create/components/product-create-inventory-kit-form/index.ts +1 -0
  1588. package/src/routes/products/product-create/components/product-create-inventory-kit-form/product-create-inventory-kit-form.tsx +20 -0
  1589. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-attribute-section/index.ts +1 -0
  1590. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-attribute-section/product-create-details-attribute-section.tsx +155 -0
  1591. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-section/index.ts +1 -0
  1592. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-organize-section/product-create-details-organize-section.tsx +248 -0
  1593. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/index.ts +1 -0
  1594. package/src/routes/products/product-create/components/product-create-organize-form/components/product-create-sales-channel-stacked-modal/product-create-sales-channel-drawer.tsx +160 -0
  1595. package/src/routes/products/product-create/components/product-create-organize-form/constants.ts +1 -0
  1596. package/src/routes/products/product-create/components/product-create-organize-form/index.ts +1 -0
  1597. package/src/routes/products/product-create/components/product-create-organize-form/product-create-organize-form.tsx +33 -0
  1598. package/src/routes/products/product-create/components/product-create-variants-form/index.ts +1 -0
  1599. package/src/routes/products/product-create/components/product-create-variants-form/product-create-variants-form.tsx +204 -0
  1600. package/src/routes/products/product-create/constants.ts +163 -0
  1601. package/src/routes/products/product-create/index.ts +1 -0
  1602. package/src/routes/products/product-create/product-create.tsx +90 -0
  1603. package/src/routes/products/product-create/types.ts +6 -0
  1604. package/src/routes/products/product-create/utils.ts +118 -0
  1605. package/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +122 -0
  1606. package/src/routes/products/product-create-option/components/create-product-option-form/index.ts +1 -0
  1607. package/src/routes/products/product-create-option/index.ts +1 -0
  1608. package/src/routes/products/product-create-option/product-create-option.tsx +30 -0
  1609. package/src/routes/products/product-create-variant/components/create-product-variant-form/constants.ts +44 -0
  1610. package/src/routes/products/product-create-variant/components/create-product-variant-form/create-product-variant-form.tsx +387 -0
  1611. package/src/routes/products/product-create-variant/components/create-product-variant-form/details-tab.tsx +193 -0
  1612. package/src/routes/products/product-create-variant/components/create-product-variant-form/index.ts +1 -0
  1613. package/src/routes/products/product-create-variant/components/create-product-variant-form/inventory-kit-tab.tsx +188 -0
  1614. package/src/routes/products/product-create-variant/components/create-product-variant-form/pricing-tab.tsx +100 -0
  1615. package/src/routes/products/product-create-variant/index.ts +1 -0
  1616. package/src/routes/products/product-create-variant/product-create-variant.tsx +23 -0
  1617. package/src/routes/products/product-detail/breadcrumb.tsx +30 -0
  1618. package/src/routes/products/product-detail/components/product-attribute-section/index.ts +1 -0
  1619. package/src/routes/products/product-detail/components/product-attribute-section/product-attribute-section.tsx +53 -0
  1620. package/src/routes/products/product-detail/components/product-general-section/index.ts +1 -0
  1621. package/src/routes/products/product-detail/components/product-general-section/product-general-section.tsx +130 -0
  1622. package/src/routes/products/product-detail/components/product-media-section/index.ts +1 -0
  1623. package/src/routes/products/product-detail/components/product-media-section/product-media-section.tsx +220 -0
  1624. package/src/routes/products/product-detail/components/product-option-section/index.ts +1 -0
  1625. package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +113 -0
  1626. package/src/routes/products/product-detail/components/product-organization-section/index.ts +1 -0
  1627. package/src/routes/products/product-detail/components/product-organization-section/product-organization-section.tsx +107 -0
  1628. package/src/routes/products/product-detail/components/product-sales-channel-section/index.ts +1 -0
  1629. package/src/routes/products/product-detail/components/product-sales-channel-section/product-sales-channel-section.tsx +106 -0
  1630. package/src/routes/products/product-detail/components/product-shipping-profile-section/index.ts +1 -0
  1631. package/src/routes/products/product-detail/components/product-shipping-profile-section/product-shipping-profile-section.tsx +51 -0
  1632. package/src/routes/products/product-detail/components/product-variant-section/index.ts +1 -0
  1633. package/src/routes/products/product-detail/components/product-variant-section/product-variant-section.tsx +468 -0
  1634. package/src/routes/products/product-detail/constants.ts +6 -0
  1635. package/src/routes/products/product-detail/index.ts +3 -0
  1636. package/src/routes/products/product-detail/loader.ts +24 -0
  1637. package/src/routes/products/product-detail/product-detail.tsx +81 -0
  1638. package/src/routes/products/product-edit/components/edit-product-form/edit-product-form.tsx +246 -0
  1639. package/src/routes/products/product-edit/components/edit-product-form/index.ts +1 -0
  1640. package/src/routes/products/product-edit/index.ts +1 -0
  1641. package/src/routes/products/product-edit/product-edit.tsx +36 -0
  1642. package/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +125 -0
  1643. package/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts +1 -0
  1644. package/src/routes/products/product-edit-option/index.ts +1 -0
  1645. package/src/routes/products/product-edit-option/product-edit-option.tsx +35 -0
  1646. package/src/routes/products/product-export/components/export-filters.tsx +22 -0
  1647. package/src/routes/products/product-export/index.ts +1 -0
  1648. package/src/routes/products/product-export/product-export.tsx +67 -0
  1649. package/src/routes/products/product-image-variants-edit/components/variants-table-form/index.ts +1 -0
  1650. package/src/routes/products/product-image-variants-edit/components/variants-table-form/variants-table-form.tsx +264 -0
  1651. package/src/routes/products/product-image-variants-edit/index.ts +1 -0
  1652. package/src/routes/products/product-image-variants-edit/product-image-variants-edit.tsx +65 -0
  1653. package/src/routes/products/product-import/components/import-summary.tsx +50 -0
  1654. package/src/routes/products/product-import/components/upload-import.tsx +61 -0
  1655. package/src/routes/products/product-import/helpers/import-template.ts +12 -0
  1656. package/src/routes/products/product-import/index.ts +1 -0
  1657. package/src/routes/products/product-import/product-import.tsx +143 -0
  1658. package/src/routes/products/product-list/components/product-list-table/configurable-product-list-table.tsx +26 -0
  1659. package/src/routes/products/product-list/components/product-list-table/index.ts +1 -0
  1660. package/src/routes/products/product-list/components/product-list-table/product-list-table.tsx +203 -0
  1661. package/src/routes/products/product-list/components/product-list-table/product-table-adapter.tsx +51 -0
  1662. package/src/routes/products/product-list/components/product-list-table/use-product-table-filters.tsx +104 -0
  1663. package/src/routes/products/product-list/index.ts +2 -0
  1664. package/src/routes/products/product-list/loader.ts +28 -0
  1665. package/src/routes/products/product-list/product-list.tsx +18 -0
  1666. package/src/routes/products/product-media/components/edit-product-media-form/edit-product-media-form.tsx +457 -0
  1667. package/src/routes/products/product-media/components/edit-product-media-form/index.ts +1 -0
  1668. package/src/routes/products/product-media/components/product-media-gallery/index.ts +1 -0
  1669. package/src/routes/products/product-media/components/product-media-gallery/product-media-gallery.tsx +327 -0
  1670. package/src/routes/products/product-media/components/product-media-view/index.ts +1 -0
  1671. package/src/routes/products/product-media/components/product-media-view/product-media-view-context.tsx +9 -0
  1672. package/src/routes/products/product-media/components/product-media-view/product-media-view.tsx +54 -0
  1673. package/src/routes/products/product-media/components/product-media-view/use-product-media-view.tsx +14 -0
  1674. package/src/routes/products/product-media/index.ts +1 -0
  1675. package/src/routes/products/product-media/product-media.tsx +33 -0
  1676. package/src/routes/products/product-metadata/index.ts +1 -0
  1677. package/src/routes/products/product-metadata/product-metadata.tsx +28 -0
  1678. package/src/routes/products/product-organization/components/product-organization-form/index.ts +1 -0
  1679. package/src/routes/products/product-organization/components/product-organization-form/product-organization-form.tsx +218 -0
  1680. package/src/routes/products/product-organization/index.ts +1 -0
  1681. package/src/routes/products/product-organization/product-organization.tsx +32 -0
  1682. package/src/routes/products/product-prices/index.ts +1 -0
  1683. package/src/routes/products/product-prices/pricing-edit.tsx +149 -0
  1684. package/src/routes/products/product-prices/product-prices.tsx +26 -0
  1685. package/src/routes/products/product-sales-channels/components/edit-sales-channels-form/edit-sales-channels-form.tsx +155 -0
  1686. package/src/routes/products/product-sales-channels/components/edit-sales-channels-form/index.ts +1 -0
  1687. package/src/routes/products/product-sales-channels/index.ts +1 -0
  1688. package/src/routes/products/product-sales-channels/product-sales-channels.tsx +23 -0
  1689. package/src/routes/products/product-shipping-profile/components/product-organization-form/index.ts +1 -0
  1690. package/src/routes/products/product-shipping-profile/components/product-organization-form/product-shipping-profile-form.tsx +133 -0
  1691. package/src/routes/products/product-shipping-profile/index.ts +1 -0
  1692. package/src/routes/products/product-shipping-profile/product-shipping-profile.tsx +35 -0
  1693. package/src/routes/products/product-stock/components/product-stock-form/index.ts +1 -0
  1694. package/src/routes/products/product-stock/components/product-stock-form/product-stock-form.tsx +220 -0
  1695. package/src/routes/products/product-stock/hooks/use-product-stock-columns.tsx +227 -0
  1696. package/src/routes/products/product-stock/index.ts +2 -0
  1697. package/src/routes/products/product-stock/loader.ts +55 -0
  1698. package/src/routes/products/product-stock/product-stock.tsx +106 -0
  1699. package/src/routes/products/product-stock/schema.ts +33 -0
  1700. package/src/routes/products/product-stock/utils.ts +53 -0
  1701. package/src/routes/profile/profile-detail/components/profile-general-section/index.ts +1 -0
  1702. package/src/routes/profile/profile-detail/components/profile-general-section/profile-general-section.tsx +76 -0
  1703. package/src/routes/profile/profile-detail/index.ts +1 -0
  1704. package/src/routes/profile/profile-detail/profile-detail.tsx +30 -0
  1705. package/src/routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx +205 -0
  1706. package/src/routes/profile/profile-edit/index.ts +1 -0
  1707. package/src/routes/profile/profile-edit/profile-edit.tsx +26 -0
  1708. package/src/routes/promotions/common/edit-rules/components/edit-rules-form/edit-rules-form.tsx +76 -0
  1709. package/src/routes/promotions/common/edit-rules/components/edit-rules-form/form-schema.ts +32 -0
  1710. package/src/routes/promotions/common/edit-rules/components/edit-rules-form/index.ts +1 -0
  1711. package/src/routes/promotions/common/edit-rules/components/edit-rules-form/utils.ts +17 -0
  1712. package/src/routes/promotions/common/edit-rules/components/edit-rules-wrapper/edit-rules-wrapper.tsx +123 -0
  1713. package/src/routes/promotions/common/edit-rules/components/edit-rules-wrapper/index.ts +1 -0
  1714. package/src/routes/promotions/common/edit-rules/components/edit-rules-wrapper/utils.ts +9 -0
  1715. package/src/routes/promotions/common/edit-rules/components/rule-value-form-field/index.ts +1 -0
  1716. package/src/routes/promotions/common/edit-rules/components/rule-value-form-field/rule-value-form-field.tsx +168 -0
  1717. package/src/routes/promotions/common/edit-rules/components/rules-form-field/constants.ts +11 -0
  1718. package/src/routes/promotions/common/edit-rules/components/rules-form-field/index.ts +1 -0
  1719. package/src/routes/promotions/common/edit-rules/components/rules-form-field/rules-form-field.tsx +450 -0
  1720. package/src/routes/promotions/common/edit-rules/edit-rules.tsx +63 -0
  1721. package/src/routes/promotions/common/edit-rules/index.ts +1 -0
  1722. package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/add-campaign-promotion-form.tsx +244 -0
  1723. package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/campaign-details.tsx +145 -0
  1724. package/src/routes/promotions/promotion-add-campaign/components/add-campaign-promotion-form/index.ts +1 -0
  1725. package/src/routes/promotions/promotion-add-campaign/index.ts +1 -0
  1726. package/src/routes/promotions/promotion-add-campaign/promotion-add-campaign.tsx +29 -0
  1727. package/src/routes/promotions/promotion-create/components/create-promotion-form/constants.ts +11 -0
  1728. package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +1086 -0
  1729. package/src/routes/promotions/promotion-create/components/create-promotion-form/form-schema.ts +62 -0
  1730. package/src/routes/promotions/promotion-create/components/create-promotion-form/index.ts +1 -0
  1731. package/src/routes/promotions/promotion-create/components/create-promotion-form/templates.ts +140 -0
  1732. package/src/routes/promotions/promotion-create/index.ts +1 -0
  1733. package/src/routes/promotions/promotion-create/promotion-create.tsx +10 -0
  1734. package/src/routes/promotions/promotion-detail/breadcrumb.tsx +22 -0
  1735. package/src/routes/promotions/promotion-detail/components/campaign-section/campaign-section.tsx +92 -0
  1736. package/src/routes/promotions/promotion-detail/components/campaign-section/index.ts +1 -0
  1737. package/src/routes/promotions/promotion-detail/components/promotion-conditions-section/index.ts +1 -0
  1738. package/src/routes/promotions/promotion-detail/components/promotion-conditions-section/promotion-conditions-section.tsx +105 -0
  1739. package/src/routes/promotions/promotion-detail/components/promotion-general-section/index.ts +1 -0
  1740. package/src/routes/promotions/promotion-detail/components/promotion-general-section/promotion-general-section.tsx +215 -0
  1741. package/src/routes/promotions/promotion-detail/index.ts +3 -0
  1742. package/src/routes/promotions/promotion-detail/loader.ts +16 -0
  1743. package/src/routes/promotions/promotion-detail/promotion-detail.tsx +72 -0
  1744. package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx +455 -0
  1745. package/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/index.ts +1 -0
  1746. package/src/routes/promotions/promotion-edit-details/index.ts +1 -0
  1747. package/src/routes/promotions/promotion-edit-details/promotion-edit-details.tsx +30 -0
  1748. package/src/routes/promotions/promotion-list/components/promotion-list-table/index.ts +1 -0
  1749. package/src/routes/promotions/promotion-list/components/promotion-list-table/promotion-list-table.tsx +158 -0
  1750. package/src/routes/promotions/promotion-list/index.ts +2 -0
  1751. package/src/routes/promotions/promotion-list/loader.ts +27 -0
  1752. package/src/routes/promotions/promotion-list/promotions-list.tsx +18 -0
  1753. package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/index.ts +1 -0
  1754. package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +177 -0
  1755. package/src/routes/refund-reasons/refund-reason-create/index.ts +1 -0
  1756. package/src/routes/refund-reasons/refund-reason-create/refund-reason-create.tsx +10 -0
  1757. package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/index.ts +1 -0
  1758. package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +141 -0
  1759. package/src/routes/refund-reasons/refund-reason-edit/index.ts +1 -0
  1760. package/src/routes/refund-reasons/refund-reason-edit/refund-reason-edit.tsx +33 -0
  1761. package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/index.ts +1 -0
  1762. package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +138 -0
  1763. package/src/routes/refund-reasons/refund-reason-list/index.ts +2 -0
  1764. package/src/routes/refund-reasons/refund-reason-list/loader.ts +16 -0
  1765. package/src/routes/refund-reasons/refund-reason-list/refund-reason-list.tsx +21 -0
  1766. package/src/routes/regions/common/constants.ts +4 -0
  1767. package/src/routes/regions/common/hooks/use-countries.tsx +68 -0
  1768. package/src/routes/regions/common/hooks/use-country-table-columns.tsx +25 -0
  1769. package/src/routes/regions/common/hooks/use-country-table-query.tsx +25 -0
  1770. package/src/routes/regions/region-add-countries/components/add-countries-form/add-countries-form.tsx +208 -0
  1771. package/src/routes/regions/region-add-countries/components/add-countries-form/index.ts +1 -0
  1772. package/src/routes/regions/region-add-countries/index.ts +1 -0
  1773. package/src/routes/regions/region-add-countries/region-add-countries.tsx +27 -0
  1774. package/src/routes/regions/region-create/components/create-region-form/create-region-form.tsx +523 -0
  1775. package/src/routes/regions/region-create/components/create-region-form/index.ts +1 -0
  1776. package/src/routes/regions/region-create/index.ts +1 -0
  1777. package/src/routes/regions/region-create/region-create.tsx +22 -0
  1778. package/src/routes/regions/region-detail/breadcrumb.tsx +27 -0
  1779. package/src/routes/regions/region-detail/components/region-country-section/index.ts +1 -0
  1780. package/src/routes/regions/region-detail/components/region-country-section/region-country-section.tsx +255 -0
  1781. package/src/routes/regions/region-detail/components/region-general-section/index.ts +1 -0
  1782. package/src/routes/regions/region-detail/components/region-general-section/region-general-section.tsx +138 -0
  1783. package/src/routes/regions/region-detail/constants.ts +2 -0
  1784. package/src/routes/regions/region-detail/index.ts +3 -0
  1785. package/src/routes/regions/region-detail/loader.ts +25 -0
  1786. package/src/routes/regions/region-detail/region-detail.tsx +77 -0
  1787. package/src/routes/regions/region-edit/components/edit-region-form/edit-region-form.tsx +251 -0
  1788. package/src/routes/regions/region-edit/components/edit-region-form/index.ts +1 -0
  1789. package/src/routes/regions/region-edit/index.ts +1 -0
  1790. package/src/routes/regions/region-edit/region-edit.tsx +78 -0
  1791. package/src/routes/regions/region-list/components/region-list-table/index.ts +1 -0
  1792. package/src/routes/regions/region-list/components/region-list-table/region-list-table.tsx +178 -0
  1793. package/src/routes/regions/region-list/index.ts +1 -0
  1794. package/src/routes/regions/region-list/region-list.tsx +18 -0
  1795. package/src/routes/regions/region-metadata/index.ts +1 -0
  1796. package/src/routes/regions/region-metadata/region-metadata.tsx +27 -0
  1797. package/src/routes/reservations/reservation-create/components/reservation-create-from/index.ts +1 -0
  1798. package/src/routes/reservations/reservation-create/components/reservation-create-from/reservation-create-from.tsx +311 -0
  1799. package/src/routes/reservations/reservation-create/index.ts +2 -0
  1800. package/src/routes/reservations/reservation-create/reservation-create.tsx +16 -0
  1801. package/src/routes/reservations/reservation-detail/breadcrumb.tsx +29 -0
  1802. package/src/routes/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx +215 -0
  1803. package/src/routes/reservations/reservation-detail/components/edit-reservation/components/index.tsx +1 -0
  1804. package/src/routes/reservations/reservation-detail/components/edit-reservation/edit-reservation-modal.tsx +53 -0
  1805. package/src/routes/reservations/reservation-detail/components/edit-reservation/index.ts +1 -0
  1806. package/src/routes/reservations/reservation-detail/components/reservation-general-section/index.ts +1 -0
  1807. package/src/routes/reservations/reservation-detail/components/reservation-general-section/reservation-general-section.tsx +90 -0
  1808. package/src/routes/reservations/reservation-detail/index.ts +3 -0
  1809. package/src/routes/reservations/reservation-detail/loader.ts +16 -0
  1810. package/src/routes/reservations/reservation-detail/reservation-detail.tsx +73 -0
  1811. package/src/routes/reservations/reservation-list/components/reservation-list-table/index.ts +1 -0
  1812. package/src/routes/reservations/reservation-list/components/reservation-list-table/reservation-actions.tsx +57 -0
  1813. package/src/routes/reservations/reservation-list/components/reservation-list-table/reservation-list-table.tsx +67 -0
  1814. package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-columns.tsx +107 -0
  1815. package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-filters.tsx +35 -0
  1816. package/src/routes/reservations/reservation-list/components/reservation-list-table/use-reservation-table-query.tsx +32 -0
  1817. package/src/routes/reservations/reservation-list/constants.ts +1 -0
  1818. package/src/routes/reservations/reservation-list/index.ts +1 -0
  1819. package/src/routes/reservations/reservation-list/reservation-list.tsx +18 -0
  1820. package/src/routes/reservations/reservation-metadata/index.ts +1 -0
  1821. package/src/routes/reservations/reservation-metadata/reservation-metadata.tsx +30 -0
  1822. package/src/routes/reset-password/index.ts +2 -0
  1823. package/src/routes/reset-password/reset-password.tsx +341 -0
  1824. package/src/routes/return-reasons/common/hooks/use-delete-return-reason-action.tsx +40 -0
  1825. package/src/routes/return-reasons/return-reason-create/components/return-reason-create-form/index.ts +1 -0
  1826. package/src/routes/return-reasons/return-reason-create/components/return-reason-create-form/return-reason-create-form.tsx +157 -0
  1827. package/src/routes/return-reasons/return-reason-create/index.ts +1 -0
  1828. package/src/routes/return-reasons/return-reason-create/return-reason-create.tsx +10 -0
  1829. package/src/routes/return-reasons/return-reason-edit/components/return-reason-edit-form/index.ts +1 -0
  1830. package/src/routes/return-reasons/return-reason-edit/components/return-reason-edit-form/return-reason-edit-form.tsx +141 -0
  1831. package/src/routes/return-reasons/return-reason-edit/index.ts +1 -0
  1832. package/src/routes/return-reasons/return-reason-edit/return-reason-edit.tsx +33 -0
  1833. package/src/routes/return-reasons/return-reason-list/components/return-reason-list-table/index.ts +1 -0
  1834. package/src/routes/return-reasons/return-reason-list/components/return-reason-list-table/return-reason-list-table.tsx +128 -0
  1835. package/src/routes/return-reasons/return-reason-list/index.ts +2 -0
  1836. package/src/routes/return-reasons/return-reason-list/loader.ts +21 -0
  1837. package/src/routes/return-reasons/return-reason-list/return-reason-list.tsx +21 -0
  1838. package/src/routes/sales-channels/sales-channel-add-products/components/add-products-to-sales-channel-form.tsx +240 -0
  1839. package/src/routes/sales-channels/sales-channel-add-products/components/index.ts +1 -0
  1840. package/src/routes/sales-channels/sales-channel-add-products/index.ts +1 -0
  1841. package/src/routes/sales-channels/sales-channel-add-products/sales-channel-add-products.tsx +26 -0
  1842. package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/create-sales-channel-form.tsx +154 -0
  1843. package/src/routes/sales-channels/sales-channel-create/components/create-sales-channel-form/index.ts +1 -0
  1844. package/src/routes/sales-channels/sales-channel-create/index.ts +1 -0
  1845. package/src/routes/sales-channels/sales-channel-create/sales-channel-create.tsx +10 -0
  1846. package/src/routes/sales-channels/sales-channel-detail/breadcrumb.tsx +23 -0
  1847. package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-general-section/index.ts +1 -0
  1848. package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-general-section/sales-channel-general-section.tsx +99 -0
  1849. package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-product-section/index.ts +1 -0
  1850. package/src/routes/sales-channels/sales-channel-detail/components/sales-channel-product-section/sales-channel-product-section.tsx +255 -0
  1851. package/src/routes/sales-channels/sales-channel-detail/index.ts +3 -0
  1852. package/src/routes/sales-channels/sales-channel-detail/loader.ts +17 -0
  1853. package/src/routes/sales-channels/sales-channel-detail/sales-channel-detail.tsx +41 -0
  1854. package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/edit-sales-channel-form.tsx +136 -0
  1855. package/src/routes/sales-channels/sales-channel-edit/components/edit-sales-channel-form/index.ts +1 -0
  1856. package/src/routes/sales-channels/sales-channel-edit/index.ts +1 -0
  1857. package/src/routes/sales-channels/sales-channel-edit/sales-channel-edit.tsx +36 -0
  1858. package/src/routes/sales-channels/sales-channel-list/components/index.ts +1 -0
  1859. package/src/routes/sales-channels/sales-channel-list/components/sales-channel-list-table.tsx +158 -0
  1860. package/src/routes/sales-channels/sales-channel-list/index.ts +1 -0
  1861. package/src/routes/sales-channels/sales-channel-list/sales-channel-list.tsx +20 -0
  1862. package/src/routes/sales-channels/sales-channel-metadata/index.ts +1 -0
  1863. package/src/routes/sales-channels/sales-channel-metadata/sales-channel-metadata.tsx +32 -0
  1864. package/src/routes/settings/index.ts +1 -0
  1865. package/src/routes/settings/settings.tsx +15 -0
  1866. package/src/routes/shipping-option-types/common/hooks/use-delete-shipping-option-type-action.tsx +43 -0
  1867. package/src/routes/shipping-option-types/shipping-option-type-create/components/create-shipping-option-type-form/create-shipping-option-type-form.tsx +168 -0
  1868. package/src/routes/shipping-option-types/shipping-option-type-create/components/create-shipping-option-type-form/index.ts +1 -0
  1869. package/src/routes/shipping-option-types/shipping-option-type-create/index.ts +1 -0
  1870. package/src/routes/shipping-option-types/shipping-option-type-create/shipping-option-type-create.tsx +10 -0
  1871. package/src/routes/shipping-option-types/shipping-option-type-detail/breadcrumb.tsx +24 -0
  1872. package/src/routes/shipping-option-types/shipping-option-type-detail/components/shipping-option-type-general-section/index.ts +1 -0
  1873. package/src/routes/shipping-option-types/shipping-option-type-detail/components/shipping-option-type-general-section/shipping-option-type-general-section.tsx +66 -0
  1874. package/src/routes/shipping-option-types/shipping-option-type-detail/index.ts +3 -0
  1875. package/src/routes/shipping-option-types/shipping-option-type-detail/loader.ts +19 -0
  1876. package/src/routes/shipping-option-types/shipping-option-type-detail/shipping-option-type-detail.tsx +46 -0
  1877. package/src/routes/shipping-option-types/shipping-option-type-edit/components/edit-shipping-option-type-form/edit-shipping-option-type-form.tsx +145 -0
  1878. package/src/routes/shipping-option-types/shipping-option-type-edit/components/edit-shipping-option-type-form/index.ts +1 -0
  1879. package/src/routes/shipping-option-types/shipping-option-type-edit/index.ts +1 -0
  1880. package/src/routes/shipping-option-types/shipping-option-type-edit/shipping-option-type-edit.tsx +31 -0
  1881. package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/index.ts +1 -0
  1882. package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/shipping-option-type-list-table.tsx +99 -0
  1883. package/src/routes/shipping-option-types/shipping-option-type-list/components/shipping-option-type-list-table/shipping-option-type-table-row-actions.tsx +44 -0
  1884. package/src/routes/shipping-option-types/shipping-option-type-list/index.ts +1 -0
  1885. package/src/routes/shipping-option-types/shipping-option-type-list/shipping-option-type-list.tsx +18 -0
  1886. package/src/routes/shipping-profiles/shipping-profile-create/components/create-shipping-profile-form/create-shipping-profile-form.tsx +129 -0
  1887. package/src/routes/shipping-profiles/shipping-profile-create/components/create-shipping-profile-form/index.ts +1 -0
  1888. package/src/routes/shipping-profiles/shipping-profile-create/index.ts +1 -0
  1889. package/src/routes/shipping-profiles/shipping-profile-create/shipping-profile-create.tsx +10 -0
  1890. package/src/routes/shipping-profiles/shipping-profile-detail/breadcrumb.tsx +27 -0
  1891. package/src/routes/shipping-profiles/shipping-profile-detail/components/shipping-profile-general-section/index.ts +1 -0
  1892. package/src/routes/shipping-profiles/shipping-profile-detail/components/shipping-profile-general-section/shipping-profile-general-section.tsx +76 -0
  1893. package/src/routes/shipping-profiles/shipping-profile-detail/index.ts +3 -0
  1894. package/src/routes/shipping-profiles/shipping-profile-detail/loader.ts +17 -0
  1895. package/src/routes/shipping-profiles/shipping-profile-detail/shipping-profile-detail.tsx +47 -0
  1896. package/src/routes/shipping-profiles/shipping-profile-metadata/index.ts +1 -0
  1897. package/src/routes/shipping-profiles/shipping-profile-metadata/shipping-profile-metadata.tsx +31 -0
  1898. package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/index.ts +1 -0
  1899. package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/shipping-options-row-actions.tsx +64 -0
  1900. package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/shipping-profile-list-table.tsx +78 -0
  1901. package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-columns.tsx +31 -0
  1902. package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-filters.tsx +33 -0
  1903. package/src/routes/shipping-profiles/shipping-profiles-list/components/shipping-profile-list-table/use-shipping-profile-table-query.tsx +30 -0
  1904. package/src/routes/shipping-profiles/shipping-profiles-list/index.ts +1 -0
  1905. package/src/routes/shipping-profiles/shipping-profiles-list/shipping-profile-list.tsx +18 -0
  1906. package/src/routes/store/common/hooks/use-currencies-table-columns.tsx +29 -0
  1907. package/src/routes/store/common/hooks/use-currencies-table-query.tsx +21 -0
  1908. package/src/routes/store/common/hooks/use-locales-table-columns.tsx +29 -0
  1909. package/src/routes/store/common/hooks/use-locales-table-query.tsx +21 -0
  1910. package/src/routes/store/store-add-currencies/components/add-currencies-form/add-currencies-form.tsx +308 -0
  1911. package/src/routes/store/store-add-currencies/index.ts +1 -0
  1912. package/src/routes/store/store-add-currencies/store-add-currencies.tsx +42 -0
  1913. package/src/routes/store/store-add-locales/components/add-locales-form/add-locales-form.tsx +231 -0
  1914. package/src/routes/store/store-add-locales/index.ts +1 -0
  1915. package/src/routes/store/store-add-locales/store-add-locales.tsx +29 -0
  1916. package/src/routes/store/store-detail/components/store-currency-section/index.ts +1 -0
  1917. package/src/routes/store/store-detail/components/store-currency-section/store-currency-section.tsx +387 -0
  1918. package/src/routes/store/store-detail/components/store-general-section/index.ts +1 -0
  1919. package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +142 -0
  1920. package/src/routes/store/store-detail/components/store-locale-section/index.ts +1 -0
  1921. package/src/routes/store/store-detail/components/store-locale-section/store-locale-section.tsx +282 -0
  1922. package/src/routes/store/store-detail/index.ts +2 -0
  1923. package/src/routes/store/store-detail/loader.ts +18 -0
  1924. package/src/routes/store/store-detail/store-detail.tsx +48 -0
  1925. package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +232 -0
  1926. package/src/routes/store/store-edit/index.ts +1 -0
  1927. package/src/routes/store/store-edit/store-edit.tsx +25 -0
  1928. package/src/routes/store/store-metadata/index.ts +1 -0
  1929. package/src/routes/store/store-metadata/store-metadata.tsx +24 -0
  1930. package/src/routes/tax-regions/common/components/target-form/index.ts +1 -0
  1931. package/src/routes/tax-regions/common/components/target-form/target-form.tsx +970 -0
  1932. package/src/routes/tax-regions/common/components/target-item/index.ts +1 -0
  1933. package/src/routes/tax-regions/common/components/target-item/target-item.tsx +43 -0
  1934. package/src/routes/tax-regions/common/components/tax-override-card/index.ts +1 -0
  1935. package/src/routes/tax-regions/common/components/tax-override-card/tax-override-card.tsx +404 -0
  1936. package/src/routes/tax-regions/common/components/tax-override-table/index.ts +1 -0
  1937. package/src/routes/tax-regions/common/components/tax-override-table/tax-override-table.tsx +119 -0
  1938. package/src/routes/tax-regions/common/components/tax-rate-line/index.ts +1 -0
  1939. package/src/routes/tax-regions/common/components/tax-rate-line/tax-rate-line.tsx +82 -0
  1940. package/src/routes/tax-regions/common/components/tax-region-card/index.ts +1 -0
  1941. package/src/routes/tax-regions/common/components/tax-region-card/tax-region-card.tsx +218 -0
  1942. package/src/routes/tax-regions/common/components/tax-region-table/index.ts +1 -0
  1943. package/src/routes/tax-regions/common/components/tax-region-table/tax-region-table.tsx +122 -0
  1944. package/src/routes/tax-regions/common/constants.ts +8 -0
  1945. package/src/routes/tax-regions/common/hooks/use-tax-override-table.tsx +92 -0
  1946. package/src/routes/tax-regions/common/hooks/use-tax-region-table.tsx +92 -0
  1947. package/src/routes/tax-regions/common/hooks.ts +79 -0
  1948. package/src/routes/tax-regions/common/schemas.ts +16 -0
  1949. package/src/routes/tax-regions/common/utils.ts +12 -0
  1950. package/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/index.ts +1 -0
  1951. package/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx +276 -0
  1952. package/src/routes/tax-regions/tax-region-create/index.ts +3 -0
  1953. package/src/routes/tax-regions/tax-region-create/tax-region-create.tsx +10 -0
  1954. package/src/routes/tax-regions/tax-region-detail/breadcrumb.tsx +29 -0
  1955. package/src/routes/tax-regions/tax-region-detail/components/index.ts +2 -0
  1956. package/src/routes/tax-regions/tax-region-detail/components/tax-region-detail-section/index.ts +1 -0
  1957. package/src/routes/tax-regions/tax-region-detail/components/tax-region-detail-section/tax-region-detail-section.tsx +41 -0
  1958. package/src/routes/tax-regions/tax-region-detail/components/tax-region-override-section/index.ts +1 -0
  1959. package/src/routes/tax-regions/tax-region-detail/components/tax-region-override-section/tax-region-override-section.tsx +66 -0
  1960. package/src/routes/tax-regions/tax-region-detail/components/tax-region-province-section/index.ts +1 -0
  1961. package/src/routes/tax-regions/tax-region-detail/components/tax-region-province-section/tax-region-province-section.tsx +72 -0
  1962. package/src/routes/tax-regions/tax-region-detail/components/tax-region-sublevel-alert/index.ts +1 -0
  1963. package/src/routes/tax-regions/tax-region-detail/components/tax-region-sublevel-alert/tax-region-sublevel-alert.tsx +62 -0
  1964. package/src/routes/tax-regions/tax-region-detail/index.ts +5 -0
  1965. package/src/routes/tax-regions/tax-region-detail/loader.ts +16 -0
  1966. package/src/routes/tax-regions/tax-region-detail/tax-region-detail.tsx +65 -0
  1967. package/src/routes/tax-regions/tax-region-detail/tax-region-provider-section/index.ts +1 -0
  1968. package/src/routes/tax-regions/tax-region-detail/tax-region-provider-section/tax-region-provider-section.tsx +28 -0
  1969. package/src/routes/tax-regions/tax-region-edit/components/tax-region-edit/index.ts +1 -0
  1970. package/src/routes/tax-regions/tax-region-edit/components/tax-region-edit/tax-region-edit-form.tsx +109 -0
  1971. package/src/routes/tax-regions/tax-region-edit/index.ts +1 -0
  1972. package/src/routes/tax-regions/tax-region-edit/tax-region-edit.tsx +33 -0
  1973. package/src/routes/tax-regions/tax-region-list/components/tax-region-list-view/index.ts +1 -0
  1974. package/src/routes/tax-regions/tax-region-list/components/tax-region-list-view/tax-region-list-view.tsx +58 -0
  1975. package/src/routes/tax-regions/tax-region-list/index.ts +1 -0
  1976. package/src/routes/tax-regions/tax-region-list/tax-region-list.tsx +19 -0
  1977. package/src/routes/tax-regions/tax-region-metadata/index.ts +1 -0
  1978. package/src/routes/tax-regions/tax-region-metadata/tax-region-metadata.tsx +31 -0
  1979. package/src/routes/tax-regions/tax-region-province-create/components/tax-region-province-create-form/index.ts +1 -0
  1980. package/src/routes/tax-regions/tax-region-province-create/components/tax-region-province-create-form/tax-region-province-create-form.tsx +249 -0
  1981. package/src/routes/tax-regions/tax-region-province-create/index.ts +3 -0
  1982. package/src/routes/tax-regions/tax-region-province-create/tax-region-province-create.tsx +22 -0
  1983. package/src/routes/tax-regions/tax-region-province-detail/breadcrumb.tsx +32 -0
  1984. package/src/routes/tax-regions/tax-region-province-detail/components/index.ts +2 -0
  1985. package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-detail-section/index.ts +1 -0
  1986. package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-detail-section/tax-region-detail-section.tsx +42 -0
  1987. package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-override-section/index.ts +1 -0
  1988. package/src/routes/tax-regions/tax-region-province-detail/components/tax-region-province-override-section/tax-region-province-override-section.tsx +65 -0
  1989. package/src/routes/tax-regions/tax-region-province-detail/index.ts +5 -0
  1990. package/src/routes/tax-regions/tax-region-province-detail/loader.ts +16 -0
  1991. package/src/routes/tax-regions/tax-region-province-detail/tax-region-detail.tsx +49 -0
  1992. package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/index.ts +1 -0
  1993. package/src/routes/tax-regions/tax-region-tax-override-create/components/tax-region-override-create-form/tax-region-tax-override-create.tsx +675 -0
  1994. package/src/routes/tax-regions/tax-region-tax-override-create/index.ts +1 -0
  1995. package/src/routes/tax-regions/tax-region-tax-override-create/tax-region-tax-override-create.tsx +24 -0
  1996. package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/index.ts +1 -0
  1997. package/src/routes/tax-regions/tax-region-tax-override-edit/components/tax-region-tax-override-edit-form/tax-region-tax-override-edit-form.tsx +652 -0
  1998. package/src/routes/tax-regions/tax-region-tax-override-edit/index.ts +1 -0
  1999. package/src/routes/tax-regions/tax-region-tax-override-edit/tax-region-tax-override-edit.tsx +211 -0
  2000. package/src/routes/tax-regions/tax-region-tax-override-edit/types.ts +11 -0
  2001. package/src/routes/tax-regions/tax-region-tax-rate-create/components/tax-region-tax-rate-create-form/index.ts +1 -0
  2002. package/src/routes/tax-regions/tax-region-tax-rate-create/components/tax-region-tax-rate-create-form/tax-region-tax-rate-create-form.tsx +180 -0
  2003. package/src/routes/tax-regions/tax-region-tax-rate-create/index.ts +1 -0
  2004. package/src/routes/tax-regions/tax-region-tax-rate-create/tax-region-tax-rate-create.tsx +29 -0
  2005. package/src/routes/tax-regions/tax-region-tax-rate-edit/components/tax-region-tax-rate-edit-form/index.ts +1 -0
  2006. package/src/routes/tax-regions/tax-region-tax-rate-edit/components/tax-region-tax-rate-edit-form/tax-region-tax-rate-edit-form.tsx +159 -0
  2007. package/src/routes/tax-regions/tax-region-tax-rate-edit/index.ts +1 -0
  2008. package/src/routes/tax-regions/tax-region-tax-rate-edit/tax-region-edit.tsx +38 -0
  2009. package/src/routes/translations/add-locales/add-locales.tsx +29 -0
  2010. package/src/routes/translations/add-locales/index.tsx +1 -0
  2011. package/src/routes/translations/settings/components/batch-translation-settings-form/batch-translation-settings-form.tsx +246 -0
  2012. package/src/routes/translations/settings/components/entity-selector-tree/entity-selector-tree.tsx +288 -0
  2013. package/src/routes/translations/settings/components/selector-tree-filter/selector-tree-filter.tsx +88 -0
  2014. package/src/routes/translations/settings/index.tsx +2 -0
  2015. package/src/routes/translations/settings/settings.tsx +35 -0
  2016. package/src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx +85 -0
  2017. package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +48 -0
  2018. package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +285 -0
  2019. package/src/routes/translations/translation-list/index.tsx +1 -0
  2020. package/src/routes/translations/translation-list/translation-list.tsx +188 -0
  2021. package/src/routes/translations/translations-edit/components/translations-edit-form/index.ts +1 -0
  2022. package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +747 -0
  2023. package/src/routes/translations/translations-edit/index.ts +1 -0
  2024. package/src/routes/translations/translations-edit/translations-edit.tsx +85 -0
  2025. package/src/routes/users/user-detail/breadcrumb.tsx +24 -0
  2026. package/src/routes/users/user-detail/components/user-general-section/index.ts +1 -0
  2027. package/src/routes/users/user-detail/components/user-general-section/user-general-section.tsx +86 -0
  2028. package/src/routes/users/user-detail/index.ts +3 -0
  2029. package/src/routes/users/user-detail/loader.ts +17 -0
  2030. package/src/routes/users/user-detail/user-detail.tsx +47 -0
  2031. package/src/routes/users/user-edit/components/edit-user-form/edit-user-form.tsx +97 -0
  2032. package/src/routes/users/user-edit/components/edit-user-form/index.ts +1 -0
  2033. package/src/routes/users/user-edit/index.ts +1 -0
  2034. package/src/routes/users/user-edit/user-edit.tsx +25 -0
  2035. package/src/routes/users/user-invite/components/invite-user-form/invite-user-form.tsx +345 -0
  2036. package/src/routes/users/user-invite/index.ts +1 -0
  2037. package/src/routes/users/user-invite/user-invite.tsx +10 -0
  2038. package/src/routes/users/user-list/components/user-list-table/index.ts +1 -0
  2039. package/src/routes/users/user-list/components/user-list-table/user-list-table.tsx +131 -0
  2040. package/src/routes/users/user-list/index.ts +1 -0
  2041. package/src/routes/users/user-list/user-list.tsx +18 -0
  2042. package/src/routes/users/user-metadata/index.ts +1 -0
  2043. package/src/routes/users/user-metadata/user-metadata.tsx +27 -0
  2044. package/src/routes/workflow-executions/constants.ts +38 -0
  2045. package/src/routes/workflow-executions/types.ts +28 -0
  2046. package/src/routes/workflow-executions/utils.ts +103 -0
  2047. package/src/routes/workflow-executions/workflow-execution-detail/breadcrumb.tsx +26 -0
  2048. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/index.ts +1 -0
  2049. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/workflow-execution-general-section.tsx +120 -0
  2050. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/index.ts +1 -0
  2051. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx +334 -0
  2052. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/index.ts +1 -0
  2053. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx +24 -0
  2054. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/index.ts +1 -0
  2055. package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx +446 -0
  2056. package/src/routes/workflow-executions/workflow-execution-detail/index.ts +3 -0
  2057. package/src/routes/workflow-executions/workflow-execution-detail/loader.ts +19 -0
  2058. package/src/routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx +43 -0
  2059. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/index.ts +1 -0
  2060. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx +72 -0
  2061. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx +25 -0
  2062. package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx +69 -0
  2063. package/src/routes/workflow-executions/workflow-execution-list/index.ts +1 -0
  2064. package/src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx +20 -0
  2065. package/src/utils/column-utils.ts +71 -0
  2066. package/src/vite-env.d.ts +20 -0
@@ -0,0 +1,4113 @@
1
+ import {
2
+ currencies
3
+ } from "./chunk-DK4WIVY6.mjs";
4
+ import {
5
+ Skeleton
6
+ } from "./chunk-YWU55M6Z.mjs";
7
+ import {
8
+ ConditionalTooltip
9
+ } from "./chunk-OAHCJFG3.mjs";
10
+ import {
11
+ useDocumentDirection
12
+ } from "./chunk-S4DMV3ZT.mjs";
13
+ import {
14
+ __publicField
15
+ } from "./chunk-QZ7TP4HQ.mjs";
16
+
17
+ // src/components/data-grid/components/data-grid-skeleton.tsx
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
+ var DataGridSkeleton = ({
20
+ columns,
21
+ rows: rowCount = 10
22
+ }) => {
23
+ const rows = Array.from({ length: rowCount }, (_, i) => i);
24
+ const colCount = columns.length;
25
+ return /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-subtle size-full", children: [
26
+ /* @__PURE__ */ jsx("div", { className: "bg-ui-bg-base border-b p-4", children: /* @__PURE__ */ jsx("div", { className: "bg-ui-button-neutral h-7 w-[116px] animate-pulse rounded-md" }) }),
27
+ /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-subtle size-full overflow-auto", children: [
28
+ /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ className: "grid",
32
+ style: {
33
+ gridTemplateColumns: `repeat(${colCount}, 1fr)`
34
+ },
35
+ children: columns.map((_col, i) => {
36
+ return /* @__PURE__ */ jsx(
37
+ "div",
38
+ {
39
+ className: "bg-ui-bg-base flex h-10 w-[200px] items-center border-b border-r px-4 py-2.5 last:border-r-0",
40
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-[14px] w-[164px]" })
41
+ },
42
+ i
43
+ );
44
+ })
45
+ }
46
+ ),
47
+ /* @__PURE__ */ jsx("div", { children: rows.map((_, j) => /* @__PURE__ */ jsx(
48
+ "div",
49
+ {
50
+ className: "grid",
51
+ style: { gridTemplateColumns: `repeat(${colCount}, 1fr)` },
52
+ children: columns.map((_col, k) => {
53
+ return /* @__PURE__ */ jsx(
54
+ "div",
55
+ {
56
+ className: "bg-ui-bg-base flex h-10 w-[200px] items-center border-b border-r px-4 py-2.5 last:border-r-0",
57
+ children: /* @__PURE__ */ jsx(Skeleton, { className: "h-[14px] w-[164px]" })
58
+ },
59
+ k
60
+ );
61
+ })
62
+ },
63
+ j
64
+ )) })
65
+ ] })
66
+ ] });
67
+ };
68
+
69
+ // src/components/data-grid/components/data-grid-boolean-cell.tsx
70
+ import { Checkbox } from "@acmekit/ui";
71
+ import { Controller } from "react-hook-form";
72
+
73
+ // src/hooks/use-combined-refs.tsx
74
+ function setRef(ref, value) {
75
+ if (typeof ref === "function") {
76
+ ref(value);
77
+ } else if (ref && "current" in ref) {
78
+ ;
79
+ ref.current = value;
80
+ }
81
+ }
82
+ var useCombinedRefs = (...refs) => {
83
+ return (value) => {
84
+ refs.forEach((ref) => setRef(ref, value));
85
+ };
86
+ };
87
+
88
+ // src/components/data-grid/hooks/use-data-grid-cell.tsx
89
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
90
+
91
+ // src/components/data-grid/context/data-grid-context.tsx
92
+ import { createContext } from "react";
93
+ var DataGridContext = createContext(
94
+ null
95
+ );
96
+
97
+ // src/components/data-grid/context/use-data-grid-context.tsx
98
+ import { useContext } from "react";
99
+ var useDataGridContext = () => {
100
+ const context = useContext(DataGridContext);
101
+ if (!context) {
102
+ throw new Error(
103
+ "useDataGridContext must be used within a DataGridContextProvider"
104
+ );
105
+ }
106
+ return context;
107
+ };
108
+
109
+ // src/components/data-grid/utils.ts
110
+ function generateCellId(coords) {
111
+ return `${coords.row}:${coords.col}`;
112
+ }
113
+ function isCellMatch(cell, coords) {
114
+ if (!coords) {
115
+ return false;
116
+ }
117
+ return cell.row === coords.row && cell.col === coords.col;
118
+ }
119
+ var SPECIAL_FOCUS_KEYS = [".", ","];
120
+ function isSpecialFocusKey(event) {
121
+ return SPECIAL_FOCUS_KEYS.includes(event.key) && event.ctrlKey && event.altKey;
122
+ }
123
+
124
+ // src/components/data-grid/hooks/use-data-grid-cell.tsx
125
+ var textCharacterRegex = /^.$/u;
126
+ var numberCharacterRegex = /^[0-9]$/u;
127
+ var useDataGridCell = ({
128
+ context
129
+ }) => {
130
+ const {
131
+ register,
132
+ control,
133
+ anchor,
134
+ setIsEditing,
135
+ setSingleRange,
136
+ setIsSelecting,
137
+ setRangeEnd,
138
+ getWrapperFocusHandler,
139
+ getWrapperMouseOverHandler,
140
+ getInputChangeHandler,
141
+ getIsCellSelected,
142
+ getIsCellDragSelected,
143
+ getCellMetadata
144
+ } = useDataGridContext();
145
+ const { rowIndex, columnIndex } = context;
146
+ const coords = useMemo(
147
+ () => ({ row: rowIndex, col: columnIndex }),
148
+ [rowIndex, columnIndex]
149
+ );
150
+ const { id, field, type, innerAttributes, inputAttributes } = useMemo(() => {
151
+ return getCellMetadata(coords);
152
+ }, [coords, getCellMetadata]);
153
+ const [showOverlay, setShowOverlay] = useState(true);
154
+ const containerRef = useRef(null);
155
+ const inputRef = useRef(null);
156
+ const handleOverlayMouseDown = useCallback(
157
+ (e) => {
158
+ e.preventDefault();
159
+ e.stopPropagation();
160
+ if (e.detail === 2) {
161
+ if (inputRef.current) {
162
+ setShowOverlay(false);
163
+ inputRef.current.focus();
164
+ return;
165
+ }
166
+ }
167
+ if (e.shiftKey) {
168
+ if (coords.col === anchor?.col) {
169
+ setRangeEnd(coords);
170
+ return;
171
+ }
172
+ }
173
+ if (containerRef.current) {
174
+ setSingleRange(coords);
175
+ setIsSelecting(true);
176
+ containerRef.current.focus();
177
+ }
178
+ },
179
+ [coords, anchor, setRangeEnd, setSingleRange, setIsSelecting]
180
+ );
181
+ const handleBooleanInnerMouseDown = useCallback(
182
+ (e) => {
183
+ e.preventDefault();
184
+ e.stopPropagation();
185
+ if (e.detail === 2) {
186
+ inputRef.current?.focus();
187
+ return;
188
+ }
189
+ if (e.shiftKey) {
190
+ setRangeEnd(coords);
191
+ return;
192
+ }
193
+ if (containerRef.current) {
194
+ setSingleRange(coords);
195
+ setIsSelecting(true);
196
+ containerRef.current.focus();
197
+ }
198
+ },
199
+ [setIsSelecting, setSingleRange, setRangeEnd, coords]
200
+ );
201
+ const handleInputBlur = useCallback(() => {
202
+ setShowOverlay(true);
203
+ setIsEditing(false);
204
+ }, [setIsEditing]);
205
+ const handleInputFocus = useCallback(() => {
206
+ setShowOverlay(false);
207
+ setIsEditing(true);
208
+ }, [setIsEditing]);
209
+ const validateKeyStroke = useCallback(
210
+ (key) => {
211
+ switch (type) {
212
+ case "togglable-number":
213
+ case "number":
214
+ return numberCharacterRegex.test(key);
215
+ case "text":
216
+ case "multiline-text":
217
+ return textCharacterRegex.test(key);
218
+ default:
219
+ return false;
220
+ }
221
+ },
222
+ [type]
223
+ );
224
+ const handleContainerKeyDown = useCallback(
225
+ (e) => {
226
+ if (!inputRef.current || !validateKeyStroke(e.key) || !showOverlay) {
227
+ return;
228
+ }
229
+ if (e.key.toLowerCase() === "z" && (e.ctrlKey || e.metaKey)) {
230
+ return;
231
+ }
232
+ if (e.key.toLowerCase() === "c" && (e.ctrlKey || e.metaKey)) {
233
+ return;
234
+ }
235
+ if (e.key.toLowerCase() === "v" && (e.ctrlKey || e.metaKey)) {
236
+ return;
237
+ }
238
+ if (e.key === "Enter") {
239
+ return;
240
+ }
241
+ if (isSpecialFocusKey(e.nativeEvent)) {
242
+ return;
243
+ }
244
+ inputRef.current.focus();
245
+ setShowOverlay(false);
246
+ if (inputRef.current instanceof HTMLInputElement) {
247
+ inputRef.current.value = "";
248
+ const nativeInputValueSetter = Object.getOwnPropertyDescriptor(
249
+ window.HTMLInputElement.prototype,
250
+ "value"
251
+ )?.set;
252
+ nativeInputValueSetter?.call(inputRef.current, e.key);
253
+ const event = new Event("input", { bubbles: true });
254
+ inputRef.current.dispatchEvent(event);
255
+ } else if (inputRef.current instanceof HTMLTextAreaElement) {
256
+ inputRef.current.value = "";
257
+ const nativeTextAreaValueSetter = Object.getOwnPropertyDescriptor(
258
+ window.HTMLTextAreaElement.prototype,
259
+ "value"
260
+ )?.set;
261
+ nativeTextAreaValueSetter?.call(inputRef.current, e.key);
262
+ const event = new Event("input", { bubbles: true });
263
+ inputRef.current.dispatchEvent(event);
264
+ }
265
+ e.stopPropagation();
266
+ e.preventDefault();
267
+ },
268
+ [showOverlay, validateKeyStroke]
269
+ );
270
+ const isAnchor = useMemo(() => {
271
+ return anchor ? isCellMatch(coords, anchor) : false;
272
+ }, [anchor, coords]);
273
+ const fieldWithoutOverlay = useMemo(() => {
274
+ return type === "boolean";
275
+ }, [type]);
276
+ useEffect(() => {
277
+ if (isAnchor && !containerRef.current?.contains(document.activeElement)) {
278
+ containerRef.current?.focus({ preventScroll: true });
279
+ }
280
+ }, [isAnchor]);
281
+ const renderProps = {
282
+ container: {
283
+ field,
284
+ isAnchor,
285
+ isSelected: getIsCellSelected(coords),
286
+ isDragSelected: getIsCellDragSelected(coords),
287
+ showOverlay: fieldWithoutOverlay ? false : showOverlay,
288
+ innerProps: {
289
+ ref: containerRef,
290
+ onMouseOver: getWrapperMouseOverHandler(coords),
291
+ onMouseDown: type === "boolean" ? handleBooleanInnerMouseDown : void 0,
292
+ onKeyDown: handleContainerKeyDown,
293
+ onFocus: getWrapperFocusHandler(coords),
294
+ ...innerAttributes
295
+ },
296
+ overlayProps: {
297
+ onMouseDown: handleOverlayMouseDown
298
+ }
299
+ },
300
+ input: {
301
+ ref: inputRef,
302
+ onBlur: handleInputBlur,
303
+ onFocus: handleInputFocus,
304
+ onChange: getInputChangeHandler(field),
305
+ ...inputAttributes
306
+ }
307
+ };
308
+ return {
309
+ id,
310
+ field,
311
+ register,
312
+ control,
313
+ renderProps
314
+ };
315
+ };
316
+
317
+ // src/components/data-grid/hooks/use-data-grid-cell-error.tsx
318
+ import { useMemo as useMemo2 } from "react";
319
+ import { get } from "react-hook-form";
320
+ var useDataGridCellError = ({
321
+ context
322
+ }) => {
323
+ const { errors, getCellErrorMetadata, navigateToField } = useDataGridContext();
324
+ const { rowIndex, columnIndex } = context;
325
+ const { accessor, field } = useMemo2(() => {
326
+ return getCellErrorMetadata({ row: rowIndex, col: columnIndex });
327
+ }, [rowIndex, columnIndex, getCellErrorMetadata]);
328
+ const rowErrorsObject = accessor && columnIndex === 0 ? get(errors, accessor) : void 0;
329
+ const rowErrors = [];
330
+ function collectErrors(errorObject, baseAccessor) {
331
+ if (!errorObject) {
332
+ return;
333
+ }
334
+ if (isFieldError(errorObject)) {
335
+ const message = errorObject.message;
336
+ const to = () => navigateToField(baseAccessor);
337
+ if (message) {
338
+ rowErrors.push({ message, to });
339
+ }
340
+ } else {
341
+ Object.keys(errorObject).forEach((key) => {
342
+ const nestedError = errorObject[key];
343
+ const fieldAccessor = `${baseAccessor}.${key}`;
344
+ if (nestedError && typeof nestedError === "object") {
345
+ collectErrors(nestedError, fieldAccessor);
346
+ }
347
+ });
348
+ }
349
+ }
350
+ if (rowErrorsObject && accessor) {
351
+ collectErrors(rowErrorsObject, accessor);
352
+ }
353
+ const cellError = field ? get(errors, field) : void 0;
354
+ return {
355
+ errors,
356
+ rowErrors,
357
+ cellError
358
+ };
359
+ };
360
+ function isFieldError(errors) {
361
+ return typeof errors === "object" && "message" in errors && "type" in errors;
362
+ }
363
+
364
+ // src/components/data-grid/hooks/use-data-grid-cell-handlers.tsx
365
+ import { useCallback as useCallback2 } from "react";
366
+
367
+ // src/components/data-grid/models/data-grid-bulk-update-command.ts
368
+ var DataGridBulkUpdateCommand = class {
369
+ constructor({ fields, prev, next, setter }) {
370
+ __publicField(this, "_fields");
371
+ __publicField(this, "_prev");
372
+ __publicField(this, "_next");
373
+ __publicField(this, "_setter");
374
+ this._fields = fields;
375
+ this._prev = prev;
376
+ this._next = next;
377
+ this._setter = setter;
378
+ }
379
+ execute(redo = false) {
380
+ this._setter(this._fields, this._next, redo);
381
+ }
382
+ undo() {
383
+ this._setter(this._fields, this._prev, true);
384
+ }
385
+ redo() {
386
+ this.execute(true);
387
+ }
388
+ };
389
+
390
+ // src/components/data-grid/models/data-grid-matrix.ts
391
+ var DataGridMatrix = class {
392
+ constructor(data, columns, multiColumnSelection = false) {
393
+ __publicField(this, "multiColumnSelection");
394
+ __publicField(this, "cells");
395
+ __publicField(this, "rowAccessors", []);
396
+ __publicField(this, "columnAccessors", []);
397
+ this.multiColumnSelection = multiColumnSelection;
398
+ this.cells = this._populateCells(data, columns);
399
+ this.rowAccessors = this._computeRowAccessors();
400
+ this.columnAccessors = this._computeColumnAccessors();
401
+ }
402
+ _computeRowAccessors() {
403
+ return this.cells.map((_, rowIndex) => this.getRowAccessor(rowIndex));
404
+ }
405
+ _computeColumnAccessors() {
406
+ if (this.cells.length === 0) {
407
+ return [];
408
+ }
409
+ return this.cells[0].map((_, colIndex) => this.getColumnAccessor(colIndex));
410
+ }
411
+ getFirstNavigableCell() {
412
+ for (let row = 0; row < this.cells.length; row++) {
413
+ for (let col = 0; col < this.cells[0].length; col++) {
414
+ if (this.cells[row][col] !== null) {
415
+ return { row, col };
416
+ }
417
+ }
418
+ }
419
+ return null;
420
+ }
421
+ getFieldsInRow(row) {
422
+ const keys = [];
423
+ if (row < 0 || row >= this.cells.length) {
424
+ return keys;
425
+ }
426
+ this.cells[row].forEach((cell) => {
427
+ if (cell !== null) {
428
+ keys.push(cell.field);
429
+ }
430
+ });
431
+ return keys;
432
+ }
433
+ getFieldsInSelection(start, end) {
434
+ const keys = [];
435
+ if (!start || !end) {
436
+ return keys;
437
+ }
438
+ if (!this.multiColumnSelection && start.col !== end.col) {
439
+ throw new Error(
440
+ "Selection must be in the same column when multiColumnSelection is disabled"
441
+ );
442
+ }
443
+ const startRow = Math.min(start.row, end.row);
444
+ const endRow = Math.max(start.row, end.row);
445
+ const startCol = this.multiColumnSelection ? Math.min(start.col, end.col) : start.col;
446
+ const endCol = this.multiColumnSelection ? Math.max(start.col, end.col) : start.col;
447
+ for (let row = startRow; row <= endRow; row++) {
448
+ for (let col = startCol; col <= endCol; col++) {
449
+ if (this._isValidPosition(row, col) && this.cells[row][col] !== null) {
450
+ keys.push(this.cells[row][col]?.field);
451
+ }
452
+ }
453
+ }
454
+ return keys;
455
+ }
456
+ getCellField(cell) {
457
+ if (this._isValidPosition(cell.row, cell.col)) {
458
+ return this.cells[cell.row][cell.col]?.field || null;
459
+ }
460
+ return null;
461
+ }
462
+ getCellType(cell) {
463
+ if (this._isValidPosition(cell.row, cell.col)) {
464
+ return this.cells[cell.row][cell.col]?.type || null;
465
+ }
466
+ return null;
467
+ }
468
+ getIsCellSelected(cell, start, end) {
469
+ if (!cell || !start || !end) {
470
+ return false;
471
+ }
472
+ if (!this.multiColumnSelection && start.col !== end.col) {
473
+ throw new Error(
474
+ "Selection must be in the same column when multiColumnSelection is disabled"
475
+ );
476
+ }
477
+ const startRow = Math.min(start.row, end.row);
478
+ const endRow = Math.max(start.row, end.row);
479
+ const startCol = this.multiColumnSelection ? Math.min(start.col, end.col) : start.col;
480
+ const endCol = this.multiColumnSelection ? Math.max(start.col, end.col) : start.col;
481
+ return cell.row >= startRow && cell.row <= endRow && cell.col >= startCol && cell.col <= endCol;
482
+ }
483
+ toggleColumn(col, enabled) {
484
+ if (col < 0 || col >= this.cells[0].length) {
485
+ return;
486
+ }
487
+ this.cells.forEach((row, index) => {
488
+ const cell = row[col];
489
+ if (cell) {
490
+ this.cells[index][col] = {
491
+ ...cell,
492
+ enabled
493
+ };
494
+ }
495
+ });
496
+ }
497
+ toggleRow(row, enabled) {
498
+ if (row < 0 || row >= this.cells.length) {
499
+ return;
500
+ }
501
+ this.cells[row].forEach((cell, index) => {
502
+ if (cell) {
503
+ this.cells[row][index] = {
504
+ ...cell,
505
+ enabled
506
+ };
507
+ }
508
+ });
509
+ }
510
+ getCoordinatesByField(field) {
511
+ if (this.rowAccessors.length === 1) {
512
+ const col = this.columnAccessors.indexOf(field);
513
+ if (col === -1) {
514
+ return null;
515
+ }
516
+ return { row: 0, col };
517
+ }
518
+ for (let row = 0; row < this.rowAccessors.length; row++) {
519
+ const rowAccessor = this.rowAccessors[row];
520
+ if (rowAccessor === null) {
521
+ continue;
522
+ }
523
+ if (!field.startsWith(rowAccessor)) {
524
+ continue;
525
+ }
526
+ for (let column = 0; column < this.columnAccessors.length; column++) {
527
+ const columnAccessor = this.columnAccessors[column];
528
+ if (columnAccessor === null) {
529
+ continue;
530
+ }
531
+ const fullFieldPath = `${rowAccessor}.${columnAccessor}`;
532
+ if (fullFieldPath === field) {
533
+ return { row, col: column };
534
+ }
535
+ }
536
+ }
537
+ return null;
538
+ }
539
+ getRowAccessor(row) {
540
+ if (row < 0 || row >= this.cells.length) {
541
+ return null;
542
+ }
543
+ const cells = this.cells[row];
544
+ const nonNullFields = cells.filter((cell) => cell !== null).map((cell) => cell.field.split("."));
545
+ if (nonNullFields.length === 0) {
546
+ return null;
547
+ }
548
+ let commonParts = nonNullFields[0];
549
+ for (const segments of nonNullFields) {
550
+ commonParts = commonParts.filter(
551
+ (part, index) => segments[index] === part
552
+ );
553
+ if (commonParts.length === 0) {
554
+ break;
555
+ }
556
+ }
557
+ const accessor = commonParts.join(".");
558
+ if (!accessor) {
559
+ return null;
560
+ }
561
+ return accessor;
562
+ }
563
+ getColumnAccessor(column) {
564
+ if (column < 0 || column >= this.cells[0].length) {
565
+ return null;
566
+ }
567
+ const uniqueParts = this.cells.map((row, rowIndex) => {
568
+ const cell = row[column];
569
+ if (!cell) {
570
+ return null;
571
+ }
572
+ const rowAccessor = this.getRowAccessor(rowIndex);
573
+ if (rowAccessor && cell.field.startsWith(rowAccessor + ".")) {
574
+ return cell.field.slice(rowAccessor.length + 1);
575
+ }
576
+ return null;
577
+ }).filter((part) => part !== null);
578
+ if (uniqueParts.length === 0) {
579
+ return null;
580
+ }
581
+ const firstPart = uniqueParts[0];
582
+ const isConsistent = uniqueParts.every((part) => part === firstPart);
583
+ return isConsistent ? firstPart : null;
584
+ }
585
+ getValidMovement(row, col, direction, metaKey = false) {
586
+ const [dRow, dCol] = this._getDirectionDeltas(direction);
587
+ if (metaKey) {
588
+ return this._getLastValidCellInDirection(row, col, dRow, dCol);
589
+ } else {
590
+ let newRow = row + dRow;
591
+ let newCol = col + dCol;
592
+ while (this._isValidPosition(newRow, newCol)) {
593
+ if (this.cells[newRow][newCol] !== null && this.cells[newRow][newCol]?.enabled !== false) {
594
+ return { row: newRow, col: newCol };
595
+ }
596
+ newRow += dRow;
597
+ newCol += dCol;
598
+ }
599
+ return { row, col };
600
+ }
601
+ }
602
+ _isValidPosition(row, col, cells) {
603
+ if (!cells) {
604
+ cells = this.cells;
605
+ }
606
+ return row >= 0 && row < cells.length && col >= 0 && col < cells[0].length;
607
+ }
608
+ _getDirectionDeltas(direction) {
609
+ switch (direction) {
610
+ case "ArrowUp":
611
+ return [-1, 0];
612
+ case "ArrowDown":
613
+ return [1, 0];
614
+ case "ArrowLeft":
615
+ return [0, -1];
616
+ case "ArrowRight":
617
+ return [0, 1];
618
+ default:
619
+ return [0, 0];
620
+ }
621
+ }
622
+ _getLastValidCellInDirection(row, col, dRow, dCol) {
623
+ let newRow = row;
624
+ let newCol = col;
625
+ let lastValidRow = row;
626
+ let lastValidCol = col;
627
+ while (this._isValidPosition(newRow + dRow, newCol + dCol)) {
628
+ newRow += dRow;
629
+ newCol += dCol;
630
+ if (this.cells[newRow][newCol] !== null) {
631
+ lastValidRow = newRow;
632
+ lastValidCol = newCol;
633
+ }
634
+ }
635
+ return {
636
+ row: lastValidRow,
637
+ col: lastValidCol
638
+ };
639
+ }
640
+ _populateCells(rows, columns) {
641
+ const cells = Array.from(
642
+ { length: rows.length },
643
+ () => Array(columns.length).fill(null)
644
+ );
645
+ rows.forEach((row, rowIndex) => {
646
+ columns.forEach((column, colIndex) => {
647
+ if (!this._isValidPosition(rowIndex, colIndex, cells)) {
648
+ return;
649
+ }
650
+ const {
651
+ name: _,
652
+ field,
653
+ type,
654
+ ...rest
655
+ } = column.meta;
656
+ const context = {
657
+ row,
658
+ column: {
659
+ ...column,
660
+ meta: rest
661
+ }
662
+ };
663
+ const fieldValue = field ? field(context) : null;
664
+ if (!fieldValue || !type) {
665
+ return;
666
+ }
667
+ cells[rowIndex][colIndex] = {
668
+ field: fieldValue,
669
+ type,
670
+ enabled: true
671
+ };
672
+ });
673
+ });
674
+ return cells;
675
+ }
676
+ };
677
+
678
+ // src/components/data-grid/models/data-grid-query-tool.ts
679
+ var DataGridQueryTool = class {
680
+ constructor(container) {
681
+ __publicField(this, "container");
682
+ this.container = container;
683
+ }
684
+ getInput(cell) {
685
+ const id = this._getCellId(cell);
686
+ const input = this.container?.querySelector(`[data-cell-id="${id}"]`);
687
+ if (!input) {
688
+ return null;
689
+ }
690
+ return input;
691
+ }
692
+ getInputByField(field) {
693
+ const input = this.container?.querySelector(`[data-field="${field}"]`);
694
+ if (!input) {
695
+ return null;
696
+ }
697
+ return input;
698
+ }
699
+ getCoordinatesByField(field) {
700
+ const cell = this.container?.querySelector(
701
+ `[data-field="${field}"][data-cell-id]`
702
+ );
703
+ if (!cell) {
704
+ return null;
705
+ }
706
+ const cellId = cell.getAttribute("data-cell-id");
707
+ if (!cellId) {
708
+ return null;
709
+ }
710
+ const [row, col] = cellId.split(":").map((n) => parseInt(n, 10));
711
+ if (isNaN(row) || isNaN(col)) {
712
+ return null;
713
+ }
714
+ return { row, col };
715
+ }
716
+ getContainer(cell) {
717
+ const id = this._getCellId(cell);
718
+ const container = this.container?.querySelector(
719
+ `[data-container-id="${id}"]`
720
+ );
721
+ if (!container) {
722
+ return null;
723
+ }
724
+ return container;
725
+ }
726
+ _getCellId(cell) {
727
+ return generateCellId(cell);
728
+ }
729
+ };
730
+
731
+ // src/components/data-grid/models/data-grid-update-command.ts
732
+ var DataGridUpdateCommand = class {
733
+ constructor({ prev, next, setter }) {
734
+ __publicField(this, "_prev");
735
+ __publicField(this, "_next");
736
+ __publicField(this, "_setter");
737
+ this._prev = prev;
738
+ this._next = next;
739
+ this._setter = setter;
740
+ }
741
+ execute() {
742
+ this._setter(this._next);
743
+ }
744
+ undo() {
745
+ this._setter(this._prev);
746
+ }
747
+ redo() {
748
+ this.execute();
749
+ }
750
+ };
751
+
752
+ // src/components/data-grid/hooks/use-data-grid-cell-handlers.tsx
753
+ var useDataGridCellHandlers = ({
754
+ matrix,
755
+ anchor,
756
+ rangeEnd,
757
+ setRangeEnd,
758
+ isDragging,
759
+ setIsDragging,
760
+ isSelecting,
761
+ setIsSelecting,
762
+ setSingleRange,
763
+ dragEnd,
764
+ setDragEnd,
765
+ setValue: setValue2,
766
+ execute,
767
+ multiColumnSelection
768
+ }) => {
769
+ const getWrapperFocusHandler = useCallback2(
770
+ (coords) => {
771
+ return (_e) => {
772
+ setSingleRange(coords);
773
+ };
774
+ },
775
+ [setSingleRange]
776
+ );
777
+ const getOverlayMouseDownHandler = useCallback2(
778
+ (coords) => {
779
+ return (e) => {
780
+ e.stopPropagation();
781
+ e.preventDefault();
782
+ if (e.shiftKey) {
783
+ setRangeEnd(coords);
784
+ return;
785
+ }
786
+ setIsSelecting(true);
787
+ setSingleRange(coords);
788
+ };
789
+ },
790
+ [setIsSelecting, setRangeEnd, setSingleRange]
791
+ );
792
+ const getWrapperMouseOverHandler = useCallback2(
793
+ (coords) => {
794
+ if (!isDragging && !isSelecting) {
795
+ return;
796
+ }
797
+ return (_e) => {
798
+ if (anchor?.col !== coords.col && !multiColumnSelection) {
799
+ return;
800
+ }
801
+ if (isSelecting) {
802
+ setRangeEnd(coords);
803
+ } else {
804
+ setDragEnd(coords);
805
+ }
806
+ };
807
+ },
808
+ [
809
+ anchor?.col,
810
+ isDragging,
811
+ isSelecting,
812
+ setDragEnd,
813
+ setRangeEnd,
814
+ multiColumnSelection
815
+ ]
816
+ );
817
+ const getInputChangeHandler = useCallback2(
818
+ // Using `any` here as the generic type of Path<TFieldValues> will
819
+ // not be inferred correctly.
820
+ (field) => {
821
+ return (next, prev) => {
822
+ const command = new DataGridUpdateCommand({
823
+ next,
824
+ prev,
825
+ setter: (value) => {
826
+ setValue2(field, value, {
827
+ shouldDirty: true,
828
+ shouldTouch: true
829
+ });
830
+ }
831
+ });
832
+ execute(command);
833
+ };
834
+ },
835
+ [setValue2, execute]
836
+ );
837
+ const onDragToFillStart = useCallback2(
838
+ (_e) => {
839
+ setIsDragging(true);
840
+ },
841
+ [setIsDragging]
842
+ );
843
+ const getIsCellSelected = useCallback2(
844
+ (cell) => {
845
+ if (!cell || !anchor || !rangeEnd) {
846
+ return false;
847
+ }
848
+ return matrix.getIsCellSelected(cell, anchor, rangeEnd);
849
+ },
850
+ [anchor, rangeEnd, matrix]
851
+ );
852
+ const getIsCellDragSelected = useCallback2(
853
+ (cell) => {
854
+ if (!cell || !anchor || !dragEnd) {
855
+ return false;
856
+ }
857
+ return matrix.getIsCellSelected(cell, anchor, dragEnd);
858
+ },
859
+ [anchor, dragEnd, matrix]
860
+ );
861
+ return {
862
+ getWrapperFocusHandler,
863
+ getOverlayMouseDownHandler,
864
+ getWrapperMouseOverHandler,
865
+ getInputChangeHandler,
866
+ getIsCellSelected,
867
+ getIsCellDragSelected,
868
+ onDragToFillStart
869
+ };
870
+ };
871
+
872
+ // src/components/data-grid/hooks/use-data-grid-cell-metadata.tsx
873
+ import { useCallback as useCallback3 } from "react";
874
+ var useDataGridCellMetadata = ({
875
+ matrix
876
+ }) => {
877
+ const getCellMetadata = useCallback3(
878
+ (coords) => {
879
+ const { row, col } = coords;
880
+ const id = generateCellId(coords);
881
+ const field = matrix.getCellField(coords);
882
+ const type = matrix.getCellType(coords);
883
+ if (!field || !type) {
884
+ throw new Error(`'field' or 'type' is null for cell ${id}`);
885
+ }
886
+ const inputAttributes = {
887
+ "data-row": row,
888
+ "data-col": col,
889
+ "data-cell-id": id,
890
+ "data-field": field
891
+ };
892
+ const innerAttributes = {
893
+ "data-container-id": id
894
+ };
895
+ return {
896
+ id,
897
+ field,
898
+ type,
899
+ inputAttributes,
900
+ innerAttributes
901
+ };
902
+ },
903
+ [matrix]
904
+ );
905
+ const getCellErrorMetadata = useCallback3(
906
+ (coords) => {
907
+ const accessor = matrix.getRowAccessor(coords.row);
908
+ const field = matrix.getCellField(coords);
909
+ return {
910
+ accessor,
911
+ field
912
+ };
913
+ },
914
+ [matrix]
915
+ );
916
+ return {
917
+ getCellMetadata,
918
+ getCellErrorMetadata
919
+ };
920
+ };
921
+
922
+ // src/components/data-grid/hooks/use-data-grid-cell-snapshot.tsx
923
+ import { useCallback as useCallback4, useState as useState2 } from "react";
924
+ var useDataGridCellSnapshot = ({
925
+ matrix,
926
+ form
927
+ }) => {
928
+ const [snapshot, setSnapshot] = useState2(null);
929
+ const { getValues, setValue: setValue2 } = form;
930
+ const createSnapshot = useCallback4(
931
+ (cell) => {
932
+ if (!cell) {
933
+ return null;
934
+ }
935
+ const field = matrix.getCellField(cell);
936
+ if (!field) {
937
+ return null;
938
+ }
939
+ const value = getValues(field);
940
+ setSnapshot((curr) => {
941
+ if (curr?.field === field) {
942
+ return curr;
943
+ }
944
+ return { field, value };
945
+ });
946
+ },
947
+ [getValues, matrix]
948
+ );
949
+ const restoreSnapshot = useCallback4(() => {
950
+ if (!snapshot) {
951
+ return;
952
+ }
953
+ const { field, value } = snapshot;
954
+ requestAnimationFrame(() => {
955
+ setValue2(field, value);
956
+ });
957
+ }, [setValue2, snapshot]);
958
+ return {
959
+ createSnapshot,
960
+ restoreSnapshot
961
+ };
962
+ };
963
+
964
+ // src/components/data-grid/hooks/use-data-grid-clipboard-events.tsx
965
+ import { useCallback as useCallback5 } from "react";
966
+ var useDataGridClipboardEvents = ({
967
+ matrix,
968
+ anchor,
969
+ rangeEnd,
970
+ isEditing,
971
+ getSelectionValues,
972
+ setSelectionValues,
973
+ execute
974
+ }) => {
975
+ const handleCopyEvent = useCallback5(
976
+ (e) => {
977
+ if (isEditing || !anchor || !rangeEnd) {
978
+ return;
979
+ }
980
+ e.preventDefault();
981
+ const fields = matrix.getFieldsInSelection(anchor, rangeEnd);
982
+ const values = getSelectionValues(fields);
983
+ const text = values.map((value) => {
984
+ if (typeof value === "object" && value !== null) {
985
+ return JSON.stringify(value);
986
+ }
987
+ return `${value}` ?? "";
988
+ }).join(" ");
989
+ e.clipboardData?.setData("text/plain", text);
990
+ },
991
+ [isEditing, anchor, rangeEnd, matrix, getSelectionValues]
992
+ );
993
+ const handlePasteEvent = useCallback5(
994
+ (e) => {
995
+ if (isEditing || !anchor || !rangeEnd) {
996
+ return;
997
+ }
998
+ e.preventDefault();
999
+ const text = e.clipboardData?.getData("text/plain");
1000
+ if (!text) {
1001
+ return;
1002
+ }
1003
+ const next = text.split(" ");
1004
+ const fields = matrix.getFieldsInSelection(anchor, rangeEnd);
1005
+ const prev = getSelectionValues(fields);
1006
+ const command = new DataGridBulkUpdateCommand({
1007
+ fields,
1008
+ next,
1009
+ prev,
1010
+ setter: setSelectionValues
1011
+ });
1012
+ execute(command);
1013
+ },
1014
+ [
1015
+ isEditing,
1016
+ anchor,
1017
+ rangeEnd,
1018
+ matrix,
1019
+ getSelectionValues,
1020
+ setSelectionValues,
1021
+ execute
1022
+ ]
1023
+ );
1024
+ return {
1025
+ handleCopyEvent,
1026
+ handlePasteEvent
1027
+ };
1028
+ };
1029
+
1030
+ // src/components/data-grid/hooks/use-data-grid-column-visibility.tsx
1031
+ import { useCallback as useCallback6 } from "react";
1032
+ function useDataGridColumnVisibility(grid, matrix) {
1033
+ const columns = grid.getAllLeafColumns();
1034
+ const columnOptions = columns.map((column) => ({
1035
+ id: column.id,
1036
+ name: getColumnName(column),
1037
+ checked: column.getIsVisible(),
1038
+ disabled: !column.getCanHide()
1039
+ }));
1040
+ const handleToggleColumn = useCallback6(
1041
+ (index) => (value) => {
1042
+ const column = columns[index];
1043
+ if (!column.getCanHide()) {
1044
+ return;
1045
+ }
1046
+ matrix.toggleColumn(index, value);
1047
+ column.toggleVisibility(value);
1048
+ },
1049
+ [columns, matrix]
1050
+ );
1051
+ const handleResetColumns = useCallback6(() => {
1052
+ grid.setColumnVisibility({});
1053
+ }, [grid]);
1054
+ const optionCount = columnOptions.filter((c) => !c.disabled).length;
1055
+ const isDisabled = optionCount === 0;
1056
+ return {
1057
+ columnOptions,
1058
+ handleToggleColumn,
1059
+ handleResetColumns,
1060
+ isDisabled
1061
+ };
1062
+ }
1063
+ function getColumnName(column) {
1064
+ const id = column.columnDef.id;
1065
+ const enableHiding = column.columnDef.enableHiding;
1066
+ const meta = column?.columnDef.meta;
1067
+ if (!id) {
1068
+ throw new Error(
1069
+ "Column is missing an id, which is a required field. Please provide an id for the column."
1070
+ );
1071
+ }
1072
+ if (process.env.NODE_ENV === "development" && !meta?.name && enableHiding) {
1073
+ console.warn(
1074
+ `Column "${id}" does not have a name. You should add a name to the column definition. Falling back to the column id.`
1075
+ );
1076
+ }
1077
+ return meta?.name || id;
1078
+ }
1079
+
1080
+ // src/components/data-grid/hooks/use-data-grid-duplicate-cell.tsx
1081
+ import { useWatch } from "react-hook-form";
1082
+ var useDataGridDuplicateCell = ({
1083
+ duplicateOf
1084
+ }) => {
1085
+ const { control } = useDataGridContext();
1086
+ const watchedValue = useWatch({ control, name: duplicateOf });
1087
+ return {
1088
+ watchedValue
1089
+ };
1090
+ };
1091
+
1092
+ // src/components/data-grid/hooks/use-data-grid-error-highlighting.tsx
1093
+ import { useCallback as useCallback7, useMemo as useMemo3, useState as useState3 } from "react";
1094
+ var useDataGridErrorHighlighting = (matrix, grid, errors) => {
1095
+ const [isHighlighted, setIsHighlighted] = useState3(false);
1096
+ const [visibilitySnapshot, setVisibilitySnapshot] = useState3(null);
1097
+ const { flatRows } = grid.getRowModel();
1098
+ const flatColumns = grid.getAllFlatColumns();
1099
+ const errorPaths = findErrorPaths(errors);
1100
+ const errorCount = errorPaths.length;
1101
+ const { rowsWithErrors, columnsWithErrors } = useMemo3(() => {
1102
+ const rowsWithErrors2 = /* @__PURE__ */ new Set();
1103
+ const columnsWithErrors2 = /* @__PURE__ */ new Set();
1104
+ errorPaths.forEach((errorPath) => {
1105
+ const rowIndex = matrix.rowAccessors.findIndex(
1106
+ (accessor) => accessor && (errorPath === accessor || errorPath.startsWith(`${accessor}.`))
1107
+ );
1108
+ if (rowIndex !== -1) {
1109
+ rowsWithErrors2.add(rowIndex);
1110
+ }
1111
+ const columnIndex = matrix.columnAccessors.findIndex(
1112
+ (accessor) => accessor && (errorPath === accessor || errorPath.endsWith(`.${accessor}`))
1113
+ );
1114
+ if (columnIndex !== -1) {
1115
+ columnsWithErrors2.add(columnIndex);
1116
+ }
1117
+ });
1118
+ return { rowsWithErrors: rowsWithErrors2, columnsWithErrors: columnsWithErrors2 };
1119
+ }, [errorPaths, matrix.rowAccessors, matrix.columnAccessors]);
1120
+ const toggleErrorHighlighting = useCallback7(
1121
+ (currentRowVisibility, currentColumnVisibility, setRowVisibility, setColumnVisibility) => {
1122
+ if (isHighlighted) {
1123
+ if (visibilitySnapshot) {
1124
+ setRowVisibility(visibilitySnapshot.rows);
1125
+ setColumnVisibility(visibilitySnapshot.columns);
1126
+ }
1127
+ } else {
1128
+ setVisibilitySnapshot({
1129
+ rows: { ...currentRowVisibility },
1130
+ columns: { ...currentColumnVisibility }
1131
+ });
1132
+ const rowsToHide = flatRows.map((_, index) => {
1133
+ return !rowsWithErrors.has(index) ? index : void 0;
1134
+ }).filter((index) => index !== void 0);
1135
+ const columnsToHide = flatColumns.map((column, index) => {
1136
+ return !columnsWithErrors.has(index) && index !== 0 ? column.id : void 0;
1137
+ }).filter((id) => id !== void 0);
1138
+ setRowVisibility(
1139
+ rowsToHide.reduce((acc, row) => ({ ...acc, [row]: false }), {})
1140
+ );
1141
+ setColumnVisibility(
1142
+ columnsToHide.reduce(
1143
+ (acc, column) => ({ ...acc, [column]: false }),
1144
+ {}
1145
+ )
1146
+ );
1147
+ }
1148
+ setIsHighlighted((prev) => !prev);
1149
+ },
1150
+ [
1151
+ isHighlighted,
1152
+ visibilitySnapshot,
1153
+ flatRows,
1154
+ flatColumns,
1155
+ rowsWithErrors,
1156
+ columnsWithErrors
1157
+ ]
1158
+ );
1159
+ return {
1160
+ errorCount,
1161
+ isHighlighted,
1162
+ toggleErrorHighlighting
1163
+ };
1164
+ };
1165
+ function findErrorPaths(obj, path = []) {
1166
+ if (typeof obj !== "object" || obj === null) {
1167
+ return [];
1168
+ }
1169
+ if ("message" in obj && "type" in obj) {
1170
+ return [path.join(".")];
1171
+ }
1172
+ return Object.entries(obj).flatMap(
1173
+ ([key, value]) => findErrorPaths(value, [...path, key])
1174
+ );
1175
+ }
1176
+
1177
+ // src/components/data-grid/hooks/use-data-grid-form-handlers.tsx
1178
+ import { useCallback as useCallback8 } from "react";
1179
+ var useDataGridFormHandlers = ({
1180
+ matrix,
1181
+ form,
1182
+ anchor
1183
+ }) => {
1184
+ const { getValues, reset } = form;
1185
+ const getSelectionValues = useCallback8(
1186
+ (fields) => {
1187
+ if (!fields.length) {
1188
+ return [];
1189
+ }
1190
+ const allValues = getValues();
1191
+ return fields.map((field) => {
1192
+ return field.split(".").reduce((obj, key) => obj?.[key], allValues);
1193
+ });
1194
+ },
1195
+ [getValues]
1196
+ );
1197
+ const setSelectionValues = useCallback8(
1198
+ async (fields, values, isHistory) => {
1199
+ if (!fields.length || !anchor) {
1200
+ return;
1201
+ }
1202
+ const type = matrix.getCellType(anchor);
1203
+ if (!type) {
1204
+ return;
1205
+ }
1206
+ const convertedValues = convertArrayToPrimitive(values, type);
1207
+ const currentValues = getValues();
1208
+ fields.forEach((field, index) => {
1209
+ if (!field) {
1210
+ return;
1211
+ }
1212
+ const valueIndex = index % values.length;
1213
+ const newValue = convertedValues[valueIndex];
1214
+ setValue(currentValues, field, newValue, type, isHistory);
1215
+ });
1216
+ reset(currentValues, {
1217
+ keepDirty: true,
1218
+ keepTouched: true,
1219
+ keepDefaultValues: true
1220
+ });
1221
+ },
1222
+ [matrix, anchor, getValues, reset]
1223
+ );
1224
+ return {
1225
+ getSelectionValues,
1226
+ setSelectionValues
1227
+ };
1228
+ };
1229
+ function convertToNumber(value) {
1230
+ if (typeof value === "number") {
1231
+ return value;
1232
+ }
1233
+ const converted = Number(value);
1234
+ if (isNaN(converted)) {
1235
+ throw new Error(`String "${value}" cannot be converted to number.`);
1236
+ }
1237
+ return converted;
1238
+ }
1239
+ function convertToBoolean(value) {
1240
+ if (typeof value === "boolean") {
1241
+ return value;
1242
+ }
1243
+ if (typeof value === "undefined" || value === null) {
1244
+ return false;
1245
+ }
1246
+ const lowerValue = value.toLowerCase();
1247
+ if (lowerValue === "true" || lowerValue === "false") {
1248
+ return lowerValue === "true";
1249
+ }
1250
+ throw new Error(`String "${value}" cannot be converted to boolean.`);
1251
+ }
1252
+ function covertToString(value) {
1253
+ if (typeof value === "undefined" || value === null) {
1254
+ return "";
1255
+ }
1256
+ return String(value);
1257
+ }
1258
+ function convertToggleableNumber(value) {
1259
+ let obj = value;
1260
+ if (typeof obj === "string") {
1261
+ try {
1262
+ obj = JSON.parse(obj);
1263
+ } catch (error) {
1264
+ throw new Error(`String "${value}" cannot be converted to object.`);
1265
+ }
1266
+ }
1267
+ return obj;
1268
+ }
1269
+ function setValue(currentValues, field, newValue, type, isHistory) {
1270
+ if (type !== "togglable-number") {
1271
+ field.split(".").reduce((curr, key, index) => {
1272
+ if (index === field.split(".").length - 1) {
1273
+ curr[key] = newValue;
1274
+ }
1275
+ curr[key] ?? (curr[key] = {});
1276
+ return curr[key];
1277
+ }, currentValues);
1278
+ return;
1279
+ }
1280
+ setValueToggleableNumber(currentValues, field, newValue, isHistory);
1281
+ }
1282
+ function setValueToggleableNumber(currentValues = {}, field, newValue, isHistory) {
1283
+ const currentValue = field.split(".").reduce((obj, key) => obj?.[key], currentValues);
1284
+ const { disabledToggle } = currentValue || {};
1285
+ const normalizeQuantity = (value) => {
1286
+ if (disabledToggle && value === "") {
1287
+ return 0;
1288
+ }
1289
+ return value;
1290
+ };
1291
+ const determineChecked = (quantity2) => {
1292
+ if (disabledToggle) {
1293
+ return true;
1294
+ }
1295
+ return quantity2 !== "" && quantity2 != null;
1296
+ };
1297
+ const quantity = normalizeQuantity(newValue.quantity);
1298
+ const checked = isHistory ? disabledToggle ? true : newValue.checked : determineChecked(quantity);
1299
+ const fieldParts = field.split(".");
1300
+ fieldParts.reduce((curr, key, index) => {
1301
+ if (index === fieldParts.length - 1) {
1302
+ curr[key] = {
1303
+ ...currentValue || {},
1304
+ quantity,
1305
+ checked,
1306
+ disabledToggle: disabledToggle ?? false
1307
+ };
1308
+ }
1309
+ curr[key] ?? (curr[key] = {});
1310
+ return curr[key];
1311
+ }, currentValues);
1312
+ }
1313
+ function convertArrayToPrimitive(values, type) {
1314
+ switch (type) {
1315
+ case "number":
1316
+ return values.map((v) => {
1317
+ if (v === "") {
1318
+ return v;
1319
+ }
1320
+ if (v == null) {
1321
+ return "";
1322
+ }
1323
+ return convertToNumber(v);
1324
+ });
1325
+ case "togglable-number":
1326
+ return values.map(convertToggleableNumber);
1327
+ case "boolean":
1328
+ return values.map(convertToBoolean);
1329
+ case "text":
1330
+ case "multiline-text":
1331
+ return values.map(covertToString);
1332
+ default:
1333
+ throw new Error(`Unsupported target type "${type}".`);
1334
+ }
1335
+ }
1336
+
1337
+ // src/components/data-grid/hooks/use-data-grid-keydown-event.tsx
1338
+ import { useCallback as useCallback9 } from "react";
1339
+ var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
1340
+ var VERTICAL_KEYS = ["ArrowUp", "ArrowDown"];
1341
+ var useDataGridKeydownEvent = ({
1342
+ containerRef,
1343
+ matrix,
1344
+ anchor,
1345
+ rangeEnd,
1346
+ isEditing,
1347
+ setTrapActive,
1348
+ scrollToCoordinates,
1349
+ setSingleRange,
1350
+ setRangeEnd,
1351
+ onEditingChangeHandler,
1352
+ getValues,
1353
+ setValue: setValue2,
1354
+ execute,
1355
+ undo,
1356
+ redo,
1357
+ queryTool,
1358
+ getSelectionValues,
1359
+ setSelectionValues,
1360
+ restoreSnapshot,
1361
+ createSnapshot
1362
+ }) => {
1363
+ const handleKeyboardNavigation = useCallback9(
1364
+ (e) => {
1365
+ if (!anchor) {
1366
+ return;
1367
+ }
1368
+ const type = matrix.getCellType(anchor);
1369
+ if (isEditing && type !== "boolean") {
1370
+ return;
1371
+ }
1372
+ const direction = VERTICAL_KEYS.includes(e.key) ? "vertical" : "horizontal";
1373
+ const basis = direction === "horizontal" ? anchor : e.shiftKey ? rangeEnd : anchor;
1374
+ const updater = direction === "horizontal" ? setSingleRange : e.shiftKey ? setRangeEnd : setSingleRange;
1375
+ if (!basis) {
1376
+ return;
1377
+ }
1378
+ const { row, col } = basis;
1379
+ const handleNavigation = (coords) => {
1380
+ e.preventDefault();
1381
+ e.stopPropagation();
1382
+ scrollToCoordinates(coords, direction);
1383
+ updater(coords);
1384
+ };
1385
+ const next = matrix.getValidMovement(
1386
+ row,
1387
+ col,
1388
+ e.key,
1389
+ e.metaKey || e.ctrlKey
1390
+ );
1391
+ handleNavigation(next);
1392
+ },
1393
+ [
1394
+ isEditing,
1395
+ anchor,
1396
+ rangeEnd,
1397
+ scrollToCoordinates,
1398
+ setSingleRange,
1399
+ setRangeEnd,
1400
+ matrix
1401
+ ]
1402
+ );
1403
+ const handleTabKey = useCallback9(
1404
+ (e) => {
1405
+ if (!anchor) {
1406
+ return;
1407
+ }
1408
+ e.preventDefault();
1409
+ e.stopPropagation();
1410
+ const { row, col } = anchor;
1411
+ const key = e.shiftKey ? "ArrowLeft" : "ArrowRight";
1412
+ const direction = "horizontal";
1413
+ const next = matrix.getValidMovement(
1414
+ row,
1415
+ col,
1416
+ key,
1417
+ e.metaKey || e.ctrlKey
1418
+ );
1419
+ scrollToCoordinates(next, direction);
1420
+ setSingleRange(next);
1421
+ },
1422
+ [anchor, scrollToCoordinates, setSingleRange, matrix]
1423
+ );
1424
+ const handleUndo = useCallback9(
1425
+ (e) => {
1426
+ e.preventDefault();
1427
+ if (e.shiftKey) {
1428
+ redo();
1429
+ return;
1430
+ }
1431
+ undo();
1432
+ },
1433
+ [redo, undo]
1434
+ );
1435
+ const handleSpaceKeyBoolean = useCallback9(
1436
+ (anchor2) => {
1437
+ const end = rangeEnd ?? anchor2;
1438
+ const fields = matrix.getFieldsInSelection(anchor2, end);
1439
+ const prev = getSelectionValues(fields);
1440
+ const allChecked = prev.every((value) => value === true);
1441
+ const next = Array.from({ length: prev.length }, () => !allChecked);
1442
+ const command = new DataGridBulkUpdateCommand({
1443
+ fields,
1444
+ next,
1445
+ prev,
1446
+ setter: setSelectionValues
1447
+ });
1448
+ execute(command);
1449
+ },
1450
+ [rangeEnd, matrix, getSelectionValues, setSelectionValues, execute]
1451
+ );
1452
+ const handleSpaceKeyText = useCallback9(
1453
+ (anchor2) => {
1454
+ const field = matrix.getCellField(anchor2);
1455
+ const input = queryTool?.getInput(anchor2);
1456
+ if (!field || !input) {
1457
+ return;
1458
+ }
1459
+ createSnapshot(anchor2);
1460
+ input.focus();
1461
+ },
1462
+ [matrix, queryTool, createSnapshot]
1463
+ );
1464
+ const handleSpaceKeyNumber = useCallback9(
1465
+ (anchor2) => {
1466
+ const field = matrix.getCellField(anchor2);
1467
+ const input = queryTool?.getInput(anchor2);
1468
+ if (!field || !input) {
1469
+ return;
1470
+ }
1471
+ createSnapshot(anchor2);
1472
+ const current = getValues(field);
1473
+ const next = "";
1474
+ const command = new DataGridUpdateCommand({
1475
+ next,
1476
+ prev: current,
1477
+ setter: (value) => {
1478
+ setValue2(field, value, {
1479
+ shouldDirty: true,
1480
+ shouldTouch: true
1481
+ });
1482
+ }
1483
+ });
1484
+ execute(command);
1485
+ input.focus();
1486
+ },
1487
+ [matrix, queryTool, getValues, execute, setValue2, createSnapshot]
1488
+ );
1489
+ const handleSpaceKeyTogglableNumber = useCallback9(
1490
+ (anchor2) => {
1491
+ const field = matrix.getCellField(anchor2);
1492
+ const input = queryTool?.getInput(anchor2);
1493
+ if (!field || !input) {
1494
+ return;
1495
+ }
1496
+ createSnapshot(anchor2);
1497
+ const current = getValues(field);
1498
+ let checked = current.checked;
1499
+ if (!current.disabledToggle) {
1500
+ checked = false;
1501
+ }
1502
+ const next = { ...current, quantity: "", checked };
1503
+ const command = new DataGridUpdateCommand({
1504
+ next,
1505
+ prev: current,
1506
+ setter: (value) => {
1507
+ setValue2(field, value, {
1508
+ shouldDirty: true,
1509
+ shouldTouch: true
1510
+ });
1511
+ }
1512
+ });
1513
+ execute(command);
1514
+ input.focus();
1515
+ },
1516
+ [matrix, queryTool, getValues, execute, setValue2, createSnapshot]
1517
+ );
1518
+ const handleSpaceKey = useCallback9(
1519
+ (e) => {
1520
+ if (!anchor || isEditing) {
1521
+ return;
1522
+ }
1523
+ e.preventDefault();
1524
+ const type = matrix.getCellType(anchor);
1525
+ if (!type) {
1526
+ return;
1527
+ }
1528
+ switch (type) {
1529
+ case "boolean":
1530
+ handleSpaceKeyBoolean(anchor);
1531
+ break;
1532
+ case "togglable-number":
1533
+ handleSpaceKeyTogglableNumber(anchor);
1534
+ break;
1535
+ case "text":
1536
+ case "multiline-text":
1537
+ handleSpaceKeyText(anchor);
1538
+ break;
1539
+ case "number":
1540
+ handleSpaceKeyNumber(anchor);
1541
+ break;
1542
+ }
1543
+ },
1544
+ [
1545
+ anchor,
1546
+ isEditing,
1547
+ matrix,
1548
+ handleSpaceKeyBoolean,
1549
+ handleSpaceKeyText,
1550
+ handleSpaceKeyNumber,
1551
+ handleSpaceKeyTogglableNumber
1552
+ ]
1553
+ );
1554
+ const handleMoveOnEnter = useCallback9(
1555
+ (e, anchor2) => {
1556
+ const direction = e.shiftKey ? "ArrowUp" : "ArrowDown";
1557
+ const pos = matrix.getValidMovement(
1558
+ anchor2.row,
1559
+ anchor2.col,
1560
+ direction,
1561
+ false
1562
+ );
1563
+ if (anchor2.row !== pos.row || anchor2.col !== pos.col) {
1564
+ setSingleRange(pos);
1565
+ scrollToCoordinates(pos, "vertical");
1566
+ } else {
1567
+ const container = queryTool?.getContainer(anchor2);
1568
+ container?.focus();
1569
+ }
1570
+ onEditingChangeHandler(false);
1571
+ },
1572
+ [
1573
+ queryTool,
1574
+ matrix,
1575
+ scrollToCoordinates,
1576
+ setSingleRange,
1577
+ onEditingChangeHandler
1578
+ ]
1579
+ );
1580
+ const handleEditOnEnter = useCallback9(
1581
+ (anchor2) => {
1582
+ const input = queryTool?.getInput(anchor2);
1583
+ if (!input) {
1584
+ return;
1585
+ }
1586
+ input.focus();
1587
+ onEditingChangeHandler(true);
1588
+ },
1589
+ [queryTool, onEditingChangeHandler]
1590
+ );
1591
+ const handleEnterKeyTextOrNumber = useCallback9(
1592
+ (e, anchor2) => {
1593
+ if (isEditing) {
1594
+ handleMoveOnEnter(e, anchor2);
1595
+ return;
1596
+ }
1597
+ handleEditOnEnter(anchor2);
1598
+ },
1599
+ [handleMoveOnEnter, handleEditOnEnter, isEditing]
1600
+ );
1601
+ const handleEnterKeyMultilineText = useCallback9(
1602
+ (e, anchor2) => {
1603
+ if (isEditing) {
1604
+ if (e.shiftKey) {
1605
+ return;
1606
+ }
1607
+ handleMoveOnEnter(e, anchor2);
1608
+ return;
1609
+ }
1610
+ handleEditOnEnter(anchor2);
1611
+ },
1612
+ [handleMoveOnEnter, handleEditOnEnter, isEditing]
1613
+ );
1614
+ const handleEnterKeyBoolean = useCallback9(
1615
+ (e, anchor2) => {
1616
+ const field = matrix.getCellField(anchor2);
1617
+ if (!field) {
1618
+ return;
1619
+ }
1620
+ const current = getValues(field);
1621
+ let next;
1622
+ if (typeof current === "boolean") {
1623
+ next = !current;
1624
+ } else {
1625
+ next = true;
1626
+ }
1627
+ const command = new DataGridUpdateCommand({
1628
+ next,
1629
+ prev: current,
1630
+ setter: (value) => {
1631
+ setValue2(field, value, {
1632
+ shouldDirty: true,
1633
+ shouldTouch: true
1634
+ });
1635
+ }
1636
+ });
1637
+ execute(command);
1638
+ handleMoveOnEnter(e, anchor2);
1639
+ },
1640
+ [execute, getValues, handleMoveOnEnter, matrix, setValue2]
1641
+ );
1642
+ const handleEnterKey = useCallback9(
1643
+ (e) => {
1644
+ if (!anchor) {
1645
+ return;
1646
+ }
1647
+ const type = matrix.getCellType(anchor);
1648
+ if (type === "multiline-text" && isEditing && e.shiftKey) {
1649
+ return;
1650
+ }
1651
+ e.preventDefault();
1652
+ switch (type) {
1653
+ case "multiline-text":
1654
+ handleEnterKeyMultilineText(e, anchor);
1655
+ break;
1656
+ case "togglable-number":
1657
+ case "text":
1658
+ case "number":
1659
+ handleEnterKeyTextOrNumber(e, anchor);
1660
+ break;
1661
+ case "boolean": {
1662
+ handleEnterKeyBoolean(e, anchor);
1663
+ break;
1664
+ }
1665
+ }
1666
+ },
1667
+ [
1668
+ anchor,
1669
+ matrix,
1670
+ isEditing,
1671
+ handleEnterKeyTextOrNumber,
1672
+ handleEnterKeyBoolean,
1673
+ handleEnterKeyMultilineText
1674
+ ]
1675
+ );
1676
+ const handleDeleteKeyTogglableNumber = useCallback9(
1677
+ (anchor2, rangeEnd2) => {
1678
+ const fields = matrix.getFieldsInSelection(anchor2, rangeEnd2);
1679
+ const prev = getSelectionValues(fields);
1680
+ const next = prev.map((value) => ({
1681
+ ...value,
1682
+ quantity: "",
1683
+ checked: value.disableToggle ? value.checked : false
1684
+ }));
1685
+ const command = new DataGridBulkUpdateCommand({
1686
+ fields,
1687
+ next,
1688
+ prev,
1689
+ setter: setSelectionValues
1690
+ });
1691
+ execute(command);
1692
+ },
1693
+ [matrix, getSelectionValues, setSelectionValues, execute]
1694
+ );
1695
+ const handleDeleteKeyTextOrNumber = useCallback9(
1696
+ (anchor2, rangeEnd2) => {
1697
+ const fields = matrix.getFieldsInSelection(anchor2, rangeEnd2);
1698
+ const prev = getSelectionValues(fields);
1699
+ const next = Array.from({ length: prev.length }, () => "");
1700
+ const command = new DataGridBulkUpdateCommand({
1701
+ fields,
1702
+ next,
1703
+ prev,
1704
+ setter: setSelectionValues
1705
+ });
1706
+ execute(command);
1707
+ },
1708
+ [matrix, getSelectionValues, setSelectionValues, execute]
1709
+ );
1710
+ const handleDeleteKeyBoolean = useCallback9(
1711
+ (anchor2, rangeEnd2) => {
1712
+ const fields = matrix.getFieldsInSelection(anchor2, rangeEnd2);
1713
+ const prev = getSelectionValues(fields);
1714
+ const next = Array.from({ length: prev.length }, () => false);
1715
+ const command = new DataGridBulkUpdateCommand({
1716
+ fields,
1717
+ next,
1718
+ prev,
1719
+ setter: setSelectionValues
1720
+ });
1721
+ execute(command);
1722
+ },
1723
+ [execute, getSelectionValues, matrix, setSelectionValues]
1724
+ );
1725
+ const handleDeleteKey = useCallback9(
1726
+ (e) => {
1727
+ if (!anchor || !rangeEnd || isEditing) {
1728
+ return;
1729
+ }
1730
+ e.preventDefault();
1731
+ const type = matrix.getCellType(anchor);
1732
+ if (!type) {
1733
+ return;
1734
+ }
1735
+ switch (type) {
1736
+ case "text":
1737
+ case "multiline-text":
1738
+ case "number":
1739
+ handleDeleteKeyTextOrNumber(anchor, rangeEnd);
1740
+ break;
1741
+ case "boolean":
1742
+ handleDeleteKeyBoolean(anchor, rangeEnd);
1743
+ break;
1744
+ case "togglable-number":
1745
+ handleDeleteKeyTogglableNumber(anchor, rangeEnd);
1746
+ break;
1747
+ }
1748
+ },
1749
+ [
1750
+ anchor,
1751
+ rangeEnd,
1752
+ isEditing,
1753
+ matrix,
1754
+ handleDeleteKeyTextOrNumber,
1755
+ handleDeleteKeyBoolean,
1756
+ handleDeleteKeyTogglableNumber
1757
+ ]
1758
+ );
1759
+ const handleEscapeKey = useCallback9(
1760
+ (e) => {
1761
+ if (!anchor || !isEditing) {
1762
+ return;
1763
+ }
1764
+ e.preventDefault();
1765
+ e.stopPropagation();
1766
+ restoreSnapshot();
1767
+ const container = queryTool?.getContainer(anchor);
1768
+ container?.focus();
1769
+ },
1770
+ [queryTool, isEditing, anchor, restoreSnapshot]
1771
+ );
1772
+ const handleSpecialFocusKeys = useCallback9(
1773
+ (e) => {
1774
+ if (!containerRef || isEditing) {
1775
+ return;
1776
+ }
1777
+ const focusableElements = getFocusableElements(containerRef);
1778
+ const focusElement = (element) => {
1779
+ if (element) {
1780
+ setTrapActive(false);
1781
+ element.focus();
1782
+ }
1783
+ };
1784
+ switch (e.key) {
1785
+ case ".":
1786
+ focusElement(focusableElements.cancel);
1787
+ break;
1788
+ case ",":
1789
+ focusElement(focusableElements.shortcuts);
1790
+ break;
1791
+ default:
1792
+ break;
1793
+ }
1794
+ },
1795
+ [isEditing, setTrapActive, containerRef]
1796
+ );
1797
+ const handleKeyDownEvent = useCallback9(
1798
+ (e) => {
1799
+ if (ARROW_KEYS.includes(e.key)) {
1800
+ handleKeyboardNavigation(e);
1801
+ return;
1802
+ }
1803
+ if (e.key === "z" && (e.metaKey || e.ctrlKey)) {
1804
+ handleUndo(e);
1805
+ return;
1806
+ }
1807
+ if (e.key === " ") {
1808
+ handleSpaceKey(e);
1809
+ return;
1810
+ }
1811
+ if (e.key === "Delete" || e.key === "Backspace") {
1812
+ handleDeleteKey(e);
1813
+ return;
1814
+ }
1815
+ if (e.key === "Enter") {
1816
+ handleEnterKey(e);
1817
+ return;
1818
+ }
1819
+ if (e.key === "Escape") {
1820
+ handleEscapeKey(e);
1821
+ return;
1822
+ }
1823
+ if (e.key === "Tab") {
1824
+ handleTabKey(e);
1825
+ return;
1826
+ }
1827
+ },
1828
+ [
1829
+ handleEscapeKey,
1830
+ handleKeyboardNavigation,
1831
+ handleUndo,
1832
+ handleSpaceKey,
1833
+ handleEnterKey,
1834
+ handleDeleteKey,
1835
+ handleTabKey
1836
+ ]
1837
+ );
1838
+ return {
1839
+ handleKeyDownEvent,
1840
+ handleSpecialFocusKeys
1841
+ };
1842
+ };
1843
+ function getFocusableElements(ref) {
1844
+ const focusableElements = Array.from(
1845
+ document.querySelectorAll(
1846
+ "[tabindex], a, button, input, select, textarea"
1847
+ )
1848
+ );
1849
+ const currentElementIndex = focusableElements.indexOf(ref.current);
1850
+ const shortcuts = currentElementIndex > 0 ? focusableElements[currentElementIndex - 1] : null;
1851
+ let cancel = null;
1852
+ for (let i = currentElementIndex + 1; i < focusableElements.length; i++) {
1853
+ if (!ref.current.contains(focusableElements[i])) {
1854
+ cancel = focusableElements[i];
1855
+ break;
1856
+ }
1857
+ }
1858
+ return { shortcuts, cancel };
1859
+ }
1860
+
1861
+ // src/components/data-grid/hooks/use-data-grid-mouse-up-event.tsx
1862
+ import { useCallback as useCallback10 } from "react";
1863
+ var useDataGridMouseUpEvent = ({
1864
+ matrix,
1865
+ anchor,
1866
+ dragEnd,
1867
+ setDragEnd,
1868
+ isDragging,
1869
+ setIsDragging,
1870
+ setRangeEnd,
1871
+ setIsSelecting,
1872
+ getSelectionValues,
1873
+ setSelectionValues,
1874
+ execute
1875
+ }) => {
1876
+ const handleDragEnd = useCallback10(() => {
1877
+ if (!isDragging) {
1878
+ return;
1879
+ }
1880
+ if (!anchor || !dragEnd) {
1881
+ return;
1882
+ }
1883
+ const dragSelection = matrix.getFieldsInSelection(anchor, dragEnd);
1884
+ const anchorField = matrix.getCellField(anchor);
1885
+ if (!anchorField || !dragSelection.length) {
1886
+ return;
1887
+ }
1888
+ const anchorValue = getSelectionValues([anchorField]);
1889
+ const fields = dragSelection.filter((field) => field !== anchorField);
1890
+ const prev = getSelectionValues(fields);
1891
+ const next = Array.from({ length: prev.length }, () => anchorValue[0]);
1892
+ const command = new DataGridBulkUpdateCommand({
1893
+ fields,
1894
+ prev,
1895
+ next,
1896
+ setter: setSelectionValues
1897
+ });
1898
+ execute(command);
1899
+ setIsDragging(false);
1900
+ setDragEnd(null);
1901
+ setRangeEnd(dragEnd);
1902
+ }, [
1903
+ isDragging,
1904
+ anchor,
1905
+ dragEnd,
1906
+ matrix,
1907
+ getSelectionValues,
1908
+ setSelectionValues,
1909
+ execute,
1910
+ setIsDragging,
1911
+ setDragEnd,
1912
+ setRangeEnd
1913
+ ]);
1914
+ const handleMouseUpEvent = useCallback10(() => {
1915
+ handleDragEnd();
1916
+ setIsSelecting(false);
1917
+ }, [handleDragEnd, setIsSelecting]);
1918
+ return {
1919
+ handleMouseUpEvent
1920
+ };
1921
+ };
1922
+
1923
+ // src/components/data-grid/hooks/use-data-grid-navigation.tsx
1924
+ import { useCallback as useCallback11 } from "react";
1925
+ var useDataGridNavigation = ({
1926
+ matrix,
1927
+ anchor,
1928
+ visibleColumns,
1929
+ visibleRows,
1930
+ columnVirtualizer,
1931
+ rowVirtualizer,
1932
+ setColumnVisibility,
1933
+ flatColumns,
1934
+ queryTool,
1935
+ setSingleRange
1936
+ }) => {
1937
+ const scrollToCoordinates = useCallback11(
1938
+ (coords, direction) => {
1939
+ if (!anchor) {
1940
+ return;
1941
+ }
1942
+ const { row, col } = coords;
1943
+ const { row: anchorRow, col: anchorCol } = anchor;
1944
+ const rowDirection = row >= anchorRow ? "down" : "up";
1945
+ const colDirection = col >= anchorCol ? "right" : "left";
1946
+ let toRow = rowDirection === "down" ? row + 1 : row - 1;
1947
+ if (visibleRows[toRow] === void 0) {
1948
+ toRow = row;
1949
+ }
1950
+ let toCol = colDirection === "right" ? col + 1 : col - 1;
1951
+ if (visibleColumns[toCol] === void 0) {
1952
+ toCol = col;
1953
+ }
1954
+ const scrollOptions = { align: "auto", behavior: "auto" };
1955
+ if (direction === "horizontal" || direction === "both") {
1956
+ columnVirtualizer.scrollToIndex(toCol, scrollOptions);
1957
+ }
1958
+ if (direction === "vertical" || direction === "both") {
1959
+ rowVirtualizer.scrollToIndex(toRow, scrollOptions);
1960
+ }
1961
+ },
1962
+ [anchor, columnVirtualizer, visibleRows, rowVirtualizer, visibleColumns]
1963
+ );
1964
+ const navigateToField = useCallback11(
1965
+ (field) => {
1966
+ const coords = matrix.getCoordinatesByField(field);
1967
+ if (!coords) {
1968
+ return;
1969
+ }
1970
+ const column = flatColumns[coords.col];
1971
+ setColumnVisibility((prev) => {
1972
+ return {
1973
+ ...prev,
1974
+ [column.id]: true
1975
+ };
1976
+ });
1977
+ requestAnimationFrame(() => {
1978
+ scrollToCoordinates(coords, "both");
1979
+ setSingleRange(coords);
1980
+ });
1981
+ requestAnimationFrame(() => {
1982
+ const input = queryTool?.getInput(coords);
1983
+ if (input) {
1984
+ input.focus();
1985
+ }
1986
+ });
1987
+ },
1988
+ [
1989
+ matrix,
1990
+ flatColumns,
1991
+ setColumnVisibility,
1992
+ scrollToCoordinates,
1993
+ setSingleRange,
1994
+ queryTool
1995
+ ]
1996
+ );
1997
+ return {
1998
+ scrollToCoordinates,
1999
+ navigateToField
2000
+ };
2001
+ };
2002
+
2003
+ // src/components/data-grid/hooks/use-data-grid-query-tool.tsx
2004
+ import { useEffect as useEffect2, useRef as useRef2 } from "react";
2005
+ var useDataGridQueryTool = (containerRef) => {
2006
+ const queryToolRef = useRef2(null);
2007
+ useEffect2(() => {
2008
+ if (containerRef.current) {
2009
+ queryToolRef.current = new DataGridQueryTool(containerRef.current);
2010
+ }
2011
+ }, [containerRef]);
2012
+ return queryToolRef.current;
2013
+ };
2014
+
2015
+ // src/components/data-grid/components/data-grid-cell-container.tsx
2016
+ import { ErrorMessage } from "@hookform/error-message";
2017
+ import { ExclamationCircle } from "@acmekit/icons";
2018
+ import { Tooltip as Tooltip2, clx } from "@acmekit/ui";
2019
+ import { get as get2 } from "react-hook-form";
2020
+
2021
+ // src/components/data-grid/components/data-grid-row-error-indicator.tsx
2022
+ import { Badge, Tooltip } from "@acmekit/ui";
2023
+ import { useTranslation } from "react-i18next";
2024
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
2025
+ var DataGridRowErrorIndicator = ({
2026
+ rowErrors
2027
+ }) => {
2028
+ const rowErrorCount = rowErrors ? rowErrors.length : 0;
2029
+ if (!rowErrors || rowErrorCount <= 0) {
2030
+ return null;
2031
+ }
2032
+ return /* @__PURE__ */ jsx2(
2033
+ Tooltip,
2034
+ {
2035
+ content: /* @__PURE__ */ jsx2("ul", { className: "flex flex-col gap-y-3", children: rowErrors.map((error, index) => /* @__PURE__ */ jsx2(DataGridRowErrorLine, { error }, index)) }),
2036
+ delayDuration: 0,
2037
+ children: /* @__PURE__ */ jsx2(Badge, { color: "red", size: "2xsmall", className: "cursor-default", children: rowErrorCount })
2038
+ }
2039
+ );
2040
+ };
2041
+ var DataGridRowErrorLine = ({
2042
+ error
2043
+ }) => {
2044
+ const { t } = useTranslation();
2045
+ return /* @__PURE__ */ jsxs2("li", { className: "txt-compact-small flex flex-col items-start", children: [
2046
+ error.message,
2047
+ /* @__PURE__ */ jsx2(
2048
+ "button",
2049
+ {
2050
+ type: "button",
2051
+ onClick: error.to,
2052
+ className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
2053
+ children: t("dataGrid.errors.fixError")
2054
+ }
2055
+ )
2056
+ ] });
2057
+ };
2058
+
2059
+ // src/components/data-grid/components/data-grid-cell-container.tsx
2060
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
2061
+ var DataGridCellContainer = ({
2062
+ isAnchor,
2063
+ isSelected,
2064
+ isDragSelected,
2065
+ field,
2066
+ showOverlay,
2067
+ placeholder,
2068
+ innerProps,
2069
+ overlayProps,
2070
+ children,
2071
+ errors,
2072
+ rowErrors,
2073
+ outerComponent,
2074
+ isMultiLine
2075
+ }) => {
2076
+ const error = get2(errors, field);
2077
+ const hasError = !!error;
2078
+ return /* @__PURE__ */ jsxs3("div", { className: clx("group/container relative h-full w-full"), children: [
2079
+ /* @__PURE__ */ jsxs3(
2080
+ "div",
2081
+ {
2082
+ className: clx(
2083
+ "bg-ui-bg-base group/cell relative flex h-full w-full gap-x-2 px-4 py-2.5 outline-none",
2084
+ {
2085
+ "items-center": !isMultiLine,
2086
+ "items-start": isMultiLine,
2087
+ "bg-ui-tag-red-bg text-ui-tag-red-text": hasError && !isAnchor && !isSelected && !isDragSelected,
2088
+ "ring-ui-bg-interactive ring-2 ring-inset": isAnchor,
2089
+ "bg-ui-bg-highlight [&:has([data-field]:focus)]:bg-ui-bg-base": isSelected || isAnchor,
2090
+ "bg-ui-bg-subtle": isDragSelected && !isAnchor
2091
+ }
2092
+ ),
2093
+ tabIndex: -1,
2094
+ ...innerProps,
2095
+ children: [
2096
+ /* @__PURE__ */ jsx3(
2097
+ ErrorMessage,
2098
+ {
2099
+ name: field,
2100
+ errors,
2101
+ render: ({ message }) => {
2102
+ return /* @__PURE__ */ jsx3("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx3(Tooltip2, { content: message, delayDuration: 0, children: /* @__PURE__ */ jsx3(ExclamationCircle, { className: "text-ui-tag-red-icon z-[3]" }) }) });
2103
+ }
2104
+ }
2105
+ ),
2106
+ /* @__PURE__ */ jsx3(
2107
+ "div",
2108
+ {
2109
+ className: clx("relative z-[1] flex h-full w-full", {
2110
+ "items-center justify-center": !isMultiLine,
2111
+ "items-start": isMultiLine
2112
+ }),
2113
+ children: /* @__PURE__ */ jsx3(RenderChildren, { isAnchor, placeholder, children })
2114
+ }
2115
+ ),
2116
+ /* @__PURE__ */ jsx3(DataGridRowErrorIndicator, { rowErrors }),
2117
+ showOverlay && /* @__PURE__ */ jsx3(
2118
+ "div",
2119
+ {
2120
+ ...overlayProps,
2121
+ "data-cell-overlay": "true",
2122
+ className: "absolute inset-0 z-[2]"
2123
+ }
2124
+ )
2125
+ ]
2126
+ }
2127
+ ),
2128
+ outerComponent
2129
+ ] });
2130
+ };
2131
+ var RenderChildren = ({
2132
+ isAnchor,
2133
+ placeholder,
2134
+ children
2135
+ }) => {
2136
+ if (!isAnchor && placeholder) {
2137
+ return placeholder;
2138
+ }
2139
+ return children;
2140
+ };
2141
+
2142
+ // src/components/data-grid/components/data-grid-boolean-cell.tsx
2143
+ import { jsx as jsx4 } from "react/jsx-runtime";
2144
+ var DataGridBooleanCell = ({
2145
+ context,
2146
+ disabled
2147
+ }) => {
2148
+ const { field, control, renderProps } = useDataGridCell({
2149
+ context
2150
+ });
2151
+ const errorProps = useDataGridCellError({ context });
2152
+ const { container, input } = renderProps;
2153
+ return /* @__PURE__ */ jsx4(
2154
+ Controller,
2155
+ {
2156
+ control,
2157
+ name: field,
2158
+ render: ({ field: field2 }) => {
2159
+ return /* @__PURE__ */ jsx4(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx4(Inner, { field: field2, inputProps: input, disabled }) });
2160
+ }
2161
+ }
2162
+ );
2163
+ };
2164
+ var Inner = ({
2165
+ field,
2166
+ inputProps,
2167
+ disabled
2168
+ }) => {
2169
+ const { ref, value, onBlur, name, disabled: fieldDisabled } = field;
2170
+ const {
2171
+ ref: inputRef,
2172
+ onBlur: onInputBlur,
2173
+ onChange,
2174
+ onFocus,
2175
+ ...attributes
2176
+ } = inputProps;
2177
+ const combinedRefs = useCombinedRefs(ref, inputRef);
2178
+ return /* @__PURE__ */ jsx4(
2179
+ Checkbox,
2180
+ {
2181
+ disabled: disabled || fieldDisabled,
2182
+ name,
2183
+ checked: value,
2184
+ onCheckedChange: (newValue) => onChange(newValue === true, value),
2185
+ onFocus,
2186
+ onBlur: () => {
2187
+ onBlur();
2188
+ onInputBlur();
2189
+ },
2190
+ ref: combinedRefs,
2191
+ tabIndex: -1,
2192
+ ...attributes
2193
+ }
2194
+ );
2195
+ };
2196
+
2197
+ // src/components/data-grid/components/data-grid-currency-cell.tsx
2198
+ import CurrencyInput, {
2199
+ formatValue
2200
+ } from "react-currency-input-field";
2201
+ import { Controller as Controller2 } from "react-hook-form";
2202
+ import { useCallback as useCallback12, useEffect as useEffect3, useState as useState4 } from "react";
2203
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
2204
+ var DataGridCurrencyCell = ({
2205
+ context,
2206
+ code
2207
+ }) => {
2208
+ const { field, control, renderProps } = useDataGridCell({
2209
+ context
2210
+ });
2211
+ const errorProps = useDataGridCellError({ context });
2212
+ const { container, input } = renderProps;
2213
+ const currency = currencies[code.toUpperCase()];
2214
+ return /* @__PURE__ */ jsx5(
2215
+ Controller2,
2216
+ {
2217
+ control,
2218
+ name: field,
2219
+ render: ({ field: field2 }) => {
2220
+ return /* @__PURE__ */ jsx5(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx5(Inner2, { field: field2, inputProps: input, currencyInfo: currency }) });
2221
+ }
2222
+ }
2223
+ );
2224
+ };
2225
+ var Inner2 = ({
2226
+ field,
2227
+ inputProps,
2228
+ currencyInfo
2229
+ }) => {
2230
+ const { value, onChange: _, onBlur, ref, ...rest } = field;
2231
+ const {
2232
+ ref: inputRef,
2233
+ onBlur: onInputBlur,
2234
+ onFocus,
2235
+ onChange,
2236
+ ...attributes
2237
+ } = inputProps;
2238
+ const formatter = useCallback12(
2239
+ (value2) => {
2240
+ const ensuredValue = typeof value2 === "number" ? value2.toString() : value2 || "";
2241
+ return formatValue({
2242
+ value: ensuredValue,
2243
+ decimalScale: currencyInfo.decimal_digits,
2244
+ disableGroupSeparators: true,
2245
+ decimalSeparator: "."
2246
+ });
2247
+ },
2248
+ [currencyInfo]
2249
+ );
2250
+ const [localValue, setLocalValue] = useState4(value || "");
2251
+ const handleValueChange = (value2, _name, _values) => {
2252
+ if (!value2) {
2253
+ setLocalValue("");
2254
+ return;
2255
+ }
2256
+ setLocalValue(value2);
2257
+ };
2258
+ useEffect3(() => {
2259
+ let update = value;
2260
+ if (!isNaN(Number(value))) {
2261
+ update = formatter(update);
2262
+ }
2263
+ setLocalValue(update);
2264
+ }, [value, formatter]);
2265
+ const combinedRed = useCombinedRefs(inputRef, ref);
2266
+ return /* @__PURE__ */ jsxs4("div", { className: "relative flex size-full items-center", children: [
2267
+ /* @__PURE__ */ jsx5(
2268
+ "span",
2269
+ {
2270
+ className: "txt-compact-small text-ui-fg-muted pointer-events-none absolute left-0 w-fit min-w-4",
2271
+ "aria-hidden": true,
2272
+ children: currencyInfo.symbol_native
2273
+ }
2274
+ ),
2275
+ /* @__PURE__ */ jsx5(
2276
+ CurrencyInput,
2277
+ {
2278
+ ...rest,
2279
+ ...attributes,
2280
+ ref: combinedRed,
2281
+ className: "txt-compact-small w-full flex-1 cursor-default appearance-none bg-transparent pl-8 text-right outline-none",
2282
+ value: localValue || void 0,
2283
+ onValueChange: handleValueChange,
2284
+ formatValueOnBlur: true,
2285
+ onBlur: () => {
2286
+ onBlur();
2287
+ onInputBlur();
2288
+ onChange(localValue, value);
2289
+ },
2290
+ onFocus,
2291
+ decimalScale: currencyInfo.decimal_digits,
2292
+ decimalsLimit: currencyInfo.decimal_digits,
2293
+ autoComplete: "off",
2294
+ tabIndex: -1
2295
+ }
2296
+ )
2297
+ ] });
2298
+ };
2299
+
2300
+ // src/components/data-grid/components/data-grid-multiline-cell.tsx
2301
+ import { clx as clx2 } from "@acmekit/ui";
2302
+ import { useCallback as useCallback13, useEffect as useEffect4, useRef as useRef3, useState as useState5 } from "react";
2303
+ import { Controller as Controller3 } from "react-hook-form";
2304
+ import { jsx as jsx6 } from "react/jsx-runtime";
2305
+ var DataGridMultilineCell = ({
2306
+ context
2307
+ }) => {
2308
+ const { field, control, renderProps } = useDataGridCell({
2309
+ context
2310
+ });
2311
+ const errorProps = useDataGridCellError({ context });
2312
+ const { container, input } = renderProps;
2313
+ return /* @__PURE__ */ jsx6(
2314
+ Controller3,
2315
+ {
2316
+ control,
2317
+ name: field,
2318
+ render: ({ field: field2 }) => {
2319
+ return /* @__PURE__ */ jsx6(DataGridCellContainer, { ...container, ...errorProps, isMultiLine: true, children: /* @__PURE__ */ jsx6(Inner3, { field: field2, inputProps: input }) });
2320
+ }
2321
+ }
2322
+ );
2323
+ };
2324
+ var Inner3 = ({
2325
+ field,
2326
+ inputProps
2327
+ }) => {
2328
+ const { onChange: _, onBlur, ref, value, ...rest } = field;
2329
+ const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
2330
+ const [localValue, setLocalValue] = useState5(value);
2331
+ const textareaRef = useRef3(null);
2332
+ useEffect4(() => {
2333
+ setLocalValue(value);
2334
+ }, [value]);
2335
+ const combinedRefs = useCombinedRefs(inputRef, ref, textareaRef);
2336
+ const adjustTextareaHeight = useCallback13(() => {
2337
+ const textarea = textareaRef.current;
2338
+ if (textarea) {
2339
+ textarea.style.height = "0px";
2340
+ const newHeight = Math.max(textarea.scrollHeight, 24);
2341
+ textarea.style.height = `${newHeight}px`;
2342
+ }
2343
+ }, []);
2344
+ useEffect4(() => {
2345
+ adjustTextareaHeight();
2346
+ }, [localValue, adjustTextareaHeight]);
2347
+ useEffect4(() => {
2348
+ adjustTextareaHeight();
2349
+ const timeoutId = setTimeout(adjustTextareaHeight, 50);
2350
+ return () => clearTimeout(timeoutId);
2351
+ }, [adjustTextareaHeight]);
2352
+ return /* @__PURE__ */ jsx6(
2353
+ "textarea",
2354
+ {
2355
+ className: clx2(
2356
+ "txt-compact-small text-ui-fg-subtle flex w-full cursor-pointer bg-transparent outline-none",
2357
+ "focus:cursor-text",
2358
+ "resize-none overflow-hidden py-2"
2359
+ ),
2360
+ autoComplete: "off",
2361
+ tabIndex: -1,
2362
+ value: localValue ?? "",
2363
+ onChange: (e) => {
2364
+ setLocalValue(e.target.value);
2365
+ adjustTextareaHeight();
2366
+ },
2367
+ ref: combinedRefs,
2368
+ onBlur: () => {
2369
+ onBlur();
2370
+ onInputBlur();
2371
+ onChange(localValue, value);
2372
+ },
2373
+ ...input,
2374
+ ...rest
2375
+ }
2376
+ );
2377
+ };
2378
+
2379
+ // src/components/data-grid/components/data-grid-number-cell.tsx
2380
+ import { clx as clx3 } from "@acmekit/ui";
2381
+ import { useEffect as useEffect5, useState as useState6 } from "react";
2382
+ import { Controller as Controller4 } from "react-hook-form";
2383
+ import { jsx as jsx7 } from "react/jsx-runtime";
2384
+ var DataGridNumberCell = ({
2385
+ context,
2386
+ ...rest
2387
+ }) => {
2388
+ const { field, control, renderProps } = useDataGridCell({
2389
+ context
2390
+ });
2391
+ const errorProps = useDataGridCellError({ context });
2392
+ const { container, input } = renderProps;
2393
+ return /* @__PURE__ */ jsx7(
2394
+ Controller4,
2395
+ {
2396
+ control,
2397
+ name: field,
2398
+ render: ({ field: field2 }) => {
2399
+ return /* @__PURE__ */ jsx7(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx7(Inner4, { field: field2, inputProps: input, ...rest }) });
2400
+ }
2401
+ }
2402
+ );
2403
+ };
2404
+ var Inner4 = ({
2405
+ field,
2406
+ inputProps,
2407
+ ...props
2408
+ }) => {
2409
+ const { ref, value, onChange: _, onBlur, ...fieldProps } = field;
2410
+ const {
2411
+ ref: inputRef,
2412
+ onChange,
2413
+ onBlur: onInputBlur,
2414
+ onFocus,
2415
+ ...attributes
2416
+ } = inputProps;
2417
+ const [localValue, setLocalValue] = useState6(value);
2418
+ useEffect5(() => {
2419
+ setLocalValue(value);
2420
+ }, [value]);
2421
+ const combinedRefs = useCombinedRefs(inputRef, ref);
2422
+ return /* @__PURE__ */ jsx7("div", { className: "size-full", children: /* @__PURE__ */ jsx7(
2423
+ "input",
2424
+ {
2425
+ ref: combinedRefs,
2426
+ value: localValue,
2427
+ onChange: (e) => setLocalValue(e.target.value),
2428
+ onBlur: () => {
2429
+ onBlur();
2430
+ onInputBlur();
2431
+ onChange(localValue, value);
2432
+ },
2433
+ onFocus,
2434
+ type: "number",
2435
+ inputMode: "decimal",
2436
+ className: clx3(
2437
+ "txt-compact-small size-full bg-transparent outline-none",
2438
+ "placeholder:text-ui-fg-muted"
2439
+ ),
2440
+ tabIndex: -1,
2441
+ ...props,
2442
+ ...fieldProps,
2443
+ ...attributes
2444
+ }
2445
+ ) });
2446
+ };
2447
+
2448
+ // src/components/data-grid/components/data-grid-readonly-cell.tsx
2449
+ import { clx as clx4 } from "@acmekit/ui";
2450
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
2451
+ var DataGridReadonlyCell = ({
2452
+ context,
2453
+ color = "muted",
2454
+ children,
2455
+ isMultiLine = false
2456
+ }) => {
2457
+ const { rowErrors } = useDataGridCellError({ context });
2458
+ return /* @__PURE__ */ jsxs5(
2459
+ "div",
2460
+ {
2461
+ className: clx4(
2462
+ "txt-compact-small text-ui-fg-subtle flex w-full cursor-not-allowed justify-between overflow-hidden px-4 py-2.5 outline-none",
2463
+ color === "muted" && "bg-ui-bg-subtle",
2464
+ color === "normal" && "bg-ui-bg-base",
2465
+ "h-full items-center"
2466
+ ),
2467
+ children: [
2468
+ /* @__PURE__ */ jsx8(
2469
+ "div",
2470
+ {
2471
+ className: clx4("flex-1", {
2472
+ truncate: !isMultiLine,
2473
+ "whitespace-pre-wrap break-words": isMultiLine
2474
+ }),
2475
+ children
2476
+ }
2477
+ ),
2478
+ /* @__PURE__ */ jsx8(DataGridRowErrorIndicator, { rowErrors })
2479
+ ]
2480
+ }
2481
+ );
2482
+ };
2483
+
2484
+ // src/components/data-grid/components/data-grid-root.tsx
2485
+ import {
2486
+ Adjustments,
2487
+ AdjustmentsDone,
2488
+ ExclamationCircle as ExclamationCircle2
2489
+ } from "@acmekit/icons";
2490
+ import { Button as Button2, DropdownMenu, clx as clx6 } from "@acmekit/ui";
2491
+ import {
2492
+ flexRender,
2493
+ getCoreRowModel,
2494
+ useReactTable
2495
+ } from "@tanstack/react-table";
2496
+ import {
2497
+ useVirtualizer
2498
+ } from "@tanstack/react-virtual";
2499
+ import {
2500
+ useCallback as useCallback15,
2501
+ useEffect as useEffect6,
2502
+ useMemo as useMemo5,
2503
+ useRef as useRef4,
2504
+ useState as useState9
2505
+ } from "react";
2506
+ import { useTranslation as useTranslation3 } from "react-i18next";
2507
+
2508
+ // src/hooks/use-command-history.tsx
2509
+ import { useCallback as useCallback14, useState as useState7 } from "react";
2510
+ var useCommandHistory = (maxHistory = 20) => {
2511
+ const [past, setPast] = useState7([]);
2512
+ const [future, setFuture] = useState7([]);
2513
+ const canUndo = past.length > 0;
2514
+ const canRedo = future.length > 0;
2515
+ const undo = useCallback14(() => {
2516
+ if (!canUndo) {
2517
+ return;
2518
+ }
2519
+ const previous = past[past.length - 1];
2520
+ const newPast = past.slice(0, past.length - 1);
2521
+ previous.undo();
2522
+ setPast(newPast);
2523
+ setFuture([previous, ...future.slice(0, maxHistory - 1)]);
2524
+ }, [canUndo, future, past, maxHistory]);
2525
+ const redo = useCallback14(() => {
2526
+ if (!canRedo) {
2527
+ return;
2528
+ }
2529
+ const next = future[0];
2530
+ const newFuture = future.slice(1);
2531
+ next.redo();
2532
+ setPast([...past, next].slice(0, maxHistory - 1));
2533
+ setFuture(newFuture);
2534
+ }, [canRedo, future, past, maxHistory]);
2535
+ const execute = useCallback14(
2536
+ (command) => {
2537
+ command.execute();
2538
+ setPast((past2) => [...past2, command].slice(0, maxHistory - 1));
2539
+ setFuture([]);
2540
+ },
2541
+ [maxHistory]
2542
+ );
2543
+ return {
2544
+ undo,
2545
+ redo,
2546
+ execute,
2547
+ canUndo,
2548
+ canRedo
2549
+ };
2550
+ };
2551
+
2552
+ // src/components/data-grid/components/data-grid-keyboard-shortcut-modal.tsx
2553
+ import { XMark } from "@acmekit/icons";
2554
+ import {
2555
+ Button,
2556
+ clx as clx5,
2557
+ Heading,
2558
+ IconButton,
2559
+ Input,
2560
+ Kbd,
2561
+ Text
2562
+ } from "@acmekit/ui";
2563
+ import { Dialog as RadixDialog } from "radix-ui";
2564
+ import { useMemo as useMemo4, useState as useState8 } from "react";
2565
+ import { useTranslation as useTranslation2 } from "react-i18next";
2566
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
2567
+ var useDataGridShortcuts = () => {
2568
+ const { t } = useTranslation2();
2569
+ const shortcuts = useMemo4(
2570
+ () => [
2571
+ {
2572
+ label: t("dataGrid.shortcuts.commands.undo"),
2573
+ keys: {
2574
+ Mac: ["\u2318", "Z"],
2575
+ Windows: ["Ctrl", "Z"]
2576
+ }
2577
+ },
2578
+ {
2579
+ label: t("dataGrid.shortcuts.commands.redo"),
2580
+ keys: {
2581
+ Mac: ["\u21E7", "\u2318", "Z"],
2582
+ Windows: ["Shift", "Ctrl", "Z"]
2583
+ }
2584
+ },
2585
+ {
2586
+ label: t("dataGrid.shortcuts.commands.copy"),
2587
+ keys: {
2588
+ Mac: ["\u2318", "C"],
2589
+ Windows: ["Ctrl", "C"]
2590
+ }
2591
+ },
2592
+ {
2593
+ label: t("dataGrid.shortcuts.commands.paste"),
2594
+ keys: {
2595
+ Mac: ["\u2318", "V"],
2596
+ Windows: ["Ctrl", "V"]
2597
+ }
2598
+ },
2599
+ {
2600
+ label: t("dataGrid.shortcuts.commands.edit"),
2601
+ keys: {
2602
+ Mac: ["\u21B5"],
2603
+ Windows: ["Enter"]
2604
+ }
2605
+ },
2606
+ {
2607
+ label: t("dataGrid.shortcuts.commands.delete"),
2608
+ keys: {
2609
+ Mac: ["\u232B"],
2610
+ Windows: ["Backspace"]
2611
+ }
2612
+ },
2613
+ {
2614
+ label: t("dataGrid.shortcuts.commands.clear"),
2615
+ keys: {
2616
+ Mac: ["Space"],
2617
+ Windows: ["Space"]
2618
+ }
2619
+ },
2620
+ {
2621
+ label: t("dataGrid.shortcuts.commands.moveUp"),
2622
+ keys: {
2623
+ Mac: ["\u2191"],
2624
+ Windows: ["\u2191"]
2625
+ }
2626
+ },
2627
+ {
2628
+ label: t("dataGrid.shortcuts.commands.moveDown"),
2629
+ keys: {
2630
+ Mac: ["\u2193"],
2631
+ Windows: ["\u2193"]
2632
+ }
2633
+ },
2634
+ {
2635
+ label: t("dataGrid.shortcuts.commands.moveLeft"),
2636
+ keys: {
2637
+ Mac: ["\u2190"],
2638
+ Windows: ["\u2190"]
2639
+ }
2640
+ },
2641
+ {
2642
+ label: t("dataGrid.shortcuts.commands.moveRight"),
2643
+ keys: {
2644
+ Mac: ["\u2192"],
2645
+ Windows: ["\u2192"]
2646
+ }
2647
+ },
2648
+ {
2649
+ label: t("dataGrid.shortcuts.commands.moveTop"),
2650
+ keys: {
2651
+ Mac: ["\u2318", "\u2191"],
2652
+ Windows: ["Ctrl", "\u2191"]
2653
+ }
2654
+ },
2655
+ {
2656
+ label: t("dataGrid.shortcuts.commands.moveBottom"),
2657
+ keys: {
2658
+ Mac: ["\u2318", "\u2193"],
2659
+ Windows: ["Ctrl", "\u2193"]
2660
+ }
2661
+ },
2662
+ {
2663
+ label: t("dataGrid.shortcuts.commands.selectDown"),
2664
+ keys: {
2665
+ Mac: ["\u21E7", "\u2193"],
2666
+ Windows: ["Shift", "\u2193"]
2667
+ }
2668
+ },
2669
+ {
2670
+ label: t("dataGrid.shortcuts.commands.selectUp"),
2671
+ keys: {
2672
+ Mac: ["\u21E7", "\u2191"],
2673
+ Windows: ["Shift", "\u2191"]
2674
+ }
2675
+ },
2676
+ {
2677
+ label: t("dataGrid.shortcuts.commands.selectColumnDown"),
2678
+ keys: {
2679
+ Mac: ["\u21E7", "\u2318", "\u2193"],
2680
+ Windows: ["Shift", "Ctrl", "\u2193"]
2681
+ }
2682
+ },
2683
+ {
2684
+ label: t("dataGrid.shortcuts.commands.selectColumnUp"),
2685
+ keys: {
2686
+ Mac: ["\u21E7", "\u2318", "\u2191"],
2687
+ Windows: ["Shift", "Ctrl", "\u2191"]
2688
+ }
2689
+ },
2690
+ {
2691
+ label: t("dataGrid.shortcuts.commands.focusToolbar"),
2692
+ keys: {
2693
+ Mac: ["\u2303", "\u2325", ","],
2694
+ Windows: ["Ctrl", "Alt", ","]
2695
+ }
2696
+ },
2697
+ {
2698
+ label: t("dataGrid.shortcuts.commands.focusCancel"),
2699
+ keys: {
2700
+ Mac: ["\u2303", "\u2325", "."],
2701
+ Windows: ["Ctrl", "Alt", "."]
2702
+ }
2703
+ }
2704
+ ],
2705
+ [t]
2706
+ );
2707
+ return shortcuts;
2708
+ };
2709
+ var DataGridKeyboardShortcutModal = ({
2710
+ open,
2711
+ onOpenChange
2712
+ }) => {
2713
+ const { t } = useTranslation2();
2714
+ const [searchValue, onSearchValueChange] = useState8("");
2715
+ const shortcuts = useDataGridShortcuts();
2716
+ const searchResults = useMemo4(() => {
2717
+ return shortcuts.filter(
2718
+ (shortcut) => shortcut.label.toLowerCase().includes(searchValue.toLowerCase())
2719
+ );
2720
+ }, [searchValue, shortcuts]);
2721
+ return /* @__PURE__ */ jsxs6(RadixDialog.Root, { open, onOpenChange, children: [
2722
+ /* @__PURE__ */ jsx9(RadixDialog.Trigger, { asChild: true, children: /* @__PURE__ */ jsx9(Button, { size: "small", variant: "secondary", children: t("dataGrid.shortcuts.label") }) }),
2723
+ /* @__PURE__ */ jsxs6(RadixDialog.Portal, { children: [
2724
+ /* @__PURE__ */ jsx9(
2725
+ RadixDialog.Overlay,
2726
+ {
2727
+ className: clx5(
2728
+ "bg-ui-bg-overlay fixed inset-0",
2729
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
2730
+ )
2731
+ }
2732
+ ),
2733
+ /* @__PURE__ */ jsxs6(RadixDialog.Content, { className: "bg-ui-bg-subtle shadow-elevation-modal fixed left-[50%] top-[50%] flex h-full max-h-[612px] w-full max-w-[560px] translate-x-[-50%] translate-y-[-50%] flex-col divide-y overflow-hidden rounded-lg outline-none", children: [
2734
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-y-3 px-6 py-4", children: [
2735
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
2736
+ /* @__PURE__ */ jsxs6("div", { children: [
2737
+ /* @__PURE__ */ jsx9(RadixDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx9(Heading, { children: t("app.menus.user.shortcuts") }) }),
2738
+ /* @__PURE__ */ jsx9(RadixDialog.Description, { className: "sr-only" })
2739
+ ] }),
2740
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-x-2", children: [
2741
+ /* @__PURE__ */ jsx9(Kbd, { children: "esc" }),
2742
+ /* @__PURE__ */ jsx9(RadixDialog.Close, { asChild: true, children: /* @__PURE__ */ jsx9(IconButton, { variant: "transparent", size: "small", children: /* @__PURE__ */ jsx9(XMark, {}) }) })
2743
+ ] })
2744
+ ] }),
2745
+ /* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9(
2746
+ Input,
2747
+ {
2748
+ type: "search",
2749
+ value: searchValue,
2750
+ autoFocus: true,
2751
+ onChange: (e) => onSearchValueChange(e.target.value)
2752
+ }
2753
+ ) })
2754
+ ] }),
2755
+ /* @__PURE__ */ jsx9("div", { className: "flex flex-col divide-y overflow-y-auto", children: searchResults.map((shortcut, index) => {
2756
+ return /* @__PURE__ */ jsxs6(
2757
+ "div",
2758
+ {
2759
+ className: "text-ui-fg-subtle flex items-center justify-between px-6 py-3",
2760
+ children: [
2761
+ /* @__PURE__ */ jsx9(Text, { size: "small", children: shortcut.label }),
2762
+ /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-x-1", children: shortcut.keys.Mac?.map((key, index2) => {
2763
+ return /* @__PURE__ */ jsx9("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ jsx9(Kbd, { children: key }) }, index2);
2764
+ }) })
2765
+ ]
2766
+ },
2767
+ index
2768
+ );
2769
+ }) })
2770
+ ] })
2771
+ ] })
2772
+ ] });
2773
+ };
2774
+
2775
+ // src/components/data-grid/components/data-grid-root.tsx
2776
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
2777
+ var ROW_HEIGHT = 40;
2778
+ var getCommonPinningStyles = (column) => {
2779
+ const isPinned = column.getIsPinned();
2780
+ const isDarkMode = document.documentElement.classList.contains("dark");
2781
+ const BORDER_COLOR = isDarkMode ? "rgb(50,50,53)" : "rgb(228,228,231)";
2782
+ return {
2783
+ position: isPinned ? "sticky" : "relative",
2784
+ width: column.getSize(),
2785
+ zIndex: isPinned ? 1 : 0,
2786
+ borderBottom: isPinned ? `1px solid ${BORDER_COLOR}` : void 0,
2787
+ borderRight: isPinned ? `1px solid ${BORDER_COLOR}` : void 0,
2788
+ left: isPinned === "left" ? `${column.getStart("left")}px` : void 0,
2789
+ right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0
2790
+ };
2791
+ };
2792
+ var DataGridRoot = ({
2793
+ data = [],
2794
+ columns,
2795
+ state,
2796
+ getSubRows,
2797
+ onEditingChange,
2798
+ disableInteractions,
2799
+ multiColumnSelection = false,
2800
+ showColumnsDropdown = true,
2801
+ totalRowCount,
2802
+ onFetchMore,
2803
+ isFetchingMore,
2804
+ hasNextPage,
2805
+ headerContent
2806
+ }) => {
2807
+ const isLazyMode = totalRowCount !== void 0;
2808
+ const containerRef = useRef4(null);
2809
+ const { redo, undo, execute } = useCommandHistory();
2810
+ const {
2811
+ register,
2812
+ control,
2813
+ getValues,
2814
+ setValue: setValue2,
2815
+ formState: { errors }
2816
+ } = state;
2817
+ const [internalTrapActive, setTrapActive] = useState9(true);
2818
+ const trapActive = !disableInteractions && internalTrapActive;
2819
+ const [anchor, setAnchor] = useState9(null);
2820
+ const [rangeEnd, setRangeEnd] = useState9(null);
2821
+ const [dragEnd, setDragEnd] = useState9(null);
2822
+ const [isSelecting, setIsSelecting] = useState9(false);
2823
+ const [isDragging, setIsDragging] = useState9(false);
2824
+ const [isEditing, setIsEditing] = useState9(false);
2825
+ const [columnVisibility, setColumnVisibility] = useState9({});
2826
+ const [rowVisibility, setRowVisibility] = useState9({});
2827
+ const grid = useReactTable({
2828
+ data,
2829
+ columns,
2830
+ initialState: {
2831
+ columnPinning: {
2832
+ left: [columns[0].id]
2833
+ }
2834
+ },
2835
+ state: {
2836
+ columnVisibility
2837
+ },
2838
+ onColumnVisibilityChange: setColumnVisibility,
2839
+ getSubRows,
2840
+ getCoreRowModel: getCoreRowModel(),
2841
+ defaultColumn: {
2842
+ size: 200,
2843
+ maxSize: 400
2844
+ }
2845
+ });
2846
+ const { flatRows } = grid.getRowModel();
2847
+ const flatColumns = grid.getAllFlatColumns();
2848
+ const visibleRows = useMemo5(
2849
+ () => flatRows.filter((_, index) => rowVisibility?.[index] !== false),
2850
+ [flatRows, rowVisibility]
2851
+ );
2852
+ const visibleColumns = grid.getVisibleLeafColumns();
2853
+ const effectiveRowCount = isLazyMode ? totalRowCount : visibleRows.length;
2854
+ const rowVirtualizer = useVirtualizer({
2855
+ count: effectiveRowCount,
2856
+ estimateSize: () => ROW_HEIGHT,
2857
+ getScrollElement: () => containerRef.current,
2858
+ // Measure actual row heights for dynamic sizing (disabled in Firefox due to measurement issues). Taken from Tanstack
2859
+ measureElement: typeof window !== "undefined" && navigator.userAgent.indexOf("Firefox") === -1 ? (element) => element?.getBoundingClientRect().height : void 0,
2860
+ overscan: 5,
2861
+ rangeExtractor: (range) => {
2862
+ const toRender = new Set(
2863
+ Array.from(
2864
+ { length: range.endIndex - range.startIndex + 1 },
2865
+ (_, i) => range.startIndex + i
2866
+ )
2867
+ );
2868
+ if (anchor && visibleRows[anchor.row]) {
2869
+ toRender.add(anchor.row);
2870
+ }
2871
+ if (rangeEnd && visibleRows[rangeEnd.row]) {
2872
+ toRender.add(rangeEnd.row);
2873
+ }
2874
+ return Array.from(toRender).sort((a, b) => a - b);
2875
+ }
2876
+ });
2877
+ const virtualRows = rowVirtualizer.getVirtualItems();
2878
+ const lazyLoadingRefs = useRef4({
2879
+ onFetchMore,
2880
+ hasNextPage,
2881
+ isFetchingMore,
2882
+ loadedRowCount: visibleRows.length
2883
+ });
2884
+ useEffect6(() => {
2885
+ lazyLoadingRefs.current = {
2886
+ onFetchMore,
2887
+ hasNextPage,
2888
+ isFetchingMore,
2889
+ loadedRowCount: visibleRows.length
2890
+ };
2891
+ }, [onFetchMore, hasNextPage, isFetchingMore, visibleRows.length]);
2892
+ const hasData = visibleRows.length > 0;
2893
+ const handleScroll = useCallback15(() => {
2894
+ const { onFetchMore: onFetchMore2, hasNextPage: hasNextPage2, isFetchingMore: isFetchingMore2, loadedRowCount } = lazyLoadingRefs.current;
2895
+ if (!onFetchMore2 || !hasNextPage2 || isFetchingMore2) {
2896
+ return;
2897
+ }
2898
+ const scrollElement = containerRef.current;
2899
+ const { scrollTop, clientHeight } = scrollElement;
2900
+ const loadedHeight = loadedRowCount * ROW_HEIGHT;
2901
+ const viewportBottom = scrollTop + clientHeight;
2902
+ const fetchThreshold = loadedHeight - ROW_HEIGHT * 10;
2903
+ if (viewportBottom >= fetchThreshold) {
2904
+ onFetchMore2();
2905
+ }
2906
+ }, [lazyLoadingRefs, containerRef]);
2907
+ useEffect6(() => {
2908
+ if (!isLazyMode || !hasData) {
2909
+ return;
2910
+ }
2911
+ const container = containerRef.current;
2912
+ if (!container) {
2913
+ return;
2914
+ }
2915
+ const timeoutId = setTimeout(() => {
2916
+ const scrollElement = containerRef.current;
2917
+ if (!scrollElement) {
2918
+ return;
2919
+ }
2920
+ scrollElement.addEventListener("scroll", handleScroll);
2921
+ }, 100);
2922
+ return () => {
2923
+ clearTimeout(timeoutId);
2924
+ const scrollElement = containerRef.current;
2925
+ scrollElement?.removeEventListener("scroll", handleScroll);
2926
+ };
2927
+ }, [isLazyMode, hasData]);
2928
+ const columnVirtualizer = useVirtualizer({
2929
+ count: visibleColumns.length,
2930
+ estimateSize: (index) => visibleColumns[index].getSize(),
2931
+ getScrollElement: () => containerRef.current,
2932
+ horizontal: true,
2933
+ overscan: 3,
2934
+ rangeExtractor: (range) => {
2935
+ const startIndex = range.startIndex;
2936
+ const endIndex = range.endIndex;
2937
+ const toRender = new Set(
2938
+ Array.from(
2939
+ { length: endIndex - startIndex + 1 },
2940
+ (_, i) => startIndex + i
2941
+ )
2942
+ );
2943
+ if (anchor && visibleColumns[anchor.col]) {
2944
+ toRender.add(anchor.col);
2945
+ }
2946
+ if (rangeEnd && visibleColumns[rangeEnd.col]) {
2947
+ toRender.add(rangeEnd.col);
2948
+ }
2949
+ toRender.add(0);
2950
+ return Array.from(toRender).sort((a, b) => a - b);
2951
+ }
2952
+ });
2953
+ const virtualColumns = columnVirtualizer.getVirtualItems();
2954
+ let virtualPaddingLeft;
2955
+ let virtualPaddingRight;
2956
+ if (columnVirtualizer && virtualColumns?.length) {
2957
+ virtualPaddingLeft = virtualColumns[0]?.start ?? 0;
2958
+ virtualPaddingRight = columnVirtualizer.getTotalSize() - (virtualColumns[virtualColumns.length - 1]?.end ?? 0);
2959
+ }
2960
+ const matrix = useMemo5(
2961
+ () => new DataGridMatrix(
2962
+ flatRows,
2963
+ columns,
2964
+ multiColumnSelection
2965
+ ),
2966
+ [flatRows, columns, multiColumnSelection]
2967
+ );
2968
+ const queryTool = useDataGridQueryTool(containerRef);
2969
+ const setSingleRange = useCallback15(
2970
+ (coordinates) => {
2971
+ setAnchor(coordinates);
2972
+ setRangeEnd(coordinates);
2973
+ },
2974
+ []
2975
+ );
2976
+ const { errorCount, isHighlighted, toggleErrorHighlighting } = useDataGridErrorHighlighting(matrix, grid, errors);
2977
+ const handleToggleErrorHighlighting = useCallback15(() => {
2978
+ toggleErrorHighlighting(
2979
+ rowVisibility,
2980
+ columnVisibility,
2981
+ setRowVisibility,
2982
+ setColumnVisibility
2983
+ );
2984
+ }, [toggleErrorHighlighting, rowVisibility, columnVisibility]);
2985
+ const {
2986
+ columnOptions,
2987
+ handleToggleColumn,
2988
+ handleResetColumns,
2989
+ isDisabled: isColumsDisabled
2990
+ } = useDataGridColumnVisibility(grid, matrix);
2991
+ const handleToggleColumnVisibility = useCallback15(
2992
+ (index) => {
2993
+ return handleToggleColumn(index);
2994
+ },
2995
+ [handleToggleColumn]
2996
+ );
2997
+ const { navigateToField, scrollToCoordinates } = useDataGridNavigation({
2998
+ matrix,
2999
+ queryTool,
3000
+ anchor,
3001
+ columnVirtualizer,
3002
+ rowVirtualizer,
3003
+ flatColumns,
3004
+ setColumnVisibility,
3005
+ setSingleRange,
3006
+ visibleColumns,
3007
+ visibleRows
3008
+ });
3009
+ const { createSnapshot, restoreSnapshot } = useDataGridCellSnapshot({
3010
+ matrix,
3011
+ form: state
3012
+ });
3013
+ const onEditingChangeHandler = useCallback15(
3014
+ (value) => {
3015
+ if (onEditingChange) {
3016
+ onEditingChange(value);
3017
+ }
3018
+ if (value) {
3019
+ createSnapshot(anchor);
3020
+ }
3021
+ setIsEditing(value);
3022
+ },
3023
+ [anchor, createSnapshot, onEditingChange]
3024
+ );
3025
+ const { getSelectionValues, setSelectionValues } = useDataGridFormHandlers({
3026
+ matrix,
3027
+ form: state,
3028
+ anchor
3029
+ });
3030
+ const { handleKeyDownEvent, handleSpecialFocusKeys } = useDataGridKeydownEvent({
3031
+ containerRef,
3032
+ matrix,
3033
+ queryTool,
3034
+ anchor,
3035
+ rangeEnd,
3036
+ isEditing,
3037
+ setTrapActive,
3038
+ setRangeEnd,
3039
+ getSelectionValues,
3040
+ getValues,
3041
+ setSelectionValues,
3042
+ onEditingChangeHandler,
3043
+ restoreSnapshot,
3044
+ createSnapshot,
3045
+ setSingleRange,
3046
+ scrollToCoordinates,
3047
+ execute,
3048
+ undo,
3049
+ redo,
3050
+ setValue: setValue2
3051
+ });
3052
+ const { handleMouseUpEvent } = useDataGridMouseUpEvent({
3053
+ matrix,
3054
+ anchor,
3055
+ dragEnd,
3056
+ setDragEnd,
3057
+ isDragging,
3058
+ setIsDragging,
3059
+ setRangeEnd,
3060
+ setIsSelecting,
3061
+ getSelectionValues,
3062
+ setSelectionValues,
3063
+ execute
3064
+ });
3065
+ const { handleCopyEvent, handlePasteEvent } = useDataGridClipboardEvents({
3066
+ matrix,
3067
+ isEditing,
3068
+ anchor,
3069
+ rangeEnd,
3070
+ getSelectionValues,
3071
+ setSelectionValues,
3072
+ execute
3073
+ });
3074
+ const {
3075
+ getWrapperFocusHandler,
3076
+ getInputChangeHandler,
3077
+ getOverlayMouseDownHandler,
3078
+ getWrapperMouseOverHandler,
3079
+ getIsCellDragSelected,
3080
+ getIsCellSelected,
3081
+ onDragToFillStart
3082
+ } = useDataGridCellHandlers({
3083
+ matrix,
3084
+ anchor,
3085
+ rangeEnd,
3086
+ setRangeEnd,
3087
+ isDragging,
3088
+ setIsDragging,
3089
+ isSelecting,
3090
+ setIsSelecting,
3091
+ setSingleRange,
3092
+ dragEnd,
3093
+ setDragEnd,
3094
+ setValue: setValue2,
3095
+ execute,
3096
+ multiColumnSelection
3097
+ });
3098
+ const { getCellErrorMetadata, getCellMetadata } = useDataGridCellMetadata({
3099
+ matrix
3100
+ });
3101
+ useEffect6(() => {
3102
+ if (!trapActive) {
3103
+ return;
3104
+ }
3105
+ window.addEventListener("keydown", handleKeyDownEvent);
3106
+ window.addEventListener("mouseup", handleMouseUpEvent);
3107
+ window.addEventListener("copy", handleCopyEvent);
3108
+ window.addEventListener("paste", handlePasteEvent);
3109
+ return () => {
3110
+ window.removeEventListener("keydown", handleKeyDownEvent);
3111
+ window.removeEventListener("mouseup", handleMouseUpEvent);
3112
+ window.removeEventListener("copy", handleCopyEvent);
3113
+ window.removeEventListener("paste", handlePasteEvent);
3114
+ };
3115
+ }, [
3116
+ trapActive,
3117
+ handleKeyDownEvent,
3118
+ handleMouseUpEvent,
3119
+ handleCopyEvent,
3120
+ handlePasteEvent
3121
+ ]);
3122
+ useEffect6(() => {
3123
+ const specialFocusHandler = (e) => {
3124
+ if (isSpecialFocusKey(e)) {
3125
+ handleSpecialFocusKeys(e);
3126
+ return;
3127
+ }
3128
+ };
3129
+ window.addEventListener("keydown", specialFocusHandler);
3130
+ return () => {
3131
+ window.removeEventListener("keydown", specialFocusHandler);
3132
+ };
3133
+ }, [handleSpecialFocusKeys]);
3134
+ const handleHeaderInteractionChange = useCallback15((isActive) => {
3135
+ if (isActive) {
3136
+ setTrapActive(false);
3137
+ }
3138
+ }, []);
3139
+ useEffect6(() => {
3140
+ if (!anchor) {
3141
+ return;
3142
+ }
3143
+ if (rangeEnd) {
3144
+ return;
3145
+ }
3146
+ setRangeEnd(anchor);
3147
+ }, [anchor, rangeEnd]);
3148
+ useEffect6(() => {
3149
+ if (!anchor && matrix) {
3150
+ const coords = matrix.getFirstNavigableCell();
3151
+ if (coords) {
3152
+ setSingleRange(coords);
3153
+ }
3154
+ }
3155
+ }, [anchor, matrix, setSingleRange]);
3156
+ const values = useMemo5(
3157
+ () => ({
3158
+ anchor,
3159
+ control,
3160
+ trapActive,
3161
+ errors,
3162
+ setTrapActive,
3163
+ setIsSelecting,
3164
+ setIsEditing: onEditingChangeHandler,
3165
+ setSingleRange,
3166
+ setRangeEnd,
3167
+ getWrapperFocusHandler,
3168
+ getInputChangeHandler,
3169
+ getOverlayMouseDownHandler,
3170
+ getWrapperMouseOverHandler,
3171
+ register,
3172
+ getIsCellSelected,
3173
+ getIsCellDragSelected,
3174
+ getCellMetadata,
3175
+ getCellErrorMetadata,
3176
+ navigateToField
3177
+ }),
3178
+ [
3179
+ anchor,
3180
+ control,
3181
+ trapActive,
3182
+ errors,
3183
+ setTrapActive,
3184
+ setIsSelecting,
3185
+ onEditingChangeHandler,
3186
+ setSingleRange,
3187
+ setRangeEnd,
3188
+ getWrapperFocusHandler,
3189
+ getInputChangeHandler,
3190
+ getOverlayMouseDownHandler,
3191
+ getWrapperMouseOverHandler,
3192
+ register,
3193
+ getIsCellSelected,
3194
+ getIsCellDragSelected,
3195
+ getCellMetadata,
3196
+ getCellErrorMetadata,
3197
+ navigateToField
3198
+ ]
3199
+ );
3200
+ const handleRestoreGridFocus = useCallback15(() => {
3201
+ if (anchor && !trapActive) {
3202
+ setTrapActive(true);
3203
+ setSingleRange(anchor);
3204
+ scrollToCoordinates(anchor, "both");
3205
+ requestAnimationFrame(() => {
3206
+ queryTool?.getContainer(anchor)?.focus();
3207
+ });
3208
+ }
3209
+ }, [anchor, trapActive, setSingleRange, scrollToCoordinates, queryTool]);
3210
+ return /* @__PURE__ */ jsx10(DataGridContext.Provider, { value: values, children: /* @__PURE__ */ jsxs7("div", { className: "bg-ui-bg-subtle flex size-full flex-col", children: [
3211
+ /* @__PURE__ */ jsx10(
3212
+ DataGridHeader,
3213
+ {
3214
+ showColumnsDropdown,
3215
+ columnOptions,
3216
+ isDisabled: isColumsDisabled,
3217
+ onToggleColumn: handleToggleColumnVisibility,
3218
+ errorCount,
3219
+ onToggleErrorHighlighting: handleToggleErrorHighlighting,
3220
+ onResetColumns: handleResetColumns,
3221
+ isHighlighted,
3222
+ onHeaderInteractionChange: handleHeaderInteractionChange,
3223
+ headerContent
3224
+ }
3225
+ ),
3226
+ /* @__PURE__ */ jsx10("div", { className: "size-full overflow-hidden", children: /* @__PURE__ */ jsx10(
3227
+ "div",
3228
+ {
3229
+ ref: containerRef,
3230
+ autoFocus: true,
3231
+ tabIndex: 0,
3232
+ className: "relative h-full select-none overflow-auto outline-none",
3233
+ onFocus: handleRestoreGridFocus,
3234
+ onClick: handleRestoreGridFocus,
3235
+ "data-container": true,
3236
+ role: "application",
3237
+ children: /* @__PURE__ */ jsxs7("div", { role: "grid", className: "text-ui-fg-subtle grid", children: [
3238
+ /* @__PURE__ */ jsx10(
3239
+ "div",
3240
+ {
3241
+ role: "rowgroup",
3242
+ className: "txt-compact-small-plus bg-ui-bg-subtle sticky top-0 z-[1] grid",
3243
+ children: grid.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs7(
3244
+ "div",
3245
+ {
3246
+ role: "row",
3247
+ className: "flex h-10 w-full",
3248
+ children: [
3249
+ virtualPaddingLeft ? /* @__PURE__ */ jsx10(
3250
+ "div",
3251
+ {
3252
+ role: "presentation",
3253
+ style: { display: "flex", width: virtualPaddingLeft }
3254
+ }
3255
+ ) : null,
3256
+ virtualColumns.reduce((acc, vc, index, array) => {
3257
+ const header = headerGroup.headers[vc.index];
3258
+ const previousVC = array[index - 1];
3259
+ if (previousVC && vc.index !== previousVC.index + 1) {
3260
+ acc.push(
3261
+ /* @__PURE__ */ jsx10(
3262
+ "div",
3263
+ {
3264
+ role: "presentation",
3265
+ style: {
3266
+ display: "flex",
3267
+ width: `${vc.start - previousVC.end}px`
3268
+ }
3269
+ },
3270
+ `padding-${previousVC.index}-${vc.index}`
3271
+ )
3272
+ );
3273
+ }
3274
+ acc.push(
3275
+ /* @__PURE__ */ jsx10(
3276
+ "div",
3277
+ {
3278
+ role: "columnheader",
3279
+ "data-column-index": vc.index,
3280
+ style: {
3281
+ width: header.getSize(),
3282
+ ...getCommonPinningStyles(header.column)
3283
+ },
3284
+ className: "bg-ui-bg-base txt-compact-small-plus flex items-center border-b border-r px-4 py-2.5",
3285
+ children: header.isPlaceholder ? null : flexRender(
3286
+ header.column.columnDef.header,
3287
+ header.getContext()
3288
+ )
3289
+ },
3290
+ header.id
3291
+ )
3292
+ );
3293
+ return acc;
3294
+ }, []),
3295
+ virtualPaddingRight ? /* @__PURE__ */ jsx10(
3296
+ "div",
3297
+ {
3298
+ role: "presentation",
3299
+ style: {
3300
+ display: "flex",
3301
+ width: virtualPaddingRight
3302
+ }
3303
+ }
3304
+ ) : null
3305
+ ]
3306
+ },
3307
+ headerGroup.id
3308
+ ))
3309
+ }
3310
+ ),
3311
+ /* @__PURE__ */ jsx10(
3312
+ "div",
3313
+ {
3314
+ role: "rowgroup",
3315
+ className: "relative grid",
3316
+ style: {
3317
+ height: `${rowVirtualizer.getTotalSize()}px`
3318
+ },
3319
+ children: virtualRows.map((virtualRow) => {
3320
+ const row = visibleRows[virtualRow.index];
3321
+ if (!row) {
3322
+ return /* @__PURE__ */ jsx10(
3323
+ DataGridRowSkeleton,
3324
+ {
3325
+ virtualRow,
3326
+ virtualColumns,
3327
+ virtualPaddingLeft,
3328
+ virtualPaddingRight
3329
+ },
3330
+ `skeleton-${virtualRow.index}`
3331
+ );
3332
+ }
3333
+ const rowIndex = flatRows.findIndex((r) => r.id === row.id);
3334
+ return /* @__PURE__ */ jsx10(
3335
+ DataGridRow,
3336
+ {
3337
+ row,
3338
+ rowIndex,
3339
+ virtualRow,
3340
+ rowVirtualizer,
3341
+ flatColumns,
3342
+ virtualColumns,
3343
+ anchor,
3344
+ virtualPaddingLeft,
3345
+ virtualPaddingRight,
3346
+ onDragToFillStart,
3347
+ multiColumnSelection
3348
+ },
3349
+ row.id
3350
+ );
3351
+ })
3352
+ }
3353
+ )
3354
+ ] })
3355
+ }
3356
+ ) })
3357
+ ] }) });
3358
+ };
3359
+ var DataGridHeader = ({
3360
+ columnOptions,
3361
+ isDisabled,
3362
+ onToggleColumn,
3363
+ onResetColumns,
3364
+ isHighlighted,
3365
+ errorCount,
3366
+ onToggleErrorHighlighting,
3367
+ onHeaderInteractionChange,
3368
+ showColumnsDropdown,
3369
+ headerContent
3370
+ }) => {
3371
+ const [shortcutsOpen, setShortcutsOpen] = useState9(false);
3372
+ const [columnsOpen, setColumnsOpen] = useState9(false);
3373
+ const { t } = useTranslation3();
3374
+ const direction = useDocumentDirection();
3375
+ const hasChanged = columnOptions.some((column) => !column.checked);
3376
+ const handleShortcutsOpenChange = (value) => {
3377
+ onHeaderInteractionChange(value);
3378
+ setShortcutsOpen(value);
3379
+ };
3380
+ const handleColumnsOpenChange = (value) => {
3381
+ onHeaderInteractionChange(value);
3382
+ setColumnsOpen(value);
3383
+ };
3384
+ return /* @__PURE__ */ jsxs7("div", { className: "bg-ui-bg-base flex items-center justify-between border-b p-4", children: [
3385
+ showColumnsDropdown && /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-x-2", children: [
3386
+ /* @__PURE__ */ jsxs7(
3387
+ DropdownMenu,
3388
+ {
3389
+ dir: direction,
3390
+ open: columnsOpen,
3391
+ onOpenChange: handleColumnsOpenChange,
3392
+ children: [
3393
+ /* @__PURE__ */ jsx10(
3394
+ ConditionalTooltip,
3395
+ {
3396
+ showTooltip: isDisabled,
3397
+ content: t("dataGrid.columns.disabled"),
3398
+ children: /* @__PURE__ */ jsx10(DropdownMenu.Trigger, { asChild: true, disabled: isDisabled, children: /* @__PURE__ */ jsxs7(Button2, { size: "small", variant: "secondary", children: [
3399
+ hasChanged ? /* @__PURE__ */ jsx10(AdjustmentsDone, {}) : /* @__PURE__ */ jsx10(Adjustments, {}),
3400
+ t("dataGrid.columns.view")
3401
+ ] }) })
3402
+ }
3403
+ ),
3404
+ /* @__PURE__ */ jsx10(DropdownMenu.Content, { children: columnOptions.map((column, index) => {
3405
+ const { checked, disabled, id, name } = column;
3406
+ if (disabled) {
3407
+ return null;
3408
+ }
3409
+ return /* @__PURE__ */ jsx10(
3410
+ DropdownMenu.CheckboxItem,
3411
+ {
3412
+ checked,
3413
+ onCheckedChange: onToggleColumn(index),
3414
+ onSelect: (e) => e.preventDefault(),
3415
+ children: name
3416
+ },
3417
+ id
3418
+ );
3419
+ }) })
3420
+ ]
3421
+ }
3422
+ ),
3423
+ hasChanged && /* @__PURE__ */ jsx10(
3424
+ Button2,
3425
+ {
3426
+ size: "small",
3427
+ variant: "transparent",
3428
+ type: "button",
3429
+ onClick: onResetColumns,
3430
+ className: "text-ui-fg-muted hover:text-ui-fg-subtle",
3431
+ "data-id": "reset-columns",
3432
+ children: t("dataGrid.columns.resetToDefault")
3433
+ }
3434
+ )
3435
+ ] }),
3436
+ headerContent,
3437
+ /* @__PURE__ */ jsxs7("div", { className: "ml-auto flex items-center gap-x-2", children: [
3438
+ errorCount > 0 && /* @__PURE__ */ jsxs7(
3439
+ Button2,
3440
+ {
3441
+ size: "small",
3442
+ variant: "secondary",
3443
+ type: "button",
3444
+ onClick: onToggleErrorHighlighting,
3445
+ className: clx6({
3446
+ "bg-ui-button-neutral-pressed": isHighlighted
3447
+ }),
3448
+ children: [
3449
+ /* @__PURE__ */ jsx10(ExclamationCircle2, { className: "text-ui-fg-subtle" }),
3450
+ /* @__PURE__ */ jsx10("span", { children: t("dataGrid.errors.count", {
3451
+ count: errorCount
3452
+ }) })
3453
+ ]
3454
+ }
3455
+ ),
3456
+ /* @__PURE__ */ jsx10(
3457
+ DataGridKeyboardShortcutModal,
3458
+ {
3459
+ open: shortcutsOpen,
3460
+ onOpenChange: handleShortcutsOpenChange
3461
+ }
3462
+ )
3463
+ ] })
3464
+ ] });
3465
+ };
3466
+ var DataGridCell = ({
3467
+ cell,
3468
+ columnIndex,
3469
+ rowIndex,
3470
+ anchor,
3471
+ onDragToFillStart,
3472
+ multiColumnSelection
3473
+ }) => {
3474
+ const coords = {
3475
+ row: rowIndex,
3476
+ col: columnIndex
3477
+ };
3478
+ const isAnchor = isCellMatch(coords, anchor);
3479
+ return /* @__PURE__ */ jsx10(
3480
+ "div",
3481
+ {
3482
+ role: "gridcell",
3483
+ "aria-rowindex": rowIndex,
3484
+ "aria-colindex": columnIndex,
3485
+ style: {
3486
+ width: cell.column.getSize(),
3487
+ ...getCommonPinningStyles(cell.column)
3488
+ },
3489
+ "data-row-index": rowIndex,
3490
+ "data-column-index": columnIndex,
3491
+ className: clx6(
3492
+ "relative flex items-stretch border-b border-r p-0 outline-none"
3493
+ ),
3494
+ tabIndex: -1,
3495
+ children: /* @__PURE__ */ jsxs7("div", { className: "relative w-full", children: [
3496
+ flexRender(cell.column.columnDef.cell, {
3497
+ ...cell.getContext(),
3498
+ columnIndex,
3499
+ rowIndex
3500
+ }),
3501
+ isAnchor && /* @__PURE__ */ jsx10(
3502
+ "div",
3503
+ {
3504
+ onMouseDown: onDragToFillStart,
3505
+ className: clx6(
3506
+ "bg-ui-fg-interactive absolute bottom-0 right-0 z-[3] size-1.5 cursor-ns-resize",
3507
+ {
3508
+ "cursor-nwse-resize": multiColumnSelection
3509
+ }
3510
+ )
3511
+ }
3512
+ )
3513
+ ] })
3514
+ }
3515
+ );
3516
+ };
3517
+ var DataGridRow = ({
3518
+ row,
3519
+ rowIndex,
3520
+ virtualRow,
3521
+ rowVirtualizer,
3522
+ virtualPaddingLeft,
3523
+ virtualPaddingRight,
3524
+ virtualColumns,
3525
+ flatColumns,
3526
+ anchor,
3527
+ onDragToFillStart,
3528
+ multiColumnSelection
3529
+ }) => {
3530
+ const visibleCells = row.getVisibleCells();
3531
+ return /* @__PURE__ */ jsxs7(
3532
+ "div",
3533
+ {
3534
+ role: "row",
3535
+ "aria-rowindex": virtualRow.index,
3536
+ "data-index": virtualRow.index,
3537
+ ref: (node) => rowVirtualizer.measureElement(node),
3538
+ style: {
3539
+ transform: `translateY(${virtualRow.start}px)`
3540
+ },
3541
+ className: "bg-ui-bg-subtle txt-compact-small absolute flex min-h-10 w-full",
3542
+ children: [
3543
+ virtualPaddingLeft ? /* @__PURE__ */ jsx10(
3544
+ "div",
3545
+ {
3546
+ role: "presentation",
3547
+ style: { display: "flex", width: virtualPaddingLeft }
3548
+ }
3549
+ ) : null,
3550
+ virtualColumns.reduce((acc, vc, index, array) => {
3551
+ const cell = visibleCells[vc.index];
3552
+ const column = cell.column;
3553
+ const columnIndex = flatColumns.findIndex((c) => c.id === column.id);
3554
+ const previousVC = array[index - 1];
3555
+ if (previousVC && vc.index !== previousVC.index + 1) {
3556
+ acc.push(
3557
+ /* @__PURE__ */ jsx10(
3558
+ "div",
3559
+ {
3560
+ role: "presentation",
3561
+ style: {
3562
+ display: "flex",
3563
+ width: `${vc.start - previousVC.end}px`
3564
+ }
3565
+ },
3566
+ `padding-${previousVC.index}-${vc.index}`
3567
+ )
3568
+ );
3569
+ }
3570
+ acc.push(
3571
+ /* @__PURE__ */ jsx10(
3572
+ DataGridCell,
3573
+ {
3574
+ cell,
3575
+ columnIndex,
3576
+ rowIndex,
3577
+ anchor,
3578
+ onDragToFillStart,
3579
+ multiColumnSelection
3580
+ },
3581
+ cell.id
3582
+ )
3583
+ );
3584
+ return acc;
3585
+ }, []),
3586
+ virtualPaddingRight ? /* @__PURE__ */ jsx10(
3587
+ "div",
3588
+ {
3589
+ role: "presentation",
3590
+ style: { display: "flex", width: virtualPaddingRight }
3591
+ }
3592
+ ) : null
3593
+ ]
3594
+ }
3595
+ );
3596
+ };
3597
+ var DataGridRowSkeleton = ({
3598
+ virtualRow,
3599
+ virtualPaddingLeft,
3600
+ virtualPaddingRight,
3601
+ virtualColumns
3602
+ }) => {
3603
+ return /* @__PURE__ */ jsxs7(
3604
+ "div",
3605
+ {
3606
+ role: "row",
3607
+ "aria-rowindex": virtualRow.index,
3608
+ style: {
3609
+ transform: `translateY(${virtualRow.start}px)`
3610
+ },
3611
+ className: "bg-ui-bg-subtle txt-compact-small absolute flex h-10 w-full",
3612
+ children: [
3613
+ virtualPaddingLeft ? /* @__PURE__ */ jsx10(
3614
+ "div",
3615
+ {
3616
+ role: "presentation",
3617
+ style: { display: "flex", width: virtualPaddingLeft }
3618
+ }
3619
+ ) : null,
3620
+ virtualColumns.map((vc, index, array) => {
3621
+ const previousVC = array[index - 1];
3622
+ const elements = [];
3623
+ if (previousVC && vc.index !== previousVC.index + 1) {
3624
+ elements.push(
3625
+ /* @__PURE__ */ jsx10(
3626
+ "div",
3627
+ {
3628
+ role: "presentation",
3629
+ style: {
3630
+ display: "flex",
3631
+ width: `${vc.start - previousVC.end}px`
3632
+ }
3633
+ },
3634
+ `padding-${previousVC.index}-${vc.index}`
3635
+ )
3636
+ );
3637
+ }
3638
+ elements.push(
3639
+ /* @__PURE__ */ jsx10(
3640
+ "div",
3641
+ {
3642
+ role: "gridcell",
3643
+ style: { width: vc.size },
3644
+ className: "relative flex items-center border-b border-r p-0 outline-none",
3645
+ children: /* @__PURE__ */ jsx10("div", { className: "flex h-full w-full items-center px-4", children: /* @__PURE__ */ jsx10("div", { className: "bg-ui-bg-component h-4 w-3/4 animate-pulse rounded" }) })
3646
+ },
3647
+ `skeleton-cell-${vc.index}`
3648
+ )
3649
+ );
3650
+ return elements;
3651
+ }),
3652
+ virtualPaddingRight ? /* @__PURE__ */ jsx10(
3653
+ "div",
3654
+ {
3655
+ role: "presentation",
3656
+ style: { display: "flex", width: virtualPaddingRight }
3657
+ }
3658
+ ) : null
3659
+ ]
3660
+ }
3661
+ );
3662
+ };
3663
+
3664
+ // src/components/data-grid/components/data-grid-text-cell.tsx
3665
+ import { clx as clx7 } from "@acmekit/ui";
3666
+ import { useEffect as useEffect7, useRef as useRef5, useState as useState10 } from "react";
3667
+ import { Controller as Controller5 } from "react-hook-form";
3668
+ import { jsx as jsx11 } from "react/jsx-runtime";
3669
+ var DataGridTextCell = ({
3670
+ context
3671
+ }) => {
3672
+ const { field, control, renderProps } = useDataGridCell({
3673
+ context
3674
+ });
3675
+ const errorProps = useDataGridCellError({ context });
3676
+ const { container, input } = renderProps;
3677
+ return /* @__PURE__ */ jsx11(
3678
+ Controller5,
3679
+ {
3680
+ control,
3681
+ name: field,
3682
+ render: ({ field: field2 }) => {
3683
+ return /* @__PURE__ */ jsx11(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ jsx11(Inner5, { field: field2, inputProps: input }) });
3684
+ }
3685
+ }
3686
+ );
3687
+ };
3688
+ var Inner5 = ({
3689
+ field,
3690
+ inputProps
3691
+ }) => {
3692
+ const { onChange: _, onBlur, ref, value, ...rest } = field;
3693
+ const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
3694
+ const [localValue, setLocalValue] = useState10(value);
3695
+ const inputElRef = useRef5(null);
3696
+ useEffect7(() => {
3697
+ setLocalValue(value);
3698
+ }, [value]);
3699
+ const combinedRefs = useCombinedRefs(inputRef, ref, inputElRef);
3700
+ return /* @__PURE__ */ jsx11(
3701
+ "input",
3702
+ {
3703
+ className: clx7(
3704
+ "txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer bg-transparent outline-none",
3705
+ "focus:cursor-text",
3706
+ "items-center justify-center"
3707
+ ),
3708
+ autoComplete: "off",
3709
+ tabIndex: -1,
3710
+ value: localValue ?? "",
3711
+ onChange: (e) => setLocalValue(e.target.value),
3712
+ ref: combinedRefs,
3713
+ onBlur: () => {
3714
+ onBlur();
3715
+ onInputBlur();
3716
+ onChange(localValue, value);
3717
+ },
3718
+ ...input,
3719
+ ...rest
3720
+ }
3721
+ );
3722
+ };
3723
+
3724
+ // src/components/data-grid/components/data-grid-textarea-modal-cell.tsx
3725
+ import { clx as clx8, Textarea } from "@acmekit/ui";
3726
+ import { Popover as RadixPopover } from "radix-ui";
3727
+ import { useCallback as useCallback16, useEffect as useEffect8, useRef as useRef6, useState as useState11 } from "react";
3728
+ import { Controller as Controller6 } from "react-hook-form";
3729
+ import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
3730
+ var DataGridExpandableTextCell = ({
3731
+ context,
3732
+ fieldLabel
3733
+ }) => {
3734
+ const { field, control, renderProps } = useDataGridCell({
3735
+ context
3736
+ });
3737
+ const errorProps = useDataGridCellError({ context });
3738
+ const { container, input } = renderProps;
3739
+ return /* @__PURE__ */ jsx12(
3740
+ Controller6,
3741
+ {
3742
+ control,
3743
+ name: field,
3744
+ render: ({ field: field2 }) => {
3745
+ return /* @__PURE__ */ jsx12(
3746
+ Inner6,
3747
+ {
3748
+ field: field2,
3749
+ inputProps: input,
3750
+ fieldLabel,
3751
+ container,
3752
+ errorProps
3753
+ }
3754
+ );
3755
+ }
3756
+ }
3757
+ );
3758
+ };
3759
+ var Inner6 = ({
3760
+ field,
3761
+ inputProps,
3762
+ fieldLabel: _fieldLabel,
3763
+ container,
3764
+ errorProps
3765
+ }) => {
3766
+ const { onChange: _, onBlur, ref, value, ...rest } = field;
3767
+ const { ref: inputRef, onBlur: onInputBlur, onChange, ...input } = inputProps;
3768
+ const { setSingleRange, anchor } = useDataGridContext();
3769
+ const { row, col } = anchor || { row: 0, col: 0 };
3770
+ const [localValue, setLocalValue] = useState11(value || "");
3771
+ const [isPopoverOpen, setIsPopoverOpen] = useState11(false);
3772
+ const [popoverValue, setPopoverValue] = useState11(value || "");
3773
+ const popoverContentRef = useRef6(null);
3774
+ useEffect8(() => {
3775
+ setLocalValue(value || "");
3776
+ }, [value]);
3777
+ useEffect8(() => {
3778
+ if (isPopoverOpen) {
3779
+ setPopoverValue(value || "");
3780
+ }
3781
+ }, [isPopoverOpen, value]);
3782
+ useEffect8(() => {
3783
+ if (!isPopoverOpen || !popoverContentRef.current) {
3784
+ return;
3785
+ }
3786
+ const handleKeyDownCapture = (e) => {
3787
+ const target = e.target;
3788
+ const isTextarea = target.tagName === "TEXTAREA";
3789
+ const isInPopover = popoverContentRef.current && popoverContentRef.current.contains(target);
3790
+ if (isTextarea || isInPopover) {
3791
+ const dataGridKeys = [
3792
+ "Enter",
3793
+ "Delete",
3794
+ "Backspace",
3795
+ "ArrowUp",
3796
+ "ArrowDown",
3797
+ "ArrowLeft",
3798
+ "ArrowRight",
3799
+ "Tab",
3800
+ " "
3801
+ ];
3802
+ if (dataGridKeys.includes(e.key) && e.key !== "Escape") {
3803
+ e.stopImmediatePropagation();
3804
+ }
3805
+ }
3806
+ };
3807
+ window.addEventListener("keydown", handleKeyDownCapture, true);
3808
+ return () => {
3809
+ window.removeEventListener("keydown", handleKeyDownCapture, true);
3810
+ };
3811
+ }, [isPopoverOpen]);
3812
+ const combinedRefs = useCombinedRefs(inputRef, ref);
3813
+ const handleOverlayMouseDown = useCallback16(
3814
+ (e) => {
3815
+ if (e.detail === 2) {
3816
+ e.preventDefault();
3817
+ e.stopPropagation();
3818
+ setSingleRange({ row, col });
3819
+ setIsPopoverOpen(true);
3820
+ return;
3821
+ }
3822
+ container.overlayProps.onMouseDown?.(e);
3823
+ },
3824
+ [container.overlayProps, setSingleRange, row, col]
3825
+ );
3826
+ const customContainer = {
3827
+ ...container,
3828
+ overlayProps: {
3829
+ ...container.overlayProps,
3830
+ onMouseDown: handleOverlayMouseDown
3831
+ }
3832
+ };
3833
+ const handlePopoverSave = () => {
3834
+ onChange(popoverValue, value);
3835
+ setLocalValue(popoverValue);
3836
+ setIsPopoverOpen(false);
3837
+ onBlur();
3838
+ onInputBlur();
3839
+ };
3840
+ const handlePopoverKeyDown = useCallback16((e) => {
3841
+ if (e.key !== "Escape") {
3842
+ e.stopPropagation();
3843
+ }
3844
+ }, []);
3845
+ const displayValue = localValue || "";
3846
+ const truncatedValue = displayValue.length > 50 ? `${displayValue.substring(0, 50)}...` : displayValue;
3847
+ return /* @__PURE__ */ jsxs8(
3848
+ RadixPopover.Root,
3849
+ {
3850
+ open: isPopoverOpen,
3851
+ onOpenChange: (open) => {
3852
+ if (!open) {
3853
+ handlePopoverSave();
3854
+ } else {
3855
+ setIsPopoverOpen(true);
3856
+ }
3857
+ },
3858
+ children: [
3859
+ /* @__PURE__ */ jsxs8(DataGridCellContainer, { ...customContainer, ...errorProps, children: [
3860
+ /* @__PURE__ */ jsx12(RadixPopover.Anchor, { asChild: true, children: /* @__PURE__ */ jsx12(
3861
+ "div",
3862
+ {
3863
+ className: clx8(
3864
+ "txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer items-center justify-center bg-transparent outline-none",
3865
+ "focus:cursor-text"
3866
+ ),
3867
+ children: /* @__PURE__ */ jsx12("span", { className: "w-full truncate text-center", children: truncatedValue })
3868
+ }
3869
+ ) }),
3870
+ /* @__PURE__ */ jsx12(
3871
+ "input",
3872
+ {
3873
+ className: "sr-only",
3874
+ autoComplete: "off",
3875
+ tabIndex: -1,
3876
+ value: localValue,
3877
+ onChange: (e) => setLocalValue(e.target.value),
3878
+ ref: combinedRefs,
3879
+ onBlur: () => {
3880
+ onBlur();
3881
+ onInputBlur();
3882
+ onChange(localValue, value);
3883
+ },
3884
+ ...input,
3885
+ ...rest
3886
+ }
3887
+ )
3888
+ ] }),
3889
+ /* @__PURE__ */ jsx12(RadixPopover.Portal, { children: /* @__PURE__ */ jsx12(
3890
+ RadixPopover.Content,
3891
+ {
3892
+ className: clx8(
3893
+ "bg-ui-bg-base shadow-elevation-flyout flex max-h-[80vh] w-[600px] overflow-hidden p-0 outline-none"
3894
+ ),
3895
+ align: "start",
3896
+ side: "bottom",
3897
+ sideOffset: -29,
3898
+ alignOffset: -16,
3899
+ collisionPadding: 24,
3900
+ onEscapeKeyDown: handlePopoverSave,
3901
+ onKeyDown: handlePopoverKeyDown,
3902
+ children: /* @__PURE__ */ jsx12("div", { ref: popoverContentRef, className: "h-full w-full", children: /* @__PURE__ */ jsx12(
3903
+ Textarea,
3904
+ {
3905
+ value: popoverValue,
3906
+ onChange: (e) => setPopoverValue(e.target.value),
3907
+ onKeyDown: (e) => {
3908
+ e.stopPropagation();
3909
+ },
3910
+ className: "!bg-ui-bg-base h-full min-h-[300px] w-full resize-none border-0 p-4 !shadow-none focus-visible:!shadow-none"
3911
+ }
3912
+ ) })
3913
+ }
3914
+ ) })
3915
+ ]
3916
+ }
3917
+ );
3918
+ };
3919
+
3920
+ // src/components/data-grid/data-grid.tsx
3921
+ import { jsx as jsx13 } from "react/jsx-runtime";
3922
+ var _DataGrid = ({
3923
+ isLoading,
3924
+ // Lazy loading props - passed through to DataGridRoot
3925
+ totalRowCount,
3926
+ onFetchMore,
3927
+ isFetchingMore,
3928
+ hasNextPage,
3929
+ ...props
3930
+ }) => {
3931
+ return isLoading ? /* @__PURE__ */ jsx13(
3932
+ DataGridSkeleton,
3933
+ {
3934
+ columns: props.columns,
3935
+ rows: props.data?.length && props.data.length > 0 ? props.data.length : 10
3936
+ }
3937
+ ) : /* @__PURE__ */ jsx13(
3938
+ DataGridRoot,
3939
+ {
3940
+ ...props,
3941
+ totalRowCount,
3942
+ onFetchMore,
3943
+ isFetchingMore,
3944
+ hasNextPage
3945
+ }
3946
+ );
3947
+ };
3948
+ var DataGrid = Object.assign(_DataGrid, {
3949
+ BooleanCell: DataGridBooleanCell,
3950
+ TextCell: DataGridTextCell,
3951
+ MultilineCell: DataGridMultilineCell,
3952
+ ExpandableTextCell: DataGridExpandableTextCell,
3953
+ NumberCell: DataGridNumberCell,
3954
+ CurrencyCell: DataGridCurrencyCell,
3955
+ ReadonlyCell: DataGridReadonlyCell
3956
+ });
3957
+
3958
+ // src/components/data-grid/helpers/create-data-grid-column-helper.ts
3959
+ import {
3960
+ createColumnHelper
3961
+ } from "@tanstack/react-table";
3962
+ function createDataGridHelper() {
3963
+ const columnHelper = createColumnHelper();
3964
+ return {
3965
+ column: ({
3966
+ id,
3967
+ name,
3968
+ header,
3969
+ cell,
3970
+ disableHiding = false,
3971
+ field,
3972
+ type,
3973
+ size,
3974
+ minSize,
3975
+ maxSize
3976
+ }) => columnHelper.display({
3977
+ id,
3978
+ header,
3979
+ cell,
3980
+ enableHiding: !disableHiding,
3981
+ size,
3982
+ minSize,
3983
+ maxSize,
3984
+ meta: {
3985
+ name,
3986
+ field,
3987
+ type
3988
+ }
3989
+ })
3990
+ };
3991
+ }
3992
+
3993
+ // src/components/common/tax-badge/tax-badge.tsx
3994
+ import { TaxExclusive, TaxInclusive } from "@acmekit/icons";
3995
+ import { Tooltip as Tooltip3 } from "@acmekit/ui";
3996
+ import { useTranslation as useTranslation4 } from "react-i18next";
3997
+ import { jsx as jsx14 } from "react/jsx-runtime";
3998
+ var IncludesTaxTooltip = ({
3999
+ includesTax
4000
+ }) => {
4001
+ const { t } = useTranslation4();
4002
+ return /* @__PURE__ */ jsx14(
4003
+ Tooltip3,
4004
+ {
4005
+ maxWidth: 999,
4006
+ content: includesTax ? t("general.includesTaxTooltip") : t("general.excludesTaxTooltip"),
4007
+ children: includesTax ? /* @__PURE__ */ jsx14(TaxInclusive, { className: "text-ui-fg-muted shrink-0" }) : /* @__PURE__ */ jsx14(TaxExclusive, { className: "text-ui-fg-muted shrink-0" })
4008
+ }
4009
+ );
4010
+ };
4011
+
4012
+ // src/components/data-grid/helpers/create-data-grid-price-columns.tsx
4013
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
4014
+ var createDataGridPriceColumns = ({
4015
+ currencies: currencies2,
4016
+ regions,
4017
+ pricePreferences,
4018
+ isReadyOnly,
4019
+ getFieldName,
4020
+ t
4021
+ }) => {
4022
+ const columnHelper = createDataGridHelper();
4023
+ return [
4024
+ ...currencies2?.map((currency) => {
4025
+ const preference = pricePreferences?.find(
4026
+ (p) => p.attribute === "currency_code" && p.value === currency
4027
+ );
4028
+ const translatedCurrencyName = t("fields.priceTemplate", {
4029
+ regionOrCurrency: currency.toUpperCase()
4030
+ });
4031
+ return columnHelper.column({
4032
+ id: `currency_prices.${currency}`,
4033
+ name: t("fields.priceTemplate", {
4034
+ regionOrCurrency: currency.toUpperCase()
4035
+ }),
4036
+ field: (context) => {
4037
+ const isReadyOnlyValue = isReadyOnly?.(context);
4038
+ if (isReadyOnlyValue) {
4039
+ return null;
4040
+ }
4041
+ return getFieldName(context, currency);
4042
+ },
4043
+ type: "number",
4044
+ header: () => /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between gap-3", children: [
4045
+ /* @__PURE__ */ jsx15("span", { className: "truncate", title: translatedCurrencyName, children: translatedCurrencyName }),
4046
+ /* @__PURE__ */ jsx15(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4047
+ ] }),
4048
+ cell: (context) => {
4049
+ if (isReadyOnly?.(context)) {
4050
+ return /* @__PURE__ */ jsx15(DataGridReadonlyCell, { context });
4051
+ }
4052
+ return /* @__PURE__ */ jsx15(DataGridCurrencyCell, { code: currency, context });
4053
+ }
4054
+ });
4055
+ }) ?? [],
4056
+ ...regions?.map((region) => {
4057
+ const preference = pricePreferences?.find(
4058
+ (p) => p.attribute === "region_id" && p.value === region.id
4059
+ );
4060
+ const translatedRegionName = t("fields.priceTemplate", {
4061
+ regionOrCurrency: region.name
4062
+ });
4063
+ return columnHelper.column({
4064
+ id: `region_prices.${region.id}`,
4065
+ name: t("fields.priceTemplate", {
4066
+ regionOrCurrency: region.name
4067
+ }),
4068
+ field: (context) => {
4069
+ const isReadyOnlyValue = isReadyOnly?.(context);
4070
+ if (isReadyOnlyValue) {
4071
+ return null;
4072
+ }
4073
+ return getFieldName(context, region.id);
4074
+ },
4075
+ type: "number",
4076
+ header: () => /* @__PURE__ */ jsxs9("div", { className: "flex w-full items-center justify-between gap-3", children: [
4077
+ /* @__PURE__ */ jsx15("span", { className: "truncate", title: translatedRegionName, children: translatedRegionName }),
4078
+ /* @__PURE__ */ jsx15(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4079
+ ] }),
4080
+ cell: (context) => {
4081
+ if (isReadyOnly?.(context)) {
4082
+ return /* @__PURE__ */ jsx15(DataGridReadonlyCell, { context });
4083
+ }
4084
+ const currency = currencies2?.find((c) => c === region.currency_code);
4085
+ if (!currency) {
4086
+ return null;
4087
+ }
4088
+ return /* @__PURE__ */ jsx15(
4089
+ DataGridCurrencyCell,
4090
+ {
4091
+ code: region.currency_code,
4092
+ context
4093
+ }
4094
+ );
4095
+ }
4096
+ });
4097
+ }) ?? []
4098
+ ];
4099
+ };
4100
+
4101
+ export {
4102
+ useCombinedRefs,
4103
+ useDataGridCell,
4104
+ useDataGridCellError,
4105
+ useDataGridDuplicateCell,
4106
+ DataGridCellContainer,
4107
+ DataGridReadonlyCell,
4108
+ DataGridSkeleton,
4109
+ DataGrid,
4110
+ createDataGridHelper,
4111
+ IncludesTaxTooltip,
4112
+ createDataGridPriceColumns
4113
+ };