@mercurjs/admin 2.2.0-canary.50 → 2.2.0-canary.53

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 (162) hide show
  1. package/dist/{add-campaign-promotions-QQUFYFRH.js → add-campaign-promotions-RH5L6VMH.js} +6 -6
  2. package/dist/{api-key-management-detail-O6KKT7V2.js → api-key-management-detail-2RZ6NOYH.js} +3 -3
  3. package/dist/{api-key-management-list-QVYDHEZQ.js → api-key-management-list-CGHUURWX.js} +5 -5
  4. package/dist/{api-key-management-sales-channels-W5NFP6EW.js → api-key-management-sales-channels-VJMUPYV3.js} +2 -2
  5. package/dist/{attribute-detail-LWKL6UMS.js → attribute-detail-6FMX7IDW.js} +8 -8
  6. package/dist/{attribute-list-QUSXFHRZ.js → attribute-list-PJXWYS4C.js} +5 -5
  7. package/dist/{campaign-detail-PF3LUUZU.js → campaign-detail-3PNOOUGP.js} +8 -8
  8. package/dist/{campaign-list-YXZ5GE7I.js → campaign-list-TNJDWTM5.js} +5 -5
  9. package/dist/{category-detail-NQIXS2WH.js → category-detail-KVGWGOXO.js} +7 -7
  10. package/dist/{category-list-5XGK4PEB.js → category-list-D4J4G6HW.js} +5 -5
  11. package/dist/{category-products-SX6CH3ZZ.js → category-products-3Z7IEXQX.js} +5 -5
  12. package/dist/{chunk-OPE24DZA.js → chunk-3FKB6UTO.js} +1 -1
  13. package/dist/{chunk-PEUWV5YK.js → chunk-3GOUKEPE.js} +22 -8
  14. package/dist/{chunk-3RRHQY24.js → chunk-3KS7PC2Z.js} +4 -4
  15. package/dist/{chunk-Y6C2YIKD.js → chunk-3LDOWS4A.js} +1 -1
  16. package/dist/{chunk-KL4DBMVO.js → chunk-3VMIKSCF.js} +5 -5
  17. package/dist/{chunk-EQGJGBA5.js → chunk-3WCK2FT4.js} +2 -2
  18. package/dist/{chunk-XJQ4MWBR.js → chunk-4CF6MCTB.js} +2 -2
  19. package/dist/{chunk-ZCQMFJ4X.js → chunk-4DJL3XN7.js} +5 -5
  20. package/dist/{chunk-M5BZBKA3.js → chunk-4QQ6BFWQ.js} +1 -1
  21. package/dist/{chunk-K2JORJRZ.js → chunk-4TW5RTWO.js} +2 -2
  22. package/dist/{chunk-BFUHW56P.js → chunk-5NC3VFXY.js} +1 -1
  23. package/dist/{chunk-N2CMOV3N.js → chunk-67KYEPSA.js} +1 -1
  24. package/dist/{chunk-2SMBVF6F.js → chunk-6DDS7IRR.js} +4 -4
  25. package/dist/{chunk-4XGFT4RZ.js → chunk-6FZYSGM6.js} +6 -6
  26. package/dist/{chunk-AO3P27WX.js → chunk-6R767EBC.js} +1 -1
  27. package/dist/{chunk-FIWEITDG.js → chunk-6TMGHMZ2.js} +4 -4
  28. package/dist/{chunk-YPM6XXSO.js → chunk-7KLIV4DG.js} +5 -5
  29. package/dist/{chunk-PAYQJPGK.js → chunk-7PPT3477.js} +2 -2
  30. package/dist/{chunk-MBHP7XGQ.js → chunk-AW5OKJQZ.js} +1 -1
  31. package/dist/{chunk-WNBV2NBG.js → chunk-BBD4WOUK.js} +2 -2
  32. package/dist/{chunk-2GHNKPYY.js → chunk-BHSY6RCN.js} +4 -4
  33. package/dist/{chunk-6PGIRZA6.js → chunk-CKWG7MDV.js} +3 -3
  34. package/dist/{chunk-O6KUSG6F.js → chunk-CLDUJCYN.js} +5 -5
  35. package/dist/{chunk-VHOCBKSA.js → chunk-D74PZCTO.js} +1 -1
  36. package/dist/{chunk-PFD4SHVF.js → chunk-DPBZDNIP.js} +9 -7
  37. package/dist/{chunk-2CHED2KM.js → chunk-EFUP5XI6.js} +3 -3
  38. package/dist/{chunk-Z7XMG6DA.js → chunk-EQV3YDNF.js} +7 -8
  39. package/dist/{chunk-CQKCZECQ.js → chunk-F6DGTW4E.js} +1 -1
  40. package/dist/{chunk-WV4SPFOD.js → chunk-G67PGZDM.js} +2 -2
  41. package/dist/{chunk-6ZVV2XHU.js → chunk-GRFWCCUW.js} +1 -1
  42. package/dist/{chunk-ESC6LVVC.js → chunk-H3D6V3KM.js} +1 -1
  43. package/dist/{chunk-I3RIVWBQ.js → chunk-HC7FWIMY.js} +4 -4
  44. package/dist/{chunk-GLWJ5J3F.js → chunk-HSSKMCXJ.js} +2 -2
  45. package/dist/{chunk-YL7CBNVF.js → chunk-I5FOWDOM.js} +4 -4
  46. package/dist/{chunk-IJ2CSCLP.js → chunk-JSI7IOMU.js} +3 -3
  47. package/dist/{chunk-J772X4Q3.js → chunk-KT7CXVLT.js} +4 -4
  48. package/dist/{chunk-B3IK3FNO.js → chunk-MEDZM6N7.js} +4 -4
  49. package/dist/{chunk-KQVRWXAL.js → chunk-MPRW23TB.js} +2 -2
  50. package/dist/{chunk-VVJPSCBO.js → chunk-MUKW4VRI.js} +4 -4
  51. package/dist/{chunk-JPFPQWNT.js → chunk-NM7UMMTI.js} +5 -5
  52. package/dist/{chunk-26PTCTT3.js → chunk-OSDDXAP2.js} +5 -5
  53. package/dist/{chunk-L6D7AGRF.js → chunk-OX6HZPVY.js} +4 -4
  54. package/dist/{chunk-ZVPTNPLI.js → chunk-P3GGL5JL.js} +1 -1
  55. package/dist/{chunk-VU6KTPOZ.js → chunk-PDID73QY.js} +539 -537
  56. package/dist/{chunk-MVRIYUOU.js → chunk-PPRIEP4H.js} +4 -4
  57. package/dist/{chunk-3WOU2BB5.js → chunk-Q5DRFJPI.js} +4 -4
  58. package/dist/{chunk-5WTNXDRM.js → chunk-QXJFQDMJ.js} +5 -5
  59. package/dist/{chunk-Q2CJGCIA.js → chunk-R2LW5LGL.js} +1 -1
  60. package/dist/{chunk-TVTI7RG5.js → chunk-RX4VERJZ.js} +5 -5
  61. package/dist/{chunk-SHFF3Y5U.js → chunk-RYISNVIR.js} +4 -4
  62. package/dist/{chunk-5NSOIZFB.js → chunk-S4IDR46L.js} +3 -3
  63. package/dist/{chunk-IOAB3VND.js → chunk-SLAWONP2.js} +4 -4
  64. package/dist/{chunk-OAGTPKC5.js → chunk-TIG77LHS.js} +1 -1
  65. package/dist/{chunk-YBVXGODN.js → chunk-UVH7PC5B.js} +4 -4
  66. package/dist/{chunk-KA3BALYJ.js → chunk-VB7LMHAF.js} +5 -5
  67. package/dist/{chunk-GT5A4XN2.js → chunk-VX6OCQLN.js} +4 -4
  68. package/dist/{chunk-THMINQBZ.js → chunk-WF2PHYTE.js} +4 -4
  69. package/dist/{chunk-NASXWD7N.js → chunk-WTVSHPKP.js} +2 -2
  70. package/dist/{chunk-MJTFEVGB.js → chunk-X4SSIHH7.js} +4 -4
  71. package/dist/{chunk-NI4FAFNL.js → chunk-XDMCPTDG.js} +90 -65
  72. package/dist/{chunk-OTGABFC4.js → chunk-XNUH2AOW.js} +4 -4
  73. package/dist/{chunk-NPUD4G37.js → chunk-XXV6ZSWY.js} +1 -1
  74. package/dist/{chunk-GWW6MPYK.js → chunk-YLQ63F5E.js} +4 -4
  75. package/dist/{chunk-7MYE6VFQ.js → chunk-YNR25MNM.js} +4 -4
  76. package/dist/{collection-add-products-TRY52HYQ.js → collection-add-products-LULJ6HVD.js} +5 -5
  77. package/dist/{collection-detail-MQ7ZH6OT.js → collection-detail-WEZP4V3E.js} +7 -7
  78. package/dist/{collection-list-YMCTIJ52.js → collection-list-KBONBULB.js} +8 -8
  79. package/dist/{commissions-list-56S53CQ4.js → commissions-list-SGVCP2O4.js} +5 -5
  80. package/dist/{customer-detail-VIWHZUOZ.js → customer-detail-3KIDRBLW.js} +5 -5
  81. package/dist/{customer-group-add-customers-VKUSW6AS.js → customer-group-add-customers-LKFLDXVO.js} +3 -3
  82. package/dist/{customer-group-detail-JVULZZTT.js → customer-group-detail-KWHS7V6F.js} +5 -5
  83. package/dist/{customer-group-list-SKODEZKB.js → customer-group-list-3FCJBXFY.js} +5 -5
  84. package/dist/{customer-list-LYDL4IEG.js → customer-list-JT6YE2IW.js} +5 -5
  85. package/dist/{customers-add-customer-group-FXRUE5SD.js → customers-add-customer-group-IAGH6MJJ.js} +3 -3
  86. package/dist/extension-targets.d.ts +7 -1
  87. package/dist/index.css +3 -3
  88. package/dist/index.js +121 -121
  89. package/dist/{inventory-detail-J7NMO7EZ.js → inventory-detail-LHWQTJ7S.js} +5 -5
  90. package/dist/{inventory-list-XBDJ7BHE.js → inventory-list-Q2CCGYI5.js} +5 -5
  91. package/dist/{location-detail-DTBVSZBJ.js → location-detail-ZRLP4XVJ.js} +2 -2
  92. package/dist/{location-fulfillment-providers-P5U5K4NO.js → location-fulfillment-providers-CL7PKPTT.js} +6 -6
  93. package/dist/{location-list-LH27WJBT.js → location-list-HW5F37YZ.js} +2 -2
  94. package/dist/{location-sales-channels-PRQUBZIV.js → location-sales-channels-Z4E5VA7M.js} +2 -2
  95. package/dist/{location-service-zone-create-O6GYRZEE.js → location-service-zone-create-WZXZFMA2.js} +4 -4
  96. package/dist/{location-service-zone-manage-areas-DBP3P27I.js → location-service-zone-manage-areas-5SYZKBQK.js} +4 -4
  97. package/dist/{marketplace-add-currencies-IPE5RJF6.js → marketplace-add-currencies-ZBLGQQCX.js} +3 -3
  98. package/dist/{marketplace-detail-VNCNRAE4.js → marketplace-detail-RZWOCVGF.js} +5 -5
  99. package/dist/{offer-detail-page-KQMSZLQN.js → offer-detail-page-XS52BE5U.js} +7 -7
  100. package/dist/{offer-variant-detail-page-GESVAA2S.js → offer-variant-detail-page-QQGOMRUY.js} +4 -4
  101. package/dist/{offers-NW24IATZ.js → offers-UUFYROYV.js} +7 -7
  102. package/dist/{order-create-claim-Y7ESDXLI.js → order-create-claim-AG3GMAE2.js} +5 -5
  103. package/dist/{order-create-edit-CAKL6MJQ.js → order-create-edit-N3TDQQIT.js} +5 -5
  104. package/dist/{order-create-exchange-QGSECB7D.js → order-create-exchange-ZCQBC54O.js} +5 -5
  105. package/dist/{order-create-return-R5WJBQ5W.js → order-create-return-VUHKWVQM.js} +5 -5
  106. package/dist/{order-detail-DGZXN7IQ.js → order-detail-CTZELMAQ.js} +4 -4
  107. package/dist/{order-edit-billing-address-ZAQ3FPRT.js → order-edit-billing-address-S4YOG2EE.js} +1 -1
  108. package/dist/{order-list-6LIYSO2R.js → order-list-D6RWIRDG.js} +8 -8
  109. package/dist/pages/index.js +67 -67
  110. package/dist/{payout-list-VUJKOAOJ.js → payout-list-WE3H7FKO.js} +5 -5
  111. package/dist/{price-list-configuration-DYFBYDQE.js → price-list-configuration-4UNGTKCM.js} +4 -4
  112. package/dist/{price-list-create-U2DMHUQE.js → price-list-create-6XVYEUCA.js} +7 -7
  113. package/dist/{price-list-detail-CAK3AFSU.js → price-list-detail-PBMKVUIE.js} +7 -7
  114. package/dist/{price-list-list-PJIIPQOF.js → price-list-list-EM3TNZQG.js} +5 -5
  115. package/dist/{price-list-prices-add-6TO5RTTD.js → price-list-prices-add-MZXRSG77.js} +6 -6
  116. package/dist/{product-create-KCMW6PCB.js → product-create-3PZNLIDT.js} +10 -4
  117. package/dist/{product-detail-A6DZWYEL.js → product-detail-IVRD2OHL.js} +6 -6
  118. package/dist/{product-edit-KMK7CMLI.js → product-edit-HCJYIONN.js} +3 -5
  119. package/dist/{product-list-CIHKL6N7.js → product-list-E3GWVLRE.js} +9 -10
  120. package/dist/{product-media-P57SRDNX.js → product-media-B5D2HUQF.js} +2 -2
  121. package/dist/{product-organization-QNCCL277.js → product-organization-5FUCDOGD.js} +1 -1
  122. package/dist/{product-sales-channels-GD7NYUP3.js → product-sales-channels-GUK6FTDA.js} +2 -2
  123. package/dist/{product-tag-detail-D54OKWUZ.js → product-tag-detail-RTRJYLTX.js} +8 -8
  124. package/dist/{product-tag-list-QNWZAU5G.js → product-tag-list-OTYBGV3W.js} +8 -8
  125. package/dist/{product-type-detail-TXZ6HTOV.js → product-type-detail-DTFOBWJ6.js} +7 -7
  126. package/dist/{product-type-list-OZILJZLG.js → product-type-list-AQ3GEAZX.js} +5 -5
  127. package/dist/{profile-detail-PFJX3LPX.js → profile-detail-H5QMV4F4.js} +1 -1
  128. package/dist/{profile-edit-O6Z3XJ4U.js → profile-edit-FQYTJKYW.js} +3 -1
  129. package/dist/{promotion-detail-H6S4JYYD.js → promotion-detail-N7JHJGSW.js} +4 -4
  130. package/dist/{promotion-list-A3V4W5DY.js → promotion-list-MIL2B752.js} +8 -8
  131. package/dist/{refund-reason-list-YYCNRERE.js → refund-reason-list-LLDTOBXO.js} +6 -6
  132. package/dist/{region-add-countries-UO5A42HM.js → region-add-countries-WIJCJPOX.js} +3 -3
  133. package/dist/{region-create-7NA6RKWS.js → region-create-B3I3W7QJ.js} +3 -3
  134. package/dist/{region-detail-VA4FGEKA.js → region-detail-3OFMBGML.js} +5 -5
  135. package/dist/{region-list-WU4LTP5Y.js → region-list-DD5S5BD2.js} +5 -5
  136. package/dist/{reservation-list-SGGW2MSN.js → reservation-list-EJPMH7UX.js} +5 -5
  137. package/dist/{reset-password-7KNQD6OM.js → reset-password-AZ2RPOG5.js} +1 -1
  138. package/dist/{return-reason-list-HMSZJDKI.js → return-reason-list-3YXRYEFA.js} +8 -8
  139. package/dist/{sales-channel-add-products-6TXYF3HM.js → sales-channel-add-products-4MJ7BSJQ.js} +5 -5
  140. package/dist/{sales-channel-detail-SYE4FUXD.js → sales-channel-detail-2NDESJPC.js} +7 -7
  141. package/dist/{sales-channel-list-4CNHLSBR.js → sales-channel-list-WBG6DUZJ.js} +3 -3
  142. package/dist/{shipping-option-type-list-7NSGG7ZI.js → shipping-option-type-list-7F5R6ACH.js} +5 -5
  143. package/dist/{shipping-profiles-list-AKSZ4O35.js → shipping-profiles-list-KXXYHJIY.js} +5 -5
  144. package/dist/{store-address-edit-M6A37RFY.js → store-address-edit-4SDHKPM7.js} +3 -1
  145. package/dist/{store-closure-edit-VE7D5F7I.js → store-closure-edit-DCLHOBDW.js} +3 -1
  146. package/dist/{store-details-45RPSTMU.js → store-details-Y3IF7R24.js} +8 -8
  147. package/dist/{store-edit-HABD7SAL.js → store-edit-33N7EQE2.js} +2 -2
  148. package/dist/{store-list-XZU26QTH.js → store-list-P6RDAS5M.js} +8 -8
  149. package/dist/{store-payment-details-edit-JUM745OG.js → store-payment-details-edit-KSD2S64U.js} +3 -1
  150. package/dist/{store-professional-details-edit-NKBYKBCA.js → store-professional-details-edit-BYQQX7FL.js} +3 -1
  151. package/dist/{tax-region-create-SKBBBZXJ.js → tax-region-create-7FXHJKVB.js} +1 -1
  152. package/dist/{tax-region-detail-UGD2KK2H.js → tax-region-detail-6AFMQQP7.js} +6 -6
  153. package/dist/{tax-region-list-GRZIXRD4.js → tax-region-list-IBT5YP3U.js} +4 -4
  154. package/dist/{tax-region-province-detail-LITAO6EZ.js → tax-region-province-detail-CBCYMSGF.js} +5 -5
  155. package/dist/{tax-region-tax-override-create-NCAWHUOU.js → tax-region-tax-override-create-UIF2BQFK.js} +7 -7
  156. package/dist/{tax-region-tax-override-edit-OOP7RQZR.js → tax-region-tax-override-edit-USEIJ2VG.js} +7 -7
  157. package/dist/{user-invite-FCWARLW5.js → user-invite-LSWNFFLT.js} +3 -3
  158. package/dist/{user-list-62A6ZMIX.js → user-list-B66HEMCD.js} +5 -5
  159. package/package.json +9 -9
  160. package/dist/{chunk-PEVS3GLB.js → chunk-5NAX6LXB.js} +3 -3
  161. package/dist/{chunk-7OKYEA6I.js → chunk-HC2TEEKQ.js} +3 -3
  162. package/dist/{product-add-existing-attributes-XIJB2NXI.js → product-add-existing-attributes-UVVJDOEN.js} +3 -3
@@ -19,16 +19,16 @@ import {
19
19
  import {
20
20
  Thumbnail
21
21
  } from "./chunk-WIYFXWRI.js";
22
- import {
23
- _DataTable,
24
- useDataTable
25
- } from "./chunk-6ZVV2XHU.js";
26
22
  import {
27
23
  SingleColumnPage
28
24
  } from "./chunk-H6MYB7GB.js";
29
25
  import {
30
26
  useQueryParams
31
27
  } from "./chunk-THHRRYRS.js";
28
+ import {
29
+ _DataTable,
30
+ useDataTable
31
+ } from "./chunk-GRFWCCUW.js";
32
32
  import {
33
33
  ActionMenu
34
34
  } from "./chunk-BDGZ4EQO.js";
@@ -10,16 +10,16 @@ import {
10
10
  import {
11
11
  TextCell
12
12
  } from "./chunk-JHIMVLB2.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-6ZVV2XHU.js";
17
13
  import {
18
14
  SingleColumnPage
19
15
  } from "./chunk-H6MYB7GB.js";
20
16
  import {
21
17
  useQueryParams
22
18
  } from "./chunk-THHRRYRS.js";
19
+ import {
20
+ _DataTable,
21
+ useDataTable
22
+ } from "./chunk-GRFWCCUW.js";
23
23
  import {
24
24
  useShippingOptionTypes
25
25
  } from "./chunk-ABS7HMLY.js";
@@ -9,14 +9,14 @@ import {
9
9
  } from "./chunk-APMBU7ZV.js";
10
10
  import {
11
11
  useProductTableQuery
12
- } from "./chunk-5NSOIZFB.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-6ZVV2XHU.js";
12
+ } from "./chunk-S4IDR46L.js";
17
13
  import {
18
14
  SingleColumnPage
19
15
  } from "./chunk-H6MYB7GB.js";
16
+ import {
17
+ _DataTable,
18
+ useDataTable
19
+ } from "./chunk-GRFWCCUW.js";
20
20
  import {
21
21
  useProductTag
22
22
  } from "./chunk-ABS7HMLY.js";
@@ -8917,7 +8917,7 @@ var en_default = {
8917
8917
  },
8918
8918
  actions: {
8919
8919
  save: "Save",
8920
- saveAsDraft: "Save as draft",
8920
+ saveAsDraft: "Save draft",
8921
8921
  copy: "Copy",
8922
8922
  copied: "Copied",
8923
8923
  duplicate: "Duplicate",
@@ -9,14 +9,14 @@ import {
9
9
  } from "./chunk-APMBU7ZV.js";
10
10
  import {
11
11
  useProductTableQuery
12
- } from "./chunk-5NSOIZFB.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-6ZVV2XHU.js";
12
+ } from "./chunk-S4IDR46L.js";
17
13
  import {
18
14
  SingleColumnPage
19
15
  } from "./chunk-H6MYB7GB.js";
16
+ import {
17
+ _DataTable,
18
+ useDataTable
19
+ } from "./chunk-GRFWCCUW.js";
20
20
  import {
21
21
  useProductType
22
22
  } from "./chunk-EWFOFSF7.js";
@@ -7,13 +7,13 @@ import {
7
7
  import {
8
8
  useCustomerTableQuery
9
9
  } from "./chunk-GRH7C3QN.js";
10
- import {
11
- _DataTable,
12
- useDataTable
13
- } from "./chunk-6ZVV2XHU.js";
14
10
  import {
15
11
  SingleColumnPage
16
12
  } from "./chunk-H6MYB7GB.js";
13
+ import {
14
+ _DataTable,
15
+ useDataTable
16
+ } from "./chunk-GRFWCCUW.js";
17
17
  import {
18
18
  useCustomers
19
19
  } from "./chunk-AFYILTAC.js";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-THHRRYRS.js";
4
4
 
5
5
  // src/hooks/table/query/use-product-table-query.tsx
6
- import { useExtension, withLinkFields } from "@mercurjs/dashboard-shared";
6
+ import { useLinkQuery } from "@mercurjs/dashboard-shared";
7
7
  var DEFAULT_FIELDS = "id,title,handle,status,*collection,*categories,variants.id,thumbnail";
8
8
  var useProductTableQuery = ({
9
9
  prefix,
10
10
  pageSize = 20
11
11
  }) => {
12
- const links = useExtension().getLinks("product");
12
+ const linkQuery = useLinkQuery("product", DEFAULT_FIELDS);
13
13
  const queryObject = useQueryParams(
14
14
  [
15
15
  "offset",
@@ -50,7 +50,7 @@ var useProductTableQuery = ({
50
50
  type_id: type_id?.split(","),
51
51
  status: status?.split(","),
52
52
  q,
53
- fields: withLinkFields(DEFAULT_FIELDS, links)
53
+ fields: linkQuery.fields
54
54
  };
55
55
  return {
56
56
  searchParams,
@@ -20,16 +20,16 @@ import {
20
20
  import {
21
21
  Thumbnail
22
22
  } from "./chunk-WIYFXWRI.js";
23
+ import {
24
+ useQueryParams
25
+ } from "./chunk-THHRRYRS.js";
23
26
  import {
24
27
  _DataTable,
25
28
  useDataTable
26
- } from "./chunk-6ZVV2XHU.js";
29
+ } from "./chunk-GRFWCCUW.js";
27
30
  import {
28
31
  useDate
29
32
  } from "./chunk-UZWFZMOX.js";
30
- import {
31
- useQueryParams
32
- } from "./chunk-THHRRYRS.js";
33
33
  import {
34
34
  useStockLocations
35
35
  } from "./chunk-VXW3BCN2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPromotionStatus
3
- } from "./chunk-N2CMOV3N.js";
3
+ } from "./chunk-67KYEPSA.js";
4
4
  import {
5
5
  TextCell,
6
6
  TextHeader
@@ -1,13 +1,13 @@
1
- import {
2
- _DataTable,
3
- useDataTable
4
- } from "./chunk-6ZVV2XHU.js";
5
1
  import {
6
2
  SingleColumnPage
7
3
  } from "./chunk-H6MYB7GB.js";
8
4
  import {
9
5
  useQueryParams
10
6
  } from "./chunk-THHRRYRS.js";
7
+ import {
8
+ _DataTable,
9
+ useDataTable
10
+ } from "./chunk-GRFWCCUW.js";
11
11
  import {
12
12
  useDeleteShippingProfile,
13
13
  useShippingProfiles
@@ -6,17 +6,17 @@ import {
6
6
  } from "./chunk-APMBU7ZV.js";
7
7
  import {
8
8
  useProductTableQuery
9
- } from "./chunk-5NSOIZFB.js";
9
+ } from "./chunk-S4IDR46L.js";
10
10
  import {
11
11
  PRODUCT_IDS_KEY
12
12
  } from "./chunk-LO2ZWQGL.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-6ZVV2XHU.js";
17
13
  import {
18
14
  SingleColumnPage
19
15
  } from "./chunk-H6MYB7GB.js";
16
+ import {
17
+ _DataTable,
18
+ useDataTable
19
+ } from "./chunk-GRFWCCUW.js";
20
20
  import {
21
21
  ActionMenu
22
22
  } from "./chunk-BDGZ4EQO.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  DateCell
3
3
  } from "./chunk-25LYVP3C.js";
4
- import {
5
- _DataTable,
6
- useDataTable
7
- } from "./chunk-6ZVV2XHU.js";
8
4
  import {
9
5
  SingleColumnPage
10
6
  } from "./chunk-H6MYB7GB.js";
11
7
  import {
12
8
  useQueryParams
13
9
  } from "./chunk-THHRRYRS.js";
10
+ import {
11
+ _DataTable,
12
+ useDataTable
13
+ } from "./chunk-GRFWCCUW.js";
14
14
  import {
15
15
  useUsers
16
16
  } from "./chunk-A2F5MDPU.js";
@@ -7,13 +7,13 @@ import {
7
7
  import {
8
8
  useRegionTableQuery
9
9
  } from "./chunk-7SVLKK6Q.js";
10
- import {
11
- _DataTable,
12
- useDataTable
13
- } from "./chunk-6ZVV2XHU.js";
14
10
  import {
15
11
  SingleColumnPage
16
12
  } from "./chunk-H6MYB7GB.js";
13
+ import {
14
+ _DataTable,
15
+ useDataTable
16
+ } from "./chunk-GRFWCCUW.js";
17
17
  import {
18
18
  useDeleteRegion,
19
19
  useRegions
@@ -22,14 +22,14 @@ import {
22
22
  } from "./chunk-APMBU7ZV.js";
23
23
  import {
24
24
  useProductTableQuery
25
- } from "./chunk-5NSOIZFB.js";
25
+ } from "./chunk-S4IDR46L.js";
26
26
  import {
27
27
  TwoColumnPage
28
28
  } from "./chunk-E74OUNA3.js";
29
29
  import {
30
30
  _DataTable,
31
31
  useDataTable
32
- } from "./chunk-6ZVV2XHU.js";
32
+ } from "./chunk-GRFWCCUW.js";
33
33
  import {
34
34
  ActionMenu
35
35
  } from "./chunk-BDGZ4EQO.js";
@@ -7,13 +7,13 @@ import {
7
7
  import {
8
8
  useCustomerTableQuery
9
9
  } from "./chunk-GRH7C3QN.js";
10
- import {
11
- _DataTable,
12
- useDataTable
13
- } from "./chunk-6ZVV2XHU.js";
14
10
  import {
15
11
  SingleColumnPage
16
12
  } from "./chunk-H6MYB7GB.js";
13
+ import {
14
+ _DataTable,
15
+ useDataTable
16
+ } from "./chunk-GRFWCCUW.js";
17
17
  import {
18
18
  useCustomerGroup,
19
19
  useCustomers,
@@ -10,7 +10,7 @@ import {
10
10
  decorateVariantsWithDefaultValues,
11
11
  generateVariantsFromAttributes,
12
12
  normalizeProductFormValues
13
- } from "./chunk-OPE24DZA.js";
13
+ } from "./chunk-3FKB6UTO.js";
14
14
  import {
15
15
  HandleInput
16
16
  } from "./chunk-HJ56YXBU.js";
@@ -20,9 +20,6 @@ import {
20
20
  import {
21
21
  useAttributeTableQuery
22
22
  } from "./chunk-4YWKKCTT.js";
23
- import {
24
- DataTable
25
- } from "./chunk-C4XKPQ6T.js";
26
23
  import {
27
24
  SingleCategoryCombobox
28
25
  } from "./chunk-DP6YFZHP.js";
@@ -59,6 +56,10 @@ import {
59
56
  import {
60
57
  require_dist
61
58
  } from "./chunk-VYSB4CTB.js";
59
+ import {
60
+ _DataTable,
61
+ useDataTable
62
+ } from "./chunk-GRFWCCUW.js";
62
63
  import {
63
64
  useProductAttributes
64
65
  } from "./chunk-F5NW4XBU.js";
@@ -118,14 +119,13 @@ import {
118
119
  import { useTranslation as useTranslation2 } from "react-i18next";
119
120
 
120
121
  // src/pages/products/product-create/components/product-create-attributes-form/product-create-add-attributes-modal.tsx
122
+ import { Badge, Button, Checkbox } from "@medusajs/ui";
123
+ import { keepPreviousData } from "@tanstack/react-query";
121
124
  import {
122
- Badge,
123
- Button,
124
- createDataTableColumnHelper
125
- } from "@medusajs/ui";
125
+ createColumnHelper
126
+ } from "@tanstack/react-table";
126
127
  import { useEffect, useMemo, useState } from "react";
127
128
  import { useTranslation } from "react-i18next";
128
- import { keepPreviousData } from "@tanstack/react-query";
129
129
  import { jsx, jsxs } from "react/jsx-runtime";
130
130
  var ADD_ATTRIBUTES_MODAL_ID = "add-attributes";
131
131
  var PAGE_SIZE = 20;
@@ -142,12 +142,10 @@ var ProductCreateAddAttributesModal = () => {
142
142
  const { t } = useTranslation();
143
143
  const { getValues, setValue } = form;
144
144
  const { setIsOpen, getIsOpen } = useStackedModal();
145
- const [rowSelection, setRowSelection] = useState(
146
- {}
147
- );
148
- const [state, setState] = useState([]);
145
+ const [rowSelection, setRowSelection] = useState({});
146
+ const [selected, setSelected] = useState([]);
149
147
  const categoryId = form.watch("category_id");
150
- const { searchParams } = useAttributeTableQuery({
148
+ const { searchParams, raw } = useAttributeTableQuery({
151
149
  pageSize: PAGE_SIZE,
152
150
  prefix: ADD_ATTRIBUTES_MODAL_ID
153
151
  });
@@ -166,12 +164,14 @@ var ProductCreateAddAttributesModal = () => {
166
164
  const attributes = getValues("attributes") ?? [];
167
165
  const existing = attributes.filter((a) => a.attribute_id);
168
166
  const selection = {};
169
- const stateEntries = [];
167
+ const entries = [];
170
168
  for (const a of existing) {
171
169
  if (a.attribute_id) {
172
170
  selection[a.attribute_id] = true;
173
- const apiAttr = product_attributes?.find((pa) => pa.id === a.attribute_id);
174
- stateEntries.push({
171
+ const apiAttr = product_attributes?.find(
172
+ (pa) => pa.id === a.attribute_id
173
+ );
174
+ entries.push({
175
175
  id: a.attribute_id,
176
176
  name: a.title,
177
177
  values: Array.isArray(a.values) ? a.values : a.values ? [a.values] : [],
@@ -185,7 +185,7 @@ var ProductCreateAddAttributesModal = () => {
185
185
  for (const attr of product_attributes) {
186
186
  if (attr.is_required && !selection[attr.id]) {
187
187
  selection[attr.id] = true;
188
- stateEntries.push({
188
+ entries.push({
189
189
  id: attr.id,
190
190
  name: attr.name,
191
191
  values: [],
@@ -197,9 +197,10 @@ var ProductCreateAddAttributesModal = () => {
197
197
  }
198
198
  }
199
199
  setRowSelection(selection);
200
- setState(stateEntries);
200
+ setSelected(entries);
201
201
  }, [open, getValues, product_attributes]);
202
- const onRowSelectionChange = (next) => {
202
+ const updater = (fn) => {
203
+ const next = typeof fn === "function" ? fn(rowSelection) : fn;
203
204
  if (product_attributes) {
204
205
  for (const attr of product_attributes) {
205
206
  if (attr.is_required) {
@@ -207,24 +208,20 @@ var ProductCreateAddAttributesModal = () => {
207
208
  }
208
209
  }
209
210
  }
210
- const ids = Object.keys(next);
211
- const addedIdsSet = new Set(
212
- ids.filter((id) => next[id] && !rowSelection[id])
211
+ const addedIds = new Set(
212
+ Object.keys(next).filter((id) => next[id] && !rowSelection[id])
213
213
  );
214
- let addedAttributes = [];
215
- if (addedIdsSet.size > 0) {
216
- addedAttributes = product_attributes?.filter((attr) => addedIdsSet.has(attr.id)).map((attr) => ({
217
- id: attr.id,
218
- name: attr.name,
219
- values: [],
220
- is_variant_axis: attr.is_variant_axis,
221
- type: attr.type,
222
- available_values: attr.values?.map((v) => ({ id: v.id, name: v.name })) ?? []
223
- })) ?? [];
224
- }
225
- setState((prev) => {
226
- const filteredPrev = prev.filter((a) => next[a.id]);
227
- return Array.from(/* @__PURE__ */ new Set([...filteredPrev, ...addedAttributes]));
214
+ const addedAttributes = addedIds.size > 0 ? product_attributes?.filter((attr) => addedIds.has(attr.id)).map((attr) => ({
215
+ id: attr.id,
216
+ name: attr.name,
217
+ values: [],
218
+ is_variant_axis: attr.is_variant_axis,
219
+ type: attr.type,
220
+ available_values: attr.values?.map((v) => ({ id: v.id, name: v.name })) ?? []
221
+ })) ?? [] : [];
222
+ setSelected((prev) => {
223
+ const kept = prev.filter((a) => next[a.id]);
224
+ return Array.from(/* @__PURE__ */ new Set([...kept, ...addedAttributes]));
228
225
  });
229
226
  setRowSelection(next);
230
227
  };
@@ -234,7 +231,7 @@ var ProductCreateAddAttributesModal = () => {
234
231
  const requiredIds = new Set(
235
232
  product_attributes?.filter((a) => a.is_required).map((a) => a.id) ?? []
236
233
  );
237
- const selectedAttributes = state.map((a) => ({
234
+ const selectedAttributes = selected.map((a) => ({
238
235
  attribute_id: a.id,
239
236
  title: a.name,
240
237
  values: a.values,
@@ -252,28 +249,42 @@ var ProductCreateAddAttributesModal = () => {
252
249
  };
253
250
  const filters = useAttributeTableFilters();
254
251
  const columns = useColumns();
252
+ const { table } = useDataTable({
253
+ data: product_attributes ?? [],
254
+ columns,
255
+ count,
256
+ getRowId: (row) => row.id,
257
+ pageSize: PAGE_SIZE,
258
+ enablePagination: true,
259
+ enableRowSelection: (row) => !row.original.is_required,
260
+ rowSelection: { state: rowSelection, updater },
261
+ prefix: ADD_ATTRIBUTES_MODAL_ID
262
+ });
255
263
  if (isError) {
256
264
  throw error;
257
265
  }
258
266
  return /* @__PURE__ */ jsxs(StackedFocusModal.Content, { className: "flex flex-col overflow-hidden", children: [
259
267
  /* @__PURE__ */ jsx(StackedFocusModal.Header, {}),
260
- /* @__PURE__ */ jsx(StackedFocusModal.Body, { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsx(
261
- DataTable,
268
+ /* @__PURE__ */ jsx(StackedFocusModal.Body, { className: "flex size-full flex-col overflow-hidden", children: /* @__PURE__ */ jsx(
269
+ _DataTable,
262
270
  {
263
- data: product_attributes,
271
+ table,
264
272
  columns,
265
- filters,
266
- rowCount: count,
273
+ count,
267
274
  pageSize: PAGE_SIZE,
268
- getRowId: (row) => row.id,
269
- rowSelection: {
270
- state: rowSelection,
271
- onRowSelectionChange,
272
- enableRowSelection: (row) => !row.original.is_required
273
- },
274
275
  isLoading,
276
+ filters,
277
+ orderBy: [
278
+ { key: "name", label: t("attributes.fields.name") },
279
+ { key: "created_at", label: t("fields.createdAt") },
280
+ { key: "updated_at", label: t("fields.updatedAt") }
281
+ ],
282
+ queryObject: raw,
283
+ prefix: ADD_ATTRIBUTES_MODAL_ID,
275
284
  layout: "fill",
276
- prefix: ADD_ATTRIBUTES_MODAL_ID
285
+ pagination: true,
286
+ search: true,
287
+ noRecords: { message: t("attributes.list.noRecordsMessage") }
277
288
  }
278
289
  ) }),
279
290
  /* @__PURE__ */ jsx(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
@@ -282,28 +293,43 @@ var ProductCreateAddAttributesModal = () => {
282
293
  ] }) })
283
294
  ] });
284
295
  };
285
- var columnHelper = createDataTableColumnHelper();
296
+ var columnHelper = createColumnHelper();
286
297
  var useColumns = () => {
287
298
  const { t } = useTranslation();
288
299
  return useMemo(
289
300
  () => [
290
- columnHelper.select(),
301
+ columnHelper.display({
302
+ id: "select",
303
+ header: ({ table }) => /* @__PURE__ */ jsx(
304
+ Checkbox,
305
+ {
306
+ checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
307
+ onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
308
+ }
309
+ ),
310
+ cell: ({ row }) => /* @__PURE__ */ jsx(
311
+ Checkbox,
312
+ {
313
+ checked: row.getIsSelected(),
314
+ disabled: !row.getCanSelect(),
315
+ onCheckedChange: (value) => row.toggleSelected(!!value),
316
+ onClick: (e) => e.stopPropagation()
317
+ }
318
+ )
319
+ }),
291
320
  columnHelper.accessor("name", {
292
- header: t("attributes.fields.name"),
293
- enableSorting: false
321
+ header: t("attributes.fields.productAttribute")
294
322
  }),
295
323
  columnHelper.accessor("handle", {
296
324
  header: t("attributes.fields.handle"),
297
325
  cell: (info) => {
298
326
  const handle = info.getValue();
299
327
  return handle ? `/${handle}` : "-";
300
- },
301
- enableSorting: false
328
+ }
302
329
  }),
303
330
  columnHelper.accessor("is_required", {
304
331
  header: t("attributes.fields.required"),
305
- cell: (info) => info.getValue() ? t("filters.radio.yes") : t("filters.radio.no"),
306
- enableSorting: false
332
+ cell: (info) => info.getValue() ? t("filters.radio.yes") : t("filters.radio.no")
307
333
  }),
308
334
  columnHelper.accessor("type", {
309
335
  header: t("attributes.fields.type"),
@@ -311,13 +337,11 @@ var useColumns = () => {
311
337
  const type = info.getValue();
312
338
  const labelKey = ATTRIBUTE_TYPE_LABELS[type];
313
339
  return labelKey ? t(labelKey) : type;
314
- },
315
- enableSorting: false
340
+ }
316
341
  }),
317
342
  columnHelper.accessor("is_variant_axis", {
318
343
  header: t("attributes.fields.variantAxis"),
319
- cell: (info) => info.getValue() ? t("filters.radio.yes") : t("filters.radio.no"),
320
- enableSorting: false
344
+ cell: (info) => info.getValue() ? t("filters.radio.yes") : t("filters.radio.no")
321
345
  }),
322
346
  columnHelper.display({
323
347
  id: "values",
@@ -1285,7 +1309,7 @@ function formatFileSize(bytes, decimalPlaces = 2) {
1285
1309
  // src/pages/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx
1286
1310
  import {
1287
1311
  Alert,
1288
- Checkbox,
1312
+ Checkbox as Checkbox2,
1289
1313
  clx,
1290
1314
  Heading as Heading2,
1291
1315
  Hint as Hint2,
@@ -1391,7 +1415,7 @@ var ProductCreateVariantsSection = () => {
1391
1415
  },
1392
1416
  children: [
1393
1417
  /* @__PURE__ */ jsx5("div", { children: /* @__PURE__ */ jsx5(
1394
- Checkbox,
1418
+ Checkbox2,
1395
1419
  {
1396
1420
  className: "relative",
1397
1421
  checked: getCheckboxState(watchedVariants),
@@ -1432,7 +1456,7 @@ var ProductCreateVariantsSection = () => {
1432
1456
  render: ({
1433
1457
  field: { value, onChange, ...field }
1434
1458
  }) => /* @__PURE__ */ jsx5(Form.Item, { children: /* @__PURE__ */ jsx5(Form.Control, { children: /* @__PURE__ */ jsx5(
1435
- Checkbox,
1459
+ Checkbox2,
1436
1460
  {
1437
1461
  className: "relative",
1438
1462
  ...field,
@@ -2030,6 +2054,7 @@ var ProductCreateForm = ({
2030
2054
  Button3,
2031
2055
  {
2032
2056
  "data-name": SAVE_DRAFT_BUTTON,
2057
+ variant: "secondary",
2033
2058
  size: "small",
2034
2059
  type: "submit",
2035
2060
  isLoading,
@@ -18,16 +18,16 @@ import {
18
18
  import {
19
19
  SectionRow
20
20
  } from "./chunk-3XPXUIK3.js";
21
- import {
22
- _DataTable,
23
- useDataTable
24
- } from "./chunk-6ZVV2XHU.js";
25
21
  import {
26
22
  SingleColumnPage
27
23
  } from "./chunk-H6MYB7GB.js";
28
24
  import {
29
25
  useQueryParams
30
26
  } from "./chunk-THHRRYRS.js";
27
+ import {
28
+ _DataTable,
29
+ useDataTable
30
+ } from "./chunk-GRFWCCUW.js";
31
31
  import {
32
32
  useCommissionRules,
33
33
  useDefaultCommission
@@ -2,7 +2,7 @@ import {
2
2
  TaxOverrideTable,
3
3
  TaxRateLine,
4
4
  useTaxOverrideTable
5
- } from "./chunk-M5BZBKA3.js";
5
+ } from "./chunk-4QQ6BFWQ.js";
6
6
  import {
7
7
  TaxRegionCard
8
8
  } from "./chunk-KXWN75T2.js";
@@ -10,13 +10,13 @@ import {
10
10
  import {
11
11
  useProductTypeTableQuery
12
12
  } from "./chunk-VOHEQ7B5.js";
13
- import {
14
- _DataTable,
15
- useDataTable
16
- } from "./chunk-6ZVV2XHU.js";
17
13
  import {
18
14
  SingleColumnPage
19
15
  } from "./chunk-H6MYB7GB.js";
16
+ import {
17
+ _DataTable,
18
+ useDataTable
19
+ } from "./chunk-GRFWCCUW.js";
20
20
  import {
21
21
  useProductTypes
22
22
  } from "./chunk-EWFOFSF7.js";
@@ -11,16 +11,16 @@ import {
11
11
  import {
12
12
  StatusCell
13
13
  } from "./chunk-DB6ANJBO.js";
14
- import {
15
- _DataTable,
16
- useDataTable
17
- } from "./chunk-6ZVV2XHU.js";
18
14
  import {
19
15
  SingleColumnPage
20
16
  } from "./chunk-H6MYB7GB.js";
21
17
  import {
22
18
  useQueryParams
23
19
  } from "./chunk-THHRRYRS.js";
20
+ import {
21
+ _DataTable,
22
+ useDataTable
23
+ } from "./chunk-GRFWCCUW.js";
24
24
  import {
25
25
  usePriceLists
26
26
  } from "./chunk-G2LHEJLS.js";