@medusajs/dashboard 3.0.0-snapshot-20251202223100 → 3.0.0-snapshot-20251208164410

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 (241) hide show
  1. package/dist/{adjust-inventory-WZOCLB5V.mjs → adjust-inventory-ZB3AVET7.mjs} +1 -1
  2. package/dist/{api-key-management-create-W7NL2IYN.mjs → api-key-management-create-U6VGZK7R.mjs} +3 -3
  3. package/dist/{api-key-management-detail-LDBEO446.mjs → api-key-management-detail-OEAWWV5O.mjs} +13 -13
  4. package/dist/{api-key-management-edit-TLVLXAVK.mjs → api-key-management-edit-TJM737A7.mjs} +3 -3
  5. package/dist/{api-key-management-list-FTLC3ELT.mjs → api-key-management-list-ZRYMMTF5.mjs} +3 -3
  6. package/dist/{api-key-management-sales-channels-NYY3NZOE.mjs → api-key-management-sales-channels-D2RAHI7W.mjs} +4 -4
  7. package/dist/app.css +3 -3
  8. package/dist/app.js +17416 -15980
  9. package/dist/app.mjs +11 -11
  10. package/dist/{campaign-create-LHL7FKQK.mjs → campaign-create-IXOWJQ4L.mjs} +3 -3
  11. package/dist/{campaign-detail-T3V6M3XE.mjs → campaign-detail-TFQCDDIN.mjs} +10 -10
  12. package/dist/{categories-metadata-V6FDXGSN.mjs → categories-metadata-7JFVYYUN.mjs} +10 -10
  13. package/dist/{category-create-ELMCLH4J.mjs → category-create-BTMZYQ5R.mjs} +5 -5
  14. package/dist/{category-detail-DNWTF4FV.mjs → category-detail-UUEMLEVJ.mjs} +14 -14
  15. package/dist/{category-edit-TYKLEYGE.mjs → category-edit-Q3KEELHO.mjs} +2 -2
  16. package/dist/{category-list-IJ3DLPYQ.mjs → category-list-Z6HS6N75.mjs} +5 -5
  17. package/dist/{category-organize-PDLC54E2.mjs → category-organize-45NPSRNG.mjs} +2 -2
  18. package/dist/{category-products-ATK63QHB.mjs → category-products-KW6X3JDW.mjs} +13 -13
  19. package/dist/{chunk-WPXYFJEP.mjs → chunk-2WLOIS3L.mjs} +1 -1
  20. package/dist/{chunk-UHIPGDJZ.mjs → chunk-35G7IXTE.mjs} +15 -15
  21. package/dist/{chunk-DODQ3KJT.mjs → chunk-3RRA56WC.mjs} +8 -3
  22. package/dist/{chunk-DKIUGYWW.mjs → chunk-3ZJ55SFA.mjs} +2 -2
  23. package/dist/{chunk-OXPE5TAY.mjs → chunk-42TMWI76.mjs} +1 -1
  24. package/dist/{chunk-OFN7DIZA.mjs → chunk-5AM254NB.mjs} +83 -3
  25. package/dist/{chunk-56TDUOXV.mjs → chunk-5N33TBBX.mjs} +1 -1
  26. package/dist/{chunk-5LGRZSEH.mjs → chunk-67RC6SEX.mjs} +1 -1
  27. package/dist/{chunk-O4RZ3Y65.mjs → chunk-7H6DB666.mjs} +1 -1
  28. package/dist/{chunk-5EGFR4EO.mjs → chunk-AGBHQZZT.mjs} +318 -236
  29. package/dist/{chunk-E3AFVPLW.mjs → chunk-BWU3ZE4W.mjs} +1 -1
  30. package/dist/{chunk-IKTS7EHT.mjs → chunk-D55WNQYO.mjs} +1 -1
  31. package/dist/{chunk-XDLBQGST.mjs → chunk-EFRTOOI5.mjs} +1 -1
  32. package/dist/{chunk-ETOJCN3Q.mjs → chunk-FJHAGJ5G.mjs} +1 -1
  33. package/dist/{chunk-K5QWNI6V.mjs → chunk-FNQ227BC.mjs} +1 -1
  34. package/dist/{chunk-A6PWH2CK.mjs → chunk-GHBURGZC.mjs} +1 -1
  35. package/dist/{chunk-4MG5LND4.mjs → chunk-HEYM67GY.mjs} +1 -1
  36. package/dist/{chunk-QHRVYT5N.mjs → chunk-HRSO6H4F.mjs} +3 -3
  37. package/dist/{chunk-REUYEF7L.mjs → chunk-MB7M5THW.mjs} +1 -1
  38. package/dist/{chunk-KLNRCI3K.mjs → chunk-MOGV3UZD.mjs} +1 -1
  39. package/dist/{chunk-3C6WQ7NH.mjs → chunk-NFEW5CVI.mjs} +37 -3
  40. package/dist/{chunk-VGXF4DOW.mjs → chunk-NKGKWMUU.mjs} +5 -5
  41. package/dist/{chunk-RLDK4LY5.mjs → chunk-NTYLG6Y3.mjs} +1 -1
  42. package/dist/{chunk-AF7A24XI.mjs → chunk-O5DGX2NZ.mjs} +1 -1
  43. package/dist/{chunk-T2ANPJ36.mjs → chunk-OMRGW7JS.mjs} +3 -3
  44. package/dist/{chunk-7V2JZU2B.mjs → chunk-P23S5LDK.mjs} +2 -2
  45. package/dist/{chunk-OAW7KLET.mjs → chunk-PPRHEG37.mjs} +2 -2
  46. package/dist/{chunk-AENRV3N7.mjs → chunk-QW4SQVMT.mjs} +109 -50
  47. package/dist/{chunk-MWBKAP7W.mjs → chunk-RNYL6AXZ.mjs} +2 -2
  48. package/dist/{chunk-KWP436SM.mjs → chunk-S3MMZPMX.mjs} +2 -2
  49. package/dist/{chunk-ND5YSIPU.mjs → chunk-SAZHCRHS.mjs} +1 -1
  50. package/dist/{chunk-M3CKVBZC.mjs → chunk-YGEJFHC3.mjs} +1 -1
  51. package/dist/chunk-ZHH3W7CN.mjs +171 -0
  52. package/dist/{collection-add-products-7WSD7YU4.mjs → collection-add-products-YSTEEHMF.mjs} +14 -14
  53. package/dist/{collection-create-I2A2X4VK.mjs → collection-create-RIGJHEX5.mjs} +2 -2
  54. package/dist/{collection-detail-NVE55BPK.mjs → collection-detail-P5JWWFHH.mjs} +14 -14
  55. package/dist/{collection-edit-RGH7NCUE.mjs → collection-edit-WX5G3FHR.mjs} +2 -2
  56. package/dist/{collection-list-SXHRKTIU.mjs → collection-list-PU6SWYVL.mjs} +24 -23
  57. package/dist/{collection-metadata-ZREV7BND.mjs → collection-metadata-R55DUZSX.mjs} +11 -11
  58. package/dist/{customer-detail-O4L55RY6.mjs → customer-detail-HVGU3DRM.mjs} +14 -14
  59. package/dist/{customer-group-detail-LSZA4ARM.mjs → customer-group-detail-QKFWIFYH.mjs} +13 -13
  60. package/dist/{customer-group-list-6JTEUJAC.mjs → customer-group-list-WLG2ZMBD.mjs} +13 -13
  61. package/dist/{customers-add-customer-group-MHJ34FDF.mjs → customers-add-customer-group-KL5UXXOR.mjs} +13 -13
  62. package/dist/{edit-inventory-item-LMDNUI6M.mjs → edit-inventory-item-O6JLGZE4.mjs} +1 -1
  63. package/dist/{edit-inventory-item-attributes-DPJIHBP3.mjs → edit-inventory-item-attributes-AUVR3GYY.mjs} +1 -1
  64. package/dist/{edit-reservation-IOOZBJ2T.mjs → edit-reservation-GQ6R6GVA.mjs} +2 -2
  65. package/dist/{edit-rules-CEE2IKS6.mjs → edit-rules-PJWEWMM7.mjs} +12 -12
  66. package/dist/en.json +49 -3
  67. package/dist/{inventory-create-H62EOWR6.mjs → inventory-create-P3WYAGQZ.mjs} +10 -10
  68. package/dist/{inventory-detail-ALOIH3H7.mjs → inventory-detail-C2NU7GTA.mjs} +10 -10
  69. package/dist/{inventory-list-RQBI7UJX.mjs → inventory-list-ADJQDNX5.mjs} +1 -1
  70. package/dist/{inventory-metadata-ICOCEY75.mjs → inventory-metadata-V2N3HOPG.mjs} +10 -10
  71. package/dist/{inventory-stock-LDEZTKU4.mjs → inventory-stock-5DCIGKBI.mjs} +10 -10
  72. package/dist/{location-detail-UNXAQQSZ.mjs → location-detail-2CJWVT5M.mjs} +15 -15
  73. package/dist/{location-fulfillment-providers-XVFFAB6I.mjs → location-fulfillment-providers-PYPUR74W.mjs} +15 -14
  74. package/dist/{location-sales-channels-UVYT52SH.mjs → location-sales-channels-JPH5BTUY.mjs} +3 -3
  75. package/dist/{location-service-zone-shipping-option-create-THNTZX5P.mjs → location-service-zone-shipping-option-create-HLZLP422.mjs} +11 -11
  76. package/dist/{location-service-zone-shipping-option-edit-TQNTCYII.mjs → location-service-zone-shipping-option-edit-OYTEZGGC.mjs} +4 -4
  77. package/dist/{login-EMANCYJH.mjs → login-AKO3BIQT.mjs} +10 -10
  78. package/dist/{manage-locations-2VDQ3ILT.mjs → manage-locations-ATCDVTSR.mjs} +1 -1
  79. package/dist/{order-allocate-items-FCJTB2IB.mjs → order-allocate-items-2H25GRTK.mjs} +3 -3
  80. package/dist/{order-create-claim-P5ADYS5P.mjs → order-create-claim-CWGDAFFU.mjs} +17 -17
  81. package/dist/{order-create-edit-CVPRRPOA.mjs → order-create-edit-KJODOQXN.mjs} +11 -11
  82. package/dist/{order-create-exchange-IHV6VKO5.mjs → order-create-exchange-TM4FQLKM.mjs} +23 -23
  83. package/dist/{order-create-fulfillment-SY6UM3NJ.mjs → order-create-fulfillment-2WJZPAWX.mjs} +14 -14
  84. package/dist/{order-create-refund-AGKPMCF6.mjs → order-create-refund-A6WKCHX7.mjs} +15 -15
  85. package/dist/{order-create-return-5UH7FN3H.mjs → order-create-return-NDKTI4E5.mjs} +5 -5
  86. package/dist/{order-create-shipment-J34CYL32.mjs → order-create-shipment-3AVEAGAY.mjs} +10 -10
  87. package/dist/{order-detail-EVDCA6UP.mjs → order-detail-7HXZEBWJ.mjs} +31 -31
  88. package/dist/{order-edit-billing-address-JH3XNOCQ.mjs → order-edit-billing-address-DPK7HTLM.mjs} +10 -10
  89. package/dist/{order-edit-email-KV2IHQRT.mjs → order-edit-email-UJ2OUKHJ.mjs} +10 -10
  90. package/dist/{order-edit-shipping-address-WMNNU53B.mjs → order-edit-shipping-address-5ZCGHHZE.mjs} +10 -10
  91. package/dist/{order-list-26YQAIRH.mjs → order-list-5C4TVJRH.mjs} +4 -4
  92. package/dist/{order-metadata-F4LZ73LR.mjs → order-metadata-UKTGLYWR.mjs} +10 -10
  93. package/dist/{order-receive-return-LSMD7POH.mjs → order-receive-return-N7VLM2GX.mjs} +11 -11
  94. package/dist/{order-request-transfer-A3EBBZ5N.mjs → order-request-transfer-5ENT7IOT.mjs} +11 -11
  95. package/dist/{price-list-configuration-2G3WFC3J.mjs → price-list-configuration-SS2VMD4N.mjs} +4 -4
  96. package/dist/{price-list-create-RLT7G7KF.mjs → price-list-create-FF4F6M2A.mjs} +17 -17
  97. package/dist/{price-list-detail-TKRELOK2.mjs → price-list-detail-HQF4ZR2U.mjs} +17 -17
  98. package/dist/{price-list-edit-6URYI6AK.mjs → price-list-edit-VRI5T4W3.mjs} +2 -2
  99. package/dist/{price-list-list-FLINOQCK.mjs → price-list-list-S2HWTXKV.mjs} +3 -3
  100. package/dist/{price-list-prices-add-UPUY72HG.mjs → price-list-prices-add-JYZAHKAQ.mjs} +13 -13
  101. package/dist/{price-list-prices-edit-ZHAQDPWX.mjs → price-list-prices-edit-TRCLLGU4.mjs} +2 -2
  102. package/dist/{product-attributes-ZR63AQWA.mjs → product-attributes-NEXVST24.mjs} +12 -12
  103. package/dist/{product-create-EQ6SN5QT.mjs → product-create-WU4YFCMM.mjs} +377 -554
  104. package/dist/{product-create-variant-7C5PKKX7.mjs → product-create-variant-RDEE4IX7.mjs} +11 -11
  105. package/dist/{product-detail-ATPFDPI2.mjs → product-detail-J4JYWH2M.mjs} +38 -54
  106. package/dist/{product-edit-XPUNYMD7.mjs → product-edit-ZF2WYHPB.mjs} +12 -12
  107. package/dist/{product-export-GFLEIKIM.mjs → product-export-QDX6343F.mjs} +23 -22
  108. package/dist/{product-image-variants-edit-TC3M4PGX.mjs → product-image-variants-edit-5L5J32SO.mjs} +10 -10
  109. package/dist/{product-import-2Z5I7RXI.mjs → product-import-6TEVSKGQ.mjs} +10 -10
  110. package/dist/{product-list-33ANLONH.mjs → product-list-BHGGJX6B.mjs} +17 -17
  111. package/dist/{product-media-WCLPCVR3.mjs → product-media-EKXMOSO4.mjs} +2 -2
  112. package/dist/{product-metadata-GQU7EVZ3.mjs → product-metadata-BCJJNWAC.mjs} +10 -10
  113. package/dist/product-option-create-3Z73MSHD.mjs +336 -0
  114. package/dist/product-option-detail-4VRUA7KT.mjs +322 -0
  115. package/dist/product-option-edit-YIKFL6OY.mjs +324 -0
  116. package/dist/product-option-list-CR7NCCMH.mjs +267 -0
  117. package/dist/product-option-metadata-7CSZUQ7M.mjs +71 -0
  118. package/dist/product-options-manage-QOMXMPGW.mjs +304 -0
  119. package/dist/{product-organization-T2TQ5EH6.mjs → product-organization-IG54OB75.mjs} +14 -14
  120. package/dist/{product-prices-MKMKBH6P.mjs → product-prices-UMEIS5AZ.mjs} +1 -1
  121. package/dist/{product-sales-channels-5YIO22UW.mjs → product-sales-channels-2SALTLTF.mjs} +3 -3
  122. package/dist/{product-shipping-profile-PL76UMVZ.mjs → product-shipping-profile-VPHZLKDT.mjs} +13 -13
  123. package/dist/{product-stock-6QHBTDUQ.mjs → product-stock-3ILUPCVN.mjs} +10 -10
  124. package/dist/{product-tag-create-B6EOKDJT.mjs → product-tag-create-OOUTLHHD.mjs} +10 -10
  125. package/dist/{product-tag-detail-TQP7ZWSR.mjs → product-tag-detail-YVKJEAKT.mjs} +28 -27
  126. package/dist/{product-tag-edit-RPLWDG5A.mjs → product-tag-edit-RV5WITSN.mjs} +10 -10
  127. package/dist/{product-tag-list-PZTGHM7M.mjs → product-tag-list-ZSPFYZIL.mjs} +26 -25
  128. package/dist/{product-tag-metadata-FKKOT5CD.mjs → product-tag-metadata-S5YL3FUL.mjs} +10 -10
  129. package/dist/{product-type-detail-DDIBFR7O.mjs → product-type-detail-EFVZRETM.mjs} +13 -13
  130. package/dist/{product-type-metadata-EXCYTTQG.mjs → product-type-metadata-TNAASDKX.mjs} +10 -10
  131. package/dist/{product-variant-detail-GCESZH4H.mjs → product-variant-detail-CLP5FJP6.mjs} +10 -10
  132. package/dist/{product-variant-edit-JHOQJN6U.mjs → product-variant-edit-REMB77V7.mjs} +11 -11
  133. package/dist/{product-variant-manage-inventory-items-B7TUBSD5.mjs → product-variant-manage-inventory-items-IGDCLZQE.mjs} +2 -2
  134. package/dist/{product-variant-media-6WWLRINP.mjs → product-variant-media-EKI4BTEV.mjs} +1 -1
  135. package/dist/{product-variant-metadata-NEZIGTEP.mjs → product-variant-metadata-5JIY5KLN.mjs} +10 -10
  136. package/dist/{promotion-add-campaign-MKDYE7MW.mjs → promotion-add-campaign-DOALJUKJ.mjs} +3 -3
  137. package/dist/{promotion-create-CUAQY2NH.mjs → promotion-create-2PTB6NQI.mjs} +18 -18
  138. package/dist/{promotion-detail-2S7FWTXF.mjs → promotion-detail-RGXCA2XS.mjs} +10 -10
  139. package/dist/{refund-reason-create-4YAO4325.mjs → refund-reason-create-AGEFXEIZ.mjs} +10 -10
  140. package/dist/{refund-reason-edit-5J2VIRIL.mjs → refund-reason-edit-DL56EKBY.mjs} +10 -10
  141. package/dist/{refund-reason-list-453DXONV.mjs → refund-reason-list-RL2ZG7IJ.mjs} +13 -13
  142. package/dist/{region-create-QLPSK6TX.mjs → region-create-UVJICJRX.mjs} +1 -1
  143. package/dist/{region-edit-JCJHA6TY.mjs → region-edit-3NVXQECN.mjs} +1 -1
  144. package/dist/{region-metadata-C7DIBM35.mjs → region-metadata-2HO3SAPM.mjs} +10 -10
  145. package/dist/{reservation-create-BW4CDTWR.mjs → reservation-create-Z7TWUE2L.mjs} +3 -3
  146. package/dist/{reservation-detail-GFNWLSI2.mjs → reservation-detail-2AOBK5EY.mjs} +10 -10
  147. package/dist/{reservation-list-RGL67CIU.mjs → reservation-list-MN22JYAW.mjs} +2 -2
  148. package/dist/{reservation-metadata-OI2G4BDW.mjs → reservation-metadata-BFPJTXK6.mjs} +10 -10
  149. package/dist/{sales-channel-add-products-63NGB37Z.mjs → sales-channel-add-products-4LNP2TUM.mjs} +13 -13
  150. package/dist/{sales-channel-create-TOBEDYFD.mjs → sales-channel-create-UFFXX5HK.mjs} +2 -2
  151. package/dist/{sales-channel-detail-LJPQAJDT.mjs → sales-channel-detail-UMYMS2JA.mjs} +13 -13
  152. package/dist/{sales-channel-edit-XUTE5GB5.mjs → sales-channel-edit-SP2HF4E3.mjs} +2 -2
  153. package/dist/{sales-channel-list-TBAN7UT6.mjs → sales-channel-list-CV4V6R7H.mjs} +11 -11
  154. package/dist/{sales-channel-metadata-SE4TGSDB.mjs → sales-channel-metadata-REOQHHUT.mjs} +10 -10
  155. package/dist/{shipping-option-type-create-MB4ENYKV.mjs → shipping-option-type-create-XAWQO66M.mjs} +10 -10
  156. package/dist/{shipping-option-type-detail-IX4JGSTK.mjs → shipping-option-type-detail-G4WLGIAA.mjs} +11 -11
  157. package/dist/{shipping-option-type-edit-B5KU5LER.mjs → shipping-option-type-edit-OI6TBKGG.mjs} +10 -10
  158. package/dist/{shipping-option-type-list-TVR5OE2C.mjs → shipping-option-type-list-6GNCKAFB.mjs} +11 -11
  159. package/dist/{shipping-profile-metadata-Z35SYLBS.mjs → shipping-profile-metadata-MANQ7ZEI.mjs} +10 -10
  160. package/dist/{store-detail-VUJSSOKZ.mjs → store-detail-N2CP3MTB.mjs} +10 -10
  161. package/dist/{store-edit-3XS6IC2Z.mjs → store-edit-Q25HCMCQ.mjs} +1 -1
  162. package/dist/{store-metadata-TYFTDOEK.mjs → store-metadata-U22TVWK2.mjs} +10 -10
  163. package/dist/{tax-region-create-ZTCTKE4C.mjs → tax-region-create-JZB7NFIG.mjs} +11 -11
  164. package/dist/{tax-region-detail-MHM4MAOS.mjs → tax-region-detail-CBZ3ZJN2.mjs} +29 -28
  165. package/dist/{tax-region-edit-SFJGFTAV.mjs → tax-region-edit-E56XVHW2.mjs} +11 -11
  166. package/dist/{tax-region-province-detail-VMOV4JPV.mjs → tax-region-province-detail-2DC2U4EN.mjs} +29 -28
  167. package/dist/{tax-region-tax-override-create-GRXLTURD.mjs → tax-region-tax-override-create-JWGWGYB4.mjs} +28 -27
  168. package/dist/{tax-region-tax-override-edit-D2YBOBEI.mjs → tax-region-tax-override-edit-7DCU55AS.mjs} +27 -26
  169. package/dist/{user-detail-N6PT3KRP.mjs → user-detail-K5UMPO2L.mjs} +1 -1
  170. package/dist/{user-metadata-D5HNZWZY.mjs → user-metadata-EX5WDGCR.mjs} +10 -10
  171. package/dist/{workflow-execution-detail-GSUDCTN3.mjs → workflow-execution-detail-GBPFVG3O.mjs} +10 -10
  172. package/package.json +9 -9
  173. package/src/components/inputs/combobox/combobox.tsx +173 -92
  174. package/src/components/layout/main-layout/main-layout.tsx +7 -4
  175. package/src/dashboard-app/routes/get-route.map.tsx +64 -12
  176. package/src/hooks/api/index.ts +1 -0
  177. package/src/hooks/api/product-options.tsx +151 -0
  178. package/src/hooks/api/products.tsx +26 -66
  179. package/src/hooks/table/columns/use-product-option-table-columns.tsx +44 -0
  180. package/src/hooks/table/filters/index.ts +1 -0
  181. package/src/hooks/table/filters/use-product-option-table-filters.tsx +33 -0
  182. package/src/hooks/table/query/use-product-option-table-query.tsx +34 -0
  183. package/src/i18n/translations/$schema.json +171 -4
  184. package/src/i18n/translations/en.json +49 -3
  185. package/src/routes/product-options/common/hooks/use-delete-product-option-action.tsx +41 -0
  186. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-details.tsx +71 -0
  187. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-form.tsx +192 -0
  188. package/src/routes/product-options/product-option-create/components/create-product-option-form/create-product-option-organize.tsx +77 -0
  189. package/src/routes/product-options/product-option-create/components/create-product-option-form/index.ts +1 -0
  190. package/src/routes/product-options/product-option-create/components/create-product-option-form/schema.ts +15 -0
  191. package/src/routes/product-options/product-option-create/index.ts +1 -0
  192. package/src/routes/product-options/product-option-create/product-option-create.tsx +10 -0
  193. package/src/routes/product-options/product-option-detail/breadcrumb.tsx +14 -0
  194. package/src/routes/product-options/product-option-detail/components/product-option-general-section/index.ts +1 -0
  195. package/src/routes/product-options/product-option-detail/components/product-option-general-section/product-option-general-section.tsx +81 -0
  196. package/src/routes/product-options/product-option-detail/components/product-option-product-section/index.ts +1 -0
  197. package/src/routes/product-options/product-option-detail/components/product-option-product-section/product-option-product-section.tsx +74 -0
  198. package/src/routes/product-options/product-option-detail/index.ts +3 -0
  199. package/src/routes/product-options/product-option-detail/loader.ts +17 -0
  200. package/src/routes/product-options/product-option-detail/product-option-detail.tsx +50 -0
  201. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-details.tsx +94 -0
  202. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-form.tsx +116 -0
  203. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/edit-product-option-organize.tsx +77 -0
  204. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/index.ts +1 -0
  205. package/src/routes/product-options/product-option-edit/components/edit-product-option-form/schema.ts +13 -0
  206. package/src/routes/product-options/product-option-edit/index.ts +1 -0
  207. package/src/routes/product-options/product-option-edit/product-option-edit.tsx +34 -0
  208. package/src/routes/product-options/product-option-list/components/product-option-list-table/index.ts +1 -0
  209. package/src/routes/product-options/product-option-list/components/product-option-list-table/product-option-list-table.tsx +140 -0
  210. package/src/routes/product-options/product-option-list/index.ts +1 -0
  211. package/src/routes/product-options/product-option-list/product-option-list.tsx +19 -0
  212. package/src/routes/product-options/product-option-metadata/index.ts +1 -0
  213. package/src/routes/product-options/product-option-metadata/product-option-metadata.tsx +27 -0
  214. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-general-section/product-create-general-section.tsx +16 -4
  215. package/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +220 -198
  216. package/src/routes/products/product-create/components/product-create-form/product-create-form.tsx +4 -7
  217. package/src/routes/products/product-create/constants.ts +2 -0
  218. package/src/routes/products/product-create/utils.ts +6 -1
  219. package/src/routes/products/product-detail/components/product-option-section/product-option-section.tsx +31 -49
  220. package/src/routes/products/product-options-manage/components/product-options-manage-form/index.ts +1 -0
  221. package/src/routes/products/product-options-manage/components/product-options-manage-form/product-options-manage-form.tsx +284 -0
  222. package/src/routes/products/product-options-manage/index.ts +1 -0
  223. package/src/routes/products/product-options-manage/product-options-manage.tsx +35 -0
  224. package/dist/product-create-option-GAEPSU6J.mjs +0 -145
  225. package/dist/product-edit-option-VIU3ZICO.mjs +0 -150
  226. package/src/routes/products/product-create-option/components/create-product-option-form/create-product-option-form.tsx +0 -122
  227. package/src/routes/products/product-create-option/components/create-product-option-form/index.ts +0 -1
  228. package/src/routes/products/product-create-option/index.ts +0 -1
  229. package/src/routes/products/product-create-option/product-create-option.tsx +0 -26
  230. package/src/routes/products/product-edit-option/components/edit-product-option-form/edit-product-option-form.tsx +0 -123
  231. package/src/routes/products/product-edit-option/components/edit-product-option-form/index.ts +0 -1
  232. package/src/routes/products/product-edit-option/index.ts +0 -1
  233. package/src/routes/products/product-edit-option/product-edit-option.tsx +0 -32
  234. package/dist/{chunk-ACJ3PPQJ.mjs → chunk-2QH2TBJ2.mjs} +3 -3
  235. package/dist/{customer-group-add-customers-QU4Q56SS.mjs → customer-group-add-customers-2Y2GVCDV.mjs} +3 -3
  236. package/dist/{customer-list-ZXCGIXJC.mjs → customer-list-TG4D4QOT.mjs} +3 -3
  237. package/dist/{location-list-OYBI7EGV.mjs → location-list-ZJMZZ6T3.mjs} +1 -1
  238. package/dist/{product-type-list-QX7QC6RI.mjs → product-type-list-7WQ5D2KV.mjs} +3 -3
  239. package/dist/{region-list-XQRIBDMF.mjs → region-list-JAQXIBYD.mjs} +3 -3
  240. package/dist/{return-reason-list-VYLLXDG4.mjs → return-reason-list-ATE2XU4H.mjs} +3 -3
  241. package/dist/{user-list-6KATHOTJ.mjs → user-list-KPI3BTOA.mjs} +3 -3
@@ -11,6 +11,7 @@ import { sdk } from "../../lib/client"
11
11
  import { queryClient } from "../../lib/query-client"
12
12
  import { queryKeysFactory } from "../../lib/query-key-factory"
13
13
  import { inventoryItemsQueryKeys } from "./inventory.tsx"
14
+ import { productOptionsQueryKeys } from "./product-options.tsx"
14
15
 
15
16
  const PRODUCTS_QUERY_KEY = "products" as const
16
17
  export const productsQueryKeys = queryKeysFactory(PRODUCTS_QUERY_KEY)
@@ -18,72 +19,6 @@ export const productsQueryKeys = queryKeysFactory(PRODUCTS_QUERY_KEY)
18
19
  const VARIANTS_QUERY_KEY = "product_variants" as const
19
20
  export const variantsQueryKeys = queryKeysFactory(VARIANTS_QUERY_KEY)
20
21
 
21
- const OPTIONS_QUERY_KEY = "product_options" as const
22
- export const optionsQueryKeys = queryKeysFactory(OPTIONS_QUERY_KEY)
23
-
24
- export const useCreateProductOption = (
25
- productId: string,
26
- options?: UseMutationOptions<any, FetchError, any>
27
- ) => {
28
- return useMutation({
29
- mutationFn: (payload: HttpTypes.AdminCreateProductOption) =>
30
- sdk.admin.product.createOption(productId, payload),
31
- onSuccess: (data: any, variables: any, context: any) => {
32
- queryClient.invalidateQueries({ queryKey: optionsQueryKeys.lists() })
33
- queryClient.invalidateQueries({
34
- queryKey: productsQueryKeys.detail(productId),
35
- })
36
- options?.onSuccess?.(data, variables, context)
37
- },
38
- ...options,
39
- })
40
- }
41
-
42
- export const useUpdateProductOption = (
43
- productId: string,
44
- optionId: string,
45
- options?: UseMutationOptions<any, FetchError, any>
46
- ) => {
47
- return useMutation({
48
- mutationFn: (payload: HttpTypes.AdminUpdateProductOption) =>
49
- sdk.admin.product.updateOption(productId, optionId, payload),
50
- onSuccess: (data: any, variables: any, context: any) => {
51
- queryClient.invalidateQueries({ queryKey: optionsQueryKeys.lists() })
52
- queryClient.invalidateQueries({
53
- queryKey: optionsQueryKeys.detail(optionId),
54
- })
55
- queryClient.invalidateQueries({
56
- queryKey: productsQueryKeys.detail(productId),
57
- })
58
-
59
- options?.onSuccess?.(data, variables, context)
60
- },
61
- ...options,
62
- })
63
- }
64
-
65
- export const useDeleteProductOption = (
66
- productId: string,
67
- optionId: string,
68
- options?: UseMutationOptions<any, FetchError, void>
69
- ) => {
70
- return useMutation({
71
- mutationFn: () => sdk.admin.product.deleteOption(productId, optionId),
72
- onSuccess: (data: any, variables: any, context: any) => {
73
- queryClient.invalidateQueries({ queryKey: optionsQueryKeys.lists() })
74
- queryClient.invalidateQueries({
75
- queryKey: optionsQueryKeys.detail(optionId),
76
- })
77
- queryClient.invalidateQueries({
78
- queryKey: productsQueryKeys.detail(productId),
79
- })
80
-
81
- options?.onSuccess?.(data, variables, context)
82
- },
83
- ...options,
84
- })
85
- }
86
-
87
22
  export const useProductVariant = (
88
23
  productId: string,
89
24
  variantId: string,
@@ -375,6 +310,31 @@ export const useDeleteProduct = (
375
310
  })
376
311
  }
377
312
 
313
+ export const useLinkProductOptions = (
314
+ productId: string,
315
+ options?: UseMutationOptions<
316
+ HttpTypes.AdminProductResponse,
317
+ FetchError,
318
+ HttpTypes.AdminLinkProductOptions
319
+ >
320
+ ) => {
321
+ return useMutation({
322
+ mutationFn: (payload) => sdk.admin.product.linkOptions(productId, payload),
323
+ onSuccess: (data, variables, context) => {
324
+ queryClient.invalidateQueries({ queryKey: productsQueryKeys.lists() })
325
+ queryClient.invalidateQueries({
326
+ queryKey: productsQueryKeys.detail(productId),
327
+ })
328
+ queryClient.invalidateQueries({
329
+ queryKey: productOptionsQueryKeys.lists(),
330
+ })
331
+
332
+ options?.onSuccess?.(data, variables, context)
333
+ },
334
+ ...options,
335
+ })
336
+ }
337
+
378
338
  export const useExportProducts = (
379
339
  query?: HttpTypes.AdminProductListParams,
380
340
  options?: UseMutationOptions<
@@ -0,0 +1,44 @@
1
+ import { createColumnHelper } from "@tanstack/react-table"
2
+ import { useMemo } from "react"
3
+ import { useTranslation } from "react-i18next"
4
+ import { TextCell } from "../../../components/table/table-cells/common/text-cell"
5
+ import { HttpTypes } from "@medusajs/types"
6
+ import { Badge } from "@medusajs/ui"
7
+
8
+ const columnHelper = createColumnHelper<HttpTypes.AdminProductOption>()
9
+
10
+ export const useProductOptionTableColumns = () => {
11
+ const { t } = useTranslation()
12
+
13
+ return useMemo(
14
+ () => [
15
+ columnHelper.accessor("title", {
16
+ header: t("fields.title"),
17
+ cell: ({ getValue }) => <TextCell text={getValue()} />,
18
+ }),
19
+ columnHelper.accessor("values", {
20
+ header: t("fields.values"),
21
+ cell: ({ getValue }) => {
22
+ const values = getValue()
23
+ const count = values?.length || 0
24
+ const displayText =
25
+ count > 0 ? `${count} ${count === 1 ? "value" : "values"}` : "-"
26
+
27
+ return <TextCell text={displayText} />
28
+ },
29
+ }),
30
+ columnHelper.accessor("is_exclusive", {
31
+ header: t("fields.status"),
32
+ cell: ({ getValue }) => {
33
+ const isExclusive = getValue()
34
+ return (
35
+ <Badge size="xsmall" color={isExclusive ? "grey" : "blue"}>
36
+ {t(`general.${isExclusive ? "exclusive" : "global"}`)}
37
+ </Badge>
38
+ )
39
+ },
40
+ }),
41
+ ],
42
+ [t]
43
+ )
44
+ }
@@ -4,6 +4,7 @@ export * from "./use-customer-table-filters"
4
4
  export * from "./use-date-table-filters"
5
5
  export * from "./use-order-table-filters"
6
6
  export * from "./use-product-table-filters"
7
+ export * from "./use-product-option-table-filters"
7
8
  export * from "./use-product-tag-table-filters"
8
9
  export * from "./use-product-type-table-filters"
9
10
  export * from "./use-promotion-table-filters"
@@ -0,0 +1,33 @@
1
+ import { useTranslation } from "react-i18next"
2
+ import { createDataTableFilterHelper } from "@medusajs/ui"
3
+ import { HttpTypes } from "@medusajs/types"
4
+ import { useDataTableDateFilters } from "../../../components/data-table/helpers/general/use-data-table-date-filters.tsx"
5
+ import { useMemo } from "react"
6
+
7
+ const filterHelper = createDataTableFilterHelper<HttpTypes.AdminProductOption>()
8
+
9
+ export const useProductOptionTableFilters = () => {
10
+ const { t } = useTranslation()
11
+ const dateFilters = useDataTableDateFilters()
12
+
13
+ return useMemo(
14
+ () => [
15
+ filterHelper.accessor("is_exclusive", {
16
+ label: t("fields.type"),
17
+ type: "radio",
18
+ options: [
19
+ {
20
+ label: t("general.exclusive"),
21
+ value: "true",
22
+ },
23
+ {
24
+ label: t("general.global"),
25
+ value: "false",
26
+ },
27
+ ],
28
+ }),
29
+ ...dateFilters,
30
+ ],
31
+ [dateFilters, t]
32
+ )
33
+ }
@@ -0,0 +1,34 @@
1
+ import { HttpTypes } from "@medusajs/types"
2
+ import { useQueryParams } from "../../use-query-params"
3
+
4
+ type UseProductOptionTableQueryProps = {
5
+ prefix?: string
6
+ pageSize?: number
7
+ }
8
+
9
+ export const useProductOptionTableQuery = ({
10
+ prefix,
11
+ pageSize = 20,
12
+ }: UseProductOptionTableQueryProps) => {
13
+ const queryObject = useQueryParams(
14
+ ["offset", "q", "order", "created_at", "updated_at", "is_exclusive"],
15
+ prefix
16
+ )
17
+
18
+ const { offset, created_at, updated_at, q, order, is_exclusive } = queryObject
19
+
20
+ const searchParams: HttpTypes.AdminProductOptionListParams = {
21
+ limit: pageSize,
22
+ offset: offset ? Number(offset) : 0,
23
+ order,
24
+ created_at: created_at ? JSON.parse(created_at) : undefined,
25
+ updated_at: updated_at ? JSON.parse(updated_at) : undefined,
26
+ is_exclusive: is_exclusive ? JSON.parse(is_exclusive) : undefined,
27
+ q,
28
+ }
29
+
30
+ return {
31
+ searchParams,
32
+ raw: queryObject,
33
+ }
34
+ }
@@ -178,6 +178,12 @@
178
178
  },
179
179
  "noMoreData": {
180
180
  "type": "string"
181
+ },
182
+ "exclusive": {
183
+ "type": "string"
184
+ },
185
+ "global": {
186
+ "type": "string"
181
187
  }
182
188
  },
183
189
  "required": [
@@ -237,7 +243,9 @@
237
243
  "unsavedChangesDescription",
238
244
  "includesTaxTooltip",
239
245
  "excludesTaxTooltip",
240
- "noMoreData"
246
+ "noMoreData",
247
+ "exclusive",
248
+ "global"
241
249
  ],
242
250
  "additionalProperties": false
243
251
  },
@@ -509,6 +517,9 @@
509
517
  },
510
518
  "cannotUndo": {
511
519
  "type": "string"
520
+ },
521
+ "manage": {
522
+ "type": "string"
512
523
  }
513
524
  },
514
525
  "required": [
@@ -555,7 +566,8 @@
555
566
  "hide",
556
567
  "export",
557
568
  "import",
558
- "cannotUndo"
569
+ "cannotUndo",
570
+ "manage"
559
571
  ],
560
572
  "additionalProperties": false
561
573
  },
@@ -1692,6 +1704,9 @@
1692
1704
  },
1693
1705
  "required": ["label", "hint"],
1694
1706
  "additionalProperties": false
1707
+ },
1708
+ "selectValuesHint": {
1709
+ "type": "string"
1695
1710
  }
1696
1711
  },
1697
1712
  "required": [
@@ -1701,7 +1716,8 @@
1701
1716
  "optionTitle",
1702
1717
  "optionValues",
1703
1718
  "productVariants",
1704
- "productOptions"
1719
+ "productOptions",
1720
+ "selectValuesHint"
1705
1721
  ],
1706
1722
  "additionalProperties": false
1707
1723
  },
@@ -2652,11 +2668,39 @@
2652
2668
  "required": ["header", "successToast"],
2653
2669
  "additionalProperties": false
2654
2670
  },
2671
+ "manage": {
2672
+ "type": "object",
2673
+ "properties": {
2674
+ "header": {
2675
+ "type": "string"
2676
+ },
2677
+ "description": {
2678
+ "type": "string"
2679
+ },
2680
+ "label": {
2681
+ "type": "string"
2682
+ },
2683
+ "hint": {
2684
+ "type": "string"
2685
+ },
2686
+ "placeholder": {
2687
+ "type": "string"
2688
+ }
2689
+ },
2690
+ "required": [
2691
+ "header",
2692
+ "description",
2693
+ "label",
2694
+ "hint",
2695
+ "placeholder"
2696
+ ],
2697
+ "additionalProperties": false
2698
+ },
2655
2699
  "deleteWarning": {
2656
2700
  "type": "string"
2657
2701
  }
2658
2702
  },
2659
- "required": ["header", "edit", "create", "deleteWarning"],
2703
+ "required": ["header", "edit", "create", "manage", "deleteWarning"],
2660
2704
  "additionalProperties": false
2661
2705
  },
2662
2706
  "organization": {
@@ -3157,6 +3201,128 @@
3157
3201
  ],
3158
3202
  "additionalProperties": false
3159
3203
  },
3204
+ "productOptions": {
3205
+ "type": "object",
3206
+ "properties": {
3207
+ "domain": {
3208
+ "type": "string"
3209
+ },
3210
+ "subtitle": {
3211
+ "type": "string"
3212
+ },
3213
+ "values": {
3214
+ "type": "object",
3215
+ "properties": {
3216
+ "header": {
3217
+ "type": "string"
3218
+ }
3219
+ },
3220
+ "required": ["header"],
3221
+ "additionalProperties": false
3222
+ },
3223
+ "create": {
3224
+ "type": "object",
3225
+ "properties": {
3226
+ "header": {
3227
+ "type": "string"
3228
+ },
3229
+ "hint": {
3230
+ "type": "string"
3231
+ },
3232
+ "successToast": {
3233
+ "type": "string"
3234
+ },
3235
+ "tabs": {
3236
+ "type": "object",
3237
+ "properties": {
3238
+ "details": {
3239
+ "type": "string"
3240
+ },
3241
+ "organize": {
3242
+ "type": "string"
3243
+ }
3244
+ },
3245
+ "required": ["details", "organize"],
3246
+ "additionalProperties": false
3247
+ }
3248
+ },
3249
+ "required": ["header", "hint", "successToast", "tabs"],
3250
+ "additionalProperties": false
3251
+ },
3252
+ "edit": {
3253
+ "type": "object",
3254
+ "properties": {
3255
+ "header": {
3256
+ "type": "string"
3257
+ },
3258
+ "description": {
3259
+ "type": "string"
3260
+ },
3261
+ "successToast": {
3262
+ "type": "string"
3263
+ }
3264
+ },
3265
+ "required": ["header", "description", "successToast"],
3266
+ "additionalProperties": false
3267
+ },
3268
+ "delete": {
3269
+ "type": "object",
3270
+ "properties": {
3271
+ "confirmation": {
3272
+ "type": "string"
3273
+ },
3274
+ "successToast": {
3275
+ "type": "string"
3276
+ }
3277
+ },
3278
+ "required": ["confirmation", "successToast"],
3279
+ "additionalProperties": false
3280
+ },
3281
+ "fields": {
3282
+ "type": "object",
3283
+ "properties": {
3284
+ "title": {
3285
+ "type": "object",
3286
+ "properties": {
3287
+ "label": {
3288
+ "type": "string"
3289
+ },
3290
+ "placeholder": {
3291
+ "type": "string"
3292
+ }
3293
+ },
3294
+ "required": ["label", "placeholder"],
3295
+ "additionalProperties": false
3296
+ },
3297
+ "values": {
3298
+ "type": "object",
3299
+ "properties": {
3300
+ "label": {
3301
+ "type": "string"
3302
+ },
3303
+ "placeholder": {
3304
+ "type": "string"
3305
+ }
3306
+ },
3307
+ "required": ["label", "placeholder"],
3308
+ "additionalProperties": false
3309
+ }
3310
+ },
3311
+ "required": ["title", "values"],
3312
+ "additionalProperties": false
3313
+ }
3314
+ },
3315
+ "required": [
3316
+ "domain",
3317
+ "subtitle",
3318
+ "values",
3319
+ "create",
3320
+ "edit",
3321
+ "delete",
3322
+ "fields"
3323
+ ],
3324
+ "additionalProperties": false
3325
+ },
3160
3326
  "inventory": {
3161
3327
  "type": "object",
3162
3328
  "properties": {
@@ -12073,6 +12239,7 @@
12073
12239
  "products",
12074
12240
  "collections",
12075
12241
  "categories",
12242
+ "productOptions",
12076
12243
  "inventory",
12077
12244
  "giftCards",
12078
12245
  "customers",
@@ -57,7 +57,9 @@
57
57
  "unsavedChangesDescription": "You have unsaved changes that will be lost if you exit this form.",
58
58
  "includesTaxTooltip": "Prices in this column are tax inclusive.",
59
59
  "excludesTaxTooltip": "Prices in this column are tax exclusive.",
60
- "noMoreData": "No more data"
60
+ "noMoreData": "No more data",
61
+ "exclusive": "Product-specific",
62
+ "global": "Global"
61
63
  },
62
64
  "json": {
63
65
  "header": "JSON",
@@ -141,7 +143,8 @@
141
143
  "hide": "Hide",
142
144
  "export": "Export",
143
145
  "import": "Import",
144
- "cannotUndo": "This action cannot be undone"
146
+ "cannotUndo": "This action cannot be undone",
147
+ "manage": "Manage"
145
148
  },
146
149
  "operators": {
147
150
  "in": "In"
@@ -448,7 +451,8 @@
448
451
  "productOptions": {
449
452
  "label": "Product options",
450
453
  "hint": "Define the options for the product, e.g. color, size, etc."
451
- }
454
+ },
455
+ "selectValuesHint": "Select which values to use for each option"
452
456
  },
453
457
  "successToast": "Product {{title}} was successfully created."
454
458
  },
@@ -705,6 +709,13 @@
705
709
  "header": "Create Option",
706
710
  "successToast": "Option {{title}} was successfully created."
707
711
  },
712
+ "manage": {
713
+ "header": "Manage Product Options",
714
+ "description": "Associate or disassociate product options from this product.",
715
+ "label": "Product Options",
716
+ "hint": "Select which options should be associated to this product.",
717
+ "placeholder": "Select options"
718
+ },
708
719
  "deleteWarning": "You are about to delete the product option: {{title}}. This action cannot be undone."
709
720
  },
710
721
  "organization": {
@@ -841,6 +852,41 @@
841
852
  }
842
853
  }
843
854
  },
855
+ "productOptions": {
856
+ "domain": "Options",
857
+ "subtitle": "Manage product options and their associated values.",
858
+ "values": {
859
+ "header": "Values"
860
+ },
861
+ "create": {
862
+ "header": "Create Product Option",
863
+ "hint": "Create a new product option and manage its values.",
864
+ "successToast": "Product option \"{{title}}\" was successfully created.",
865
+ "tabs": {
866
+ "details": "Details",
867
+ "organize": "Organize"
868
+ }
869
+ },
870
+ "edit": {
871
+ "header": "Edit Product Option",
872
+ "description": "Edit the product option to update its details and associated values.",
873
+ "successToast": "Product option \"{{title}}\" was successfully updated."
874
+ },
875
+ "delete": {
876
+ "confirmation": "You are about to delete the product option \"{{title}}\". This action cannot be undone.",
877
+ "successToast": "Product option was successfully deleted."
878
+ },
879
+ "fields": {
880
+ "title": {
881
+ "label": "Title",
882
+ "placeholder": "Size"
883
+ },
884
+ "values": {
885
+ "label": "Values",
886
+ "placeholder": "S, M, L"
887
+ }
888
+ }
889
+ },
844
890
  "inventory": {
845
891
  "domain": "Inventory",
846
892
  "subtitle": "Manage your inventory items",
@@ -0,0 +1,41 @@
1
+ import { useNavigate } from "react-router-dom"
2
+ import { toast, usePrompt } from "@medusajs/ui"
3
+ import { useTranslation } from "react-i18next"
4
+ import { useDeleteProductOption } from "../../../../hooks/api"
5
+ import { HttpTypes } from "@medusajs/types"
6
+
7
+ export const useDeleteProductOptionAction = ({
8
+ id,
9
+ title,
10
+ }: HttpTypes.AdminProductOption) => {
11
+ const { t } = useTranslation()
12
+ const prompt = usePrompt()
13
+ const navigate = useNavigate()
14
+
15
+ const { mutateAsync } = useDeleteProductOption(id)
16
+
17
+ return async () => {
18
+ const result = await prompt({
19
+ title: t("general.areYouSure"),
20
+ description: t("productOptions.delete.confirmation", { title }),
21
+ confirmText: t("actions.delete"),
22
+ cancelText: t("actions.cancel"),
23
+ })
24
+
25
+ if (!result) {
26
+ return
27
+ }
28
+
29
+ await mutateAsync(undefined, {
30
+ onSuccess: () => {
31
+ navigate("/product-options", {
32
+ replace: true,
33
+ })
34
+ toast.success(t("productOptions.delete.successToast", { title }))
35
+ },
36
+ onError: (e) => {
37
+ toast.error(e.message)
38
+ },
39
+ })
40
+ }
41
+ }
@@ -0,0 +1,71 @@
1
+ import { Heading, Input, Text } from "@medusajs/ui"
2
+ import { UseFormReturn } from "react-hook-form"
3
+ import { useTranslation } from "react-i18next"
4
+
5
+ import { Form } from "../../../../../components/common/form"
6
+ import { ChipInput } from "../../../../../components/inputs/chip-input"
7
+ import { CreateProductOptionSchema } from "./schema"
8
+
9
+ type CreateProductOptionDetailsProps = {
10
+ form: UseFormReturn<CreateProductOptionSchema>
11
+ }
12
+
13
+ export const CreateProductOptionDetails = ({
14
+ form,
15
+ }: CreateProductOptionDetailsProps) => {
16
+ const { t } = useTranslation()
17
+
18
+ return (
19
+ <div className="flex flex-col items-center p-16">
20
+ <div className="flex w-full max-w-[720px] flex-col gap-y-8">
21
+ <div>
22
+ <Heading>{t("productOptions.create.header")}</Heading>
23
+ <Text size="small" className="text-ui-fg-subtle">
24
+ {t("productOptions.create.hint")}
25
+ </Text>
26
+ </div>
27
+ <Form.Field
28
+ control={form.control}
29
+ name="title"
30
+ render={({ field }) => {
31
+ return (
32
+ <Form.Item>
33
+ <Form.Label>
34
+ {t("productOptions.fields.title.label")}
35
+ </Form.Label>
36
+ <Form.Control>
37
+ <Input
38
+ autoComplete="off"
39
+ {...field}
40
+ placeholder={t("productOptions.fields.title.placeholder")}
41
+ />
42
+ </Form.Control>
43
+ <Form.ErrorMessage />
44
+ </Form.Item>
45
+ )
46
+ }}
47
+ />
48
+ <Form.Field
49
+ control={form.control}
50
+ name="values"
51
+ render={({ field }) => {
52
+ return (
53
+ <Form.Item>
54
+ <Form.Label>
55
+ {t("productOptions.fields.values.label")}
56
+ </Form.Label>
57
+ <Form.Control>
58
+ <ChipInput
59
+ {...field}
60
+ placeholder={t("productOptions.fields.values.placeholder")}
61
+ />
62
+ </Form.Control>
63
+ <Form.ErrorMessage />
64
+ </Form.Item>
65
+ )
66
+ }}
67
+ />
68
+ </div>
69
+ </div>
70
+ )
71
+ }